@wordpress/components 25.6.1 → 26.0.1-next.5a1d1283.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 +21 -1
- package/CONTRIBUTING.md +1 -1
- package/README.md +3 -8
- package/build/color-picker/hsv-color-picker.native.js +92 -0
- package/build/color-picker/hsv-color-picker.native.js.map +1 -0
- package/build/color-picker/hue-picker.native.js +195 -0
- package/build/color-picker/hue-picker.native.js.map +1 -0
- package/build/color-picker/index.native.js +3 -2
- package/build/color-picker/index.native.js.map +1 -1
- package/build/color-picker/saturation-picker.native.js +178 -0
- package/build/color-picker/saturation-picker.native.js.map +1 -0
- package/build/item-group/item/component.js +0 -1
- package/build/item-group/item/component.js.map +1 -1
- package/build/item-group/item-group/component.js +0 -1
- package/build/item-group/item-group/component.js.map +1 -1
- package/build/menu-item/index.js +6 -4
- package/build/menu-item/index.js.map +1 -1
- package/build/menu-item/types.js.map +1 -1
- package/build/mobile/link-settings/link-settings-navigation.native.js +1 -1
- package/build/mobile/link-settings/link-settings-navigation.native.js.map +1 -1
- package/build/navigation/index.js +0 -1
- package/build/navigation/index.js.map +1 -1
- package/build/navigator/navigator-provider/component.js +1 -2
- package/build/navigator/navigator-provider/component.js.map +1 -1
- package/build/palette-edit/styles.js +10 -10
- package/build/palette-edit/styles.js.map +1 -1
- package/build/popover/index.js +38 -75
- package/build/popover/index.js.map +1 -1
- package/build/popover/overlay-middlewares.js.map +1 -1
- package/build/popover/types.js.map +1 -1
- package/build/popover/utils.js +5 -50
- package/build/popover/utils.js.map +1 -1
- package/build/progress-bar/styles.js +6 -5
- package/build/progress-bar/styles.js.map +1 -1
- package/build/search-control/index.native.js +27 -24
- package/build/search-control/index.native.js.map +1 -1
- package/build/shortcut/index.js +13 -0
- package/build/shortcut/index.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/slot-fill-context.js +3 -1
- package/build/slot-fill/bubbles-virtually/slot-fill-context.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/slot.js +14 -8
- package/build/slot-fill/bubbles-virtually/slot.js.map +1 -1
- package/build/slot-fill/index.js +5 -0
- package/build/slot-fill/index.js.map +1 -1
- package/build/spinner/index.js +0 -1
- package/build/spinner/index.js.map +1 -1
- package/build/theme/index.js +0 -1
- package/build/theme/index.js.map +1 -1
- package/build/tools-panel/tools-panel/component.js +0 -1
- package/build/tools-panel/tools-panel/component.js.map +1 -1
- package/build/tools-panel/tools-panel-header/component.js +5 -1
- package/build/tools-panel/tools-panel-header/component.js.map +1 -1
- package/build/tree-select/index.js +0 -1
- package/build/tree-select/index.js.map +1 -1
- package/build/unit-control/index.js +0 -1
- package/build/unit-control/index.js.map +1 -1
- package/build/utils/hooks/use-cx.js +2 -1
- package/build/utils/hooks/use-cx.js.map +1 -1
- package/build/view/component.js +1 -2
- package/build/view/component.js.map +1 -1
- package/build-module/color-picker/hsv-color-picker.native.js +84 -0
- package/build-module/color-picker/hsv-color-picker.native.js.map +1 -0
- package/build-module/color-picker/hue-picker.native.js +185 -0
- package/build-module/color-picker/hue-picker.native.js.map +1 -0
- package/build-module/color-picker/index.native.js +2 -1
- package/build-module/color-picker/index.native.js.map +1 -1
- package/build-module/color-picker/saturation-picker.native.js +168 -0
- package/build-module/color-picker/saturation-picker.native.js.map +1 -0
- package/build-module/item-group/item/component.js +0 -1
- package/build-module/item-group/item/component.js.map +1 -1
- package/build-module/item-group/item-group/component.js +0 -1
- package/build-module/item-group/item-group/component.js.map +1 -1
- package/build-module/menu-item/index.js +4 -2
- package/build-module/menu-item/index.js.map +1 -1
- package/build-module/menu-item/types.js.map +1 -1
- package/build-module/mobile/link-settings/link-settings-navigation.native.js +1 -1
- package/build-module/mobile/link-settings/link-settings-navigation.native.js.map +1 -1
- package/build-module/navigation/index.js +0 -1
- package/build-module/navigation/index.js.map +1 -1
- package/build-module/navigator/navigator-provider/component.js +1 -2
- package/build-module/navigator/navigator-provider/component.js.map +1 -1
- package/build-module/palette-edit/styles.js +10 -10
- package/build-module/palette-edit/styles.js.map +1 -1
- package/build-module/popover/index.js +42 -79
- package/build-module/popover/index.js.map +1 -1
- package/build-module/popover/overlay-middlewares.js.map +1 -1
- package/build-module/popover/types.js.map +1 -1
- package/build-module/popover/utils.js +4 -47
- package/build-module/popover/utils.js.map +1 -1
- package/build-module/progress-bar/styles.js +6 -5
- package/build-module/progress-bar/styles.js.map +1 -1
- package/build-module/search-control/index.native.js +28 -25
- package/build-module/search-control/index.native.js.map +1 -1
- package/build-module/shortcut/index.js +13 -0
- package/build-module/shortcut/index.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/slot-fill-context.js +3 -1
- package/build-module/slot-fill/bubbles-virtually/slot-fill-context.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/slot.js +14 -8
- package/build-module/slot-fill/bubbles-virtually/slot.js.map +1 -1
- package/build-module/slot-fill/index.js +6 -1
- package/build-module/slot-fill/index.js.map +1 -1
- package/build-module/spinner/index.js +0 -1
- package/build-module/spinner/index.js.map +1 -1
- package/build-module/theme/index.js +0 -1
- package/build-module/theme/index.js.map +1 -1
- package/build-module/tools-panel/tools-panel/component.js +0 -1
- package/build-module/tools-panel/tools-panel/component.js.map +1 -1
- package/build-module/tools-panel/tools-panel-header/component.js +5 -1
- package/build-module/tools-panel/tools-panel-header/component.js.map +1 -1
- package/build-module/tree-select/index.js +0 -1
- package/build-module/tree-select/index.js.map +1 -1
- package/build-module/unit-control/index.js +0 -1
- package/build-module/unit-control/index.js.map +1 -1
- package/build-module/utils/hooks/use-cx.js +2 -1
- package/build-module/utils/hooks/use-cx.js.map +1 -1
- package/build-module/view/component.js +1 -2
- package/build-module/view/component.js.map +1 -1
- package/build-types/alignment-matrix-control/stories/index.story.d.ts +2 -2
- package/build-types/alignment-matrix-control/stories/index.story.d.ts.map +1 -1
- package/build-types/angle-picker-control/stories/index.story.d.ts +2 -2
- package/build-types/angle-picker-control/stories/index.story.d.ts.map +1 -1
- package/build-types/animate/stories/index.story.d.ts +9 -9
- package/build-types/animate/stories/index.story.d.ts.map +1 -1
- package/build-types/base-control/stories/index.story.d.ts +4 -4
- package/build-types/base-control/stories/index.story.d.ts.map +1 -1
- package/build-types/border-box-control/stories/index.story.d.ts +2 -2
- package/build-types/border-box-control/stories/index.story.d.ts.map +1 -1
- package/build-types/border-control/stories/index.story.d.ts +2 -2
- package/build-types/border-control/stories/index.story.d.ts.map +1 -1
- package/build-types/button/stories/e2e/index.story.d.ts +3 -3
- package/build-types/button/stories/e2e/index.story.d.ts.map +1 -1
- package/build-types/button/stories/index.story.d.ts +10 -9
- package/build-types/button/stories/index.story.d.ts.map +1 -1
- package/build-types/button-group/stories/index.story.d.ts +3 -3
- package/build-types/button-group/stories/index.story.d.ts.map +1 -1
- package/build-types/card/stories/index.story.d.ts +2 -2
- package/build-types/card/stories/index.story.d.ts.map +1 -1
- package/build-types/checkbox-control/stories/index.story.d.ts +4 -4
- package/build-types/checkbox-control/stories/index.story.d.ts.map +1 -1
- package/build-types/circular-option-picker/stories/index.story.d.ts +2 -2
- package/build-types/circular-option-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/color-indicator/stories/index.story.d.ts +3 -3
- package/build-types/color-indicator/stories/index.story.d.ts.map +1 -1
- package/build-types/color-palette/stories/index.story.d.ts +3 -3
- package/build-types/color-palette/stories/index.story.d.ts.map +1 -1
- package/build-types/color-palette/styles.d.ts +1 -1
- package/build-types/color-picker/stories/index.story.d.ts +2 -2
- package/build-types/color-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/combobox-control/stories/index.story.d.ts +2 -2
- package/build-types/combobox-control/stories/index.story.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/stories/index.story.d.ts +2 -2
- package/build-types/custom-gradient-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/date-time/date/styles.d.ts +1 -1
- package/build-types/date-time/stories/date-time.story.d.ts +5 -5
- package/build-types/date-time/stories/date-time.story.d.ts.map +1 -1
- package/build-types/date-time/stories/date.story.d.ts +5 -5
- package/build-types/date-time/stories/date.story.d.ts.map +1 -1
- package/build-types/date-time/stories/time.story.d.ts +3 -3
- package/build-types/date-time/stories/time.story.d.ts.map +1 -1
- package/build-types/dimension-control/stories/index.story.d.ts.map +1 -1
- package/build-types/disabled/stories/index.story.d.ts +4 -4
- package/build-types/disabled/stories/index.story.d.ts.map +1 -1
- package/build-types/divider/stories/index.story.d.ts +5 -5
- package/build-types/divider/stories/index.story.d.ts.map +1 -1
- package/build-types/draggable/stories/index.story.d.ts +4 -4
- package/build-types/draggable/stories/index.story.d.ts.map +1 -1
- package/build-types/drop-zone/stories/index.story.d.ts +2 -2
- package/build-types/drop-zone/stories/index.story.d.ts.map +1 -1
- package/build-types/dropdown/stories/index.story.d.ts +6 -5
- package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
- package/build-types/dropdown-menu/stories/index.story.d.ts +2 -2
- package/build-types/dropdown-menu/stories/index.story.d.ts.map +1 -1
- package/build-types/dropdown-menu-v2/stories/index.story.d.ts +2 -2
- package/build-types/dropdown-menu-v2/stories/index.story.d.ts.map +1 -1
- package/build-types/duotone-picker/stories/duotone-picker.story.d.ts +2 -2
- package/build-types/duotone-picker/stories/duotone-picker.story.d.ts.map +1 -1
- package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts +2 -2
- package/build-types/duotone-picker/stories/duotone-swatch.story.d.ts.map +1 -1
- package/build-types/elevation/stories/index.story.d.ts +5 -5
- package/build-types/elevation/stories/index.story.d.ts.map +1 -1
- package/build-types/external-link/stories/index.story.d.ts +3 -3
- package/build-types/external-link/stories/index.story.d.ts.map +1 -1
- package/build-types/flex/stories/index.story.d.ts +4 -4
- package/build-types/flex/stories/index.story.d.ts.map +1 -1
- package/build-types/focal-point-picker/stories/index.story.d.ts +2 -2
- package/build-types/focal-point-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/font-size-picker/stories/e2e/index.story.d.ts +2 -2
- package/build-types/font-size-picker/stories/e2e/index.story.d.ts.map +1 -1
- package/build-types/font-size-picker/stories/index.story.d.ts +8 -8
- package/build-types/font-size-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/form-file-upload/stories/index.story.d.ts +2 -2
- package/build-types/form-file-upload/stories/index.story.d.ts.map +1 -1
- package/build-types/form-toggle/stories/index.story.d.ts +3 -3
- package/build-types/form-toggle/stories/index.story.d.ts.map +1 -1
- package/build-types/form-token-field/stories/index.story.d.ts +7 -7
- package/build-types/form-token-field/stories/index.story.d.ts.map +1 -1
- package/build-types/gradient-picker/stories/index.story.d.ts +2 -2
- package/build-types/gradient-picker/stories/index.story.d.ts.map +1 -1
- package/build-types/grid/stories/index.story.d.ts +3 -3
- package/build-types/grid/stories/index.story.d.ts.map +1 -1
- package/build-types/guide/stories/index.story.d.ts +2 -2
- package/build-types/guide/stories/index.story.d.ts.map +1 -1
- package/build-types/h-stack/stories/e2e/index.story.d.ts +3 -3
- package/build-types/h-stack/stories/e2e/index.story.d.ts.map +1 -1
- package/build-types/h-stack/stories/index.story.d.ts +3 -3
- package/build-types/h-stack/stories/index.story.d.ts.map +1 -1
- package/build-types/heading/stories/index.story.d.ts +3 -3
- package/build-types/heading/stories/index.story.d.ts.map +1 -1
- package/build-types/icon/stories/index.story.d.ts +4 -4
- package/build-types/icon/stories/index.story.d.ts.map +1 -1
- package/build-types/input-control/stories/index.story.d.ts +2 -2
- package/build-types/input-control/stories/index.story.d.ts.map +1 -1
- package/build-types/item-group/item/component.d.ts +0 -1
- package/build-types/item-group/item/component.d.ts.map +1 -1
- package/build-types/item-group/item-group/component.d.ts +0 -1
- package/build-types/item-group/item-group/component.d.ts.map +1 -1
- package/build-types/item-group/stories/index.story.d.ts +6 -6
- package/build-types/item-group/stories/index.story.d.ts.map +1 -1
- package/build-types/keyboard-shortcuts/stories/index.story.d.ts +2 -2
- package/build-types/keyboard-shortcuts/stories/index.story.d.ts.map +1 -1
- package/build-types/menu-group/stories/index.story.d.ts +3 -3
- package/build-types/menu-group/stories/index.story.d.ts.map +1 -1
- package/build-types/menu-item/index.d.ts +5 -58
- package/build-types/menu-item/index.d.ts.map +1 -1
- package/build-types/menu-item/stories/index.story.d.ts +74 -0
- package/build-types/menu-item/stories/index.story.d.ts.map +1 -0
- package/build-types/menu-item/types.d.ts +3 -2
- package/build-types/menu-item/types.d.ts.map +1 -1
- package/build-types/menu-items-choice/stories/index.story.d.ts +3 -3
- package/build-types/menu-items-choice/stories/index.story.d.ts.map +1 -1
- package/build-types/modal/stories/index.story.d.ts +4 -4
- package/build-types/modal/stories/index.story.d.ts.map +1 -1
- package/build-types/navigable-container/stories/navigable-menu.story.d.ts +3 -3
- package/build-types/navigable-container/stories/navigable-menu.story.d.ts.map +1 -1
- package/build-types/navigable-container/stories/tabbable-container.story.d.ts +3 -3
- package/build-types/navigable-container/stories/tabbable-container.story.d.ts.map +1 -1
- package/build-types/navigation/index.d.ts +0 -1
- package/build-types/navigation/index.d.ts.map +1 -1
- package/build-types/navigation/stories/index.story.d.ts +2 -2
- package/build-types/navigation/stories/index.story.d.ts.map +1 -1
- package/build-types/navigation/stories/utils/controlled-state.d.ts +2 -2
- package/build-types/navigation/stories/utils/controlled-state.d.ts.map +1 -1
- package/build-types/navigation/stories/utils/default.d.ts +2 -2
- package/build-types/navigation/stories/utils/default.d.ts.map +1 -1
- package/build-types/navigation/stories/utils/group.d.ts +2 -2
- package/build-types/navigation/stories/utils/group.d.ts.map +1 -1
- package/build-types/navigation/stories/utils/hide-if-empty.d.ts +2 -2
- package/build-types/navigation/stories/utils/hide-if-empty.d.ts.map +1 -1
- package/build-types/navigation/stories/utils/more-examples.d.ts +2 -2
- package/build-types/navigation/stories/utils/more-examples.d.ts.map +1 -1
- package/build-types/navigation/stories/utils/search.d.ts +2 -2
- package/build-types/navigation/stories/utils/search.d.ts.map +1 -1
- package/build-types/navigation/styles/navigation-styles.d.ts +1 -1
- package/build-types/navigator/navigator-provider/component.d.ts +0 -1
- package/build-types/navigator/navigator-provider/component.d.ts.map +1 -1
- package/build-types/navigator/stories/index.story.d.ts +5 -5
- package/build-types/navigator/stories/index.story.d.ts.map +1 -1
- package/build-types/notice/stories/index.story.d.ts +3 -3
- package/build-types/notice/stories/index.story.d.ts.map +1 -1
- package/build-types/number-control/stories/index.story.d.ts +2 -2
- package/build-types/number-control/stories/index.story.d.ts.map +1 -1
- package/build-types/palette-edit/stories/index.story.d.ts +2 -2
- package/build-types/palette-edit/stories/index.story.d.ts.map +1 -1
- package/build-types/palette-edit/styles.d.ts +1 -1
- package/build-types/palette-edit/styles.d.ts.map +1 -1
- package/build-types/panel/stories/index.story.d.ts +6 -6
- package/build-types/panel/stories/index.story.d.ts.map +1 -1
- package/build-types/placeholder/stories/index.story.d.ts +3 -3
- package/build-types/placeholder/stories/index.story.d.ts.map +1 -1
- package/build-types/popover/index.d.ts.map +1 -1
- package/build-types/popover/overlay-middlewares.d.ts +2 -2
- package/build-types/popover/overlay-middlewares.d.ts.map +1 -1
- package/build-types/popover/stories/index.story.d.ts +7 -7
- package/build-types/popover/stories/index.story.d.ts.map +1 -1
- package/build-types/popover/types.d.ts +6 -0
- package/build-types/popover/types.d.ts.map +1 -1
- package/build-types/popover/utils.d.ts +1 -21
- package/build-types/popover/utils.d.ts.map +1 -1
- package/build-types/progress-bar/stories/index.story.d.ts +3 -3
- package/build-types/progress-bar/stories/index.story.d.ts.map +1 -1
- package/build-types/progress-bar/styles.d.ts.map +1 -1
- package/build-types/query-controls/stories/index.story.d.ts +4 -4
- package/build-types/query-controls/stories/index.story.d.ts.map +1 -1
- package/build-types/radio-control/stories/index.story.d.ts +3 -3
- package/build-types/radio-control/stories/index.story.d.ts.map +1 -1
- package/build-types/range-control/stories/index.story.d.ts +9 -9
- package/build-types/range-control/stories/index.story.d.ts.map +1 -1
- package/build-types/resizable-box/stories/index.story.d.ts +2 -2
- package/build-types/resizable-box/stories/index.story.d.ts.map +1 -1
- package/build-types/responsive-wrapper/stories/index.story.d.ts +3 -3
- package/build-types/responsive-wrapper/stories/index.story.d.ts.map +1 -1
- package/build-types/sandbox/stories/index.story.d.ts +2 -2
- package/build-types/sandbox/stories/index.story.d.ts.map +1 -1
- package/build-types/scroll-lock/stories/index.story.d.ts +3 -3
- package/build-types/scroll-lock/stories/index.story.d.ts.map +1 -1
- package/build-types/scrollable/stories/index.story.d.ts +3 -3
- package/build-types/scrollable/stories/index.story.d.ts.map +1 -1
- package/build-types/search-control/stories/index.story.d.ts +2 -2
- package/build-types/search-control/stories/index.story.d.ts.map +1 -1
- package/build-types/select-control/stories/index.story.d.ts +2 -2
- package/build-types/select-control/stories/index.story.d.ts.map +1 -1
- package/build-types/shortcut/index.d.ts +13 -0
- package/build-types/shortcut/index.d.ts.map +1 -1
- package/build-types/shortcut/stories/index.story.d.ts +13 -0
- package/build-types/shortcut/stories/index.story.d.ts.map +1 -0
- package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts +1 -0
- package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/slot.d.ts +1 -6
- package/build-types/slot-fill/index.d.ts +1 -1
- package/build-types/slot-fill/index.d.ts.map +1 -1
- package/build-types/snackbar/stories/index.story.d.ts +7 -7
- package/build-types/snackbar/stories/index.story.d.ts.map +1 -1
- package/build-types/snackbar/stories/list.story.d.ts +3 -3
- package/build-types/snackbar/stories/list.story.d.ts.map +1 -1
- package/build-types/spacer/stories/index.story.d.ts +3 -3
- package/build-types/spacer/stories/index.story.d.ts.map +1 -1
- package/build-types/spinner/index.d.ts +0 -1
- package/build-types/spinner/index.d.ts.map +1 -1
- package/build-types/spinner/stories/index.story.d.ts +4 -4
- package/build-types/spinner/stories/index.story.d.ts.map +1 -1
- package/build-types/surface/stories/index.story.d.ts +3 -3
- package/build-types/surface/stories/index.story.d.ts.map +1 -1
- package/build-types/tab-panel/stories/index.story.d.ts +2 -2
- package/build-types/tab-panel/stories/index.story.d.ts.map +1 -1
- package/build-types/text-control/stories/index.story.d.ts +4 -4
- package/build-types/text-control/stories/index.story.d.ts.map +1 -1
- package/build-types/text-highlight/stories/index.story.d.ts +3 -3
- package/build-types/text-highlight/stories/index.story.d.ts.map +1 -1
- package/build-types/textarea-control/stories/index.story.d.ts +3 -3
- package/build-types/textarea-control/stories/index.story.d.ts.map +1 -1
- package/build-types/theme/index.d.ts +0 -1
- package/build-types/theme/index.d.ts.map +1 -1
- package/build-types/theme/stories/index.story.d.ts +4 -4
- package/build-types/theme/stories/index.story.d.ts.map +1 -1
- package/build-types/tip/stories/index.story.d.ts +3 -3
- package/build-types/tip/stories/index.story.d.ts.map +1 -1
- package/build-types/toggle-control/stories/index.story.d.ts +2 -2
- package/build-types/toggle-control/stories/index.story.d.ts.map +1 -1
- package/build-types/toggle-group-control/stories/index.story.d.ts +6 -6
- package/build-types/toggle-group-control/stories/index.story.d.ts.map +1 -1
- package/build-types/toolbar/stories/index.story.d.ts +2 -2
- package/build-types/toolbar/stories/index.story.d.ts.map +1 -1
- package/build-types/tools-panel/stories/index.story.d.ts +8 -8
- package/build-types/tools-panel/stories/index.story.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel/component.d.ts +0 -1
- package/build-types/tools-panel/tools-panel/component.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel-header/component.d.ts.map +1 -1
- package/build-types/tree-grid/stories/index.story.d.ts +2 -2
- package/build-types/tree-grid/stories/index.story.d.ts.map +1 -1
- package/build-types/tree-select/index.d.ts +0 -1
- package/build-types/tree-select/index.d.ts.map +1 -1
- package/build-types/tree-select/stories/index.story.d.ts +2 -2
- package/build-types/tree-select/stories/index.story.d.ts.map +1 -1
- package/build-types/truncate/stories/index.story.d.ts +4 -4
- package/build-types/truncate/stories/index.story.d.ts.map +1 -1
- package/build-types/unit-control/index.d.ts +0 -1
- package/build-types/unit-control/index.d.ts.map +1 -1
- package/build-types/unit-control/stories/index.story.d.ts +7 -7
- package/build-types/unit-control/stories/index.story.d.ts.map +1 -1
- package/build-types/utils/hooks/use-cx.d.ts +2 -1
- package/build-types/utils/hooks/use-cx.d.ts.map +1 -1
- package/build-types/v-stack/stories/e2e/index.story.d.ts +3 -3
- package/build-types/v-stack/stories/e2e/index.story.d.ts.map +1 -1
- package/build-types/v-stack/stories/index.story.d.ts +2 -2
- package/build-types/v-stack/stories/index.story.d.ts.map +1 -1
- package/build-types/view/component.d.ts +0 -1
- package/build-types/view/component.d.ts.map +1 -1
- package/build-types/view/stories/index.story.d.ts +3 -3
- package/build-types/view/stories/index.story.d.ts.map +1 -1
- package/build-types/visually-hidden/stories/index.story.d.ts +5 -5
- package/build-types/visually-hidden/stories/index.story.d.ts.map +1 -1
- package/build-types/z-stack/stories/index.story.d.ts +3 -3
- package/build-types/z-stack/stories/index.story.d.ts.map +1 -1
- package/package.json +20 -20
- package/src/alignment-matrix-control/stories/index.story.tsx +7 -3
- package/src/angle-picker-control/stories/index.story.tsx +3 -3
- package/src/animate/stories/index.story.tsx +12 -10
- package/src/base-control/stories/index.story.tsx +5 -9
- package/src/border-box-control/stories/index.story.tsx +5 -9
- package/src/border-control/stories/index.story.tsx +8 -14
- package/src/button/stories/e2e/index.story.tsx +3 -3
- package/src/button/stories/index.story.tsx +10 -10
- package/src/button-group/stories/index.story.tsx +4 -6
- package/src/card/stories/index.story.tsx +5 -5
- package/src/checkbox-control/stories/index.story.tsx +7 -6
- package/src/circular-option-picker/stories/index.story.tsx +16 -4
- package/src/color-indicator/stories/index.story.tsx +4 -6
- package/src/color-palette/stories/index.story.tsx +12 -21
- package/src/color-picker/hsv-color-picker.native.js +88 -0
- package/src/color-picker/hue-picker.native.js +194 -0
- package/src/color-picker/index.native.js +2 -1
- package/src/color-picker/saturation-picker.native.js +163 -0
- package/src/color-picker/stories/index.story.tsx +3 -3
- package/src/color-picker/style.native.scss +23 -0
- package/src/combobox-control/stories/index.story.tsx +3 -3
- package/src/custom-gradient-picker/stories/index.story.tsx +3 -3
- package/src/date-time/stories/date-time.story.tsx +8 -10
- package/src/date-time/stories/date.story.tsx +8 -9
- package/src/date-time/stories/time.story.tsx +4 -4
- package/src/dimension-control/stories/index.story.tsx +3 -3
- package/src/disabled/stories/index.story.tsx +4 -4
- package/src/divider/stories/index.story.tsx +6 -6
- package/src/draggable/stories/index.story.tsx +5 -7
- package/src/drop-zone/stories/index.story.tsx +3 -3
- package/src/dropdown/stories/index.story.tsx +8 -6
- package/src/dropdown-menu/stories/index.story.tsx +3 -3
- package/src/dropdown-menu-v2/stories/index.story.tsx +24 -10
- package/src/duotone-picker/stories/duotone-picker.story.tsx +3 -6
- package/src/duotone-picker/stories/duotone-swatch.story.tsx +3 -3
- package/src/elevation/stories/index.story.tsx +7 -7
- package/src/external-link/stories/index.story.tsx +4 -6
- package/src/flex/stories/index.story.tsx +6 -6
- package/src/focal-point-picker/stories/index.story.tsx +3 -3
- package/src/font-size-picker/stories/e2e/index.story.tsx +3 -3
- package/src/font-size-picker/stories/index.story.tsx +10 -10
- package/src/form-file-upload/stories/index.story.tsx +3 -3
- package/src/form-toggle/stories/index.story.tsx +4 -7
- package/src/form-token-field/stories/index.story.tsx +10 -11
- package/src/gradient-picker/stories/index.story.tsx +3 -3
- package/src/grid/stories/index.story.tsx +4 -4
- package/src/guide/stories/index.story.tsx +3 -3
- package/src/h-stack/stories/e2e/index.story.tsx +4 -4
- package/src/h-stack/stories/index.story.tsx +4 -4
- package/src/heading/stories/index.story.tsx +3 -3
- package/src/icon/stories/index.story.tsx +5 -5
- package/src/input-control/stories/index.story.tsx +5 -3
- package/src/item-group/item/component.tsx +0 -1
- package/src/item-group/item-group/component.tsx +0 -1
- package/src/item-group/stories/index.story.tsx +11 -12
- package/src/keyboard-shortcuts/stories/index.story.tsx +3 -3
- package/src/menu-group/stories/index.story.tsx +5 -5
- package/src/menu-item/README.md +1 -1
- package/src/menu-item/index.tsx +5 -2
- package/src/menu-item/stories/index.story.tsx +80 -0
- package/src/menu-item/types.ts +3 -2
- package/src/menu-items-choice/stories/index.story.tsx +4 -6
- package/src/mobile/link-settings/link-settings-navigation.native.js +1 -1
- package/src/modal/stories/index.story.tsx +5 -10
- package/src/navigable-container/stories/navigable-menu.story.tsx +3 -3
- package/src/navigable-container/stories/tabbable-container.story.tsx +3 -3
- package/src/navigation/index.tsx +0 -1
- package/src/navigation/stories/index.story.tsx +16 -2
- package/src/navigation/stories/utils/controlled-state.tsx +2 -2
- package/src/navigation/stories/utils/default.tsx +2 -2
- package/src/navigation/stories/utils/group.tsx +2 -2
- package/src/navigation/stories/utils/hide-if-empty.tsx +2 -2
- package/src/navigation/stories/utils/more-examples.tsx +2 -2
- package/src/navigation/stories/utils/search.tsx +2 -2
- package/src/navigator/navigator-provider/component.tsx +0 -1
- package/src/navigator/stories/index.story.tsx +9 -10
- package/src/notice/stories/index.story.tsx +6 -6
- package/src/number-control/stories/index.story.tsx +3 -3
- package/src/palette-edit/stories/index.story.tsx +3 -3
- package/src/palette-edit/styles.js +0 -1
- package/src/panel/stories/index.story.tsx +9 -11
- package/src/placeholder/stories/index.story.tsx +4 -6
- package/src/popover/README.md +2 -2
- package/src/popover/index.tsx +69 -103
- package/src/popover/overlay-middlewares.tsx +2 -2
- package/src/popover/stories/index.story.tsx +8 -10
- package/src/popover/test/index.tsx +15 -1
- package/src/popover/types.ts +6 -0
- package/src/popover/utils.ts +5 -56
- package/src/progress-bar/stories/index.story.tsx +4 -6
- package/src/progress-bar/styles.ts +4 -1
- package/src/query-controls/stories/index.story.tsx +5 -6
- package/src/radio-control/stories/index.story.tsx +4 -6
- package/src/radio-group/stories/index.story.js +1 -0
- package/src/range-control/stories/index.story.tsx +12 -18
- package/src/resizable-box/stories/index.story.tsx +3 -3
- package/src/responsive-wrapper/stories/index.story.tsx +4 -5
- package/src/sandbox/stories/index.story.tsx +3 -5
- package/src/scroll-lock/stories/index.story.tsx +3 -3
- package/src/scrollable/stories/index.story.tsx +4 -4
- package/src/search-control/index.native.js +39 -27
- package/src/search-control/stories/index.story.tsx +3 -3
- package/src/select-control/stories/index.story.tsx +3 -3
- package/src/shortcut/index.tsx +13 -0
- package/src/shortcut/stories/index.story.tsx +33 -0
- package/src/slot-fill/README.md +5 -5
- package/src/slot-fill/bubbles-virtually/slot-fill-context.js +3 -0
- package/src/slot-fill/bubbles-virtually/slot.js +17 -5
- package/src/slot-fill/index.js +6 -1
- package/src/slot-fill/stories/index.story.js +2 -0
- package/src/slot-fill/test/__snapshots__/slot.js.snap +12 -4
- package/src/snackbar/stories/index.story.tsx +10 -13
- package/src/snackbar/stories/list.story.tsx +3 -3
- package/src/spacer/stories/index.story.tsx +4 -4
- package/src/spinner/index.tsx +0 -1
- package/src/spinner/stories/index.story.tsx +5 -5
- package/src/surface/stories/index.story.tsx +4 -4
- package/src/tab-panel/stories/index.story.tsx +5 -13
- package/src/tab-panel/test/index.tsx +9 -25
- package/src/text-control/stories/index.story.tsx +7 -6
- package/src/text-highlight/stories/index.story.tsx +4 -6
- package/src/textarea-control/stories/index.story.tsx +4 -6
- package/src/theme/index.tsx +0 -1
- package/src/theme/stories/index.story.tsx +5 -5
- package/src/tip/stories/index.story.tsx +4 -4
- package/src/toggle-control/stories/index.story.tsx +3 -3
- package/src/toggle-group-control/stories/index.story.tsx +17 -11
- package/src/toolbar/stories/index.story.tsx +13 -3
- package/src/tools-panel/stories/index.story.tsx +17 -12
- package/src/tools-panel/tools-panel/component.tsx +0 -1
- package/src/tools-panel/tools-panel-header/component.tsx +3 -0
- package/src/tree-grid/stories/index.story.tsx +5 -3
- package/src/tree-select/index.tsx +0 -1
- package/src/tree-select/stories/index.story.tsx +3 -3
- package/src/truncate/stories/index.story.tsx +5 -7
- package/src/unit-control/index.tsx +0 -1
- package/src/unit-control/stories/index.story.tsx +10 -9
- package/src/utils/hooks/use-cx.ts +2 -1
- package/src/v-stack/stories/e2e/index.story.tsx +4 -4
- package/src/v-stack/stories/index.story.tsx +3 -3
- package/src/view/component.tsx +0 -1
- package/src/view/stories/index.story.tsx +4 -4
- package/src/visually-hidden/stories/index.story.tsx +7 -7
- package/src/z-stack/stories/index.story.tsx +4 -4
- package/tsconfig.tsbuildinfo +1 -1
- package/build/popover/limit-shift.js +0 -129
- package/build/popover/limit-shift.js.map +0 -1
- package/build-module/popover/limit-shift.js +0 -122
- package/build-module/popover/limit-shift.js.map +0 -1
- package/build-types/popover/limit-shift.d.ts +0 -87
- package/build-types/popover/limit-shift.d.ts.map +0 -1
- package/src/popover/limit-shift.ts +0 -205
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import type {
|
|
4
|
+
import type { Meta, StoryFn } from '@storybook/react';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
@@ -12,7 +12,7 @@ import { useState } from '@wordpress/element';
|
|
|
12
12
|
*/
|
|
13
13
|
import FocalPointPicker from '..';
|
|
14
14
|
|
|
15
|
-
const meta:
|
|
15
|
+
const meta: Meta< typeof FocalPointPicker > = {
|
|
16
16
|
title: 'Components/FocalPointPicker',
|
|
17
17
|
component: FocalPointPicker,
|
|
18
18
|
argTypes: {
|
|
@@ -27,7 +27,7 @@ const meta: ComponentMeta< typeof FocalPointPicker > = {
|
|
|
27
27
|
};
|
|
28
28
|
export default meta;
|
|
29
29
|
|
|
30
|
-
const Template:
|
|
30
|
+
const Template: StoryFn< typeof FocalPointPicker > = ( {
|
|
31
31
|
onChange,
|
|
32
32
|
...props
|
|
33
33
|
} ) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import type {
|
|
4
|
+
import type { StoryFn } from '@storybook/react';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
@@ -18,7 +18,7 @@ export default {
|
|
|
18
18
|
component: FontSizePicker,
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
-
const FontSizePickerWithState:
|
|
21
|
+
const FontSizePickerWithState: StoryFn< typeof FontSizePicker > = ( {
|
|
22
22
|
value,
|
|
23
23
|
...props
|
|
24
24
|
} ) => {
|
|
@@ -32,7 +32,7 @@ const FontSizePickerWithState: ComponentStory< typeof FontSizePicker > = ( {
|
|
|
32
32
|
);
|
|
33
33
|
};
|
|
34
34
|
|
|
35
|
-
export const Default:
|
|
35
|
+
export const Default: StoryFn< typeof FontSizePicker > =
|
|
36
36
|
FontSizePickerWithState.bind( {} );
|
|
37
37
|
Default.args = {
|
|
38
38
|
fontSizes: [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import type {
|
|
4
|
+
import type { Meta, StoryFn } from '@storybook/react';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
@@ -13,7 +13,7 @@ import { useState } from '@wordpress/element';
|
|
|
13
13
|
*/
|
|
14
14
|
import FontSizePicker from '../';
|
|
15
15
|
|
|
16
|
-
const meta:
|
|
16
|
+
const meta: Meta< typeof FontSizePicker > = {
|
|
17
17
|
title: 'Components/FontSizePicker',
|
|
18
18
|
component: FontSizePicker,
|
|
19
19
|
argTypes: {
|
|
@@ -27,7 +27,7 @@ const meta: ComponentMeta< typeof FontSizePicker > = {
|
|
|
27
27
|
};
|
|
28
28
|
export default meta;
|
|
29
29
|
|
|
30
|
-
const FontSizePickerWithState:
|
|
30
|
+
const FontSizePickerWithState: StoryFn< typeof FontSizePicker > = ( {
|
|
31
31
|
value,
|
|
32
32
|
onChange,
|
|
33
33
|
...props
|
|
@@ -45,7 +45,7 @@ const FontSizePickerWithState: ComponentStory< typeof FontSizePicker > = ( {
|
|
|
45
45
|
);
|
|
46
46
|
};
|
|
47
47
|
|
|
48
|
-
const TwoFontSizePickersWithState:
|
|
48
|
+
const TwoFontSizePickersWithState: StoryFn< typeof FontSizePicker > = ( {
|
|
49
49
|
fontSizes,
|
|
50
50
|
...props
|
|
51
51
|
} ) => {
|
|
@@ -63,7 +63,7 @@ const TwoFontSizePickersWithState: ComponentStory< typeof FontSizePicker > = ( {
|
|
|
63
63
|
);
|
|
64
64
|
};
|
|
65
65
|
|
|
66
|
-
export const Default:
|
|
66
|
+
export const Default: StoryFn< typeof FontSizePicker > =
|
|
67
67
|
FontSizePickerWithState.bind( {} );
|
|
68
68
|
Default.args = {
|
|
69
69
|
__nextHasNoMarginBottom: true,
|
|
@@ -90,7 +90,7 @@ Default.args = {
|
|
|
90
90
|
withSlider: false,
|
|
91
91
|
};
|
|
92
92
|
|
|
93
|
-
export const WithSlider:
|
|
93
|
+
export const WithSlider: StoryFn< typeof FontSizePicker > =
|
|
94
94
|
FontSizePickerWithState.bind( {} );
|
|
95
95
|
WithSlider.args = {
|
|
96
96
|
...Default.args,
|
|
@@ -103,7 +103,7 @@ WithSlider.args = {
|
|
|
103
103
|
* With custom font sizes disabled via the `disableCustomFontSizes` prop, the user will
|
|
104
104
|
* only be able to pick one of the predefined sizes passed in `fontSizes`.
|
|
105
105
|
*/
|
|
106
|
-
export const WithCustomSizesDisabled:
|
|
106
|
+
export const WithCustomSizesDisabled: StoryFn< typeof FontSizePicker > =
|
|
107
107
|
FontSizePickerWithState.bind( {} );
|
|
108
108
|
WithCustomSizesDisabled.args = {
|
|
109
109
|
...Default.args,
|
|
@@ -113,7 +113,7 @@ WithCustomSizesDisabled.args = {
|
|
|
113
113
|
/**
|
|
114
114
|
* When there are more than 5 font size options, the UI is no longer a toggle group.
|
|
115
115
|
*/
|
|
116
|
-
export const WithMoreFontSizes:
|
|
116
|
+
export const WithMoreFontSizes: StoryFn< typeof FontSizePicker > =
|
|
117
117
|
FontSizePickerWithState.bind( {} );
|
|
118
118
|
WithMoreFontSizes.args = {
|
|
119
119
|
...Default.args,
|
|
@@ -155,7 +155,7 @@ WithMoreFontSizes.args = {
|
|
|
155
155
|
/**
|
|
156
156
|
* When units like `px` are specified explicitly, it will be shown as a label hint.
|
|
157
157
|
*/
|
|
158
|
-
export const WithUnits:
|
|
158
|
+
export const WithUnits: StoryFn< typeof FontSizePicker > =
|
|
159
159
|
TwoFontSizePickersWithState.bind( {} );
|
|
160
160
|
WithUnits.args = {
|
|
161
161
|
...WithMoreFontSizes.args,
|
|
@@ -170,7 +170,7 @@ WithUnits.args = {
|
|
|
170
170
|
* The label hint will not be shown if it is a complex CSS value. Some examples of complex CSS values
|
|
171
171
|
* in this context are CSS functions like `calc()`, `clamp()`, and `var()`.
|
|
172
172
|
*/
|
|
173
|
-
export const WithComplexCSSValues:
|
|
173
|
+
export const WithComplexCSSValues: StoryFn< typeof FontSizePicker > =
|
|
174
174
|
TwoFontSizePickersWithState.bind( {} );
|
|
175
175
|
WithComplexCSSValues.args = {
|
|
176
176
|
...Default.args,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import type {
|
|
4
|
+
import type { Meta, StoryFn } from '@storybook/react';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
@@ -13,7 +13,7 @@ import { upload as uploadIcon } from '@wordpress/icons';
|
|
|
13
13
|
*/
|
|
14
14
|
import FormFileUpload from '..';
|
|
15
15
|
|
|
16
|
-
const meta:
|
|
16
|
+
const meta: Meta< typeof FormFileUpload > = {
|
|
17
17
|
title: 'Components/FormFileUpload',
|
|
18
18
|
component: FormFileUpload,
|
|
19
19
|
argTypes: {
|
|
@@ -28,7 +28,7 @@ const meta: ComponentMeta< typeof FormFileUpload > = {
|
|
|
28
28
|
};
|
|
29
29
|
export default meta;
|
|
30
30
|
|
|
31
|
-
const Template:
|
|
31
|
+
const Template: StoryFn< typeof FormFileUpload > = ( props ) => {
|
|
32
32
|
return <FormFileUpload { ...props } />;
|
|
33
33
|
};
|
|
34
34
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import type {
|
|
4
|
+
import type { Meta, StoryFn } from '@storybook/react';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
@@ -13,7 +13,7 @@ import { useState } from '@wordpress/element';
|
|
|
13
13
|
*/
|
|
14
14
|
import { FormToggle } from '..';
|
|
15
15
|
|
|
16
|
-
const meta:
|
|
16
|
+
const meta: Meta< typeof FormToggle > = {
|
|
17
17
|
component: FormToggle,
|
|
18
18
|
title: 'Components/FormToggle',
|
|
19
19
|
argTypes: {
|
|
@@ -30,10 +30,7 @@ const meta: ComponentMeta< typeof FormToggle > = {
|
|
|
30
30
|
};
|
|
31
31
|
export default meta;
|
|
32
32
|
|
|
33
|
-
const Template:
|
|
34
|
-
onChange,
|
|
35
|
-
...args
|
|
36
|
-
} ) => {
|
|
33
|
+
const Template: StoryFn< typeof FormToggle > = ( { onChange, ...args } ) => {
|
|
37
34
|
const [ isChecked, setChecked ] = useState( true );
|
|
38
35
|
|
|
39
36
|
return (
|
|
@@ -48,5 +45,5 @@ const Template: ComponentStory< typeof FormToggle > = ( {
|
|
|
48
45
|
);
|
|
49
46
|
};
|
|
50
47
|
|
|
51
|
-
export const Default:
|
|
48
|
+
export const Default: StoryFn< typeof FormToggle > = Template.bind( {} );
|
|
52
49
|
Default.args = {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import type {
|
|
4
|
+
import type { Meta, StoryFn } from '@storybook/react';
|
|
5
5
|
import type { ComponentProps } from 'react';
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
@@ -13,7 +13,7 @@ import { useState } from '@wordpress/element';
|
|
|
13
13
|
*/
|
|
14
14
|
import FormTokenField from '../';
|
|
15
15
|
|
|
16
|
-
const meta:
|
|
16
|
+
const meta: Meta< typeof FormTokenField > = {
|
|
17
17
|
component: FormTokenField,
|
|
18
18
|
title: 'Components/FormTokenField',
|
|
19
19
|
argTypes: {
|
|
@@ -42,9 +42,7 @@ const continents = [
|
|
|
42
42
|
'Oceania',
|
|
43
43
|
];
|
|
44
44
|
|
|
45
|
-
const DefaultTemplate:
|
|
46
|
-
...args
|
|
47
|
-
} ) => {
|
|
45
|
+
const DefaultTemplate: StoryFn< typeof FormTokenField > = ( { ...args } ) => {
|
|
48
46
|
const [ selectedContinents, setSelectedContinents ] = useState<
|
|
49
47
|
ComponentProps< typeof FormTokenField >[ 'value' ]
|
|
50
48
|
>( [] );
|
|
@@ -58,14 +56,15 @@ const DefaultTemplate: ComponentStory< typeof FormTokenField > = ( {
|
|
|
58
56
|
);
|
|
59
57
|
};
|
|
60
58
|
|
|
61
|
-
export const Default:
|
|
62
|
-
|
|
59
|
+
export const Default: StoryFn< typeof FormTokenField > = DefaultTemplate.bind(
|
|
60
|
+
{}
|
|
61
|
+
);
|
|
63
62
|
Default.args = {
|
|
64
63
|
label: 'Type a continent',
|
|
65
64
|
suggestions: continents,
|
|
66
65
|
};
|
|
67
66
|
|
|
68
|
-
export const Async:
|
|
67
|
+
export const Async: StoryFn< typeof FormTokenField > = ( {
|
|
69
68
|
suggestions,
|
|
70
69
|
...args
|
|
71
70
|
} ) => {
|
|
@@ -102,7 +101,7 @@ Async.args = {
|
|
|
102
101
|
suggestions: continents,
|
|
103
102
|
};
|
|
104
103
|
|
|
105
|
-
export const DropdownSelector:
|
|
104
|
+
export const DropdownSelector: StoryFn< typeof FormTokenField > =
|
|
106
105
|
DefaultTemplate.bind( {} );
|
|
107
106
|
DropdownSelector.args = {
|
|
108
107
|
...Default.args,
|
|
@@ -115,7 +114,7 @@ DropdownSelector.args = {
|
|
|
115
114
|
* render function to the `__experimentalRenderItem` prop. (This is still an experimental feature
|
|
116
115
|
* and is subject to change.)
|
|
117
116
|
*/
|
|
118
|
-
export const WithCustomRenderItem:
|
|
117
|
+
export const WithCustomRenderItem: StoryFn< typeof FormTokenField > =
|
|
119
118
|
DefaultTemplate.bind( {} );
|
|
120
119
|
WithCustomRenderItem.args = {
|
|
121
120
|
...Default.args,
|
|
@@ -129,7 +128,7 @@ WithCustomRenderItem.args = {
|
|
|
129
128
|
* `true` will be tokenized. (This is still an experimental feature and is
|
|
130
129
|
* subject to change.)
|
|
131
130
|
*/
|
|
132
|
-
export const WithValidatedInput:
|
|
131
|
+
export const WithValidatedInput: StoryFn< typeof FormTokenField > =
|
|
133
132
|
DefaultTemplate.bind( {} );
|
|
134
133
|
WithValidatedInput.args = {
|
|
135
134
|
...Default.args,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import type {
|
|
4
|
+
import type { Meta, StoryFn } from '@storybook/react';
|
|
5
5
|
/**
|
|
6
6
|
* WordPress dependencies
|
|
7
7
|
*/
|
|
@@ -12,7 +12,7 @@ import { useState } from '@wordpress/element';
|
|
|
12
12
|
*/
|
|
13
13
|
import GradientPicker from '..';
|
|
14
14
|
|
|
15
|
-
const meta:
|
|
15
|
+
const meta: Meta< typeof GradientPicker > = {
|
|
16
16
|
title: 'Components/GradientPicker',
|
|
17
17
|
component: GradientPicker,
|
|
18
18
|
parameters: {
|
|
@@ -65,7 +65,7 @@ const GRADIENTS = [
|
|
|
65
65
|
},
|
|
66
66
|
];
|
|
67
67
|
|
|
68
|
-
const Template:
|
|
68
|
+
const Template: StoryFn< typeof GradientPicker > = ( {
|
|
69
69
|
onChange,
|
|
70
70
|
...props
|
|
71
71
|
} ) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import type {
|
|
4
|
+
import type { Meta, StoryFn } from '@storybook/react';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Internal dependencies
|
|
@@ -9,7 +9,7 @@ import type { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
|
9
9
|
import { View } from '../../view';
|
|
10
10
|
import { Grid } from '..';
|
|
11
11
|
|
|
12
|
-
const meta:
|
|
12
|
+
const meta: Meta< typeof Grid > = {
|
|
13
13
|
component: Grid,
|
|
14
14
|
title: 'Components (Experimental)/Grid',
|
|
15
15
|
argTypes: {
|
|
@@ -51,7 +51,7 @@ const Item = ( props: { children: string } ) => (
|
|
|
51
51
|
/>
|
|
52
52
|
);
|
|
53
53
|
|
|
54
|
-
const Template:
|
|
54
|
+
const Template: StoryFn< typeof Grid > = ( props ) => (
|
|
55
55
|
<Grid { ...props }>
|
|
56
56
|
<Item>One</Item>
|
|
57
57
|
<Item>Two</Item>
|
|
@@ -64,7 +64,7 @@ const Template: ComponentStory< typeof Grid > = ( props ) => (
|
|
|
64
64
|
</Grid>
|
|
65
65
|
);
|
|
66
66
|
|
|
67
|
-
export const Default:
|
|
67
|
+
export const Default: StoryFn< typeof Grid > = Template.bind( {} );
|
|
68
68
|
Default.args = {
|
|
69
69
|
alignment: 'bottom',
|
|
70
70
|
columns: 4,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import type {
|
|
4
|
+
import type { Meta, StoryFn } from '@storybook/react';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
@@ -14,7 +14,7 @@ import { useState } from '@wordpress/element';
|
|
|
14
14
|
import Button from '../../button';
|
|
15
15
|
import Guide from '..';
|
|
16
16
|
|
|
17
|
-
const meta:
|
|
17
|
+
const meta: Meta< typeof Guide > = {
|
|
18
18
|
title: 'Components/Guide',
|
|
19
19
|
component: Guide,
|
|
20
20
|
argTypes: {
|
|
@@ -25,7 +25,7 @@ const meta: ComponentMeta< typeof Guide > = {
|
|
|
25
25
|
};
|
|
26
26
|
export default meta;
|
|
27
27
|
|
|
28
|
-
const Template:
|
|
28
|
+
const Template: StoryFn< typeof Guide > = ( { onFinish, ...props } ) => {
|
|
29
29
|
const [ isOpen, setOpen ] = useState( false );
|
|
30
30
|
|
|
31
31
|
const openGuide = () => setOpen( true );
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import type {
|
|
4
|
+
import type { StoryFn, Meta } from '@storybook/react';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Internal dependencies
|
|
@@ -9,13 +9,13 @@ import type { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
|
9
9
|
import { View } from '../../../view';
|
|
10
10
|
import { HStack } from '../..';
|
|
11
11
|
|
|
12
|
-
const meta:
|
|
12
|
+
const meta: Meta< typeof HStack > = {
|
|
13
13
|
component: HStack,
|
|
14
14
|
title: 'Components (Experimental)/HStack',
|
|
15
15
|
};
|
|
16
16
|
export default meta;
|
|
17
17
|
|
|
18
|
-
const Template:
|
|
18
|
+
const Template: StoryFn< typeof HStack > = ( props ) => {
|
|
19
19
|
return (
|
|
20
20
|
<HStack
|
|
21
21
|
style={ { background: '#eee', minHeight: '3rem' } }
|
|
@@ -30,7 +30,7 @@ const Template: ComponentStory< typeof HStack > = ( props ) => {
|
|
|
30
30
|
);
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
export const Default:
|
|
33
|
+
export const Default: StoryFn< typeof HStack > = Template.bind( {} );
|
|
34
34
|
Default.args = {
|
|
35
35
|
spacing: 3,
|
|
36
36
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import type {
|
|
4
|
+
import type { StoryFn, Meta } from '@storybook/react';
|
|
5
5
|
/**
|
|
6
6
|
* Internal dependencies
|
|
7
7
|
*/
|
|
@@ -40,7 +40,7 @@ const JUSTIFICATIONS = {
|
|
|
40
40
|
start: 'start',
|
|
41
41
|
};
|
|
42
42
|
|
|
43
|
-
const meta:
|
|
43
|
+
const meta: Meta< typeof HStack > = {
|
|
44
44
|
component: HStack,
|
|
45
45
|
title: 'Components (Experimental)/HStack',
|
|
46
46
|
argTypes: {
|
|
@@ -76,7 +76,7 @@ const meta: ComponentMeta< typeof HStack > = {
|
|
|
76
76
|
};
|
|
77
77
|
export default meta;
|
|
78
78
|
|
|
79
|
-
const Template:
|
|
79
|
+
const Template: StoryFn< typeof HStack > = ( args ) => (
|
|
80
80
|
<HStack { ...args } style={ { background: '#eee', minHeight: '3rem' } }>
|
|
81
81
|
{ [ 'One', 'Two', 'Three', 'Four', 'Five' ].map( ( text ) => (
|
|
82
82
|
<View key={ text } style={ { background: '#b9f9ff' } }>
|
|
@@ -86,7 +86,7 @@ const Template: ComponentStory< typeof HStack > = ( args ) => (
|
|
|
86
86
|
</HStack>
|
|
87
87
|
);
|
|
88
88
|
|
|
89
|
-
export const Default:
|
|
89
|
+
export const Default: StoryFn< typeof HStack > = Template.bind( {} );
|
|
90
90
|
Default.args = {
|
|
91
91
|
spacing: '3',
|
|
92
92
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import type {
|
|
4
|
+
import type { Meta, StoryFn } from '@storybook/react';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Internal dependencies
|
|
8
8
|
*/
|
|
9
9
|
import { Heading } from '..';
|
|
10
10
|
|
|
11
|
-
const meta:
|
|
11
|
+
const meta: Meta< typeof Heading > = {
|
|
12
12
|
component: Heading,
|
|
13
13
|
title: 'Components (Experimental)/Heading',
|
|
14
14
|
argTypes: {
|
|
@@ -33,7 +33,7 @@ const meta: ComponentMeta< typeof Heading > = {
|
|
|
33
33
|
};
|
|
34
34
|
export default meta;
|
|
35
35
|
|
|
36
|
-
export const Default:
|
|
36
|
+
export const Default: StoryFn< typeof Heading > = ( props ) => (
|
|
37
37
|
<Heading { ...props } />
|
|
38
38
|
);
|
|
39
39
|
Default.args = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import type {
|
|
4
|
+
import type { Meta, StoryFn } from '@storybook/react';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* WordPress dependencies
|
|
@@ -15,7 +15,7 @@ import { wordpress } from '@wordpress/icons';
|
|
|
15
15
|
import Icon from '..';
|
|
16
16
|
import { VStack } from '../../v-stack';
|
|
17
17
|
|
|
18
|
-
const meta:
|
|
18
|
+
const meta: Meta< typeof Icon > = {
|
|
19
19
|
title: 'Components/Icon',
|
|
20
20
|
component: Icon,
|
|
21
21
|
parameters: {
|
|
@@ -25,14 +25,14 @@ const meta: ComponentMeta< typeof Icon > = {
|
|
|
25
25
|
};
|
|
26
26
|
export default meta;
|
|
27
27
|
|
|
28
|
-
const Template:
|
|
28
|
+
const Template: StoryFn< typeof Icon > = ( args ) => <Icon { ...args } />;
|
|
29
29
|
|
|
30
30
|
export const Default = Template.bind( {} );
|
|
31
31
|
Default.args = {
|
|
32
32
|
icon: wordpress,
|
|
33
33
|
};
|
|
34
34
|
|
|
35
|
-
export const FillColor:
|
|
35
|
+
export const FillColor: StoryFn< typeof Icon > = ( args ) => {
|
|
36
36
|
return (
|
|
37
37
|
<div
|
|
38
38
|
style={ {
|
|
@@ -84,7 +84,7 @@ WithAnSVG.args = {
|
|
|
84
84
|
* as long as you are in a context where the Dashicons stylesheet is loaded. To simulate that here,
|
|
85
85
|
* use the Global CSS Injector in the Storybook toolbar at the top and select the "WordPress" preset.
|
|
86
86
|
*/
|
|
87
|
-
export const WithADashicon:
|
|
87
|
+
export const WithADashicon: StoryFn< typeof Icon > = ( args ) => {
|
|
88
88
|
return (
|
|
89
89
|
<VStack>
|
|
90
90
|
<Icon { ...args } />
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import type {
|
|
4
|
+
import type { Meta, StoryFn } from '@storybook/react';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Internal dependencies
|
|
@@ -10,9 +10,11 @@ import InputControl from '..';
|
|
|
10
10
|
import { InputControlPrefixWrapper } from '../input-prefix-wrapper';
|
|
11
11
|
import { InputControlSuffixWrapper } from '../input-suffix-wrapper';
|
|
12
12
|
|
|
13
|
-
const meta:
|
|
13
|
+
const meta: Meta< typeof InputControl > = {
|
|
14
14
|
title: 'Components (Experimental)/InputControl',
|
|
15
15
|
component: InputControl,
|
|
16
|
+
// @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
|
|
17
|
+
subcomponents: { InputControlPrefixWrapper, InputControlSuffixWrapper },
|
|
16
18
|
argTypes: {
|
|
17
19
|
__unstableInputWidth: { control: { type: 'text' } },
|
|
18
20
|
__unstableStateReducer: { control: { type: null } },
|
|
@@ -29,7 +31,7 @@ const meta: ComponentMeta< typeof InputControl > = {
|
|
|
29
31
|
};
|
|
30
32
|
export default meta;
|
|
31
33
|
|
|
32
|
-
const Template:
|
|
34
|
+
const Template: StoryFn< typeof InputControl > = ( args ) => (
|
|
33
35
|
<InputControl { ...args } />
|
|
34
36
|
);
|
|
35
37
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import type {
|
|
4
|
+
import type { Meta, StoryFn } from '@storybook/react';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Internal dependencies
|
|
@@ -11,8 +11,10 @@ import { Item } from '../item/component';
|
|
|
11
11
|
|
|
12
12
|
type ItemProps = React.ComponentPropsWithoutRef< typeof Item >;
|
|
13
13
|
|
|
14
|
-
const meta:
|
|
14
|
+
const meta: Meta< typeof ItemGroup > = {
|
|
15
15
|
component: ItemGroup,
|
|
16
|
+
// @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
|
|
17
|
+
subcomponents: { Item },
|
|
16
18
|
title: 'Components (Experimental)/ItemGroup',
|
|
17
19
|
argTypes: {
|
|
18
20
|
as: { control: { type: null } },
|
|
@@ -29,11 +31,11 @@ const mapPropsToItem = ( props: ItemProps, index: number ) => (
|
|
|
29
31
|
<Item { ...props } key={ index } />
|
|
30
32
|
);
|
|
31
33
|
|
|
32
|
-
const Template:
|
|
34
|
+
const Template: StoryFn< typeof ItemGroup > = ( props ) => (
|
|
33
35
|
<ItemGroup { ...props } />
|
|
34
36
|
);
|
|
35
37
|
|
|
36
|
-
export const Default:
|
|
38
|
+
export const Default: StoryFn< typeof ItemGroup > = Template.bind( {} );
|
|
37
39
|
Default.args = {
|
|
38
40
|
children: (
|
|
39
41
|
[
|
|
@@ -61,8 +63,9 @@ Default.args = {
|
|
|
61
63
|
).map( mapPropsToItem ),
|
|
62
64
|
};
|
|
63
65
|
|
|
64
|
-
export const NonClickableItems:
|
|
65
|
-
|
|
66
|
+
export const NonClickableItems: StoryFn< typeof ItemGroup > = Template.bind(
|
|
67
|
+
{}
|
|
68
|
+
);
|
|
66
69
|
NonClickableItems.args = {
|
|
67
70
|
children: (
|
|
68
71
|
[
|
|
@@ -78,9 +81,7 @@ NonClickableItems.args = {
|
|
|
78
81
|
).map( mapPropsToItem ),
|
|
79
82
|
};
|
|
80
83
|
|
|
81
|
-
export const CustomItemSize:
|
|
82
|
-
{}
|
|
83
|
-
);
|
|
84
|
+
export const CustomItemSize: StoryFn< typeof ItemGroup > = Template.bind( {} );
|
|
84
85
|
CustomItemSize.args = {
|
|
85
86
|
children: (
|
|
86
87
|
[
|
|
@@ -97,9 +98,7 @@ CustomItemSize.args = {
|
|
|
97
98
|
).map( mapPropsToItem ),
|
|
98
99
|
};
|
|
99
100
|
|
|
100
|
-
export const WithBorder:
|
|
101
|
-
{}
|
|
102
|
-
);
|
|
101
|
+
export const WithBorder: StoryFn< typeof ItemGroup > = Template.bind( {} );
|
|
103
102
|
WithBorder.args = {
|
|
104
103
|
...Default.args,
|
|
105
104
|
isBordered: true,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import type {
|
|
4
|
+
import type { Meta, StoryFn } from '@storybook/react';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Internal dependencies
|
|
8
8
|
*/
|
|
9
9
|
import KeyboardShortcuts from '..';
|
|
10
10
|
|
|
11
|
-
const meta:
|
|
11
|
+
const meta: Meta< typeof KeyboardShortcuts > = {
|
|
12
12
|
component: KeyboardShortcuts,
|
|
13
13
|
title: 'Components/KeyboardShortcuts',
|
|
14
14
|
parameters: {
|
|
@@ -18,7 +18,7 @@ const meta: ComponentMeta< typeof KeyboardShortcuts > = {
|
|
|
18
18
|
};
|
|
19
19
|
export default meta;
|
|
20
20
|
|
|
21
|
-
const Template:
|
|
21
|
+
const Template: StoryFn< typeof KeyboardShortcuts > = ( props ) => (
|
|
22
22
|
<KeyboardShortcuts { ...props } />
|
|
23
23
|
);
|
|
24
24
|
|