@wordpress/components 29.0.1-next.a9f418477.0 → 29.1.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 +50 -10
- package/LICENSE.md +1 -1
- package/build/alignment-matrix-control/icon.js +1 -0
- package/build/alignment-matrix-control/icon.js.map +1 -1
- package/build/alignment-matrix-control/index.js +1 -0
- package/build/alignment-matrix-control/index.js.map +1 -1
- package/build/autocomplete/autocompleter-ui.js +1 -0
- package/build/autocomplete/autocompleter-ui.js.map +1 -1
- package/build/autocomplete/autocompleter-ui.native.js +1 -0
- package/build/autocomplete/autocompleter-ui.native.js.map +1 -1
- package/build/autocomplete/get-default-use-items.js +1 -0
- package/build/autocomplete/get-default-use-items.js.map +1 -1
- package/build/autocomplete/index.js +1 -0
- package/build/autocomplete/index.js.map +1 -1
- package/build/badge/index.js +64 -0
- package/build/badge/index.js.map +1 -0
- package/build/badge/types.js +6 -0
- package/build/badge/types.js.map +1 -0
- package/build/border-box-control/utils.js +1 -0
- package/build/border-box-control/utils.js.map +1 -1
- package/build/border-control/border-control-dropdown/component.js +1 -0
- package/build/border-control/border-control-dropdown/component.js.map +1 -1
- package/build/border-control/border-control-style-picker/component.js +1 -0
- package/build/border-control/border-control-style-picker/component.js.map +1 -1
- package/build/box-control/index.js +18 -14
- package/build/box-control/index.js.map +1 -1
- package/build/box-control/input-control.js +222 -0
- package/build/box-control/input-control.js.map +1 -0
- package/build/box-control/types.js.map +1 -1
- package/build/box-control/utils.js +101 -48
- package/build/box-control/utils.js.map +1 -1
- package/build/button/index.native.js +1 -0
- package/build/button/index.native.js.map +1 -1
- package/build/button/types.js.map +1 -1
- package/build/button-group/index.js +10 -0
- package/build/button-group/index.js.map +1 -1
- package/build/button-group/types.js.map +1 -1
- package/build/color-indicator/index.native.js +1 -0
- package/build/color-indicator/index.native.js.map +1 -1
- package/build/color-palette/index.js +1 -0
- package/build/color-palette/index.js.map +1 -1
- package/build/color-palette/index.native.js +1 -0
- package/build/color-palette/index.native.js.map +1 -1
- package/build/color-palette/utils.js +1 -0
- package/build/color-palette/utils.js.map +1 -1
- package/build/combobox-control/index.js +1 -0
- package/build/combobox-control/index.js.map +1 -1
- package/build/composite/legacy/index.js +1 -0
- package/build/composite/legacy/index.js.map +1 -1
- package/build/context/context-connect.js +1 -0
- package/build/context/context-connect.js.map +1 -1
- package/build/custom-gradient-picker/gradient-bar/control-points.js +1 -0
- package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
- package/build/custom-gradient-picker/gradient-bar/index.js +1 -0
- package/build/custom-gradient-picker/gradient-bar/index.js.map +1 -1
- package/build/custom-gradient-picker/gradient-bar/utils.js +1 -0
- package/build/custom-gradient-picker/gradient-bar/utils.js.map +1 -1
- package/build/custom-gradient-picker/index.js +1 -0
- package/build/custom-gradient-picker/index.js.map +1 -1
- package/build/custom-gradient-picker/serializer.js +1 -0
- package/build/custom-gradient-picker/serializer.js.map +1 -1
- package/build/custom-gradient-picker/utils.js +1 -0
- package/build/custom-gradient-picker/utils.js.map +1 -1
- package/build/custom-select-control/index.js +2 -3
- package/build/custom-select-control/index.js.map +1 -1
- package/build/custom-select-control-v2/custom-select.js +2 -3
- package/build/custom-select-control-v2/custom-select.js.map +1 -1
- package/build/dashicon/index.js +1 -0
- package/build/dashicon/index.js.map +1 -1
- package/build/date-time/date/index.js +2 -0
- package/build/date-time/date/index.js.map +1 -1
- package/build/date-time/date/use-lilius/index.js +1 -0
- package/build/date-time/date/use-lilius/index.js.map +1 -1
- package/build/date-time/time/index.js +1 -0
- package/build/date-time/time/index.js.map +1 -1
- package/build/dimension-control/index.js +2 -0
- package/build/dimension-control/index.js.map +1 -1
- package/build/dimension-control/sizes.js +1 -0
- package/build/dimension-control/sizes.js.map +1 -1
- package/build/draggable/index.js +1 -0
- package/build/draggable/index.js.map +1 -1
- package/build/draggable/index.native.js +1 -0
- package/build/draggable/index.native.js.map +1 -1
- package/build/dropdown-menu/index.js +1 -0
- package/build/dropdown-menu/index.js.map +1 -1
- package/build/dropdown-menu/index.native.js +1 -0
- package/build/dropdown-menu/index.native.js.map +1 -1
- package/build/duotone-picker/color-list-picker/index.js +1 -0
- package/build/duotone-picker/color-list-picker/index.js.map +1 -1
- package/build/duotone-picker/duotone-picker.js +1 -0
- package/build/duotone-picker/duotone-picker.js.map +1 -1
- package/build/duotone-picker/utils.js +1 -0
- package/build/duotone-picker/utils.js.map +1 -1
- package/build/external-link/index.js +1 -0
- 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/font-size-picker-toggle-group.js +1 -0
- package/build/font-size-picker/font-size-picker-toggle-group.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/font-size-picker/index.native.js +1 -0
- package/build/font-size-picker/index.native.js.map +1 -1
- package/build/font-size-picker/styles.js +9 -9
- package/build/font-size-picker/styles.js.map +1 -1
- package/build/font-size-picker/utils.js +1 -0
- package/build/font-size-picker/utils.js.map +1 -1
- package/build/form-token-field/index.js +1 -0
- package/build/form-token-field/index.js.map +1 -1
- package/build/form-token-field/suggestions-list.js +1 -0
- package/build/form-token-field/suggestions-list.js.map +1 -1
- package/build/gradient-picker/index.js +1 -0
- package/build/gradient-picker/index.js.map +1 -1
- package/build/guide/index.js +1 -0
- package/build/guide/index.js.map +1 -1
- package/build/guide/page-control.js +1 -0
- package/build/guide/page-control.js.map +1 -1
- package/build/h-stack/hook.js +1 -0
- package/build/h-stack/hook.js.map +1 -1
- package/build/heading/hook.js +1 -1
- package/build/heading/hook.js.map +1 -1
- package/build/higher-order/navigate-regions/index.js +1 -0
- package/build/higher-order/navigate-regions/index.js.map +1 -1
- package/build/higher-order/with-fallback-styles/index.js +1 -0
- package/build/higher-order/with-fallback-styles/index.js.map +1 -1
- package/build/higher-order/with-filters/index.js +1 -0
- package/build/higher-order/with-filters/index.js.map +1 -1
- package/build/higher-order/with-notices/index.js +1 -0
- package/build/higher-order/with-notices/index.js.map +1 -1
- package/build/input-control/index.js +9 -0
- package/build/input-control/index.js.map +1 -1
- package/build/input-control/types.js.map +1 -1
- package/build/keyboard-shortcuts/index.js +1 -0
- package/build/keyboard-shortcuts/index.js.map +1 -1
- package/build/menu/checkbox-item.js +2 -0
- package/build/menu/checkbox-item.js.map +1 -1
- package/build/menu/index.js +25 -94
- package/build/menu/index.js.map +1 -1
- package/build/menu/item.js +10 -1
- package/build/menu/item.js.map +1 -1
- package/build/menu/popover.js +89 -0
- package/build/menu/popover.js.map +1 -0
- package/build/menu/radio-item.js +2 -0
- package/build/menu/radio-item.js.map +1 -1
- package/build/menu/styles.js +16 -16
- package/build/menu/styles.js.map +1 -1
- package/build/menu/submenu-trigger-item.js +58 -0
- package/build/menu/submenu-trigger-item.js.map +1 -0
- package/build/menu/trigger-button.js +45 -0
- package/build/menu/trigger-button.js.map +1 -0
- package/build/menu/types.js.map +1 -1
- package/build/menu-items-choice/index.js +1 -0
- package/build/menu-items-choice/index.js.map +1 -1
- package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +1 -0
- package/build/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
- package/build/mobile/bottom-sheet/keyboard-avoiding-view.native.js +1 -0
- package/build/mobile/bottom-sheet/keyboard-avoiding-view.native.js.map +1 -1
- package/build/mobile/bottom-sheet/picker-cell.native.js +1 -0
- package/build/mobile/bottom-sheet/picker-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet-select-control/index.native.js +1 -0
- package/build/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
- package/build/mobile/color-settings/palette.screen.native.js +1 -0
- package/build/mobile/color-settings/palette.screen.native.js.map +1 -1
- package/build/mobile/gradient/index.native.js +1 -0
- package/build/mobile/gradient/index.native.js.map +1 -1
- package/build/mobile/media-edit/index.native.js +1 -0
- package/build/mobile/media-edit/index.native.js.map +1 -1
- package/build/mobile/picker/index.android.js +1 -0
- package/build/mobile/picker/index.android.js.map +1 -1
- package/build/mobile/picker/index.ios.js +1 -0
- package/build/mobile/picker/index.ios.js.map +1 -1
- package/build/mobile/segmented-control/index.native.js +1 -0
- package/build/mobile/segmented-control/index.native.js.map +1 -1
- package/build/mobile/utils/get-px-from-css-unit.native.js +1 -0
- package/build/mobile/utils/get-px-from-css-unit.native.js.map +1 -1
- package/build/navigable-container/container.js +1 -0
- package/build/navigable-container/container.js.map +1 -1
- package/build/navigation/back-button/index.js +1 -0
- package/build/navigation/back-button/index.js.map +1 -1
- package/build/navigation/group/index.js +1 -0
- package/build/navigation/group/index.js.map +1 -1
- package/build/navigation/index.js +6 -0
- package/build/navigation/index.js.map +1 -1
- package/build/navigation/item/index.js +1 -0
- package/build/navigation/item/index.js.map +1 -1
- package/build/navigation/menu/menu-title-search.js +1 -0
- package/build/navigation/menu/menu-title-search.js.map +1 -1
- package/build/navigation/menu/search-no-results-found.js +1 -0
- package/build/navigation/menu/search-no-results-found.js.map +1 -1
- package/build/navigation/styles/navigation-styles.js +12 -12
- package/build/navigation/styles/navigation-styles.js.map +1 -1
- package/build/navigator/navigator/component.js +1 -0
- package/build/navigator/navigator/component.js.map +1 -1
- package/build/navigator/navigator-screen/component.js +1 -0
- package/build/navigator/navigator-screen/component.js.map +1 -1
- package/build/navigator/utils/router.js +1 -0
- package/build/navigator/utils/router.js.map +1 -1
- package/build/notice/index.js +1 -0
- package/build/notice/index.js.map +1 -1
- package/build/notice/list.js +1 -0
- package/build/notice/list.js.map +1 -1
- package/build/notice/list.native.js +1 -0
- package/build/notice/list.native.js.map +1 -1
- package/build/number-control/index.js +1 -0
- package/build/number-control/index.js.map +1 -1
- package/build/palette-edit/index.js +2 -0
- package/build/palette-edit/index.js.map +1 -1
- package/build/panel/actions.native.js +1 -0
- package/build/panel/actions.native.js.map +1 -1
- package/build/private-apis.js +3 -1
- package/build/private-apis.js.map +1 -1
- package/build/query-controls/index.js +1 -0
- package/build/query-controls/index.js.map +1 -1
- package/build/query-controls/terms.js +1 -0
- package/build/query-controls/terms.js.map +1 -1
- package/build/radio-control/index.js +1 -0
- package/build/radio-control/index.js.map +1 -1
- package/build/radio-control/index.native.js +1 -0
- package/build/radio-control/index.native.js.map +1 -1
- package/build/radio-group/index.js +6 -0
- package/build/radio-group/index.js.map +1 -1
- package/build/radio-group/radio.js +2 -3
- package/build/radio-group/radio.js.map +1 -1
- package/build/range-control/rail.js +1 -0
- package/build/range-control/rail.js.map +1 -1
- package/build/range-control/styles/range-control-styles.js +28 -28
- package/build/range-control/styles/range-control-styles.js.map +1 -1
- package/build/resizable-box/index.js +1 -0
- package/build/resizable-box/index.js.map +1 -1
- package/build/sandbox/index.js +1 -0
- package/build/sandbox/index.js.map +1 -1
- package/build/sandbox/index.native.js +1 -0
- package/build/sandbox/index.native.js.map +1 -1
- package/build/search-control/index.native.js +1 -0
- package/build/search-control/index.native.js.map +1 -1
- package/build/select-control/index.js +10 -0
- package/build/select-control/index.js.map +1 -1
- package/build/select-control/types.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/slot-fill-provider.js +1 -0
- package/build/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
- package/build/slot-fill/context.js +4 -3
- package/build/slot-fill/context.js.map +1 -1
- package/build/slot-fill/fill.js +10 -15
- package/build/slot-fill/fill.js.map +1 -1
- package/build/slot-fill/provider.js +42 -55
- package/build/slot-fill/provider.js.map +1 -1
- package/build/slot-fill/slot.js +32 -23
- package/build/slot-fill/slot.js.map +1 -1
- package/build/slot-fill/types.js.map +1 -1
- package/build/snackbar/index.js +1 -0
- package/build/snackbar/index.js.map +1 -1
- package/build/snackbar/list.js +1 -0
- package/build/snackbar/list.js.map +1 -1
- package/build/tab-panel/index.js +3 -3
- package/build/tab-panel/index.js.map +1 -1
- package/build/tabs/index.js +22 -4
- package/build/tabs/index.js.map +1 -1
- package/build/tabs/types.js.map +1 -1
- package/build/text/hook.js +6 -6
- package/build/text/hook.js.map +1 -1
- package/build/text/styles.js +7 -7
- package/build/text/styles.js.map +1 -1
- package/build/text/utils.js +1 -0
- package/build/text/utils.js.map +1 -1
- package/build/theme/color-algorithms.js +1 -0
- package/build/theme/color-algorithms.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control/as-radio-group.js +2 -3
- package/build/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control/styles.js +7 -7
- package/build/toggle-group-control/toggle-group-control/styles.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control-option-base/styles.js +8 -8
- package/build/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
- package/build/toolbar/toolbar-group/index.js +1 -0
- package/build/toolbar/toolbar-group/index.js.map +1 -1
- package/build/tools-panel/tools-panel/hook.js +1 -0
- package/build/tools-panel/tools-panel/hook.js.map +1 -1
- package/build/tools-panel/tools-panel-header/component.js +1 -0
- package/build/tools-panel/tools-panel-header/component.js.map +1 -1
- package/build/tooltip/index.js +2 -3
- package/build/tooltip/index.js.map +1 -1
- package/build/tree-grid/index.js +1 -0
- package/build/tree-grid/index.js.map +1 -1
- package/build/tree-select/index.js +11 -2
- package/build/tree-select/index.js.map +1 -1
- package/build/tree-select/types.js.map +1 -1
- package/build/unit-control/index.js +1 -0
- package/build/unit-control/index.js.map +1 -1
- package/build/unit-control/index.native.js +1 -0
- package/build/unit-control/index.native.js.map +1 -1
- package/build/unit-control/unit-select-control.js +1 -0
- package/build/unit-control/unit-select-control.js.map +1 -1
- package/build/unit-control/utils.js +1 -0
- package/build/unit-control/utils.js.map +1 -1
- package/build/utils/colors-values.js +3 -0
- package/build/utils/colors-values.js.map +1 -1
- package/build/utils/config-values.js +0 -1
- package/build/utils/config-values.js.map +1 -1
- package/build/utils/get-valid-children.js +1 -0
- package/build/utils/get-valid-children.js.map +1 -1
- package/build/utils/hooks/use-animated-offset-rect.js +1 -0
- package/build/utils/hooks/use-animated-offset-rect.js.map +1 -1
- package/build/utils/hooks/use-cx.js +1 -0
- package/build/utils/hooks/use-cx.js.map +1 -1
- package/build/utils/math.js +1 -0
- package/build/utils/math.js.map +1 -1
- package/build/utils/rtl.js +1 -0
- package/build/utils/rtl.js.map +1 -1
- package/build/utils/values.js +1 -0
- package/build/utils/values.js.map +1 -1
- package/build/z-stack/component.js +1 -0
- package/build/z-stack/component.js.map +1 -1
- package/build-module/alignment-matrix-control/icon.js +1 -0
- package/build-module/alignment-matrix-control/icon.js.map +1 -1
- package/build-module/alignment-matrix-control/index.js +1 -0
- package/build-module/alignment-matrix-control/index.js.map +1 -1
- package/build-module/autocomplete/autocompleter-ui.js +1 -0
- package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
- package/build-module/autocomplete/autocompleter-ui.native.js +1 -0
- package/build-module/autocomplete/autocompleter-ui.native.js.map +1 -1
- package/build-module/autocomplete/get-default-use-items.js +1 -0
- package/build-module/autocomplete/get-default-use-items.js.map +1 -1
- package/build-module/autocomplete/index.js +1 -0
- package/build-module/autocomplete/index.js.map +1 -1
- package/build-module/badge/index.js +57 -0
- package/build-module/badge/index.js.map +1 -0
- package/build-module/badge/types.js +2 -0
- package/build-module/badge/types.js.map +1 -0
- package/build-module/border-box-control/utils.js +1 -0
- package/build-module/border-box-control/utils.js.map +1 -1
- package/build-module/border-control/border-control-dropdown/component.js +1 -0
- package/build-module/border-control/border-control-dropdown/component.js.map +1 -1
- package/build-module/border-control/border-control-style-picker/component.js +1 -0
- package/build-module/border-control/border-control-style-picker/component.js.map +1 -1
- package/build-module/box-control/index.js +20 -16
- package/build-module/box-control/index.js.map +1 -1
- package/build-module/box-control/input-control.js +214 -0
- package/build-module/box-control/input-control.js.map +1 -0
- package/build-module/box-control/types.js.map +1 -1
- package/build-module/box-control/utils.js +95 -46
- package/build-module/box-control/utils.js.map +1 -1
- package/build-module/button/index.native.js +1 -0
- package/build-module/button/index.native.js.map +1 -1
- package/build-module/button/types.js.map +1 -1
- package/build-module/button-group/index.js +10 -0
- package/build-module/button-group/index.js.map +1 -1
- package/build-module/button-group/types.js.map +1 -1
- package/build-module/color-indicator/index.native.js +1 -0
- package/build-module/color-indicator/index.native.js.map +1 -1
- package/build-module/color-palette/index.js +1 -0
- package/build-module/color-palette/index.js.map +1 -1
- package/build-module/color-palette/index.native.js +1 -0
- package/build-module/color-palette/index.native.js.map +1 -1
- package/build-module/color-palette/utils.js +1 -0
- package/build-module/color-palette/utils.js.map +1 -1
- package/build-module/combobox-control/index.js +1 -0
- package/build-module/combobox-control/index.js.map +1 -1
- package/build-module/composite/legacy/index.js +1 -0
- package/build-module/composite/legacy/index.js.map +1 -1
- package/build-module/context/context-connect.js +1 -0
- package/build-module/context/context-connect.js.map +1 -1
- package/build-module/custom-gradient-picker/gradient-bar/control-points.js +1 -0
- package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
- package/build-module/custom-gradient-picker/gradient-bar/index.js +1 -0
- package/build-module/custom-gradient-picker/gradient-bar/index.js.map +1 -1
- package/build-module/custom-gradient-picker/gradient-bar/utils.js +1 -0
- package/build-module/custom-gradient-picker/gradient-bar/utils.js.map +1 -1
- package/build-module/custom-gradient-picker/index.js +1 -0
- package/build-module/custom-gradient-picker/index.js.map +1 -1
- package/build-module/custom-gradient-picker/serializer.js +1 -0
- package/build-module/custom-gradient-picker/serializer.js.map +1 -1
- package/build-module/custom-gradient-picker/utils.js +1 -0
- package/build-module/custom-gradient-picker/utils.js.map +1 -1
- package/build-module/custom-select-control/index.js +2 -3
- package/build-module/custom-select-control/index.js.map +1 -1
- package/build-module/custom-select-control-v2/custom-select.js +1 -2
- package/build-module/custom-select-control-v2/custom-select.js.map +1 -1
- package/build-module/dashicon/index.js +1 -0
- package/build-module/dashicon/index.js.map +1 -1
- package/build-module/date-time/date/index.js +2 -0
- package/build-module/date-time/date/index.js.map +1 -1
- package/build-module/date-time/date/use-lilius/index.js +1 -0
- package/build-module/date-time/date/use-lilius/index.js.map +1 -1
- package/build-module/date-time/time/index.js +1 -0
- package/build-module/date-time/time/index.js.map +1 -1
- package/build-module/dimension-control/index.js +2 -0
- package/build-module/dimension-control/index.js.map +1 -1
- package/build-module/dimension-control/sizes.js +1 -0
- package/build-module/dimension-control/sizes.js.map +1 -1
- package/build-module/draggable/index.js +1 -0
- package/build-module/draggable/index.js.map +1 -1
- package/build-module/draggable/index.native.js +1 -0
- package/build-module/draggable/index.native.js.map +1 -1
- package/build-module/dropdown-menu/index.js +1 -0
- package/build-module/dropdown-menu/index.js.map +1 -1
- package/build-module/dropdown-menu/index.native.js +1 -0
- package/build-module/dropdown-menu/index.native.js.map +1 -1
- package/build-module/duotone-picker/color-list-picker/index.js +1 -0
- package/build-module/duotone-picker/color-list-picker/index.js.map +1 -1
- package/build-module/duotone-picker/duotone-picker.js +1 -0
- package/build-module/duotone-picker/duotone-picker.js.map +1 -1
- package/build-module/duotone-picker/utils.js +1 -0
- package/build-module/duotone-picker/utils.js.map +1 -1
- package/build-module/external-link/index.js +1 -0
- 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/font-size-picker-toggle-group.js +1 -0
- package/build-module/font-size-picker/font-size-picker-toggle-group.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/font-size-picker/index.native.js +1 -0
- package/build-module/font-size-picker/index.native.js.map +1 -1
- package/build-module/font-size-picker/styles.js +9 -9
- package/build-module/font-size-picker/styles.js.map +1 -1
- package/build-module/font-size-picker/utils.js +1 -0
- package/build-module/font-size-picker/utils.js.map +1 -1
- package/build-module/form-token-field/index.js +1 -0
- package/build-module/form-token-field/index.js.map +1 -1
- package/build-module/form-token-field/suggestions-list.js +1 -0
- package/build-module/form-token-field/suggestions-list.js.map +1 -1
- package/build-module/gradient-picker/index.js +1 -0
- package/build-module/gradient-picker/index.js.map +1 -1
- package/build-module/guide/index.js +1 -0
- package/build-module/guide/index.js.map +1 -1
- package/build-module/guide/page-control.js +1 -0
- package/build-module/guide/page-control.js.map +1 -1
- package/build-module/h-stack/hook.js +1 -0
- package/build-module/h-stack/hook.js.map +1 -1
- package/build-module/heading/hook.js +1 -1
- package/build-module/heading/hook.js.map +1 -1
- package/build-module/higher-order/navigate-regions/index.js +1 -0
- package/build-module/higher-order/navigate-regions/index.js.map +1 -1
- package/build-module/higher-order/with-fallback-styles/index.js +1 -0
- package/build-module/higher-order/with-fallback-styles/index.js.map +1 -1
- package/build-module/higher-order/with-filters/index.js +1 -0
- package/build-module/higher-order/with-filters/index.js.map +1 -1
- package/build-module/higher-order/with-notices/index.js +1 -0
- package/build-module/higher-order/with-notices/index.js.map +1 -1
- package/build-module/input-control/index.js +9 -0
- package/build-module/input-control/index.js.map +1 -1
- package/build-module/input-control/types.js.map +1 -1
- package/build-module/keyboard-shortcuts/index.js +1 -0
- package/build-module/keyboard-shortcuts/index.js.map +1 -1
- package/build-module/menu/checkbox-item.js +2 -0
- package/build-module/menu/checkbox-item.js.map +1 -1
- package/build-module/menu/index.js +28 -97
- package/build-module/menu/index.js.map +1 -1
- package/build-module/menu/item.js +10 -1
- package/build-module/menu/item.js.map +1 -1
- package/build-module/menu/popover.js +81 -0
- package/build-module/menu/popover.js.map +1 -0
- package/build-module/menu/radio-item.js +2 -0
- package/build-module/menu/radio-item.js.map +1 -1
- package/build-module/menu/styles.js +16 -16
- package/build-module/menu/styles.js.map +1 -1
- package/build-module/menu/submenu-trigger-item.js +50 -0
- package/build-module/menu/submenu-trigger-item.js.map +1 -0
- package/build-module/menu/trigger-button.js +37 -0
- package/build-module/menu/trigger-button.js.map +1 -0
- package/build-module/menu/types.js.map +1 -1
- package/build-module/menu-items-choice/index.js +1 -0
- package/build-module/menu-items-choice/index.js.map +1 -1
- package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js +1 -0
- package/build-module/mobile/bottom-sheet/bottom-sheet-navigation/navigation-container.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/keyboard-avoiding-view.native.js +1 -0
- package/build-module/mobile/bottom-sheet/keyboard-avoiding-view.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/picker-cell.native.js +1 -0
- package/build-module/mobile/bottom-sheet/picker-cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet-select-control/index.native.js +1 -0
- package/build-module/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
- package/build-module/mobile/color-settings/palette.screen.native.js +1 -0
- package/build-module/mobile/color-settings/palette.screen.native.js.map +1 -1
- package/build-module/mobile/gradient/index.native.js +1 -0
- package/build-module/mobile/gradient/index.native.js.map +1 -1
- package/build-module/mobile/media-edit/index.native.js +1 -0
- package/build-module/mobile/media-edit/index.native.js.map +1 -1
- package/build-module/mobile/picker/index.android.js +1 -0
- package/build-module/mobile/picker/index.android.js.map +1 -1
- package/build-module/mobile/picker/index.ios.js +1 -0
- package/build-module/mobile/picker/index.ios.js.map +1 -1
- package/build-module/mobile/segmented-control/index.native.js +1 -0
- package/build-module/mobile/segmented-control/index.native.js.map +1 -1
- package/build-module/mobile/utils/get-px-from-css-unit.native.js +1 -0
- package/build-module/mobile/utils/get-px-from-css-unit.native.js.map +1 -1
- package/build-module/navigable-container/container.js +1 -0
- package/build-module/navigable-container/container.js.map +1 -1
- package/build-module/navigation/back-button/index.js +1 -0
- package/build-module/navigation/back-button/index.js.map +1 -1
- package/build-module/navigation/group/index.js +1 -0
- package/build-module/navigation/group/index.js.map +1 -1
- package/build-module/navigation/index.js +6 -0
- package/build-module/navigation/index.js.map +1 -1
- package/build-module/navigation/item/index.js +1 -0
- package/build-module/navigation/item/index.js.map +1 -1
- package/build-module/navigation/menu/menu-title-search.js +1 -0
- package/build-module/navigation/menu/menu-title-search.js.map +1 -1
- package/build-module/navigation/menu/search-no-results-found.js +1 -0
- package/build-module/navigation/menu/search-no-results-found.js.map +1 -1
- package/build-module/navigation/styles/navigation-styles.js +12 -12
- package/build-module/navigation/styles/navigation-styles.js.map +1 -1
- package/build-module/navigator/navigator/component.js +1 -0
- package/build-module/navigator/navigator/component.js.map +1 -1
- package/build-module/navigator/navigator-screen/component.js +1 -0
- package/build-module/navigator/navigator-screen/component.js.map +1 -1
- package/build-module/navigator/utils/router.js +1 -0
- package/build-module/navigator/utils/router.js.map +1 -1
- package/build-module/notice/index.js +1 -0
- package/build-module/notice/index.js.map +1 -1
- package/build-module/notice/list.js +1 -0
- package/build-module/notice/list.js.map +1 -1
- package/build-module/notice/list.native.js +1 -0
- package/build-module/notice/list.native.js.map +1 -1
- package/build-module/number-control/index.js +1 -0
- package/build-module/number-control/index.js.map +1 -1
- package/build-module/palette-edit/index.js +2 -0
- package/build-module/palette-edit/index.js.map +1 -1
- package/build-module/panel/actions.native.js +1 -0
- package/build-module/panel/actions.native.js.map +1 -1
- package/build-module/private-apis.js +3 -1
- package/build-module/private-apis.js.map +1 -1
- package/build-module/query-controls/index.js +1 -0
- package/build-module/query-controls/index.js.map +1 -1
- package/build-module/query-controls/terms.js +1 -0
- package/build-module/query-controls/terms.js.map +1 -1
- package/build-module/radio-control/index.js +1 -0
- package/build-module/radio-control/index.js.map +1 -1
- package/build-module/radio-control/index.native.js +1 -0
- package/build-module/radio-control/index.native.js.map +1 -1
- package/build-module/radio-group/index.js +6 -0
- package/build-module/radio-group/index.js.map +1 -1
- package/build-module/radio-group/radio.js +1 -2
- package/build-module/radio-group/radio.js.map +1 -1
- package/build-module/range-control/rail.js +1 -0
- package/build-module/range-control/rail.js.map +1 -1
- package/build-module/range-control/styles/range-control-styles.js +28 -28
- package/build-module/range-control/styles/range-control-styles.js.map +1 -1
- package/build-module/resizable-box/index.js +1 -0
- package/build-module/resizable-box/index.js.map +1 -1
- package/build-module/sandbox/index.js +1 -0
- package/build-module/sandbox/index.js.map +1 -1
- package/build-module/sandbox/index.native.js +1 -0
- package/build-module/sandbox/index.native.js.map +1 -1
- package/build-module/search-control/index.native.js +1 -0
- package/build-module/search-control/index.native.js.map +1 -1
- package/build-module/select-control/index.js +10 -0
- package/build-module/select-control/index.js.map +1 -1
- package/build-module/select-control/types.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js +1 -0
- package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
- package/build-module/slot-fill/context.js +5 -3
- package/build-module/slot-fill/context.js.map +1 -1
- package/build-module/slot-fill/fill.js +10 -15
- package/build-module/slot-fill/fill.js.map +1 -1
- package/build-module/slot-fill/provider.js +42 -55
- package/build-module/slot-fill/provider.js.map +1 -1
- package/build-module/slot-fill/slot.js +33 -24
- package/build-module/slot-fill/slot.js.map +1 -1
- package/build-module/slot-fill/types.js.map +1 -1
- package/build-module/snackbar/index.js +1 -0
- package/build-module/snackbar/index.js.map +1 -1
- package/build-module/snackbar/list.js +1 -0
- package/build-module/snackbar/list.js.map +1 -1
- package/build-module/tab-panel/index.js +2 -2
- package/build-module/tab-panel/index.js.map +1 -1
- package/build-module/tabs/index.js +22 -4
- package/build-module/tabs/index.js.map +1 -1
- package/build-module/tabs/types.js.map +1 -1
- package/build-module/text/hook.js +6 -6
- package/build-module/text/hook.js.map +1 -1
- package/build-module/text/styles.js +7 -7
- package/build-module/text/styles.js.map +1 -1
- package/build-module/text/utils.js +1 -0
- package/build-module/text/utils.js.map +1 -1
- package/build-module/theme/color-algorithms.js +1 -0
- package/build-module/theme/color-algorithms.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js +1 -2
- package/build-module/toggle-group-control/toggle-group-control/as-radio-group.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control/styles.js +7 -7
- package/build-module/toggle-group-control/toggle-group-control/styles.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js +8 -8
- package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
- package/build-module/toolbar/toolbar-group/index.js +1 -0
- package/build-module/toolbar/toolbar-group/index.js.map +1 -1
- package/build-module/tools-panel/tools-panel/hook.js +1 -0
- package/build-module/tools-panel/tools-panel/hook.js.map +1 -1
- package/build-module/tools-panel/tools-panel-header/component.js +1 -0
- package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
- package/build-module/tooltip/index.js +1 -2
- package/build-module/tooltip/index.js.map +1 -1
- package/build-module/tree-grid/index.js +1 -0
- package/build-module/tree-grid/index.js.map +1 -1
- package/build-module/tree-select/index.js +11 -2
- package/build-module/tree-select/index.js.map +1 -1
- package/build-module/tree-select/types.js.map +1 -1
- package/build-module/unit-control/index.js +1 -0
- package/build-module/unit-control/index.js.map +1 -1
- package/build-module/unit-control/index.native.js +1 -0
- package/build-module/unit-control/index.native.js.map +1 -1
- package/build-module/unit-control/unit-select-control.js +1 -0
- package/build-module/unit-control/unit-select-control.js.map +1 -1
- package/build-module/unit-control/utils.js +1 -0
- package/build-module/unit-control/utils.js.map +1 -1
- package/build-module/utils/colors-values.js +3 -0
- package/build-module/utils/colors-values.js.map +1 -1
- package/build-module/utils/config-values.js +0 -1
- package/build-module/utils/config-values.js.map +1 -1
- package/build-module/utils/get-valid-children.js +1 -0
- package/build-module/utils/get-valid-children.js.map +1 -1
- package/build-module/utils/hooks/use-animated-offset-rect.js +1 -0
- package/build-module/utils/hooks/use-animated-offset-rect.js.map +1 -1
- package/build-module/utils/hooks/use-cx.js +1 -0
- package/build-module/utils/hooks/use-cx.js.map +1 -1
- package/build-module/utils/math.js +1 -0
- package/build-module/utils/math.js.map +1 -1
- package/build-module/utils/rtl.js +1 -0
- package/build-module/utils/rtl.js.map +1 -1
- package/build-module/utils/values.js +1 -0
- package/build-module/utils/values.js.map +1 -1
- package/build-module/z-stack/component.js +1 -0
- package/build-module/z-stack/component.js.map +1 -1
- package/build-style/style-rtl.css +60 -13
- package/build-style/style.css +60 -13
- package/build-types/alignment-matrix-control/stories/index.story.d.ts +1 -1
- package/build-types/alignment-matrix-control/stories/index.story.d.ts.map +1 -1
- package/build-types/angle-picker-control/stories/index.story.d.ts +1 -1
- package/build-types/animate/stories/index.story.d.ts +7 -7
- package/build-types/animate/stories/index.story.d.ts.map +1 -1
- package/build-types/badge/index.d.ts +8 -0
- package/build-types/badge/index.d.ts.map +1 -0
- package/build-types/badge/stories/index.story.d.ts +17 -0
- package/build-types/badge/stories/index.story.d.ts.map +1 -0
- package/build-types/badge/test/index.d.ts +2 -0
- package/build-types/badge/test/index.d.ts.map +1 -0
- package/build-types/badge/types.d.ts +13 -0
- package/build-types/badge/types.d.ts.map +1 -0
- package/build-types/base-control/stories/index.story.d.ts +1 -1
- package/build-types/border-box-control/stories/index.story.d.ts +1 -1
- package/build-types/border-control/stories/index.story.d.ts +5 -5
- package/build-types/box-control/index.d.ts +1 -1
- package/build-types/box-control/index.d.ts.map +1 -1
- package/build-types/box-control/input-control.d.ts +3 -0
- package/build-types/box-control/input-control.d.ts.map +1 -0
- package/build-types/box-control/stories/index.story.d.ts +356 -11
- package/build-types/box-control/stories/index.story.d.ts.map +1 -1
- package/build-types/box-control/styles/box-control-styles.d.ts +2 -2
- package/build-types/box-control/types.d.ts +26 -1
- package/build-types/box-control/types.d.ts.map +1 -1
- package/build-types/box-control/utils.d.ts +49 -15
- package/build-types/box-control/utils.d.ts.map +1 -1
- package/build-types/button/stories/e2e/index.story.d.ts +1 -1
- package/build-types/button/stories/e2e/index.story.d.ts.map +1 -1
- package/build-types/button/stories/index.story.d.ts +25 -7
- package/build-types/button/stories/index.story.d.ts.map +1 -1
- package/build-types/button/types.d.ts +6 -4
- package/build-types/button/types.d.ts.map +1 -1
- package/build-types/button-group/index.d.ts +3 -1
- package/build-types/button-group/index.d.ts.map +1 -1
- package/build-types/button-group/stories/index.story.d.ts +6 -0
- package/build-types/button-group/stories/index.story.d.ts.map +1 -1
- package/build-types/button-group/types.d.ts +7 -0
- package/build-types/button-group/types.d.ts.map +1 -1
- package/build-types/circular-option-picker/stories/index.story.d.ts +5 -5
- package/build-types/circular-option-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/color-palette/stories/index.story.d.ts +3 -3
- package/build-types/color-palette/stories/index.story.d.ts.map +1 -1
- package/build-types/color-picker/styles.d.ts +2 -2
- package/build-types/color-picker/styles.d.ts.map +1 -1
- package/build-types/combobox-control/stories/index.story.d.ts +4 -4
- package/build-types/confirm-dialog/stories/index.story.d.ts +2 -2
- package/build-types/confirm-dialog/stories/index.story.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/stories/index.story.d.ts +1 -1
- package/build-types/custom-gradient-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/custom-select-control/stories/index.story.d.ts +3 -3
- package/build-types/custom-select-control/stories/index.story.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/custom-select.d.ts.map +1 -1
- package/build-types/custom-select-control-v2/stories/index.story.d.ts +3 -3
- package/build-types/custom-select-control-v2/stories/index.story.d.ts.map +1 -1
- package/build-types/date-time/date/index.d.ts.map +1 -1
- package/build-types/date-time/stories/time.story.d.ts +1 -1
- package/build-types/date-time/stories/time.story.d.ts.map +1 -1
- package/build-types/date-time/time/styles.d.ts +4 -4
- package/build-types/dimension-control/index.d.ts.map +1 -1
- package/build-types/dimension-control/stories/index.story.d.ts +1 -1
- package/build-types/disabled/stories/index.story.d.ts.map +1 -1
- package/build-types/drop-zone/stories/index.story.d.ts +1 -1
- package/build-types/drop-zone/stories/index.story.d.ts.map +1 -1
- package/build-types/duotone-picker/stories/duotone-picker.story.d.ts +1 -1
- package/build-types/duotone-picker/stories/duotone-picker.story.d.ts.map +1 -1
- package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts +3 -3
- package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts.map +1 -1
- package/build-types/focal-point-picker/stories/index.story.d.ts +4 -4
- package/build-types/focal-point-picker/styles/focal-point-picker-style.d.ts +1 -1
- package/build-types/font-size-picker/styles.d.ts.map +1 -1
- package/build-types/form-file-upload/stories/index.story.d.ts +5 -5
- package/build-types/form-file-upload/stories/index.story.d.ts.map +1 -1
- package/build-types/gradient-picker/stories/index.story.d.ts +3 -3
- package/build-types/gradient-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/guide/stories/index.story.d.ts +1 -1
- package/build-types/guide/stories/index.story.d.ts.map +1 -1
- package/build-types/icon/stories/index.story.d.ts +4 -4
- package/build-types/icon/stories/index.story.d.ts.map +1 -1
- package/build-types/input-control/index.d.ts +1 -0
- package/build-types/input-control/index.d.ts.map +1 -1
- package/build-types/input-control/stories/index.story.d.ts +7 -7
- package/build-types/input-control/stories/index.story.d.ts.map +1 -1
- package/build-types/input-control/types.d.ts +11 -2
- package/build-types/input-control/types.d.ts.map +1 -1
- package/build-types/keyboard-shortcuts/stories/index.story.d.ts +1 -1
- package/build-types/keyboard-shortcuts/stories/index.story.d.ts.map +1 -1
- package/build-types/menu/checkbox-item.d.ts.map +1 -1
- package/build-types/menu/index.d.ts +10 -1
- package/build-types/menu/index.d.ts.map +1 -1
- package/build-types/menu/item.d.ts.map +1 -1
- package/build-types/menu/popover.d.ts +3 -0
- package/build-types/menu/popover.d.ts.map +1 -0
- package/build-types/menu/radio-item.d.ts.map +1 -1
- package/build-types/menu/stories/index.story.d.ts +9 -9
- package/build-types/menu/stories/index.story.d.ts.map +1 -1
- package/build-types/menu/submenu-trigger-item.d.ts +3 -0
- package/build-types/menu/submenu-trigger-item.d.ts.map +1 -0
- package/build-types/menu/trigger-button.d.ts +3 -0
- package/build-types/menu/trigger-button.d.ts.map +1 -0
- package/build-types/menu/types.d.ts +208 -57
- package/build-types/menu/types.d.ts.map +1 -1
- package/build-types/menu-group/stories/index.story.d.ts +1 -1
- package/build-types/menu-group/stories/index.story.d.ts.map +1 -1
- package/build-types/menu-item/stories/index.story.d.ts +4 -4
- package/build-types/modal/stories/index.story.d.ts.map +1 -1
- package/build-types/navigation/back-button/index.d.ts.map +1 -1
- package/build-types/navigation/index.d.ts.map +1 -1
- package/build-types/navigation/item/index.d.ts.map +1 -1
- package/build-types/navigation/stories/index.story.d.ts +6 -6
- package/build-types/navigation/stories/index.story.d.ts.map +1 -1
- package/build-types/navigation/styles/navigation-styles.d.ts.map +1 -1
- package/build-types/notice/stories/index.story.d.ts +4 -4
- package/build-types/notice/stories/index.story.d.ts.map +1 -1
- package/build-types/number-control/index.d.ts +1 -1
- package/build-types/number-control/index.d.ts.map +1 -1
- package/build-types/number-control/stories/index.story.d.ts +2 -2
- package/build-types/palette-edit/index.d.ts.map +1 -1
- package/build-types/palette-edit/stories/index.story.d.ts +2 -2
- package/build-types/palette-edit/stories/index.story.d.ts.map +1 -1
- package/build-types/private-apis.d.ts.map +1 -1
- package/build-types/progress-bar/stories/index.story.d.ts +1 -1
- package/build-types/progress-bar/stories/index.story.d.ts.map +1 -1
- package/build-types/query-controls/stories/index.story.d.ts +1 -1
- package/build-types/query-controls/stories/index.story.d.ts.map +1 -1
- package/build-types/radio-group/index.d.ts.map +1 -1
- package/build-types/radio-group/radio.d.ts.map +1 -1
- package/build-types/range-control/index.d.ts +1 -1
- package/build-types/range-control/styles/range-control-styles.d.ts +1 -1
- package/build-types/range-control/styles/range-control-styles.d.ts.map +1 -1
- package/build-types/resizable-box/stories/index.story.d.ts +2 -2
- package/build-types/responsive-wrapper/stories/index.story.d.ts +1 -1
- package/build-types/responsive-wrapper/stories/index.story.d.ts.map +1 -1
- package/build-types/sandbox/stories/index.story.d.ts +1 -1
- package/build-types/sandbox/stories/index.story.d.ts.map +1 -1
- package/build-types/search-control/stories/index.story.d.ts +1 -1
- package/build-types/search-control/stories/index.story.d.ts.map +1 -1
- package/build-types/select-control/index.d.ts +1 -0
- package/build-types/select-control/index.d.ts.map +1 -1
- package/build-types/select-control/stories/index.story.d.ts +5 -5
- package/build-types/select-control/stories/index.story.d.ts.map +1 -1
- package/build-types/select-control/types.d.ts +1 -1
- package/build-types/select-control/types.d.ts.map +1 -1
- package/build-types/shortcut/stories/index.story.d.ts +1 -1
- package/build-types/shortcut/stories/index.story.d.ts.map +1 -1
- package/build-types/slot-fill/context.d.ts.map +1 -1
- package/build-types/slot-fill/fill.d.ts.map +1 -1
- package/build-types/slot-fill/provider.d.ts.map +1 -1
- package/build-types/slot-fill/slot.d.ts.map +1 -1
- package/build-types/slot-fill/types.d.ts +13 -11
- package/build-types/slot-fill/types.d.ts.map +1 -1
- package/build-types/tab-panel/index.d.ts.map +1 -1
- package/build-types/tab-panel/stories/index.story.d.ts +4 -4
- package/build-types/tab-panel/stories/index.story.d.ts.map +1 -1
- package/build-types/tabs/index.d.ts +21 -4
- package/build-types/tabs/index.d.ts.map +1 -1
- package/build-types/tabs/stories/index.story.d.ts +10 -10
- package/build-types/tabs/stories/index.story.d.ts.map +1 -1
- package/build-types/tabs/types.d.ts +13 -13
- package/build-types/tabs/types.d.ts.map +1 -1
- package/build-types/text/stories/index.story.d.ts +3 -3
- package/build-types/theme/stories/index.story.d.ts +1 -1
- package/build-types/toggle-control/stories/index.story.d.ts +2 -2
- package/build-types/toggle-group-control/toggle-group-control/as-radio-group.d.ts.map +1 -1
- package/build-types/toolbar/stories/index.story.d.ts +3 -3
- package/build-types/toolbar/stories/index.story.d.ts.map +1 -1
- package/build-types/tooltip/index.d.ts.map +1 -1
- package/build-types/tooltip/stories/index.story.d.ts +1 -1
- package/build-types/tooltip/stories/index.story.d.ts.map +1 -1
- package/build-types/tree-grid/stories/index.story.d.ts +1 -1
- package/build-types/tree-grid/stories/index.story.d.ts.map +1 -1
- package/build-types/tree-select/index.d.ts +3 -2
- package/build-types/tree-select/index.d.ts.map +1 -1
- package/build-types/tree-select/stories/index.story.d.ts +1 -1
- package/build-types/tree-select/stories/index.story.d.ts.map +1 -1
- package/build-types/tree-select/types.d.ts +5 -1
- package/build-types/tree-select/types.d.ts.map +1 -1
- package/build-types/unit-control/index.d.ts +1 -1
- package/build-types/unit-control/styles/unit-control-styles.d.ts +1 -1
- package/build-types/utils/colors-values.d.ts +3 -0
- package/build-types/utils/colors-values.d.ts.map +1 -1
- package/build-types/utils/config-values.d.ts +0 -1
- package/build-types/v-stack/stories/index.story.d.ts +1 -1
- package/package.json +19 -19
- package/src/alignment-matrix-control/README.md +16 -15
- package/src/angle-picker-control/README.md +10 -9
- package/src/badge/README.md +24 -0
- package/src/badge/docs-manifest.json +5 -0
- package/src/badge/index.tsx +67 -0
- package/src/badge/stories/index.story.tsx +54 -0
- package/src/badge/styles.scss +49 -0
- package/src/badge/test/index.tsx +45 -0
- package/src/badge/types.ts +12 -0
- package/src/base-control/README.md +22 -21
- package/src/box-control/README.md +41 -24
- package/src/box-control/index.tsx +28 -14
- package/src/box-control/input-control.tsx +299 -0
- package/src/box-control/stories/index.story.tsx +12 -0
- package/src/box-control/types.ts +27 -1
- package/src/box-control/utils.ts +122 -60
- package/src/button/README.md +110 -220
- package/src/button/docs-manifest.json +5 -0
- package/src/button/stories/best-practices.mdx +31 -0
- package/src/button/stories/index.story.tsx +18 -0
- package/src/button/style.scss +9 -10
- package/src/button/test/index.tsx +9 -2
- package/src/button/types.ts +6 -4
- package/src/button-group/README.md +4 -0
- package/src/button-group/index.tsx +11 -1
- package/src/button-group/stories/index.story.tsx +8 -1
- package/src/button-group/types.ts +7 -0
- package/src/custom-select-control/index.tsx +1 -1
- package/src/custom-select-control-v2/custom-select.tsx +1 -2
- package/src/custom-select-control-v2/stories/index.story.tsx +4 -0
- package/src/date-time/date/index.tsx +1 -0
- package/src/dimension-control/index.tsx +1 -0
- package/src/dimension-control/test/__snapshots__/index.test.js.snap +4 -4
- package/src/disabled/stories/index.story.tsx +1 -0
- package/src/drop-zone/stories/index.story.tsx +7 -1
- package/src/font-size-picker/styles.ts +1 -0
- package/src/form-file-upload/README.md +22 -21
- package/src/gradient-picker/README.md +36 -35
- package/src/heading/hook.ts +1 -1
- package/src/heading/test/__snapshots__/index.tsx.snap +4 -4
- package/src/icon/README.md +9 -8
- package/src/input-control/README.md +1 -0
- package/src/input-control/index.tsx +10 -0
- package/src/input-control/stories/index.story.tsx +6 -1
- package/src/input-control/test/index.js +9 -3
- package/src/input-control/types.ts +11 -2
- package/src/menu/checkbox-item.tsx +2 -1
- package/src/menu/index.tsx +61 -165
- package/src/menu/item.tsx +17 -2
- package/src/menu/popover.tsx +103 -0
- package/src/menu/radio-item.tsx +2 -1
- package/src/menu/stories/index.story.tsx +533 -381
- package/src/menu/styles.ts +1 -1
- package/src/menu/submenu-trigger-item.tsx +61 -0
- package/src/menu/test/index.tsx +266 -182
- package/src/menu/trigger-button.tsx +46 -0
- package/src/menu/types.ts +210 -63
- package/src/modal/stories/index.story.tsx +4 -1
- package/src/navigation/back-button/index.tsx +1 -0
- package/src/navigation/index.tsx +7 -0
- package/src/navigation/item/index.tsx +2 -0
- package/src/navigation/styles/navigation-styles.tsx +3 -2
- package/src/navigation/test/index.tsx +4 -0
- package/src/navigator/test/index.tsx +4 -0
- package/src/number-control/index.tsx +1 -0
- package/src/palette-edit/index.tsx +1 -0
- package/src/panel/stories/index.story.tsx +3 -3
- package/src/private-apis.ts +2 -0
- package/src/radio-group/index.tsx +12 -1
- package/src/radio-group/radio.tsx +1 -2
- package/src/range-control/styles/range-control-styles.ts +8 -4
- package/src/select-control/README.md +3 -0
- package/src/select-control/index.tsx +10 -0
- package/src/select-control/stories/index.story.tsx +2 -0
- package/src/select-control/test/select-control.tsx +7 -1
- package/src/select-control/types.ts +1 -0
- package/src/slot-fill/context.ts +5 -3
- package/src/slot-fill/fill.ts +10 -15
- package/src/slot-fill/provider.tsx +63 -64
- package/src/slot-fill/slot.tsx +40 -27
- package/src/slot-fill/types.ts +23 -11
- package/src/style.scss +1 -0
- package/src/tab-panel/index.tsx +1 -2
- package/src/tab-panel/stories/index.story.tsx +4 -0
- package/src/tabs/README.md +151 -187
- package/src/tabs/docs-manifest.json +22 -0
- package/src/tabs/index.tsx +21 -4
- package/src/tabs/stories/best-practices.mdx +99 -0
- package/src/tabs/stories/index.story.tsx +5 -0
- package/src/tabs/types.ts +13 -14
- package/src/text/hook.ts +2 -2
- package/src/text/styles.ts +1 -1
- package/src/text/test/__snapshots__/index.tsx.snap +3 -3
- package/src/text/test/index.tsx +1 -1
- package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +24 -24
- package/src/toggle-group-control/test/index.tsx +7 -1
- package/src/toggle-group-control/toggle-group-control/as-radio-group.tsx +1 -2
- package/src/toggle-group-control/toggle-group-control/styles.ts +1 -1
- package/src/toggle-group-control/toggle-group-control-option-base/styles.ts +6 -6
- package/src/tooltip/index.tsx +1 -2
- package/src/tree-grid/stories/index.story.tsx +2 -0
- package/src/tree-select/README.md +144 -28
- package/src/tree-select/docs-manifest.json +5 -0
- package/src/tree-select/index.tsx +11 -2
- package/src/tree-select/stories/index.story.tsx +1 -0
- package/src/tree-select/types.ts +8 -1
- package/src/utils/colors-values.js +3 -0
- package/src/utils/config-values.js +0 -1
- package/tsconfig.json +0 -3
- package/tsconfig.tsbuildinfo +1 -1
- package/build/box-control/all-input-control.js +0 -91
- package/build/box-control/all-input-control.js.map +0 -1
- package/build/box-control/axial-input-controls.js +0 -125
- package/build/box-control/axial-input-controls.js.map +0 -1
- package/build/box-control/input-controls.js +0 -133
- package/build/box-control/input-controls.js.map +0 -1
- package/build/slot-fill/use-slot.js +0 -32
- package/build/slot-fill/use-slot.js.map +0 -1
- package/build-module/box-control/all-input-control.js +0 -84
- package/build-module/box-control/all-input-control.js.map +0 -1
- package/build-module/box-control/axial-input-controls.js +0 -116
- package/build-module/box-control/axial-input-controls.js.map +0 -1
- package/build-module/box-control/input-controls.js +0 -124
- package/build-module/box-control/input-controls.js.map +0 -1
- package/build-module/slot-fill/use-slot.js +0 -24
- package/build-module/slot-fill/use-slot.js.map +0 -1
- package/build-types/box-control/all-input-control.d.ts +0 -3
- package/build-types/box-control/all-input-control.d.ts.map +0 -1
- package/build-types/box-control/axial-input-controls.d.ts +0 -3
- package/build-types/box-control/axial-input-controls.d.ts.map +0 -1
- package/build-types/box-control/input-controls.d.ts +0 -3
- package/build-types/box-control/input-controls.d.ts.map +0 -1
- package/build-types/slot-fill/use-slot.d.ts +0 -10
- package/build-types/slot-fill/use-slot.d.ts.map +0 -1
- package/src/box-control/all-input-control.tsx +0 -110
- package/src/box-control/axial-input-controls.tsx +0 -165
- package/src/box-control/input-controls.tsx +0 -167
- package/src/slot-fill/use-slot.ts +0 -27
|
@@ -28,34 +28,33 @@ function Example() {
|
|
|
28
28
|
);
|
|
29
29
|
};
|
|
30
30
|
```
|
|
31
|
+
|
|
31
32
|
## Props
|
|
32
33
|
|
|
33
34
|
### `__next40pxDefaultSize`
|
|
34
35
|
|
|
35
|
-
Start opting into the larger default height that will become the default size in a future version.
|
|
36
|
-
|
|
37
36
|
- Type: `boolean`
|
|
38
37
|
- Required: No
|
|
39
38
|
- Default: `false`
|
|
40
39
|
|
|
41
|
-
|
|
40
|
+
Start opting into the larger default height that will become the default size in a future version.
|
|
42
41
|
|
|
43
|
-
|
|
42
|
+
### `allowReset`
|
|
44
43
|
|
|
45
44
|
- Type: `boolean`
|
|
46
45
|
- Required: No
|
|
47
46
|
- Default: `true`
|
|
48
47
|
|
|
49
|
-
|
|
48
|
+
If this property is true, a button to reset the box control is rendered.
|
|
50
49
|
|
|
51
|
-
|
|
50
|
+
### `id`
|
|
52
51
|
|
|
53
52
|
- Type: `string`
|
|
54
53
|
- Required: No
|
|
55
54
|
|
|
56
|
-
|
|
55
|
+
The id to use as a base for the unique HTML id attribute of the control.
|
|
57
56
|
|
|
58
|
-
|
|
57
|
+
### `inputProps`
|
|
59
58
|
|
|
60
59
|
- Type: `UnitControlPassthroughProps`
|
|
61
60
|
- Required: No
|
|
@@ -63,25 +62,41 @@ Props for the internal `UnitControl` components.
|
|
|
63
62
|
min: 0,
|
|
64
63
|
}`
|
|
65
64
|
|
|
66
|
-
|
|
65
|
+
Props for the internal `UnitControl` components.
|
|
67
66
|
|
|
68
|
-
|
|
67
|
+
### `label`
|
|
69
68
|
|
|
70
69
|
- Type: `string`
|
|
71
70
|
- Required: No
|
|
72
71
|
- Default: `__( 'Box Control' )`
|
|
73
72
|
|
|
74
|
-
|
|
73
|
+
Heading label for the control.
|
|
75
74
|
|
|
76
|
-
|
|
75
|
+
### `onChange`
|
|
77
76
|
|
|
78
77
|
- Type: `(next: BoxControlValue) => void`
|
|
79
78
|
- Required: No
|
|
80
79
|
- Default: `() => {}`
|
|
81
80
|
|
|
82
|
-
|
|
81
|
+
A callback function when an input value changes.
|
|
83
82
|
|
|
84
|
-
|
|
83
|
+
### `presets`
|
|
84
|
+
|
|
85
|
+
- Type: `Preset[]`
|
|
86
|
+
- Required: No
|
|
87
|
+
|
|
88
|
+
Available presets to pick from.
|
|
89
|
+
|
|
90
|
+
### `presetKey`
|
|
91
|
+
|
|
92
|
+
- Type: `string`
|
|
93
|
+
- Required: No
|
|
94
|
+
|
|
95
|
+
The key of the preset to apply.
|
|
96
|
+
If you provide a list of presets, you must provide a preset key to use.
|
|
97
|
+
The format of preset selected values is going to be `var:preset|${ presetKey }|${ presetSlug }`
|
|
98
|
+
|
|
99
|
+
### `resetValues`
|
|
85
100
|
|
|
86
101
|
- Type: `BoxControlValue`
|
|
87
102
|
- Required: No
|
|
@@ -92,35 +107,37 @@ The `top`, `right`, `bottom`, and `left` box dimension values to use when the co
|
|
|
92
107
|
left: undefined,
|
|
93
108
|
}`
|
|
94
109
|
|
|
110
|
+
The `top`, `right`, `bottom`, and `left` box dimension values to use when the control is reset.
|
|
111
|
+
|
|
95
112
|
### `sides`
|
|
96
113
|
|
|
114
|
+
- Type: `readonly (keyof BoxControlValue | "horizontal" | "vertical")[]`
|
|
115
|
+
- Required: No
|
|
116
|
+
|
|
97
117
|
Collection of sides to allow control of. If omitted or empty, all sides will be available.
|
|
98
118
|
|
|
99
119
|
Allowed values are "top", "right", "bottom", "left", "vertical", and "horizontal".
|
|
100
120
|
|
|
101
|
-
- Type: `readonly (keyof BoxControlValue | "horizontal" | "vertical")[]`
|
|
102
|
-
- Required: No
|
|
103
|
-
|
|
104
121
|
### `splitOnAxis`
|
|
105
122
|
|
|
106
|
-
If this property is true, when the box control is unlinked, vertical and horizontal controls
|
|
107
|
-
can be used instead of updating individual sides.
|
|
108
|
-
|
|
109
123
|
- Type: `boolean`
|
|
110
124
|
- Required: No
|
|
111
125
|
- Default: `false`
|
|
112
126
|
|
|
113
|
-
|
|
127
|
+
If this property is true, when the box control is unlinked, vertical and horizontal controls
|
|
128
|
+
can be used instead of updating individual sides.
|
|
114
129
|
|
|
115
|
-
|
|
130
|
+
### `units`
|
|
116
131
|
|
|
117
132
|
- Type: `WPUnitControlUnit[]`
|
|
118
133
|
- Required: No
|
|
119
134
|
- Default: `CSS_UNITS`
|
|
120
135
|
|
|
121
|
-
|
|
136
|
+
Available units to select from.
|
|
122
137
|
|
|
123
|
-
|
|
138
|
+
### `values`
|
|
124
139
|
|
|
125
140
|
- Type: `BoxControlValue`
|
|
126
141
|
- Required: No
|
|
142
|
+
|
|
143
|
+
The current values of the control, expressed as an object of `top`, `right`, `bottom`, and `left` values.
|
|
@@ -9,13 +9,10 @@ import { __ } from '@wordpress/i18n';
|
|
|
9
9
|
* Internal dependencies
|
|
10
10
|
*/
|
|
11
11
|
import { BaseControl } from '../base-control';
|
|
12
|
-
import
|
|
13
|
-
import InputControls from './input-controls';
|
|
14
|
-
import AxialInputControls from './axial-input-controls';
|
|
12
|
+
import InputControl from './input-control';
|
|
15
13
|
import LinkedButton from './linked-button';
|
|
16
14
|
import { Grid } from '../grid';
|
|
17
15
|
import {
|
|
18
|
-
FlexedBoxControlIcon,
|
|
19
16
|
InputWrapper,
|
|
20
17
|
ResetButton,
|
|
21
18
|
LinkedButtonWrapper,
|
|
@@ -24,8 +21,9 @@ import { parseQuantityAndUnitFromRawValue } from '../unit-control/utils';
|
|
|
24
21
|
import {
|
|
25
22
|
DEFAULT_VALUES,
|
|
26
23
|
getInitialSide,
|
|
27
|
-
|
|
24
|
+
isValueMixed,
|
|
28
25
|
isValuesDefined,
|
|
26
|
+
getAllowedSides,
|
|
29
27
|
} from './utils';
|
|
30
28
|
import { useControlledState } from '../utils/hooks';
|
|
31
29
|
import type {
|
|
@@ -85,6 +83,8 @@ function BoxControl( {
|
|
|
85
83
|
splitOnAxis = false,
|
|
86
84
|
allowReset = true,
|
|
87
85
|
resetValues = DEFAULT_VALUES,
|
|
86
|
+
presets,
|
|
87
|
+
presetKey,
|
|
88
88
|
onMouseOver,
|
|
89
89
|
onMouseOut,
|
|
90
90
|
}: BoxControlProps ) {
|
|
@@ -97,7 +97,7 @@ function BoxControl( {
|
|
|
97
97
|
|
|
98
98
|
const [ isDirty, setIsDirty ] = useState( hasInitialValue );
|
|
99
99
|
const [ isLinked, setIsLinked ] = useState(
|
|
100
|
-
! hasInitialValue || !
|
|
100
|
+
! hasInitialValue || ! isValueMixed( inputValues ) || hasOneSide
|
|
101
101
|
);
|
|
102
102
|
|
|
103
103
|
const [ side, setSide ] = useState< BoxControlIconProps[ 'side' ] >(
|
|
@@ -155,6 +155,8 @@ function BoxControl( {
|
|
|
155
155
|
sides,
|
|
156
156
|
values: inputValues,
|
|
157
157
|
__next40pxDefaultSize,
|
|
158
|
+
presets,
|
|
159
|
+
presetKey,
|
|
158
160
|
};
|
|
159
161
|
|
|
160
162
|
maybeWarnDeprecated36pxSize( {
|
|
@@ -162,6 +164,7 @@ function BoxControl( {
|
|
|
162
164
|
__next40pxDefaultSize,
|
|
163
165
|
size: undefined,
|
|
164
166
|
} );
|
|
167
|
+
const sidesToRender = getAllowedSides( sides );
|
|
165
168
|
|
|
166
169
|
return (
|
|
167
170
|
<Grid
|
|
@@ -176,8 +179,7 @@ function BoxControl( {
|
|
|
176
179
|
</BaseControl.VisualLabel>
|
|
177
180
|
{ isLinked && (
|
|
178
181
|
<InputWrapper>
|
|
179
|
-
<
|
|
180
|
-
<AllInputControl { ...inputControlProps } />
|
|
182
|
+
<InputControl side="all" { ...inputControlProps } />
|
|
181
183
|
</InputWrapper>
|
|
182
184
|
) }
|
|
183
185
|
{ ! hasOneSide && (
|
|
@@ -189,12 +191,24 @@ function BoxControl( {
|
|
|
189
191
|
</LinkedButtonWrapper>
|
|
190
192
|
) }
|
|
191
193
|
|
|
192
|
-
{ ! isLinked &&
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
194
|
+
{ ! isLinked &&
|
|
195
|
+
splitOnAxis &&
|
|
196
|
+
[ 'vertical', 'horizontal' ].map( ( axis ) => (
|
|
197
|
+
<InputControl
|
|
198
|
+
key={ axis }
|
|
199
|
+
side={ axis as 'horizontal' | 'vertical' }
|
|
200
|
+
{ ...inputControlProps }
|
|
201
|
+
/>
|
|
202
|
+
) ) }
|
|
203
|
+
{ ! isLinked &&
|
|
204
|
+
! splitOnAxis &&
|
|
205
|
+
Array.from( sidesToRender ).map( ( axis ) => (
|
|
206
|
+
<InputControl
|
|
207
|
+
key={ axis }
|
|
208
|
+
side={ axis }
|
|
209
|
+
{ ...inputControlProps }
|
|
210
|
+
/>
|
|
211
|
+
) ) }
|
|
198
212
|
{ allowReset && (
|
|
199
213
|
<ResetButton
|
|
200
214
|
className="component-box-control__reset-button"
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { useInstanceId } from '@wordpress/compose';
|
|
5
|
+
import { __ } from '@wordpress/i18n';
|
|
6
|
+
import { useState } from '@wordpress/element';
|
|
7
|
+
import { settings } from '@wordpress/icons';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Internal dependencies
|
|
11
|
+
*/
|
|
12
|
+
import Tooltip from '../tooltip';
|
|
13
|
+
import { parseQuantityAndUnitFromRawValue } from '../unit-control/utils';
|
|
14
|
+
import {
|
|
15
|
+
CUSTOM_VALUE_SETTINGS,
|
|
16
|
+
getMergedValue,
|
|
17
|
+
getAllowedSides,
|
|
18
|
+
getPresetIndexFromValue,
|
|
19
|
+
getPresetValueFromIndex,
|
|
20
|
+
isValuePreset,
|
|
21
|
+
isValuesDefined,
|
|
22
|
+
isValueMixed,
|
|
23
|
+
LABELS,
|
|
24
|
+
} from './utils';
|
|
25
|
+
import {
|
|
26
|
+
FlexedBoxControlIcon,
|
|
27
|
+
FlexedRangeControl,
|
|
28
|
+
InputWrapper,
|
|
29
|
+
StyledUnitControl,
|
|
30
|
+
} from './styles/box-control-styles';
|
|
31
|
+
import type { BoxControlInputControlProps, BoxControlValue } from './types';
|
|
32
|
+
import Button from '../button';
|
|
33
|
+
|
|
34
|
+
const noop = () => {};
|
|
35
|
+
|
|
36
|
+
function getSidesToModify(
|
|
37
|
+
side: BoxControlInputControlProps[ 'side' ],
|
|
38
|
+
sides: BoxControlInputControlProps[ 'sides' ],
|
|
39
|
+
isAlt?: boolean
|
|
40
|
+
) {
|
|
41
|
+
const allowedSides = getAllowedSides( sides );
|
|
42
|
+
|
|
43
|
+
let modifiedSides: ( keyof BoxControlValue )[] = [];
|
|
44
|
+
switch ( side ) {
|
|
45
|
+
case 'all':
|
|
46
|
+
modifiedSides = [ 'top', 'bottom', 'left', 'right' ];
|
|
47
|
+
break;
|
|
48
|
+
case 'horizontal':
|
|
49
|
+
modifiedSides = [ 'left', 'right' ];
|
|
50
|
+
break;
|
|
51
|
+
case 'vertical':
|
|
52
|
+
modifiedSides = [ 'top', 'bottom' ];
|
|
53
|
+
break;
|
|
54
|
+
default:
|
|
55
|
+
modifiedSides = [ side ];
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
if ( isAlt ) {
|
|
59
|
+
switch ( side ) {
|
|
60
|
+
case 'top':
|
|
61
|
+
modifiedSides.push( 'bottom' );
|
|
62
|
+
break;
|
|
63
|
+
case 'bottom':
|
|
64
|
+
modifiedSides.push( 'top' );
|
|
65
|
+
break;
|
|
66
|
+
case 'left':
|
|
67
|
+
modifiedSides.push( 'left' );
|
|
68
|
+
break;
|
|
69
|
+
case 'right':
|
|
70
|
+
modifiedSides.push( 'right' );
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
return modifiedSides.filter( ( s ) => allowedSides.has( s ) );
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export default function BoxInputControl( {
|
|
79
|
+
__next40pxDefaultSize,
|
|
80
|
+
onChange = noop,
|
|
81
|
+
onFocus = noop,
|
|
82
|
+
values,
|
|
83
|
+
selectedUnits,
|
|
84
|
+
setSelectedUnits,
|
|
85
|
+
sides,
|
|
86
|
+
side,
|
|
87
|
+
min = 0,
|
|
88
|
+
presets,
|
|
89
|
+
presetKey,
|
|
90
|
+
...props
|
|
91
|
+
}: BoxControlInputControlProps ) {
|
|
92
|
+
const defaultValuesToModify = getSidesToModify( side, sides );
|
|
93
|
+
|
|
94
|
+
const handleOnFocus = ( event: React.FocusEvent< HTMLInputElement > ) => {
|
|
95
|
+
onFocus( event, { side } );
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
const handleOnChange = ( nextValues: BoxControlValue ) => {
|
|
99
|
+
onChange( nextValues );
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
const handleRawOnValueChange = ( next?: string ) => {
|
|
103
|
+
const nextValues = { ...values };
|
|
104
|
+
defaultValuesToModify.forEach( ( modifiedSide ) => {
|
|
105
|
+
nextValues[ modifiedSide ] = next;
|
|
106
|
+
} );
|
|
107
|
+
|
|
108
|
+
handleOnChange( nextValues );
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
const handleOnValueChange = (
|
|
112
|
+
next?: string,
|
|
113
|
+
extra?: { event: React.SyntheticEvent< Element, Event > }
|
|
114
|
+
) => {
|
|
115
|
+
const nextValues = { ...values };
|
|
116
|
+
const isNumeric = next !== undefined && ! isNaN( parseFloat( next ) );
|
|
117
|
+
const nextValue = isNumeric ? next : undefined;
|
|
118
|
+
const modifiedSides = getSidesToModify(
|
|
119
|
+
side,
|
|
120
|
+
sides,
|
|
121
|
+
/**
|
|
122
|
+
* Supports changing pair sides. For example, holding the ALT key
|
|
123
|
+
* when changing the TOP will also update BOTTOM.
|
|
124
|
+
*/
|
|
125
|
+
// @ts-expect-error - TODO: event.altKey is only present when the change event was
|
|
126
|
+
// triggered by a keyboard event. Should this feature be implemented differently so
|
|
127
|
+
// it also works with drag events?
|
|
128
|
+
!! extra?.event.altKey
|
|
129
|
+
);
|
|
130
|
+
|
|
131
|
+
modifiedSides.forEach( ( modifiedSide ) => {
|
|
132
|
+
nextValues[ modifiedSide ] = nextValue;
|
|
133
|
+
} );
|
|
134
|
+
|
|
135
|
+
handleOnChange( nextValues );
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
const handleOnUnitChange = ( next?: string ) => {
|
|
139
|
+
const newUnits = { ...selectedUnits };
|
|
140
|
+
defaultValuesToModify.forEach( ( modifiedSide ) => {
|
|
141
|
+
newUnits[ modifiedSide ] = next;
|
|
142
|
+
} );
|
|
143
|
+
setSelectedUnits( newUnits );
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
const mergedValue = getMergedValue( values, defaultValuesToModify );
|
|
147
|
+
const hasValues = isValuesDefined( values );
|
|
148
|
+
const isMixed =
|
|
149
|
+
hasValues &&
|
|
150
|
+
defaultValuesToModify.length > 1 &&
|
|
151
|
+
isValueMixed( values, defaultValuesToModify );
|
|
152
|
+
const [ parsedQuantity, parsedUnit ] =
|
|
153
|
+
parseQuantityAndUnitFromRawValue( mergedValue );
|
|
154
|
+
const computedUnit = hasValues
|
|
155
|
+
? parsedUnit
|
|
156
|
+
: selectedUnits[ defaultValuesToModify[ 0 ] ];
|
|
157
|
+
const generatedId = useInstanceId( BoxInputControl, 'box-control-input' );
|
|
158
|
+
const inputId = [ generatedId, side ].join( '-' );
|
|
159
|
+
const isMixedUnit =
|
|
160
|
+
defaultValuesToModify.length > 1 &&
|
|
161
|
+
mergedValue === undefined &&
|
|
162
|
+
defaultValuesToModify.some(
|
|
163
|
+
( s ) => selectedUnits[ s ] !== computedUnit
|
|
164
|
+
);
|
|
165
|
+
const usedValue =
|
|
166
|
+
mergedValue === undefined && computedUnit ? computedUnit : mergedValue;
|
|
167
|
+
const mixedPlaceholder = isMixed || isMixedUnit ? __( 'Mixed' ) : undefined;
|
|
168
|
+
const hasPresets = presets && presets.length > 0 && presetKey;
|
|
169
|
+
const hasPresetValue =
|
|
170
|
+
hasPresets &&
|
|
171
|
+
mergedValue !== undefined &&
|
|
172
|
+
! isMixed &&
|
|
173
|
+
isValuePreset( mergedValue, presetKey );
|
|
174
|
+
const [ showCustomValueControl, setShowCustomValueControl ] = useState(
|
|
175
|
+
! hasPresets ||
|
|
176
|
+
( ! hasPresetValue && ! isMixed && mergedValue !== undefined )
|
|
177
|
+
);
|
|
178
|
+
const presetIndex = hasPresetValue
|
|
179
|
+
? getPresetIndexFromValue( mergedValue, presetKey, presets )
|
|
180
|
+
: undefined;
|
|
181
|
+
const marks = hasPresets
|
|
182
|
+
? [ { value: 0, label: '', tooltip: __( 'None' ) } ].concat(
|
|
183
|
+
presets.map( ( preset, index ) => ( {
|
|
184
|
+
value: index + 1,
|
|
185
|
+
label: '',
|
|
186
|
+
tooltip: preset.name ?? preset.slug,
|
|
187
|
+
} ) )
|
|
188
|
+
)
|
|
189
|
+
: [];
|
|
190
|
+
|
|
191
|
+
return (
|
|
192
|
+
<InputWrapper key={ `box-control-${ side }` } expanded>
|
|
193
|
+
<FlexedBoxControlIcon side={ side } sides={ sides } />
|
|
194
|
+
{ showCustomValueControl && (
|
|
195
|
+
<>
|
|
196
|
+
<Tooltip placement="top-end" text={ LABELS[ side ] }>
|
|
197
|
+
<StyledUnitControl
|
|
198
|
+
{ ...props }
|
|
199
|
+
min={ min }
|
|
200
|
+
__shouldNotWarnDeprecated36pxSize
|
|
201
|
+
__next40pxDefaultSize={ __next40pxDefaultSize }
|
|
202
|
+
className="component-box-control__unit-control"
|
|
203
|
+
id={ inputId }
|
|
204
|
+
isPressEnterToChange
|
|
205
|
+
disableUnits={ isMixed || isMixedUnit }
|
|
206
|
+
value={ usedValue }
|
|
207
|
+
onChange={ handleOnValueChange }
|
|
208
|
+
onUnitChange={ handleOnUnitChange }
|
|
209
|
+
onFocus={ handleOnFocus }
|
|
210
|
+
label={ LABELS[ side ] }
|
|
211
|
+
placeholder={ mixedPlaceholder }
|
|
212
|
+
hideLabelFromVision
|
|
213
|
+
/>
|
|
214
|
+
</Tooltip>
|
|
215
|
+
|
|
216
|
+
<FlexedRangeControl
|
|
217
|
+
__nextHasNoMarginBottom
|
|
218
|
+
__next40pxDefaultSize={ __next40pxDefaultSize }
|
|
219
|
+
__shouldNotWarnDeprecated36pxSize
|
|
220
|
+
aria-controls={ inputId }
|
|
221
|
+
label={ LABELS[ side ] }
|
|
222
|
+
hideLabelFromVision
|
|
223
|
+
onChange={ ( newValue ) => {
|
|
224
|
+
handleOnValueChange(
|
|
225
|
+
newValue !== undefined
|
|
226
|
+
? [ newValue, computedUnit ].join( '' )
|
|
227
|
+
: undefined
|
|
228
|
+
);
|
|
229
|
+
} }
|
|
230
|
+
min={ isFinite( min ) ? min : 0 }
|
|
231
|
+
max={
|
|
232
|
+
CUSTOM_VALUE_SETTINGS[ computedUnit ?? 'px' ]
|
|
233
|
+
?.max ?? 10
|
|
234
|
+
}
|
|
235
|
+
step={
|
|
236
|
+
CUSTOM_VALUE_SETTINGS[ computedUnit ?? 'px' ]
|
|
237
|
+
?.step ?? 0.1
|
|
238
|
+
}
|
|
239
|
+
value={ parsedQuantity ?? 0 }
|
|
240
|
+
withInputField={ false }
|
|
241
|
+
/>
|
|
242
|
+
</>
|
|
243
|
+
) }
|
|
244
|
+
|
|
245
|
+
{ hasPresets && ! showCustomValueControl && (
|
|
246
|
+
<FlexedRangeControl
|
|
247
|
+
__next40pxDefaultSize
|
|
248
|
+
className="spacing-sizes-control__range-control"
|
|
249
|
+
value={ presetIndex !== undefined ? presetIndex + 1 : 0 }
|
|
250
|
+
onChange={ ( newIndex ) => {
|
|
251
|
+
const newValue =
|
|
252
|
+
newIndex === 0 || newIndex === undefined
|
|
253
|
+
? undefined
|
|
254
|
+
: getPresetValueFromIndex(
|
|
255
|
+
newIndex - 1,
|
|
256
|
+
presetKey,
|
|
257
|
+
presets
|
|
258
|
+
);
|
|
259
|
+
handleRawOnValueChange( newValue );
|
|
260
|
+
} }
|
|
261
|
+
withInputField={ false }
|
|
262
|
+
aria-valuenow={
|
|
263
|
+
presetIndex !== undefined ? presetIndex + 1 : 0
|
|
264
|
+
}
|
|
265
|
+
aria-valuetext={
|
|
266
|
+
marks[ presetIndex !== undefined ? presetIndex + 1 : 0 ]
|
|
267
|
+
.tooltip
|
|
268
|
+
}
|
|
269
|
+
renderTooltipContent={ ( index ) =>
|
|
270
|
+
marks[ ! index ? 0 : index ].tooltip
|
|
271
|
+
}
|
|
272
|
+
min={ 0 }
|
|
273
|
+
max={ marks.length - 1 }
|
|
274
|
+
marks={ marks }
|
|
275
|
+
label={ LABELS[ side ] }
|
|
276
|
+
hideLabelFromVision
|
|
277
|
+
__nextHasNoMarginBottom
|
|
278
|
+
/>
|
|
279
|
+
) }
|
|
280
|
+
|
|
281
|
+
{ hasPresets && (
|
|
282
|
+
<Button
|
|
283
|
+
label={
|
|
284
|
+
showCustomValueControl
|
|
285
|
+
? __( 'Use size preset' )
|
|
286
|
+
: __( 'Set custom size' )
|
|
287
|
+
}
|
|
288
|
+
icon={ settings }
|
|
289
|
+
onClick={ () => {
|
|
290
|
+
setShowCustomValueControl( ! showCustomValueControl );
|
|
291
|
+
} }
|
|
292
|
+
isPressed={ showCustomValueControl }
|
|
293
|
+
size="small"
|
|
294
|
+
iconSize={ 24 }
|
|
295
|
+
/>
|
|
296
|
+
) }
|
|
297
|
+
</InputWrapper>
|
|
298
|
+
);
|
|
299
|
+
}
|
|
@@ -81,3 +81,15 @@ AxialControlsWithSingleSide.args = {
|
|
|
81
81
|
sides: [ 'horizontal' ],
|
|
82
82
|
splitOnAxis: true,
|
|
83
83
|
};
|
|
84
|
+
|
|
85
|
+
export const ControlWithPresets = TemplateControlled.bind( {} );
|
|
86
|
+
ControlWithPresets.args = {
|
|
87
|
+
...Default.args,
|
|
88
|
+
presets: [
|
|
89
|
+
{ name: 'Small', slug: 'small', value: '4px' },
|
|
90
|
+
{ name: 'Medium', slug: 'medium', value: '8px' },
|
|
91
|
+
{ name: 'Large', slug: 'large', value: '12px' },
|
|
92
|
+
{ name: 'Extra Large', slug: 'extra-large', value: '16px' },
|
|
93
|
+
],
|
|
94
|
+
presetKey: 'padding',
|
|
95
|
+
};
|
package/src/box-control/types.ts
CHANGED
|
@@ -15,6 +15,12 @@ export type CustomValueUnits = {
|
|
|
15
15
|
[ key: string ]: { max: number; step: number };
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
+
export interface Preset {
|
|
19
|
+
name: string;
|
|
20
|
+
slug: string;
|
|
21
|
+
value?: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
18
24
|
type UnitControlPassthroughProps = Omit<
|
|
19
25
|
UnitControlProps,
|
|
20
26
|
'label' | 'onChange' | 'onFocus' | 'units'
|
|
@@ -94,6 +100,16 @@ export type BoxControlProps = Pick< UnitControlProps, 'units' > &
|
|
|
94
100
|
* @default false
|
|
95
101
|
*/
|
|
96
102
|
__next40pxDefaultSize?: boolean;
|
|
103
|
+
/**
|
|
104
|
+
* Available presets to pick from.
|
|
105
|
+
*/
|
|
106
|
+
presets?: Preset[];
|
|
107
|
+
/**
|
|
108
|
+
* The key of the preset to apply.
|
|
109
|
+
* If you provide a list of presets, you must provide a preset key to use.
|
|
110
|
+
* The format of preset selected values is going to be `var:preset|${ presetKey }|${ presetSlug }`
|
|
111
|
+
*/
|
|
112
|
+
presetKey?: string;
|
|
97
113
|
};
|
|
98
114
|
|
|
99
115
|
export type BoxControlInputControlProps = UnitControlPassthroughProps & {
|
|
@@ -110,8 +126,18 @@ export type BoxControlInputControlProps = UnitControlPassthroughProps & {
|
|
|
110
126
|
) => void;
|
|
111
127
|
selectedUnits: BoxControlValue;
|
|
112
128
|
setSelectedUnits: React.Dispatch< React.SetStateAction< BoxControlValue > >;
|
|
113
|
-
sides: BoxControlProps[ 'sides' ];
|
|
114
129
|
values: BoxControlValue;
|
|
130
|
+
/**
|
|
131
|
+
* Collection of sides to allow control of. If omitted or empty, all sides will be available.
|
|
132
|
+
*/
|
|
133
|
+
sides: BoxControlProps[ 'sides' ];
|
|
134
|
+
/**
|
|
135
|
+
* Side represents the current side being rendered by the input.
|
|
136
|
+
* It can be a concrete side like: left, right, top, bottom or a combined one like: horizontal, vertical.
|
|
137
|
+
*/
|
|
138
|
+
side: keyof typeof LABELS;
|
|
139
|
+
presets?: Preset[];
|
|
140
|
+
presetKey?: string;
|
|
115
141
|
};
|
|
116
142
|
|
|
117
143
|
export type BoxControlIconProps = {
|