@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
|
@@ -13,11 +13,37 @@ const ANIMATION_FRAME_PERIOD = 16;
|
|
|
13
13
|
* to be mounted. When a filter is added or removed that matches the hook name,
|
|
14
14
|
* the wrapped component re-renders.
|
|
15
15
|
*
|
|
16
|
-
* @param
|
|
16
|
+
* @param hookName Hook name exposed to be used by filters.
|
|
17
17
|
*
|
|
18
|
-
* @return
|
|
18
|
+
* @return Higher-order component factory.
|
|
19
|
+
*
|
|
20
|
+
* ```jsx
|
|
21
|
+
* import { withFilters } from '@wordpress/components';
|
|
22
|
+
* import { addFilter } from '@wordpress/hooks';
|
|
23
|
+
*
|
|
24
|
+
* const MyComponent = ( { title } ) => <h1>{ title }</h1>;
|
|
25
|
+
*
|
|
26
|
+
* const ComponentToAppend = () => <div>Appended component</div>;
|
|
27
|
+
*
|
|
28
|
+
* function withComponentAppended( FilteredComponent ) {
|
|
29
|
+
* return ( props ) => (
|
|
30
|
+
* <>
|
|
31
|
+
* <FilteredComponent { ...props } />
|
|
32
|
+
* <ComponentToAppend />
|
|
33
|
+
* </>
|
|
34
|
+
* );
|
|
35
|
+
* }
|
|
36
|
+
*
|
|
37
|
+
* addFilter(
|
|
38
|
+
* 'MyHookName',
|
|
39
|
+
* 'my-plugin/with-component-appended',
|
|
40
|
+
* withComponentAppended
|
|
41
|
+
* );
|
|
42
|
+
*
|
|
43
|
+
* const MyComponentWithFilters = withFilters( 'MyHookName' )( MyComponent );
|
|
44
|
+
* ```
|
|
19
45
|
*/
|
|
20
|
-
export default function withFilters( hookName ) {
|
|
46
|
+
export default function withFilters( hookName: string ) {
|
|
21
47
|
return createHigherOrderComponent( ( OriginalComponent ) => {
|
|
22
48
|
const namespace = 'core/with-filters/' + hookName;
|
|
23
49
|
|
|
@@ -25,10 +51,8 @@ export default function withFilters( hookName ) {
|
|
|
25
51
|
* The component definition with current filters applied. Each instance
|
|
26
52
|
* reuse this shared reference as an optimization to avoid excessive
|
|
27
53
|
* calls to `applyFilters` when many instances exist.
|
|
28
|
-
*
|
|
29
|
-
* @type {?Component}
|
|
30
54
|
*/
|
|
31
|
-
let FilteredComponent;
|
|
55
|
+
let FilteredComponent: React.ComponentType;
|
|
32
56
|
|
|
33
57
|
/**
|
|
34
58
|
* Initializes the FilteredComponent variable once, if not already
|
|
@@ -36,13 +60,18 @@ export default function withFilters( hookName ) {
|
|
|
36
60
|
*/
|
|
37
61
|
function ensureFilteredComponent() {
|
|
38
62
|
if ( FilteredComponent === undefined ) {
|
|
39
|
-
FilteredComponent = applyFilters(
|
|
63
|
+
FilteredComponent = applyFilters(
|
|
64
|
+
hookName,
|
|
65
|
+
OriginalComponent
|
|
66
|
+
) as React.ComponentType;
|
|
40
67
|
}
|
|
41
68
|
}
|
|
42
69
|
|
|
43
70
|
class FilteredComponentRenderer extends Component {
|
|
44
|
-
|
|
45
|
-
|
|
71
|
+
static instances: FilteredComponentRenderer[];
|
|
72
|
+
|
|
73
|
+
constructor( props: { [ key: string ]: any } ) {
|
|
74
|
+
super( props );
|
|
46
75
|
|
|
47
76
|
ensureFilteredComponent();
|
|
48
77
|
}
|
|
@@ -86,7 +115,10 @@ export default function withFilters( hookName ) {
|
|
|
86
115
|
const throttledForceUpdate = debounce( () => {
|
|
87
116
|
// Recreate the filtered component, only after delay so that it's
|
|
88
117
|
// computed once, even if many filters added.
|
|
89
|
-
FilteredComponent = applyFilters(
|
|
118
|
+
FilteredComponent = applyFilters(
|
|
119
|
+
hookName,
|
|
120
|
+
OriginalComponent
|
|
121
|
+
) as React.ComponentType;
|
|
90
122
|
|
|
91
123
|
// Force each instance to render.
|
|
92
124
|
FilteredComponentRenderer.instances.forEach( ( instance ) => {
|
|
@@ -99,9 +131,9 @@ export default function withFilters( hookName ) {
|
|
|
99
131
|
* mounted instance should re-render with the new filters having been
|
|
100
132
|
* applied to the original component.
|
|
101
133
|
*
|
|
102
|
-
* @param
|
|
134
|
+
* @param updatedHookName Name of the hook that was updated.
|
|
103
135
|
*/
|
|
104
|
-
function onHooksUpdated( updatedHookName ) {
|
|
136
|
+
function onHooksUpdated( updatedHookName: string ) {
|
|
105
137
|
if ( updatedHookName === hookName ) {
|
|
106
138
|
throttledForceUpdate();
|
|
107
139
|
}
|
|
@@ -18,7 +18,11 @@ describe( 'withFilters', () => {
|
|
|
18
18
|
const MyComponent = () => <div>My component</div>;
|
|
19
19
|
|
|
20
20
|
afterEach( () => {
|
|
21
|
-
removeAllFilters( hookName );
|
|
21
|
+
removeAllFilters( hookName, 'test/enhanced-component-override' );
|
|
22
|
+
removeAllFilters( hookName, 'test/enhanced-component-compose' );
|
|
23
|
+
removeAllFilters( hookName, 'test/enhanced-component-spy' );
|
|
24
|
+
removeAllFilters( hookName, 'test/enhanced-component-spy-1' );
|
|
25
|
+
removeAllFilters( hookName, 'test/enhanced-component-spy-2' );
|
|
22
26
|
} );
|
|
23
27
|
|
|
24
28
|
it( 'should display original component when no filters applied', () => {
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { Component } from '@wordpress/element';
|
|
5
|
+
import { createHigherOrderComponent, useFocusReturn } from '@wordpress/compose';
|
|
6
|
+
import deprecated from '@wordpress/deprecated';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Returns true if the given object is component-like. An object is component-
|
|
10
|
+
* like if it is an instance of wp.element.Component, or is a function.
|
|
11
|
+
*
|
|
12
|
+
* @param object Object to test.
|
|
13
|
+
*
|
|
14
|
+
* @return Whether object is component-like.
|
|
15
|
+
*/
|
|
16
|
+
function isComponentLike( object: any ): object is React.ComponentType {
|
|
17
|
+
return object instanceof Component || typeof object === 'function';
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
type Props = {
|
|
21
|
+
onFocusReturn?: () => void;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Higher Order Component used to be used to wrap disposable elements like
|
|
26
|
+
* sidebars, modals, dropdowns. When mounting the wrapped component, we track a
|
|
27
|
+
* reference to the current active element so we know where to restore focus
|
|
28
|
+
* when the component is unmounted.
|
|
29
|
+
*
|
|
30
|
+
* @param options The component to be enhanced with
|
|
31
|
+
* focus return behavior, or an object
|
|
32
|
+
* describing the component and the
|
|
33
|
+
* focus return characteristics.
|
|
34
|
+
*
|
|
35
|
+
* @return Higher Order Component with the focus restauration behaviour.
|
|
36
|
+
*/
|
|
37
|
+
export default createHigherOrderComponent(
|
|
38
|
+
// @ts-expect-error TODO: Reconcile with intended `createHigherOrderComponent` types
|
|
39
|
+
( options: WPComponent | Record< string, unknown > ) => {
|
|
40
|
+
const HoC =
|
|
41
|
+
( { onFocusReturn }: Props = {} ) =>
|
|
42
|
+
( WrappedComponent: React.ComponentType ) => {
|
|
43
|
+
const WithFocusReturn = (
|
|
44
|
+
props: Record< string, unknown >
|
|
45
|
+
) => {
|
|
46
|
+
const ref = useFocusReturn( onFocusReturn );
|
|
47
|
+
return (
|
|
48
|
+
<div ref={ ref }>
|
|
49
|
+
<WrappedComponent { ...props } />
|
|
50
|
+
</div>
|
|
51
|
+
);
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
return WithFocusReturn;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
if ( isComponentLike( options ) ) {
|
|
58
|
+
const WrappedComponent = options;
|
|
59
|
+
return HoC()( WrappedComponent );
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return HoC( options );
|
|
63
|
+
},
|
|
64
|
+
'withFocusReturn'
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
export const Provider = ( { children }: { children: React.ReactNode } ) => {
|
|
68
|
+
deprecated( 'wp.components.FocusReturnProvider component', {
|
|
69
|
+
since: '5.7',
|
|
70
|
+
hint: 'This provider is not used anymore. You can just remove it from your codebase',
|
|
71
|
+
} );
|
|
72
|
+
|
|
73
|
+
return children;
|
|
74
|
+
};
|
|
@@ -12,9 +12,9 @@ import { Component } from '@wordpress/element';
|
|
|
12
12
|
/**
|
|
13
13
|
* Internal dependencies
|
|
14
14
|
*/
|
|
15
|
-
import withFocusReturn from '
|
|
15
|
+
import withFocusReturn from '..';
|
|
16
16
|
|
|
17
|
-
class Test extends Component {
|
|
17
|
+
class Test extends Component< { className: string; focusHistory: unknown } > {
|
|
18
18
|
render() {
|
|
19
19
|
const { className, focusHistory } = this.props;
|
|
20
20
|
return (
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
`withNotices` is a React [higher-order component](https://facebook.github.io/react/docs/higher-order-components.html) used typically in adding the ability to post notice messages within the original component.
|
|
4
4
|
|
|
5
|
-
Wrapping the original component with `withNotices` encapsulates the component with the additional props `noticeOperations` and `
|
|
5
|
+
Wrapping the original component with `withNotices` encapsulates the component with the additional props `noticeOperations`, `noticeUI`, and `noticeList`.
|
|
6
6
|
|
|
7
7
|
**noticeOperations**
|
|
8
8
|
Contains a number of useful functions to add notices to your site.
|
|
@@ -34,6 +34,9 @@ _Parameters_
|
|
|
34
34
|
<a name="noticeUi" href="#noticeUi">#</a>**noticeUi**
|
|
35
35
|
The rendered `NoticeList`.
|
|
36
36
|
|
|
37
|
+
<a name="noticeList" href="#noticeList">#</a>**noticeList**
|
|
38
|
+
The array of notice objects to be displayed.
|
|
39
|
+
|
|
37
40
|
## Usage
|
|
38
41
|
|
|
39
42
|
```jsx
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { v4 as uuid } from 'uuid';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* WordPress dependencies
|
|
8
|
+
*/
|
|
9
|
+
import { forwardRef, useState, useMemo } from '@wordpress/element';
|
|
10
|
+
import { createHigherOrderComponent } from '@wordpress/compose';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Internal dependencies
|
|
14
|
+
*/
|
|
15
|
+
import NoticeList from '../../notice/list';
|
|
16
|
+
import type { WithNoticeProps } from './types';
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Override the default edit UI to include notices if supported.
|
|
20
|
+
*
|
|
21
|
+
* Wrapping the original component with `withNotices` encapsulates the component
|
|
22
|
+
* with the additional props `noticeOperations` and `noticeUI`.
|
|
23
|
+
*
|
|
24
|
+
* ```jsx
|
|
25
|
+
* import { withNotices, Button } from '@wordpress/components';
|
|
26
|
+
*
|
|
27
|
+
* const MyComponentWithNotices = withNotices(
|
|
28
|
+
* ( { noticeOperations, noticeUI } ) => {
|
|
29
|
+
* const addError = () =>
|
|
30
|
+
* noticeOperations.createErrorNotice( 'Error message' );
|
|
31
|
+
* return (
|
|
32
|
+
* <div>
|
|
33
|
+
* { noticeUI }
|
|
34
|
+
* <Button variant="secondary" onClick={ addError }>
|
|
35
|
+
* Add error
|
|
36
|
+
* </Button>
|
|
37
|
+
* </div>
|
|
38
|
+
* );
|
|
39
|
+
* }
|
|
40
|
+
* );
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* @param OriginalComponent Original component.
|
|
44
|
+
*
|
|
45
|
+
* @return Wrapped component.
|
|
46
|
+
*/
|
|
47
|
+
export default createHigherOrderComponent( ( OriginalComponent ) => {
|
|
48
|
+
function Component(
|
|
49
|
+
props: { [ key: string ]: any },
|
|
50
|
+
ref: React.ForwardedRef< any >
|
|
51
|
+
) {
|
|
52
|
+
const [ noticeList, setNoticeList ] = useState<
|
|
53
|
+
WithNoticeProps[ 'noticeList' ]
|
|
54
|
+
>( [] );
|
|
55
|
+
|
|
56
|
+
const noticeOperations = useMemo<
|
|
57
|
+
WithNoticeProps[ 'noticeOperations' ]
|
|
58
|
+
>( () => {
|
|
59
|
+
const createNotice: WithNoticeProps[ 'noticeOperations' ][ 'createNotice' ] =
|
|
60
|
+
( notice ) => {
|
|
61
|
+
const noticeToAdd = notice.id
|
|
62
|
+
? notice
|
|
63
|
+
: { ...notice, id: uuid() };
|
|
64
|
+
setNoticeList( ( current ) => [ ...current, noticeToAdd ] );
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
return {
|
|
68
|
+
createNotice,
|
|
69
|
+
createErrorNotice: ( msg ) => {
|
|
70
|
+
// @ts-expect-error TODO: Missing `id`, potentially a bug
|
|
71
|
+
createNotice( {
|
|
72
|
+
status: 'error',
|
|
73
|
+
content: msg,
|
|
74
|
+
} );
|
|
75
|
+
},
|
|
76
|
+
removeNotice: ( id ) => {
|
|
77
|
+
setNoticeList( ( current ) =>
|
|
78
|
+
current.filter( ( notice ) => notice.id !== id )
|
|
79
|
+
);
|
|
80
|
+
},
|
|
81
|
+
removeAllNotices: () => {
|
|
82
|
+
setNoticeList( [] );
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
}, [] );
|
|
86
|
+
|
|
87
|
+
const propsOut = {
|
|
88
|
+
...props,
|
|
89
|
+
noticeList,
|
|
90
|
+
noticeOperations,
|
|
91
|
+
noticeUI: noticeList.length > 0 && (
|
|
92
|
+
<NoticeList
|
|
93
|
+
className="components-with-notices-ui"
|
|
94
|
+
notices={ noticeList }
|
|
95
|
+
onRemove={ noticeOperations.removeNotice }
|
|
96
|
+
/>
|
|
97
|
+
),
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
return isForwardRef ? (
|
|
101
|
+
<OriginalComponent { ...propsOut } ref={ ref } />
|
|
102
|
+
) : (
|
|
103
|
+
<OriginalComponent { ...propsOut } />
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
let isForwardRef: boolean;
|
|
108
|
+
// @ts-expect-error - `render` will only be present when OriginalComponent was wrapped with forwardRef().
|
|
109
|
+
const { render } = OriginalComponent;
|
|
110
|
+
// Returns a forwardRef if OriginalComponent appears to be a forwardRef.
|
|
111
|
+
if ( typeof render === 'function' ) {
|
|
112
|
+
isForwardRef = true;
|
|
113
|
+
return forwardRef( Component );
|
|
114
|
+
}
|
|
115
|
+
return Component;
|
|
116
|
+
}, 'withNotices' );
|
|
@@ -24,25 +24,30 @@ import {
|
|
|
24
24
|
* Internal dependencies
|
|
25
25
|
*/
|
|
26
26
|
import withNotices from '..';
|
|
27
|
+
import type { WithNoticeProps } from '../types';
|
|
27
28
|
|
|
28
29
|
// Implementation detail of Notice component used to query the dismissal button.
|
|
29
30
|
const stockDismissText = 'Dismiss this notice';
|
|
30
31
|
|
|
31
|
-
function noticesFrom( list ) {
|
|
32
|
+
function noticesFrom( list: string[] ) {
|
|
32
33
|
return list.map( ( item ) => ( { id: item, content: item } ) );
|
|
33
34
|
}
|
|
34
35
|
|
|
35
|
-
function isComponentLike( object ) {
|
|
36
|
+
function isComponentLike( object: any ) {
|
|
36
37
|
return typeof object === 'function';
|
|
37
38
|
}
|
|
38
39
|
|
|
39
|
-
function isForwardRefLike( { render: renderMethod } ) {
|
|
40
|
+
function isForwardRefLike( { render: renderMethod }: any ) {
|
|
40
41
|
return typeof renderMethod === 'function';
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
const content = 'Base content';
|
|
44
45
|
|
|
45
|
-
const BaseComponent = ( {
|
|
46
|
+
const BaseComponent = ( {
|
|
47
|
+
noticeOperations,
|
|
48
|
+
noticeUI,
|
|
49
|
+
notifications,
|
|
50
|
+
}: WithNoticeProps & { notifications: ReturnType< typeof noticesFrom > } ) => {
|
|
46
51
|
useEffect( () => {
|
|
47
52
|
if ( notifications ) {
|
|
48
53
|
notifications.forEach( ( item ) =>
|
|
@@ -78,8 +83,8 @@ describe( 'withNotices return type', () => {
|
|
|
78
83
|
} );
|
|
79
84
|
|
|
80
85
|
describe( 'withNotices operations', () => {
|
|
81
|
-
let handle
|
|
82
|
-
const Handle = ( props ) => {
|
|
86
|
+
let handle: React.MutableRefObject< any >;
|
|
87
|
+
const Handle = ( props: any ) => {
|
|
83
88
|
handle = useRef();
|
|
84
89
|
return <TestNoticeOperations { ...props } ref={ handle } />;
|
|
85
90
|
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { NoticeListProps } from '../../notice/types';
|
|
5
|
+
|
|
6
|
+
export type WithNoticeProps = {
|
|
7
|
+
noticeList: NoticeListProps[ 'notices' ];
|
|
8
|
+
noticeOperations: {
|
|
9
|
+
/**
|
|
10
|
+
* Function passed down as a prop that adds a new notice.
|
|
11
|
+
*
|
|
12
|
+
* @param notice Notice to add.
|
|
13
|
+
*/
|
|
14
|
+
createNotice: (
|
|
15
|
+
notice: NoticeListProps[ 'notices' ][ number ]
|
|
16
|
+
) => void;
|
|
17
|
+
/**
|
|
18
|
+
* Function passed as a prop that adds a new error notice.
|
|
19
|
+
*
|
|
20
|
+
* @param msg Error message of the notice.
|
|
21
|
+
*/
|
|
22
|
+
createErrorNotice: ( msg: string ) => void;
|
|
23
|
+
/**
|
|
24
|
+
* Removes a notice by id.
|
|
25
|
+
*
|
|
26
|
+
* @param id Id of the notice to remove.
|
|
27
|
+
*/
|
|
28
|
+
removeNotice: ( id: string ) => void;
|
|
29
|
+
/**
|
|
30
|
+
* Removes all notices
|
|
31
|
+
*/
|
|
32
|
+
removeAllNotices: () => void;
|
|
33
|
+
};
|
|
34
|
+
noticeUI: false | JSX.Element;
|
|
35
|
+
};
|
|
@@ -12,7 +12,8 @@ describe( 'withSpokenMessages', () => {
|
|
|
12
12
|
it( 'should generate speak and debouncedSpeak props', () => {
|
|
13
13
|
const testSpeak = jest.fn();
|
|
14
14
|
const testDebouncedSpeak = jest.fn();
|
|
15
|
-
const isFunction = ( maybeFunc ) =>
|
|
15
|
+
const isFunction = ( maybeFunc: any ) =>
|
|
16
|
+
typeof maybeFunc === 'function';
|
|
16
17
|
const DumpComponent = withSpokenMessages(
|
|
17
18
|
( { speak, debouncedSpeak } ) => {
|
|
18
19
|
testSpeak( isFunction( speak ) );
|
package/src/icon/index.tsx
CHANGED
|
@@ -9,7 +9,6 @@ import type { ComponentType, HTMLProps, SVGProps } from 'react';
|
|
|
9
9
|
import {
|
|
10
10
|
cloneElement,
|
|
11
11
|
createElement,
|
|
12
|
-
Component,
|
|
13
12
|
isValidElement,
|
|
14
13
|
} from '@wordpress/element';
|
|
15
14
|
import { SVG } from '@wordpress/primitives';
|
|
@@ -20,16 +19,20 @@ import { SVG } from '@wordpress/primitives';
|
|
|
20
19
|
import Dashicon from '../dashicon';
|
|
21
20
|
import type { IconKey as DashiconIconKey } from '../dashicon/types';
|
|
22
21
|
|
|
23
|
-
export type IconType
|
|
22
|
+
export type IconType =
|
|
23
|
+
| DashiconIconKey
|
|
24
|
+
| ComponentType< { size?: number } >
|
|
25
|
+
| ( ( props: { size?: number } ) => JSX.Element )
|
|
26
|
+
| JSX.Element;
|
|
24
27
|
|
|
25
|
-
interface BaseProps
|
|
28
|
+
interface BaseProps {
|
|
26
29
|
/**
|
|
27
30
|
* The icon to render. Supported values are: Dashicons (specified as
|
|
28
31
|
* strings), functions, Component instances and `null`.
|
|
29
32
|
*
|
|
30
33
|
* @default null
|
|
31
34
|
*/
|
|
32
|
-
icon?: IconType
|
|
35
|
+
icon?: IconType | null;
|
|
33
36
|
/**
|
|
34
37
|
* The size (width and height) of the icon.
|
|
35
38
|
*
|
|
@@ -44,13 +47,13 @@ type AdditionalProps< T > = T extends ComponentType< infer U >
|
|
|
44
47
|
? SVGProps< SVGSVGElement >
|
|
45
48
|
: {};
|
|
46
49
|
|
|
47
|
-
export type Props
|
|
50
|
+
export type Props = BaseProps & AdditionalProps< IconType >;
|
|
48
51
|
|
|
49
|
-
function Icon
|
|
52
|
+
function Icon( {
|
|
50
53
|
icon = null,
|
|
51
54
|
size = 'string' === typeof icon ? 20 : 24,
|
|
52
55
|
...additionalProps
|
|
53
|
-
}: Props
|
|
56
|
+
}: Props ) {
|
|
54
57
|
if ( 'string' === typeof icon ) {
|
|
55
58
|
return (
|
|
56
59
|
<Dashicon
|
|
@@ -68,14 +71,7 @@ function Icon< P >( {
|
|
|
68
71
|
}
|
|
69
72
|
|
|
70
73
|
if ( 'function' === typeof icon ) {
|
|
71
|
-
|
|
72
|
-
return createElement( icon, {
|
|
73
|
-
size,
|
|
74
|
-
...additionalProps,
|
|
75
|
-
} as unknown as P );
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
return ( icon as ( ...args: any[] ) => JSX.Element )( {
|
|
74
|
+
return createElement( icon, {
|
|
79
75
|
size,
|
|
80
76
|
...additionalProps,
|
|
81
77
|
} );
|
|
@@ -3,11 +3,15 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { render, screen } from '@testing-library/react';
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* WordPress dependencies
|
|
8
|
+
*/
|
|
9
|
+
import { Path, SVG } from '@wordpress/primitives';
|
|
10
|
+
|
|
6
11
|
/**
|
|
7
12
|
* Internal dependencies
|
|
8
13
|
*/
|
|
9
|
-
import Icon from '
|
|
10
|
-
import { Path, SVG } from '../../';
|
|
14
|
+
import Icon from '..';
|
|
11
15
|
|
|
12
16
|
describe( 'Icon', () => {
|
|
13
17
|
const testId = 'icon';
|
package/src/index.native.js
CHANGED
|
@@ -35,6 +35,7 @@ export {
|
|
|
35
35
|
|
|
36
36
|
export { default as __experimentalStyleProvider } from './style-provider';
|
|
37
37
|
export { default as BaseControl } from './base-control';
|
|
38
|
+
export { hasSplitBorders as __experimentalHasSplitBorders } from './border-box-control/utils';
|
|
38
39
|
export { default as TextareaControl } from './textarea-control';
|
|
39
40
|
export { default as PanelBody } from './panel/body';
|
|
40
41
|
export { default as PanelActions } from './panel/actions';
|
|
@@ -234,7 +234,7 @@ class BottomSheetCell extends Component {
|
|
|
234
234
|
// we show the TextInput just when the user wants to edit the value,
|
|
235
235
|
// and the Text component to display it.
|
|
236
236
|
// We also show the TextInput to display placeholder.
|
|
237
|
-
const shouldShowPlaceholder =
|
|
237
|
+
const shouldShowPlaceholder = isInteractive && value === '';
|
|
238
238
|
return this.state.isEditingValue || shouldShowPlaceholder ? (
|
|
239
239
|
<TextInput
|
|
240
240
|
ref={ ( c ) => ( this._valueTextInput = c ) }
|
|
@@ -64,7 +64,14 @@ A function that receives the value that's input into the text editor.
|
|
|
64
64
|
|
|
65
65
|
#### placeholder
|
|
66
66
|
|
|
67
|
-
The placeholder text that will display in the component's subsheet
|
|
67
|
+
The placeholder text that will display in the component's cell and subsheet when there is no set value.
|
|
68
|
+
|
|
69
|
+
- Type: `String`
|
|
70
|
+
- Required: No
|
|
71
|
+
|
|
72
|
+
### cellPlaceholder
|
|
73
|
+
|
|
74
|
+
The placeholder text that will display in the component's cell when there is no set value. The `cellPlaceholder` will override the more generic placeholder prop when set, enabling the placeholders in the component's cell and subsheet to be different if desired.
|
|
68
75
|
|
|
69
76
|
- Type: `String`
|
|
70
77
|
- Required: No
|
|
@@ -28,6 +28,7 @@ const BottomSheetTextControl = ( {
|
|
|
28
28
|
label,
|
|
29
29
|
icon,
|
|
30
30
|
footerNote,
|
|
31
|
+
cellPlaceholder,
|
|
31
32
|
} ) => {
|
|
32
33
|
const [ showSubSheet, setShowSubSheet ] = useState( false );
|
|
33
34
|
const navigation = useNavigation();
|
|
@@ -57,10 +58,10 @@ const BottomSheetTextControl = ( {
|
|
|
57
58
|
navigationButton={
|
|
58
59
|
<BottomSheet.Cell
|
|
59
60
|
icon={ icon }
|
|
60
|
-
placeholder={ placeholder }
|
|
61
61
|
label={ label }
|
|
62
62
|
onPress={ openSubSheet }
|
|
63
63
|
value={ initialValue || '' }
|
|
64
|
+
placeholder={ cellPlaceholder || placeholder || '' }
|
|
64
65
|
>
|
|
65
66
|
<Icon icon={ chevronRight }></Icon>
|
|
66
67
|
</BottomSheet.Cell>
|
|
@@ -10,7 +10,7 @@ import { render, fireEvent, waitFor } from 'test/helpers';
|
|
|
10
10
|
import LinkSettingsNavigation from '../link-settings-navigation';
|
|
11
11
|
|
|
12
12
|
beforeAll( () => {
|
|
13
|
-
jest.useFakeTimers(
|
|
13
|
+
jest.useFakeTimers( { legacyFakeTimers: true } );
|
|
14
14
|
} );
|
|
15
15
|
|
|
16
16
|
afterAll( () => {
|
package/src/navigation/README.md
CHANGED
|
@@ -122,7 +122,7 @@ The unique identifier of the menu. The root menu can omit this, and it will defa
|
|
|
122
122
|
|
|
123
123
|
### onSearch
|
|
124
124
|
|
|
125
|
-
- Type: `
|
|
125
|
+
- Type: `( searchString: string ) => void;`
|
|
126
126
|
- Required: No
|
|
127
127
|
|
|
128
128
|
When `hasSearch` is active, this function handles the search input's `onChange` event, making it controlled from the outside. It requires setting the `search` prop as well.
|
|
@@ -162,6 +162,13 @@ Indicates whether the menu is empty or not. Used together with the `hideIfTarget
|
|
|
162
162
|
|
|
163
163
|
The menu title. It's also the field used by the menu search function.
|
|
164
164
|
|
|
165
|
+
### `titleAction`
|
|
166
|
+
|
|
167
|
+
- Type: `React.ReactNode`
|
|
168
|
+
- Required: No
|
|
169
|
+
|
|
170
|
+
Use this prop to render additional actions in the menu title.
|
|
171
|
+
|
|
165
172
|
## Navigation Group Props
|
|
166
173
|
|
|
167
174
|
`NavigationGroup` supports the following props.
|
|
@@ -205,6 +212,13 @@ Optional className for the `NavigationItem` component.
|
|
|
205
212
|
|
|
206
213
|
If provided, renders `a` instead of `button`.
|
|
207
214
|
|
|
215
|
+
### `icon`
|
|
216
|
+
|
|
217
|
+
- Type: `JSX.Element`
|
|
218
|
+
- Required: No
|
|
219
|
+
|
|
220
|
+
If no `children` are passed, this prop allows to specify a custom icon for the menu item.
|
|
221
|
+
|
|
208
222
|
### `item`
|
|
209
223
|
|
|
210
224
|
- Type: `string`
|
|
@@ -228,7 +242,7 @@ Indicates whether this item should be hidden if the menu specified in `navigateT
|
|
|
228
242
|
|
|
229
243
|
### `onClick`
|
|
230
244
|
|
|
231
|
-
- Type: `
|
|
245
|
+
- Type: `React.MouseEventHandler`
|
|
232
246
|
- Required: No
|
|
233
247
|
|
|
234
248
|
A callback to handle clicking on a menu item.
|