@cloudscape-design/components-themeable 3.0.1404 → 3.0.1406
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/lib/internal/manifest.json +1 -1
- package/lib/internal/scss/action-card/styles.scss +7 -13
- package/lib/internal/scss/autosuggest/styles.scss +1 -1
- package/lib/internal/scss/button/styles.scss +5 -1
- package/lib/internal/scss/button-dropdown/category-elements/styles.scss +1 -0
- package/lib/internal/scss/button-dropdown/styles.scss +1 -1
- package/lib/internal/scss/button-group/styles.scss +1 -1
- package/lib/internal/scss/container/styles.scss +5 -26
- package/lib/internal/scss/dropdown/styles.scss +1 -11
- package/lib/internal/scss/flashbar/collapsible.scss +1 -5
- package/lib/internal/scss/flashbar/styles.scss +2 -10
- package/lib/internal/scss/input/styles.scss +2 -3
- package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +179 -178
- package/lib/internal/scss/internal/styles/forms/mixins.scss +2 -2
- package/lib/internal/scss/internal/styles/style-api.scss +14 -0
- package/lib/internal/scss/item-card/styles.scss +4 -21
- package/lib/internal/scss/multiselect/styles.scss +2 -5
- package/lib/internal/scss/panel-layout/styles.scss +9 -6
- package/lib/internal/scss/progress-bar/styles.scss +1 -1
- package/lib/internal/scss/prompt-input/styles.scss +66 -13
- package/lib/internal/scss/radio-button/styles.scss +9 -1
- package/lib/internal/scss/radio-group/styles.scss +1 -1
- package/lib/internal/scss/segmented-control/segment.scss +3 -3
- package/lib/internal/scss/segmented-control/styles.scss +7 -7
- package/lib/internal/scss/select/styles.scss +2 -5
- package/lib/internal/scss/slider/styles.scss +1 -1
- package/lib/internal/scss/table/body-cell/styles.scss +25 -15
- package/lib/internal/scss/table/header-cell/styles.scss +23 -9
- package/lib/internal/scss/table/resizer/styles.scss +13 -8
- package/lib/internal/scss/table/style-api.scss +52 -0
- package/lib/internal/scss/table/styles.scss +49 -0
- package/lib/internal/scss/tabs/styles.scss +3 -1
- package/lib/internal/scss/tabs/tab-header-bar.scss +78 -19
- package/lib/internal/scss/text-filter/styles.scss +1 -8
- package/lib/internal/scss/textarea/styles.scss +1 -1
- package/lib/internal/scss/toggle/styles.scss +4 -4
- package/lib/internal/template/action-card/index.d.ts.map +1 -1
- package/lib/internal/template/action-card/index.js +3 -2
- package/lib/internal/template/action-card/index.js.map +1 -1
- package/lib/internal/template/action-card/interfaces.d.ts +8 -0
- package/lib/internal/template/action-card/interfaces.d.ts.map +1 -1
- package/lib/internal/template/action-card/interfaces.js.map +1 -1
- package/lib/internal/template/action-card/internal.d.ts.map +1 -1
- package/lib/internal/template/action-card/internal.js +2 -2
- package/lib/internal/template/action-card/internal.js.map +1 -1
- package/lib/internal/template/action-card/styles.css.js +19 -18
- package/lib/internal/template/action-card/styles.scoped.css +116 -116
- package/lib/internal/template/action-card/styles.selectors.js +19 -18
- package/lib/internal/template/alert/styles.css.js +27 -27
- package/lib/internal/template/alert/styles.scoped.css +49 -49
- package/lib/internal/template/alert/styles.selectors.js +27 -27
- package/lib/internal/template/annotation-context/annotation/annotation-trigger.d.ts.map +1 -1
- package/lib/internal/template/annotation-context/annotation/annotation-trigger.js +1 -1
- package/lib/internal/template/annotation-context/annotation/annotation-trigger.js.map +1 -1
- package/lib/internal/template/annotation-context/annotation/styles.css.js +13 -13
- package/lib/internal/template/annotation-context/annotation/styles.scoped.css +21 -21
- package/lib/internal/template/annotation-context/annotation/styles.selectors.js +13 -13
- package/lib/internal/template/app-layout/notifications/styles.css.js +3 -3
- package/lib/internal/template/app-layout/notifications/styles.scoped.css +7 -7
- package/lib/internal/template/app-layout/notifications/styles.selectors.js +3 -3
- package/lib/internal/template/app-layout/visual-refresh/mobile-toolbar.d.ts.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh/mobile-toolbar.js +1 -1
- package/lib/internal/template/app-layout/visual-refresh/mobile-toolbar.js.map +1 -1
- package/lib/internal/template/app-layout/visual-refresh/styles.css.js +86 -86
- package/lib/internal/template/app-layout/visual-refresh/styles.scoped.css +258 -258
- package/lib/internal/template/app-layout/visual-refresh/styles.selectors.js +86 -86
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.css.js +32 -32
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.scoped.css +89 -89
- package/lib/internal/template/app-layout/visual-refresh-toolbar/drawer/styles.selectors.js +32 -32
- package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.css.js +6 -6
- package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.scoped.css +13 -13
- package/lib/internal/template/app-layout/visual-refresh-toolbar/navigation/styles.selectors.js +6 -6
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.css.js +30 -30
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.scoped.css +68 -68
- package/lib/internal/template/app-layout/visual-refresh-toolbar/skeleton/styles.selectors.js +30 -30
- package/lib/internal/template/attribute-editor/styles.css.js +15 -15
- package/lib/internal/template/attribute-editor/styles.scoped.css +28 -28
- package/lib/internal/template/attribute-editor/styles.selectors.js +15 -15
- package/lib/internal/template/autosuggest/styles.css.js +3 -3
- package/lib/internal/template/autosuggest/styles.scoped.css +4 -4
- package/lib/internal/template/autosuggest/styles.selectors.js +3 -3
- package/lib/internal/template/breadcrumb-group/item/styles.css.js +7 -7
- package/lib/internal/template/breadcrumb-group/item/styles.scoped.css +28 -28
- package/lib/internal/template/breadcrumb-group/item/styles.selectors.js +7 -7
- package/lib/internal/template/button/styles.css.js +24 -24
- package/lib/internal/template/button/styles.scoped.css +329 -329
- package/lib/internal/template/button/styles.selectors.js +24 -24
- package/lib/internal/template/button-dropdown/internal.js +1 -1
- package/lib/internal/template/button-dropdown/internal.js.map +1 -1
- package/lib/internal/template/button-dropdown/item-element/styles.css.js +21 -21
- package/lib/internal/template/button-dropdown/item-element/styles.scoped.css +37 -37
- package/lib/internal/template/button-dropdown/item-element/styles.selectors.js +21 -21
- package/lib/internal/template/button-dropdown/styles.css.js +23 -23
- package/lib/internal/template/button-dropdown/styles.scoped.css +32 -32
- package/lib/internal/template/button-dropdown/styles.selectors.js +23 -23
- package/lib/internal/template/button-group/internal-interfaces.d.ts +3 -2
- package/lib/internal/template/button-group/internal-interfaces.d.ts.map +1 -1
- package/lib/internal/template/button-group/internal-interfaces.js.map +1 -1
- package/lib/internal/template/button-group/item-element.d.ts.map +1 -1
- package/lib/internal/template/button-group/item-element.js +2 -1
- package/lib/internal/template/button-group/item-element.js.map +1 -1
- package/lib/internal/template/button-group/styles.css.js +4 -4
- package/lib/internal/template/button-group/styles.scoped.css +5 -5
- package/lib/internal/template/button-group/styles.selectors.js +4 -4
- package/lib/internal/template/cards/index.js +1 -1
- package/lib/internal/template/cards/index.js.map +1 -1
- package/lib/internal/template/cards/styles.css.js +39 -39
- package/lib/internal/template/cards/styles.scoped.css +41 -41
- package/lib/internal/template/cards/styles.selectors.js +39 -39
- package/lib/internal/template/checkbox/internal.d.ts +1 -1
- package/lib/internal/template/checkbox/internal.d.ts.map +1 -1
- package/lib/internal/template/checkbox/internal.js.map +1 -1
- package/lib/internal/template/checkbox/styles.css.js +3 -3
- package/lib/internal/template/checkbox/styles.scoped.css +10 -10
- package/lib/internal/template/checkbox/styles.selectors.js +3 -3
- package/lib/internal/template/container/styles.css.js +33 -33
- package/lib/internal/template/container/styles.scoped.css +106 -109
- package/lib/internal/template/container/styles.selectors.js +33 -33
- package/lib/internal/template/content-layout/interfaces.d.ts +4 -2
- package/lib/internal/template/content-layout/interfaces.d.ts.map +1 -1
- package/lib/internal/template/content-layout/interfaces.js.map +1 -1
- package/lib/internal/template/content-layout/styles.css.js +14 -14
- package/lib/internal/template/content-layout/styles.scoped.css +27 -27
- package/lib/internal/template/content-layout/styles.selectors.js +14 -14
- package/lib/internal/template/control-group/styles.css.js +27 -27
- package/lib/internal/template/control-group/styles.scoped.css +28 -28
- package/lib/internal/template/control-group/styles.selectors.js +27 -27
- package/lib/internal/template/dropdown/internal.d.ts +1 -1
- package/lib/internal/template/dropdown/internal.d.ts.map +1 -1
- package/lib/internal/template/dropdown/internal.js +1 -1
- package/lib/internal/template/dropdown/internal.js.map +1 -1
- package/lib/internal/template/dropdown/styles.css.js +20 -20
- package/lib/internal/template/dropdown/styles.scoped.css +46 -48
- package/lib/internal/template/dropdown/styles.selectors.js +20 -20
- package/lib/internal/template/file-token-group/styles.css.js +23 -23
- package/lib/internal/template/file-token-group/styles.scoped.css +36 -36
- package/lib/internal/template/file-token-group/styles.selectors.js +23 -23
- package/lib/internal/template/flashbar/collapsible-flashbar.d.ts.map +1 -1
- package/lib/internal/template/flashbar/collapsible-flashbar.js +3 -2
- package/lib/internal/template/flashbar/collapsible-flashbar.js.map +1 -1
- package/lib/internal/template/flashbar/internal-interfaces.d.ts +3 -2
- package/lib/internal/template/flashbar/internal-interfaces.d.ts.map +1 -1
- package/lib/internal/template/flashbar/internal-interfaces.js.map +1 -1
- package/lib/internal/template/flashbar/non-collapsible-flashbar.d.ts.map +1 -1
- package/lib/internal/template/flashbar/non-collapsible-flashbar.js +2 -1
- package/lib/internal/template/flashbar/non-collapsible-flashbar.js.map +1 -1
- package/lib/internal/template/flashbar/styles.css.js +50 -50
- package/lib/internal/template/flashbar/styles.scoped.css +182 -185
- package/lib/internal/template/flashbar/styles.selectors.js +50 -50
- package/lib/internal/template/help-panel/styles.css.js +6 -6
- package/lib/internal/template/help-panel/styles.scoped.css +72 -72
- package/lib/internal/template/help-panel/styles.selectors.js +6 -6
- package/lib/internal/template/i18n/messages/all.all.js +1 -1
- package/lib/internal/template/i18n/messages/all.all.json +1 -1
- package/lib/internal/template/i18n/messages/all.en.js +1 -1
- package/lib/internal/template/i18n/messages/all.en.json +1 -1
- package/lib/internal/template/i18n/messages/all.ko.js +1 -1
- package/lib/internal/template/i18n/messages/all.ko.json +1 -1
- package/lib/internal/template/input/styles.css.js +45 -45
- package/lib/internal/template/input/styles.scoped.css +147 -147
- package/lib/internal/template/input/styles.selectors.js +45 -45
- package/lib/internal/template/internal/base-component/styles.scoped.css +1 -1
- package/lib/internal/template/internal/components/autosuggest-input/index.js +1 -1
- package/lib/internal/template/internal/components/autosuggest-input/index.js.map +1 -1
- package/lib/internal/template/internal/components/drag-handle-wrapper/styles.css.js +30 -30
- package/lib/internal/template/internal/components/drag-handle-wrapper/styles.scoped.css +58 -58
- package/lib/internal/template/internal/components/drag-handle-wrapper/styles.selectors.js +30 -30
- package/lib/internal/template/internal/components/listbox/use-listbox.d.ts +2 -2
- package/lib/internal/template/internal/components/listbox/use-listbox.d.ts.map +1 -1
- package/lib/internal/template/internal/components/listbox/use-listbox.js +10 -1
- package/lib/internal/template/internal/components/listbox/use-listbox.js.map +1 -1
- package/lib/internal/template/internal/components/option/styles.css.js +19 -19
- package/lib/internal/template/internal/components/option/styles.scoped.css +36 -36
- package/lib/internal/template/internal/components/option/styles.selectors.js +19 -19
- package/lib/internal/template/internal/components/radio-button/styles.css.js +7 -7
- package/lib/internal/template/internal/components/radio-button/styles.scoped.css +17 -17
- package/lib/internal/template/internal/components/radio-button/styles.selectors.js +7 -7
- package/lib/internal/template/internal/components/selectable-item/styles.css.js +23 -23
- package/lib/internal/template/internal/components/selectable-item/styles.scoped.css +58 -58
- package/lib/internal/template/internal/components/selectable-item/styles.selectors.js +23 -23
- package/lib/internal/template/internal/components/token-list/styles.css.js +10 -10
- package/lib/internal/template/internal/components/token-list/styles.scoped.css +25 -25
- package/lib/internal/template/internal/components/token-list/styles.selectors.js +10 -10
- package/lib/internal/template/internal/environment.js +2 -2
- package/lib/internal/template/internal/environment.json +2 -2
- package/lib/internal/template/internal/generated/custom-css-properties/index.d.ts +1 -0
- package/lib/internal/template/internal/generated/custom-css-properties/index.d.ts.map +1 -1
- package/lib/internal/template/internal/generated/custom-css-properties/index.js +178 -177
- package/lib/internal/template/internal/generated/custom-css-properties/index.js.map +1 -1
- package/lib/internal/template/internal/utils/style-slot.d.ts +3 -0
- package/lib/internal/template/internal/utils/style-slot.d.ts.map +1 -0
- package/lib/internal/template/internal/utils/style-slot.js +6 -0
- package/lib/internal/template/internal/utils/style-slot.js.map +1 -0
- package/lib/internal/template/item-card/index.d.ts +1 -1
- package/lib/internal/template/item-card/index.d.ts.map +1 -1
- package/lib/internal/template/item-card/index.js +3 -2
- package/lib/internal/template/item-card/index.js.map +1 -1
- package/lib/internal/template/item-card/interfaces.d.ts +8 -0
- package/lib/internal/template/item-card/interfaces.d.ts.map +1 -1
- package/lib/internal/template/item-card/interfaces.js.map +1 -1
- package/lib/internal/template/item-card/internal-interfaces.d.ts +0 -4
- package/lib/internal/template/item-card/internal-interfaces.d.ts.map +1 -1
- package/lib/internal/template/item-card/internal-interfaces.js.map +1 -1
- package/lib/internal/template/item-card/internal.d.ts +1 -1
- package/lib/internal/template/item-card/internal.d.ts.map +1 -1
- package/lib/internal/template/item-card/internal.js +2 -2
- package/lib/internal/template/item-card/internal.js.map +1 -1
- package/lib/internal/template/item-card/styles.css.js +14 -14
- package/lib/internal/template/item-card/styles.scoped.css +74 -79
- package/lib/internal/template/item-card/styles.selectors.js +14 -14
- package/lib/internal/template/link/styles.css.js +21 -21
- package/lib/internal/template/link/styles.scoped.css +104 -104
- package/lib/internal/template/link/styles.selectors.js +21 -21
- package/lib/internal/template/modal/styles.css.js +32 -32
- package/lib/internal/template/modal/styles.scoped.css +49 -49
- package/lib/internal/template/modal/styles.selectors.js +32 -32
- package/lib/internal/template/multiselect/internal.js +1 -1
- package/lib/internal/template/multiselect/internal.js.map +1 -1
- package/lib/internal/template/multiselect/styles.css.js +5 -5
- package/lib/internal/template/multiselect/styles.scoped.css +7 -9
- package/lib/internal/template/multiselect/styles.selectors.js +5 -5
- package/lib/internal/template/option-list/use-option-list.d.ts +2 -2
- package/lib/internal/template/option-list/use-option-list.d.ts.map +1 -1
- package/lib/internal/template/option-list/use-option-list.js +5 -22
- package/lib/internal/template/option-list/use-option-list.js.map +1 -1
- package/lib/internal/template/panel-layout/index.d.ts.map +1 -1
- package/lib/internal/template/panel-layout/index.js +3 -3
- package/lib/internal/template/panel-layout/index.js.map +1 -1
- package/lib/internal/template/panel-layout/interfaces.d.ts +9 -2
- package/lib/internal/template/panel-layout/interfaces.d.ts.map +1 -1
- package/lib/internal/template/panel-layout/interfaces.js.map +1 -1
- package/lib/internal/template/panel-layout/internal.d.ts.map +1 -1
- package/lib/internal/template/panel-layout/internal.js +3 -3
- package/lib/internal/template/panel-layout/internal.js.map +1 -1
- package/lib/internal/template/panel-layout/styles.css.js +8 -7
- package/lib/internal/template/panel-layout/styles.scoped.css +20 -16
- package/lib/internal/template/panel-layout/styles.selectors.js +8 -7
- package/lib/internal/template/popover/styles.css.js +58 -58
- package/lib/internal/template/popover/styles.scoped.css +94 -94
- package/lib/internal/template/popover/styles.selectors.js +58 -58
- package/lib/internal/template/progress-bar/internal.d.ts +1 -1
- package/lib/internal/template/progress-bar/internal.js +1 -1
- package/lib/internal/template/progress-bar/internal.js.map +1 -1
- package/lib/internal/template/progress-bar/styles.css.js +20 -20
- package/lib/internal/template/progress-bar/styles.scoped.css +60 -60
- package/lib/internal/template/progress-bar/styles.selectors.js +20 -20
- package/lib/internal/template/prompt-input/components/token-mode.d.ts +4 -1
- package/lib/internal/template/prompt-input/components/token-mode.d.ts.map +1 -1
- package/lib/internal/template/prompt-input/components/token-mode.js +2 -2
- package/lib/internal/template/prompt-input/components/token-mode.js.map +1 -1
- package/lib/internal/template/prompt-input/internal.d.ts +8 -0
- package/lib/internal/template/prompt-input/internal.d.ts.map +1 -1
- package/lib/internal/template/prompt-input/internal.js +35 -26
- package/lib/internal/template/prompt-input/internal.js.map +1 -1
- package/lib/internal/template/prompt-input/styles.css.js +26 -26
- package/lib/internal/template/prompt-input/styles.scoped.css +134 -107
- package/lib/internal/template/prompt-input/styles.selectors.js +26 -26
- package/lib/internal/template/prompt-input/tokens/use-token-mode.d.ts +4 -0
- package/lib/internal/template/prompt-input/tokens/use-token-mode.d.ts.map +1 -1
- package/lib/internal/template/prompt-input/tokens/use-token-mode.js +3 -3
- package/lib/internal/template/prompt-input/tokens/use-token-mode.js.map +1 -1
- package/lib/internal/template/property-filter/interfaces.d.ts +2 -0
- package/lib/internal/template/property-filter/interfaces.d.ts.map +1 -1
- package/lib/internal/template/property-filter/interfaces.js.map +1 -1
- package/lib/internal/template/property-filter/token-editor-inputs.d.ts.map +1 -1
- package/lib/internal/template/property-filter/token-editor-inputs.js +3 -3
- package/lib/internal/template/property-filter/token-editor-inputs.js.map +1 -1
- package/lib/internal/template/radio-button/styles.css.js +1 -1
- package/lib/internal/template/radio-button/styles.scoped.css +2 -1
- package/lib/internal/template/radio-button/styles.selectors.js +1 -1
- package/lib/internal/template/radio-group/internal.d.ts +1 -1
- package/lib/internal/template/radio-group/internal.d.ts.map +1 -1
- package/lib/internal/template/radio-group/internal.js +1 -1
- package/lib/internal/template/radio-group/internal.js.map +1 -1
- package/lib/internal/template/radio-group/styles.css.js +5 -5
- package/lib/internal/template/radio-group/styles.scoped.css +7 -7
- package/lib/internal/template/radio-group/styles.selectors.js +5 -5
- package/lib/internal/template/segmented-control/styles.css.js +31 -31
- package/lib/internal/template/segmented-control/styles.scoped.css +89 -91
- package/lib/internal/template/segmented-control/styles.selectors.js +31 -31
- package/lib/internal/template/select/internal.js +1 -1
- package/lib/internal/template/select/internal.js.map +1 -1
- package/lib/internal/template/select/parts/styles.css.js +22 -22
- package/lib/internal/template/select/parts/styles.scoped.css +25 -25
- package/lib/internal/template/select/parts/styles.selectors.js +22 -22
- package/lib/internal/template/select/styles.css.js +3 -3
- package/lib/internal/template/select/styles.scoped.css +5 -7
- package/lib/internal/template/select/styles.selectors.js +3 -3
- package/lib/internal/template/side-navigation/styles.css.js +65 -65
- package/lib/internal/template/side-navigation/styles.scoped.css +114 -114
- package/lib/internal/template/side-navigation/styles.selectors.js +65 -65
- package/lib/internal/template/slider/styles.css.js +26 -26
- package/lib/internal/template/slider/styles.scoped.css +168 -168
- package/lib/internal/template/slider/styles.selectors.js +26 -26
- package/lib/internal/template/spinner/styles.css.js +14 -14
- package/lib/internal/template/spinner/styles.scoped.css +40 -40
- package/lib/internal/template/spinner/styles.selectors.js +14 -14
- package/lib/internal/template/styling/button.scss +7 -1
- package/lib/internal/template/styling/dropdown.scss +2 -2
- package/lib/internal/template/styling/progress-bar.scss +2 -2
- package/lib/internal/template/styling/prompt-input.scss +76 -0
- package/lib/internal/template/styling/segmented-control.scss +4 -4
- package/lib/internal/template/styling/table.scss +100 -0
- package/lib/internal/template/styling/tabs.scss +128 -0
- package/lib/internal/template/styling/toggle.scss +2 -2
- package/lib/internal/template/table/body-cell/disabled-inline-editor.d.ts.map +1 -1
- package/lib/internal/template/table/body-cell/disabled-inline-editor.js +1 -1
- package/lib/internal/template/table/body-cell/disabled-inline-editor.js.map +1 -1
- package/lib/internal/template/table/body-cell/index.d.ts.map +1 -1
- package/lib/internal/template/table/body-cell/index.js +1 -1
- package/lib/internal/template/table/body-cell/index.js.map +1 -1
- package/lib/internal/template/table/body-cell/styles.css.js +47 -47
- package/lib/internal/template/table/body-cell/styles.scoped.css +426 -418
- package/lib/internal/template/table/body-cell/styles.selectors.js +47 -47
- package/lib/internal/template/table/body-cell/td-element.d.ts +1 -0
- package/lib/internal/template/table/body-cell/td-element.d.ts.map +1 -1
- package/lib/internal/template/table/body-cell/td-element.js +2 -2
- package/lib/internal/template/table/body-cell/td-element.js.map +1 -1
- package/lib/internal/template/table/clear-sort.d.ts +2 -1
- package/lib/internal/template/table/clear-sort.d.ts.map +1 -1
- package/lib/internal/template/table/clear-sort.js +2 -2
- package/lib/internal/template/table/clear-sort.js.map +1 -1
- package/lib/internal/template/table/header-cell/common-props.d.ts +2 -0
- package/lib/internal/template/table/header-cell/common-props.d.ts.map +1 -1
- package/lib/internal/template/table/header-cell/common-props.js.map +1 -1
- package/lib/internal/template/table/header-cell/group-header-cell.d.ts +1 -1
- package/lib/internal/template/table/header-cell/group-header-cell.d.ts.map +1 -1
- package/lib/internal/template/table/header-cell/group-header-cell.js +3 -2
- package/lib/internal/template/table/header-cell/group-header-cell.js.map +1 -1
- package/lib/internal/template/table/header-cell/index.d.ts +1 -1
- package/lib/internal/template/table/header-cell/index.d.ts.map +1 -1
- package/lib/internal/template/table/header-cell/index.js +12 -5
- package/lib/internal/template/table/header-cell/index.js.map +1 -1
- package/lib/internal/template/table/header-cell/sort-menu.d.ts +3 -1
- package/lib/internal/template/table/header-cell/sort-menu.d.ts.map +1 -1
- package/lib/internal/template/table/header-cell/sort-menu.js +2 -2
- package/lib/internal/template/table/header-cell/sort-menu.js.map +1 -1
- package/lib/internal/template/table/header-cell/styles.css.js +39 -39
- package/lib/internal/template/table/header-cell/styles.scoped.css +140 -125
- package/lib/internal/template/table/header-cell/styles.selectors.js +39 -39
- package/lib/internal/template/table/header-cell/th-element.d.ts +2 -1
- package/lib/internal/template/table/header-cell/th-element.d.ts.map +1 -1
- package/lib/internal/template/table/header-cell/th-element.js +2 -2
- package/lib/internal/template/table/header-cell/th-element.js.map +1 -1
- package/lib/internal/template/table/internal.d.ts.map +1 -1
- package/lib/internal/template/table/internal.js +20 -7
- package/lib/internal/template/table/internal.js.map +1 -1
- package/lib/internal/template/table/resizer/index.d.ts.map +1 -1
- package/lib/internal/template/table/resizer/index.js +1 -1
- package/lib/internal/template/table/resizer/index.js.map +1 -1
- package/lib/internal/template/table/resizer/styles.css.js +17 -17
- package/lib/internal/template/table/resizer/styles.scoped.css +39 -35
- package/lib/internal/template/table/resizer/styles.selectors.js +17 -17
- package/lib/internal/template/table/selection/selection-cell.d.ts +5 -2
- package/lib/internal/template/table/selection/selection-cell.d.ts.map +1 -1
- package/lib/internal/template/table/selection/selection-cell.js +6 -5
- package/lib/internal/template/table/selection/selection-cell.js.map +1 -1
- package/lib/internal/template/table/selection/selection-control.d.ts +3 -1
- package/lib/internal/template/table/selection/selection-control.d.ts.map +1 -1
- package/lib/internal/template/table/selection/selection-control.js +2 -2
- package/lib/internal/template/table/selection/selection-control.js.map +1 -1
- package/lib/internal/template/table/style-api.d.ts +40 -0
- package/lib/internal/template/table/style-api.d.ts.map +1 -0
- package/lib/internal/template/table/style-api.js +2 -0
- package/lib/internal/template/table/style-api.js.map +1 -0
- package/lib/internal/template/table/styles.css.js +37 -37
- package/lib/internal/template/table/styles.scoped.css +109 -46
- package/lib/internal/template/table/styles.selectors.js +37 -37
- package/lib/internal/template/table/thead.d.ts +2 -0
- package/lib/internal/template/table/thead.d.ts.map +1 -1
- package/lib/internal/template/table/thead.js +2 -1
- package/lib/internal/template/table/thead.js.map +1 -1
- package/lib/internal/template/tabs/index.d.ts.map +1 -1
- package/lib/internal/template/tabs/index.js +3 -2
- package/lib/internal/template/tabs/index.js.map +1 -1
- package/lib/internal/template/tabs/styles.css.js +30 -30
- package/lib/internal/template/tabs/styles.scoped.css +130 -81
- package/lib/internal/template/tabs/styles.selectors.js +30 -30
- package/lib/internal/template/tabs/tab-header-bar.d.ts +12 -1
- package/lib/internal/template/tabs/tab-header-bar.d.ts.map +1 -1
- package/lib/internal/template/tabs/tab-header-bar.js +15 -7
- package/lib/internal/template/tabs/tab-header-bar.js.map +1 -1
- package/lib/internal/template/tag-editor/styles.css.js +3 -3
- package/lib/internal/template/tag-editor/styles.scoped.css +13 -13
- package/lib/internal/template/tag-editor/styles.selectors.js +3 -3
- package/lib/internal/template/text-content/styles.css.js +1 -1
- package/lib/internal/template/text-content/styles.scoped.css +66 -66
- package/lib/internal/template/text-content/styles.selectors.js +1 -1
- package/lib/internal/template/text-filter/styles.css.js +3 -3
- package/lib/internal/template/text-filter/styles.scoped.css +3 -4
- package/lib/internal/template/text-filter/styles.selectors.js +3 -3
- package/lib/internal/template/textarea/styles.css.js +9 -9
- package/lib/internal/template/textarea/styles.scoped.css +52 -52
- package/lib/internal/template/textarea/styles.selectors.js +9 -9
- package/lib/internal/template/toggle/internal.d.ts.map +1 -1
- package/lib/internal/template/toggle/internal.js +1 -1
- package/lib/internal/template/toggle/internal.js.map +1 -1
- package/lib/internal/template/toggle/styles.css.js +10 -10
- package/lib/internal/template/toggle/styles.scoped.css +31 -31
- package/lib/internal/template/toggle/styles.selectors.js +10 -10
- package/lib/internal/template/token/styles.css.js +14 -14
- package/lib/internal/template/token/styles.scoped.css +57 -57
- package/lib/internal/template/token/styles.selectors.js +14 -14
- package/lib/internal/template/top-navigation/parts/overflow-menu/menu-item.d.ts.map +1 -1
- package/lib/internal/template/top-navigation/parts/overflow-menu/menu-item.js +2 -2
- package/lib/internal/template/top-navigation/parts/overflow-menu/menu-item.js.map +1 -1
- package/package.json +1 -1
|
@@ -10,27 +10,27 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
10
10
|
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
11
11
|
SPDX-License-Identifier: Apache-2.0
|
|
12
12
|
*/
|
|
13
|
-
@keyframes awsui_drag-handle-
|
|
13
|
+
@keyframes awsui_drag-handle-entry_155yk_1y2rb_1 {
|
|
14
14
|
from {
|
|
15
|
-
transform: translate(var(--awsui-drag-handle-animation-inline-offset-
|
|
15
|
+
transform: translate(var(--awsui-drag-handle-animation-inline-offset-6xj2gg), var(--awsui-drag-handle-animation-block-offset-6xj2gg));
|
|
16
16
|
}
|
|
17
17
|
to {
|
|
18
18
|
transform: translate(0, 0);
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
@keyframes awsui_drag-handle-
|
|
21
|
+
@keyframes awsui_drag-handle-exit_155yk_1y2rb_1 {
|
|
22
22
|
from {
|
|
23
23
|
transform: translate(0, 0);
|
|
24
24
|
}
|
|
25
25
|
to {
|
|
26
|
-
transform: translate(var(--awsui-drag-handle-animation-inline-offset-
|
|
26
|
+
transform: translate(var(--awsui-drag-handle-animation-inline-offset-6xj2gg), var(--awsui-drag-handle-animation-block-offset-6xj2gg));
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
.awsui_direction-button-
|
|
30
|
-
--awsui-drag-handle-animation-inline-offset-
|
|
31
|
-
--awsui-drag-handle-animation-block-offset-
|
|
29
|
+
.awsui_direction-button-wrapper_155yk_1y2rb_29:not(#\9) {
|
|
30
|
+
--awsui-drag-handle-animation-inline-offset-6xj2gg: 0;
|
|
31
|
+
--awsui-drag-handle-animation-block-offset-6xj2gg: 0;
|
|
32
32
|
}
|
|
33
|
-
@keyframes awsui_awsui-motion-fade-
|
|
33
|
+
@keyframes awsui_awsui-motion-fade-in_155yk_1y2rb_1 {
|
|
34
34
|
from {
|
|
35
35
|
opacity: 0.2;
|
|
36
36
|
}
|
|
@@ -38,7 +38,7 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
38
38
|
opacity: 1;
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
@keyframes awsui_awsui-motion-fade-out-
|
|
41
|
+
@keyframes awsui_awsui-motion-fade-out-0_155yk_1y2rb_1 {
|
|
42
42
|
from {
|
|
43
43
|
opacity: 1;
|
|
44
44
|
}
|
|
@@ -46,81 +46,81 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
46
46
|
opacity: 0;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
.awsui_direction-button-wrapper-motion-
|
|
49
|
+
.awsui_direction-button-wrapper-motion-enter_155yk_1y2rb_49:not(#\9), .awsui_direction-button-wrapper-motion-entering_155yk_1y2rb_49:not(#\9), .awsui_direction-button-wrapper-motion-exit_155yk_1y2rb_49:not(#\9), .awsui_direction-button-wrapper-motion-exiting_155yk_1y2rb_49:not(#\9) {
|
|
50
50
|
pointer-events: none;
|
|
51
51
|
}
|
|
52
|
-
.awsui_direction-button-wrapper-motion-
|
|
53
|
-
animation: awsui_drag-handle-
|
|
52
|
+
.awsui_direction-button-wrapper-motion-entering_155yk_1y2rb_49:not(#\9) {
|
|
53
|
+
animation: awsui_drag-handle-entry_155yk_1y2rb_1 var(--motion-duration-complex-n5wfwh, 270ms) var(--motion-easing-responsive-k7246o, ease-out), awsui_awsui-motion-fade-in_155yk_1y2rb_1 var(--motion-duration-complex-n5wfwh, 270ms) var(--motion-easing-responsive-k7246o, ease-out);
|
|
54
54
|
}
|
|
55
55
|
@media (prefers-reduced-motion: reduce) {
|
|
56
|
-
.awsui_direction-button-wrapper-motion-
|
|
56
|
+
.awsui_direction-button-wrapper-motion-entering_155yk_1y2rb_49:not(#\9) {
|
|
57
57
|
animation: none;
|
|
58
58
|
transition: none;
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
-
.awsui-motion-disabled .awsui_direction-button-wrapper-motion-
|
|
61
|
+
.awsui-motion-disabled .awsui_direction-button-wrapper-motion-entering_155yk_1y2rb_49:not(#\9), .awsui-mode-entering .awsui_direction-button-wrapper-motion-entering_155yk_1y2rb_49:not(#\9) {
|
|
62
62
|
animation: none;
|
|
63
63
|
transition: none;
|
|
64
64
|
}
|
|
65
|
-
.awsui_direction-button-wrapper-motion-
|
|
66
|
-
animation: awsui_drag-handle-
|
|
65
|
+
.awsui_direction-button-wrapper-motion-exiting_155yk_1y2rb_49:not(#\9) {
|
|
66
|
+
animation: awsui_drag-handle-exit_155yk_1y2rb_1 var(--motion-duration-complex-n5wfwh, 270ms) var(--motion-easing-responsive-k7246o, ease-out) forwards, awsui_awsui-motion-fade-out-0_155yk_1y2rb_1 var(--motion-duration-complex-n5wfwh, 270ms) var(--motion-easing-responsive-k7246o, ease-out) forwards;
|
|
67
67
|
}
|
|
68
68
|
@media (prefers-reduced-motion: reduce) {
|
|
69
|
-
.awsui_direction-button-wrapper-motion-
|
|
69
|
+
.awsui_direction-button-wrapper-motion-exiting_155yk_1y2rb_49:not(#\9) {
|
|
70
70
|
animation: none;
|
|
71
71
|
transition: none;
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
.awsui-motion-disabled .awsui_direction-button-wrapper-motion-
|
|
74
|
+
.awsui-motion-disabled .awsui_direction-button-wrapper-motion-exiting_155yk_1y2rb_49:not(#\9), .awsui-mode-entering .awsui_direction-button-wrapper-motion-exiting_155yk_1y2rb_49:not(#\9) {
|
|
75
75
|
animation: none;
|
|
76
76
|
transition: none;
|
|
77
77
|
}
|
|
78
78
|
@media (prefers-reduced-motion: reduce) {
|
|
79
|
-
.awsui_direction-button-
|
|
79
|
+
.awsui_direction-button-wrapper_155yk_1y2rb_29:not(#\9) {
|
|
80
80
|
animation: none;
|
|
81
81
|
transition: none;
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
.awsui-motion-disabled .awsui_direction-button-
|
|
84
|
+
.awsui-motion-disabled .awsui_direction-button-wrapper_155yk_1y2rb_29:not(#\9), .awsui-mode-entering .awsui_direction-button-wrapper_155yk_1y2rb_29:not(#\9) {
|
|
85
85
|
animation: none;
|
|
86
86
|
transition: none;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
.awsui_direction-button-wrapper-block-
|
|
90
|
-
--awsui-drag-handle-animation-block-offset-
|
|
89
|
+
.awsui_direction-button-wrapper-block-start_155yk_1y2rb_89:not(#\9) {
|
|
90
|
+
--awsui-drag-handle-animation-block-offset-6xj2gg: 20px;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
.awsui_direction-button-wrapper-block-
|
|
94
|
-
--awsui-drag-handle-animation-block-offset-
|
|
93
|
+
.awsui_direction-button-wrapper-block-end_155yk_1y2rb_93:not(#\9) {
|
|
94
|
+
--awsui-drag-handle-animation-block-offset-6xj2gg: -20px;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
.awsui_direction-button-wrapper-inline-
|
|
97
|
+
.awsui_direction-button-wrapper-inline-start_155yk_1y2rb_97:not(#\9) {
|
|
98
98
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
99
99
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
100
100
|
}
|
|
101
|
-
.awsui_direction-button-wrapper-inline-
|
|
102
|
-
--awsui-drag-handle-animation-inline-offset-
|
|
101
|
+
.awsui_direction-button-wrapper-inline-start_155yk_1y2rb_97:not(#\9):dir(ltr) {
|
|
102
|
+
--awsui-drag-handle-animation-inline-offset-6xj2gg: 20px;
|
|
103
103
|
}
|
|
104
|
-
.awsui_direction-button-wrapper-inline-
|
|
105
|
-
--awsui-drag-handle-animation-inline-offset-
|
|
104
|
+
.awsui_direction-button-wrapper-inline-start_155yk_1y2rb_97:not(#\9):dir(rtl) {
|
|
105
|
+
--awsui-drag-handle-animation-inline-offset-6xj2gg: -20px;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
.awsui_direction-button-wrapper-inline-
|
|
108
|
+
.awsui_direction-button-wrapper-inline-end_155yk_1y2rb_108:not(#\9) {
|
|
109
109
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
110
110
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
111
111
|
}
|
|
112
|
-
.awsui_direction-button-wrapper-inline-
|
|
113
|
-
--awsui-drag-handle-animation-inline-offset-
|
|
112
|
+
.awsui_direction-button-wrapper-inline-end_155yk_1y2rb_108:not(#\9):dir(ltr) {
|
|
113
|
+
--awsui-drag-handle-animation-inline-offset-6xj2gg: -20px;
|
|
114
114
|
}
|
|
115
|
-
.awsui_direction-button-wrapper-inline-
|
|
116
|
-
--awsui-drag-handle-animation-inline-offset-
|
|
115
|
+
.awsui_direction-button-wrapper-inline-end_155yk_1y2rb_108:not(#\9):dir(rtl) {
|
|
116
|
+
--awsui-drag-handle-animation-inline-offset-6xj2gg: 20px;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
.
|
|
119
|
+
.awsui_contents_155yk_1y2rb_119:not(#\9) {
|
|
120
120
|
display: contents;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
.awsui_portal-
|
|
123
|
+
.awsui_portal-overlay_155yk_1y2rb_123:not(#\9) {
|
|
124
124
|
position: absolute;
|
|
125
125
|
inset-block-start: 0;
|
|
126
126
|
inset-inline-start: 0;
|
|
@@ -128,20 +128,20 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
128
128
|
z-index: 7000;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
.awsui_portal-overlay-
|
|
131
|
+
.awsui_portal-overlay-disabled_155yk_1y2rb_131:not(#\9) {
|
|
132
132
|
display: none;
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
.awsui_portal-overlay-
|
|
135
|
+
.awsui_portal-overlay-contents_155yk_1y2rb_135:not(#\9) {
|
|
136
136
|
pointer-events: auto;
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
-
.awsui_drag-
|
|
139
|
+
.awsui_drag-handle_155yk_1y2rb_139:not(#\9) {
|
|
140
140
|
position: relative;
|
|
141
141
|
display: inline-flex;
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
-
.awsui_direction-button-
|
|
144
|
+
.awsui_direction-button-wrapper_155yk_1y2rb_29:not(#\9) {
|
|
145
145
|
position: absolute;
|
|
146
146
|
block-size: var(--space-static-xl-frcfkv, 24px);
|
|
147
147
|
inline-size: var(--space-static-xl-frcfkv, 24px);
|
|
@@ -149,67 +149,67 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
149
149
|
padding-inline: var(--space-static-xxs-vzto3j, 4px);
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
.awsui_direction-button-wrapper-
|
|
152
|
+
.awsui_direction-button-wrapper-hidden_155yk_1y2rb_152:not(#\9) {
|
|
153
153
|
display: none;
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
-
.awsui_direction-button-wrapper-block-
|
|
156
|
+
.awsui_direction-button-wrapper-block-start_155yk_1y2rb_89:not(#\9) {
|
|
157
157
|
inset-block-start: calc(-1 * (var(--space-static-xl-frcfkv, 24px) + 2 * var(--space-static-xxs-vzto3j, 4px)));
|
|
158
158
|
inset-inline-start: calc(50% - (var(--space-static-xl-frcfkv, 24px) + 2 * var(--space-static-xxs-vzto3j, 4px)) / 2);
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
-
.awsui_direction-button-wrapper-block-
|
|
161
|
+
.awsui_direction-button-wrapper-block-end_155yk_1y2rb_93:not(#\9) {
|
|
162
162
|
inset-block-end: calc(-1 * (var(--space-static-xl-frcfkv, 24px) + 2 * var(--space-static-xxs-vzto3j, 4px)));
|
|
163
163
|
inset-inline-start: calc(50% - (var(--space-static-xl-frcfkv, 24px) + 2 * var(--space-static-xxs-vzto3j, 4px)) / 2);
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
-
.awsui_direction-button-wrapper-inline-
|
|
166
|
+
.awsui_direction-button-wrapper-inline-start_155yk_1y2rb_97:not(#\9) {
|
|
167
167
|
inset-inline-start: calc(-1 * (var(--space-static-xl-frcfkv, 24px) + 2 * var(--space-static-xxs-vzto3j, 4px)));
|
|
168
168
|
inset-block-start: calc(50% - (var(--space-static-xl-frcfkv, 24px) + 2 * var(--space-static-xxs-vzto3j, 4px)) / 2);
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
-
.awsui_direction-button-wrapper-inline-
|
|
171
|
+
.awsui_direction-button-wrapper-inline-end_155yk_1y2rb_108:not(#\9) {
|
|
172
172
|
inset-inline-end: calc(-1 * (var(--space-static-xl-frcfkv, 24px) + 2 * var(--space-static-xxs-vzto3j, 4px)));
|
|
173
173
|
inset-block-start: calc(50% - (var(--space-static-xl-frcfkv, 24px) + 2 * var(--space-static-xxs-vzto3j, 4px)) / 2);
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
-
.awsui_direction-button-wrapper-
|
|
176
|
+
.awsui_direction-button-wrapper-forced_155yk_1y2rb_176:not(#\9) {
|
|
177
177
|
inset-inline-start: calc(50% - (var(--space-static-xl-frcfkv, 24px) + 2 * var(--space-static-xxs-vzto3j, 4px)) / 2);
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
.awsui_direction-button-wrapper-forced-top-
|
|
180
|
+
.awsui_direction-button-wrapper-forced-top-0_155yk_1y2rb_180:not(#\9) {
|
|
181
181
|
inset-block-start: calc(-1 * (var(--space-static-xl-frcfkv, 24px) + 2 * var(--space-static-xxs-vzto3j, 4px)));
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
-
.awsui_direction-button-wrapper-forced-top-
|
|
184
|
+
.awsui_direction-button-wrapper-forced-top-1_155yk_1y2rb_184:not(#\9) {
|
|
185
185
|
inset-block-start: calc(-2 * (var(--space-static-xl-frcfkv, 24px) + 2 * var(--space-static-xxs-vzto3j, 4px)));
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
-
.awsui_direction-button-wrapper-forced-top-
|
|
188
|
+
.awsui_direction-button-wrapper-forced-top-2_155yk_1y2rb_188:not(#\9) {
|
|
189
189
|
inset-block-start: calc(-3 * (var(--space-static-xl-frcfkv, 24px) + 2 * var(--space-static-xxs-vzto3j, 4px)));
|
|
190
190
|
}
|
|
191
191
|
|
|
192
|
-
.awsui_direction-button-wrapper-forced-top-
|
|
192
|
+
.awsui_direction-button-wrapper-forced-top-3_155yk_1y2rb_192:not(#\9) {
|
|
193
193
|
inset-block-start: calc(-4 * (var(--space-static-xl-frcfkv, 24px) + 2 * var(--space-static-xxs-vzto3j, 4px)));
|
|
194
194
|
}
|
|
195
195
|
|
|
196
|
-
.awsui_direction-button-wrapper-forced-bottom-
|
|
196
|
+
.awsui_direction-button-wrapper-forced-bottom-0_155yk_1y2rb_196:not(#\9) {
|
|
197
197
|
inset-block-start: calc(1 * (var(--space-static-xl-frcfkv, 24px) + 2 * var(--space-static-xxs-vzto3j, 4px)));
|
|
198
198
|
}
|
|
199
199
|
|
|
200
|
-
.awsui_direction-button-wrapper-forced-bottom-
|
|
200
|
+
.awsui_direction-button-wrapper-forced-bottom-1_155yk_1y2rb_200:not(#\9) {
|
|
201
201
|
inset-block-start: calc(2 * (var(--space-static-xl-frcfkv, 24px) + 2 * var(--space-static-xxs-vzto3j, 4px)));
|
|
202
202
|
}
|
|
203
203
|
|
|
204
|
-
.awsui_direction-button-wrapper-forced-bottom-
|
|
204
|
+
.awsui_direction-button-wrapper-forced-bottom-2_155yk_1y2rb_204:not(#\9) {
|
|
205
205
|
inset-block-start: calc(3 * (var(--space-static-xl-frcfkv, 24px) + 2 * var(--space-static-xxs-vzto3j, 4px)));
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
-
.awsui_direction-button-wrapper-forced-bottom-
|
|
208
|
+
.awsui_direction-button-wrapper-forced-bottom-3_155yk_1y2rb_208:not(#\9) {
|
|
209
209
|
inset-block-start: calc(4 * (var(--space-static-xl-frcfkv, 24px) + 2 * var(--space-static-xxs-vzto3j, 4px)));
|
|
210
210
|
}
|
|
211
211
|
|
|
212
|
-
.awsui_direction-
|
|
212
|
+
.awsui_direction-button_155yk_1y2rb_29:not(#\9) {
|
|
213
213
|
position: absolute;
|
|
214
214
|
border-width: 0;
|
|
215
215
|
cursor: pointer;
|
|
@@ -228,14 +228,14 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
228
228
|
color: var(--color-text-direction-button-default-rvsx02, #ffffff);
|
|
229
229
|
box-shadow: var(--shadow-dropdown-ogwesf, 0 1px 1px 0 rgba(0, 28, 36, 0.3), 1px 1px 1px 0 rgba(0, 28, 36, 0.15), -1px 1px 1px 0 rgba(0, 28, 36, 0.15));
|
|
230
230
|
}
|
|
231
|
-
.awsui_direction-
|
|
231
|
+
.awsui_direction-button_155yk_1y2rb_29:not(#\9):not(.awsui_direction-button-disabled_155yk_1y2rb_231):hover {
|
|
232
232
|
background-color: var(--color-background-direction-button-hover-ixmpit, #414750);
|
|
233
233
|
}
|
|
234
|
-
.awsui_direction-
|
|
234
|
+
.awsui_direction-button_155yk_1y2rb_29:not(#\9):not(.awsui_direction-button-disabled_155yk_1y2rb_231):active {
|
|
235
235
|
background-color: var(--color-background-direction-button-active-ilpypx, #2a2e33);
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
-
.awsui_direction-button-
|
|
238
|
+
.awsui_direction-button-disabled_155yk_1y2rb_231:not(#\9) {
|
|
239
239
|
cursor: default;
|
|
240
240
|
background-color: var(--color-background-direction-button-disabled-p1avil, #eaeded);
|
|
241
241
|
color: var(--color-text-direction-button-disabled-qzn64l, #aab7b8);
|
|
@@ -2,35 +2,35 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"direction-button-wrapper": "awsui_direction-button-
|
|
6
|
-
"direction-button-wrapper-motion-enter": "awsui_direction-button-wrapper-motion-
|
|
7
|
-
"direction-button-wrapper-motion-entering": "awsui_direction-button-wrapper-motion-
|
|
8
|
-
"direction-button-wrapper-motion-exit": "awsui_direction-button-wrapper-motion-
|
|
9
|
-
"direction-button-wrapper-motion-exiting": "awsui_direction-button-wrapper-motion-
|
|
10
|
-
"drag-handle-entry": "awsui_drag-handle-
|
|
11
|
-
"awsui-motion-fade-in": "awsui_awsui-motion-fade-
|
|
12
|
-
"drag-handle-exit": "awsui_drag-handle-
|
|
13
|
-
"awsui-motion-fade-out-0": "awsui_awsui-motion-fade-out-
|
|
14
|
-
"direction-button-wrapper-block-start": "awsui_direction-button-wrapper-block-
|
|
15
|
-
"direction-button-wrapper-block-end": "awsui_direction-button-wrapper-block-
|
|
16
|
-
"direction-button-wrapper-inline-start": "awsui_direction-button-wrapper-inline-
|
|
17
|
-
"direction-button-wrapper-inline-end": "awsui_direction-button-wrapper-inline-
|
|
18
|
-
"contents": "
|
|
19
|
-
"portal-overlay": "awsui_portal-
|
|
20
|
-
"portal-overlay-disabled": "awsui_portal-overlay-
|
|
21
|
-
"portal-overlay-contents": "awsui_portal-overlay-
|
|
22
|
-
"drag-handle": "awsui_drag-
|
|
23
|
-
"direction-button-wrapper-hidden": "awsui_direction-button-wrapper-
|
|
24
|
-
"direction-button-wrapper-forced": "awsui_direction-button-wrapper-
|
|
25
|
-
"direction-button-wrapper-forced-top-0": "awsui_direction-button-wrapper-forced-top-
|
|
26
|
-
"direction-button-wrapper-forced-top-1": "awsui_direction-button-wrapper-forced-top-
|
|
27
|
-
"direction-button-wrapper-forced-top-2": "awsui_direction-button-wrapper-forced-top-
|
|
28
|
-
"direction-button-wrapper-forced-top-3": "awsui_direction-button-wrapper-forced-top-
|
|
29
|
-
"direction-button-wrapper-forced-bottom-0": "awsui_direction-button-wrapper-forced-bottom-
|
|
30
|
-
"direction-button-wrapper-forced-bottom-1": "awsui_direction-button-wrapper-forced-bottom-
|
|
31
|
-
"direction-button-wrapper-forced-bottom-2": "awsui_direction-button-wrapper-forced-bottom-
|
|
32
|
-
"direction-button-wrapper-forced-bottom-3": "awsui_direction-button-wrapper-forced-bottom-
|
|
33
|
-
"direction-button": "awsui_direction-
|
|
34
|
-
"direction-button-disabled": "awsui_direction-button-
|
|
5
|
+
"direction-button-wrapper": "awsui_direction-button-wrapper_155yk_1y2rb_29",
|
|
6
|
+
"direction-button-wrapper-motion-enter": "awsui_direction-button-wrapper-motion-enter_155yk_1y2rb_49",
|
|
7
|
+
"direction-button-wrapper-motion-entering": "awsui_direction-button-wrapper-motion-entering_155yk_1y2rb_49",
|
|
8
|
+
"direction-button-wrapper-motion-exit": "awsui_direction-button-wrapper-motion-exit_155yk_1y2rb_49",
|
|
9
|
+
"direction-button-wrapper-motion-exiting": "awsui_direction-button-wrapper-motion-exiting_155yk_1y2rb_49",
|
|
10
|
+
"drag-handle-entry": "awsui_drag-handle-entry_155yk_1y2rb_1",
|
|
11
|
+
"awsui-motion-fade-in": "awsui_awsui-motion-fade-in_155yk_1y2rb_1",
|
|
12
|
+
"drag-handle-exit": "awsui_drag-handle-exit_155yk_1y2rb_1",
|
|
13
|
+
"awsui-motion-fade-out-0": "awsui_awsui-motion-fade-out-0_155yk_1y2rb_1",
|
|
14
|
+
"direction-button-wrapper-block-start": "awsui_direction-button-wrapper-block-start_155yk_1y2rb_89",
|
|
15
|
+
"direction-button-wrapper-block-end": "awsui_direction-button-wrapper-block-end_155yk_1y2rb_93",
|
|
16
|
+
"direction-button-wrapper-inline-start": "awsui_direction-button-wrapper-inline-start_155yk_1y2rb_97",
|
|
17
|
+
"direction-button-wrapper-inline-end": "awsui_direction-button-wrapper-inline-end_155yk_1y2rb_108",
|
|
18
|
+
"contents": "awsui_contents_155yk_1y2rb_119",
|
|
19
|
+
"portal-overlay": "awsui_portal-overlay_155yk_1y2rb_123",
|
|
20
|
+
"portal-overlay-disabled": "awsui_portal-overlay-disabled_155yk_1y2rb_131",
|
|
21
|
+
"portal-overlay-contents": "awsui_portal-overlay-contents_155yk_1y2rb_135",
|
|
22
|
+
"drag-handle": "awsui_drag-handle_155yk_1y2rb_139",
|
|
23
|
+
"direction-button-wrapper-hidden": "awsui_direction-button-wrapper-hidden_155yk_1y2rb_152",
|
|
24
|
+
"direction-button-wrapper-forced": "awsui_direction-button-wrapper-forced_155yk_1y2rb_176",
|
|
25
|
+
"direction-button-wrapper-forced-top-0": "awsui_direction-button-wrapper-forced-top-0_155yk_1y2rb_180",
|
|
26
|
+
"direction-button-wrapper-forced-top-1": "awsui_direction-button-wrapper-forced-top-1_155yk_1y2rb_184",
|
|
27
|
+
"direction-button-wrapper-forced-top-2": "awsui_direction-button-wrapper-forced-top-2_155yk_1y2rb_188",
|
|
28
|
+
"direction-button-wrapper-forced-top-3": "awsui_direction-button-wrapper-forced-top-3_155yk_1y2rb_192",
|
|
29
|
+
"direction-button-wrapper-forced-bottom-0": "awsui_direction-button-wrapper-forced-bottom-0_155yk_1y2rb_196",
|
|
30
|
+
"direction-button-wrapper-forced-bottom-1": "awsui_direction-button-wrapper-forced-bottom-1_155yk_1y2rb_200",
|
|
31
|
+
"direction-button-wrapper-forced-bottom-2": "awsui_direction-button-wrapper-forced-bottom-2_155yk_1y2rb_204",
|
|
32
|
+
"direction-button-wrapper-forced-bottom-3": "awsui_direction-button-wrapper-forced-bottom-3_155yk_1y2rb_208",
|
|
33
|
+
"direction-button": "awsui_direction-button_155yk_1y2rb_29",
|
|
34
|
+
"direction-button-disabled": "awsui_direction-button-disabled_155yk_1y2rb_231"
|
|
35
35
|
};
|
|
36
36
|
|
|
@@ -60,8 +60,8 @@ export interface UseListboxApi {
|
|
|
60
60
|
* Base props for the list element: id, ref and mouse handlers. With `withKeyboard`, also `onKeyDown` and
|
|
61
61
|
* `aria-activedescendant`, for a list that has focus itself (not through a filter input). With `embedded`, also
|
|
62
62
|
* `onFocus` and `onBlur`, for an embedded list: an always visible list that is a tab stop. Focus highlights the
|
|
63
|
-
* first option
|
|
64
|
-
*
|
|
63
|
+
* first selected option (in selection order), or the first option when nothing is selected, and blur clears the
|
|
64
|
+
* highlight. A hover highlight is kept on focus, so a click selects the hovered option.
|
|
65
65
|
* Callers that add native attributes spread `nativeAttributes`.
|
|
66
66
|
*/
|
|
67
67
|
getListProps(options: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-listbox.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/listbox/use-listbox.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAqB,MAAM,OAAO,CAAC;AAIrD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EACL,yBAAyB,EACzB,aAAa,EAEd,MAAM,4CAA4C,CAAC;AAGpD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAIxD,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EAIrB,MAAM,sBAAsB,CAAC;AAE9B,MAAM,WAAW,eAAe;IAC9B,kFAAkF;IAClF,OAAO,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC;IACvC,+DAA+D;IAC/D,eAAe,EAAE,aAAa,CAAC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sBAAsB,CAAC,aAAa,CAAC,CAAC;IACjD,wDAAwD;IACxD,aAAa,EAAE,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC;IACvD,2DAA2D;IAC3D,OAAO,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IACnC;;;;;;;OAOG;IACH,YAAY,CAAC,OAAO,EAAE;QAAE,YAAY,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,aAAa,CAAC;IACpF,oCAAoC;IACpC,cAAc,CAAC,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC;IAChG,4EAA4E;IAC5E,gBAAgB,EAAE,OAAO,CAAC;IAC1B,mDAAmD;IACnD,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,EACzB,OAAO,EACP,eAAe,EAAE,mBAAmB,EACpC,SAAS,EACT,iBAAiB,EACjB,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,iBAAiB,EACjB,yBAAyB,GAC1B,EAAE,eAAe,GAAG,aAAa,
|
|
1
|
+
{"version":3,"file":"use-listbox.d.ts","sourceRoot":"","sources":["../../../../../src/internal/components/listbox/use-listbox.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAqB,MAAM,OAAO,CAAC;AAIrD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC9E,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EACL,yBAAyB,EACzB,aAAa,EAEd,MAAM,4CAA4C,CAAC;AAGpD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,M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AS,CAAC,gBAAgB,CAAC,CAAC;IAC3C,wEAAwE;IACxE,eAAe,EAAE,aAAa,CAAC,cAAc,CAAC,CAAC;IAC/C,yDAAyD;IACzD,SAAS,EAAE,yBAAyB,CAAC,cAAc,CAAC,CAAC;IACrD,iGAAiG;IACjG,YAAY,CAAC,MAAM,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IAC5C,6EAA6E;IAC7E,SAAS,EAAE,sBAAsB,CAAC,aAAa,CAAC,CAAC;IACjD,wDAAwD;IACxD,aAAa,EAAE,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC;IACvD,2DAA2D;IAC3D,OAAO,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IACnC;;;;;;;OAOG;IACH,YAAY,CAAC,OAAO,EAAE;QAAE,YAAY,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,aAAa,CAAC;IACpF,oCAAoC;IACpC,cAAc,CAAC,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC;IAChG,4EAA4E;IAC5E,gBAAgB,EAAE,OAAO,CAAC;IAC1B,mDAAmD;IACnD,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,EACzB,OAAO,EACP,eAAe,EAAE,mBAAmB,EACpC,SAAS,EACT,iBAAiB,EACjB,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,iBAAiB,EACjB,yBAAyB,GAC1B,EAAE,eAAe,GAAG,aAAa,CAkHjC"}
|
|
@@ -84,8 +84,17 @@ export function useListbox({ options, selectedOptions: selectedOptionsProp, sele
|
|
|
84
84
|
listProps.nativeAttributes = { 'aria-activedescendant': activeDescendantId };
|
|
85
85
|
}
|
|
86
86
|
if (embedded) {
|
|
87
|
+
// Like opening Select or Multiselect with the keyboard: highlight the first selected option (in selection
|
|
88
|
+
// order) and scroll it into view, or the first option when nothing in the list is selected.
|
|
87
89
|
listProps.onFocus = () => {
|
|
88
|
-
if (
|
|
90
|
+
if (highlightedOption) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
const firstSelected = selectedOptions.find(option => options.includes(option));
|
|
94
|
+
if (firstSelected) {
|
|
95
|
+
highlight.highlightOptionWithKeyboard(firstSelected);
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
89
98
|
highlight.goHomeWithKeyboard();
|
|
90
99
|
}
|
|
91
100
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-listbox.js","sourceRoot":"","sources":["../../../../../src/internal/components/listbox/use-listbox.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAa,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAM5E,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACnF,OAAO,EAGL,oBAAoB,GACrB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAGrE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,GAChB,MAAM,sBAAsB,CAAC;AAwE9B;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAC,EACzB,OAAO,EACP,eAAe,EAAE,mBAAmB,EACpC,SAAS,EACT,iBAAiB,EACjB,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,SAAS,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C;QACD,IAAI,QAAQ,EAAE,CAAC;YACb,SAAS,CAAC,OAAO,GAAG,GAAG,EAAE;gBACvB,IAAI,CAAC,iBAAiB,EAAE,CAAC;oBACvB,SAAS,CAAC,kBAAkB,EAAE,CAAC;gBACjC,CAAC;YACH,CAAC,CAAC;YACF,SAAS,CAAC,MAAM,GAAG,GAAG,EAAE;gBACtB,SAAS,CAAC,0BAA0B,EAAE,CAAC;YACzC,CAAC,CAAC;QACJ,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,gBAAgB;QAChB,aAAa;QACb,iBAAiB;QACjB,kBAAkB;QAClB,aAAa;QACb,eAAe;QACf,SAAS;QACT,YAAY;QACZ,SAAS;QACT,aAAa;QACb,OAAO;QACP,YAAY;QACZ,cAAc;QACd,gBAAgB;QAChB,YAAY;KACb,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { RefObject, useEffect, useRef } from 'react';\n\nimport { useUniqueId } from '@cloudscape-design/component-toolkit/internal';\n\nimport { SelectProps } from '../../../select/interfaces';\nimport { BaseKeyDetail, CancelableEventHandler } from '../../../types/events';\nimport { OptionDefinition, OptionGroup } from '../../../types/option';\nimport { DropdownOption } from '../option/interfaces';\nimport { isGroupInteractive, isInteractive } from '../option/utils/filter-options';\nimport {\n HighlightedOptionHandlers,\n HighlightType,\n useHighlightedOption,\n} from '../options-list/utils/use-highlight-option';\nimport { getOptionId } from '../options-list/utils/use-ids';\nimport { useMenuKeyboard } from '../options-list/utils/use-keyboard';\nimport { ListElementProps, ScrollToIndexRef } from './interfaces';\nimport { SelectionModel } from './selection/interfaces';\nimport { useAnnouncement } from './use-announcement';\nimport { connectOptionsByValue } from './utils/connect-options';\nimport { getListboxNavigation } from './utils/navigation';\nimport {\n getListboxOptionProps,\n getListMouseHandlers,\n getSelectableOption,\n isAnnouncedSelected,\n isHighlightable,\n} from './utils/option-props';\n\nexport interface UseListboxProps {\n /** Rendered options in list order (flattened, filtered, including select-all). */\n options: ReadonlyArray<DropdownOption>;\n /** Selected options, matched to the rendered rows by value. */\n selectedOptions: ReadonlyArray<OptionDefinition>;\n /** Group and select-all state. */\n selection: SelectionModel;\n /** Whether group headers (and select-all) can be highlighted and chosen. */\n interactiveGroups: boolean;\n /** Called with the interactive option the user chose (Enter, Space, mouse up, or `selectOption`). */\n onSelect: (option: DropdownOption) => void;\n /**\n * 'always': Space always chooses the highlighted option.\n * 'keyboard-highlight': Space chooses only while an option has a keyboard highlight, so it still types into a\n * filter input.\n */\n spaceSelects: 'always' | 'keyboard-highlight';\n /** Called when Escape is pressed. When omitted, Escape is not handled and keeps propagating. */\n onEscape?: () => void;\n /** Group of the option, announced with the highlighted option. */\n getParent: (option: DropdownOption) => undefined | OptionGroup;\n /** Added to the announcement when the highlighted option is selected. */\n selectedAriaLabel?: string;\n /** Custom announcement for the highlighted option. */\n renderHighlightedAriaLive?: SelectProps.ContainingOptionAndGroupString;\n}\n\nexport type BaseListProps = Pick<\n ListElementProps,\n 'id' | 'ref' | 'onMouseUp' | 'onMouseMove' | 'onKeyDown' | 'onFocus' | 'onBlur' | 'nativeAttributes'\n>;\nexport interface UseListboxApi {\n /** Id of the list element; row ids are `getOptionId(listId, index)`. */\n listId: string;\n highlightedIndex: number;\n highlightType: HighlightType;\n highlightedOption: DropdownOption | undefined;\n /** Id of the highlighted row, for `aria-activedescendant`; undefined when `highlightedIndex` is -1. */\n activeDescendantId: string | undefined;\n /** Pass as `ref` to the list; it is called with `highlightedIndex` whenever the highlighted index changes. */\n scrollToIndex: RefObject<ScrollToIndexRef>;\n /** `selectedOptions` connected to rendered rows, in selection order. */\n selectedOptions: ReadonlyArray<DropdownOption>;\n /** Raw highlight setters from `useHighlightedOption`. */\n highlight: HighlightedOptionHandlers<DropdownOption>;\n /** Chooses `option`, or the highlighted option when omitted. Ignores non-interactive options. */\n selectOption(option?: DropdownOption): void;\n /** Keydown handler for the element that has focus (list or filter input). */\n onKeyDown: CancelableEventHandler<BaseKeyDetail>;\n /** `onMouseUp` / `onMouseMove` for the list element. */\n mouseHandlers: ReturnType<typeof getListMouseHandlers>;\n /** Ref of the list element, also set by `getListProps`. */\n listRef: RefObject<HTMLDivElement>;\n /**\n * Base props for the list element: id, ref and mouse handlers. With `withKeyboard`, also `onKeyDown` and\n * `aria-activedescendant`, for a list that has focus itself (not through a filter input). With `embedded`, also\n * `onFocus` and `onBlur`, for an embedded list: an always visible list that is a tab stop. Focus highlights the\n * first option if nothing is highlighted, and blur clears the highlight. A hover highlight is kept on focus, so a\n * click selects the hovered option. Moving focus to the selected option is a follow-up.\n * Callers that add native attributes spread `nativeAttributes`.\n */\n getListProps(options: { withKeyboard: boolean; embedded?: boolean }): BaseListProps;\n /** Props for the row at `index`. */\n getOptionProps(option: DropdownOption, index: number): ReturnType<typeof getListboxOptionProps>;\n /** Whether the live region announces the highlighted option as selected. */\n announceSelected: boolean;\n /** Live region text for the highlighted option. */\n announcement: string;\n}\n\n/**\n * List state shared by all list components: highlight, keyboard navigation, the choose guard, mouse handlers,\n * row props, scrolling the highlighted row into view, the active descendant and the live region announcement.\n * Focus handling of an embedded list is shared through `getListProps({ embedded })`. Open state, filter,\n * type-ahead and the highlight on open stay with the callers, because they differ per component.\n */\nexport function useListbox({\n options,\n selectedOptions: selectedOptionsProp,\n selection,\n interactiveGroups,\n onSelect,\n spaceSelects,\n onEscape,\n getParent,\n selectedAriaLabel,\n renderHighlightedAriaLive,\n}: UseListboxProps): UseListboxApi {\n const listId = useUniqueId('option-list');\n const selectedOptions = connectOptionsByValue(options, selectedOptionsProp);\n const selectedSet = new Set(selectedOptions);\n const [{ highlightType, highlightedOption, highlightedIndex }, highlight] = useHighlightedOption({\n options,\n isHighlightable: (option?: DropdownOption) => isHighlightable(option, interactiveGroups),\n });\n\n const interactivityCheck = interactiveGroups ? isGroupInteractive : isInteractive;\n const selectOption = (option?: DropdownOption) => {\n const optionToSelect = getSelectableOption(option, highlightedOption, interactivityCheck);\n if (optionToSelect) {\n onSelect(optionToSelect);\n }\n };\n\n const onKeyDown = useMenuKeyboard({\n ...getListboxNavigation({\n options,\n highlightedIndex,\n highlightedOption,\n interactiveGroups,\n moveHighlight: highlight.moveHighlightWithKeyboard,\n goHome: highlight.goHomeWithKeyboard,\n goEnd: highlight.goEndWithKeyboard,\n }),\n selectOption,\n goHome: highlight.goHomeWithKeyboard,\n goEnd: highlight.goEndWithKeyboard,\n onEscape,\n // With 'keyboard-highlight', Space chooses only while an option has a keyboard highlight, and types otherwise.\n preventNativeSpace: spaceSelects === 'always' || (!!highlightedOption && highlightType.type === 'keyboard'),\n });\n\n const mouseHandlers = getListMouseHandlers({\n options,\n selectOption,\n setHighlightedIndexWithMouse: highlight.setHighlightedIndexWithMouse,\n });\n\n const getOptionProps = (option: DropdownOption, index: number) =>\n getListboxOptionProps(option, index, {\n options,\n selectedSet,\n selection,\n highlightedOption,\n interactiveGroups,\n listId,\n });\n\n const announceSelected = isAnnouncedSelected(highlightedOption, selectedSet, selection);\n const announcement = useAnnouncement({\n announceSelected,\n highlightedOption,\n getParent,\n selectedAriaLabel,\n renderHighlightedAriaLive,\n });\n\n const activeDescendantId = getOptionId(listId, highlightedIndex);\n\n // Keeps the highlighted option scrolled into view in the list passed `ref={scrollToIndex}`.\n const scrollToIndex = useRef<ScrollToIndexRef>(null);\n useEffect(() => {\n scrollToIndex.current?.(highlightedIndex);\n }, [highlightedIndex]);\n\n const listRef = useRef<HTMLDivElement>(null);\n const getListProps = ({ withKeyboard, embedded }: { withKeyboard: boolean; embedded?: boolean }) => {\n const listProps: BaseListProps = { id: listId, ref: listRef, ...mouseHandlers };\n if (withKeyboard) {\n listProps.onKeyDown = onKeyDown;\n listProps.nativeAttributes = { 'aria-activedescendant': activeDescendantId };\n }\n if (embedded) {\n listProps.onFocus = () => {\n if (!highlightedOption) {\n highlight.goHomeWithKeyboard();\n }\n };\n listProps.onBlur = () => {\n highlight.resetHighlightWithKeyboard();\n };\n }\n return listProps;\n };\n\n return {\n listId,\n highlightedIndex,\n highlightType,\n highlightedOption,\n activeDescendantId,\n scrollToIndex,\n selectedOptions,\n highlight,\n selectOption,\n onKeyDown,\n mouseHandlers,\n listRef,\n getListProps,\n getOptionProps,\n announceSelected,\n announcement,\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"use-listbox.js","sourceRoot":"","sources":["../../../../../src/internal/components/listbox/use-listbox.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAa,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAErD,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAM5E,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACnF,OAAO,EAGL,oBAAoB,GACrB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAGrE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,GAChB,MAAM,sBAAsB,CAAC;AAwE9B;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAC,EACzB,OAAO,EACP,eAAe,EAAE,mBAAmB,EACpC,SAAS,EACT,iBAAiB,EACjB,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,iBAAiB,EACjB,yBAAyB,GACT;IAChB,MAAM,MAAM,GAAG,WAAW,CAAC,aAAa,CAAC,CAAC;IAC1C,MAAM,eAAe,GAAG,qBAAqB,CAAC,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EAAE,CAAC;oBACtB,OAAO;gBACT,CAAC;gBACD,MAAM,aAAa,GAAG,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;gBAC/E,IAAI,aAAa,EAAE,CAAC;oBAClB,SAAS,CAAC,2BAA2B,CAAC,aAAa,CAAC,CAAC;gBACvD,CAAC;qBAAM,CAAC;oBACN,SAAS,CAAC,kBAAkB,EAAE,CAAC;gBACjC,CAAC;YACH,CAAC,CAAC;YACF,SAAS,CAAC,MAAM,GAAG,GAAG,EAAE;gBACtB,SAAS,CAAC,0BAA0B,EAAE,CAAC;YACzC,CAAC,CAAC;QACJ,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,gBAAgB;QAChB,aAAa;QACb,iBAAiB;QACjB,kBAAkB;QAClB,aAAa;QACb,eAAe;QACf,SAAS;QACT,YAAY;QACZ,SAAS;QACT,aAAa;QACb,OAAO;QACP,YAAY;QACZ,cAAc;QACd,gBAAgB;QAChB,YAAY;KACb,CAAC;AACJ,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { RefObject, useEffect, useRef } from 'react';\n\nimport { useUniqueId } from '@cloudscape-design/component-toolkit/internal';\n\nimport { SelectProps } from '../../../select/interfaces';\nimport { BaseKeyDetail, CancelableEventHandler } from '../../../types/events';\nimport { OptionDefinition, OptionGroup } from '../../../types/option';\nimport { DropdownOption } from '../option/interfaces';\nimport { isGroupInteractive, isInteractive } from '../option/utils/filter-options';\nimport {\n HighlightedOptionHandlers,\n HighlightType,\n useHighlightedOption,\n} from '../options-list/utils/use-highlight-option';\nimport { getOptionId } from '../options-list/utils/use-ids';\nimport { useMenuKeyboard } from '../options-list/utils/use-keyboard';\nimport { ListElementProps, ScrollToIndexRef } from './interfaces';\nimport { SelectionModel } from './selection/interfaces';\nimport { useAnnouncement } from './use-announcement';\nimport { connectOptionsByValue } from './utils/connect-options';\nimport { getListboxNavigation } from './utils/navigation';\nimport {\n getListboxOptionProps,\n getListMouseHandlers,\n getSelectableOption,\n isAnnouncedSelected,\n isHighlightable,\n} from './utils/option-props';\n\nexport interface UseListboxProps {\n /** Rendered options in list order (flattened, filtered, including select-all). */\n options: ReadonlyArray<DropdownOption>;\n /** Selected options, matched to the rendered rows by value. */\n selectedOptions: ReadonlyArray<OptionDefinition>;\n /** Group and select-all state. */\n selection: SelectionModel;\n /** Whether group headers (and select-all) can be highlighted and chosen. */\n interactiveGroups: boolean;\n /** Called with the interactive option the user chose (Enter, Space, mouse up, or `selectOption`). */\n onSelect: (option: DropdownOption) => void;\n /**\n * 'always': Space always chooses the highlighted option.\n * 'keyboard-highlight': Space chooses only while an option has a keyboard highlight, so it still types into a\n * filter input.\n */\n spaceSelects: 'always' | 'keyboard-highlight';\n /** Called when Escape is pressed. When omitted, Escape is not handled and keeps propagating. */\n onEscape?: () => void;\n /** Group of the option, announced with the highlighted option. */\n getParent: (option: DropdownOption) => undefined | OptionGroup;\n /** Added to the announcement when the highlighted option is selected. */\n selectedAriaLabel?: string;\n /** Custom announcement for the highlighted option. */\n renderHighlightedAriaLive?: SelectProps.ContainingOptionAndGroupString;\n}\n\nexport type BaseListProps = Pick<\n ListElementProps,\n 'id' | 'ref' | 'onMouseUp' | 'onMouseMove' | 'onKeyDown' | 'onFocus' | 'onBlur' | 'nativeAttributes'\n>;\nexport interface UseListboxApi {\n /** Id of the list element; row ids are `getOptionId(listId, index)`. */\n listId: string;\n highlightedIndex: number;\n highlightType: HighlightType;\n highlightedOption: DropdownOption | undefined;\n /** Id of the highlighted row, for `aria-activedescendant`; undefined when `highlightedIndex` is -1. */\n activeDescendantId: string | undefined;\n /** Pass as `ref` to the list; it is called with `highlightedIndex` whenever the highlighted index changes. */\n scrollToIndex: RefObject<ScrollToIndexRef>;\n /** `selectedOptions` connected to rendered rows, in selection order. */\n selectedOptions: ReadonlyArray<DropdownOption>;\n /** Raw highlight setters from `useHighlightedOption`. */\n highlight: HighlightedOptionHandlers<DropdownOption>;\n /** Chooses `option`, or the highlighted option when omitted. Ignores non-interactive options. */\n selectOption(option?: DropdownOption): void;\n /** Keydown handler for the element that has focus (list or filter input). */\n onKeyDown: CancelableEventHandler<BaseKeyDetail>;\n /** `onMouseUp` / `onMouseMove` for the list element. */\n mouseHandlers: ReturnType<typeof getListMouseHandlers>;\n /** Ref of the list element, also set by `getListProps`. */\n listRef: RefObject<HTMLDivElement>;\n /**\n * Base props for the list element: id, ref and mouse handlers. With `withKeyboard`, also `onKeyDown` and\n * `aria-activedescendant`, for a list that has focus itself (not through a filter input). With `embedded`, also\n * `onFocus` and `onBlur`, for an embedded list: an always visible list that is a tab stop. Focus highlights the\n * first selected option (in selection order), or the first option when nothing is selected, and blur clears the\n * highlight. A hover highlight is kept on focus, so a click selects the hovered option.\n * Callers that add native attributes spread `nativeAttributes`.\n */\n getListProps(options: { withKeyboard: boolean; embedded?: boolean }): BaseListProps;\n /** Props for the row at `index`. */\n getOptionProps(option: DropdownOption, index: number): ReturnType<typeof getListboxOptionProps>;\n /** Whether the live region announces the highlighted option as selected. */\n announceSelected: boolean;\n /** Live region text for the highlighted option. */\n announcement: string;\n}\n\n/**\n * List state shared by all list components: highlight, keyboard navigation, the choose guard, mouse handlers,\n * row props, scrolling the highlighted row into view, the active descendant and the live region announcement.\n * Focus handling of an embedded list is shared through `getListProps({ embedded })`. Open state, filter,\n * type-ahead and the highlight on open stay with the callers, because they differ per component.\n */\nexport function useListbox({\n options,\n selectedOptions: selectedOptionsProp,\n selection,\n interactiveGroups,\n onSelect,\n spaceSelects,\n onEscape,\n getParent,\n selectedAriaLabel,\n renderHighlightedAriaLive,\n}: UseListboxProps): UseListboxApi {\n const listId = useUniqueId('option-list');\n const selectedOptions = connectOptionsByValue(options, selectedOptionsProp);\n const selectedSet = new Set(selectedOptions);\n const [{ highlightType, highlightedOption, highlightedIndex }, highlight] = useHighlightedOption({\n options,\n isHighlightable: (option?: DropdownOption) => isHighlightable(option, interactiveGroups),\n });\n\n const interactivityCheck = interactiveGroups ? isGroupInteractive : isInteractive;\n const selectOption = (option?: DropdownOption) => {\n const optionToSelect = getSelectableOption(option, highlightedOption, interactivityCheck);\n if (optionToSelect) {\n onSelect(optionToSelect);\n }\n };\n\n const onKeyDown = useMenuKeyboard({\n ...getListboxNavigation({\n options,\n highlightedIndex,\n highlightedOption,\n interactiveGroups,\n moveHighlight: highlight.moveHighlightWithKeyboard,\n goHome: highlight.goHomeWithKeyboard,\n goEnd: highlight.goEndWithKeyboard,\n }),\n selectOption,\n goHome: highlight.goHomeWithKeyboard,\n goEnd: highlight.goEndWithKeyboard,\n onEscape,\n // With 'keyboard-highlight', Space chooses only while an option has a keyboard highlight, and types otherwise.\n preventNativeSpace: spaceSelects === 'always' || (!!highlightedOption && highlightType.type === 'keyboard'),\n });\n\n const mouseHandlers = getListMouseHandlers({\n options,\n selectOption,\n setHighlightedIndexWithMouse: highlight.setHighlightedIndexWithMouse,\n });\n\n const getOptionProps = (option: DropdownOption, index: number) =>\n getListboxOptionProps(option, index, {\n options,\n selectedSet,\n selection,\n highlightedOption,\n interactiveGroups,\n listId,\n });\n\n const announceSelected = isAnnouncedSelected(highlightedOption, selectedSet, selection);\n const announcement = useAnnouncement({\n announceSelected,\n highlightedOption,\n getParent,\n selectedAriaLabel,\n renderHighlightedAriaLive,\n });\n\n const activeDescendantId = getOptionId(listId, highlightedIndex);\n\n // Keeps the highlighted option scrolled into view in the list passed `ref={scrollToIndex}`.\n const scrollToIndex = useRef<ScrollToIndexRef>(null);\n useEffect(() => {\n scrollToIndex.current?.(highlightedIndex);\n }, [highlightedIndex]);\n\n const listRef = useRef<HTMLDivElement>(null);\n const getListProps = ({ withKeyboard, embedded }: { withKeyboard: boolean; embedded?: boolean }) => {\n const listProps: BaseListProps = { id: listId, ref: listRef, ...mouseHandlers };\n if (withKeyboard) {\n listProps.onKeyDown = onKeyDown;\n listProps.nativeAttributes = { 'aria-activedescendant': activeDescendantId };\n }\n if (embedded) {\n // Like opening Select or Multiselect with the keyboard: highlight the first selected option (in selection\n // order) and scroll it into view, or the first option when nothing in the list is selected.\n listProps.onFocus = () => {\n if (highlightedOption) {\n return;\n }\n const firstSelected = selectedOptions.find(option => options.includes(option));\n if (firstSelected) {\n highlight.highlightOptionWithKeyboard(firstSelected);\n } else {\n highlight.goHomeWithKeyboard();\n }\n };\n listProps.onBlur = () => {\n highlight.resetHighlightWithKeyboard();\n };\n }\n return listProps;\n };\n\n return {\n listId,\n highlightedIndex,\n highlightType,\n highlightedOption,\n activeDescendantId,\n scrollToIndex,\n selectedOptions,\n highlight,\n selectOption,\n onKeyDown,\n mouseHandlers,\n listRef,\n getListProps,\n getOptionProps,\n announceSelected,\n announcement,\n };\n}\n"]}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"option": "
|
|
5
|
-
"disabled": "
|
|
6
|
-
"parent": "
|
|
7
|
-
"highlighted": "
|
|
8
|
-
"in-trigger": "awsui_in-
|
|
9
|
-
"content": "
|
|
10
|
-
"label-content": "awsui_label-
|
|
11
|
-
"label": "
|
|
12
|
-
"tag": "
|
|
13
|
-
"label-tag": "awsui_label-
|
|
14
|
-
"label-prefix": "awsui_label-
|
|
15
|
-
"single-line": "awsui_single-
|
|
16
|
-
"tags": "
|
|
17
|
-
"description": "
|
|
18
|
-
"selected": "
|
|
19
|
-
"icon": "
|
|
20
|
-
"filtering-match-highlight": "awsui_filtering-match-
|
|
21
|
-
"trigger-variant": "awsui_trigger-
|
|
22
|
-
"custom-content": "awsui_custom-
|
|
4
|
+
"option": "awsui_option_1p2cx_j1cni_17",
|
|
5
|
+
"disabled": "awsui_disabled_1p2cx_j1cni_54",
|
|
6
|
+
"parent": "awsui_parent_1p2cx_j1cni_57",
|
|
7
|
+
"highlighted": "awsui_highlighted_1p2cx_j1cni_60",
|
|
8
|
+
"in-trigger": "awsui_in-trigger_1p2cx_j1cni_63",
|
|
9
|
+
"content": "awsui_content_1p2cx_j1cni_70",
|
|
10
|
+
"label-content": "awsui_label-content_1p2cx_j1cni_77",
|
|
11
|
+
"label": "awsui_label_1p2cx_j1cni_77",
|
|
12
|
+
"tag": "awsui_tag_1p2cx_j1cni_84",
|
|
13
|
+
"label-tag": "awsui_label-tag_1p2cx_j1cni_85",
|
|
14
|
+
"label-prefix": "awsui_label-prefix_1p2cx_j1cni_95",
|
|
15
|
+
"single-line": "awsui_single-line_1p2cx_j1cni_108",
|
|
16
|
+
"tags": "awsui_tags_1p2cx_j1cni_127",
|
|
17
|
+
"description": "awsui_description_1p2cx_j1cni_128",
|
|
18
|
+
"selected": "awsui_selected_1p2cx_j1cni_139",
|
|
19
|
+
"icon": "awsui_icon_1p2cx_j1cni_153",
|
|
20
|
+
"filtering-match-highlight": "awsui_filtering-match-highlight_1p2cx_j1cni_160",
|
|
21
|
+
"trigger-variant": "awsui_trigger-variant_1p2cx_j1cni_175",
|
|
22
|
+
"custom-content": "awsui_custom-content_1p2cx_j1cni_181"
|
|
23
23
|
};
|
|
24
24
|
|