@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 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Ariakit","clsx","forwardRef","useEffect","useLayoutEffect","useCallback","useInstanceId","usePrevious","Button","jsx","_jsx","jsxs","_jsxs","extractTabName","id","match","UnforwardedTabPanel","className","children","tabs","selectOnMove","initialTabName","orientation","activeClass","onSelect","ref","instanceId","TabPanel","prependInstanceId","tabName","tabStore","useTabStore","setSelectedId","newTabValue","newTab","find","t","name","disabled","selectedTab","simplifiedTabName","defaultSelectedId","selectedTabName","useState","setTabStoreSelectedId","setState","previousSelectedTabName","initialTab","tab","firstEnabledTab","TabList","store","map","Tab","render","icon","label","title","showTooltip","tabId"],"sources":["@wordpress/components/src/tab-panel/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\n// eslint-disable-next-line no-restricted-imports\nimport * as Ariakit from '@ariakit/react';\nimport clsx from 'clsx';\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tforwardRef,\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseCallback,\n} from '@wordpress/element';\nimport { useInstanceId, usePrevious } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\n\nimport Button from '../button';\nimport type { TabPanelProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\n// Separate the actual tab name from the instance ID. This is\n// necessary because Ariakit internally uses the element ID when\n// a new tab is selected, but our implementation looks specifically\n// for the tab name to be passed to the `onSelect` callback.\nconst extractTabName = ( id: string | undefined | null ) => {\n\tif ( typeof id === 'undefined' || id === null ) {\n\t\treturn;\n\t}\n\treturn id.match( /^tab-panel-[0-9]*-(.*)/ )?.[ 1 ];\n};\n\n/**\n * TabPanel is an ARIA-compliant tabpanel.\n *\n * TabPanels organize content across different screens, data sets, and interactions.\n * It has two sections: a list of tabs, and the view to show when tabs are chosen.\n *\n * ```jsx\n * import { TabPanel } from '@wordpress/components';\n *\n * const onSelect = ( tabName ) => {\n * console.log( 'Selecting tab', tabName );\n * };\n *\n * const MyTabPanel = () => (\n * <TabPanel\n * className=\"my-tab-panel\"\n * activeClass=\"active-tab\"\n * onSelect={ onSelect }\n * tabs={ [\n * {\n * name: 'tab1',\n * title: 'Tab 1',\n * className: 'tab-one',\n * },\n * {\n * name: 'tab2',\n * title: 'Tab 2',\n * className: 'tab-two',\n * },\n * ] }\n * >\n * { ( tab ) => <p>{ tab.title }</p> }\n * </TabPanel>\n * );\n * ```\n */\nconst UnforwardedTabPanel = (\n\t{\n\t\tclassName,\n\t\tchildren,\n\t\ttabs,\n\t\tselectOnMove = true,\n\t\tinitialTabName,\n\t\torientation = 'horizontal',\n\t\tactiveClass = 'is-active',\n\t\tonSelect,\n\t}: WordPressComponentProps< TabPanelProps, 'div', false >,\n\tref: ForwardedRef< any >\n) => {\n\tconst instanceId = useInstanceId( TabPanel, 'tab-panel' );\n\n\tconst prependInstanceId = useCallback(\n\t\t( tabName: string | undefined ) => {\n\t\t\tif ( typeof tabName === 'undefined' ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treturn `${ instanceId }-${ tabName }`;\n\t\t},\n\t\t[ instanceId ]\n\t);\n\n\tconst tabStore = Ariakit.useTabStore( {\n\t\tsetSelectedId: ( newTabValue ) => {\n\t\t\tif ( typeof newTabValue === 'undefined' || newTabValue === null ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst newTab = tabs.find(\n\t\t\t\t( t ) => prependInstanceId( t.name ) === newTabValue\n\t\t\t);\n\t\t\tif ( newTab?.disabled || newTab === selectedTab ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst simplifiedTabName = extractTabName( newTabValue );\n\t\t\tif ( typeof simplifiedTabName === 'undefined' ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tonSelect?.( simplifiedTabName );\n\t\t},\n\t\torientation,\n\t\tselectOnMove,\n\t\tdefaultSelectedId: prependInstanceId( initialTabName ),\n\t} );\n\n\tconst selectedTabName = extractTabName( tabStore.useState( 'selectedId' ) );\n\n\tconst setTabStoreSelectedId = useCallback(\n\t\t( tabName: string ) => {\n\t\t\ttabStore.setState( 'selectedId', prependInstanceId( tabName ) );\n\t\t},\n\t\t[ prependInstanceId, tabStore ]\n\t);\n\n\tconst selectedTab = tabs.find( ( { name } ) => name === selectedTabName );\n\n\tconst previousSelectedTabName = usePrevious( selectedTabName );\n\n\t// Ensure `onSelect` is called when the initial tab is selected.\n\tuseEffect( () => {\n\t\tif (\n\t\t\tpreviousSelectedTabName !== selectedTabName &&\n\t\t\tselectedTabName === initialTabName &&\n\t\t\t!! selectedTabName\n\t\t) {\n\t\t\tonSelect?.( selectedTabName );\n\t\t}\n\t}, [ selectedTabName, initialTabName, onSelect, previousSelectedTabName ] );\n\n\t// Handle selecting the initial tab.\n\tuseLayoutEffect( () => {\n\t\t// If there's a selected tab, don't override it.\n\t\tif ( selectedTab ) {\n\t\t\treturn;\n\t\t}\n\t\tconst initialTab = tabs.find( ( tab ) => tab.name === initialTabName );\n\t\t// Wait for the denoted initial tab to be declared before making a\n\t\t// selection. This ensures that if a tab is declared lazily it can\n\t\t// still receive initial selection.\n\t\tif ( initialTabName && ! initialTab ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( initialTab && ! initialTab.disabled ) {\n\t\t\t// Select the initial tab if it's not disabled.\n\t\t\tsetTabStoreSelectedId( initialTab.name );\n\t\t} else {\n\t\t\t// Fallback to the first enabled tab when the initial tab is\n\t\t\t// disabled or it can't be found.\n\t\t\tconst firstEnabledTab = tabs.find( ( tab ) => ! tab.disabled );\n\t\t\tif ( firstEnabledTab ) {\n\t\t\t\tsetTabStoreSelectedId( firstEnabledTab.name );\n\t\t\t}\n\t\t}\n\t}, [\n\t\ttabs,\n\t\tselectedTab,\n\t\tinitialTabName,\n\t\tinstanceId,\n\t\tsetTabStoreSelectedId,\n\t] );\n\n\t// Handle the currently selected tab becoming disabled.\n\tuseEffect( () => {\n\t\t// This effect only runs when the selected tab is defined and becomes disabled.\n\t\tif ( ! selectedTab?.disabled ) {\n\t\t\treturn;\n\t\t}\n\t\tconst firstEnabledTab = tabs.find( ( tab ) => ! tab.disabled );\n\t\t// If the currently selected tab becomes disabled, select the first enabled tab.\n\t\t// (if there is one).\n\t\tif ( firstEnabledTab ) {\n\t\t\tsetTabStoreSelectedId( firstEnabledTab.name );\n\t\t}\n\t}, [ tabs, selectedTab?.disabled, setTabStoreSelectedId, instanceId ] );\n\treturn (\n\t\t<div className={ className } ref={ ref }>\n\t\t\t<Ariakit.TabList\n\t\t\t\tstore={ tabStore }\n\t\t\t\tclassName=\"components-tab-panel__tabs\"\n\t\t\t>\n\t\t\t\t{ tabs.map( ( tab ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Ariakit.Tab\n\t\t\t\t\t\t\tkey={ tab.name }\n\t\t\t\t\t\t\tid={ prependInstanceId( tab.name ) }\n\t\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t\t'components-tab-panel__tabs-item',\n\t\t\t\t\t\t\t\ttab.className,\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t[ activeClass ]:\n\t\t\t\t\t\t\t\t\t\ttab.name === selectedTabName,\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tdisabled={ tab.disabled }\n\t\t\t\t\t\t\taria-controls={ `${ prependInstanceId(\n\t\t\t\t\t\t\t\ttab.name\n\t\t\t\t\t\t\t) }-view` }\n\t\t\t\t\t\t\trender={\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\ticon={ tab.icon }\n\t\t\t\t\t\t\t\t\tlabel={ tab.icon && tab.title }\n\t\t\t\t\t\t\t\t\tshowTooltip={ !! tab.icon }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ ! tab.icon && tab.title }\n\t\t\t\t\t\t</Ariakit.Tab>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t</Ariakit.TabList>\n\t\t\t{ selectedTab && (\n\t\t\t\t<Ariakit.TabPanel\n\t\t\t\t\tid={ `${ prependInstanceId( selectedTab.name ) }-view` }\n\t\t\t\t\tstore={ tabStore }\n\t\t\t\t\ttabId={ prependInstanceId( selectedTab.name ) }\n\t\t\t\t\tclassName=\"components-tab-panel__tab-content\"\n\t\t\t\t>\n\t\t\t\t\t{ children( selectedTab ) }\n\t\t\t\t</Ariakit.TabPanel>\n\t\t\t) }\n\t\t</div>\n\t);\n};\n\nexport const TabPanel = forwardRef( UnforwardedTabPanel );\nexport default TabPanel;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA,OAAO,KAAKA,OAAO,MAAM,gBAAgB;AACzC,OAAOC,IAAI,MAAM,MAAM;AAGvB;AACA;AACA;AACA,SACCC,UAAU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,GAAG,IAAM;QACtB,oBACCtC,IAAA,CAACV,OAAO,CAACqD,GAAG;UAEXvC,EAAE,EAAGc,iBAAiB,CAAEoB,GAAG,CAACX,IAAK,CAAG;UACpCpB,SAAS,EAAGhB,IAAI,CACf,iCAAiC,EACjC+C,GAAG,CAAC/B,SAAS,EACb;YACC,CAAEM,WAAW,GACZyB,GAAG,CAACX,IAAI,KAAKK;UACf,CACD,CAAG;UACHJ,QAAQ,EAAGU,GAAG,CAACV,QAAU;UACzB,iBAAiB,GAAGV,iBAAiB,CACpCoB,GAAG,CAACX,IACL,CAAG,OAAQ;UACXiB,MAAM,eACL5C,IAAA,CAACF,MAAM;YACN+C,IAAI,EAAGP,GAAG,CAACO,IAAM;YACjBC,KAAK,EAAGR,GAAG,CAACO,IAAI,IAAIP,GAAG,CAACS,KAAO;YAC/BC,WAAW,EAAG,CAAC,CAAEV,GAAG,CAACO;UAAM,CAC3B,CACD;UAAArC,QAAA,EAEC,CAAE8B,GAAG,CAACO,IAAI,IAAIP,GAAG,CAACS;QAAK,GAtBnBT,GAAG,CAACX,IAuBE,CAAC;MAEhB,CAAE;IAAC,CACa,CAAC,EAChBE,WAAW,iBACZ7B,IAAA,CAACV,OAAO,CAAC2B,QAAQ;MAChBb,EAAE,EAAI,GAAGc,iBAAiB,CAAEW,WAAW,CAACF,IAAK,CAAG,OAAQ;MACxDc,KAAK,EAAGrB,QAAU;MAClB6B,KAAK,EAAG/B,iBAAiB,CAAEW,WAAW,CAACF,IAAK,CAAG;MAC/CpB,SAAS,EAAC,mCAAmC;MAAAC,QAAA,EAE3CA,QAAQ,CAAEqB,WAAY;IAAC,CACR,CAClB;EAAA,CACG,CAAC;AAER,CAAC;AAED,OAAO,MAAMZ,QAAQ,GAAGzB,UAAU,CAAEc,mBAAoB,CAAC;AACzD,eAAeW,QAAQ","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["Ariakit","clsx","forwardRef","useEffect","useLayoutEffect","useCallback","useInstanceId","usePrevious","Button","jsx","_jsx","jsxs","_jsxs","extractTabName","id","match","UnforwardedTabPanel","className","children","tabs","selectOnMove","initialTabName","orientation","activeClass","onSelect","ref","instanceId","TabPanel","prependInstanceId","tabName","tabStore","useTabStore","setSelectedId","newTabValue","newTab","find","t","name","disabled","selectedTab","simplifiedTabName","defaultSelectedId","selectedTabName","useState","setTabStoreSelectedId","setState","previousSelectedTabName","initialTab","tab","firstEnabledTab","TabList","store","map","Tab","render","icon","label","title","showTooltip","tabId"],"sources":["@wordpress/components/src/tab-panel/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\nimport clsx from 'clsx';\nimport type { ForwardedRef } from 'react';\n\n/**\n * WordPress dependencies\n */\nimport {\n\tforwardRef,\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseCallback,\n} from '@wordpress/element';\nimport { useInstanceId, usePrevious } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\n\nimport Button from '../button';\nimport type { TabPanelProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\n// Separate the actual tab name from the instance ID. This is\n// necessary because Ariakit internally uses the element ID when\n// a new tab is selected, but our implementation looks specifically\n// for the tab name to be passed to the `onSelect` callback.\nconst extractTabName = ( id: string | undefined | null ) => {\n\tif ( typeof id === 'undefined' || id === null ) {\n\t\treturn;\n\t}\n\treturn id.match( /^tab-panel-[0-9]*-(.*)/ )?.[ 1 ];\n};\n\n/**\n * TabPanel is an ARIA-compliant tabpanel.\n *\n * TabPanels organize content across different screens, data sets, and interactions.\n * It has two sections: a list of tabs, and the view to show when tabs are chosen.\n *\n * ```jsx\n * import { TabPanel } from '@wordpress/components';\n *\n * const onSelect = ( tabName ) => {\n * console.log( 'Selecting tab', tabName );\n * };\n *\n * const MyTabPanel = () => (\n * <TabPanel\n * className=\"my-tab-panel\"\n * activeClass=\"active-tab\"\n * onSelect={ onSelect }\n * tabs={ [\n * {\n * name: 'tab1',\n * title: 'Tab 1',\n * className: 'tab-one',\n * },\n * {\n * name: 'tab2',\n * title: 'Tab 2',\n * className: 'tab-two',\n * },\n * ] }\n * >\n * { ( tab ) => <p>{ tab.title }</p> }\n * </TabPanel>\n * );\n * ```\n */\nconst UnforwardedTabPanel = (\n\t{\n\t\tclassName,\n\t\tchildren,\n\t\ttabs,\n\t\tselectOnMove = true,\n\t\tinitialTabName,\n\t\torientation = 'horizontal',\n\t\tactiveClass = 'is-active',\n\t\tonSelect,\n\t}: WordPressComponentProps< TabPanelProps, 'div', false >,\n\tref: ForwardedRef< any >\n) => {\n\tconst instanceId = useInstanceId( TabPanel, 'tab-panel' );\n\n\tconst prependInstanceId = useCallback(\n\t\t( tabName: string | undefined ) => {\n\t\t\tif ( typeof tabName === 'undefined' ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\treturn `${ instanceId }-${ tabName }`;\n\t\t},\n\t\t[ instanceId ]\n\t);\n\n\tconst tabStore = Ariakit.useTabStore( {\n\t\tsetSelectedId: ( newTabValue ) => {\n\t\t\tif ( typeof newTabValue === 'undefined' || newTabValue === null ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst newTab = tabs.find(\n\t\t\t\t( t ) => prependInstanceId( t.name ) === newTabValue\n\t\t\t);\n\t\t\tif ( newTab?.disabled || newTab === selectedTab ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst simplifiedTabName = extractTabName( newTabValue );\n\t\t\tif ( typeof simplifiedTabName === 'undefined' ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tonSelect?.( simplifiedTabName );\n\t\t},\n\t\torientation,\n\t\tselectOnMove,\n\t\tdefaultSelectedId: prependInstanceId( initialTabName ),\n\t} );\n\n\tconst selectedTabName = extractTabName( tabStore.useState( 'selectedId' ) );\n\n\tconst setTabStoreSelectedId = useCallback(\n\t\t( tabName: string ) => {\n\t\t\ttabStore.setState( 'selectedId', prependInstanceId( tabName ) );\n\t\t},\n\t\t[ prependInstanceId, tabStore ]\n\t);\n\n\tconst selectedTab = tabs.find( ( { name } ) => name === selectedTabName );\n\n\tconst previousSelectedTabName = usePrevious( selectedTabName );\n\n\t// Ensure `onSelect` is called when the initial tab is selected.\n\tuseEffect( () => {\n\t\tif (\n\t\t\tpreviousSelectedTabName !== selectedTabName &&\n\t\t\tselectedTabName === initialTabName &&\n\t\t\t!! selectedTabName\n\t\t) {\n\t\t\tonSelect?.( selectedTabName );\n\t\t}\n\t}, [ selectedTabName, initialTabName, onSelect, previousSelectedTabName ] );\n\n\t// Handle selecting the initial tab.\n\tuseLayoutEffect( () => {\n\t\t// If there's a selected tab, don't override it.\n\t\tif ( selectedTab ) {\n\t\t\treturn;\n\t\t}\n\t\tconst initialTab = tabs.find( ( tab ) => tab.name === initialTabName );\n\t\t// Wait for the denoted initial tab to be declared before making a\n\t\t// selection. This ensures that if a tab is declared lazily it can\n\t\t// still receive initial selection.\n\t\tif ( initialTabName && ! initialTab ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( initialTab && ! initialTab.disabled ) {\n\t\t\t// Select the initial tab if it's not disabled.\n\t\t\tsetTabStoreSelectedId( initialTab.name );\n\t\t} else {\n\t\t\t// Fallback to the first enabled tab when the initial tab is\n\t\t\t// disabled or it can't be found.\n\t\t\tconst firstEnabledTab = tabs.find( ( tab ) => ! tab.disabled );\n\t\t\tif ( firstEnabledTab ) {\n\t\t\t\tsetTabStoreSelectedId( firstEnabledTab.name );\n\t\t\t}\n\t\t}\n\t}, [\n\t\ttabs,\n\t\tselectedTab,\n\t\tinitialTabName,\n\t\tinstanceId,\n\t\tsetTabStoreSelectedId,\n\t] );\n\n\t// Handle the currently selected tab becoming disabled.\n\tuseEffect( () => {\n\t\t// This effect only runs when the selected tab is defined and becomes disabled.\n\t\tif ( ! selectedTab?.disabled ) {\n\t\t\treturn;\n\t\t}\n\t\tconst firstEnabledTab = tabs.find( ( tab ) => ! tab.disabled );\n\t\t// If the currently selected tab becomes disabled, select the first enabled tab.\n\t\t// (if there is one).\n\t\tif ( firstEnabledTab ) {\n\t\t\tsetTabStoreSelectedId( firstEnabledTab.name );\n\t\t}\n\t}, [ tabs, selectedTab?.disabled, setTabStoreSelectedId, instanceId ] );\n\treturn (\n\t\t<div className={ className } ref={ ref }>\n\t\t\t<Ariakit.TabList\n\t\t\t\tstore={ tabStore }\n\t\t\t\tclassName=\"components-tab-panel__tabs\"\n\t\t\t>\n\t\t\t\t{ tabs.map( ( tab ) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Ariakit.Tab\n\t\t\t\t\t\t\tkey={ tab.name }\n\t\t\t\t\t\t\tid={ prependInstanceId( tab.name ) }\n\t\t\t\t\t\t\tclassName={ clsx(\n\t\t\t\t\t\t\t\t'components-tab-panel__tabs-item',\n\t\t\t\t\t\t\t\ttab.className,\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t[ activeClass ]:\n\t\t\t\t\t\t\t\t\t\ttab.name === selectedTabName,\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tdisabled={ tab.disabled }\n\t\t\t\t\t\t\taria-controls={ `${ prependInstanceId(\n\t\t\t\t\t\t\t\ttab.name\n\t\t\t\t\t\t\t) }-view` }\n\t\t\t\t\t\t\trender={\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\ticon={ tab.icon }\n\t\t\t\t\t\t\t\t\tlabel={ tab.icon && tab.title }\n\t\t\t\t\t\t\t\t\tshowTooltip={ !! tab.icon }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{ ! tab.icon && tab.title }\n\t\t\t\t\t\t</Ariakit.Tab>\n\t\t\t\t\t);\n\t\t\t\t} ) }\n\t\t\t</Ariakit.TabList>\n\t\t\t{ selectedTab && (\n\t\t\t\t<Ariakit.TabPanel\n\t\t\t\t\tid={ `${ prependInstanceId( selectedTab.name ) }-view` }\n\t\t\t\t\tstore={ tabStore }\n\t\t\t\t\ttabId={ prependInstanceId( selectedTab.name ) }\n\t\t\t\t\tclassName=\"components-tab-panel__tab-content\"\n\t\t\t\t>\n\t\t\t\t\t{ children( selectedTab ) }\n\t\t\t\t</Ariakit.TabPanel>\n\t\t\t) }\n\t\t</div>\n\t);\n};\n\nexport const TabPanel = forwardRef( UnforwardedTabPanel );\nexport default TabPanel;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAO,KAAKA,OAAO,MAAM,gBAAgB;AACzC,OAAOC,IAAI,MAAM,MAAM;AAGvB;AACA;AACA;AACA,SACCC,UAAU,EACVC,SAAS,EACTC,eAAe,EACfC,WAAW,QACL,oBAAoB;AAC3B,SAASC,aAAa,EAAEC,WAAW,QAAQ,oBAAoB;;AAE/D;AACA;AACA;;AAEA,OAAOC,MAAM,MAAM,WAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAI/B;AACA;AACA;AACA;AACA,MAAMC,cAAc,GAAKC,EAA6B,IAAM;EAC3D,IAAK,OAAOA,EAAE,KAAK,WAAW,IAAIA,EAAE,KAAK,IAAI,EAAG;IAC/C;EACD;EACA,OAAOA,EAAE,CAACC,KAAK,CAAE,wBAAyB,CAAC,GAAI,CAAC,CAAE;AACnD,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,mBAAmB,GAAGA,CAC3B;EACCC,SAAS;EACTC,QAAQ;EACRC,IAAI;EACJC,YAAY,GAAG,IAAI;EACnBC,cAAc;EACdC,WAAW,GAAG,YAAY;EAC1BC,WAAW,GAAG,WAAW;EACzBC;AACuD,CAAC,EACzDC,GAAwB,KACpB;EACJ,MAAMC,UAAU,GAAGpB,aAAa,CAAEqB,QAAQ,EAAE,WAAY,CAAC;EAEzD,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EAAG/B,iBAAiB,CAAEW,WAAW,CAACF,IAAK,CAAG;MAC/CpB,SAAS,EAAC,mCAAmC;MAAAC,QAAA,EAE3CA,QAAQ,CAAEqB,WAAY;IAAC,CACR,CAClB;EAAA,CACG,CAAC;AAER,CAAC;AAED,OAAO,MAAMZ,QAAQ,GAAGzB,UAAU,CAAEc,mBAAoB,CAAC;AACzD,eAAeW,QAAQ","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Ariakit","useInstanceId","useEffect","useLayoutEffect","useMemo","useRef","TabsContext","Tab","TabList","TabPanel","jsx","_jsx","Tabs","selectOnMove","defaultTabId","orientation","onSelect","children","selectedTabId","instanceId","store","useTabStore","defaultSelectedId","setSelectedId","selectedId","strippedDownId","replace","isControlled","undefined","items","activeId","useState","setActiveId","tabsHavePopulated","length","current","selectedTab","find","item","id","firstEnabledTab","dimmed","initialTab","requestAnimationFrame","focusedElement","element","ownerDocument","activeElement","some","contextValue","Provider","value","Context"],"sources":["@wordpress/components/src/tabs/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\n// eslint-disable-next-line no-restricted-imports\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport {\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseMemo,\n\tuseRef,\n} from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { TabsProps } from './types';\nimport { TabsContext } from './context';\nimport { Tab } from './tab';\nimport { TabList } from './tablist';\nimport { TabPanel } from './tabpanel';\n\nfunction Tabs( {\n\tselectOnMove = true,\n\tdefaultTabId,\n\torientation = 'horizontal',\n\tonSelect,\n\tchildren,\n\tselectedTabId,\n}: TabsProps ) {\n\tconst instanceId = useInstanceId( Tabs, 'tabs' );\n\tconst store = Ariakit.useTabStore( {\n\t\tselectOnMove,\n\t\torientation,\n\t\tdefaultSelectedId: defaultTabId && `${ instanceId }-${ defaultTabId }`,\n\t\tsetSelectedId: ( selectedId ) => {\n\t\t\tconst strippedDownId =\n\t\t\t\ttypeof selectedId === 'string'\n\t\t\t\t\t? selectedId.replace( `${ instanceId }-`, '' )\n\t\t\t\t\t: selectedId;\n\t\t\tonSelect?.( strippedDownId );\n\t\t},\n\t\tselectedId: selectedTabId && `${ instanceId }-${ selectedTabId }`,\n\t} );\n\n\tconst isControlled = selectedTabId !== undefined;\n\n\tconst { items, selectedId, activeId } = store.useState();\n\tconst { setSelectedId, setActiveId } = store;\n\n\t// Keep track of whether tabs have been populated. This is used to prevent\n\t// certain effects from firing too early while tab data and relevant\n\t// variables are undefined during the initial render.\n\tconst tabsHavePopulated = useRef( false );\n\tif ( items.length > 0 ) {\n\t\ttabsHavePopulated.current = true;\n\t}\n\n\tconst selectedTab = items.find( ( item ) => item.id === selectedId );\n\tconst firstEnabledTab = items.find( ( item ) => {\n\t\t// Ariakit internally refers to disabled tabs as `dimmed`.\n\t\treturn ! item.dimmed;\n\t} );\n\tconst initialTab = items.find(\n\t\t( item ) => item.id === `${ instanceId }-${ defaultTabId }`\n\t);\n\n\t// Handle selecting the initial tab.\n\tuseLayoutEffect( () => {\n\t\tif ( isControlled ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Wait for the denoted initial tab to be declared before making a\n\t\t// selection. This ensures that if a tab is declared lazily it can\n\t\t// still receive initial selection, as well as ensuring no tab is\n\t\t// selected if an invalid `defaultTabId` is provided.\n\t\tif ( defaultTabId && ! initialTab ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If the currently selected tab is missing (i.e. removed from the DOM),\n\t\t// fall back to the initial tab or the first enabled tab if there is\n\t\t// one. Otherwise, no tab should be selected.\n\t\tif ( ! items.find( ( item ) => item.id === selectedId ) ) {\n\t\t\tif ( initialTab && ! initialTab.dimmed ) {\n\t\t\t\tsetSelectedId( initialTab?.id );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( firstEnabledTab ) {\n\t\t\t\tsetSelectedId( firstEnabledTab.id );\n\t\t\t} else if ( tabsHavePopulated.current ) {\n\t\t\t\tsetSelectedId( null );\n\t\t\t}\n\t\t}\n\t}, [\n\t\tfirstEnabledTab,\n\t\tinitialTab,\n\t\tdefaultTabId,\n\t\tisControlled,\n\t\titems,\n\t\tselectedId,\n\t\tsetSelectedId,\n\t] );\n\n\t// Handle the currently selected tab becoming disabled.\n\tuseLayoutEffect( () => {\n\t\tif ( ! selectedTab?.dimmed ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// In controlled mode, we trust that disabling tabs is done\n\t\t// intentionally, and don't select a new tab automatically.\n\t\tif ( isControlled ) {\n\t\t\tsetSelectedId( null );\n\t\t\treturn;\n\t\t}\n\n\t\t// If the currently selected tab becomes disabled, fall back to the\n\t\t// `defaultTabId` if possible. Otherwise select the first\n\t\t// enabled tab (if there is one).\n\t\tif ( initialTab && ! initialTab.dimmed ) {\n\t\t\tsetSelectedId( initialTab.id );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( firstEnabledTab ) {\n\t\t\tsetSelectedId( firstEnabledTab.id );\n\t\t}\n\t}, [\n\t\tfirstEnabledTab,\n\t\tinitialTab,\n\t\tisControlled,\n\t\tselectedTab?.dimmed,\n\t\tsetSelectedId,\n\t] );\n\n\t// Clear `selectedId` if the active tab is removed from the DOM in controlled mode.\n\tuseLayoutEffect( () => {\n\t\tif ( ! isControlled ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Once the tabs have populated, if the `selectedTabId` still can't be\n\t\t// found, clear the selection.\n\t\tif ( tabsHavePopulated.current && !! selectedTabId && ! selectedTab ) {\n\t\t\tsetSelectedId( null );\n\t\t}\n\t}, [ isControlled, selectedTab, selectedTabId, setSelectedId ] );\n\n\tuseEffect( () => {\n\t\t// If there is no active tab, fallback to place focus on the first enabled tab\n\t\t// so there is always an active element\n\t\tif ( selectedTabId === null && ! activeId && firstEnabledTab?.id ) {\n\t\t\tsetActiveId( firstEnabledTab.id );\n\t\t}\n\t}, [ selectedTabId, activeId, firstEnabledTab?.id, setActiveId ] );\n\n\tuseEffect( () => {\n\t\tif ( ! isControlled ) {\n\t\t\treturn;\n\t\t}\n\n\t\trequestAnimationFrame( () => {\n\t\t\tconst focusedElement =\n\t\t\t\titems?.[ 0 ]?.element?.ownerDocument.activeElement;\n\n\t\t\tif (\n\t\t\t\t! focusedElement ||\n\t\t\t\t! items.some( ( item ) => focusedElement === item.element )\n\t\t\t) {\n\t\t\t\treturn; // Return early if no tabs are focused.\n\t\t\t}\n\n\t\t\t// If, after ariakit re-computes the active tab, that tab doesn't match\n\t\t\t// the currently focused tab, then we force an update to ariakit to avoid\n\t\t\t// any mismatches, especially when navigating to previous/next tab with\n\t\t\t// arrow keys.\n\t\t\tif ( activeId !== focusedElement.id ) {\n\t\t\t\tsetActiveId( focusedElement.id );\n\t\t\t}\n\t\t} );\n\t}, [ activeId, isControlled, items, setActiveId ] );\n\n\tconst contextValue = useMemo(\n\t\t() => ( {\n\t\t\tstore,\n\t\t\tinstanceId,\n\t\t} ),\n\t\t[ store, instanceId ]\n\t);\n\n\treturn (\n\t\t<TabsContext.Provider value={ contextValue }>\n\t\t\t{ children }\n\t\t</TabsContext.Provider>\n\t);\n}\n\nTabs.TabList = TabList;\nTabs.Tab = Tab;\nTabs.TabPanel = TabPanel;\nTabs.Context = TabsContext;\n\nexport default Tabs;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA,OAAO,KAAKA,OAAO,MAAM,gBAAgB;;AAEzC;AACA;AACA;AACA,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SACCC,SAAS,EACTC,eAAe,EACfC,OAAO,EACPC,MAAM,QACA,oBAAoB;;AAE3B;AACA;AACA;;AAEA,SAASC,WAAW,QAAQ,WAAW;AACvC,SAASC,GAAG,QAAQ,OAAO;AAC3B,SAASC,OAAO,QAAQ,WAAW;AACnC,SAASC,QAAQ,QAAQ,YAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEtC,SAASC,IAAIA,CAAE;EACdC,YAAY,GAAG,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CACpB,CAAC;EAED,oBACCR,IAAA,CAACL,WAAW,CAAC4C,QAAQ;IAACC,KAAK,EAAGF,YAAc;IAAAhC,QAAA,EACzCA;EAAQ,CACW,CAAC;AAEzB;AAEAL,IAAI,CAACJ,OAAO,GAAGA,OAAO;AACtBI,IAAI,CAACL,GAAG,GAAGA,GAAG;AACdK,IAAI,CAACH,QAAQ,GAAGA,QAAQ;AACxBG,IAAI,CAACwC,OAAO,GAAG9C,WAAW;AAE1B,eAAeM,IAAI","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["Ariakit","useInstanceId","useEffect","useLayoutEffect","useMemo","useRef","TabsContext","Tab","TabList","TabPanel","jsx","_jsx","Tabs","selectOnMove","defaultTabId","orientation","onSelect","children","selectedTabId","instanceId","store","useTabStore","defaultSelectedId","setSelectedId","selectedId","strippedDownId","replace","isControlled","undefined","items","activeId","useState","setActiveId","tabsHavePopulated","length","current","selectedTab","find","item","id","firstEnabledTab","dimmed","initialTab","requestAnimationFrame","focusedElement","element","ownerDocument","activeElement","some","contextValue","Provider","value","Context"],"sources":["@wordpress/components/src/tabs/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport {\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseMemo,\n\tuseRef,\n} from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { TabsProps } from './types';\nimport { TabsContext } from './context';\nimport { Tab } from './tab';\nimport { TabList } from './tablist';\nimport { TabPanel } from './tabpanel';\n\nfunction Tabs( {\n\tselectOnMove = true,\n\tdefaultTabId,\n\torientation = 'horizontal',\n\tonSelect,\n\tchildren,\n\tselectedTabId,\n}: TabsProps ) {\n\tconst instanceId = useInstanceId( Tabs, 'tabs' );\n\tconst store = Ariakit.useTabStore( {\n\t\tselectOnMove,\n\t\torientation,\n\t\tdefaultSelectedId: defaultTabId && `${ instanceId }-${ defaultTabId }`,\n\t\tsetSelectedId: ( selectedId ) => {\n\t\t\tconst strippedDownId =\n\t\t\t\ttypeof selectedId === 'string'\n\t\t\t\t\t? selectedId.replace( `${ instanceId }-`, '' )\n\t\t\t\t\t: selectedId;\n\t\t\tonSelect?.( strippedDownId );\n\t\t},\n\t\tselectedId: selectedTabId && `${ instanceId }-${ selectedTabId }`,\n\t} );\n\n\tconst isControlled = selectedTabId !== undefined;\n\n\tconst { items, selectedId, activeId } = store.useState();\n\tconst { setSelectedId, setActiveId } = store;\n\n\t// Keep track of whether tabs have been populated. This is used to prevent\n\t// certain effects from firing too early while tab data and relevant\n\t// variables are undefined during the initial render.\n\tconst tabsHavePopulated = useRef( false );\n\tif ( items.length > 0 ) {\n\t\ttabsHavePopulated.current = true;\n\t}\n\n\tconst selectedTab = items.find( ( item ) => item.id === selectedId );\n\tconst firstEnabledTab = items.find( ( item ) => {\n\t\t// Ariakit internally refers to disabled tabs as `dimmed`.\n\t\treturn ! item.dimmed;\n\t} );\n\tconst initialTab = items.find(\n\t\t( item ) => item.id === `${ instanceId }-${ defaultTabId }`\n\t);\n\n\t// Handle selecting the initial tab.\n\tuseLayoutEffect( () => {\n\t\tif ( isControlled ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Wait for the denoted initial tab to be declared before making a\n\t\t// selection. This ensures that if a tab is declared lazily it can\n\t\t// still receive initial selection, as well as ensuring no tab is\n\t\t// selected if an invalid `defaultTabId` is provided.\n\t\tif ( defaultTabId && ! initialTab ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// If the currently selected tab is missing (i.e. removed from the DOM),\n\t\t// fall back to the initial tab or the first enabled tab if there is\n\t\t// one. Otherwise, no tab should be selected.\n\t\tif ( ! items.find( ( item ) => item.id === selectedId ) ) {\n\t\t\tif ( initialTab && ! initialTab.dimmed ) {\n\t\t\t\tsetSelectedId( initialTab?.id );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( firstEnabledTab ) {\n\t\t\t\tsetSelectedId( firstEnabledTab.id );\n\t\t\t} else if ( tabsHavePopulated.current ) {\n\t\t\t\tsetSelectedId( null );\n\t\t\t}\n\t\t}\n\t}, [\n\t\tfirstEnabledTab,\n\t\tinitialTab,\n\t\tdefaultTabId,\n\t\tisControlled,\n\t\titems,\n\t\tselectedId,\n\t\tsetSelectedId,\n\t] );\n\n\t// Handle the currently selected tab becoming disabled.\n\tuseLayoutEffect( () => {\n\t\tif ( ! selectedTab?.dimmed ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// In controlled mode, we trust that disabling tabs is done\n\t\t// intentionally, and don't select a new tab automatically.\n\t\tif ( isControlled ) {\n\t\t\tsetSelectedId( null );\n\t\t\treturn;\n\t\t}\n\n\t\t// If the currently selected tab becomes disabled, fall back to the\n\t\t// `defaultTabId` if possible. Otherwise select the first\n\t\t// enabled tab (if there is one).\n\t\tif ( initialTab && ! initialTab.dimmed ) {\n\t\t\tsetSelectedId( initialTab.id );\n\t\t\treturn;\n\t\t}\n\n\t\tif ( firstEnabledTab ) {\n\t\t\tsetSelectedId( firstEnabledTab.id );\n\t\t}\n\t}, [\n\t\tfirstEnabledTab,\n\t\tinitialTab,\n\t\tisControlled,\n\t\tselectedTab?.dimmed,\n\t\tsetSelectedId,\n\t] );\n\n\t// Clear `selectedId` if the active tab is removed from the DOM in controlled mode.\n\tuseLayoutEffect( () => {\n\t\tif ( ! isControlled ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Once the tabs have populated, if the `selectedTabId` still can't be\n\t\t// found, clear the selection.\n\t\tif ( tabsHavePopulated.current && !! selectedTabId && ! selectedTab ) {\n\t\t\tsetSelectedId( null );\n\t\t}\n\t}, [ isControlled, selectedTab, selectedTabId, setSelectedId ] );\n\n\tuseEffect( () => {\n\t\t// If there is no active tab, fallback to place focus on the first enabled tab\n\t\t// so there is always an active element\n\t\tif ( selectedTabId === null && ! activeId && firstEnabledTab?.id ) {\n\t\t\tsetActiveId( firstEnabledTab.id );\n\t\t}\n\t}, [ selectedTabId, activeId, firstEnabledTab?.id, setActiveId ] );\n\n\tuseEffect( () => {\n\t\tif ( ! isControlled ) {\n\t\t\treturn;\n\t\t}\n\n\t\trequestAnimationFrame( () => {\n\t\t\tconst focusedElement =\n\t\t\t\titems?.[ 0 ]?.element?.ownerDocument.activeElement;\n\n\t\t\tif (\n\t\t\t\t! focusedElement ||\n\t\t\t\t! items.some( ( item ) => focusedElement === item.element )\n\t\t\t) {\n\t\t\t\treturn; // Return early if no tabs are focused.\n\t\t\t}\n\n\t\t\t// If, after ariakit re-computes the active tab, that tab doesn't match\n\t\t\t// the currently focused tab, then we force an update to ariakit to avoid\n\t\t\t// any mismatches, especially when navigating to previous/next tab with\n\t\t\t// arrow keys.\n\t\t\tif ( activeId !== focusedElement.id ) {\n\t\t\t\tsetActiveId( focusedElement.id );\n\t\t\t}\n\t\t} );\n\t}, [ activeId, isControlled, items, setActiveId ] );\n\n\tconst contextValue = useMemo(\n\t\t() => ( {\n\t\t\tstore,\n\t\t\tinstanceId,\n\t\t} ),\n\t\t[ store, instanceId ]\n\t);\n\n\treturn (\n\t\t<TabsContext.Provider value={ contextValue }>\n\t\t\t{ children }\n\t\t</TabsContext.Provider>\n\t);\n}\n\nTabs.TabList = TabList;\nTabs.Tab = Tab;\nTabs.TabPanel = TabPanel;\nTabs.Context = TabsContext;\n\nexport default Tabs;\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAO,KAAKA,OAAO,MAAM,gBAAgB;;AAEzC;AACA;AACA;AACA,SAASC,aAAa,QAAQ,oBAAoB;AAClD,SACCC,SAAS,EACTC,eAAe,EACfC,OAAO,EACPC,MAAM,QACA,oBAAoB;;AAE3B;AACA;AACA;;AAEA,SAASC,WAAW,QAAQ,WAAW;AACvC,SAASC,GAAG,QAAQ,OAAO;AAC3B,SAASC,OAAO,QAAQ,WAAW;AACnC,SAASC,QAAQ,QAAQ,YAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEtC,SAASC,IAAIA,CAAE;EACdC,YAA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ED,UAAU,CACpB,CAAC;EAED,oBACCR,IAAA,CAACL,WAAW,CAAC4C,QAAQ;IAACC,KAAK,EAAGF,YAAc;IAAAhC,QAAA,EACzCA;EAAQ,CACW,CAAC;AAEzB;AAEAL,IAAI,CAACJ,OAAO,GAAGA,OAAO;AACtBI,IAAI,CAACL,GAAG,GAAGA,GAAG;AACdK,IAAI,CAACH,QAAQ,GAAGA,QAAQ;AACxBG,IAAI,CAACwC,OAAO,GAAG9C,WAAW;AAE1B,eAAeM,IAAI","ignoreList":[]}
|
|
@@ -3,7 +3,6 @@ import _styled from "@emotion/styled/base";
|
|
|
3
3
|
* External dependencies
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
// eslint-disable-next-line no-restricted-imports
|
|
7
6
|
import * as Ariakit from '@ariakit/react';
|
|
8
7
|
|
|
9
8
|
/**
|
|
@@ -16,17 +15,17 @@ export const TabListWrapper = /*#__PURE__*/_styled("div", process.env.NODE_ENV =
|
|
|
16
15
|
} : {
|
|
17
16
|
target: "enfox0g2",
|
|
18
17
|
label: "TabListWrapper"
|
|
19
|
-
})("position:relative;display:flex;align-items:stretch;flex-direction:row;&[aria-orientation='vertical']{flex-direction:column;}@media not ( prefers-reduced-motion: reduce ){&.is-animation-enabled::after{transition-property:left,top,width,height;transition-duration:0.2s;transition-timing-function:ease-out;}}&::after{content:'';position:absolute;pointer-events:none;outline:2px solid transparent;outline-offset:-1px;}&:not( [aria-orientation='vertical'] )::after{left:var( --indicator-left );
|
|
18
|
+
})("position:relative;display:flex;align-items:stretch;flex-direction:row;text-align:center;&[aria-orientation='vertical']{flex-direction:column;text-align:start;}@media not ( prefers-reduced-motion: reduce ){&.is-animation-enabled::after{transition-property:left,top,width,height;transition-duration:0.2s;transition-timing-function:ease-out;}}&::after{content:'';position:absolute;pointer-events:none;outline:2px solid transparent;outline-offset:-1px;}&:not( [aria-orientation='vertical'] )::after{bottom:0;left:var( --indicator-left );width:var( --indicator-width );height:0;border-bottom:var( --wp-admin-border-width-focus ) solid ", COLORS.theme.accent, ";}&[aria-orientation='vertical']::after{z-index:-1;left:0;width:100%;top:var( --indicator-top );height:var( --indicator-height );background-color:", COLORS.theme.gray[100], ";}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvdGFicy9zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBWXdDIiwiZmlsZSI6IkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvdGFicy9zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgKiBhcyBBcmlha2l0IGZyb20gJ0Bhcmlha2l0L3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHsgQ09MT1JTIH0gZnJvbSAnLi4vdXRpbHMnO1xuaW1wb3J0IHsgc3BhY2UgfSBmcm9tICcuLi91dGlscy9zcGFjZSc7XG5cbmV4cG9ydCBjb25zdCBUYWJMaXN0V3JhcHBlciA9IHN0eWxlZC5kaXZgXG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IHN0cmV0Y2g7XG5cdGZsZXgtZGlyZWN0aW9uOiByb3c7XG5cdHRleHQtYWxpZ246IGNlbnRlcjtcblxuXHQmW2FyaWEtb3JpZW50YXRpb249J3ZlcnRpY2FsJ10ge1xuXHRcdGZsZXgtZGlyZWN0aW9uOiBjb2x1bW47XG5cdFx0dGV4dC1hbGlnbjogc3RhcnQ7XG5cdH1cblxuXHRAbWVkaWEgbm90ICggcHJlZmVycy1yZWR1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xpbmVhcjtcblx0XHRcdH1cblx0XHR9XG5cblx0XHQmOmZvY3VzLXZpc2libGU6OmJlZm9yZSB7XG5cdFx0XHRvcGFjaXR5OiAxO1xuXHRcdH1cblx0fVxuXG5cdFthcmlhLW9yaWVudGF0aW9uPSd2ZXJ0aWNhbCddICYge1xuXHRcdG1pbi1oZWlnaHQ6ICR7IHNwYWNlKFxuXHRcdFx0MTBcblx0XHQpIH07IC8vIEF2b2lkIGZpeGVkIGhlaWdodCB0byBhbGxvdyBmb3IgbG9uZyBzdHJpbmdzIHRoYXQgZ28gaW4gbXVsdGlwbGUgbGluZXMuXG5cdH1cbmA7XG5cbmV4cG9ydCBjb25zdCBUYWJQYW5lbCA9IHN0eWxlZCggQXJpYWtpdC5UYWJQYW5lbCApYFxuXHQmOmZvY3VzIHtcblx0XHRib3gtc2hhZG93OiBub25lO1xuXHRcdG91dGxpbmU6IG5vbmU7XG5cdH1cblxuXHQmOmZvY3VzLXZpc2libGUge1xuXHRcdGJvcmRlci1yYWRpdXM6IDJweDtcblx0XHRib3gtc2hhZG93OiAwIDAgMCB2YXIoIC0td3AtYWRtaW4tYm9yZGVyLXdpZHRoLWZvY3VzIClcblx0XHRcdCR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblx0XHQvLyBXaW5kb3dzIGhpZ2ggY29udHJhc3QgbW9kZS5cblx0XHRvdXRsaW5lOiAycHggc29saWQgdHJhbnNwYXJlbnQ7XG5cdFx0b3V0bGluZS1vZmZzZXQ6IDA7XG5cdH1cbmA7XG4iXX0= */"));
|
|
20
19
|
export const Tab = /*#__PURE__*/_styled(Ariakit.Tab, process.env.NODE_ENV === "production" ? {
|
|
21
20
|
target: "enfox0g1"
|
|
22
21
|
} : {
|
|
23
22
|
target: "enfox0g1",
|
|
24
23
|
label: "Tab"
|
|
25
|
-
})("&{display:inline-flex;align-items:center;position:relative;border-radius:0;height:", space(12), ";background:transparent;border:none;box-shadow:none;cursor:pointer;padding:
|
|
24
|
+
})("&{display:inline-flex;align-items:center;position:relative;border-radius:0;min-height:", space(12), ";height:auto;background:transparent;border:none;box-shadow:none;cursor:pointer;line-height:1.2;padding:", space(4), ";margin-left:0;font-weight:500;text-align:inherit;hyphens:auto;color:", COLORS.theme.foreground, ";&[aria-disabled='true']{cursor:default;color:", COLORS.ui.textDisabled, ";}&:not( [aria-disabled='true'] ):hover{color:", COLORS.theme.accent, ";}&:focus:not( :disabled ){position:relative;box-shadow:none;outline:none;}&::before{content:'';position:absolute;top:", space(3), ";right:", space(3), ";bottom:", space(3), ";left:", space(3), ";pointer-events:none;outline:var( --wp-admin-border-width-focus ) solid ", COLORS.theme.accent, ";border-radius:2px;opacity:0;@media not ( prefers-reduced-motion ){transition:opacity 0.1s linear;}}&:focus-visible::before{opacity:1;}}[aria-orientation='vertical'] &{min-height:", space(10), ";}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvdGFicy9zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBMER3QyIsImZpbGUiOiJAd29yZHByZXNzL2NvbXBvbmVudHMvc3JjL3RhYnMvc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0ICogYXMgQXJpYWtpdCBmcm9tICdAYXJpYWtpdC9yZWFjdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IENPTE9SUyB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdXRpbHMvc3BhY2UnO1xuXG5leHBvcnQgY29uc3QgVGFiTGlzdFdyY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ZG93cyBoaWdoIGNvbnRyYXN0IG1vZGUuXG5cdFx0b3V0bGluZTogMnB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXHRcdG91dGxpbmUtb2Zmc2V0OiAwO1xuXHR9XG5gO1xuIl19 */"));
|
|
26
25
|
export const TabPanel = /*#__PURE__*/_styled(Ariakit.TabPanel, process.env.NODE_ENV === "production" ? {
|
|
27
26
|
target: "enfox0g0"
|
|
28
27
|
} : {
|
|
29
28
|
target: "enfox0g0",
|
|
30
29
|
label: "TabPanel"
|
|
31
|
-
})("&:focus{box-shadow:none;outline:none;}&:focus-visible{border-radius:2px;box-shadow:0 0 0 var( --wp-admin-border-width-focus ) ", COLORS.theme.accent, ";outline:2px solid transparent;outline-offset:0;}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
30
|
+
})("&:focus{box-shadow:none;outline:none;}&:focus-visible{border-radius:2px;box-shadow:0 0 0 var( --wp-admin-border-width-focus ) ", COLORS.theme.accent, ";outline:2px solid transparent;outline-offset:0;}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvdGFicy9zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBbUlrRCIsImZpbGUiOiJAd29yZHByZXNzL2NvbXBvbmVudHMvc3JjL3RhYnMvc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0ICogYXMgQXJpYWtpdCBmcm9tICdAYXJpYWtpdC9yZWFjdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydC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94LXNoYWRvdzogMCAwIDAgdmFyKCAtLXdwLWFkbWluLWJvcmRlci13aWR0aC1mb2N1cyApXG5cdFx0XHQkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdFx0Ly8gV2luZG93cyBoaWdoIGNvbnRyYXN0IG1vZGUuXG5cdFx0b3V0bGluZTogMnB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXHRcdG91dGxpbmUtb2Zmc2V0OiAwO1xuXHR9XG5gO1xuIl19 */"));
|
|
32
31
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Ariakit","COLORS","space","TabListWrapper","_styled","process","env","NODE_ENV","target","label","theme","accent","Tab","TabPanel"],"sources":["@wordpress/components/src/tabs/styles.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\
|
|
1
|
+
{"version":3,"names":["Ariakit","COLORS","space","TabListWrapper","_styled","process","env","NODE_ENV","target","label","theme","accent","gray","Tab","foreground","ui","textDisabled","TabPanel"],"sources":["@wordpress/components/src/tabs/styles.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport styled from '@emotion/styled';\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * Internal dependencies\n */\nimport { COLORS } from '../utils';\nimport { space } from '../utils/space';\n\nexport const TabListWrapper = styled.div`\n\tposition: relative;\n\tdisplay: flex;\n\talign-items: stretch;\n\tflex-direction: row;\n\ttext-align: center;\n\n\t&[aria-orientation='vertical'] {\n\t\tflex-direction: column;\n\t\ttext-align: start;\n\t}\n\n\t@media not ( prefers-reduced-motion: reduce ) {\n\t\t&.is-animation-enabled::after {\n\t\t\ttransition-property: left, top, width, height;\n\t\t\ttransition-duration: 0.2s;\n\t\t\ttransition-timing-function: ease-out;\n\t\t}\n\t}\n\t&::after {\n\t\tcontent: '';\n\t\tposition: absolute;\n\t\tpointer-events: none;\n\n\t\t// Windows high contrast mode.\n\t\toutline: 2px solid transparent;\n\t\toutline-offset: -1px;\n\t}\n\t&:not( [aria-orientation='vertical'] )::after {\n\t\tbottom: 0;\n\t\tleft: var( --indicator-left );\n\t\twidth: var( --indicator-width );\n\t\theight: 0;\n\t\tborder-bottom: var( --wp-admin-border-width-focus ) solid\n\t\t\t${ COLORS.theme.accent };\n\t}\n\t&[aria-orientation='vertical']::after {\n\t\tz-index: -1;\n\t\tleft: 0;\n\t\twidth: 100%;\n\t\ttop: var( --indicator-top );\n\t\theight: var( --indicator-height );\n\t\tbackground-color: ${ COLORS.theme.gray[ 100 ] };\n\t}\n`;\n\nexport const Tab = styled( Ariakit.Tab )`\n\t& {\n\t\tdisplay: inline-flex;\n\t\talign-items: center;\n\t\tposition: relative;\n\t\tborder-radius: 0;\n\t\tmin-height: ${ space(\n\t\t\t12\n\t\t) }; // Avoid fixed height to allow for long strings that go in multiple lines.\n\t\theight: auto;\n\t\tbackground: transparent;\n\t\tborder: none;\n\t\tbox-shadow: none;\n\t\tcursor: pointer;\n\t\tline-height: 1.2; // Some languages characters e.g. Japanese may have a native higher line-height.\n\t\tpadding: ${ space( 4 ) };\n\t\tmargin-left: 0;\n\t\tfont-weight: 500;\n\t\ttext-align: inherit;\n\t\thyphens: auto;\n\t\tcolor: ${ COLORS.theme.foreground };\n\n\t\t&[aria-disabled='true'] {\n\t\t\tcursor: default;\n\t\t\tcolor: ${ COLORS.ui.textDisabled };\n\t\t}\n\n\t\t&:not( [aria-disabled='true'] ):hover {\n\t\t\tcolor: ${ COLORS.theme.accent };\n\t\t}\n\n\t\t&:focus:not( :disabled ) {\n\t\t\tposition: relative;\n\t\t\tbox-shadow: none;\n\t\t\toutline: none;\n\t\t}\n\n\t\t// Focus.\n\t\t&::before {\n\t\t\tcontent: '';\n\t\t\tposition: absolute;\n\t\t\ttop: ${ space( 3 ) };\n\t\t\tright: ${ space( 3 ) };\n\t\t\tbottom: ${ space( 3 ) };\n\t\t\tleft: ${ space( 3 ) };\n\t\t\tpointer-events: none;\n\n\t\t\t// Draw the indicator.\n\t\t\t// Outline works for Windows high contrast mode as well.\n\t\t\toutline: var( --wp-admin-border-width-focus ) solid\n\t\t\t\t${ COLORS.theme.accent };\n\t\t\tborder-radius: 2px;\n\n\t\t\t// Animation\n\t\t\topacity: 0;\n\n\t\t\t@media not ( prefers-reduced-motion ) {\n\t\t\t\ttransition: opacity 0.1s linear;\n\t\t\t}\n\t\t}\n\n\t\t&:focus-visible::before {\n\t\t\topacity: 1;\n\t\t}\n\t}\n\n\t[aria-orientation='vertical'] & {\n\t\tmin-height: ${ space(\n\t\t\t10\n\t\t) }; // Avoid fixed height to allow for long strings that go in multiple lines.\n\t}\n`;\n\nexport const TabPanel = styled( Ariakit.TabPanel )`\n\t&:focus {\n\t\tbox-shadow: none;\n\t\toutline: none;\n\t}\n\n\t&:focus-visible {\n\t\tborder-radius: 2px;\n\t\tbox-shadow: 0 0 0 var( --wp-admin-border-width-focus )\n\t\t\t${ COLORS.theme.accent };\n\t\t// Windows high contrast mode.\n\t\toutline: 2px solid transparent;\n\t\toutline-offset: 0;\n\t}\n`;\n"],"mappings":";AAAA;AACA;AACA;;AAEA,OAAO,KAAKA,OAAO,MAAM,gBAAgB;;AAEzC;AACA;AACA;AACA,SAASC,MAAM,QAAQ,UAAU;AACjC,SAASC,KAAK,QAAQ,gBAAgB;AAEtC,OAAO,MAAMC,cAAc,gBAAAC,OAAA,QAAAC,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,6nBAkCrBR,MAAM,CAACS,KAAK,CAACC,MAAM,wJAQFV,MAAM,CAACS,KAAK,CAACE,IAAI,CAAE,GAAG,CAAE,UAAAP,OAAA,CAAAC,GAAA,CAAAC,QAAA,w9JAE9C;AAED,OAAO,MAAMM,GAAG,gBAAGT,OAAA,CAAQJ,OAAO,CAACa,GAAG,EAAAR,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,CAAC,CAAC,2FAMvBP,KAAK,CACnB,EACD,CAAC,6GAOWA,KAAK,CAAE,CAAE,CAAC,2EAKZD,MAAM,CAACS,KAAK,CAACI,UAAU,oDAItBb,MAAM,CAACc,EAAE,CAACC,YAAY,oDAItBf,MAAM,CAACS,KAAK,CAACC,MAAM,4HAarBT,KAAK,CAAE,CAAE,CAAC,aACRA,KAAK,CAAE,CAAE,CAAC,cACTA,KAAK,CAAE,CAAE,CAAC,YACZA,KAAK,CAAE,CAAE,CAAC,8EAMfD,MAAM,CAACS,KAAK,CAACC,MAAM,yLAiBTT,KAAK,CACnB,EACD,CAAC,UAAAG,OAAA,CAAAC,GAAA,CAAAC,QAAA,w9JAEF;AAED,OAAO,MAAMU,QAAQ,gBAAGb,OAAA,CAAQJ,OAAO,CAACiB,QAAQ,EAAAZ,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,CAAC,CAAC,mIAS5CR,MAAM,CAACS,KAAK,CAACC,MAAM,yDAAAN,OAAA,CAAAC,GAAA,CAAAC,QAAA,w9JAKxB","ignoreList":[]}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
// eslint-disable-next-line no-restricted-imports
|
|
5
4
|
import * as Ariakit from '@ariakit/react';
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* WordPress dependencies
|
|
9
8
|
*/
|
|
10
9
|
import warning from '@wordpress/warning';
|
|
11
|
-
import { forwardRef,
|
|
10
|
+
import { forwardRef, useState } from '@wordpress/element';
|
|
12
11
|
|
|
13
12
|
/**
|
|
14
13
|
* Internal dependencies
|
|
@@ -17,89 +16,16 @@ import { forwardRef, useEffect, useLayoutEffect, useRef, useState } from '@wordp
|
|
|
17
16
|
import { useTabsContext } from './context';
|
|
18
17
|
import { TabListWrapper } from './styles';
|
|
19
18
|
import clsx from 'clsx';
|
|
19
|
+
import { useTrackElementOffsetRect } from '../utils/element-rect';
|
|
20
|
+
import { useOnValueUpdate } from '../utils/hooks/use-on-value-update';
|
|
20
21
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
21
|
-
function useTrackElementOffset(targetElement, onUpdate) {
|
|
22
|
-
const [indicatorPosition, setIndicatorPosition] = useState({
|
|
23
|
-
left: 0,
|
|
24
|
-
top: 0,
|
|
25
|
-
width: 0,
|
|
26
|
-
height: 0
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
// TODO: replace with useEventCallback or similar when officially available.
|
|
30
|
-
const updateCallbackRef = useRef(onUpdate);
|
|
31
|
-
useLayoutEffect(() => {
|
|
32
|
-
updateCallbackRef.current = onUpdate;
|
|
33
|
-
});
|
|
34
|
-
const observedElementRef = useRef();
|
|
35
|
-
const resizeObserverRef = useRef();
|
|
36
|
-
useEffect(() => {
|
|
37
|
-
if (targetElement === observedElementRef.current) {
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
observedElementRef.current = targetElement !== null && targetElement !== void 0 ? targetElement : undefined;
|
|
41
|
-
function updateIndicator(element) {
|
|
42
|
-
setIndicatorPosition({
|
|
43
|
-
// Workaround to prevent unwanted scrollbars, see:
|
|
44
|
-
// https://github.com/WordPress/gutenberg/pull/61979
|
|
45
|
-
left: Math.max(element.offsetLeft - 1, 0),
|
|
46
|
-
top: Math.max(element.offsetTop - 1, 0),
|
|
47
|
-
width: parseFloat(getComputedStyle(element).width),
|
|
48
|
-
height: parseFloat(getComputedStyle(element).height)
|
|
49
|
-
});
|
|
50
|
-
updateCallbackRef.current?.();
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// Set up a ResizeObserver.
|
|
54
|
-
if (!resizeObserverRef.current) {
|
|
55
|
-
resizeObserverRef.current = new ResizeObserver(() => {
|
|
56
|
-
if (observedElementRef.current) {
|
|
57
|
-
updateIndicator(observedElementRef.current);
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
const {
|
|
62
|
-
current: resizeObserver
|
|
63
|
-
} = resizeObserverRef;
|
|
64
|
-
|
|
65
|
-
// Observe new element.
|
|
66
|
-
if (targetElement) {
|
|
67
|
-
updateIndicator(targetElement);
|
|
68
|
-
resizeObserver.observe(targetElement);
|
|
69
|
-
}
|
|
70
|
-
return () => {
|
|
71
|
-
// Unobserve previous element.
|
|
72
|
-
if (observedElementRef.current) {
|
|
73
|
-
resizeObserver.unobserve(observedElementRef.current);
|
|
74
|
-
}
|
|
75
|
-
};
|
|
76
|
-
}, [targetElement]);
|
|
77
|
-
return indicatorPosition;
|
|
78
|
-
}
|
|
79
|
-
function useOnValueUpdate(value, onUpdate) {
|
|
80
|
-
const previousValueRef = useRef(value);
|
|
81
|
-
|
|
82
|
-
// TODO: replace with useEventCallback or similar when officially available.
|
|
83
|
-
const updateCallbackRef = useRef(onUpdate);
|
|
84
|
-
useLayoutEffect(() => {
|
|
85
|
-
updateCallbackRef.current = onUpdate;
|
|
86
|
-
});
|
|
87
|
-
useEffect(() => {
|
|
88
|
-
if (previousValueRef.current !== value) {
|
|
89
|
-
updateCallbackRef.current({
|
|
90
|
-
previousValue: previousValueRef.current
|
|
91
|
-
});
|
|
92
|
-
previousValueRef.current = value;
|
|
93
|
-
}
|
|
94
|
-
}, [value]);
|
|
95
|
-
}
|
|
96
22
|
export const TabList = forwardRef(function TabList({
|
|
97
23
|
children,
|
|
98
24
|
...otherProps
|
|
99
25
|
}, ref) {
|
|
100
26
|
const context = useTabsContext();
|
|
101
27
|
const selectedId = context?.store.useState('selectedId');
|
|
102
|
-
const indicatorPosition =
|
|
28
|
+
const indicatorPosition = useTrackElementOffsetRect(context?.store.item(selectedId)?.element);
|
|
103
29
|
const [animationEnabled, setAnimationEnabled] = useState(false);
|
|
104
30
|
useOnValueUpdate(selectedId, ({
|
|
105
31
|
previousValue
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Ariakit","warning","forwardRef","useEffect","useLayoutEffect","useRef","useState","useTabsContext","TabListWrapper","clsx","jsx","_jsx","useTrackElementOffset","targetElement","onUpdate","indicatorPosition","setIndicatorPosition","left","top","width","height","updateCallbackRef","current","observedElementRef","resizeObserverRef","undefined","updateIndicator","element","Math","max","offsetLeft","offsetTop","parseFloat","getComputedStyle","ResizeObserver","resizeObserver","observe","unobserve","useOnValueUpdate","value","previousValueRef","previousValue","TabList","children","otherProps","ref","context","selectedId","store","item","animationEnabled","setAnimationEnabled","globalThis","SCRIPT_DEBUG","activeId","selectOnMove","setActiveId","onBlur","render","onTransitionEnd","event","pseudoElement","style","className"],"sources":["@wordpress/components/src/tabs/tablist.tsx"],"sourcesContent":["/**\n * External dependencies\n */\n// eslint-disable-next-line no-restricted-imports\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport warning from '@wordpress/warning';\nimport {\n\tforwardRef,\n\tuseEffect,\n\tuseLayoutEffect,\n\tuseRef,\n\tuseState,\n} from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { TabListProps } from './types';\nimport { useTabsContext } from './context';\nimport { TabListWrapper } from './styles';\nimport type { WordPressComponentProps } from '../context';\nimport clsx from 'clsx';\n\nfunction useTrackElementOffset(\n\ttargetElement?: HTMLElement | null,\n\tonUpdate?: () => void\n) {\n\tconst [ indicatorPosition, setIndicatorPosition ] = useState( {\n\t\tleft: 0,\n\t\ttop: 0,\n\t\twidth: 0,\n\t\theight: 0,\n\t} );\n\n\t// TODO: replace with useEventCallback or similar when officially available.\n\tconst updateCallbackRef = useRef( onUpdate );\n\tuseLayoutEffect( () => {\n\t\tupdateCallbackRef.current = onUpdate;\n\t} );\n\n\tconst observedElementRef = useRef< HTMLElement >();\n\tconst resizeObserverRef = useRef< ResizeObserver >();\n\tuseEffect( () => {\n\t\tif ( targetElement === observedElementRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tobservedElementRef.current = targetElement ?? undefined;\n\n\t\tfunction updateIndicator( element: HTMLElement ) {\n\t\t\tsetIndicatorPosition( {\n\t\t\t\t// Workaround to prevent unwanted scrollbars, see:\n\t\t\t\t// https://github.com/WordPress/gutenberg/pull/61979\n\t\t\t\tleft: Math.max( element.offsetLeft - 1, 0 ),\n\t\t\t\ttop: Math.max( element.offsetTop - 1, 0 ),\n\t\t\t\twidth: parseFloat( getComputedStyle( element ).width ),\n\t\t\t\theight: parseFloat( getComputedStyle( element ).height ),\n\t\t\t} );\n\t\t\tupdateCallbackRef.current?.();\n\t\t}\n\n\t\t// Set up a ResizeObserver.\n\t\tif ( ! resizeObserverRef.current ) {\n\t\t\tresizeObserverRef.current = new ResizeObserver( () => {\n\t\t\t\tif ( observedElementRef.current ) {\n\t\t\t\t\tupdateIndicator( observedElementRef.current );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t\tconst { current: resizeObserver } = resizeObserverRef;\n\n\t\t// Observe new element.\n\t\tif ( targetElement ) {\n\t\t\tupdateIndicator( targetElement );\n\t\t\tresizeObserver.observe( targetElement );\n\t\t}\n\n\t\treturn () => {\n\t\t\t// Unobserve previous element.\n\t\t\tif ( observedElementRef.current ) {\n\t\t\t\tresizeObserver.unobserve( observedElementRef.current );\n\t\t\t}\n\t\t};\n\t}, [ targetElement ] );\n\n\treturn indicatorPosition;\n}\n\ntype ValueUpdateContext< T > = {\n\tpreviousValue: T;\n};\n\nfunction useOnValueUpdate< T >(\n\tvalue: T,\n\tonUpdate: ( context: ValueUpdateContext< T > ) => void\n) {\n\tconst previousValueRef = useRef( value );\n\n\t// TODO: replace with useEventCallback or similar when officially available.\n\tconst updateCallbackRef = useRef( onUpdate );\n\tuseLayoutEffect( () => {\n\t\tupdateCallbackRef.current = onUpdate;\n\t} );\n\n\tuseEffect( () => {\n\t\tif ( previousValueRef.current !== value ) {\n\t\t\tupdateCallbackRef.current( {\n\t\t\t\tpreviousValue: previousValueRef.current,\n\t\t\t} );\n\t\t\tpreviousValueRef.current = value;\n\t\t}\n\t}, [ value ] );\n}\n\nexport const TabList = forwardRef<\n\tHTMLDivElement,\n\tWordPressComponentProps< TabListProps, 'div', false >\n>( function TabList( { children, ...otherProps }, ref ) {\n\tconst context = useTabsContext();\n\n\tconst selectedId = context?.store.useState( 'selectedId' );\n\tconst indicatorPosition = useTrackElementOffset(\n\t\tcontext?.store.item( selectedId )?.element\n\t);\n\n\tconst [ animationEnabled, setAnimationEnabled ] = useState( false );\n\tuseOnValueUpdate(\n\t\tselectedId,\n\t\t( { previousValue } ) => previousValue && setAnimationEnabled( true )\n\t);\n\n\tif ( ! context ) {\n\t\twarning( '`Tabs.TabList` must be wrapped in a `Tabs` component.' );\n\t\treturn null;\n\t}\n\tconst { store } = context;\n\n\tconst { activeId, selectOnMove } = store.useState();\n\tconst { setActiveId } = store;\n\n\tconst onBlur = () => {\n\t\tif ( ! selectOnMove ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// When automatic tab selection is on, make sure that the active tab is up\n\t\t// to date with the selected tab when leaving the tablist. This makes sure\n\t\t// that the selected tab will receive keyboard focus when tabbing back into\n\t\t// the tablist.\n\t\tif ( selectedId !== activeId ) {\n\t\t\tsetActiveId( selectedId );\n\t\t}\n\t};\n\n\treturn (\n\t\t<Ariakit.TabList\n\t\t\tref={ ref }\n\t\t\tstore={ store }\n\t\t\trender={\n\t\t\t\t<TabListWrapper\n\t\t\t\t\tonTransitionEnd={ ( event ) => {\n\t\t\t\t\t\tif ( event.pseudoElement === '::after' ) {\n\t\t\t\t\t\t\tsetAnimationEnabled( false );\n\t\t\t\t\t\t}\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t}\n\t\t\tonBlur={ onBlur }\n\t\t\t{ ...otherProps }\n\t\t\tstyle={ {\n\t\t\t\t'--indicator-left': `${ indicatorPosition.left }px`,\n\t\t\t\t'--indicator-top': `${ indicatorPosition.top }px`,\n\t\t\t\t'--indicator-width': `${ indicatorPosition.width }px`,\n\t\t\t\t'--indicator-height': `${ indicatorPosition.height }px`,\n\t\t\t\t...otherProps.style,\n\t\t\t} }\n\t\t\tclassName={ clsx(\n\t\t\t\tanimationEnabled ? 'is-animation-enabled' : '',\n\t\t\t\totherProps.className\n\t\t\t) }\n\t\t>\n\t\t\t{ children }\n\t\t</Ariakit.TabList>\n\t);\n} );\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA,OAAO,KAAKA,OAAO,MAAM,gBAAgB;;AAEzC;AACA;AACA;AACA,OAAOC,OAAO,MAAM,oBAAoB;AACxC,SACCC,UAAU,EACVC,SAAS,EACTC,eAAe,EACfC,MAAM,EACNC,QAAQ,QACF,oBAAoB;;AAE3B;AACA;AACA;;AAEA,SAASC,cAAc,QAAQ,WAAW;AAC1C,SAASC,cAAc,QAAQ,UAAU;AAEzC,OAAOC,IAAI,MAAM,MAAM;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAExB,SAASC,qBAAqBA,CAC7BC,aAAkC,EAClCC,QAAqB,EACpB;EACD,MAAM,CAAEC,iBAAiB,EAAEC,oBAAoB,CAAE,GAAGV,QAAQ,CAAE;IAC7DW,IAAI,EAAE,CAAC;IACPC,GAAG,EAAE,CAAC;IACNC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE;EACT,CAAE,CAAC;;EAEH;EACA,MAAMC,iBAAiB,GAAGhB,MAAM,CAAES,QAAS,CAAC;EAC5CV,eAAe,CAAE,MAAM;IACtBiB,iBAAiB,CAACC,OAAO,GAAGR,QAAQ;EACrC,CAAE,CAAC;EAEH,MAAMS,kBAAkB,GAAGlB,MAAM,CAAgB,CAAC;EAClD,MAAMmB,iBAAiB,GAAGnB,MAAM,CAAmB,CAAC;EACpDF,SAAS,CAAE,MAAM;IAChB,IAAKU,aAAa,KAAKU,kBAAkB,CAACD,OAAO,EAAG;MACnD;IACD;IAEAC,kBAAkB,CAACD,OAAO,GAAGT,aAAa,aAAbA,aAAa,cAAbA,aAAa,GAAIY,SAAS;IAEvD,SAASC,eAAeA,CAAEC,OAAoB,EAAG;MAChDX,oBAAoB,CAAE;QACrB;QACA;QACAC,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EF,YAAY,EAAG;MACrB;IACD;;IAEA;IACA;IACA;IACA;IACA,IAAKR,UAAU,KAAKO,QAAQ,EAAG;MAC9BE,WAAW,CAAET,UAAW,CAAC;IAC1B;EACD,CAAC;EAED,oBACCpC,IAAA,CAACX,OAAO,CAAC0C,OAAO;IACfG,GAAG,EAAGA,GAAK;IACXG,KAAK,EAAGA,KAAO;IACfU,MAAM,eACL/C,IAAA,CAACH,cAAc;MACdmD,eAAe,EAAKC,KAAK,IAAM;QAC9B,IAAKA,KAAK,CAACC,aAAa,KAAK,SAAS,EAAG;UACxCV,mBAAmB,CAAE,KAAM,CAAC;QAC7B;MACD;IAAG,CACH,CACD;IACDM,MAAM,EAAGA,MAAQ;IAAA,GACZb,UAAU;IACfkB,KAAK,EAAG;MACP,kBAAkB,EAAG,GAAG/C,iBAAiB,CAACE,IAAM,IAAG;MACnD,iBAAiB,EAAG,GAAGF,iBAAiB,CAACG,GAAK,IAAG;MACjD,mBAAmB,EAAG,GAAGH,iBAAiB,CAACI,KAAO,IAAG;MACrD,oBAAoB,EAAG,GAAGJ,iBAAiB,CAACK,MAAQ,IAAG;MACvD,GAAGwB,UAAU,CAACkB;IACf,CAAG;IACHC,SAAS,EAAGtD,IAAI,CACfyC,gBAAgB,GAAG,sBAAsB,GAAG,EAAE,EAC9CN,UAAU,CAACmB,SACZ,CAAG;IAAApB,QAAA,EAEDA;EAAQ,CACM,CAAC;AAEpB,CAAE,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["Ariakit","warning","forwardRef","useState","useTabsContext","TabListWrapper","clsx","useTrackElementOffsetRect","useOnValueUpdate","jsx","_jsx","TabList","children","otherProps","ref","context","selectedId","store","indicatorPosition","item","element","animationEnabled","setAnimationEnabled","previousValue","globalThis","SCRIPT_DEBUG","activeId","selectOnMove","setActiveId","onBlur","render","onTransitionEnd","event","pseudoElement","style","left","top","width","height","className"],"sources":["@wordpress/components/src/tabs/tablist.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport warning from '@wordpress/warning';\nimport { forwardRef, useState } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { TabListProps } from './types';\nimport { useTabsContext } from './context';\nimport { TabListWrapper } from './styles';\nimport type { WordPressComponentProps } from '../context';\nimport clsx from 'clsx';\nimport { useTrackElementOffsetRect } from '../utils/element-rect';\nimport { useOnValueUpdate } from '../utils/hooks/use-on-value-update';\n\nexport const TabList = forwardRef<\n\tHTMLDivElement,\n\tWordPressComponentProps< TabListProps, 'div', false >\n>( function TabList( { children, ...otherProps }, ref ) {\n\tconst context = useTabsContext();\n\n\tconst selectedId = context?.store.useState( 'selectedId' );\n\tconst indicatorPosition = useTrackElementOffsetRect(\n\t\tcontext?.store.item( selectedId )?.element\n\t);\n\n\tconst [ animationEnabled, setAnimationEnabled ] = useState( false );\n\tuseOnValueUpdate(\n\t\tselectedId,\n\t\t( { previousValue } ) => previousValue && setAnimationEnabled( true )\n\t);\n\n\tif ( ! context ) {\n\t\twarning( '`Tabs.TabList` must be wrapped in a `Tabs` component.' );\n\t\treturn null;\n\t}\n\tconst { store } = context;\n\n\tconst { activeId, selectOnMove } = store.useState();\n\tconst { setActiveId } = store;\n\n\tconst onBlur = () => {\n\t\tif ( ! selectOnMove ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// When automatic tab selection is on, make sure that the active tab is up\n\t\t// to date with the selected tab when leaving the tablist. This makes sure\n\t\t// that the selected tab will receive keyboard focus when tabbing back into\n\t\t// the tablist.\n\t\tif ( selectedId !== activeId ) {\n\t\t\tsetActiveId( selectedId );\n\t\t}\n\t};\n\n\treturn (\n\t\t<Ariakit.TabList\n\t\t\tref={ ref }\n\t\t\tstore={ store }\n\t\t\trender={\n\t\t\t\t<TabListWrapper\n\t\t\t\t\tonTransitionEnd={ ( event ) => {\n\t\t\t\t\t\tif ( event.pseudoElement === '::after' ) {\n\t\t\t\t\t\t\tsetAnimationEnabled( false );\n\t\t\t\t\t\t}\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t}\n\t\t\tonBlur={ onBlur }\n\t\t\t{ ...otherProps }\n\t\t\tstyle={ {\n\t\t\t\t'--indicator-left': `${ indicatorPosition.left }px`,\n\t\t\t\t'--indicator-top': `${ indicatorPosition.top }px`,\n\t\t\t\t'--indicator-width': `${ indicatorPosition.width }px`,\n\t\t\t\t'--indicator-height': `${ indicatorPosition.height }px`,\n\t\t\t\t...otherProps.style,\n\t\t\t} }\n\t\t\tclassName={ clsx(\n\t\t\t\tanimationEnabled ? 'is-animation-enabled' : '',\n\t\t\t\totherProps.className\n\t\t\t) }\n\t\t>\n\t\t\t{ children }\n\t\t</Ariakit.TabList>\n\t);\n} );\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAO,KAAKA,OAAO,MAAM,gBAAgB;;AAEzC;AACA;AACA;AACA,OAAOC,OAAO,MAAM,oBAAoB;AACxC,SAASC,UAAU,EAAEC,QAAQ,QAAQ,oBAAoB;;AAEzD;AACA;AACA;;AAEA,SAASC,cAAc,QAAQ,WAAW;AAC1C,SAASC,cAAc,QAAQ,UAAU;AAEzC,OAAOC,IAAI,MAAM,MAAM;AACvB,SAASC,yBAAyB,QAAQ,uBAAuB;AACjE,SAASC,gBAAgB,QAAQ,oCAAoC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEtE,OAAO,MAAMC,OAAO,GAAGT,UAAU,CAG9B,SAASS,OAAOA,CAAE;EAAEC,QAAQ;EAAE,GAAGC;AAAW,CAAC,EAAEC,GAAG,EAAG;EACvD,MAAMC,OAAO,GAAGX,cAAc,CAAC,CAAC;EAEhC,MAAMY,UAAU,GAAGD,OAAO,EAAEE,KAAK,CAACd,QAAQ,CAAE,YAAa,CAAC;EAC1D,MAAMe,iBAAiB,GAAGX,yBAAyB,CAClDQ,OAAO,EAAEE,KAAK,CAACE,IAAI,CAAEH,UAAW,CAAC,EAAEI,OACpC,CAAC;EAED,MAAM,CAAEC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,GAAGzB,UAAU,CAACqB;IACf,CAAG;IACHK,SAAS,EAAGjC,IAAI,CACfe,gBAAgB,GAAG,sBAAsB,GAAG,EAAE,EAC9CR,UAAU,CAAC0B,SACZ,CAAG;IAAA3B,QAAA,EAEDA;EAAQ,CACM,CAAC;AAEpB,CAAE,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["@wordpress/components/src/tabs/types.ts"],"sourcesContent":["/**\n * External dependencies\n */\
|
|
1
|
+
{"version":3,"names":[],"sources":["@wordpress/components/src/tabs/types.ts"],"sourcesContent":["/**\n * External dependencies\n */\nimport type * as Ariakit from '@ariakit/react';\n\nexport type TabsContextProps =\n\t| {\n\t\t\t/**\n\t\t\t * The tabStore object returned by Ariakit's `useTabStore` hook.\n\t\t\t */\n\t\t\tstore: Ariakit.TabStore;\n\t\t\t/**\n\t\t\t * The unique id string for this instance of the Tabs component.\n\t\t\t */\n\t\t\tinstanceId: string;\n\t }\n\t| undefined;\n\nexport type TabsProps = {\n\t/**\n\t * The children elements, which should be at least a\n\t * `Tabs.Tablist` component and a series of `Tabs.TabPanel`\n\t * components.\n\t */\n\tchildren: React.ReactNode;\n\t/**\n\t * When `true`, the tab will be selected when receiving focus (automatic tab\n\t * activation). When `false`, the tab will be selected only when clicked\n\t * (manual tab activation). See the official W3C docs for more info.\n\t *\n\t * @default true\n\t *\n\t * @see https://www.w3.org/WAI/ARIA/apg/patterns/tabpanel/\n\t */\n\tselectOnMove?: boolean;\n\t/**\n\t * The id of the tab to be selected upon mounting of component.\n\t * If this prop is not set, the first tab will be selected by default.\n\t * The id provided will be internally prefixed with the\n\t * `TabsContextProps.instanceId`.\n\t *\n\t * Note: this prop will be overridden by the `selectedTabId` prop if it is\n\t * provided. (Controlled Mode)\n\t */\n\tdefaultTabId?: string;\n\t/**\n\t * The function called when a tab has been selected.\n\t * It is passed the id of the newly selected tab as an argument.\n\t */\n\tonSelect?: ( selectedId: string | null | undefined ) => void;\n\n\t/**\n\t * The orientation of the tablist.\n\t *\n\t * @default `horizontal`\n\t */\n\torientation?: 'horizontal' | 'vertical';\n\t/**\n\t * The Id of the tab to display. This id is prepended with the `Tabs`\n\t * instanceId internally.\n\t *\n\t * If left `undefined`, the component assumes it is being used in\n\t * uncontrolled mode. Consequently, any value different than `undefined`\n\t * will set the component in `controlled` mode.\n\t * When in controlled mode, the `null` value will result in no tab being selected.\n\t */\n\tselectedTabId?: string | null;\n};\n\nexport type TabListProps = {\n\t/**\n\t * The children elements, which should be a series of `Tabs.TabPanel` components.\n\t */\n\tchildren?: React.ReactNode;\n};\n\nexport type TabProps = {\n\t/**\n\t * The id of the tab, which is prepended with the `Tabs` instanceId.\n\t * The value of this prop should match with the value of the `tabId` prop on\n\t * the corresponding `Tabs.TabPanel` component.\n\t */\n\ttabId: string;\n\t/**\n\t * The children elements, generally the text to display on the tab.\n\t */\n\tchildren?: React.ReactNode;\n\t/**\n\t * Determines if the tab button should be disabled.\n\t *\n\t * @default false\n\t */\n\tdisabled?: boolean;\n\t/**\n\t * The type of component to render the tab button as. If this prop is not\n\t * provided, the tab button will be rendered as a `button` element.\n\t */\n\trender?: React.ReactElement;\n};\n\nexport type TabPanelProps = {\n\t/**\n\t * The children elements, generally the content to display on the tabpanel.\n\t */\n\tchildren?: React.ReactNode;\n\t/**\n\t * A unique identifier for the tabpanel, which is used to generate an\n\t * instanced id for the underlying element.\n\t * The value of this prop should match with the value of the `tabId` prop on\n\t * the corresponding `Tabs.Tab` component.\n\t */\n\ttabId: string;\n\t/**\n\t * Determines whether or not the tabpanel element should be focusable.\n\t * If `false`, pressing the tab key will skip over the tabpanel, and instead\n\t * focus on the first focusable element in the panel (if there is one).\n\t *\n\t * @default true\n\t */\n\tfocusable?: boolean;\n};\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useInstanceId","forwardRef","BaseControl","StyledTextarea","jsx","_jsx","UnforwardedTextareaControl","props","ref","__nextHasNoMarginBottom","label","hideLabelFromVision","value","help","onChange","rows","className","additionalProps","instanceId","TextareaControl","id","onChangeValue","event","target","children","undefined"],"sources":["@wordpress/components/src/textarea-control/index.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport { StyledTextarea } from './styles/textarea-control-styles';\nimport type { TextareaControlProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nfunction UnforwardedTextareaControl(\n\tprops: WordPressComponentProps< TextareaControlProps, 'textarea', false >,\n\tref: React.ForwardedRef< HTMLTextAreaElement >\n) {\n\tconst {\n\t\t__nextHasNoMarginBottom,\n\t\tlabel,\n\t\thideLabelFromVision,\n\t\tvalue,\n\t\thelp,\n\t\tonChange,\n\t\trows = 4,\n\t\tclassName,\n\t\t...additionalProps\n\t} = props;\n\tconst instanceId = useInstanceId( TextareaControl );\n\tconst id = `inspector-textarea-control-${ instanceId }`;\n\tconst onChangeValue = ( event: React.ChangeEvent< HTMLTextAreaElement > ) =>\n\t\tonChange( event.target.value );\n\n\treturn (\n\t\t<BaseControl\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\tlabel={ label }\n\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\tid={ id }\n\t\t\thelp={ help }\n\t\t\tclassName={ className }\n\t\t>\n\t\t\t<StyledTextarea\n\t\t\t\tclassName=\"components-textarea-control__input\"\n\t\t\t\tid={ id }\n\t\t\t\trows={ rows }\n\t\t\t\tonChange={ onChangeValue }\n\t\t\t\taria-describedby={ !! help ? id + '__help' : undefined }\n\t\t\t\tvalue={ value }\n\t\t\t\tref={ ref }\n\t\t\t\t{ ...additionalProps }\n\t\t\t/>\n\t\t</BaseControl>\n\t);\n}\n\n/**\n * TextareaControls are TextControls that allow for multiple lines of text, and\n * wrap overflow text onto a new line. They are a fixed height and scroll\n * vertically when the cursor reaches the bottom of the field.\n *\n * ```jsx\n * import { TextareaControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyTextareaControl = () => {\n * const [ text, setText ] = useState( '' );\n *\n * return (\n * <TextareaControl\n * label=\"Text\"\n * help=\"Enter some text\"\n * value={ text }\n * onChange={ ( value ) => setText( value ) }\n * />\n * );\n * };\n * ```\n */\nexport const TextareaControl = forwardRef( UnforwardedTextareaControl );\n\nexport default TextareaControl;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,aAAa,QAAQ,oBAAoB;AAClD,SAASC,UAAU,QAAQ,oBAAoB;;AAE/C;AACA;AACA;AACA,OAAOC,WAAW,MAAM,iBAAiB;AACzC,SAASC,cAAc,QAAQ,kCAAkC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAIlE,SAASC,0BAA0BA,CAClCC,KAAyE,EACzEC,GAA8C,EAC7C;EACD,MAAM;IACLC,uBAAuB;IACvBC,KAAK;IACLC,mBAAmB;IACnBC,KAAK;IACLC,IAAI;IACJC,QAAQ;IACRC,IAAI,GAAG,CAAC;IACRC,SAAS;IACT,GAAGC;EACJ,CAAC,GAAGV,KAAK;EACT,MAAMW,UAAU,GAAGlB,aAAa,CAAEmB,eAAgB,CAAC;EACnD,MAAMC,EAAE,GAAI,8BAA8BF,UAAY,EAAC;EACvD,MAAMG,aAAa,GAAKC,KAA+C,IACtER,QAAQ,CAAEQ,KAAK,CAACC,MAAM,CAACX,KAAM,CAAC;EAE/B,oBACCP,IAAA,CAACH,WAAW;IACXO,uBAAuB,EAAGA,uBAAyB;IACnDC,KAAK,EAAGA,KAAO;IACfC,mBAAmB,EAAGA,mBAAqB;IAC3CS,EAAE,EAAGA,EAAI;IACTP,IAAI,EAAGA,IAAM;IACbG,SAAS,EAAGA,SAAW;IAAAQ,QAAA,eAEvBnB,IAAA,CAACF,cAAc;MACda,SAAS,EAAC,oCAAoC;MAC9CI,EAAE,EAAGA,EAAI;MACTL,IAAI,EAAGA,IAAM;MACbD,QAAQ,EAAGO,aAAe;MAC1B,oBAAmB,CAAC,CAAER,IAAI,GAAGO,EAAE,GAAG,QAAQ,GAAGK,SAAW;MACxDb,KAAK,EAAGA,KAAO;MACfJ,GAAG,EAAGA,GAAK;MAAA,GACNS;IAAe,CACpB;EAAC,CACU,CAAC;AAEhB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAME,eAAe,GAAGlB,UAAU,CAAEK,0BAA2B,CAAC;AAEvE,eAAea,eAAe","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["useInstanceId","forwardRef","BaseControl","StyledTextarea","jsx","_jsx","UnforwardedTextareaControl","props","ref","__nextHasNoMarginBottom","label","hideLabelFromVision","value","help","onChange","rows","className","additionalProps","instanceId","TextareaControl","id","onChangeValue","event","target","children","undefined"],"sources":["@wordpress/components/src/textarea-control/index.tsx"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport { useInstanceId } from '@wordpress/compose';\nimport { forwardRef } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport BaseControl from '../base-control';\nimport { StyledTextarea } from './styles/textarea-control-styles';\nimport type { TextareaControlProps } from './types';\nimport type { WordPressComponentProps } from '../context';\n\nfunction UnforwardedTextareaControl(\n\tprops: WordPressComponentProps< TextareaControlProps, 'textarea', false >,\n\tref: React.ForwardedRef< HTMLTextAreaElement >\n) {\n\tconst {\n\t\t__nextHasNoMarginBottom,\n\t\tlabel,\n\t\thideLabelFromVision,\n\t\tvalue,\n\t\thelp,\n\t\tonChange,\n\t\trows = 4,\n\t\tclassName,\n\t\t...additionalProps\n\t} = props;\n\tconst instanceId = useInstanceId( TextareaControl );\n\tconst id = `inspector-textarea-control-${ instanceId }`;\n\tconst onChangeValue = ( event: React.ChangeEvent< HTMLTextAreaElement > ) =>\n\t\tonChange( event.target.value );\n\n\treturn (\n\t\t<BaseControl\n\t\t\t__nextHasNoMarginBottom={ __nextHasNoMarginBottom }\n\t\t\tlabel={ label }\n\t\t\thideLabelFromVision={ hideLabelFromVision }\n\t\t\tid={ id }\n\t\t\thelp={ help }\n\t\t\tclassName={ className }\n\t\t>\n\t\t\t<StyledTextarea\n\t\t\t\tclassName=\"components-textarea-control__input\"\n\t\t\t\tid={ id }\n\t\t\t\trows={ rows }\n\t\t\t\tonChange={ onChangeValue }\n\t\t\t\taria-describedby={ !! help ? id + '__help' : undefined }\n\t\t\t\tvalue={ value }\n\t\t\t\tref={ ref }\n\t\t\t\t{ ...additionalProps }\n\t\t\t/>\n\t\t</BaseControl>\n\t);\n}\n\n/**\n * TextareaControls are TextControls that allow for multiple lines of text, and\n * wrap overflow text onto a new line. They are a fixed height and scroll\n * vertically when the cursor reaches the bottom of the field.\n *\n * ```jsx\n * import { TextareaControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyTextareaControl = () => {\n * const [ text, setText ] = useState( '' );\n *\n * return (\n * <TextareaControl\n * __nextHasNoMarginBottom\n * label=\"Text\"\n * help=\"Enter some text\"\n * value={ text }\n * onChange={ ( value ) => setText( value ) }\n * />\n * );\n * };\n * ```\n */\nexport const TextareaControl = forwardRef( UnforwardedTextareaControl );\n\nexport default TextareaControl;\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,aAAa,QAAQ,oBAAoB;AAClD,SAASC,UAAU,QAAQ,oBAAoB;;AAE/C;AACA;AACA;AACA,OAAOC,WAAW,MAAM,iBAAiB;AACzC,SAASC,cAAc,QAAQ,kCAAkC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAIlE,SAASC,0BAA0BA,CAClCC,KAAyE,EACzEC,GAA8C,EAC7C;EACD,MAAM;IACLC,uBAAuB;IACvBC,KAAK;IACLC,mBAAmB;IACnBC,KAAK;IACLC,IAAI;IACJC,QAAQ;IACRC,IAAI,GAAG,CAAC;IACRC,SAAS;IACT,GAAGC;EACJ,CAAC,GAAGV,KAAK;EACT,MAAMW,UAAU,GAAGlB,aAAa,CAAEmB,eAAgB,CAAC;EACnD,MAAMC,EAAE,GAAI,8BAA8BF,UAAY,EAAC;EACvD,MAAMG,aAAa,GAAKC,KAA+C,IACtER,QAAQ,CAAEQ,KAAK,CAACC,MAAM,CAACX,KAAM,CAAC;EAE/B,oBACCP,IAAA,CAACH,WAAW;IACXO,uBAAuB,EAAGA,uBAAyB;IACnDC,KAAK,EAAGA,KAAO;IACfC,mBAAmB,EAAGA,mBAAqB;IAC3CS,EAAE,EAAGA,EAAI;IACTP,IAAI,EAAGA,IAAM;IACbG,SAAS,EAAGA,SAAW;IAAAQ,QAAA,eAEvBnB,IAAA,CAACF,cAAc;MACda,SAAS,EAAC,oCAAoC;MAC9CI,EAAE,EAAGA,EAAI;MACTL,IAAI,EAAGA,IAAM;MACbD,QAAQ,EAAGO,aAAe;MAC1B,oBAAmB,CAAC,CAAER,IAAI,GAAGO,EAAE,GAAG,QAAQ,GAAGK,SAAW;MACxDb,KAAK,EAAGA,KAAO;MACfJ,GAAG,EAAGA,GAAK;MAAA,GACNS;IAAe,CACpB;EAAC,CACU,CAAC;AAEhB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAME,eAAe,GAAGlB,UAAU,CAAEK,0BAA2B,CAAC;AAEvE,eAAea,eAAe","ignoreList":[]}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { css } from '@emotion/react';
|
|
6
|
+
import clsx from 'clsx';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* WordPress dependencies
|
|
@@ -59,7 +60,7 @@ export function ToggleControl({
|
|
|
59
60
|
const cx = useCx();
|
|
60
61
|
const classes = cx('components-toggle-control', className, !__nextHasNoMarginBottom && /*#__PURE__*/css({
|
|
61
62
|
marginBottom: space(3)
|
|
62
|
-
}, process.env.NODE_ENV === "production" ? "" : ";label:classes;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
63
|
+
}, process.env.NODE_ENV === "production" ? "" : ";label:classes;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvdG9nZ2xlLWNvbnRyb2wvaW5kZXgudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1FK0IiLCJmaWxlIjoiQHdvcmRwcmVzcy9jb21wb25lbnRzL3NyYy90b2dnbGUtY29udHJvbC9pbmRleC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgdHlwZSB7IENoYW5nZUV2ZW50LCBGb3J3YXJkZWRSZWYgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgY2xzeCBmcm9tICdjbHN4JztcblxuLyoqXG4gKiBXb3JkUHJlc3MgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGZvcndhcmRSZWYgfSBmcm9tICdAd29yZHByZXNzL2VsZW1lbnQnO1xuaW1wb3J0IHsgdXNlSW5zdGFuY2VJZCB9IGZyb20gJ0B3b3JkcHJlc3MvY29tcG9zZSc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IEZsZXhCbG9jayB9IGZyb20gJy4uL2ZsZXgnO1xuaW1wb3J0IEZvcm1Ub2dnbGUgZnJvbSAnLi4vZm9ybS10b2dnbGUnO1xuaW1wb3J0IEJhc2VDb250cm9sIGZyb20gJy4uL2Jhc2UtY29udHJvbCc7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2FibGVkIH1cblx0XHRcdFx0XHRyZWY9eyByZWYgfVxuXHRcdFx0XHQvPlxuXHRcdFx0XHQ8RmxleEJsb2NrXG5cdFx0XHRcdFx0YXM9XCJsYWJlbFwiXG5cdFx0XHRcdFx0aHRtbEZvcj17IGlkIH1cblx0XHRcdFx0XHRjbGFzc05hbWU9eyBjbHN4KCAnY29tcG9uZW50cy10b2dnbGUtY29udHJvbF9fbGFiZWwnLCB7XG5cdFx0XHRcdFx0XHQnaXMtZGlzYWJsZWQnOiBkaXNhYmxlZCxcblx0XHRcdFx0XHR9ICkgfVxuXHRcdFx0XHQ+XG5cdFx0XHRcdFx0eyBsYWJlbCB9XG5cdFx0XHRcdDwvRmxleEJsb2NrPlxuXHRcdFx0PC9IU3RhY2s+XG5cdFx0PC9CYXNlQ29udHJvbD5cblx0KTtcbn1cblxuZXhwb3J0IGRlZmF1bHQgZm9yd2FyZFJlZiggVG9nZ2xlQ29udHJvbCApO1xuIl19 */"));
|
|
63
64
|
let describedBy, helpLabel;
|
|
64
65
|
if (help) {
|
|
65
66
|
if (typeof help === 'function') {
|
|
@@ -78,12 +79,15 @@ export function ToggleControl({
|
|
|
78
79
|
}
|
|
79
80
|
return /*#__PURE__*/_jsx(BaseControl, {
|
|
80
81
|
id: id,
|
|
81
|
-
help: helpLabel,
|
|
82
|
+
help: helpLabel && /*#__PURE__*/_jsx("span", {
|
|
83
|
+
className: "components-toggle-control__help",
|
|
84
|
+
children: helpLabel
|
|
85
|
+
}),
|
|
82
86
|
className: classes,
|
|
83
87
|
__nextHasNoMarginBottom: true,
|
|
84
88
|
children: /*#__PURE__*/_jsxs(HStack, {
|
|
85
89
|
justify: "flex-start",
|
|
86
|
-
spacing:
|
|
90
|
+
spacing: 2,
|
|
87
91
|
children: [/*#__PURE__*/_jsx(FormToggle, {
|
|
88
92
|
id: id,
|
|
89
93
|
checked: checked,
|
|
@@ -94,7 +98,9 @@ export function ToggleControl({
|
|
|
94
98
|
}), /*#__PURE__*/_jsx(FlexBlock, {
|
|
95
99
|
as: "label",
|
|
96
100
|
htmlFor: id,
|
|
97
|
-
className:
|
|
101
|
+
className: clsx('components-toggle-control__label', {
|
|
102
|
+
'is-disabled': disabled
|
|
103
|
+
}),
|
|
98
104
|
children: label
|
|
99
105
|
})]
|
|
100
106
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["css","forwardRef","useInstanceId","FlexBlock","FormToggle","BaseControl","HStack","useCx","space","jsx","_jsx","jsxs","_jsxs","ToggleControl","__nextHasNoMarginBottom","label","checked","help","className","onChange","disabled","ref","onChangeToggle","event","target","instanceId","id","cx","classes","marginBottom","process","env","NODE_ENV","describedBy","helpLabel","undefined","children","justify","spacing","as","htmlFor"],"sources":["@wordpress/components/src/toggle-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ChangeEvent, ForwardedRef } from 'react';\nimport { css } from '@emotion/react';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { FlexBlock } from '../flex';\nimport FormToggle from '../form-toggle';\nimport BaseControl from '../base-control';\nimport type { WordPressComponentProps } from '../context/wordpress-component';\nimport type { ToggleControlProps } from './types';\nimport { HStack } from '../h-stack';\nimport { useCx } from '../utils';\nimport { space } from '../utils/space';\n\n/**\n * ToggleControl is used to generate a toggle user interface.\n *\n * ```jsx\n * import { ToggleControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyToggleControl = () => {\n * const [ value, setValue ] = useState( false );\n *\n * return (\n * <ToggleControl\n * label=\"Fixed Background\"\n * checked={ value }\n * onChange={ () => setValue( ( state ) => ! state ) }\n * />\n * );\n * };\n * ```\n */\nexport function ToggleControl(\n\t{\n\t\t__nextHasNoMarginBottom,\n\t\tlabel,\n\t\tchecked,\n\t\thelp,\n\t\tclassName,\n\t\tonChange,\n\t\tdisabled,\n\t}: WordPressComponentProps< ToggleControlProps, 'input', false >,\n\tref: ForwardedRef< HTMLInputElement >\n) {\n\tfunction onChangeToggle( event: ChangeEvent< HTMLInputElement > ) {\n\t\tonChange( event.target.checked );\n\t}\n\tconst instanceId = useInstanceId( ToggleControl );\n\tconst id = `inspector-toggle-control-${ instanceId }`;\n\n\tconst cx = useCx();\n\tconst classes = cx(\n\t\t'components-toggle-control',\n\t\tclassName,\n\t\t! __nextHasNoMarginBottom && css( { marginBottom: space( 3 ) } )\n\t);\n\n\tlet describedBy, helpLabel;\n\tif ( help ) {\n\t\tif ( typeof help === 'function' ) {\n\t\t\t// `help` as a function works only for controlled components where\n\t\t\t// `checked` is passed down from parent component. Uncontrolled\n\t\t\t// component can show only a static help label.\n\t\t\tif ( checked !== undefined ) {\n\t\t\t\thelpLabel = help( checked );\n\t\t\t}\n\t\t} else {\n\t\t\thelpLabel = help;\n\t\t}\n\t\tif ( helpLabel ) {\n\t\t\tdescribedBy = id + '__help';\n\t\t}\n\t}\n\n\treturn (\n\t\t<BaseControl\n\t\t\tid={ id }\n\t\t\thelp={ helpLabel }\n\t\t\tclassName={ classes }\n\t\t\t__nextHasNoMarginBottom\n\t\t>\n\t\t\t<HStack justify=\"flex-start\" spacing={
|
|
1
|
+
{"version":3,"names":["css","clsx","forwardRef","useInstanceId","FlexBlock","FormToggle","BaseControl","HStack","useCx","space","jsx","_jsx","jsxs","_jsxs","ToggleControl","__nextHasNoMarginBottom","label","checked","help","className","onChange","disabled","ref","onChangeToggle","event","target","instanceId","id","cx","classes","marginBottom","process","env","NODE_ENV","describedBy","helpLabel","undefined","children","justify","spacing","as","htmlFor"],"sources":["@wordpress/components/src/toggle-control/index.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ChangeEvent, ForwardedRef } from 'react';\nimport { css } from '@emotion/react';\nimport clsx from 'clsx';\n\n/**\n * WordPress dependencies\n */\nimport { forwardRef } from '@wordpress/element';\nimport { useInstanceId } from '@wordpress/compose';\n\n/**\n * Internal dependencies\n */\nimport { FlexBlock } from '../flex';\nimport FormToggle from '../form-toggle';\nimport BaseControl from '../base-control';\nimport type { WordPressComponentProps } from '../context/wordpress-component';\nimport type { ToggleControlProps } from './types';\nimport { HStack } from '../h-stack';\nimport { useCx } from '../utils';\nimport { space } from '../utils/space';\n\n/**\n * ToggleControl is used to generate a toggle user interface.\n *\n * ```jsx\n * import { ToggleControl } from '@wordpress/components';\n * import { useState } from '@wordpress/element';\n *\n * const MyToggleControl = () => {\n * const [ value, setValue ] = useState( false );\n *\n * return (\n * <ToggleControl\n * label=\"Fixed Background\"\n * checked={ value }\n * onChange={ () => setValue( ( state ) => ! state ) }\n * />\n * );\n * };\n * ```\n */\nexport function ToggleControl(\n\t{\n\t\t__nextHasNoMarginBottom,\n\t\tlabel,\n\t\tchecked,\n\t\thelp,\n\t\tclassName,\n\t\tonChange,\n\t\tdisabled,\n\t}: WordPressComponentProps< ToggleControlProps, 'input', false >,\n\tref: ForwardedRef< HTMLInputElement >\n) {\n\tfunction onChangeToggle( event: ChangeEvent< HTMLInputElement > ) {\n\t\tonChange( event.target.checked );\n\t}\n\tconst instanceId = useInstanceId( ToggleControl );\n\tconst id = `inspector-toggle-control-${ instanceId }`;\n\n\tconst cx = useCx();\n\tconst classes = cx(\n\t\t'components-toggle-control',\n\t\tclassName,\n\t\t! __nextHasNoMarginBottom && css( { marginBottom: space( 3 ) } )\n\t);\n\n\tlet describedBy, helpLabel;\n\tif ( help ) {\n\t\tif ( typeof help === 'function' ) {\n\t\t\t// `help` as a function works only for controlled components where\n\t\t\t// `checked` is passed down from parent component. Uncontrolled\n\t\t\t// component can show only a static help label.\n\t\t\tif ( checked !== undefined ) {\n\t\t\t\thelpLabel = help( checked );\n\t\t\t}\n\t\t} else {\n\t\t\thelpLabel = help;\n\t\t}\n\t\tif ( helpLabel ) {\n\t\t\tdescribedBy = id + '__help';\n\t\t}\n\t}\n\n\treturn (\n\t\t<BaseControl\n\t\t\tid={ id }\n\t\t\thelp={\n\t\t\t\thelpLabel && (\n\t\t\t\t\t<span className=\"components-toggle-control__help\">\n\t\t\t\t\t\t{ helpLabel }\n\t\t\t\t\t</span>\n\t\t\t\t)\n\t\t\t}\n\t\t\tclassName={ classes }\n\t\t\t__nextHasNoMarginBottom\n\t\t>\n\t\t\t<HStack justify=\"flex-start\" spacing={ 2 }>\n\t\t\t\t<FormToggle\n\t\t\t\t\tid={ id }\n\t\t\t\t\tchecked={ checked }\n\t\t\t\t\tonChange={ onChangeToggle }\n\t\t\t\t\taria-describedby={ describedBy }\n\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\tref={ ref }\n\t\t\t\t/>\n\t\t\t\t<FlexBlock\n\t\t\t\t\tas=\"label\"\n\t\t\t\t\thtmlFor={ id }\n\t\t\t\t\tclassName={ clsx( 'components-toggle-control__label', {\n\t\t\t\t\t\t'is-disabled': disabled,\n\t\t\t\t\t} ) }\n\t\t\t\t>\n\t\t\t\t\t{ label }\n\t\t\t\t</FlexBlock>\n\t\t\t</HStack>\n\t\t</BaseControl>\n\t);\n}\n\nexport default forwardRef( ToggleControl );\n"],"mappings":"AAAA;AACA;AACA;;AAEA,SAASA,GAAG,QAAQ,gBAAgB;AACpC,OAAOC,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA,SAASC,UAAU,QAAQ,oBAAoB;AAC/C,SAASC,aAAa,QAAQ,oBAAoB;;AAElD;AACA;AACA;AACA,SAASC,SAAS,QAAQ,SAAS;AACnC,OAAOC,UAAU,MAAM,gBAAgB;AACvC,OAAOC,WAAW,MAAM,iBAAiB;AAGzC,SAASC,MAAM,QAAQ,YAAY;AACnC,SAASC,KAAK,QAAQ,UAAU;AAChC,SAASC,KAAK,QAAQ,gBAAgB;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAnBA,SAAAC,GAAA,IAAAC,IAAA;AAAA,SAAAC,IAAA,IAAAC,KAAA;AAoBA,OAAO,SAAS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