@wordpress/components 28.2.0 → 28.4.0
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/CHANGELOG.md +87 -0
- package/CONTRIBUTING.md +1 -1
- package/build/animation/index.js.map +1 -1
- package/build/autocomplete/autocompleter-ui.js +1 -0
- package/build/autocomplete/autocompleter-ui.js.map +1 -1
- package/build/autocomplete/index.js.map +1 -1
- package/build/autocomplete/types.js.map +1 -1
- package/build/base-control/index.js +14 -7
- package/build/base-control/index.js.map +1 -1
- package/build/base-control/types.js.map +1 -1
- package/build/border-box-control/border-box-control-visualizer/component.js +0 -4
- package/build/border-box-control/border-box-control-visualizer/component.js.map +1 -1
- package/build/button/index.js +14 -10
- package/build/button/index.js.map +1 -1
- package/build/button/types.js.map +1 -1
- package/build/checkbox-control/index.js +1 -0
- package/build/checkbox-control/index.js.map +1 -1
- package/build/color-picker/component.js +8 -17
- package/build/color-picker/component.js.map +1 -1
- package/build/combobox-control/index.js +13 -1
- package/build/combobox-control/index.js.map +1 -1
- package/build/composite/current/index.js.map +1 -1
- package/build/custom-select-control/index.js +125 -174
- package/build/custom-select-control/index.js.map +1 -1
- package/build/custom-select-control/types.js +6 -0
- package/build/custom-select-control/types.js.map +1 -0
- package/build/custom-select-control-v2/custom-select.js +60 -33
- package/build/custom-select-control-v2/custom-select.js.map +1 -1
- package/build/custom-select-control-v2/index.js +35 -7
- package/build/custom-select-control-v2/index.js.map +1 -1
- package/build/custom-select-control-v2/item.js +2 -0
- package/build/custom-select-control-v2/item.js.map +1 -1
- package/build/custom-select-control-v2/styles.js +106 -78
- package/build/custom-select-control-v2/styles.js.map +1 -1
- package/build/custom-select-control-v2/types.js.map +1 -1
- package/build/date-time/date-time/index.js +3 -1
- package/build/date-time/date-time/index.js.map +1 -1
- package/build/date-time/index.js +7 -0
- package/build/date-time/index.js.map +1 -1
- package/build/date-time/time/index.js +62 -145
- package/build/date-time/time/index.js.map +1 -1
- package/build/date-time/time-input/index.js +159 -0
- package/build/date-time/time-input/index.js.map +1 -0
- package/build/date-time/types.js.map +1 -1
- package/build/date-time/utils.js +64 -0
- package/build/date-time/utils.js.map +1 -1
- package/build/disclosure/index.js +0 -1
- package/build/disclosure/index.js.map +1 -1
- package/build/divider/component.js +0 -1
- package/build/divider/component.js.map +1 -1
- package/build/divider/types.js.map +1 -1
- package/build/dropdown-menu/index.js +1 -0
- package/build/dropdown-menu/index.js.map +1 -1
- package/build/dropdown-menu-v2/index.js +0 -1
- package/build/dropdown-menu-v2/index.js.map +1 -1
- package/build/dropdown-menu-v2/styles.js +15 -16
- package/build/dropdown-menu-v2/styles.js.map +1 -1
- package/build/dropdown-menu-v2/types.js.map +1 -1
- package/build/focal-point-picker/index.js +1 -0
- package/build/focal-point-picker/index.js.map +1 -1
- package/build/font-size-picker/font-size-picker-select.js +2 -2
- package/build/font-size-picker/font-size-picker-select.js.map +1 -1
- package/build/font-size-picker/index.js +37 -25
- package/build/font-size-picker/index.js.map +1 -1
- package/build/font-size-picker/types.js.map +1 -1
- package/build/font-size-picker/utils.js +0 -4
- package/build/font-size-picker/utils.js.map +1 -1
- package/build/form-token-field/index.js +8 -0
- package/build/form-token-field/index.js.map +1 -1
- package/build/form-token-field/token.js +4 -1
- package/build/form-token-field/token.js.map +1 -1
- package/build/higher-order/with-spoken-messages/index.js +1 -2
- package/build/higher-order/with-spoken-messages/index.js.map +1 -1
- package/build/index.js +2 -2
- package/build/index.js.map +1 -1
- package/build/menu-items-choice/types.js.map +1 -1
- package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +1 -1
- package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
- package/build/popover/index.js +0 -4
- package/build/popover/index.js.map +1 -1
- package/build/popover/utils.js +0 -1
- package/build/popover/utils.js.map +1 -1
- package/build/private-apis.js +0 -6
- package/build/private-apis.js.map +1 -1
- package/build/progress-bar/styles.js +19 -13
- package/build/progress-bar/styles.js.map +1 -1
- package/build/radio-control/index.js +1 -1
- package/build/radio-control/index.js.map +1 -1
- package/build/radio-group/context.js +0 -1
- package/build/radio-group/context.js.map +1 -1
- package/build/radio-group/index.js +0 -1
- package/build/radio-group/index.js.map +1 -1
- package/build/radio-group/radio.js +0 -1
- package/build/radio-group/radio.js.map +1 -1
- package/build/range-control/index.js +5 -1
- package/build/range-control/index.js.map +1 -1
- package/build/range-control/styles/range-control-styles.js +34 -28
- package/build/range-control/styles/range-control-styles.js.map +1 -1
- package/build/resizable-box/resize-tooltip/utils.js.map +1 -1
- package/build/select-control/index.js +6 -2
- package/build/select-control/index.js.map +1 -1
- package/build/select-control/styles/select-control-styles.js +49 -13
- package/build/select-control/styles/select-control-styles.js.map +1 -1
- package/build/select-control/types.js.map +1 -1
- package/build/tab-panel/index.js +0 -1
- package/build/tab-panel/index.js.map +1 -1
- package/build/tabs/index.js +0 -1
- package/build/tabs/index.js.map +1 -1
- package/build/tabs/styles.js +3 -5
- package/build/tabs/styles.js.map +1 -1
- package/build/tabs/tablist.js +4 -78
- package/build/tabs/tablist.js.map +1 -1
- package/build/tabs/types.js.map +1 -1
- package/build/textarea-control/index.js +1 -0
- package/build/textarea-control/index.js.map +1 -1
- package/build/toggle-control/index.js +10 -4
- package/build/toggle-control/index.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control/as-radio-group.js +0 -2
- package/build/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control/component.js +0 -2
- package/build/toggle-group-control/toggle-group-control/component.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control-option-base/component.js +3 -4
- package/build/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control-option-base/styles.js +9 -9
- package/build/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
- package/build/toolbar/toolbar/toolbar-container.js +0 -1
- package/build/toolbar/toolbar/toolbar-container.js.map +1 -1
- package/build/toolbar/toolbar/types.js.map +1 -1
- package/build/toolbar/toolbar-button/index.js +27 -19
- package/build/toolbar/toolbar-button/index.js.map +1 -1
- package/build/toolbar/toolbar-button/types.js.map +1 -1
- package/build/toolbar/toolbar-context/index.js +0 -1
- package/build/toolbar/toolbar-context/index.js.map +1 -1
- package/build/toolbar/toolbar-item/index.js +1 -1
- package/build/toolbar/toolbar-item/index.js.map +1 -1
- package/build/tools-panel/tools-panel-header/component.js +1 -1
- package/build/tools-panel/tools-panel-header/component.js.map +1 -1
- package/build/tooltip/index.js +3 -2
- package/build/tooltip/index.js.map +1 -1
- package/build/tooltip/types.js.map +1 -1
- package/build/tree-select/index.js +1 -0
- package/build/tree-select/index.js.map +1 -1
- package/build/unit-control/index.js +3 -3
- package/build/unit-control/index.js.map +1 -1
- package/build/unit-control/styles/unit-control-styles.js +7 -7
- package/build/unit-control/styles/unit-control-styles.js.map +1 -1
- package/build/utils/element-rect.js +157 -0
- package/build/utils/element-rect.js.map +1 -0
- package/build/utils/hooks/use-event.js +41 -0
- package/build/utils/hooks/use-event.js.map +1 -0
- package/build/utils/hooks/use-on-value-update.js +46 -0
- package/build/utils/hooks/use-on-value-update.js.map +1 -0
- package/build/utils/hooks/use-update-effect.js +4 -1
- package/build/utils/hooks/use-update-effect.js.map +1 -1
- package/build-module/animation/index.js +0 -1
- package/build-module/animation/index.js.map +1 -1
- package/build-module/autocomplete/autocompleter-ui.js +1 -0
- package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
- package/build-module/autocomplete/index.js.map +1 -1
- package/build-module/autocomplete/types.js.map +1 -1
- package/build-module/base-control/index.js +13 -6
- package/build-module/base-control/index.js.map +1 -1
- package/build-module/base-control/types.js.map +1 -1
- package/build-module/border-box-control/border-box-control-visualizer/component.js +0 -4
- package/build-module/border-box-control/border-box-control-visualizer/component.js.map +1 -1
- package/build-module/button/index.js +14 -10
- package/build-module/button/index.js.map +1 -1
- package/build-module/button/types.js.map +1 -1
- package/build-module/checkbox-control/index.js +1 -0
- package/build-module/checkbox-control/index.js.map +1 -1
- package/build-module/color-picker/component.js +9 -18
- package/build-module/color-picker/component.js.map +1 -1
- package/build-module/combobox-control/index.js +13 -1
- package/build-module/combobox-control/index.js.map +1 -1
- package/build-module/composite/current/index.js +0 -3
- package/build-module/composite/current/index.js.map +1 -1
- package/build-module/custom-select-control/index.js +123 -173
- package/build-module/custom-select-control/index.js.map +1 -1
- package/build-module/custom-select-control/types.js +2 -0
- package/build-module/custom-select-control/types.js.map +1 -0
- package/build-module/custom-select-control-v2/custom-select.js +61 -35
- package/build-module/custom-select-control-v2/custom-select.js.map +1 -1
- package/build-module/custom-select-control-v2/index.js +27 -1
- package/build-module/custom-select-control-v2/index.js.map +1 -1
- package/build-module/custom-select-control-v2/item.js +2 -0
- package/build-module/custom-select-control-v2/item.js.map +1 -1
- package/build-module/custom-select-control-v2/styles.js +105 -77
- package/build-module/custom-select-control-v2/styles.js.map +1 -1
- package/build-module/custom-select-control-v2/types.js.map +1 -1
- package/build-module/date-time/date-time/index.js +4 -1
- package/build-module/date-time/date-time/index.js.map +1 -1
- package/build-module/date-time/index.js +2 -1
- package/build-module/date-time/index.js.map +1 -1
- package/build-module/date-time/time/index.js +65 -149
- package/build-module/date-time/time/index.js.map +1 -1
- package/build-module/date-time/time-input/index.js +151 -0
- package/build-module/date-time/time-input/index.js.map +1 -0
- package/build-module/date-time/types.js.map +1 -1
- package/build-module/date-time/utils.js +61 -0
- package/build-module/date-time/utils.js.map +1 -1
- package/build-module/disclosure/index.js +0 -1
- package/build-module/disclosure/index.js.map +1 -1
- package/build-module/divider/component.js +0 -1
- package/build-module/divider/component.js.map +1 -1
- package/build-module/divider/types.js.map +1 -1
- package/build-module/dropdown-menu/index.js +1 -0
- package/build-module/dropdown-menu/index.js.map +1 -1
- package/build-module/dropdown-menu-v2/index.js +0 -1
- package/build-module/dropdown-menu-v2/index.js.map +1 -1
- package/build-module/dropdown-menu-v2/styles.js +14 -15
- package/build-module/dropdown-menu-v2/styles.js.map +1 -1
- package/build-module/dropdown-menu-v2/types.js.map +1 -1
- package/build-module/focal-point-picker/index.js +1 -0
- package/build-module/focal-point-picker/index.js.map +1 -1
- package/build-module/font-size-picker/font-size-picker-select.js +2 -2
- package/build-module/font-size-picker/font-size-picker-select.js.map +1 -1
- package/build-module/font-size-picker/index.js +37 -25
- package/build-module/font-size-picker/index.js.map +1 -1
- package/build-module/font-size-picker/types.js.map +1 -1
- package/build-module/font-size-picker/utils.js +0 -4
- package/build-module/font-size-picker/utils.js.map +1 -1
- package/build-module/form-token-field/index.js +8 -0
- package/build-module/form-token-field/index.js.map +1 -1
- package/build-module/form-token-field/token.js +4 -1
- package/build-module/form-token-field/token.js.map +1 -1
- package/build-module/higher-order/with-spoken-messages/index.js +1 -2
- package/build-module/higher-order/with-spoken-messages/index.js.map +1 -1
- package/build-module/index.js +1 -1
- package/build-module/index.js.map +1 -1
- package/build-module/menu-items-choice/types.js.map +1 -1
- package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +1 -1
- package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js.map +1 -1
- package/build-module/popover/index.js +0 -3
- package/build-module/popover/index.js.map +1 -1
- package/build-module/popover/utils.js +0 -1
- package/build-module/popover/utils.js.map +1 -1
- package/build-module/private-apis.js +0 -6
- package/build-module/private-apis.js.map +1 -1
- package/build-module/progress-bar/styles.js +21 -13
- package/build-module/progress-bar/styles.js.map +1 -1
- package/build-module/radio-control/index.js +1 -1
- package/build-module/radio-control/index.js.map +1 -1
- package/build-module/radio-group/context.js +0 -1
- package/build-module/radio-group/context.js.map +1 -1
- package/build-module/radio-group/index.js +0 -1
- package/build-module/radio-group/index.js.map +1 -1
- package/build-module/radio-group/radio.js +0 -1
- package/build-module/radio-group/radio.js.map +1 -1
- package/build-module/range-control/index.js +5 -1
- package/build-module/range-control/index.js.map +1 -1
- package/build-module/range-control/styles/range-control-styles.js +34 -28
- package/build-module/range-control/styles/range-control-styles.js.map +1 -1
- package/build-module/resizable-box/resize-tooltip/utils.js.map +1 -1
- package/build-module/select-control/index.js +7 -3
- package/build-module/select-control/index.js.map +1 -1
- package/build-module/select-control/styles/select-control-styles.js +47 -7
- package/build-module/select-control/styles/select-control-styles.js.map +1 -1
- package/build-module/select-control/types.js.map +1 -1
- package/build-module/tab-panel/index.js +0 -1
- package/build-module/tab-panel/index.js.map +1 -1
- package/build-module/tabs/index.js +0 -1
- package/build-module/tabs/index.js.map +1 -1
- package/build-module/tabs/styles.js +3 -4
- package/build-module/tabs/styles.js.map +1 -1
- package/build-module/tabs/tablist.js +4 -78
- package/build-module/tabs/tablist.js.map +1 -1
- package/build-module/tabs/types.js.map +1 -1
- package/build-module/textarea-control/index.js +1 -0
- package/build-module/textarea-control/index.js.map +1 -1
- package/build-module/toggle-control/index.js +10 -4
- package/build-module/toggle-control/index.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js +0 -1
- package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control/component.js +0 -1
- package/build-module/toggle-group-control/toggle-group-control/component.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control-option-base/component.js +3 -2
- package/build-module/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js +9 -9
- package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
- package/build-module/toolbar/toolbar/toolbar-container.js +0 -1
- package/build-module/toolbar/toolbar/toolbar-container.js.map +1 -1
- package/build-module/toolbar/toolbar/types.js.map +1 -1
- package/build-module/toolbar/toolbar-button/index.js +27 -19
- package/build-module/toolbar/toolbar-button/index.js.map +1 -1
- package/build-module/toolbar/toolbar-button/types.js.map +1 -1
- package/build-module/toolbar/toolbar-context/index.js +0 -1
- package/build-module/toolbar/toolbar-context/index.js.map +1 -1
- package/build-module/toolbar/toolbar-item/index.js +1 -1
- package/build-module/toolbar/toolbar-item/index.js.map +1 -1
- package/build-module/tools-panel/tools-panel-header/component.js +1 -1
- package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
- package/build-module/tooltip/index.js +3 -2
- package/build-module/tooltip/index.js.map +1 -1
- package/build-module/tooltip/types.js.map +1 -1
- package/build-module/tree-select/index.js +1 -0
- package/build-module/tree-select/index.js.map +1 -1
- package/build-module/unit-control/index.js +3 -3
- package/build-module/unit-control/index.js.map +1 -1
- package/build-module/unit-control/styles/unit-control-styles.js +7 -7
- package/build-module/unit-control/styles/unit-control-styles.js.map +1 -1
- package/build-module/utils/element-rect.js +147 -0
- package/build-module/utils/element-rect.js.map +1 -0
- package/build-module/utils/hooks/use-event.js +35 -0
- package/build-module/utils/hooks/use-event.js.map +1 -0
- package/build-module/utils/hooks/use-on-value-update.js +39 -0
- package/build-module/utils/hooks/use-on-value-update.js.map +1 -0
- package/build-module/utils/hooks/use-update-effect.js +4 -1
- package/build-module/utils/hooks/use-update-effect.js.map +1 -1
- package/build-style/style-rtl.css +80 -95
- package/build-style/style.css +80 -95
- package/build-types/alignment-matrix-control/cell.d.ts +0 -1
- package/build-types/alignment-matrix-control/cell.d.ts.map +1 -1
- package/build-types/alignment-matrix-control/icon.d.ts +0 -1
- package/build-types/alignment-matrix-control/icon.d.ts.map +1 -1
- package/build-types/alignment-matrix-control/index.d.ts +0 -1
- package/build-types/alignment-matrix-control/index.d.ts.map +1 -1
- package/build-types/alignment-matrix-control/stories/index.story.d.ts +0 -1
- package/build-types/alignment-matrix-control/stories/index.story.d.ts.map +1 -1
- package/build-types/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.d.ts +8 -9
- package/build-types/alignment-matrix-control/styles/alignment-matrix-control-icon-styles.d.ts.map +1 -1
- package/build-types/alignment-matrix-control/styles/alignment-matrix-control-styles.d.ts +10 -11
- package/build-types/alignment-matrix-control/styles/alignment-matrix-control-styles.d.ts.map +1 -1
- package/build-types/angle-picker-control/angle-circle.d.ts +0 -1
- package/build-types/angle-picker-control/angle-circle.d.ts.map +1 -1
- package/build-types/angle-picker-control/index.d.ts +0 -1
- package/build-types/angle-picker-control/index.d.ts.map +1 -1
- package/build-types/angle-picker-control/stories/index.story.d.ts +0 -1
- package/build-types/angle-picker-control/stories/index.story.d.ts.map +1 -1
- package/build-types/angle-picker-control/styles/angle-picker-control-styles.d.ts +7 -8
- package/build-types/angle-picker-control/styles/angle-picker-control-styles.d.ts.map +1 -1
- package/build-types/animate/index.d.ts +0 -1
- package/build-types/animate/index.d.ts.map +1 -1
- package/build-types/animate/types.d.ts +0 -1
- package/build-types/animate/types.d.ts.map +1 -1
- package/build-types/animation/index.d.ts.map +1 -1
- package/build-types/autocomplete/autocompleter-ui.d.ts +0 -1
- package/build-types/autocomplete/autocompleter-ui.d.ts.map +1 -1
- package/build-types/autocomplete/index.d.ts +2 -3
- package/build-types/autocomplete/index.d.ts.map +1 -1
- package/build-types/autocomplete/types.d.ts +2 -3
- package/build-types/autocomplete/types.d.ts.map +1 -1
- package/build-types/base-control/hooks.d.ts +3 -4
- package/build-types/base-control/hooks.d.ts.map +1 -1
- package/build-types/base-control/index.d.ts +6 -21
- package/build-types/base-control/index.d.ts.map +1 -1
- package/build-types/base-control/stories/index.story.d.ts +0 -1
- package/build-types/base-control/stories/index.story.d.ts.map +1 -1
- package/build-types/base-control/styles/base-control-styles.d.ts +10 -11
- package/build-types/base-control/styles/base-control-styles.d.ts.map +1 -1
- package/build-types/base-control/types.d.ts +1 -1
- package/build-types/border-box-control/border-box-control/component.d.ts +4 -5
- package/build-types/border-box-control/border-box-control/component.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control/hook.d.ts +14 -16
- package/build-types/border-box-control/border-box-control/hook.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control-linked-button/component.d.ts +0 -1
- package/build-types/border-box-control/border-box-control-linked-button/component.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts +12 -14
- package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control-split-controls/component.d.ts +5 -6
- package/build-types/border-box-control/border-box-control-split-controls/component.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts +14 -16
- package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control-visualizer/component.d.ts +1 -2
- package/build-types/border-box-control/border-box-control-visualizer/component.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts +9 -11
- package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts.map +1 -1
- package/build-types/border-box-control/stories/index.story.d.ts +4 -5
- package/build-types/border-box-control/stories/index.story.d.ts.map +1 -1
- package/build-types/border-box-control/styles.d.ts +3 -3
- package/build-types/border-box-control/utils.d.ts.map +1 -1
- package/build-types/border-control/border-control/component.d.ts +14 -15
- package/build-types/border-control/border-control/component.d.ts.map +1 -1
- package/build-types/border-control/border-control/hook.d.ts +17 -19
- package/build-types/border-control/border-control/hook.d.ts.map +1 -1
- package/build-types/border-control/border-control-dropdown/component.d.ts +6 -7
- package/build-types/border-control/border-control-dropdown/component.d.ts.map +1 -1
- package/build-types/border-control/border-control-dropdown/hook.d.ts +12 -14
- package/build-types/border-control/border-control-dropdown/hook.d.ts.map +1 -1
- package/build-types/border-control/border-control-style-picker/component.d.ts +2 -3
- package/build-types/border-control/border-control-style-picker/component.d.ts.map +1 -1
- package/build-types/border-control/stories/index.story.d.ts +84 -85
- package/build-types/border-control/stories/index.story.d.ts.map +1 -1
- package/build-types/border-control/styles.d.ts +2 -2
- package/build-types/box-control/all-input-control.d.ts +0 -1
- package/build-types/box-control/all-input-control.d.ts.map +1 -1
- package/build-types/box-control/axial-input-controls.d.ts +0 -1
- package/build-types/box-control/axial-input-controls.d.ts.map +1 -1
- package/build-types/box-control/icon.d.ts +0 -1
- package/build-types/box-control/icon.d.ts.map +1 -1
- package/build-types/box-control/index.d.ts +0 -1
- package/build-types/box-control/index.d.ts.map +1 -1
- package/build-types/box-control/input-controls.d.ts +0 -1
- package/build-types/box-control/input-controls.d.ts.map +1 -1
- package/build-types/box-control/linked-button.d.ts +0 -1
- package/build-types/box-control/linked-button.d.ts.map +1 -1
- package/build-types/box-control/stories/index.story.d.ts +312 -350
- package/build-types/box-control/stories/index.story.d.ts.map +1 -1
- package/build-types/box-control/styles/box-control-icon-styles.d.ts +16 -17
- package/build-types/box-control/styles/box-control-icon-styles.d.ts.map +1 -1
- package/build-types/box-control/styles/box-control-styles.d.ts +44 -45
- package/build-types/box-control/styles/box-control-styles.d.ts.map +1 -1
- package/build-types/box-control/types.d.ts +0 -1
- package/build-types/box-control/types.d.ts.map +1 -1
- package/build-types/button/deprecated.d.ts +69 -70
- package/build-types/button/deprecated.d.ts.map +1 -1
- package/build-types/button/index.d.ts.map +1 -1
- package/build-types/button/stories/e2e/index.story.d.ts +0 -1
- package/build-types/button/stories/e2e/index.story.d.ts.map +1 -1
- package/build-types/button/stories/index.story.d.ts +0 -1
- package/build-types/button/stories/index.story.d.ts.map +1 -1
- package/build-types/button/types.d.ts +36 -12
- package/build-types/button/types.d.ts.map +1 -1
- package/build-types/button-group/index.d.ts +0 -1
- package/build-types/button-group/index.d.ts.map +1 -1
- package/build-types/card/card/component.d.ts +5 -6
- package/build-types/card/card/component.d.ts.map +1 -1
- package/build-types/card/card/hook.d.ts +10 -12
- package/build-types/card/card/hook.d.ts.map +1 -1
- package/build-types/card/card-body/component.d.ts +4 -5
- package/build-types/card/card-body/component.d.ts.map +1 -1
- package/build-types/card/card-body/hook.d.ts +10 -12
- package/build-types/card/card-body/hook.d.ts.map +1 -1
- package/build-types/card/card-divider/component.d.ts +4 -5
- package/build-types/card/card-divider/component.d.ts.map +1 -1
- package/build-types/card/card-divider/hook.d.ts +15 -17
- package/build-types/card/card-divider/hook.d.ts.map +1 -1
- package/build-types/card/card-footer/component.d.ts +5 -6
- package/build-types/card/card-footer/component.d.ts.map +1 -1
- package/build-types/card/card-footer/hook.d.ts +10 -12
- package/build-types/card/card-footer/hook.d.ts.map +1 -1
- package/build-types/card/card-header/component.d.ts +4 -5
- package/build-types/card/card-header/component.d.ts.map +1 -1
- package/build-types/card/card-header/hook.d.ts +10 -12
- package/build-types/card/card-header/hook.d.ts.map +1 -1
- package/build-types/card/card-media/component.d.ts +0 -1
- package/build-types/card/card-media/component.d.ts.map +1 -1
- package/build-types/card/card-media/hook.d.ts +10 -12
- package/build-types/card/card-media/hook.d.ts.map +1 -1
- package/build-types/card/context.d.ts +0 -1
- package/build-types/card/context.d.ts.map +1 -1
- package/build-types/card/stories/index.story.d.ts +3 -22
- package/build-types/card/stories/index.story.d.ts.map +1 -1
- package/build-types/checkbox-control/index.d.ts +1 -1
- package/build-types/checkbox-control/index.d.ts.map +1 -1
- package/build-types/circular-option-picker/circular-option-picker-actions.d.ts +0 -1
- package/build-types/circular-option-picker/circular-option-picker-actions.d.ts.map +1 -1
- package/build-types/circular-option-picker/circular-option-picker-context.d.ts +0 -1
- package/build-types/circular-option-picker/circular-option-picker-context.d.ts.map +1 -1
- package/build-types/circular-option-picker/circular-option-picker-option-group.d.ts +0 -1
- package/build-types/circular-option-picker/circular-option-picker-option-group.d.ts.map +1 -1
- package/build-types/circular-option-picker/circular-option-picker-option.d.ts +0 -1
- package/build-types/circular-option-picker/circular-option-picker-option.d.ts.map +1 -1
- package/build-types/circular-option-picker/circular-option-picker.d.ts +0 -1
- package/build-types/circular-option-picker/circular-option-picker.d.ts.map +1 -1
- package/build-types/clipboard-button/index.d.ts +0 -1
- package/build-types/clipboard-button/index.d.ts.map +1 -1
- package/build-types/color-indicator/index.d.ts +0 -1
- package/build-types/color-indicator/index.d.ts.map +1 -1
- package/build-types/color-palette/index.d.ts +0 -1
- package/build-types/color-palette/index.d.ts.map +1 -1
- package/build-types/color-palette/stories/index.story.d.ts +0 -1
- package/build-types/color-palette/stories/index.story.d.ts.map +1 -1
- package/build-types/color-palette/styles.d.ts +5 -6
- package/build-types/color-palette/styles.d.ts.map +1 -1
- package/build-types/color-palette/utils.d.ts +1 -1
- package/build-types/color-palette/utils.d.ts.map +1 -1
- package/build-types/color-picker/color-copy-button.d.ts +0 -1
- package/build-types/color-picker/color-copy-button.d.ts.map +1 -1
- package/build-types/color-picker/color-input.d.ts +0 -1
- package/build-types/color-picker/color-input.d.ts.map +1 -1
- package/build-types/color-picker/component.d.ts +5 -6
- package/build-types/color-picker/component.d.ts.map +1 -1
- package/build-types/color-picker/hex-input.d.ts +0 -1
- package/build-types/color-picker/hex-input.d.ts.map +1 -1
- package/build-types/color-picker/hsl-input.d.ts +0 -1
- package/build-types/color-picker/hsl-input.d.ts.map +1 -1
- package/build-types/color-picker/input-with-slider.d.ts +0 -1
- package/build-types/color-picker/input-with-slider.d.ts.map +1 -1
- package/build-types/color-picker/legacy-adapter.d.ts +0 -1
- package/build-types/color-picker/legacy-adapter.d.ts.map +1 -1
- package/build-types/color-picker/picker.d.ts +0 -1
- package/build-types/color-picker/picker.d.ts.map +1 -1
- package/build-types/color-picker/rgb-input.d.ts +0 -1
- package/build-types/color-picker/rgb-input.d.ts.map +1 -1
- package/build-types/color-picker/stories/index.story.d.ts +2 -9
- package/build-types/color-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/color-picker/styles.d.ts +52 -53
- package/build-types/color-picker/styles.d.ts.map +1 -1
- package/build-types/combobox-control/index.d.ts +1 -1
- package/build-types/combobox-control/index.d.ts.map +1 -1
- package/build-types/combobox-control/stories/index.story.d.ts +41 -41
- package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
- package/build-types/combobox-control/styles.d.ts +1 -2
- package/build-types/combobox-control/styles.d.ts.map +1 -1
- package/build-types/combobox-control/types.d.ts +0 -1
- package/build-types/combobox-control/types.d.ts.map +1 -1
- package/build-types/composite/current/index.d.ts.map +1 -1
- package/build-types/composite/current/stories/utils.d.ts +0 -1
- package/build-types/composite/current/stories/utils.d.ts.map +1 -1
- package/build-types/composite/legacy/index.d.ts +0 -1
- package/build-types/composite/legacy/index.d.ts.map +1 -1
- package/build-types/composite/legacy/stories/utils.d.ts +0 -1
- package/build-types/composite/legacy/stories/utils.d.ts.map +1 -1
- package/build-types/confirm-dialog/component.d.ts +0 -1
- package/build-types/confirm-dialog/component.d.ts.map +1 -1
- package/build-types/confirm-dialog/stories/index.story.d.ts +0 -1
- package/build-types/confirm-dialog/stories/index.story.d.ts.map +1 -1
- package/build-types/context/context-system-provider.d.ts +1 -1
- package/build-types/context/context-system-provider.d.ts.map +1 -1
- package/build-types/context/get-styled-class-name-from-key.d.ts +9 -1
- package/build-types/context/get-styled-class-name-from-key.d.ts.map +1 -1
- package/build-types/context/use-context-system.d.ts +1 -1
- package/build-types/context/use-context-system.d.ts.map +1 -1
- package/build-types/context/utils.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts +0 -1
- package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/gradient-bar/index.d.ts +0 -1
- package/build-types/custom-gradient-picker/gradient-bar/index.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/index.d.ts +0 -1
- package/build-types/custom-gradient-picker/index.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/styles/custom-gradient-picker-styles.d.ts +2 -3
- package/build-types/custom-gradient-picker/styles/custom-gradient-picker-styles.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/types.d.ts +0 -1
- package/build-types/custom-gradient-picker/types.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/utils.d.ts.map +1 -1
- package/build-types/custom-select-control/index.d.ts +3 -2
- package/build-types/custom-select-control/index.d.ts.map +1 -1
- package/build-types/custom-select-control/stories/index.story.d.ts +6 -42
- package/build-types/custom-select-control/stories/index.story.d.ts.map +1 -1
- package/build-types/custom-select-control/test/index.d.ts.map +1 -0
- package/build-types/custom-select-control/types.d.ts +122 -0
- package/build-types/custom-select-control/types.d.ts.map +1 -0
- package/build-types/custom-select-control-v2/custom-select.d.ts +2 -3
- package/build-types/custom-select-control-v2/custom-select.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/index.d.ts +7 -4
- package/build-types/custom-select-control-v2/index.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/item.d.ts +0 -1
- package/build-types/custom-select-control-v2/item.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/stories/{default.story.d.ts → index.story.d.ts} +13 -11
- package/build-types/custom-select-control-v2/stories/index.story.d.ts.map +1 -0
- package/build-types/custom-select-control-v2/styles.d.ts +39 -48
- package/build-types/custom-select-control-v2/styles.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/types.d.ts +12 -108
- package/build-types/custom-select-control-v2/types.d.ts.map +1 -1
- package/build-types/dashicon/index.d.ts +0 -1
- package/build-types/dashicon/index.d.ts.map +1 -1
- package/build-types/date-time/date/index.d.ts +0 -1
- package/build-types/date-time/date/index.d.ts.map +1 -1
- package/build-types/date-time/date/styles.d.ts +15 -16
- package/build-types/date-time/date/styles.d.ts.map +1 -1
- package/build-types/date-time/date-time/index.d.ts +1 -2
- package/build-types/date-time/date-time/index.d.ts.map +1 -1
- package/build-types/date-time/date-time/styles.d.ts +3 -4
- package/build-types/date-time/date-time/styles.d.ts.map +1 -1
- package/build-types/date-time/index.d.ts +2 -1
- package/build-types/date-time/index.d.ts.map +1 -1
- package/build-types/date-time/stories/time-input.story.d.ts +12 -0
- package/build-types/date-time/stories/time-input.story.d.ts.map +1 -0
- package/build-types/date-time/time/index.d.ts +1 -2
- package/build-types/date-time/time/index.d.ts.map +1 -1
- package/build-types/date-time/time/styles.d.ts +64 -65
- package/build-types/date-time/time/styles.d.ts.map +1 -1
- package/build-types/date-time/time/timezone.d.ts +0 -1
- package/build-types/date-time/time/timezone.d.ts.map +1 -1
- package/build-types/date-time/time-input/index.d.ts +4 -0
- package/build-types/date-time/time-input/index.d.ts.map +1 -0
- package/build-types/date-time/time-input/test/index.d.ts +2 -0
- package/build-types/date-time/time-input/test/index.d.ts.map +1 -0
- package/build-types/date-time/types.d.ts +53 -0
- package/build-types/date-time/types.d.ts.map +1 -1
- package/build-types/date-time/utils.d.ts +39 -0
- package/build-types/date-time/utils.d.ts.map +1 -1
- package/build-types/dimension-control/index.d.ts +0 -1
- package/build-types/dimension-control/index.d.ts.map +1 -1
- package/build-types/disabled/index.d.ts +0 -1
- package/build-types/disabled/index.d.ts.map +1 -1
- package/build-types/disabled/types.d.ts +0 -1
- package/build-types/disabled/types.d.ts.map +1 -1
- package/build-types/disclosure/index.d.ts +0 -1
- package/build-types/disclosure/index.d.ts.map +1 -1
- package/build-types/disclosure/types.d.ts +0 -1
- package/build-types/disclosure/types.d.ts.map +1 -1
- package/build-types/divider/component.d.ts +4 -5
- package/build-types/divider/component.d.ts.map +1 -1
- package/build-types/divider/styles.d.ts +6 -7
- package/build-types/divider/styles.d.ts.map +1 -1
- package/build-types/divider/types.d.ts.map +1 -1
- package/build-types/draggable/index.d.ts +0 -1
- package/build-types/draggable/index.d.ts.map +1 -1
- package/build-types/drop-zone/index.d.ts +0 -1
- package/build-types/drop-zone/index.d.ts.map +1 -1
- package/build-types/drop-zone/provider.d.ts +0 -1
- package/build-types/drop-zone/provider.d.ts.map +1 -1
- package/build-types/drop-zone/stories/index.story.d.ts +0 -1
- package/build-types/drop-zone/stories/index.story.d.ts.map +1 -1
- package/build-types/dropdown/dropdown-content-wrapper.d.ts +0 -1
- package/build-types/dropdown/dropdown-content-wrapper.d.ts.map +1 -1
- package/build-types/dropdown/index.d.ts +0 -1
- package/build-types/dropdown/index.d.ts.map +1 -1
- package/build-types/dropdown/stories/index.story.d.ts +5 -6
- package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
- package/build-types/dropdown/styles.d.ts +2 -3
- package/build-types/dropdown/styles.d.ts.map +1 -1
- package/build-types/dropdown-menu/index.d.ts +0 -1
- package/build-types/dropdown-menu/index.d.ts.map +1 -1
- package/build-types/dropdown-menu/stories/index.story.d.ts +3 -4
- package/build-types/dropdown-menu/stories/index.story.d.ts.map +1 -1
- package/build-types/dropdown-menu-v2/index.d.ts +0 -1
- package/build-types/dropdown-menu-v2/index.d.ts.map +1 -1
- package/build-types/dropdown-menu-v2/stories/index.story.d.ts.map +1 -1
- package/build-types/dropdown-menu-v2/styles.d.ts +41 -42
- package/build-types/dropdown-menu-v2/styles.d.ts.map +1 -1
- package/build-types/dropdown-menu-v2/types.d.ts +0 -1
- package/build-types/dropdown-menu-v2/types.d.ts.map +1 -1
- package/build-types/duotone-picker/color-list-picker/index.d.ts +0 -1
- package/build-types/duotone-picker/color-list-picker/index.d.ts.map +1 -1
- package/build-types/duotone-picker/custom-duotone-bar.d.ts +0 -1
- package/build-types/duotone-picker/custom-duotone-bar.d.ts.map +1 -1
- package/build-types/duotone-picker/duotone-picker.d.ts +0 -1
- package/build-types/duotone-picker/duotone-picker.d.ts.map +1 -1
- package/build-types/duotone-picker/duotone-swatch.d.ts +0 -1
- package/build-types/duotone-picker/duotone-swatch.d.ts.map +1 -1
- package/build-types/elevation/component.d.ts +0 -1
- package/build-types/elevation/component.d.ts.map +1 -1
- package/build-types/elevation/hook.d.ts +9 -11
- package/build-types/elevation/hook.d.ts.map +1 -1
- package/build-types/external-link/index.d.ts +0 -1
- package/build-types/external-link/index.d.ts.map +1 -1
- package/build-types/flex/context.d.ts +2 -3
- package/build-types/flex/context.d.ts.map +1 -1
- package/build-types/flex/flex/component.d.ts +0 -1
- package/build-types/flex/flex/component.d.ts.map +1 -1
- package/build-types/flex/flex/hook.d.ts +9 -11
- package/build-types/flex/flex/hook.d.ts.map +1 -1
- package/build-types/flex/flex-block/component.d.ts +0 -1
- package/build-types/flex/flex-block/component.d.ts.map +1 -1
- package/build-types/flex/flex-block/hook.d.ts +9 -11
- package/build-types/flex/flex-block/hook.d.ts.map +1 -1
- package/build-types/flex/flex-item/component.d.ts +0 -1
- package/build-types/flex/flex-item/component.d.ts.map +1 -1
- package/build-types/flex/flex-item/hook.d.ts +9 -11
- package/build-types/flex/flex-item/hook.d.ts.map +1 -1
- package/build-types/focal-point-picker/controls.d.ts +0 -1
- package/build-types/focal-point-picker/controls.d.ts.map +1 -1
- package/build-types/focal-point-picker/focal-point.d.ts +0 -1
- package/build-types/focal-point-picker/focal-point.d.ts.map +1 -1
- package/build-types/focal-point-picker/grid.d.ts +0 -1
- package/build-types/focal-point-picker/grid.d.ts.map +1 -1
- package/build-types/focal-point-picker/index.d.ts +1 -1
- package/build-types/focal-point-picker/index.d.ts.map +1 -1
- package/build-types/focal-point-picker/media.d.ts +0 -1
- package/build-types/focal-point-picker/media.d.ts.map +1 -1
- package/build-types/focal-point-picker/stories/index.story.d.ts +32 -33
- package/build-types/focal-point-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts +26 -27
- package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts.map +1 -1
- package/build-types/focal-point-picker/styles/focal-point-style.d.ts +2 -3
- package/build-types/focal-point-picker/styles/focal-point-style.d.ts.map +1 -1
- package/build-types/focusable-iframe/index.d.ts +0 -1
- package/build-types/focusable-iframe/index.d.ts.map +1 -1
- package/build-types/font-size-picker/font-size-picker-select.d.ts +0 -1
- package/build-types/font-size-picker/font-size-picker-select.d.ts.map +1 -1
- package/build-types/font-size-picker/font-size-picker-toggle-group.d.ts +0 -1
- package/build-types/font-size-picker/font-size-picker-toggle-group.d.ts.map +1 -1
- package/build-types/font-size-picker/index.d.ts +0 -1
- package/build-types/font-size-picker/index.d.ts.map +1 -1
- package/build-types/font-size-picker/stories/e2e/index.story.d.ts +0 -1
- package/build-types/font-size-picker/stories/e2e/index.story.d.ts.map +1 -1
- package/build-types/font-size-picker/styles.d.ts +10 -11
- package/build-types/font-size-picker/styles.d.ts.map +1 -1
- package/build-types/font-size-picker/types.d.ts +6 -5
- package/build-types/font-size-picker/types.d.ts.map +1 -1
- package/build-types/font-size-picker/utils.d.ts.map +1 -1
- package/build-types/form-file-upload/index.d.ts +0 -1
- package/build-types/form-file-upload/index.d.ts.map +1 -1
- package/build-types/form-file-upload/stories/index.story.d.ts +0 -1
- package/build-types/form-file-upload/stories/index.story.d.ts.map +1 -1
- package/build-types/form-token-field/index.d.ts +0 -1
- package/build-types/form-token-field/index.d.ts.map +1 -1
- package/build-types/form-token-field/stories/index.story.d.ts.map +1 -1
- package/build-types/form-token-field/styles.d.ts +1 -2
- package/build-types/form-token-field/styles.d.ts.map +1 -1
- package/build-types/form-token-field/suggestions-list.d.ts +0 -1
- package/build-types/form-token-field/suggestions-list.d.ts.map +1 -1
- package/build-types/form-token-field/token.d.ts +0 -1
- package/build-types/form-token-field/token.d.ts.map +1 -1
- package/build-types/gradient-picker/index.d.ts +0 -1
- package/build-types/gradient-picker/index.d.ts.map +1 -1
- package/build-types/gradient-picker/types.d.ts +0 -1
- package/build-types/gradient-picker/types.d.ts.map +1 -1
- package/build-types/grid/component.d.ts +0 -1
- package/build-types/grid/component.d.ts.map +1 -1
- package/build-types/grid/hook.d.ts +9 -11
- package/build-types/grid/hook.d.ts.map +1 -1
- package/build-types/guide/icons.d.ts +0 -1
- package/build-types/guide/icons.d.ts.map +1 -1
- package/build-types/guide/index.d.ts +0 -1
- package/build-types/guide/index.d.ts.map +1 -1
- package/build-types/guide/page-control.d.ts +0 -1
- package/build-types/guide/page-control.d.ts.map +1 -1
- package/build-types/guide/page.d.ts +0 -1
- package/build-types/guide/page.d.ts.map +1 -1
- package/build-types/h-stack/component.d.ts +2 -3
- package/build-types/h-stack/component.d.ts.map +1 -1
- package/build-types/h-stack/hook.d.ts +9 -11
- package/build-types/h-stack/hook.d.ts.map +1 -1
- package/build-types/heading/component.d.ts +4 -5
- package/build-types/heading/component.d.ts.map +1 -1
- package/build-types/heading/hook.d.ts +9 -11
- package/build-types/heading/hook.d.ts.map +1 -1
- package/build-types/higher-order/navigate-regions/index.d.ts +1 -2
- package/build-types/higher-order/navigate-regions/index.d.ts.map +1 -1
- package/build-types/higher-order/with-constrained-tabbing/index.d.ts +0 -1
- package/build-types/higher-order/with-constrained-tabbing/index.d.ts.map +1 -1
- package/build-types/higher-order/with-fallback-styles/index.d.ts +3 -4
- package/build-types/higher-order/with-fallback-styles/index.d.ts.map +1 -1
- package/build-types/higher-order/with-filters/index.d.ts +4 -5
- package/build-types/higher-order/with-filters/index.d.ts.map +1 -1
- package/build-types/higher-order/with-focus-outside/index.d.ts +0 -1
- package/build-types/higher-order/with-focus-outside/index.d.ts.map +1 -1
- package/build-types/higher-order/with-focus-return/index.d.ts +0 -1
- package/build-types/higher-order/with-focus-return/index.d.ts.map +1 -1
- package/build-types/higher-order/with-notices/index.d.ts +0 -1
- package/build-types/higher-order/with-notices/index.d.ts.map +1 -1
- package/build-types/higher-order/with-notices/types.d.ts +0 -1
- package/build-types/higher-order/with-notices/types.d.ts.map +1 -1
- package/build-types/higher-order/with-spoken-messages/index.d.ts +1 -3
- package/build-types/higher-order/with-spoken-messages/index.d.ts.map +1 -1
- package/build-types/index.d.ts +1 -1
- package/build-types/index.d.ts.map +1 -1
- package/build-types/input-control/backdrop.d.ts +0 -1
- package/build-types/input-control/backdrop.d.ts.map +1 -1
- package/build-types/input-control/input-base.d.ts +0 -1
- package/build-types/input-control/input-base.d.ts.map +1 -1
- package/build-types/input-control/input-field.d.ts +0 -1
- package/build-types/input-control/input-field.d.ts.map +1 -1
- package/build-types/input-control/input-prefix-wrapper.d.ts +0 -1
- package/build-types/input-control/input-prefix-wrapper.d.ts.map +1 -1
- package/build-types/input-control/input-suffix-wrapper.d.ts +0 -1
- package/build-types/input-control/input-suffix-wrapper.d.ts.map +1 -1
- package/build-types/input-control/label.d.ts +0 -1
- package/build-types/input-control/label.d.ts.map +1 -1
- package/build-types/input-control/reducer/reducer.d.ts +9 -9
- package/build-types/input-control/reducer/reducer.d.ts.map +1 -1
- package/build-types/input-control/stories/index.story.d.ts +0 -1
- package/build-types/input-control/stories/index.story.d.ts.map +1 -1
- package/build-types/input-control/styles/input-control-styles.d.ts +13 -13
- package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
- package/build-types/isolated-event-container/index.d.ts +0 -1
- package/build-types/isolated-event-container/index.d.ts.map +1 -1
- package/build-types/item-group/context.d.ts +0 -1
- package/build-types/item-group/context.d.ts.map +1 -1
- package/build-types/item-group/item/component.d.ts +0 -1
- package/build-types/item-group/item/component.d.ts.map +1 -1
- package/build-types/item-group/item/hook.d.ts +10 -12
- package/build-types/item-group/item/hook.d.ts.map +1 -1
- package/build-types/item-group/item-group/component.d.ts +0 -1
- package/build-types/item-group/item-group/component.d.ts.map +1 -1
- package/build-types/item-group/item-group/hook.d.ts +11 -13
- package/build-types/item-group/item-group/hook.d.ts.map +1 -1
- package/build-types/item-group/styles.d.ts +1 -1
- package/build-types/item-group/types.d.ts +0 -1
- package/build-types/item-group/types.d.ts.map +1 -1
- package/build-types/keyboard-shortcuts/index.d.ts +0 -1
- package/build-types/keyboard-shortcuts/index.d.ts.map +1 -1
- package/build-types/keyboard-shortcuts/types.d.ts +0 -1
- package/build-types/keyboard-shortcuts/types.d.ts.map +1 -1
- package/build-types/menu-group/index.d.ts +0 -1
- package/build-types/menu-group/index.d.ts.map +1 -1
- package/build-types/menu-item/index.d.ts +8 -9
- package/build-types/menu-item/index.d.ts.map +1 -1
- package/build-types/menu-item/stories/index.story.d.ts +32 -33
- package/build-types/menu-item/stories/index.story.d.ts.map +1 -1
- package/build-types/menu-items-choice/index.d.ts +0 -1
- package/build-types/menu-items-choice/index.d.ts.map +1 -1
- package/build-types/menu-items-choice/types.d.ts +1 -1
- package/build-types/menu-items-choice/types.d.ts.map +1 -1
- package/build-types/modal/index.d.ts +0 -1
- package/build-types/modal/index.d.ts.map +1 -1
- package/build-types/navigable-container/container.d.ts +8 -8
- package/build-types/navigable-container/menu.d.ts +7 -7
- package/build-types/navigable-container/tabbable.d.ts +6 -6
- package/build-types/navigation/back-button/index.d.ts +0 -1
- package/build-types/navigation/back-button/index.d.ts.map +1 -1
- package/build-types/navigation/context.d.ts +0 -1
- package/build-types/navigation/context.d.ts.map +1 -1
- package/build-types/navigation/group/context.d.ts +0 -1
- package/build-types/navigation/group/context.d.ts.map +1 -1
- package/build-types/navigation/group/index.d.ts +0 -1
- package/build-types/navigation/group/index.d.ts.map +1 -1
- package/build-types/navigation/index.d.ts +0 -1
- package/build-types/navigation/index.d.ts.map +1 -1
- package/build-types/navigation/item/base-content.d.ts +0 -1
- package/build-types/navigation/item/base-content.d.ts.map +1 -1
- package/build-types/navigation/item/base.d.ts +0 -1
- package/build-types/navigation/item/base.d.ts.map +1 -1
- package/build-types/navigation/item/index.d.ts +0 -1
- package/build-types/navigation/item/index.d.ts.map +1 -1
- package/build-types/navigation/menu/context.d.ts +0 -1
- package/build-types/navigation/menu/context.d.ts.map +1 -1
- package/build-types/navigation/menu/index.d.ts +0 -1
- package/build-types/navigation/menu/index.d.ts.map +1 -1
- package/build-types/navigation/menu/menu-title-search.d.ts +0 -1
- package/build-types/navigation/menu/menu-title-search.d.ts.map +1 -1
- package/build-types/navigation/menu/menu-title.d.ts +0 -1
- package/build-types/navigation/menu/menu-title.d.ts.map +1 -1
- package/build-types/navigation/menu/search-no-results-found.d.ts +0 -1
- package/build-types/navigation/menu/search-no-results-found.d.ts.map +1 -1
- package/build-types/navigation/styles/navigation-styles.d.ts +25 -26
- package/build-types/navigation/styles/navigation-styles.d.ts.map +1 -1
- package/build-types/navigation/types.d.ts +0 -1
- package/build-types/navigation/types.d.ts.map +1 -1
- package/build-types/navigation/use-navigation-tree-nodes.d.ts +0 -1
- package/build-types/navigation/use-navigation-tree-nodes.d.ts.map +1 -1
- package/build-types/navigator/context.d.ts +0 -1
- package/build-types/navigator/context.d.ts.map +1 -1
- package/build-types/navigator/navigator-back-button/component.d.ts +17 -18
- package/build-types/navigator/navigator-back-button/component.d.ts.map +1 -1
- package/build-types/navigator/navigator-back-button/hook.d.ts +29 -31
- package/build-types/navigator/navigator-back-button/hook.d.ts.map +1 -1
- package/build-types/navigator/navigator-button/component.d.ts +18 -19
- package/build-types/navigator/navigator-button/component.d.ts.map +1 -1
- package/build-types/navigator/navigator-button/hook.d.ts +29 -31
- package/build-types/navigator/navigator-button/hook.d.ts.map +1 -1
- package/build-types/navigator/navigator-provider/component.d.ts +0 -1
- package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
- package/build-types/navigator/navigator-screen/component.d.ts +0 -1
- package/build-types/navigator/navigator-screen/component.d.ts.map +1 -1
- package/build-types/navigator/navigator-to-parent-button/component.d.ts +17 -18
- package/build-types/navigator/navigator-to-parent-button/component.d.ts.map +1 -1
- package/build-types/navigator/stories/index.story.d.ts +4 -4
- package/build-types/navigator/stories/index.story.d.ts.map +1 -1
- package/build-types/notice/index.d.ts +0 -1
- package/build-types/notice/index.d.ts.map +1 -1
- package/build-types/notice/list.d.ts +0 -1
- package/build-types/notice/list.d.ts.map +1 -1
- package/build-types/number-control/index.d.ts +12 -13
- package/build-types/number-control/index.d.ts.map +1 -1
- package/build-types/number-control/stories/index.story.d.ts +12 -13
- package/build-types/number-control/stories/index.story.d.ts.map +1 -1
- package/build-types/number-control/styles/number-control-styles.d.ts +2 -3
- package/build-types/number-control/styles/number-control-styles.d.ts.map +1 -1
- package/build-types/palette-edit/index.d.ts +0 -1
- package/build-types/palette-edit/index.d.ts.map +1 -1
- package/build-types/palette-edit/styles.d.ts +16 -18
- package/build-types/palette-edit/styles.d.ts.map +1 -1
- package/build-types/panel/body.d.ts +0 -1
- package/build-types/panel/body.d.ts.map +1 -1
- package/build-types/panel/header.d.ts +0 -1
- package/build-types/panel/header.d.ts.map +1 -1
- package/build-types/panel/index.d.ts +0 -1
- package/build-types/panel/index.d.ts.map +1 -1
- package/build-types/panel/row.d.ts +0 -1
- package/build-types/panel/row.d.ts.map +1 -1
- package/build-types/panel/types.d.ts +0 -1
- package/build-types/panel/types.d.ts.map +1 -1
- package/build-types/placeholder/index.d.ts +0 -1
- package/build-types/placeholder/index.d.ts.map +1 -1
- package/build-types/popover/index.d.ts +0 -1
- package/build-types/popover/index.d.ts.map +1 -1
- package/build-types/popover/overlay-middlewares.d.ts +1 -11
- package/build-types/popover/overlay-middlewares.d.ts.map +1 -1
- package/build-types/popover/stories/e2e/index.story.d.ts +0 -1
- package/build-types/popover/stories/e2e/index.story.d.ts.map +1 -1
- package/build-types/popover/stories/index.story.d.ts +6 -6
- package/build-types/popover/stories/index.story.d.ts.map +1 -1
- package/build-types/popover/test/utils/index.d.ts +0 -1
- package/build-types/popover/test/utils/index.d.ts.map +1 -1
- package/build-types/popover/utils.d.ts +3 -3
- package/build-types/popover/utils.d.ts.map +1 -1
- package/build-types/private-apis.d.ts.map +1 -1
- package/build-types/progress-bar/index.d.ts +0 -1
- package/build-types/progress-bar/index.d.ts.map +1 -1
- package/build-types/progress-bar/stories/index.story.d.ts +0 -1
- package/build-types/progress-bar/stories/index.story.d.ts.map +1 -1
- package/build-types/progress-bar/styles.d.ts +6 -7
- package/build-types/progress-bar/styles.d.ts.map +1 -1
- package/build-types/query-controls/author-select.d.ts +0 -1
- package/build-types/query-controls/author-select.d.ts.map +1 -1
- package/build-types/query-controls/category-select.d.ts +0 -1
- package/build-types/query-controls/category-select.d.ts.map +1 -1
- package/build-types/query-controls/index.d.ts +0 -1
- package/build-types/query-controls/index.d.ts.map +1 -1
- package/build-types/radio-control/index.d.ts +0 -1
- package/build-types/radio-control/index.d.ts.map +1 -1
- package/build-types/radio-group/context.d.ts +2 -3
- package/build-types/radio-group/context.d.ts.map +1 -1
- package/build-types/radio-group/index.d.ts +0 -1
- package/build-types/radio-group/index.d.ts.map +1 -1
- package/build-types/radio-group/radio.d.ts +0 -1
- package/build-types/radio-group/radio.d.ts.map +1 -1
- package/build-types/radio-group/types.d.ts +0 -1
- package/build-types/radio-group/types.d.ts.map +1 -1
- package/build-types/range-control/index.d.ts +29 -29
- package/build-types/range-control/index.d.ts.map +1 -1
- package/build-types/range-control/input-range.d.ts +0 -1
- package/build-types/range-control/input-range.d.ts.map +1 -1
- package/build-types/range-control/mark.d.ts +0 -1
- package/build-types/range-control/mark.d.ts.map +1 -1
- package/build-types/range-control/rail.d.ts +0 -1
- package/build-types/range-control/rail.d.ts.map +1 -1
- package/build-types/range-control/styles/range-control-styles.d.ts +48 -49
- package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
- package/build-types/range-control/tooltip.d.ts +0 -1
- package/build-types/range-control/tooltip.d.ts.map +1 -1
- package/build-types/resizable-box/index.d.ts +7 -20
- package/build-types/resizable-box/index.d.ts.map +1 -1
- package/build-types/resizable-box/resize-tooltip/label.d.ts +0 -1
- package/build-types/resizable-box/resize-tooltip/label.d.ts.map +1 -1
- package/build-types/resizable-box/resize-tooltip/styles/resize-tooltip.styles.d.ts +7 -8
- package/build-types/resizable-box/resize-tooltip/styles/resize-tooltip.styles.d.ts.map +1 -1
- package/build-types/resizable-box/resize-tooltip/utils.d.ts +2 -3
- package/build-types/resizable-box/resize-tooltip/utils.d.ts.map +1 -1
- package/build-types/resizable-box/stories/index.story.d.ts +32 -39
- package/build-types/resizable-box/stories/index.story.d.ts.map +1 -1
- package/build-types/responsive-wrapper/index.d.ts +0 -1
- package/build-types/responsive-wrapper/index.d.ts.map +1 -1
- package/build-types/responsive-wrapper/types.d.ts +0 -1
- package/build-types/responsive-wrapper/types.d.ts.map +1 -1
- package/build-types/sandbox/index.d.ts +0 -1
- package/build-types/sandbox/index.d.ts.map +1 -1
- package/build-types/sandbox/types.d.ts +0 -1
- package/build-types/sandbox/types.d.ts.map +1 -1
- package/build-types/scrollable/component.d.ts +0 -1
- package/build-types/scrollable/component.d.ts.map +1 -1
- package/build-types/scrollable/hook.d.ts +9 -11
- package/build-types/scrollable/hook.d.ts.map +1 -1
- package/build-types/search-control/index.d.ts +0 -1
- package/build-types/search-control/index.d.ts.map +1 -1
- package/build-types/search-control/stories/index.story.d.ts +0 -1
- package/build-types/search-control/stories/index.story.d.ts.map +1 -1
- package/build-types/search-control/styles.d.ts +3 -4
- package/build-types/search-control/styles.d.ts.map +1 -1
- package/build-types/search-control/types.d.ts +0 -1
- package/build-types/search-control/types.d.ts.map +1 -1
- package/build-types/select-control/chevron-down.d.ts +0 -1
- package/build-types/select-control/chevron-down.d.ts.map +1 -1
- package/build-types/select-control/index.d.ts +0 -1
- package/build-types/select-control/index.d.ts.map +1 -1
- package/build-types/select-control/stories/index.story.d.ts +1 -1
- package/build-types/select-control/stories/index.story.d.ts.map +1 -1
- package/build-types/select-control/styles/select-control-styles.d.ts +11 -7
- package/build-types/select-control/styles/select-control-styles.d.ts.map +1 -1
- package/build-types/select-control/types.d.ts +6 -0
- package/build-types/select-control/types.d.ts.map +1 -1
- package/build-types/shortcut/index.d.ts +0 -1
- package/build-types/shortcut/index.d.ts.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/fill.d.ts +0 -1
- package/build-types/slot-fill/bubbles-virtually/fill.d.ts.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts +0 -1
- package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts +0 -1
- package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/slot.d.ts +1 -2
- package/build-types/slot-fill/bubbles-virtually/slot.d.ts.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/use-slot.d.ts.map +1 -1
- package/build-types/slot-fill/context.d.ts +0 -1
- package/build-types/slot-fill/context.d.ts.map +1 -1
- package/build-types/slot-fill/index.d.ts +4 -4
- package/build-types/slot-fill/index.d.ts.map +1 -1
- package/build-types/slot-fill/provider.d.ts +0 -1
- package/build-types/slot-fill/provider.d.ts.map +1 -1
- package/build-types/slot-fill/slot.d.ts +1 -2
- package/build-types/slot-fill/slot.d.ts.map +1 -1
- package/build-types/slot-fill/use-slot.d.ts +0 -1
- package/build-types/slot-fill/use-slot.d.ts.map +1 -1
- package/build-types/snackbar/index.d.ts +5 -6
- package/build-types/snackbar/index.d.ts.map +1 -1
- package/build-types/snackbar/list.d.ts +0 -1
- package/build-types/snackbar/list.d.ts.map +1 -1
- package/build-types/spacer/component.d.ts +0 -1
- package/build-types/spacer/component.d.ts.map +1 -1
- package/build-types/spacer/hook.d.ts +9 -11
- package/build-types/spacer/hook.d.ts.map +1 -1
- package/build-types/spinner/styles.d.ts +6 -7
- package/build-types/spinner/styles.d.ts.map +1 -1
- package/build-types/style-provider/index.d.ts +0 -1
- package/build-types/style-provider/index.d.ts.map +1 -1
- package/build-types/surface/component.d.ts +0 -1
- package/build-types/surface/component.d.ts.map +1 -1
- package/build-types/surface/hook.d.ts +10 -12
- package/build-types/surface/hook.d.ts.map +1 -1
- package/build-types/surface/types.d.ts +0 -1
- package/build-types/surface/types.d.ts.map +1 -1
- package/build-types/tab-panel/index.d.ts +0 -1
- package/build-types/tab-panel/index.d.ts.map +1 -1
- package/build-types/tab-panel/stories/index.story.d.ts +0 -1
- package/build-types/tab-panel/stories/index.story.d.ts.map +1 -1
- package/build-types/tabs/context.d.ts +0 -1
- package/build-types/tabs/context.d.ts.map +1 -1
- package/build-types/tabs/index.d.ts +0 -1
- package/build-types/tabs/index.d.ts.map +1 -1
- package/build-types/tabs/stories/index.story.d.ts.map +1 -1
- package/build-types/tabs/styles.d.ts +12 -13
- package/build-types/tabs/styles.d.ts.map +1 -1
- package/build-types/tabs/tab.d.ts +0 -1
- package/build-types/tabs/tab.d.ts.map +1 -1
- package/build-types/tabs/tablist.d.ts +0 -1
- package/build-types/tabs/tablist.d.ts.map +1 -1
- package/build-types/tabs/tabpanel.d.ts +0 -1
- package/build-types/tabs/tabpanel.d.ts.map +1 -1
- package/build-types/tabs/types.d.ts +0 -1
- package/build-types/tabs/types.d.ts.map +1 -1
- package/build-types/text/component.d.ts +0 -1
- package/build-types/text/component.d.ts.map +1 -1
- package/build-types/text/hook.d.ts +9 -9
- package/build-types/text/stories/index.story.d.ts +0 -1
- package/build-types/text/stories/index.story.d.ts.map +1 -1
- package/build-types/text/utils.d.ts +0 -1
- package/build-types/text/utils.d.ts.map +1 -1
- package/build-types/text-control/index.d.ts +2 -3
- package/build-types/text-control/index.d.ts.map +1 -1
- package/build-types/text-highlight/index.d.ts +0 -1
- package/build-types/text-highlight/index.d.ts.map +1 -1
- package/build-types/textarea-control/index.d.ts +2 -2
- package/build-types/textarea-control/index.d.ts.map +1 -1
- package/build-types/textarea-control/styles/textarea-control-styles.d.ts +2 -3
- package/build-types/textarea-control/styles/textarea-control-styles.d.ts.map +1 -1
- package/build-types/theme/color-algorithms.d.ts +1 -9
- package/build-types/theme/color-algorithms.d.ts.map +1 -1
- package/build-types/theme/index.d.ts +0 -1
- package/build-types/theme/index.d.ts.map +1 -1
- package/build-types/theme/stories/index.story.d.ts +0 -1
- package/build-types/theme/stories/index.story.d.ts.map +1 -1
- package/build-types/theme/styles.d.ts +2 -3
- package/build-types/theme/styles.d.ts.map +1 -1
- package/build-types/tip/index.d.ts +0 -1
- package/build-types/tip/index.d.ts.map +1 -1
- package/build-types/toggle-control/index.d.ts.map +1 -1
- package/build-types/toggle-control/stories/index.story.d.ts +0 -1
- package/build-types/toggle-control/stories/index.story.d.ts.map +1 -1
- package/build-types/toggle-group-control/context.d.ts +0 -1
- package/build-types/toggle-group-control/context.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts +0 -1
- package/build-types/toggle-group-control/toggle-group-control/as-button-group.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts +0 -1
- package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control/component.d.ts +8 -9
- package/build-types/toggle-group-control/toggle-group-control/component.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control/styles.d.ts +5 -6
- package/build-types/toggle-group-control/toggle-group-control/styles.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts +0 -1
- package/build-types/toggle-group-control/toggle-group-control-option/component.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts +1 -2
- package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts +5 -6
- package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts +0 -1
- package/build-types/toggle-group-control/toggle-group-control-option-icon/component.d.ts.map +1 -1
- package/build-types/toolbar/stories/index.story.d.ts +0 -1
- package/build-types/toolbar/stories/index.story.d.ts.map +1 -1
- package/build-types/toolbar/toolbar/index.d.ts +0 -1
- package/build-types/toolbar/toolbar/index.d.ts.map +1 -1
- package/build-types/toolbar/toolbar/toolbar-container.d.ts +0 -1
- package/build-types/toolbar/toolbar/toolbar-container.d.ts.map +1 -1
- package/build-types/toolbar/toolbar/types.d.ts +6 -0
- package/build-types/toolbar/toolbar/types.d.ts.map +1 -1
- package/build-types/toolbar/toolbar-button/index.d.ts +3 -97
- package/build-types/toolbar/toolbar-button/index.d.ts.map +1 -1
- package/build-types/toolbar/toolbar-button/toolbar-button-container.d.ts +0 -1
- package/build-types/toolbar/toolbar-button/toolbar-button-container.d.ts.map +1 -1
- package/build-types/toolbar/toolbar-button/types.d.ts +18 -0
- package/build-types/toolbar/toolbar-button/types.d.ts.map +1 -1
- package/build-types/toolbar/toolbar-context/index.d.ts +0 -1
- package/build-types/toolbar/toolbar-context/index.d.ts.map +1 -1
- package/build-types/toolbar/toolbar-dropdown-menu/index.d.ts +0 -1
- package/build-types/toolbar/toolbar-dropdown-menu/index.d.ts.map +1 -1
- package/build-types/toolbar/toolbar-group/index.d.ts +0 -1
- package/build-types/toolbar/toolbar-group/index.d.ts.map +1 -1
- package/build-types/toolbar/toolbar-group/toolbar-group-collapsed.d.ts +0 -1
- package/build-types/toolbar/toolbar-group/toolbar-group-collapsed.d.ts.map +1 -1
- package/build-types/toolbar/toolbar-group/toolbar-group-container.d.ts +1 -2
- package/build-types/toolbar/toolbar-group/toolbar-group-container.d.ts.map +1 -1
- package/build-types/toolbar/toolbar-item/index.d.ts +2 -5
- package/build-types/toolbar/toolbar-item/index.d.ts.map +1 -1
- package/build-types/tools-panel/context.d.ts +0 -1
- package/build-types/tools-panel/context.d.ts.map +1 -1
- package/build-types/tools-panel/styles.d.ts +2 -3
- package/build-types/tools-panel/styles.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel/component.d.ts +0 -1
- package/build-types/tools-panel/tools-panel/component.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel/hook.d.ts +10 -12
- package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel-header/component.d.ts +0 -1
- package/build-types/tools-panel/tools-panel-header/component.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel-header/hook.d.ts +11 -13
- package/build-types/tools-panel/tools-panel-header/hook.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel-item/component.d.ts +3 -4
- package/build-types/tools-panel/tools-panel-item/component.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel-item/hook.d.ts +9 -11
- package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
- package/build-types/tooltip/index.d.ts +0 -1
- package/build-types/tooltip/index.d.ts.map +1 -1
- package/build-types/tooltip/stories/index.story.d.ts +0 -1
- package/build-types/tooltip/stories/index.story.d.ts.map +1 -1
- package/build-types/tooltip/types.d.ts +4 -1
- package/build-types/tooltip/types.d.ts.map +1 -1
- package/build-types/tree-grid/cell.d.ts +0 -1
- package/build-types/tree-grid/cell.d.ts.map +1 -1
- package/build-types/tree-grid/index.d.ts +0 -1
- package/build-types/tree-grid/index.d.ts.map +1 -1
- package/build-types/tree-grid/item.d.ts +0 -1
- package/build-types/tree-grid/item.d.ts.map +1 -1
- package/build-types/tree-grid/roving-tab-index-context.d.ts +0 -1
- package/build-types/tree-grid/roving-tab-index-context.d.ts.map +1 -1
- package/build-types/tree-grid/roving-tab-index-item.d.ts +0 -1
- package/build-types/tree-grid/roving-tab-index-item.d.ts.map +1 -1
- package/build-types/tree-grid/roving-tab-index.d.ts +0 -1
- package/build-types/tree-grid/roving-tab-index.d.ts.map +1 -1
- package/build-types/tree-grid/row.d.ts +0 -1
- package/build-types/tree-grid/row.d.ts.map +1 -1
- package/build-types/tree-grid/stories/index.story.d.ts +0 -1
- package/build-types/tree-grid/stories/index.story.d.ts.map +1 -1
- package/build-types/tree-grid/types.d.ts +0 -1
- package/build-types/tree-grid/types.d.ts.map +1 -1
- package/build-types/tree-select/index.d.ts +1 -1
- package/build-types/tree-select/index.d.ts.map +1 -1
- package/build-types/truncate/component.d.ts +0 -1
- package/build-types/truncate/component.d.ts.map +1 -1
- package/build-types/truncate/hook.d.ts +9 -11
- package/build-types/truncate/hook.d.ts.map +1 -1
- package/build-types/truncate/utils.d.ts.map +1 -1
- package/build-types/unit-control/index.d.ts +7 -8
- package/build-types/unit-control/index.d.ts.map +1 -1
- package/build-types/unit-control/styles/unit-control-styles.d.ts +17 -18
- package/build-types/unit-control/styles/unit-control-styles.d.ts.map +1 -1
- package/build-types/unit-control/unit-select-control.d.ts +0 -1
- package/build-types/unit-control/unit-select-control.d.ts.map +1 -1
- package/build-types/unit-control/utils.d.ts.map +1 -1
- package/build-types/utils/breakpoint.d.ts +1 -10
- package/build-types/utils/breakpoint.d.ts.map +1 -1
- package/build-types/utils/element-rect.d.ts +111 -0
- package/build-types/utils/element-rect.d.ts.map +1 -0
- package/build-types/utils/font.d.ts +1 -6
- package/build-types/utils/font.d.ts.map +1 -1
- package/build-types/utils/hooks/use-controlled-state.d.ts +1 -1
- package/build-types/utils/hooks/use-controlled-state.d.ts.map +1 -1
- package/build-types/utils/hooks/use-controlled-value.d.ts +0 -1
- package/build-types/utils/hooks/use-controlled-value.d.ts.map +1 -1
- package/build-types/utils/hooks/use-event.d.ts +20 -0
- package/build-types/utils/hooks/use-event.d.ts.map +1 -0
- package/build-types/utils/hooks/use-on-value-update.d.ts +19 -0
- package/build-types/utils/hooks/use-on-value-update.d.ts.map +1 -0
- package/build-types/utils/hooks/use-update-effect.d.ts +2 -2
- package/build-types/utils/hooks/use-update-effect.d.ts.map +1 -1
- package/build-types/utils/math.d.ts.map +1 -1
- package/build-types/utils/rtl.d.ts +2 -2
- package/build-types/utils/values.d.ts +2 -2
- package/build-types/utils/values.d.ts.map +1 -1
- package/build-types/utils/with-ignore-ime-events.d.ts +0 -1
- package/build-types/utils/with-ignore-ime-events.d.ts.map +1 -1
- package/build-types/v-stack/component.d.ts +2 -3
- package/build-types/v-stack/component.d.ts.map +1 -1
- package/build-types/v-stack/hook.d.ts +9 -11
- package/build-types/v-stack/hook.d.ts.map +1 -1
- package/build-types/v-stack/stories/index.story.d.ts +2 -3
- package/build-types/v-stack/stories/index.story.d.ts.map +1 -1
- package/build-types/view/component.d.ts +0 -2
- package/build-types/view/component.d.ts.map +1 -1
- package/build-types/visually-hidden/component.d.ts +0 -1
- package/build-types/visually-hidden/component.d.ts.map +1 -1
- package/build-types/z-stack/component.d.ts +0 -1
- package/build-types/z-stack/component.d.ts.map +1 -1
- package/build-types/z-stack/styles.d.ts +4 -5
- package/build-types/z-stack/styles.d.ts.map +1 -1
- package/package.json +19 -20
- package/src/animation/index.tsx +0 -1
- package/src/autocomplete/README.md +2 -2
- package/src/autocomplete/autocompleter-ui.tsx +1 -0
- package/src/autocomplete/index.tsx +0 -1
- package/src/autocomplete/types.ts +2 -3
- package/src/base-control/README.md +1 -1
- package/src/base-control/index.tsx +16 -6
- package/src/base-control/stories/index.story.tsx +0 -1
- package/src/base-control/types.ts +1 -1
- package/src/border-box-control/border-box-control-visualizer/component.tsx +0 -5
- package/src/button/README.md +14 -1
- package/src/button/index.tsx +15 -11
- package/src/button/stories/e2e/index.story.tsx +2 -1
- package/src/button/test/index.tsx +34 -6
- package/src/button/types.ts +36 -12
- package/src/card/card/README.md +1 -1
- package/src/card/stories/index.story.tsx +43 -42
- package/src/checkbox-control/README.md +8 -0
- package/src/checkbox-control/index.tsx +1 -0
- package/src/checkbox-control/style.scss +3 -1
- package/src/color-picker/component.tsx +12 -22
- package/src/color-picker/stories/index.story.tsx +2 -22
- package/src/combobox-control/README.md +9 -0
- package/src/combobox-control/index.tsx +13 -0
- package/src/combobox-control/test/index.tsx +127 -1
- package/src/composite/current/index.ts +0 -2
- package/src/custom-select-control/README.md +34 -32
- package/src/custom-select-control/index.tsx +176 -0
- package/src/custom-select-control/stories/index.story.tsx +26 -18
- package/src/{custom-select-control-v2/legacy-component → custom-select-control}/test/index.tsx +89 -57
- package/src/custom-select-control/types.ts +123 -0
- package/src/custom-select-control-v2/custom-select.tsx +59 -22
- package/src/custom-select-control-v2/index.tsx +26 -1
- package/src/custom-select-control-v2/item.tsx +5 -1
- package/src/custom-select-control-v2/stories/{default.story.tsx → index.story.tsx} +1 -1
- package/src/custom-select-control-v2/styles.ts +179 -84
- package/src/custom-select-control-v2/test/index.tsx +35 -5
- package/src/custom-select-control-v2/types.ts +18 -115
- package/src/date-time/README.md +8 -0
- package/src/date-time/date-time/index.tsx +2 -1
- package/src/date-time/index.ts +2 -1
- package/src/date-time/stories/time-input.story.tsx +36 -0
- package/src/date-time/time/index.tsx +77 -194
- package/src/date-time/time/test/index.tsx +61 -0
- package/src/date-time/time-input/index.tsx +196 -0
- package/src/date-time/time-input/test/index.tsx +171 -0
- package/src/date-time/types.ts +63 -0
- package/src/date-time/utils.ts +69 -0
- package/src/dimension-control/test/__snapshots__/index.test.js.snap +120 -96
- package/src/disabled/README.md +1 -1
- package/src/disclosure/index.tsx +0 -1
- package/src/divider/component.tsx +0 -1
- package/src/divider/types.ts +0 -1
- package/src/dropdown/stories/index.story.tsx +55 -50
- package/src/dropdown-menu/index.tsx +1 -0
- package/src/dropdown-menu/stories/index.story.tsx +52 -55
- package/src/dropdown-menu-v2/index.tsx +0 -1
- package/src/dropdown-menu-v2/stories/index.story.tsx +0 -12
- package/src/dropdown-menu-v2/styles.ts +3 -4
- package/src/dropdown-menu-v2/types.ts +0 -1
- package/src/focal-point-picker/README.md +9 -0
- package/src/focal-point-picker/index.tsx +1 -0
- package/src/font-size-picker/README.md +1 -1
- package/src/font-size-picker/font-size-picker-select.tsx +2 -2
- package/src/font-size-picker/index.tsx +69 -65
- package/src/font-size-picker/test/index.tsx +89 -21
- package/src/font-size-picker/types.ts +6 -5
- package/src/font-size-picker/utils.ts +0 -5
- package/src/form-toggle/style.scss +14 -9
- package/src/form-token-field/README.md +2 -1
- package/src/form-token-field/index.tsx +9 -0
- package/src/form-token-field/stories/index.story.tsx +2 -0
- package/src/form-token-field/token.tsx +2 -0
- package/src/higher-order/navigate-regions/style.scss +14 -14
- package/src/higher-order/with-spoken-messages/index.tsx +1 -2
- package/src/index.ts +1 -1
- package/src/menu-items-choice/types.ts +2 -1
- package/src/mobile/bottom-sheet/bottom-sheet-navigation/navigation-screen.native.js +1 -1
- package/src/navigator/stories/index.story.tsx +240 -242
- package/src/notice/test/__snapshots__/index.tsx.snap +1 -1
- package/src/palette-edit/test/index.tsx +1 -0
- package/src/popover/index.tsx +0 -2
- package/src/popover/stories/index.story.tsx +155 -153
- package/src/popover/utils.ts +0 -1
- package/src/private-apis.ts +0 -7
- package/src/progress-bar/styles.ts +18 -9
- package/src/radio-control/index.tsx +1 -1
- package/src/radio-control/style.scss +6 -1
- package/src/radio-group/context.tsx +0 -1
- package/src/radio-group/index.tsx +0 -1
- package/src/radio-group/radio.tsx +0 -1
- package/src/range-control/README.md +8 -0
- package/src/range-control/index.tsx +3 -0
- package/src/range-control/styles/range-control-styles.ts +6 -2
- package/src/resizable-box/resize-tooltip/README.md +1 -1
- package/src/resizable-box/resize-tooltip/utils.ts +1 -1
- package/src/select-control/README.md +8 -0
- package/src/select-control/index.tsx +10 -4
- package/src/select-control/stories/index.story.tsx +6 -0
- package/src/select-control/styles/select-control-styles.ts +41 -7
- package/src/select-control/types.ts +6 -0
- package/src/style.scss +1 -1
- package/src/tab-panel/index.tsx +0 -1
- package/src/tabs/index.tsx +0 -1
- package/src/tabs/stories/index.story.tsx +25 -18
- package/src/tabs/styles.ts +28 -16
- package/src/tabs/tablist.tsx +4 -100
- package/src/tabs/types.ts +0 -1
- package/src/textarea-control/README.md +8 -0
- package/src/textarea-control/index.tsx +1 -0
- package/src/theme/stories/index.story.tsx +2 -0
- package/src/toggle-control/index.tsx +12 -3
- package/src/toggle-control/style.scss +11 -0
- package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +36 -6
- package/src/toggle-group-control/test/index.tsx +114 -0
- package/src/toggle-group-control/toggle-group-control/as-radio-group.tsx +0 -1
- package/src/toggle-group-control/toggle-group-control/component.tsx +0 -2
- package/src/toggle-group-control/toggle-group-control-option-base/component.tsx +6 -3
- package/src/toggle-group-control/toggle-group-control-option-base/styles.ts +5 -0
- package/src/toolbar/toolbar/README.md +9 -0
- package/src/toolbar/toolbar/style.scss +7 -0
- package/src/toolbar/toolbar/toolbar-container.tsx +0 -1
- package/src/toolbar/toolbar/types.ts +6 -0
- package/src/toolbar/toolbar-button/index.tsx +30 -17
- package/src/toolbar/toolbar-button/types.ts +19 -0
- package/src/toolbar/toolbar-context/index.ts +0 -1
- package/src/toolbar/toolbar-item/index.tsx +1 -1
- package/src/tools-panel/tools-panel-header/component.tsx +1 -1
- package/src/tooltip/index.tsx +3 -2
- package/src/tooltip/test/index.tsx +18 -0
- package/src/tooltip/types.ts +4 -0
- package/src/tree-select/README.md +9 -0
- package/src/tree-select/index.tsx +1 -0
- package/src/unit-control/index.tsx +3 -2
- package/src/unit-control/styles/unit-control-styles.ts +10 -4
- package/src/utils/element-rect.ts +197 -0
- package/src/utils/hooks/use-event.ts +38 -0
- package/src/utils/hooks/use-on-value-update.ts +42 -0
- package/src/utils/hooks/use-update-effect.js +8 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/build/custom-select-control-v2/default-component/index.js +0 -43
- package/build/custom-select-control-v2/default-component/index.js.map +0 -1
- package/build/custom-select-control-v2/legacy-component/index.js +0 -119
- package/build/custom-select-control-v2/legacy-component/index.js.map +0 -1
- package/build-module/custom-select-control-v2/default-component/index.js +0 -32
- package/build-module/custom-select-control-v2/default-component/index.js.map +0 -1
- package/build-module/custom-select-control-v2/legacy-component/index.js +0 -110
- package/build-module/custom-select-control-v2/legacy-component/index.js.map +0 -1
- package/build-types/custom-select-control-v2/default-component/index.d.ts +0 -9
- package/build-types/custom-select-control-v2/default-component/index.d.ts.map +0 -1
- package/build-types/custom-select-control-v2/legacy-component/index.d.ts +0 -5
- package/build-types/custom-select-control-v2/legacy-component/index.d.ts.map +0 -1
- package/build-types/custom-select-control-v2/legacy-component/test/index.d.ts.map +0 -1
- package/build-types/custom-select-control-v2/stories/default.story.d.ts.map +0 -1
- package/build-types/custom-select-control-v2/stories/legacy.story.d.ts +0 -14
- package/build-types/custom-select-control-v2/stories/legacy.story.d.ts.map +0 -1
- package/src/custom-select-control/index.js +0 -240
- package/src/custom-select-control/style.scss +0 -75
- package/src/custom-select-control/test/index.js +0 -629
- package/src/custom-select-control-v2/default-component/index.tsx +0 -30
- package/src/custom-select-control-v2/legacy-component/index.tsx +0 -132
- package/src/custom-select-control-v2/stories/legacy.story.tsx +0 -72
- /package/build-types/{custom-select-control-v2/legacy-component → custom-select-control}/test/index.d.ts +0 -0
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var Ariakit = _interopRequireWildcard(require("@ariakit/react"));
|
|
9
|
-
var _customSelect = _interopRequireDefault(require("../custom-select"));
|
|
10
|
-
var _item = _interopRequireDefault(require("../item"));
|
|
11
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
13
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
|
-
/**
|
|
15
|
-
* External dependencies
|
|
16
|
-
*/
|
|
17
|
-
// eslint-disable-next-line no-restricted-imports
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Internal dependencies
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
function CustomSelectControlV2(props) {
|
|
24
|
-
const {
|
|
25
|
-
defaultValue,
|
|
26
|
-
onChange,
|
|
27
|
-
value,
|
|
28
|
-
...restProps
|
|
29
|
-
} = props;
|
|
30
|
-
// Forward props + store from v2 implementation
|
|
31
|
-
const store = Ariakit.useSelectStore({
|
|
32
|
-
setValue: nextValue => onChange?.(nextValue),
|
|
33
|
-
defaultValue,
|
|
34
|
-
value
|
|
35
|
-
});
|
|
36
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_customSelect.default, {
|
|
37
|
-
...restProps,
|
|
38
|
-
store: store
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
CustomSelectControlV2.Item = _item.default;
|
|
42
|
-
var _default = exports.default = CustomSelectControlV2;
|
|
43
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["Ariakit","_interopRequireWildcard","require","_customSelect","_interopRequireDefault","_item","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","CustomSelectControlV2","props","defaultValue","onChange","value","restProps","store","useSelectStore","setValue","nextValue","jsx","Item","_default","exports"],"sources":["@wordpress/components/src/custom-select-control-v2/default-component/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\n// eslint-disable-next-line no-restricted-imports\nimport * as Ariakit from '@ariakit/react';\n/**\n * Internal dependencies\n */\nimport _CustomSelect from '../custom-select';\nimport type { CustomSelectProps } from '../types';\nimport type { WordPressComponentProps } from '../../context';\nimport Item from '../item';\n\nfunction CustomSelectControlV2(\n\tprops: WordPressComponentProps< CustomSelectProps, 'button', false >\n) {\n\tconst { defaultValue, onChange, value, ...restProps } = props;\n\t// Forward props + store from v2 implementation\n\tconst store = Ariakit.useSelectStore( {\n\t\tsetValue: ( nextValue ) => onChange?.( nextValue ),\n\t\tdefaultValue,\n\t\tvalue,\n\t} );\n\n\treturn <_CustomSelect { ...restProps } store={ store } />;\n}\n\nCustomSelectControlV2.Item = Item;\n\nexport default CustomSelectControlV2;\n"],"mappings":";;;;;;;AAIA,IAAAA,OAAA,GAAAC,uBAAA,CAAAC,OAAA;AAIA,IAAAC,aAAA,GAAAC,sBAAA,CAAAF,OAAA;AAGA,IAAAG,KAAA,GAAAD,sBAAA,CAAAF,OAAA;AAA2B,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAK,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAP,wBAAAO,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAG,CAAA,KAAAA,CAAA,CAAAV,GAAA,IAAAU,CAAA,CAAAC,GAAA,IAAAP,MAAA,CAAAC,cAAA,CAAAJ,CAAA,EAAAM,CAAA,EAAAG,CAAA,IAAAT,CAAA,CAAAM,CAAA,IAAAd,CAAA,CAAAc,CAAA,YAAAN,CAAA,CAAAH,OAAA,GAAAL,CAAA,EAAAG,CAAA,IAAAA,CAAA,CAAAe,GAAA,CAAAlB,CAAA,EAAAQ,CAAA,GAAAA,CAAA;AAX3B;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAMA,SAASW,qBAAqBA,CAC7BC,KAAoE,EACnE;EACD,MAAM;IAAEC,YAAY;IAAEC,QAAQ;IAAEC,KAAK;IAAE,GAAGC;EAAU,CAAC,GAAGJ,KAAK;EAC7D;EACA,MAAMK,KAAK,GAAGjC,OAAO,CAACkC,cAAc,CAAE;IACrCC,QAAQ,EAAIC,SAAS,IAAMN,QAAQ,GAAIM,SAAU,CAAC;IAClDP,YAAY;IACZE;EACD,CAAE,CAAC;EAEH,oBAAO,IAAAzB,WAAA,CAAA+B,GAAA,EAAClC,aAAA,CAAAU,OAAa;IAAA,GAAMmB,SAAS;IAAGC,KAAK,EAAGA;EAAO,CAAE,CAAC;AAC1D;AAEAN,qBAAqB,CAACW,IAAI,GAAGA,aAAI;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAA3B,OAAA,GAEnBc,qBAAqB","ignoreList":[]}
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var Ariakit = _interopRequireWildcard(require("@ariakit/react"));
|
|
9
|
-
var _customSelect = _interopRequireDefault(require("../custom-select"));
|
|
10
|
-
var _item = _interopRequireDefault(require("../item"));
|
|
11
|
-
var Styled = _interopRequireWildcard(require("../styles"));
|
|
12
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
14
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
15
|
-
/**
|
|
16
|
-
* External dependencies
|
|
17
|
-
*/
|
|
18
|
-
// eslint-disable-next-line no-restricted-imports
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Internal dependencies
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
function CustomSelectControl(props) {
|
|
25
|
-
const {
|
|
26
|
-
__experimentalShowSelectedHint = false,
|
|
27
|
-
__next40pxDefaultSize = false,
|
|
28
|
-
describedBy,
|
|
29
|
-
options,
|
|
30
|
-
onChange,
|
|
31
|
-
size = 'default',
|
|
32
|
-
value,
|
|
33
|
-
...restProps
|
|
34
|
-
} = props;
|
|
35
|
-
|
|
36
|
-
// Forward props + store from v2 implementation
|
|
37
|
-
const store = Ariakit.useSelectStore({
|
|
38
|
-
async setValue(nextValue) {
|
|
39
|
-
const nextOption = options.find(item => item.name === nextValue);
|
|
40
|
-
if (!onChange || !nextOption) {
|
|
41
|
-
return;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
// Executes the logic in a microtask after the popup is closed.
|
|
45
|
-
// This is simply to ensure the isOpen state matches that in Downshift.
|
|
46
|
-
await Promise.resolve();
|
|
47
|
-
const state = store.getState();
|
|
48
|
-
const changeObject = {
|
|
49
|
-
highlightedIndex: state.renderedItems.findIndex(item => item.value === nextValue),
|
|
50
|
-
inputValue: '',
|
|
51
|
-
isOpen: state.open,
|
|
52
|
-
selectedItem: nextOption,
|
|
53
|
-
type: ''
|
|
54
|
-
};
|
|
55
|
-
onChange(changeObject);
|
|
56
|
-
},
|
|
57
|
-
value: value?.name,
|
|
58
|
-
// Setting the first option as a default value when no value is provided
|
|
59
|
-
// is already done natively by the underlying Ariakit component,
|
|
60
|
-
// but doing this explicitly avoids the `onChange` callback from firing
|
|
61
|
-
// on initial render, thus making this implementation closer to the v1.
|
|
62
|
-
defaultValue: options[0]?.name
|
|
63
|
-
});
|
|
64
|
-
const children = options.map(({
|
|
65
|
-
name,
|
|
66
|
-
key,
|
|
67
|
-
__experimentalHint,
|
|
68
|
-
style,
|
|
69
|
-
className
|
|
70
|
-
}) => {
|
|
71
|
-
const withHint = /*#__PURE__*/(0, _jsxRuntime.jsxs)(Styled.WithHintWrapper, {
|
|
72
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
73
|
-
children: name
|
|
74
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(Styled.ExperimentalHintItem, {
|
|
75
|
-
className: "components-custom-select-control__item-hint",
|
|
76
|
-
children: __experimentalHint
|
|
77
|
-
})]
|
|
78
|
-
});
|
|
79
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_item.default, {
|
|
80
|
-
value: name,
|
|
81
|
-
children: __experimentalHint ? withHint : name,
|
|
82
|
-
style: style,
|
|
83
|
-
className: className
|
|
84
|
-
}, key);
|
|
85
|
-
});
|
|
86
|
-
const renderSelectedValueHint = () => {
|
|
87
|
-
const {
|
|
88
|
-
value: currentValue
|
|
89
|
-
} = store.getState();
|
|
90
|
-
const currentHint = options?.find(({
|
|
91
|
-
name
|
|
92
|
-
}) => currentValue === name);
|
|
93
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(Styled.SelectedExperimentalHintWrapper, {
|
|
94
|
-
children: [currentValue, /*#__PURE__*/(0, _jsxRuntime.jsx)(Styled.SelectedExperimentalHintItem, {
|
|
95
|
-
className: "components-custom-select-control__hint",
|
|
96
|
-
children: currentHint?.__experimentalHint
|
|
97
|
-
})]
|
|
98
|
-
});
|
|
99
|
-
};
|
|
100
|
-
const translatedSize = (() => {
|
|
101
|
-
if (__next40pxDefaultSize && size === 'default' || size === '__unstable-large') {
|
|
102
|
-
return 'default';
|
|
103
|
-
}
|
|
104
|
-
if (!__next40pxDefaultSize && size === 'default') {
|
|
105
|
-
return 'compact';
|
|
106
|
-
}
|
|
107
|
-
return size;
|
|
108
|
-
})();
|
|
109
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_customSelect.default, {
|
|
110
|
-
"aria-describedby": describedBy,
|
|
111
|
-
renderSelectedValue: __experimentalShowSelectedHint ? renderSelectedValueHint : undefined,
|
|
112
|
-
size: translatedSize,
|
|
113
|
-
store: store,
|
|
114
|
-
...restProps,
|
|
115
|
-
children: children
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
var _default = exports.default = CustomSelectControl;
|
|
119
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["Ariakit","_interopRequireWildcard","require","_customSelect","_interopRequireDefault","_item","Styled","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","CustomSelectControl","props","__experimentalShowSelectedHint","__next40pxDefaultSize","describedBy","options","onChange","size","value","restProps","store","useSelectStore","setValue","nextValue","nextOption","find","item","name","Promise","resolve","state","getState","changeObject","highlightedIndex","renderedItems","findIndex","inputValue","isOpen","open","selectedItem","type","defaultValue","children","map","key","__experimentalHint","style","className","withHint","jsxs","WithHintWrapper","jsx","ExperimentalHintItem","renderSelectedValueHint","currentValue","currentHint","SelectedExperimentalHintWrapper","SelectedExperimentalHintItem","translatedSize","renderSelectedValue","undefined","_default","exports"],"sources":["@wordpress/components/src/custom-select-control-v2/legacy-component/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\n// eslint-disable-next-line no-restricted-imports\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * Internal dependencies\n */\nimport _CustomSelect from '../custom-select';\nimport CustomSelectItem from '../item';\nimport type { LegacyCustomSelectProps } from '../types';\nimport * as Styled from '../styles';\n\nfunction CustomSelectControl( props: LegacyCustomSelectProps ) {\n\tconst {\n\t\t__experimentalShowSelectedHint = false,\n\t\t__next40pxDefaultSize = false,\n\t\tdescribedBy,\n\t\toptions,\n\t\tonChange,\n\t\tsize = 'default',\n\t\tvalue,\n\t\t...restProps\n\t} = props;\n\n\t// Forward props + store from v2 implementation\n\tconst store = Ariakit.useSelectStore( {\n\t\tasync setValue( nextValue ) {\n\t\t\tconst nextOption = options.find(\n\t\t\t\t( item ) => item.name === nextValue\n\t\t\t);\n\n\t\t\tif ( ! onChange || ! nextOption ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Executes the logic in a microtask after the popup is closed.\n\t\t\t// This is simply to ensure the isOpen state matches that in Downshift.\n\t\t\tawait Promise.resolve();\n\t\t\tconst state = store.getState();\n\n\t\t\tconst changeObject = {\n\t\t\t\thighlightedIndex: state.renderedItems.findIndex(\n\t\t\t\t\t( item ) => item.value === nextValue\n\t\t\t\t),\n\t\t\t\tinputValue: '',\n\t\t\t\tisOpen: state.open,\n\t\t\t\tselectedItem: nextOption,\n\t\t\t\ttype: '',\n\t\t\t};\n\t\t\tonChange( changeObject );\n\t\t},\n\t\tvalue: value?.name,\n\t\t// Setting the first option as a default value when no value is provided\n\t\t// is already done natively by the underlying Ariakit component,\n\t\t// but doing this explicitly avoids the `onChange` callback from firing\n\t\t// on initial render, thus making this implementation closer to the v1.\n\t\tdefaultValue: options[ 0 ]?.name,\n\t} );\n\n\tconst children = options.map(\n\t\t( { name, key, __experimentalHint, style, className } ) => {\n\t\t\tconst withHint = (\n\t\t\t\t<Styled.WithHintWrapper>\n\t\t\t\t\t<span>{ name }</span>\n\t\t\t\t\t<Styled.ExperimentalHintItem className=\"components-custom-select-control__item-hint\">\n\t\t\t\t\t\t{ __experimentalHint }\n\t\t\t\t\t</Styled.ExperimentalHintItem>\n\t\t\t\t</Styled.WithHintWrapper>\n\t\t\t);\n\n\t\t\treturn (\n\t\t\t\t<CustomSelectItem\n\t\t\t\t\tkey={ key }\n\t\t\t\t\tvalue={ name }\n\t\t\t\t\tchildren={ __experimentalHint ? withHint : name }\n\t\t\t\t\tstyle={ style }\n\t\t\t\t\tclassName={ className }\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\t);\n\n\tconst renderSelectedValueHint = () => {\n\t\tconst { value: currentValue } = store.getState();\n\n\t\tconst currentHint = options?.find(\n\t\t\t( { name } ) => currentValue === name\n\t\t);\n\n\t\treturn (\n\t\t\t<Styled.SelectedExperimentalHintWrapper>\n\t\t\t\t{ currentValue }\n\t\t\t\t<Styled.SelectedExperimentalHintItem className=\"components-custom-select-control__hint\">\n\t\t\t\t\t{ currentHint?.__experimentalHint }\n\t\t\t\t</Styled.SelectedExperimentalHintItem>\n\t\t\t</Styled.SelectedExperimentalHintWrapper>\n\t\t);\n\t};\n\n\tconst translatedSize = ( () => {\n\t\tif (\n\t\t\t( __next40pxDefaultSize && size === 'default' ) ||\n\t\t\tsize === '__unstable-large'\n\t\t) {\n\t\t\treturn 'default';\n\t\t}\n\t\tif ( ! __next40pxDefaultSize && size === 'default' ) {\n\t\t\treturn 'compact';\n\t\t}\n\t\treturn size;\n\t} )();\n\n\treturn (\n\t\t<_CustomSelect\n\t\t\taria-describedby={ describedBy }\n\t\t\trenderSelectedValue={\n\t\t\t\t__experimentalShowSelectedHint\n\t\t\t\t\t? renderSelectedValueHint\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t\tsize={ translatedSize }\n\t\t\tstore={ store }\n\t\t\t{ ...restProps }\n\t\t>\n\t\t\t{ children }\n\t\t</_CustomSelect>\n\t);\n}\n\nexport default CustomSelectControl;\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
// eslint-disable-next-line no-restricted-imports
|
|
5
|
-
import * as Ariakit from '@ariakit/react';
|
|
6
|
-
/**
|
|
7
|
-
* Internal dependencies
|
|
8
|
-
*/
|
|
9
|
-
import _CustomSelect from '../custom-select';
|
|
10
|
-
import Item from '../item';
|
|
11
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
-
function CustomSelectControlV2(props) {
|
|
13
|
-
const {
|
|
14
|
-
defaultValue,
|
|
15
|
-
onChange,
|
|
16
|
-
value,
|
|
17
|
-
...restProps
|
|
18
|
-
} = props;
|
|
19
|
-
// Forward props + store from v2 implementation
|
|
20
|
-
const store = Ariakit.useSelectStore({
|
|
21
|
-
setValue: nextValue => onChange?.(nextValue),
|
|
22
|
-
defaultValue,
|
|
23
|
-
value
|
|
24
|
-
});
|
|
25
|
-
return /*#__PURE__*/_jsx(_CustomSelect, {
|
|
26
|
-
...restProps,
|
|
27
|
-
store: store
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
CustomSelectControlV2.Item = Item;
|
|
31
|
-
export default CustomSelectControlV2;
|
|
32
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["Ariakit","_CustomSelect","Item","jsx","_jsx","CustomSelectControlV2","props","defaultValue","onChange","value","restProps","store","useSelectStore","setValue","nextValue"],"sources":["@wordpress/components/src/custom-select-control-v2/default-component/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\n// eslint-disable-next-line no-restricted-imports\nimport * as Ariakit from '@ariakit/react';\n/**\n * Internal dependencies\n */\nimport _CustomSelect from '../custom-select';\nimport type { CustomSelectProps } from '../types';\nimport type { WordPressComponentProps } from '../../context';\nimport Item from '../item';\n\nfunction CustomSelectControlV2(\n\tprops: WordPressComponentProps< CustomSelectProps, 'button', false >\n) {\n\tconst { defaultValue, onChange, value, ...restProps } = props;\n\t// Forward props + store from v2 implementation\n\tconst store = Ariakit.useSelectStore( {\n\t\tsetValue: ( nextValue ) => onChange?.( nextValue ),\n\t\tdefaultValue,\n\t\tvalue,\n\t} );\n\n\treturn <_CustomSelect { ...restProps } store={ store } />;\n}\n\nCustomSelectControlV2.Item = Item;\n\nexport default CustomSelectControlV2;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA,OAAO,KAAKA,OAAO,MAAM,gBAAgB;AACzC;AACA;AACA;AACA,OAAOC,aAAa,MAAM,kBAAkB;AAG5C,OAAOC,IAAI,MAAM,SAAS;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE3B,SAASC,qBAAqBA,CAC7BC,KAAoE,EACnE;EACD,MAAM;IAAEC,YAAY;IAAEC,QAAQ;IAAEC,KAAK;IAAE,GAAGC;EAAU,CAAC,GAAGJ,KAAK;EAC7D;EACA,MAAMK,KAAK,GAAGX,OAAO,CAACY,cAAc,CAAE;IACrCC,QAAQ,EAAIC,SAAS,IAAMN,QAAQ,GAAIM,SAAU,CAAC;IAClDP,YAAY;IACZE;EACD,CAAE,CAAC;EAEH,oBAAOL,IAAA,CAACH,aAAa;IAAA,GAAMS,SAAS;IAAGC,KAAK,EAAGA;EAAO,CAAE,CAAC;AAC1D;AAEAN,qBAAqB,CAACH,IAAI,GAAGA,IAAI;AAEjC,eAAeG,qBAAqB","ignoreList":[]}
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
// eslint-disable-next-line no-restricted-imports
|
|
5
|
-
import * as Ariakit from '@ariakit/react';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Internal dependencies
|
|
9
|
-
*/
|
|
10
|
-
import _CustomSelect from '../custom-select';
|
|
11
|
-
import CustomSelectItem from '../item';
|
|
12
|
-
import * as Styled from '../styles';
|
|
13
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
|
-
function CustomSelectControl(props) {
|
|
16
|
-
const {
|
|
17
|
-
__experimentalShowSelectedHint = false,
|
|
18
|
-
__next40pxDefaultSize = false,
|
|
19
|
-
describedBy,
|
|
20
|
-
options,
|
|
21
|
-
onChange,
|
|
22
|
-
size = 'default',
|
|
23
|
-
value,
|
|
24
|
-
...restProps
|
|
25
|
-
} = props;
|
|
26
|
-
|
|
27
|
-
// Forward props + store from v2 implementation
|
|
28
|
-
const store = Ariakit.useSelectStore({
|
|
29
|
-
async setValue(nextValue) {
|
|
30
|
-
const nextOption = options.find(item => item.name === nextValue);
|
|
31
|
-
if (!onChange || !nextOption) {
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
// Executes the logic in a microtask after the popup is closed.
|
|
36
|
-
// This is simply to ensure the isOpen state matches that in Downshift.
|
|
37
|
-
await Promise.resolve();
|
|
38
|
-
const state = store.getState();
|
|
39
|
-
const changeObject = {
|
|
40
|
-
highlightedIndex: state.renderedItems.findIndex(item => item.value === nextValue),
|
|
41
|
-
inputValue: '',
|
|
42
|
-
isOpen: state.open,
|
|
43
|
-
selectedItem: nextOption,
|
|
44
|
-
type: ''
|
|
45
|
-
};
|
|
46
|
-
onChange(changeObject);
|
|
47
|
-
},
|
|
48
|
-
value: value?.name,
|
|
49
|
-
// Setting the first option as a default value when no value is provided
|
|
50
|
-
// is already done natively by the underlying Ariakit component,
|
|
51
|
-
// but doing this explicitly avoids the `onChange` callback from firing
|
|
52
|
-
// on initial render, thus making this implementation closer to the v1.
|
|
53
|
-
defaultValue: options[0]?.name
|
|
54
|
-
});
|
|
55
|
-
const children = options.map(({
|
|
56
|
-
name,
|
|
57
|
-
key,
|
|
58
|
-
__experimentalHint,
|
|
59
|
-
style,
|
|
60
|
-
className
|
|
61
|
-
}) => {
|
|
62
|
-
const withHint = /*#__PURE__*/_jsxs(Styled.WithHintWrapper, {
|
|
63
|
-
children: [/*#__PURE__*/_jsx("span", {
|
|
64
|
-
children: name
|
|
65
|
-
}), /*#__PURE__*/_jsx(Styled.ExperimentalHintItem, {
|
|
66
|
-
className: "components-custom-select-control__item-hint",
|
|
67
|
-
children: __experimentalHint
|
|
68
|
-
})]
|
|
69
|
-
});
|
|
70
|
-
return /*#__PURE__*/_jsx(CustomSelectItem, {
|
|
71
|
-
value: name,
|
|
72
|
-
children: __experimentalHint ? withHint : name,
|
|
73
|
-
style: style,
|
|
74
|
-
className: className
|
|
75
|
-
}, key);
|
|
76
|
-
});
|
|
77
|
-
const renderSelectedValueHint = () => {
|
|
78
|
-
const {
|
|
79
|
-
value: currentValue
|
|
80
|
-
} = store.getState();
|
|
81
|
-
const currentHint = options?.find(({
|
|
82
|
-
name
|
|
83
|
-
}) => currentValue === name);
|
|
84
|
-
return /*#__PURE__*/_jsxs(Styled.SelectedExperimentalHintWrapper, {
|
|
85
|
-
children: [currentValue, /*#__PURE__*/_jsx(Styled.SelectedExperimentalHintItem, {
|
|
86
|
-
className: "components-custom-select-control__hint",
|
|
87
|
-
children: currentHint?.__experimentalHint
|
|
88
|
-
})]
|
|
89
|
-
});
|
|
90
|
-
};
|
|
91
|
-
const translatedSize = (() => {
|
|
92
|
-
if (__next40pxDefaultSize && size === 'default' || size === '__unstable-large') {
|
|
93
|
-
return 'default';
|
|
94
|
-
}
|
|
95
|
-
if (!__next40pxDefaultSize && size === 'default') {
|
|
96
|
-
return 'compact';
|
|
97
|
-
}
|
|
98
|
-
return size;
|
|
99
|
-
})();
|
|
100
|
-
return /*#__PURE__*/_jsx(_CustomSelect, {
|
|
101
|
-
"aria-describedby": describedBy,
|
|
102
|
-
renderSelectedValue: __experimentalShowSelectedHint ? renderSelectedValueHint : undefined,
|
|
103
|
-
size: translatedSize,
|
|
104
|
-
store: store,
|
|
105
|
-
...restProps,
|
|
106
|
-
children: children
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
export default CustomSelectControl;
|
|
110
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["Ariakit","_CustomSelect","CustomSelectItem","Styled","jsx","_jsx","jsxs","_jsxs","CustomSelectControl","props","__experimentalShowSelectedHint","__next40pxDefaultSize","describedBy","options","onChange","size","value","restProps","store","useSelectStore","setValue","nextValue","nextOption","find","item","name","Promise","resolve","state","getState","changeObject","highlightedIndex","renderedItems","findIndex","inputValue","isOpen","open","selectedItem","type","defaultValue","children","map","key","__experimentalHint","style","className","withHint","WithHintWrapper","ExperimentalHintItem","renderSelectedValueHint","currentValue","currentHint","SelectedExperimentalHintWrapper","SelectedExperimentalHintItem","translatedSize","renderSelectedValue","undefined"],"sources":["@wordpress/components/src/custom-select-control-v2/legacy-component/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\n// eslint-disable-next-line no-restricted-imports\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * Internal dependencies\n */\nimport _CustomSelect from '../custom-select';\nimport CustomSelectItem from '../item';\nimport type { LegacyCustomSelectProps } from '../types';\nimport * as Styled from '../styles';\n\nfunction CustomSelectControl( props: LegacyCustomSelectProps ) {\n\tconst {\n\t\t__experimentalShowSelectedHint = false,\n\t\t__next40pxDefaultSize = false,\n\t\tdescribedBy,\n\t\toptions,\n\t\tonChange,\n\t\tsize = 'default',\n\t\tvalue,\n\t\t...restProps\n\t} = props;\n\n\t// Forward props + store from v2 implementation\n\tconst store = Ariakit.useSelectStore( {\n\t\tasync setValue( nextValue ) {\n\t\t\tconst nextOption = options.find(\n\t\t\t\t( item ) => item.name === nextValue\n\t\t\t);\n\n\t\t\tif ( ! onChange || ! nextOption ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Executes the logic in a microtask after the popup is closed.\n\t\t\t// This is simply to ensure the isOpen state matches that in Downshift.\n\t\t\tawait Promise.resolve();\n\t\t\tconst state = store.getState();\n\n\t\t\tconst changeObject = {\n\t\t\t\thighlightedIndex: state.renderedItems.findIndex(\n\t\t\t\t\t( item ) => item.value === nextValue\n\t\t\t\t),\n\t\t\t\tinputValue: '',\n\t\t\t\tisOpen: state.open,\n\t\t\t\tselectedItem: nextOption,\n\t\t\t\ttype: '',\n\t\t\t};\n\t\t\tonChange( changeObject );\n\t\t},\n\t\tvalue: value?.name,\n\t\t// Setting the first option as a default value when no value is provided\n\t\t// is already done natively by the underlying Ariakit component,\n\t\t// but doing this explicitly avoids the `onChange` callback from firing\n\t\t// on initial render, thus making this implementation closer to the v1.\n\t\tdefaultValue: options[ 0 ]?.name,\n\t} );\n\n\tconst children = options.map(\n\t\t( { name, key, __experimentalHint, style, className } ) => {\n\t\t\tconst withHint = (\n\t\t\t\t<Styled.WithHintWrapper>\n\t\t\t\t\t<span>{ name }</span>\n\t\t\t\t\t<Styled.ExperimentalHintItem className=\"components-custom-select-control__item-hint\">\n\t\t\t\t\t\t{ __experimentalHint }\n\t\t\t\t\t</Styled.ExperimentalHintItem>\n\t\t\t\t</Styled.WithHintWrapper>\n\t\t\t);\n\n\t\t\treturn (\n\t\t\t\t<CustomSelectItem\n\t\t\t\t\tkey={ key }\n\t\t\t\t\tvalue={ name }\n\t\t\t\t\tchildren={ __experimentalHint ? withHint : name }\n\t\t\t\t\tstyle={ style }\n\t\t\t\t\tclassName={ className }\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\t);\n\n\tconst renderSelectedValueHint = () => {\n\t\tconst { value: currentValue } = store.getState();\n\n\t\tconst currentHint = options?.find(\n\t\t\t( { name } ) => currentValue === name\n\t\t);\n\n\t\treturn (\n\t\t\t<Styled.SelectedExperimentalHintWrapper>\n\t\t\t\t{ currentValue }\n\t\t\t\t<Styled.SelectedExperimentalHintItem className=\"components-custom-select-control__hint\">\n\t\t\t\t\t{ currentHint?.__experimentalHint }\n\t\t\t\t</Styled.SelectedExperimentalHintItem>\n\t\t\t</Styled.SelectedExperimentalHintWrapper>\n\t\t);\n\t};\n\n\tconst translatedSize = ( () => {\n\t\tif (\n\t\t\t( __next40pxDefaultSize && size === 'default' ) ||\n\t\t\tsize === '__unstable-large'\n\t\t) {\n\t\t\treturn 'default';\n\t\t}\n\t\tif ( ! __next40pxDefaultSize && size === 'default' ) {\n\t\t\treturn 'compact';\n\t\t}\n\t\treturn size;\n\t} )();\n\n\treturn (\n\t\t<_CustomSelect\n\t\t\taria-describedby={ describedBy }\n\t\t\trenderSelectedValue={\n\t\t\t\t__experimentalShowSelectedHint\n\t\t\t\t\t? renderSelectedValueHint\n\t\t\t\t\t: undefined\n\t\t\t}\n\t\t\tsize={ translatedSize }\n\t\t\tstore={ store }\n\t\t\t{ ...restProps }\n\t\t>\n\t\t\t{ children }\n\t\t</_CustomSelect>\n\t);\n}\n\nexport default CustomSelectControl;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA,OAAO,KAAKA,OAAO,MAAM,gBAAgB;;AAEzC;AACA;AACA;AACA,OAAOC,aAAa,MAAM,kBAAkB;AAC5C,OAAOC,gBAAgB,MAAM,SAAS;AAEtC,OAAO,KAAKC,MAAM,MAAM,WAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAEpC,SAASC,mBAAmBA,CAAEC,KAA8B,EAAG;EAC9D,MAAM;IACLC,8BAA8B,GAAG,KAAK;IACtCC,qBAAqB,GAAG,KAAK;IAC7BC,WAAW;IACXC,OAAO;IACPC,QAAQ;IACRC,IAAI,GAAG,SAAS;IAChBC,KAAK;IACL,GAAGC;EACJ,CAAC,GAAGR,KAAK;;EAET;EACA,MAAMS,KAAK,GAAGlB,OAAO,CAACmB,cAAc,CAAE;IACrC,MAAMC,QAAQA,CAAEC,SAAS,EAAG;MAC3B,MAAMC,UAAU,GAAGT,OAAO,CAACU,IAAI,CAC5BC,IAAI,IAAMA,IAAI,CAACC,IAAI,KAAKJ,SAC3B,CAAC;MAED,IAAK,CAAEP,QAAQ,IAAI,CAAEQ,UAAU,EAAG;QACjC;MACD;;MAEA;MACA;MACA,MAAMI,OAAO,CAACC,OAAO,CAAC,CAAC;MACvB,MAAMC,KAAK,GAAGV,KAAK,CAACW,QAAQ,CAAC,CAAC;MAE9B,MAAMC,YAAY,GAAG;QACpBC,gBAAgB,EAAEH,KAAK,CAACI,aAAa,CAACC,SAAS,CAC5CT,IAAI,IAAMA,IAAI,CAACR,KAAK,KAAKK,SAC5B,CAAC;QACDa,UAAU,EAAE,EAAE;QACdC,MAAM,EAAEP,KAAK,CAACQ,IAAI;QAClBC,YAAY,EAAEf,UAAU;QACxBgB,IAAI,EAAE;MACP,CAAC;MACDxB,QAAQ,CAAEgB,YAAa,CAAC;IACzB,CAAC;IACDd,KAAK,EAAEA,KAAK,EAAES,IAAI;IAClB;IACA;IACA;IACA;IACAc,YAAY,EAAE1B,OAAO,CAAE,CAAC,CAAE,EAAEY;EAC7B,CAAE,CAAC;EAEH,MAAMe,QAAQ,GAAG3B,OAAO,CAAC4B,GAAG,CAC3B,CAAE;IAAEhB,IAAI;IAAEiB,GAAG;IAAEC,kBAAkB;IAAEC,KAAK;IAAEC;EAAU,CAAC,KAAM;IAC1D,MAAMC,QAAQ,gBACbvC,KAAA,CAACJ,MAAM,CAAC4C,eAAe;MAAAP,QAAA,gBACtBnC,IAAA;QAAAmC,QAAA,EAAQf;MAAI,CAAQ,CAAC,eACrBpB,IAAA,CAACF,MAAM,CAAC6C,oBAAoB;QAACH,SAAS,EAAC,6CAA6C;QAAAL,QAAA,EACjFG;MAAkB,CACQ,CAAC;IAAA,CACP,CACxB;IAED,oBACCtC,IAAA,CAACH,gBAAgB;MAEhBc,KAAK,EAAGS,IAAM;MACde,QAAQ,EAAGG,kBAAkB,GAAGG,QAAQ,GAAGrB,IAAM;MACjDmB,KAAK,EAAGA,KAAO;MACfC,SAAS,EAAGA;IAAW,GAJjBH,GAKN,CAAC;EAEJ,CACD,CAAC;EAED,MAAMO,uBAAuB,GAAGA,CAAA,KAAM;IACrC,MAAM;MAAEjC,KAAK,EAAEkC;IAAa,CAAC,GAAGhC,KAAK,CAACW,QAAQ,CAAC,CAAC;IAEhD,MAAMsB,WAAW,GAAGtC,OAAO,EAAEU,IAAI,CAChC,CAAE;MAAEE;IAAK,CAAC,KAAMyB,YAAY,KAAKzB,IAClC,CAAC;IAED,oBACClB,KAAA,CAACJ,MAAM,CAACiD,+BAA+B;MAAAZ,QAAA,GACpCU,YAAY,eACd7C,IAAA,CAACF,MAAM,CAACkD,4BAA4B;QAACR,SAAS,EAAC,wCAAwC;QAAAL,QAAA,EACpFW,WAAW,EAAER;MAAkB,CACG,CAAC;IAAA,CACC,CAAC;EAE3C,CAAC;EAED,MAAMW,cAAc,GAAG,CAAE,MAAM;IAC9B,IACG3C,qBAAqB,IAAII,IAAI,KAAK,SAAS,IAC7CA,IAAI,KAAK,kBAAkB,EAC1B;MACD,OAAO,SAAS;IACjB;IACA,IAAK,CAAEJ,qBAAqB,IAAII,IAAI,KAAK,SAAS,EAAG;MACpD,OAAO,SAAS;IACjB;IACA,OAAOA,IAAI;EACZ,CAAC,EAAG,CAAC;EAEL,oBACCV,IAAA,CAACJ,aAAa;IACb,oBAAmBW,WAAa;IAChC2C,mBAAmB,EAClB7C,8BAA8B,GAC3BuC,uBAAuB,GACvBO,SACH;IACDzC,IAAI,EAAGuC,cAAgB;IACvBpC,KAAK,EAAGA,KAAO;IAAA,GACVD,SAAS;IAAAuB,QAAA,EAEZA;EAAQ,CACI,CAAC;AAElB;AAEA,eAAehC,mBAAmB","ignoreList":[]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { CustomSelectProps } from '../types';
|
|
3
|
-
import type { WordPressComponentProps } from '../../context';
|
|
4
|
-
declare function CustomSelectControlV2(props: WordPressComponentProps<CustomSelectProps, 'button', false>): import("react").JSX.Element;
|
|
5
|
-
declare namespace CustomSelectControlV2 {
|
|
6
|
-
var Item: typeof import("../item").CustomSelectItem;
|
|
7
|
-
}
|
|
8
|
-
export default CustomSelectControlV2;
|
|
9
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/custom-select-control-v2/default-component/index.tsx"],"names":[],"mappings":";AASA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAG7D,iBAAS,qBAAqB,CAC7B,KAAK,EAAE,uBAAuB,CAAE,iBAAiB,EAAE,QAAQ,EAAE,KAAK,CAAE,+BAWpE;kBAZQ,qBAAqB;;;AAgB9B,eAAe,qBAAqB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/custom-select-control-v2/legacy-component/index.tsx"],"names":[],"mappings":";AAWA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AAGxD,iBAAS,mBAAmB,CAAE,KAAK,EAAE,uBAAuB,+BAmH3D;AAED,eAAe,mBAAmB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/custom-select-control-v2/legacy-component/test/index.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"default.story.d.ts","sourceRoot":"","sources":["../../../src/custom-select-control-v2/stories/default.story.tsx"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,kBAAkB,CAAC;AAOtD;;GAEG;AACH,OAAO,qBAAqB,MAAM,IAAI,CAAC;AAEvC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,qBAAqB,CA8B7C,CAAC;AACF,eAAe,IAAI,CAAC;AAgBpB,eAAO,MAAM,OAAO;;;;;;sPAAsB,CAAC;AAmB3C;;;;GAIG;AACH,eAAO,MAAM,iBAAiB;;;;;;sPAAsB,CAAC;AAoCrD;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;;;;sPAAsB,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import type { Meta } from '@storybook/react';
|
|
5
|
-
/**
|
|
6
|
-
* Internal dependencies
|
|
7
|
-
*/
|
|
8
|
-
import CustomSelectControl from '../legacy-component';
|
|
9
|
-
declare const meta: Meta<typeof CustomSelectControl>;
|
|
10
|
-
export default meta;
|
|
11
|
-
export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("../types").LegacyCustomSelectProps>;
|
|
12
|
-
export declare const WithLongLabels: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("../types").LegacyCustomSelectProps>;
|
|
13
|
-
export declare const WithHints: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react").ReactRenderer, import("../types").LegacyCustomSelectProps>;
|
|
14
|
-
//# sourceMappingURL=legacy.story.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"legacy.story.d.ts","sourceRoot":"","sources":["../../../src/custom-select-control-v2/stories/legacy.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,kBAAkB,CAAC;AAOtD;;GAEG;AACH,OAAO,mBAAmB,MAAM,qBAAqB,CAAC;AAGtD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,mBAAmB,CA0B3C,CAAC;AACF,eAAe,IAAI,CAAC;AAqBpB,eAAO,MAAM,OAAO,mIAAsB,CAAC;AAG3C,eAAO,MAAM,cAAc,mIAAsB,CAAC;AAGlD,eAAO,MAAM,SAAS,mIAAsB,CAAC"}
|
|
@@ -1,240 +0,0 @@
|
|
|
1
|
-
// @ts-nocheck
|
|
2
|
-
/**
|
|
3
|
-
* External dependencies
|
|
4
|
-
*/
|
|
5
|
-
import { useSelect } from 'downshift';
|
|
6
|
-
import clsx from 'clsx';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* WordPress dependencies
|
|
10
|
-
*/
|
|
11
|
-
import { Icon, check } from '@wordpress/icons';
|
|
12
|
-
import { __, sprintf } from '@wordpress/i18n';
|
|
13
|
-
import { useCallback } from '@wordpress/element';
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Internal dependencies
|
|
17
|
-
*/
|
|
18
|
-
import { VisuallyHidden } from '../visually-hidden';
|
|
19
|
-
import { Select as SelectControlSelect } from '../select-control/styles/select-control-styles';
|
|
20
|
-
import SelectControlChevronDown from '../select-control/chevron-down';
|
|
21
|
-
import { StyledLabel } from '../base-control/styles/base-control-styles';
|
|
22
|
-
import { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';
|
|
23
|
-
import InputBase from '../input-control/input-base';
|
|
24
|
-
|
|
25
|
-
const itemToString = ( item ) => item?.name;
|
|
26
|
-
// This is needed so that in Windows, where
|
|
27
|
-
// the menu does not necessarily open on
|
|
28
|
-
// key up/down, you can still switch between
|
|
29
|
-
// options with the menu closed.
|
|
30
|
-
const stateReducer = (
|
|
31
|
-
{ selectedItem },
|
|
32
|
-
{ type, changes, props: { items } }
|
|
33
|
-
) => {
|
|
34
|
-
switch ( type ) {
|
|
35
|
-
case useSelect.stateChangeTypes.ToggleButtonKeyDownArrowDown:
|
|
36
|
-
// If we already have a selected item, try to select the next one,
|
|
37
|
-
// without circular navigation. Otherwise, select the first item.
|
|
38
|
-
return {
|
|
39
|
-
selectedItem:
|
|
40
|
-
items[
|
|
41
|
-
selectedItem
|
|
42
|
-
? Math.min(
|
|
43
|
-
items.indexOf( selectedItem ) + 1,
|
|
44
|
-
items.length - 1
|
|
45
|
-
)
|
|
46
|
-
: 0
|
|
47
|
-
],
|
|
48
|
-
};
|
|
49
|
-
case useSelect.stateChangeTypes.ToggleButtonKeyDownArrowUp:
|
|
50
|
-
// If we already have a selected item, try to select the previous one,
|
|
51
|
-
// without circular navigation. Otherwise, select the last item.
|
|
52
|
-
return {
|
|
53
|
-
selectedItem:
|
|
54
|
-
items[
|
|
55
|
-
selectedItem
|
|
56
|
-
? Math.max( items.indexOf( selectedItem ) - 1, 0 )
|
|
57
|
-
: items.length - 1
|
|
58
|
-
],
|
|
59
|
-
};
|
|
60
|
-
default:
|
|
61
|
-
return changes;
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
export default function CustomSelectControl( props ) {
|
|
66
|
-
const {
|
|
67
|
-
/** Start opting into the larger default height that will become the default size in a future version. */
|
|
68
|
-
__next40pxDefaultSize = false,
|
|
69
|
-
className,
|
|
70
|
-
hideLabelFromVision,
|
|
71
|
-
label,
|
|
72
|
-
describedBy,
|
|
73
|
-
options: items,
|
|
74
|
-
onChange: onSelectedItemChange,
|
|
75
|
-
/** @type {import('../select-control/types').SelectControlProps.size} */
|
|
76
|
-
size = 'default',
|
|
77
|
-
value: _selectedItem,
|
|
78
|
-
onMouseOver,
|
|
79
|
-
onMouseOut,
|
|
80
|
-
onFocus,
|
|
81
|
-
onBlur,
|
|
82
|
-
__experimentalShowSelectedHint = false,
|
|
83
|
-
} = useDeprecated36pxDefaultSizeProp( props );
|
|
84
|
-
|
|
85
|
-
const {
|
|
86
|
-
getLabelProps,
|
|
87
|
-
getToggleButtonProps,
|
|
88
|
-
getMenuProps,
|
|
89
|
-
getItemProps,
|
|
90
|
-
isOpen,
|
|
91
|
-
highlightedIndex,
|
|
92
|
-
selectedItem,
|
|
93
|
-
} = useSelect( {
|
|
94
|
-
initialSelectedItem: items[ 0 ],
|
|
95
|
-
items,
|
|
96
|
-
itemToString,
|
|
97
|
-
onSelectedItemChange,
|
|
98
|
-
...( typeof _selectedItem !== 'undefined' && _selectedItem !== null
|
|
99
|
-
? { selectedItem: _selectedItem }
|
|
100
|
-
: undefined ),
|
|
101
|
-
stateReducer,
|
|
102
|
-
} );
|
|
103
|
-
|
|
104
|
-
function getDescribedBy() {
|
|
105
|
-
if ( describedBy ) {
|
|
106
|
-
return describedBy;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
if ( ! selectedItem ) {
|
|
110
|
-
return __( 'No selection' );
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
// translators: %s: The selected option.
|
|
114
|
-
return sprintf( __( 'Currently selected: %s' ), selectedItem.name );
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
let menuProps = getMenuProps( {
|
|
118
|
-
className: 'components-custom-select-control__menu',
|
|
119
|
-
'aria-hidden': ! isOpen,
|
|
120
|
-
} );
|
|
121
|
-
|
|
122
|
-
const onKeyDownHandler = useCallback(
|
|
123
|
-
( e ) => {
|
|
124
|
-
e.stopPropagation();
|
|
125
|
-
menuProps?.onKeyDown?.( e );
|
|
126
|
-
},
|
|
127
|
-
[ menuProps ]
|
|
128
|
-
);
|
|
129
|
-
|
|
130
|
-
// We need this here, because the null active descendant is not fully ARIA compliant.
|
|
131
|
-
if (
|
|
132
|
-
menuProps[ 'aria-activedescendant' ]?.startsWith( 'downshift-null' )
|
|
133
|
-
) {
|
|
134
|
-
const {
|
|
135
|
-
'aria-activedescendant': ariaActivedescendant,
|
|
136
|
-
...restMenuProps
|
|
137
|
-
} = menuProps;
|
|
138
|
-
menuProps = restMenuProps;
|
|
139
|
-
}
|
|
140
|
-
return (
|
|
141
|
-
<div
|
|
142
|
-
className={ clsx( 'components-custom-select-control', className ) }
|
|
143
|
-
>
|
|
144
|
-
{ hideLabelFromVision ? (
|
|
145
|
-
<VisuallyHidden as="label" { ...getLabelProps() }>
|
|
146
|
-
{ label }
|
|
147
|
-
</VisuallyHidden>
|
|
148
|
-
) : (
|
|
149
|
-
/* eslint-disable-next-line jsx-a11y/label-has-associated-control, jsx-a11y/label-has-for */
|
|
150
|
-
<StyledLabel
|
|
151
|
-
{ ...getLabelProps( {
|
|
152
|
-
className: 'components-custom-select-control__label',
|
|
153
|
-
} ) }
|
|
154
|
-
>
|
|
155
|
-
{ label }
|
|
156
|
-
</StyledLabel>
|
|
157
|
-
) }
|
|
158
|
-
<InputBase
|
|
159
|
-
__next40pxDefaultSize={ __next40pxDefaultSize }
|
|
160
|
-
size={ size }
|
|
161
|
-
suffix={ <SelectControlChevronDown /> }
|
|
162
|
-
>
|
|
163
|
-
<SelectControlSelect
|
|
164
|
-
onMouseOver={ onMouseOver }
|
|
165
|
-
onMouseOut={ onMouseOut }
|
|
166
|
-
as="button"
|
|
167
|
-
onFocus={ onFocus }
|
|
168
|
-
onBlur={ onBlur }
|
|
169
|
-
selectSize={ size }
|
|
170
|
-
__next40pxDefaultSize={ __next40pxDefaultSize }
|
|
171
|
-
{ ...getToggleButtonProps( {
|
|
172
|
-
// This is needed because some speech recognition software don't support `aria-labelledby`.
|
|
173
|
-
'aria-label': label,
|
|
174
|
-
'aria-labelledby': undefined,
|
|
175
|
-
className: 'components-custom-select-control__button',
|
|
176
|
-
describedBy: getDescribedBy(),
|
|
177
|
-
} ) }
|
|
178
|
-
>
|
|
179
|
-
{ itemToString( selectedItem ) }
|
|
180
|
-
{ __experimentalShowSelectedHint &&
|
|
181
|
-
selectedItem.__experimentalHint && (
|
|
182
|
-
<span className="components-custom-select-control__hint">
|
|
183
|
-
{ selectedItem.__experimentalHint }
|
|
184
|
-
</span>
|
|
185
|
-
) }
|
|
186
|
-
</SelectControlSelect>
|
|
187
|
-
<div className="components-custom-select-control__menu-wrapper">
|
|
188
|
-
{ /* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */ }
|
|
189
|
-
<ul { ...menuProps } onKeyDown={ onKeyDownHandler }>
|
|
190
|
-
{ isOpen &&
|
|
191
|
-
items.map( ( item, index ) => (
|
|
192
|
-
<li
|
|
193
|
-
key={ item.key }
|
|
194
|
-
{ ...getItemProps( {
|
|
195
|
-
item,
|
|
196
|
-
index,
|
|
197
|
-
className: clsx(
|
|
198
|
-
item.className,
|
|
199
|
-
'components-custom-select-control__item',
|
|
200
|
-
{
|
|
201
|
-
'is-highlighted':
|
|
202
|
-
index === highlightedIndex,
|
|
203
|
-
'has-hint':
|
|
204
|
-
!! item.__experimentalHint,
|
|
205
|
-
'is-next-40px-default-size':
|
|
206
|
-
__next40pxDefaultSize,
|
|
207
|
-
}
|
|
208
|
-
),
|
|
209
|
-
style: item.style,
|
|
210
|
-
} ) }
|
|
211
|
-
>
|
|
212
|
-
{ item.name }
|
|
213
|
-
{ item.__experimentalHint && (
|
|
214
|
-
<span className="components-custom-select-control__item-hint">
|
|
215
|
-
{ item.__experimentalHint }
|
|
216
|
-
</span>
|
|
217
|
-
) }
|
|
218
|
-
{ item === selectedItem && (
|
|
219
|
-
<Icon
|
|
220
|
-
icon={ check }
|
|
221
|
-
className="components-custom-select-control__item-icon"
|
|
222
|
-
/>
|
|
223
|
-
) }
|
|
224
|
-
</li>
|
|
225
|
-
) ) }
|
|
226
|
-
</ul>
|
|
227
|
-
</div>
|
|
228
|
-
</InputBase>
|
|
229
|
-
</div>
|
|
230
|
-
);
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
export function StableCustomSelectControl( props ) {
|
|
234
|
-
return (
|
|
235
|
-
<CustomSelectControl
|
|
236
|
-
{ ...props }
|
|
237
|
-
__experimentalShowSelectedHint={ false }
|
|
238
|
-
/>
|
|
239
|
-
);
|
|
240
|
-
}
|