diff --git a/packages/components/package.json b/packages/components/package.json index bcd81b7faff..d17521e1ba7 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -42,7 +42,6 @@ "@talend/react-a11y": "^3.0.1", "@talend/react-bootstrap": "^2.2.2", "@talend/utils": "^3.0.4", - "ally.js": "^1.4.1", "classnames": "^2.5.1", "d3": "^7.8.5", "date-fns": "^3.3.1", diff --git a/packages/components/src/Badge/Badge.module.scss b/packages/components/src/Badge/Badge.module.scss index a358c4056c2..189a56fc50a 100644 --- a/packages/components/src/Badge/Badge.module.scss +++ b/packages/components/src/Badge/Badge.module.scss @@ -154,7 +154,7 @@ $tc-badge-disabled-opacity: 0.62; &:hover, &:focus, - &:global(.ally-focus-within) { + &:focus-within { outline: none; } } @@ -356,7 +356,7 @@ $tc-badge-disabled-opacity: 0.62; &-dropdown { .tc-badge-button { &:not(.tc-badge-disabled) { - &:global(.ally-focus-within) { + &:focus-within { border-color: tokens.$coral-color-accent-border; } } diff --git a/packages/components/src/Enumeration/Items/Item/Item.module.scss b/packages/components/src/Enumeration/Items/Item/Item.module.scss index 9b13876c4ff..21dfe239eb8 100644 --- a/packages/components/src/Enumeration/Items/Item/Item.module.scss +++ b/packages/components/src/Enumeration/Items/Item/Item.module.scss @@ -118,7 +118,7 @@ $item-checkbox-width: 20px; } .tc-enumeration-item:hover, -.tc-enumeration-item:global(.ally-focus-within) { +.tc-enumeration-item:focus-within { .tc-enumeration-item-actions { visibility: visible; } @@ -126,6 +126,6 @@ $item-checkbox-width: 20px; // disable hover if item is selected .tc-enumeration-item:hover:not(.selected-item), -.tc-enumeration-item:not(.selected-item):global(.ally-focus-within) { +.tc-enumeration-item:not(.selected-item):focus-within { background-color: tokens.$coral-color-neutral-background-medium; } diff --git a/packages/components/src/Enumeration/Items/Items.module.scss b/packages/components/src/Enumeration/Items/Items.module.scss index 899d33ca72d..11cb8438d89 100644 --- a/packages/components/src/Enumeration/Items/Items.module.scss +++ b/packages/components/src/Enumeration/Items/Items.module.scss @@ -15,7 +15,7 @@ $tc-enumeration-height: 40vh !default; [role='row']:first-child { &:hover, - &:global(.ally-focus-within) { + &:focus-within { box-shadow: inset 0 21px 3px -20px $shadow; } } diff --git a/packages/components/src/List/Toolbar/ColumnChooserButton/ColumnChooser/ColumnChooser.module.scss b/packages/components/src/List/Toolbar/ColumnChooserButton/ColumnChooser/ColumnChooser.module.scss index 85a76b77b27..6c194ca44de 100644 --- a/packages/components/src/List/Toolbar/ColumnChooserButton/ColumnChooser/ColumnChooser.module.scss +++ b/packages/components/src/List/Toolbar/ColumnChooserButton/ColumnChooser/ColumnChooser.module.scss @@ -52,7 +52,7 @@ $tc-height: 2.5rem; border-bottom: $tc-popover-border-width solid tokens.$coral-color-neutral-border-weak; } - &:global(.ally-focus-within), + &:focus-within, &:hover { background: tokens.$coral-color-neutral-background-medium; } diff --git a/packages/components/src/Status/Status.module.scss b/packages/components/src/Status/Status.module.scss index 923bd97383a..dd534857d92 100644 --- a/packages/components/src/Status/Status.module.scss +++ b/packages/components/src/Status/Status.module.scss @@ -72,7 +72,7 @@ $tc-status-space-btn-icon-label: 5px !default; } &.action:hover, - &.action:global(.ally-focus-within) { + &.action:focus-within { .tc-status-icon, .tc-status-label { opacity: 0; diff --git a/packages/components/src/Status/index.js b/packages/components/src/Status/index.js index 6460c6f6541..e72ad284296 100644 --- a/packages/components/src/Status/index.js +++ b/packages/components/src/Status/index.js @@ -1,4 +1,3 @@ -import '../polyfills/focus-within'; import { Status } from './Status.component'; export default Status; diff --git a/packages/components/src/VirtualizedList/CellTitle/CellTitle.module.scss b/packages/components/src/VirtualizedList/CellTitle/CellTitle.module.scss index 2eebe92d2cd..c87de2dddac 100644 --- a/packages/components/src/VirtualizedList/CellTitle/CellTitle.module.scss +++ b/packages/components/src/VirtualizedList/CellTitle/CellTitle.module.scss @@ -68,7 +68,7 @@ $tc-list-title-icon-size: $svg-rg-size !default; .tc-list-title-filter { &:not(.tc-list-title-disabled) { &:hover, - &:global(.ally-focus-within) { + &:focus-within { .icon { color: tokens.$coral-color-accent-text; filter: none; @@ -86,7 +86,7 @@ $tc-list-title-icon-size: $svg-rg-size !default; :global(.ReactVirtualized__Table__row) { &:hover, &:focus, - &:global(.ally-focus-within) { + &:focus-within { :global(.tc-list-title .cell-title-actions) { opacity: 1; width: 100%; @@ -100,7 +100,7 @@ $tc-list-title-icon-size: $svg-rg-size !default; :global(.ReactVirtualized__Table__row.active) { &:hover, &:focus, - &:global(.ally-focus-within) { + &:focus-within { :global(.tc-list-title .cell-title-actions) { // background: linear-gradient(90deg, tokens.$coral-color-neutral-background, tokens.$coral-color-accent-background $padding-large); } @@ -111,7 +111,7 @@ $tc-list-title-icon-size: $svg-rg-size !default; :global(.ReactVirtualized__Table__row.selected) { &:hover, &:focus, - &:global(.ally-focus-within) { + &:focus-within { :global(.tc-list-title .cell-title-actions) { // background: linear-gradient(90deg, tokens.$coral-color-neutral-background, tokens.$coral-color-accent-background $padding-large); } @@ -125,7 +125,7 @@ $tc-list-title-icon-size: $svg-rg-size !default; :global(.ReactVirtualized__Table__row) { &:hover, &:focus, - &:global(.ally-focus-within) { + &:focus-within { overflow: visible !important; :global(.tc-list-title-cell), @@ -138,7 +138,7 @@ $tc-list-title-icon-size: $svg-rg-size !default; :global(.ReactVirtualized__Table__row) { &:hover, &:focus, - &:global(.ally-focus-within) { + &:focus-within { /* avoid scrolling over x axis */ width: auto !important; right: 0 !important; diff --git a/packages/components/src/VirtualizedList/CellTitle/index.js b/packages/components/src/VirtualizedList/CellTitle/index.js index d952c1c822a..17ea41751dd 100644 --- a/packages/components/src/VirtualizedList/CellTitle/index.js +++ b/packages/components/src/VirtualizedList/CellTitle/index.js @@ -1,4 +1,3 @@ -import '../../polyfills/focus-within'; import TitleColumn, { cellType, titleColumnConfiguration } from './TitleColumn.component'; export { cellType, TitleColumn }; diff --git a/packages/components/src/VirtualizedList/ListTable/ListTable.module.scss b/packages/components/src/VirtualizedList/ListTable/ListTable.module.scss index 253e0644c02..35cc5fdd741 100644 --- a/packages/components/src/VirtualizedList/ListTable/ListTable.module.scss +++ b/packages/components/src/VirtualizedList/ListTable/ListTable.module.scss @@ -21,7 +21,7 @@ $tc-list-table-cell-padding: $padding-small !default; &:hover, &:focus, - &:global(.ally-focus-within) { + &:focus-within { background-color: tokens.$coral-color-neutral-background-medium; .cell { diff --git a/packages/components/src/VirtualizedList/RowSelection/RowSelection.module.scss b/packages/components/src/VirtualizedList/RowSelection/RowSelection.module.scss index 5aaec997f5d..1d7df26836c 100644 --- a/packages/components/src/VirtualizedList/RowSelection/RowSelection.module.scss +++ b/packages/components/src/VirtualizedList/RowSelection/RowSelection.module.scss @@ -7,7 +7,7 @@ &:hover, &:focus, - &:global(.ally-focus-within) { + &:focus-within { background: tokens.$coral-color-accent-background-hover; } } @@ -17,7 +17,7 @@ &:hover, &:focus, - &:global(.ally-focus-within) { + &:focus-within { background: tokens.$coral-color-accent-background-hover; } } @@ -35,7 +35,7 @@ &:hover, &:focus, - &:global(.ally-focus-within) { + &:focus-within { background: tokens.$coral-color-accent-background-hover; } } @@ -45,7 +45,7 @@ &:hover, &:focus, - &:global(.ally-focus-within) { + &:focus-within { background: tokens.$coral-color-accent-background-hover; } } diff --git a/packages/components/src/polyfills/focus-within.js b/packages/components/src/polyfills/focus-within.js deleted file mode 100644 index 5e7b61ca231..00000000000 --- a/packages/components/src/polyfills/focus-within.js +++ /dev/null @@ -1,3 +0,0 @@ -import ally from 'ally.js'; - -setTimeout(ally.style.focusWithin); diff --git a/packages/forms/package.json b/packages/forms/package.json index 574805458de..595ce9fbb98 100644 --- a/packages/forms/package.json +++ b/packages/forms/package.json @@ -70,7 +70,6 @@ "@testing-library/jest-dom": "^6.4.2", "@testing-library/react": "^14.2.1", "@testing-library/user-event": "^14.5.2", - "ally.js": "^1.4.1", "i18next": "^23.10.0", "i18next-scanner-typescript": "^1.2.0", "jest-in-case": "^1.0.2", diff --git a/tools/scripts-config-jest/package.json b/tools/scripts-config-jest/package.json index a1067a67708..a018e83ecce 100644 --- a/tools/scripts-config-jest/package.json +++ b/tools/scripts-config-jest/package.json @@ -36,7 +36,6 @@ }, "peerDependencies": { "@talend/design-system": ">= 8.1.0", - "ally.js": ">= 1.4.1", "i18next": ">= 23.5.1", "classnames": ">= 2.3.2", "jest-axe": ">= 8.0.0", @@ -48,9 +47,6 @@ "@talend/design-system": { "optional": true }, - "ally.js": { - "optional": true - }, "classnames": { "optional": true }, diff --git a/tools/scripts-config-jest/test-setup.js b/tools/scripts-config-jest/test-setup.js index a69f837392c..1bee61ecb9e 100644 --- a/tools/scripts-config-jest/test-setup.js +++ b/tools/scripts-config-jest/test-setup.js @@ -36,12 +36,6 @@ try { warnMessageOptionalDep('jest-axe'); } -try { - jest.mock('ally.js'); -} catch (e) { - warnMessageOptionalDep('ally.js'); -} - // add missing ResizeObserver class ResizeObserver { observe() { diff --git a/versions/dependencies.json b/versions/dependencies.json index 08048d0c9c1..541e20e8fd9 100644 --- a/versions/dependencies.json +++ b/versions/dependencies.json @@ -3,7 +3,6 @@ "angular": "^1.5.9", "ag-grid-community": "^24.0.0", "ag-grid-react": "^24.0.0", - "ally.js": "^1.4.1", "babel-polyfill": "^6.26.0", "popper.js": "1.16.1", "ag-grid": "^24.0.0", diff --git a/yarn.lock b/yarn.lock index c579be40d56..893cb1af96e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5709,14 +5709,6 @@ all-contributors-cli@^6.26.1: optionalDependencies: prettier "^2" -ally.js@^1.4.1: - version "1.4.1" - resolved "https://registry.yarnpkg.com/ally.js/-/ally.js-1.4.1.tgz#9fb7e6ba58efac4ee9131cb29aa9ee3b540bcf1e" - integrity sha512-ZewdfuwP6VewtMN36QY0gmiyvBfMnmEaNwbVu2nTS6zRt069viTgkYgaDiqu6vRJ1VJCriNqV0jGMu44R8zNbA== - dependencies: - css.escape "^1.5.0" - platform "1.3.3" - ansi-colors@^4.1.1, ansi-colors@^4.1.3: version "4.1.3" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" @@ -7664,7 +7656,7 @@ css-what@^6.0.1, css-what@^6.1.0: resolved "https://registry.yarnpkg.com/css-what/-/css-what-6.1.0.tgz#fb5effcf76f1ddea2c81bdfaa4de44e79bac70f4" integrity sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw== -css.escape@^1.5.0, css.escape@^1.5.1: +css.escape@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/css.escape/-/css.escape-1.5.1.tgz#42e27d4fa04ae32f931a4b4d4191fa9cddee97cb" integrity sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg== @@ -14741,11 +14733,6 @@ pkg-dir@^7.0.0: dependencies: find-up "^6.3.0" -platform@1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/platform/-/platform-1.3.3.tgz#646c77011899870b6a0903e75e997e8e51da7461" - integrity sha512-VJK1SRmXBpjwsB4YOHYSturx48rLKMzHgCqDH2ZDa6ZbMS/N5huoNqyQdK5Fj/xayu3fqbXckn5SeCS1EbMDZg== - polished@^4.2.2: version "4.3.1" resolved "https://registry.yarnpkg.com/polished/-/polished-4.3.1.tgz#5a00ae32715609f83d89f6f31d0f0261c6170548"