@wordpress/components 28.13.1-next.082ed6819.0 → 29.0.1-next.a9f418477.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 +51 -2
- package/CONTRIBUTING.md +16 -16
- package/build/angle-picker-control/index.js +1 -1
- package/build/angle-picker-control/index.js.map +1 -1
- package/build/animation/index.js +0 -6
- package/build/animation/index.js.map +1 -1
- package/build/autocomplete/index.js +0 -1
- package/build/autocomplete/index.js.map +1 -1
- package/build/border-box-control/border-box-control-split-controls/component.js +1 -1
- package/build/border-box-control/border-box-control-split-controls/component.js.map +1 -1
- package/build/border-control/border-control/component.js +2 -0
- package/build/border-control/border-control/component.js.map +1 -1
- package/build/box-control/all-input-control.js +1 -0
- package/build/box-control/all-input-control.js.map +1 -1
- package/build/box-control/axial-input-controls.js +1 -0
- package/build/box-control/axial-input-controls.js.map +1 -1
- package/build/box-control/index.js +22 -15
- package/build/box-control/index.js.map +1 -1
- package/build/box-control/input-controls.js +1 -0
- package/build/box-control/input-controls.js.map +1 -1
- package/build/box-control/types.js.map +1 -1
- package/build/circular-option-picker/circular-option-picker-actions.js +1 -0
- package/build/circular-option-picker/circular-option-picker-actions.js.map +1 -1
- package/build/circular-option-picker/circular-option-picker-option.js +1 -0
- package/build/circular-option-picker/circular-option-picker-option.js.map +1 -1
- package/build/clipboard-button/index.js +5 -3
- package/build/clipboard-button/index.js.map +1 -1
- package/build/color-palette/index.native.js +0 -1
- package/build/color-palette/index.native.js.map +1 -1
- package/build/color-picker/input-with-slider.js +2 -2
- package/build/color-picker/input-with-slider.js.map +1 -1
- package/build/composite/item.js +0 -9
- package/build/composite/item.js.map +1 -1
- package/build/context/context-connect.js +0 -1
- package/build/context/context-connect.js.map +1 -1
- package/build/custom-gradient-picker/gradient-bar/control-points.js +2 -0
- package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
- package/build/custom-gradient-picker/index.js +2 -0
- package/build/custom-gradient-picker/index.js.map +1 -1
- package/build/custom-gradient-picker/types.js.map +1 -1
- package/build/custom-select-control/index.js +8 -0
- package/build/custom-select-control/index.js.map +1 -1
- package/build/custom-select-control/types.js.map +1 -1
- package/build/drop-zone/index.js +19 -13
- package/build/drop-zone/index.js.map +1 -1
- package/build/drop-zone/types.js.map +1 -1
- package/build/dropdown-menu/index.js +1 -0
- package/build/dropdown-menu/index.js.map +1 -1
- package/build/duotone-picker/color-list-picker/index.js +9 -14
- package/build/duotone-picker/color-list-picker/index.js.map +1 -1
- package/build/external-link/index.js +0 -1
- package/build/external-link/index.js.map +1 -1
- package/build/font-size-picker/font-size-picker-select.js +1 -0
- package/build/font-size-picker/font-size-picker-select.js.map +1 -1
- package/build/font-size-picker/index.js +1 -0
- package/build/font-size-picker/index.js.map +1 -1
- package/build/form-file-upload/index.js +11 -1
- package/build/form-file-upload/index.js.map +1 -1
- package/build/form-file-upload/types.js.map +1 -1
- package/build/form-token-field/index.js +6 -1
- package/build/form-token-field/index.js.map +1 -1
- package/build/gradient-picker/index.js +2 -0
- package/build/gradient-picker/index.js.map +1 -1
- package/build/gradient-picker/types.js.map +1 -1
- package/build/icon/index.js +9 -0
- package/build/icon/index.js.map +1 -1
- package/build/index.js +0 -6
- package/build/index.js.map +1 -1
- package/build/menu/checkbox-item.js +5 -9
- package/build/menu/checkbox-item.js.map +1 -1
- package/build/menu/group-label.js +4 -1
- package/build/menu/group-label.js.map +1 -1
- package/build/menu/group.js +4 -1
- package/build/menu/group.js.map +1 -1
- package/build/menu/item-help-text.js +5 -0
- package/build/menu/item-help-text.js.map +1 -1
- package/build/menu/item-label.js +5 -0
- package/build/menu/item-label.js.map +1 -1
- package/build/menu/item.js +4 -8
- package/build/menu/item.js.map +1 -1
- package/build/menu/radio-item.js +5 -9
- package/build/menu/radio-item.js.map +1 -1
- package/build/menu/separator.js +5 -2
- package/build/menu/separator.js.map +1 -1
- package/build/modal/aria-helper.js +0 -1
- package/build/modal/aria-helper.js.map +1 -1
- package/build/modal/index.js +0 -1
- package/build/modal/index.js.map +1 -1
- package/build/number-control/index.js +8 -0
- package/build/number-control/index.js.map +1 -1
- package/build/number-control/types.js.map +1 -1
- package/build/range-control/index.js +2 -1
- package/build/range-control/index.js.map +1 -1
- package/build/range-control/mark.js +0 -1
- package/build/range-control/mark.js.map +1 -1
- package/build/range-control/styles/range-control-styles.js +33 -45
- package/build/range-control/styles/range-control-styles.js.map +1 -1
- package/build/resizable-box/index.js +9 -1
- package/build/resizable-box/index.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/fill.js +8 -12
- package/build/slot-fill/bubbles-virtually/fill.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/slot-fill-provider.js +6 -10
- package/build/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/slot.js +4 -10
- package/build/slot-fill/bubbles-virtually/slot.js.map +1 -1
- package/build/slot-fill/types.js.map +1 -1
- package/build/style-provider/index.js +0 -1
- package/build/style-provider/index.js.map +1 -1
- package/build/tabs/tab.js +0 -17
- package/build/tabs/tab.js.map +1 -1
- package/build/toolbar/toolbar-button/index.js +2 -0
- package/build/toolbar/toolbar-button/index.js.map +1 -1
- package/build/tools-panel/tools-panel/component.js +2 -0
- package/build/tools-panel/tools-panel/component.js.map +1 -1
- package/build/tree-grid/cell.js +4 -1
- package/build/tree-grid/cell.js.map +1 -1
- package/build/tree-grid/types.js.map +1 -1
- package/build/unit-control/index.js +10 -1
- package/build/unit-control/index.js.map +1 -1
- package/build/unit-control/types.js.map +1 -1
- package/build-module/angle-picker-control/index.js +1 -1
- package/build-module/angle-picker-control/index.js.map +1 -1
- package/build-module/animation/index.js +1 -1
- package/build-module/animation/index.js.map +1 -1
- package/build-module/autocomplete/index.js +0 -1
- package/build-module/autocomplete/index.js.map +1 -1
- package/build-module/border-box-control/border-box-control-split-controls/component.js +1 -1
- package/build-module/border-box-control/border-box-control-split-controls/component.js.map +1 -1
- package/build-module/border-control/border-control/component.js +2 -0
- package/build-module/border-control/border-control/component.js.map +1 -1
- package/build-module/box-control/all-input-control.js +1 -0
- package/build-module/box-control/all-input-control.js.map +1 -1
- package/build-module/box-control/axial-input-controls.js +1 -0
- package/build-module/box-control/axial-input-controls.js.map +1 -1
- package/build-module/box-control/index.js +22 -15
- package/build-module/box-control/index.js.map +1 -1
- package/build-module/box-control/input-controls.js +1 -0
- package/build-module/box-control/input-controls.js.map +1 -1
- package/build-module/box-control/types.js.map +1 -1
- package/build-module/circular-option-picker/circular-option-picker-actions.js +1 -0
- package/build-module/circular-option-picker/circular-option-picker-actions.js.map +1 -1
- package/build-module/circular-option-picker/circular-option-picker-option.js +1 -0
- package/build-module/circular-option-picker/circular-option-picker-option.js.map +1 -1
- package/build-module/clipboard-button/index.js +5 -3
- package/build-module/clipboard-button/index.js.map +1 -1
- package/build-module/color-palette/index.native.js +0 -1
- package/build-module/color-palette/index.native.js.map +1 -1
- package/build-module/color-picker/input-with-slider.js +2 -2
- package/build-module/color-picker/input-with-slider.js.map +1 -1
- package/build-module/composite/item.js +0 -9
- package/build-module/composite/item.js.map +1 -1
- package/build-module/context/context-connect.js +0 -1
- package/build-module/context/context-connect.js.map +1 -1
- package/build-module/custom-gradient-picker/gradient-bar/control-points.js +2 -0
- package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
- package/build-module/custom-gradient-picker/index.js +2 -0
- package/build-module/custom-gradient-picker/index.js.map +1 -1
- package/build-module/custom-gradient-picker/types.js.map +1 -1
- package/build-module/custom-select-control/index.js +8 -0
- package/build-module/custom-select-control/index.js.map +1 -1
- package/build-module/custom-select-control/types.js.map +1 -1
- package/build-module/drop-zone/index.js +19 -13
- package/build-module/drop-zone/index.js.map +1 -1
- package/build-module/drop-zone/types.js.map +1 -1
- package/build-module/dropdown-menu/index.js +1 -0
- package/build-module/dropdown-menu/index.js.map +1 -1
- package/build-module/duotone-picker/color-list-picker/index.js +10 -15
- package/build-module/duotone-picker/color-list-picker/index.js.map +1 -1
- package/build-module/external-link/index.js +0 -1
- package/build-module/external-link/index.js.map +1 -1
- package/build-module/font-size-picker/font-size-picker-select.js +1 -0
- package/build-module/font-size-picker/font-size-picker-select.js.map +1 -1
- package/build-module/font-size-picker/index.js +1 -0
- package/build-module/font-size-picker/index.js.map +1 -1
- package/build-module/form-file-upload/index.js +13 -2
- package/build-module/form-file-upload/index.js.map +1 -1
- package/build-module/form-file-upload/types.js.map +1 -1
- package/build-module/form-token-field/index.js +6 -1
- package/build-module/form-token-field/index.js.map +1 -1
- package/build-module/gradient-picker/index.js +2 -0
- package/build-module/gradient-picker/index.js.map +1 -1
- package/build-module/gradient-picker/types.js.map +1 -1
- package/build-module/icon/index.js +9 -0
- package/build-module/icon/index.js.map +1 -1
- package/build-module/index.js +1 -1
- package/build-module/index.js.map +1 -1
- package/build-module/menu/checkbox-item.js +5 -9
- package/build-module/menu/checkbox-item.js.map +1 -1
- package/build-module/menu/group-label.js +4 -1
- package/build-module/menu/group-label.js.map +1 -1
- package/build-module/menu/group.js +4 -1
- package/build-module/menu/group.js.map +1 -1
- package/build-module/menu/item-help-text.js +6 -1
- package/build-module/menu/item-help-text.js.map +1 -1
- package/build-module/menu/item-label.js +6 -1
- package/build-module/menu/item-label.js.map +1 -1
- package/build-module/menu/item.js +4 -8
- package/build-module/menu/item.js.map +1 -1
- package/build-module/menu/radio-item.js +5 -9
- package/build-module/menu/radio-item.js.map +1 -1
- package/build-module/menu/separator.js +5 -2
- package/build-module/menu/separator.js.map +1 -1
- package/build-module/modal/aria-helper.js +0 -1
- package/build-module/modal/aria-helper.js.map +1 -1
- package/build-module/modal/index.js +0 -1
- package/build-module/modal/index.js.map +1 -1
- package/build-module/number-control/index.js +8 -0
- package/build-module/number-control/index.js.map +1 -1
- package/build-module/number-control/types.js.map +1 -1
- package/build-module/range-control/index.js +2 -1
- package/build-module/range-control/index.js.map +1 -1
- package/build-module/range-control/mark.js +0 -1
- package/build-module/range-control/mark.js.map +1 -1
- package/build-module/range-control/styles/range-control-styles.js +33 -45
- package/build-module/range-control/styles/range-control-styles.js.map +1 -1
- package/build-module/resizable-box/index.js +9 -1
- package/build-module/resizable-box/index.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/fill.js +9 -13
- package/build-module/slot-fill/bubbles-virtually/fill.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js +6 -10
- package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/slot.js +4 -10
- package/build-module/slot-fill/bubbles-virtually/slot.js.map +1 -1
- package/build-module/slot-fill/types.js.map +1 -1
- package/build-module/style-provider/index.js +0 -1
- package/build-module/style-provider/index.js.map +1 -1
- package/build-module/tabs/tab.js +0 -15
- package/build-module/tabs/tab.js.map +1 -1
- package/build-module/toolbar/toolbar-button/index.js +2 -0
- package/build-module/toolbar/toolbar-button/index.js.map +1 -1
- package/build-module/tools-panel/tools-panel/component.js +2 -0
- package/build-module/tools-panel/tools-panel/component.js.map +1 -1
- package/build-module/tree-grid/cell.js +4 -1
- package/build-module/tree-grid/cell.js.map +1 -1
- package/build-module/tree-grid/types.js.map +1 -1
- package/build-module/unit-control/index.js +10 -1
- package/build-module/unit-control/index.js.map +1 -1
- package/build-module/unit-control/types.js.map +1 -1
- package/build-style/style-rtl.css +15 -11
- package/build-style/style.css +15 -11
- package/build-types/alignment-matrix-control/styles.d.ts.map +1 -1
- package/build-types/angle-picker-control/styles/angle-picker-control-styles.d.ts.map +1 -1
- package/build-types/animation/index.d.ts +1 -1
- package/build-types/animation/index.d.ts.map +1 -1
- package/build-types/base-control/hooks.d.ts +4 -4
- package/build-types/base-control/styles/base-control-styles.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control/hook.d.ts +83 -83
- package/build-types/border-box-control/border-box-control-linked-button/hook.d.ts +93 -93
- package/build-types/border-box-control/border-box-control-split-controls/hook.d.ts +83 -83
- package/build-types/border-box-control/border-box-control-visualizer/hook.d.ts +83 -83
- package/build-types/border-control/border-control/component.d.ts.map +1 -1
- package/build-types/border-control/border-control/hook.d.ts +83 -83
- package/build-types/border-control/border-control-dropdown/hook.d.ts +83 -83
- package/build-types/border-control/stories/index.story.d.ts.map +1 -1
- package/build-types/box-control/all-input-control.d.ts.map +1 -1
- package/build-types/box-control/axial-input-controls.d.ts.map +1 -1
- package/build-types/box-control/index.d.ts +14 -13
- package/build-types/box-control/index.d.ts.map +1 -1
- package/build-types/box-control/input-controls.d.ts.map +1 -1
- package/build-types/box-control/stories/index.story.d.ts +852 -816
- 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.map +1 -1
- package/build-types/box-control/styles/box-control-styles.d.ts +3 -2
- package/build-types/box-control/styles/box-control-styles.d.ts.map +1 -1
- package/build-types/box-control/types.d.ts +16 -2
- package/build-types/box-control/types.d.ts.map +1 -1
- package/build-types/card/card/hook.d.ts +83 -83
- package/build-types/card/card-body/hook.d.ts +83 -83
- package/build-types/card/card-divider/hook.d.ts +84 -84
- package/build-types/card/card-footer/hook.d.ts +83 -83
- package/build-types/card/card-header/hook.d.ts +83 -83
- package/build-types/card/card-media/hook.d.ts +83 -83
- package/build-types/circular-option-picker/circular-option-picker-actions.d.ts.map +1 -1
- package/build-types/circular-option-picker/circular-option-picker-option.d.ts.map +1 -1
- package/build-types/clipboard-button/index.d.ts.map +1 -1
- package/build-types/color-picker/styles.d.ts +3 -2
- package/build-types/color-picker/styles.d.ts.map +1 -1
- package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
- package/build-types/composite/index.d.ts.map +1 -1
- package/build-types/composite/item.d.ts.map +1 -1
- package/build-types/context/constants.d.ts.map +1 -1
- package/build-types/context/get-styled-class-name-from-key.d.ts +1 -9
- package/build-types/context/get-styled-class-name-from-key.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/index.d.ts +1 -1
- package/build-types/custom-gradient-picker/index.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/types.d.ts +6 -0
- package/build-types/custom-gradient-picker/types.d.ts.map +1 -1
- package/build-types/custom-select-control/index.d.ts.map +1 -1
- package/build-types/custom-select-control/stories/index.story.d.ts.map +1 -1
- package/build-types/custom-select-control/types.d.ts +7 -0
- package/build-types/custom-select-control/types.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/stories/index.story.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/styles.d.ts.map +1 -1
- package/build-types/date-time/date/styles.d.ts.map +1 -1
- package/build-types/date-time/stories/date-time.story.d.ts.map +1 -1
- package/build-types/date-time/stories/date.story.d.ts.map +1 -1
- package/build-types/date-time/stories/time.story.d.ts.map +1 -1
- package/build-types/date-time/time/styles.d.ts +8 -4
- package/build-types/date-time/time/styles.d.ts.map +1 -1
- package/build-types/dimension-control/stories/index.story.d.ts.map +1 -1
- package/build-types/drop-zone/index.d.ts +1 -1
- package/build-types/drop-zone/index.d.ts.map +1 -1
- package/build-types/drop-zone/types.d.ts +5 -0
- package/build-types/drop-zone/types.d.ts.map +1 -1
- package/build-types/dropdown-menu/index.d.ts.map +1 -1
- package/build-types/duotone-picker/color-list-picker/index.d.ts.map +1 -1
- package/build-types/elevation/hook.d.ts +83 -83
- package/build-types/flex/flex/hook.d.ts +83 -83
- package/build-types/flex/flex-block/hook.d.ts +83 -83
- package/build-types/flex/flex-item/hook.d.ts +83 -83
- 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 +2 -1
- package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts.map +1 -1
- package/build-types/font-size-picker/font-size-picker-select.d.ts.map +1 -1
- package/build-types/font-size-picker/index.d.ts.map +1 -1
- package/build-types/font-size-picker/styles.d.ts.map +1 -1
- package/build-types/form-file-upload/index.d.ts +2 -1
- package/build-types/form-file-upload/index.d.ts.map +1 -1
- package/build-types/form-file-upload/stories/index.story.d.ts.map +1 -1
- package/build-types/form-file-upload/types.d.ts +10 -8
- package/build-types/form-file-upload/types.d.ts.map +1 -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/gradient-picker/index.d.ts +1 -1
- package/build-types/gradient-picker/index.d.ts.map +1 -1
- package/build-types/gradient-picker/types.d.ts +6 -0
- package/build-types/gradient-picker/types.d.ts.map +1 -1
- package/build-types/grid/hook.d.ts +83 -83
- package/build-types/h-stack/hook.d.ts +83 -83
- package/build-types/heading/hook.d.ts +82 -82
- package/build-types/higher-order/with-fallback-styles/index.d.ts +2 -2
- package/build-types/higher-order/with-filters/index.d.ts +4 -4
- package/build-types/icon/index.d.ts +23 -7
- package/build-types/icon/index.d.ts.map +1 -1
- package/build-types/icon/stories/index.story.d.ts +7 -1
- package/build-types/icon/stories/index.story.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/styles/input-control-styles.d.ts.map +1 -1
- package/build-types/item-group/item/hook.d.ts +83 -83
- package/build-types/item-group/item-group/hook.d.ts +83 -83
- package/build-types/lock-unlock.d.ts +2 -2
- package/build-types/menu/checkbox-item.d.ts.map +1 -1
- package/build-types/menu/group-label.d.ts.map +1 -1
- package/build-types/menu/group.d.ts.map +1 -1
- package/build-types/menu/index.d.ts.map +1 -1
- package/build-types/menu/item-help-text.d.ts.map +1 -1
- package/build-types/menu/item-label.d.ts.map +1 -1
- package/build-types/menu/item.d.ts.map +1 -1
- package/build-types/menu/radio-item.d.ts.map +1 -1
- package/build-types/menu/separator.d.ts.map +1 -1
- package/build-types/menu/styles.d.ts.map +1 -1
- package/build-types/menu-item/stories/index.story.d.ts.map +1 -1
- package/build-types/navigation/styles/navigation-styles.d.ts.map +1 -1
- package/build-types/navigator/navigator-back-button/hook.d.ts +92 -92
- package/build-types/navigator/navigator-button/hook.d.ts +92 -92
- package/build-types/number-control/index.d.ts +2 -1
- package/build-types/number-control/index.d.ts.map +1 -1
- package/build-types/number-control/stories/index.story.d.ts +2 -1
- package/build-types/number-control/stories/index.story.d.ts.map +1 -1
- package/build-types/number-control/types.d.ts +7 -0
- package/build-types/number-control/types.d.ts.map +1 -1
- package/build-types/popover/stories/index.story.d.ts.map +1 -1
- package/build-types/progress-bar/styles.d.ts.map +1 -1
- package/build-types/range-control/index.d.ts +1 -1
- package/build-types/range-control/index.d.ts.map +1 -1
- package/build-types/range-control/mark.d.ts.map +1 -1
- package/build-types/range-control/styles/range-control-styles.d.ts +4 -3
- package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
- package/build-types/resizable-box/index.d.ts.map +1 -1
- package/build-types/resizable-box/resize-tooltip/styles/resize-tooltip.styles.d.ts.map +1 -1
- package/build-types/resizable-box/stories/index.story.d.ts.map +1 -1
- package/build-types/scrollable/hook.d.ts +83 -83
- package/build-types/scrollable/stories/index.story.d.ts.map +1 -1
- package/build-types/select-control/index.d.ts.map +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.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/fill.d.ts.map +1 -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.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/use-slot-fills.d.ts +1 -1
- package/build-types/slot-fill/types.d.ts +4 -3
- package/build-types/slot-fill/types.d.ts.map +1 -1
- package/build-types/spacer/hook.d.ts +83 -83
- package/build-types/spinner/styles.d.ts.map +1 -1
- package/build-types/surface/hook.d.ts +83 -83
- package/build-types/tabs/tab.d.ts +3 -0
- package/build-types/tabs/tab.d.ts.map +1 -1
- package/build-types/text/hook.d.ts +83 -83
- package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts.map +1 -1
- package/build-types/toolbar/toolbar-button/index.d.ts.map +1 -1
- package/build-types/tools-panel/stories/index.story.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel/component.d.ts +2 -0
- package/build-types/tools-panel/tools-panel/component.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel/hook.d.ts +83 -83
- package/build-types/tools-panel/tools-panel-header/hook.d.ts +83 -83
- package/build-types/tools-panel/tools-panel-item/hook.d.ts +83 -83
- package/build-types/tree-grid/cell.d.ts.map +1 -1
- package/build-types/tree-grid/types.d.ts +1 -1
- package/build-types/tree-grid/types.d.ts.map +1 -1
- package/build-types/truncate/hook.d.ts +83 -83
- package/build-types/unit-control/index.d.ts +3 -2
- package/build-types/unit-control/index.d.ts.map +1 -1
- package/build-types/unit-control/stories/index.story.d.ts.map +1 -1
- package/build-types/unit-control/styles/unit-control-styles.d.ts +2 -1
- package/build-types/unit-control/styles/unit-control-styles.d.ts.map +1 -1
- package/build-types/unit-control/types.d.ts +7 -0
- package/build-types/unit-control/types.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/rtl.d.ts +1 -1
- package/build-types/utils/rtl.d.ts.map +1 -1
- package/build-types/v-stack/hook.d.ts +83 -83
- package/build-types/z-stack/styles.d.ts.map +1 -1
- package/package.json +20 -20
- package/src/alignment-matrix-control/stories/index.story.tsx +2 -2
- package/src/angle-picker-control/index.tsx +1 -1
- package/src/angle-picker-control/stories/index.story.tsx +2 -2
- package/src/animation/index.tsx +0 -1
- package/src/base-control/stories/index.story.tsx +1 -1
- package/src/border-box-control/border-box-control-split-controls/component.tsx +1 -1
- package/src/border-box-control/stories/index.story.tsx +1 -1
- package/src/border-control/border-control/component.tsx +2 -0
- package/src/border-control/stories/index.story.tsx +1 -1
- package/src/box-control/README.md +80 -60
- package/src/box-control/all-input-control.tsx +1 -0
- package/src/box-control/axial-input-controls.tsx +1 -0
- package/src/box-control/docs-manifest.json +5 -0
- package/src/box-control/index.tsx +23 -15
- package/src/box-control/input-controls.tsx +1 -0
- package/src/box-control/stories/index.story.tsx +2 -1
- package/src/box-control/test/index.tsx +33 -26
- package/src/box-control/types.ts +71 -54
- package/src/button-group/stories/index.story.tsx +1 -1
- package/src/card/stories/index.story.tsx +2 -2
- package/src/checkbox-control/stories/index.story.tsx +1 -1
- package/src/circular-option-picker/circular-option-picker-actions.tsx +1 -0
- package/src/circular-option-picker/circular-option-picker-option.tsx +1 -0
- package/src/circular-option-picker/stories/index.story.tsx +2 -2
- package/src/circular-option-picker/style.scss +2 -2
- package/src/clipboard-button/index.tsx +5 -3
- package/src/color-palette/stories/index.story.tsx +3 -3
- package/src/color-picker/input-with-slider.tsx +1 -1
- package/src/color-picker/stories/index.story.tsx +2 -2
- package/src/combobox-control/stories/index.story.tsx +1 -1
- package/src/composite/item.tsx +1 -19
- package/src/composite/stories/index.story.tsx +3 -3
- package/src/confirm-dialog/stories/index.story.tsx +1 -1
- package/src/custom-gradient-picker/gradient-bar/control-points.tsx +2 -0
- package/src/custom-gradient-picker/index.tsx +2 -0
- package/src/custom-gradient-picker/style.scss +1 -1
- package/src/custom-gradient-picker/types.ts +6 -0
- package/src/custom-select-control/README.md +2 -0
- package/src/custom-select-control/index.tsx +9 -0
- package/src/custom-select-control/stories/index.story.tsx +3 -2
- package/src/custom-select-control/test/index.tsx +13 -9
- package/src/custom-select-control/types.ts +7 -0
- package/src/custom-select-control-v2/stories/index.story.tsx +2 -2
- package/src/date-time/stories/date-time.story.tsx +4 -1
- package/src/date-time/stories/date.story.tsx +4 -1
- package/src/date-time/stories/time.story.tsx +4 -1
- package/src/dimension-control/stories/index.story.tsx +1 -1
- package/src/disabled/stories/index.story.tsx +3 -3
- package/src/divider/stories/index.story.tsx +1 -1
- package/src/draggable/stories/index.story.tsx +2 -2
- package/src/drop-zone/index.tsx +21 -24
- package/src/drop-zone/types.ts +5 -0
- package/src/dropdown/stories/index.story.tsx +7 -7
- package/src/dropdown-menu/index.tsx +4 -1
- package/src/dropdown-menu/stories/index.story.tsx +3 -3
- package/src/dropdown-menu/style.scss +1 -1
- package/src/duotone-picker/color-list-picker/index.tsx +8 -8
- package/src/duotone-picker/color-list-picker/style.scss +0 -6
- package/src/duotone-picker/stories/duotone-picker.story.tsx +1 -1
- package/src/flex/stories/index.story.tsx +1 -1
- package/src/font-size-picker/font-size-picker-select.tsx +1 -0
- package/src/font-size-picker/index.tsx +1 -0
- package/src/font-size-picker/stories/index.story.tsx +1 -1
- package/src/form-file-upload/README.md +58 -48
- package/src/form-file-upload/docs-manifest.json +5 -0
- package/src/form-file-upload/index.tsx +12 -1
- package/src/form-file-upload/stories/index.story.tsx +4 -3
- package/src/form-file-upload/test/index.tsx +5 -1
- package/src/form-file-upload/types.ts +10 -8
- package/src/form-token-field/README.md +1 -0
- package/src/form-token-field/index.tsx +7 -0
- package/src/form-token-field/stories/index.story.tsx +4 -2
- package/src/form-token-field/test/index.tsx +5 -1
- package/src/gradient-picker/README.md +8 -0
- package/src/gradient-picker/index.tsx +2 -0
- package/src/gradient-picker/stories/index.story.tsx +1 -1
- package/src/gradient-picker/types.ts +6 -0
- package/src/grid/stories/index.story.tsx +1 -1
- package/src/h-stack/stories/index.story.tsx +2 -2
- package/src/icon/README.md +22 -65
- package/src/icon/docs-manifest.json +5 -0
- package/src/icon/index.tsx +28 -13
- package/src/icon/stories/index.story.tsx +50 -8
- package/src/index.ts +1 -5
- package/src/input-control/stories/index.story.tsx +4 -4
- package/src/item-group/stories/index.story.tsx +2 -2
- package/src/menu/checkbox-item.tsx +9 -7
- package/src/menu/group-label.tsx +8 -1
- package/src/menu/group.tsx +8 -1
- package/src/menu/item-help-text.tsx +10 -1
- package/src/menu/item-label.tsx +10 -1
- package/src/menu/item.tsx +8 -6
- package/src/menu/radio-item.tsx +9 -7
- package/src/menu/separator.tsx +9 -2
- package/src/menu/stories/index.story.tsx +2 -2
- package/src/menu-group/stories/index.story.tsx +1 -1
- package/src/menu-item/stories/index.story.tsx +1 -1
- package/src/menu-items-choice/stories/index.story.tsx +1 -1
- package/src/menu-items-choice/style.scss +1 -0
- package/src/modal/stories/index.story.tsx +2 -2
- package/src/modal/test/index.tsx +2 -1
- package/src/navigable-container/stories/navigable-menu.story.tsx +1 -1
- package/src/navigable-container/stories/tabbable-container.story.tsx +1 -1
- package/src/navigation/stories/index.story.tsx +4 -4
- package/src/navigator/stories/index.story.tsx +3 -3
- package/src/number-control/README.md +2 -1
- package/src/number-control/index.tsx +9 -0
- package/src/number-control/stories/index.story.tsx +2 -1
- package/src/number-control/test/index.tsx +5 -1
- package/src/number-control/types.ts +7 -0
- package/src/panel/stories/index.story.tsx +1 -1
- package/src/placeholder/stories/index.story.tsx +3 -3
- package/src/popover/stories/index.story.tsx +11 -9
- package/src/query-controls/stories/index.story.tsx +6 -6
- package/src/radio-control/stories/index.story.tsx +1 -1
- package/src/radio-group/stories/index.story.tsx +3 -3
- package/src/range-control/index.tsx +1 -0
- package/src/range-control/mark.tsx +0 -1
- package/src/range-control/stories/index.story.tsx +7 -7
- package/src/range-control/styles/range-control-styles.ts +18 -19
- package/src/resizable-box/index.tsx +10 -0
- package/src/resizable-box/stories/index.story.tsx +1 -1
- package/src/resizable-box/style.scss +8 -0
- package/src/responsive-wrapper/stories/index.story.tsx +1 -1
- package/src/sandbox/stories/index.story.tsx +1 -1
- package/src/scrollable/stories/index.story.tsx +2 -1
- package/src/search-control/stories/index.story.tsx +1 -1
- package/src/select-control/stories/index.story.tsx +1 -1
- package/src/slot-fill/bubbles-virtually/fill.tsx +7 -11
- package/src/slot-fill/bubbles-virtually/slot-fill-provider.tsx +2 -13
- package/src/slot-fill/bubbles-virtually/slot.tsx +4 -7
- package/src/slot-fill/stories/index.story.tsx +2 -2
- package/src/slot-fill/types.ts +4 -3
- package/src/snackbar/stories/index.story.tsx +4 -4
- package/src/snackbar/stories/list.story.tsx +2 -2
- package/src/surface/stories/index.story.tsx +1 -1
- package/src/tabs/tab.tsx +0 -18
- package/src/tabs/test/index.tsx +1492 -947
- package/src/text-control/stories/index.story.tsx +1 -1
- package/src/textarea-control/stories/index.story.tsx +1 -1
- package/src/theme/stories/index.story.tsx +1 -1
- package/src/toggle-control/stories/index.story.tsx +1 -1
- package/src/toggle-group-control/stories/index.story.tsx +1 -1
- package/src/toolbar/stories/index.story.tsx +1 -1
- package/src/toolbar/toolbar-button/index.tsx +2 -0
- package/src/tools-panel/stories/index.story.tsx +15 -3
- package/src/tools-panel/test/index.tsx +0 -17
- package/src/tools-panel/tools-panel/README.md +4 -0
- package/src/tools-panel/tools-panel/component.tsx +2 -0
- package/src/tooltip/stories/index.story.tsx +1 -1
- package/src/tree-grid/cell.tsx +5 -1
- package/src/tree-grid/stories/index.story.tsx +1 -1
- package/src/tree-grid/types.ts +1 -1
- package/src/tree-select/stories/index.story.tsx +1 -1
- package/src/unit-control/README.md +3 -3
- package/src/unit-control/index.tsx +11 -1
- package/src/unit-control/stories/index.story.tsx +5 -4
- package/src/unit-control/test/index.tsx +5 -1
- package/src/unit-control/types.ts +7 -0
- package/src/view/stories/index.story.tsx +1 -1
- package/src/visually-hidden/stories/index.story.tsx +1 -1
- package/src/z-stack/stories/index.story.tsx +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/build/menu/use-temporary-focus-visible-fix.js +0 -27
- package/build/menu/use-temporary-focus-visible-fix.js.map +0 -1
- package/build-module/menu/use-temporary-focus-visible-fix.js +0 -20
- package/build-module/menu/use-temporary-focus-visible-fix.js.map +0 -1
- package/build-types/menu/use-temporary-focus-visible-fix.d.ts +0 -8
- package/build-types/menu/use-temporary-focus-visible-fix.d.ts.map +0 -1
- package/src/menu/use-temporary-focus-visible-fix.ts +0 -22
|
@@ -15,11 +15,14 @@ import { useState } from '@wordpress/element';
|
|
|
15
15
|
import BoxControl from '..';
|
|
16
16
|
import type { BoxControlProps, BoxControlValue } from '../types';
|
|
17
17
|
|
|
18
|
-
const
|
|
18
|
+
const ControlledBoxControl = (
|
|
19
|
+
extraProps: Omit< BoxControlProps, 'onChange' >
|
|
20
|
+
) => {
|
|
19
21
|
const [ state, setState ] = useState< BoxControlValue >();
|
|
20
22
|
|
|
21
23
|
return (
|
|
22
24
|
<BoxControl
|
|
25
|
+
__next40pxDefaultSize
|
|
23
26
|
values={ state }
|
|
24
27
|
onChange={ ( next ) => setState( next ) }
|
|
25
28
|
{ ...extraProps }
|
|
@@ -27,10 +30,17 @@ const Example = ( extraProps: Omit< BoxControlProps, 'onChange' > ) => {
|
|
|
27
30
|
);
|
|
28
31
|
};
|
|
29
32
|
|
|
33
|
+
const UncontrolledBoxControl = ( {
|
|
34
|
+
onChange = () => {},
|
|
35
|
+
...props
|
|
36
|
+
}: Omit< BoxControlProps, 'onChange' > & {
|
|
37
|
+
onChange?: BoxControlProps[ 'onChange' ];
|
|
38
|
+
} ) => <BoxControl __next40pxDefaultSize onChange={ onChange } { ...props } />;
|
|
39
|
+
|
|
30
40
|
describe( 'BoxControl', () => {
|
|
31
41
|
describe( 'Basic rendering', () => {
|
|
32
42
|
it( 'should render a box control input', () => {
|
|
33
|
-
render( <
|
|
43
|
+
render( <UncontrolledBoxControl /> );
|
|
34
44
|
|
|
35
45
|
expect(
|
|
36
46
|
screen.getByRole( 'group', { name: 'Box Control' } )
|
|
@@ -43,7 +53,7 @@ describe( 'BoxControl', () => {
|
|
|
43
53
|
it( 'should update values when interacting with input', async () => {
|
|
44
54
|
const user = userEvent.setup();
|
|
45
55
|
|
|
46
|
-
render( <
|
|
56
|
+
render( <UncontrolledBoxControl /> );
|
|
47
57
|
|
|
48
58
|
const input = screen.getByRole( 'textbox', { name: 'All sides' } );
|
|
49
59
|
|
|
@@ -54,7 +64,7 @@ describe( 'BoxControl', () => {
|
|
|
54
64
|
} );
|
|
55
65
|
|
|
56
66
|
it( 'should update input values when interacting with slider', () => {
|
|
57
|
-
render( <
|
|
67
|
+
render( <UncontrolledBoxControl /> );
|
|
58
68
|
|
|
59
69
|
const slider = screen.getByRole( 'slider' );
|
|
60
70
|
|
|
@@ -68,7 +78,7 @@ describe( 'BoxControl', () => {
|
|
|
68
78
|
|
|
69
79
|
it( 'should update slider values when interacting with input', async () => {
|
|
70
80
|
const user = userEvent.setup();
|
|
71
|
-
render( <
|
|
81
|
+
render( <UncontrolledBoxControl /> );
|
|
72
82
|
|
|
73
83
|
const input = screen.getByRole( 'textbox', {
|
|
74
84
|
name: 'All sides',
|
|
@@ -82,7 +92,7 @@ describe( 'BoxControl', () => {
|
|
|
82
92
|
} );
|
|
83
93
|
|
|
84
94
|
it( 'should render the number input with a default min value of 0', () => {
|
|
85
|
-
render( <
|
|
95
|
+
render( <UncontrolledBoxControl /> );
|
|
86
96
|
|
|
87
97
|
const input = screen.getByRole( 'textbox', { name: 'All sides' } );
|
|
88
98
|
|
|
@@ -91,10 +101,7 @@ describe( 'BoxControl', () => {
|
|
|
91
101
|
|
|
92
102
|
it( 'should pass down `inputProps` to the underlying number input', () => {
|
|
93
103
|
render(
|
|
94
|
-
<
|
|
95
|
-
onChange={ () => {} }
|
|
96
|
-
inputProps={ { min: 10, max: 50 } }
|
|
97
|
-
/>
|
|
104
|
+
<UncontrolledBoxControl inputProps={ { min: 10, max: 50 } } />
|
|
98
105
|
);
|
|
99
106
|
|
|
100
107
|
const input = screen.getByRole( 'textbox', { name: 'All sides' } );
|
|
@@ -108,7 +115,7 @@ describe( 'BoxControl', () => {
|
|
|
108
115
|
it( 'should reset values when clicking Reset', async () => {
|
|
109
116
|
const user = userEvent.setup();
|
|
110
117
|
|
|
111
|
-
render( <
|
|
118
|
+
render( <UncontrolledBoxControl /> );
|
|
112
119
|
|
|
113
120
|
const input = screen.getByRole( 'textbox', {
|
|
114
121
|
name: 'All sides',
|
|
@@ -127,7 +134,7 @@ describe( 'BoxControl', () => {
|
|
|
127
134
|
it( 'should reset values when clicking Reset, if controlled', async () => {
|
|
128
135
|
const user = userEvent.setup();
|
|
129
136
|
|
|
130
|
-
render( <
|
|
137
|
+
render( <ControlledBoxControl /> );
|
|
131
138
|
|
|
132
139
|
const input = screen.getByRole( 'textbox', {
|
|
133
140
|
name: 'All sides',
|
|
@@ -146,7 +153,7 @@ describe( 'BoxControl', () => {
|
|
|
146
153
|
it( 'should reset values when clicking Reset, if controlled <-> uncontrolled state changes', async () => {
|
|
147
154
|
const user = userEvent.setup();
|
|
148
155
|
|
|
149
|
-
render( <
|
|
156
|
+
render( <ControlledBoxControl /> );
|
|
150
157
|
|
|
151
158
|
const input = screen.getByRole( 'textbox', {
|
|
152
159
|
name: 'All sides',
|
|
@@ -166,7 +173,9 @@ describe( 'BoxControl', () => {
|
|
|
166
173
|
const user = userEvent.setup();
|
|
167
174
|
const spyChange = jest.fn();
|
|
168
175
|
|
|
169
|
-
render(
|
|
176
|
+
render(
|
|
177
|
+
<UncontrolledBoxControl onChange={ ( v ) => spyChange( v ) } />
|
|
178
|
+
);
|
|
170
179
|
|
|
171
180
|
const input = screen.getByRole( 'textbox', {
|
|
172
181
|
name: 'All sides',
|
|
@@ -196,7 +205,7 @@ describe( 'BoxControl', () => {
|
|
|
196
205
|
it( 'should update a single side value when unlinked', async () => {
|
|
197
206
|
const user = userEvent.setup();
|
|
198
207
|
|
|
199
|
-
render( <
|
|
208
|
+
render( <ControlledBoxControl /> );
|
|
200
209
|
|
|
201
210
|
await user.click(
|
|
202
211
|
screen.getByRole( 'button', { name: 'Unlink sides' } )
|
|
@@ -224,7 +233,7 @@ describe( 'BoxControl', () => {
|
|
|
224
233
|
it( 'should update a single side value when using slider unlinked', async () => {
|
|
225
234
|
const user = userEvent.setup();
|
|
226
235
|
|
|
227
|
-
render( <
|
|
236
|
+
render( <ControlledBoxControl /> );
|
|
228
237
|
|
|
229
238
|
await user.click(
|
|
230
239
|
screen.getByRole( 'button', { name: 'Unlink sides' } )
|
|
@@ -252,7 +261,7 @@ describe( 'BoxControl', () => {
|
|
|
252
261
|
it( 'should update a whole axis when value is changed when unlinked', async () => {
|
|
253
262
|
const user = userEvent.setup();
|
|
254
263
|
|
|
255
|
-
render( <
|
|
264
|
+
render( <ControlledBoxControl splitOnAxis /> );
|
|
256
265
|
|
|
257
266
|
await user.click(
|
|
258
267
|
screen.getByRole( 'button', { name: 'Unlink sides' } )
|
|
@@ -276,7 +285,7 @@ describe( 'BoxControl', () => {
|
|
|
276
285
|
it( 'should update a whole axis using a slider when value is changed when unlinked', async () => {
|
|
277
286
|
const user = userEvent.setup();
|
|
278
287
|
|
|
279
|
-
render( <
|
|
288
|
+
render( <ControlledBoxControl splitOnAxis /> );
|
|
280
289
|
|
|
281
290
|
await user.click(
|
|
282
291
|
screen.getByRole( 'button', { name: 'Unlink sides' } )
|
|
@@ -300,7 +309,7 @@ describe( 'BoxControl', () => {
|
|
|
300
309
|
it( 'should show "Mixed" label when sides have different values but are linked', async () => {
|
|
301
310
|
const user = userEvent.setup();
|
|
302
311
|
|
|
303
|
-
render( <
|
|
312
|
+
render( <ControlledBoxControl /> );
|
|
304
313
|
|
|
305
314
|
const unlinkButton = screen.getByRole( 'button', {
|
|
306
315
|
name: 'Unlink sides',
|
|
@@ -330,7 +339,7 @@ describe( 'BoxControl', () => {
|
|
|
330
339
|
const user = userEvent.setup();
|
|
331
340
|
|
|
332
341
|
// Render control.
|
|
333
|
-
render( <
|
|
342
|
+
render( <UncontrolledBoxControl /> );
|
|
334
343
|
|
|
335
344
|
// Make unit selection on all input control.
|
|
336
345
|
await user.selectOptions(
|
|
@@ -362,7 +371,7 @@ describe( 'BoxControl', () => {
|
|
|
362
371
|
const user = userEvent.setup();
|
|
363
372
|
|
|
364
373
|
// Render control.
|
|
365
|
-
const { rerender } = render( <
|
|
374
|
+
const { rerender } = render( <UncontrolledBoxControl /> );
|
|
366
375
|
|
|
367
376
|
// Make unit selection on all input control.
|
|
368
377
|
await user.selectOptions(
|
|
@@ -390,9 +399,7 @@ describe( 'BoxControl', () => {
|
|
|
390
399
|
} );
|
|
391
400
|
|
|
392
401
|
// Rerender with individual side value & confirm unit is selected.
|
|
393
|
-
rerender(
|
|
394
|
-
<BoxControl values={ { top: '2.5em' } } onChange={ () => {} } />
|
|
395
|
-
);
|
|
402
|
+
rerender( <UncontrolledBoxControl values={ { top: '2.5em' } } /> );
|
|
396
403
|
|
|
397
404
|
const rerenderedControls = screen.getAllByRole( 'combobox', {
|
|
398
405
|
name: 'Select unit',
|
|
@@ -414,7 +421,7 @@ describe( 'BoxControl', () => {
|
|
|
414
421
|
const user = userEvent.setup();
|
|
415
422
|
const onChangeSpy = jest.fn();
|
|
416
423
|
|
|
417
|
-
render( <
|
|
424
|
+
render( <UncontrolledBoxControl onChange={ onChangeSpy } /> );
|
|
418
425
|
|
|
419
426
|
const valueInput = screen.getByRole( 'textbox', {
|
|
420
427
|
name: 'All sides',
|
|
@@ -443,7 +450,7 @@ describe( 'BoxControl', () => {
|
|
|
443
450
|
const user = userEvent.setup();
|
|
444
451
|
const setState = jest.fn();
|
|
445
452
|
|
|
446
|
-
render( <
|
|
453
|
+
render( <UncontrolledBoxControl onChange={ setState } /> );
|
|
447
454
|
|
|
448
455
|
await user.selectOptions(
|
|
449
456
|
screen.getByRole( 'combobox', {
|
package/src/box-control/types.ts
CHANGED
|
@@ -17,68 +17,85 @@ export type CustomValueUnits = {
|
|
|
17
17
|
|
|
18
18
|
type UnitControlPassthroughProps = Omit<
|
|
19
19
|
UnitControlProps,
|
|
20
|
-
'label' | 'onChange' | 'onFocus' | '
|
|
20
|
+
'label' | 'onChange' | 'onFocus' | 'units'
|
|
21
21
|
>;
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
UnitControlProps,
|
|
25
|
-
'onMouseOver' | 'onMouseOut' | 'units'
|
|
26
|
-
> & {
|
|
27
|
-
/**
|
|
28
|
-
* If this property is true, a button to reset the box control is rendered.
|
|
29
|
-
*
|
|
30
|
-
* @default true
|
|
31
|
-
*/
|
|
32
|
-
allowReset?: boolean;
|
|
33
|
-
/**
|
|
34
|
-
* The id to use as a base for the unique HTML id attribute of the control.
|
|
35
|
-
*/
|
|
36
|
-
id?: string;
|
|
37
|
-
/**
|
|
38
|
-
* Props for the internal `UnitControl` components.
|
|
39
|
-
*
|
|
40
|
-
* @default { min: 0 }
|
|
41
|
-
*/
|
|
42
|
-
inputProps?: UnitControlPassthroughProps;
|
|
43
|
-
/**
|
|
44
|
-
* Heading label for the control.
|
|
45
|
-
*
|
|
46
|
-
* @default __( 'Box Control' )
|
|
47
|
-
*/
|
|
48
|
-
label?: string;
|
|
23
|
+
type DeprecatedBoxControlProps = {
|
|
49
24
|
/**
|
|
50
|
-
*
|
|
25
|
+
* @deprecated Pass to the `inputProps` prop instead.
|
|
26
|
+
* @ignore
|
|
51
27
|
*/
|
|
52
|
-
|
|
28
|
+
onMouseOver?: UnitControlProps[ 'onMouseOver' ];
|
|
53
29
|
/**
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
* @default { top: undefined, right: undefined, bottom: undefined, left: undefined }
|
|
30
|
+
* @deprecated Pass to the `inputProps` prop instead.
|
|
31
|
+
* @ignore
|
|
57
32
|
*/
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Collection of sides to allow control of. If omitted or empty, all sides will be available.
|
|
61
|
-
*/
|
|
62
|
-
sides?: readonly ( keyof BoxControlValue | 'horizontal' | 'vertical' )[];
|
|
63
|
-
/**
|
|
64
|
-
* If this property is true, when the box control is unlinked, vertical and horizontal controls
|
|
65
|
-
* can be used instead of updating individual sides.
|
|
66
|
-
*
|
|
67
|
-
* @default false
|
|
68
|
-
*/
|
|
69
|
-
splitOnAxis?: boolean;
|
|
70
|
-
/**
|
|
71
|
-
* The current values of the control, expressed as an object of `top`, `right`, `bottom`, and `left` values.
|
|
72
|
-
*/
|
|
73
|
-
values?: BoxControlValue;
|
|
74
|
-
/**
|
|
75
|
-
* Start opting into the larger default height that will become the default size in a future version.
|
|
76
|
-
*
|
|
77
|
-
* @default false
|
|
78
|
-
*/
|
|
79
|
-
__next40pxDefaultSize?: boolean;
|
|
33
|
+
onMouseOut?: UnitControlProps[ 'onMouseOut' ];
|
|
80
34
|
};
|
|
81
35
|
|
|
36
|
+
export type BoxControlProps = Pick< UnitControlProps, 'units' > &
|
|
37
|
+
DeprecatedBoxControlProps & {
|
|
38
|
+
/**
|
|
39
|
+
* If this property is true, a button to reset the box control is rendered.
|
|
40
|
+
*
|
|
41
|
+
* @default true
|
|
42
|
+
*/
|
|
43
|
+
allowReset?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* The id to use as a base for the unique HTML id attribute of the control.
|
|
46
|
+
*/
|
|
47
|
+
id?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Props for the internal `UnitControl` components.
|
|
50
|
+
*
|
|
51
|
+
* @default { min: 0 }
|
|
52
|
+
*/
|
|
53
|
+
inputProps?: UnitControlPassthroughProps;
|
|
54
|
+
/**
|
|
55
|
+
* Heading label for the control.
|
|
56
|
+
*
|
|
57
|
+
* @default __( 'Box Control' )
|
|
58
|
+
*/
|
|
59
|
+
label?: string;
|
|
60
|
+
/**
|
|
61
|
+
* A callback function when an input value changes.
|
|
62
|
+
*/
|
|
63
|
+
onChange: ( next: BoxControlValue ) => void;
|
|
64
|
+
/**
|
|
65
|
+
* The `top`, `right`, `bottom`, and `left` box dimension values to use when the control is reset.
|
|
66
|
+
*
|
|
67
|
+
* @default { top: undefined, right: undefined, bottom: undefined, left: undefined }
|
|
68
|
+
*/
|
|
69
|
+
resetValues?: BoxControlValue;
|
|
70
|
+
/**
|
|
71
|
+
* Collection of sides to allow control of. If omitted or empty, all sides will be available.
|
|
72
|
+
*
|
|
73
|
+
* Allowed values are "top", "right", "bottom", "left", "vertical", and "horizontal".
|
|
74
|
+
*/
|
|
75
|
+
sides?: readonly (
|
|
76
|
+
| keyof BoxControlValue
|
|
77
|
+
| 'horizontal'
|
|
78
|
+
| 'vertical'
|
|
79
|
+
)[];
|
|
80
|
+
/**
|
|
81
|
+
* If this property is true, when the box control is unlinked, vertical and horizontal controls
|
|
82
|
+
* can be used instead of updating individual sides.
|
|
83
|
+
*
|
|
84
|
+
* @default false
|
|
85
|
+
*/
|
|
86
|
+
splitOnAxis?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* The current values of the control, expressed as an object of `top`, `right`, `bottom`, and `left` values.
|
|
89
|
+
*/
|
|
90
|
+
values?: BoxControlValue;
|
|
91
|
+
/**
|
|
92
|
+
* Start opting into the larger default height that will become the default size in a future version.
|
|
93
|
+
*
|
|
94
|
+
* @default false
|
|
95
|
+
*/
|
|
96
|
+
__next40pxDefaultSize?: boolean;
|
|
97
|
+
};
|
|
98
|
+
|
|
82
99
|
export type BoxControlInputControlProps = UnitControlPassthroughProps & {
|
|
83
100
|
onChange?: ( nextValues: BoxControlValue ) => void;
|
|
84
101
|
onFocus?: (
|
|
@@ -32,8 +32,8 @@ const meta: Meta< typeof CircularOptionPicker > = {
|
|
|
32
32
|
CircularOptionPicker.DropdownLinkAction,
|
|
33
33
|
},
|
|
34
34
|
argTypes: {
|
|
35
|
-
actions: { control:
|
|
36
|
-
options: { control:
|
|
35
|
+
actions: { control: false },
|
|
36
|
+
options: { control: false },
|
|
37
37
|
children: { control: { type: 'text' } },
|
|
38
38
|
},
|
|
39
39
|
parameters: {
|
|
@@ -67,8 +67,8 @@ $color-palette-circle-spacing: 12px;
|
|
|
67
67
|
.components-circular-option-picker__option {
|
|
68
68
|
display: inline-block;
|
|
69
69
|
vertical-align: top;
|
|
70
|
-
height: 100
|
|
71
|
-
|
|
70
|
+
height: 100% !important;
|
|
71
|
+
aspect-ratio: 1;
|
|
72
72
|
border: none;
|
|
73
73
|
border-radius: $radius-round;
|
|
74
74
|
background: transparent;
|
|
@@ -45,9 +45,11 @@ export default function ClipboardButton( {
|
|
|
45
45
|
} );
|
|
46
46
|
|
|
47
47
|
useEffect( () => {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
return () => {
|
|
49
|
+
if ( timeoutIdRef.current ) {
|
|
50
|
+
clearTimeout( timeoutIdRef.current );
|
|
51
|
+
}
|
|
52
|
+
};
|
|
51
53
|
}, [] );
|
|
52
54
|
|
|
53
55
|
const classes = clsx( 'components-clipboard-button', className );
|
|
@@ -18,9 +18,9 @@ const meta: Meta< typeof ColorPalette > = {
|
|
|
18
18
|
id: 'components-colorpalette',
|
|
19
19
|
component: ColorPalette,
|
|
20
20
|
argTypes: {
|
|
21
|
-
as: { control:
|
|
22
|
-
onChange: { action: 'onChange', control:
|
|
23
|
-
value: { control:
|
|
21
|
+
as: { control: false },
|
|
22
|
+
onChange: { action: 'onChange', control: false },
|
|
23
|
+
value: { control: false },
|
|
24
24
|
},
|
|
25
25
|
parameters: {
|
|
26
26
|
controls: { expanded: true },
|
|
@@ -31,6 +31,7 @@ export const InputWithSlider = ( {
|
|
|
31
31
|
return (
|
|
32
32
|
<HStack spacing={ 4 }>
|
|
33
33
|
<NumberControlWrapper
|
|
34
|
+
__next40pxDefaultSize
|
|
34
35
|
min={ min }
|
|
35
36
|
max={ max }
|
|
36
37
|
label={ label }
|
|
@@ -45,7 +46,6 @@ export const InputWithSlider = ( {
|
|
|
45
46
|
</InputControlPrefixWrapper>
|
|
46
47
|
}
|
|
47
48
|
spinControls="none"
|
|
48
|
-
size="__unstable-large"
|
|
49
49
|
/>
|
|
50
50
|
<RangeControl
|
|
51
51
|
__nextHasNoMarginBottom
|
|
@@ -13,8 +13,8 @@ const meta: Meta< typeof ColorPicker > = {
|
|
|
13
13
|
title: 'Components/Selection & Input/Color/ColorPicker',
|
|
14
14
|
id: 'components-colorpicker',
|
|
15
15
|
argTypes: {
|
|
16
|
-
as: { control:
|
|
17
|
-
color: { control:
|
|
16
|
+
as: { control: false },
|
|
17
|
+
color: { control: false },
|
|
18
18
|
},
|
|
19
19
|
parameters: {
|
|
20
20
|
actions: { argTypesRegex: '^on.*' },
|
|
@@ -38,7 +38,7 @@ const meta: Meta< typeof ComboboxControl > = {
|
|
|
38
38
|
id: 'components-comboboxcontrol',
|
|
39
39
|
component: ComboboxControl,
|
|
40
40
|
argTypes: {
|
|
41
|
-
value: { control:
|
|
41
|
+
value: { control: false },
|
|
42
42
|
},
|
|
43
43
|
parameters: {
|
|
44
44
|
actions: { argTypesRegex: '^on.*' },
|
package/src/composite/item.tsx
CHANGED
|
@@ -26,23 +26,5 @@ export const CompositeItem = forwardRef<
|
|
|
26
26
|
// obfuscated to discourage its use outside of the component's internals.
|
|
27
27
|
const store = ( props.store ?? context.store ) as Ariakit.CompositeStore;
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
// where none of the items are tabbable. In this case, we force all items to
|
|
31
|
-
// be tabbable, so that as soon as an item received focus, it becomes active
|
|
32
|
-
// and Composite goes back to working as expected.
|
|
33
|
-
const tabbable = Ariakit.useStoreState( store, ( state ) => {
|
|
34
|
-
return (
|
|
35
|
-
state?.activeId !== null &&
|
|
36
|
-
! store?.item( state?.activeId )?.element?.isConnected
|
|
37
|
-
);
|
|
38
|
-
} );
|
|
39
|
-
|
|
40
|
-
return (
|
|
41
|
-
<Ariakit.CompositeItem
|
|
42
|
-
store={ store }
|
|
43
|
-
tabbable={ tabbable }
|
|
44
|
-
{ ...props }
|
|
45
|
-
ref={ ref }
|
|
46
|
-
/>
|
|
47
|
-
);
|
|
29
|
+
return <Ariakit.CompositeItem store={ store } { ...props } ref={ ref } />;
|
|
48
30
|
} );
|
|
@@ -36,9 +36,9 @@ const meta: Meta< typeof Composite > = {
|
|
|
36
36
|
'Composite.Context': Composite.Context,
|
|
37
37
|
},
|
|
38
38
|
argTypes: {
|
|
39
|
-
children: { control:
|
|
40
|
-
render: { control:
|
|
41
|
-
setActiveId: { control:
|
|
39
|
+
children: { control: false },
|
|
40
|
+
render: { control: false },
|
|
41
|
+
setActiveId: { control: false },
|
|
42
42
|
focusLoop: {
|
|
43
43
|
control: 'select',
|
|
44
44
|
options: [ true, false, 'horizontal', 'vertical', 'both' ],
|
|
@@ -66,6 +66,7 @@ function ControlPointButton( {
|
|
|
66
66
|
aria-describedby={ descriptionId }
|
|
67
67
|
aria-haspopup="true"
|
|
68
68
|
aria-expanded={ isOpen }
|
|
69
|
+
__next40pxDefaultSize
|
|
69
70
|
className={ clsx(
|
|
70
71
|
'components-custom-gradient-picker__control-point-button',
|
|
71
72
|
{
|
|
@@ -349,6 +350,7 @@ function InsertPoint( {
|
|
|
349
350
|
} }
|
|
350
351
|
renderToggle={ ( { isOpen, onToggle } ) => (
|
|
351
352
|
<Button
|
|
353
|
+
__next40pxDefaultSize
|
|
352
354
|
aria-expanded={ isOpen }
|
|
353
355
|
aria-haspopup="true"
|
|
354
356
|
onClick={ () => {
|
|
@@ -140,6 +140,7 @@ const GradientTypePicker = ( {
|
|
|
140
140
|
export function CustomGradientPicker( {
|
|
141
141
|
value,
|
|
142
142
|
onChange,
|
|
143
|
+
enableAlpha = true,
|
|
143
144
|
__experimentalIsRenderedInSidebar = false,
|
|
144
145
|
}: CustomGradientPickerProps ) {
|
|
145
146
|
const { gradientAST, hasGradient } = getGradientAstWithDefault( value );
|
|
@@ -167,6 +168,7 @@ export function CustomGradientPicker( {
|
|
|
167
168
|
__experimentalIsRenderedInSidebar={
|
|
168
169
|
__experimentalIsRenderedInSidebar
|
|
169
170
|
}
|
|
171
|
+
disableAlpha={ ! enableAlpha }
|
|
170
172
|
background={ background }
|
|
171
173
|
hasGradient={ hasGradient }
|
|
172
174
|
value={ controlPoints }
|
|
@@ -47,7 +47,7 @@ $components-custom-gradient-picker__padding: $grid-unit-20; // 48px container, 1
|
|
|
47
47
|
// Same size as the .components-custom-gradient-picker__control-point-dropdown parent
|
|
48
48
|
height: inherit;
|
|
49
49
|
width: inherit;
|
|
50
|
-
min-width: $grid-unit-20;
|
|
50
|
+
min-width: $grid-unit-20 !important;
|
|
51
51
|
border-radius: $radius-round;
|
|
52
52
|
|
|
53
53
|
background: $white;
|
|
@@ -26,6 +26,12 @@ export type CustomGradientPickerProps = {
|
|
|
26
26
|
* the `currentGradient` as an argument.
|
|
27
27
|
*/
|
|
28
28
|
onChange: ( currentGradient: string ) => void;
|
|
29
|
+
/**
|
|
30
|
+
* Whether to enable alpha transparency options in the picker.
|
|
31
|
+
*
|
|
32
|
+
* @default true
|
|
33
|
+
*/
|
|
34
|
+
enableAlpha?: boolean;
|
|
29
35
|
/**
|
|
30
36
|
* Whether this is rendered in the sidebar.
|
|
31
37
|
*
|
|
@@ -41,6 +41,7 @@ function MyCustomSelectControl() {
|
|
|
41
41
|
const [ , setFontSize ] = useState();
|
|
42
42
|
return (
|
|
43
43
|
<CustomSelectControl
|
|
44
|
+
__next40pxDefaultSize
|
|
44
45
|
label="Font Size"
|
|
45
46
|
options={ options }
|
|
46
47
|
onChange={ ( { selectedItem } ) => setFontSize( selectedItem ) }
|
|
@@ -52,6 +53,7 @@ function MyControlledCustomSelectControl() {
|
|
|
52
53
|
const [ fontSize, setFontSize ] = useState( options[ 0 ] );
|
|
53
54
|
return (
|
|
54
55
|
<CustomSelectControl
|
|
56
|
+
__next40pxDefaultSize
|
|
55
57
|
label="Font Size"
|
|
56
58
|
options={ options }
|
|
57
59
|
onChange={ ( { selectedItem } ) => setFontSize( selectedItem ) }
|
|
@@ -18,6 +18,7 @@ import CustomSelectItem from '../custom-select-control-v2/item';
|
|
|
18
18
|
import * as Styled from '../custom-select-control-v2/styles';
|
|
19
19
|
import type { CustomSelectProps, CustomSelectOption } from './types';
|
|
20
20
|
import { VisuallyHidden } from '../visually-hidden';
|
|
21
|
+
import { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';
|
|
21
22
|
|
|
22
23
|
function useDeprecatedProps< T extends CustomSelectOption >( {
|
|
23
24
|
__experimentalShowSelectedHint,
|
|
@@ -56,6 +57,7 @@ function CustomSelectControl< T extends CustomSelectOption >(
|
|
|
56
57
|
) {
|
|
57
58
|
const {
|
|
58
59
|
__next40pxDefaultSize = false,
|
|
60
|
+
__shouldNotWarnDeprecated36pxSize,
|
|
59
61
|
describedBy,
|
|
60
62
|
options,
|
|
61
63
|
onChange,
|
|
@@ -66,6 +68,13 @@ function CustomSelectControl< T extends CustomSelectOption >(
|
|
|
66
68
|
...restProps
|
|
67
69
|
} = useDeprecatedProps( props );
|
|
68
70
|
|
|
71
|
+
maybeWarnDeprecated36pxSize( {
|
|
72
|
+
componentName: 'CustomSelectControl',
|
|
73
|
+
__next40pxDefaultSize,
|
|
74
|
+
size,
|
|
75
|
+
__shouldNotWarnDeprecated36pxSize,
|
|
76
|
+
} );
|
|
77
|
+
|
|
69
78
|
const descriptionId = useInstanceId(
|
|
70
79
|
CustomSelectControl,
|
|
71
80
|
'custom-select-control__description'
|
|
@@ -18,8 +18,8 @@ const meta: Meta< typeof CustomSelectControl > = {
|
|
|
18
18
|
component: CustomSelectControl,
|
|
19
19
|
id: 'components-customselectcontrol',
|
|
20
20
|
argTypes: {
|
|
21
|
-
onChange: { control:
|
|
22
|
-
value: { control:
|
|
21
|
+
onChange: { control: false },
|
|
22
|
+
value: { control: false },
|
|
23
23
|
},
|
|
24
24
|
parameters: {
|
|
25
25
|
actions: { argTypesRegex: '^on.*' },
|
|
@@ -63,6 +63,7 @@ const Template: StoryFn< typeof CustomSelectControl > = ( props ) => {
|
|
|
63
63
|
|
|
64
64
|
export const Default = Template.bind( {} );
|
|
65
65
|
Default.args = {
|
|
66
|
+
__next40pxDefaultSize: true,
|
|
66
67
|
label: 'Label',
|
|
67
68
|
options: [
|
|
68
69
|
{
|