@cloudscape-design/components 3.0.220 → 3.0.222
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/alert/index.js +4 -4
- package/alert/index.js.map +1 -1
- package/alert/internal.js +14 -15
- package/alert/internal.js.map +1 -1
- package/annotation-context/annotation/annotation-icon.js +1 -2
- package/annotation-context/annotation/annotation-icon.js.map +1 -1
- package/annotation-context/annotation/annotation-popover.js +6 -7
- package/annotation-context/annotation/annotation-popover.js.map +1 -1
- package/annotation-context/annotation/annotation-trigger.js +4 -6
- package/annotation-context/annotation/annotation-trigger.js.map +1 -1
- package/annotation-context/annotation/closed-annotation.js +4 -5
- package/annotation-context/annotation/closed-annotation.js.map +1 -1
- package/annotation-context/annotation/open-annotation.js +2 -3
- package/annotation-context/annotation/open-annotation.js.map +1 -1
- package/annotation-context/context.js +7 -7
- package/annotation-context/context.js.map +1 -1
- package/annotation-context/index.js +62 -69
- package/annotation-context/index.js.map +1 -1
- package/app-layout/content-wrapper/index.js +2 -3
- package/app-layout/content-wrapper/index.js.map +1 -1
- package/app-layout/defaults.js +13 -14
- package/app-layout/defaults.js.map +1 -1
- package/app-layout/drawer.js +16 -18
- package/app-layout/drawer.js.map +1 -1
- package/app-layout/index.js +111 -113
- package/app-layout/index.js.map +1 -1
- package/app-layout/mobile-toolbar/index.js +7 -9
- package/app-layout/mobile-toolbar/index.js.map +1 -1
- package/app-layout/navigation-panel.js +5 -8
- package/app-layout/navigation-panel.js.map +1 -1
- package/app-layout/notifications/index.js +2 -2
- package/app-layout/notifications/index.js.map +1 -1
- package/app-layout/toggles/index.js +14 -22
- package/app-layout/toggles/index.js.map +1 -1
- package/app-layout/tools-and-split-panel.js +6 -9
- package/app-layout/tools-and-split-panel.js.map +1 -1
- package/app-layout/utils/use-content-height.js +14 -15
- package/app-layout/utils/use-content-height.js.map +1 -1
- package/app-layout/utils/use-content-width.js +8 -8
- package/app-layout/utils/use-content-width.js.map +1 -1
- package/app-layout/utils/use-focus-control.js +7 -8
- package/app-layout/utils/use-focus-control.js.map +1 -1
- package/app-layout/utils/use-observed-element.js +3 -3
- package/app-layout/utils/use-observed-element.js.map +1 -1
- package/app-layout/utils/use-window-width.js +4 -4
- package/app-layout/utils/use-window-width.js.map +1 -1
- package/app-layout/visual-refresh/app-bar.js +19 -20
- package/app-layout/visual-refresh/app-bar.js.map +1 -1
- package/app-layout/visual-refresh/background.js +9 -10
- package/app-layout/visual-refresh/background.js.map +1 -1
- package/app-layout/visual-refresh/context.js +101 -59
- package/app-layout/visual-refresh/context.js.map +1 -1
- package/app-layout/visual-refresh/header.js +6 -7
- package/app-layout/visual-refresh/header.js.map +1 -1
- package/app-layout/visual-refresh/index.js +3 -4
- package/app-layout/visual-refresh/index.js.map +1 -1
- package/app-layout/visual-refresh/layout.js +18 -21
- package/app-layout/visual-refresh/layout.js.map +1 -1
- package/app-layout/visual-refresh/main.js +17 -18
- package/app-layout/visual-refresh/main.js.map +1 -1
- package/app-layout/visual-refresh/navigation.js +22 -24
- package/app-layout/visual-refresh/navigation.js.map +1 -1
- package/app-layout/visual-refresh/notifications.js +6 -7
- package/app-layout/visual-refresh/notifications.js.map +1 -1
- package/app-layout/visual-refresh/split-panel.js +36 -43
- package/app-layout/visual-refresh/split-panel.js.map +1 -1
- package/app-layout/visual-refresh/tools.js +32 -34
- package/app-layout/visual-refresh/tools.js.map +1 -1
- package/app-layout/visual-refresh/trigger-button.js +5 -8
- package/app-layout/visual-refresh/trigger-button.js.map +1 -1
- package/area-chart/chart-container.js +18 -19
- package/area-chart/chart-container.js.map +1 -1
- package/area-chart/elements/area-chart-filter.js +7 -8
- package/area-chart/elements/area-chart-filter.js.map +1 -1
- package/area-chart/elements/area-chart-legend.js +6 -9
- package/area-chart/elements/area-chart-legend.js.map +1 -1
- package/area-chart/elements/area-series.js +12 -13
- package/area-chart/elements/area-series.js.map +1 -1
- package/area-chart/elements/chart-popover.js +4 -6
- package/area-chart/elements/chart-popover.js.map +1 -1
- package/area-chart/elements/data-series.js +14 -17
- package/area-chart/elements/data-series.js.map +1 -1
- package/area-chart/elements/highlighted-point.js +6 -7
- package/area-chart/elements/highlighted-point.js.map +1 -1
- package/area-chart/elements/threshold-series.js +5 -7
- package/area-chart/elements/threshold-series.js.map +1 -1
- package/area-chart/elements/use-highlight-details.js +28 -30
- package/area-chart/elements/use-highlight-details.js.map +1 -1
- package/area-chart/elements/vertical-marker.js +6 -7
- package/area-chart/elements/vertical-marker.js.map +1 -1
- package/area-chart/index.js +4 -4
- package/area-chart/index.js.map +1 -1
- package/area-chart/internal.js +40 -41
- package/area-chart/internal.js.map +1 -1
- package/area-chart/model/async-store.js +23 -30
- package/area-chart/model/async-store.js.map +1 -1
- package/area-chart/model/compute-chart-props.js +11 -12
- package/area-chart/model/compute-chart-props.js.map +1 -1
- package/area-chart/model/create-series-decorator.js +11 -13
- package/area-chart/model/create-series-decorator.js.map +1 -1
- package/area-chart/model/interactions-store.js +47 -54
- package/area-chart/model/interactions-store.js.map +1 -1
- package/area-chart/model/use-chart-model.js +85 -89
- package/area-chart/model/use-chart-model.js.map +1 -1
- package/area-chart/model/use-filter-props.js +6 -6
- package/area-chart/model/use-filter-props.js.map +1 -1
- package/area-chart/model/use-highlight-props.js +6 -6
- package/area-chart/model/use-highlight-props.js.map +1 -1
- package/area-chart/model/utils.js +46 -59
- package/area-chart/model/utils.js.map +1 -1
- package/attribute-editor/additional-info.js +2 -5
- package/attribute-editor/additional-info.js.map +1 -1
- package/attribute-editor/index.js +5 -5
- package/attribute-editor/index.js.map +1 -1
- package/attribute-editor/internal.js +20 -20
- package/attribute-editor/internal.js.map +1 -1
- package/attribute-editor/row.js +17 -25
- package/attribute-editor/row.js.map +1 -1
- package/autosuggest/autosuggest-option.js +12 -12
- package/autosuggest/autosuggest-option.js.map +1 -1
- package/autosuggest/index.js +6 -6
- package/autosuggest/index.js.map +1 -1
- package/autosuggest/internal.js +39 -39
- package/autosuggest/internal.js.map +1 -1
- package/autosuggest/load-more-controller.js +10 -14
- package/autosuggest/load-more-controller.js.map +1 -1
- package/autosuggest/options-controller.js +31 -32
- package/autosuggest/options-controller.js.map +1 -1
- package/autosuggest/options-list.js +12 -13
- package/autosuggest/options-list.js.map +1 -1
- package/autosuggest/plain-list.js +15 -17
- package/autosuggest/plain-list.js.map +1 -1
- package/autosuggest/utils/utils.js +12 -12
- package/autosuggest/utils/utils.js.map +1 -1
- package/autosuggest/virtual-list.js +14 -16
- package/autosuggest/virtual-list.js.map +1 -1
- package/badge/index.js +6 -6
- package/badge/index.js.map +1 -1
- package/bar-chart/index.js +6 -6
- package/bar-chart/index.js.map +1 -1
- package/box/index.js +4 -4
- package/box/index.js.map +1 -1
- package/box/internal.js +12 -12
- package/box/internal.js.map +1 -1
- package/breadcrumb-group/index.js +4 -4
- package/breadcrumb-group/index.js.map +1 -1
- package/breadcrumb-group/internal.js +24 -25
- package/breadcrumb-group/internal.js.map +1 -1
- package/breadcrumb-group/item/item.js +32 -34
- package/breadcrumb-group/item/item.js.map +1 -1
- package/button/icon-helper.js +6 -6
- package/button/icon-helper.js.map +1 -1
- package/button/index.js +6 -6
- package/button/index.js.map +1 -1
- package/button/internal.js +32 -33
- package/button/internal.js.map +1 -1
- package/button-dropdown/category-elements/category-element.js +3 -5
- package/button-dropdown/category-elements/category-element.js.map +1 -1
- package/button-dropdown/category-elements/expandable-category-element.js +23 -26
- package/button-dropdown/category-elements/expandable-category-element.js.map +1 -1
- package/button-dropdown/category-elements/mobile-expandable-category-element.js +27 -30
- package/button-dropdown/category-elements/mobile-expandable-category-element.js.map +1 -1
- package/button-dropdown/index.js +6 -6
- package/button-dropdown/index.js.map +1 -1
- package/button-dropdown/internal.js +28 -29
- package/button-dropdown/internal.js.map +1 -1
- package/button-dropdown/item-element/index.js +30 -36
- package/button-dropdown/item-element/index.js.map +1 -1
- package/button-dropdown/items-list.js +3 -4
- package/button-dropdown/items-list.js.map +1 -1
- package/button-dropdown/mobile-expandable-group/mobile-expandable-group.js +2 -4
- package/button-dropdown/mobile-expandable-group/mobile-expandable-group.js.map +1 -1
- package/button-dropdown/tooltip.js +22 -24
- package/button-dropdown/tooltip.js.map +1 -1
- package/button-dropdown/utils/create-items-tree.js +21 -23
- package/button-dropdown/utils/create-items-tree.js.map +1 -1
- package/button-dropdown/utils/menu-item.js +6 -9
- package/button-dropdown/utils/menu-item.js.map +1 -1
- package/button-dropdown/utils/move-highlight.js +3 -4
- package/button-dropdown/utils/move-highlight.js.map +1 -1
- package/button-dropdown/utils/use-button-dropdown.js +31 -33
- package/button-dropdown/utils/use-button-dropdown.js.map +1 -1
- package/button-dropdown/utils/use-hidden-description.js +3 -3
- package/button-dropdown/utils/use-hidden-description.js.map +1 -1
- package/button-dropdown/utils/use-highlighted-menu.js +40 -42
- package/button-dropdown/utils/use-highlighted-menu.js.map +1 -1
- package/button-dropdown/utils/utils.js +5 -9
- package/button-dropdown/utils/utils.js.map +1 -1
- package/calendar/grid/index.js +25 -28
- package/calendar/grid/index.js.map +1 -1
- package/calendar/header/header-button.js +4 -6
- package/calendar/header/header-button.js.map +1 -1
- package/calendar/header/index.js +1 -2
- package/calendar/header/index.js.map +1 -1
- package/calendar/index.js +4 -4
- package/calendar/index.js.map +1 -1
- package/calendar/internal.js +27 -27
- package/calendar/internal.js.map +1 -1
- package/calendar/utils/intl.js +12 -13
- package/calendar/utils/intl.js.map +1 -1
- package/calendar/utils/navigation.js +3 -3
- package/calendar/utils/navigation.js.map +1 -1
- package/cards/cards-layout-helper.js +12 -12
- package/cards/cards-layout-helper.js.map +1 -1
- package/cards/index.js +53 -63
- package/cards/index.js.map +1 -1
- package/checkbox/index.js +4 -4
- package/checkbox/index.js.map +1 -1
- package/checkbox/internal.d.ts +1 -0
- package/checkbox/internal.d.ts.map +1 -1
- package/checkbox/internal.js +9 -9
- package/checkbox/internal.js.map +1 -1
- package/code-editor/ace-modes.js +1 -1
- package/code-editor/ace-modes.js.map +1 -1
- package/code-editor/ace-themes.js +2 -2
- package/code-editor/ace-themes.js.map +1 -1
- package/code-editor/error-screen.js +3 -4
- package/code-editor/error-screen.js.map +1 -1
- package/code-editor/index.js +61 -65
- package/code-editor/index.js.map +1 -1
- package/code-editor/listeners.js +5 -5
- package/code-editor/listeners.js.map +1 -1
- package/code-editor/loading-screen.js +2 -2
- package/code-editor/loading-screen.js.map +1 -1
- package/code-editor/pane.js +21 -25
- package/code-editor/pane.js.map +1 -1
- package/code-editor/preferences-modal.js +12 -13
- package/code-editor/preferences-modal.js.map +1 -1
- package/code-editor/resizable-box/index.js +14 -15
- package/code-editor/resizable-box/index.js.map +1 -1
- package/code-editor/setup-editor.js +20 -20
- package/code-editor/setup-editor.js.map +1 -1
- package/code-editor/status-bar.js +19 -22
- package/code-editor/status-bar.js.map +1 -1
- package/code-editor/tab-button.js +7 -10
- package/code-editor/tab-button.js.map +1 -1
- package/code-editor/util.js +6 -6
- package/code-editor/util.js.map +1 -1
- package/collection-preferences/index.js +21 -23
- package/collection-preferences/index.js.map +1 -1
- package/collection-preferences/utils.js +25 -57
- package/collection-preferences/utils.js.map +1 -1
- package/collection-preferences/visible-content.js +23 -27
- package/collection-preferences/visible-content.js.map +1 -1
- package/column-layout/index.js +6 -6
- package/column-layout/index.js.map +1 -1
- package/column-layout/internal.js +20 -21
- package/column-layout/internal.js.map +1 -1
- package/column-layout/util.js +2 -2
- package/column-layout/util.js.map +1 -1
- package/container/index.js +5 -5
- package/container/index.js.map +1 -1
- package/container/internal.js +30 -31
- package/container/internal.js.map +1 -1
- package/container/use-sticky-header.js +25 -25
- package/container/use-sticky-header.js.map +1 -1
- package/content-layout/index.js +2 -3
- package/content-layout/index.js.map +1 -1
- package/content-layout/internal.js +15 -16
- package/content-layout/internal.js.map +1 -1
- package/date-input/index.js +3 -4
- package/date-input/index.js.map +1 -1
- package/date-input/internal.js +8 -8
- package/date-input/internal.js.map +1 -1
- package/date-picker/index.js +28 -28
- package/date-picker/index.js.map +1 -1
- package/date-range-picker/calendar/grids/grid.js +54 -57
- package/date-range-picker/calendar/grids/grid.js.map +1 -1
- package/date-range-picker/calendar/grids/index.js +27 -28
- package/date-range-picker/calendar/grids/index.js.map +1 -1
- package/date-range-picker/calendar/header/header-button.js +4 -6
- package/date-range-picker/calendar/header/header-button.js.map +1 -1
- package/date-range-picker/calendar/header/index.js +6 -7
- package/date-range-picker/calendar/header/index.js.map +1 -1
- package/date-range-picker/calendar/index.js +40 -45
- package/date-range-picker/calendar/index.js.map +1 -1
- package/date-range-picker/calendar/range-inputs.js +5 -6
- package/date-range-picker/calendar/range-inputs.js.map +1 -1
- package/date-range-picker/calendar/utils.js +2 -2
- package/date-range-picker/calendar/utils.js.map +1 -1
- package/date-range-picker/dropdown.js +29 -34
- package/date-range-picker/dropdown.js.map +1 -1
- package/date-range-picker/index.js +40 -43
- package/date-range-picker/index.js.map +1 -1
- package/date-range-picker/mode-switcher.js +2 -3
- package/date-range-picker/mode-switcher.js.map +1 -1
- package/date-range-picker/relative-range/index.js +36 -40
- package/date-range-picker/relative-range/index.js.map +1 -1
- package/date-range-picker/time-offset.js +5 -5
- package/date-range-picker/time-offset.js.map +1 -1
- package/date-range-picker/utils.js +4 -5
- package/date-range-picker/utils.js.map +1 -1
- package/expandable-section/expandable-section-container.js +5 -5
- package/expandable-section/expandable-section-container.js.map +1 -1
- package/expandable-section/expandable-section-header.js +18 -23
- package/expandable-section/expandable-section-header.js.map +1 -1
- package/expandable-section/index.js +4 -4
- package/expandable-section/index.js.map +1 -1
- package/expandable-section/internal.js +22 -22
- package/expandable-section/internal.js.map +1 -1
- package/flashbar/collapsible-flashbar.js +103 -118
- package/flashbar/collapsible-flashbar.js.map +1 -1
- package/flashbar/common.js +26 -35
- package/flashbar/common.js.map +1 -1
- package/flashbar/constant.js +1 -1
- package/flashbar/constant.js.map +1 -1
- package/flashbar/flash.js +23 -26
- package/flashbar/flash.js.map +1 -1
- package/flashbar/index.js +3 -4
- package/flashbar/index.js.map +1 -1
- package/flashbar/internal/analytics.js +12 -12
- package/flashbar/internal/analytics.js.map +1 -1
- package/flashbar/non-collapsible-flashbar.js +10 -10
- package/flashbar/non-collapsible-flashbar.js.map +1 -1
- package/flashbar/utils.js +25 -27
- package/flashbar/utils.js.map +1 -1
- package/form/index.js +4 -4
- package/form/index.js.map +1 -1
- package/form/internal.js +5 -6
- package/form/internal.js.map +1 -1
- package/form-field/index.js +4 -4
- package/form-field/index.js.map +1 -1
- package/form-field/internal.js +20 -23
- package/form-field/internal.js.map +1 -1
- package/form-field/util.js +9 -10
- package/form-field/util.js.map +1 -1
- package/grid/index.js +6 -6
- package/grid/index.js.map +1 -1
- package/grid/internal.js +14 -15
- package/grid/internal.js.map +1 -1
- package/header/index.js +4 -4
- package/header/index.js.map +1 -1
- package/header/internal.js +15 -15
- package/header/internal.js.map +1 -1
- package/help-panel/index.js +7 -7
- package/help-panel/index.js.map +1 -1
- package/hotspot/index.js +12 -12
- package/hotspot/index.js.map +1 -1
- package/icon/icons.js +1 -1
- package/icon/index.js +4 -4
- package/icon/index.js.map +1 -1
- package/icon/internal.js +18 -18
- package/icon/internal.js.map +1 -1
- package/input/index.js +36 -17
- package/input/index.js.map +1 -1
- package/input/internal.js +30 -25
- package/input/internal.js.map +1 -1
- package/input/utils.js +4 -5
- package/input/utils.js.map +1 -1
- package/internal/animate.js +27 -32
- package/internal/animate.js.map +1 -1
- package/internal/base-component/index.js +2 -2
- package/internal/base-component/index.js.map +1 -1
- package/internal/breakpoints.js +7 -12
- package/internal/breakpoints.js.map +1 -1
- package/internal/components/abstract-switch/index.d.ts +2 -1
- package/internal/components/abstract-switch/index.d.ts.map +1 -1
- package/internal/components/abstract-switch/index.js +19 -19
- package/internal/components/abstract-switch/index.js.map +1 -1
- package/internal/components/abstract-switch/styles.css.js +13 -12
- package/internal/components/abstract-switch/styles.scoped.css +21 -21
- package/internal/components/abstract-switch/styles.selectors.js +13 -12
- package/internal/components/autosuggest-input/index.js +38 -38
- package/internal/components/autosuggest-input/index.js.map +1 -1
- package/internal/components/button-trigger/index.js +7 -7
- package/internal/components/button-trigger/index.js.map +1 -1
- package/internal/components/cartesian-chart/axis-label.js +1 -2
- package/internal/components/cartesian-chart/axis-label.js.map +1 -1
- package/internal/components/cartesian-chart/bottom-labels.js +20 -26
- package/internal/components/cartesian-chart/bottom-labels.js.map +1 -1
- package/internal/components/cartesian-chart/constants.js +5 -5
- package/internal/components/cartesian-chart/constants.js.map +1 -1
- package/internal/components/cartesian-chart/emphasized-baseline.js +4 -5
- package/internal/components/cartesian-chart/emphasized-baseline.js.map +1 -1
- package/internal/components/cartesian-chart/highlighted-point.js +1 -2
- package/internal/components/cartesian-chart/highlighted-point.js.map +1 -1
- package/internal/components/cartesian-chart/label-utils.js +20 -24
- package/internal/components/cartesian-chart/label-utils.js.map +1 -1
- package/internal/components/cartesian-chart/labels-measure.js +6 -7
- package/internal/components/cartesian-chart/labels-measure.js.map +1 -1
- package/internal/components/cartesian-chart/left-labels.js +13 -17
- package/internal/components/cartesian-chart/left-labels.js.map +1 -1
- package/internal/components/cartesian-chart/scales.js +21 -26
- package/internal/components/cartesian-chart/scales.js.map +1 -1
- package/internal/components/cartesian-chart/ticks.js +9 -10
- package/internal/components/cartesian-chart/ticks.js.map +1 -1
- package/internal/components/cartesian-chart/vertical-grid-lines.js +3 -4
- package/internal/components/cartesian-chart/vertical-grid-lines.js.map +1 -1
- package/internal/components/cartesian-chart/vertical-marker.js +3 -4
- package/internal/components/cartesian-chart/vertical-marker.js.map +1 -1
- package/internal/components/chart-filter/index.js +13 -14
- package/internal/components/chart-filter/index.js.map +1 -1
- package/internal/components/chart-legend/index.js +26 -29
- package/internal/components/chart-legend/index.js.map +1 -1
- package/internal/components/chart-plot/application-controller.js +21 -25
- package/internal/components/chart-plot/application-controller.js.map +1 -1
- package/internal/components/chart-plot/focus-outline.js +7 -8
- package/internal/components/chart-plot/focus-outline.js.map +1 -1
- package/internal/components/chart-plot/index.js +33 -34
- package/internal/components/chart-plot/index.js.map +1 -1
- package/internal/components/chart-popover/index.js +11 -12
- package/internal/components/chart-popover/index.js.map +1 -1
- package/internal/components/chart-series-details/index.js +13 -17
- package/internal/components/chart-series-details/index.js.map +1 -1
- package/internal/components/chart-series-marker/index.js +2 -3
- package/internal/components/chart-series-marker/index.js.map +1 -1
- package/internal/components/chart-status-container/index.js +8 -10
- package/internal/components/chart-status-container/index.js.map +1 -1
- package/internal/components/checkbox-icon/index.js +18 -19
- package/internal/components/checkbox-icon/index.js.map +1 -1
- package/internal/components/dark-ribbon/index.js +13 -14
- package/internal/components/dark-ribbon/index.js.map +1 -1
- package/internal/components/dropdown/context.js +4 -5
- package/internal/components/dropdown/context.js.map +1 -1
- package/internal/components/dropdown/dropdown-fit-handler.js +74 -81
- package/internal/components/dropdown/dropdown-fit-handler.js.map +1 -1
- package/internal/components/dropdown/index.js +57 -65
- package/internal/components/dropdown/index.js.map +1 -1
- package/internal/components/dropdown-footer/index.js +2 -6
- package/internal/components/dropdown-footer/index.js.map +1 -1
- package/internal/components/dropdown-status/index.js +5 -7
- package/internal/components/dropdown-status/index.js.map +1 -1
- package/internal/components/filtering-token/index.js +4 -6
- package/internal/components/filtering-token/index.js.map +1 -1
- package/internal/components/focus-lock/index.js +10 -11
- package/internal/components/focus-lock/index.js.map +1 -1
- package/internal/components/focus-lock/utils.js +4 -4
- package/internal/components/focus-lock/utils.js.map +1 -1
- package/internal/components/live-region/index.js +10 -10
- package/internal/components/live-region/index.js.map +1 -1
- package/internal/components/masked-input/index.js +22 -24
- package/internal/components/masked-input/index.js.map +1 -1
- package/internal/components/masked-input/keyboard-handler.js +18 -18
- package/internal/components/masked-input/keyboard-handler.js.map +1 -1
- package/internal/components/masked-input/use-mask.js +24 -28
- package/internal/components/masked-input/use-mask.js.map +1 -1
- package/internal/components/masked-input/utils/keys.js +4 -6
- package/internal/components/masked-input/utils/keys.js.map +1 -1
- package/internal/components/masked-input/utils/mask-format.js +103 -113
- package/internal/components/masked-input/utils/mask-format.js.map +1 -1
- package/internal/components/masked-input/utils/strings.js +1 -4
- package/internal/components/masked-input/utils/strings.js.map +1 -1
- package/internal/components/menu-dropdown/index.js +10 -12
- package/internal/components/menu-dropdown/index.js.map +1 -1
- package/internal/components/option/highlight-match.js +14 -18
- package/internal/components/option/highlight-match.js.map +1 -1
- package/internal/components/option/index.js +13 -13
- package/internal/components/option/index.js.map +1 -1
- package/internal/components/option/option-announcer.js +1 -1
- package/internal/components/option/option-announcer.js.map +1 -1
- package/internal/components/option/option-parts.js +28 -45
- package/internal/components/option/option-parts.js.map +1 -1
- package/internal/components/option/utils/filter-options.js +16 -19
- package/internal/components/option/utils/filter-options.js.map +1 -1
- package/internal/components/option/utils/flatten-options.js +15 -15
- package/internal/components/option/utils/flatten-options.js.map +1 -1
- package/internal/components/option/utils/prepare-options.js +3 -3
- package/internal/components/option/utils/prepare-options.js.map +1 -1
- package/internal/components/options-list/index.js +19 -20
- package/internal/components/options-list/index.js.map +1 -1
- package/internal/components/options-list/utils/test-indexes.js +11 -11
- package/internal/components/options-list/utils/test-indexes.js.map +1 -1
- package/internal/components/options-list/utils/use-highlight-option.js +17 -21
- package/internal/components/options-list/utils/use-highlight-option.js.map +1 -1
- package/internal/components/options-list/utils/use-ids.js +2 -2
- package/internal/components/options-list/utils/use-ids.js.map +1 -1
- package/internal/components/options-list/utils/use-keyboard.js +6 -8
- package/internal/components/options-list/utils/use-keyboard.js.map +1 -1
- package/internal/components/options-list/utils/use-open-state.js +6 -7
- package/internal/components/options-list/utils/use-open-state.js.map +1 -1
- package/internal/components/portal/index.js +5 -6
- package/internal/components/portal/index.js.map +1 -1
- package/internal/components/screenreader-only/index.js +1 -2
- package/internal/components/screenreader-only/index.js.map +1 -1
- package/internal/components/selectable-item/index.js +25 -26
- package/internal/components/selectable-item/index.js.map +1 -1
- package/internal/components/tab-trap/index.js +1 -2
- package/internal/components/tab-trap/index.js.map +1 -1
- package/internal/components/transition/index.js +16 -16
- package/internal/components/transition/index.js.map +1 -1
- package/internal/components/visual-context/index.js +6 -7
- package/internal/components/visual-context/index.js.map +1 -1
- package/internal/context/app-layout-context.js +2 -2
- package/internal/context/app-layout-context.js.map +1 -1
- package/internal/context/form-field-context.js +4 -4
- package/internal/context/form-field-context.js.map +1 -1
- package/internal/context/split-panel-context.js +3 -3
- package/internal/context/split-panel-context.js.map +1 -1
- package/internal/debounce.js +6 -11
- package/internal/debounce.js.map +1 -1
- package/internal/environment.js +1 -1
- package/internal/events/index.js +12 -16
- package/internal/events/index.js.map +1 -1
- package/internal/focus-tracker.js +22 -27
- package/internal/focus-tracker.js.map +1 -1
- package/internal/generated/custom-css-properties/index.js +2 -2
- package/internal/generated/custom-css-properties/index.js.map +1 -1
- package/internal/hooks/check-controlled/index.js +1 -1
- package/internal/hooks/check-controlled/index.js.map +1 -1
- package/internal/hooks/container-queries/use-container-breakpoints.js +2 -2
- package/internal/hooks/container-queries/use-container-breakpoints.js.map +1 -1
- package/internal/hooks/container-queries/use-container-query.js +5 -6
- package/internal/hooks/container-queries/use-container-query.js.map +1 -1
- package/internal/hooks/container-queries/use-resize-observer.js +13 -13
- package/internal/hooks/container-queries/use-resize-observer.js.map +1 -1
- package/internal/hooks/focus-visible/index.js +8 -8
- package/internal/hooks/focus-visible/index.js.map +1 -1
- package/internal/hooks/forward-focus/index.js +5 -9
- package/internal/hooks/forward-focus/index.js.map +1 -1
- package/internal/hooks/forward-focus/radio-group.js +7 -7
- package/internal/hooks/forward-focus/radio-group.js.map +1 -1
- package/internal/hooks/use-base-component/component-metadata.js +5 -5
- package/internal/hooks/use-base-component/component-metadata.js.map +1 -1
- package/internal/hooks/use-base-component/index.js +1 -1
- package/internal/hooks/use-base-component/index.js.map +1 -1
- package/internal/hooks/use-controllable/index.js +16 -17
- package/internal/hooks/use-controllable/index.js.map +1 -1
- package/internal/hooks/use-date-cache/index.js +2 -2
- package/internal/hooks/use-date-cache/index.js.map +1 -1
- package/internal/hooks/use-debounce-callback/index.js +3 -7
- package/internal/hooks/use-debounce-callback/index.js.map +1 -1
- package/internal/hooks/use-dynamic-overlap/index.js +4 -4
- package/internal/hooks/use-dynamic-overlap/index.js.map +1 -1
- package/internal/hooks/use-effect-on-update.js +2 -2
- package/internal/hooks/use-effect-on-update.js.map +1 -1
- package/internal/hooks/use-focus-tracker.js +7 -8
- package/internal/hooks/use-focus-tracker.js.map +1 -1
- package/internal/hooks/use-has-rendered/index.js +6 -6
- package/internal/hooks/use-has-rendered/index.js.map +1 -1
- package/internal/hooks/use-merge-refs/index.js +5 -9
- package/internal/hooks/use-merge-refs/index.js.map +1 -1
- package/internal/hooks/use-mobile/index.js +7 -7
- package/internal/hooks/use-mobile/index.js.map +1 -1
- package/internal/hooks/use-mouse-down-target.js +5 -5
- package/internal/hooks/use-mouse-down-target.js.map +1 -1
- package/internal/hooks/use-mutation-observer/index.js +5 -5
- package/internal/hooks/use-mutation-observer/index.js.map +1 -1
- package/internal/hooks/use-portal-mode-classes/index.js +10 -12
- package/internal/hooks/use-portal-mode-classes/index.js.map +1 -1
- package/internal/hooks/use-previous/index.js +3 -3
- package/internal/hooks/use-previous/index.js.map +1 -1
- package/internal/hooks/use-scroll-sync/index.js +8 -9
- package/internal/hooks/use-scroll-sync/index.js.map +1 -1
- package/internal/hooks/use-singleton-handler/index.js +12 -14
- package/internal/hooks/use-singleton-handler/index.js.map +1 -1
- package/internal/hooks/use-stable-event-handler/index.js +3 -10
- package/internal/hooks/use-stable-event-handler/index.js.map +1 -1
- package/internal/hooks/use-telemetry/index.js +2 -2
- package/internal/hooks/use-telemetry/index.js.map +1 -1
- package/internal/hooks/use-telemetry/telemetry.js +3 -4
- package/internal/hooks/use-telemetry/telemetry.js.map +1 -1
- package/internal/hooks/use-unique-id/index.js +3 -3
- package/internal/hooks/use-unique-id/index.js.map +1 -1
- package/internal/hooks/use-visual-mode/index.js +11 -11
- package/internal/hooks/use-visual-mode/index.js.map +1 -1
- package/internal/is-development.js +1 -1
- package/internal/is-development.js.map +1 -1
- package/internal/logging.js +2 -2
- package/internal/logging.js.map +1 -1
- package/internal/manifest.json +1 -1
- package/internal/metrics/log-clients.js +18 -27
- package/internal/metrics/log-clients.js.map +1 -1
- package/internal/metrics/metrics-formatters.js +11 -14
- package/internal/metrics/metrics-formatters.js.map +1 -1
- package/internal/metrics/metrics.js +27 -33
- package/internal/metrics/metrics.js.map +1 -1
- package/internal/motion.js +2 -2
- package/internal/motion.js.map +1 -1
- package/internal/styles/colors.js +1 -1
- package/internal/styles/colors.js.map +1 -1
- package/internal/utils/browser-scrollbar-size.js +5 -5
- package/internal/utils/browser-scrollbar-size.js.map +1 -1
- package/internal/utils/calculate-once.js +2 -2
- package/internal/utils/calculate-once.js.map +1 -1
- package/internal/utils/check-safe-url.js +4 -4
- package/internal/utils/check-safe-url.js.map +1 -1
- package/internal/utils/create-category-color-scale.js +6 -9
- package/internal/utils/create-category-color-scale.js.map +1 -1
- package/internal/utils/date-time/format-date-range.js +3 -3
- package/internal/utils/date-time/format-date-range.js.map +1 -1
- package/internal/utils/date-time/format-date.js +4 -4
- package/internal/utils/date-time/format-date.js.map +1 -1
- package/internal/utils/date-time/format-time.js +5 -5
- package/internal/utils/date-time/format-time.js.map +1 -1
- package/internal/utils/date-time/format-timezone-offset.js +4 -4
- package/internal/utils/date-time/format-timezone-offset.js.map +1 -1
- package/internal/utils/date-time/is-iso-date-only.js +1 -1
- package/internal/utils/date-time/is-iso-date-only.js.map +1 -1
- package/internal/utils/date-time/join-date-time.js +3 -3
- package/internal/utils/date-time/join-date-time.js.map +1 -1
- package/internal/utils/date-time/parse-date.js +5 -6
- package/internal/utils/date-time/parse-date.js.map +1 -1
- package/internal/utils/date-time/parse-timezone-offset.js +5 -5
- package/internal/utils/date-time/parse-timezone-offset.js.map +1 -1
- package/internal/utils/date-time/shift-timezone-offset.js +6 -6
- package/internal/utils/date-time/shift-timezone-offset.js.map +1 -1
- package/internal/utils/dom.js +12 -12
- package/internal/utils/dom.js.map +1 -1
- package/internal/utils/external-props.js +3 -3
- package/internal/utils/external-props.js.map +1 -1
- package/internal/utils/focus-svg-element.js +1 -1
- package/internal/utils/focus-svg-element.js.map +1 -1
- package/internal/utils/locale/merge-locales.js +1 -1
- package/internal/utils/locale/merge-locales.js.map +1 -1
- package/internal/utils/locale/normalize-locale.js +3 -3
- package/internal/utils/locale/normalize-locale.js.map +1 -1
- package/internal/utils/promises.js +7 -11
- package/internal/utils/promises.js.map +1 -1
- package/internal/utils/scrollable-containers.js +14 -18
- package/internal/utils/scrollable-containers.js.map +1 -1
- package/internal/utils/strings/join-strings.js +1 -5
- package/internal/utils/strings/join-strings.js.map +1 -1
- package/internal/utils/strings/pad-left-zeros.js +1 -1
- package/internal/utils/strings/pad-left-zeros.js.map +1 -1
- package/internal/utils/throttle.js +10 -15
- package/internal/utils/throttle.js.map +1 -1
- package/internal/utils/use-container-width.js +3 -5
- package/internal/utils/use-container-width.js.map +1 -1
- package/line-chart/index.js +6 -6
- package/line-chart/index.js.map +1 -1
- package/link/index.js +5 -5
- package/link/index.js.map +1 -1
- package/link/internal.js +25 -25
- package/link/internal.js.map +1 -1
- package/mixed-line-bar-chart/bar-groups.js +3 -4
- package/mixed-line-bar-chart/bar-groups.js.map +1 -1
- package/mixed-line-bar-chart/bar-series.js +24 -33
- package/mixed-line-bar-chart/bar-series.js.map +1 -1
- package/mixed-line-bar-chart/chart-container.js +123 -138
- package/mixed-line-bar-chart/chart-container.js.map +1 -1
- package/mixed-line-bar-chart/chart-filters.js +10 -17
- package/mixed-line-bar-chart/chart-filters.js.map +1 -1
- package/mixed-line-bar-chart/chart-legend.js +9 -13
- package/mixed-line-bar-chart/chart-legend.js.map +1 -1
- package/mixed-line-bar-chart/chart-popover.js +3 -4
- package/mixed-line-bar-chart/chart-popover.js.map +1 -1
- package/mixed-line-bar-chart/data-series.js +13 -17
- package/mixed-line-bar-chart/data-series.js.map +1 -1
- package/mixed-line-bar-chart/domain.js +32 -39
- package/mixed-line-bar-chart/domain.js.map +1 -1
- package/mixed-line-bar-chart/format-highlighted.js +13 -14
- package/mixed-line-bar-chart/format-highlighted.js.map +1 -1
- package/mixed-line-bar-chart/hooks/use-mouse-hover.js +32 -34
- package/mixed-line-bar-chart/hooks/use-mouse-hover.js.map +1 -1
- package/mixed-line-bar-chart/hooks/use-navigation.js +48 -57
- package/mixed-line-bar-chart/hooks/use-navigation.js.map +1 -1
- package/mixed-line-bar-chart/hooks/use-popover.js +7 -7
- package/mixed-line-bar-chart/hooks/use-popover.js.map +1 -1
- package/mixed-line-bar-chart/index.js +4 -4
- package/mixed-line-bar-chart/index.js.map +1 -1
- package/mixed-line-bar-chart/internal.js +47 -49
- package/mixed-line-bar-chart/internal.js.map +1 -1
- package/mixed-line-bar-chart/line-series.js +19 -24
- package/mixed-line-bar-chart/line-series.js.map +1 -1
- package/mixed-line-bar-chart/make-scaled-bar-groups.js +10 -11
- package/mixed-line-bar-chart/make-scaled-bar-groups.js.map +1 -1
- package/mixed-line-bar-chart/make-scaled-series.js +30 -38
- package/mixed-line-bar-chart/make-scaled-series.js.map +1 -1
- package/mixed-line-bar-chart/utils.js +18 -21
- package/mixed-line-bar-chart/utils.js.map +1 -1
- package/modal/body-scroll.js +4 -4
- package/modal/body-scroll.js.map +1 -1
- package/modal/index.js +4 -4
- package/modal/index.js.map +1 -1
- package/modal/internal.js +24 -25
- package/modal/internal.js.map +1 -1
- package/multiselect/index.js +5 -5
- package/multiselect/index.js.map +1 -1
- package/multiselect/internal.js +81 -88
- package/multiselect/internal.js.map +1 -1
- package/package.json +1 -1
- package/pagination/index.js +2 -3
- package/pagination/index.js.map +1 -1
- package/pagination/internal.js +16 -17
- package/pagination/internal.js.map +1 -1
- package/pagination/utils.js +12 -12
- package/pagination/utils.js.map +1 -1
- package/pie-chart/index.js +38 -39
- package/pie-chart/index.js.map +1 -1
- package/pie-chart/labels.js +38 -42
- package/pie-chart/labels.js.map +1 -1
- package/pie-chart/pie-chart.js +65 -67
- package/pie-chart/pie-chart.js.map +1 -1
- package/pie-chart/responsive-text.js +9 -10
- package/pie-chart/responsive-text.js.map +1 -1
- package/pie-chart/segments.js +27 -31
- package/pie-chart/segments.js.map +1 -1
- package/pie-chart/utils.js +32 -35
- package/pie-chart/utils.js.map +1 -1
- package/popover/arrow.js +2 -2
- package/popover/arrow.js.map +1 -1
- package/popover/body.js +16 -19
- package/popover/body.js.map +1 -1
- package/popover/container.js +52 -55
- package/popover/container.js.map +1 -1
- package/popover/index.js +6 -6
- package/popover/index.js.map +1 -1
- package/popover/internal.js +28 -28
- package/popover/internal.js.map +1 -1
- package/popover/utils/positions.js +54 -66
- package/popover/utils/positions.js.map +1 -1
- package/progress-bar/index.js +17 -17
- package/progress-bar/index.js.map +1 -1
- package/progress-bar/internal.js +12 -16
- package/progress-bar/internal.js.map +1 -1
- package/property-filter/controller.js +117 -125
- package/property-filter/controller.js.map +1 -1
- package/property-filter/filter-options.js +8 -11
- package/property-filter/filter-options.js.map +1 -1
- package/property-filter/index.js +50 -50
- package/property-filter/index.js.map +1 -1
- package/property-filter/property-editor.js +4 -5
- package/property-filter/property-editor.js.map +1 -1
- package/property-filter/property-filter-autosuggest.js +39 -39
- package/property-filter/property-filter-autosuggest.js.map +1 -1
- package/property-filter/token-editor.js +55 -66
- package/property-filter/token-editor.js.map +1 -1
- package/property-filter/token.js +9 -11
- package/property-filter/token.js.map +1 -1
- package/property-filter/use-load-items.js +8 -12
- package/property-filter/use-load-items.js.map +1 -1
- package/property-filter/utils.js +13 -18
- package/property-filter/utils.js.map +1 -1
- package/radio-group/index.js +3 -4
- package/radio-group/index.js.map +1 -1
- package/radio-group/internal.js +9 -9
- package/radio-group/internal.js.map +1 -1
- package/radio-group/radio-button.js +12 -15
- package/radio-group/radio-button.js.map +1 -1
- package/s3-resource-selector/index.js +29 -29
- package/s3-resource-selector/index.js.map +1 -1
- package/s3-resource-selector/s3-in-context/index.js +16 -18
- package/s3-resource-selector/s3-in-context/index.js.map +1 -1
- package/s3-resource-selector/s3-in-context/search-input.js +3 -4
- package/s3-resource-selector/s3-in-context/search-input.js.map +1 -1
- package/s3-resource-selector/s3-in-context/use-versions-fetch.js +16 -16
- package/s3-resource-selector/s3-in-context/use-versions-fetch.js.map +1 -1
- package/s3-resource-selector/s3-in-context/validation.js +6 -6
- package/s3-resource-selector/s3-in-context/validation.js.map +1 -1
- package/s3-resource-selector/s3-modal/basic-table.js +19 -20
- package/s3-resource-selector/s3-modal/basic-table.js.map +1 -1
- package/s3-resource-selector/s3-modal/buckets-table.js +11 -13
- package/s3-resource-selector/s3-modal/buckets-table.js.map +1 -1
- package/s3-resource-selector/s3-modal/column-formats.js +5 -5
- package/s3-resource-selector/s3-modal/column-formats.js.map +1 -1
- package/s3-resource-selector/s3-modal/empty-state.js +1 -2
- package/s3-resource-selector/s3-modal/empty-state.js.map +1 -1
- package/s3-resource-selector/s3-modal/index.js +37 -43
- package/s3-resource-selector/s3-modal/index.js.map +1 -1
- package/s3-resource-selector/s3-modal/objects-table.js +12 -14
- package/s3-resource-selector/s3-modal/objects-table.js.map +1 -1
- package/s3-resource-selector/s3-modal/table-utils.js +9 -12
- package/s3-resource-selector/s3-modal/table-utils.js.map +1 -1
- package/s3-resource-selector/s3-modal/versions-table.js +10 -12
- package/s3-resource-selector/s3-modal/versions-table.js.map +1 -1
- package/s3-resource-selector/utils.js +1 -1
- package/s3-resource-selector/utils.js.map +1 -1
- package/segmented-control/index.js +2 -3
- package/segmented-control/index.js.map +1 -1
- package/segmented-control/internal-segmented-control.js +16 -17
- package/segmented-control/internal-segmented-control.js.map +1 -1
- package/segmented-control/internal.js +14 -14
- package/segmented-control/internal.js.map +1 -1
- package/segmented-control/segment.js +3 -6
- package/segmented-control/segment.js.map +1 -1
- package/select/index.js +6 -6
- package/select/index.js.map +1 -1
- package/select/internal.js +58 -58
- package/select/internal.js.map +1 -1
- package/select/parts/filter.js +4 -4
- package/select/parts/filter.js.map +1 -1
- package/select/parts/item.js +10 -10
- package/select/parts/item.js.map +1 -1
- package/select/parts/multiselect-item.js +13 -14
- package/select/parts/multiselect-item.js.map +1 -1
- package/select/parts/plain-list.js +13 -15
- package/select/parts/plain-list.js.map +1 -1
- package/select/parts/trigger.js +7 -9
- package/select/parts/trigger.js.map +1 -1
- package/select/parts/virtual-list.js +27 -33
- package/select/parts/virtual-list.js.map +1 -1
- package/select/utils/check-option-value-field.js +2 -2
- package/select/utils/check-option-value-field.js.map +1 -1
- package/select/utils/connect-options.js +6 -7
- package/select/utils/connect-options.js.map +1 -1
- package/select/utils/get-item-props.js +4 -7
- package/select/utils/get-item-props.js.map +1 -1
- package/select/utils/render-options.js +13 -15
- package/select/utils/render-options.js.map +1 -1
- package/select/utils/use-announcement.js +10 -11
- package/select/utils/use-announcement.js.map +1 -1
- package/select/utils/use-load-items.js +16 -19
- package/select/utils/use-load-items.js.map +1 -1
- package/select/utils/use-native-search.js +20 -29
- package/select/utils/use-native-search.js.map +1 -1
- package/select/utils/use-select.js +89 -96
- package/select/utils/use-select.js.map +1 -1
- package/side-navigation/index.js +10 -10
- package/side-navigation/index.js.map +1 -1
- package/side-navigation/internal.js +35 -46
- package/side-navigation/internal.js.map +1 -1
- package/side-navigation/util.js +9 -12
- package/side-navigation/util.js.map +1 -1
- package/space-between/index.js +4 -4
- package/space-between/index.js.map +1 -1
- package/space-between/internal.js +7 -7
- package/space-between/internal.js.map +1 -1
- package/spinner/index.js +4 -4
- package/spinner/index.js.map +1 -1
- package/spinner/internal.js +4 -4
- package/spinner/internal.js.map +1 -1
- package/split-panel/bottom.js +22 -25
- package/split-panel/bottom.js.map +1 -1
- package/split-panel/icons/bottom-icon-refresh.js +11 -13
- package/split-panel/icons/bottom-icon-refresh.js.map +1 -1
- package/split-panel/icons/bottom-icon.js +1 -1
- package/split-panel/icons/bottom-icon.js.map +1 -1
- package/split-panel/icons/resize-handler.js +3 -6
- package/split-panel/icons/resize-handler.js.map +1 -1
- package/split-panel/icons/side-position-refresh.js +12 -14
- package/split-panel/icons/side-position-refresh.js.map +1 -1
- package/split-panel/icons/side-position.js +1 -1
- package/split-panel/icons/side-position.js.map +1 -1
- package/split-panel/index.js +65 -65
- package/split-panel/index.js.map +1 -1
- package/split-panel/preferences-modal.js +9 -9
- package/split-panel/preferences-modal.js.map +1 -1
- package/split-panel/side.js +12 -15
- package/split-panel/side.js.map +1 -1
- package/split-panel/utils/size-utils.js +3 -3
- package/split-panel/utils/size-utils.js.map +1 -1
- package/split-panel/utils/use-keyboard-events.js +13 -17
- package/split-panel/utils/use-keyboard-events.js.map +1 -1
- package/split-panel/utils/use-pointer-events.js +12 -13
- package/split-panel/utils/use-pointer-events.js.map +1 -1
- package/status-indicator/index.js +4 -4
- package/status-indicator/index.js.map +1 -1
- package/status-indicator/internal.js +9 -10
- package/status-indicator/internal.js.map +1 -1
- package/table/body-cell/click-away.js +9 -10
- package/table/body-cell/click-away.js.map +1 -1
- package/table/body-cell/index.js +18 -18
- package/table/body-cell/index.js.map +1 -1
- package/table/body-cell/inline-editor.js +32 -46
- package/table/body-cell/inline-editor.js.map +1 -1
- package/table/body-cell/td-element.js +2 -4
- package/table/body-cell/td-element.js.map +1 -1
- package/table/body-cell/use-stable-scroll-position.js +10 -13
- package/table/body-cell/use-stable-scroll-position.js.map +1 -1
- package/table/header-cell/index.d.ts +4 -2
- package/table/header-cell/index.d.ts.map +1 -1
- package/table/header-cell/index.js +33 -34
- package/table/header-cell/index.js.map +1 -1
- package/table/header-cell/utils.js +10 -12
- package/table/header-cell/utils.js.map +1 -1
- package/table/index.js +5 -5
- package/table/index.js.map +1 -1
- package/table/internal.d.ts.map +1 -1
- package/table/internal.js +94 -118
- package/table/internal.js.map +1 -1
- package/table/resizer/index.d.ts +5 -1
- package/table/resizer/index.d.ts.map +1 -1
- package/table/resizer/index.js +40 -39
- package/table/resizer/index.js.map +1 -1
- package/table/selection-control/index.d.ts +4 -1
- package/table/selection-control/index.d.ts.map +1 -1
- package/table/selection-control/index.js +11 -11
- package/table/selection-control/index.js.map +1 -1
- package/table/sticky-header.d.ts +2 -2
- package/table/sticky-header.d.ts.map +1 -1
- package/table/sticky-header.js +16 -15
- package/table/sticky-header.js.map +1 -1
- package/table/sticky-scrollbar.js +5 -6
- package/table/sticky-scrollbar.js.map +1 -1
- package/table/sticky-scrolling.js +10 -10
- package/table/sticky-scrolling.js.map +1 -1
- package/table/thead.d.ts +11 -3
- package/table/thead.d.ts.map +1 -1
- package/table/thead.js +13 -13
- package/table/thead.js.map +1 -1
- package/table/tools-header.js +4 -5
- package/table/tools-header.js.map +1 -1
- package/table/use-column-widths.js +34 -44
- package/table/use-column-widths.js.map +1 -1
- package/table/use-row-events.js +10 -11
- package/table/use-row-events.js.map +1 -1
- package/table/use-selection.js +75 -81
- package/table/use-selection.js.map +1 -1
- package/table/use-sticky-header.js +16 -16
- package/table/use-sticky-header.js.map +1 -1
- package/table/use-sticky-scrollbar.js +42 -42
- package/table/use-sticky-scrollbar.js.map +1 -1
- package/table/use-table-focus-navigation.js +27 -28
- package/table/use-table-focus-navigation.js.map +1 -1
- package/table/utils.js +7 -7
- package/table/utils.js.map +1 -1
- package/tabs/index.js +30 -33
- package/tabs/index.js.map +1 -1
- package/tabs/scroll-utils.js +12 -13
- package/tabs/scroll-utils.js.map +1 -1
- package/tabs/smooth-scroll.js +17 -17
- package/tabs/smooth-scroll.js.map +1 -1
- package/tabs/tab-header-bar.js +61 -66
- package/tabs/tab-header-bar.js.map +1 -1
- package/tag-editor/index.js +59 -72
- package/tag-editor/index.js.map +1 -1
- package/tag-editor/internal.js +21 -29
- package/tag-editor/internal.js.map +1 -1
- package/tag-editor/utils.js +7 -8
- package/tag-editor/utils.js.map +1 -1
- package/tag-editor/validation.js +16 -18
- package/tag-editor/validation.js.map +1 -1
- package/text-content/index.js +6 -6
- package/text-content/index.js.map +1 -1
- package/text-filter/index.js +3 -4
- package/text-filter/index.js.map +1 -1
- package/text-filter/internal.js +10 -10
- package/text-filter/internal.js.map +1 -1
- package/textarea/index.js +23 -24
- package/textarea/index.js.map +1 -1
- package/theming/index.js +2 -3
- package/theming/index.js.map +1 -1
- package/tiles/index.js +3 -4
- package/tiles/index.js.map +1 -1
- package/tiles/internal.js +17 -17
- package/tiles/internal.js.map +1 -1
- package/tiles/tile.js +7 -9
- package/tiles/tile.js.map +1 -1
- package/time-input/index.js +5 -5
- package/time-input/index.js.map +1 -1
- package/time-input/internal.js +9 -9
- package/time-input/internal.js.map +1 -1
- package/toggle/index.js +3 -4
- package/toggle/index.js.map +1 -1
- package/toggle/internal.js +15 -16
- package/toggle/internal.js.map +1 -1
- package/token-group/dismiss-button.js +5 -7
- package/token-group/dismiss-button.js.map +1 -1
- package/token-group/index.js +4 -4
- package/token-group/index.js.map +1 -1
- package/token-group/internal.js +14 -14
- package/token-group/internal.js.map +1 -1
- package/token-group/toggle.js +7 -9
- package/token-group/toggle.js.map +1 -1
- package/top-navigation/1.0-beta/index.js +4 -4
- package/top-navigation/1.0-beta/index.js.map +1 -1
- package/top-navigation/1.0-beta/internal.js +43 -46
- package/top-navigation/1.0-beta/internal.js.map +1 -1
- package/top-navigation/1.0-beta/parts/overflow-menu.js +16 -17
- package/top-navigation/1.0-beta/parts/overflow-menu.js.map +1 -1
- package/top-navigation/1.0-beta/parts/utility.js +9 -12
- package/top-navigation/1.0-beta/parts/utility.js.map +1 -1
- package/top-navigation/1.0-beta/use-top-navigation.js +46 -54
- package/top-navigation/1.0-beta/use-top-navigation.js.map +1 -1
- package/top-navigation/index.js +4 -4
- package/top-navigation/index.js.map +1 -1
- package/top-navigation/internal.js +64 -71
- package/top-navigation/internal.js.map +1 -1
- package/top-navigation/parts/overflow-menu/header.js +3 -4
- package/top-navigation/parts/overflow-menu/header.js.map +1 -1
- package/top-navigation/parts/overflow-menu/index.js +4 -5
- package/top-navigation/parts/overflow-menu/index.js.map +1 -1
- package/top-navigation/parts/overflow-menu/menu-item.js +56 -61
- package/top-navigation/parts/overflow-menu/menu-item.js.map +1 -1
- package/top-navigation/parts/overflow-menu/router.js +11 -13
- package/top-navigation/parts/overflow-menu/router.js.map +1 -1
- package/top-navigation/parts/overflow-menu/views/submenu.js +6 -8
- package/top-navigation/parts/overflow-menu/views/submenu.js.map +1 -1
- package/top-navigation/parts/overflow-menu/views/utilities.js +5 -7
- package/top-navigation/parts/overflow-menu/views/utilities.js.map +1 -1
- package/top-navigation/parts/utility.js +12 -15
- package/top-navigation/parts/utility.js.map +1 -1
- package/top-navigation/use-top-navigation.js +52 -59
- package/top-navigation/use-top-navigation.js.map +1 -1
- package/tutorial-panel/components/tutorial-detail-view/congratulation-screen.js +5 -7
- package/tutorial-panel/components/tutorial-detail-view/congratulation-screen.js.map +1 -1
- package/tutorial-panel/components/tutorial-detail-view/index.js +6 -7
- package/tutorial-panel/components/tutorial-detail-view/index.js.map +1 -1
- package/tutorial-panel/components/tutorial-detail-view/task-list.js +8 -15
- package/tutorial-panel/components/tutorial-detail-view/task-list.js.map +1 -1
- package/tutorial-panel/components/tutorial-detail-view/task.js +5 -6
- package/tutorial-panel/components/tutorial-detail-view/task.js.map +1 -1
- package/tutorial-panel/components/tutorial-list/index.js +19 -22
- package/tutorial-panel/components/tutorial-list/index.js.map +1 -1
- package/tutorial-panel/index.js +8 -8
- package/tutorial-panel/index.js.map +1 -1
- package/wizard/index.js +28 -28
- package/wizard/index.js.map +1 -1
- package/wizard/internal/analytics.js +32 -42
- package/wizard/internal/analytics.js.map +1 -1
- package/wizard/unmount.js +6 -13
- package/wizard/unmount.js.map +1 -1
- package/wizard/wizard-actions.js +7 -8
- package/wizard/wizard-actions.js.map +1 -1
- package/wizard/wizard-form-header.js +2 -3
- package/wizard/wizard-form-header.js.map +1 -1
- package/wizard/wizard-form.js +14 -16
- package/wizard/wizard-form.js.map +1 -1
- package/wizard/wizard-navigation.js +19 -25
- package/wizard/wizard-navigation.js.map +1 -1
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
2
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
3
|
import { useMergeRefs } from '../../internal/hooks/use-merge-refs';
|
|
@@ -8,16 +7,15 @@ import { renderOptions } from '../utils/render-options';
|
|
|
8
7
|
import { useVirtual } from 'react-virtual';
|
|
9
8
|
import { useContainerQuery } from '../../internal/hooks/container-queries';
|
|
10
9
|
import styles from './styles.css.js';
|
|
11
|
-
|
|
12
|
-
return props.menuProps.open ? React.createElement(VirtualListOpen,
|
|
10
|
+
const VirtualList = (props, ref) => {
|
|
11
|
+
return props.menuProps.open ? React.createElement(VirtualListOpen, Object.assign({}, props, { ref: ref })) : React.createElement(VirtualListClosed, Object.assign({}, props, { ref: ref }));
|
|
13
12
|
};
|
|
14
|
-
|
|
15
|
-
var menuProps = _a.menuProps, getOptionProps = _a.getOptionProps, filteredOptions = _a.filteredOptions, filteringValue = _a.filteringValue, highlightType = _a.highlightType, checkboxes = _a.checkboxes, hasDropdownStatus = _a.hasDropdownStatus, listBottom = _a.listBottom, useInteractiveGroups = _a.useInteractiveGroups, screenReaderContent = _a.screenReaderContent;
|
|
13
|
+
const VirtualListOpen = forwardRef(({ menuProps, getOptionProps, filteredOptions, filteringValue, highlightType, checkboxes, hasDropdownStatus, listBottom, useInteractiveGroups, screenReaderContent, }, ref) => {
|
|
16
14
|
// update component, when it gets wider or narrower to reposition items
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
const [width, menuMeasureRef] = useContainerQuery(rect => rect.width, []);
|
|
16
|
+
const menuRefObject = useRef(null);
|
|
17
|
+
const menuRef = useMergeRefs(menuMeasureRef, menuRefObject, menuProps.ref);
|
|
18
|
+
const { virtualItems, totalSize, scrollToIndex } = useVirtual({
|
|
21
19
|
size: filteredOptions.length,
|
|
22
20
|
parentRef: menuRefObject,
|
|
23
21
|
// estimateSize is a dependency of measurements memo. We update it to force full recalculation
|
|
@@ -25,38 +23,34 @@ var VirtualListOpen = forwardRef(function (_a, ref) {
|
|
|
25
23
|
// 1: because the component got resized (width property got updated)
|
|
26
24
|
// 2: because the option changed its content (filteringValue property controls the highlight and the visibility of hidden tags)
|
|
27
25
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
28
|
-
estimateSize: useCallback(
|
|
29
|
-
overscan: 5
|
|
30
|
-
})
|
|
31
|
-
useImperativeHandle(ref,
|
|
26
|
+
estimateSize: useCallback(() => 31, [width, filteringValue]),
|
|
27
|
+
overscan: 5,
|
|
28
|
+
});
|
|
29
|
+
useImperativeHandle(ref, () => (index) => {
|
|
32
30
|
if (highlightType === 'keyboard') {
|
|
33
31
|
scrollToIndex(index);
|
|
34
32
|
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
options: virtualItems.map(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
useInteractiveGroups: useInteractiveGroups,
|
|
48
|
-
screenReaderContent: screenReaderContent,
|
|
49
|
-
ariaSetsize: filteredOptions.length
|
|
33
|
+
}, [highlightType, scrollToIndex]);
|
|
34
|
+
const finalOptions = renderOptions({
|
|
35
|
+
options: virtualItems.map(({ index }) => filteredOptions[index]),
|
|
36
|
+
getOptionProps,
|
|
37
|
+
filteringValue,
|
|
38
|
+
highlightType,
|
|
39
|
+
checkboxes,
|
|
40
|
+
hasDropdownStatus,
|
|
41
|
+
virtualItems,
|
|
42
|
+
useInteractiveGroups,
|
|
43
|
+
screenReaderContent,
|
|
44
|
+
ariaSetsize: filteredOptions.length,
|
|
50
45
|
});
|
|
51
|
-
return (React.createElement(OptionsList,
|
|
46
|
+
return (React.createElement(OptionsList, Object.assign({}, menuProps, { ref: menuRef }),
|
|
52
47
|
React.createElement("div", { "aria-hidden": "true", key: "total-size", className: styles['layout-strut'], style: { height: totalSize } }),
|
|
53
48
|
finalOptions,
|
|
54
49
|
listBottom ? (React.createElement("li", { role: "option", className: styles['list-bottom'] }, listBottom)) : null));
|
|
55
50
|
});
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
return (React.createElement(OptionsList, __assign({}, menuProps, { ref: menuProps.ref }), listBottom ? (React.createElement("li", { role: "option", className: styles['list-bottom'] }, listBottom)) : null));
|
|
51
|
+
const VirtualListClosed = forwardRef(({ menuProps, listBottom }, ref) => {
|
|
52
|
+
useImperativeHandle(ref, () => () => { }, []);
|
|
53
|
+
return (React.createElement(OptionsList, Object.assign({}, menuProps, { ref: menuProps.ref }), listBottom ? (React.createElement("li", { role: "option", className: styles['list-bottom'] }, listBottom)) : null));
|
|
60
54
|
});
|
|
61
55
|
export default forwardRef(VirtualList);
|
|
62
56
|
//# sourceMappingURL=virtual-list.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"virtual-list.js","sourceRoot":"","sources":["../../../../src/select/parts/virtual-list.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"virtual-list.js","sourceRoot":"","sources":["../../../../src/select/parts/virtual-list.tsx"],"names":[],"mappings":"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","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { useMergeRefs } from '../../internal/hooks/use-merge-refs';\nimport React, { forwardRef, useCallback, useImperativeHandle, useRef } from 'react';\nimport OptionsList from '../../internal/components/options-list';\nimport { renderOptions } from '../utils/render-options';\nimport { useVirtual } from 'react-virtual';\nimport { SelectListProps } from './plain-list';\nimport { useContainerQuery } from '../../internal/hooks/container-queries';\n\nimport styles from './styles.css.js';\n\nconst VirtualList = (props: SelectListProps, ref: React.Ref<SelectListProps.SelectListRef>) => {\n return props.menuProps.open ? <VirtualListOpen {...props} ref={ref} /> : <VirtualListClosed {...props} ref={ref} />;\n};\n\nconst VirtualListOpen = forwardRef(\n (\n {\n menuProps,\n getOptionProps,\n filteredOptions,\n filteringValue,\n highlightType,\n checkboxes,\n hasDropdownStatus,\n listBottom,\n useInteractiveGroups,\n screenReaderContent,\n }: SelectListProps,\n ref: React.Ref<SelectListProps.SelectListRef>\n ) => {\n // update component, when it gets wider or narrower to reposition items\n const [width, menuMeasureRef] = useContainerQuery(rect => rect.width, []);\n const menuRefObject = useRef(null);\n const menuRef = useMergeRefs(menuMeasureRef, menuRefObject, menuProps.ref);\n\n const { virtualItems, totalSize, scrollToIndex } = useVirtual({\n size: filteredOptions.length,\n parentRef: menuRefObject,\n // estimateSize is a dependency of measurements memo. We update it to force full recalculation\n // when the height of any option could have changed:\n // 1: because the component got resized (width property got updated)\n // 2: because the option changed its content (filteringValue property controls the highlight and the visibility of hidden tags)\n // eslint-disable-next-line react-hooks/exhaustive-deps\n estimateSize: useCallback(() => 31, [width, filteringValue]),\n overscan: 5,\n });\n useImperativeHandle(\n ref,\n () => (index: number) => {\n if (highlightType === 'keyboard') {\n scrollToIndex(index);\n }\n },\n [highlightType, scrollToIndex]\n );\n const finalOptions = renderOptions({\n options: virtualItems.map(({ index }) => filteredOptions[index]),\n getOptionProps,\n filteringValue,\n highlightType,\n checkboxes,\n hasDropdownStatus,\n virtualItems,\n useInteractiveGroups,\n screenReaderContent,\n ariaSetsize: filteredOptions.length,\n });\n return (\n <OptionsList {...menuProps} ref={menuRef}>\n <div aria-hidden=\"true\" key=\"total-size\" className={styles['layout-strut']} style={{ height: totalSize }} />\n {finalOptions}\n {listBottom ? (\n <li role=\"option\" className={styles['list-bottom']}>\n {listBottom}\n </li>\n ) : null}\n </OptionsList>\n );\n }\n);\n\nconst VirtualListClosed = forwardRef(\n ({ menuProps, listBottom }: SelectListProps, ref: React.Ref<SelectListProps.SelectListRef>) => {\n useImperativeHandle(ref, () => () => {}, []);\n return (\n <OptionsList {...menuProps} ref={menuProps.ref}>\n {listBottom ? (\n <li role=\"option\" className={styles['list-bottom']}>\n {listBottom}\n </li>\n ) : null}\n </OptionsList>\n );\n }\n);\n\nexport default forwardRef(VirtualList);\n"]}
|
|
@@ -7,11 +7,11 @@ export function checkOptionValueField(componentName, propertyName, propertyValue
|
|
|
7
7
|
if (!propertyValue) {
|
|
8
8
|
return;
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
const valuePropertyMissing = !propertyValue.every(element => {
|
|
11
11
|
return 'options' in element || 'value' in element;
|
|
12
12
|
});
|
|
13
13
|
if (valuePropertyMissing) {
|
|
14
|
-
warnOnce(componentName,
|
|
14
|
+
warnOnce(componentName, `You provided an \`${propertyName}\` prop where at least one non-group array element is missing the \`value\` field. This field is required for all options without sub-items.`);
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-option-value-field.js","sourceRoot":"","sources":["../../../../src/select/utils/check-option-value-field.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAElD,MAAM,UAAU,qBAAqB,CACnC,aAAqB,EACrB,YAAoB,EACpB,aAAoC;IAEpC,IAAI,aAAa,EAAE;QACjB,IAAI,CAAC,aAAa,EAAE;YAClB,OAAO;SACR;QAED,
|
|
1
|
+
{"version":3,"file":"check-option-value-field.js","sourceRoot":"","sources":["../../../../src/select/utils/check-option-value-field.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAElD,MAAM,UAAU,qBAAqB,CACnC,aAAqB,EACrB,YAAoB,EACpB,aAAoC;IAEpC,IAAI,aAAa,EAAE;QACjB,IAAI,CAAC,aAAa,EAAE;YAClB,OAAO;SACR;QAED,MAAM,oBAAoB,GAAG,CAAC,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE;YAC1D,OAAO,SAAS,IAAI,OAAO,IAAI,OAAO,IAAI,OAAO,CAAC;QACpD,CAAC,CAAC,CAAC;QAEH,IAAI,oBAAoB,EAAE;YACxB,QAAQ,CACN,aAAa,EACb,qBAAqB,YAAY,8IAA8I,CAChL,CAAC;SACH;KACF;AACH,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { isDevelopment } from '../../internal/is-development';\nimport { warnOnce } from '../../internal/logging';\n\nexport function checkOptionValueField<ValueType extends ReadonlyArray<any>>(\n componentName: string,\n propertyName: string,\n propertyValue: ValueType | undefined\n) {\n if (isDevelopment) {\n if (!propertyValue) {\n return;\n }\n\n const valuePropertyMissing = !propertyValue.every(element => {\n return 'options' in element || 'value' in element;\n });\n\n if (valuePropertyMissing) {\n warnOnce(\n componentName,\n `You provided an \\`${propertyName}\\` prop where at least one non-group array element is missing the \\`value\\` field. This field is required for all options without sub-items.`\n );\n }\n }\n}\n"]}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
export
|
|
2
|
-
return (selectedOptions || []).map(
|
|
3
|
-
for (
|
|
4
|
-
var dropdownOption = options_1[_i];
|
|
1
|
+
export const connectOptionsByValue = (options, selectedOptions) => {
|
|
2
|
+
return (selectedOptions || []).map(selectedOption => {
|
|
3
|
+
for (const dropdownOption of options) {
|
|
5
4
|
if (dropdownOption.type !== 'parent' &&
|
|
6
5
|
dropdownOption.option.value === selectedOption.value) {
|
|
7
6
|
return dropdownOption;
|
|
@@ -10,9 +9,9 @@ export var connectOptionsByValue = function (options, selectedOptions) {
|
|
|
10
9
|
return { option: selectedOption };
|
|
11
10
|
});
|
|
12
11
|
};
|
|
13
|
-
export
|
|
14
|
-
for (
|
|
15
|
-
|
|
12
|
+
export const findOptionIndex = (options, option) => {
|
|
13
|
+
for (let index = 0; index < options.length; index++) {
|
|
14
|
+
const __option = options[index];
|
|
16
15
|
if (__option === option || __option.value === option.value) {
|
|
17
16
|
return index;
|
|
18
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connect-options.js","sourceRoot":"","sources":["../../../../src/select/utils/connect-options.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"connect-options.js","sourceRoot":"","sources":["../../../../src/select/utils/connect-options.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACnC,OAAsC,EACtC,eAAgD,EACjB,EAAE;IACjC,OAAO,CAAC,eAAe,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE;QAClD,KAAK,MAAM,cAAc,IAAI,OAAO,EAAE;YACpC,IACE,cAAc,CAAC,IAAI,KAAK,QAAQ;gBAC/B,cAAc,CAAC,MAA2B,CAAC,KAAK,KAAK,cAAc,CAAC,KAAK,EAC1E;gBACA,OAAO,cAAc,CAAC;aACvB;SACF;QACD,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC;IACpC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,OAAwC,EAAE,MAAwB,EAAE,EAAE;IACpG,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;QACnD,MAAM,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;QAChC,IAAI,QAAQ,KAAK,MAAM,IAAI,QAAQ,CAAC,KAAK,KAAK,MAAM,CAAC,KAAK,EAAE;YAC1D,OAAO,KAAK,CAAC;SACd;KACF;IACD,OAAO,CAAC,CAAC,CAAC;AACZ,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { DropdownOption, OptionDefinition } from '../../internal/components/option/interfaces';\n\nexport const connectOptionsByValue = (\n options: ReadonlyArray<DropdownOption>,\n selectedOptions: ReadonlyArray<OptionDefinition>\n): ReadonlyArray<DropdownOption> => {\n return (selectedOptions || []).map(selectedOption => {\n for (const dropdownOption of options) {\n if (\n dropdownOption.type !== 'parent' &&\n (dropdownOption.option as OptionDefinition).value === selectedOption.value\n ) {\n return dropdownOption;\n }\n }\n return { option: selectedOption };\n });\n};\n\nexport const findOptionIndex = (options: ReadonlyArray<OptionDefinition>, option: OptionDefinition) => {\n for (let index = 0; index < options.length; index++) {\n const __option = options[index];\n if (__option === option || __option.value === option.value) {\n return index;\n }\n }\n return -1;\n};\n"]}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
2
1
|
import { getTestOptionIndexes } from '../../internal/components/options-list/utils/test-indexes';
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
var option = _a.option, index = _a.index, getOptionProps = _a.getOptionProps, filteringValue = _a.filteringValue, _c = _a.checkboxes, checkboxes = _c === void 0 ? false : _c;
|
|
6
|
-
var optionProps = getOptionProps(option, index);
|
|
2
|
+
export const getItemProps = ({ option, index, getOptionProps, filteringValue, checkboxes = false }) => {
|
|
3
|
+
const optionProps = getOptionProps(option, index);
|
|
7
4
|
optionProps.filteringValue = filteringValue;
|
|
8
|
-
|
|
9
|
-
return
|
|
5
|
+
const { inGroupIndex, groupIndex, throughIndex } = getTestOptionIndexes(option) || {};
|
|
6
|
+
return Object.assign(Object.assign({}, optionProps), { hasCheckbox: checkboxes, ['data-group-index']: groupIndex, ['data-child-index']: inGroupIndex, ['data-test-index']: throughIndex });
|
|
10
7
|
};
|
|
11
8
|
//# sourceMappingURL=get-item-props.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-item-props.js","sourceRoot":"","sources":["../../../../src/select/utils/get-item-props.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-item-props.js","sourceRoot":"","sources":["../../../../src/select/utils/get-item-props.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2DAA2D,CAAC;AAUjG,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,UAAU,GAAG,KAAK,EAAa,EAAE,EAAE;IAC/G,MAAM,WAAW,GAAG,cAAc,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAClD,WAAW,CAAC,cAAc,GAAG,cAAc,CAAC;IAC5C,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,oBAAoB,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IACtF,uCACK,WAAW,KACd,WAAW,EAAE,UAAU,EACvB,CAAC,kBAAkB,CAAC,EAAE,UAAU,EAChC,CAAC,kBAAkB,CAAC,EAAE,YAAY,EAClC,CAAC,iBAAiB,CAAC,EAAE,YAAY,IACjC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { DropdownOption } from '../../internal/components/option/interfaces';\nimport { getTestOptionIndexes } from '../../internal/components/options-list/utils/test-indexes';\n\ninterface ItemProps {\n option: DropdownOption;\n index: number;\n getOptionProps: any;\n filteringValue: string;\n checkboxes: boolean;\n}\n\nexport const getItemProps = ({ option, index, getOptionProps, filteringValue, checkboxes = false }: ItemProps) => {\n const optionProps = getOptionProps(option, index);\n optionProps.filteringValue = filteringValue;\n const { inGroupIndex, groupIndex, throughIndex } = getTestOptionIndexes(option) || {};\n return {\n ...optionProps,\n hasCheckbox: checkboxes,\n ['data-group-index']: groupIndex,\n ['data-child-index']: inGroupIndex,\n ['data-test-index']: throughIndex,\n };\n};\n"]}
|
|
@@ -1,26 +1,24 @@
|
|
|
1
|
-
import { __assign } from "tslib";
|
|
2
1
|
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
4
3
|
import React from 'react';
|
|
5
4
|
import Item from '../parts/item';
|
|
6
5
|
import MutliselectItem from '../parts/multiselect-item';
|
|
7
6
|
import { getItemProps } from './get-item-props';
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
option: option,
|
|
7
|
+
export const renderOptions = ({ options, getOptionProps, filteringValue, highlightType, checkboxes = false, hasDropdownStatus, virtualItems, useInteractiveGroups, screenReaderContent, ariaSetsize, }) => {
|
|
8
|
+
return options.map((option, index) => {
|
|
9
|
+
const virtualItem = virtualItems && virtualItems[index];
|
|
10
|
+
const globalIndex = virtualItem ? virtualItem.index : index;
|
|
11
|
+
const props = getItemProps({
|
|
12
|
+
option,
|
|
15
13
|
index: globalIndex,
|
|
16
|
-
getOptionProps
|
|
17
|
-
filteringValue
|
|
18
|
-
checkboxes
|
|
14
|
+
getOptionProps,
|
|
15
|
+
filteringValue,
|
|
16
|
+
checkboxes,
|
|
19
17
|
});
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
return (React.createElement(ListItem,
|
|
18
|
+
const isLastItem = index === options.length - 1;
|
|
19
|
+
const padBottom = !hasDropdownStatus && isLastItem;
|
|
20
|
+
const ListItem = useInteractiveGroups ? MutliselectItem : Item;
|
|
21
|
+
return (React.createElement(ListItem, Object.assign({ key: globalIndex }, props, { virtualPosition: virtualItem && virtualItem.start, ref: virtualItem && virtualItem.measureRef, padBottom: padBottom, screenReaderContent: screenReaderContent, ariaPosinset: globalIndex + 1, ariaSetsize: ariaSetsize, highlightType: highlightType })));
|
|
24
22
|
});
|
|
25
23
|
};
|
|
26
24
|
//# sourceMappingURL=render-options.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-options.js","sourceRoot":"","sources":["../../../../src/select/utils/render-options.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"render-options.js","sourceRoot":"","sources":["../../../../src/select/utils/render-options.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,IAAI,MAAM,eAAe,CAAC;AACjC,OAAO,eAAe,MAAM,2BAA2B,CAAC;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAgBhD,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAC5B,OAAO,EACP,cAAc,EACd,cAAc,EACd,aAAa,EACb,UAAU,GAAG,KAAK,EAClB,iBAAiB,EACjB,YAAY,EACZ,oBAAoB,EACpB,mBAAmB,EACnB,WAAW,GACO,EAAE,EAAE;IACtB,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;QACnC,MAAM,WAAW,GAAG,YAAY,IAAI,YAAY,CAAC,KAAK,CAAC,CAAC;QACxD,MAAM,WAAW,GAAG,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;QAC5D,MAAM,KAAK,GAAG,YAAY,CAAC;YACzB,MAAM;YACN,KAAK,EAAE,WAAW;YAClB,cAAc;YACd,cAAc;YACd,UAAU;SACX,CAAC,CAAC;QAEH,MAAM,UAAU,GAAG,KAAK,KAAK,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC;QAChD,MAAM,SAAS,GAAG,CAAC,iBAAiB,IAAI,UAAU,CAAC;QACnD,MAAM,QAAQ,GAAG,oBAAoB,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC;QAE/D,OAAO,CACL,oBAAC,QAAQ,kBACP,GAAG,EAAE,WAAW,IACZ,KAAK,IACT,eAAe,EAAE,WAAW,IAAI,WAAW,CAAC,KAAK,EACjD,GAAG,EAAE,WAAW,IAAI,WAAW,CAAC,UAAU,EAC1C,SAAS,EAAE,SAAS,EACpB,mBAAmB,EAAE,mBAAmB,EACxC,YAAY,EAAE,WAAW,GAAG,CAAC,EAC7B,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,aAAa,IAC5B,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\nimport { VirtualItem } from 'react-virtual';\nimport Item from '../parts/item';\nimport MutliselectItem from '../parts/multiselect-item';\nimport { DropdownOption } from '../../internal/components/option/interfaces';\nimport { getItemProps } from './get-item-props';\nimport { HighlightType } from '../../internal/components/options-list/utils/use-highlight-option';\n\nexport interface RenderOptionProps {\n options: ReadonlyArray<DropdownOption>;\n getOptionProps: any;\n filteringValue: string;\n highlightType: HighlightType;\n checkboxes?: boolean;\n hasDropdownStatus?: boolean;\n virtualItems?: VirtualItem[];\n useInteractiveGroups?: boolean;\n screenReaderContent?: string;\n ariaSetsize?: number;\n}\n\nexport const renderOptions = ({\n options,\n getOptionProps,\n filteringValue,\n highlightType,\n checkboxes = false,\n hasDropdownStatus,\n virtualItems,\n useInteractiveGroups,\n screenReaderContent,\n ariaSetsize,\n}: RenderOptionProps) => {\n return options.map((option, index) => {\n const virtualItem = virtualItems && virtualItems[index];\n const globalIndex = virtualItem ? virtualItem.index : index;\n const props = getItemProps({\n option,\n index: globalIndex,\n getOptionProps,\n filteringValue,\n checkboxes,\n });\n\n const isLastItem = index === options.length - 1;\n const padBottom = !hasDropdownStatus && isLastItem;\n const ListItem = useInteractiveGroups ? MutliselectItem : Item;\n\n return (\n <ListItem\n key={globalIndex}\n {...props}\n virtualPosition={virtualItem && virtualItem.start}\n ref={virtualItem && virtualItem.measureRef}\n padBottom={padBottom}\n screenReaderContent={screenReaderContent}\n ariaPosinset={globalIndex + 1}\n ariaSetsize={ariaSetsize}\n highlightType={highlightType}\n />\n );\n });\n};\n"]}
|
|
@@ -6,32 +6,31 @@ import defaultOptionDescription from '../../internal/components/option/option-an
|
|
|
6
6
|
*
|
|
7
7
|
* If the testing reveals no issues with the native announcements the live-region can be removed.
|
|
8
8
|
*/
|
|
9
|
-
export function useAnnouncement(
|
|
10
|
-
|
|
11
|
-
var prevAnnouncedGroup = useRef(undefined);
|
|
9
|
+
export function useAnnouncement({ announceSelected, highlightedOption, getParent, selectedAriaLabel, renderHighlightedAriaLive, }) {
|
|
10
|
+
const prevAnnouncedGroup = useRef(undefined);
|
|
12
11
|
// Record previously announced group with a delay to account for possible re-renders of the hook.
|
|
13
|
-
useEffect(
|
|
12
|
+
useEffect(() => {
|
|
14
13
|
if (highlightedOption) {
|
|
15
|
-
|
|
14
|
+
const frameId = requestAnimationFrame(() => {
|
|
16
15
|
prevAnnouncedGroup.current = getParent(highlightedOption);
|
|
17
16
|
});
|
|
18
|
-
return
|
|
17
|
+
return () => cancelAnimationFrame(frameId);
|
|
19
18
|
}
|
|
20
19
|
});
|
|
21
20
|
if (!highlightedOption) {
|
|
22
21
|
return '';
|
|
23
22
|
}
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
const option = highlightedOption.option;
|
|
24
|
+
const parent = getParent(highlightedOption);
|
|
26
25
|
// Only announce parent group if it wasn't announced with previous option.
|
|
27
|
-
|
|
26
|
+
const group = parent && parent !== prevAnnouncedGroup.current ? parent : undefined;
|
|
28
27
|
// Use custom renderer if provided.
|
|
29
28
|
if (renderHighlightedAriaLive) {
|
|
30
29
|
return renderHighlightedAriaLive(option, group);
|
|
31
30
|
}
|
|
32
31
|
// Use default renderer with selected ARIA label if defined and relevant.
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
const selectedAnnouncement = announceSelected && selectedAriaLabel ? selectedAriaLabel : '';
|
|
33
|
+
const defaultDescription = defaultOptionDescription(option, group);
|
|
35
34
|
return [selectedAnnouncement, defaultDescription].filter(Boolean).join(' ');
|
|
36
35
|
}
|
|
37
36
|
//# sourceMappingURL=use-announcement.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-announcement.js","sourceRoot":"","sources":["../../../../src/select/utils/use-announcement.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,wBAAwB,MAAM,mDAAmD,CAAC;AAMzF;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAA8B,
|
|
1
|
+
{"version":3,"file":"use-announcement.js","sourceRoot":"","sources":["../../../../src/select/utils/use-announcement.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,wBAAwB,MAAM,mDAAmD,CAAC;AAMzF;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAA8B,EAC3D,gBAAgB,EAChB,iBAAiB,EACjB,SAAS,EACT,iBAAiB,EACjB,yBAAyB,GAO1B;IACC,MAAM,kBAAkB,GAAG,MAAM,CAA0B,SAAS,CAAC,CAAC;IAEtE,iGAAiG;IACjG,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,iBAAiB,EAAE;YACrB,MAAM,OAAO,GAAG,qBAAqB,CAAC,GAAG,EAAE;gBACzC,kBAAkB,CAAC,OAAO,GAAG,SAAS,CAAC,iBAAiB,CAAC,CAAC;YAC5D,CAAC,CAAC,CAAC;YACH,OAAO,GAAG,EAAE,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;SAC5C;IACH,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,iBAAiB,EAAE;QACtB,OAAO,EAAE,CAAC;KACX;IAED,MAAM,MAAM,GAAG,iBAAiB,CAAC,MAA0B,CAAC;IAC5D,MAAM,MAAM,GAAG,SAAS,CAAC,iBAAiB,CAAC,CAAC;IAC5C,0EAA0E;IAC1E,MAAM,KAAK,GAAG,MAAM,IAAI,MAAM,KAAK,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;IAEnF,mCAAmC;IACnC,IAAI,yBAAyB,EAAE;QAC7B,OAAO,yBAAyB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;KACjD;IAED,yEAAyE;IACzE,MAAM,oBAAoB,GAAG,gBAAgB,IAAI,iBAAiB,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,CAAC;IAC5F,MAAM,kBAAkB,GAAG,wBAAwB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACnE,OAAO,CAAC,oBAAoB,EAAE,kBAAkB,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC9E,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { OptionDefinition, OptionGroup } from '../../internal/components/option/interfaces';\nimport { SelectProps } from '../interfaces';\nimport { useEffect, useRef } from 'react';\nimport defaultOptionDescription from '../../internal/components/option/option-announcer';\n\ninterface OptionHolder {\n option?: OptionDefinition | OptionGroup;\n}\n\n/**\n * The hook produces the live region string to be announced when an option is highlighted.\n * This is a workaround to account for the issues with assistive technologies.\n *\n * If the testing reveals no issues with the native announcements the live-region can be removed.\n */\nexport function useAnnouncement<Option extends OptionHolder>({\n announceSelected,\n highlightedOption,\n getParent,\n selectedAriaLabel,\n renderHighlightedAriaLive,\n}: {\n announceSelected: boolean;\n highlightedOption?: Option;\n getParent: (option: Option) => undefined | OptionGroup;\n selectedAriaLabel?: string;\n renderHighlightedAriaLive?: SelectProps.ContainingOptionAndGroupString;\n}) {\n const prevAnnouncedGroup = useRef<OptionGroup | undefined>(undefined);\n\n // Record previously announced group with a delay to account for possible re-renders of the hook.\n useEffect(() => {\n if (highlightedOption) {\n const frameId = requestAnimationFrame(() => {\n prevAnnouncedGroup.current = getParent(highlightedOption);\n });\n return () => cancelAnimationFrame(frameId);\n }\n });\n\n if (!highlightedOption) {\n return '';\n }\n\n const option = highlightedOption.option as OptionDefinition;\n const parent = getParent(highlightedOption);\n // Only announce parent group if it wasn't announced with previous option.\n const group = parent && parent !== prevAnnouncedGroup.current ? parent : undefined;\n\n // Use custom renderer if provided.\n if (renderHighlightedAriaLive) {\n return renderHighlightedAriaLive(option, group);\n }\n\n // Use default renderer with selected ARIA label if defined and relevant.\n const selectedAnnouncement = announceSelected && selectedAriaLabel ? selectedAriaLabel : '';\n const defaultDescription = defaultOptionDescription(option, group);\n return [selectedAnnouncement, defaultDescription].filter(Boolean).join(' ');\n}\n"]}
|
|
@@ -2,36 +2,33 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
import { useRef } from 'react';
|
|
4
4
|
import { fireNonCancelableEvent } from '../../internal/events';
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var fireLoadItems = function (filteringText) {
|
|
5
|
+
export const useLoadItems = ({ onLoadItems, options, statusType }) => {
|
|
6
|
+
const prevFilteringText = useRef(undefined);
|
|
7
|
+
const fireLoadItems = (filteringText) => {
|
|
9
8
|
if (prevFilteringText.current === filteringText) {
|
|
10
9
|
return;
|
|
11
10
|
}
|
|
12
11
|
prevFilteringText.current = filteringText;
|
|
13
|
-
fireNonCancelableEvent(onLoadItems, { filteringText
|
|
12
|
+
fireNonCancelableEvent(onLoadItems, { filteringText, firstPage: true, samePage: false });
|
|
14
13
|
};
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
const handleLoadMore = () => {
|
|
15
|
+
const firstPage = options.length === 0;
|
|
17
16
|
statusType === 'pending' &&
|
|
18
17
|
fireNonCancelableEvent(onLoadItems, {
|
|
19
|
-
firstPage
|
|
18
|
+
firstPage,
|
|
20
19
|
samePage: false,
|
|
21
|
-
filteringText: prevFilteringText.current || ''
|
|
20
|
+
filteringText: prevFilteringText.current || '',
|
|
22
21
|
});
|
|
23
22
|
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
});
|
|
30
|
-
};
|
|
23
|
+
const handleRecoveryClick = () => fireNonCancelableEvent(onLoadItems, {
|
|
24
|
+
firstPage: false,
|
|
25
|
+
samePage: true,
|
|
26
|
+
filteringText: prevFilteringText.current || '',
|
|
27
|
+
});
|
|
31
28
|
return {
|
|
32
|
-
fireLoadItems
|
|
33
|
-
handleLoadMore
|
|
34
|
-
handleRecoveryClick
|
|
29
|
+
fireLoadItems,
|
|
30
|
+
handleLoadMore,
|
|
31
|
+
handleRecoveryClick,
|
|
35
32
|
};
|
|
36
33
|
};
|
|
37
34
|
//# sourceMappingURL=use-load-items.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-load-items.js","sourceRoot":"","sources":["../../../../src/select/utils/use-load-items.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAW/D,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"use-load-items.js","sourceRoot":"","sources":["../../../../src/select/utils/use-load-items.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAW/D,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAAE,WAAW,EAAE,OAAO,EAAE,UAAU,EAAqB,EAAE,EAAE;IACtF,MAAM,iBAAiB,GAAG,MAAM,CAAqB,SAAS,CAAC,CAAC;IAEhE,MAAM,aAAa,GAAG,CAAC,aAAqB,EAAE,EAAE;QAC9C,IAAI,iBAAiB,CAAC,OAAO,KAAK,aAAa,EAAE;YAC/C,OAAO;SACR;QACD,iBAAiB,CAAC,OAAO,GAAG,aAAa,CAAC;QAC1C,sBAAsB,CAAC,WAAW,EAAE,EAAE,aAAa,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;IAC3F,CAAC,CAAC;IAEF,MAAM,cAAc,GAAG,GAAG,EAAE;QAC1B,MAAM,SAAS,GAAG,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC;QACvC,UAAU,KAAK,SAAS;YACtB,sBAAsB,CAAC,WAAW,EAAE;gBAClC,SAAS;gBACT,QAAQ,EAAE,KAAK;gBACf,aAAa,EAAE,iBAAiB,CAAC,OAAO,IAAI,EAAE;aAC/C,CAAC,CAAC;IACP,CAAC,CAAC;IAEF,MAAM,mBAAmB,GAAG,GAAG,EAAE,CAC/B,sBAAsB,CAAC,WAAW,EAAE;QAClC,SAAS,EAAE,KAAK;QAChB,QAAQ,EAAE,IAAI;QACd,aAAa,EAAE,iBAAiB,CAAC,OAAO,IAAI,EAAE;KAC/C,CAAC,CAAC;IAEL,OAAO;QACL,aAAa;QACb,cAAc;QACd,mBAAmB;KACpB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { useRef } from 'react';\nimport { fireNonCancelableEvent } from '../../internal/events';\nimport { SelectProps } from '../interfaces';\nimport { OptionDefinition, OptionGroup } from '../../internal/components/option/interfaces';\nimport { DropdownStatusProps } from '../../internal/components/dropdown-status';\n\ninterface UseLoadItemsProps {\n onLoadItems: SelectProps['onLoadItems'];\n options: ReadonlyArray<OptionDefinition | OptionGroup>;\n statusType: DropdownStatusProps.StatusType;\n}\n\nexport const useLoadItems = ({ onLoadItems, options, statusType }: UseLoadItemsProps) => {\n const prevFilteringText = useRef<string | undefined>(undefined);\n\n const fireLoadItems = (filteringText: string) => {\n if (prevFilteringText.current === filteringText) {\n return;\n }\n prevFilteringText.current = filteringText;\n fireNonCancelableEvent(onLoadItems, { filteringText, firstPage: true, samePage: false });\n };\n\n const handleLoadMore = () => {\n const firstPage = options.length === 0;\n statusType === 'pending' &&\n fireNonCancelableEvent(onLoadItems, {\n firstPage,\n samePage: false,\n filteringText: prevFilteringText.current || '',\n });\n };\n\n const handleRecoveryClick = () =>\n fireNonCancelableEvent(onLoadItems, {\n firstPage: false,\n samePage: true,\n filteringText: prevFilteringText.current || '',\n });\n\n return {\n fireLoadItems,\n handleLoadMore,\n handleRecoveryClick,\n };\n};\n"]}
|
|
@@ -4,40 +4,32 @@ import { useRef } from 'react';
|
|
|
4
4
|
import { KeyCode } from '../../internal/keycode';
|
|
5
5
|
import { filterOptions, isInteractive, isGroupInteractive, isGroup, } from '../../internal/components/option/utils/filter-options';
|
|
6
6
|
import { useDebounceCallback } from '../../internal/hooks/use-debounce-callback';
|
|
7
|
-
export
|
|
7
|
+
export const isChar = (keyCode) => {
|
|
8
8
|
return [0, KeyCode.enter, KeyCode.space, KeyCode.tab].indexOf(keyCode) === -1;
|
|
9
9
|
};
|
|
10
|
-
export
|
|
10
|
+
export const isRepeatedChar = (str) => str.split('').every(c => c === str[0]);
|
|
11
11
|
function findMatchingOption(options, searchText, currentHighlight, useInteractiveGroups) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
};
|
|
16
|
-
var matchingOptions = filter(searchText);
|
|
12
|
+
const interactivityCheck = useInteractiveGroups ? isGroupInteractive : isInteractive;
|
|
13
|
+
const filter = (searchText) => filterOptions(options, searchText, true).filter(option => interactivityCheck(option));
|
|
14
|
+
const matchingOptions = filter(searchText);
|
|
17
15
|
if (matchingOptions.length === 1) {
|
|
18
16
|
return matchingOptions[0];
|
|
19
17
|
}
|
|
20
18
|
// Hit the same char over and over, we assume they want to cycle through
|
|
21
19
|
if (currentHighlight && searchText.length > 1 && isRepeatedChar(searchText)) {
|
|
22
|
-
|
|
23
|
-
if (
|
|
20
|
+
const matchingOptions = filter(searchText[0]);
|
|
21
|
+
if (matchingOptions.length > 0) {
|
|
24
22
|
//handling OptionGroups when useInteractiveGroups is set
|
|
25
|
-
|
|
26
|
-
?
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}).indexOf(currentHighlight)
|
|
30
|
-
: matchingOptions_1
|
|
31
|
-
.map(function (_a) {
|
|
32
|
-
var option = _a.option;
|
|
33
|
-
return option.value;
|
|
34
|
-
})
|
|
23
|
+
let active = isGroup(currentHighlight)
|
|
24
|
+
? matchingOptions.map(({ option }) => option).indexOf(currentHighlight)
|
|
25
|
+
: matchingOptions
|
|
26
|
+
.map(({ option }) => option.value)
|
|
35
27
|
.indexOf(currentHighlight.value);
|
|
36
28
|
// Pick the next thing (if something with this prefix wasn't selected
|
|
37
29
|
// we'll end up with the first option)
|
|
38
30
|
active += 1;
|
|
39
|
-
active = active %
|
|
40
|
-
return
|
|
31
|
+
active = active % matchingOptions.length;
|
|
32
|
+
return matchingOptions[active];
|
|
41
33
|
}
|
|
42
34
|
}
|
|
43
35
|
// We have multiple things that start with this prefix. Based on the
|
|
@@ -47,22 +39,21 @@ function findMatchingOption(options, searchText, currentHighlight, useInteractiv
|
|
|
47
39
|
}
|
|
48
40
|
return null;
|
|
49
41
|
}
|
|
50
|
-
export function useNativeSearch(
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
return function (event) {
|
|
42
|
+
export function useNativeSearch({ isEnabled, options, highlightOption, highlightedOption, useInteractiveGroups, }) {
|
|
43
|
+
const value = useRef('');
|
|
44
|
+
const delayedResetValue = useDebounceCallback(() => (value.current = ''), 500);
|
|
45
|
+
return (event) => {
|
|
55
46
|
if (!isEnabled) {
|
|
56
47
|
return;
|
|
57
48
|
}
|
|
58
|
-
|
|
49
|
+
const { charCode } = event;
|
|
59
50
|
if (!isChar(charCode)) {
|
|
60
51
|
return;
|
|
61
52
|
}
|
|
62
53
|
delayedResetValue();
|
|
63
|
-
|
|
54
|
+
const newValue = value.current + String.fromCharCode(charCode);
|
|
64
55
|
value.current = newValue;
|
|
65
|
-
|
|
56
|
+
const nextHighlight = findMatchingOption(options, newValue, highlightedOption, useInteractiveGroups);
|
|
66
57
|
if (nextHighlight) {
|
|
67
58
|
highlightOption(nextHighlight);
|
|
68
59
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-native-search.js","sourceRoot":"","sources":["../../../../src/select/utils/use-native-search.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAc,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EACL,aAAa,EACb,aAAa,EACb,kBAAkB,EAClB,OAAO,GACR,MAAM,uDAAuD,CAAC;AAE/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AAEjF,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"use-native-search.js","sourceRoot":"","sources":["../../../../src/select/utils/use-native-search.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\nimport { KeyCode } from '../../internal/keycode';\nimport {\n filterOptions,\n isInteractive,\n isGroupInteractive,\n isGroup,\n} from '../../internal/components/option/utils/filter-options';\nimport { DropdownOption, OptionDefinition, OptionGroup } from '../../internal/components/option/interfaces';\nimport { useDebounceCallback } from '../../internal/hooks/use-debounce-callback';\n\nexport const isChar = (keyCode: number): boolean => {\n return [0, KeyCode.enter, KeyCode.space, KeyCode.tab].indexOf(keyCode) === -1;\n};\n\nexport const isRepeatedChar = (str: string) => str.split('').every(c => c === str[0]);\n\ninterface UseNativeSearchProps {\n isEnabled: boolean;\n options: ReadonlyArray<DropdownOption>;\n highlightOption: (option: DropdownOption) => void;\n highlightedOption: OptionDefinition | undefined | null;\n useInteractiveGroups?: boolean;\n}\n\nfunction findMatchingOption(\n options: ReadonlyArray<DropdownOption>,\n searchText: string,\n currentHighlight: OptionDefinition | OptionGroup | undefined | null,\n useInteractiveGroups?: boolean\n) {\n const interactivityCheck = useInteractiveGroups ? isGroupInteractive : isInteractive;\n const filter = (searchText: string) =>\n filterOptions(options, searchText, true).filter(option => interactivityCheck(option));\n const matchingOptions = filter(searchText);\n\n if (matchingOptions.length === 1) {\n return matchingOptions[0];\n }\n\n // Hit the same char over and over, we assume they want to cycle through\n if (currentHighlight && searchText.length > 1 && isRepeatedChar(searchText)) {\n const matchingOptions = filter(searchText[0]);\n\n if (matchingOptions.length > 0) {\n //handling OptionGroups when useInteractiveGroups is set\n let active: number = isGroup(currentHighlight)\n ? matchingOptions.map(({ option }) => option).indexOf(currentHighlight)\n : matchingOptions\n .map(({ option }) => (option as OptionDefinition).value)\n .indexOf((currentHighlight as OptionDefinition).value);\n\n // Pick the next thing (if something with this prefix wasn't selected\n // we'll end up with the first option)\n active += 1;\n active = active % matchingOptions.length;\n return matchingOptions[active];\n }\n }\n\n // We have multiple things that start with this prefix. Based on the\n // behavior of native select, this is considered after the repeated case\n if (matchingOptions.length > 0) {\n return matchingOptions[0];\n }\n return null;\n}\n\nexport function useNativeSearch({\n isEnabled,\n options,\n highlightOption,\n highlightedOption,\n useInteractiveGroups,\n}: UseNativeSearchProps) {\n const value = useRef('');\n\n const delayedResetValue = useDebounceCallback(() => (value.current = ''), 500);\n\n return (event: React.KeyboardEvent) => {\n if (!isEnabled) {\n return;\n }\n\n const { charCode } = event;\n if (!isChar(charCode)) {\n return;\n }\n delayedResetValue();\n const newValue = value.current + String.fromCharCode(charCode);\n value.current = newValue;\n\n const nextHighlight = findMatchingOption(options, newValue, highlightedOption, useInteractiveGroups);\n if (nextHighlight) {\n highlightOption(nextHighlight);\n }\n };\n}\n"]}
|