@cloudscape-design/components 3.0.839 → 3.0.841
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/alert/styles.css.js +28 -28
- package/alert/styles.scoped.css +43 -49
- package/alert/styles.selectors.js +28 -28
- package/anchor-navigation/styles.css.js +8 -8
- package/anchor-navigation/styles.scoped.css +18 -21
- package/anchor-navigation/styles.selectors.js +8 -8
- package/annotation-context/annotation/annotation-icon.d.ts +2 -1
- package/annotation-context/annotation/annotation-icon.d.ts.map +1 -1
- package/annotation-context/annotation/annotation-icon.js.map +1 -1
- package/annotation-context/annotation/annotation-popover.d.ts +2 -1
- package/annotation-context/annotation/annotation-popover.d.ts.map +1 -1
- package/annotation-context/annotation/annotation-popover.js.map +1 -1
- package/annotation-context/annotation/annotation-trigger.d.ts +1 -1
- package/annotation-context/annotation/annotation-trigger.d.ts.map +1 -1
- package/annotation-context/annotation/annotation-trigger.js.map +1 -1
- package/annotation-context/annotation/closed-annotation.d.ts +2 -1
- package/annotation-context/annotation/closed-annotation.d.ts.map +1 -1
- package/annotation-context/annotation/closed-annotation.js.map +1 -1
- package/annotation-context/annotation/open-annotation.d.ts +2 -1
- package/annotation-context/annotation/open-annotation.d.ts.map +1 -1
- package/annotation-context/annotation/open-annotation.js.map +1 -1
- package/annotation-context/annotation/styles.css.js +24 -24
- package/annotation-context/annotation/styles.scoped.css +30 -33
- package/annotation-context/annotation/styles.selectors.js +24 -24
- package/app-layout/classic.d.ts.map +1 -1
- package/app-layout/classic.js +6 -3
- package/app-layout/classic.js.map +1 -1
- package/app-layout/defaults.d.ts +2 -1
- package/app-layout/defaults.d.ts.map +1 -1
- package/app-layout/defaults.js.map +1 -1
- package/app-layout/split-panel/constants.d.ts +0 -1
- package/app-layout/split-panel/constants.d.ts.map +1 -1
- package/app-layout/split-panel/constants.js +0 -1
- package/app-layout/split-panel/constants.js.map +1 -1
- package/app-layout/split-panel/split-panel-forced-position.d.ts +5 -0
- package/app-layout/split-panel/split-panel-forced-position.d.ts.map +1 -0
- package/app-layout/split-panel/split-panel-forced-position.js +30 -0
- package/app-layout/split-panel/split-panel-forced-position.js.map +1 -0
- package/app-layout/utils/use-pointer-events.d.ts.map +1 -1
- package/app-layout/utils/use-pointer-events.js +19 -10
- package/app-layout/utils/use-pointer-events.js.map +1 -1
- package/app-layout/utils/use-resize.d.ts +1 -1
- package/app-layout/utils/use-resize.d.ts.map +1 -1
- package/app-layout/utils/use-resize.js.map +1 -1
- package/app-layout/utils/use-split-panel-focus-control.d.ts +2 -1
- package/app-layout/utils/use-split-panel-focus-control.d.ts.map +1 -1
- package/app-layout/utils/use-split-panel-focus-control.js.map +1 -1
- package/app-layout/visual-refresh/context.d.ts.map +1 -1
- package/app-layout/visual-refresh/context.js +5 -2
- package/app-layout/visual-refresh/context.js.map +1 -1
- package/app-layout/visual-refresh/drawers.d.ts +0 -8
- package/app-layout/visual-refresh/drawers.d.ts.map +1 -1
- package/app-layout/visual-refresh/drawers.js +1 -1
- package/app-layout/visual-refresh/drawers.js.map +1 -1
- package/app-layout/visual-refresh/styles.css.js +86 -86
- package/app-layout/visual-refresh/styles.scoped.css +163 -169
- package/app-layout/visual-refresh/styles.selectors.js +86 -86
- package/app-layout/visual-refresh-toolbar/compute-layout.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/compute-layout.js +6 -3
- package/app-layout/visual-refresh-toolbar/compute-layout.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/drawer/local-drawer.js +1 -1
- package/app-layout/visual-refresh-toolbar/drawer/local-drawer.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/index.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/index.js +32 -2
- package/app-layout/visual-refresh-toolbar/index.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/skeleton/styles.css.js +19 -19
- package/app-layout/visual-refresh-toolbar/skeleton/styles.scoped.css +35 -50
- package/app-layout/visual-refresh-toolbar/skeleton/styles.selectors.js +19 -19
- package/app-layout/visual-refresh-toolbar/split-panel/index.d.ts +1 -1
- package/app-layout/visual-refresh-toolbar/split-panel/index.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/split-panel/index.js +3 -1
- package/app-layout/visual-refresh-toolbar/split-panel/index.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.js +3 -5
- package/app-layout/visual-refresh-toolbar/toolbar/drawer-triggers.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/toolbar/index.d.ts.map +1 -1
- package/app-layout/visual-refresh-toolbar/toolbar/index.js +4 -1
- package/app-layout/visual-refresh-toolbar/toolbar/index.js.map +1 -1
- package/app-layout/visual-refresh-toolbar/toolbar/styles.css.js +13 -13
- package/app-layout/visual-refresh-toolbar/toolbar/styles.scoped.css +15 -18
- package/app-layout/visual-refresh-toolbar/toolbar/styles.selectors.js +13 -13
- package/area-chart/elements/area-series.d.ts +1 -1
- package/area-chart/elements/area-series.d.ts.map +1 -1
- package/area-chart/elements/area-series.js.map +1 -1
- package/area-chart/elements/threshold-series.d.ts +1 -1
- package/area-chart/elements/threshold-series.d.ts.map +1 -1
- package/area-chart/elements/threshold-series.js.map +1 -1
- package/attribute-editor/internal.d.ts.map +1 -1
- package/attribute-editor/internal.js +5 -1
- package/attribute-editor/internal.js.map +1 -1
- package/attribute-editor/row.d.ts +2 -1
- package/attribute-editor/row.d.ts.map +1 -1
- package/attribute-editor/row.js.map +1 -1
- package/attribute-editor/styles.css.js +14 -14
- package/attribute-editor/styles.scoped.css +24 -27
- package/attribute-editor/styles.selectors.js +14 -14
- package/autosuggest/analytics-metadata/interfaces.d.ts +0 -4
- package/autosuggest/analytics-metadata/interfaces.d.ts.map +1 -1
- package/autosuggest/analytics-metadata/interfaces.js.map +1 -1
- package/autosuggest/autosuggest-option.d.ts +1 -1
- package/autosuggest/autosuggest-option.d.ts.map +1 -1
- package/autosuggest/autosuggest-option.js.map +1 -1
- package/autosuggest/internal.d.ts +1 -1
- package/autosuggest/internal.d.ts.map +1 -1
- package/autosuggest/internal.js.map +1 -1
- package/autosuggest/load-more-controller.d.ts +3 -2
- package/autosuggest/load-more-controller.d.ts.map +1 -1
- package/autosuggest/load-more-controller.js.map +1 -1
- package/autosuggest/options-list.d.ts +2 -1
- package/autosuggest/options-list.d.ts.map +1 -1
- package/autosuggest/options-list.js.map +1 -1
- package/badge/styles.css.js +10 -10
- package/badge/styles.scoped.css +10 -13
- package/badge/styles.selectors.js +10 -10
- package/breadcrumb-group/analytics-metadata/interfaces.d.ts +0 -7
- package/breadcrumb-group/analytics-metadata/interfaces.d.ts.map +1 -1
- package/breadcrumb-group/analytics-metadata/interfaces.js.map +1 -1
- package/breadcrumb-group/styles.css.js +10 -10
- package/breadcrumb-group/styles.scoped.css +11 -14
- package/breadcrumb-group/styles.selectors.js +10 -10
- package/button/styles.css.js +21 -21
- package/button/styles.scoped.css +154 -157
- package/button/styles.selectors.js +21 -21
- package/button-dropdown/interfaces.d.ts +4 -3
- package/button-dropdown/interfaces.d.ts.map +1 -1
- package/button-dropdown/interfaces.js.map +1 -1
- package/button-dropdown/item-element/index.d.ts +0 -7
- package/button-dropdown/item-element/index.d.ts.map +1 -1
- package/button-dropdown/item-element/index.js.map +1 -1
- package/button-dropdown/mobile-expandable-group/mobile-expandable-group.d.ts +1 -1
- package/button-dropdown/mobile-expandable-group/mobile-expandable-group.d.ts.map +1 -1
- package/button-dropdown/mobile-expandable-group/mobile-expandable-group.js.map +1 -1
- package/button-dropdown/mobile-expandable-group/styles.css.js +5 -5
- package/button-dropdown/mobile-expandable-group/styles.scoped.css +5 -8
- package/button-dropdown/mobile-expandable-group/styles.selectors.js +5 -5
- package/button-dropdown/tooltip.d.ts +2 -1
- package/button-dropdown/tooltip.d.ts.map +1 -1
- package/button-dropdown/tooltip.js.map +1 -1
- package/button-dropdown/utils/menu-item.d.ts +3 -2
- package/button-dropdown/utils/menu-item.d.ts.map +1 -1
- package/button-dropdown/utils/menu-item.js.map +1 -1
- package/button-group/styles.css.js +4 -4
- package/button-group/styles.scoped.css +4 -7
- package/button-group/styles.selectors.js +4 -4
- package/calendar/grid/index.d.ts +2 -1
- package/calendar/grid/index.d.ts.map +1 -1
- package/calendar/grid/index.js.map +1 -1
- package/calendar/styles.css.js +21 -21
- package/calendar/styles.scoped.css +43 -46
- package/calendar/styles.selectors.js +21 -21
- package/cards/styles.css.js +39 -39
- package/cards/styles.scoped.css +50 -53
- package/cards/styles.selectors.js +39 -39
- package/checkbox/styles.css.js +3 -3
- package/checkbox/styles.scoped.css +5 -8
- package/checkbox/styles.selectors.js +3 -3
- package/code-editor/pane.d.ts +2 -1
- package/code-editor/pane.d.ts.map +1 -1
- package/code-editor/pane.js.map +1 -1
- package/code-editor/styles.css.js +33 -33
- package/code-editor/styles.scoped.css +135 -138
- package/code-editor/styles.selectors.js +33 -33
- package/collection-preferences/analytics-metadata/interfaces.d.ts +0 -24
- package/collection-preferences/analytics-metadata/interfaces.d.ts.map +1 -1
- package/collection-preferences/analytics-metadata/interfaces.js.map +1 -1
- package/collection-preferences/content-display/content-display-option.d.ts +1 -1
- package/collection-preferences/content-display/content-display-option.d.ts.map +1 -1
- package/collection-preferences/content-display/content-display-option.js.map +1 -1
- package/collection-preferences/content-display/index.d.ts.map +1 -1
- package/collection-preferences/content-display/index.js +18 -42
- package/collection-preferences/content-display/index.js.map +1 -1
- package/collection-preferences/content-display/styles.css.js +12 -13
- package/collection-preferences/content-display/styles.scoped.css +15 -47
- package/collection-preferences/content-display/styles.selectors.js +12 -13
- package/collection-preferences/styles.css.js +38 -39
- package/collection-preferences/styles.scoped.css +42 -74
- package/collection-preferences/styles.selectors.js +38 -39
- package/column-layout/flexible-column-layout/styles.css.js +5 -5
- package/column-layout/flexible-column-layout/styles.scoped.css +22 -7
- package/column-layout/flexible-column-layout/styles.selectors.js +5 -5
- package/column-layout/styles.css.js +13 -13
- package/column-layout/styles.scoped.css +43 -46
- package/column-layout/styles.selectors.js +13 -13
- package/container/styles.css.js +31 -31
- package/container/styles.scoped.css +54 -57
- package/container/styles.selectors.js +31 -31
- package/copy-to-clipboard/internal.d.ts +2 -1
- package/copy-to-clipboard/internal.d.ts.map +1 -1
- package/copy-to-clipboard/internal.js +2 -2
- package/copy-to-clipboard/internal.js.map +1 -1
- package/copy-to-clipboard/styles.css.js +3 -4
- package/copy-to-clipboard/styles.scoped.css +3 -7
- package/copy-to-clipboard/styles.selectors.js +3 -4
- package/date-picker/index.js +1 -1
- package/date-picker/index.js.map +1 -1
- package/date-picker/styles.css.js +7 -7
- package/date-picker/styles.scoped.css +9 -12
- package/date-picker/styles.selectors.js +7 -7
- package/date-range-picker/calendar/grids/index.d.ts +2 -1
- package/date-range-picker/calendar/grids/index.d.ts.map +1 -1
- package/date-range-picker/calendar/grids/index.js.map +1 -1
- package/date-range-picker/calendar/grids/monthly-grid.d.ts +2 -1
- package/date-range-picker/calendar/grids/monthly-grid.d.ts.map +1 -1
- package/date-range-picker/calendar/grids/monthly-grid.js.map +1 -1
- package/date-range-picker/calendar/range-inputs.d.ts +1 -1
- package/date-range-picker/calendar/range-inputs.d.ts.map +1 -1
- package/date-range-picker/calendar/range-inputs.js.map +1 -1
- package/date-range-picker/dropdown.d.ts +2 -2
- package/date-range-picker/dropdown.d.ts.map +1 -1
- package/date-range-picker/dropdown.js +2 -2
- package/date-range-picker/dropdown.js.map +1 -1
- package/date-range-picker/interfaces.d.ts +2 -1
- package/date-range-picker/interfaces.d.ts.map +1 -1
- package/date-range-picker/interfaces.js.map +1 -1
- package/date-range-picker/relative-range/index.d.ts +2 -1
- package/date-range-picker/relative-range/index.d.ts.map +1 -1
- package/date-range-picker/relative-range/index.js.map +1 -1
- package/date-range-picker/styles.css.js +38 -38
- package/date-range-picker/styles.scoped.css +47 -50
- package/date-range-picker/styles.selectors.js +38 -38
- package/drawer/implementation.d.ts +2 -1
- package/drawer/implementation.d.ts.map +1 -1
- package/drawer/implementation.js.map +1 -1
- package/drawer/interfaces.d.ts +2 -1
- package/drawer/interfaces.d.ts.map +1 -1
- package/drawer/interfaces.js.map +1 -1
- package/drawer/styles.css.js +5 -5
- package/drawer/styles.scoped.css +10 -13
- package/drawer/styles.selectors.js +5 -5
- package/expandable-section/expandable-section-container.d.ts +2 -1
- package/expandable-section/expandable-section-container.d.ts.map +1 -1
- package/expandable-section/expandable-section-container.js.map +1 -1
- package/expandable-section/expandable-section-header.d.ts +0 -1
- package/expandable-section/expandable-section-header.d.ts.map +1 -1
- package/expandable-section/expandable-section-header.js +1 -1
- package/expandable-section/expandable-section-header.js.map +1 -1
- package/expandable-section/internal.d.ts +2 -1
- package/expandable-section/internal.d.ts.map +1 -1
- package/expandable-section/internal.js.map +1 -1
- package/expandable-section/styles.css.js +34 -34
- package/expandable-section/styles.scoped.css +65 -68
- package/expandable-section/styles.selectors.js +34 -34
- package/file-token-group/file-token.d.ts +1 -1
- package/file-token-group/file-token.d.ts.map +1 -1
- package/file-token-group/file-token.js.map +1 -1
- package/file-token-group/styles.css.js +22 -22
- package/file-token-group/styles.scoped.css +29 -32
- package/file-token-group/styles.selectors.js +22 -22
- package/file-upload/interfaces.d.ts +0 -5
- package/file-upload/interfaces.d.ts.map +1 -1
- package/file-upload/interfaces.js.map +1 -1
- package/flashbar/analytics-metadata/interfaces.d.ts +0 -6
- package/flashbar/analytics-metadata/interfaces.d.ts.map +1 -1
- package/flashbar/analytics-metadata/interfaces.js.map +1 -1
- package/flashbar/collapsible-flashbar.d.ts +0 -1
- package/flashbar/collapsible-flashbar.d.ts.map +1 -1
- package/flashbar/collapsible-flashbar.js.map +1 -1
- package/flashbar/flash.d.ts +2 -1
- package/flashbar/flash.d.ts.map +1 -1
- package/flashbar/flash.js.map +1 -1
- package/flashbar/non-collapsible-flashbar.d.ts +0 -1
- package/flashbar/non-collapsible-flashbar.d.ts.map +1 -1
- package/flashbar/non-collapsible-flashbar.js.map +1 -1
- package/flashbar/styles.css.js +50 -50
- package/flashbar/styles.scoped.css +148 -151
- package/flashbar/styles.selectors.js +50 -50
- package/flashbar/utils.d.ts +2 -1
- package/flashbar/utils.d.ts.map +1 -1
- package/flashbar/utils.js.map +1 -1
- package/form/styles.css.js +8 -8
- package/form/styles.scoped.css +8 -11
- package/form/styles.selectors.js +8 -8
- package/form-field/styles.css.js +24 -24
- package/form-field/styles.scoped.css +38 -41
- package/form-field/styles.selectors.js +24 -24
- package/grid/internal.d.ts +1 -1
- package/grid/internal.d.ts.map +1 -1
- package/grid/internal.js.map +1 -1
- package/grid/styles.css.js +53 -53
- package/grid/styles.scoped.css +54 -57
- package/grid/styles.selectors.js +53 -53
- package/header/styles.css.js +34 -34
- package/header/styles.scoped.css +50 -53
- package/header/styles.selectors.js +34 -34
- package/help-panel/implementation.d.ts +2 -1
- package/help-panel/implementation.d.ts.map +1 -1
- package/help-panel/implementation.js.map +1 -1
- package/help-panel/styles.css.js +6 -6
- package/help-panel/styles.scoped.css +67 -70
- package/help-panel/styles.selectors.js +6 -6
- package/i18n/context.d.ts +1 -1
- package/i18n/context.d.ts.map +1 -1
- package/i18n/context.js.map +1 -1
- package/i18n/testing.d.ts +2 -1
- package/i18n/testing.d.ts.map +1 -1
- package/i18n/testing.js.map +1 -1
- package/input/styles.css.js +13 -13
- package/input/styles.scoped.css +32 -35
- package/input/styles.selectors.js +13 -13
- package/internal/analytics/components/analytics-funnel.d.ts +0 -1
- package/internal/analytics/components/analytics-funnel.d.ts.map +1 -1
- package/internal/analytics/components/analytics-funnel.js +1 -1
- package/internal/analytics/components/analytics-funnel.js.map +1 -1
- package/internal/analytics/interfaces.d.ts +17 -24
- package/internal/analytics/interfaces.d.ts.map +1 -1
- package/internal/analytics/interfaces.js.map +1 -1
- package/internal/analytics/selectors.d.ts +1 -1
- package/internal/analytics/selectors.d.ts.map +1 -1
- package/internal/analytics/selectors.js +2 -1
- package/internal/analytics/selectors.js.map +1 -1
- package/internal/components/autosuggest-input/index.d.ts +2 -2
- package/internal/components/autosuggest-input/index.d.ts.map +1 -1
- package/internal/components/autosuggest-input/index.js.map +1 -1
- package/internal/components/button-trigger/styles.css.js +13 -13
- package/internal/components/button-trigger/styles.scoped.css +27 -30
- package/internal/components/button-trigger/styles.selectors.js +13 -13
- package/internal/components/cartesian-chart/highlighted-point.d.ts +1 -1
- package/internal/components/cartesian-chart/highlighted-point.d.ts.map +1 -1
- package/internal/components/cartesian-chart/highlighted-point.js.map +1 -1
- package/internal/components/cartesian-chart/scales.d.ts +4 -5
- package/internal/components/cartesian-chart/scales.d.ts.map +1 -1
- package/internal/components/cartesian-chart/scales.js +1 -1
- package/internal/components/cartesian-chart/scales.js.map +1 -1
- package/internal/components/cartesian-chart/vertical-marker.d.ts +1 -1
- package/internal/components/cartesian-chart/vertical-marker.d.ts.map +1 -1
- package/internal/components/cartesian-chart/vertical-marker.js.map +1 -1
- package/internal/components/chart-filter/index.d.ts +1 -1
- package/internal/components/chart-filter/index.d.ts.map +1 -1
- package/internal/components/chart-filter/index.js.map +1 -1
- package/internal/components/chart-filter/styles.css.js +3 -3
- package/internal/components/chart-filter/styles.scoped.css +3 -6
- package/internal/components/chart-filter/styles.selectors.js +3 -3
- package/internal/components/chart-legend/index.d.ts +1 -1
- package/internal/components/chart-legend/index.d.ts.map +1 -1
- package/internal/components/chart-legend/index.js.map +1 -1
- package/internal/components/chart-legend/styles.css.js +6 -6
- package/internal/components/chart-legend/styles.scoped.css +15 -18
- package/internal/components/chart-legend/styles.selectors.js +6 -6
- package/internal/components/chart-plot/application-controller.d.ts +1 -1
- package/internal/components/chart-plot/application-controller.d.ts.map +1 -1
- package/internal/components/chart-plot/application-controller.js.map +1 -1
- package/internal/components/chart-plot/focus-outline.d.ts +2 -1
- package/internal/components/chart-plot/focus-outline.d.ts.map +1 -1
- package/internal/components/chart-plot/focus-outline.js.map +1 -1
- package/internal/components/chart-plot/index.d.ts +1 -1
- package/internal/components/chart-plot/index.d.ts.map +1 -1
- package/internal/components/chart-plot/index.js.map +1 -1
- package/internal/components/chart-popover/index.d.ts +1 -1
- package/internal/components/chart-popover/index.d.ts.map +1 -1
- package/internal/components/chart-popover/index.js.map +1 -1
- package/internal/components/chart-popover/styles.css.js +3 -3
- package/internal/components/chart-popover/styles.scoped.css +3 -6
- package/internal/components/chart-popover/styles.selectors.js +3 -3
- package/internal/components/chart-series-details/index.d.ts +1 -1
- package/internal/components/chart-series-details/index.d.ts.map +1 -1
- package/internal/components/chart-series-details/index.js.map +1 -1
- package/internal/components/chart-series-details/styles.css.js +20 -20
- package/internal/components/chart-series-details/styles.scoped.css +33 -42
- package/internal/components/chart-series-details/styles.selectors.js +20 -20
- package/internal/components/chart-series-marker/styles.css.js +5 -5
- package/internal/components/chart-series-marker/styles.scoped.css +7 -10
- package/internal/components/chart-series-marker/styles.selectors.js +5 -5
- package/internal/components/chart-wrapper/styles.css.js +9 -9
- package/internal/components/chart-wrapper/styles.scoped.css +9 -12
- package/internal/components/chart-wrapper/styles.selectors.js +9 -9
- package/internal/components/checkbox-icon/index.d.ts +1 -10
- package/internal/components/checkbox-icon/index.d.ts.map +1 -1
- package/internal/components/checkbox-icon/index.js +1 -1
- package/internal/components/checkbox-icon/index.js.map +1 -1
- package/internal/components/dnd-container/index.d.ts +28 -0
- package/internal/components/dnd-container/index.d.ts.map +1 -0
- package/internal/components/dnd-container/index.js +67 -0
- package/internal/components/dnd-container/index.js.map +1 -0
- package/internal/components/dnd-container/interfaces.d.ts +13 -0
- package/internal/components/dnd-container/interfaces.d.ts.map +1 -0
- package/internal/components/dnd-container/interfaces.js +4 -0
- package/internal/components/dnd-container/interfaces.js.map +1 -0
- package/internal/components/dnd-container/keyboard-sensor/defaults.d.ts.map +1 -0
- package/internal/components/dnd-container/keyboard-sensor/defaults.js.map +1 -0
- package/internal/components/dnd-container/keyboard-sensor/index.d.ts.map +1 -0
- package/{collection-preferences/content-display → internal/components/dnd-container}/keyboard-sensor/index.js +1 -1
- package/internal/components/dnd-container/keyboard-sensor/index.js.map +1 -0
- package/internal/components/dnd-container/keyboard-sensor/utilities/events.d.ts +7 -0
- package/internal/components/dnd-container/keyboard-sensor/utilities/events.d.ts.map +1 -0
- package/{collection-preferences/content-display → internal/components/dnd-container}/keyboard-sensor/utilities/events.js +0 -4
- package/internal/components/dnd-container/keyboard-sensor/utilities/events.js.map +1 -0
- package/internal/components/dnd-container/keyboard-sensor/utilities/listeners.d.ts.map +1 -0
- package/internal/components/dnd-container/keyboard-sensor/utilities/listeners.js.map +1 -0
- package/internal/components/dnd-container/keyboard-sensor/utilities/scroll.d.ts +8 -0
- package/internal/components/dnd-container/keyboard-sensor/utilities/scroll.d.ts.map +1 -0
- package/{collection-preferences/content-display → internal/components/dnd-container}/keyboard-sensor/utilities/scroll.js +2 -2
- package/internal/components/dnd-container/keyboard-sensor/utilities/scroll.js.map +1 -0
- package/internal/components/dnd-container/styles.css.js +6 -0
- package/internal/components/dnd-container/styles.scoped.css +168 -0
- package/internal/components/dnd-container/styles.selectors.js +7 -0
- package/{collection-preferences/content-display → internal/components/dnd-container}/use-drag-and-drop-reorder.d.ts +2 -4
- package/internal/components/dnd-container/use-drag-and-drop-reorder.d.ts.map +1 -0
- package/{collection-preferences/content-display → internal/components/dnd-container}/use-drag-and-drop-reorder.js +4 -4
- package/internal/components/dnd-container/use-drag-and-drop-reorder.js.map +1 -0
- package/internal/components/dnd-container/use-live-announcements.d.ts +11 -0
- package/internal/components/dnd-container/use-live-announcements.d.ts.map +1 -0
- package/{collection-preferences/content-display → internal/components/dnd-container}/use-live-announcements.js +6 -6
- package/internal/components/dnd-container/use-live-announcements.js.map +1 -0
- package/internal/components/dropdown/dropdown-fit-handler.d.ts +0 -30
- package/internal/components/dropdown/dropdown-fit-handler.d.ts.map +1 -1
- package/internal/components/dropdown/dropdown-fit-handler.js +4 -4
- package/internal/components/dropdown/dropdown-fit-handler.js.map +1 -1
- package/internal/components/dropdown/styles.css.js +20 -20
- package/internal/components/dropdown/styles.scoped.css +37 -40
- package/internal/components/dropdown/styles.selectors.js +20 -20
- package/internal/components/dropdown-footer/styles.css.js +3 -3
- package/internal/components/dropdown-footer/styles.scoped.css +3 -6
- package/internal/components/dropdown-footer/styles.selectors.js +3 -3
- package/internal/components/dropdown-status/styles.css.js +2 -2
- package/internal/components/dropdown-status/styles.scoped.css +2 -5
- package/internal/components/dropdown-status/styles.selectors.js +2 -2
- package/internal/components/focus-lock/utils.d.ts +0 -1
- package/internal/components/focus-lock/utils.d.ts.map +1 -1
- package/internal/components/focus-lock/utils.js +1 -1
- package/internal/components/focus-lock/utils.js.map +1 -1
- package/internal/components/masked-input/index.d.ts +1 -2
- package/internal/components/masked-input/index.d.ts.map +1 -1
- package/internal/components/masked-input/index.js +0 -1
- package/internal/components/masked-input/index.js.map +1 -1
- package/internal/components/masked-input/utils/mask-format.d.ts +1 -1
- package/internal/components/masked-input/utils/mask-format.d.ts.map +1 -1
- package/internal/components/masked-input/utils/mask-format.js.map +1 -1
- package/internal/components/menu-dropdown/styles.css.js +7 -7
- package/internal/components/menu-dropdown/styles.scoped.css +13 -16
- package/internal/components/menu-dropdown/styles.selectors.js +7 -7
- package/internal/components/option/highlight-match.d.ts +2 -1
- package/internal/components/option/highlight-match.d.ts.map +1 -1
- package/internal/components/option/highlight-match.js.map +1 -1
- package/internal/components/option/interfaces.d.ts +3 -2
- package/internal/components/option/interfaces.d.ts.map +1 -1
- package/internal/components/option/interfaces.js.map +1 -1
- package/internal/components/option/styles.css.js +17 -17
- package/internal/components/option/styles.scoped.css +29 -32
- package/internal/components/option/styles.selectors.js +17 -17
- package/internal/components/options-list/styles.css.js +3 -3
- package/internal/components/options-list/styles.scoped.css +3 -6
- package/internal/components/options-list/styles.selectors.js +3 -3
- package/internal/components/options-list/utils/use-highlight-option.d.ts +2 -1
- package/internal/components/options-list/utils/use-highlight-option.d.ts.map +1 -1
- package/internal/components/options-list/utils/use-highlight-option.js +2 -2
- package/internal/components/options-list/utils/use-highlight-option.js.map +1 -1
- package/internal/components/screenreader-only/index.d.ts +2 -1
- package/internal/components/screenreader-only/index.d.ts.map +1 -1
- package/internal/components/screenreader-only/index.js.map +1 -1
- package/internal/components/tab-trap/index.d.ts +2 -1
- package/internal/components/tab-trap/index.d.ts.map +1 -1
- package/internal/components/tab-trap/index.js.map +1 -1
- package/internal/components/token-list/styles.css.js +10 -10
- package/internal/components/token-list/styles.scoped.css +22 -25
- package/internal/components/token-list/styles.selectors.js +10 -10
- package/internal/components/transition/index.d.ts +2 -1
- package/internal/components/transition/index.d.ts.map +1 -1
- package/internal/components/transition/index.js.map +1 -1
- package/internal/context/single-tab-stop-navigation-context.d.ts +2 -4
- package/internal/context/single-tab-stop-navigation-context.d.ts.map +1 -1
- package/internal/context/single-tab-stop-navigation-context.js.map +1 -1
- package/internal/context/table-component-context.d.ts +2 -2
- package/internal/context/table-component-context.d.ts.map +1 -1
- package/internal/context/table-component-context.js +1 -1
- package/internal/context/table-component-context.js.map +1 -1
- package/internal/environment.js +1 -1
- package/internal/environment.json +1 -1
- package/internal/events/index.d.ts +1 -0
- package/internal/events/index.d.ts.map +1 -1
- package/internal/events/index.js +1 -0
- package/internal/events/index.js.map +1 -1
- package/internal/hooks/forward-focus/radio-group.d.ts +2 -1
- package/internal/hooks/forward-focus/radio-group.d.ts.map +1 -1
- package/internal/hooks/forward-focus/radio-group.js.map +1 -1
- package/internal/hooks/use-dynamic-overlap/index.d.ts +2 -1
- package/internal/hooks/use-dynamic-overlap/index.d.ts.map +1 -1
- package/internal/hooks/use-dynamic-overlap/index.js.map +1 -1
- package/internal/keycode.d.ts +1 -5
- package/internal/keycode.d.ts.map +1 -1
- package/internal/keycode.js +0 -4
- package/internal/keycode.js.map +1 -1
- package/internal/manifest.json +1 -1
- package/internal/plugins/controllers/action-buttons.d.ts +1 -1
- package/internal/plugins/controllers/action-buttons.d.ts.map +1 -1
- package/internal/plugins/controllers/action-buttons.js.map +1 -1
- package/internal/plugins/controllers/alert-flash-content.d.ts +3 -3
- package/internal/plugins/controllers/alert-flash-content.d.ts.map +1 -1
- package/internal/plugins/controllers/alert-flash-content.js.map +1 -1
- package/internal/plugins/controllers/app-layout-widget.d.ts +1 -1
- package/internal/plugins/controllers/app-layout-widget.d.ts.map +1 -1
- package/internal/plugins/controllers/app-layout-widget.js.map +1 -1
- package/internal/plugins/controllers/drawers.d.ts +4 -4
- package/internal/plugins/controllers/drawers.d.ts.map +1 -1
- package/internal/plugins/controllers/drawers.js.map +1 -1
- package/internal/utils/handle-key.d.ts +2 -1
- package/internal/utils/handle-key.d.ts.map +1 -1
- package/internal/utils/handle-key.js.map +1 -1
- package/internal/utils/throttle.d.ts +2 -1
- package/internal/utils/throttle.d.ts.map +1 -1
- package/internal/utils/throttle.js.map +1 -1
- package/key-value-pairs/styles.css.js +8 -8
- package/key-value-pairs/styles.scoped.css +9 -15
- package/key-value-pairs/styles.selectors.js +8 -8
- package/link/styles.css.js +20 -20
- package/link/styles.scoped.css +71 -74
- package/link/styles.selectors.js +20 -20
- package/live-region/internal.d.ts +1 -1
- package/live-region/internal.d.ts.map +1 -1
- package/live-region/internal.js.map +1 -1
- package/mixed-line-bar-chart/bar-groups.d.ts +2 -1
- package/mixed-line-bar-chart/bar-groups.d.ts.map +1 -1
- package/mixed-line-bar-chart/bar-groups.js.map +1 -1
- package/mixed-line-bar-chart/bar-series.d.ts +2 -1
- package/mixed-line-bar-chart/bar-series.d.ts.map +1 -1
- package/mixed-line-bar-chart/bar-series.js.map +1 -1
- package/mixed-line-bar-chart/data-series.d.ts +2 -1
- package/mixed-line-bar-chart/data-series.d.ts.map +1 -1
- package/mixed-line-bar-chart/data-series.js.map +1 -1
- package/mixed-line-bar-chart/interfaces.d.ts +0 -2
- package/mixed-line-bar-chart/interfaces.d.ts.map +1 -1
- package/mixed-line-bar-chart/interfaces.js.map +1 -1
- package/mixed-line-bar-chart/line-series.d.ts +2 -1
- package/mixed-line-bar-chart/line-series.d.ts.map +1 -1
- package/mixed-line-bar-chart/line-series.js.map +1 -1
- package/modal/index.d.ts.map +1 -1
- package/modal/index.js +8 -2
- package/modal/index.js.map +1 -1
- package/modal/internal.js +1 -1
- package/modal/internal.js.map +1 -1
- package/modal/styles.css.js +23 -23
- package/modal/styles.scoped.css +38 -44
- package/modal/styles.selectors.js +23 -23
- package/multiselect/analytics-metadata/interfaces.d.ts +0 -4
- package/multiselect/analytics-metadata/interfaces.d.ts.map +1 -1
- package/multiselect/analytics-metadata/interfaces.js.map +1 -1
- package/multiselect/styles.css.js +3 -3
- package/multiselect/styles.scoped.css +3 -9
- package/multiselect/styles.selectors.js +3 -3
- package/package.json +1 -1
- package/pagination/styles.css.js +9 -9
- package/pagination/styles.scoped.css +23 -26
- package/pagination/styles.selectors.js +9 -9
- package/pie-chart/interfaces.d.ts +2 -1
- package/pie-chart/interfaces.d.ts.map +1 -1
- package/pie-chart/interfaces.js.map +1 -1
- package/pie-chart/labels.d.ts +1 -1
- package/pie-chart/labels.d.ts.map +1 -1
- package/pie-chart/labels.js.map +1 -1
- package/pie-chart/pie-chart.d.ts +2 -7
- package/pie-chart/pie-chart.d.ts.map +1 -1
- package/pie-chart/pie-chart.js.map +1 -1
- package/popover/arrow.d.ts +1 -1
- package/popover/arrow.d.ts.map +1 -1
- package/popover/arrow.js.map +1 -1
- package/popover/body.d.ts.map +1 -1
- package/popover/body.js +0 -1
- package/popover/body.js.map +1 -1
- package/popover/container.d.ts +2 -1
- package/popover/container.d.ts.map +1 -1
- package/popover/container.js.map +1 -1
- package/popover/internal.d.ts +1 -0
- package/popover/internal.d.ts.map +1 -1
- package/popover/internal.js +2 -2
- package/popover/internal.js.map +1 -1
- package/popover/styles.css.js +53 -52
- package/popover/styles.scoped.css +71 -77
- package/popover/styles.selectors.js +53 -52
- package/progress-bar/styles.css.js +19 -19
- package/progress-bar/styles.scoped.css +30 -33
- package/progress-bar/styles.selectors.js +19 -19
- package/prompt-input/internal.d.ts +1 -1
- package/prompt-input/internal.d.ts.map +1 -1
- package/prompt-input/internal.js.map +1 -1
- package/prompt-input/styles.css.js +14 -14
- package/prompt-input/styles.scoped.css +39 -51
- package/prompt-input/styles.selectors.js +14 -14
- package/property-filter/analytics-metadata/interfaces.d.ts +0 -15
- package/property-filter/analytics-metadata/interfaces.d.ts.map +1 -1
- package/property-filter/analytics-metadata/interfaces.js.map +1 -1
- package/property-filter/controller.d.ts +0 -1
- package/property-filter/controller.d.ts.map +1 -1
- package/property-filter/controller.js +1 -1
- package/property-filter/controller.js.map +1 -1
- package/property-filter/filtering-token/styles.css.js +18 -18
- package/property-filter/filtering-token/styles.scoped.css +41 -44
- package/property-filter/filtering-token/styles.selectors.js +18 -18
- package/property-filter/interfaces.d.ts +1 -6
- package/property-filter/interfaces.d.ts.map +1 -1
- package/property-filter/interfaces.js.map +1 -1
- package/property-filter/internal.d.ts +0 -2
- package/property-filter/internal.d.ts.map +1 -1
- package/property-filter/internal.js.map +1 -1
- package/property-filter/styles.css.js +39 -39
- package/property-filter/styles.scoped.css +41 -47
- package/property-filter/styles.selectors.js +39 -39
- package/property-filter/utils.d.ts +0 -1
- package/property-filter/utils.d.ts.map +1 -1
- package/property-filter/utils.js +1 -1
- package/property-filter/utils.js.map +1 -1
- package/radio-group/styles.css.js +10 -10
- package/radio-group/styles.scoped.css +16 -19
- package/radio-group/styles.selectors.js +10 -10
- package/s3-resource-selector/s3-modal/basic-table.d.ts +0 -6
- package/s3-resource-selector/s3-modal/basic-table.d.ts.map +1 -1
- package/s3-resource-selector/s3-modal/basic-table.js +1 -1
- package/s3-resource-selector/s3-modal/basic-table.js.map +1 -1
- package/segmented-control/segment.d.ts +2 -1
- package/segmented-control/segment.d.ts.map +1 -1
- package/segmented-control/segment.js.map +1 -1
- package/segmented-control/styles.css.js +15 -15
- package/segmented-control/styles.scoped.css +34 -37
- package/segmented-control/styles.selectors.js +15 -15
- package/select/analytics-metadata/interfaces.d.ts +0 -4
- package/select/analytics-metadata/interfaces.d.ts.map +1 -1
- package/select/analytics-metadata/interfaces.js.map +1 -1
- package/select/styles.css.js +1 -1
- package/select/styles.scoped.css +1 -4
- package/select/styles.selectors.js +1 -1
- package/select/utils/render-options.d.ts +2 -1
- package/select/utils/render-options.d.ts.map +1 -1
- package/select/utils/render-options.js.map +1 -1
- package/select/utils/use-native-search.d.ts +0 -1
- package/select/utils/use-native-search.d.ts.map +1 -1
- package/select/utils/use-native-search.js +1 -1
- package/select/utils/use-native-search.js.map +1 -1
- package/side-navigation/analytics-metadata/interfaces.d.ts +0 -2
- package/side-navigation/analytics-metadata/interfaces.d.ts.map +1 -1
- package/side-navigation/analytics-metadata/interfaces.js.map +1 -1
- package/side-navigation/implementation.d.ts +2 -1
- package/side-navigation/implementation.d.ts.map +1 -1
- package/side-navigation/implementation.js.map +1 -1
- package/side-navigation/parts.d.ts +2 -2
- package/side-navigation/parts.d.ts.map +1 -1
- package/side-navigation/parts.js.map +1 -1
- package/side-navigation/styles.css.js +30 -30
- package/side-navigation/styles.scoped.css +46 -49
- package/side-navigation/styles.selectors.js +30 -30
- package/slider/internal.d.ts +2 -1
- package/slider/internal.d.ts.map +1 -1
- package/slider/internal.js.map +1 -1
- package/slider/slider-labels.d.ts +2 -1
- package/slider/slider-labels.d.ts.map +1 -1
- package/slider/slider-labels.js.map +1 -1
- package/slider/styles.css.js +26 -26
- package/slider/styles.scoped.css +76 -79
- package/slider/styles.selectors.js +26 -26
- package/slider/tick-marks.d.ts +2 -4
- package/slider/tick-marks.d.ts.map +1 -1
- package/slider/tick-marks.js.map +1 -1
- package/split-panel/bottom.d.ts.map +1 -1
- package/split-panel/bottom.js +13 -3
- package/split-panel/bottom.js.map +1 -1
- package/split-panel/implementation.js +1 -1
- package/split-panel/implementation.js.map +1 -1
- package/split-panel/styles.css.js +26 -26
- package/split-panel/styles.scoped.css +43 -51
- package/split-panel/styles.selectors.js +26 -26
- package/steps/internal.d.ts +1 -1
- package/steps/internal.d.ts.map +1 -1
- package/steps/internal.js +1 -1
- package/steps/internal.js.map +1 -1
- package/steps/styles.css.js +6 -6
- package/steps/styles.scoped.css +7 -10
- package/steps/styles.selectors.js +6 -6
- package/table/expandable-rows/styles.css.js +3 -3
- package/table/expandable-rows/styles.scoped.css +13 -16
- package/table/expandable-rows/styles.selectors.js +3 -3
- package/table/interfaces.d.ts +3 -2
- package/table/interfaces.d.ts.map +1 -1
- package/table/interfaces.js.map +1 -1
- package/table/internal.js +2 -2
- package/table/internal.js.map +1 -1
- package/table/progressive-loading/loader-cell.d.ts +2 -1
- package/table/progressive-loading/loader-cell.d.ts.map +1 -1
- package/table/progressive-loading/loader-cell.js.map +1 -1
- package/table/resizer/styles.css.js +8 -8
- package/table/resizer/styles.scoped.css +15 -18
- package/table/resizer/styles.selectors.js +8 -8
- package/table/selection/utils.d.ts +0 -1
- package/table/selection/utils.d.ts.map +1 -1
- package/table/selection/utils.js +1 -1
- package/table/selection/utils.js.map +1 -1
- package/table/sticky-columns/use-sticky-columns.d.ts +1 -21
- package/table/sticky-columns/use-sticky-columns.d.ts.map +1 -1
- package/table/sticky-columns/use-sticky-columns.js +1 -1
- package/table/sticky-columns/use-sticky-columns.js.map +1 -1
- package/table/sticky-scrollbar/sticky-scrollbar.d.ts.map +1 -1
- package/table/sticky-scrollbar/sticky-scrollbar.js +6 -2
- package/table/sticky-scrollbar/sticky-scrollbar.js.map +1 -1
- package/table/sticky-scrollbar/styles.css.js +6 -6
- package/table/sticky-scrollbar/styles.scoped.css +10 -7
- package/table/sticky-scrollbar/styles.selectors.js +6 -6
- package/table/table-role/grid-navigation.js +10 -0
- package/table/table-role/grid-navigation.js.map +1 -1
- package/table/table-role/index.d.ts +1 -1
- package/table/table-role/index.d.ts.map +1 -1
- package/table/table-role/index.js.map +1 -1
- package/table/use-cell-editing.d.ts +1 -1
- package/table/use-cell-editing.d.ts.map +1 -1
- package/table/use-cell-editing.js.map +1 -1
- package/tabs/styles.css.js +28 -28
- package/tabs/styles.scoped.css +49 -52
- package/tabs/styles.selectors.js +28 -28
- package/tabs/tab-header-bar.d.ts +2 -1
- package/tabs/tab-header-bar.d.ts.map +1 -1
- package/tabs/tab-header-bar.js.map +1 -1
- package/tag-editor/internal.d.ts +2 -1
- package/tag-editor/internal.d.ts.map +1 -1
- package/tag-editor/internal.js.map +1 -1
- package/test-utils/dom/anchor-navigation/index.d.ts +2 -1
- package/test-utils/dom/anchor-navigation/index.js +0 -2
- package/test-utils/dom/anchor-navigation/index.js.map +1 -1
- package/test-utils/dom/autosuggest/index.d.ts +0 -3
- package/test-utils/dom/autosuggest/index.js +1 -2
- package/test-utils/dom/autosuggest/index.js.map +1 -1
- package/test-utils/dom/cards/index.d.ts +3 -2
- package/test-utils/dom/cards/index.js +0 -3
- package/test-utils/dom/cards/index.js.map +1 -1
- package/test-utils/dom/key-value-pairs/index.d.ts +3 -2
- package/test-utils/dom/key-value-pairs/index.js +0 -3
- package/test-utils/dom/key-value-pairs/index.js.map +1 -1
- package/test-utils/dom/steps/index.d.ts +2 -1
- package/test-utils/dom/steps/index.js +0 -2
- package/test-utils/dom/steps/index.js.map +1 -1
- package/test-utils/dom/tabs/index.d.ts +2 -1
- package/test-utils/dom/tabs/index.js +0 -2
- package/test-utils/dom/tabs/index.js.map +1 -1
- package/test-utils/dom/tag-editor/index.d.ts +2 -1
- package/test-utils/dom/tag-editor/index.js +0 -2
- package/test-utils/dom/tag-editor/index.js.map +1 -1
- package/test-utils/selectors/anchor-navigation/index.d.ts +2 -1
- package/test-utils/selectors/anchor-navigation/index.js +0 -2
- package/test-utils/selectors/anchor-navigation/index.js.map +1 -1
- package/test-utils/selectors/autosuggest/index.d.ts +0 -3
- package/test-utils/selectors/autosuggest/index.js +1 -2
- package/test-utils/selectors/autosuggest/index.js.map +1 -1
- package/test-utils/selectors/cards/index.d.ts +3 -2
- package/test-utils/selectors/cards/index.js +0 -3
- package/test-utils/selectors/cards/index.js.map +1 -1
- package/test-utils/selectors/key-value-pairs/index.d.ts +3 -2
- package/test-utils/selectors/key-value-pairs/index.js +0 -3
- package/test-utils/selectors/key-value-pairs/index.js.map +1 -1
- package/test-utils/selectors/steps/index.d.ts +2 -1
- package/test-utils/selectors/steps/index.js +0 -2
- package/test-utils/selectors/steps/index.js.map +1 -1
- package/test-utils/selectors/tabs/index.d.ts +2 -1
- package/test-utils/selectors/tabs/index.js +0 -2
- package/test-utils/selectors/tabs/index.js.map +1 -1
- package/test-utils/selectors/tag-editor/index.d.ts +2 -1
- package/test-utils/selectors/tag-editor/index.js +0 -2
- package/test-utils/selectors/tag-editor/index.js.map +1 -1
- package/test-utils/tsconfig.tsbuildinfo +1 -1
- package/text-content/styles.css.js +1 -1
- package/text-content/styles.scoped.css +60 -63
- package/text-content/styles.selectors.js +1 -1
- package/text-filter/analytics-metadata/interfaces.d.ts +0 -2
- package/text-filter/analytics-metadata/interfaces.d.ts.map +1 -1
- package/text-filter/analytics-metadata/interfaces.js.map +1 -1
- package/text-filter/styles.css.js +3 -3
- package/text-filter/styles.scoped.css +3 -6
- package/text-filter/styles.selectors.js +3 -3
- package/textarea/styles.css.js +5 -5
- package/textarea/styles.scoped.css +14 -17
- package/textarea/styles.selectors.js +5 -5
- package/tiles/styles.css.js +30 -30
- package/tiles/styles.scoped.css +71 -77
- package/tiles/styles.selectors.js +30 -30
- package/toggle/styles.css.js +10 -10
- package/toggle/styles.scoped.css +17 -20
- package/toggle/styles.selectors.js +10 -10
- package/toggle-button/internal.d.ts +0 -1
- package/toggle-button/internal.d.ts.map +1 -1
- package/toggle-button/internal.js +0 -1
- package/toggle-button/internal.js.map +1 -1
- package/token-group/analytics-metadata/interfaces.d.ts +0 -2
- package/token-group/analytics-metadata/interfaces.d.ts.map +1 -1
- package/token-group/analytics-metadata/interfaces.js.map +1 -1
- package/token-group/styles.css.js +8 -8
- package/token-group/styles.scoped.css +16 -19
- package/token-group/styles.selectors.js +8 -8
- package/top-navigation/1.0-beta/internal.d.ts +2 -1
- package/top-navigation/1.0-beta/internal.d.ts.map +1 -1
- package/top-navigation/1.0-beta/internal.js.map +1 -1
- package/top-navigation/1.0-beta/parts/overflow-menu.d.ts +2 -1
- package/top-navigation/1.0-beta/parts/overflow-menu.d.ts.map +1 -1
- package/top-navigation/1.0-beta/parts/overflow-menu.js.map +1 -1
- package/top-navigation/1.0-beta/styles.css.js +25 -25
- package/top-navigation/1.0-beta/styles.scoped.css +42 -45
- package/top-navigation/1.0-beta/styles.selectors.js +25 -25
- package/top-navigation/1.0-beta/use-top-navigation.d.ts +4 -24
- package/top-navigation/1.0-beta/use-top-navigation.d.ts.map +1 -1
- package/top-navigation/1.0-beta/use-top-navigation.js +2 -2
- package/top-navigation/1.0-beta/use-top-navigation.js.map +1 -1
- package/top-navigation/internal.d.ts +2 -1
- package/top-navigation/internal.d.ts.map +1 -1
- package/top-navigation/internal.js.map +1 -1
- package/top-navigation/parts/overflow-menu/router.d.ts +1 -10
- package/top-navigation/parts/overflow-menu/router.d.ts.map +1 -1
- package/top-navigation/parts/overflow-menu/router.js +1 -1
- package/top-navigation/parts/overflow-menu/router.js.map +1 -1
- package/top-navigation/styles.css.js +47 -47
- package/top-navigation/styles.scoped.css +66 -75
- package/top-navigation/styles.selectors.js +47 -47
- package/top-navigation/use-top-navigation.d.ts +4 -3
- package/top-navigation/use-top-navigation.d.ts.map +1 -1
- package/top-navigation/use-top-navigation.js.map +1 -1
- package/tutorial-panel/components/tutorial-detail-view/styles.css.js +20 -20
- package/tutorial-panel/components/tutorial-detail-view/styles.scoped.css +21 -24
- package/tutorial-panel/components/tutorial-detail-view/styles.selectors.js +20 -20
- package/tutorial-panel/components/tutorial-detail-view/task-list.d.ts +2 -1
- package/tutorial-panel/components/tutorial-detail-view/task-list.d.ts.map +1 -1
- package/tutorial-panel/components/tutorial-detail-view/task-list.js.map +1 -1
- package/tutorial-panel/components/tutorial-list/index.d.ts +2 -1
- package/tutorial-panel/components/tutorial-list/index.d.ts.map +1 -1
- package/tutorial-panel/components/tutorial-list/index.js.map +1 -1
- package/tutorial-panel/components/tutorial-list/styles.css.js +18 -18
- package/tutorial-panel/components/tutorial-list/styles.scoped.css +27 -36
- package/tutorial-panel/components/tutorial-list/styles.selectors.js +18 -18
- package/tutorial-panel/styles.css.js +1 -1
- package/tutorial-panel/styles.scoped.css +1 -4
- package/tutorial-panel/styles.selectors.js +1 -1
- package/wizard/analytics-metadata/interfaces.d.ts +0 -21
- package/wizard/analytics-metadata/interfaces.d.ts.map +1 -1
- package/wizard/analytics-metadata/interfaces.js.map +1 -1
- package/wizard/styles.css.js +30 -30
- package/wizard/styles.scoped.css +58 -61
- package/wizard/styles.selectors.js +30 -30
- package/wizard/wizard-form.d.ts +1 -4
- package/wizard/wizard-form.d.ts.map +1 -1
- package/wizard/wizard-form.js +1 -1
- package/wizard/wizard-form.js.map +1 -1
- package/app-layout/split-panel/split-panel-utils.d.ts +0 -12
- package/app-layout/split-panel/split-panel-utils.d.ts.map +0 -1
- package/app-layout/split-panel/split-panel-utils.js +0 -28
- package/app-layout/split-panel/split-panel-utils.js.map +0 -1
- package/collection-preferences/content-display/draggable-option.d.ts +0 -9
- package/collection-preferences/content-display/draggable-option.d.ts.map +0 -1
- package/collection-preferences/content-display/draggable-option.js +0 -27
- package/collection-preferences/content-display/draggable-option.js.map +0 -1
- package/collection-preferences/content-display/keyboard-sensor/defaults.d.ts.map +0 -1
- package/collection-preferences/content-display/keyboard-sensor/defaults.js.map +0 -1
- package/collection-preferences/content-display/keyboard-sensor/index.d.ts.map +0 -1
- package/collection-preferences/content-display/keyboard-sensor/index.js.map +0 -1
- package/collection-preferences/content-display/keyboard-sensor/utilities/events.d.ts +0 -11
- package/collection-preferences/content-display/keyboard-sensor/utilities/events.d.ts.map +0 -1
- package/collection-preferences/content-display/keyboard-sensor/utilities/events.js.map +0 -1
- package/collection-preferences/content-display/keyboard-sensor/utilities/listeners.d.ts.map +0 -1
- package/collection-preferences/content-display/keyboard-sensor/utilities/listeners.js.map +0 -1
- package/collection-preferences/content-display/keyboard-sensor/utilities/scroll.d.ts +0 -30
- package/collection-preferences/content-display/keyboard-sensor/utilities/scroll.d.ts.map +0 -1
- package/collection-preferences/content-display/keyboard-sensor/utilities/scroll.js.map +0 -1
- package/collection-preferences/content-display/use-drag-and-drop-reorder.d.ts.map +0 -1
- package/collection-preferences/content-display/use-drag-and-drop-reorder.js.map +0 -1
- package/collection-preferences/content-display/use-live-announcements.d.ts +0 -12
- package/collection-preferences/content-display/use-live-announcements.d.ts.map +0 -1
- package/collection-preferences/content-display/use-live-announcements.js.map +0 -1
- package/internal/hooks/use-mutation-observer/index.d.ts +0 -8
- package/internal/hooks/use-mutation-observer/index.d.ts.map +0 -1
- package/internal/hooks/use-mutation-observer/index.js +0 -26
- package/internal/hooks/use-mutation-observer/index.js.map +0 -1
- /package/{collection-preferences/content-display → internal/components/dnd-container}/keyboard-sensor/defaults.d.ts +0 -0
- /package/{collection-preferences/content-display → internal/components/dnd-container}/keyboard-sensor/defaults.js +0 -0
- /package/{collection-preferences/content-display → internal/components/dnd-container}/keyboard-sensor/index.d.ts +0 -0
- /package/{collection-preferences/content-display → internal/components/dnd-container}/keyboard-sensor/utilities/listeners.d.ts +0 -0
- /package/{collection-preferences/content-display → internal/components/dnd-container}/keyboard-sensor/utilities/listeners.js +0 -0
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { TableTdElementProps } from '../body-cell/td-element';
|
|
3
3
|
import { ItemsLoaderProps } from './items-loader';
|
|
4
|
-
|
|
4
|
+
interface TableLoaderCellProps<ItemType> extends Omit<TableTdElementProps, 'isEditable' | 'isEditing'>, ItemsLoaderProps<ItemType> {
|
|
5
5
|
}
|
|
6
6
|
export declare function TableLoaderCell<ItemType>({ item, loadingStatus, renderLoaderPending, renderLoaderLoading, renderLoaderError, trackBy, ...props }: TableLoaderCellProps<ItemType>): JSX.Element;
|
|
7
|
+
export {};
|
|
7
8
|
//# sourceMappingURL=loader-cell.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader-cell.d.ts","sourceRoot":"","sources":["../../../../src/table/progressive-loading/loader-cell.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAkB,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,EAAe,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAE/D,
|
|
1
|
+
{"version":3,"file":"loader-cell.d.ts","sourceRoot":"","sources":["../../../../src/table/progressive-loading/loader-cell.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAkB,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,EAAe,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAE/D,UAAU,oBAAoB,CAAC,QAAQ,CACrC,SAAQ,IAAI,CAAC,mBAAmB,EAAE,YAAY,GAAG,WAAW,CAAC,EAC3D,gBAAgB,CAAC,QAAQ,CAAC;CAAG;AAEjC,wBAAgB,eAAe,CAAC,QAAQ,EAAE,EACxC,IAAI,EACJ,aAAa,EACb,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,OAAO,EACP,GAAG,KAAK,EACT,EAAE,oBAAoB,CAAC,QAAQ,CAAC,eAehC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader-cell.js","sourceRoot":"","sources":["../../../../src/table/progressive-loading/loader-cell.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;;AAEtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAuB,MAAM,yBAAyB,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAoB,MAAM,gBAAgB,CAAC;AAM/D,MAAM,UAAU,eAAe,CAAW,EAQT;QARS,EACxC,IAAI,EACJ,aAAa,EACb,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,OAAO,OAEwB,EAD5B,KAAK,cAPgC,uGAQzC,CADS;IAER,OAAO,CACL,oBAAC,cAAc,oBAAK,KAAK,IAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,KAC3D,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CACnB,oBAAC,WAAW,IACV,IAAI,EAAE,IAAI,EACV,aAAa,EAAE,aAAa,EAC5B,mBAAmB,EAAE,mBAAmB,EACxC,mBAAmB,EAAE,mBAAmB,EACxC,iBAAiB,EAAE,iBAAiB,EACpC,OAAO,EAAE,OAAO,GAChB,CACH,CAAC,CAAC,CAAC,IAAI,CACO,CAClB,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React from 'react';\n\nimport { TableTdElement, TableTdElementProps } from '../body-cell/td-element';\nimport { ItemsLoader, ItemsLoaderProps } from './items-loader';\n\
|
|
1
|
+
{"version":3,"file":"loader-cell.js","sourceRoot":"","sources":["../../../../src/table/progressive-loading/loader-cell.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;;AAEtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAuB,MAAM,yBAAyB,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAoB,MAAM,gBAAgB,CAAC;AAM/D,MAAM,UAAU,eAAe,CAAW,EAQT;QARS,EACxC,IAAI,EACJ,aAAa,EACb,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,OAAO,OAEwB,EAD5B,KAAK,cAPgC,uGAQzC,CADS;IAER,OAAO,CACL,oBAAC,cAAc,oBAAK,KAAK,IAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,KAC3D,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CACnB,oBAAC,WAAW,IACV,IAAI,EAAE,IAAI,EACV,aAAa,EAAE,aAAa,EAC5B,mBAAmB,EAAE,mBAAmB,EACxC,mBAAmB,EAAE,mBAAmB,EACxC,iBAAiB,EAAE,iBAAiB,EACpC,OAAO,EAAE,OAAO,GAChB,CACH,CAAC,CAAC,CAAC,IAAI,CACO,CAClB,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React from 'react';\n\nimport { TableTdElement, TableTdElementProps } from '../body-cell/td-element';\nimport { ItemsLoader, ItemsLoaderProps } from './items-loader';\n\ninterface TableLoaderCellProps<ItemType>\n extends Omit<TableTdElementProps, 'isEditable' | 'isEditing'>,\n ItemsLoaderProps<ItemType> {}\n\nexport function TableLoaderCell<ItemType>({\n item,\n loadingStatus,\n renderLoaderPending,\n renderLoaderLoading,\n renderLoaderError,\n trackBy,\n ...props\n}: TableLoaderCellProps<ItemType>) {\n return (\n <TableTdElement {...props} isEditable={false} isEditing={false}>\n {props.isRowHeader ? (\n <ItemsLoader\n item={item}\n loadingStatus={loadingStatus}\n renderLoaderPending={renderLoaderPending}\n renderLoaderLoading={renderLoaderLoading}\n renderLoaderError={renderLoaderError}\n trackBy={trackBy}\n />\n ) : null}\n </TableTdElement>\n );\n}\n"]}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"resize-active": "awsui_resize-
|
|
5
|
-
"resize-active-with-focus": "awsui_resize-active-with-
|
|
6
|
-
"divider": "
|
|
7
|
-
"divider-disabled": "awsui_divider-
|
|
8
|
-
"divider-active": "awsui_divider-
|
|
9
|
-
"resizer": "
|
|
10
|
-
"has-focus": "awsui_has-
|
|
11
|
-
"tracker": "
|
|
4
|
+
"resize-active": "awsui_resize-active_x7peu_i88k3_141",
|
|
5
|
+
"resize-active-with-focus": "awsui_resize-active-with-focus_x7peu_i88k3_141",
|
|
6
|
+
"divider": "awsui_divider_x7peu_i88k3_146",
|
|
7
|
+
"divider-disabled": "awsui_divider-disabled_x7peu_i88k3_160",
|
|
8
|
+
"divider-active": "awsui_divider-active_x7peu_i88k3_163",
|
|
9
|
+
"resizer": "awsui_resizer_x7peu_i88k3_167",
|
|
10
|
+
"has-focus": "awsui_has-focus_x7peu_i88k3_221",
|
|
11
|
+
"tracker": "awsui_tracker_x7peu_i88k3_246"
|
|
12
12
|
};
|
|
13
13
|
|
|
@@ -138,13 +138,13 @@
|
|
|
138
138
|
*/
|
|
139
139
|
/* Style used for links in slots/components that are text heavy, to help links stand out among
|
|
140
140
|
surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
|
|
141
|
-
.awsui_resize-
|
|
141
|
+
.awsui_resize-active_x7peu_i88k3_141:not(#\9):not(.awsui_resize-active-with-focus_x7peu_i88k3_141) * {
|
|
142
142
|
cursor: col-resize;
|
|
143
143
|
-webkit-user-select: none;
|
|
144
144
|
user-select: none;
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
-
th:not(#\9):not(:last-child) > .
|
|
147
|
+
th:not(#\9):not(:last-child) > .awsui_divider_x7peu_i88k3_146 {
|
|
148
148
|
position: absolute;
|
|
149
149
|
outline: none;
|
|
150
150
|
pointer-events: none;
|
|
@@ -158,14 +158,14 @@ th:not(#\9):not(:last-child) > .awsui_divider_x7peu_qtqfr_146 {
|
|
|
158
158
|
border-inline-start: var(--border-item-width-yel47s, 2px) solid var(--color-border-divider-interactive-default-0c10au, #8c8c94);
|
|
159
159
|
box-sizing: border-box;
|
|
160
160
|
}
|
|
161
|
-
th:not(#\9):not(:last-child) > .awsui_divider-
|
|
161
|
+
th:not(#\9):not(:last-child) > .awsui_divider-disabled_x7peu_i88k3_160 {
|
|
162
162
|
border-inline-start-color: var(--color-border-divider-default-cx07f2, #c6c6cd);
|
|
163
163
|
}
|
|
164
|
-
th:not(#\9):not(:last-child) > .awsui_divider-
|
|
164
|
+
th:not(#\9):not(:last-child) > .awsui_divider-active_x7peu_i88k3_163 {
|
|
165
165
|
border-inline-start: 2px solid var(--color-border-divider-active-tn8t2p, #0f141a);
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
-
.
|
|
168
|
+
.awsui_resizer_x7peu_i88k3_167:not(#\9) {
|
|
169
169
|
border-collapse: separate;
|
|
170
170
|
border-spacing: 0;
|
|
171
171
|
box-sizing: border-box;
|
|
@@ -174,12 +174,9 @@ th:not(#\9):not(:last-child) > .awsui_divider-active_x7peu_qtqfr_163 {
|
|
|
174
174
|
direction: inherit;
|
|
175
175
|
empty-cells: show;
|
|
176
176
|
font-family: serif;
|
|
177
|
-
font-size: medium;
|
|
178
177
|
font-style: normal;
|
|
179
178
|
font-variant: normal;
|
|
180
|
-
font-weight: 400;
|
|
181
179
|
font-stretch: normal;
|
|
182
|
-
line-height: normal;
|
|
183
180
|
-webkit-hyphens: none;
|
|
184
181
|
hyphens: none;
|
|
185
182
|
letter-spacing: normal;
|
|
@@ -209,28 +206,28 @@ th:not(#\9):not(:last-child) > .awsui_divider-active_x7peu_qtqfr_163 {
|
|
|
209
206
|
inline-size: var(--space-l-t419sm, 20px);
|
|
210
207
|
z-index: 10;
|
|
211
208
|
}
|
|
212
|
-
.
|
|
209
|
+
.awsui_resizer_x7peu_i88k3_167:not(#\9):focus {
|
|
213
210
|
outline: none;
|
|
214
211
|
text-decoration: none;
|
|
215
212
|
}
|
|
216
|
-
.awsui_resize-
|
|
213
|
+
.awsui_resize-active_x7peu_i88k3_141 .awsui_resizer_x7peu_i88k3_167:not(#\9) {
|
|
217
214
|
pointer-events: none;
|
|
218
215
|
}
|
|
219
|
-
th:not(#\9):last-child > .
|
|
216
|
+
th:not(#\9):last-child > .awsui_resizer_x7peu_i88k3_167 {
|
|
220
217
|
inline-size: calc(var(--space-l-t419sm, 20px) / 2);
|
|
221
218
|
inset-inline-end: 0;
|
|
222
219
|
}
|
|
223
|
-
.
|
|
220
|
+
.awsui_resizer_x7peu_i88k3_167:not(#\9):hover + .awsui_divider_x7peu_i88k3_146 {
|
|
224
221
|
border-inline-start: 2px solid var(--color-border-divider-active-tn8t2p, #0f141a);
|
|
225
222
|
}
|
|
226
|
-
body[data-awsui-focus-visible=true] .
|
|
223
|
+
body[data-awsui-focus-visible=true] .awsui_resizer_x7peu_i88k3_167.awsui_has-focus_x7peu_i88k3_221:not(#\9) {
|
|
227
224
|
position: relative;
|
|
228
225
|
}
|
|
229
|
-
body[data-awsui-focus-visible=true] .
|
|
226
|
+
body[data-awsui-focus-visible=true] .awsui_resizer_x7peu_i88k3_167.awsui_has-focus_x7peu_i88k3_221:not(#\9) {
|
|
230
227
|
outline: 2px dotted transparent;
|
|
231
228
|
outline-offset: calc(calc(var(--space-table-header-focus-outline-gutter-7js4en, 0px) - 2px) - 1px);
|
|
232
229
|
}
|
|
233
|
-
body[data-awsui-focus-visible=true] .
|
|
230
|
+
body[data-awsui-focus-visible=true] .awsui_resizer_x7peu_i88k3_167.awsui_has-focus_x7peu_i88k3_221:not(#\9)::before {
|
|
234
231
|
content: " ";
|
|
235
232
|
display: block;
|
|
236
233
|
position: absolute;
|
|
@@ -244,17 +241,17 @@ body[data-awsui-focus-visible=true] .awsui_resizer_x7peu_qtqfr_167.awsui_has-foc
|
|
|
244
241
|
border-end-end-radius: var(--border-radius-control-default-focus-ring-u8zbsz, 4px);
|
|
245
242
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-nv6mhz, #006ce0);
|
|
246
243
|
}
|
|
247
|
-
body[data-awsui-focus-visible=true] .
|
|
244
|
+
body[data-awsui-focus-visible=true] .awsui_resizer_x7peu_i88k3_167.awsui_has-focus_x7peu_i88k3_221:not(#\9) {
|
|
248
245
|
position: absolute;
|
|
249
246
|
}
|
|
250
247
|
|
|
251
|
-
.
|
|
248
|
+
.awsui_tracker_x7peu_i88k3_246:not(#\9) {
|
|
252
249
|
display: none;
|
|
253
250
|
position: absolute;
|
|
254
251
|
border-inline-start: var(--border-divider-list-width-27y3k5, 1px) dashed var(--color-border-divider-active-tn8t2p, #0f141a);
|
|
255
252
|
inline-size: 0;
|
|
256
253
|
inset-block: 0;
|
|
257
254
|
}
|
|
258
|
-
.awsui_resize-
|
|
255
|
+
.awsui_resize-active_x7peu_i88k3_141 .awsui_tracker_x7peu_i88k3_246:not(#\9) {
|
|
259
256
|
display: block;
|
|
260
257
|
}
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"resize-active": "awsui_resize-
|
|
6
|
-
"resize-active-with-focus": "awsui_resize-active-with-
|
|
7
|
-
"divider": "
|
|
8
|
-
"divider-disabled": "awsui_divider-
|
|
9
|
-
"divider-active": "awsui_divider-
|
|
10
|
-
"resizer": "
|
|
11
|
-
"has-focus": "awsui_has-
|
|
12
|
-
"tracker": "
|
|
5
|
+
"resize-active": "awsui_resize-active_x7peu_i88k3_141",
|
|
6
|
+
"resize-active-with-focus": "awsui_resize-active-with-focus_x7peu_i88k3_141",
|
|
7
|
+
"divider": "awsui_divider_x7peu_i88k3_146",
|
|
8
|
+
"divider-disabled": "awsui_divider-disabled_x7peu_i88k3_160",
|
|
9
|
+
"divider-active": "awsui_divider-active_x7peu_i88k3_163",
|
|
10
|
+
"resizer": "awsui_resizer_x7peu_i88k3_167",
|
|
11
|
+
"has-focus": "awsui_has-focus_x7peu_i88k3_221",
|
|
12
|
+
"tracker": "awsui_tracker_x7peu_i88k3_246"
|
|
13
13
|
};
|
|
14
14
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { TableProps } from '../interfaces';
|
|
2
2
|
export declare const SELECTION_ITEM = "selection-item";
|
|
3
|
-
export declare const SELECTION_ROOT = "selection-root";
|
|
4
3
|
export declare class ItemSet<T> {
|
|
5
4
|
constructor(trackBy: TableProps.TrackBy<T> | undefined, items: ReadonlyArray<T>);
|
|
6
5
|
private trackBy;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/table/selection/utils.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,eAAO,MAAM,cAAc,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/table/selection/utils.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAI/C,qBAAa,OAAO,CAAC,CAAC;gBACR,OAAO,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,SAAS,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC;IAI/E,OAAO,CAAC,OAAO,CAAoC;IACnD,OAAO,CAAC,GAAG,CAA8B;IACzC,GAAG,SAAU,CAAC,qBAA8E;IAC5F,GAAG,SAAU,CAAC,aAAwE;IACtF,OAAO,8FAAmC;CAC3C;AAED,eAAO,MAAM,YAAY;;;;;;;;;;CAIxB,CAAC"}
|
package/table/selection/utils.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
import { getTrackableValue } from '../utils';
|
|
4
4
|
export const SELECTION_ITEM = 'selection-item';
|
|
5
|
-
|
|
5
|
+
const SELECTION_ROOT = 'selection-root';
|
|
6
6
|
// A set, that compares items by their "trackables" (the results of applying `trackBy` to them)
|
|
7
7
|
export class ItemSet {
|
|
8
8
|
constructor(trackBy, items) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/table/selection/utils.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAGtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,MAAM,CAAC,MAAM,cAAc,GAAG,gBAAgB,CAAC;AAC/C,MAAM,
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/table/selection/utils.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAGtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,MAAM,CAAC,MAAM,cAAc,GAAG,gBAAgB,CAAC;AAC/C,MAAM,cAAc,GAAG,gBAAgB,CAAC;AAExC,+FAA+F;AAC/F,MAAM,OAAO,OAAO;IAClB,YAAY,OAA0C,EAAE,KAAuB;QAKvE,QAAG,GAAoB,IAAI,GAAG,EAAE,CAAC;QACzC,QAAG,GAAG,CAAC,IAAO,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,iBAAiB,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC;QAC5F,QAAG,GAAG,CAAC,IAAO,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,iBAAiB,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;QACtF,YAAO,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAPxC,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC1B,CAAC;CAMF;AAED,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,IAAI,EAAE,EAAE,CAAC,OAAO,GAAG,cAAc,CAAC,EAAE,MAAM,EAAE;IAC5C,GAAG,EAAE,EAAE,CAAC,OAAO,GAAG,cAAc,CAAC,EAAE,KAAK,EAAE;IAC1C,IAAI,EAAE,EAAE,CAAC,OAAO,GAAG,cAAc,CAAC,EAAE,MAAM,EAAE;CAC7C,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport { TableProps } from '../interfaces';\nimport { getTrackableValue } from '../utils';\n\nexport const SELECTION_ITEM = 'selection-item';\nconst SELECTION_ROOT = 'selection-root';\n\n// A set, that compares items by their \"trackables\" (the results of applying `trackBy` to them)\nexport class ItemSet<T> {\n constructor(trackBy: TableProps.TrackBy<T> | undefined, items: ReadonlyArray<T>) {\n this.trackBy = trackBy;\n items.forEach(this.put);\n }\n private trackBy: TableProps.TrackBy<T> | undefined;\n private map: Map<unknown, T> = new Map();\n put = (item: T) => this.map.set.call(this.map, getTrackableValue(this.trackBy, item), item);\n has = (item: T) => this.map.has.call(this.map, getTrackableValue(this.trackBy, item));\n forEach = this.map.forEach.bind(this.map);\n}\n\nexport const focusMarkers = {\n item: { ['data-' + SELECTION_ITEM]: 'item' },\n all: { ['data-' + SELECTION_ITEM]: 'all' },\n root: { ['data-' + SELECTION_ROOT]: 'true' },\n};\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import { ReadonlyAsyncStore } from '../../area-chart/async-store';
|
|
3
3
|
import { StickyColumnsCellState, StickyColumnsProps, StickyColumnsState } from './interfaces';
|
|
4
4
|
export interface StickyColumnsModel {
|
|
5
5
|
store: ReadonlyAsyncStore<StickyColumnsState>;
|
|
@@ -24,25 +24,5 @@ interface StickyCellStyles {
|
|
|
24
24
|
style?: React.CSSProperties;
|
|
25
25
|
}
|
|
26
26
|
export declare function useStickyCellStyles({ stickyColumns, columnId, getClassName, }: UseStickyCellStylesProps): StickyCellStyles;
|
|
27
|
-
interface UpdateCellStylesProps {
|
|
28
|
-
wrapper: HTMLElement;
|
|
29
|
-
table: HTMLElement;
|
|
30
|
-
cells: Map<PropertyKey, HTMLElement>;
|
|
31
|
-
visibleColumns: readonly PropertyKey[];
|
|
32
|
-
stickyColumnsFirst: number;
|
|
33
|
-
stickyColumnsLast: number;
|
|
34
|
-
}
|
|
35
|
-
export default class StickyColumnsStore extends AsyncStore<StickyColumnsState> {
|
|
36
|
-
private cellOffsets;
|
|
37
|
-
private isStuckToTheInlineStart;
|
|
38
|
-
private isStuckToTheInlineEnd;
|
|
39
|
-
private padInlineStart;
|
|
40
|
-
constructor();
|
|
41
|
-
updateCellStyles(props: UpdateCellStylesProps): void;
|
|
42
|
-
private updateScroll;
|
|
43
|
-
private generateCellStyles;
|
|
44
|
-
private updateCellOffsets;
|
|
45
|
-
private isEnabled;
|
|
46
|
-
}
|
|
47
27
|
export {};
|
|
48
28
|
//# sourceMappingURL=use-sticky-columns.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-sticky-columns.d.ts","sourceRoot":"","sources":["../../../../src/table/sticky-columns/use-sticky-columns.ts"],"names":[],"mappings":"AAGA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAMvE,
|
|
1
|
+
{"version":3,"file":"use-sticky-columns.d.ts","sourceRoot":"","sources":["../../../../src/table/sticky-columns/use-sticky-columns.ts"],"names":[],"mappings":"AAGA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAMvE,OAAmB,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAEL,sBAAsB,EACtB,kBAAkB,EAClB,kBAAkB,EAEnB,MAAM,cAAc,CAAC;AAOtB,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,kBAAkB,CAAC,kBAAkB,CAAC,CAAC;IAC9C,KAAK,EAAE;QACL,OAAO,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;KAC/B,CAAC;IACF,IAAI,EAAE;QACJ,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;QACtC,OAAO,EAAE,KAAK,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;QACxC,IAAI,EAAE,CAAC,QAAQ,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,GAAG,WAAW,KAAK,IAAI,CAAC;KACjE,CAAC;CACH;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,cAAc,EACd,kBAAkB,EAClB,iBAAiB,GAClB,EAAE,kBAAkB,GAAG,kBAAkB,CAgGzC;AAED,UAAU,wBAAwB;IAChC,aAAa,EAAE,kBAAkB,CAAC;IAClC,QAAQ,EAAE,WAAW,CAAC;IACtB,YAAY,EAAE,CAAC,MAAM,EAAE,IAAI,GAAG,sBAAsB,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClF;AAED,UAAU,gBAAgB;IACxB,GAAG,EAAE,KAAK,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED,wBAAgB,mBAAmB,CAAC,EAClC,aAAa,EACb,QAAQ,EACR,YAAY,GACb,EAAE,wBAAwB,GAAG,gBAAgB,CA8D7C"}
|
|
@@ -142,7 +142,7 @@ export function useStickyCellStyles({ stickyColumns, columnId, getClassName, })
|
|
|
142
142
|
style: (_a = cellStyles === null || cellStyles === void 0 ? void 0 : cellStyles.offset) !== null && _a !== void 0 ? _a : undefined,
|
|
143
143
|
};
|
|
144
144
|
}
|
|
145
|
-
|
|
145
|
+
class StickyColumnsStore extends AsyncStore {
|
|
146
146
|
constructor() {
|
|
147
147
|
super({ cellState: new Map(), wrapperState: { scrollPaddingInlineStart: 0, scrollPaddingInlineEnd: 0 } });
|
|
148
148
|
this.cellOffsets = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-sticky-columns.js","sourceRoot":"","sources":["../../../../src/table/sticky-columns/use-sticky-columns.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAc,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACvE,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AACrG,OAAO,EAAE,4BAA4B,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;AAEnH,OAAO,UAAkC,MAAM,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AAC,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;QAClG,MAAM,qBAAqB,GAAG,UAAU,CAAC,gBAAgB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;QAE9F,IAAI,CAAC,uBAAuB,GAAG,wBAAwB,GAAG,uBAAuB,CAAC;QAElF,sIAAsI;QACtI,8HAA8H;QAC9H,IAAI,CAAC,qBAAqB;YACxB,IAAI,CAAC,IAAI,CAAC,wBAAwB,CAAC,GAAG,kBAAkB,GAAG,kBAAkB,GAAG,qBAAqB,CAAC;QAExG,IAAI,CAAC,cAAc,GAAG,uBAAuB,KAAK,CAAC,IAAI,IAAI,CAAC,uBAAuB,CAAC;IACtF,CAAC;CAiEF","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React, { useCallback, useEffect, useMemo, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { useResizeObserver, useStableCallback } from '@cloudscape-design/component-toolkit/internal';\nimport { getLogicalBoundingClientRect, getScrollInlineStart } from '@cloudscape-design/component-toolkit/internal';\n\nimport AsyncStore, { ReadonlyAsyncStore } from '../../area-chart/async-store';\nimport {\n CellOffsets,\n StickyColumnsCellState,\n StickyColumnsProps,\n StickyColumnsState,\n StickyColumnsWrapperState,\n} from './interfaces';\nimport { isCellStatesEqual, isWrapperStatesEqual, updateCellOffsets } from './utils';\n\n// We allow the table to have a minimum of 148px of available space besides the sum of the widths of the sticky columns\n// This value is an UX recommendation and is approximately 1/3 of our smallest breakpoint (465px)\nconst MINIMUM_SCROLLABLE_SPACE = 148;\n\nexport interface StickyColumnsModel {\n store: ReadonlyAsyncStore<StickyColumnsState>;\n style: {\n wrapper?: React.CSSProperties;\n };\n refs: {\n table: React.RefCallback<HTMLElement>;\n wrapper: React.RefCallback<HTMLElement>;\n cell: (columnId: PropertyKey, node: null | HTMLElement) => void;\n };\n}\n\nexport function useStickyColumns({\n visibleColumns,\n stickyColumnsFirst,\n stickyColumnsLast,\n}: StickyColumnsProps): StickyColumnsModel {\n const store = useMemo(() => new StickyColumnsStore(), []);\n const wrapperRef = useRef<HTMLElement>(null) as React.MutableRefObject<null | HTMLElement>;\n const tableRef = useRef<HTMLElement>(null) as React.MutableRefObject<null | HTMLElement>;\n const cellsRef = useRef(new Map<PropertyKey, HTMLElement>());\n\n const hasStickyColumns = stickyColumnsFirst + stickyColumnsLast > 0;\n\n const updateStickyStyles = useStableCallback(() => {\n if (wrapperRef.current && tableRef.current) {\n store.updateCellStyles({\n wrapper: wrapperRef.current,\n table: tableRef.current,\n cells: cellsRef.current,\n visibleColumns,\n stickyColumnsFirst,\n stickyColumnsLast,\n });\n }\n });\n\n useResizeObserver(wrapperRef, updateStickyStyles);\n\n useResizeObserver(tableRef, updateStickyStyles);\n\n useEffect(() => {\n if (wrapperRef.current && tableRef.current) {\n store.updateCellStyles({\n wrapper: wrapperRef.current,\n table: tableRef.current,\n cells: cellsRef.current,\n visibleColumns,\n stickyColumnsFirst,\n stickyColumnsLast,\n });\n }\n }, [store, stickyColumnsFirst, stickyColumnsLast, visibleColumns]);\n\n // Update wrapper styles imperatively to avoid unnecessary re-renders.\n useEffect(() => {\n if (!hasStickyColumns) {\n return;\n }\n\n const selector = (state: StickyColumnsState) => state.wrapperState;\n\n const updateWrapperStyles = (state: StickyColumnsWrapperState, prev: StickyColumnsWrapperState) => {\n if (isWrapperStatesEqual(state, prev)) {\n return;\n }\n\n if (wrapperRef.current) {\n wrapperRef.current.style.scrollPaddingInlineStart = state.scrollPaddingInlineStart + 'px';\n wrapperRef.current.style.scrollPaddingInlineEnd = state.scrollPaddingInlineEnd + 'px';\n }\n };\n\n const unsubscribe = store.subscribe(selector, (newState, prevState) =>\n updateWrapperStyles(selector(newState), selector(prevState))\n );\n return unsubscribe;\n }, [store, hasStickyColumns]);\n\n const setWrapper = useCallback(\n (node: null | HTMLElement) => {\n if (wrapperRef.current) {\n wrapperRef.current.removeEventListener('scroll', updateStickyStyles);\n }\n if (node && hasStickyColumns) {\n node.addEventListener('scroll', updateStickyStyles);\n }\n wrapperRef.current = node;\n },\n [hasStickyColumns, updateStickyStyles]\n );\n\n const setTable = useCallback((node: null | HTMLElement) => {\n tableRef.current = node;\n }, []);\n\n const setCell = useCallback((columnId: PropertyKey, node: null | HTMLElement) => {\n if (node) {\n cellsRef.current.set(columnId, node);\n } else {\n cellsRef.current.delete(columnId);\n }\n }, []);\n\n return {\n store,\n style: {\n // Provide wrapper styles as props so that a re-render won't cause invalidation.\n wrapper: hasStickyColumns ? { ...store.get().wrapperState } : undefined,\n },\n refs: { wrapper: setWrapper, table: setTable, cell: setCell },\n };\n}\n\ninterface UseStickyCellStylesProps {\n stickyColumns: StickyColumnsModel;\n columnId: PropertyKey;\n getClassName: (styles: null | StickyColumnsCellState) => Record<string, boolean>;\n}\n\ninterface StickyCellStyles {\n ref: React.RefCallback<HTMLElement>;\n className?: string;\n style?: React.CSSProperties;\n}\n\nexport function useStickyCellStyles({\n stickyColumns,\n columnId,\n getClassName,\n}: UseStickyCellStylesProps): StickyCellStyles {\n const setCell = stickyColumns.refs.cell;\n\n // unsubscribeRef to hold the function to unsubscribe from the store's updates\n const unsubscribeRef = useRef<null | (() => void)>(null);\n\n // refCallback updates the cell ref and sets up the store subscription\n const refCallback = useCallback(\n (cellElement: null | HTMLElement) => {\n if (unsubscribeRef.current) {\n // Unsubscribe before we do any updates to avoid leaving any subscriptions hanging\n unsubscribeRef.current();\n }\n\n // Update cellRef and the store's state to point to the new DOM node\n setCell(columnId, cellElement);\n\n // Update cell styles imperatively to avoid unnecessary re-renders.\n const selector = (state: StickyColumnsState) => state.cellState.get(columnId) ?? null;\n\n const updateCellStyles = (state: null | StickyColumnsCellState, prev: null | StickyColumnsCellState) => {\n if (isCellStatesEqual(state, prev)) {\n return;\n }\n\n const className = getClassName(state);\n if (cellElement) {\n Object.keys(className).forEach(key => {\n if (className[key]) {\n cellElement.classList.add(key);\n } else {\n cellElement.classList.remove(key);\n }\n });\n cellElement.style.insetInlineStart =\n state?.offset.insetInlineStart !== undefined ? `${state.offset.insetInlineStart}px` : '';\n cellElement.style.insetInlineEnd =\n state?.offset.insetInlineEnd !== undefined ? `${state.offset.insetInlineEnd}px` : '';\n }\n };\n\n // If the node is not null (i.e., the table cell is being mounted or updated, not unmounted),\n // set up a new subscription to the store's updates\n if (cellElement) {\n unsubscribeRef.current = stickyColumns.store.subscribe(selector, (newState, prevState) => {\n updateCellStyles(selector(newState), selector(prevState));\n });\n }\n },\n\n // getClassName is expected to be pure\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [columnId, setCell, stickyColumns.store]\n );\n\n // Provide cell styles as props so that a re-render won't cause invalidation.\n const cellStyles = stickyColumns.store.get().cellState.get(columnId);\n return {\n ref: refCallback,\n className: cellStyles ? clsx(getClassName(cellStyles)) : undefined,\n style: cellStyles?.offset ?? undefined,\n };\n}\n\ninterface UpdateCellStylesProps {\n wrapper: HTMLElement;\n table: HTMLElement;\n cells: Map<PropertyKey, HTMLElement>;\n visibleColumns: readonly PropertyKey[];\n stickyColumnsFirst: number;\n stickyColumnsLast: number;\n}\n\nexport default class StickyColumnsStore extends AsyncStore<StickyColumnsState> {\n private cellOffsets: CellOffsets = {\n offsets: new Map(),\n stickyWidthInlineStart: 0,\n stickyWidthInlineEnd: 0,\n };\n private isStuckToTheInlineStart = false;\n private isStuckToTheInlineEnd = false;\n private padInlineStart = false;\n\n constructor() {\n super({ cellState: new Map(), wrapperState: { scrollPaddingInlineStart: 0, scrollPaddingInlineEnd: 0 } });\n }\n\n public updateCellStyles(props: UpdateCellStylesProps) {\n const hasStickyColumns = props.stickyColumnsFirst + props.stickyColumnsLast > 0;\n const hadStickyColumns = this.cellOffsets.offsets.size > 0;\n\n if (hasStickyColumns || hadStickyColumns) {\n this.updateScroll(props);\n this.updateCellOffsets(props);\n this.set(() => ({\n cellState: this.generateCellStyles(props),\n wrapperState: {\n scrollPaddingInlineStart: this.cellOffsets.stickyWidthInlineStart,\n scrollPaddingInlineEnd: this.cellOffsets.stickyWidthInlineEnd,\n },\n }));\n }\n }\n\n private updateScroll(props: UpdateCellStylesProps) {\n const wrapperScrollInlineStart = getScrollInlineStart(props.wrapper);\n const wrapperScrollWidth = props.wrapper.scrollWidth;\n const wrapperClientWidth = props.wrapper.clientWidth;\n const tablePaddingInlineStart = parseFloat(getComputedStyle(props.table).paddingInlineStart) || 0;\n const tablePaddingInlineEnd = parseFloat(getComputedStyle(props.table).paddingInlineEnd) || 0;\n\n this.isStuckToTheInlineStart = wrapperScrollInlineStart > tablePaddingInlineStart;\n\n // Math.ceil() is used here to address an edge-case in certain browsers, where they return non-integer wrapperScrollInlineStart values\n // which are lower than expected (sub-pixel difference), resulting in the table always being in the \"stuck to the right\" state\n this.isStuckToTheInlineEnd =\n Math.ceil(wrapperScrollInlineStart) < wrapperScrollWidth - wrapperClientWidth - tablePaddingInlineEnd;\n\n this.padInlineStart = tablePaddingInlineStart !== 0 && this.isStuckToTheInlineStart;\n }\n\n private generateCellStyles = (props: UpdateCellStylesProps): Map<PropertyKey, StickyColumnsCellState> => {\n const isEnabled = this.isEnabled(props);\n const lastLeftStickyColumnIndex = props.stickyColumnsFirst - 1;\n const lastRightStickyColumnIndex = props.visibleColumns.length - props.stickyColumnsLast;\n\n return props.visibleColumns.reduce((acc, columnId, index) => {\n let stickySide = 'non-sticky';\n if (index < props.stickyColumnsFirst) {\n stickySide = 'inline-start';\n } else if (index >= props.visibleColumns.length - props.stickyColumnsLast) {\n stickySide = 'inline-end';\n }\n\n if (!isEnabled || stickySide === 'non-sticky') {\n return acc;\n }\n\n // Determine the offset of the sticky column using the `cellOffsets` state object\n const isFirstColumn = index === 0;\n const stickyColumnOffsetLeft = this.cellOffsets.offsets.get(columnId)?.first ?? 0;\n const stickyColumnOffsetRight = this.cellOffsets.offsets.get(columnId)?.last ?? 0;\n\n acc.set(columnId, {\n padInlineStart: isFirstColumn && this.padInlineStart,\n lastInsetInlineStart: this.isStuckToTheInlineStart && lastLeftStickyColumnIndex === index,\n lastInsetInlineEnd: this.isStuckToTheInlineEnd && lastRightStickyColumnIndex === index,\n offset: {\n insetInlineStart: stickySide === 'inline-start' ? stickyColumnOffsetLeft : undefined,\n insetInlineEnd: stickySide === 'inline-end' ? stickyColumnOffsetRight : undefined,\n },\n });\n return acc;\n }, new Map<PropertyKey, StickyColumnsCellState>());\n };\n\n private updateCellOffsets = (props: UpdateCellStylesProps): void => {\n this.cellOffsets = updateCellOffsets(props.cells, props);\n };\n\n private isEnabled = (props: UpdateCellStylesProps): boolean => {\n const noStickyColumns = props.stickyColumnsFirst + props.stickyColumnsLast === 0;\n if (noStickyColumns) {\n return false;\n }\n\n const wrapperWidth = getLogicalBoundingClientRect(props.wrapper).inlineSize;\n const tableWidth = getLogicalBoundingClientRect(props.table).inlineSize;\n const isWrapperScrollable = tableWidth > wrapperWidth;\n if (!isWrapperScrollable) {\n return false;\n }\n\n const totalStickySpace = this.cellOffsets.stickyWidthInlineStart + this.cellOffsets.stickyWidthInlineEnd;\n const tablePaddingLeft = parseFloat(getComputedStyle(props.table).paddingLeft) || 0;\n const tablePaddingRight = parseFloat(getComputedStyle(props.table).paddingRight) || 0;\n const hasEnoughScrollableSpace =\n totalStickySpace + MINIMUM_SCROLLABLE_SPACE + tablePaddingLeft + tablePaddingRight < wrapperWidth;\n if (!hasEnoughScrollableSpace) {\n return false;\n }\n\n return true;\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"use-sticky-columns.js","sourceRoot":"","sources":["../../../../src/table/sticky-columns/use-sticky-columns.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,OAAc,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACvE,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AACr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QACrD,MAAM,uBAAuB,GAAG,UAAU,CAAC,gBAAgB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;QAClG,MAAM,qBAAqB,GAAG,UAAU,CAAC,gBAAgB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;QAE9F,IAAI,CAAC,uBAAuB,GAAG,wBAAwB,GAAG,uBAAuB,CAAC;QAElF,sIAAsI;QACtI,8HAA8H;QAC9H,IAAI,CAAC,qBAAqB;YACxB,IAAI,CAAC,IAAI,CAAC,wBAAwB,CAAC,GAAG,kBAAkB,GAAG,kBAAkB,GAAG,qBAAqB,CAAC;QAExG,IAAI,CAAC,cAAc,GAAG,uBAAuB,KAAK,CAAC,IAAI,IAAI,CAAC,uBAAuB,CAAC;IACtF,CAAC;CAiEF","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\nimport React, { useCallback, useEffect, useMemo, useRef } from 'react';\nimport clsx from 'clsx';\n\nimport { useResizeObserver, useStableCallback } from '@cloudscape-design/component-toolkit/internal';\nimport { getLogicalBoundingClientRect, getScrollInlineStart } from '@cloudscape-design/component-toolkit/internal';\n\nimport AsyncStore, { ReadonlyAsyncStore } from '../../area-chart/async-store';\nimport {\n CellOffsets,\n StickyColumnsCellState,\n StickyColumnsProps,\n StickyColumnsState,\n StickyColumnsWrapperState,\n} from './interfaces';\nimport { isCellStatesEqual, isWrapperStatesEqual, updateCellOffsets } from './utils';\n\n// We allow the table to have a minimum of 148px of available space besides the sum of the widths of the sticky columns\n// This value is an UX recommendation and is approximately 1/3 of our smallest breakpoint (465px)\nconst MINIMUM_SCROLLABLE_SPACE = 148;\n\nexport interface StickyColumnsModel {\n store: ReadonlyAsyncStore<StickyColumnsState>;\n style: {\n wrapper?: React.CSSProperties;\n };\n refs: {\n table: React.RefCallback<HTMLElement>;\n wrapper: React.RefCallback<HTMLElement>;\n cell: (columnId: PropertyKey, node: null | HTMLElement) => void;\n };\n}\n\nexport function useStickyColumns({\n visibleColumns,\n stickyColumnsFirst,\n stickyColumnsLast,\n}: StickyColumnsProps): StickyColumnsModel {\n const store = useMemo(() => new StickyColumnsStore(), []);\n const wrapperRef = useRef<HTMLElement>(null) as React.MutableRefObject<null | HTMLElement>;\n const tableRef = useRef<HTMLElement>(null) as React.MutableRefObject<null | HTMLElement>;\n const cellsRef = useRef(new Map<PropertyKey, HTMLElement>());\n\n const hasStickyColumns = stickyColumnsFirst + stickyColumnsLast > 0;\n\n const updateStickyStyles = useStableCallback(() => {\n if (wrapperRef.current && tableRef.current) {\n store.updateCellStyles({\n wrapper: wrapperRef.current,\n table: tableRef.current,\n cells: cellsRef.current,\n visibleColumns,\n stickyColumnsFirst,\n stickyColumnsLast,\n });\n }\n });\n\n useResizeObserver(wrapperRef, updateStickyStyles);\n\n useResizeObserver(tableRef, updateStickyStyles);\n\n useEffect(() => {\n if (wrapperRef.current && tableRef.current) {\n store.updateCellStyles({\n wrapper: wrapperRef.current,\n table: tableRef.current,\n cells: cellsRef.current,\n visibleColumns,\n stickyColumnsFirst,\n stickyColumnsLast,\n });\n }\n }, [store, stickyColumnsFirst, stickyColumnsLast, visibleColumns]);\n\n // Update wrapper styles imperatively to avoid unnecessary re-renders.\n useEffect(() => {\n if (!hasStickyColumns) {\n return;\n }\n\n const selector = (state: StickyColumnsState) => state.wrapperState;\n\n const updateWrapperStyles = (state: StickyColumnsWrapperState, prev: StickyColumnsWrapperState) => {\n if (isWrapperStatesEqual(state, prev)) {\n return;\n }\n\n if (wrapperRef.current) {\n wrapperRef.current.style.scrollPaddingInlineStart = state.scrollPaddingInlineStart + 'px';\n wrapperRef.current.style.scrollPaddingInlineEnd = state.scrollPaddingInlineEnd + 'px';\n }\n };\n\n const unsubscribe = store.subscribe(selector, (newState, prevState) =>\n updateWrapperStyles(selector(newState), selector(prevState))\n );\n return unsubscribe;\n }, [store, hasStickyColumns]);\n\n const setWrapper = useCallback(\n (node: null | HTMLElement) => {\n if (wrapperRef.current) {\n wrapperRef.current.removeEventListener('scroll', updateStickyStyles);\n }\n if (node && hasStickyColumns) {\n node.addEventListener('scroll', updateStickyStyles);\n }\n wrapperRef.current = node;\n },\n [hasStickyColumns, updateStickyStyles]\n );\n\n const setTable = useCallback((node: null | HTMLElement) => {\n tableRef.current = node;\n }, []);\n\n const setCell = useCallback((columnId: PropertyKey, node: null | HTMLElement) => {\n if (node) {\n cellsRef.current.set(columnId, node);\n } else {\n cellsRef.current.delete(columnId);\n }\n }, []);\n\n return {\n store,\n style: {\n // Provide wrapper styles as props so that a re-render won't cause invalidation.\n wrapper: hasStickyColumns ? { ...store.get().wrapperState } : undefined,\n },\n refs: { wrapper: setWrapper, table: setTable, cell: setCell },\n };\n}\n\ninterface UseStickyCellStylesProps {\n stickyColumns: StickyColumnsModel;\n columnId: PropertyKey;\n getClassName: (styles: null | StickyColumnsCellState) => Record<string, boolean>;\n}\n\ninterface StickyCellStyles {\n ref: React.RefCallback<HTMLElement>;\n className?: string;\n style?: React.CSSProperties;\n}\n\nexport function useStickyCellStyles({\n stickyColumns,\n columnId,\n getClassName,\n}: UseStickyCellStylesProps): StickyCellStyles {\n const setCell = stickyColumns.refs.cell;\n\n // unsubscribeRef to hold the function to unsubscribe from the store's updates\n const unsubscribeRef = useRef<null | (() => void)>(null);\n\n // refCallback updates the cell ref and sets up the store subscription\n const refCallback = useCallback(\n (cellElement: null | HTMLElement) => {\n if (unsubscribeRef.current) {\n // Unsubscribe before we do any updates to avoid leaving any subscriptions hanging\n unsubscribeRef.current();\n }\n\n // Update cellRef and the store's state to point to the new DOM node\n setCell(columnId, cellElement);\n\n // Update cell styles imperatively to avoid unnecessary re-renders.\n const selector = (state: StickyColumnsState) => state.cellState.get(columnId) ?? null;\n\n const updateCellStyles = (state: null | StickyColumnsCellState, prev: null | StickyColumnsCellState) => {\n if (isCellStatesEqual(state, prev)) {\n return;\n }\n\n const className = getClassName(state);\n if (cellElement) {\n Object.keys(className).forEach(key => {\n if (className[key]) {\n cellElement.classList.add(key);\n } else {\n cellElement.classList.remove(key);\n }\n });\n cellElement.style.insetInlineStart =\n state?.offset.insetInlineStart !== undefined ? `${state.offset.insetInlineStart}px` : '';\n cellElement.style.insetInlineEnd =\n state?.offset.insetInlineEnd !== undefined ? `${state.offset.insetInlineEnd}px` : '';\n }\n };\n\n // If the node is not null (i.e., the table cell is being mounted or updated, not unmounted),\n // set up a new subscription to the store's updates\n if (cellElement) {\n unsubscribeRef.current = stickyColumns.store.subscribe(selector, (newState, prevState) => {\n updateCellStyles(selector(newState), selector(prevState));\n });\n }\n },\n\n // getClassName is expected to be pure\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [columnId, setCell, stickyColumns.store]\n );\n\n // Provide cell styles as props so that a re-render won't cause invalidation.\n const cellStyles = stickyColumns.store.get().cellState.get(columnId);\n return {\n ref: refCallback,\n className: cellStyles ? clsx(getClassName(cellStyles)) : undefined,\n style: cellStyles?.offset ?? undefined,\n };\n}\n\ninterface UpdateCellStylesProps {\n wrapper: HTMLElement;\n table: HTMLElement;\n cells: Map<PropertyKey, HTMLElement>;\n visibleColumns: readonly PropertyKey[];\n stickyColumnsFirst: number;\n stickyColumnsLast: number;\n}\n\nclass StickyColumnsStore extends AsyncStore<StickyColumnsState> {\n private cellOffsets: CellOffsets = {\n offsets: new Map(),\n stickyWidthInlineStart: 0,\n stickyWidthInlineEnd: 0,\n };\n private isStuckToTheInlineStart = false;\n private isStuckToTheInlineEnd = false;\n private padInlineStart = false;\n\n constructor() {\n super({ cellState: new Map(), wrapperState: { scrollPaddingInlineStart: 0, scrollPaddingInlineEnd: 0 } });\n }\n\n public updateCellStyles(props: UpdateCellStylesProps) {\n const hasStickyColumns = props.stickyColumnsFirst + props.stickyColumnsLast > 0;\n const hadStickyColumns = this.cellOffsets.offsets.size > 0;\n\n if (hasStickyColumns || hadStickyColumns) {\n this.updateScroll(props);\n this.updateCellOffsets(props);\n this.set(() => ({\n cellState: this.generateCellStyles(props),\n wrapperState: {\n scrollPaddingInlineStart: this.cellOffsets.stickyWidthInlineStart,\n scrollPaddingInlineEnd: this.cellOffsets.stickyWidthInlineEnd,\n },\n }));\n }\n }\n\n private updateScroll(props: UpdateCellStylesProps) {\n const wrapperScrollInlineStart = getScrollInlineStart(props.wrapper);\n const wrapperScrollWidth = props.wrapper.scrollWidth;\n const wrapperClientWidth = props.wrapper.clientWidth;\n const tablePaddingInlineStart = parseFloat(getComputedStyle(props.table).paddingInlineStart) || 0;\n const tablePaddingInlineEnd = parseFloat(getComputedStyle(props.table).paddingInlineEnd) || 0;\n\n this.isStuckToTheInlineStart = wrapperScrollInlineStart > tablePaddingInlineStart;\n\n // Math.ceil() is used here to address an edge-case in certain browsers, where they return non-integer wrapperScrollInlineStart values\n // which are lower than expected (sub-pixel difference), resulting in the table always being in the \"stuck to the right\" state\n this.isStuckToTheInlineEnd =\n Math.ceil(wrapperScrollInlineStart) < wrapperScrollWidth - wrapperClientWidth - tablePaddingInlineEnd;\n\n this.padInlineStart = tablePaddingInlineStart !== 0 && this.isStuckToTheInlineStart;\n }\n\n private generateCellStyles = (props: UpdateCellStylesProps): Map<PropertyKey, StickyColumnsCellState> => {\n const isEnabled = this.isEnabled(props);\n const lastLeftStickyColumnIndex = props.stickyColumnsFirst - 1;\n const lastRightStickyColumnIndex = props.visibleColumns.length - props.stickyColumnsLast;\n\n return props.visibleColumns.reduce((acc, columnId, index) => {\n let stickySide = 'non-sticky';\n if (index < props.stickyColumnsFirst) {\n stickySide = 'inline-start';\n } else if (index >= props.visibleColumns.length - props.stickyColumnsLast) {\n stickySide = 'inline-end';\n }\n\n if (!isEnabled || stickySide === 'non-sticky') {\n return acc;\n }\n\n // Determine the offset of the sticky column using the `cellOffsets` state object\n const isFirstColumn = index === 0;\n const stickyColumnOffsetLeft = this.cellOffsets.offsets.get(columnId)?.first ?? 0;\n const stickyColumnOffsetRight = this.cellOffsets.offsets.get(columnId)?.last ?? 0;\n\n acc.set(columnId, {\n padInlineStart: isFirstColumn && this.padInlineStart,\n lastInsetInlineStart: this.isStuckToTheInlineStart && lastLeftStickyColumnIndex === index,\n lastInsetInlineEnd: this.isStuckToTheInlineEnd && lastRightStickyColumnIndex === index,\n offset: {\n insetInlineStart: stickySide === 'inline-start' ? stickyColumnOffsetLeft : undefined,\n insetInlineEnd: stickySide === 'inline-end' ? stickyColumnOffsetRight : undefined,\n },\n });\n return acc;\n }, new Map<PropertyKey, StickyColumnsCellState>());\n };\n\n private updateCellOffsets = (props: UpdateCellStylesProps): void => {\n this.cellOffsets = updateCellOffsets(props.cells, props);\n };\n\n private isEnabled = (props: UpdateCellStylesProps): boolean => {\n const noStickyColumns = props.stickyColumnsFirst + props.stickyColumnsLast === 0;\n if (noStickyColumns) {\n return false;\n }\n\n const wrapperWidth = getLogicalBoundingClientRect(props.wrapper).inlineSize;\n const tableWidth = getLogicalBoundingClientRect(props.table).inlineSize;\n const isWrapperScrollable = tableWidth > wrapperWidth;\n if (!isWrapperScrollable) {\n return false;\n }\n\n const totalStickySpace = this.cellOffsets.stickyWidthInlineStart + this.cellOffsets.stickyWidthInlineEnd;\n const tablePaddingLeft = parseFloat(getComputedStyle(props.table).paddingLeft) || 0;\n const tablePaddingRight = parseFloat(getComputedStyle(props.table).paddingRight) || 0;\n const hasEnoughScrollableSpace =\n totalStickySpace + MINIMUM_SCROLLABLE_SPACE + tablePaddingLeft + tablePaddingRight < wrapperWidth;\n if (!hasEnoughScrollableSpace) {\n return false;\n }\n\n return true;\n };\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sticky-scrollbar.d.ts","sourceRoot":"","sources":["../../../../src/table/sticky-scrollbar/sticky-scrollbar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAqB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"sticky-scrollbar.d.ts","sourceRoot":"","sources":["../../../../src/table/sticky-scrollbar/sticky-scrollbar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAW1C,UAAU,oBAAoB;IAC5B,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC;IAC5C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,QAAQ,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;IAChD,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;;AAED,wBAA2C"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
import React, { forwardRef } from 'react';
|
|
4
4
|
import clsx from 'clsx';
|
|
5
|
+
import { useIntersectionObserver } from '../../internal/hooks/use-intersection-observer';
|
|
5
6
|
import { useMergeRefs } from '../../internal/hooks/use-merge-refs';
|
|
6
7
|
import { useVisualRefresh } from '../../internal/hooks/use-visual-mode';
|
|
7
8
|
import { browserScrollbarSize } from '../../internal/utils/browser-scrollbar-size';
|
|
@@ -19,7 +20,10 @@ function StickyScrollbar({ wrapperRef, tableRef, onScroll, hasStickyColumns }, r
|
|
|
19
20
|
*/
|
|
20
21
|
const offsetScrollbar = hasStickyColumns || browserScrollbarSize().height === 0;
|
|
21
22
|
useStickyScrollbar(scrollbarRef, scrollbarContentRef, tableRef, wrapperRef, offsetScrollbar);
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
const { ref: stickyDetectionRef, isIntersecting: isStickyDetectionVisible } = useIntersectionObserver();
|
|
24
|
+
return (React.createElement(React.Fragment, null,
|
|
25
|
+
React.createElement("div", { ref: mergedRef, className: clsx(styles['sticky-scrollbar'], offsetScrollbar && styles['sticky-scrollbar-offset'], isVisualRefresh && styles['is-visual-refresh']), onScroll: onScroll, "data-stuck": !isStickyDetectionVisible },
|
|
26
|
+
React.createElement("div", { ref: scrollbarContentRef, className: styles['sticky-scrollbar-content'] })),
|
|
27
|
+
React.createElement("div", { ref: stickyDetectionRef, style: { position: 'absolute', right: 0, bottom: 0, left: 0, height: 1 } })));
|
|
24
28
|
}
|
|
25
29
|
//# sourceMappingURL=sticky-scrollbar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sticky-scrollbar.js","sourceRoot":"","sources":["../../../../src/table/sticky-scrollbar/sticky-scrollbar.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AASrC,eAAe,UAAU,CAAC,eAAe,CAAC,CAAC;AAE3C,SAAS,eAAe,CACtB,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,gBAAgB,EAAwB,EAC1E,GAA8B;IAE9B,MAAM,eAAe,GAAG,gBAAgB,EAAE,CAAC;IAC3C,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAiB,IAAI,CAAC,CAAC;IACxD,MAAM,mBAAmB,GAAG,KAAK,CAAC,MAAM,CAAiB,IAAI,CAAC,CAAC;IAC/D,MAAM,SAAS,GAAG,YAAY,CAAC,GAAG,EAAE,YAAY,CAAC,CAAC;IAElD;;;OAGG;IACH,MAAM,eAAe,GAAG,gBAAgB,IAAI,oBAAoB,EAAE,CAAC,MAAM,KAAK,CAAC,CAAC;IAEhF,kBAAkB,CAAC,YAAY,EAAE,mBAAmB,EAAE,QAAQ,EAAE,UAAU,EAAE,eAAe,CAAC,CAAC;
|
|
1
|
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,GAAG,EAAE,SAAS,EACd,SAAS,EAAE,IAAI,CACb,MAAM,CAAC,kBAAkB,CAAC,EAC1B,eAAe,IAAI,MAAM,CAAC,yBAAyB,CAAC,EACpD,eAAe,IAAI,MAAM,CAAC,mBAAmB,CAAC,CAC/C,EACD,QAAQ,EAAE,QAAQ,gBACN,CAAC,wBAAwB;YAErC,6BAAK,GAAG,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,CAAC,0BAA0B,CAAC,GAAI,CAC5E;QACN,6BAAK,GAAG,EAAE,kBAAkB,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,GAAI,CACzG,CACJ,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { forwardRef } from 'react';\nimport clsx from 'clsx';\n\nimport { useIntersectionObserver } from '../../internal/hooks/use-intersection-observer';\nimport { useMergeRefs } from '../../internal/hooks/use-merge-refs';\nimport { useVisualRefresh } from '../../internal/hooks/use-visual-mode';\nimport { browserScrollbarSize } from '../../internal/utils/browser-scrollbar-size';\nimport { useStickyScrollbar } from './use-sticky-scrollbar';\n\nimport styles from './styles.css.js';\n\ninterface StickyScrollbarProps {\n wrapperRef: React.RefObject<HTMLDivElement>;\n tableRef: React.RefObject<HTMLTableElement>;\n onScroll?: React.UIEventHandler<HTMLDivElement>;\n hasStickyColumns?: boolean;\n}\n\nexport default forwardRef(StickyScrollbar);\n\nfunction StickyScrollbar(\n { wrapperRef, tableRef, onScroll, hasStickyColumns }: StickyScrollbarProps,\n ref: React.Ref<HTMLDivElement>\n) {\n const isVisualRefresh = useVisualRefresh();\n const scrollbarRef = React.useRef<HTMLDivElement>(null);\n const scrollbarContentRef = React.useRef<HTMLDivElement>(null);\n const mergedRef = useMergeRefs(ref, scrollbarRef);\n\n /**\n * If the height of the scrollbar is 0, we're likely on a platform that uses\n * overlay scrollbars (e.g. Mac).\n */\n const offsetScrollbar = hasStickyColumns || browserScrollbarSize().height === 0;\n\n useStickyScrollbar(scrollbarRef, scrollbarContentRef, tableRef, wrapperRef, offsetScrollbar);\n\n const { ref: stickyDetectionRef, isIntersecting: isStickyDetectionVisible } = useIntersectionObserver();\n\n return (\n <>\n <div\n ref={mergedRef}\n className={clsx(\n styles['sticky-scrollbar'],\n offsetScrollbar && styles['sticky-scrollbar-offset'],\n isVisualRefresh && styles['is-visual-refresh']\n )}\n onScroll={onScroll}\n data-stuck={!isStickyDetectionVisible}\n >\n <div ref={scrollbarContentRef} className={styles['sticky-scrollbar-content']} />\n </div>\n <div ref={stickyDetectionRef} style={{ position: 'absolute', right: 0, bottom: 0, left: 0, height: 1 }} />\n </>\n );\n}\n"]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"sticky-scrollbar": "awsui_sticky-
|
|
5
|
-
"sticky-scrollbar-content": "awsui_sticky-scrollbar-
|
|
6
|
-
"sticky-scrollbar-visible": "awsui_sticky-scrollbar-
|
|
7
|
-
"sticky-scrollbar-native-invisible": "awsui_sticky-scrollbar-native-
|
|
8
|
-
"sticky-scrollbar-offset": "awsui_sticky-scrollbar-
|
|
9
|
-
"is-visual-refresh": "awsui_is-visual-
|
|
4
|
+
"sticky-scrollbar": "awsui_sticky-scrollbar_faqt8_uuyzs_177",
|
|
5
|
+
"sticky-scrollbar-content": "awsui_sticky-scrollbar-content_faqt8_uuyzs_189",
|
|
6
|
+
"sticky-scrollbar-visible": "awsui_sticky-scrollbar-visible_faqt8_uuyzs_192",
|
|
7
|
+
"sticky-scrollbar-native-invisible": "awsui_sticky-scrollbar-native-invisible_faqt8_uuyzs_195",
|
|
8
|
+
"sticky-scrollbar-offset": "awsui_sticky-scrollbar-offset_faqt8_uuyzs_198",
|
|
9
|
+
"is-visual-refresh": "awsui_is-visual-refresh_faqt8_uuyzs_201"
|
|
10
10
|
};
|
|
11
11
|
|
|
@@ -174,7 +174,7 @@
|
|
|
174
174
|
*/
|
|
175
175
|
/* Style used for links in slots/components that are text heavy, to help links stand out among
|
|
176
176
|
surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
|
|
177
|
-
.awsui_sticky-
|
|
177
|
+
.awsui_sticky-scrollbar_faqt8_uuyzs_177:not(#\9) {
|
|
178
178
|
block-size: 15px;
|
|
179
179
|
position: sticky;
|
|
180
180
|
display: none;
|
|
@@ -183,24 +183,27 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
183
183
|
inset-block-end: 0;
|
|
184
184
|
inline-size: 100%;
|
|
185
185
|
}
|
|
186
|
-
.awsui_sticky-
|
|
186
|
+
.awsui_sticky-scrollbar_faqt8_uuyzs_177[data-stuck=false]:not(#\9) {
|
|
187
|
+
clip-path: inset(-9999px 0 0 0 round var(--border-radius-container-wqv1zi, 16px));
|
|
188
|
+
}
|
|
189
|
+
.awsui_sticky-scrollbar-content_faqt8_uuyzs_189:not(#\9) {
|
|
187
190
|
block-size: 15px;
|
|
188
191
|
}
|
|
189
|
-
.awsui_sticky-scrollbar-
|
|
192
|
+
.awsui_sticky-scrollbar-visible_faqt8_uuyzs_192:not(#\9) {
|
|
190
193
|
display: block;
|
|
191
194
|
}
|
|
192
|
-
.awsui_sticky-scrollbar-native-
|
|
195
|
+
.awsui_sticky-scrollbar-native-invisible_faqt8_uuyzs_195:not(#\9) {
|
|
193
196
|
margin-block-start: -15px;
|
|
194
197
|
}
|
|
195
|
-
.awsui_sticky-scrollbar-
|
|
198
|
+
.awsui_sticky-scrollbar-offset_faqt8_uuyzs_198:not(#\9) {
|
|
196
199
|
z-index: 799;
|
|
197
200
|
}
|
|
198
|
-
.awsui_sticky-scrollbar-
|
|
201
|
+
.awsui_sticky-scrollbar-offset_faqt8_uuyzs_198:not(#\9):not(.awsui_is-visual-refresh_faqt8_uuyzs_201) {
|
|
199
202
|
background-color: var(--color-background-container-content-z79u4u, #ffffff);
|
|
200
203
|
block-size: 15px;
|
|
201
204
|
margin-block-start: calc(-1 * var(--border-divider-section-width-1061zr, 1px));
|
|
202
205
|
border-block-start: var(--border-divider-section-width-1061zr, 1px) solid var(--color-border-divider-default-cx07f2, #c6c6cd);
|
|
203
206
|
}
|
|
204
|
-
.awsui_sticky-scrollbar-
|
|
207
|
+
.awsui_sticky-scrollbar-offset_faqt8_uuyzs_198.awsui_is-visual-refresh_faqt8_uuyzs_201:not(#\9) {
|
|
205
208
|
margin-block-start: -5px;
|
|
206
209
|
}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"sticky-scrollbar": "awsui_sticky-
|
|
6
|
-
"sticky-scrollbar-content": "awsui_sticky-scrollbar-
|
|
7
|
-
"sticky-scrollbar-visible": "awsui_sticky-scrollbar-
|
|
8
|
-
"sticky-scrollbar-native-invisible": "awsui_sticky-scrollbar-native-
|
|
9
|
-
"sticky-scrollbar-offset": "awsui_sticky-scrollbar-
|
|
10
|
-
"is-visual-refresh": "awsui_is-visual-
|
|
5
|
+
"sticky-scrollbar": "awsui_sticky-scrollbar_faqt8_uuyzs_177",
|
|
6
|
+
"sticky-scrollbar-content": "awsui_sticky-scrollbar-content_faqt8_uuyzs_189",
|
|
7
|
+
"sticky-scrollbar-visible": "awsui_sticky-scrollbar-visible_faqt8_uuyzs_192",
|
|
8
|
+
"sticky-scrollbar-native-invisible": "awsui_sticky-scrollbar-native-invisible_faqt8_uuyzs_195",
|
|
9
|
+
"sticky-scrollbar-offset": "awsui_sticky-scrollbar-offset_faqt8_uuyzs_198",
|
|
10
|
+
"is-visual-refresh": "awsui_is-visual-refresh_faqt8_uuyzs_201"
|
|
11
11
|
};
|
|
12
12
|
|
|
@@ -50,9 +50,13 @@ class GridNavigationProcessor {
|
|
|
50
50
|
this._table = null;
|
|
51
51
|
// State
|
|
52
52
|
this.focusedCell = null;
|
|
53
|
+
this.focusInside = false;
|
|
53
54
|
this.keepUserIndex = false;
|
|
54
55
|
this.onRegisterFocusable = (focusableElement) => {
|
|
55
56
|
var _a;
|
|
57
|
+
if (!this.focusInside) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
56
60
|
// When newly registered element belongs to the focused cell the focus must transition to it.
|
|
57
61
|
const focusedElement = (_a = this.focusedCell) === null || _a === void 0 ? void 0 : _a.element;
|
|
58
62
|
if (focusedElement && isTableCell(focusedElement) && focusedElement.contains(focusableElement)) {
|
|
@@ -89,6 +93,7 @@ class GridNavigationProcessor {
|
|
|
89
93
|
};
|
|
90
94
|
this.onFocusin = (event) => {
|
|
91
95
|
var _a;
|
|
96
|
+
this.focusInside = true;
|
|
92
97
|
if (!(event.target instanceof HTMLElement)) {
|
|
93
98
|
return;
|
|
94
99
|
}
|
|
@@ -109,6 +114,9 @@ class GridNavigationProcessor {
|
|
|
109
114
|
this.keepUserIndex = false;
|
|
110
115
|
}
|
|
111
116
|
};
|
|
117
|
+
this.onFocusout = () => {
|
|
118
|
+
this.focusInside = false;
|
|
119
|
+
};
|
|
112
120
|
this.onKeydown = (event) => {
|
|
113
121
|
if (!this.focusedCell) {
|
|
114
122
|
return;
|
|
@@ -159,9 +167,11 @@ class GridNavigationProcessor {
|
|
|
159
167
|
init(table) {
|
|
160
168
|
this._table = table;
|
|
161
169
|
this.table.addEventListener('focusin', this.onFocusin);
|
|
170
|
+
this.table.addEventListener('focusout', this.onFocusout);
|
|
162
171
|
this.table.addEventListener('keydown', this.onKeydown);
|
|
163
172
|
this.cleanup = () => {
|
|
164
173
|
this.table.removeEventListener('focusin', this.onFocusin);
|
|
174
|
+
this.table.removeEventListener('focusout', this.onFocusout);
|
|
165
175
|
this.table.removeEventListener('keydown', this.onKeydown);
|
|
166
176
|
};
|
|
167
177
|
}
|