@wordpress/components 29.0.1-next.a9f418477.0 → 29.1.1
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
package/src/box-control/utils.ts
CHANGED
|
@@ -6,12 +6,14 @@ import { __ } from '@wordpress/i18n';
|
|
|
6
6
|
/**
|
|
7
7
|
* Internal dependencies
|
|
8
8
|
*/
|
|
9
|
-
import { parseQuantityAndUnitFromRawValue } from '../unit-control/utils';
|
|
10
9
|
import type {
|
|
10
|
+
BoxControlInputControlProps,
|
|
11
11
|
BoxControlProps,
|
|
12
12
|
BoxControlValue,
|
|
13
13
|
CustomValueUnits,
|
|
14
|
+
Preset,
|
|
14
15
|
} from './types';
|
|
16
|
+
import deprecated from '@wordpress/deprecated';
|
|
15
17
|
|
|
16
18
|
export const CUSTOM_VALUE_SETTINGS: CustomValueUnits = {
|
|
17
19
|
px: { max: 300, step: 1 },
|
|
@@ -50,7 +52,6 @@ export const LABELS = {
|
|
|
50
52
|
bottom: __( 'Bottom side' ),
|
|
51
53
|
left: __( 'Left side' ),
|
|
52
54
|
right: __( 'Right side' ),
|
|
53
|
-
mixed: __( 'Mixed' ),
|
|
54
55
|
vertical: __( 'Top and bottom sides' ),
|
|
55
56
|
horizontal: __( 'Left and right sides' ),
|
|
56
57
|
};
|
|
@@ -82,56 +83,46 @@ function mode< T >( arr: T[] ) {
|
|
|
82
83
|
}
|
|
83
84
|
|
|
84
85
|
/**
|
|
85
|
-
* Gets the
|
|
86
|
+
* Gets the merged input value and unit from values data.
|
|
86
87
|
*
|
|
87
88
|
* @param values Box values.
|
|
88
|
-
* @param selectedUnits Box units.
|
|
89
89
|
* @param availableSides Available box sides to evaluate.
|
|
90
90
|
*
|
|
91
91
|
* @return A value + unit for the 'all' input.
|
|
92
92
|
*/
|
|
93
|
-
export function
|
|
93
|
+
export function getMergedValue(
|
|
94
94
|
values: BoxControlValue = {},
|
|
95
|
-
selectedUnits?: BoxControlValue,
|
|
96
95
|
availableSides: BoxControlProps[ 'sides' ] = ALL_SIDES
|
|
97
96
|
) {
|
|
98
97
|
const sides = normalizeSides( availableSides );
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
)
|
|
105
|
-
|
|
106
|
-
( value ) => value[ 1 ]
|
|
107
|
-
);
|
|
108
|
-
|
|
109
|
-
const commonQuantity = allParsedQuantities.every(
|
|
110
|
-
( v ) => v === allParsedQuantities[ 0 ]
|
|
111
|
-
)
|
|
112
|
-
? allParsedQuantities[ 0 ]
|
|
113
|
-
: '';
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* The typeof === 'number' check is important. On reset actions, the incoming value
|
|
117
|
-
* may be null or an empty string.
|
|
118
|
-
*
|
|
119
|
-
* Also, the value may also be zero (0), which is considered a valid unit value.
|
|
120
|
-
*
|
|
121
|
-
* typeof === 'number' is more specific for these cases, rather than relying on a
|
|
122
|
-
* simple truthy check.
|
|
123
|
-
*/
|
|
124
|
-
let commonUnit;
|
|
125
|
-
if ( typeof commonQuantity === 'number' ) {
|
|
126
|
-
commonUnit = mode( allParsedUnits );
|
|
127
|
-
} else {
|
|
128
|
-
// Set meaningful unit selection if no commonQuantity and user has previously
|
|
129
|
-
// selected units without assigning values while controls were unlinked.
|
|
130
|
-
commonUnit =
|
|
131
|
-
getAllUnitFallback( selectedUnits ) ?? mode( allParsedUnits );
|
|
98
|
+
if (
|
|
99
|
+
sides.every(
|
|
100
|
+
( side: keyof BoxControlValue ) =>
|
|
101
|
+
values[ side ] === values[ sides[ 0 ] ]
|
|
102
|
+
)
|
|
103
|
+
) {
|
|
104
|
+
return values[ sides[ 0 ] ];
|
|
132
105
|
}
|
|
133
106
|
|
|
134
|
-
return
|
|
107
|
+
return undefined;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Checks if the values are mixed.
|
|
112
|
+
*
|
|
113
|
+
* @param values Box values.
|
|
114
|
+
* @param availableSides Available box sides to evaluate.
|
|
115
|
+
* @return Whether the values are mixed.
|
|
116
|
+
*/
|
|
117
|
+
export function isValueMixed(
|
|
118
|
+
values: BoxControlValue = {},
|
|
119
|
+
availableSides: BoxControlProps[ 'sides' ] = ALL_SIDES
|
|
120
|
+
) {
|
|
121
|
+
const sides = normalizeSides( availableSides );
|
|
122
|
+
return sides.some(
|
|
123
|
+
( side: keyof BoxControlValue ) =>
|
|
124
|
+
values[ side ] !== values[ sides[ 0 ] ]
|
|
125
|
+
);
|
|
135
126
|
}
|
|
136
127
|
|
|
137
128
|
/**
|
|
@@ -150,26 +141,6 @@ export function getAllUnitFallback( selectedUnits?: BoxControlValue ) {
|
|
|
150
141
|
return mode( filteredUnits );
|
|
151
142
|
}
|
|
152
143
|
|
|
153
|
-
/**
|
|
154
|
-
* Checks to determine if values are mixed.
|
|
155
|
-
*
|
|
156
|
-
* @param values Box values.
|
|
157
|
-
* @param selectedUnits Box units.
|
|
158
|
-
* @param sides Available box sides to evaluate.
|
|
159
|
-
*
|
|
160
|
-
* @return Whether values are mixed.
|
|
161
|
-
*/
|
|
162
|
-
export function isValuesMixed(
|
|
163
|
-
values: BoxControlValue = {},
|
|
164
|
-
selectedUnits?: BoxControlValue,
|
|
165
|
-
sides: BoxControlProps[ 'sides' ] = ALL_SIDES
|
|
166
|
-
) {
|
|
167
|
-
const allValue = getAllValue( values, selectedUnits, sides );
|
|
168
|
-
const isMixed = isNaN( parseFloat( allValue ) );
|
|
169
|
-
|
|
170
|
-
return isMixed;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
144
|
/**
|
|
174
145
|
* Checks to determine if values are defined.
|
|
175
146
|
*
|
|
@@ -239,6 +210,8 @@ export function normalizeSides( sides: BoxControlProps[ 'sides' ] ) {
|
|
|
239
210
|
* Applies a value to an object representing top, right, bottom and left sides
|
|
240
211
|
* while taking into account any custom side configuration.
|
|
241
212
|
*
|
|
213
|
+
* @deprecated
|
|
214
|
+
*
|
|
242
215
|
* @param currentValues The current values for each side.
|
|
243
216
|
* @param newValue The value to apply to the sides object.
|
|
244
217
|
* @param sides Array defining valid sides.
|
|
@@ -250,6 +223,10 @@ export function applyValueToSides(
|
|
|
250
223
|
newValue?: string,
|
|
251
224
|
sides?: BoxControlProps[ 'sides' ]
|
|
252
225
|
): BoxControlValue {
|
|
226
|
+
deprecated( 'applyValueToSides', {
|
|
227
|
+
since: '6.8',
|
|
228
|
+
version: '7.0',
|
|
229
|
+
} );
|
|
253
230
|
const newValues = { ...currentValues };
|
|
254
231
|
|
|
255
232
|
if ( sides?.length ) {
|
|
@@ -270,3 +247,88 @@ export function applyValueToSides(
|
|
|
270
247
|
|
|
271
248
|
return newValues;
|
|
272
249
|
}
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* Return the allowed sides based on the sides configuration.
|
|
253
|
+
*
|
|
254
|
+
* @param sides Sides configuration.
|
|
255
|
+
* @return Allowed sides.
|
|
256
|
+
*/
|
|
257
|
+
export function getAllowedSides(
|
|
258
|
+
sides: BoxControlInputControlProps[ 'sides' ]
|
|
259
|
+
) {
|
|
260
|
+
const allowedSides: Set< keyof BoxControlValue > = new Set(
|
|
261
|
+
! sides ? ALL_SIDES : []
|
|
262
|
+
);
|
|
263
|
+
sides?.forEach( ( allowedSide ) => {
|
|
264
|
+
if ( allowedSide === 'vertical' ) {
|
|
265
|
+
allowedSides.add( 'top' );
|
|
266
|
+
allowedSides.add( 'bottom' );
|
|
267
|
+
} else if ( allowedSide === 'horizontal' ) {
|
|
268
|
+
allowedSides.add( 'right' );
|
|
269
|
+
allowedSides.add( 'left' );
|
|
270
|
+
} else {
|
|
271
|
+
allowedSides.add( allowedSide );
|
|
272
|
+
}
|
|
273
|
+
} );
|
|
274
|
+
return allowedSides;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/**
|
|
278
|
+
* Checks if a value is a preset value.
|
|
279
|
+
*
|
|
280
|
+
* @param value The value to check.
|
|
281
|
+
* @param presetKey The preset key to check against.
|
|
282
|
+
* @return Whether the value is a preset value.
|
|
283
|
+
*/
|
|
284
|
+
export function isValuePreset( value: string, presetKey: string ) {
|
|
285
|
+
return value.startsWith( `var:preset|${ presetKey }|` );
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* Returns the index of the preset value in the presets array.
|
|
290
|
+
*
|
|
291
|
+
* @param value The value to check.
|
|
292
|
+
* @param presetKey The preset key to check against.
|
|
293
|
+
* @param presets The array of presets to search.
|
|
294
|
+
* @return The index of the preset value in the presets array.
|
|
295
|
+
*/
|
|
296
|
+
export function getPresetIndexFromValue(
|
|
297
|
+
value: string,
|
|
298
|
+
presetKey: string,
|
|
299
|
+
presets: Preset[]
|
|
300
|
+
) {
|
|
301
|
+
if ( ! isValuePreset( value, presetKey ) ) {
|
|
302
|
+
return undefined;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
const match = value.match(
|
|
306
|
+
new RegExp( `^var:preset\\|${ presetKey }\\|(.+)$` )
|
|
307
|
+
);
|
|
308
|
+
if ( ! match ) {
|
|
309
|
+
return undefined;
|
|
310
|
+
}
|
|
311
|
+
const slug = match[ 1 ];
|
|
312
|
+
const index = presets.findIndex( ( preset ) => {
|
|
313
|
+
return preset.slug === slug;
|
|
314
|
+
} );
|
|
315
|
+
|
|
316
|
+
return index !== -1 ? index : undefined;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* Returns the preset value from the index.
|
|
321
|
+
*
|
|
322
|
+
* @param index The index of the preset value in the presets array.
|
|
323
|
+
* @param presetKey The preset key to check against.
|
|
324
|
+
* @param presets The array of presets to search.
|
|
325
|
+
* @return The preset value from the index.
|
|
326
|
+
*/
|
|
327
|
+
export function getPresetValueFromIndex(
|
|
328
|
+
index: number,
|
|
329
|
+
presetKey: string,
|
|
330
|
+
presets: Preset[]
|
|
331
|
+
) {
|
|
332
|
+
const preset = presets[ index ];
|
|
333
|
+
return `var:preset|${ presetKey }|${ preset.slug }`;
|
|
334
|
+
}
|
package/src/button/README.md
CHANGED
|
@@ -1,304 +1,194 @@
|
|
|
1
1
|
# Button
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<!-- This file is generated automatically and cannot be edited directly. Make edits via TypeScript types and TSDocs. -->
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
<p class="callout callout-info">See the <a href="https://wordpress.github.io/gutenberg/?path=/docs/components-button--docs">WordPress Storybook</a> for more detailed, interactive documentation.</p>
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
### Usage
|
|
10
|
-
|
|
11
|
-
Buttons tell users what actions they can take and give them a way to interact with the interface. You’ll find them throughout a UI, particularly in places like:
|
|
12
|
-
|
|
13
|
-
- Modals
|
|
14
|
-
- Forms
|
|
15
|
-
- Toolbars
|
|
16
|
-
|
|
17
|
-
### Best practices
|
|
18
|
-
|
|
19
|
-
Buttons should:
|
|
20
|
-
|
|
21
|
-
- **Be clearly and accurately labeled.**
|
|
22
|
-
- **Clearly communicate that clicking or tapping will trigger an action.**
|
|
23
|
-
- **Use established colors appropriately.** For example, only use red buttons for actions that are difficult or impossible to undo.
|
|
24
|
-
- **Prioritize the most important actions.** This helps users focus. Too many calls to action on one screen can be confusing, making users unsure what to do next.
|
|
25
|
-
- **Have consistent locations in the interface.**
|
|
26
|
-
|
|
27
|
-
### Content guidelines
|
|
28
|
-
|
|
29
|
-
Buttons should be clear and predictable—users should be able to anticipate what will happen when they click a button. Never deceive a user by mislabeling a button.
|
|
30
|
-
|
|
31
|
-
Buttons text should lead with a strong verb that encourages action, and add a noun that clarifies what will actually change. The only exceptions are common actions like Save, Close, Cancel, or OK. Otherwise, use the {verb}+{noun} format to ensure that your button gives the user enough information.
|
|
32
|
-
|
|
33
|
-
Button text should also be quickly scannable — avoid unnecessary words and articles like the, an, or a.
|
|
34
|
-
|
|
35
|
-
### Types
|
|
36
|
-
|
|
37
|
-
#### Link button
|
|
38
|
-
|
|
39
|
-
Link buttons have low emphasis. They don’t stand out much on the page, so they’re used for less-important actions. What’s less important can vary based on context, but it’s usually a supplementary action to the main action we want someone to take. Link buttons are also useful when you don’t want to distract from the content.
|
|
40
|
-
|
|
41
|
-

|
|
42
|
-
|
|
43
|
-
#### Default button
|
|
44
|
-
|
|
45
|
-
Default buttons have medium emphasis. The button appearance helps differentiate them from the page background, so they’re useful when you want more emphasis than a link button offers.
|
|
46
|
-
|
|
47
|
-

|
|
48
|
-
|
|
49
|
-
#### Primary button
|
|
50
|
-
|
|
51
|
-
Primary buttons have high emphasis. Their color fill and shadow means they pop off the background.
|
|
52
|
-
|
|
53
|
-
Since a high-emphasis button commands the most attention, a layout should contain a single primary button. This makes it clear that other buttons have less importance and helps users understand when an action requires their attention.
|
|
54
|
-
|
|
55
|
-

|
|
56
|
-
|
|
57
|
-
#### Text label
|
|
58
|
-
|
|
59
|
-
All button types use text labels to describe the action that happens when a user taps a button. If there’s no text label, there needs to be a [label](#label) added and an icon to signify what the button does.
|
|
60
|
-
|
|
61
|
-

|
|
62
|
-
|
|
63
|
-
**Do**
|
|
64
|
-
Use color to distinguish link button labels from other text.
|
|
65
|
-
|
|
66
|
-

|
|
67
|
-
|
|
68
|
-
**Don’t**
|
|
69
|
-
Don’t wrap button text. For maximum legibility, keep text labels on a single line.
|
|
70
|
-
|
|
71
|
-
### Hierarchy
|
|
72
|
-
|
|
73
|
-

|
|
74
|
-
|
|
75
|
-
A layout should contain a single prominently-located button. If multiple buttons are required, a single high-emphasis button can be joined by medium- and low-emphasis buttons mapped to less-important actions. When using multiple buttons, make sure the available state of one button doesn’t look like the disabled state of another.
|
|
76
|
-
|
|
77
|
-

|
|
78
|
-
|
|
79
|
-
A button’s level of emphasis helps determine its appearance, typography, and placement.
|
|
80
|
-
|
|
81
|
-
#### Placement
|
|
82
|
-
|
|
83
|
-
Use button types to express different emphasis levels for all the actions a user can perform.
|
|
84
|
-
|
|
85
|
-

|
|
86
|
-
|
|
87
|
-
This screen layout uses:
|
|
88
|
-
|
|
89
|
-
1. A primary button for high emphasis.
|
|
90
|
-
2. A default button for medium emphasis.
|
|
91
|
-
3. A link button for low emphasis.
|
|
92
|
-
|
|
93
|
-
Placement best practices:
|
|
94
|
-
|
|
95
|
-
- **Do**: When using multiple buttons in a row, show users which action is more important by placing it next to a button with a lower emphasis (e.g. a primary button next to a default button, or a default button next to a link button).
|
|
96
|
-
- **Don’t**: Don’t place two primary buttons next to one another — they compete for focus. Only use one primary button per view.
|
|
97
|
-
- **Don’t**: Don’t place a button below another button if there is space to place them side by side.
|
|
98
|
-
- **Caution**: Avoid using too many buttons on a single page. When designing pages in the app or website, think about the most important actions for users to take. Too many calls to action can cause confusion and make users unsure what to do next — we always want users to feel confident and capable.
|
|
99
|
-
|
|
100
|
-
## Development guidelines
|
|
101
|
-
|
|
102
|
-
### Usage
|
|
103
|
-
|
|
104
|
-
Renders a button with default style.
|
|
7
|
+
Lets users take actions and make choices with a single click or tap.
|
|
105
8
|
|
|
106
9
|
```jsx
|
|
107
10
|
import { Button } from '@wordpress/components';
|
|
108
|
-
|
|
109
|
-
|
|
11
|
+
const Mybutton = () => (
|
|
12
|
+
<Button
|
|
13
|
+
variant="primary"
|
|
14
|
+
onClick={ handleClick }
|
|
15
|
+
>
|
|
16
|
+
Click here
|
|
17
|
+
</Button>
|
|
18
|
+
);
|
|
110
19
|
```
|
|
111
20
|
|
|
112
|
-
|
|
21
|
+
## Props
|
|
113
22
|
|
|
114
|
-
|
|
23
|
+
### `__next40pxDefaultSize`
|
|
115
24
|
|
|
116
|
-
|
|
25
|
+
- Type: `boolean`
|
|
26
|
+
- Required: No
|
|
27
|
+
- Default: `false`
|
|
117
28
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
Whether to keep the button focusable when disabled.
|
|
29
|
+
Start opting into the larger default height that will become the
|
|
30
|
+
default size in a future version.
|
|
121
31
|
|
|
122
|
-
|
|
32
|
+
### `accessibleWhenDisabled`
|
|
123
33
|
|
|
124
|
-
|
|
34
|
+
- Type: `boolean`
|
|
35
|
+
- Required: No
|
|
36
|
+
- Default: `false`
|
|
125
37
|
|
|
126
|
-
|
|
127
|
-
- Default: `false`
|
|
38
|
+
Whether to keep the button focusable when disabled.
|
|
128
39
|
|
|
129
|
-
|
|
40
|
+
In most cases, it is recommended to set this to `true`. Disabling a control without maintaining focusability
|
|
41
|
+
can cause accessibility issues, by hiding their presence from screen reader users,
|
|
42
|
+
or by preventing focus from returning to a trigger element.
|
|
130
43
|
|
|
131
|
-
|
|
44
|
+
Learn more about the [focusability of disabled controls](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#focusabilityofdisabledcontrols)
|
|
45
|
+
in the WAI-ARIA Authoring Practices Guide.
|
|
132
46
|
|
|
133
|
-
|
|
47
|
+
### `children`
|
|
134
48
|
|
|
135
|
-
|
|
49
|
+
- Type: `ReactNode`
|
|
50
|
+
- Required: No
|
|
136
51
|
|
|
137
|
-
|
|
52
|
+
The button's children.
|
|
138
53
|
|
|
139
|
-
|
|
54
|
+
### `description`
|
|
140
55
|
|
|
141
|
-
|
|
56
|
+
- Type: `string`
|
|
57
|
+
- Required: No
|
|
142
58
|
|
|
143
|
-
|
|
59
|
+
A visually hidden accessible description for the button.
|
|
144
60
|
|
|
145
|
-
|
|
61
|
+
### `disabled`
|
|
146
62
|
|
|
147
|
-
|
|
63
|
+
- Type: `boolean`
|
|
64
|
+
- Required: No
|
|
148
65
|
|
|
149
|
-
Whether the button is disabled. If `true`, this will force a `button` element
|
|
66
|
+
Whether the button is disabled. If `true`, this will force a `button` element
|
|
67
|
+
to be rendered, even when an `href` is given.
|
|
150
68
|
|
|
151
69
|
In most cases, it is recommended to also set the `accessibleWhenDisabled` prop to `true`.
|
|
152
70
|
|
|
153
|
-
|
|
71
|
+
### `href`
|
|
154
72
|
|
|
155
|
-
|
|
73
|
+
- Type: `string`
|
|
74
|
+
- Required: Yes
|
|
156
75
|
|
|
157
76
|
If provided, renders `a` instead of `button`.
|
|
158
77
|
|
|
159
|
-
|
|
78
|
+
### `icon`
|
|
160
79
|
|
|
161
|
-
|
|
80
|
+
- Type: `IconType`
|
|
81
|
+
- Required: No
|
|
162
82
|
|
|
163
|
-
If provided, renders an
|
|
83
|
+
If provided, renders an Icon component inside the button.
|
|
164
84
|
|
|
165
|
-
|
|
85
|
+
### `iconPosition`
|
|
166
86
|
|
|
167
|
-
|
|
87
|
+
- Type: `"left" | "right"`
|
|
88
|
+
- Required: No
|
|
89
|
+
- Default: `'left'`
|
|
168
90
|
|
|
169
|
-
If provided with `icon`, sets the position of icon relative to the `text`.
|
|
91
|
+
If provided with `icon`, sets the position of icon relative to the `text`.
|
|
170
92
|
|
|
171
|
-
|
|
172
|
-
- Default: `left`
|
|
93
|
+
### `iconSize`
|
|
173
94
|
|
|
174
|
-
|
|
95
|
+
- Type: `number`
|
|
96
|
+
- Required: No
|
|
175
97
|
|
|
176
|
-
If provided with `icon`, sets the icon size.
|
|
98
|
+
If provided with `icon`, sets the icon size.
|
|
99
|
+
Please refer to the Icon component for more details regarding
|
|
100
|
+
the default value of its `size` prop.
|
|
177
101
|
|
|
178
|
-
|
|
102
|
+
### `isBusy`
|
|
179
103
|
|
|
180
|
-
|
|
104
|
+
- Type: `boolean`
|
|
105
|
+
- Required: No
|
|
181
106
|
|
|
182
107
|
Indicates activity while a action is being performed.
|
|
183
108
|
|
|
184
|
-
|
|
109
|
+
### `isDestructive`
|
|
185
110
|
|
|
186
|
-
|
|
111
|
+
- Type: `boolean`
|
|
112
|
+
- Required: No
|
|
187
113
|
|
|
188
114
|
Renders a red text-based button style to indicate destructive behavior.
|
|
189
115
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
#### `isLink`: `boolean`
|
|
193
|
-
|
|
194
|
-
Deprecated: Renders a button with an anchor style.
|
|
195
|
-
Use `variant` prop with `link` value instead.
|
|
116
|
+
### `isPressed`
|
|
196
117
|
|
|
197
|
-
-
|
|
198
|
-
-
|
|
199
|
-
|
|
200
|
-
#### `isPressed`: `boolean`
|
|
118
|
+
- Type: `boolean`
|
|
119
|
+
- Required: No
|
|
201
120
|
|
|
202
121
|
Renders a pressed button style.
|
|
203
122
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
- Required: No
|
|
207
|
-
|
|
208
|
-
#### `isPrimary`: `boolean`
|
|
209
|
-
|
|
210
|
-
Deprecated: Renders a primary button style.
|
|
211
|
-
Use `variant` prop with `primary` value instead.
|
|
123
|
+
### `label`
|
|
212
124
|
|
|
213
|
-
-
|
|
214
|
-
-
|
|
125
|
+
- Type: `string`
|
|
126
|
+
- Required: No
|
|
215
127
|
|
|
216
|
-
|
|
128
|
+
Sets the `aria-label` of the component, if none is provided.
|
|
129
|
+
Sets the Tooltip content if `showTooltip` is provided.
|
|
217
130
|
|
|
218
|
-
|
|
219
|
-
Use `variant` prop with `secondary` value instead.
|
|
131
|
+
### `shortcut`
|
|
220
132
|
|
|
221
|
-
-
|
|
222
|
-
-
|
|
133
|
+
- Type: `string | { display: string; ariaLabel: string; }`
|
|
134
|
+
- Required: No
|
|
223
135
|
|
|
224
|
-
|
|
136
|
+
If provided with `showTooltip`, appends the Shortcut label to the tooltip content.
|
|
137
|
+
If an object is provided, it should contain `display` and `ariaLabel` keys.
|
|
225
138
|
|
|
226
|
-
|
|
139
|
+
### `showTooltip`
|
|
227
140
|
|
|
228
|
-
|
|
141
|
+
- Type: `boolean`
|
|
142
|
+
- Required: No
|
|
229
143
|
|
|
230
|
-
|
|
144
|
+
If provided, renders a Tooltip component for the button.
|
|
231
145
|
|
|
232
|
-
|
|
146
|
+
### `size`
|
|
233
147
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
- Required: No
|
|
238
|
-
- Default: `false`
|
|
239
|
-
|
|
240
|
-
#### `label`: `string`
|
|
241
|
-
|
|
242
|
-
Sets the `aria-label` of the component, if none is provided. Sets the Tooltip content if `showTooltip` is provided.
|
|
243
|
-
|
|
244
|
-
- Required: No
|
|
245
|
-
|
|
246
|
-
#### `shortcut`: `string | { display: string; ariaLabel: string; }`
|
|
247
|
-
|
|
248
|
-
If provided with `showTooltip`, appends the Shortcut label to the tooltip content. If an object is provided, it should contain `display` and `ariaLabel` keys.
|
|
249
|
-
|
|
250
|
-
- Required: No
|
|
251
|
-
|
|
252
|
-
#### `showTooltip`: `boolean`
|
|
253
|
-
|
|
254
|
-
If provided, renders a [Tooltip](/packages/components/src/tooltip/README.md) component for the button.
|
|
255
|
-
|
|
256
|
-
- Required: No
|
|
257
|
-
|
|
258
|
-
#### `size`: `'default'` | `'compact'` | `'small'`
|
|
148
|
+
- Type: `"small" | "default" | "compact"`
|
|
149
|
+
- Required: No
|
|
150
|
+
- Default: `'default'`
|
|
259
151
|
|
|
260
152
|
The size of the button.
|
|
261
153
|
|
|
262
|
-
-
|
|
263
|
-
-
|
|
264
|
-
-
|
|
154
|
+
- `'default'`: For normal text-label buttons, unless it is a toggle button.
|
|
155
|
+
- `'compact'`: For toggle buttons, icon buttons, and buttons when used in context of either.
|
|
156
|
+
- `'small'`: For icon buttons associated with more advanced or auxiliary features.
|
|
265
157
|
|
|
266
158
|
If the deprecated `isSmall` prop is also defined, this prop will take precedence.
|
|
267
159
|
|
|
268
|
-
|
|
269
|
-
- Default: `'default'`
|
|
270
|
-
|
|
271
|
-
#### `target`: `string`
|
|
272
|
-
|
|
273
|
-
If provided with `href`, sets the `target` attribute to the `a`.
|
|
274
|
-
|
|
275
|
-
- Required: No
|
|
160
|
+
### `text`
|
|
276
161
|
|
|
277
|
-
|
|
162
|
+
- Type: `string`
|
|
163
|
+
- Required: No
|
|
278
164
|
|
|
279
165
|
If provided, displays the given text inside the button. If the button contains children elements, the text is displayed before them.
|
|
280
166
|
|
|
281
|
-
|
|
167
|
+
### `tooltipPosition`
|
|
282
168
|
|
|
283
|
-
|
|
169
|
+
- Type: `"top" | "middle" | "bottom" | "top center" | "top left" | "top right" | "middle center" | "middle left" | "middle right" | "bottom center" | ...`
|
|
170
|
+
- Required: No
|
|
284
171
|
|
|
285
|
-
If provided with`showTooltip`, sets the position of the tooltip.
|
|
172
|
+
If provided with `showTooltip`, sets the position of the tooltip.
|
|
173
|
+
Please refer to the Tooltip component for more details regarding the defaults.
|
|
286
174
|
|
|
287
|
-
|
|
175
|
+
### `target`
|
|
288
176
|
|
|
289
|
-
|
|
177
|
+
- Type: `string`
|
|
178
|
+
- Required: No
|
|
290
179
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
- Required: No
|
|
180
|
+
If provided with `href`, sets the `target` attribute to the `a`.
|
|
294
181
|
|
|
295
|
-
|
|
182
|
+
### `variant`
|
|
296
183
|
|
|
297
|
-
|
|
184
|
+
- Type: `"link" | "primary" | "secondary" | "tertiary"`
|
|
185
|
+
- Required: No
|
|
298
186
|
|
|
299
|
-
|
|
300
|
-
- Default: `false`
|
|
187
|
+
Specifies the button's style.
|
|
301
188
|
|
|
302
|
-
|
|
189
|
+
The accepted values are:
|
|
303
190
|
|
|
304
|
-
|
|
191
|
+
1. `'primary'` (the primary button styles)
|
|
192
|
+
2. `'secondary'` (the default button styles)
|
|
193
|
+
3. `'tertiary'` (the text-based button styles)
|
|
194
|
+
4. `'link'` (the link button styles)
|