@wordpress/components 28.3.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 +39 -0
- package/CONTRIBUTING.md +1 -1
- package/build/autocomplete/types.js.map +1 -1
- package/build/base-control/types.js.map +1 -1
- package/build/button/index.js +9 -7
- 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 +9 -0
- package/build/combobox-control/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 +4 -1
- 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/styles.js +25 -9
- package/build/custom-select-control-v2/styles.js.map +1 -1
- package/build/custom-select-control-v2/types.js.map +1 -1
- package/build/dropdown-menu-v2/styles.js +14 -14
- package/build/dropdown-menu-v2/styles.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 +4 -4
- package/build/font-size-picker/font-size-picker-select.js.map +1 -1
- package/build/font-size-picker/index.js +36 -24
- package/build/font-size-picker/index.js.map +1 -1
- package/build/font-size-picker/types.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/index.js +2 -2
- package/build/index.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/private-apis.js +0 -4
- package/build/private-apis.js.map +1 -1
- package/build/radio-control/index.js +1 -1
- package/build/radio-control/index.js.map +1 -1
- package/build/range-control/index.js +1 -0
- package/build/range-control/index.js.map +1 -1
- package/build/select-control/index.js +5 -0
- package/build/select-control/index.js.map +1 -1
- package/build/select-control/styles/select-control-styles.js +42 -11
- package/build/select-control/styles/select-control-styles.js.map +1 -1
- package/build/select-control/types.js.map +1 -1
- package/build/tabs/styles.js +3 -3
- package/build/tabs/styles.js.map +1 -1
- package/build/tabs/tablist.js +4 -189
- package/build/tabs/tablist.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-option-base/component.js +3 -0
- 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/tools-panel/tools-panel-header/component.js +1 -1
- package/build/tools-panel/tools-panel-header/component.js.map +1 -1
- package/build/tree-select/index.js +1 -0
- package/build/tree-select/index.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-module/autocomplete/types.js.map +1 -1
- package/build-module/base-control/types.js.map +1 -1
- package/build-module/button/index.js +9 -7
- 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 +9 -0
- package/build-module/combobox-control/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 +4 -1
- 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/styles.js +26 -10
- 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/dropdown-menu-v2/styles.js +14 -14
- package/build-module/dropdown-menu-v2/styles.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 +3 -3
- package/build-module/font-size-picker/font-size-picker-select.js.map +1 -1
- package/build-module/font-size-picker/index.js +36 -24
- 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/form-token-field/index.js +8 -0
- package/build-module/form-token-field/index.js.map +1 -1
- package/build-module/index.js +1 -1
- package/build-module/index.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/private-apis.js +0 -4
- package/build-module/private-apis.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/range-control/index.js +1 -0
- package/build-module/range-control/index.js.map +1 -1
- package/build-module/select-control/index.js +5 -0
- package/build-module/select-control/index.js.map +1 -1
- package/build-module/select-control/styles/select-control-styles.js +41 -6
- 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/tabs/styles.js +3 -3
- package/build-module/tabs/styles.js.map +1 -1
- package/build-module/tabs/tablist.js +3 -188
- package/build-module/tabs/tablist.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-option-base/component.js +3 -0
- 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/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/tree-select/index.js +1 -0
- package/build-module/tree-select/index.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-style/style-rtl.css +67 -100
- package/build-style/style.css +67 -100
- 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/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 +0 -1
- 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 +9 -2
- 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/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 +0 -1
- 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} +10 -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 +30 -31
- package/build-types/custom-select-control-v2/styles.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/types.d.ts +0 -106
- 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/time/index.d.ts +0 -1
- 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 +0 -1
- package/build-types/date-time/time-input/index.d.ts.map +1 -1
- package/build-types/date-time/types.d.ts +0 -1
- package/build-types/date-time/types.d.ts.map +1 -1
- package/build-types/date-time/utils.d.ts +3 -4
- 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/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 +9 -10
- 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/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 +0 -1
- 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/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 +0 -1
- 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 +7 -8
- 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/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-button/index.d.ts +0 -1
- 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-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 -3
- 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 +0 -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 +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/autocomplete/README.md +2 -2
- package/src/autocomplete/types.ts +2 -3
- package/src/base-control/README.md +1 -1
- package/src/base-control/types.ts +1 -1
- package/src/button/README.md +1 -1
- package/src/button/index.tsx +9 -7
- package/src/button/test/index.tsx +17 -4
- package/src/button/types.ts +9 -2
- 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 +11 -0
- package/src/combobox-control/test/index.tsx +127 -1
- package/src/custom-select-control/README.md +34 -32
- package/src/{custom-select-control-v2/legacy-component → custom-select-control}/index.tsx +60 -37
- 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 +57 -61
- package/src/custom-select-control/types.ts +123 -0
- package/src/custom-select-control-v2/custom-select.tsx +2 -0
- package/src/custom-select-control-v2/index.tsx +26 -1
- package/src/custom-select-control-v2/stories/{default.story.tsx → index.story.tsx} +1 -1
- package/src/custom-select-control-v2/styles.ts +28 -3
- package/src/custom-select-control-v2/types.ts +0 -109
- package/src/dimension-control/test/__snapshots__/index.test.js.snap +4 -0
- package/src/disabled/README.md +1 -1
- package/src/dropdown/stories/index.story.tsx +55 -50
- package/src/dropdown-menu/stories/index.story.tsx +52 -55
- package/src/dropdown-menu-v2/stories/index.story.tsx +0 -12
- package/src/dropdown-menu-v2/styles.ts +3 -3
- 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 +3 -3
- package/src/font-size-picker/index.tsx +68 -64
- package/src/font-size-picker/test/index.tsx +83 -15
- package/src/font-size-picker/types.ts +6 -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/higher-order/navigate-regions/style.scss +3 -15
- package/src/index.ts +1 -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/popover/stories/index.story.tsx +155 -153
- package/src/private-apis.ts +0 -4
- package/src/radio-control/index.tsx +1 -1
- package/src/radio-control/style.scss +6 -1
- package/src/range-control/README.md +8 -0
- package/src/range-control/index.tsx +1 -0
- package/src/resizable-box/resize-tooltip/README.md +1 -1
- package/src/select-control/README.md +8 -0
- package/src/select-control/index.tsx +7 -0
- package/src/select-control/stories/index.story.tsx +6 -0
- package/src/select-control/styles/select-control-styles.ts +24 -1
- package/src/select-control/types.ts +6 -0
- package/src/style.scss +1 -1
- package/src/tabs/styles.ts +10 -2
- package/src/tabs/tablist.tsx +3 -243
- package/src/textarea-control/README.md +8 -0
- package/src/textarea-control/index.tsx +1 -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-option-base/component.tsx +6 -1
- package/src/toggle-group-control/toggle-group-control-option-base/styles.ts +5 -0
- package/src/tools-panel/tools-panel-header/component.tsx +1 -1
- package/src/tree-select/README.md +9 -0
- package/src/tree-select/index.tsx +1 -0
- 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/tsconfig.tsbuildinfo +1 -1
- package/build/custom-select-control-v2/default-component/index.js +0 -42
- package/build/custom-select-control-v2/default-component/index.js.map +0 -1
- package/build/custom-select-control-v2/legacy-component/index.js +0 -131
- 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 -31
- 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 -122
- 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 -665
- package/src/custom-select-control-v2/default-component/index.tsx +0 -29
- 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
|
@@ -15,17 +15,17 @@ export const TabListWrapper = /*#__PURE__*/_styled("div", process.env.NODE_ENV =
|
|
|
15
15
|
} : {
|
|
16
16
|
target: "enfox0g2",
|
|
17
17
|
label: "TabListWrapper"
|
|
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,
|
|
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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvdGFicy9zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBWXdDIiwiZmlsZSI6IkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvdGFicy9zdHlsZXMudHMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XG5pbXBvcnQgKiBhcyBBcmlha2l0IGZyb20gJ0Bhcmlha2l0L3JlYWN0JztcblxuLyoqXG4gKiBJbnRlcm5hbCBkZXBlbmRlb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G93OiAwIDAgMCB2YXIoIC0td3AtYWRtaW4tYm9yZGVyLXdpZHRoLWZvY3VzIClcblx0XHRcdCR7IENPTE9SUy50aGVtZS5hY2NlbnQgfTtcblx0XHQvLyBXaW5kb3dzIGhpZ2ggY29udHJhc3QgbW9kZS5cblx0XHRvdXRsaW5lOiAycHggc29saWQgdHJhbnNwYXJlbnQ7XG5cdFx0b3V0bGluZS1vZmZzZXQ6IDA7XG5cdH1cbmA7XG4iXX0= */"));
|
|
19
19
|
export const Tab = /*#__PURE__*/_styled(Ariakit.Tab, process.env.NODE_ENV === "production" ? {
|
|
20
20
|
target: "enfox0g1"
|
|
21
21
|
} : {
|
|
22
22
|
target: "enfox0g1",
|
|
23
23
|
label: "Tab"
|
|
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;&[aria-disabled='true']{cursor:default;
|
|
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,eyJ2Z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bnRhdGlvbj0ndmVydGljYWwnXSAmIHtcblx0XHRtaW4taGVpZ2h0OiAkeyBzcGFjZShcblx0XHRcdDEwXG5cdFx0KSB9OyAvLyBBdm9pZCBmaXhlZCBoZWlnaHQgdG8gYWxsb3cgZm9yIGxvbmcgc3RyaW5ncyB0aGF0IGdvIGluIG11bHRpcGxlIGxpbmVzLlxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgVGFiUGFuZWwgPSBzdHlsZWQoIEFyaWFraXQuVGFiUGFuZWwgKWBcblx0Jjpmb2N1cyB7XG5cdFx0Ym94LXNoYWRvdzogbm9uZTtcblx0XHRvdXRsaW5lOiBub25lO1xuXHR9XG5cblx0Jjpmb2N1cy12aXNpYmxlIHtcblx0XHRib3JkZXItcmFkaXVzOiAycHg7XG5cdFx0Ym94LXNoYWRvdzogMCAwIDAgdmFyKCAtLXdwLWFkbWluLWJvcmRlci13aWR0aC1mb2N1cyApXG5cdFx0XHQkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdFx0Ly8gV2luZG93cyBoaWdoIGNvbnRyYXN0IG1vZGUuXG5cdFx0b3V0bGluZTogMnB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXHRcdG91dGxpbmUtb2Zmc2V0OiAwO1xuXHR9XG5gO1xuIl19 */"));
|
|
25
25
|
export const TabPanel = /*#__PURE__*/_styled(Ariakit.TabPanel, process.env.NODE_ENV === "production" ? {
|
|
26
26
|
target: "enfox0g0"
|
|
27
27
|
} : {
|
|
28
28
|
target: "enfox0g0",
|
|
29
29
|
label: "TabPanel"
|
|
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,
|
|
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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvdGFicy9zdHlsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBbUlrRCIsImZpbGUiOiJAd29yZHByZXNzL2NvbXBvbmVudHMvc3JjL3RhYnMvc3R5bGVzLnRzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBFeHRlcm5hbCBkZXBlbmRlbmNpZXNcbiAqL1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xuaW1wb3J0ICogYXMgQXJpYWtpdCBmcm9tICdAYXJpYWtpdC9yZWFjdCc7XG5cbi8qKlxuICogSW50ZXJuYWwgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IENPTE9SUyB9IGZyb20gJy4uL3V0aWxzJztcbmltcG9ydCB7IHNwYWNlIH0gZnJvbSAnLi4vdXRpbHMvc3BhY2UnO1xuXG5leHBvcnQgY29uc3QgVGFiTGlzdFdyYXBwZXIgPSBzdHlsZWQuZGl2YFxuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdGRpc3BsYXk6IGZsZXg7XG5cdGFsaWduLWl0ZW1zOiBzdHJldGNoO1xuXHRmbGV4LWRpcmVjdGlvbjogcm93O1xuXHR0ZXh0LWFsaWduOiBjZW50ZXI7XG5cblx0JlthcmlhLW9yaWVudGF0aW9uPSd2ZXJ0aWNhbCddIHtcblx0XHRmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuXHRcdHRleHQtYWxpZ246IHN0YXJ0O1xuXHR9XG5cblx0QG1lZGlhIG5vdCAoIHByZWZlcnMtcmVkdWNlZC1tb3Rpb246IHJlZHVjZSApIHtcblx0XH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5cdFx0XHR9XG5cdFx0fVxuXG5cdFx0Jjpmb2N1cy12aXNpYmxlOjpiZWZvcmUge1xuXHRcdFx0b3BhY2l0eTogMTtcblx0XHR9XG5cdH1cblxuXHRbYXJpYS1vcmllbnRhdGlvbj0ndmVydGljYWwnXSAmIHtcblx0XHRtaW4taGVpZ2h0OiAkeyBzcGFjZShcblx0XHRcdDEwXG5cdFx0KSB9OyAvLyBBdm9pZCBmaXhlZCBoZWlnaHQgdG8gYWxsb3cgZm9yIGxvbmcgc3RyaW5ncyB0aGF0IGdvIGluIG11bHRpcGxlIGxpbmVzLlxuXHR9XG5gO1xuXG5leHBvcnQgY29uc3QgVGFiUGFuZWwgPSBzdHlsZWQoIEFyaWFraXQuVGFiUGFuZWwgKWBcblx0Jjpmb2N1cyB7XG5cdFx0Ym94LXNoYWRvdzogbm9uZTtcblx0XHRvdXRsaW5lOiBub25lO1xuXHR9XG5cblx0Jjpmb2N1cy12aXNpYmxlIHtcblx0XHRib3JkZXItcmFkaXVzOiAycHg7XG5cdFx0Ym94LXNoYWRvdzogMCAwIDAgdmFyKCAtLXdwLWFkbWluLWJvcmRlci13aWR0aC1mb2N1cyApXG5cdFx0XHQkeyBDT0xPUlMudGhlbWUuYWNjZW50IH07XG5cdFx0Ly8gV2luZG93cyBoaWdoIGNvbnRyYXN0IG1vZGUuXG5cdFx0b3V0bGluZTogMnB4IHNvbGlkIHRyYW5zcGFyZW50O1xuXHRcdG91dGxpbmUtb2Zmc2V0OiAwO1xuXHR9XG5gO1xuIl19 */"));
|
|
31
31
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Ariakit","COLORS","space","TabListWrapper","_styled","process","env","NODE_ENV","target","label","theme","accent","gray","Tab","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\n\t\t&[aria-disabled='true'] {\n\t\t\tcursor: default;\n\t\t\
|
|
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":[]}
|
|
@@ -7,7 +7,7 @@ import * as Ariakit from '@ariakit/react';
|
|
|
7
7
|
* WordPress dependencies
|
|
8
8
|
*/
|
|
9
9
|
import warning from '@wordpress/warning';
|
|
10
|
-
import { forwardRef,
|
|
10
|
+
import { forwardRef, useState } from '@wordpress/element';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Internal dependencies
|
|
@@ -16,194 +16,9 @@ import { forwardRef, useCallback, useEffect, useInsertionEffect, useRef, useStat
|
|
|
16
16
|
import { useTabsContext } from './context';
|
|
17
17
|
import { TabListWrapper } from './styles';
|
|
18
18
|
import clsx from 'clsx';
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
// such as ToggleGroupControl.
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Any function.
|
|
25
|
-
*/
|
|
19
|
+
import { useTrackElementOffsetRect } from '../utils/element-rect';
|
|
20
|
+
import { useOnValueUpdate } from '../utils/hooks/use-on-value-update';
|
|
26
21
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
27
|
-
/**
|
|
28
|
-
* Creates a stable callback function that has access to the latest state and
|
|
29
|
-
* can be used within event handlers and effect callbacks. Throws when used in
|
|
30
|
-
* the render phase.
|
|
31
|
-
*
|
|
32
|
-
* @example
|
|
33
|
-
*
|
|
34
|
-
* ```tsx
|
|
35
|
-
* function Component(props) {
|
|
36
|
-
* const onClick = useEvent(props.onClick);
|
|
37
|
-
* React.useEffect(() => {}, [onClick]);
|
|
38
|
-
* }
|
|
39
|
-
* ```
|
|
40
|
-
*/
|
|
41
|
-
function useEvent(callback) {
|
|
42
|
-
const ref = useRef(() => {
|
|
43
|
-
throw new Error('Cannot call an event handler while rendering.');
|
|
44
|
-
});
|
|
45
|
-
useInsertionEffect(() => {
|
|
46
|
-
ref.current = callback;
|
|
47
|
-
});
|
|
48
|
-
return useCallback((...args) => ref.current?.(...args), []);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* `useResizeObserver` options.
|
|
53
|
-
*/
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Fires `onResize` when the target element is resized.
|
|
57
|
-
*
|
|
58
|
-
* **The element must not be stored in a ref**, else it won't be observed
|
|
59
|
-
* or updated. Instead, it should be stored in a React state or equivalent.
|
|
60
|
-
*
|
|
61
|
-
* It sets up a `ResizeObserver` that tracks the element under the hood. The
|
|
62
|
-
* target element can be changed dynamically, and the observer will be
|
|
63
|
-
* updated accordingly.
|
|
64
|
-
*
|
|
65
|
-
* By default, `onResize` is called when the observer is set up, in addition
|
|
66
|
-
* to when the element is resized. This behavior can be disabled with the
|
|
67
|
-
* `fireOnObserve` option.
|
|
68
|
-
*
|
|
69
|
-
* @example
|
|
70
|
-
*
|
|
71
|
-
* ```tsx
|
|
72
|
-
* const [ targetElement, setTargetElement ] = useState< HTMLElement | null >();
|
|
73
|
-
*
|
|
74
|
-
* useResizeObserver( targetElement, ( element ) => {
|
|
75
|
-
* console.log( 'Element resized:', element );
|
|
76
|
-
* } );
|
|
77
|
-
*
|
|
78
|
-
* <div ref={ setTargetElement } />;
|
|
79
|
-
* ```
|
|
80
|
-
*/
|
|
81
|
-
function useResizeObserver(
|
|
82
|
-
/**
|
|
83
|
-
* The target element to observe. It can be changed dynamically.
|
|
84
|
-
*/
|
|
85
|
-
targetElement,
|
|
86
|
-
/**
|
|
87
|
-
* Callback to fire when the element is resized. It will also be
|
|
88
|
-
* called when the observer is set up, unless `fireOnObserve` is
|
|
89
|
-
* set to `false`.
|
|
90
|
-
*/
|
|
91
|
-
onResize, {
|
|
92
|
-
fireOnObserve = true
|
|
93
|
-
} = {}) {
|
|
94
|
-
const onResizeEvent = useEvent(onResize);
|
|
95
|
-
const observedElementRef = useRef();
|
|
96
|
-
const resizeObserverRef = useRef();
|
|
97
|
-
useEffect(() => {
|
|
98
|
-
if (targetElement === observedElementRef.current) {
|
|
99
|
-
return;
|
|
100
|
-
}
|
|
101
|
-
observedElementRef.current = targetElement;
|
|
102
|
-
|
|
103
|
-
// Set up a ResizeObserver.
|
|
104
|
-
if (!resizeObserverRef.current) {
|
|
105
|
-
resizeObserverRef.current = new ResizeObserver(() => {
|
|
106
|
-
if (observedElementRef.current) {
|
|
107
|
-
onResizeEvent(observedElementRef.current);
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
const {
|
|
112
|
-
current: resizeObserver
|
|
113
|
-
} = resizeObserverRef;
|
|
114
|
-
|
|
115
|
-
// Observe new element.
|
|
116
|
-
if (targetElement) {
|
|
117
|
-
if (fireOnObserve) {
|
|
118
|
-
onResizeEvent(targetElement);
|
|
119
|
-
}
|
|
120
|
-
resizeObserver.observe(targetElement);
|
|
121
|
-
}
|
|
122
|
-
return () => {
|
|
123
|
-
// Unobserve previous element.
|
|
124
|
-
if (observedElementRef.current) {
|
|
125
|
-
resizeObserver.unobserve(observedElementRef.current);
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
|
-
}, [fireOnObserve, onResizeEvent, targetElement]);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* The position and dimensions of an element, relative to its offset parent.
|
|
133
|
-
*/
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* An `ElementOffsetRect` object with all values set to zero.
|
|
137
|
-
*/
|
|
138
|
-
const NULL_ELEMENT_OFFSET_RECT = {
|
|
139
|
-
left: 0,
|
|
140
|
-
top: 0,
|
|
141
|
-
width: 0,
|
|
142
|
-
height: 0
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* Returns the position and dimensions of an element, relative to its offset
|
|
147
|
-
* parent. This is useful in contexts where `getBoundingClientRect` is not
|
|
148
|
-
* suitable, such as when the element is transformed.
|
|
149
|
-
*
|
|
150
|
-
* **Note:** the `left` and `right` values are adjusted due to a limitation
|
|
151
|
-
* in the way the browser calculates the offset position of the element,
|
|
152
|
-
* which can cause unwanted scrollbars to appear. This adjustment makes the
|
|
153
|
-
* values potentially inaccurate within a range of 1 pixel.
|
|
154
|
-
*/
|
|
155
|
-
function getElementOffsetRect(element) {
|
|
156
|
-
return {
|
|
157
|
-
// The adjustments mentioned in the documentation above are necessary
|
|
158
|
-
// because `offsetLeft` and `offsetTop` are rounded to the nearest pixel,
|
|
159
|
-
// which can result in a position mismatch that causes unwanted overflow.
|
|
160
|
-
// For context, see: https://github.com/WordPress/gutenberg/pull/61979
|
|
161
|
-
left: Math.max(element.offsetLeft - 1, 0),
|
|
162
|
-
top: Math.max(element.offsetTop - 1, 0),
|
|
163
|
-
// This is a workaround to obtain these values with a sub-pixel precision,
|
|
164
|
-
// since `offsetWidth` and `offsetHeight` are rounded to the nearest pixel.
|
|
165
|
-
width: parseFloat(getComputedStyle(element).width),
|
|
166
|
-
height: parseFloat(getComputedStyle(element).height)
|
|
167
|
-
};
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
* Tracks the position and dimensions of an element, relative to its offset
|
|
172
|
-
* parent. The element can be changed dynamically.
|
|
173
|
-
*/
|
|
174
|
-
function useTrackElementOffsetRect(targetElement) {
|
|
175
|
-
const [indicatorPosition, setIndicatorPosition] = useState(NULL_ELEMENT_OFFSET_RECT);
|
|
176
|
-
useResizeObserver(targetElement, element => setIndicatorPosition(getElementOffsetRect(element)));
|
|
177
|
-
return indicatorPosition;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* Context object for the `onUpdate` callback of `useOnValueUpdate`.
|
|
182
|
-
*/
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* Calls the `onUpdate` callback when the `value` changes.
|
|
186
|
-
*/
|
|
187
|
-
function useOnValueUpdate(
|
|
188
|
-
/**
|
|
189
|
-
* The value to watch for changes.
|
|
190
|
-
*/
|
|
191
|
-
value,
|
|
192
|
-
/**
|
|
193
|
-
* Callback to fire when the value changes.
|
|
194
|
-
*/
|
|
195
|
-
onUpdate) {
|
|
196
|
-
const previousValueRef = useRef(value);
|
|
197
|
-
const updateCallbackEvent = useEvent(onUpdate);
|
|
198
|
-
useEffect(() => {
|
|
199
|
-
if (previousValueRef.current !== value) {
|
|
200
|
-
updateCallbackEvent({
|
|
201
|
-
previousValue: previousValueRef.current
|
|
202
|
-
});
|
|
203
|
-
previousValueRef.current = value;
|
|
204
|
-
}
|
|
205
|
-
}, [updateCallbackEvent, value]);
|
|
206
|
-
}
|
|
207
22
|
export const TabList = forwardRef(function TabList({
|
|
208
23
|
children,
|
|
209
24
|
...otherProps
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Ariakit","warning","forwardRef","useCallback","useEffect","useInsertionEffect","useRef","useState","useTabsContext","TabListWrapper","clsx","jsx","_jsx","useEvent","callback","ref","Error","current","args","useResizeObserver","targetElement","onResize","fireOnObserve","onResizeEvent","observedElementRef","resizeObserverRef","ResizeObserver","resizeObserver","observe","unobserve","NULL_ELEMENT_OFFSET_RECT","left","top","width","height","getElementOffsetRect","element","Math","max","offsetLeft","offsetTop","parseFloat","getComputedStyle","useTrackElementOffsetRect","indicatorPosition","setIndicatorPosition","useOnValueUpdate","value","onUpdate","previousValueRef","updateCallbackEvent","previousValue","TabList","children","otherProps","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 */\nimport * as Ariakit from '@ariakit/react';\n\n/**\n * WordPress dependencies\n */\nimport warning from '@wordpress/warning';\nimport {\n\tforwardRef,\n\tuseCallback,\n\tuseEffect,\n\tuseInsertionEffect,\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\n// TODO: move these into a separate utility file, for use in other components\n// such as ToggleGroupControl.\n\n/**\n * Any function.\n */\ntype AnyFunction = ( ...args: any ) => any;\n\n/**\n * Creates a stable callback function that has access to the latest state and\n * can be used within event handlers and effect callbacks. Throws when used in\n * the render phase.\n *\n * @example\n *\n * ```tsx\n * function Component(props) {\n * const onClick = useEvent(props.onClick);\n * React.useEffect(() => {}, [onClick]);\n * }\n * ```\n */\nfunction useEvent< T extends AnyFunction >( callback?: T ) {\n\tconst ref = useRef< AnyFunction | undefined >( () => {\n\t\tthrow new Error( 'Cannot call an event handler while rendering.' );\n\t} );\n\tuseInsertionEffect( () => {\n\t\tref.current = callback;\n\t} );\n\treturn useCallback< AnyFunction >(\n\t\t( ...args ) => ref.current?.( ...args ),\n\t\t[]\n\t) as T;\n}\n\n/**\n * `useResizeObserver` options.\n */\ntype UseResizeObserverOptions = {\n\t/**\n\t * Whether to trigger the callback when an element's ResizeObserver is\n\t * first set up.\n\t *\n\t * @default true\n\t */\n\tfireOnObserve?: boolean;\n};\n\n/**\n * Fires `onResize` when the target element is resized.\n *\n * **The element must not be stored in a ref**, else it won't be observed\n * or updated. Instead, it should be stored in a React state or equivalent.\n *\n * It sets up a `ResizeObserver` that tracks the element under the hood. The\n * target element can be changed dynamically, and the observer will be\n * updated accordingly.\n *\n * By default, `onResize` is called when the observer is set up, in addition\n * to when the element is resized. This behavior can be disabled with the\n * `fireOnObserve` option.\n *\n * @example\n *\n * ```tsx\n * const [ targetElement, setTargetElement ] = useState< HTMLElement | null >();\n *\n * useResizeObserver( targetElement, ( element ) => {\n * console.log( 'Element resized:', element );\n * } );\n *\n * <div ref={ setTargetElement } />;\n * ```\n */\nfunction useResizeObserver(\n\t/**\n\t * The target element to observe. It can be changed dynamically.\n\t */\n\ttargetElement: HTMLElement | undefined | null,\n\n\t/**\n\t * Callback to fire when the element is resized. It will also be\n\t * called when the observer is set up, unless `fireOnObserve` is\n\t * set to `false`.\n\t */\n\tonResize: ( element: HTMLElement ) => void,\n\t{ fireOnObserve = true }: UseResizeObserverOptions = {}\n) {\n\tconst onResizeEvent = useEvent( onResize );\n\n\tconst observedElementRef = useRef< HTMLElement | null >();\n\tconst resizeObserverRef = useRef< ResizeObserver >();\n\n\tuseEffect( () => {\n\t\tif ( targetElement === observedElementRef.current ) {\n\t\t\treturn;\n\t\t}\n\n\t\tobservedElementRef.current = targetElement;\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\tonResizeEvent( 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\tif ( fireOnObserve ) {\n\t\t\t\tonResizeEvent( targetElement );\n\t\t\t}\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}, [ fireOnObserve, onResizeEvent, targetElement ] );\n}\n\n/**\n * The position and dimensions of an element, relative to its offset parent.\n */\ntype ElementOffsetRect = {\n\t/**\n\t * The distance from the left edge of the offset parent to the left edge of\n\t * the element.\n\t */\n\tleft: number;\n\t/**\n\t * The distance from the top edge of the offset parent to the top edge of\n\t * the element.\n\t */\n\ttop: number;\n\t/**\n\t * The width of the element.\n\t */\n\twidth: number;\n\t/**\n\t * The height of the element.\n\t */\n\theight: number;\n};\n\n/**\n * An `ElementOffsetRect` object with all values set to zero.\n */\nconst NULL_ELEMENT_OFFSET_RECT = {\n\tleft: 0,\n\ttop: 0,\n\twidth: 0,\n\theight: 0,\n} satisfies ElementOffsetRect;\n\n/**\n * Returns the position and dimensions of an element, relative to its offset\n * parent. This is useful in contexts where `getBoundingClientRect` is not\n * suitable, such as when the element is transformed.\n *\n * **Note:** the `left` and `right` values are adjusted due to a limitation\n * in the way the browser calculates the offset position of the element,\n * which can cause unwanted scrollbars to appear. This adjustment makes the\n * values potentially inaccurate within a range of 1 pixel.\n */\nfunction getElementOffsetRect( element: HTMLElement ): ElementOffsetRect {\n\treturn {\n\t\t// The adjustments mentioned in the documentation above are necessary\n\t\t// because `offsetLeft` and `offsetTop` are rounded to the nearest pixel,\n\t\t// which can result in a position mismatch that causes unwanted overflow.\n\t\t// For context, see: https://github.com/WordPress/gutenberg/pull/61979\n\t\tleft: Math.max( element.offsetLeft - 1, 0 ),\n\t\ttop: Math.max( element.offsetTop - 1, 0 ),\n\t\t// This is a workaround to obtain these values with a sub-pixel precision,\n\t\t// since `offsetWidth` and `offsetHeight` are rounded to the nearest pixel.\n\t\twidth: parseFloat( getComputedStyle( element ).width ),\n\t\theight: parseFloat( getComputedStyle( element ).height ),\n\t};\n}\n\n/**\n * Tracks the position and dimensions of an element, relative to its offset\n * parent. The element can be changed dynamically.\n */\nfunction useTrackElementOffsetRect(\n\ttargetElement: HTMLElement | undefined | null\n) {\n\tconst [ indicatorPosition, setIndicatorPosition ] =\n\t\tuseState< ElementOffsetRect >( NULL_ELEMENT_OFFSET_RECT );\n\n\tuseResizeObserver( targetElement, ( element ) =>\n\t\tsetIndicatorPosition( getElementOffsetRect( element ) )\n\t);\n\n\treturn indicatorPosition;\n}\n\n/**\n * Context object for the `onUpdate` callback of `useOnValueUpdate`.\n */\ntype ValueUpdateContext< T > = {\n\tpreviousValue: T;\n};\n\n/**\n * Calls the `onUpdate` callback when the `value` changes.\n */\nfunction useOnValueUpdate< T >(\n\t/**\n\t * The value to watch for changes.\n\t */\n\tvalue: T,\n\t/**\n\t * Callback to fire when the value changes.\n\t */\n\tonUpdate: ( context: ValueUpdateContext< T > ) => void\n) {\n\tconst previousValueRef = useRef( value );\n\tconst updateCallbackEvent = useEvent( onUpdate );\n\tuseEffect( () => {\n\t\tif ( previousValueRef.current !== value ) {\n\t\t\tupdateCallbackEvent( {\n\t\t\t\tpreviousValue: previousValueRef.current,\n\t\t\t} );\n\t\t\tpreviousValueRef.current = value;\n\t\t}\n\t}, [ updateCallbackEvent, 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 = 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,SACCC,UAAU,EACVC,WAAW,EACXC,SAAS,EACTC,kBAAkB,EAClBC,MAAM,EACNC,QAAQ,QACF,oBAAoB;;AAE3B;AACA;AACA;;AAEA,SAASC,cAAc,QAAQ,WAAW;AAC1C,SAASC,cAAc,QAAQ,UAAU;AAEzC,OAAOC,IAAI,MAAM,MAAM;;AAEvB;AACA;;AAEA;AACA;AACA;AAFA,SAAAC,GAAA,IAAAC,IAAA;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,QAAQA,CAA2BC,QAAY,EAAG;EAC1D,MAAMC,GAAG,GAAGT,MAAM,CAA6B,MAAM;IACpD,MAAM,IAAIU,KAAK,CAAE,+CAAgD,CAAC;EACnE,CAAE,CAAC;EACHX,kBAAkB,CAAE,MAAM;IACzBU,GAAG,CAACE,OAAO,GAAGH,QAAQ;EACvB,CAAE,CAAC;EACH,OAAOX,WAAW,CACjB,CAAE,GAAGe,IAAI,KAAMH,GAAG,CAACE,OAAO,GAAI,GAA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KR,UAAU,KAAKO,QAAQ,EAAG;MAC9BE,WAAW,CAAET,UAAW,CAAC;IAC1B;EACD,CAAC;EAED,oBACC5C,IAAA,CAACZ,OAAO,CAACoD,OAAO;IACfrC,GAAG,EAAGA,GAAK;IACX0C,KAAK,EAAGA,KAAO;IACfU,MAAM,eACLvD,IAAA,CAACH,cAAc;MACd2D,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,GACZZ,UAAU;IACfiB,KAAK,EAAG;MACP,kBAAkB,EAAG,GAAG3B,iBAAiB,CAACb,IAAM,IAAG;MACnD,iBAAiB,EAAG,GAAGa,iBAAiB,CAACZ,GAAK,IAAG;MACjD,mBAAmB,EAAG,GAAGY,iBAAiB,CAACX,KAAO,IAAG;MACrD,oBAAoB,EAAG,GAAGW,iBAAiB,CAACV,MAAQ,IAAG;MACvD,GAAGoB,UAAU,CAACiB;IACf,CAAG;IACHC,SAAS,EAAG9D,IAAI,CACfiD,gBAAgB,GAAG,sBAAsB,GAAG,EAAE,EAC9CL,UAAU,CAACkB,SACZ,CAAG;IAAAnB,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,gBAAgB,EAAEC,mBAAmB,CAAE,GAAGnB,QAAQ,CAAE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C,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":["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,SAAS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
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,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkB3b3JkcHJlc3MvY29tcG9uZW50cy9zcmMvdG9nZ2xlLWNvbnRyb2wvaW5kZXgudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1FK0IiLCJmaWxlIjoiQHdvcmRwcmVzcy9jb21wb25lbnRzL3NyYy90b2dnbGUtY29udHJvbC9pbmRleC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEV4dGVybmFsIGRlcGVuZGVuY2llc1xuICovXG5pbXBvcnQgdHlwZSB7IENoYW5nZUV2ZW50LCBGb3J3YXJkZWRSZWYgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgY2xzeCBmcm9tICdjbHN4JztcblxuLyoqXG4gKiBXb3JkUHJlc3MgZGVwZW5kZW5jaWVzXG4gKi9cbmltcG9ydCB7IGZvcndhcmRSZWYgfSBmcm9tICdAd29yZHByZXNzL2VsZW1lbnQnO1xuaW1wb3J0IHsgdXNlSW5zdGFuY2VJZCB9IGZyb20gJ0B3b3JkcHJlc3MvY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m1Ub2dnbGVcblx0XHRcdFx0XHRpZD17IGlkIH1cblx0XHRcdFx0XHRjaGVja2VkPXsgY2hlY2tlZCB9XG5cdFx0XHRcdFx0b25DaGFuZ2U9eyBvbkNoYW5nZVRvZ2dsZSB9XG5cdFx0XHRcdFx0YXJpYS1kZXNjcmliZWRieT17IGRlc2NyaWJlZEJ5IH1cblx0XHRcdFx0XHRkaXNhYmxlZD17IGRpc2FibGVkIH1cblx0XHRcdFx0XHRyZWY9eyByZWYgfVxuXHRcdFx0XHQvPlxuXHRcdFx0XHQ8RmxleEJsb2NrXG5cdFx0XHRcdFx0YXM9XCJsYWJlbFwiXG5cdFx0XHRcdFx0aHRtbEZvcj17IGlkIH1cblx0XHRcdFx0XHRjbGFzc05hbWU9eyBjbHN4KCAnY29tcG9uZW50cy10b2dnbGUtY29udHJvbF9fbGFiZWwnLCB7XG5cdFx0XHRcdFx0XHQnaXMtZGlzYWJsZWQnOiBkaXNhYmxlZCxcblx0XHRcdFx0XHR9ICkgfVxuXHRcdFx0XHQ+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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5B;EACD;EAEA,oBACChB,IAAA,CAACL,WAAW;IACXqB,EAAE,EAAGA,EAAI;IACTT,IAAI,EACHiB,SAAS,iBACRxB,IAAA;MAAMQ,SAAS,EAAC,iCAAiC;MAAAkB,QAAA,EAC9CF;IAAS,CACN,CAEP;IACDhB,SAAS,EAAGU,OAAS;IACrBd,uBAAuB;IAAAsB,QAAA,eAEvBxB,KAAA,CAACN,MAAM;MAAC+B,OAAO,EAAC,YAAY;MAACC,OAAO,EAAG,CAAG;MAAAF,QAAA,gBACzC1B,IAAA,CAACN,UAAU;QACVsB,EAAE,EAAGA,EAAI;QACTV,OAAO,EAAGA,OAAS;QACnBG,QAAQ,EAAGG,cAAgB;QAC3B,oBAAmBW,WAAa;QAChCb,QAAQ,EAAGA,QAAU;QACrBC,GAAG,EAAGA;MAAK,CACX,CAAC,eACFX,IAAA,CAACP,SAAS;QACToC,EAAE,EAAC,OAAO;QACVC,OAAO,EAAGd,EAAI;QACdR,SAAS,EAAGlB,IAAI,CAAE,kCAAkC,EAAE;UACrD,aAAa,EAAEoB;QAChB,CAAE,CAAG;QAAAgB,QAAA,EAEHrB;MAAK,CACG,CAAC;IAAA,CACL;EAAC,CACG,CAAC;AAEhB;AAEA,eAAed,UAAU,CAAEY,aAAc,CAAC","ignoreList":[]}
|
|
@@ -67,6 +67,7 @@ function ToggleGroupControlOptionBase(props, forwardedRef) {
|
|
|
67
67
|
children,
|
|
68
68
|
showTooltip = false,
|
|
69
69
|
onFocus: onFocusProp,
|
|
70
|
+
disabled,
|
|
70
71
|
...otherButtonProps
|
|
71
72
|
} = buttonProps;
|
|
72
73
|
const isPressed = toggleGroupControlContext.value === value;
|
|
@@ -99,6 +100,7 @@ function ToggleGroupControlOptionBase(props, forwardedRef) {
|
|
|
99
100
|
text: otherButtonProps['aria-label'],
|
|
100
101
|
children: isDeselectable ? /*#__PURE__*/_jsx("button", {
|
|
101
102
|
...commonProps,
|
|
103
|
+
disabled: disabled,
|
|
102
104
|
onFocus: onFocusProp,
|
|
103
105
|
"aria-pressed": isPressed,
|
|
104
106
|
type: "button",
|
|
@@ -107,6 +109,7 @@ function ToggleGroupControlOptionBase(props, forwardedRef) {
|
|
|
107
109
|
children: children
|
|
108
110
|
})
|
|
109
111
|
}) : /*#__PURE__*/_jsx(Ariakit.Radio, {
|
|
112
|
+
disabled: disabled,
|
|
110
113
|
render: /*#__PURE__*/_jsx("button", {
|
|
111
114
|
type: "button",
|
|
112
115
|
...commonProps,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Ariakit","motion","useReducedMotion","useInstanceId","useMemo","contextConnect","useContextSystem","useToggleGroupControlContext","styles","useCx","Tooltip","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","ButtonContentView","LabelView","REDUCED_MOTION_TRANSITION_CONFIG","duration","LAYOUT_ID","WithToolTip","showTooltip","text","children","placement","ToggleGroupControlOptionBase","props","forwardedRef","shouldReduceMotion","toggleGroupControlContext","id","baseId","buttonProps","isBlock","isDeselectable","size","className","isIcon","value","onFocus","onFocusProp","otherButtonProps","isPressed","cx","labelViewClasses","labelBlock","itemClasses","buttonView","backdropClasses","backdropView","buttonOnClick","setValue","undefined","commonProps","ref","type","onClick","Radio","render","event","defaultPrevented","div","layout","layoutRoot","transition","role","layoutId","ConnectedToggleGroupControlOptionBase"],"sources":["@wordpress/components/src/toggle-group-control/toggle-group-control-option-base/component.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\nimport * as Ariakit from '@ariakit/react';\nimport { motion } from 'framer-motion';\n\n/**\n * WordPress dependencies\n */\nimport { useReducedMotion, useInstanceId } from '@wordpress/compose';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../context';\nimport { contextConnect, useContextSystem } from '../../context';\nimport type {\n\tToggleGroupControlOptionBaseProps,\n\tWithToolTipProps,\n} from '../types';\nimport { useToggleGroupControlContext } from '../context';\nimport * as styles from './styles';\nimport { useCx } from '../../utils/hooks';\nimport Tooltip from '../../tooltip';\n\nconst { ButtonContentView, LabelView } = styles;\n\nconst REDUCED_MOTION_TRANSITION_CONFIG = {\n\tduration: 0,\n};\n\nconst LAYOUT_ID = 'toggle-group-backdrop-shared-layout-id';\n\nconst WithToolTip = ( { showTooltip, text, children }: WithToolTipProps ) => {\n\tif ( showTooltip && text ) {\n\t\treturn (\n\t\t\t<Tooltip text={ text } placement=\"top\">\n\t\t\t\t{ children }\n\t\t\t</Tooltip>\n\t\t);\n\t}\n\treturn <>{ children }</>;\n};\n\nfunction ToggleGroupControlOptionBase(\n\tprops: Omit<\n\t\tWordPressComponentProps<\n\t\t\tToggleGroupControlOptionBaseProps,\n\t\t\t'button',\n\t\t\tfalse\n\t\t>,\n\t\t// the element's id is generated internally\n\t\t'id'\n\t>,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst shouldReduceMotion = useReducedMotion();\n\tconst toggleGroupControlContext = useToggleGroupControlContext();\n\n\tconst id = useInstanceId(\n\t\tToggleGroupControlOptionBase,\n\t\ttoggleGroupControlContext.baseId || 'toggle-group-control-option-base'\n\t);\n\n\tconst buttonProps = useContextSystem(\n\t\t{ ...props, id },\n\t\t'ToggleGroupControlOptionBase'\n\t);\n\n\tconst {\n\t\tisBlock = false,\n\t\tisDeselectable = false,\n\t\tsize = 'default',\n\t} = toggleGroupControlContext;\n\n\tconst {\n\t\tclassName,\n\t\tisIcon = false,\n\t\tvalue,\n\t\tchildren,\n\t\tshowTooltip = false,\n\t\tonFocus: onFocusProp,\n\t\t...otherButtonProps\n\t} = buttonProps;\n\n\tconst isPressed = toggleGroupControlContext.value === value;\n\tconst cx = useCx();\n\tconst labelViewClasses = useMemo(\n\t\t() => cx( isBlock && styles.labelBlock ),\n\t\t[ cx, isBlock ]\n\t);\n\tconst itemClasses = useMemo(\n\t\t() =>\n\t\t\tcx(\n\t\t\t\tstyles.buttonView( {\n\t\t\t\t\tisDeselectable,\n\t\t\t\t\tisIcon,\n\t\t\t\t\tisPressed,\n\t\t\t\t\tsize,\n\t\t\t\t} ),\n\t\t\t\tclassName\n\t\t\t),\n\t\t[ cx, isDeselectable, isIcon, isPressed, size, className ]\n\t);\n\tconst backdropClasses = useMemo( () => cx( styles.backdropView ), [ cx ] );\n\n\tconst buttonOnClick = () => {\n\t\tif ( isDeselectable && isPressed ) {\n\t\t\ttoggleGroupControlContext.setValue( undefined );\n\t\t} else {\n\t\t\ttoggleGroupControlContext.setValue( value );\n\t\t}\n\t};\n\n\tconst commonProps = {\n\t\t...otherButtonProps,\n\t\tclassName: itemClasses,\n\t\t'data-value': value,\n\t\tref: forwardedRef,\n\t};\n\n\treturn (\n\t\t<LabelView className={ labelViewClasses }>\n\t\t\t<WithToolTip\n\t\t\t\tshowTooltip={ showTooltip }\n\t\t\t\ttext={ otherButtonProps[ 'aria-label' ] }\n\t\t\t>\n\t\t\t\t{ isDeselectable ? (\n\t\t\t\t\t<button\n\t\t\t\t\t\t{ ...commonProps }\n\t\t\t\t\t\tonFocus={ onFocusProp }\n\t\t\t\t\t\taria-pressed={ isPressed }\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tonClick={ buttonOnClick }\n\t\t\t\t\t>\n\t\t\t\t\t\t<ButtonContentView>{ children }</ButtonContentView>\n\t\t\t\t\t</button>\n\t\t\t\t) : (\n\t\t\t\t\t<Ariakit.Radio\n\t\t\t\t\t\trender={\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t{ ...commonProps }\n\t\t\t\t\t\t\t\tonFocus={ ( event ) => {\n\t\t\t\t\t\t\t\t\tonFocusProp?.( event );\n\t\t\t\t\t\t\t\t\tif ( event.defaultPrevented ) {\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\ttoggleGroupControlContext.setValue( value );\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\tvalue={ value }\n\t\t\t\t\t>\n\t\t\t\t\t\t<ButtonContentView>{ children }</ButtonContentView>\n\t\t\t\t\t</Ariakit.Radio>\n\t\t\t\t) }\n\t\t\t</WithToolTip>\n\t\t\t{ /* Animated backdrop using framer motion's shared layout animation */ }\n\t\t\t{ isPressed ? (\n\t\t\t\t<motion.div layout layoutRoot>\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tclassName={ backdropClasses }\n\t\t\t\t\t\ttransition={\n\t\t\t\t\t\t\tshouldReduceMotion\n\t\t\t\t\t\t\t\t? REDUCED_MOTION_TRANSITION_CONFIG\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\trole=\"presentation\"\n\t\t\t\t\t\tlayoutId={ LAYOUT_ID }\n\t\t\t\t\t/>\n\t\t\t\t</motion.div>\n\t\t\t) : null }\n\t\t</LabelView>\n\t);\n}\n\n/**\n * `ToggleGroupControlOptionBase` is a form component and is meant to be used as an internal,\n * generic component for any children of `ToggleGroupControl`.\n *\n * @example\n * ```jsx\n * import {\n * __experimentalToggleGroupControl as ToggleGroupControl,\n * __experimentalToggleGroupControlOptionBase as ToggleGroupControlOptionBase,\n * } from '@wordpress/components';\n *\n * function Example() {\n * return (\n * <ToggleGroupControl label=\"my label\" value=\"vertical\" isBlock>\n * <ToggleGroupControlOption value=\"horizontal\" label=\"Horizontal\" />\n * <ToggleGroupControlOption value=\"vertical\" label=\"Vertical\" />\n * </ToggleGroupControl>\n * );\n * }\n * ```\n */\nconst ConnectedToggleGroupControlOptionBase = contextConnect(\n\tToggleGroupControlOptionBase,\n\t'ToggleGroupControlOptionBase'\n);\n\nexport default ConnectedToggleGroupControlOptionBase;\n"],"mappings":"AAAA;AACA;AACA;;AAEA,OAAO,KAAKA,OAAO,MAAM,gBAAgB;AACzC,SAASC,MAAM,QAAQ,eAAe;;AAEtC;AACA;AACA;AACA,SAASC,gBAAgB,EAAEC,aAAa,QAA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ACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMgD,qCAAqC,GAAGhE,cAAc,CAC3DsB,4BAA4B,EAC5B,8BACD,CAAC;AAED,eAAe0C,qCAAqC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["Ariakit","motion","useReducedMotion","useInstanceId","useMemo","contextConnect","useContextSystem","useToggleGroupControlContext","styles","useCx","Tooltip","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","ButtonContentView","LabelView","REDUCED_MOTION_TRANSITION_CONFIG","duration","LAYOUT_ID","WithToolTip","showTooltip","text","children","placement","ToggleGroupControlOptionBase","props","forwardedRef","shouldReduceMotion","toggleGroupControlContext","id","baseId","buttonProps","isBlock","isDeselectable","size","className","isIcon","value","onFocus","onFocusProp","disabled","otherButtonProps","isPressed","cx","labelViewClasses","labelBlock","itemClasses","buttonView","backdropClasses","backdropView","buttonOnClick","setValue","undefined","commonProps","ref","type","onClick","Radio","render","event","defaultPrevented","div","layout","layoutRoot","transition","role","layoutId","ConnectedToggleGroupControlOptionBase"],"sources":["@wordpress/components/src/toggle-group-control/toggle-group-control-option-base/component.tsx"],"sourcesContent":["/**\n * External dependencies\n */\nimport type { ForwardedRef } from 'react';\nimport * as Ariakit from '@ariakit/react';\nimport { motion } from 'framer-motion';\n\n/**\n * WordPress dependencies\n */\nimport { useReducedMotion, useInstanceId } from '@wordpress/compose';\nimport { useMemo } from '@wordpress/element';\n\n/**\n * Internal dependencies\n */\nimport type { WordPressComponentProps } from '../../context';\nimport { contextConnect, useContextSystem } from '../../context';\nimport type {\n\tToggleGroupControlOptionBaseProps,\n\tWithToolTipProps,\n} from '../types';\nimport { useToggleGroupControlContext } from '../context';\nimport * as styles from './styles';\nimport { useCx } from '../../utils/hooks';\nimport Tooltip from '../../tooltip';\n\nconst { ButtonContentView, LabelView } = styles;\n\nconst REDUCED_MOTION_TRANSITION_CONFIG = {\n\tduration: 0,\n};\n\nconst LAYOUT_ID = 'toggle-group-backdrop-shared-layout-id';\n\nconst WithToolTip = ( { showTooltip, text, children }: WithToolTipProps ) => {\n\tif ( showTooltip && text ) {\n\t\treturn (\n\t\t\t<Tooltip text={ text } placement=\"top\">\n\t\t\t\t{ children }\n\t\t\t</Tooltip>\n\t\t);\n\t}\n\treturn <>{ children }</>;\n};\n\nfunction ToggleGroupControlOptionBase(\n\tprops: Omit<\n\t\tWordPressComponentProps<\n\t\t\tToggleGroupControlOptionBaseProps,\n\t\t\t'button',\n\t\t\tfalse\n\t\t>,\n\t\t// the element's id is generated internally\n\t\t| 'id'\n\t\t// due to how the component works, only the `disabled` prop should be used\n\t\t| 'aria-disabled'\n\t>,\n\tforwardedRef: ForwardedRef< any >\n) {\n\tconst shouldReduceMotion = useReducedMotion();\n\tconst toggleGroupControlContext = useToggleGroupControlContext();\n\n\tconst id = useInstanceId(\n\t\tToggleGroupControlOptionBase,\n\t\ttoggleGroupControlContext.baseId || 'toggle-group-control-option-base'\n\t);\n\n\tconst buttonProps = useContextSystem(\n\t\t{ ...props, id },\n\t\t'ToggleGroupControlOptionBase'\n\t);\n\n\tconst {\n\t\tisBlock = false,\n\t\tisDeselectable = false,\n\t\tsize = 'default',\n\t} = toggleGroupControlContext;\n\n\tconst {\n\t\tclassName,\n\t\tisIcon = false,\n\t\tvalue,\n\t\tchildren,\n\t\tshowTooltip = false,\n\t\tonFocus: onFocusProp,\n\t\tdisabled,\n\t\t...otherButtonProps\n\t} = buttonProps;\n\n\tconst isPressed = toggleGroupControlContext.value === value;\n\tconst cx = useCx();\n\tconst labelViewClasses = useMemo(\n\t\t() => cx( isBlock && styles.labelBlock ),\n\t\t[ cx, isBlock ]\n\t);\n\tconst itemClasses = useMemo(\n\t\t() =>\n\t\t\tcx(\n\t\t\t\tstyles.buttonView( {\n\t\t\t\t\tisDeselectable,\n\t\t\t\t\tisIcon,\n\t\t\t\t\tisPressed,\n\t\t\t\t\tsize,\n\t\t\t\t} ),\n\t\t\t\tclassName\n\t\t\t),\n\t\t[ cx, isDeselectable, isIcon, isPressed, size, className ]\n\t);\n\tconst backdropClasses = useMemo( () => cx( styles.backdropView ), [ cx ] );\n\n\tconst buttonOnClick = () => {\n\t\tif ( isDeselectable && isPressed ) {\n\t\t\ttoggleGroupControlContext.setValue( undefined );\n\t\t} else {\n\t\t\ttoggleGroupControlContext.setValue( value );\n\t\t}\n\t};\n\n\tconst commonProps = {\n\t\t...otherButtonProps,\n\t\tclassName: itemClasses,\n\t\t'data-value': value,\n\t\tref: forwardedRef,\n\t};\n\n\treturn (\n\t\t<LabelView className={ labelViewClasses }>\n\t\t\t<WithToolTip\n\t\t\t\tshowTooltip={ showTooltip }\n\t\t\t\ttext={ otherButtonProps[ 'aria-label' ] }\n\t\t\t>\n\t\t\t\t{ isDeselectable ? (\n\t\t\t\t\t<button\n\t\t\t\t\t\t{ ...commonProps }\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\tonFocus={ onFocusProp }\n\t\t\t\t\t\taria-pressed={ isPressed }\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tonClick={ buttonOnClick }\n\t\t\t\t\t>\n\t\t\t\t\t\t<ButtonContentView>{ children }</ButtonContentView>\n\t\t\t\t\t</button>\n\t\t\t\t) : (\n\t\t\t\t\t<Ariakit.Radio\n\t\t\t\t\t\tdisabled={ disabled }\n\t\t\t\t\t\trender={\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t{ ...commonProps }\n\t\t\t\t\t\t\t\tonFocus={ ( event ) => {\n\t\t\t\t\t\t\t\t\tonFocusProp?.( event );\n\t\t\t\t\t\t\t\t\tif ( event.defaultPrevented ) {\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\ttoggleGroupControlContext.setValue( value );\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\tvalue={ value }\n\t\t\t\t\t>\n\t\t\t\t\t\t<ButtonContentView>{ children }</ButtonContentView>\n\t\t\t\t\t</Ariakit.Radio>\n\t\t\t\t) }\n\t\t\t</WithToolTip>\n\t\t\t{ /* Animated backdrop using framer motion's shared layout animation */ }\n\t\t\t{ isPressed ? (\n\t\t\t\t<motion.div layout layoutRoot>\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tclassName={ backdropClasses }\n\t\t\t\t\t\ttransition={\n\t\t\t\t\t\t\tshouldReduceMotion\n\t\t\t\t\t\t\t\t? REDUCED_MOTION_TRANSITION_CONFIG\n\t\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t\t}\n\t\t\t\t\t\trole=\"presentation\"\n\t\t\t\t\t\tlayoutId={ LAYOUT_ID }\n\t\t\t\t\t/>\n\t\t\t\t</motion.div>\n\t\t\t) : null }\n\t\t</LabelView>\n\t);\n}\n\n/**\n * `ToggleGroupControlOptionBase` is a form component and is meant to be used as an internal,\n * generic component for any children of `ToggleGroupControl`.\n *\n * @example\n * ```jsx\n * import {\n * __experimentalToggleGroupControl as ToggleGroupControl,\n * __experimentalToggleGroupControlOptionBase as ToggleGroupControlOptionBase,\n * } from '@wordpress/components';\n *\n * function Example() {\n * return (\n * <ToggleGroupControl label=\"my label\" value=\"vertical\" isBlock>\n * <ToggleGroupControlOption value=\"horizontal\" label=\"Horizontal\" />\n * <ToggleGroupControlOption value=\"vertical\" label=\"Vertical\" />\n * </ToggleGroupControl>\n * );\n * }\n * ```\n */\nconst ConnectedToggleGroupControlOptionBase = contextConnect(\n\tToggleGroupControlOptionBase,\n\t'ToggleGroupControlOptionBase'\n);\n\nexport default ConnectedToggleGroupControlOptionBase;\n"],"mappings":"AAAA;AACA;AACA;;AAEA,OAAO,KAAKA,OAAO,MAAM,gBAAgB;AACzC,SAASC,MAAM,QAAQ,eAAe;;AAEtC;AACA;AACA;AACA,SAASC,gBAAgB,EAAEC,aAAa,QAAQ,oBAAoB;AACpE,SAASC,OA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