@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,8 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"root": "
|
|
5
|
-
"hidden": "
|
|
6
|
-
"no-items": "awsui_no-
|
|
4
|
+
"root": "awsui_root_1afi9_jmvlf_141",
|
|
5
|
+
"hidden": "awsui_hidden_1afi9_jmvlf_172",
|
|
6
|
+
"no-items": "awsui_no-items_1afi9_jmvlf_175"
|
|
7
7
|
};
|
|
8
8
|
|
|
@@ -138,7 +138,7 @@
|
|
|
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
|
-
.
|
|
141
|
+
.awsui_root_1afi9_jmvlf_141:not(#\9) {
|
|
142
142
|
border-collapse: separate;
|
|
143
143
|
border-spacing: 0;
|
|
144
144
|
box-sizing: border-box;
|
|
@@ -147,12 +147,9 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
147
147
|
direction: inherit;
|
|
148
148
|
empty-cells: show;
|
|
149
149
|
font-family: serif;
|
|
150
|
-
font-size: medium;
|
|
151
150
|
font-style: normal;
|
|
152
151
|
font-variant: normal;
|
|
153
|
-
font-weight: 400;
|
|
154
152
|
font-stretch: normal;
|
|
155
|
-
line-height: normal;
|
|
156
153
|
-webkit-hyphens: none;
|
|
157
154
|
hyphens: none;
|
|
158
155
|
letter-spacing: normal;
|
|
@@ -173,9 +170,9 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
173
170
|
-webkit-font-smoothing: auto;
|
|
174
171
|
-moz-osx-font-smoothing: auto;
|
|
175
172
|
}
|
|
176
|
-
.
|
|
173
|
+
.awsui_root_1afi9_jmvlf_141:not(#\9):not(.awsui_hidden_1afi9_jmvlf_172) {
|
|
177
174
|
border-block-start: var(--border-divider-list-width-27y3k5, 1px) solid var(--color-border-dropdown-item-default-xiw1xo, #c6c6cd);
|
|
178
175
|
}
|
|
179
|
-
.
|
|
176
|
+
.awsui_root_1afi9_jmvlf_141:not(#\9):not(.awsui_hidden_1afi9_jmvlf_172).awsui_no-items_1afi9_jmvlf_175 {
|
|
180
177
|
border-block-start: var(--border-divider-list-width-27y3k5, 1px) solid var(--color-border-dropdown-item-top-ky64jq, transparent);
|
|
181
178
|
}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"root": "
|
|
6
|
-
"hidden": "
|
|
7
|
-
"no-items": "awsui_no-
|
|
5
|
+
"root": "awsui_root_1afi9_jmvlf_141",
|
|
6
|
+
"hidden": "awsui_hidden_1afi9_jmvlf_172",
|
|
7
|
+
"no-items": "awsui_no-items_1afi9_jmvlf_175"
|
|
8
8
|
};
|
|
9
9
|
|
|
@@ -138,7 +138,7 @@
|
|
|
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
|
-
.
|
|
141
|
+
.awsui_root_vrgzu_wt52j_141:not(#\9) {
|
|
142
142
|
border-collapse: separate;
|
|
143
143
|
border-spacing: 0;
|
|
144
144
|
box-sizing: border-box;
|
|
@@ -147,12 +147,9 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
147
147
|
direction: inherit;
|
|
148
148
|
empty-cells: show;
|
|
149
149
|
font-family: serif;
|
|
150
|
-
font-size: medium;
|
|
151
150
|
font-style: normal;
|
|
152
151
|
font-variant: normal;
|
|
153
|
-
font-weight: 400;
|
|
154
152
|
font-stretch: normal;
|
|
155
|
-
line-height: normal;
|
|
156
153
|
-webkit-hyphens: none;
|
|
157
154
|
hyphens: none;
|
|
158
155
|
letter-spacing: normal;
|
|
@@ -177,6 +174,6 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
177
174
|
padding-inline: var(--space-field-horizontal-gg19kw, 12px);
|
|
178
175
|
color: var(--color-text-dropdown-footer-1jyb4n, #656871);
|
|
179
176
|
}
|
|
180
|
-
.
|
|
177
|
+
.awsui_root_vrgzu_wt52j_141 > .awsui_recovery_vrgzu_wt52j_176:not(#\9) {
|
|
181
178
|
/* used in test-utils */
|
|
182
179
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"root": "
|
|
6
|
-
"recovery": "
|
|
5
|
+
"root": "awsui_root_vrgzu_wt52j_141",
|
|
6
|
+
"recovery": "awsui_recovery_vrgzu_wt52j_176"
|
|
7
7
|
};
|
|
8
8
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export declare function isFocusable(element: HTMLElement): boolean;
|
|
2
2
|
export declare function getAllFocusables(container: HTMLElement): HTMLElement[];
|
|
3
|
-
export declare function getFocusables(container: HTMLElement): HTMLElement[];
|
|
4
3
|
export declare function getFirstFocusable(container: HTMLElement): null | HTMLElement;
|
|
5
4
|
export declare function getLastFocusable(container: HTMLElement): null | HTMLElement;
|
|
6
5
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/focus-lock/utils.ts"],"names":[],"mappings":"AA2BA,wBAAgB,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAEzD;AAED,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,WAAW,GAAG,WAAW,EAAE,CAEtE;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/focus-lock/utils.ts"],"names":[],"mappings":"AA2BA,wBAAgB,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAEzD;AAED,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,WAAW,GAAG,WAAW,EAAE,CAEtE;AAMD,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,WAAW,GAAG,IAAI,GAAG,WAAW,CAG5E;AAED,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,WAAW,GAAG,IAAI,GAAG,WAAW,CAG3E"}
|
|
@@ -25,7 +25,7 @@ export function isFocusable(element) {
|
|
|
25
25
|
export function getAllFocusables(container) {
|
|
26
26
|
return Array.prototype.slice.call(container.querySelectorAll(tabbables));
|
|
27
27
|
}
|
|
28
|
-
|
|
28
|
+
function getFocusables(container) {
|
|
29
29
|
return getAllFocusables(container).filter((element) => element.tabIndex !== -1);
|
|
30
30
|
}
|
|
31
31
|
export function getFirstFocusable(container) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../src/internal/components/focus-lock/utils.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,aAAa;AACb,+GAA+G;AAC/G,MAAM,SAAS,GAAG;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,kBAAkB;IAClB,eAAe;IAEf,SAAS;IACT,YAAY;IAEZ,SAAS;IACT,QAAQ;IACR,QAAQ;IACR,OAAO;IAEP,iBAAiB;IACjB,iBAAiB;IAEjB,YAAY;IACZ,mBAAmB;IACnB,aAAa;CACd,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEZ,MAAM,UAAU,WAAW,CAAC,OAAoB;IAC9C,OAAO,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,SAAsB;IACrD,OAAO,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC;AAC3E,CAAC;AAED,
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../src/internal/components/focus-lock/utils.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AAEtC,aAAa;AACb,+GAA+G;AAC/G,MAAM,SAAS,GAAG;IAChB,gBAAgB;IAChB,gBAAgB;IAChB,kBAAkB;IAClB,eAAe;IAEf,SAAS;IACT,YAAY;IAEZ,SAAS;IACT,QAAQ;IACR,QAAQ;IACR,OAAO;IAEP,iBAAiB;IACjB,iBAAiB;IAEjB,YAAY;IACZ,mBAAmB;IACnB,aAAa;CACd,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEZ,MAAM,UAAU,WAAW,CAAC,OAAoB;IAC9C,OAAO,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AACpC,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,SAAsB;IACrD,OAAO,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC;AAC3E,CAAC;AAED,SAAS,aAAa,CAAC,SAAsB;IAC3C,OAAO,gBAAgB,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,OAAoB,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC;AAC/F,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,SAAsB;;IACtD,MAAM,UAAU,GAAG,aAAa,CAAC,SAAS,CAAC,CAAC;IAC5C,OAAO,MAAA,UAAU,CAAC,CAAC,CAAC,mCAAI,IAAI,CAAC;AAC/B,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,SAAsB;;IACrD,MAAM,UAAU,GAAG,aAAa,CAAC,SAAS,CAAC,CAAC;IAC5C,OAAO,MAAA,UAAU,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,mCAAI,IAAI,CAAC;AACnD,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\n\n// Credits to\n// https://github.com/theKashey/focus-lock/blob/33f8b4bd9675d2605b15e2e4015b77fe35fbd6d0/src/utils/tabbables.ts\nconst tabbables = [\n 'button:enabled',\n 'select:enabled',\n 'textarea:enabled',\n 'input:enabled',\n\n 'a[href]',\n 'area[href]',\n\n 'summary',\n 'iframe',\n 'object',\n 'embed',\n\n 'audio[controls]',\n 'video[controls]',\n\n '[tabindex]',\n '[contenteditable]',\n '[autofocus]',\n].join(',');\n\nexport function isFocusable(element: HTMLElement): boolean {\n return element.matches(tabbables);\n}\n\nexport function getAllFocusables(container: HTMLElement): HTMLElement[] {\n return Array.prototype.slice.call(container.querySelectorAll(tabbables));\n}\n\nfunction getFocusables(container: HTMLElement): HTMLElement[] {\n return getAllFocusables(container).filter((element: HTMLElement) => element.tabIndex !== -1);\n}\n\nexport function getFirstFocusable(container: HTMLElement): null | HTMLElement {\n const focusables = getFocusables(container);\n return focusables[0] ?? null;\n}\n\nexport function getLastFocusable(container: HTMLElement): null | HTMLElement {\n const focusables = getFocusables(container);\n return focusables[focusables.length - 1] ?? null;\n}\n"]}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MaskedInputProps } from './interfaces';
|
|
3
|
-
import useMask from './use-mask';
|
|
4
3
|
declare const MaskedInput: React.ForwardRefExoticComponent<MaskedInputProps & React.RefAttributes<MaskedInputProps.Ref>>;
|
|
5
|
-
export { MaskedInputProps
|
|
4
|
+
export { MaskedInputProps };
|
|
6
5
|
export default MaskedInput;
|
|
7
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/masked-input/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAO9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/masked-input/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAO9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAIhD,QAAA,MAAM,WAAW,+FAkDhB,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAC5B,eAAe,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/internal/components/masked-input/index.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAO,eAAe,EAAE,QAAQ,EAA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B;KAC/B,CAAC,EAXI,EAAE,OAAO,OAWb,EAXkB,SAAS,cAAvB,WAAyB,CAW7B,CAAC;IAEH,MAAM,UAAU,+DAAQ,IAAI,GAAK,SAAS,GAAK,gBAAgB,GAAK,SAAS,CAAE,CAAC;IAChF,MAAM,SAAS,GAAG,YAAY,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;IAC9C,OAAO,CACL,oBAAC,aAAa,oBACR,UAAU,IACd,GAAG,EAAE,SAAS,EACd,kBAAkB,EAAE;YAClB,OAAO;SACR,IACD,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAGF,eAAe,WAAW,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { Ref, useLayoutEffect, useState } from 'react';\n\nimport InternalInput from '../../../input/internal';\nimport { getBaseProps } from '../../base-component';\nimport { useFormFieldContext } from '../../context/form-field-context';\nimport { fireCancelableEvent, fireNonCancelableEvent } from '../../events';\nimport { useMergeRefs } from '../../hooks/use-merge-refs';\nimport { MaskedInputProps } from './interfaces';\nimport useMask from './use-mask';\nimport MaskFormat from './utils/mask-format';\n\nconst MaskedInput = React.forwardRef(\n (\n {\n value,\n onBlur,\n onChange,\n onKeyDown,\n mask,\n autofix = false,\n disableAutocompleteOnBlur = false,\n ...rest\n }: MaskedInputProps,\n ref: Ref<MaskedInputProps.Ref>\n ) => {\n const baseProps = getBaseProps(rest);\n const formFieldContext = useFormFieldContext(rest);\n const inputRef = React.useRef<HTMLInputElement>(null);\n const [cursorPosition, setCursorPosition] = useState<number | null>(null);\n\n useLayoutEffect(() => {\n if (cursorPosition !== null) {\n inputRef.current?.setSelectionRange(cursorPosition, cursorPosition);\n }\n }, [cursorPosition, inputRef]);\n\n const { onPaste, ...maskProps } = useMask({\n format: new MaskFormat(mask),\n value,\n inputRef,\n autofix,\n disableAutocompleteOnBlur,\n onChange: (value: string) => !rest.readOnly && fireNonCancelableEvent(onChange, { value }),\n onKeyDown: (event: CustomEvent) =>\n !rest.readOnly && onKeyDown && fireCancelableEvent(onKeyDown, event.detail, event),\n onBlur: () => fireNonCancelableEvent(onBlur),\n setPosition: setCursorPosition,\n });\n\n const inputProps = { ...rest, ...baseProps, ...formFieldContext, ...maskProps };\n const mergedRef = useMergeRefs(ref, inputRef);\n return (\n <InternalInput\n {...inputProps}\n ref={mergedRef}\n __nativeAttributes={{\n onPaste,\n }}\n />\n );\n }\n);\n\nexport { MaskedInputProps };\nexport default MaskedInput;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mask-format.d.ts","sourceRoot":"","sources":["../../../../../../src/internal/components/masked-input/utils/mask-format.ts"],"names":[],"mappings":"AAKA,UAAU,aAAa;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC,CAAC;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAQD,MAAM,WAAW,QAAQ;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAChC,QAAQ,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;CAChC;AAED,
|
|
1
|
+
{"version":3,"file":"mask-format.d.ts","sourceRoot":"","sources":["../../../../../../src/internal/components/masked-input/utils/mask-format.ts"],"names":[],"mappings":"AAKA,UAAU,aAAa;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC,CAAC;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAQD,MAAM,WAAW,QAAQ;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,KAAK,CAAC,MAAM,C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ils/strings';\nimport { insertAt } from './strings';\n\ninterface FormatSegment {\n min: number;\n max: number | ((value: string) => number);\n length: number;\n default?: number;\n}\n\ninterface FormatSegmentFull extends FormatSegment {\n start: number;\n max(value: string): number;\n end: number;\n}\n\nexport interface MaskArgs {\n separator: string;\n inputSeparators?: Array<string>;\n segments: Array<FormatSegment>;\n}\n\nexport interface ChangeResult {\n value: string;\n position: number;\n}\n\nclass MaskFormat {\n separator: string;\n private inputSeparators: Array<string>;\n private segments: Array<FormatSegmentFull>;\n private positionFormats = new Map<number, FormatSegmentFull>();\n\n constructor({ separator, inputSeparators = [], segments }: MaskArgs) {\n this.segments = [];\n this.separator = separator;\n\n this.inputSeparators = [...inputSeparators, separator];\n this.enrichSegmentDefinitions(segments);\n }\n\n tryAppendSeparator(value: string) {\n const withSeparator = `${value}${this.separator}`;\n return this.isValid(withSeparator) ? withSeparator : value;\n }\n\n isSeparator(key: string): boolean {\n return this.inputSeparators.indexOf(key) !== -1;\n }\n\n isValid(value: string): boolean {\n const inputSegments = value.split(this.separator);\n\n if (inputSegments.length > this.segments.length) {\n return false;\n }\n\n return inputSegments.every((segmentValue, i) => {\n const segment = this.segments[i];\n\n // disallow empty segments\n if (segmentValue === '') {\n // except empty last segment (e.g. trailing separator \"12:\")\n if (i === inputSegments.length - 1) {\n return true;\n } else {\n return false;\n }\n }\n // only allow numerals\n if (!segmentValue.match(/^\\d+$/)) {\n return false;\n }\n // disallow incomplete segments, except at end\n if (segmentValue.length < segment.length && i !== inputSegments.length - 1) {\n return false;\n }\n // limit numerical value\n const intValue = parseInt(segmentValue, 10);\n\n // Handles values padded with 0s that are lost during parsing\n if (segmentValue.length > segment.length) {\n return false;\n }\n\n if (intValue < segment.min || intValue > segment.max(value)) {\n // allow incomplete segments in final position\n if (i === inputSegments.length - 1 && segmentValue.length < segment.length) {\n return true;\n }\n return false;\n }\n return true;\n });\n }\n\n getValidValue(value: string): string {\n let validValue = value;\n\n do {\n if (this.isValid(validValue)) {\n return this.tryAppendSeparator(validValue);\n }\n\n validValue = validValue.substring(0, validValue.length - 1);\n } while (validValue.length > 0);\n\n return '';\n }\n\n autoComplete(value: string): string {\n // aka [...completeSegments, lastSegment] = value.split(':')\n // but that's not valid :/\n const [lastSegmentValue, ...completeSegmentValues] = value.split(this.separator).reverse();\n const lastSegment = this.segments[completeSegmentValues.length];\n\n // if the last segment isn't complete, pad it with a preceding 0\n // e.g. 10:1 -> 10:01\n const paddedLastSegmentValue = this.padWithDefaultValue(lastSegmentValue, lastSegment);\n\n // recombine, and pad with extra segments for the full format\n const partial = [...completeSegmentValues.reverse(), paddedLastSegmentValue];\n while (partial.length < this.segments.length) {\n const nextSegment = this.segments[partial.length];\n const segmentValue = this.padWithDefaultValue('', nextSegment);\n partial.push(segmentValue);\n }\n value = partial.join(this.separator);\n value = this.correctMinMaxValues(value);\n return value;\n }\n\n getSegmentValueWithAddition(position: number, value: string, enteredDigit: string) {\n const segment = this.positionFormats.get(position)!;\n const segmentValue = value.substr(segment.start, segment.length);\n const segmentPosition = position - segment.start;\n const newValue = insertAt(segmentValue, enteredDigit, segmentPosition, segmentPosition + 1);\n return parseInt(newValue, 10);\n }\n\n replaceDigitsWithZeroes(value: string, cursorStart: number, cursorEnd: number): ChangeResult {\n const position = this.isCursorAtSeparator(cursorStart) ? cursorStart + 1 : cursorStart;\n\n // move selection forwards if it starts with a separator\n if (this.isCursorAtSeparator(cursorStart)) {\n cursorStart++;\n }\n\n // first, insert zeros in a partial segment at beginning of selection\n if (!this.isSegmentStart(cursorStart)) {\n const segment = this.positionFormats.get(cursorStart)!;\n value = insertAt(value, padLeftZeros('', segment.end - cursorStart), cursorStart, segment.end);\n cursorStart = segment.end + 1;\n }\n\n // then loop through remaining segments, filling with zeros\n let currentSegment: FormatSegmentFull;\n while (cursorStart < cursorEnd && (currentSegment = this.positionFormats.get(cursorStart + 1)!)) {\n const insertionEnd = Math.min(cursorEnd, currentSegment.end);\n value = insertAt(\n value,\n padLeftZeros('', insertionEnd - currentSegment.start),\n currentSegment.start,\n insertionEnd\n );\n cursorStart = insertionEnd + 1;\n }\n\n value = this.correctMinMaxValues(value);\n\n return {\n value,\n position,\n };\n }\n\n handleSeparatorInput(value: string, position: number): ChangeResult | void {\n if (position === value.length && !this.isSegmentStart(position)) {\n const segment = this.positionFormats.get(position)!;\n let segmentValue = value.substr(segment.start, segment.length);\n segmentValue = this.padWithDefaultValue(segmentValue, segment);\n value = insertAt(value, segmentValue, segment.start, segment.end);\n value = this.correctMinMaxValues(value);\n return {\n value,\n position: value.length,\n };\n }\n }\n\n isCursorAtSeparator(position: number) {\n return 0 < position && position < this.getMaxLength() && this.positionFormats.get(position) === undefined;\n }\n\n isSegmentStart(position: number) {\n return position === 0 || this.isCursorAtSeparator(position - 1);\n }\n\n getSegmentMaxValue(value: string, position: number): number {\n return this.positionFormats.get(position)!.max(value);\n }\n\n getSegmentMinValue(value: string, position: number): number {\n return this.positionFormats.get(position)!.min;\n }\n\n getMaxLength() {\n const last = this.segments[this.segments.length - 1];\n return last.start + last.length;\n }\n\n deleteSeparator(value: string, position: number): ChangeResult {\n value = insertAt(value, '0', position - 2, position - 1);\n\n return {\n value: this.correctMinMaxValues(value),\n position: position - 2,\n };\n }\n\n deleteDigit(value: string, position: number): ChangeResult {\n value = insertAt(value, '0', position - 1, position);\n\n // 23:59|: => backspace => 23:5|\n const length = value.length;\n if (value.slice(length - 2) === '0:') {\n value = value.slice(0, length - 2);\n }\n\n return {\n value: this.correctMinMaxValues(value),\n position: position - 1,\n };\n }\n\n correctMinMaxValues(value: string): string {\n let segment = this.positionFormats.get(0);\n while (segment && value.length >= segment.end) {\n const segmentValue = parseInt(value.substr(segment.start, segment.length), 10);\n const segmentMax = segment.max(value);\n if (segmentValue < segment.min) {\n let toInsert = segment.min.toFixed();\n toInsert = padLeftZeros(toInsert, segment.length);\n value = insertAt(value, toInsert, segment.start, segment.end);\n }\n if (segmentValue > segmentMax) {\n value = insertAt(value, segmentMax.toFixed(), segment.start, segment.end);\n }\n segment = this.positionFormats.get(segment.end + 1);\n }\n return value.substr(0, this.segments[this.segments.length - 1].end);\n }\n\n formatPastedText(text: string, value: string, cursorStart: number, cursorEnd: number): string {\n const keyArr = text.trim().split('');\n\n let position = cursorStart;\n\n let formattedValue = value;\n // if a selection range captures the end of the current value\n // we replace it with the value in buffer even if the value in buffer is shorter\n if (cursorEnd > cursorStart && cursorEnd === value.length) {\n formattedValue = value.slice(0, cursorStart);\n }\n\n for (const key of keyArr) {\n if (position >= this.getMaxLength()) {\n break;\n }\n\n const result = this.processKey(formattedValue, key, position);\n formattedValue = result.value;\n position = result.position;\n }\n\n return this.tryAppendSeparator(formattedValue);\n }\n\n processKey(initialValue: string, key: string, initialPosition: number) {\n let value = initialValue;\n let position = initialPosition;\n\n if (this.isSeparator(key)) {\n const result = this.handleSeparatorInput(value, position);\n if (result) {\n value = result.value;\n position = result.position;\n }\n } else {\n const isCursorAtEnd = position === value.length;\n const segmentValue = this.getSegmentValueWithAddition(position, value, key);\n const segmentMaxValue = this.getSegmentMaxValue(value, position);\n const segmentMinValue = this.getSegmentMinValue(value, position);\n const firstDigitGreater = parseInt(key, 10) > parseInt(segmentMaxValue.toFixed()[0], 10);\n const isValidPosition = isCursorAtEnd || segmentValue.toFixed().length === 1;\n const exceedsMaxAtSegmentStart = this.isSegmentStart(position) && isValidPosition && firstDigitGreater;\n\n if (exceedsMaxAtSegmentStart) {\n // 22:| => Enter '9' => 22:09|\n // |1 => Enter '9' => 09|\n value = insertAt(value, `0${key}`, position, position + 2);\n position += 2;\n } else if (segmentValue > segmentMaxValue && this.isSegmentStart(position)) {\n // 22:|22 => Enter '9' => 22:59|\n value = insertAt(value, segmentMaxValue.toFixed(), position, position + segmentMaxValue.toFixed().length);\n position += segmentMaxValue.toFixed().length;\n } else if (segmentValue > segmentMaxValue) {\n // 2|2:22 => Enter '9' => 23:|22\n value = insertAt(value, segmentMaxValue.toFixed(), position - 1, position + 1);\n position += 1;\n } else if (segmentValue < segmentMinValue && !this.isSegmentStart(position)) {\n // 0| => enter '0' => 01:\n value = insertAt(value, segmentMinValue.toFixed(), position, position + 1);\n position += 1;\n } else {\n // 22:| => Enter '5' => 23:5|\n value = insertAt(value, key, position, position + 1);\n position += 1;\n }\n }\n\n value = this.tryAppendSeparator(value);\n\n // Move cursor in front of separator if behind after overwriting a character\n if (this.isCursorAtSeparator(position)) {\n position++;\n }\n\n return { value, position };\n }\n\n private padWithDefaultValue(segmentValue: string, segment: FormatSegmentFull) {\n let defaultValue = (segment.default || segment.min).toFixed();\n defaultValue = padLeftZeros(defaultValue, segment.length);\n return insertAt(defaultValue, segmentValue, segment.length - segmentValue.length, segment.length);\n }\n\n private enrichSegmentDefinitions(segments: FormatSegment[]) {\n this.positionFormats = new Map();\n this.segments = [];\n let position = 0;\n for (const segment of segments) {\n const max = segment.max;\n const fullSegment: FormatSegmentFull = {\n ...segment,\n max: typeof max === 'number' ? () => max : max,\n start: position,\n end: position + segment.length,\n };\n this.segments.push(fullSegment);\n // insert this format segment for every char in the max value\n for (let j = 0; j < fullSegment.length; j++) {\n this.positionFormats.set(position++, fullSegment);\n }\n // skip a position for separator\n position++;\n }\n }\n}\n\nexport default MaskFormat;\n"]}
|
|
1
|
+
{"version":3,"file":"mask-format.js","sourceRoot":"","sources":["../../../../../../src/internal/components/masked-input/utils/mask-format.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AA0BrC,MAAM,UAAU;IAMd,YAAY,EAAE,SAAS,EAAE,eAAe,GAAG,EAAE,EAAE,QAAQ,EAAY;QAF3D,oBAAe,GAAG,IAAI,GAAG,EAA6B,CAAC;QAG7D,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QACnB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAE3B,IAAI,CAAC,eAAe,GAAG,CAAC,GA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AAE,CAAC,GAAG,WAAW,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBAC3C,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,WAAW,CAAC,CAAC;aACnD;YACD,gCAAgC;YAChC,QAAQ,EAAE,CAAC;SACZ;IACH,CAAC;CACF;AAED,eAAe,UAAU,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { padLeftZeros } from '../../../utils/strings';\nimport { insertAt } from './strings';\n\ninterface FormatSegment {\n min: number;\n max: number | ((value: string) => number);\n length: number;\n default?: number;\n}\n\ninterface FormatSegmentFull extends FormatSegment {\n start: number;\n max(value: string): number;\n end: number;\n}\n\nexport interface MaskArgs {\n separator: string;\n inputSeparators?: Array<string>;\n segments: Array<FormatSegment>;\n}\n\ninterface ChangeResult {\n value: string;\n position: number;\n}\n\nclass MaskFormat {\n separator: string;\n private inputSeparators: Array<string>;\n private segments: Array<FormatSegmentFull>;\n private positionFormats = new Map<number, FormatSegmentFull>();\n\n constructor({ separator, inputSeparators = [], segments }: MaskArgs) {\n this.segments = [];\n this.separator = separator;\n\n this.inputSeparators = [...inputSeparators, separator];\n this.enrichSegmentDefinitions(segments);\n }\n\n tryAppendSeparator(value: string) {\n const withSeparator = `${value}${this.separator}`;\n return this.isValid(withSeparator) ? withSeparator : value;\n }\n\n isSeparator(key: string): boolean {\n return this.inputSeparators.indexOf(key) !== -1;\n }\n\n isValid(value: string): boolean {\n const inputSegments = value.split(this.separator);\n\n if (inputSegments.length > this.segments.length) {\n return false;\n }\n\n return inputSegments.every((segmentValue, i) => {\n const segment = this.segments[i];\n\n // disallow empty segments\n if (segmentValue === '') {\n // except empty last segment (e.g. trailing separator \"12:\")\n if (i === inputSegments.length - 1) {\n return true;\n } else {\n return false;\n }\n }\n // only allow numerals\n if (!segmentValue.match(/^\\d+$/)) {\n return false;\n }\n // disallow incomplete segments, except at end\n if (segmentValue.length < segment.length && i !== inputSegments.length - 1) {\n return false;\n }\n // limit numerical value\n const intValue = parseInt(segmentValue, 10);\n\n // Handles values padded with 0s that are lost during parsing\n if (segmentValue.length > segment.length) {\n return false;\n }\n\n if (intValue < segment.min || intValue > segment.max(value)) {\n // allow incomplete segments in final position\n if (i === inputSegments.length - 1 && segmentValue.length < segment.length) {\n return true;\n }\n return false;\n }\n return true;\n });\n }\n\n getValidValue(value: string): string {\n let validValue = value;\n\n do {\n if (this.isValid(validValue)) {\n return this.tryAppendSeparator(validValue);\n }\n\n validValue = validValue.substring(0, validValue.length - 1);\n } while (validValue.length > 0);\n\n return '';\n }\n\n autoComplete(value: string): string {\n // aka [...completeSegments, lastSegment] = value.split(':')\n // but that's not valid :/\n const [lastSegmentValue, ...completeSegmentValues] = value.split(this.separator).reverse();\n const lastSegment = this.segments[completeSegmentValues.length];\n\n // if the last segment isn't complete, pad it with a preceding 0\n // e.g. 10:1 -> 10:01\n const paddedLastSegmentValue = this.padWithDefaultValue(lastSegmentValue, lastSegment);\n\n // recombine, and pad with extra segments for the full format\n const partial = [...completeSegmentValues.reverse(), paddedLastSegmentValue];\n while (partial.length < this.segments.length) {\n const nextSegment = this.segments[partial.length];\n const segmentValue = this.padWithDefaultValue('', nextSegment);\n partial.push(segmentValue);\n }\n value = partial.join(this.separator);\n value = this.correctMinMaxValues(value);\n return value;\n }\n\n getSegmentValueWithAddition(position: number, value: string, enteredDigit: string) {\n const segment = this.positionFormats.get(position)!;\n const segmentValue = value.substr(segment.start, segment.length);\n const segmentPosition = position - segment.start;\n const newValue = insertAt(segmentValue, enteredDigit, segmentPosition, segmentPosition + 1);\n return parseInt(newValue, 10);\n }\n\n replaceDigitsWithZeroes(value: string, cursorStart: number, cursorEnd: number): ChangeResult {\n const position = this.isCursorAtSeparator(cursorStart) ? cursorStart + 1 : cursorStart;\n\n // move selection forwards if it starts with a separator\n if (this.isCursorAtSeparator(cursorStart)) {\n cursorStart++;\n }\n\n // first, insert zeros in a partial segment at beginning of selection\n if (!this.isSegmentStart(cursorStart)) {\n const segment = this.positionFormats.get(cursorStart)!;\n value = insertAt(value, padLeftZeros('', segment.end - cursorStart), cursorStart, segment.end);\n cursorStart = segment.end + 1;\n }\n\n // then loop through remaining segments, filling with zeros\n let currentSegment: FormatSegmentFull;\n while (cursorStart < cursorEnd && (currentSegment = this.positionFormats.get(cursorStart + 1)!)) {\n const insertionEnd = Math.min(cursorEnd, currentSegment.end);\n value = insertAt(\n value,\n padLeftZeros('', insertionEnd - currentSegment.start),\n currentSegment.start,\n insertionEnd\n );\n cursorStart = insertionEnd + 1;\n }\n\n value = this.correctMinMaxValues(value);\n\n return {\n value,\n position,\n };\n }\n\n handleSeparatorInput(value: string, position: number): ChangeResult | void {\n if (position === value.length && !this.isSegmentStart(position)) {\n const segment = this.positionFormats.get(position)!;\n let segmentValue = value.substr(segment.start, segment.length);\n segmentValue = this.padWithDefaultValue(segmentValue, segment);\n value = insertAt(value, segmentValue, segment.start, segment.end);\n value = this.correctMinMaxValues(value);\n return {\n value,\n position: value.length,\n };\n }\n }\n\n isCursorAtSeparator(position: number) {\n return 0 < position && position < this.getMaxLength() && this.positionFormats.get(position) === undefined;\n }\n\n isSegmentStart(position: number) {\n return position === 0 || this.isCursorAtSeparator(position - 1);\n }\n\n getSegmentMaxValue(value: string, position: number): number {\n return this.positionFormats.get(position)!.max(value);\n }\n\n getSegmentMinValue(value: string, position: number): number {\n return this.positionFormats.get(position)!.min;\n }\n\n getMaxLength() {\n const last = this.segments[this.segments.length - 1];\n return last.start + last.length;\n }\n\n deleteSeparator(value: string, position: number): ChangeResult {\n value = insertAt(value, '0', position - 2, position - 1);\n\n return {\n value: this.correctMinMaxValues(value),\n position: position - 2,\n };\n }\n\n deleteDigit(value: string, position: number): ChangeResult {\n value = insertAt(value, '0', position - 1, position);\n\n // 23:59|: => backspace => 23:5|\n const length = value.length;\n if (value.slice(length - 2) === '0:') {\n value = value.slice(0, length - 2);\n }\n\n return {\n value: this.correctMinMaxValues(value),\n position: position - 1,\n };\n }\n\n correctMinMaxValues(value: string): string {\n let segment = this.positionFormats.get(0);\n while (segment && value.length >= segment.end) {\n const segmentValue = parseInt(value.substr(segment.start, segment.length), 10);\n const segmentMax = segment.max(value);\n if (segmentValue < segment.min) {\n let toInsert = segment.min.toFixed();\n toInsert = padLeftZeros(toInsert, segment.length);\n value = insertAt(value, toInsert, segment.start, segment.end);\n }\n if (segmentValue > segmentMax) {\n value = insertAt(value, segmentMax.toFixed(), segment.start, segment.end);\n }\n segment = this.positionFormats.get(segment.end + 1);\n }\n return value.substr(0, this.segments[this.segments.length - 1].end);\n }\n\n formatPastedText(text: string, value: string, cursorStart: number, cursorEnd: number): string {\n const keyArr = text.trim().split('');\n\n let position = cursorStart;\n\n let formattedValue = value;\n // if a selection range captures the end of the current value\n // we replace it with the value in buffer even if the value in buffer is shorter\n if (cursorEnd > cursorStart && cursorEnd === value.length) {\n formattedValue = value.slice(0, cursorStart);\n }\n\n for (const key of keyArr) {\n if (position >= this.getMaxLength()) {\n break;\n }\n\n const result = this.processKey(formattedValue, key, position);\n formattedValue = result.value;\n position = result.position;\n }\n\n return this.tryAppendSeparator(formattedValue);\n }\n\n processKey(initialValue: string, key: string, initialPosition: number) {\n let value = initialValue;\n let position = initialPosition;\n\n if (this.isSeparator(key)) {\n const result = this.handleSeparatorInput(value, position);\n if (result) {\n value = result.value;\n position = result.position;\n }\n } else {\n const isCursorAtEnd = position === value.length;\n const segmentValue = this.getSegmentValueWithAddition(position, value, key);\n const segmentMaxValue = this.getSegmentMaxValue(value, position);\n const segmentMinValue = this.getSegmentMinValue(value, position);\n const firstDigitGreater = parseInt(key, 10) > parseInt(segmentMaxValue.toFixed()[0], 10);\n const isValidPosition = isCursorAtEnd || segmentValue.toFixed().length === 1;\n const exceedsMaxAtSegmentStart = this.isSegmentStart(position) && isValidPosition && firstDigitGreater;\n\n if (exceedsMaxAtSegmentStart) {\n // 22:| => Enter '9' => 22:09|\n // |1 => Enter '9' => 09|\n value = insertAt(value, `0${key}`, position, position + 2);\n position += 2;\n } else if (segmentValue > segmentMaxValue && this.isSegmentStart(position)) {\n // 22:|22 => Enter '9' => 22:59|\n value = insertAt(value, segmentMaxValue.toFixed(), position, position + segmentMaxValue.toFixed().length);\n position += segmentMaxValue.toFixed().length;\n } else if (segmentValue > segmentMaxValue) {\n // 2|2:22 => Enter '9' => 23:|22\n value = insertAt(value, segmentMaxValue.toFixed(), position - 1, position + 1);\n position += 1;\n } else if (segmentValue < segmentMinValue && !this.isSegmentStart(position)) {\n // 0| => enter '0' => 01:\n value = insertAt(value, segmentMinValue.toFixed(), position, position + 1);\n position += 1;\n } else {\n // 22:| => Enter '5' => 23:5|\n value = insertAt(value, key, position, position + 1);\n position += 1;\n }\n }\n\n value = this.tryAppendSeparator(value);\n\n // Move cursor in front of separator if behind after overwriting a character\n if (this.isCursorAtSeparator(position)) {\n position++;\n }\n\n return { value, position };\n }\n\n private padWithDefaultValue(segmentValue: string, segment: FormatSegmentFull) {\n let defaultValue = (segment.default || segment.min).toFixed();\n defaultValue = padLeftZeros(defaultValue, segment.length);\n return insertAt(defaultValue, segmentValue, segment.length - segmentValue.length, segment.length);\n }\n\n private enrichSegmentDefinitions(segments: FormatSegment[]) {\n this.positionFormats = new Map();\n this.segments = [];\n let position = 0;\n for (const segment of segments) {\n const max = segment.max;\n const fullSegment: FormatSegmentFull = {\n ...segment,\n max: typeof max === 'number' ? () => max : max,\n start: position,\n end: position + segment.length,\n };\n this.segments.push(fullSegment);\n // insert this format segment for every char in the max value\n for (let j = 0; j < fullSegment.length; j++) {\n this.positionFormats.set(position++, fullSegment);\n }\n // skip a position for separator\n position++;\n }\n }\n}\n\nexport default MaskFormat;\n"]}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"button": "
|
|
5
|
-
"expanded": "
|
|
6
|
-
"offset-right-none": "awsui_offset-right-
|
|
7
|
-
"offset-right-l": "awsui_offset-right-
|
|
8
|
-
"offset-right-xxl": "awsui_offset-right-
|
|
9
|
-
"text": "
|
|
10
|
-
"icon": "
|
|
4
|
+
"button": "awsui_button_m5h9f_12y39_141",
|
|
5
|
+
"expanded": "awsui_expanded_m5h9f_12y39_193",
|
|
6
|
+
"offset-right-none": "awsui_offset-right-none_m5h9f_12y39_204",
|
|
7
|
+
"offset-right-l": "awsui_offset-right-l_m5h9f_12y39_207",
|
|
8
|
+
"offset-right-xxl": "awsui_offset-right-xxl_m5h9f_12y39_210",
|
|
9
|
+
"text": "awsui_text_m5h9f_12y39_235",
|
|
10
|
+
"icon": "awsui_icon_m5h9f_12y39_239"
|
|
11
11
|
};
|
|
12
12
|
|
|
@@ -138,7 +138,7 @@
|
|
|
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
|
-
.
|
|
141
|
+
.awsui_button_m5h9f_12y39_141:not(#\9) {
|
|
142
142
|
border-collapse: separate;
|
|
143
143
|
border-spacing: 0;
|
|
144
144
|
box-sizing: border-box;
|
|
@@ -147,12 +147,9 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
147
147
|
direction: inherit;
|
|
148
148
|
empty-cells: show;
|
|
149
149
|
font-family: serif;
|
|
150
|
-
font-size: medium;
|
|
151
150
|
font-style: normal;
|
|
152
151
|
font-variant: normal;
|
|
153
|
-
font-weight: 400;
|
|
154
152
|
font-stretch: normal;
|
|
155
|
-
line-height: normal;
|
|
156
153
|
-webkit-hyphens: none;
|
|
157
154
|
hyphens: none;
|
|
158
155
|
letter-spacing: normal;
|
|
@@ -190,38 +187,38 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
190
187
|
background: transparent;
|
|
191
188
|
color: var(--color-text-interactive-default-tkx8fe, #424650);
|
|
192
189
|
}
|
|
193
|
-
.
|
|
190
|
+
.awsui_button_m5h9f_12y39_141:not(#\9):hover {
|
|
194
191
|
color: var(--color-text-interactive-hover-f9gqs8, #0f141a);
|
|
195
192
|
text-decoration: none;
|
|
196
193
|
}
|
|
197
|
-
.
|
|
194
|
+
.awsui_button_m5h9f_12y39_141:not(#\9):active, .awsui_button_m5h9f_12y39_141.awsui_expanded_m5h9f_12y39_193:not(#\9) {
|
|
198
195
|
background: transparent;
|
|
199
196
|
color: var(--color-text-interactive-active-j6vw94, #0f141a);
|
|
200
197
|
}
|
|
201
|
-
.
|
|
198
|
+
.awsui_button_m5h9f_12y39_141.awsui_expanded_m5h9f_12y39_193:not(#\9) {
|
|
202
199
|
color: var(--color-text-accent-fptgkc, #006ce0);
|
|
203
200
|
}
|
|
204
|
-
.
|
|
201
|
+
.awsui_button_m5h9f_12y39_141:not(#\9):focus {
|
|
205
202
|
outline: none;
|
|
206
203
|
text-decoration: none;
|
|
207
204
|
}
|
|
208
|
-
.
|
|
205
|
+
.awsui_button_m5h9f_12y39_141.awsui_offset-right-none_m5h9f_12y39_204:not(#\9) {
|
|
209
206
|
margin-inline-end: 0;
|
|
210
207
|
}
|
|
211
|
-
.
|
|
208
|
+
.awsui_button_m5h9f_12y39_141.awsui_offset-right-l_m5h9f_12y39_207:not(#\9) {
|
|
212
209
|
margin-inline-end: var(--space-s-34lx8l, 12px);
|
|
213
210
|
}
|
|
214
|
-
.
|
|
211
|
+
.awsui_button_m5h9f_12y39_141.awsui_offset-right-xxl_m5h9f_12y39_210:not(#\9) {
|
|
215
212
|
margin-inline-end: var(--space-xl-lmui9r, 24px);
|
|
216
213
|
}
|
|
217
|
-
body[data-awsui-focus-visible=true] .
|
|
214
|
+
body[data-awsui-focus-visible=true] .awsui_button_m5h9f_12y39_141:not(#\9):focus {
|
|
218
215
|
position: relative;
|
|
219
216
|
}
|
|
220
|
-
body[data-awsui-focus-visible=true] .
|
|
217
|
+
body[data-awsui-focus-visible=true] .awsui_button_m5h9f_12y39_141:not(#\9):focus {
|
|
221
218
|
outline: 2px dotted transparent;
|
|
222
219
|
outline-offset: calc(-1px - 1px);
|
|
223
220
|
}
|
|
224
|
-
body[data-awsui-focus-visible=true] .
|
|
221
|
+
body[data-awsui-focus-visible=true] .awsui_button_m5h9f_12y39_141:not(#\9):focus::before {
|
|
225
222
|
content: " ";
|
|
226
223
|
display: block;
|
|
227
224
|
position: absolute;
|
|
@@ -236,10 +233,10 @@ body[data-awsui-focus-visible=true] .awsui_button_m5h9f_ea0z3_141:not(#\9):focus
|
|
|
236
233
|
box-shadow: 0 0 0 2px var(--color-border-item-focused-nv6mhz, #006ce0);
|
|
237
234
|
}
|
|
238
235
|
|
|
239
|
-
.
|
|
236
|
+
.awsui_text_m5h9f_12y39_235:not(#\9) {
|
|
240
237
|
margin-inline-end: var(--space-xs-zb16t3, 8px);
|
|
241
238
|
}
|
|
242
239
|
|
|
243
|
-
.
|
|
240
|
+
.awsui_icon_m5h9f_12y39_239 + .awsui_text_m5h9f_12y39_235:not(#\9) {
|
|
244
241
|
margin-inline-start: var(--space-xs-zb16t3, 8px);
|
|
245
242
|
}
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"button": "
|
|
6
|
-
"expanded": "
|
|
7
|
-
"offset-right-none": "awsui_offset-right-
|
|
8
|
-
"offset-right-l": "awsui_offset-right-
|
|
9
|
-
"offset-right-xxl": "awsui_offset-right-
|
|
10
|
-
"text": "
|
|
11
|
-
"icon": "
|
|
5
|
+
"button": "awsui_button_m5h9f_12y39_141",
|
|
6
|
+
"expanded": "awsui_expanded_m5h9f_12y39_193",
|
|
7
|
+
"offset-right-none": "awsui_offset-right-none_m5h9f_12y39_204",
|
|
8
|
+
"offset-right-l": "awsui_offset-right-l_m5h9f_12y39_207",
|
|
9
|
+
"offset-right-xxl": "awsui_offset-right-xxl_m5h9f_12y39_210",
|
|
10
|
+
"text": "awsui_text_m5h9f_12y39_235",
|
|
11
|
+
"icon": "awsui_icon_m5h9f_12y39_239"
|
|
12
12
|
};
|
|
13
13
|
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
2
|
+
interface HighlightMatchProps {
|
|
3
3
|
str?: string;
|
|
4
4
|
highlightText?: string;
|
|
5
5
|
}
|
|
6
6
|
export default function HighlightMatch({ str, highlightText }: HighlightMatchProps): JSX.Element;
|
|
7
|
+
export {};
|
|
7
8
|
//# sourceMappingURL=highlight-match.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"highlight-match.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/option/highlight-match.tsx"],"names":[],"mappings":";AAsBA,
|
|
1
|
+
{"version":3,"file":"highlight-match.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/option/highlight-match.tsx"],"names":[],"mappings":";AAsBA,UAAU,mBAAmB;IAC3B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAKD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAAE,GAAG,EAAE,aAAa,EAAE,EAAE,mBAAmB,eAsBjF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"highlight-match.js","sourceRoot":"","sources":["../../../../../src/internal/components/option/highlight-match.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,MAAM,gBAAgB,GAAG,CAAC,GAAW,EAAE,aAAqB,EAAE,EAAE;IAC9D,uEAAuE;IACvE,qEAAqE;IACrE,IAAI,aAAa,CAAC,MAAM,GAAG,MAAM,EAAE;QACjC,OAAO,EAAE,SAAS,EAAE,CAAC,G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EAAE;YACnC,WAAW,CAAC,IAAI,CAAC,oBAAC,SAAS,IAAC,GAAG,EAAE,SAAS,GAAG,EAAE,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,GAAI,CAAC,CAAC;SACzE;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,kCAAO,WAAW,CAAQ,CAAC;AACpC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport styles from './styles.css.js';\n\nconst splitOnFiltering = (str: string, highlightText: string) => {\n // We match by creating a regex using user-provided strings, so we skip\n // highlighting if the generated regex would be too memory intensive.\n if (highlightText.length > 100000) {\n return { noMatches: [str], matches: null };\n }\n\n // Filtering needs to be case insensitive\n const filteringPattern = highlightText.replace(/[-[\\]/{}()*+?.\\\\^$|]/g, '\\\\$&');\n const regexp = new RegExp(filteringPattern, 'gi');\n const noMatches = str.split(regexp);\n const matches = str.match(regexp);\n\n return { noMatches, matches };\n};\n\
|
|
1
|
+
{"version":3,"file":"highlight-match.js","sourceRoot":"","sources":["../../../../../src/internal/components/option/highlight-match.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,MAAM,gBAAgB,GAAG,CAAC,GAAW,EAAE,aAAqB,EAAE,EAAE;IAC9D,uEAAuE;IACvE,qEAAqE;IACrE,IAAI,aAAa,CAAC,MAAM,GAAG,MAAM,EAAE;QACjC,OAAO,EAAE,SAAS,EAAE,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;KAC5C;IAED,yCAAyC;IACzC,MAAM,gBAAgB,GAAG,aAAa,CAAC,OAAO,CAAC,uBAAuB,EAAE,MAAM,CAAC,CAAC;IAChF,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,gBAAgB,EAAE,IAAI,CA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pC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport styles from './styles.css.js';\n\nconst splitOnFiltering = (str: string, highlightText: string) => {\n // We match by creating a regex using user-provided strings, so we skip\n // highlighting if the generated regex would be too memory intensive.\n if (highlightText.length > 100000) {\n return { noMatches: [str], matches: null };\n }\n\n // Filtering needs to be case insensitive\n const filteringPattern = highlightText.replace(/[-[\\]/{}()*+?.\\\\^$|]/g, '\\\\$&');\n const regexp = new RegExp(filteringPattern, 'gi');\n const noMatches = str.split(regexp);\n const matches = str.match(regexp);\n\n return { noMatches, matches };\n};\n\ninterface HighlightMatchProps {\n str?: string;\n highlightText?: string;\n}\n\nconst Highlight = ({ str }: HighlightMatchProps) =>\n str ? <span className={styles['filtering-match-highlight']}>{str}</span> : null;\n\nexport default function HighlightMatch({ str, highlightText }: HighlightMatchProps) {\n if (!str || !highlightText) {\n return <span>{str}</span>;\n }\n\n if (str === highlightText) {\n return <Highlight str={str} />;\n }\n\n const { noMatches, matches } = splitOnFiltering(str, highlightText);\n\n const highlighted: (string | JSX.Element)[] = [];\n\n noMatches.forEach((noMatch, idx) => {\n highlighted.push(<span key={`noMatch-${idx}`}>{noMatch}</span>);\n\n if (matches && idx < matches.length) {\n highlighted.push(<Highlight key={`match-${idx}`} str={matches[idx]} />);\n }\n });\n\n return <span>{highlighted}</span>;\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IconProps } from '../../../icon/interfaces';
|
|
3
3
|
import { BaseComponentProps } from '../../base-component';
|
|
4
|
-
|
|
4
|
+
interface BaseOption {
|
|
5
5
|
value?: string;
|
|
6
6
|
label?: string;
|
|
7
7
|
lang?: string;
|
|
@@ -19,7 +19,7 @@ export interface BaseOption {
|
|
|
19
19
|
export interface OptionDefinition extends BaseOption {
|
|
20
20
|
__labelPrefix?: string;
|
|
21
21
|
}
|
|
22
|
-
|
|
22
|
+
interface InternalOptionDefinition extends OptionDefinition {
|
|
23
23
|
__customIcon?: React.ReactNode;
|
|
24
24
|
}
|
|
25
25
|
export interface OptionGroup extends BaseOption {
|
|
@@ -40,4 +40,5 @@ export interface OptionProps extends BaseComponentProps {
|
|
|
40
40
|
isGroupOption?: boolean;
|
|
41
41
|
isGenericGroup?: boolean;
|
|
42
42
|
}
|
|
43
|
+
export {};
|
|
43
44
|
//# sourceMappingURL=interfaces.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/option/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/option/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,UAAU,UAAU;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC7B,aAAa,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,MAAM,WAAW,gBAAiB,SAAQ,UAAU;IAClD,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,UAAU,wBAAyB,SAAQ,gBAAgB;IACzD,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAChC;AAED,MAAM,WAAW,WAAY,SAAQ,UAAU;IAC7C,OAAO,EAAE,aAAa,CAAC,gBAAgB,CAAC,CAAC;CAC1C;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,gBAAgB,GAAG,WAAW,CAAC;CACxC;AAED,MAAM,WAAW,WAAY,SAAQ,kBAAkB;IACrD,MAAM,CAAC,EAAE,wBAAwB,CAAC;IAClC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../../src/internal/components/option/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { IconProps } from '../../../icon/interfaces';\nimport { BaseComponentProps } from '../../base-component';\n\
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../../../src/internal/components/option/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { IconProps } from '../../../icon/interfaces';\nimport { BaseComponentProps } from '../../base-component';\n\ninterface BaseOption {\n value?: string;\n label?: string;\n lang?: string;\n description?: string;\n disabled?: boolean;\n disabledReason?: string;\n labelTag?: string;\n tags?: ReadonlyArray<string>;\n filteringTags?: ReadonlyArray<string>;\n iconAlt?: string;\n iconName?: IconProps.Name;\n iconUrl?: string;\n iconSvg?: React.ReactNode;\n}\n\nexport interface OptionDefinition extends BaseOption {\n __labelPrefix?: string;\n}\n\ninterface InternalOptionDefinition extends OptionDefinition {\n __customIcon?: React.ReactNode;\n}\n\nexport interface OptionGroup extends BaseOption {\n options: ReadonlyArray<OptionDefinition>;\n}\n\nexport interface DropdownOption {\n type?: string;\n disabled?: boolean;\n disabledReason?: string;\n option: OptionDefinition | OptionGroup;\n}\n\nexport interface OptionProps extends BaseComponentProps {\n option?: InternalOptionDefinition;\n triggerVariant?: boolean;\n highlightText?: string;\n highlightedOption?: boolean;\n selectedOption?: boolean;\n isGroupOption?: boolean;\n isGenericGroup?: boolean;\n}\n"]}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"option": "
|
|
5
|
-
"disabled": "
|
|
6
|
-
"parent": "
|
|
7
|
-
"highlighted": "
|
|
8
|
-
"content": "
|
|
9
|
-
"label-content": "awsui_label-
|
|
10
|
-
"label": "
|
|
11
|
-
"tag": "
|
|
12
|
-
"label-tag": "awsui_label-
|
|
13
|
-
"label-prefix": "awsui_label-
|
|
14
|
-
"tags": "
|
|
15
|
-
"description": "
|
|
16
|
-
"selected": "
|
|
17
|
-
"icon": "
|
|
18
|
-
"icon-size-big": "awsui_icon-size-
|
|
19
|
-
"filtering-match-highlight": "awsui_filtering-match-
|
|
20
|
-
"trigger-variant": "awsui_trigger-
|
|
4
|
+
"option": "awsui_option_1p2cx_17p6o_149",
|
|
5
|
+
"disabled": "awsui_disabled_1p2cx_17p6o_186",
|
|
6
|
+
"parent": "awsui_parent_1p2cx_17p6o_189",
|
|
7
|
+
"highlighted": "awsui_highlighted_1p2cx_17p6o_192",
|
|
8
|
+
"content": "awsui_content_1p2cx_17p6o_196",
|
|
9
|
+
"label-content": "awsui_label-content_1p2cx_17p6o_203",
|
|
10
|
+
"label": "awsui_label_1p2cx_17p6o_203",
|
|
11
|
+
"tag": "awsui_tag_1p2cx_17p6o_210",
|
|
12
|
+
"label-tag": "awsui_label-tag_1p2cx_17p6o_211",
|
|
13
|
+
"label-prefix": "awsui_label-prefix_1p2cx_17p6o_221",
|
|
14
|
+
"tags": "awsui_tags_1p2cx_17p6o_234",
|
|
15
|
+
"description": "awsui_description_1p2cx_17p6o_235",
|
|
16
|
+
"selected": "awsui_selected_1p2cx_17p6o_246",
|
|
17
|
+
"icon": "awsui_icon_1p2cx_17p6o_260",
|
|
18
|
+
"icon-size-big": "awsui_icon-size-big_1p2cx_17p6o_267",
|
|
19
|
+
"filtering-match-highlight": "awsui_filtering-match-highlight_1p2cx_17p6o_271",
|
|
20
|
+
"trigger-variant": "awsui_trigger-variant_1p2cx_17p6o_286"
|
|
21
21
|
};
|
|
22
22
|
|