@cloudscape-design/components-themeable 3.0.1398 → 3.0.1399
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/alert/styles.scss +6 -4
- package/lib/internal/scss/button-dropdown/styles.scss +5 -0
- package/lib/internal/scss/button-dropdown/test-classes/styles.scss +12 -0
- package/lib/internal/scss/button-group/styles.scss +11 -2
- package/lib/internal/scss/container/styles.scss +84 -11
- package/lib/internal/scss/copy-to-clipboard/styles.scss +4 -0
- package/lib/internal/scss/date-input/styles.scss +4 -0
- package/lib/internal/scss/divider/styles.scss +11 -3
- package/lib/internal/scss/dropdown/styles.scss +1 -1
- package/lib/internal/scss/expandable-section/styles.scss +32 -0
- package/lib/internal/scss/file-input/styles.scss +3 -8
- package/lib/internal/scss/header/styles.scss +22 -0
- package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +178 -176
- package/lib/internal/scss/internal/styles/forms/mixins.scss +31 -4
- package/lib/internal/scss/internal/styles/style-api.scss +1 -1
- package/lib/internal/scss/popover/arrow.scss +15 -3
- package/lib/internal/scss/popover/style-api.scss +8 -0
- package/lib/internal/scss/popover/styles.scss +8 -0
- package/lib/internal/scss/progress-bar/styles.scss +52 -19
- package/lib/internal/scss/slider/mixins.scss +79 -40
- package/lib/internal/scss/slider/styles.scss +97 -71
- package/lib/internal/scss/tabs/motion.scss +22 -0
- package/lib/internal/scss/tabs/styles.scss +1 -0
- package/lib/internal/scss/tabs/tab-header-bar.scss +42 -20
- package/lib/internal/scss/text-filter/styles.scss +11 -0
- package/lib/internal/scss/time-input/styles.scss +4 -0
- package/lib/internal/scss/toggle-button/styles.scss +3 -0
- package/lib/internal/scss/token/styles.scss +28 -37
- package/lib/internal/scss/tooltip/styles.scss +5 -0
- package/lib/internal/template/alert/styles.css.js +27 -27
- package/lib/internal/template/alert/styles.scoped.css +55 -53
- package/lib/internal/template/alert/styles.selectors.js +27 -27
- 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/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/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 +327 -327
- package/lib/internal/template/button/styles.selectors.js +24 -24
- package/lib/internal/template/button-dropdown/category-elements/expandable-category-element.d.ts +1 -1
- package/lib/internal/template/button-dropdown/category-elements/expandable-category-element.d.ts.map +1 -1
- package/lib/internal/template/button-dropdown/category-elements/expandable-category-element.js +18 -3
- package/lib/internal/template/button-dropdown/category-elements/expandable-category-element.js.map +1 -1
- package/lib/internal/template/button-dropdown/category-elements/mobile-expandable-category-element.d.ts +1 -1
- package/lib/internal/template/button-dropdown/category-elements/mobile-expandable-category-element.d.ts.map +1 -1
- package/lib/internal/template/button-dropdown/category-elements/mobile-expandable-category-element.js +23 -3
- package/lib/internal/template/button-dropdown/category-elements/mobile-expandable-category-element.js.map +1 -1
- package/lib/internal/template/button-dropdown/category-elements/use-expandable-group-status.d.ts +27 -0
- package/lib/internal/template/button-dropdown/category-elements/use-expandable-group-status.d.ts.map +1 -0
- package/lib/internal/template/button-dropdown/category-elements/use-expandable-group-status.js +59 -0
- package/lib/internal/template/button-dropdown/category-elements/use-expandable-group-status.js.map +1 -0
- package/lib/internal/template/button-dropdown/index.d.ts.map +1 -1
- package/lib/internal/template/button-dropdown/index.js +3 -3
- package/lib/internal/template/button-dropdown/index.js.map +1 -1
- package/lib/internal/template/button-dropdown/interfaces.d.ts +110 -8
- package/lib/internal/template/button-dropdown/interfaces.d.ts.map +1 -1
- package/lib/internal/template/button-dropdown/interfaces.js.map +1 -1
- package/lib/internal/template/button-dropdown/internal-interfaces.d.ts +20 -0
- package/lib/internal/template/button-dropdown/internal-interfaces.d.ts.map +1 -1
- package/lib/internal/template/button-dropdown/internal-interfaces.js.map +1 -1
- package/lib/internal/template/button-dropdown/internal.d.ts.map +1 -1
- package/lib/internal/template/button-dropdown/internal.js +149 -16
- 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/items-list.d.ts +1 -1
- package/lib/internal/template/button-dropdown/items-list.d.ts.map +1 -1
- package/lib/internal/template/button-dropdown/items-list.js +2 -2
- package/lib/internal/template/button-dropdown/items-list.js.map +1 -1
- package/lib/internal/template/button-dropdown/status-footer.d.ts +12 -0
- package/lib/internal/template/button-dropdown/status-footer.d.ts.map +1 -0
- package/lib/internal/template/button-dropdown/status-footer.js +23 -0
- package/lib/internal/template/button-dropdown/status-footer.js.map +1 -0
- package/lib/internal/template/button-dropdown/styles.css.js +23 -23
- package/lib/internal/template/button-dropdown/styles.scoped.css +34 -31
- package/lib/internal/template/button-dropdown/styles.selectors.js +23 -23
- package/lib/internal/template/button-dropdown/test-classes/styles.css.js +7 -0
- package/lib/internal/template/button-dropdown/test-classes/styles.scoped.css +11 -0
- package/lib/internal/template/button-dropdown/test-classes/styles.selectors.js +8 -0
- package/lib/internal/template/button-dropdown/utils/use-button-dropdown.d.ts +26 -2
- package/lib/internal/template/button-dropdown/utils/use-button-dropdown.d.ts.map +1 -1
- package/lib/internal/template/button-dropdown/utils/use-button-dropdown.js +62 -7
- package/lib/internal/template/button-dropdown/utils/use-button-dropdown.js.map +1 -1
- package/lib/internal/template/button-dropdown/utils/use-highlighted-menu.d.ts +2 -0
- package/lib/internal/template/button-dropdown/utils/use-highlighted-menu.d.ts.map +1 -1
- package/lib/internal/template/button-dropdown/utils/use-highlighted-menu.js +7 -0
- package/lib/internal/template/button-dropdown/utils/use-highlighted-menu.js.map +1 -1
- package/lib/internal/template/button-dropdown/utils/use-load-items.d.ts +14 -0
- package/lib/internal/template/button-dropdown/utils/use-load-items.d.ts.map +1 -0
- package/lib/internal/template/button-dropdown/utils/use-load-items.js +23 -0
- package/lib/internal/template/button-dropdown/utils/use-load-items.js.map +1 -0
- package/lib/internal/template/button-group/copy-to-clipboard-item.d.ts +1 -0
- package/lib/internal/template/button-group/copy-to-clipboard-item.d.ts.map +1 -1
- package/lib/internal/template/button-group/copy-to-clipboard-item.js +2 -2
- package/lib/internal/template/button-group/copy-to-clipboard-item.js.map +1 -1
- package/lib/internal/template/button-group/file-input-item.d.ts +1 -0
- package/lib/internal/template/button-group/file-input-item.d.ts.map +1 -1
- package/lib/internal/template/button-group/file-input-item.js +2 -2
- package/lib/internal/template/button-group/file-input-item.js.map +1 -1
- package/lib/internal/template/button-group/icon-button-item.d.ts +1 -0
- package/lib/internal/template/button-group/icon-button-item.d.ts.map +1 -1
- package/lib/internal/template/button-group/icon-button-item.js +2 -2
- package/lib/internal/template/button-group/icon-button-item.js.map +1 -1
- package/lib/internal/template/button-group/icon-toggle-button-item.d.ts +1 -0
- package/lib/internal/template/button-group/icon-toggle-button-item.d.ts.map +1 -1
- package/lib/internal/template/button-group/icon-toggle-button-item.js +2 -2
- package/lib/internal/template/button-group/icon-toggle-button-item.js.map +1 -1
- package/lib/internal/template/button-group/index.d.ts.map +1 -1
- package/lib/internal/template/button-group/index.js +1 -1
- package/lib/internal/template/button-group/index.js.map +1 -1
- package/lib/internal/template/button-group/internal-interfaces.d.ts +8 -0
- 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/internal.d.ts.map +1 -1
- package/lib/internal/template/button-group/internal.js +3 -3
- package/lib/internal/template/button-group/internal.js.map +1 -1
- package/lib/internal/template/button-group/item-element.d.ts +2 -0
- package/lib/internal/template/button-group/item-element.d.ts.map +1 -1
- package/lib/internal/template/button-group/item-element.js +7 -6
- package/lib/internal/template/button-group/item-element.js.map +1 -1
- package/lib/internal/template/button-group/menu-dropdown-item.d.ts +2 -0
- package/lib/internal/template/button-group/menu-dropdown-item.d.ts.map +1 -1
- package/lib/internal/template/button-group/menu-dropdown-item.js +3 -3
- package/lib/internal/template/button-group/menu-dropdown-item.js.map +1 -1
- package/lib/internal/template/button-group/styles.css.js +4 -4
- package/lib/internal/template/button-group/styles.scoped.css +19 -6
- package/lib/internal/template/button-group/styles.selectors.js +4 -4
- 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/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/column-layout/internal.d.ts.map +1 -1
- package/lib/internal/template/column-layout/internal.js +12 -0
- package/lib/internal/template/column-layout/internal.js.map +1 -1
- package/lib/internal/template/container/internal.d.ts +11 -0
- package/lib/internal/template/container/internal.d.ts.map +1 -1
- package/lib/internal/template/container/internal.js +7 -4
- package/lib/internal/template/container/internal.js.map +1 -1
- package/lib/internal/template/container/styles.css.js +33 -34
- package/lib/internal/template/container/styles.scoped.css +140 -94
- package/lib/internal/template/container/styles.selectors.js +33 -34
- 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/copy-to-clipboard/index.d.ts.map +1 -1
- package/lib/internal/template/copy-to-clipboard/index.js +1 -1
- package/lib/internal/template/copy-to-clipboard/index.js.map +1 -1
- package/lib/internal/template/copy-to-clipboard/internal.d.ts +7 -1
- package/lib/internal/template/copy-to-clipboard/internal.d.ts.map +1 -1
- package/lib/internal/template/copy-to-clipboard/internal.js +3 -3
- package/lib/internal/template/copy-to-clipboard/internal.js.map +1 -1
- package/lib/internal/template/copy-to-clipboard/styles.css.js +10 -10
- package/lib/internal/template/copy-to-clipboard/styles.scoped.css +16 -14
- package/lib/internal/template/copy-to-clipboard/styles.selectors.js +10 -10
- package/lib/internal/template/date-input/internal.d.ts +5 -0
- package/lib/internal/template/date-input/internal.d.ts.map +1 -1
- package/lib/internal/template/date-input/internal.js +2 -2
- package/lib/internal/template/date-input/internal.js.map +1 -1
- package/lib/internal/template/date-input/styles.css.js +1 -1
- package/lib/internal/template/date-input/styles.scoped.css +2 -1
- package/lib/internal/template/date-input/styles.selectors.js +1 -1
- package/lib/internal/template/divider/index.d.ts.map +1 -1
- package/lib/internal/template/divider/index.js +1 -1
- package/lib/internal/template/divider/index.js.map +1 -1
- package/lib/internal/template/divider/internal.d.ts +7 -2
- package/lib/internal/template/divider/internal.d.ts.map +1 -1
- package/lib/internal/template/divider/internal.js +2 -2
- package/lib/internal/template/divider/internal.js.map +1 -1
- package/lib/internal/template/divider/styles.css.js +6 -6
- package/lib/internal/template/divider/styles.scoped.css +20 -9
- package/lib/internal/template/divider/styles.selectors.js +6 -6
- 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 +48 -48
- package/lib/internal/template/dropdown/styles.selectors.js +20 -20
- package/lib/internal/template/expandable-section/expandable-section-container.d.ts +4 -1
- package/lib/internal/template/expandable-section/expandable-section-container.d.ts.map +1 -1
- package/lib/internal/template/expandable-section/expandable-section-container.js +4 -3
- package/lib/internal/template/expandable-section/expandable-section-container.js.map +1 -1
- package/lib/internal/template/expandable-section/expandable-section-header.d.ts +4 -1
- package/lib/internal/template/expandable-section/expandable-section-header.d.ts.map +1 -1
- package/lib/internal/template/expandable-section/expandable-section-header.js +34 -15
- package/lib/internal/template/expandable-section/expandable-section-header.js.map +1 -1
- package/lib/internal/template/expandable-section/interfaces.d.ts +11 -0
- package/lib/internal/template/expandable-section/interfaces.d.ts.map +1 -1
- package/lib/internal/template/expandable-section/interfaces.js.map +1 -1
- package/lib/internal/template/expandable-section/internal.d.ts +1 -1
- package/lib/internal/template/expandable-section/internal.d.ts.map +1 -1
- package/lib/internal/template/expandable-section/internal.js +10 -3
- package/lib/internal/template/expandable-section/internal.js.map +1 -1
- package/lib/internal/template/expandable-section/styles.css.js +49 -46
- package/lib/internal/template/expandable-section/styles.scoped.css +121 -91
- package/lib/internal/template/expandable-section/styles.selectors.js +49 -46
- package/lib/internal/template/expandable-section/utils.d.ts +1 -0
- package/lib/internal/template/expandable-section/utils.d.ts.map +1 -1
- package/lib/internal/template/expandable-section/utils.js +3 -0
- package/lib/internal/template/expandable-section/utils.js.map +1 -1
- package/lib/internal/template/file-input/internal.d.ts +2 -0
- package/lib/internal/template/file-input/internal.d.ts.map +1 -1
- package/lib/internal/template/file-input/internal.js +2 -2
- package/lib/internal/template/file-input/internal.js.map +1 -1
- package/lib/internal/template/file-input/styles.css.js +5 -5
- package/lib/internal/template/file-input/styles.scoped.css +18 -22
- package/lib/internal/template/file-input/styles.selectors.js +5 -5
- 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/styles.css.js +50 -50
- package/lib/internal/template/flashbar/styles.scoped.css +184 -184
- package/lib/internal/template/flashbar/styles.selectors.js +50 -50
- package/lib/internal/template/header/interfaces.d.ts +3 -2
- package/lib/internal/template/header/interfaces.d.ts.map +1 -1
- package/lib/internal/template/header/interfaces.js.map +1 -1
- package/lib/internal/template/header/internal.d.ts +6 -1
- package/lib/internal/template/header/internal.d.ts.map +1 -1
- package/lib/internal/template/header/internal.js +2 -1
- package/lib/internal/template/header/internal.js.map +1 -1
- package/lib/internal/template/header/styles.css.js +36 -35
- package/lib/internal/template/header/styles.scoped.css +69 -53
- package/lib/internal/template/header/styles.selectors.js +36 -35
- 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.de.js +1 -1
- package/lib/internal/template/i18n/messages/all.de.json +1 -1
- package/lib/internal/template/i18n/messages/all.en-GB.js +1 -1
- package/lib/internal/template/i18n/messages/all.en-GB.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.es.js +1 -1
- package/lib/internal/template/i18n/messages/all.es.json +1 -1
- package/lib/internal/template/i18n/messages/all.fr.js +1 -1
- package/lib/internal/template/i18n/messages/all.fr.json +1 -1
- package/lib/internal/template/i18n/messages/all.id.js +1 -1
- package/lib/internal/template/i18n/messages/all.id.json +1 -1
- package/lib/internal/template/i18n/messages/all.it.js +1 -1
- package/lib/internal/template/i18n/messages/all.it.json +1 -1
- package/lib/internal/template/i18n/messages/all.ja.js +1 -1
- package/lib/internal/template/i18n/messages/all.ja.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/i18n/messages/all.pt-BR.js +1 -1
- package/lib/internal/template/i18n/messages/all.pt-BR.json +1 -1
- package/lib/internal/template/i18n/messages/all.tr.js +1 -1
- package/lib/internal/template/i18n/messages/all.tr.json +1 -1
- package/lib/internal/template/i18n/messages/all.zh-CN.js +1 -1
- package/lib/internal/template/i18n/messages/all.zh-CN.json +1 -1
- package/lib/internal/template/i18n/messages/all.zh-TW.js +1 -1
- package/lib/internal/template/i18n/messages/all.zh-TW.json +1 -1
- package/lib/internal/template/i18n/messages-types.d.ts +28 -0
- package/lib/internal/template/i18n/messages-types.d.ts.map +1 -1
- package/lib/internal/template/i18n/messages-types.js.map +1 -1
- package/lib/internal/template/input/styles.css.js +44 -44
- package/lib/internal/template/input/styles.scoped.css +143 -143
- package/lib/internal/template/input/styles.selectors.js +44 -44
- package/lib/internal/template/internal/base-component/styles.scoped.css +1 -1
- package/lib/internal/template/internal/components/autosuggest-input/styles.css.js +33 -33
- package/lib/internal/template/internal/components/autosuggest-input/styles.scoped.css +86 -86
- package/lib/internal/template/internal/components/autosuggest-input/styles.selectors.js +33 -33
- 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/dropdown-status/index.d.ts +6 -1
- package/lib/internal/template/internal/components/dropdown-status/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/dropdown-status/index.js +2 -2
- package/lib/internal/template/internal/components/dropdown-status/index.js.map +1 -1
- package/lib/internal/template/internal/components/listbox/selection/interfaces.d.ts +29 -0
- package/lib/internal/template/internal/components/listbox/selection/interfaces.d.ts.map +1 -0
- package/lib/internal/template/internal/components/listbox/selection/interfaces.js +2 -0
- package/lib/internal/template/internal/components/listbox/selection/interfaces.js.map +1 -0
- package/lib/internal/template/internal/components/listbox/selection/multi-selection.d.ts +21 -0
- package/lib/internal/template/internal/components/listbox/selection/multi-selection.d.ts.map +1 -0
- package/lib/internal/template/internal/components/listbox/selection/multi-selection.js +60 -0
- package/lib/internal/template/internal/components/listbox/selection/multi-selection.js.map +1 -0
- package/lib/internal/template/internal/components/listbox/selection/single-selection.d.ts +8 -0
- package/lib/internal/template/internal/components/listbox/selection/single-selection.d.ts.map +1 -0
- package/lib/internal/template/internal/components/listbox/selection/single-selection.js +26 -0
- package/lib/internal/template/internal/components/listbox/selection/single-selection.js.map +1 -0
- package/lib/internal/template/internal/components/option/styles.css.js +18 -18
- package/lib/internal/template/internal/components/option/styles.scoped.css +35 -35
- package/lib/internal/template/internal/components/option/styles.selectors.js +18 -18
- 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 +22 -22
- package/lib/internal/template/internal/components/selectable-item/styles.scoped.css +57 -57
- package/lib/internal/template/internal/components/selectable-item/styles.selectors.js +22 -22
- 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 +2 -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 +177 -175
- package/lib/internal/template/internal/generated/custom-css-properties/index.js.map +1 -1
- package/lib/internal/template/internal/hooks/use-load-items/index.d.ts +15 -0
- package/lib/internal/template/internal/hooks/use-load-items/index.d.ts.map +1 -0
- package/lib/internal/template/{select/utils/use-load-items.js → internal/hooks/use-load-items/index.js} +4 -5
- package/lib/internal/template/internal/hooks/use-load-items/index.js.map +1 -0
- package/lib/internal/template/item-card/styles.css.js +14 -14
- package/lib/internal/template/item-card/styles.scoped.css +63 -63
- 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/use-multiselect.d.ts.map +1 -1
- package/lib/internal/template/multiselect/use-multiselect.js +15 -48
- package/lib/internal/template/multiselect/use-multiselect.js.map +1 -1
- package/lib/internal/template/popover/arrow.d.ts +2 -1
- package/lib/internal/template/popover/arrow.d.ts.map +1 -1
- package/lib/internal/template/popover/arrow.js +2 -2
- package/lib/internal/template/popover/arrow.js.map +1 -1
- package/lib/internal/template/popover/body.d.ts +1 -0
- package/lib/internal/template/popover/body.d.ts.map +1 -1
- package/lib/internal/template/popover/body.js +2 -2
- package/lib/internal/template/popover/body.js.map +1 -1
- package/lib/internal/template/popover/container.d.ts +2 -1
- package/lib/internal/template/popover/container.d.ts.map +1 -1
- package/lib/internal/template/popover/container.js +2 -2
- package/lib/internal/template/popover/container.js.map +1 -1
- package/lib/internal/template/popover/internal.d.ts +6 -0
- package/lib/internal/template/popover/internal.d.ts.map +1 -1
- package/lib/internal/template/popover/internal.js +3 -3
- package/lib/internal/template/popover/internal.js.map +1 -1
- package/lib/internal/template/popover/styles.css.js +58 -58
- package/lib/internal/template/popover/styles.scoped.css +114 -95
- package/lib/internal/template/popover/styles.selectors.js +58 -58
- package/lib/internal/template/progress-bar/index.d.ts.map +1 -1
- package/lib/internal/template/progress-bar/index.js +4 -3
- package/lib/internal/template/progress-bar/index.js.map +1 -1
- package/lib/internal/template/progress-bar/internal.d.ts +6 -1
- package/lib/internal/template/progress-bar/internal.d.ts.map +1 -1
- package/lib/internal/template/progress-bar/internal.js +2 -2
- package/lib/internal/template/progress-bar/internal.js.map +1 -1
- package/lib/internal/template/progress-bar/styles.css.js +20 -19
- package/lib/internal/template/progress-bar/styles.scoped.css +92 -59
- package/lib/internal/template/progress-bar/styles.selectors.js +20 -19
- package/lib/internal/template/prompt-input/styles.css.js +26 -26
- package/lib/internal/template/prompt-input/styles.scoped.css +105 -105
- package/lib/internal/template/prompt-input/styles.selectors.js +26 -26
- package/lib/internal/template/segmented-control/styles.css.js +31 -31
- package/lib/internal/template/segmented-control/styles.scoped.css +81 -81
- package/lib/internal/template/segmented-control/styles.selectors.js +31 -31
- package/lib/internal/template/select/internal.d.ts.map +1 -1
- package/lib/internal/template/select/internal.js +6 -3
- package/lib/internal/template/select/internal.js.map +1 -1
- package/lib/internal/template/select/parts/styles.css.js +21 -21
- package/lib/internal/template/select/parts/styles.scoped.css +24 -24
- package/lib/internal/template/select/parts/styles.selectors.js +21 -21
- package/lib/internal/template/select/utils/use-select.d.ts +4 -3
- package/lib/internal/template/select/utils/use-select.d.ts.map +1 -1
- package/lib/internal/template/select/utils/use-select.js +16 -29
- package/lib/internal/template/select/utils/use-select.js.map +1 -1
- 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/internal.d.ts +6 -1
- package/lib/internal/template/slider/internal.d.ts.map +1 -1
- package/lib/internal/template/slider/internal.js +3 -3
- package/lib/internal/template/slider/internal.js.map +1 -1
- package/lib/internal/template/slider/styles.css.js +26 -26
- package/lib/internal/template/slider/styles.scoped.css +202 -171
- 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-dropdown.scss +1 -0
- package/lib/internal/template/styling/button-group.scss +15 -0
- package/lib/internal/template/styling/container.scss +95 -0
- package/lib/internal/template/styling/copy-to-clipboard.scss +1 -0
- package/lib/internal/template/styling/date-input.scss +1 -0
- package/lib/internal/template/styling/divider.scss +15 -0
- package/lib/internal/template/styling/dropdown.scss +2 -2
- package/lib/internal/template/styling/popover.scss +58 -0
- package/lib/internal/template/styling/progress-bar.scss +36 -0
- package/lib/internal/template/styling/slider.scss +30 -0
- package/lib/internal/template/styling/text-filter.scss +19 -0
- package/lib/internal/template/styling/time-input.scss +1 -0
- package/lib/internal/template/styling/toggle-button.scss +1 -0
- package/lib/internal/template/styling/token.scss +49 -0
- package/lib/internal/template/styling/tooltip.scss +58 -0
- package/lib/internal/template/table/column-groups/col-group.d.ts +1 -1
- package/lib/internal/template/table/column-groups/col-group.d.ts.map +1 -1
- package/lib/internal/template/table/column-groups/col-group.js +3 -3
- package/lib/internal/template/table/column-groups/col-group.js.map +1 -1
- package/lib/internal/template/table/header-cell/group-header-cell.js +2 -2
- package/lib/internal/template/table/header-cell/group-header-cell.js.map +1 -1
- package/lib/internal/template/table/internal.d.ts.map +1 -1
- package/lib/internal/template/table/internal.js +1 -1
- package/lib/internal/template/table/internal.js.map +1 -1
- package/lib/internal/template/table/styles.css.js +37 -37
- package/lib/internal/template/table/styles.scoped.css +46 -46
- package/lib/internal/template/table/styles.selectors.js +37 -37
- package/lib/internal/template/table/use-column-widths.d.ts +2 -1
- package/lib/internal/template/table/use-column-widths.d.ts.map +1 -1
- package/lib/internal/template/table/use-column-widths.js +42 -11
- package/lib/internal/template/table/use-column-widths.js.map +1 -1
- package/lib/internal/template/tabs/styles.css.js +31 -30
- package/lib/internal/template/tabs/styles.scoped.css +93 -77
- package/lib/internal/template/tabs/styles.selectors.js +31 -30
- package/lib/internal/template/tabs/tab-header-bar.d.ts.map +1 -1
- package/lib/internal/template/tabs/tab-header-bar.js +54 -5
- 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/test-utils/dom/button-dropdown/index.d.ts +16 -0
- package/lib/internal/template/test-utils/dom/button-dropdown/index.js +28 -6
- package/lib/internal/template/test-utils/dom/button-dropdown/index.js.map +1 -1
- package/lib/internal/template/test-utils/selectors/button-dropdown/index.d.ts +16 -0
- package/lib/internal/template/test-utils/selectors/button-dropdown/index.js +32 -6
- package/lib/internal/template/test-utils/selectors/button-dropdown/index.js.map +1 -1
- 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/internal.d.ts +8 -1
- package/lib/internal/template/text-filter/internal.d.ts.map +1 -1
- package/lib/internal/template/text-filter/internal.js +3 -3
- package/lib/internal/template/text-filter/internal.js.map +1 -1
- package/lib/internal/template/text-filter/search-results.d.ts +1 -0
- package/lib/internal/template/text-filter/search-results.d.ts.map +1 -1
- package/lib/internal/template/text-filter/search-results.js +3 -2
- package/lib/internal/template/text-filter/search-results.js.map +1 -1
- package/lib/internal/template/text-filter/styles.css.js +3 -3
- package/lib/internal/template/text-filter/styles.scoped.css +6 -3
- 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 +51 -51
- package/lib/internal/template/textarea/styles.selectors.js +9 -9
- package/lib/internal/template/time-input/internal.d.ts +7 -1
- package/lib/internal/template/time-input/internal.d.ts.map +1 -1
- package/lib/internal/template/time-input/internal.js +2 -1
- package/lib/internal/template/time-input/internal.js.map +1 -1
- package/lib/internal/template/time-input/styles.css.js +1 -1
- package/lib/internal/template/time-input/styles.scoped.css +2 -1
- package/lib/internal/template/time-input/styles.selectors.js +1 -1
- package/lib/internal/template/toggle/styles.css.js +10 -10
- package/lib/internal/template/toggle/styles.scoped.css +25 -25
- package/lib/internal/template/toggle/styles.selectors.js +10 -10
- package/lib/internal/template/toggle-button/index.d.ts.map +1 -1
- package/lib/internal/template/toggle-button/index.js +1 -1
- package/lib/internal/template/toggle-button/index.js.map +1 -1
- package/lib/internal/template/toggle-button/internal.d.ts +2 -0
- package/lib/internal/template/toggle-button/internal.d.ts.map +1 -1
- package/lib/internal/template/toggle-button/internal.js +2 -2
- package/lib/internal/template/toggle-button/internal.js.map +1 -1
- package/lib/internal/template/toggle-button/styles.css.js +4 -4
- package/lib/internal/template/toggle-button/styles.scoped.css +5 -4
- package/lib/internal/template/toggle-button/styles.selectors.js +4 -4
- package/lib/internal/template/token/dismiss-button.d.ts +5 -3
- package/lib/internal/template/token/dismiss-button.d.ts.map +1 -1
- package/lib/internal/template/token/dismiss-button.js +6 -22
- package/lib/internal/template/token/dismiss-button.js.map +1 -1
- package/lib/internal/template/token/index.d.ts.map +1 -1
- package/lib/internal/template/token/index.js +1 -1
- package/lib/internal/template/token/index.js.map +1 -1
- package/lib/internal/template/token/internal.d.ts +6 -1
- package/lib/internal/template/token/internal.d.ts.map +1 -1
- package/lib/internal/template/token/internal.js +3 -3
- package/lib/internal/template/token/internal.js.map +1 -1
- package/lib/internal/template/token/styles.css.js +14 -14
- package/lib/internal/template/token/styles.d.ts +23 -1
- package/lib/internal/template/token/styles.d.ts.map +1 -1
- package/lib/internal/template/token/styles.js +22 -12
- package/lib/internal/template/token/styles.js.map +1 -1
- package/lib/internal/template/token/styles.scoped.css +67 -61
- package/lib/internal/template/token/styles.selectors.js +14 -14
- package/lib/internal/template/tooltip/internal.d.ts +6 -1
- package/lib/internal/template/tooltip/internal.d.ts.map +1 -1
- package/lib/internal/template/tooltip/internal.js +2 -2
- package/lib/internal/template/tooltip/internal.js.map +1 -1
- package/lib/internal/template/tooltip/styles.css.js +2 -2
- package/lib/internal/template/tooltip/styles.scoped.css +7 -5
- package/lib/internal/template/tooltip/styles.selectors.js +2 -2
- package/lib/internal/template/tutorial-panel/components/tutorial-detail-view/congratulation-screen.d.ts +1 -1
- package/lib/internal/template/tutorial-panel/components/tutorial-detail-view/congratulation-screen.d.ts.map +1 -1
- package/lib/internal/template/tutorial-panel/components/tutorial-detail-view/congratulation-screen.js.map +1 -1
- package/lib/internal/template/tutorial-panel/components/tutorial-detail-view/index.d.ts +1 -1
- package/lib/internal/template/tutorial-panel/components/tutorial-detail-view/index.d.ts.map +1 -1
- package/lib/internal/template/tutorial-panel/components/tutorial-detail-view/index.js.map +1 -1
- package/lib/internal/template/tutorial-panel/components/tutorial-detail-view/task-list.d.ts +1 -1
- package/lib/internal/template/tutorial-panel/components/tutorial-detail-view/task-list.d.ts.map +1 -1
- package/lib/internal/template/tutorial-panel/components/tutorial-detail-view/task-list.js.map +1 -1
- package/lib/internal/template/tutorial-panel/components/tutorial-detail-view/task.d.ts +1 -1
- package/lib/internal/template/tutorial-panel/components/tutorial-detail-view/task.d.ts.map +1 -1
- package/lib/internal/template/tutorial-panel/components/tutorial-detail-view/task.js +9 -5
- package/lib/internal/template/tutorial-panel/components/tutorial-detail-view/task.js.map +1 -1
- package/lib/internal/template/tutorial-panel/components/tutorial-list/index.d.ts +1 -1
- package/lib/internal/template/tutorial-panel/components/tutorial-list/index.d.ts.map +1 -1
- package/lib/internal/template/tutorial-panel/components/tutorial-list/index.js.map +1 -1
- package/lib/internal/template/tutorial-panel/index.d.ts.map +1 -1
- package/lib/internal/template/tutorial-panel/index.js +27 -1
- package/lib/internal/template/tutorial-panel/index.js.map +1 -1
- package/lib/internal/template/tutorial-panel/interfaces.d.ts +19 -18
- package/lib/internal/template/tutorial-panel/interfaces.d.ts.map +1 -1
- package/lib/internal/template/tutorial-panel/interfaces.js.map +1 -1
- package/package.json +1 -1
- package/lib/internal/template/select/utils/use-load-items.d.ts +0 -15
- package/lib/internal/template/select/utils/use-load-items.d.ts.map +0 -1
- package/lib/internal/template/select/utils/use-load-items.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import { ButtonProps } from '../button/interfaces';
|
|
3
|
-
import { ExpandToViewport } from '../dropdown/interfaces';
|
|
3
|
+
import { ExpandToViewport, OptionsLoadItemsDetail } from '../dropdown/interfaces';
|
|
4
4
|
import { IconProps } from '../icon/interfaces';
|
|
5
5
|
import { BaseComponentProps } from '../types/base-component';
|
|
6
|
-
import { BaseNavigationDetail, CancelableEventHandler } from '../types/events';
|
|
6
|
+
import { BaseNavigationDetail, CancelableEventHandler, NonCancelableEventHandler } from '../types/events';
|
|
7
7
|
/**
|
|
8
8
|
* @awsuiSystem core
|
|
9
9
|
*/
|
|
@@ -15,7 +15,7 @@ export interface ButtonDropdownProps extends BaseComponentProps, ExpandToViewpor
|
|
|
15
15
|
* The following properties are supported across all types:
|
|
16
16
|
*
|
|
17
17
|
* - `type` (string) - The type of the item. Can be `action`, `group`, `checkbox`. Defaults to `action` if `items` undefined and `group` otherwise.
|
|
18
|
-
* - `id` (string) - allows to identify the item that the user clicked on. Mandatory for individual items, optional for categories.
|
|
18
|
+
* - `id` (string) - allows to identify the item that the user clicked on. Mandatory for individual items, optional for categories. Mandatory for expandable groups whose items you load asynchronously.
|
|
19
19
|
* - `text` (string) - description shown in the menu for this item. Mandatory for individual items, optional for categories.
|
|
20
20
|
* - `lang` (string) - (Optional) The language of the item, provided as a BCP 47 language tag.
|
|
21
21
|
* - `disabled` (boolean) - whether the item is disabled. Disabled items are not clickable, but they can be highlighted with the keyboard to make them accessible.
|
|
@@ -152,6 +152,7 @@ export interface ButtonDropdownProps extends BaseComponentProps, ExpandToViewpor
|
|
|
152
152
|
iconSvg?: React.ReactNode;
|
|
153
153
|
/**
|
|
154
154
|
* Controls expandability of the item groups.
|
|
155
|
+
* If group items are loaded asynchronously, return each group's status from `getExpandableItemsAsyncLoadingState`.
|
|
155
156
|
*/
|
|
156
157
|
expandableGroups?: boolean;
|
|
157
158
|
/**
|
|
@@ -191,11 +192,69 @@ export interface ButtonDropdownProps extends BaseComponentProps, ExpandToViewpor
|
|
|
191
192
|
*/
|
|
192
193
|
fullWidth?: boolean;
|
|
193
194
|
/**
|
|
194
|
-
*
|
|
195
|
+
* Contains all the properties for async loading. Make sure to listen to `onLoadItems`.
|
|
196
|
+
*
|
|
197
|
+
* The text properties (`empty`, `loadingText`, `finishedText`, `errorText`) are functions that receive the
|
|
198
|
+
* `expandedGroupId` when the status belongs to an expandable group, and no argument for the root list.
|
|
199
|
+
* * `empty` - (Optional) Displayed when there are no items to display. This is only shown when `statusType` is set to `finished` or not set at all.
|
|
200
|
+
* * `loadingText` - (Optional) Specifies the text to display when in the loading state.
|
|
201
|
+
* * `finishedText` - (Optional) Specifies the text to display at the bottom of the dropdown menu after pagination has reached the end.
|
|
202
|
+
* * `errorText` - (Optional) Specifies the text to display when a data fetching error occurs. Make sure that you provide `recoveryText`.
|
|
203
|
+
* * `recoveryText` (i18n) - (Optional) Specifies the text for the recovery button. The text is displayed next to the error text. Use the `onLoadItems` event to perform a recovery action (for example, retrying the request).
|
|
204
|
+
* * `errorIconAriaLabel` (i18n) - (Optional) Provides a text alternative for the error icon in the error message.
|
|
205
|
+
* * `statusType` - (Optional) Specifies the current status of loading more items.
|
|
206
|
+
* * * `pending` - Indicates that no request is in progress, but more items may be loaded.
|
|
207
|
+
* * * `loading` - Indicates that data fetching is in progress.
|
|
208
|
+
* * * `finished` - Indicates that pagination has finished and no more requests are expected.
|
|
209
|
+
* * * `error` - Indicates that an error occurred during fetch. You should use `recoveryText` to enable the user to recover.
|
|
210
|
+
*/
|
|
211
|
+
asyncLoadingProps?: ButtonDropdownProps.AsyncLoadingProps;
|
|
212
|
+
/**
|
|
213
|
+
* Use this event to implement the asynchronous behavior for the component.
|
|
214
|
+
*
|
|
215
|
+
* The event is called in the following situations:
|
|
216
|
+
* * The dropdown opens, unless the same filtering text was already requested.
|
|
217
|
+
* * The user types inside the filtering input field.
|
|
218
|
+
* * The user scrolls to the end of the list of items, if `statusType` is set to `pending`.
|
|
219
|
+
* * The user clicks on the recovery button in the error state.
|
|
220
|
+
* * The user expands an expandable group that has an `id`.
|
|
221
|
+
*
|
|
222
|
+
* The detail object contains the following properties:
|
|
223
|
+
* * `filteringText` - The value that you need to use to fetch items. It is empty for events about an expandable group.
|
|
224
|
+
* * `firstPage` - Indicates that you should fetch the first page of items that match the `filteringText`.
|
|
225
|
+
* * `samePage` - Indicates that you should fetch the same page that you have previously fetched (for example, when the user clicks on the recovery button).
|
|
226
|
+
* * `expandedGroupId` - Set when the event is about an expandable group: the ID of the group whose items you need to load.
|
|
227
|
+
**/
|
|
228
|
+
onLoadItems?: NonCancelableEventHandler<ButtonDropdownProps.LoadItemsDetail>;
|
|
229
|
+
/**
|
|
230
|
+
* Specifies the async loading status of individual expandable groups.
|
|
231
|
+
* Use only if you load the nested items asynchronously upon expanding a group.
|
|
232
|
+
*
|
|
233
|
+
* Return values are:
|
|
234
|
+
* * `pending` - Indicates that no request in progress, but more options may be loaded.
|
|
235
|
+
* * `loading` - Indicates that data fetching is in progress.
|
|
236
|
+
* * `finished` - Indicates that the group's items are loaded and no more requests are expected.
|
|
237
|
+
* * `error` - Indicates that an error occurred during fetch. You should use `recoveryText` to enable the user to recover.
|
|
238
|
+
*
|
|
239
|
+
* If null or undefined, the status will be treated as `finished`.
|
|
240
|
+
*/
|
|
241
|
+
getExpandableItemsAsyncLoadingState?: (options: {
|
|
242
|
+
item: ButtonDropdownProps.ItemGroup;
|
|
243
|
+
}) => ButtonDropdownProps.AsyncLoadingStatusType | null | undefined;
|
|
244
|
+
/**
|
|
245
|
+
* Determines how filtering is applied to the dropdown `items`:
|
|
246
|
+
*
|
|
247
|
+
* * `auto` - The component will automatically filter items based on user input.
|
|
248
|
+
* * `manual` - You will set up `onLoadItems` event listeners and filter items on your side or request
|
|
249
|
+
* them from server.
|
|
250
|
+
*
|
|
251
|
+
* If you set this property to `auto`, the component will filter the provided `items` based on the value of the filtering input field.
|
|
252
|
+
* The filtering text is matched against the item's `text`, `secondaryText`, and `labelTag`.
|
|
253
|
+
*
|
|
254
|
+
* If you set this property to `manual`, the default filtering mechanism is disabled and all provided `items` are
|
|
255
|
+
* displayed in the dropdown list. In that case make sure that you use the `onLoadItems` events in order
|
|
256
|
+
* to set the `items` property to the items that are relevant for the user, given the filtering input value.
|
|
195
257
|
*
|
|
196
|
-
* When set to `auto`, a search input is rendered inside the dropdown and the items are filtered as the user
|
|
197
|
-
* types. Items are matched client-side using a case-insensitive substring match against their `text`,
|
|
198
|
-
* `secondaryText`, and `labelTag`.
|
|
199
258
|
*/
|
|
200
259
|
filteringType?: ButtonDropdownProps.FilteringType;
|
|
201
260
|
/**
|
|
@@ -218,6 +277,7 @@ export interface ButtonDropdownProps extends BaseComponentProps, ExpandToViewpor
|
|
|
218
277
|
filteringResultsText?: (matchesCount: number, totalCount: number) => string;
|
|
219
278
|
/**
|
|
220
279
|
* Displayed when filtering is enabled and there are no matches for the filtering input.
|
|
280
|
+
* With `filteringType="manual"`, this is shown when you set `items` to an empty array while the filtering input has a value.
|
|
221
281
|
*/
|
|
222
282
|
noMatch?: React.ReactNode;
|
|
223
283
|
/**
|
|
@@ -265,7 +325,49 @@ export interface ButtonDropdownProps extends BaseComponentProps, ExpandToViewpor
|
|
|
265
325
|
export declare namespace ButtonDropdownProps {
|
|
266
326
|
type Variant = 'normal' | 'primary' | 'icon' | 'inline-icon';
|
|
267
327
|
type ItemType = 'action' | 'group';
|
|
268
|
-
type FilteringType = 'auto' | '
|
|
328
|
+
type FilteringType = 'none' | 'auto' | 'manual';
|
|
329
|
+
interface AsyncLoadingProps {
|
|
330
|
+
/**
|
|
331
|
+
* Displayed when there are no items to display.
|
|
332
|
+
* This is only shown when `statusType` is set to `finished` or not set at all.
|
|
333
|
+
*/
|
|
334
|
+
empty?: (expandedGroupId?: string) => ReactNode;
|
|
335
|
+
/**
|
|
336
|
+
* Specifies the text to display when in the loading state.
|
|
337
|
+
**/
|
|
338
|
+
loadingText?: (expandedGroupId?: string) => string;
|
|
339
|
+
/**
|
|
340
|
+
* Specifies the text to display at the bottom of the dropdown menu after pagination has reached the end.
|
|
341
|
+
**/
|
|
342
|
+
finishedText?: (expandedGroupId?: string) => string;
|
|
343
|
+
/**
|
|
344
|
+
* Specifies the text to display when a data fetching error occurs. Make sure that you provide `recoveryText`.
|
|
345
|
+
**/
|
|
346
|
+
errorText?: (expandedGroupId?: string) => string;
|
|
347
|
+
/**
|
|
348
|
+
* Specifies the text for the recovery button. The text is displayed next to the error text.
|
|
349
|
+
* Use the `onLoadItems` event to perform a recovery action (for example, retrying the request).
|
|
350
|
+
* @i18n
|
|
351
|
+
**/
|
|
352
|
+
recoveryText?: string;
|
|
353
|
+
/**
|
|
354
|
+
* Provides a text alternative for the error icon in the error message.
|
|
355
|
+
* @i18n
|
|
356
|
+
*/
|
|
357
|
+
errorIconAriaLabel?: string;
|
|
358
|
+
/**
|
|
359
|
+
* Specifies the current status of loading more items.
|
|
360
|
+
* * `pending` - Indicates that no request is in progress, but more items may be loaded.
|
|
361
|
+
* * `loading` - Indicates that data fetching is in progress.
|
|
362
|
+
* * `finished` - Indicates that pagination has finished and no more requests are expected.
|
|
363
|
+
* * `error` - Indicates that an error occurred during fetch. You should use `recoveryText` to enable the user to recover.
|
|
364
|
+
**/
|
|
365
|
+
statusType?: ButtonDropdownProps.AsyncLoadingStatusType;
|
|
366
|
+
}
|
|
367
|
+
type AsyncLoadingStatusType = 'pending' | 'loading' | 'finished' | 'error';
|
|
368
|
+
interface LoadItemsDetail extends OptionsLoadItemsDetail {
|
|
369
|
+
expandedGroupId?: string;
|
|
370
|
+
}
|
|
269
371
|
interface I18nStrings {
|
|
270
372
|
filteringItemAriaDescription?: string;
|
|
271
373
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/button-dropdown/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/button-dropdown/interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAClF,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC1G;;GAEG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE9D,MAAM,WAAW,mBAAoB,SAAQ,kB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AmB,CAAC,SAAS,EAAE,KAAK,EAAE,KAAK,CAAC,cAAc,KAAK,IAAI,CAAC;AACrG,MAAM,MAAM,YAAY,GAAG,CACzB,IAAI,EAAE,mBAAmB,CAAC,IAAI,GAAG,mBAAmB,CAAC,YAAY,EACjE,KAAK,EAAE,KAAK,CAAC,UAAU,GAAG,KAAK,CAAC,aAAa,KAC1C,IAAI,CAAC;AAEV,MAAM,WAAW,QAAS,SAAQ,mBAAmB,CAAC,IAAI;IACxD,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IACnC,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,QAAQ,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,YAAY,EAAE,OAAO,CAAC;CACvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/button-dropdown/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { ReactNode } from 'react';\n\nimport { ButtonProps } from '../button/interfaces';\nimport { ExpandToViewport } from '../dropdown/interfaces';\nimport { IconProps } from '../icon/interfaces';\nimport { BaseComponentProps } from '../types/base-component';\nimport { BaseNavigationDetail, CancelableEventHandler } from '../types/events';\n/**\n * @awsuiSystem core\n */\nimport { NativeAttributes } from '../types/native-attributes';\n\nexport interface ButtonDropdownProps extends BaseComponentProps, ExpandToViewport {\n /**\n * Array of objects with a number of supported types.\n *\n * The following properties are supported across all types:\n *\n * - `type` (string) - The type of the item. Can be `action`, `group`, `checkbox`. Defaults to `action` if `items` undefined and `group` otherwise.\n * - `id` (string) - allows to identify the item that the user clicked on. Mandatory for individual items, optional for categories.\n * - `text` (string) - description shown in the menu for this item. Mandatory for individual items, optional for categories.\n * - `lang` (string) - (Optional) The language of the item, provided as a BCP 47 language tag.\n * - `disabled` (boolean) - whether the item is disabled. Disabled items are not clickable, but they can be highlighted with the keyboard to make them accessible.\n * - `disabledReason` (string) - (Optional) Displays text near the `text` property when item is disabled. Use to provide additional context.\n * - `description` (string) - additional data that will be passed to a `data-description` attribute. **Deprecated**, has no effect.\n * - `ariaLabel` (string) - (Optional) - ARIA label of the item element.\n * - `dataAttributes` (Record<string, string>) - (Optional) Custom data attributes for the item element. Attribute names are automatically prefixed with \"data-\". The \"testid\" key is reserved.\n *\n * ### action\n *\n * - `href` (string) - (Optional) Defines the target URL of the menu item, turning it into a link.\n * - `download` (boolean | string) - (Optional) Indicates that the link should be downloaded when clicked. Only works when `href` is also provided. If set to `true`, the browser will use the filename from the URL. If set to a string, that string will be used as the suggested filename.\n * - `external` (boolean) - Marks a menu item as external by adding an icon after the menu item text. The link will open in a new tab when clicked. Note that this only works when `href` is also provided.\n * - `externalIconAriaLabel` (string) - Adds an `aria-label` to the external icon.\n * - `iconName` (string) - (Optional) Specifies the name of the icon, used with the [icon component](/components/icon/).\n * - `iconAlt` (string) - (Optional) Specifies alternate text for the icon when using `iconUrl`.\n * - `iconUrl` (string) - (Optional) Specifies the URL of a custom icon.\n * - `iconSvg` (ReactNode) - (Optional) Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n * - `secondaryText` (string) - (Optional) Further information about the action that appears below the label.\n * - `labelTag` (string) - (Optional) - A label tag that provides additional guidance, shown next to the label.\n *\n * ### checkbox\n *\n * When `type` is set to \"checkbox\", the values set to `href`, `external` and `externalIconAriaLabel` will be ignored.\n *\n * - `checked` (boolean) - Controls the state of the checkbox item.\n * - `iconName` (string) - (Optional) Specifies the name of the icon, used with the [icon component](/components/icon/).\n * - `iconAlt` (string) - (Optional) Specifies alternate text for the icon when using `iconUrl`.\n * - `iconUrl` (string) - (Optional) Specifies the URL of a custom icon.\n * - `iconSvg` (ReactNode) - (Optional) Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n * - `secondaryText` (string) - (Optional) Further information about the action that appears below the label.\n * - `labelTag` (string) - (Optional) - A label tag that provides additional guidance, shown next to the label.\n *\n * ### group\n *\n * - `items` (ReadonlyArray<Item>) - an array of item objects. Items will be rendered as nested menu items but only for the first nesting level, multi-nesting is not supported.\n * An item which belongs to nested group has the following properties: `id`, `text`, `disabled`, and `description`.\n * - `expandable` (boolean) - (Optional) Defines whether the group is expandable (this overrides the component-level `expandableGroups` property).\n *\n */\n items: ReadonlyArray<ButtonDropdownProps.ItemOrGroup>;\n\n /**\n * Specifies a render function to render custom options in the dropdown menu.\n *\n * The item inside the props has a different shape depending on its type:\n *\n *\n * ### action\n *\n * - `type` ('action') - The item type.\n * - `index` (number) - The item's position relative to its parent.\n * - `option` (Item) - The original item configuration.\n * - `highlighted` (boolean) - Whether the item is currently highlighted.\n * - `disabled` (boolean) - Whether the item is disabled.\n * - `parent` (GroupRenderItem | null) - The parent group item, if any.\n * - `filterText` (string) - The current value of the filtering input, when filtering is enabled.\n *\n * ### checkbox\n *\n * - `type` ('checkbox') - The item type.\n * - `index` (number) - The item's position relative to its parent.\n * - `option` (CheckboxItem) - The original item configuration.\n * - `disabled` (boolean) - Whether the item is disabled.\n * - `highlighted` (boolean) - Whether the item is currently highlighted.\n * - `checked` (boolean) - Controls the state of the checkbox item.\n * - `parent` (GroupRenderItem | null) - The parent group item, if any.\n * - `filterText` (string) - The current value of the filtering input, when filtering is enabled.\n *\n * ### group\n *\n * - `type` ('group') - The item type.\n * - `index` (number) - The item's position in the list.\n * - `option` (ItemGroup) - The original item configuration.\n * - `disabled` (boolean) - Whether the item is disabled.\n * - `highlighted` (boolean) - Whether the item is currently highlighted.\n * - `expanded` (boolean) - Whether the group is expanded.\n * - `expandDirection` ('vertical' | 'horizontal') - The direction in which the group expands.\n * - `filterText` (string) - The current value of the filtering input, when filtering is enabled.\n *\n * When providing a custom `renderItem` implementation, it fully replaces the default visual rendering and content for that item.\n * The component still manages focus, keyboard interactions, and selection state, but it no longer applies its default item layout or typography.\n *\n * When returning `null`, the default styling will be applied.\n */\n renderItem?: ButtonDropdownProps.ItemRenderer;\n\n /**\n * Determines whether the button dropdown is disabled. Users cannot interact with the control if it's disabled.\n */\n disabled?: boolean;\n /**\n * Provides a reason why the button dropdown is disabled (only when `disabled` is `true`).\n * If provided, the disabled button becomes focusable.\n *\n * Do not place interactive elements like links or buttons.\n */\n disabledReason?: React.ReactNode;\n /**\n * Renders the button as being in a loading state. It takes precedence over the `disabled` if both are set to `true`.\n * It prevents clicks.\n */\n loading?: boolean;\n /**\n * Specifies the text that screen reader announces when the button dropdown is in a loading state.\n */\n loadingText?: string;\n /** Determines the general styling of the button dropdown.\n * * `primary` for primary buttons\n * * `normal` for secondary buttons\n * * `icon` for icon buttons\n * * `inline-icon` for icon buttons with no outer padding\n */\n variant?: ButtonDropdownProps.Variant;\n /**\n * Specifies the name of the icon used in the button dropdown trigger, used with the [icon component](/components/icon/).\n * Defaults to `ellipsis`. Applies to the `icon` and `inline-icon` variants only.\n */\n iconName?: IconProps.Name;\n /**\n * Specifies alternate text for a custom icon, for use with `iconUrl`. Applies to the `icon` and `inline-icon` variants only.\n */\n iconAlt?: string;\n /**\n * Specifies the URL of a custom icon. Applies to the `icon` and `inline-icon` variants only.\n *\n * If you set both `iconUrl` and `iconSvg`, `iconSvg` will take precedence.\n */\n iconUrl?: string;\n /**\n * Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n * Applies to the `icon` and `inline-icon` variants only.\n *\n * If you set both `iconUrl` and `iconSvg`, `iconSvg` will take precedence.\n */\n iconSvg?: React.ReactNode;\n /**\n * Controls expandability of the item groups.\n */\n expandableGroups?: boolean;\n /**\n * Adds `aria-label` to the button dropdown trigger.\n * Use this to provide an accessible name for buttons that don't have visible text.\n */\n ariaLabel?: string;\n /**\n * Text displayed in the button dropdown trigger.\n * @displayname text\n */\n children?: React.ReactNode;\n /**\n * Called when the user clicks on an item, and the item is not disabled. The event detail object contains the id of the clicked item.\n */\n onItemClick?: CancelableEventHandler<ButtonDropdownProps.ItemClickDetails>;\n /**\n * Called when the user clicks on an item with the left mouse button without pressing\n * modifier keys (that is, CTRL, ALT, SHIFT, META), and the item has an `href` set.\n */\n onItemFollow?: CancelableEventHandler<ButtonDropdownProps.ItemClickDetails>;\n /**\n * A standalone action that is shown prior to the dropdown trigger.\n * Use it with \"primary\" and \"normal\" variant only.\n *\n * Main action properties:\n * * `text` (string) - Specifies the text shown in the main action.\n * * `external` (boolean) - Marks the main action as external by adding an icon after the text. The link will open in a new tab when clicked. Note that this only works when `href` is also provided.\n * * `externalIconAriaLabel` (string) - Adds an ARIA label to the external icon.\n *\n * The main action also supports the following properties of the [button](/components/button/?tabId=api) component:\n * `ariaLabel`, `disabled`, `loading`, `loadingText`, `href`, `target`, `rel`, `download`, `iconAlt`, `iconName`, `iconUrl`, `iconSvg`, `onClick`, `onFollow`.\n */\n mainAction?: ButtonDropdownProps.MainAction;\n\n /**\n * Sets the button width to be 100% of the parent container width. Button content is centered.\n */\n fullWidth?: boolean;\n\n /**\n * Enables filtering of the dropdown items.\n *\n * When set to `auto`, a search input is rendered inside the dropdown and the items are filtered as the user\n * types. Items are matched client-side using a case-insensitive substring match against their `text`,\n * `secondaryText`, and `labelTag`.\n */\n filteringType?: ButtonDropdownProps.FilteringType;\n\n /**\n * Specifies the placeholder to display in the filtering input. Only relevant when filtering is enabled.\n */\n filteringPlaceholder?: string;\n\n /**\n * Adds an `aria-label` to the filtering input. Only relevant when filtering is enabled.\n */\n filteringAriaLabel?: string;\n\n /**\n * Adds an `aria-label` to the clear button inside the filtering input. Only relevant when filtering is enabled.\n * @i18n\n */\n filteringClearAriaLabel?: string;\n\n /**\n * Specifies the text to display with the number of matches at the bottom of the dropdown menu while filtering.\n * @i18n\n */\n filteringResultsText?: (matchesCount: number, totalCount: number) => string;\n\n /**\n * Displayed when filtering is enabled and there are no matches for the filtering input.\n */\n noMatch?: React.ReactNode;\n\n /**\n * An object containing all the necessary localized strings required by the component.\n * @i18n\n */\n i18nStrings?: ButtonDropdownProps.I18nStrings;\n\n /**\n * Attributes to add to the native `button` element.\n * Some attributes will be automatically combined with internal attribute values:\n * - `className` will be appended.\n * - Event handlers will be chained, unless the default is prevented.\n *\n * We do not support using this attribute to apply custom styling.\n *\n * Pass a `ref` to access the native element for measurement, observation, or third-party integration.\n * For actions such as focus or selection, use the component's explicit ref methods;\n * operations performed directly on the native element may bypass the built-in component's behaviors.\n *\n * @awsuiSystem core\n */\n nativeTriggerAttributes?: NativeAttributes<React.ButtonHTMLAttributes<HTMLButtonElement>>;\n\n /**\n * Attributes to add to the native element of the `mainAction`.\n *\n * Specify either `button` for a standard main action, or `anchor` if `html` is set.\n *\n * Some attributes will be automatically combined with internal attribute values:\n * - `className` will be appended.\n * - Event handlers will be chained, unless the default is prevented.\n *\n * We do not support using this attribute to apply custom styling.\n *\n * Pass a `ref` to access the native element for measurement, observation, or third-party integration.\n * For actions such as focus or selection, use the component's explicit ref methods;\n * operations performed directly on the native element may bypass the built-in component's behaviors.\n *\n * @awsuiSystem core\n */\n nativeMainActionAttributes?: {\n button?: NativeAttributes<React.ButtonHTMLAttributes<HTMLButtonElement>>;\n anchor?: NativeAttributes<React.AnchorHTMLAttributes<HTMLAnchorElement>>;\n };\n}\n\nexport namespace ButtonDropdownProps {\n export type Variant = 'normal' | 'primary' | 'icon' | 'inline-icon';\n export type ItemType = 'action' | 'group';\n export type FilteringType = 'auto' | 'none';\n\n export interface I18nStrings {\n filteringItemAriaDescription?: string;\n }\n\n export interface ActionRenderItem {\n type: 'action';\n index: number;\n option: Item;\n highlighted: boolean;\n disabled: boolean;\n parent: GroupRenderItem | null;\n }\n export interface CheckboxRenderItem {\n type: 'checkbox';\n index: number;\n option: CheckboxItem;\n disabled: boolean;\n highlighted: boolean;\n checked: boolean;\n parent: GroupRenderItem | null;\n }\n export interface GroupRenderItem {\n type: 'group';\n index: number;\n option: ItemGroup;\n disabled: boolean;\n highlighted: boolean;\n expanded: boolean;\n expandDirection: 'vertical' | 'horizontal';\n }\n\n export type RenderItem = ActionRenderItem | CheckboxRenderItem | GroupRenderItem;\n export type ItemRenderer = (props: { item: ButtonDropdownProps.RenderItem; filterText?: string }) => ReactNode | null;\n\n export interface MainAction {\n text?: string;\n ariaLabel?: string;\n onClick?: CancelableEventHandler<ButtonProps.ClickDetail>;\n onFollow?: CancelableEventHandler<ButtonProps.FollowDetail>;\n disabled?: boolean;\n disabledReason?: React.ReactNode;\n loading?: boolean;\n loadingText?: string;\n href?: string;\n target?: string;\n rel?: string;\n download?: boolean | string;\n external?: boolean;\n externalIconAriaLabel?: string;\n iconAlt?: string;\n iconName?: IconProps.Name;\n iconUrl?: string;\n iconSvg?: React.ReactNode;\n }\n\n export interface Item {\n itemType?: ItemType;\n id: string;\n text: string;\n secondaryText?: string;\n ariaLabel?: string;\n lang?: string;\n disabled?: boolean;\n disabledReason?: string;\n /**\n * @deprecated Has no effect.\n */\n description?: string;\n href?: string;\n download?: boolean | string;\n external?: boolean;\n externalIconAriaLabel?: string;\n iconAlt?: string;\n iconName?: IconProps.Name;\n iconUrl?: string;\n iconSvg?: React.ReactNode;\n labelTag?: string;\n dataAttributes?: Record<string, string>;\n }\n\n export interface CheckboxItem\n extends Omit<ButtonDropdownProps.Item, 'href' | 'download' | 'external' | 'externalIconAriaLabel' | 'itemType'> {\n itemType: 'checkbox';\n checked: boolean;\n }\n\n export interface ItemGroup extends Omit<Item, 'id' | 'text' | 'itemType' | 'secondaryText' | 'labelTag'> {\n itemType?: 'group';\n id?: string;\n text?: string;\n items: Items;\n /**\n * Controls whether this group renders as an expandable submenu, overriding `expandableGroups`\n * for this group. Defaults to the `expandableGroups` value when unset.\n */\n expandable?: boolean;\n }\n\n export type ItemOrGroup = Item | CheckboxItem | ItemGroup;\n\n export type Items = ReadonlyArray<ItemOrGroup>;\n\n export interface ItemClickDetails extends BaseNavigationDetail {\n id: string;\n checked?: boolean;\n }\n\n export interface Ref {\n /**\n * Focuses the underlying native button. If a main action is defined this will focus that button.\n */\n focus(options?: FocusOptions): void;\n /**\n * Focuses the underlying native button for the dropdown.\n */\n focusDropdownTrigger(options?: FocusOptions): void;\n }\n}\n\nexport interface ButtonDropdownSettings {\n // this means whether action is required to make group expand\n hasExpandableGroups: boolean;\n // on smaller screens expandable groups are integrated into parent dropdown\n // this changes keyboard navigation, highlight and activation behavior for parent dropdown\n isInRestrictedView?: boolean;\n}\n\nexport interface HighlightProps {\n targetItem: ButtonDropdownProps.ItemOrGroup | null;\n isHighlighted: (item: ButtonDropdownProps.ItemOrGroup) => boolean;\n isKeyboardHighlight: (item: ButtonDropdownProps.ItemOrGroup) => boolean;\n isExpanded: (group: ButtonDropdownProps.ItemGroup) => boolean;\n highlightItem: (item: ButtonDropdownProps.ItemOrGroup) => void;\n}\n\nexport type GroupToggle = (item: ButtonDropdownProps.ItemGroup, event: React.SyntheticEvent) => void;\nexport type ItemActivate = (\n item: ButtonDropdownProps.Item | ButtonDropdownProps.CheckboxItem,\n event: React.MouseEvent | React.KeyboardEvent\n) => void;\n\nexport interface LinkItem extends ButtonDropdownProps.Item {\n href: string;\n}\n\nexport interface CustomTriggerProps {\n triggerRef: React.Ref<HTMLElement>;\n testUtilsClass: string;\n ariaLabel: string | undefined;\n disabled: boolean;\n disabledReason?: React.ReactNode;\n isOpen: boolean;\n onClick: () => void;\n ariaExpanded: boolean;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/button-dropdown/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { ReactNode } from 'react';\n\nimport { ButtonProps } from '../button/interfaces';\nimport { ExpandToViewport, OptionsLoadItemsDetail } from '../dropdown/interfaces';\nimport { IconProps } from '../icon/interfaces';\nimport { BaseComponentProps } from '../types/base-component';\nimport { BaseNavigationDetail, CancelableEventHandler, NonCancelableEventHandler } from '../types/events';\n/**\n * @awsuiSystem core\n */\nimport { NativeAttributes } from '../types/native-attributes';\n\nexport interface ButtonDropdownProps extends BaseComponentProps, ExpandToViewport {\n /**\n * Array of objects with a number of supported types.\n *\n * The following properties are supported across all types:\n *\n * - `type` (string) - The type of the item. Can be `action`, `group`, `checkbox`. Defaults to `action` if `items` undefined and `group` otherwise.\n * - `id` (string) - allows to identify the item that the user clicked on. Mandatory for individual items, optional for categories. Mandatory for expandable groups whose items you load asynchronously.\n * - `text` (string) - description shown in the menu for this item. Mandatory for individual items, optional for categories.\n * - `lang` (string) - (Optional) The language of the item, provided as a BCP 47 language tag.\n * - `disabled` (boolean) - whether the item is disabled. Disabled items are not clickable, but they can be highlighted with the keyboard to make them accessible.\n * - `disabledReason` (string) - (Optional) Displays text near the `text` property when item is disabled. Use to provide additional context.\n * - `description` (string) - additional data that will be passed to a `data-description` attribute. **Deprecated**, has no effect.\n * - `ariaLabel` (string) - (Optional) - ARIA label of the item element.\n * - `dataAttributes` (Record<string, string>) - (Optional) Custom data attributes for the item element. Attribute names are automatically prefixed with \"data-\". The \"testid\" key is reserved.\n *\n * ### action\n *\n * - `href` (string) - (Optional) Defines the target URL of the menu item, turning it into a link.\n * - `download` (boolean | string) - (Optional) Indicates that the link should be downloaded when clicked. Only works when `href` is also provided. If set to `true`, the browser will use the filename from the URL. If set to a string, that string will be used as the suggested filename.\n * - `external` (boolean) - Marks a menu item as external by adding an icon after the menu item text. The link will open in a new tab when clicked. Note that this only works when `href` is also provided.\n * - `externalIconAriaLabel` (string) - Adds an `aria-label` to the external icon.\n * - `iconName` (string) - (Optional) Specifies the name of the icon, used with the [icon component](/components/icon/).\n * - `iconAlt` (string) - (Optional) Specifies alternate text for the icon when using `iconUrl`.\n * - `iconUrl` (string) - (Optional) Specifies the URL of a custom icon.\n * - `iconSvg` (ReactNode) - (Optional) Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n * - `secondaryText` (string) - (Optional) Further information about the action that appears below the label.\n * - `labelTag` (string) - (Optional) - A label tag that provides additional guidance, shown next to the label.\n *\n * ### checkbox\n *\n * When `type` is set to \"checkbox\", the values set to `href`, `external` and `externalIconAriaLabel` will be ignored.\n *\n * - `checked` (boolean) - Controls the state of the checkbox item.\n * - `iconName` (string) - (Optional) Specifies the name of the icon, used with the [icon component](/components/icon/).\n * - `iconAlt` (string) - (Optional) Specifies alternate text for the icon when using `iconUrl`.\n * - `iconUrl` (string) - (Optional) Specifies the URL of a custom icon.\n * - `iconSvg` (ReactNode) - (Optional) Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n * - `secondaryText` (string) - (Optional) Further information about the action that appears below the label.\n * - `labelTag` (string) - (Optional) - A label tag that provides additional guidance, shown next to the label.\n *\n * ### group\n *\n * - `items` (ReadonlyArray<Item>) - an array of item objects. Items will be rendered as nested menu items but only for the first nesting level, multi-nesting is not supported.\n * An item which belongs to nested group has the following properties: `id`, `text`, `disabled`, and `description`.\n * - `expandable` (boolean) - (Optional) Defines whether the group is expandable (this overrides the component-level `expandableGroups` property).\n *\n */\n items: ReadonlyArray<ButtonDropdownProps.ItemOrGroup>;\n\n /**\n * Specifies a render function to render custom options in the dropdown menu.\n *\n * The item inside the props has a different shape depending on its type:\n *\n *\n * ### action\n *\n * - `type` ('action') - The item type.\n * - `index` (number) - The item's position relative to its parent.\n * - `option` (Item) - The original item configuration.\n * - `highlighted` (boolean) - Whether the item is currently highlighted.\n * - `disabled` (boolean) - Whether the item is disabled.\n * - `parent` (GroupRenderItem | null) - The parent group item, if any.\n * - `filterText` (string) - The current value of the filtering input, when filtering is enabled.\n *\n * ### checkbox\n *\n * - `type` ('checkbox') - The item type.\n * - `index` (number) - The item's position relative to its parent.\n * - `option` (CheckboxItem) - The original item configuration.\n * - `disabled` (boolean) - Whether the item is disabled.\n * - `highlighted` (boolean) - Whether the item is currently highlighted.\n * - `checked` (boolean) - Controls the state of the checkbox item.\n * - `parent` (GroupRenderItem | null) - The parent group item, if any.\n * - `filterText` (string) - The current value of the filtering input, when filtering is enabled.\n *\n * ### group\n *\n * - `type` ('group') - The item type.\n * - `index` (number) - The item's position in the list.\n * - `option` (ItemGroup) - The original item configuration.\n * - `disabled` (boolean) - Whether the item is disabled.\n * - `highlighted` (boolean) - Whether the item is currently highlighted.\n * - `expanded` (boolean) - Whether the group is expanded.\n * - `expandDirection` ('vertical' | 'horizontal') - The direction in which the group expands.\n * - `filterText` (string) - The current value of the filtering input, when filtering is enabled.\n *\n * When providing a custom `renderItem` implementation, it fully replaces the default visual rendering and content for that item.\n * The component still manages focus, keyboard interactions, and selection state, but it no longer applies its default item layout or typography.\n *\n * When returning `null`, the default styling will be applied.\n */\n renderItem?: ButtonDropdownProps.ItemRenderer;\n\n /**\n * Determines whether the button dropdown is disabled. Users cannot interact with the control if it's disabled.\n */\n disabled?: boolean;\n /**\n * Provides a reason why the button dropdown is disabled (only when `disabled` is `true`).\n * If provided, the disabled button becomes focusable.\n *\n * Do not place interactive elements like links or buttons.\n */\n disabledReason?: React.ReactNode;\n /**\n * Renders the button as being in a loading state. It takes precedence over the `disabled` if both are set to `true`.\n * It prevents clicks.\n */\n loading?: boolean;\n /**\n * Specifies the text that screen reader announces when the button dropdown is in a loading state.\n */\n loadingText?: string;\n /** Determines the general styling of the button dropdown.\n * * `primary` for primary buttons\n * * `normal` for secondary buttons\n * * `icon` for icon buttons\n * * `inline-icon` for icon buttons with no outer padding\n */\n variant?: ButtonDropdownProps.Variant;\n /**\n * Specifies the name of the icon used in the button dropdown trigger, used with the [icon component](/components/icon/).\n * Defaults to `ellipsis`. Applies to the `icon` and `inline-icon` variants only.\n */\n iconName?: IconProps.Name;\n /**\n * Specifies alternate text for a custom icon, for use with `iconUrl`. Applies to the `icon` and `inline-icon` variants only.\n */\n iconAlt?: string;\n /**\n * Specifies the URL of a custom icon. Applies to the `icon` and `inline-icon` variants only.\n *\n * If you set both `iconUrl` and `iconSvg`, `iconSvg` will take precedence.\n */\n iconUrl?: string;\n /**\n * Custom SVG icon. Equivalent to the `svg` slot of the [icon component](/components/icon/).\n * Applies to the `icon` and `inline-icon` variants only.\n *\n * If you set both `iconUrl` and `iconSvg`, `iconSvg` will take precedence.\n */\n iconSvg?: React.ReactNode;\n /**\n * Controls expandability of the item groups.\n * If group items are loaded asynchronously, return each group's status from `getExpandableItemsAsyncLoadingState`.\n */\n expandableGroups?: boolean;\n /**\n * Adds `aria-label` to the button dropdown trigger.\n * Use this to provide an accessible name for buttons that don't have visible text.\n */\n ariaLabel?: string;\n /**\n * Text displayed in the button dropdown trigger.\n * @displayname text\n */\n children?: React.ReactNode;\n /**\n * Called when the user clicks on an item, and the item is not disabled. The event detail object contains the id of the clicked item.\n */\n onItemClick?: CancelableEventHandler<ButtonDropdownProps.ItemClickDetails>;\n /**\n * Called when the user clicks on an item with the left mouse button without pressing\n * modifier keys (that is, CTRL, ALT, SHIFT, META), and the item has an `href` set.\n */\n onItemFollow?: CancelableEventHandler<ButtonDropdownProps.ItemClickDetails>;\n /**\n * A standalone action that is shown prior to the dropdown trigger.\n * Use it with \"primary\" and \"normal\" variant only.\n *\n * Main action properties:\n * * `text` (string) - Specifies the text shown in the main action.\n * * `external` (boolean) - Marks the main action as external by adding an icon after the text. The link will open in a new tab when clicked. Note that this only works when `href` is also provided.\n * * `externalIconAriaLabel` (string) - Adds an ARIA label to the external icon.\n *\n * The main action also supports the following properties of the [button](/components/button/?tabId=api) component:\n * `ariaLabel`, `disabled`, `loading`, `loadingText`, `href`, `target`, `rel`, `download`, `iconAlt`, `iconName`, `iconUrl`, `iconSvg`, `onClick`, `onFollow`.\n */\n mainAction?: ButtonDropdownProps.MainAction;\n\n /**\n * Sets the button width to be 100% of the parent container width. Button content is centered.\n */\n fullWidth?: boolean;\n\n /**\n * Contains all the properties for async loading. Make sure to listen to `onLoadItems`.\n *\n * The text properties (`empty`, `loadingText`, `finishedText`, `errorText`) are functions that receive the\n * `expandedGroupId` when the status belongs to an expandable group, and no argument for the root list.\n * * `empty` - (Optional) Displayed when there are no items to display. This is only shown when `statusType` is set to `finished` or not set at all.\n * * `loadingText` - (Optional) Specifies the text to display when in the loading state.\n * * `finishedText` - (Optional) Specifies the text to display at the bottom of the dropdown menu after pagination has reached the end.\n * * `errorText` - (Optional) Specifies the text to display when a data fetching error occurs. Make sure that you provide `recoveryText`.\n * * `recoveryText` (i18n) - (Optional) Specifies the text for the recovery button. The text is displayed next to the error text. Use the `onLoadItems` event to perform a recovery action (for example, retrying the request).\n * * `errorIconAriaLabel` (i18n) - (Optional) Provides a text alternative for the error icon in the error message.\n * * `statusType` - (Optional) Specifies the current status of loading more items.\n * * * `pending` - Indicates that no request is in progress, but more items may be loaded.\n * * * `loading` - Indicates that data fetching is in progress.\n * * * `finished` - Indicates that pagination has finished and no more requests are expected.\n * * * `error` - Indicates that an error occurred during fetch. You should use `recoveryText` to enable the user to recover.\n */\n asyncLoadingProps?: ButtonDropdownProps.AsyncLoadingProps;\n\n /**\n * Use this event to implement the asynchronous behavior for the component.\n *\n * The event is called in the following situations:\n * * The dropdown opens, unless the same filtering text was already requested.\n * * The user types inside the filtering input field.\n * * The user scrolls to the end of the list of items, if `statusType` is set to `pending`.\n * * The user clicks on the recovery button in the error state.\n * * The user expands an expandable group that has an `id`.\n *\n * The detail object contains the following properties:\n * * `filteringText` - The value that you need to use to fetch items. It is empty for events about an expandable group.\n * * `firstPage` - Indicates that you should fetch the first page of items that match the `filteringText`.\n * * `samePage` - Indicates that you should fetch the same page that you have previously fetched (for example, when the user clicks on the recovery button).\n * * `expandedGroupId` - Set when the event is about an expandable group: the ID of the group whose items you need to load.\n **/\n onLoadItems?: NonCancelableEventHandler<ButtonDropdownProps.LoadItemsDetail>;\n\n /**\n * Specifies the async loading status of individual expandable groups.\n * Use only if you load the nested items asynchronously upon expanding a group.\n *\n * Return values are:\n * * `pending` - Indicates that no request in progress, but more options may be loaded.\n * * `loading` - Indicates that data fetching is in progress.\n * * `finished` - Indicates that the group's items are loaded and no more requests are expected.\n * * `error` - Indicates that an error occurred during fetch. You should use `recoveryText` to enable the user to recover.\n *\n * If null or undefined, the status will be treated as `finished`.\n */\n getExpandableItemsAsyncLoadingState?: (options: {\n item: ButtonDropdownProps.ItemGroup;\n }) => ButtonDropdownProps.AsyncLoadingStatusType | null | undefined;\n\n /**\n * Determines how filtering is applied to the dropdown `items`:\n *\n * * `auto` - The component will automatically filter items based on user input.\n * * `manual` - You will set up `onLoadItems` event listeners and filter items on your side or request\n * them from server.\n *\n * If you set this property to `auto`, the component will filter the provided `items` based on the value of the filtering input field.\n * The filtering text is matched against the item's `text`, `secondaryText`, and `labelTag`.\n *\n * If you set this property to `manual`, the default filtering mechanism is disabled and all provided `items` are\n * displayed in the dropdown list. In that case make sure that you use the `onLoadItems` events in order\n * to set the `items` property to the items that are relevant for the user, given the filtering input value.\n *\n */\n filteringType?: ButtonDropdownProps.FilteringType;\n\n /**\n * Specifies the placeholder to display in the filtering input. Only relevant when filtering is enabled.\n */\n filteringPlaceholder?: string;\n\n /**\n * Adds an `aria-label` to the filtering input. Only relevant when filtering is enabled.\n */\n filteringAriaLabel?: string;\n\n /**\n * Adds an `aria-label` to the clear button inside the filtering input. Only relevant when filtering is enabled.\n * @i18n\n */\n filteringClearAriaLabel?: string;\n\n /**\n * Specifies the text to display with the number of matches at the bottom of the dropdown menu while filtering.\n * @i18n\n */\n filteringResultsText?: (matchesCount: number, totalCount: number) => string;\n\n /**\n * Displayed when filtering is enabled and there are no matches for the filtering input.\n * With `filteringType=\"manual\"`, this is shown when you set `items` to an empty array while the filtering input has a value.\n */\n noMatch?: React.ReactNode;\n\n /**\n * An object containing all the necessary localized strings required by the component.\n * @i18n\n */\n i18nStrings?: ButtonDropdownProps.I18nStrings;\n\n /**\n * Attributes to add to the native `button` element.\n * Some attributes will be automatically combined with internal attribute values:\n * - `className` will be appended.\n * - Event handlers will be chained, unless the default is prevented.\n *\n * We do not support using this attribute to apply custom styling.\n *\n * Pass a `ref` to access the native element for measurement, observation, or third-party integration.\n * For actions such as focus or selection, use the component's explicit ref methods;\n * operations performed directly on the native element may bypass the built-in component's behaviors.\n *\n * @awsuiSystem core\n */\n nativeTriggerAttributes?: NativeAttributes<React.ButtonHTMLAttributes<HTMLButtonElement>>;\n\n /**\n * Attributes to add to the native element of the `mainAction`.\n *\n * Specify either `button` for a standard main action, or `anchor` if `html` is set.\n *\n * Some attributes will be automatically combined with internal attribute values:\n * - `className` will be appended.\n * - Event handlers will be chained, unless the default is prevented.\n *\n * We do not support using this attribute to apply custom styling.\n *\n * Pass a `ref` to access the native element for measurement, observation, or third-party integration.\n * For actions such as focus or selection, use the component's explicit ref methods;\n * operations performed directly on the native element may bypass the built-in component's behaviors.\n *\n * @awsuiSystem core\n */\n nativeMainActionAttributes?: {\n button?: NativeAttributes<React.ButtonHTMLAttributes<HTMLButtonElement>>;\n anchor?: NativeAttributes<React.AnchorHTMLAttributes<HTMLAnchorElement>>;\n };\n}\n\nexport namespace ButtonDropdownProps {\n export type Variant = 'normal' | 'primary' | 'icon' | 'inline-icon';\n export type ItemType = 'action' | 'group';\n export type FilteringType = 'none' | 'auto' | 'manual';\n\n export interface AsyncLoadingProps {\n /**\n * Displayed when there are no items to display.\n * This is only shown when `statusType` is set to `finished` or not set at all.\n */\n empty?: (expandedGroupId?: string) => ReactNode;\n /**\n * Specifies the text to display when in the loading state.\n **/\n loadingText?: (expandedGroupId?: string) => string;\n /**\n * Specifies the text to display at the bottom of the dropdown menu after pagination has reached the end.\n **/\n finishedText?: (expandedGroupId?: string) => string;\n /**\n * Specifies the text to display when a data fetching error occurs. Make sure that you provide `recoveryText`.\n **/\n errorText?: (expandedGroupId?: string) => string;\n /**\n * Specifies the text for the recovery button. The text is displayed next to the error text.\n * Use the `onLoadItems` event to perform a recovery action (for example, retrying the request).\n * @i18n\n **/\n recoveryText?: string;\n /**\n * Provides a text alternative for the error icon in the error message.\n * @i18n\n */\n errorIconAriaLabel?: string;\n /**\n * Specifies the current status of loading more items.\n * * `pending` - Indicates that no request is in progress, but more items may be loaded.\n * * `loading` - Indicates that data fetching is in progress.\n * * `finished` - Indicates that pagination has finished and no more requests are expected.\n * * `error` - Indicates that an error occurred during fetch. You should use `recoveryText` to enable the user to recover.\n **/\n statusType?: ButtonDropdownProps.AsyncLoadingStatusType;\n }\n\n export type AsyncLoadingStatusType = 'pending' | 'loading' | 'finished' | 'error';\n\n export interface LoadItemsDetail extends OptionsLoadItemsDetail {\n expandedGroupId?: string;\n }\n\n export interface I18nStrings {\n filteringItemAriaDescription?: string;\n }\n\n export interface ActionRenderItem {\n type: 'action';\n index: number;\n option: Item;\n highlighted: boolean;\n disabled: boolean;\n parent: GroupRenderItem | null;\n }\n export interface CheckboxRenderItem {\n type: 'checkbox';\n index: number;\n option: CheckboxItem;\n disabled: boolean;\n highlighted: boolean;\n checked: boolean;\n parent: GroupRenderItem | null;\n }\n export interface GroupRenderItem {\n type: 'group';\n index: number;\n option: ItemGroup;\n disabled: boolean;\n highlighted: boolean;\n expanded: boolean;\n expandDirection: 'vertical' | 'horizontal';\n }\n\n export type RenderItem = ActionRenderItem | CheckboxRenderItem | GroupRenderItem;\n export type ItemRenderer = (props: { item: ButtonDropdownProps.RenderItem; filterText?: string }) => ReactNode | null;\n\n export interface MainAction {\n text?: string;\n ariaLabel?: string;\n onClick?: CancelableEventHandler<ButtonProps.ClickDetail>;\n onFollow?: CancelableEventHandler<ButtonProps.FollowDetail>;\n disabled?: boolean;\n disabledReason?: React.ReactNode;\n loading?: boolean;\n loadingText?: string;\n href?: string;\n target?: string;\n rel?: string;\n download?: boolean | string;\n external?: boolean;\n externalIconAriaLabel?: string;\n iconAlt?: string;\n iconName?: IconProps.Name;\n iconUrl?: string;\n iconSvg?: React.ReactNode;\n }\n\n export interface Item {\n itemType?: ItemType;\n id: string;\n text: string;\n secondaryText?: string;\n ariaLabel?: string;\n lang?: string;\n disabled?: boolean;\n disabledReason?: string;\n /**\n * @deprecated Has no effect.\n */\n description?: string;\n href?: string;\n download?: boolean | string;\n external?: boolean;\n externalIconAriaLabel?: string;\n iconAlt?: string;\n iconName?: IconProps.Name;\n iconUrl?: string;\n iconSvg?: React.ReactNode;\n labelTag?: string;\n dataAttributes?: Record<string, string>;\n }\n\n export interface CheckboxItem\n extends Omit<ButtonDropdownProps.Item, 'href' | 'download' | 'external' | 'externalIconAriaLabel' | 'itemType'> {\n itemType: 'checkbox';\n checked: boolean;\n }\n\n export interface ItemGroup extends Omit<Item, 'id' | 'text' | 'itemType' | 'secondaryText' | 'labelTag'> {\n itemType?: 'group';\n id?: string;\n text?: string;\n items: Items;\n /**\n * Controls whether this group renders as an expandable submenu, overriding `expandableGroups`\n * for this group. Defaults to the `expandableGroups` value when unset.\n */\n expandable?: boolean;\n }\n\n export type ItemOrGroup = Item | CheckboxItem | ItemGroup;\n\n export type Items = ReadonlyArray<ItemOrGroup>;\n\n export interface ItemClickDetails extends BaseNavigationDetail {\n id: string;\n checked?: boolean;\n }\n\n export interface Ref {\n /**\n * Focuses the underlying native button. If a main action is defined this will focus that button.\n */\n focus(options?: FocusOptions): void;\n /**\n * Focuses the underlying native button for the dropdown.\n */\n focusDropdownTrigger(options?: FocusOptions): void;\n }\n}\n\nexport interface ButtonDropdownSettings {\n // this means whether action is required to make group expand\n hasExpandableGroups: boolean;\n // on smaller screens expandable groups are integrated into parent dropdown\n // this changes keyboard navigation, highlight and activation behavior for parent dropdown\n isInRestrictedView?: boolean;\n}\n\nexport interface HighlightProps {\n targetItem: ButtonDropdownProps.ItemOrGroup | null;\n isHighlighted: (item: ButtonDropdownProps.ItemOrGroup) => boolean;\n isKeyboardHighlight: (item: ButtonDropdownProps.ItemOrGroup) => boolean;\n isExpanded: (group: ButtonDropdownProps.ItemGroup) => boolean;\n highlightItem: (item: ButtonDropdownProps.ItemOrGroup) => void;\n}\n\nexport type GroupToggle = (item: ButtonDropdownProps.ItemGroup, event: React.SyntheticEvent) => void;\nexport type ItemActivate = (\n item: ButtonDropdownProps.Item | ButtonDropdownProps.CheckboxItem,\n event: React.MouseEvent | React.KeyboardEvent\n) => void;\n\nexport interface LinkItem extends ButtonDropdownProps.Item {\n href: string;\n}\n\nexport interface CustomTriggerProps {\n triggerRef: React.Ref<HTMLElement>;\n testUtilsClass: string;\n ariaLabel: string | undefined;\n disabled: boolean;\n disabledReason?: React.ReactNode;\n isOpen: boolean;\n onClick: () => void;\n ariaExpanded: boolean;\n}\n"]}
|
|
@@ -17,6 +17,13 @@ export interface CategoryProps extends HighlightProps {
|
|
|
17
17
|
filteringEnabled?: boolean;
|
|
18
18
|
menuId?: string;
|
|
19
19
|
filteringDescriptionId?: string;
|
|
20
|
+
asyncLoadingProps?: ButtonDropdownProps.AsyncLoadingProps;
|
|
21
|
+
getExpandableItemsAsyncLoadingState?: ButtonDropdownProps['getExpandableItemsAsyncLoadingState'];
|
|
22
|
+
/**
|
|
23
|
+
* Fires the recovery request for an expandable group in error state. Defined only when the
|
|
24
|
+
* consumer listens to `onLoadItems`, which is what makes the recovery action available.
|
|
25
|
+
*/
|
|
26
|
+
onGroupRecoveryClick?: (groupId: string) => void;
|
|
20
27
|
}
|
|
21
28
|
export interface ItemListProps extends HighlightProps {
|
|
22
29
|
items: ButtonDropdownProps.Items;
|
|
@@ -37,6 +44,13 @@ export interface ItemListProps extends HighlightProps {
|
|
|
37
44
|
filteringEnabled?: boolean;
|
|
38
45
|
menuId?: string;
|
|
39
46
|
filteringDescriptionId?: string;
|
|
47
|
+
asyncLoadingProps?: ButtonDropdownProps.AsyncLoadingProps;
|
|
48
|
+
getExpandableItemsAsyncLoadingState?: ButtonDropdownProps['getExpandableItemsAsyncLoadingState'];
|
|
49
|
+
/**
|
|
50
|
+
* Fires the recovery request for an expandable group in error state. Defined only when the
|
|
51
|
+
* consumer listens to `onLoadItems`, which is what makes the recovery action available.
|
|
52
|
+
*/
|
|
53
|
+
onGroupRecoveryClick?: (groupId: string) => void;
|
|
40
54
|
}
|
|
41
55
|
export interface ItemProps {
|
|
42
56
|
index?: number;
|
|
@@ -74,7 +88,13 @@ interface InternalItemGroup extends Omit<ButtonDropdownProps.ItemGroup, 'items'>
|
|
|
74
88
|
}
|
|
75
89
|
type InternalItems = ReadonlyArray<InternalItemOrGroup>;
|
|
76
90
|
export type InternalItemOrGroup = InternalItem | InternalCheckboxItem | InternalItemGroup;
|
|
91
|
+
export interface StyleClassNames {
|
|
92
|
+
trigger?: string;
|
|
93
|
+
mainAction?: string;
|
|
94
|
+
dropdown?: string;
|
|
95
|
+
}
|
|
77
96
|
export interface InternalButtonDropdownProps extends Omit<ButtonDropdownProps, 'variant' | 'items'>, InternalBaseComponentProps {
|
|
97
|
+
styleClassNames?: StyleClassNames;
|
|
78
98
|
customTriggerBuilder?: (props: CustomTriggerProps) => React.ReactNode;
|
|
79
99
|
variant?: ButtonDropdownProps['variant'] | 'navigation';
|
|
80
100
|
items: ReadonlyArray<InternalItemOrGroup>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal-interfaces.d.ts","sourceRoot":"","sources":["../../../src/button-dropdown/internal-interfaces.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kCAAkC,EAAE,MAAM,kEAAkE,CAAC;AAEtH,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,WAAW,EACX,cAAc,EACd,YAAY,EACZ,QAAQ,EACT,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,aAAc,SAAQ,cAAc;IACnD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,mBAAmB,CAAC,SAAS,CAAC;IACpC,aAAa,EAAE,WAAW,CAAC;IAC3B,cAAc,EAAE,YAAY,CAAC;IAC7B,QAA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
1
|
-
{"version":3,"file":"internal-interfaces.js","sourceRoot":"","sources":["../../../src/button-dropdown/internal-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 { GeneratedAnalyticsMetadataFragment } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport {\n ButtonDropdownProps,\n CustomTriggerProps,\n GroupToggle,\n HighlightProps,\n ItemActivate,\n LinkItem,\n} from './interfaces';\n\nexport interface CategoryProps extends HighlightProps {\n index?: number;\n item: ButtonDropdownProps.ItemGroup;\n onGroupToggle: GroupToggle;\n onItemActivate: ItemActivate;\n disabled: boolean;\n lastInDropdown: boolean;\n expandToViewport?: boolean;\n variant?: ItemListProps['variant'];\n position?: string;\n renderItem?: ButtonDropdownProps.ItemRenderer;\n filteringText?: string;\n filteringEnabled?: boolean;\n menuId?: string;\n filteringDescriptionId?: string;\n}\n\nexport interface ItemListProps extends HighlightProps {\n items: ButtonDropdownProps.Items;\n onGroupToggle: GroupToggle;\n onItemActivate: ItemActivate;\n categoryDisabled?: boolean;\n isExpandable?: (item: ButtonDropdownProps.ItemOrGroup) => boolean;\n hasCategoryHeader?: boolean;\n lastInDropdown: boolean;\n expandToViewport?: boolean;\n variant?: InternalButtonDropdownProps['variant'];\n position?: string;\n analyticsMetadataTransformer?: InternalButtonDropdownProps['analyticsMetadataTransformer'];\n linkStyle?: boolean;\n renderItem?: ButtonDropdownProps.ItemRenderer;\n parentProps?: ButtonDropdownProps.GroupRenderItem;\n filteringText?: string;\n filteringEnabled?: boolean;\n menuId?: string;\n filteringDescriptionId?: string;\n}\n\nexport interface ItemProps {\n index?: number;\n item: ButtonDropdownProps.Item | ButtonDropdownProps.CheckboxItem | LinkItem;\n disabled: boolean;\n highlighted: boolean;\n onItemActivate: ItemActivate;\n highlightItem: (item: ButtonDropdownProps.ItemOrGroup) => void;\n showDivider: boolean;\n hasCategoryHeader: boolean;\n isKeyboardHighlighted?: boolean;\n variant?: ItemListProps['variant'];\n position?: string;\n analyticsMetadataTransformer?: InternalButtonDropdownProps['analyticsMetadataTransformer'];\n linkStyle?: boolean;\n renderItem?: ButtonDropdownProps.ItemRenderer;\n parentProps?: ButtonDropdownProps.GroupRenderItem;\n filteringText?: string;\n filteringEnabled?: boolean;\n menuId?: string;\n filteringDescriptionId?: string;\n}\n\nexport interface InternalItem extends ButtonDropdownProps.Item {\n badge?: boolean;\n /**\n * Used in breadcrumb-group: indicates that this breadcrumb item is the current page\n */\n isCurrentBreadcrumb?: boolean;\n}\n\nexport interface InternalCheckboxItem extends ButtonDropdownProps.CheckboxItem {\n badge?: boolean;\n}\n\ninterface InternalItemGroup extends Omit<ButtonDropdownProps.ItemGroup, 'items'> {\n items: InternalItems;\n}\n\ntype InternalItems = ReadonlyArray<InternalItemOrGroup>;\n\nexport type InternalItemOrGroup = InternalItem | InternalCheckboxItem | InternalItemGroup;\n\nexport interface InternalButtonDropdownProps\n extends Omit<ButtonDropdownProps, 'variant' | 'items'>,\n InternalBaseComponentProps {\n customTriggerBuilder?: (props: CustomTriggerProps) => React.ReactNode;\n variant?: ButtonDropdownProps['variant'] | 'navigation';\n items: ReadonlyArray<InternalItemOrGroup>;\n\n /**\n * Optional text that is displayed as the title at the top of the dropdown.\n */\n title?: string;\n\n /**\n * Optional text that is displayed underneath the title at the top of the dropdown.\n */\n description?: string;\n\n /**\n * Only show main action button as a regular, non-split button.\n * That is needed so that button dropdown test utils wrapper can still be used.\n */\n showMainActionOnly?: boolean;\n\n /**\n * Determines that the dropdown should preferably be aligned to the center of the trigger\n * instead of dropping left or right.\n */\n preferCenter?: boolean;\n\n /**\n * Determines whether simple items should be displayed with the link styles.\n * Used in Breadcrumb group component for collapsed breadcrumbs\n */\n linkStyle?: boolean;\n\n /**\n * Determines whether the dropdown should take up the full available width.\n * Used in Breadcrumb group component for collapsed breadcrumbs\n */\n fullWidth?: boolean;\n\n analyticsMetadataTransformer?: (input: GeneratedAnalyticsMetadataFragment) => GeneratedAnalyticsMetadataFragment;\n\n /**\n * Position of the button dropdown inside a list of elements, for example a button group\n */\n position?: string;\n\n /**\n * Renders the trigger button without vertical padding or borders, matching the compact\n * `inline-icon` footprint. Use with `variant=\"icon\"` to get the icon variant's neutral colour\n * while keeping an inline footprint (used by the table multi-column sort menu).\n */\n compactTrigger?: boolean;\n\n /**\n * Adds `aria-describedby` to the trigger button, associating it with descriptive text elsewhere\n * on the page (for example a table header cell that disambiguates otherwise-identical triggers).\n */\n ariaDescribedby?: string;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"internal-interfaces.js","sourceRoot":"","sources":["../../../src/button-dropdown/internal-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 { GeneratedAnalyticsMetadataFragment } from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport {\n ButtonDropdownProps,\n CustomTriggerProps,\n GroupToggle,\n HighlightProps,\n ItemActivate,\n LinkItem,\n} from './interfaces';\n\nexport interface CategoryProps extends HighlightProps {\n index?: number;\n item: ButtonDropdownProps.ItemGroup;\n onGroupToggle: GroupToggle;\n onItemActivate: ItemActivate;\n disabled: boolean;\n lastInDropdown: boolean;\n expandToViewport?: boolean;\n variant?: ItemListProps['variant'];\n position?: string;\n renderItem?: ButtonDropdownProps.ItemRenderer;\n filteringText?: string;\n filteringEnabled?: boolean;\n menuId?: string;\n filteringDescriptionId?: string;\n asyncLoadingProps?: ButtonDropdownProps.AsyncLoadingProps;\n getExpandableItemsAsyncLoadingState?: ButtonDropdownProps['getExpandableItemsAsyncLoadingState'];\n /**\n * Fires the recovery request for an expandable group in error state. Defined only when the\n * consumer listens to `onLoadItems`, which is what makes the recovery action available.\n */\n onGroupRecoveryClick?: (groupId: string) => void;\n}\n\nexport interface ItemListProps extends HighlightProps {\n items: ButtonDropdownProps.Items;\n onGroupToggle: GroupToggle;\n onItemActivate: ItemActivate;\n categoryDisabled?: boolean;\n isExpandable?: (item: ButtonDropdownProps.ItemOrGroup) => boolean;\n hasCategoryHeader?: boolean;\n lastInDropdown: boolean;\n expandToViewport?: boolean;\n variant?: InternalButtonDropdownProps['variant'];\n position?: string;\n analyticsMetadataTransformer?: InternalButtonDropdownProps['analyticsMetadataTransformer'];\n linkStyle?: boolean;\n renderItem?: ButtonDropdownProps.ItemRenderer;\n parentProps?: ButtonDropdownProps.GroupRenderItem;\n filteringText?: string;\n filteringEnabled?: boolean;\n menuId?: string;\n filteringDescriptionId?: string;\n asyncLoadingProps?: ButtonDropdownProps.AsyncLoadingProps;\n getExpandableItemsAsyncLoadingState?: ButtonDropdownProps['getExpandableItemsAsyncLoadingState'];\n /**\n * Fires the recovery request for an expandable group in error state. Defined only when the\n * consumer listens to `onLoadItems`, which is what makes the recovery action available.\n */\n onGroupRecoveryClick?: (groupId: string) => void;\n}\n\nexport interface ItemProps {\n index?: number;\n item: ButtonDropdownProps.Item | ButtonDropdownProps.CheckboxItem | LinkItem;\n disabled: boolean;\n highlighted: boolean;\n onItemActivate: ItemActivate;\n highlightItem: (item: ButtonDropdownProps.ItemOrGroup) => void;\n showDivider: boolean;\n hasCategoryHeader: boolean;\n isKeyboardHighlighted?: boolean;\n variant?: ItemListProps['variant'];\n position?: string;\n analyticsMetadataTransformer?: InternalButtonDropdownProps['analyticsMetadataTransformer'];\n linkStyle?: boolean;\n renderItem?: ButtonDropdownProps.ItemRenderer;\n parentProps?: ButtonDropdownProps.GroupRenderItem;\n filteringText?: string;\n filteringEnabled?: boolean;\n menuId?: string;\n filteringDescriptionId?: string;\n}\n\nexport interface InternalItem extends ButtonDropdownProps.Item {\n badge?: boolean;\n /**\n * Used in breadcrumb-group: indicates that this breadcrumb item is the current page\n */\n isCurrentBreadcrumb?: boolean;\n}\n\nexport interface InternalCheckboxItem extends ButtonDropdownProps.CheckboxItem {\n badge?: boolean;\n}\n\ninterface InternalItemGroup extends Omit<ButtonDropdownProps.ItemGroup, 'items'> {\n items: InternalItems;\n}\n\ntype InternalItems = ReadonlyArray<InternalItemOrGroup>;\n\nexport type InternalItemOrGroup = InternalItem | InternalCheckboxItem | InternalItemGroup;\n\n// Style API v2\nexport interface StyleClassNames {\n trigger?: string;\n mainAction?: string;\n dropdown?: string;\n}\n\nexport interface InternalButtonDropdownProps\n extends Omit<ButtonDropdownProps, 'variant' | 'items'>,\n InternalBaseComponentProps {\n styleClassNames?: StyleClassNames;\n customTriggerBuilder?: (props: CustomTriggerProps) => React.ReactNode;\n variant?: ButtonDropdownProps['variant'] | 'navigation';\n items: ReadonlyArray<InternalItemOrGroup>;\n\n /**\n * Optional text that is displayed as the title at the top of the dropdown.\n */\n title?: string;\n\n /**\n * Optional text that is displayed underneath the title at the top of the dropdown.\n */\n description?: string;\n\n /**\n * Only show main action button as a regular, non-split button.\n * That is needed so that button dropdown test utils wrapper can still be used.\n */\n showMainActionOnly?: boolean;\n\n /**\n * Determines that the dropdown should preferably be aligned to the center of the trigger\n * instead of dropping left or right.\n */\n preferCenter?: boolean;\n\n /**\n * Determines whether simple items should be displayed with the link styles.\n * Used in Breadcrumb group component for collapsed breadcrumbs\n */\n linkStyle?: boolean;\n\n /**\n * Determines whether the dropdown should take up the full available width.\n * Used in Breadcrumb group component for collapsed breadcrumbs\n */\n fullWidth?: boolean;\n\n analyticsMetadataTransformer?: (input: GeneratedAnalyticsMetadataFragment) => GeneratedAnalyticsMetadataFragment;\n\n /**\n * Position of the button dropdown inside a list of elements, for example a button group\n */\n position?: string;\n\n /**\n * Renders the trigger button without vertical padding or borders, matching the compact\n * `inline-icon` footprint. Use with `variant=\"icon\"` to get the icon variant's neutral colour\n * while keeping an inline footprint (used by the table multi-column sort menu).\n */\n compactTrigger?: boolean;\n\n /**\n * Adds `aria-describedby` to the trigger button, associating it with descriptive text elsewhere\n * on the page (for example a table header cell that disambiguates otherwise-identical triggers).\n */\n ariaDescribedby?: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/button-dropdown/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA0D,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/button-dropdown/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA0D,MAAM,OAAO,CAAC;AA4B/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,2BAA2B,EAAgB,MAAM,uBAAuB,CAAC;AAWlF,QAAA,MAAM,sBAAsB,6GAuqB3B,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|