@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
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { buildTermsTree } from './terms';
|
|
5
5
|
import TreeSelect from '../tree-select';
|
|
6
|
-
import type { TreeSelectProps } from '../tree-select/types';
|
|
7
6
|
|
|
8
7
|
/**
|
|
9
8
|
* WordPress dependencies
|
|
@@ -28,11 +27,7 @@ export default function CategorySelect( {
|
|
|
28
27
|
{ ...{
|
|
29
28
|
label,
|
|
30
29
|
noOptionLabel,
|
|
31
|
-
|
|
32
|
-
// safe to assume that the argument of `onChange` cannot be `string[]`.
|
|
33
|
-
// The correct solution would be to type `SelectControl` better, so that
|
|
34
|
-
// the type of `value` and `onChange` vary depending on `multiple`.
|
|
35
|
-
onChange: onChangeProp as TreeSelectProps[ 'onChange' ],
|
|
30
|
+
onChange: onChangeProp,
|
|
36
31
|
} }
|
|
37
32
|
tree={ termsTree }
|
|
38
33
|
selectedId={
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* External dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { groupBy } from 'lodash';
|
|
5
|
-
|
|
6
1
|
/**
|
|
7
2
|
* Internal dependencies
|
|
8
3
|
*/
|
|
@@ -13,6 +8,11 @@ import type {
|
|
|
13
8
|
TermsByParent,
|
|
14
9
|
} from './types';
|
|
15
10
|
|
|
11
|
+
const ensureParentsAreDefined = (
|
|
12
|
+
terms: TermWithParentAndChildren[]
|
|
13
|
+
): terms is ( TermWithParentAndChildren & { parent: number } )[] => {
|
|
14
|
+
return terms.every( ( term ) => term.parent !== null );
|
|
15
|
+
};
|
|
16
16
|
/**
|
|
17
17
|
* Returns terms in a tree form.
|
|
18
18
|
*
|
|
@@ -22,22 +22,33 @@ import type {
|
|
|
22
22
|
*/
|
|
23
23
|
export function buildTermsTree( flatTerms: readonly ( Author | Category )[] ) {
|
|
24
24
|
const flatTermsWithParentAndChildren: TermWithParentAndChildren[] =
|
|
25
|
-
flatTerms.map( ( term ) => {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
};
|
|
32
|
-
} );
|
|
25
|
+
flatTerms.map( ( term ) => ( {
|
|
26
|
+
children: [],
|
|
27
|
+
parent: null,
|
|
28
|
+
...term,
|
|
29
|
+
id: String( term.id ),
|
|
30
|
+
} ) );
|
|
33
31
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
if (
|
|
32
|
+
// We use a custom type guard here to ensure that the parent property is
|
|
33
|
+
// defined on all terms. The type of the `parent` property is `number | null`
|
|
34
|
+
// and we need to ensure that it is `number`. This is because we use the
|
|
35
|
+
// `parent` property as a key in the `termsByParent` object.
|
|
36
|
+
if ( ! ensureParentsAreDefined( flatTermsWithParentAndChildren ) ) {
|
|
39
37
|
return flatTermsWithParentAndChildren;
|
|
40
38
|
}
|
|
39
|
+
|
|
40
|
+
const termsByParent = flatTermsWithParentAndChildren.reduce(
|
|
41
|
+
( acc: TermsByParent, term ) => {
|
|
42
|
+
const { parent } = term;
|
|
43
|
+
if ( ! acc[ parent ] ) {
|
|
44
|
+
acc[ parent ] = [];
|
|
45
|
+
}
|
|
46
|
+
acc[ parent ].push( term );
|
|
47
|
+
return acc;
|
|
48
|
+
},
|
|
49
|
+
{}
|
|
50
|
+
);
|
|
51
|
+
|
|
41
52
|
const fillWithChildren = (
|
|
42
53
|
terms: TermWithParentAndChildren[]
|
|
43
54
|
): TermWithParentAndChildren[] => {
|
|
@@ -40,12 +40,8 @@ import type { WordPressComponentProps } from '../ui/context';
|
|
|
40
40
|
|
|
41
41
|
const noop = () => {};
|
|
42
42
|
|
|
43
|
-
function UnforwardedRangeControl
|
|
44
|
-
props: WordPressComponentProps<
|
|
45
|
-
RangeControlProps< IconProps >,
|
|
46
|
-
'input',
|
|
47
|
-
false
|
|
48
|
-
>,
|
|
43
|
+
function UnforwardedRangeControl(
|
|
44
|
+
props: WordPressComponentProps< RangeControlProps, 'input', false >,
|
|
49
45
|
forwardedRef: ForwardedRef< HTMLInputElement >
|
|
50
46
|
) {
|
|
51
47
|
const {
|
|
@@ -269,7 +265,11 @@ function UnforwardedRangeControl< IconProps = unknown >(
|
|
|
269
265
|
style={ { width: fillValueOffset } }
|
|
270
266
|
trackColor={ trackColor }
|
|
271
267
|
/>
|
|
272
|
-
<ThumbWrapper
|
|
268
|
+
<ThumbWrapper
|
|
269
|
+
className="components-range-control__thumb-wrapper"
|
|
270
|
+
style={ offsetStyle }
|
|
271
|
+
disabled={ disabled }
|
|
272
|
+
>
|
|
273
273
|
<Thumb
|
|
274
274
|
aria-hidden={ true }
|
|
275
275
|
isFocused={ isThumbFocused }
|
|
@@ -74,7 +74,7 @@ export type RangeMarkProps = {
|
|
|
74
74
|
|
|
75
75
|
export type ControlledRangeValue = number | '' | null;
|
|
76
76
|
|
|
77
|
-
export type RangeControlProps
|
|
77
|
+
export type RangeControlProps = Pick<
|
|
78
78
|
BaseControlProps,
|
|
79
79
|
'hideLabelFromVision' | 'help' | '__nextHasNoMarginBottom'
|
|
80
80
|
> &
|
|
@@ -86,7 +86,7 @@ export type RangeControlProps< IconProps = unknown > = Pick<
|
|
|
86
86
|
* For more information on `IconType` see the Icon component:
|
|
87
87
|
* /packages/components/src/icon/index.tsx
|
|
88
88
|
*/
|
|
89
|
-
afterIcon?: IconType
|
|
89
|
+
afterIcon?: IconType;
|
|
90
90
|
/**
|
|
91
91
|
* If this property is true, a button to reset the slider is
|
|
92
92
|
* rendered.
|
|
@@ -101,7 +101,7 @@ export type RangeControlProps< IconProps = unknown > = Pick<
|
|
|
101
101
|
* For more information on `IconType` see the Icon component:
|
|
102
102
|
* /packages/components/src/icon/index.tsx
|
|
103
103
|
*/
|
|
104
|
-
beforeIcon?: IconType
|
|
104
|
+
beforeIcon?: IconType;
|
|
105
105
|
/**
|
|
106
106
|
* CSS color string for the `RangeControl` wrapper.
|
|
107
107
|
*
|
|
@@ -7,7 +7,7 @@ import styled from '@emotion/styled';
|
|
|
7
7
|
* Internal dependencies
|
|
8
8
|
*/
|
|
9
9
|
import { Text } from '../../../text';
|
|
10
|
-
import { COLORS } from '../../../utils';
|
|
10
|
+
import { font, COLORS } from '../../../utils';
|
|
11
11
|
|
|
12
12
|
export const Root = styled.div`
|
|
13
13
|
bottom: 0;
|
|
@@ -33,6 +33,7 @@ export const Tooltip = styled.div`
|
|
|
33
33
|
background: ${ COLORS.gray[ 900 ] };
|
|
34
34
|
border-radius: 2px;
|
|
35
35
|
box-sizing: border-box;
|
|
36
|
+
font-family: ${ font( 'default.fontFamily' ) };
|
|
36
37
|
font-size: 12px;
|
|
37
38
|
color: ${ COLORS.ui.textDark };
|
|
38
39
|
padding: 4px 8px;
|
|
@@ -17,6 +17,12 @@ const MyResponsiveWrapper = () => (
|
|
|
17
17
|
);
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
+
### Usage with `SVG` elements
|
|
21
|
+
|
|
22
|
+
When passing an `SVG` element as the `<ResponsiveWrapper />`'s child, make sure that it has the `viewbox` and the `preserveAspectRatio` set.
|
|
23
|
+
|
|
24
|
+
When dealing with SVGs, it may not be possible to derive its `naturalWidth` and `naturalHeight` and therefore passing them as propertied to `<ResponsiveWrapper />`. In this case, the SVG simply keeps scaling up to fill its container, unless the `height` and `width` attributes are specified.
|
|
25
|
+
|
|
20
26
|
## Props
|
|
21
27
|
|
|
22
28
|
### `children`: `React.ReactElement`
|
|
@@ -36,10 +42,10 @@ If true, the wrapper will be `span` instead of `div`.
|
|
|
36
42
|
|
|
37
43
|
The intrinsic height of the element to wrap. Will be used to determine the aspect ratio.
|
|
38
44
|
|
|
39
|
-
- Required:
|
|
45
|
+
- Required: No
|
|
40
46
|
|
|
41
47
|
### `naturalWidth`: `number`
|
|
42
48
|
|
|
43
49
|
The intrinsic width of the element to wrap. Will be used to determine the aspect ratio.
|
|
44
50
|
|
|
45
|
-
- Required:
|
|
51
|
+
- Required: No
|
|
@@ -7,7 +7,6 @@ import classnames from 'classnames';
|
|
|
7
7
|
* WordPress dependencies
|
|
8
8
|
*/
|
|
9
9
|
import { cloneElement, Children } from '@wordpress/element';
|
|
10
|
-
import { useResizeObserver } from '@wordpress/compose';
|
|
11
10
|
|
|
12
11
|
/**
|
|
13
12
|
* Internal dependencies
|
|
@@ -36,28 +35,30 @@ function ResponsiveWrapper( {
|
|
|
36
35
|
children,
|
|
37
36
|
isInline = false,
|
|
38
37
|
}: ResponsiveWrapperProps ) {
|
|
39
|
-
const [ containerResizeListener, { width: containerWidth } ] =
|
|
40
|
-
useResizeObserver();
|
|
41
38
|
if ( Children.count( children ) !== 1 ) {
|
|
42
39
|
return null;
|
|
43
40
|
}
|
|
44
|
-
|
|
45
|
-
paddingBottom:
|
|
46
|
-
naturalWidth < ( containerWidth ?? 0 )
|
|
47
|
-
? naturalHeight
|
|
48
|
-
: ( naturalHeight / naturalWidth ) * 100 + '%',
|
|
49
|
-
};
|
|
41
|
+
|
|
50
42
|
const TagName = isInline ? 'span' : 'div';
|
|
43
|
+
let aspectRatio;
|
|
44
|
+
if ( naturalWidth && naturalHeight ) {
|
|
45
|
+
aspectRatio = `${ naturalWidth } / ${ naturalHeight }`;
|
|
46
|
+
}
|
|
47
|
+
|
|
51
48
|
return (
|
|
52
49
|
<TagName className="components-responsive-wrapper">
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
50
|
+
<div>
|
|
51
|
+
{ cloneElement( children, {
|
|
52
|
+
className: classnames(
|
|
53
|
+
'components-responsive-wrapper__content',
|
|
54
|
+
children.props.className
|
|
55
|
+
),
|
|
56
|
+
style: {
|
|
57
|
+
...children.props.style,
|
|
58
|
+
aspectRatio,
|
|
59
|
+
},
|
|
60
|
+
} ) }
|
|
61
|
+
</div>
|
|
61
62
|
</TagName>
|
|
62
63
|
);
|
|
63
64
|
}
|
|
@@ -36,3 +36,44 @@ Default.args = {
|
|
|
36
36
|
/>
|
|
37
37
|
),
|
|
38
38
|
};
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* When passing an `SVG` element as the `<ResponsiveWrapper />`'s child, make
|
|
42
|
+
* sure that it has the `viewbox` and the `preserveAspectRatio` set.
|
|
43
|
+
*
|
|
44
|
+
* When dealing with SVGs, it may not be possible to derive its `naturalWidth`
|
|
45
|
+
* and `naturalHeight` and therefore passing them as propertied to
|
|
46
|
+
* `<ResponsiveWrapper />`. In this case, the SVG simply keeps scaling up to fill
|
|
47
|
+
* its container, unless the `height` and `width` attributes are specified.
|
|
48
|
+
*/
|
|
49
|
+
export const WithSVG: ComponentStory< typeof ResponsiveWrapper > =
|
|
50
|
+
Template.bind( {} );
|
|
51
|
+
WithSVG.args = {
|
|
52
|
+
children: (
|
|
53
|
+
<svg
|
|
54
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
55
|
+
viewBox="0 0 280 640"
|
|
56
|
+
preserveAspectRatio="xMinYMin meet"
|
|
57
|
+
width="280px"
|
|
58
|
+
height="640px"
|
|
59
|
+
>
|
|
60
|
+
<rect
|
|
61
|
+
x="0"
|
|
62
|
+
y="0"
|
|
63
|
+
width="280"
|
|
64
|
+
height="640"
|
|
65
|
+
style={ { fill: 'blue' } }
|
|
66
|
+
/>
|
|
67
|
+
<g>
|
|
68
|
+
<circle style={ { fill: 'red' } } cx="140" cy="160" r="60" />
|
|
69
|
+
<circle style={ { fill: 'yellow' } } cx="140" cy="320" r="60" />
|
|
70
|
+
<circle
|
|
71
|
+
style={ { fill: '#40CC40' } }
|
|
72
|
+
cx="140"
|
|
73
|
+
cy="480"
|
|
74
|
+
r="60"
|
|
75
|
+
/>
|
|
76
|
+
</g>
|
|
77
|
+
</svg>
|
|
78
|
+
),
|
|
79
|
+
};
|
|
@@ -1,19 +1,13 @@
|
|
|
1
1
|
.components-responsive-wrapper {
|
|
2
2
|
position: relative;
|
|
3
3
|
max-width: 100%;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: center;
|
|
8
7
|
}
|
|
9
8
|
|
|
10
9
|
.components-responsive-wrapper__content {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
right: 0;
|
|
14
|
-
bottom: 0;
|
|
15
|
-
left: 0;
|
|
10
|
+
display: block;
|
|
11
|
+
max-width: 100%;
|
|
16
12
|
width: 100%;
|
|
17
|
-
height: 100%;
|
|
18
|
-
margin: auto;
|
|
19
13
|
}
|
|
@@ -2,11 +2,11 @@ export type ResponsiveWrapperProps = {
|
|
|
2
2
|
/**
|
|
3
3
|
* The intrinsic width of the element to wrap. Will be used to determine the aspect ratio.
|
|
4
4
|
*/
|
|
5
|
-
naturalWidth
|
|
5
|
+
naturalWidth?: number;
|
|
6
6
|
/**
|
|
7
7
|
* The intrinsic height of the element to wrap. Will be used to determine the aspect ratio.
|
|
8
8
|
*/
|
|
9
|
-
naturalHeight
|
|
9
|
+
naturalHeight?: number;
|
|
10
10
|
/**
|
|
11
11
|
* The element to wrap.
|
|
12
12
|
*/
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
4
|
import classNames from 'classnames';
|
|
5
|
-
import type { ChangeEvent, FocusEvent, ForwardedRef } from 'react';
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* WordPress dependencies
|
|
@@ -30,7 +29,10 @@ function useUniqueId( idProp?: string ) {
|
|
|
30
29
|
}
|
|
31
30
|
|
|
32
31
|
function UnforwardedSelectControl(
|
|
33
|
-
|
|
32
|
+
props: WordPressComponentProps< SelectControlProps, 'select', false >,
|
|
33
|
+
ref: React.ForwardedRef< HTMLSelectElement >
|
|
34
|
+
) {
|
|
35
|
+
const {
|
|
34
36
|
className,
|
|
35
37
|
disabled = false,
|
|
36
38
|
help,
|
|
@@ -39,7 +41,7 @@ function UnforwardedSelectControl(
|
|
|
39
41
|
label,
|
|
40
42
|
multiple = false,
|
|
41
43
|
onBlur = noop,
|
|
42
|
-
onChange
|
|
44
|
+
onChange,
|
|
43
45
|
onFocus = noop,
|
|
44
46
|
options = [],
|
|
45
47
|
size = 'default',
|
|
@@ -50,10 +52,8 @@ function UnforwardedSelectControl(
|
|
|
50
52
|
suffix,
|
|
51
53
|
__next36pxDefaultSize = false,
|
|
52
54
|
__nextHasNoMarginBottom = false,
|
|
53
|
-
...
|
|
54
|
-
}
|
|
55
|
-
ref: ForwardedRef< HTMLSelectElement >
|
|
56
|
-
) {
|
|
55
|
+
...restProps
|
|
56
|
+
} = props;
|
|
57
57
|
const [ isFocused, setIsFocused ] = useState( false );
|
|
58
58
|
const id = useUniqueId( idProp );
|
|
59
59
|
const helpId = help ? `${ id }__help` : undefined;
|
|
@@ -61,32 +61,33 @@ function UnforwardedSelectControl(
|
|
|
61
61
|
// Disable reason: A select with an onchange throws a warning.
|
|
62
62
|
if ( ! options?.length && ! children ) return null;
|
|
63
63
|
|
|
64
|
-
const handleOnBlur = ( event: FocusEvent< HTMLSelectElement > ) => {
|
|
64
|
+
const handleOnBlur = ( event: React.FocusEvent< HTMLSelectElement > ) => {
|
|
65
65
|
onBlur( event );
|
|
66
66
|
setIsFocused( false );
|
|
67
67
|
};
|
|
68
68
|
|
|
69
|
-
const handleOnFocus = ( event: FocusEvent< HTMLSelectElement > ) => {
|
|
69
|
+
const handleOnFocus = ( event: React.FocusEvent< HTMLSelectElement > ) => {
|
|
70
70
|
onFocus( event );
|
|
71
71
|
setIsFocused( true );
|
|
72
72
|
};
|
|
73
73
|
|
|
74
|
-
const handleOnChange = (
|
|
75
|
-
|
|
74
|
+
const handleOnChange = (
|
|
75
|
+
event: React.ChangeEvent< HTMLSelectElement >
|
|
76
|
+
) => {
|
|
77
|
+
if ( props.multiple ) {
|
|
76
78
|
const selectedOptions = Array.from( event.target.options ).filter(
|
|
77
79
|
( { selected } ) => selected
|
|
78
80
|
);
|
|
79
81
|
const newValues = selectedOptions.map( ( { value } ) => value );
|
|
80
|
-
onChange( newValues );
|
|
82
|
+
props.onChange?.( newValues, { event } );
|
|
81
83
|
return;
|
|
82
84
|
}
|
|
83
85
|
|
|
84
|
-
onChange( event.target.value, { event } );
|
|
86
|
+
props.onChange?.( event.target.value, { event } );
|
|
85
87
|
};
|
|
86
88
|
|
|
87
89
|
const classes = classNames( 'components-select-control', className );
|
|
88
90
|
|
|
89
|
-
/* eslint-disable jsx-a11y/no-onchange */
|
|
90
91
|
return (
|
|
91
92
|
<BaseControl
|
|
92
93
|
help={ help }
|
|
@@ -109,7 +110,7 @@ function UnforwardedSelectControl(
|
|
|
109
110
|
__next36pxDefaultSize={ __next36pxDefaultSize }
|
|
110
111
|
>
|
|
111
112
|
<Select
|
|
112
|
-
{ ...
|
|
113
|
+
{ ...restProps }
|
|
113
114
|
__next36pxDefaultSize={ __next36pxDefaultSize }
|
|
114
115
|
aria-describedby={ helpId }
|
|
115
116
|
className="components-select-control__input"
|
|
@@ -143,7 +144,6 @@ function UnforwardedSelectControl(
|
|
|
143
144
|
</InputBase>
|
|
144
145
|
</BaseControl>
|
|
145
146
|
);
|
|
146
|
-
/* eslint-enable jsx-a11y/no-onchange */
|
|
147
147
|
}
|
|
148
148
|
|
|
149
149
|
/**
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
4
|
import type { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
5
|
-
import type { ComponentProps } from 'react';
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* WordPress dependencies
|
|
@@ -32,20 +31,33 @@ const meta: ComponentMeta< typeof SelectControl > = {
|
|
|
32
31
|
};
|
|
33
32
|
export default meta;
|
|
34
33
|
|
|
35
|
-
const SelectControlWithState: ComponentStory< typeof SelectControl > = (
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
34
|
+
const SelectControlWithState: ComponentStory< typeof SelectControl > = (
|
|
35
|
+
props
|
|
36
|
+
) => {
|
|
37
|
+
const [ selection, setSelection ] = useState< string[] >();
|
|
38
|
+
|
|
39
|
+
if ( props.multiple ) {
|
|
40
|
+
return (
|
|
41
|
+
<SelectControl
|
|
42
|
+
{ ...props }
|
|
43
|
+
multiple
|
|
44
|
+
value={ selection }
|
|
45
|
+
onChange={ ( value ) => {
|
|
46
|
+
setSelection( value );
|
|
47
|
+
props.onChange?.( value );
|
|
48
|
+
} }
|
|
49
|
+
/>
|
|
50
|
+
);
|
|
51
|
+
}
|
|
41
52
|
|
|
42
53
|
return (
|
|
43
54
|
<SelectControl
|
|
44
|
-
{ ...
|
|
45
|
-
|
|
55
|
+
{ ...props }
|
|
56
|
+
multiple={ false }
|
|
57
|
+
value={ selection?.[ 0 ] }
|
|
46
58
|
onChange={ ( value ) => {
|
|
47
|
-
setSelection( value );
|
|
48
|
-
onChange?.( value );
|
|
59
|
+
setSelection( [ value ] );
|
|
60
|
+
props.onChange?.( value );
|
|
49
61
|
} }
|
|
50
62
|
/>
|
|
51
63
|
);
|
|
@@ -70,7 +82,7 @@ WithLabelAndHelpText.args = {
|
|
|
70
82
|
|
|
71
83
|
/**
|
|
72
84
|
* As an alternative to the `options` prop, `optgroup`s and `options` can be
|
|
73
|
-
* passed in as `children` for more
|
|
85
|
+
* passed in as `children` for more customizeability.
|
|
74
86
|
*/
|
|
75
87
|
export const WithCustomChildren: ComponentStory< typeof SelectControl > = (
|
|
76
88
|
args
|
|
@@ -9,19 +9,46 @@ import type { ChangeEvent, FocusEvent, ReactNode } from 'react';
|
|
|
9
9
|
import type { InputBaseProps } from '../input-control/types';
|
|
10
10
|
import type { BaseControlProps } from '../base-control/types';
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
12
|
+
type SelectControlBaseProps = Pick<
|
|
13
|
+
InputBaseProps,
|
|
14
|
+
| '__next36pxDefaultSize'
|
|
15
|
+
| 'disabled'
|
|
16
|
+
| 'hideLabelFromVision'
|
|
17
|
+
| 'label'
|
|
18
|
+
| 'labelPosition'
|
|
19
|
+
| 'prefix'
|
|
20
|
+
| 'size'
|
|
21
|
+
| 'suffix'
|
|
22
|
+
> &
|
|
23
|
+
Pick< BaseControlProps, 'help' | '__nextHasNoMarginBottom' > & {
|
|
24
|
+
onBlur?: ( event: FocusEvent< HTMLSelectElement > ) => void;
|
|
25
|
+
onFocus?: ( event: FocusEvent< HTMLSelectElement > ) => void;
|
|
26
|
+
options?: {
|
|
27
|
+
/**
|
|
28
|
+
* The label to be shown to the user.
|
|
29
|
+
*/
|
|
30
|
+
label: string;
|
|
31
|
+
/**
|
|
32
|
+
* The internal value used to choose the selected value.
|
|
33
|
+
* This is also the value passed to `onChange` when the option is selected.
|
|
34
|
+
*/
|
|
35
|
+
value: string;
|
|
36
|
+
id?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Whether or not the option should have the disabled attribute.
|
|
39
|
+
*
|
|
40
|
+
* @default false
|
|
41
|
+
*/
|
|
42
|
+
disabled?: boolean;
|
|
43
|
+
}[];
|
|
44
|
+
/**
|
|
45
|
+
* As an alternative to the `options` prop, `optgroup`s and `options` can be
|
|
46
|
+
* passed in as `children` for more customizability.
|
|
47
|
+
*/
|
|
48
|
+
children?: ReactNode;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export type SelectControlSingleSelectionProps = SelectControlBaseProps & {
|
|
25
52
|
/**
|
|
26
53
|
* If this property is added, multiple values can be selected. The `value` passed should be an array.
|
|
27
54
|
*
|
|
@@ -29,9 +56,8 @@ export interface SelectControlProps
|
|
|
29
56
|
*
|
|
30
57
|
* @default false
|
|
31
58
|
*/
|
|
32
|
-
multiple?:
|
|
33
|
-
|
|
34
|
-
onFocus?: ( event: FocusEvent< HTMLSelectElement > ) => void;
|
|
59
|
+
multiple?: false;
|
|
60
|
+
value?: string;
|
|
35
61
|
/**
|
|
36
62
|
* A function that receives the value of the new option that is being selected as input.
|
|
37
63
|
*
|
|
@@ -39,31 +65,33 @@ export interface SelectControlProps
|
|
|
39
65
|
* Otherwise, the value received is a single value with the new selected value.
|
|
40
66
|
*/
|
|
41
67
|
onChange?: (
|
|
42
|
-
value: string
|
|
68
|
+
value: string,
|
|
43
69
|
extra?: { event?: ChangeEvent< HTMLSelectElement > }
|
|
44
70
|
) => void;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
*/
|
|
49
|
-
label: string;
|
|
50
|
-
/**
|
|
51
|
-
* The internal value used to choose the selected value.
|
|
52
|
-
* This is also the value passed to `onChange` when the option is selected.
|
|
53
|
-
*/
|
|
54
|
-
value: string;
|
|
55
|
-
id?: string;
|
|
56
|
-
/**
|
|
57
|
-
* Whether or not the option should have the disabled attribute.
|
|
58
|
-
*
|
|
59
|
-
* @default false
|
|
60
|
-
*/
|
|
61
|
-
disabled?: boolean;
|
|
62
|
-
}[];
|
|
63
|
-
value?: string | string[];
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export type SelectControlMultipleSelectionProps = SelectControlBaseProps & {
|
|
64
74
|
/**
|
|
65
|
-
*
|
|
66
|
-
*
|
|
75
|
+
* If this property is added, multiple values can be selected. The `value` passed should be an array.
|
|
76
|
+
*
|
|
77
|
+
* In most cases, it is preferable to use the `FormTokenField` or `CheckboxControl` components instead.
|
|
78
|
+
*
|
|
79
|
+
* @default false
|
|
80
|
+
*/
|
|
81
|
+
multiple: true;
|
|
82
|
+
value?: string[];
|
|
83
|
+
/**
|
|
84
|
+
* A function that receives the value of the new option that is being selected as input.
|
|
85
|
+
*
|
|
86
|
+
* If `multiple` is `true`, the value received is an array of the selected value.
|
|
87
|
+
* Otherwise, the value received is a single value with the new selected value.
|
|
67
88
|
*/
|
|
68
|
-
|
|
69
|
-
|
|
89
|
+
onChange?: (
|
|
90
|
+
value: string[],
|
|
91
|
+
extra?: { event?: ChangeEvent< HTMLSelectElement > }
|
|
92
|
+
) => void;
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
export type SelectControlProps =
|
|
96
|
+
| SelectControlSingleSelectionProps
|
|
97
|
+
| SelectControlMultipleSelectionProps;
|
|
@@ -3,16 +3,25 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import type { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* WordPress dependencies
|
|
8
|
+
*/
|
|
9
|
+
import { link, more, wordpress } from '@wordpress/icons';
|
|
10
|
+
|
|
6
11
|
/**
|
|
7
12
|
* Internal dependencies
|
|
8
13
|
*/
|
|
9
14
|
import TabPanel from '..';
|
|
15
|
+
import Popover from '../../popover';
|
|
16
|
+
import { Provider as SlotFillProvider } from '../../slot-fill';
|
|
10
17
|
|
|
11
18
|
const meta: ComponentMeta< typeof TabPanel > = {
|
|
12
19
|
title: 'Components/TabPanel',
|
|
13
20
|
component: TabPanel,
|
|
14
21
|
parameters: {
|
|
22
|
+
actions: { argTypesRegex: '^on.*' },
|
|
15
23
|
controls: { expanded: true },
|
|
24
|
+
docs: { source: { state: 'open' } },
|
|
16
25
|
},
|
|
17
26
|
};
|
|
18
27
|
export default meta;
|
|
@@ -55,3 +64,35 @@ DisabledTab.args = {
|
|
|
55
64
|
},
|
|
56
65
|
],
|
|
57
66
|
};
|
|
67
|
+
|
|
68
|
+
const SlotFillTemplate: ComponentStory< typeof TabPanel > = ( props ) => {
|
|
69
|
+
return (
|
|
70
|
+
<SlotFillProvider>
|
|
71
|
+
<TabPanel { ...props } />
|
|
72
|
+
{ /* @ts-expect-error The 'Slot' component hasn't been typed yet. */ }
|
|
73
|
+
<Popover.Slot />
|
|
74
|
+
</SlotFillProvider>
|
|
75
|
+
);
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export const WithTabIconsAndTooltips = SlotFillTemplate.bind( {} );
|
|
79
|
+
WithTabIconsAndTooltips.args = {
|
|
80
|
+
children: ( tab ) => <p>Selected tab: { tab.title }</p>,
|
|
81
|
+
tabs: [
|
|
82
|
+
{
|
|
83
|
+
name: 'tab1',
|
|
84
|
+
title: 'Tab 1',
|
|
85
|
+
icon: wordpress,
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: 'tab2',
|
|
89
|
+
title: 'Tab 2',
|
|
90
|
+
icon: link,
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
name: 'tab3',
|
|
94
|
+
title: 'Tab 3',
|
|
95
|
+
icon: more,
|
|
96
|
+
},
|
|
97
|
+
],
|
|
98
|
+
};
|