@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
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`props should render correctly 1`] = `
|
|
4
4
|
.emotion-0 {
|
|
5
|
-
color: #1e1e1e;
|
|
5
|
+
color: var(--wp-components-color-foreground, #1e1e1e);
|
|
6
6
|
line-height: 1.4;
|
|
7
7
|
margin: 0;
|
|
8
8
|
text-wrap: balance;
|
|
9
9
|
text-wrap: pretty;
|
|
10
|
-
color: #1e1e1e;
|
|
10
|
+
color: var(--wp-components-color-foreground, #1e1e1e);
|
|
11
11
|
font-size: calc(1.95 * 13px);
|
|
12
12
|
font-weight: 600;
|
|
13
13
|
display: block;
|
|
@@ -30,7 +30,7 @@ Snapshot Diff:
|
|
|
30
30
|
@@ -1,10 +1,10 @@
|
|
31
31
|
Array [
|
|
32
32
|
Object {
|
|
33
|
-
"color": "#1e1e1e",
|
|
33
|
+
"color": "var(--wp-components-color-foreground, #1e1e1e)",
|
|
34
34
|
"display": "block",
|
|
35
35
|
- "font-size": "calc(1.25 * 13px)",
|
|
36
36
|
+ "font-size": "calc(1.95 * 13px)",
|
|
@@ -49,7 +49,7 @@ Snapshot Diff:
|
|
|
49
49
|
@@ -1,10 +1,10 @@
|
|
50
50
|
Array [
|
|
51
51
|
Object {
|
|
52
|
-
"color": "#1e1e1e",
|
|
52
|
+
"color": "var(--wp-components-color-foreground, #1e1e1e)",
|
|
53
53
|
"display": "block",
|
|
54
54
|
- "font-size": "calc(1.25 * 13px)",
|
|
55
55
|
+ "font-size": "calc(1.95 * 13px)",
|
package/src/icon/README.md
CHANGED
|
@@ -11,10 +11,15 @@ import { wordpress } from '@wordpress/icons';
|
|
|
11
11
|
|
|
12
12
|
<Icon icon={ wordpress } />
|
|
13
13
|
```
|
|
14
|
+
|
|
14
15
|
## Props
|
|
15
16
|
|
|
16
17
|
### `icon`
|
|
17
18
|
|
|
19
|
+
- Type: `IconType`
|
|
20
|
+
- Required: No
|
|
21
|
+
- Default: `null`
|
|
22
|
+
|
|
18
23
|
The icon to render. In most cases, you should use an icon from
|
|
19
24
|
[the `@wordpress/icons` package](https://wordpress.github.io/gutenberg/?path=/story/icons-icon--library).
|
|
20
25
|
|
|
@@ -24,16 +29,12 @@ Other supported values are: component instances, functions,
|
|
|
24
29
|
|
|
25
30
|
The `size` value, as well as any other additional props, will be passed through.
|
|
26
31
|
|
|
27
|
-
- Type: `IconType`
|
|
28
|
-
- Required: No
|
|
29
|
-
- Default: `null`
|
|
30
|
-
|
|
31
32
|
### `size`
|
|
32
33
|
|
|
33
|
-
The size (width and height) of the icon.
|
|
34
|
-
|
|
35
|
-
Defaults to `20` when `icon` is a string (i.e. a Dashicon id), otherwise `24`.
|
|
36
|
-
|
|
37
34
|
- Type: `number`
|
|
38
35
|
- Required: No
|
|
39
36
|
- Default: `'string' === typeof icon ? 20 : 24`
|
|
37
|
+
|
|
38
|
+
The size (width and height) of the icon.
|
|
39
|
+
|
|
40
|
+
Defaults to `20` when `icon` is a string (i.e. a Dashicon id), otherwise `24`.
|
|
@@ -20,6 +20,7 @@ import { space } from '../utils/space';
|
|
|
20
20
|
import { useDraft } from './utils';
|
|
21
21
|
import BaseControl from '../base-control';
|
|
22
22
|
import { useDeprecated36pxDefaultSizeProp } from '../utils/use-deprecated-props';
|
|
23
|
+
import { maybeWarnDeprecated36pxSize } from '../utils/deprecated-36px-size';
|
|
23
24
|
|
|
24
25
|
const noop = () => {};
|
|
25
26
|
|
|
@@ -36,6 +37,7 @@ export function UnforwardedInputControl(
|
|
|
36
37
|
) {
|
|
37
38
|
const {
|
|
38
39
|
__next40pxDefaultSize,
|
|
40
|
+
__shouldNotWarnDeprecated36pxSize,
|
|
39
41
|
__unstableStateReducer: stateReducer = ( state ) => state,
|
|
40
42
|
__unstableInputWidth,
|
|
41
43
|
className,
|
|
@@ -68,6 +70,13 @@ export function UnforwardedInputControl(
|
|
|
68
70
|
|
|
69
71
|
const helpProp = !! help ? { 'aria-describedby': `${ id }__help` } : {};
|
|
70
72
|
|
|
73
|
+
maybeWarnDeprecated36pxSize( {
|
|
74
|
+
componentName: 'InputControl',
|
|
75
|
+
__next40pxDefaultSize,
|
|
76
|
+
size,
|
|
77
|
+
__shouldNotWarnDeprecated36pxSize,
|
|
78
|
+
} );
|
|
79
|
+
|
|
71
80
|
return (
|
|
72
81
|
<BaseControl
|
|
73
82
|
className={ classes }
|
|
@@ -125,6 +134,7 @@ export function UnforwardedInputControl(
|
|
|
125
134
|
*
|
|
126
135
|
* return (
|
|
127
136
|
* <InputControl
|
|
137
|
+
* __next40pxDefaultSize
|
|
128
138
|
* value={ value }
|
|
129
139
|
* onChange={ ( nextValue ) => setValue( nextValue ?? '' ) }
|
|
130
140
|
* />
|
|
@@ -46,6 +46,7 @@ export const Default = Template.bind( {} );
|
|
|
46
46
|
Default.args = {
|
|
47
47
|
label: 'Value',
|
|
48
48
|
placeholder: 'Placeholder',
|
|
49
|
+
__next40pxDefaultSize: true,
|
|
49
50
|
};
|
|
50
51
|
|
|
51
52
|
export const WithHelpText = Template.bind( {} );
|
|
@@ -117,7 +118,6 @@ export const ShowPassword: StoryFn< typeof InputControl > = ( args ) => {
|
|
|
117
118
|
return (
|
|
118
119
|
<InputControl
|
|
119
120
|
type={ visible ? 'text' : 'password' }
|
|
120
|
-
label="Password"
|
|
121
121
|
suffix={
|
|
122
122
|
<InputControlSuffixWrapper variant="control">
|
|
123
123
|
<Button
|
|
@@ -132,3 +132,8 @@ export const ShowPassword: StoryFn< typeof InputControl > = ( args ) => {
|
|
|
132
132
|
/>
|
|
133
133
|
);
|
|
134
134
|
};
|
|
135
|
+
ShowPassword.args = {
|
|
136
|
+
...Default.args,
|
|
137
|
+
label: 'Password',
|
|
138
|
+
placeholder: undefined,
|
|
139
|
+
};
|
|
@@ -17,9 +17,15 @@ import BaseInputControl from '../';
|
|
|
17
17
|
const getInput = () => screen.getByTestId( 'input' );
|
|
18
18
|
|
|
19
19
|
describe( 'InputControl', () => {
|
|
20
|
-
const InputControl = ( props ) =>
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
const InputControl = ( props ) => {
|
|
21
|
+
return (
|
|
22
|
+
<BaseInputControl
|
|
23
|
+
{ ...props }
|
|
24
|
+
__next40pxDefaultSize
|
|
25
|
+
data-testid="input"
|
|
26
|
+
/>
|
|
27
|
+
);
|
|
28
|
+
};
|
|
23
29
|
|
|
24
30
|
describe( 'Basic rendering', () => {
|
|
25
31
|
it( 'should render', () => {
|
|
@@ -40,6 +40,13 @@ interface BaseProps {
|
|
|
40
40
|
* @default false
|
|
41
41
|
*/
|
|
42
42
|
__next40pxDefaultSize?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Do not throw a warning for the deprecated 36px default size.
|
|
45
|
+
* For internal components of other components that already throw the warning.
|
|
46
|
+
*
|
|
47
|
+
* @ignore
|
|
48
|
+
*/
|
|
49
|
+
__shouldNotWarnDeprecated36pxSize?: boolean;
|
|
43
50
|
__unstableInputWidth?: CSSProperties[ 'width' ];
|
|
44
51
|
/**
|
|
45
52
|
* If true, the label will only be visible to screen readers.
|
|
@@ -129,7 +136,7 @@ export interface InputBaseProps extends BaseProps, FlexProps {
|
|
|
129
136
|
* If you want to apply standard padding in accordance with the size variant, wrap the element in
|
|
130
137
|
* the provided `<InputControlPrefixWrapper>` component.
|
|
131
138
|
*
|
|
132
|
-
*
|
|
139
|
+
* ```jsx
|
|
133
140
|
* import {
|
|
134
141
|
* __experimentalInputControl as InputControl,
|
|
135
142
|
* __experimentalInputControlPrefixWrapper as InputControlPrefixWrapper,
|
|
@@ -138,6 +145,7 @@ export interface InputBaseProps extends BaseProps, FlexProps {
|
|
|
138
145
|
* <InputControl
|
|
139
146
|
* prefix={<InputControlPrefixWrapper>@</InputControlPrefixWrapper>}
|
|
140
147
|
* />
|
|
148
|
+
* ```
|
|
141
149
|
*/
|
|
142
150
|
prefix?: ReactNode;
|
|
143
151
|
/**
|
|
@@ -147,7 +155,7 @@ export interface InputBaseProps extends BaseProps, FlexProps {
|
|
|
147
155
|
* If you want to apply standard padding in accordance with the size variant, wrap the element in
|
|
148
156
|
* the provided `<InputControlSuffixWrapper>` component.
|
|
149
157
|
*
|
|
150
|
-
*
|
|
158
|
+
* ```jsx
|
|
151
159
|
* import {
|
|
152
160
|
* __experimentalInputControl as InputControl,
|
|
153
161
|
* __experimentalInputControlSuffixWrapper as InputControlSuffixWrapper,
|
|
@@ -156,6 +164,7 @@ export interface InputBaseProps extends BaseProps, FlexProps {
|
|
|
156
164
|
* <InputControl
|
|
157
165
|
* suffix={<InputControlSuffixWrapper>%</InputControlSuffixWrapper>}
|
|
158
166
|
* />
|
|
167
|
+
* ```
|
|
159
168
|
*/
|
|
160
169
|
suffix?: ReactNode;
|
|
161
170
|
/**
|
|
@@ -21,7 +21,7 @@ export const MenuCheckboxItem = forwardRef<
|
|
|
21
21
|
HTMLDivElement,
|
|
22
22
|
WordPressComponentProps< MenuCheckboxItemProps, 'div', false >
|
|
23
23
|
>( function MenuCheckboxItem(
|
|
24
|
-
{ suffix, children, hideOnClick = false, ...props },
|
|
24
|
+
{ suffix, children, disabled = false, hideOnClick = false, ...props },
|
|
25
25
|
ref
|
|
26
26
|
) {
|
|
27
27
|
const menuContext = useContext( MenuContext );
|
|
@@ -37,6 +37,7 @@ export const MenuCheckboxItem = forwardRef<
|
|
|
37
37
|
ref={ ref }
|
|
38
38
|
{ ...props }
|
|
39
39
|
accessibleWhenDisabled
|
|
40
|
+
disabled={ disabled }
|
|
40
41
|
hideOnClick={ hideOnClick }
|
|
41
42
|
store={ menuContext.store }
|
|
42
43
|
>
|
package/src/menu/index.tsx
CHANGED
|
@@ -2,28 +2,18 @@
|
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
4
|
import * as Ariakit from '@ariakit/react';
|
|
5
|
-
import { useStoreState } from '@ariakit/react';
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* WordPress dependencies
|
|
9
8
|
*/
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
useMemo,
|
|
13
|
-
cloneElement,
|
|
14
|
-
isValidElement,
|
|
15
|
-
useCallback,
|
|
16
|
-
} from '@wordpress/element';
|
|
17
|
-
import { isRTL } from '@wordpress/i18n';
|
|
18
|
-
import { chevronRightSmall } from '@wordpress/icons';
|
|
9
|
+
import { useContext, useMemo } from '@wordpress/element';
|
|
10
|
+
import { isRTL as isRTLFn } from '@wordpress/i18n';
|
|
19
11
|
|
|
20
12
|
/**
|
|
21
13
|
* Internal dependencies
|
|
22
14
|
*/
|
|
23
|
-
import { useContextSystem,
|
|
24
|
-
import type { WordPressComponentProps } from '../context';
|
|
15
|
+
import { useContextSystem, contextConnectWithoutRef } from '../context';
|
|
25
16
|
import type { MenuContext as MenuContextType, MenuProps } from './types';
|
|
26
|
-
import * as Styled from './styles';
|
|
27
17
|
import { MenuContext } from './context';
|
|
28
18
|
import { MenuItem } from './item';
|
|
29
19
|
import { MenuCheckboxItem } from './checkbox-item';
|
|
@@ -33,49 +23,36 @@ import { MenuGroupLabel } from './group-label';
|
|
|
33
23
|
import { MenuSeparator } from './separator';
|
|
34
24
|
import { MenuItemLabel } from './item-label';
|
|
35
25
|
import { MenuItemHelpText } from './item-help-text';
|
|
26
|
+
import { MenuTriggerButton } from './trigger-button';
|
|
27
|
+
import { MenuSubmenuTriggerItem } from './submenu-trigger-item';
|
|
28
|
+
import { MenuPopover } from './popover';
|
|
36
29
|
|
|
37
|
-
const UnconnectedMenu = (
|
|
38
|
-
props: WordPressComponentProps< MenuProps, 'div', false >,
|
|
39
|
-
ref: React.ForwardedRef< HTMLDivElement >
|
|
40
|
-
) => {
|
|
30
|
+
const UnconnectedMenu = ( props: MenuProps ) => {
|
|
41
31
|
const {
|
|
42
|
-
|
|
43
|
-
open,
|
|
32
|
+
children,
|
|
44
33
|
defaultOpen = false,
|
|
34
|
+
open,
|
|
45
35
|
onOpenChange,
|
|
46
36
|
placement,
|
|
47
37
|
|
|
48
|
-
// Menu trigger props
|
|
49
|
-
trigger,
|
|
50
|
-
|
|
51
|
-
// Menu props
|
|
52
|
-
gutter,
|
|
53
|
-
children,
|
|
54
|
-
shift,
|
|
55
|
-
modal = true,
|
|
56
|
-
|
|
57
38
|
// From internal components context
|
|
58
39
|
variant,
|
|
59
|
-
|
|
60
|
-
//
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
props,
|
|
64
|
-
'Menu'
|
|
65
|
-
);
|
|
40
|
+
} = useContextSystem<
|
|
41
|
+
// @ts-expect-error TODO: missing 'className' in MenuProps
|
|
42
|
+
typeof props & Pick< MenuContextType, 'variant' >
|
|
43
|
+
>( props, 'Menu' );
|
|
66
44
|
|
|
67
45
|
const parentContext = useContext( MenuContext );
|
|
68
46
|
|
|
69
|
-
const
|
|
47
|
+
const rtl = isRTLFn();
|
|
70
48
|
|
|
71
49
|
// If an explicit value for the `placement` prop is not passed,
|
|
72
50
|
// apply a default placement of `bottom-start` for the root menu popover,
|
|
73
51
|
// and of `right-start` for nested menu popovers.
|
|
74
52
|
let computedPlacement =
|
|
75
|
-
|
|
76
|
-
( parentContext?.store ? 'right-start' : 'bottom-start' );
|
|
53
|
+
placement ?? ( parentContext?.store ? 'right-start' : 'bottom-start' );
|
|
77
54
|
// Swap left/right in case of RTL direction
|
|
78
|
-
if (
|
|
55
|
+
if ( rtl ) {
|
|
79
56
|
if ( /right/.test( computedPlacement ) ) {
|
|
80
57
|
computedPlacement = computedPlacement.replace(
|
|
81
58
|
'right',
|
|
@@ -98,7 +75,7 @@ const UnconnectedMenu = (
|
|
|
98
75
|
setOpen( willBeOpen ) {
|
|
99
76
|
onOpenChange?.( willBeOpen );
|
|
100
77
|
},
|
|
101
|
-
rtl
|
|
78
|
+
rtl,
|
|
102
79
|
} );
|
|
103
80
|
|
|
104
81
|
const contextValue = useMemo(
|
|
@@ -106,134 +83,53 @@ const UnconnectedMenu = (
|
|
|
106
83
|
[ menuStore, variant ]
|
|
107
84
|
);
|
|
108
85
|
|
|
109
|
-
// Extract the side from the applied placement — useful for animations.
|
|
110
|
-
// Using `currentPlacement` instead of `placement` to make sure that we
|
|
111
|
-
// use the final computed placement (including "flips" etc).
|
|
112
|
-
const appliedPlacementSide = useStoreState(
|
|
113
|
-
menuStore,
|
|
114
|
-
'currentPlacement'
|
|
115
|
-
).split( '-' )[ 0 ];
|
|
116
|
-
|
|
117
|
-
if (
|
|
118
|
-
menuStore.parent &&
|
|
119
|
-
! ( isValidElement( trigger ) && MenuItem === trigger.type )
|
|
120
|
-
) {
|
|
121
|
-
// eslint-disable-next-line no-console
|
|
122
|
-
console.warn(
|
|
123
|
-
'For nested Menus, the `trigger` should always be a `MenuItem`.'
|
|
124
|
-
);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
const hideOnEscape = useCallback(
|
|
128
|
-
( event: React.KeyboardEvent< Element > ) => {
|
|
129
|
-
// Pressing Escape can cause unexpected consequences (ie. exiting
|
|
130
|
-
// full screen mode on MacOs, close parent modals...).
|
|
131
|
-
event.preventDefault();
|
|
132
|
-
// Returning `true` causes the menu to hide.
|
|
133
|
-
return true;
|
|
134
|
-
},
|
|
135
|
-
[]
|
|
136
|
-
);
|
|
137
|
-
|
|
138
|
-
const wrapperProps = useMemo(
|
|
139
|
-
() => ( {
|
|
140
|
-
dir: computedDirection,
|
|
141
|
-
style: {
|
|
142
|
-
direction:
|
|
143
|
-
computedDirection as React.CSSProperties[ 'direction' ],
|
|
144
|
-
},
|
|
145
|
-
} ),
|
|
146
|
-
[ computedDirection ]
|
|
147
|
-
);
|
|
148
|
-
|
|
149
86
|
return (
|
|
150
|
-
|
|
151
|
-
{
|
|
152
|
-
|
|
153
|
-
ref={ ref }
|
|
154
|
-
store={ menuStore }
|
|
155
|
-
render={
|
|
156
|
-
menuStore.parent
|
|
157
|
-
? cloneElement( trigger, {
|
|
158
|
-
// Add submenu arrow, unless a `suffix` is explicitly specified
|
|
159
|
-
suffix: (
|
|
160
|
-
<>
|
|
161
|
-
{ trigger.props.suffix }
|
|
162
|
-
<Styled.SubmenuChevronIcon
|
|
163
|
-
aria-hidden="true"
|
|
164
|
-
icon={ chevronRightSmall }
|
|
165
|
-
size={ 24 }
|
|
166
|
-
preserveAspectRatio="xMidYMid slice"
|
|
167
|
-
/>
|
|
168
|
-
</>
|
|
169
|
-
),
|
|
170
|
-
} )
|
|
171
|
-
: trigger
|
|
172
|
-
}
|
|
173
|
-
/>
|
|
174
|
-
|
|
175
|
-
{ /* Menu popover */ }
|
|
176
|
-
<Ariakit.Menu
|
|
177
|
-
{ ...otherProps }
|
|
178
|
-
modal={ modal }
|
|
179
|
-
store={ menuStore }
|
|
180
|
-
// Root menu has an 8px distance from its trigger,
|
|
181
|
-
// otherwise 0 (which causes the submenu to slightly overlap)
|
|
182
|
-
gutter={ gutter ?? ( menuStore.parent ? 0 : 8 ) }
|
|
183
|
-
// Align nested menu by the same (but opposite) amount
|
|
184
|
-
// as the menu container's padding.
|
|
185
|
-
shift={ shift ?? ( menuStore.parent ? -4 : 0 ) }
|
|
186
|
-
hideOnHoverOutside={ false }
|
|
187
|
-
data-side={ appliedPlacementSide }
|
|
188
|
-
wrapperProps={ wrapperProps }
|
|
189
|
-
hideOnEscape={ hideOnEscape }
|
|
190
|
-
unmountOnHide
|
|
191
|
-
render={ ( renderProps ) => (
|
|
192
|
-
// Two wrappers are needed for the entry animation, where the menu
|
|
193
|
-
// container scales with a different factor than its contents.
|
|
194
|
-
// The {...renderProps} are passed to the inner wrapper, so that the
|
|
195
|
-
// menu element is the direct parent of the menu item elements.
|
|
196
|
-
<Styled.MenuPopoverOuterWrapper variant={ variant }>
|
|
197
|
-
<Styled.MenuPopoverInnerWrapper { ...renderProps } />
|
|
198
|
-
</Styled.MenuPopoverOuterWrapper>
|
|
199
|
-
) }
|
|
200
|
-
>
|
|
201
|
-
<MenuContext.Provider value={ contextValue }>
|
|
202
|
-
{ children }
|
|
203
|
-
</MenuContext.Provider>
|
|
204
|
-
</Ariakit.Menu>
|
|
205
|
-
</>
|
|
87
|
+
<MenuContext.Provider value={ contextValue }>
|
|
88
|
+
{ children }
|
|
89
|
+
</MenuContext.Provider>
|
|
206
90
|
);
|
|
207
91
|
};
|
|
208
92
|
|
|
209
|
-
export const Menu = Object.assign(
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
93
|
+
export const Menu = Object.assign(
|
|
94
|
+
contextConnectWithoutRef( UnconnectedMenu, 'Menu' ),
|
|
95
|
+
{
|
|
96
|
+
Context: Object.assign( MenuContext, {
|
|
97
|
+
displayName: 'Menu.Context',
|
|
98
|
+
} ),
|
|
99
|
+
Item: Object.assign( MenuItem, {
|
|
100
|
+
displayName: 'Menu.Item',
|
|
101
|
+
} ),
|
|
102
|
+
RadioItem: Object.assign( MenuRadioItem, {
|
|
103
|
+
displayName: 'Menu.RadioItem',
|
|
104
|
+
} ),
|
|
105
|
+
CheckboxItem: Object.assign( MenuCheckboxItem, {
|
|
106
|
+
displayName: 'Menu.CheckboxItem',
|
|
107
|
+
} ),
|
|
108
|
+
Group: Object.assign( MenuGroup, {
|
|
109
|
+
displayName: 'Menu.Group',
|
|
110
|
+
} ),
|
|
111
|
+
GroupLabel: Object.assign( MenuGroupLabel, {
|
|
112
|
+
displayName: 'Menu.GroupLabel',
|
|
113
|
+
} ),
|
|
114
|
+
Separator: Object.assign( MenuSeparator, {
|
|
115
|
+
displayName: 'Menu.Separator',
|
|
116
|
+
} ),
|
|
117
|
+
ItemLabel: Object.assign( MenuItemLabel, {
|
|
118
|
+
displayName: 'Menu.ItemLabel',
|
|
119
|
+
} ),
|
|
120
|
+
ItemHelpText: Object.assign( MenuItemHelpText, {
|
|
121
|
+
displayName: 'Menu.ItemHelpText',
|
|
122
|
+
} ),
|
|
123
|
+
Popover: Object.assign( MenuPopover, {
|
|
124
|
+
displayName: 'Menu.Popover',
|
|
125
|
+
} ),
|
|
126
|
+
TriggerButton: Object.assign( MenuTriggerButton, {
|
|
127
|
+
displayName: 'Menu.TriggerButton',
|
|
128
|
+
} ),
|
|
129
|
+
SubmenuTriggerItem: Object.assign( MenuSubmenuTriggerItem, {
|
|
130
|
+
displayName: 'Menu.SubmenuTriggerItem',
|
|
131
|
+
} ),
|
|
132
|
+
}
|
|
133
|
+
);
|
|
238
134
|
|
|
239
135
|
export default Menu;
|
package/src/menu/item.tsx
CHANGED
|
@@ -15,7 +15,15 @@ export const MenuItem = forwardRef<
|
|
|
15
15
|
HTMLDivElement,
|
|
16
16
|
WordPressComponentProps< MenuItemProps, 'div', false >
|
|
17
17
|
>( function MenuItem(
|
|
18
|
-
{
|
|
18
|
+
{
|
|
19
|
+
prefix,
|
|
20
|
+
suffix,
|
|
21
|
+
children,
|
|
22
|
+
disabled = false,
|
|
23
|
+
hideOnClick = true,
|
|
24
|
+
store,
|
|
25
|
+
...props
|
|
26
|
+
},
|
|
19
27
|
ref
|
|
20
28
|
) {
|
|
21
29
|
const menuContext = useContext( MenuContext );
|
|
@@ -26,13 +34,20 @@ export const MenuItem = forwardRef<
|
|
|
26
34
|
);
|
|
27
35
|
}
|
|
28
36
|
|
|
37
|
+
// In most cases, the menu store will be retrieved from context (ie. the store
|
|
38
|
+
// created by the top-level menu component). But in rare cases (ie.
|
|
39
|
+
// `Menu.SubmenuTriggerItem`), the context store wouldn't be correct. This is
|
|
40
|
+
// why the component accepts a `store` prop to override the context store.
|
|
41
|
+
const computedStore = store ?? menuContext.store;
|
|
42
|
+
|
|
29
43
|
return (
|
|
30
44
|
<Styled.MenuItem
|
|
31
45
|
ref={ ref }
|
|
32
46
|
{ ...props }
|
|
33
47
|
accessibleWhenDisabled
|
|
48
|
+
disabled={ disabled }
|
|
34
49
|
hideOnClick={ hideOnClick }
|
|
35
|
-
store={
|
|
50
|
+
store={ computedStore }
|
|
36
51
|
>
|
|
37
52
|
<Styled.ItemPrefixWrapper>{ prefix }</Styled.ItemPrefixWrapper>
|
|
38
53
|
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import * as Ariakit from '@ariakit/react';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* WordPress dependencies
|
|
8
|
+
*/
|
|
9
|
+
import {
|
|
10
|
+
useContext,
|
|
11
|
+
useMemo,
|
|
12
|
+
forwardRef,
|
|
13
|
+
useCallback,
|
|
14
|
+
} from '@wordpress/element';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Internal dependencies
|
|
18
|
+
*/
|
|
19
|
+
import type { WordPressComponentProps } from '../context';
|
|
20
|
+
import type { MenuPopoverProps } from './types';
|
|
21
|
+
import * as Styled from './styles';
|
|
22
|
+
import { MenuContext } from './context';
|
|
23
|
+
|
|
24
|
+
export const MenuPopover = forwardRef<
|
|
25
|
+
HTMLDivElement,
|
|
26
|
+
WordPressComponentProps< MenuPopoverProps, 'div', false >
|
|
27
|
+
>( function MenuPopover(
|
|
28
|
+
{ gutter, children, shift, modal = true, ...otherProps },
|
|
29
|
+
ref
|
|
30
|
+
) {
|
|
31
|
+
const menuContext = useContext( MenuContext );
|
|
32
|
+
|
|
33
|
+
// Extract the side from the applied placement — useful for animations.
|
|
34
|
+
// Using `currentPlacement` instead of `placement` to make sure that we
|
|
35
|
+
// use the final computed placement (including "flips" etc).
|
|
36
|
+
const appliedPlacementSide = Ariakit.useStoreState(
|
|
37
|
+
menuContext?.store,
|
|
38
|
+
'currentPlacement'
|
|
39
|
+
)?.split( '-' )[ 0 ];
|
|
40
|
+
|
|
41
|
+
const hideOnEscape = useCallback(
|
|
42
|
+
( event: React.KeyboardEvent< Element > ) => {
|
|
43
|
+
// Pressing Escape can cause unexpected consequences (ie. exiting
|
|
44
|
+
// full screen mode on MacOs, close parent modals...).
|
|
45
|
+
event.preventDefault();
|
|
46
|
+
// Returning `true` causes the menu to hide.
|
|
47
|
+
return true;
|
|
48
|
+
},
|
|
49
|
+
[]
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
const computedDirection = Ariakit.useStoreState( menuContext?.store, 'rtl' )
|
|
53
|
+
? 'rtl'
|
|
54
|
+
: 'ltr';
|
|
55
|
+
|
|
56
|
+
const wrapperProps = useMemo(
|
|
57
|
+
() => ( {
|
|
58
|
+
dir: computedDirection,
|
|
59
|
+
style: {
|
|
60
|
+
direction:
|
|
61
|
+
computedDirection as React.CSSProperties[ 'direction' ],
|
|
62
|
+
},
|
|
63
|
+
} ),
|
|
64
|
+
[ computedDirection ]
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
if ( ! menuContext?.store ) {
|
|
68
|
+
throw new Error(
|
|
69
|
+
'Menu.Popover can only be rendered inside a Menu component'
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
return (
|
|
74
|
+
<Ariakit.Menu
|
|
75
|
+
{ ...otherProps }
|
|
76
|
+
ref={ ref }
|
|
77
|
+
modal={ modal }
|
|
78
|
+
store={ menuContext.store }
|
|
79
|
+
// Root menu has an 8px distance from its trigger,
|
|
80
|
+
// otherwise 0 (which causes the submenu to slightly overlap)
|
|
81
|
+
gutter={ gutter ?? ( menuContext.store.parent ? 0 : 8 ) }
|
|
82
|
+
// Align nested menu by the same (but opposite) amount
|
|
83
|
+
// as the menu container's padding.
|
|
84
|
+
shift={ shift ?? ( menuContext.store.parent ? -4 : 0 ) }
|
|
85
|
+
hideOnHoverOutside={ false }
|
|
86
|
+
data-side={ appliedPlacementSide }
|
|
87
|
+
wrapperProps={ wrapperProps }
|
|
88
|
+
hideOnEscape={ hideOnEscape }
|
|
89
|
+
unmountOnHide
|
|
90
|
+
render={ ( renderProps ) => (
|
|
91
|
+
// Two wrappers are needed for the entry animation, where the menu
|
|
92
|
+
// container scales with a different factor than its contents.
|
|
93
|
+
// The {...renderProps} are passed to the inner wrapper, so that the
|
|
94
|
+
// menu element is the direct parent of the menu item elements.
|
|
95
|
+
<Styled.MenuPopoverOuterWrapper variant={ menuContext.variant }>
|
|
96
|
+
<Styled.MenuPopoverInnerWrapper { ...renderProps } />
|
|
97
|
+
</Styled.MenuPopoverOuterWrapper>
|
|
98
|
+
) }
|
|
99
|
+
>
|
|
100
|
+
{ children }
|
|
101
|
+
</Ariakit.Menu>
|
|
102
|
+
);
|
|
103
|
+
} );
|
package/src/menu/radio-item.tsx
CHANGED
|
@@ -28,7 +28,7 @@ export const MenuRadioItem = forwardRef<
|
|
|
28
28
|
HTMLDivElement,
|
|
29
29
|
WordPressComponentProps< MenuRadioItemProps, 'div', false >
|
|
30
30
|
>( function MenuRadioItem(
|
|
31
|
-
{ suffix, children, hideOnClick = false, ...props },
|
|
31
|
+
{ suffix, children, disabled = false, hideOnClick = false, ...props },
|
|
32
32
|
ref
|
|
33
33
|
) {
|
|
34
34
|
const menuContext = useContext( MenuContext );
|
|
@@ -44,6 +44,7 @@ export const MenuRadioItem = forwardRef<
|
|
|
44
44
|
ref={ ref }
|
|
45
45
|
{ ...props }
|
|
46
46
|
accessibleWhenDisabled
|
|
47
|
+
disabled={ disabled }
|
|
47
48
|
hideOnClick={ hideOnClick }
|
|
48
49
|
store={ menuContext.store }
|
|
49
50
|
>
|