@wordpress/components 23.4.0 → 23.6.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 +54 -6
- package/build/animate/index.js +3 -1
- package/build/animate/index.js.map +1 -1
- package/build/animation/index.js.map +1 -1
- package/build/autocomplete/autocompleter-ui.js +46 -22
- package/build/autocomplete/autocompleter-ui.js.map +1 -1
- package/build/autocomplete/get-default-use-items.js.map +1 -1
- package/build/autocomplete/index.js +51 -119
- package/build/autocomplete/index.js.map +1 -1
- package/build/autocomplete/types.js +6 -0
- package/build/autocomplete/types.js.map +1 -0
- package/build/circular-option-picker/index.js +63 -14
- package/build/circular-option-picker/index.js.map +1 -1
- package/build/circular-option-picker/types.js +6 -0
- package/build/circular-option-picker/types.js.map +1 -0
- package/build/custom-gradient-picker/gradient-bar/control-points.js +2 -0
- package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
- package/build/custom-gradient-picker/gradient-bar/index.js +2 -0
- package/build/custom-gradient-picker/gradient-bar/index.js.map +1 -1
- package/build/custom-gradient-picker/gradient-bar/utils.js +2 -0
- package/build/custom-gradient-picker/gradient-bar/utils.js.map +1 -1
- package/build/custom-gradient-picker/index.js +2 -0
- package/build/custom-gradient-picker/index.js.map +1 -1
- package/build/custom-gradient-picker/serializer.js +1 -0
- package/build/custom-gradient-picker/serializer.js.map +1 -1
- package/build/custom-gradient-picker/utils.js +2 -0
- package/build/custom-gradient-picker/utils.js.map +1 -1
- package/build/dimension-control/index.js +31 -5
- package/build/dimension-control/index.js.map +1 -1
- package/build/dimension-control/sizes.js +2 -4
- package/build/dimension-control/sizes.js.map +1 -1
- package/build/dimension-control/types.js +6 -0
- package/build/dimension-control/types.js.map +1 -0
- package/build/dropdown-menu/index.js +6 -2
- package/build/dropdown-menu/index.js.map +1 -1
- package/build/flex/flex/hook.js +3 -3
- package/build/flex/flex/hook.js.map +1 -1
- package/build/font-size-picker/index.js +2 -1
- package/build/font-size-picker/index.js.map +1 -1
- package/build/form-token-field/index.js +1 -1
- package/build/form-token-field/index.js.map +1 -1
- package/build/gradient-picker/index.js +2 -0
- package/build/gradient-picker/index.js.map +1 -1
- package/build/guide/icons.js.map +1 -1
- package/build/guide/index.js +46 -8
- package/build/guide/index.js.map +1 -1
- package/build/guide/page-control.js.map +1 -1
- package/build/guide/page.js.map +1 -1
- package/build/guide/types.js +6 -0
- package/build/guide/types.js.map +1 -0
- package/build/h-stack/utils.js +5 -5
- package/build/h-stack/utils.js.map +1 -1
- package/build/higher-order/navigate-regions/index.js +33 -3
- package/build/higher-order/navigate-regions/index.js.map +1 -1
- package/build/higher-order/with-constrained-tabbing/index.js +9 -0
- package/build/higher-order/with-constrained-tabbing/index.js.map +1 -1
- package/build/higher-order/with-fallback-styles/index.js +2 -2
- package/build/higher-order/with-fallback-styles/index.js.map +1 -1
- package/build/higher-order/with-filters/index.js +31 -7
- package/build/higher-order/with-filters/index.js.map +1 -1
- package/build/higher-order/with-focus-return/index.js +10 -10
- package/build/higher-order/with-focus-return/index.js.map +1 -1
- package/build/higher-order/with-notices/index.js +28 -25
- package/build/higher-order/with-notices/index.js.map +1 -1
- package/build/higher-order/with-notices/types.js +6 -0
- package/build/higher-order/with-notices/types.js.map +1 -0
- package/build/higher-order/with-spoken-messages/index.js.map +1 -1
- package/build/icon/index.js +1 -8
- package/build/icon/index.js.map +1 -1
- package/build/index.native.js +18 -9
- package/build/index.native.js.map +1 -1
- package/build/mobile/bottom-sheet/cell.native.js +1 -1
- package/build/mobile/bottom-sheet/cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet-text-control/index.native.js +4 -3
- package/build/mobile/bottom-sheet-text-control/index.native.js.map +1 -1
- package/build/mobile/global-styles-context/utils.native.js +2 -1
- package/build/mobile/global-styles-context/utils.native.js.map +1 -1
- package/build/navigation/back-button/index.js +6 -5
- package/build/navigation/back-button/index.js.map +1 -1
- package/build/navigation/constants.js.map +1 -1
- package/build/navigation/context.js +7 -4
- package/build/navigation/context.js.map +1 -1
- package/build/navigation/group/context.js.map +1 -1
- package/build/navigation/group/index.js +5 -1
- package/build/navigation/group/index.js.map +1 -1
- package/build/navigation/index.js +49 -3
- package/build/navigation/index.js.map +1 -1
- package/build/navigation/item/base-content.js +0 -1
- package/build/navigation/item/base-content.js.map +1 -1
- package/build/navigation/item/base.js.map +1 -1
- package/build/navigation/item/index.js +5 -1
- package/build/navigation/item/index.js.map +1 -1
- package/build/navigation/item/use-navigation-tree-item.js +1 -1
- package/build/navigation/item/use-navigation-tree-item.js.map +1 -1
- package/build/navigation/menu/context.js.map +1 -1
- package/build/navigation/menu/index.js +5 -1
- package/build/navigation/menu/index.js.map +1 -1
- package/build/navigation/menu/menu-title-search.js +8 -6
- package/build/navigation/menu/menu-title-search.js.map +1 -1
- package/build/navigation/menu/menu-title.js +4 -2
- package/build/navigation/menu/menu-title.js.map +1 -1
- package/build/navigation/menu/search-no-results-found.js.map +1 -1
- package/build/navigation/menu/use-navigation-tree-menu.js.map +1 -1
- package/build/navigation/styles/navigation-styles.js +36 -36
- package/build/navigation/styles/navigation-styles.js.map +1 -1
- package/build/navigation/types.js +6 -0
- package/build/navigation/types.js.map +1 -0
- package/build/navigation/use-create-navigation-tree.js +7 -0
- package/build/navigation/use-create-navigation-tree.js.map +1 -1
- package/build/navigation/use-navigation-tree-nodes.js +3 -5
- package/build/navigation/use-navigation-tree-nodes.js.map +1 -1
- package/build/navigation/utils.js.map +1 -1
- package/build/navigator/navigator-screen/component.js +5 -3
- package/build/navigator/navigator-screen/component.js.map +1 -1
- package/build/number-control/index.js +1 -3
- package/build/number-control/index.js.map +1 -1
- package/build/palette-edit/index.js +67 -27
- package/build/palette-edit/index.js.map +1 -1
- package/build/palette-edit/types.js +6 -0
- package/build/palette-edit/types.js.map +1 -0
- package/build/panel/body.js +15 -17
- package/build/panel/body.js.map +1 -1
- package/build/placeholder/index.js.map +1 -1
- package/build/query-controls/author-select.js +0 -4
- package/build/query-controls/author-select.js.map +1 -1
- package/build/query-controls/category-select.js +0 -4
- package/build/query-controls/category-select.js.map +1 -1
- package/build/query-controls/terms.js +30 -15
- package/build/query-controls/terms.js.map +1 -1
- package/build/range-control/index.js +1 -0
- package/build/range-control/index.js.map +1 -1
- package/build/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js +4 -4
- package/build/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js.map +1 -1
- package/build/responsive-wrapper/index.js +12 -13
- package/build/responsive-wrapper/index.js.map +1 -1
- package/build/select-control/index.js +19 -16
- package/build/select-control/index.js.map +1 -1
- package/build/toolbar/toolbar-button/index.js +32 -10
- package/build/toolbar/toolbar-button/index.js.map +1 -1
- package/build/toolbar/toolbar-button/toolbar-button-container.js +12 -4
- package/build/toolbar/toolbar-button/toolbar-button-container.js.map +1 -1
- package/build/toolbar/toolbar-button/types.js +6 -0
- package/build/toolbar/toolbar-button/types.js.map +1 -0
- package/build/toolbar/toolbar-context/index.js +4 -2
- package/build/toolbar/toolbar-context/index.js.map +1 -1
- package/build/tools-panel/context.js +2 -0
- package/build/tools-panel/context.js.map +1 -1
- package/build/tools-panel/tools-panel/hook.js +18 -12
- package/build/tools-panel/tools-panel/hook.js.map +1 -1
- package/build/tools-panel/tools-panel-item/hook.js +14 -2
- package/build/tools-panel/tools-panel-item/hook.js.map +1 -1
- package/build/tooltip/index.js +18 -6
- package/build/tooltip/index.js.map +1 -1
- package/build/tree-select/index.js.map +1 -1
- package/build/ui/context/context-system-provider.js +8 -4
- package/build/ui/context/context-system-provider.js.map +1 -1
- package/build/ui/context/get-styled-class-name-from-key.js +2 -2
- package/build/ui/context/get-styled-class-name-from-key.js.map +1 -1
- package/build/utils/font.js +3 -7
- package/build/utils/font.js.map +1 -1
- package/build/v-stack/hook.js +2 -0
- package/build/v-stack/hook.js.map +1 -1
- package/build-module/animate/index.js +3 -1
- package/build-module/animate/index.js.map +1 -1
- package/build-module/animation/index.js.map +1 -1
- package/build-module/autocomplete/autocompleter-ui.js +45 -24
- package/build-module/autocomplete/autocompleter-ui.js.map +1 -1
- package/build-module/autocomplete/get-default-use-items.js.map +1 -1
- package/build-module/autocomplete/index.js +54 -122
- package/build-module/autocomplete/index.js.map +1 -1
- package/build-module/autocomplete/types.js +2 -0
- package/build-module/autocomplete/types.js.map +1 -0
- package/build-module/circular-option-picker/index.js +59 -16
- package/build-module/circular-option-picker/index.js.map +1 -1
- package/build-module/circular-option-picker/types.js +2 -0
- package/build-module/circular-option-picker/types.js.map +1 -0
- 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 +2 -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 +2 -0
- package/build-module/custom-gradient-picker/utils.js.map +1 -1
- package/build-module/dimension-control/index.js +28 -3
- package/build-module/dimension-control/index.js.map +1 -1
- package/build-module/dimension-control/sizes.js +6 -5
- package/build-module/dimension-control/sizes.js.map +1 -1
- package/build-module/dimension-control/types.js +2 -0
- package/build-module/dimension-control/types.js.map +1 -0
- package/build-module/dropdown-menu/index.js +6 -2
- package/build-module/dropdown-menu/index.js.map +1 -1
- package/build-module/flex/flex/hook.js +3 -3
- package/build-module/flex/flex/hook.js.map +1 -1
- package/build-module/font-size-picker/index.js +2 -1
- package/build-module/font-size-picker/index.js.map +1 -1
- package/build-module/form-token-field/index.js +1 -1
- package/build-module/form-token-field/index.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/icons.js.map +1 -1
- package/build-module/guide/index.js +45 -8
- package/build-module/guide/index.js.map +1 -1
- package/build-module/guide/page-control.js.map +1 -1
- package/build-module/guide/page.js +4 -0
- package/build-module/guide/page.js.map +1 -1
- package/build-module/guide/types.js +2 -0
- package/build-module/guide/types.js.map +1 -0
- package/build-module/h-stack/utils.js +5 -5
- package/build-module/h-stack/utils.js.map +1 -1
- package/build-module/higher-order/navigate-regions/index.js +33 -3
- package/build-module/higher-order/navigate-regions/index.js.map +1 -1
- package/build-module/higher-order/with-constrained-tabbing/index.js +9 -0
- package/build-module/higher-order/with-constrained-tabbing/index.js.map +1 -1
- package/build-module/higher-order/with-fallback-styles/index.js +2 -2
- package/build-module/higher-order/with-fallback-styles/index.js.map +1 -1
- package/build-module/higher-order/with-filters/index.js +31 -7
- package/build-module/higher-order/with-filters/index.js.map +1 -1
- package/build-module/higher-order/with-focus-return/index.js +10 -10
- package/build-module/higher-order/with-focus-return/index.js.map +1 -1
- package/build-module/higher-order/with-notices/index.js +29 -26
- package/build-module/higher-order/with-notices/index.js.map +1 -1
- package/build-module/higher-order/with-notices/types.js +2 -0
- package/build-module/higher-order/with-notices/types.js.map +1 -0
- package/build-module/higher-order/with-spoken-messages/index.js.map +1 -1
- package/build-module/icon/index.js +2 -9
- package/build-module/icon/index.js.map +1 -1
- package/build-module/index.native.js +1 -0
- package/build-module/index.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/cell.native.js +1 -1
- package/build-module/mobile/bottom-sheet/cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet-text-control/index.native.js +4 -3
- package/build-module/mobile/bottom-sheet-text-control/index.native.js.map +1 -1
- package/build-module/mobile/global-styles-context/utils.native.js +2 -1
- package/build-module/mobile/global-styles-context/utils.native.js.map +1 -1
- package/build-module/navigation/back-button/index.js +4 -3
- package/build-module/navigation/back-button/index.js.map +1 -1
- package/build-module/navigation/constants.js.map +1 -1
- package/build-module/navigation/context.js +7 -4
- package/build-module/navigation/context.js.map +1 -1
- package/build-module/navigation/group/context.js +4 -0
- package/build-module/navigation/group/context.js.map +1 -1
- package/build-module/navigation/group/index.js +2 -1
- package/build-module/navigation/group/index.js.map +1 -1
- package/build-module/navigation/index.js +46 -3
- package/build-module/navigation/index.js.map +1 -1
- package/build-module/navigation/item/base-content.js +0 -1
- package/build-module/navigation/item/base-content.js.map +1 -1
- package/build-module/navigation/item/base.js.map +1 -1
- package/build-module/navigation/item/index.js +2 -1
- package/build-module/navigation/item/index.js.map +1 -1
- package/build-module/navigation/item/use-navigation-tree-item.js +1 -1
- package/build-module/navigation/item/use-navigation-tree-item.js.map +1 -1
- package/build-module/navigation/menu/context.js +4 -0
- package/build-module/navigation/menu/context.js.map +1 -1
- package/build-module/navigation/menu/index.js +2 -1
- package/build-module/navigation/menu/index.js.map +1 -1
- package/build-module/navigation/menu/menu-title-search.js +8 -6
- package/build-module/navigation/menu/menu-title-search.js.map +1 -1
- package/build-module/navigation/menu/menu-title.js +4 -2
- package/build-module/navigation/menu/menu-title.js.map +1 -1
- package/build-module/navigation/menu/search-no-results-found.js.map +1 -1
- package/build-module/navigation/menu/use-navigation-tree-menu.js.map +1 -1
- package/build-module/navigation/styles/navigation-styles.js +36 -36
- package/build-module/navigation/styles/navigation-styles.js.map +1 -1
- package/build-module/navigation/types.js +2 -0
- package/build-module/navigation/types.js.map +1 -0
- package/build-module/navigation/use-create-navigation-tree.js +7 -0
- package/build-module/navigation/use-create-navigation-tree.js.map +1 -1
- package/build-module/navigation/use-navigation-tree-nodes.js +2 -2
- package/build-module/navigation/use-navigation-tree-nodes.js.map +1 -1
- package/build-module/navigation/utils.js.map +1 -1
- package/build-module/navigator/navigator-screen/component.js +5 -3
- package/build-module/navigator/navigator-screen/component.js.map +1 -1
- package/build-module/number-control/index.js +1 -3
- package/build-module/number-control/index.js.map +1 -1
- package/build-module/palette-edit/index.js +65 -27
- package/build-module/palette-edit/index.js.map +1 -1
- package/build-module/palette-edit/types.js +2 -0
- package/build-module/palette-edit/types.js.map +1 -0
- package/build-module/panel/body.js +12 -12
- package/build-module/panel/body.js.map +1 -1
- package/build-module/placeholder/index.js.map +1 -1
- package/build-module/query-controls/author-select.js +0 -4
- package/build-module/query-controls/author-select.js.map +1 -1
- package/build-module/query-controls/category-select.js +1 -5
- package/build-module/query-controls/category-select.js.map +1 -1
- package/build-module/query-controls/terms.js +29 -16
- package/build-module/query-controls/terms.js.map +1 -1
- package/build-module/range-control/index.js +1 -0
- package/build-module/range-control/index.js.map +1 -1
- package/build-module/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js +5 -5
- package/build-module/resizable-box/resize-tooltip/styles/resize-tooltip.styles.js.map +1 -1
- package/build-module/responsive-wrapper/index.js +12 -12
- package/build-module/responsive-wrapper/index.js.map +1 -1
- package/build-module/select-control/index.js +20 -17
- package/build-module/select-control/index.js.map +1 -1
- package/build-module/toolbar/toolbar-button/index.js +32 -9
- package/build-module/toolbar/toolbar-button/index.js.map +1 -1
- package/build-module/toolbar/toolbar-button/toolbar-button-container.js +12 -4
- package/build-module/toolbar/toolbar-button/toolbar-button-container.js.map +1 -1
- package/build-module/toolbar/toolbar-button/types.js +2 -0
- package/build-module/toolbar/toolbar-button/types.js.map +1 -0
- package/build-module/toolbar/toolbar-context/index.js +4 -2
- package/build-module/toolbar/toolbar-context/index.js.map +1 -1
- package/build-module/tools-panel/context.js +2 -0
- package/build-module/tools-panel/context.js.map +1 -1
- package/build-module/tools-panel/tools-panel/hook.js +18 -12
- package/build-module/tools-panel/tools-panel/hook.js.map +1 -1
- package/build-module/tools-panel/tools-panel-item/hook.js +14 -2
- package/build-module/tools-panel/tools-panel-item/hook.js.map +1 -1
- package/build-module/tooltip/index.js +16 -6
- package/build-module/tooltip/index.js.map +1 -1
- package/build-module/tree-select/index.js.map +1 -1
- package/build-module/ui/context/context-system-provider.js +7 -4
- package/build-module/ui/context/context-system-provider.js.map +1 -1
- package/build-module/ui/context/get-styled-class-name-from-key.js +1 -1
- package/build-module/ui/context/get-styled-class-name-from-key.js.map +1 -1
- package/build-module/utils/font.js +3 -6
- package/build-module/utils/font.js.map +1 -1
- package/build-module/v-stack/hook.js +2 -0
- package/build-module/v-stack/hook.js.map +1 -1
- package/build-style/style-rtl.css +15 -11
- package/build-style/style.css +15 -11
- package/build-types/alignment-matrix-control/types.d.ts +4 -4
- package/build-types/alignment-matrix-control/types.d.ts.map +1 -1
- package/build-types/angle-picker-control/types.d.ts +2 -2
- package/build-types/angle-picker-control/types.d.ts.map +1 -1
- package/build-types/animate/index.d.ts +2 -2
- package/build-types/animate/index.d.ts.map +1 -1
- package/build-types/animation/index.d.ts +8 -1
- package/build-types/animation/index.d.ts.map +1 -1
- package/build-types/autocomplete/autocompleter-ui.d.ts +4 -0
- package/build-types/autocomplete/autocompleter-ui.d.ts.map +1 -0
- package/build-types/autocomplete/get-default-use-items.d.ts +3 -0
- package/build-types/autocomplete/get-default-use-items.d.ts.map +1 -0
- package/build-types/autocomplete/index.d.ts +23 -0
- package/build-types/autocomplete/index.d.ts.map +1 -0
- package/build-types/autocomplete/test/index.d.ts +2 -0
- package/build-types/autocomplete/test/index.d.ts.map +1 -0
- package/build-types/autocomplete/types.d.ts +201 -0
- package/build-types/autocomplete/types.d.ts.map +1 -0
- package/build-types/base-control/types.d.ts +2 -2
- package/build-types/base-control/types.d.ts.map +1 -1
- package/build-types/border-box-control/border-box-control/hook.d.ts +1 -1
- package/build-types/border-box-control/border-box-control/hook.d.ts.map +1 -1
- package/build-types/border-box-control/styles.d.ts +3 -3
- package/build-types/border-box-control/styles.d.ts.map +1 -1
- package/build-types/border-box-control/types.d.ts +8 -8
- package/build-types/border-box-control/types.d.ts.map +1 -1
- package/build-types/border-box-control/utils.d.ts +5 -5
- package/build-types/border-box-control/utils.d.ts.map +1 -1
- package/build-types/border-control/border-control/hook.d.ts +3 -3
- package/build-types/border-control/border-control/hook.d.ts.map +1 -1
- package/build-types/border-control/border-control-dropdown/hook.d.ts +2 -2
- package/build-types/border-control/border-control-dropdown/hook.d.ts.map +1 -1
- package/build-types/border-control/styles.d.ts +4 -4
- package/build-types/border-control/styles.d.ts.map +1 -1
- package/build-types/border-control/types.d.ts +6 -6
- package/build-types/border-control/types.d.ts.map +1 -1
- package/build-types/box-control/types.d.ts +6 -6
- package/build-types/box-control/types.d.ts.map +1 -1
- package/build-types/button/deprecated.d.ts +6 -6
- package/build-types/button/types.d.ts +10 -10
- package/build-types/button/types.d.ts.map +1 -1
- package/build-types/button-group/types.d.ts +1 -1
- package/build-types/button-group/types.d.ts.map +1 -1
- package/build-types/card/card/hook.d.ts +1 -1
- package/build-types/card/card/hook.d.ts.map +1 -1
- package/build-types/card/types.d.ts +10 -10
- package/build-types/card/types.d.ts.map +1 -1
- package/build-types/checkbox-control/types.d.ts +1 -1
- package/build-types/checkbox-control/types.d.ts.map +1 -1
- package/build-types/circular-option-picker/index.d.ts +56 -7
- package/build-types/circular-option-picker/index.d.ts.map +1 -1
- package/build-types/circular-option-picker/stories/index.d.ts +14 -0
- package/build-types/circular-option-picker/stories/index.d.ts.map +1 -0
- package/build-types/circular-option-picker/types.d.ts +49 -0
- package/build-types/circular-option-picker/types.d.ts.map +1 -0
- package/build-types/color-indicator/types.d.ts +1 -1
- package/build-types/color-indicator/types.d.ts.map +1 -1
- package/build-types/color-list-picker/types.d.ts +2 -2
- package/build-types/color-list-picker/types.d.ts.map +1 -1
- package/build-types/color-palette/types.d.ts +7 -7
- package/build-types/color-palette/types.d.ts.map +1 -1
- package/build-types/color-palette/utils.d.ts +1 -1
- package/build-types/color-palette/utils.d.ts.map +1 -1
- package/build-types/color-picker/legacy-adapter.d.ts +1 -1
- package/build-types/color-picker/legacy-adapter.d.ts.map +1 -1
- package/build-types/color-picker/styles.d.ts +3 -3
- package/build-types/color-picker/types.d.ts +2 -2
- package/build-types/color-picker/types.d.ts.map +1 -1
- package/build-types/color-picker/use-deprecated-props.d.ts +2 -2
- package/build-types/color-picker/use-deprecated-props.d.ts.map +1 -1
- package/build-types/combobox-control/types.d.ts +2 -2
- package/build-types/combobox-control/types.d.ts.map +1 -1
- package/build-types/confirm-dialog/component.d.ts +4 -4
- package/build-types/confirm-dialog/types.d.ts +5 -5
- package/build-types/confirm-dialog/types.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/constants.d.ts +25 -0
- package/build-types/custom-gradient-picker/constants.d.ts.map +1 -0
- package/build-types/custom-gradient-picker/gradient-bar/constants.d.ts +8 -0
- package/build-types/custom-gradient-picker/gradient-bar/constants.d.ts.map +1 -0
- package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts +25 -0
- package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts.map +1 -0
- package/build-types/custom-gradient-picker/gradient-bar/index.d.ts +10 -0
- package/build-types/custom-gradient-picker/gradient-bar/index.d.ts.map +1 -0
- package/build-types/custom-gradient-picker/gradient-bar/utils.d.ts +138 -0
- package/build-types/custom-gradient-picker/gradient-bar/utils.d.ts.map +1 -0
- package/build-types/custom-gradient-picker/index.d.ts +7 -0
- package/build-types/custom-gradient-picker/index.d.ts.map +1 -0
- package/build-types/custom-gradient-picker/serializer.d.ts +17 -0
- package/build-types/custom-gradient-picker/serializer.d.ts.map +1 -0
- package/build-types/custom-gradient-picker/styles/custom-gradient-picker-styles.d.ts +11 -0
- package/build-types/custom-gradient-picker/styles/custom-gradient-picker-styles.d.ts.map +1 -0
- package/build-types/custom-gradient-picker/utils.d.ts +5 -0
- package/build-types/custom-gradient-picker/utils.d.ts.map +1 -0
- package/build-types/custom-select-control/styles.d.ts +1 -1
- package/build-types/custom-select-control/styles.d.ts.map +1 -1
- package/build-types/dashicon/types.d.ts +2 -2
- package/build-types/dashicon/types.d.ts.map +1 -1
- package/build-types/date-time/date-time/styles.d.ts +1 -4
- package/build-types/date-time/date-time/styles.d.ts.map +1 -1
- package/build-types/date-time/time/styles.d.ts +1 -1
- package/build-types/date-time/types.d.ts +4 -4
- package/build-types/date-time/types.d.ts.map +1 -1
- package/build-types/dimension-control/index.d.ts +28 -0
- package/build-types/dimension-control/index.d.ts.map +1 -0
- package/build-types/dimension-control/sizes.d.ts +26 -0
- package/build-types/dimension-control/sizes.d.ts.map +1 -0
- package/build-types/dimension-control/stories/index.d.ts +12 -0
- package/build-types/dimension-control/stories/index.d.ts.map +1 -0
- package/build-types/dimension-control/types.d.ts +47 -0
- package/build-types/dimension-control/types.d.ts.map +1 -0
- package/build-types/divider/types.d.ts +1 -1
- package/build-types/divider/types.d.ts.map +1 -1
- package/build-types/draggable/types.d.ts +1 -1
- package/build-types/draggable/types.d.ts.map +1 -1
- package/build-types/drop-zone/types.d.ts +2 -2
- package/build-types/drop-zone/types.d.ts.map +1 -1
- package/build-types/dropdown/types.d.ts +3 -3
- package/build-types/dropdown/types.d.ts.map +1 -1
- package/build-types/dropdown-menu/index.d.ts.map +1 -1
- package/build-types/elevation/types.d.ts +1 -1
- package/build-types/elevation/types.d.ts.map +1 -1
- package/build-types/external-link/styles/external-link-styles.d.ts +1 -1
- package/build-types/external-link/types.d.ts +1 -1
- package/build-types/external-link/types.d.ts.map +1 -1
- package/build-types/flex/types.d.ts +4 -4
- package/build-types/flex/types.d.ts.map +1 -1
- package/build-types/focal-point-picker/types.d.ts +7 -7
- package/build-types/focal-point-picker/types.d.ts.map +1 -1
- package/build-types/font-size-picker/index.d.ts.map +1 -1
- package/build-types/font-size-picker/stories/index.d.ts.map +1 -1
- package/build-types/font-size-picker/types.d.ts +9 -5
- package/build-types/font-size-picker/types.d.ts.map +1 -1
- package/build-types/form-file-upload/types.d.ts +1 -1
- package/build-types/form-file-upload/types.d.ts.map +1 -1
- package/build-types/form-toggle/types.d.ts +1 -1
- package/build-types/form-toggle/types.d.ts.map +1 -1
- package/build-types/form-token-field/index.d.ts.map +1 -1
- package/build-types/form-token-field/stories/index.d.ts +6 -0
- package/build-types/form-token-field/stories/index.d.ts.map +1 -1
- package/build-types/form-token-field/styles.d.ts +1 -1
- package/build-types/form-token-field/styles.d.ts.map +1 -1
- package/build-types/form-token-field/types.d.ts +1 -1
- package/build-types/form-token-field/types.d.ts.map +1 -1
- package/build-types/gradient-picker/index.d.ts +12 -0
- package/build-types/gradient-picker/index.d.ts.map +1 -0
- package/build-types/grid/types.d.ts +2 -2
- package/build-types/grid/types.d.ts.map +1 -1
- package/build-types/guide/icons.d.ts +5 -0
- package/build-types/guide/icons.d.ts.map +1 -0
- package/build-types/guide/index.d.ts +37 -0
- package/build-types/guide/index.d.ts.map +1 -0
- package/build-types/guide/page-control.d.ts +4 -0
- package/build-types/guide/page-control.d.ts.map +1 -0
- package/build-types/guide/page.d.ts +7 -0
- package/build-types/guide/page.d.ts.map +1 -0
- package/build-types/guide/stories/index.d.ts +9 -0
- package/build-types/guide/stories/index.d.ts.map +1 -0
- package/build-types/guide/test/index.d.ts +2 -0
- package/build-types/guide/test/index.d.ts.map +1 -0
- package/build-types/guide/types.d.ts +65 -0
- package/build-types/guide/types.d.ts.map +1 -0
- package/build-types/h-stack/stories/e2e/index.d.ts +9 -0
- package/build-types/h-stack/stories/e2e/index.d.ts.map +1 -0
- package/build-types/h-stack/types.d.ts +6 -6
- package/build-types/h-stack/types.d.ts.map +1 -1
- package/build-types/heading/hook.d.ts +1 -1
- package/build-types/heading/types.d.ts +2 -2
- package/build-types/heading/types.d.ts.map +1 -1
- package/build-types/higher-order/navigate-regions/index.d.ts +46 -0
- package/build-types/higher-order/navigate-regions/index.d.ts.map +1 -0
- package/build-types/higher-order/with-constrained-tabbing/index.d.ts +10 -1
- package/build-types/higher-order/with-constrained-tabbing/index.d.ts.map +1 -1
- package/build-types/higher-order/with-fallback-styles/index.d.ts +44 -0
- package/build-types/higher-order/with-fallback-styles/index.d.ts.map +1 -0
- package/build-types/higher-order/with-filters/index.d.ts +89 -0
- package/build-types/higher-order/with-filters/index.d.ts.map +1 -0
- package/build-types/higher-order/with-filters/test/index.d.ts +2 -0
- package/build-types/higher-order/with-filters/test/index.d.ts.map +1 -0
- package/build-types/higher-order/with-focus-outside/index.d.ts +1 -1
- package/build-types/higher-order/with-focus-return/index.d.ts +20 -0
- package/build-types/higher-order/with-focus-return/index.d.ts.map +1 -0
- package/build-types/higher-order/with-focus-return/test/index.d.ts +2 -0
- package/build-types/higher-order/with-focus-return/test/index.d.ts.map +1 -0
- package/build-types/higher-order/with-notices/index.d.ts +37 -0
- package/build-types/higher-order/with-notices/index.d.ts.map +1 -0
- package/build-types/higher-order/with-notices/test/index.d.ts +2 -0
- package/build-types/higher-order/with-notices/test/index.d.ts.map +1 -0
- package/build-types/higher-order/with-notices/types.d.ts +34 -0
- package/build-types/higher-order/with-notices/types.d.ts.map +1 -0
- package/build-types/higher-order/with-spoken-messages/index.d.ts +13 -2
- package/build-types/higher-order/with-spoken-messages/index.d.ts.map +1 -1
- package/build-types/higher-order/with-spoken-messages/test/index.d.ts +2 -0
- package/build-types/higher-order/with-spoken-messages/test/index.d.ts.map +1 -0
- package/build-types/icon/index.d.ts +10 -6
- package/build-types/icon/index.d.ts.map +1 -1
- package/build-types/icon/test/index.d.ts +2 -0
- package/build-types/icon/test/index.d.ts.map +1 -0
- package/build-types/input-control/reducer/actions.d.ts +15 -15
- package/build-types/input-control/reducer/actions.d.ts.map +1 -1
- package/build-types/input-control/reducer/state.d.ts +1 -1
- package/build-types/input-control/reducer/state.d.ts.map +1 -1
- package/build-types/input-control/styles/input-control-styles.d.ts +4 -4
- package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
- package/build-types/input-control/types.d.ts +7 -7
- package/build-types/input-control/types.d.ts.map +1 -1
- package/build-types/item-group/item/hook.d.ts +1 -1
- package/build-types/item-group/types.d.ts +2 -2
- package/build-types/item-group/types.d.ts.map +1 -1
- package/build-types/keyboard-shortcuts/types.d.ts +3 -3
- package/build-types/keyboard-shortcuts/types.d.ts.map +1 -1
- package/build-types/menu-group/types.d.ts +1 -1
- package/build-types/menu-group/types.d.ts.map +1 -1
- package/build-types/menu-item/index.d.ts +1 -1
- package/build-types/menu-items-choice/types.d.ts +2 -2
- package/build-types/menu-items-choice/types.d.ts.map +1 -1
- package/build-types/modal/types.d.ts +1 -1
- package/build-types/modal/types.d.ts.map +1 -1
- package/build-types/navigable-container/container.d.ts +1 -1
- package/build-types/navigable-container/menu.d.ts +1 -1
- package/build-types/navigable-container/tabbable.d.ts +1 -1
- package/build-types/navigation/back-button/index.d.ts +5 -0
- package/build-types/navigation/back-button/index.d.ts.map +1 -0
- package/build-types/navigation/constants.d.ts +3 -0
- package/build-types/navigation/constants.d.ts.map +1 -0
- package/build-types/navigation/context.d.ts +5 -0
- package/build-types/navigation/context.d.ts.map +1 -0
- package/build-types/navigation/group/context.d.ts +8 -0
- package/build-types/navigation/group/context.d.ts.map +1 -0
- package/build-types/navigation/group/index.d.ts +5 -0
- package/build-types/navigation/group/index.d.ts.map +1 -0
- package/build-types/navigation/index.d.ts +46 -0
- package/build-types/navigation/index.d.ts.map +1 -0
- package/build-types/navigation/item/base-content.d.ts +4 -0
- package/build-types/navigation/item/base-content.d.ts.map +1 -0
- package/build-types/navigation/item/base.d.ts +4 -0
- package/build-types/navigation/item/base.d.ts.map +1 -0
- package/build-types/navigation/item/index.d.ts +5 -0
- package/build-types/navigation/item/index.d.ts.map +1 -0
- package/build-types/navigation/item/use-navigation-tree-item.d.ts +3 -0
- package/build-types/navigation/item/use-navigation-tree-item.d.ts.map +1 -0
- package/build-types/navigation/menu/context.d.ts +8 -0
- package/build-types/navigation/menu/context.d.ts.map +1 -0
- package/build-types/navigation/menu/index.d.ts +5 -0
- package/build-types/navigation/menu/index.d.ts.map +1 -0
- package/build-types/navigation/menu/menu-title-search.d.ts +4 -0
- package/build-types/navigation/menu/menu-title-search.d.ts.map +1 -0
- package/build-types/navigation/menu/menu-title.d.ts +4 -0
- package/build-types/navigation/menu/menu-title.d.ts.map +1 -0
- package/build-types/navigation/menu/search-no-results-found.d.ts +4 -0
- package/build-types/navigation/menu/search-no-results-found.d.ts.map +1 -0
- package/build-types/navigation/menu/use-navigation-tree-menu.d.ts +3 -0
- package/build-types/navigation/menu/use-navigation-tree-menu.d.ts.map +1 -0
- package/build-types/navigation/stories/index.d.ts +18 -0
- package/build-types/navigation/stories/index.d.ts.map +1 -0
- package/build-types/navigation/stories/utils/controlled-state.d.ts +7 -0
- package/build-types/navigation/stories/utils/controlled-state.d.ts.map +1 -0
- package/build-types/navigation/stories/utils/default.d.ts +10 -0
- package/build-types/navigation/stories/utils/default.d.ts.map +1 -0
- package/build-types/navigation/stories/utils/group.d.ts +10 -0
- package/build-types/navigation/stories/utils/group.d.ts.map +1 -0
- package/build-types/navigation/stories/utils/hide-if-empty.d.ts +10 -0
- package/build-types/navigation/stories/utils/hide-if-empty.d.ts.map +1 -0
- package/build-types/navigation/stories/utils/more-examples.d.ts +10 -0
- package/build-types/navigation/stories/utils/more-examples.d.ts.map +1 -0
- package/build-types/navigation/stories/utils/search.d.ts +10 -0
- package/build-types/navigation/stories/utils/search.d.ts.map +1 -0
- package/build-types/navigation/styles/navigation-styles.d.ts +58 -0
- package/build-types/navigation/styles/navigation-styles.d.ts.map +1 -0
- package/build-types/navigation/test/index.d.ts +2 -0
- package/build-types/navigation/test/index.d.ts.map +1 -0
- package/build-types/navigation/types.d.ts +267 -0
- package/build-types/navigation/types.d.ts.map +1 -0
- package/build-types/navigation/use-create-navigation-tree.d.ts +15 -0
- package/build-types/navigation/use-create-navigation-tree.d.ts.map +1 -0
- package/build-types/navigation/use-navigation-tree-nodes.d.ts +11 -0
- package/build-types/navigation/use-navigation-tree-nodes.d.ts.map +1 -0
- package/build-types/navigation/utils.d.ts +3 -0
- package/build-types/navigation/utils.d.ts.map +1 -0
- package/build-types/navigator/navigator-back-button/component.d.ts +1 -1
- package/build-types/navigator/navigator-back-button/hook.d.ts +1 -1
- package/build-types/navigator/navigator-button/component.d.ts +1 -1
- package/build-types/navigator/navigator-button/hook.d.ts +1 -1
- package/build-types/navigator/navigator-screen/component.d.ts +1 -1
- package/build-types/navigator/navigator-screen/component.d.ts.map +1 -1
- package/build-types/navigator/navigator-to-parent-button/component.d.ts +1 -1
- package/build-types/navigator/types.d.ts +12 -12
- package/build-types/navigator/types.d.ts.map +1 -1
- package/build-types/notice/types.d.ts +7 -7
- package/build-types/notice/types.d.ts.map +1 -1
- package/build-types/number-control/index.d.ts.map +1 -1
- package/build-types/number-control/types.d.ts +1 -1
- package/build-types/number-control/types.d.ts.map +1 -1
- package/build-types/palette-edit/index.d.ts +37 -0
- package/build-types/palette-edit/index.d.ts.map +1 -0
- package/build-types/palette-edit/stories/index.d.ts +13 -0
- package/build-types/palette-edit/stories/index.d.ts.map +1 -0
- package/build-types/palette-edit/styles.d.ts +51 -0
- package/build-types/palette-edit/styles.d.ts.map +1 -0
- package/build-types/palette-edit/test/index.d.ts +2 -0
- package/build-types/palette-edit/test/index.d.ts.map +1 -0
- package/build-types/palette-edit/types.d.ts +114 -0
- package/build-types/palette-edit/types.d.ts.map +1 -0
- package/build-types/panel/body.d.ts +9 -0
- package/build-types/panel/body.d.ts.map +1 -0
- package/build-types/panel/stories/index.d.ts +19 -0
- package/build-types/panel/stories/index.d.ts.map +1 -0
- package/build-types/panel/test/body.d.ts +2 -0
- package/build-types/panel/test/body.d.ts.map +1 -0
- package/build-types/panel/types.d.ts +73 -3
- package/build-types/panel/types.d.ts.map +1 -1
- package/build-types/placeholder/index.d.ts +1 -1
- package/build-types/placeholder/index.d.ts.map +1 -1
- package/build-types/placeholder/types.d.ts +2 -2
- package/build-types/placeholder/types.d.ts.map +1 -1
- package/build-types/popover/limit-shift.d.ts +2 -2
- package/build-types/popover/limit-shift.d.ts.map +1 -1
- package/build-types/popover/types.d.ts +10 -10
- package/build-types/popover/types.d.ts.map +1 -1
- package/build-types/popover/utils.d.ts +2 -2
- package/build-types/popover/utils.d.ts.map +1 -1
- package/build-types/query-controls/author-select.d.ts.map +1 -1
- package/build-types/query-controls/category-select.d.ts.map +1 -1
- package/build-types/query-controls/terms.d.ts.map +1 -1
- package/build-types/query-controls/types.d.ts +12 -12
- package/build-types/query-controls/types.d.ts.map +1 -1
- package/build-types/radio-control/types.d.ts +1 -1
- package/build-types/radio-control/types.d.ts.map +1 -1
- package/build-types/radio-group/index.d.ts +1 -1
- package/build-types/radio-group/radio/index.d.ts +1 -1
- package/build-types/range-control/index.d.ts +2 -2
- package/build-types/range-control/types.d.ts +17 -17
- package/build-types/range-control/types.d.ts.map +1 -1
- package/build-types/resizable-box/resize-tooltip/index.d.ts +1 -1
- package/build-types/resizable-box/resize-tooltip/index.d.ts.map +1 -1
- package/build-types/resizable-box/resize-tooltip/label.d.ts +1 -1
- package/build-types/resizable-box/resize-tooltip/label.d.ts.map +1 -1
- package/build-types/resizable-box/resize-tooltip/styles/resize-tooltip.styles.d.ts.map +1 -1
- package/build-types/resizable-box/resize-tooltip/utils.d.ts +2 -2
- package/build-types/resizable-box/resize-tooltip/utils.d.ts.map +1 -1
- package/build-types/responsive-wrapper/index.d.ts.map +1 -1
- package/build-types/responsive-wrapper/stories/index.d.ts +10 -0
- package/build-types/responsive-wrapper/stories/index.d.ts.map +1 -1
- package/build-types/responsive-wrapper/types.d.ts +3 -3
- package/build-types/responsive-wrapper/types.d.ts.map +1 -1
- package/build-types/sandbox/types.d.ts +1 -1
- package/build-types/sandbox/types.d.ts.map +1 -1
- package/build-types/scrollable/types.d.ts +2 -2
- package/build-types/scrollable/types.d.ts.map +1 -1
- package/build-types/search-control/types.d.ts +1 -1
- package/build-types/search-control/types.d.ts.map +1 -1
- package/build-types/select-control/index.d.ts +2 -1
- package/build-types/select-control/index.d.ts.map +1 -1
- package/build-types/select-control/stories/index.d.ts +3 -3
- package/build-types/select-control/stories/index.d.ts.map +1 -1
- package/build-types/select-control/types.d.ts +44 -20
- package/build-types/select-control/types.d.ts.map +1 -1
- package/build-types/shortcut/types.d.ts +1 -1
- package/build-types/shortcut/types.d.ts.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/slot.d.ts +1 -1
- package/build-types/slot-fill/provider.d.ts +1 -0
- package/build-types/slot-fill/provider.d.ts.map +1 -1
- package/build-types/snackbar/types.d.ts +3 -3
- package/build-types/snackbar/types.d.ts.map +1 -1
- package/build-types/spacer/types.d.ts +1 -1
- package/build-types/spacer/types.d.ts.map +1 -1
- package/build-types/spinner/index.d.ts +1 -1
- package/build-types/style-provider/types.d.ts +1 -1
- package/build-types/style-provider/types.d.ts.map +1 -1
- package/build-types/surface/types.d.ts +2 -2
- package/build-types/surface/types.d.ts.map +1 -1
- package/build-types/tab-panel/stories/index.d.ts +1 -0
- package/build-types/tab-panel/stories/index.d.ts.map +1 -1
- package/build-types/tab-panel/types.d.ts +5 -5
- package/build-types/tab-panel/types.d.ts.map +1 -1
- package/build-types/text/types.d.ts +3 -3
- package/build-types/text/types.d.ts.map +1 -1
- package/build-types/text-control/types.d.ts +1 -1
- package/build-types/text-control/types.d.ts.map +1 -1
- package/build-types/text-highlight/types.d.ts +1 -1
- package/build-types/text-highlight/types.d.ts.map +1 -1
- package/build-types/textarea-control/types.d.ts +1 -1
- package/build-types/textarea-control/types.d.ts.map +1 -1
- package/build-types/theme/types.d.ts +3 -3
- package/build-types/theme/types.d.ts.map +1 -1
- package/build-types/tip/types.d.ts +1 -1
- package/build-types/tip/types.d.ts.map +1 -1
- package/build-types/toggle-control/types.d.ts +1 -1
- package/build-types/toggle-control/types.d.ts.map +1 -1
- package/build-types/toggle-group-control/types.d.ts +10 -10
- package/build-types/toggle-group-control/types.d.ts.map +1 -1
- package/build-types/toolbar/toolbar/types.d.ts +1 -1
- package/build-types/toolbar/toolbar/types.d.ts.map +1 -1
- package/build-types/toolbar/toolbar-button/index.d.ts +165 -11
- package/build-types/toolbar/toolbar-button/index.d.ts.map +1 -1
- package/build-types/toolbar/toolbar-button/toolbar-button-container.d.ts +6 -1
- package/build-types/toolbar/toolbar-button/toolbar-button-container.d.ts.map +1 -1
- package/build-types/toolbar/toolbar-button/types.d.ts +45 -0
- package/build-types/toolbar/toolbar-button/types.d.ts.map +1 -0
- package/build-types/toolbar/toolbar-context/index.d.ts +6 -1
- package/build-types/toolbar/toolbar-context/index.d.ts.map +1 -1
- package/build-types/toolbar/toolbar-dropdown-menu/index.d.ts +1 -1
- package/build-types/toolbar/toolbar-item/index.d.ts +1 -1
- package/build-types/tools-panel/context.d.ts.map +1 -1
- package/build-types/tools-panel/test/index.d.ts +2 -0
- package/build-types/tools-panel/test/index.d.ts.map +1 -0
- package/build-types/tools-panel/tools-panel/hook.d.ts +3 -1
- package/build-types/tools-panel/tools-panel/hook.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel-header/hook.d.ts +1 -1
- package/build-types/tools-panel/tools-panel-item/component.d.ts +1 -0
- package/build-types/tools-panel/tools-panel-item/component.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
- package/build-types/tools-panel/types.d.ts +21 -19
- package/build-types/tools-panel/types.d.ts.map +1 -1
- package/build-types/tooltip/index.d.ts.map +1 -1
- package/build-types/tree-grid/types.d.ts +5 -5
- package/build-types/tree-grid/types.d.ts.map +1 -1
- package/build-types/tree-select/index.d.ts.map +1 -1
- package/build-types/tree-select/types.d.ts +4 -10
- package/build-types/tree-select/types.d.ts.map +1 -1
- package/build-types/truncate/types.d.ts +2 -2
- package/build-types/truncate/types.d.ts.map +1 -1
- package/build-types/ui/context/context-connect.d.ts +1 -1
- package/build-types/ui/context/context-connect.d.ts.map +1 -1
- package/build-types/ui/context/context-system-provider.d.ts.map +1 -1
- package/build-types/ui/context/wordpress-component.d.ts +3 -3
- package/build-types/ui/context/wordpress-component.d.ts.map +1 -1
- package/build-types/ui/control-group/types.d.ts +2 -2
- package/build-types/ui/control-group/types.d.ts.map +1 -1
- package/build-types/ui/control-label/types.d.ts +1 -1
- package/build-types/ui/control-label/types.d.ts.map +1 -1
- package/build-types/ui/form-group/form-group-content.d.ts +1 -1
- package/build-types/ui/form-group/form-group-help.d.ts +1 -1
- package/build-types/ui/form-group/form-group-label.d.ts +1 -1
- package/build-types/ui/form-group/types.d.ts +5 -5
- package/build-types/ui/form-group/types.d.ts.map +1 -1
- package/build-types/ui/form-group/use-form-group.d.ts +3 -3
- package/build-types/ui/spinner/component.d.ts +1 -1
- package/build-types/ui/tooltip/content.d.ts +1 -1
- package/build-types/ui/tooltip/types.d.ts +2 -2
- package/build-types/ui/tooltip/types.d.ts.map +1 -1
- package/build-types/ui/utils/font-size.d.ts +1 -1
- package/build-types/ui/utils/font-size.d.ts.map +1 -1
- package/build-types/ui/utils/space.d.ts +1 -1
- package/build-types/ui/utils/space.d.ts.map +1 -1
- package/build-types/ui/utils/types.d.ts +4 -4
- package/build-types/ui/utils/types.d.ts.map +1 -1
- package/build-types/unit-control/styles/unit-control-styles.d.ts +1 -1
- package/build-types/unit-control/styles/unit-control-styles.d.ts.map +1 -1
- package/build-types/unit-control/types.d.ts +5 -5
- package/build-types/unit-control/types.d.ts.map +1 -1
- package/build-types/utils/breakpoint-values.d.ts +1 -1
- package/build-types/utils/colors-values.d.ts +1 -1
- package/build-types/utils/config-values.d.ts +9 -9
- package/build-types/utils/events.d.ts +1 -1
- package/build-types/utils/events.d.ts.map +1 -1
- package/build-types/utils/font-values.d.ts +1 -1
- package/build-types/utils/font.d.ts.map +1 -1
- package/build-types/utils/hooks/use-controlled-value.d.ts +1 -1
- package/build-types/utils/hooks/use-controlled-value.d.ts.map +1 -1
- package/build-types/utils/types.d.ts +4 -4
- package/build-types/utils/types.d.ts.map +1 -1
- package/build-types/v-stack/component.d.ts +1 -4
- package/build-types/v-stack/component.d.ts.map +1 -1
- package/build-types/v-stack/hook.d.ts.map +1 -1
- package/build-types/v-stack/stories/e2e/index.d.ts +9 -0
- package/build-types/v-stack/stories/e2e/index.d.ts.map +1 -0
- package/build-types/v-stack/stories/index.d.ts +1 -4
- package/build-types/v-stack/stories/index.d.ts.map +1 -1
- package/build-types/v-stack/types.d.ts +5 -3
- package/build-types/v-stack/types.d.ts.map +1 -1
- package/build-types/view/types.d.ts +1 -1
- package/build-types/view/types.d.ts.map +1 -1
- package/build-types/visually-hidden/types.d.ts +1 -1
- package/build-types/visually-hidden/types.d.ts.map +1 -1
- package/build-types/z-stack/types.d.ts +1 -1
- package/build-types/z-stack/types.d.ts.map +1 -1
- package/package.json +24 -22
- package/src/animate/index.js +3 -1
- package/src/autocomplete/README.md +51 -0
- package/src/autocomplete/autocompleter-ui.tsx +167 -0
- package/src/autocomplete/{get-default-use-items.js → get-default-use-items.tsx} +11 -6
- package/src/autocomplete/{index.js → index.tsx} +107 -141
- package/src/autocomplete/test/{index.js → index.tsx} +31 -20
- package/src/autocomplete/types.ts +220 -0
- package/src/border-control/test/index.js +0 -2
- package/src/button/style.scss +12 -1
- package/src/button/types.ts +2 -2
- package/src/circular-option-picker/README.md +141 -0
- package/src/circular-option-picker/{index.js → index.tsx} +74 -14
- package/src/circular-option-picker/stories/index.tsx +134 -0
- package/src/circular-option-picker/types.ts +69 -0
- package/src/color-palette/test/__snapshots__/index.tsx.snap +17 -15
- package/src/custom-gradient-picker/gradient-bar/control-points.js +2 -0
- package/src/custom-gradient-picker/gradient-bar/index.js +2 -0
- package/src/custom-gradient-picker/gradient-bar/utils.js +2 -0
- package/src/custom-gradient-picker/index.js +2 -0
- package/src/custom-gradient-picker/serializer.js +2 -0
- package/src/custom-gradient-picker/utils.js +2 -0
- package/src/dimension-control/README.md +22 -55
- package/src/dimension-control/index.tsx +101 -0
- package/src/dimension-control/{sizes.js → sizes.ts} +8 -5
- package/src/dimension-control/stories/index.tsx +48 -0
- package/src/dimension-control/types.ts +48 -0
- package/src/dropdown-menu/index.js +6 -3
- package/src/flex/flex/hook.ts +2 -2
- package/src/font-size-picker/README.md +26 -20
- package/src/font-size-picker/index.tsx +2 -1
- package/src/font-size-picker/stories/index.tsx +1 -0
- package/src/font-size-picker/test/index.tsx +23 -0
- package/src/font-size-picker/types.ts +4 -0
- package/src/form-token-field/index.tsx +4 -1
- package/src/form-token-field/stories/index.tsx +13 -0
- package/src/form-token-field/test/index.tsx +80 -0
- package/src/gradient-picker/index.js +2 -0
- package/src/guide/README.md +17 -15
- package/src/guide/{icons.js → icons.tsx} +1 -1
- package/src/guide/{index.js → index.tsx} +47 -7
- package/src/guide/{page-control.js → page-control.tsx} +2 -1
- package/src/guide/{page.js → page.tsx} +8 -1
- package/src/guide/stories/{index.js → index.tsx} +11 -5
- package/src/guide/test/{index.js → index.tsx} +22 -4
- package/src/guide/types.ts +68 -0
- package/src/h-stack/README.md +2 -2
- package/src/h-stack/stories/e2e/index.tsx +36 -0
- package/src/h-stack/types.ts +2 -2
- package/src/h-stack/utils.ts +3 -3
- package/src/higher-order/navigate-regions/{index.js → index.tsx} +47 -11
- package/src/higher-order/navigate-regions/style.scss +2 -1
- package/src/higher-order/with-constrained-tabbing/index.tsx +30 -0
- package/src/higher-order/with-fallback-styles/{index.js → index.tsx} +22 -5
- package/src/higher-order/with-filters/{index.js → index.tsx} +44 -12
- package/src/higher-order/with-filters/test/{index.js → index.tsx} +5 -1
- package/src/higher-order/with-focus-return/index.tsx +74 -0
- package/src/higher-order/with-focus-return/test/{index.js → index.tsx} +2 -2
- package/src/higher-order/with-notices/README.md +4 -1
- package/src/higher-order/with-notices/index.tsx +116 -0
- package/src/higher-order/with-notices/test/{index.js → index.tsx} +11 -6
- package/src/higher-order/with-notices/types.ts +35 -0
- package/src/higher-order/with-spoken-messages/test/{index.js → index.tsx} +2 -1
- package/src/icon/index.tsx +11 -15
- package/src/icon/test/{index.js → index.tsx} +6 -2
- package/src/index.native.js +1 -0
- package/src/mobile/bottom-sheet/bottom-sheet-navigation/test/navigation-container.native.js +1 -1
- package/src/mobile/bottom-sheet/cell.native.js +1 -1
- package/src/mobile/bottom-sheet-text-control/README.md +8 -1
- package/src/mobile/bottom-sheet-text-control/index.native.js +2 -1
- package/src/mobile/global-styles-context/utils.native.js +1 -0
- package/src/mobile/link-settings/test/link-settings-navigation.native.js +1 -1
- package/src/navigation/README.md +16 -2
- package/src/navigation/back-button/{index.js → index.tsx} +22 -6
- package/src/navigation/{context.js → context.tsx} +8 -5
- package/src/navigation/group/context.tsx +15 -0
- package/src/navigation/group/{index.js → index.tsx} +9 -1
- package/src/navigation/{index.js → index.tsx} +63 -7
- package/src/navigation/item/{base-content.js → base-content.tsx} +5 -2
- package/src/navigation/item/{base.js → base.tsx} +3 -1
- package/src/navigation/item/{index.js → index.tsx} +8 -2
- package/src/navigation/item/{use-navigation-tree-item.js → use-navigation-tree-item.tsx} +9 -2
- package/src/navigation/menu/context.tsx +18 -0
- package/src/navigation/menu/{index.js → index.tsx} +5 -1
- package/src/navigation/menu/{menu-title-search.js → menu-title-search.tsx} +11 -7
- package/src/navigation/menu/{menu-title.js → menu-title.tsx} +5 -3
- package/src/navigation/menu/{search-no-results-found.js → search-no-results-found.tsx} +5 -1
- package/src/navigation/menu/{use-navigation-tree-menu.js → use-navigation-tree-menu.tsx} +3 -1
- package/src/navigation/stories/index.tsx +53 -0
- package/src/navigation/stories/utils/{controlled-state.js → controlled-state.tsx} +32 -13
- package/src/navigation/stories/utils/{default.js → default.tsx} +20 -6
- package/src/navigation/stories/utils/{group.js → group.tsx} +21 -7
- package/src/navigation/stories/utils/{hide-if-empty.js → hide-if-empty.tsx} +19 -6
- package/src/navigation/stories/utils/{more-examples.js → more-examples.tsx} +30 -12
- package/src/navigation/stories/utils/{search.js → search.tsx} +21 -7
- package/src/navigation/test/{index.js → index.tsx} +17 -4
- package/src/navigation/types.ts +325 -0
- package/src/navigation/{use-create-navigation-tree.js → use-create-navigation-tree.tsx} +37 -25
- package/src/navigation/{use-navigation-tree-nodes.js → use-navigation-tree-nodes.tsx} +10 -6
- package/src/navigation/{utils.js → utils.tsx} +2 -2
- package/src/navigator/navigator-screen/component.tsx +13 -7
- package/src/navigator/test/index.tsx +65 -22
- package/src/number-control/index.tsx +0 -2
- package/src/palette-edit/{index.js → index.tsx} +115 -48
- package/src/palette-edit/stories/index.tsx +82 -0
- package/src/palette-edit/test/{index.js → index.tsx} +15 -3
- package/src/palette-edit/types.ts +126 -0
- package/src/panel/README.md +53 -35
- package/src/panel/{body.js → body.tsx} +31 -17
- package/src/panel/stories/{index.js → index.tsx} +16 -6
- package/src/panel/test/{body.js → body.tsx} +12 -17
- package/src/panel/types.ts +78 -0
- package/src/placeholder/index.tsx +2 -6
- package/src/placeholder/test/index.tsx +1 -1
- package/src/placeholder/types.ts +2 -2
- package/src/popover/test/index.tsx +5 -2
- package/src/query-controls/author-select.tsx +1 -6
- package/src/query-controls/category-select.tsx +1 -6
- package/src/query-controls/terms.ts +29 -18
- package/src/range-control/index.tsx +7 -7
- package/src/range-control/types.ts +3 -3
- package/src/resizable-box/resize-tooltip/styles/resize-tooltip.styles.ts +2 -1
- package/src/responsive-wrapper/README.md +8 -2
- package/src/responsive-wrapper/index.tsx +18 -17
- package/src/responsive-wrapper/stories/index.tsx +41 -0
- package/src/responsive-wrapper/style.scss +5 -11
- package/src/responsive-wrapper/types.ts +2 -2
- package/src/select-control/index.tsx +16 -16
- package/src/select-control/stories/index.tsx +24 -12
- package/src/select-control/types.ts +68 -40
- package/src/tab-panel/stories/index.tsx +41 -0
- package/src/tab-panel/test/index.tsx +794 -262
- package/src/tab-panel/types.ts +4 -4
- package/src/toolbar/toolbar-button/README.md +13 -1
- package/src/toolbar/toolbar-button/{index.js → index.tsx} +55 -20
- package/src/toolbar/toolbar-button/toolbar-button-container.tsx +13 -0
- package/src/toolbar/toolbar-button/types.ts +46 -0
- package/src/toolbar/toolbar-context/index.ts +15 -0
- package/src/tools-panel/context.ts +2 -0
- package/src/tools-panel/test/{index.js → index.tsx} +171 -61
- package/src/tools-panel/tools-panel/hook.ts +30 -11
- package/src/tools-panel/tools-panel-item/hook.ts +18 -2
- package/src/tools-panel/types.ts +12 -9
- package/src/tooltip/index.js +11 -1
- package/src/tree-grid/test/__snapshots__/index.tsx.snap +1 -1
- package/src/tree-select/index.tsx +5 -2
- package/src/tree-select/types.ts +6 -13
- package/src/ui/context/context-system-provider.js +7 -4
- package/src/ui/context/get-styled-class-name-from-key.ts +1 -1
- package/src/utils/font.js +1 -6
- package/src/v-stack/README.md +2 -2
- package/src/v-stack/hook.ts +6 -4
- package/src/v-stack/stories/e2e/index.tsx +36 -0
- package/src/v-stack/stories/index.tsx +28 -7
- package/src/v-stack/test/__snapshots__/index.tsx.snap +20 -18
- package/src/v-stack/types.ts +5 -3
- package/tsconfig.json +1 -14
- package/tsconfig.tsbuildinfo +1 -1
- package/src/autocomplete/autocompleter-ui.js +0 -118
- package/src/dimension-control/index.js +0 -73
- package/src/higher-order/with-constrained-tabbing/index.js +0 -22
- package/src/higher-order/with-focus-return/index.js +0 -64
- package/src/higher-order/with-notices/index.js +0 -104
- package/src/navigation/group/context.js +0 -9
- package/src/navigation/menu/context.js +0 -11
- package/src/navigation/stories/index.js +0 -33
- package/src/toolbar/toolbar-button/toolbar-button-container.js +0 -6
- package/src/toolbar/toolbar-context/index.js +0 -10
- /package/src/animation/{index.js → index.tsx} +0 -0
- /package/src/higher-order/with-filters/test/__snapshots__/{index.js.snap → index.tsx.snap} +0 -0
- /package/src/higher-order/with-spoken-messages/{index.js → index.tsx} +0 -0
- /package/src/navigation/{constants.js → constants.tsx} +0 -0
- /package/src/navigation/styles/{navigation-styles.js → navigation-styles.tsx} +0 -0
- /package/src/panel/test/__snapshots__/{body.js.snap → body.tsx.snap} +0 -0
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { ComponentStory } from '@storybook/react';
|
|
5
|
+
|
|
1
6
|
/**
|
|
2
7
|
* WordPress dependencies
|
|
3
8
|
*/
|
|
@@ -6,16 +11,25 @@ import { useState } from '@wordpress/element';
|
|
|
6
11
|
/**
|
|
7
12
|
* Internal dependencies
|
|
8
13
|
*/
|
|
9
|
-
import Navigation from '../..';
|
|
10
|
-
import NavigationItem from '../../item';
|
|
11
|
-
import NavigationMenu from '../../menu';
|
|
12
|
-
import NavigationGroup from '../../group';
|
|
14
|
+
import { Navigation } from '../..';
|
|
15
|
+
import { NavigationItem } from '../../item';
|
|
16
|
+
import { NavigationMenu } from '../../menu';
|
|
17
|
+
import { NavigationGroup } from '../../group';
|
|
13
18
|
|
|
14
|
-
export
|
|
19
|
+
export const GroupStory: ComponentStory< typeof Navigation > = ( {
|
|
20
|
+
className,
|
|
21
|
+
...props
|
|
22
|
+
} ) => {
|
|
15
23
|
const [ activeItem, setActiveItem ] = useState( 'item-1' );
|
|
16
24
|
|
|
17
25
|
return (
|
|
18
|
-
<Navigation
|
|
26
|
+
<Navigation
|
|
27
|
+
{ ...props }
|
|
28
|
+
activeItem={ activeItem }
|
|
29
|
+
className={ [ 'navigation-story', className ]
|
|
30
|
+
.filter( Boolean )
|
|
31
|
+
.join( ' ' ) }
|
|
32
|
+
>
|
|
19
33
|
<NavigationMenu title="Home">
|
|
20
34
|
<NavigationGroup title="Group 1">
|
|
21
35
|
<NavigationItem
|
|
@@ -44,4 +58,4 @@ export function GroupStory() {
|
|
|
44
58
|
</NavigationMenu>
|
|
45
59
|
</Navigation>
|
|
46
60
|
);
|
|
47
|
-
}
|
|
61
|
+
};
|
|
@@ -1,14 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { ComponentStory } from '@storybook/react';
|
|
5
|
+
|
|
1
6
|
/**
|
|
2
7
|
* Internal dependencies
|
|
3
8
|
*/
|
|
4
|
-
import Navigation from '../..';
|
|
5
|
-
import NavigationItem from '../../item';
|
|
6
|
-
import NavigationMenu from '../../menu';
|
|
9
|
+
import { Navigation } from '../..';
|
|
10
|
+
import { NavigationItem } from '../../item';
|
|
11
|
+
import { NavigationMenu } from '../../menu';
|
|
7
12
|
|
|
8
|
-
export
|
|
13
|
+
export const HideIfEmptyStory: ComponentStory< typeof Navigation > = ( {
|
|
14
|
+
className,
|
|
15
|
+
...props
|
|
16
|
+
} ) => {
|
|
9
17
|
return (
|
|
10
18
|
<>
|
|
11
|
-
<Navigation
|
|
19
|
+
<Navigation
|
|
20
|
+
{ ...props }
|
|
21
|
+
className={ [ 'navigation-story', className ]
|
|
22
|
+
.filter( Boolean )
|
|
23
|
+
.join( ' ' ) }
|
|
24
|
+
>
|
|
12
25
|
<NavigationMenu title="Home" menu="root" isEmpty={ false }>
|
|
13
26
|
<NavigationItem
|
|
14
27
|
navigateToMenu="root-sub-1"
|
|
@@ -54,4 +67,4 @@ export function HideIfEmptyStory() {
|
|
|
54
67
|
</p>
|
|
55
68
|
</>
|
|
56
69
|
);
|
|
57
|
-
}
|
|
70
|
+
};
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { ComponentStory } from '@storybook/react';
|
|
5
|
+
|
|
1
6
|
/**
|
|
2
7
|
* WordPress dependencies
|
|
3
8
|
*/
|
|
@@ -7,14 +12,17 @@ import { Icon, wordpress, home } from '@wordpress/icons';
|
|
|
7
12
|
/**
|
|
8
13
|
* Internal dependencies
|
|
9
14
|
*/
|
|
10
|
-
import Navigation from '../..';
|
|
11
|
-
import NavigationGroup from '../../group';
|
|
12
|
-
import NavigationItem from '../../item';
|
|
13
|
-
import NavigationMenu from '../../menu';
|
|
15
|
+
import { Navigation } from '../..';
|
|
16
|
+
import { NavigationGroup } from '../../group';
|
|
17
|
+
import { NavigationItem } from '../../item';
|
|
18
|
+
import { NavigationMenu } from '../../menu';
|
|
14
19
|
|
|
15
|
-
export
|
|
20
|
+
export const MoreExamplesStory: ComponentStory< typeof Navigation > = ( {
|
|
21
|
+
className,
|
|
22
|
+
...props
|
|
23
|
+
} ) => {
|
|
16
24
|
const [ activeItem, setActiveItem ] = useState( 'child-1' );
|
|
17
|
-
const [ delayedBadge, setDelayedBadge ] = useState();
|
|
25
|
+
const [ delayedBadge, setDelayedBadge ] = useState< number | undefined >();
|
|
18
26
|
useEffect( () => {
|
|
19
27
|
const timeout = setTimeout( () => setDelayedBadge( 2 ), 1500 );
|
|
20
28
|
return () => clearTimeout( timeout );
|
|
@@ -24,7 +32,13 @@ export function MoreExamplesStory() {
|
|
|
24
32
|
useState( 1 );
|
|
25
33
|
|
|
26
34
|
return (
|
|
27
|
-
<Navigation
|
|
35
|
+
<Navigation
|
|
36
|
+
{ ...props }
|
|
37
|
+
activeItem={ activeItem }
|
|
38
|
+
className={ [ 'navigation-story', className ]
|
|
39
|
+
.filter( Boolean )
|
|
40
|
+
.join( ' ' ) }
|
|
41
|
+
>
|
|
28
42
|
<NavigationMenu title="Home">
|
|
29
43
|
<NavigationGroup title="Items without Active State">
|
|
30
44
|
<NavigationItem item="item-1" title="Item 1" />
|
|
@@ -126,10 +140,14 @@ export function MoreExamplesStory() {
|
|
|
126
140
|
menu="custom-back-click-handler-prevented-menu"
|
|
127
141
|
title="Custom back button click handler prevented"
|
|
128
142
|
parentMenu="root"
|
|
129
|
-
onBackButtonClick={
|
|
130
|
-
event
|
|
131
|
-
|
|
132
|
-
|
|
143
|
+
onBackButtonClick={
|
|
144
|
+
( ( event ) => {
|
|
145
|
+
event.preventDefault();
|
|
146
|
+
setBackButtonPreventedBadge(
|
|
147
|
+
backButtonPreventedBadge + 1
|
|
148
|
+
);
|
|
149
|
+
} ) as React.MouseEventHandler
|
|
150
|
+
}
|
|
133
151
|
backButtonLabel="Increment badge"
|
|
134
152
|
>
|
|
135
153
|
<NavigationItem
|
|
@@ -140,4 +158,4 @@ export function MoreExamplesStory() {
|
|
|
140
158
|
</NavigationMenu>
|
|
141
159
|
</Navigation>
|
|
142
160
|
);
|
|
143
|
-
}
|
|
161
|
+
};
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { ComponentStory } from '@storybook/react';
|
|
5
|
+
|
|
1
6
|
/**
|
|
2
7
|
* WordPress dependencies
|
|
3
8
|
*/
|
|
@@ -6,10 +11,10 @@ import { useState } from '@wordpress/element';
|
|
|
6
11
|
/**
|
|
7
12
|
* Internal dependencies
|
|
8
13
|
*/
|
|
9
|
-
import Navigation from '../..';
|
|
10
|
-
import NavigationGroup from '../../group';
|
|
11
|
-
import NavigationItem from '../../item';
|
|
12
|
-
import NavigationMenu from '../../menu';
|
|
14
|
+
import { Navigation } from '../..';
|
|
15
|
+
import { NavigationGroup } from '../../group';
|
|
16
|
+
import { NavigationItem } from '../../item';
|
|
17
|
+
import { NavigationMenu } from '../../menu';
|
|
13
18
|
import { normalizedSearch } from '../../utils';
|
|
14
19
|
|
|
15
20
|
const searchItems = [
|
|
@@ -24,12 +29,21 @@ const searchItems = [
|
|
|
24
29
|
{ item: 'waldo', title: 'Waldo' },
|
|
25
30
|
];
|
|
26
31
|
|
|
27
|
-
export
|
|
32
|
+
export const SearchStory: ComponentStory< typeof Navigation > = ( {
|
|
33
|
+
className,
|
|
34
|
+
...props
|
|
35
|
+
} ) => {
|
|
28
36
|
const [ activeItem, setActiveItem ] = useState( 'item-1' );
|
|
29
37
|
const [ search, setSearch ] = useState( '' );
|
|
30
38
|
|
|
31
39
|
return (
|
|
32
|
-
<Navigation
|
|
40
|
+
<Navigation
|
|
41
|
+
{ ...props }
|
|
42
|
+
activeItem={ activeItem }
|
|
43
|
+
className={ [ 'navigation-story', className ]
|
|
44
|
+
.filter( Boolean )
|
|
45
|
+
.join( ' ' ) }
|
|
46
|
+
>
|
|
33
47
|
<NavigationMenu hasSearch title="Home">
|
|
34
48
|
<NavigationGroup title="Items">
|
|
35
49
|
{ searchItems.map( ( { item, title } ) => (
|
|
@@ -74,4 +88,4 @@ export function SearchStory() {
|
|
|
74
88
|
</NavigationMenu>
|
|
75
89
|
</Navigation>
|
|
76
90
|
);
|
|
77
|
-
}
|
|
91
|
+
};
|
|
@@ -16,11 +16,19 @@ import Navigation from '..';
|
|
|
16
16
|
import NavigationItem from '../item';
|
|
17
17
|
import NavigationMenu from '../menu';
|
|
18
18
|
|
|
19
|
-
const TestNavigation = ( {
|
|
19
|
+
const TestNavigation = ( {
|
|
20
|
+
activeItem,
|
|
21
|
+
rootTitle,
|
|
22
|
+
showBadge,
|
|
23
|
+
}: {
|
|
24
|
+
activeItem?: string;
|
|
25
|
+
rootTitle?: string;
|
|
26
|
+
showBadge?: boolean;
|
|
27
|
+
} ) => (
|
|
20
28
|
<Navigation activeItem={ activeItem }>
|
|
21
29
|
<NavigationMenu title={ rootTitle }>
|
|
22
30
|
<NavigationItem
|
|
23
|
-
badge={ showBadge
|
|
31
|
+
badge={ showBadge ? 21 : undefined }
|
|
24
32
|
item="item-1"
|
|
25
33
|
title="Item 1"
|
|
26
34
|
/>
|
|
@@ -55,9 +63,14 @@ const TestNavigationControlled = () => {
|
|
|
55
63
|
const [ activeItem, setActiveItem ] = useState( 'item-1' );
|
|
56
64
|
const [ activeMenu, setActiveMenu ] = useState( 'root' );
|
|
57
65
|
|
|
58
|
-
const onMockLinkClick
|
|
66
|
+
const onMockLinkClick: React.MouseEventHandler< HTMLAnchorElement > = (
|
|
67
|
+
event
|
|
68
|
+
) => {
|
|
59
69
|
event.preventDefault();
|
|
60
|
-
const item = event.target.href.replace(
|
|
70
|
+
const item = ( event.target as HTMLAnchorElement ).href.replace(
|
|
71
|
+
'https://example.com/',
|
|
72
|
+
''
|
|
73
|
+
);
|
|
61
74
|
setActiveItem( item );
|
|
62
75
|
};
|
|
63
76
|
|
|
@@ -0,0 +1,325 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { ButtonProps } from '../button/types';
|
|
5
|
+
|
|
6
|
+
type IfDiscriminantDefinedBothRequired< TDiscriminant, TOther > =
|
|
7
|
+
// When props in TDiscriminant are specified,
|
|
8
|
+
// then props from TOther are required too
|
|
9
|
+
| {
|
|
10
|
+
[ K in keyof ( TDiscriminant & TOther ) ]: NonNullable<
|
|
11
|
+
( TDiscriminant & TOther )[ K ]
|
|
12
|
+
>;
|
|
13
|
+
}
|
|
14
|
+
// When props in TDiscriminant are not specified,
|
|
15
|
+
// then props from TOther are optional
|
|
16
|
+
| ( {
|
|
17
|
+
[ K in keyof TDiscriminant ]?: never;
|
|
18
|
+
} & {
|
|
19
|
+
[ K in keyof TOther ]?: TOther[ K ];
|
|
20
|
+
} );
|
|
21
|
+
|
|
22
|
+
// React Components
|
|
23
|
+
|
|
24
|
+
export type NavigationProps = {
|
|
25
|
+
/**
|
|
26
|
+
* The active item slug.
|
|
27
|
+
*/
|
|
28
|
+
activeItem?: string;
|
|
29
|
+
/**
|
|
30
|
+
* The active menu slug.
|
|
31
|
+
*
|
|
32
|
+
* @default 'root'
|
|
33
|
+
*/
|
|
34
|
+
activeMenu?: string;
|
|
35
|
+
/**
|
|
36
|
+
* The children components.
|
|
37
|
+
*/
|
|
38
|
+
children?: React.ReactNode;
|
|
39
|
+
/**
|
|
40
|
+
* Optional classname for the component.
|
|
41
|
+
*/
|
|
42
|
+
className?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Callback used to sync the active menu between the external state
|
|
45
|
+
* and the Navigation's internal state.
|
|
46
|
+
*/
|
|
47
|
+
onActivateMenu?: ( activeMenuSlug: string ) => void;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
// When `onSearch` is specified, `search` should be specified too
|
|
51
|
+
type _NavigationMenuSearchProps = IfDiscriminantDefinedBothRequired<
|
|
52
|
+
{
|
|
53
|
+
/**
|
|
54
|
+
* When the `hasSearch` prop is `true`, this callback handles the search
|
|
55
|
+
* input's `onChange` event, making it controlled from the outside.
|
|
56
|
+
* When using this prop, the `search` prop should be also set.
|
|
57
|
+
*/
|
|
58
|
+
onSearch: ( searchString: string ) => void;
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
/**
|
|
62
|
+
* When the `hasSearch` is `true` and the `onSearch` prop is provided, this
|
|
63
|
+
* prop controls the value of the search input.
|
|
64
|
+
* Required when the `onSearch` prop is provided.
|
|
65
|
+
*/
|
|
66
|
+
search: string;
|
|
67
|
+
}
|
|
68
|
+
>;
|
|
69
|
+
|
|
70
|
+
export type NavigationMenuProps = _NavigationMenuSearchProps & {
|
|
71
|
+
/**
|
|
72
|
+
* The back button label used in nested menus.
|
|
73
|
+
* If not provided, the label will be inferred from the parent menu's title.
|
|
74
|
+
* If the parent menu's title is not available then it will default to "Back".
|
|
75
|
+
*
|
|
76
|
+
* @default parentMenuTitle ?? 'Back'
|
|
77
|
+
*/
|
|
78
|
+
backButtonLabel?: string;
|
|
79
|
+
/**
|
|
80
|
+
* A callback to handle clicking on the back button.
|
|
81
|
+
* If this prop is provided then the back button will be shown.
|
|
82
|
+
*/
|
|
83
|
+
onBackButtonClick?: React.MouseEventHandler< HTMLElement >;
|
|
84
|
+
/**
|
|
85
|
+
* The children components.
|
|
86
|
+
*/
|
|
87
|
+
children?: React.ReactNode;
|
|
88
|
+
/**
|
|
89
|
+
* Optional classname for the component.
|
|
90
|
+
*/
|
|
91
|
+
className?: string;
|
|
92
|
+
/**
|
|
93
|
+
* When `true`, enables the search feature on the menu title.
|
|
94
|
+
*/
|
|
95
|
+
hasSearch?: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* Indicates whether the menu is empty or not. Used together with the
|
|
98
|
+
* `hideIfTargetMenuEmpty` prop of `NavigationItem`.
|
|
99
|
+
*/
|
|
100
|
+
isEmpty?: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* Indicates whether the search is debouncing or not. In case of `true`, the
|
|
103
|
+
* "No results found." text is omitted. Used to prevent showing the
|
|
104
|
+
* "No results found." text between debounced searches.
|
|
105
|
+
*/
|
|
106
|
+
isSearchDebouncing?: boolean;
|
|
107
|
+
/**
|
|
108
|
+
* The unique identifier of the menu.
|
|
109
|
+
* The root menu can omit this prop, and it will default to "root".
|
|
110
|
+
* All other menus need to specify it.
|
|
111
|
+
*
|
|
112
|
+
* @default 'root'
|
|
113
|
+
*/
|
|
114
|
+
menu?: string;
|
|
115
|
+
/**
|
|
116
|
+
* The parent menu slug; used by nested menus to indicate their parent menu.
|
|
117
|
+
*/
|
|
118
|
+
parentMenu?: string;
|
|
119
|
+
/**
|
|
120
|
+
* The menu title. It's also the field used by the menu search function.
|
|
121
|
+
*/
|
|
122
|
+
title?: string;
|
|
123
|
+
/**
|
|
124
|
+
* Use this prop to render additional actions in the menu title.
|
|
125
|
+
*/
|
|
126
|
+
titleAction?: React.ReactNode;
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
export type NavigationGroupProps = {
|
|
130
|
+
/**
|
|
131
|
+
* Optional classname for the component.
|
|
132
|
+
*/
|
|
133
|
+
className?: string;
|
|
134
|
+
/**
|
|
135
|
+
* The group title.
|
|
136
|
+
*/
|
|
137
|
+
title?: string;
|
|
138
|
+
/**
|
|
139
|
+
* The children components.
|
|
140
|
+
*/
|
|
141
|
+
children: React.ReactNode;
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
type _NavigationItemButtonProps =
|
|
145
|
+
| ( ButtonProps & {
|
|
146
|
+
/**
|
|
147
|
+
* If set to `true` the menu item will only act as a text-only item,
|
|
148
|
+
* rather than a `<button />` or `<a />` element.
|
|
149
|
+
*/
|
|
150
|
+
isText?: false;
|
|
151
|
+
} )
|
|
152
|
+
| {
|
|
153
|
+
/**
|
|
154
|
+
* If set to `true` the menu item will only act as a text-only item,
|
|
155
|
+
* rather than a `<button />` or `<a />` element.
|
|
156
|
+
*/
|
|
157
|
+
isText: true;
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
export type NavigationItemBaseProps = {
|
|
161
|
+
/**
|
|
162
|
+
* The item badge content.
|
|
163
|
+
*/
|
|
164
|
+
badge?: string | number;
|
|
165
|
+
/**
|
|
166
|
+
* The children components. When not specified, the item will render the
|
|
167
|
+
* default item UI.
|
|
168
|
+
*/
|
|
169
|
+
children?: React.ReactNode;
|
|
170
|
+
/**
|
|
171
|
+
* Optional classname for the component.
|
|
172
|
+
*/
|
|
173
|
+
className?: string;
|
|
174
|
+
/**
|
|
175
|
+
* If provided, causes the component to render an `<a />` element
|
|
176
|
+
* instead of a `<button />` element.
|
|
177
|
+
*/
|
|
178
|
+
href?: string;
|
|
179
|
+
/**
|
|
180
|
+
* If no `children` are passed, this prop allows to specify a custom icon for
|
|
181
|
+
* the menu item.
|
|
182
|
+
*/
|
|
183
|
+
icon?: JSX.Element;
|
|
184
|
+
/**
|
|
185
|
+
* The unique identifier of the item.
|
|
186
|
+
*/
|
|
187
|
+
item?: string;
|
|
188
|
+
/**
|
|
189
|
+
* The child menu slug. If provided, clicking on the item will navigate
|
|
190
|
+
* to the target menu.
|
|
191
|
+
*/
|
|
192
|
+
navigateToMenu?: string;
|
|
193
|
+
/**
|
|
194
|
+
* Indicates whether this item should be hidden if the menu specified in
|
|
195
|
+
* `navigateToMenu` is marked as empty in the `isEmpty` prop.
|
|
196
|
+
* Used together with the `isEmpty` prop of `NavigationMenu`.
|
|
197
|
+
*/
|
|
198
|
+
hideIfTargetMenuEmpty?: boolean;
|
|
199
|
+
/**
|
|
200
|
+
* A callback to handle clicking on a menu item.
|
|
201
|
+
*
|
|
202
|
+
* @default noop
|
|
203
|
+
*/
|
|
204
|
+
onClick?: React.MouseEventHandler;
|
|
205
|
+
/**
|
|
206
|
+
* The item title.
|
|
207
|
+
*/
|
|
208
|
+
title?: string;
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
export type NavigationItemProps = _NavigationItemButtonProps &
|
|
212
|
+
NavigationItemBaseProps;
|
|
213
|
+
|
|
214
|
+
export type NavigationItemBaseContentProps = Pick<
|
|
215
|
+
NavigationItemProps,
|
|
216
|
+
'badge' | 'title'
|
|
217
|
+
>;
|
|
218
|
+
|
|
219
|
+
export type NavigationBackButtonProps = {
|
|
220
|
+
/**
|
|
221
|
+
* The text displayed for the button
|
|
222
|
+
*/
|
|
223
|
+
backButtonLabel?: string;
|
|
224
|
+
/**
|
|
225
|
+
* Optional classname for the component.
|
|
226
|
+
*/
|
|
227
|
+
className?: string;
|
|
228
|
+
/**
|
|
229
|
+
* If provided, causes the component to render an `<a />` element
|
|
230
|
+
* instead of a `<button />` element.
|
|
231
|
+
*/
|
|
232
|
+
href?: string;
|
|
233
|
+
/**
|
|
234
|
+
* Callback function called when the button is clicked.
|
|
235
|
+
*/
|
|
236
|
+
onClick?: React.MouseEventHandler;
|
|
237
|
+
/**
|
|
238
|
+
* Id of the parent menu
|
|
239
|
+
*/
|
|
240
|
+
parentMenu?: string;
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
export type NavigationMenuTitleSearchProps = Pick<
|
|
244
|
+
NavigationMenuProps,
|
|
245
|
+
'onSearch' | 'search' | 'title'
|
|
246
|
+
> & {
|
|
247
|
+
// @see `speak` function from `@wordpress/a11y`
|
|
248
|
+
debouncedSpeak: (
|
|
249
|
+
message: string,
|
|
250
|
+
ariaLive?: 'off' | 'polite' | 'assertive'
|
|
251
|
+
) => void;
|
|
252
|
+
onCloseSearch: () => void;
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
export type NavigationMenuTitleProps = Pick<
|
|
256
|
+
NavigationMenuProps,
|
|
257
|
+
'hasSearch' | 'onSearch' | 'search' | 'title' | 'titleAction'
|
|
258
|
+
>;
|
|
259
|
+
|
|
260
|
+
export type NavigationSearchNoResultsFoundProps = Pick<
|
|
261
|
+
NavigationMenuProps,
|
|
262
|
+
'search'
|
|
263
|
+
>;
|
|
264
|
+
|
|
265
|
+
// Data objects & context
|
|
266
|
+
|
|
267
|
+
export type Item = Omit< NavigationItemBaseProps, 'children' > & {
|
|
268
|
+
/**
|
|
269
|
+
* The group id
|
|
270
|
+
*/
|
|
271
|
+
group?: string;
|
|
272
|
+
/**
|
|
273
|
+
* The menu id
|
|
274
|
+
*/
|
|
275
|
+
menu?: string;
|
|
276
|
+
/**
|
|
277
|
+
* True is the item is currently visible (ie. the item is part
|
|
278
|
+
* of the active menu, and — if there is a search query — its title
|
|
279
|
+
* matches the search query).
|
|
280
|
+
*/
|
|
281
|
+
_isVisible: boolean;
|
|
282
|
+
};
|
|
283
|
+
|
|
284
|
+
export type Menu = Omit< NavigationMenuProps, 'children' > & {
|
|
285
|
+
menu: string;
|
|
286
|
+
};
|
|
287
|
+
|
|
288
|
+
export type NavigationGroupContext = {
|
|
289
|
+
/**
|
|
290
|
+
* The unique id of the group
|
|
291
|
+
*/
|
|
292
|
+
group?: string;
|
|
293
|
+
};
|
|
294
|
+
|
|
295
|
+
export type NavigationMenuContext = {
|
|
296
|
+
menu?: string;
|
|
297
|
+
search?: string;
|
|
298
|
+
};
|
|
299
|
+
|
|
300
|
+
export type NavigationContext = {
|
|
301
|
+
activeItem?: string;
|
|
302
|
+
activeMenu: string;
|
|
303
|
+
setActiveMenu: (
|
|
304
|
+
parentMenu: string,
|
|
305
|
+
animationDirection?: 'left' | 'right'
|
|
306
|
+
) => void;
|
|
307
|
+
|
|
308
|
+
navigationTree: {
|
|
309
|
+
items: Record< string, Item >;
|
|
310
|
+
getItem: ( itemId: string ) => Item | undefined;
|
|
311
|
+
addItem: ( itemId: string, itemProps: Item ) => void;
|
|
312
|
+
removeItem: ( itemId: string ) => void;
|
|
313
|
+
|
|
314
|
+
menus: Record< string, Menu >;
|
|
315
|
+
getMenu: ( menuId: string ) => Menu | undefined;
|
|
316
|
+
addMenu: ( menuId: string, menuProps: Menu ) => void;
|
|
317
|
+
removeMenu: ( menuId: string ) => void;
|
|
318
|
+
childMenu: Record< string, string[] >;
|
|
319
|
+
traverseMenu: (
|
|
320
|
+
startMenu: string,
|
|
321
|
+
callback: ( menuObject: Menu ) => boolean | undefined
|
|
322
|
+
) => void;
|
|
323
|
+
isMenuEmpty: ( menuId: string ) => boolean;
|
|
324
|
+
};
|
|
325
|
+
};
|
|
@@ -8,20 +8,22 @@ import { useState } from '@wordpress/element';
|
|
|
8
8
|
*/
|
|
9
9
|
import { useNavigationTreeNodes } from './use-navigation-tree-nodes';
|
|
10
10
|
|
|
11
|
+
import type { NavigationContext, Item, Menu } from './types';
|
|
12
|
+
|
|
11
13
|
export const useCreateNavigationTree = () => {
|
|
12
14
|
const {
|
|
13
15
|
nodes: items,
|
|
14
16
|
getNode: getItem,
|
|
15
17
|
addNode: addItem,
|
|
16
18
|
removeNode: removeItem,
|
|
17
|
-
} = useNavigationTreeNodes();
|
|
19
|
+
} = useNavigationTreeNodes< Item >();
|
|
18
20
|
|
|
19
21
|
const {
|
|
20
22
|
nodes: menus,
|
|
21
23
|
getNode: getMenu,
|
|
22
24
|
addNode: addMenu,
|
|
23
25
|
removeNode: removeMenu,
|
|
24
|
-
} = useNavigationTreeNodes();
|
|
26
|
+
} = useNavigationTreeNodes< Menu >();
|
|
25
27
|
|
|
26
28
|
/**
|
|
27
29
|
* Stores direct nested menus of menus
|
|
@@ -30,38 +32,44 @@ export const useCreateNavigationTree = () => {
|
|
|
30
32
|
* Key is the menu prop of the menu
|
|
31
33
|
* Value is an array of menu keys
|
|
32
34
|
*/
|
|
33
|
-
const [ childMenu, setChildMenu ] = useState
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
current
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
35
|
+
const [ childMenu, setChildMenu ] = useState< Record< string, string[] > >(
|
|
36
|
+
{}
|
|
37
|
+
);
|
|
38
|
+
const getChildMenu = ( menu: string ) => childMenu[ menu ] || [];
|
|
39
|
+
|
|
40
|
+
const traverseMenu: NavigationContext[ 'navigationTree' ][ 'traverseMenu' ] =
|
|
41
|
+
( startMenu, callback ) => {
|
|
42
|
+
const visited: string[] = [];
|
|
43
|
+
let queue = [ startMenu ];
|
|
44
|
+
let current: Menu;
|
|
45
|
+
|
|
46
|
+
while ( queue.length > 0 ) {
|
|
47
|
+
// Type cast to string is safe because of the `length > 0` check above.
|
|
48
|
+
current = getMenu( queue.shift() as string );
|
|
49
|
+
|
|
50
|
+
if ( ! current || visited.includes( current.menu ) ) {
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
47
53
|
|
|
48
|
-
|
|
49
|
-
|
|
54
|
+
visited.push( current.menu );
|
|
55
|
+
queue = [ ...queue, ...getChildMenu( current.menu ) ];
|
|
50
56
|
|
|
51
|
-
|
|
52
|
-
|
|
57
|
+
if ( callback( current ) === false ) {
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
53
60
|
}
|
|
54
|
-
}
|
|
55
|
-
};
|
|
61
|
+
};
|
|
56
62
|
|
|
57
|
-
const isMenuEmpty = ( menuToCheck ) => {
|
|
63
|
+
const isMenuEmpty = ( menuToCheck: string ) => {
|
|
58
64
|
let isEmpty = true;
|
|
59
65
|
|
|
60
|
-
traverseMenu( menuToCheck, ( current ) => {
|
|
66
|
+
traverseMenu( menuToCheck, ( current: Menu ) => {
|
|
61
67
|
if ( ! current.isEmpty ) {
|
|
62
68
|
isEmpty = false;
|
|
63
69
|
return false;
|
|
64
70
|
}
|
|
71
|
+
|
|
72
|
+
return undefined;
|
|
65
73
|
} );
|
|
66
74
|
|
|
67
75
|
return isEmpty;
|
|
@@ -75,10 +83,14 @@ export const useCreateNavigationTree = () => {
|
|
|
75
83
|
|
|
76
84
|
menus,
|
|
77
85
|
getMenu,
|
|
78
|
-
addMenu: ( key, value ) => {
|
|
86
|
+
addMenu: ( key: string, value: Menu ) => {
|
|
79
87
|
setChildMenu( ( state ) => {
|
|
80
88
|
const newState = { ...state };
|
|
81
89
|
|
|
90
|
+
if ( ! value.parentMenu ) {
|
|
91
|
+
return newState;
|
|
92
|
+
}
|
|
93
|
+
|
|
82
94
|
if ( ! newState[ value.parentMenu ] ) {
|
|
83
95
|
newState[ value.parentMenu ] = [];
|
|
84
96
|
}
|