@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
|
|
@@ -14,7 +14,7 @@ import { useState, useEffect } from '@wordpress/element';
|
|
|
14
14
|
import DateTimePicker from '../date-time';
|
|
15
15
|
import { daysFromNow, isWeekend } from './utils';
|
|
16
16
|
|
|
17
|
-
const meta:
|
|
17
|
+
const meta: Meta< typeof DateTimePicker > = {
|
|
18
18
|
title: 'Components/DateTimePicker',
|
|
19
19
|
component: DateTimePicker,
|
|
20
20
|
argTypes: {
|
|
@@ -28,7 +28,7 @@ const meta: ComponentMeta< typeof DateTimePicker > = {
|
|
|
28
28
|
};
|
|
29
29
|
export default meta;
|
|
30
30
|
|
|
31
|
-
const Template:
|
|
31
|
+
const Template: StoryFn< typeof DateTimePicker > = ( {
|
|
32
32
|
currentDate,
|
|
33
33
|
onChange,
|
|
34
34
|
...args
|
|
@@ -49,12 +49,9 @@ const Template: ComponentStory< typeof DateTimePicker > = ( {
|
|
|
49
49
|
);
|
|
50
50
|
};
|
|
51
51
|
|
|
52
|
-
export const Default:
|
|
53
|
-
{}
|
|
54
|
-
);
|
|
52
|
+
export const Default: StoryFn< typeof DateTimePicker > = Template.bind( {} );
|
|
55
53
|
|
|
56
|
-
export const WithEvents:
|
|
57
|
-
Template.bind( {} );
|
|
54
|
+
export const WithEvents: StoryFn< typeof DateTimePicker > = Template.bind( {} );
|
|
58
55
|
WithEvents.args = {
|
|
59
56
|
currentDate: new Date(),
|
|
60
57
|
events: [
|
|
@@ -65,8 +62,9 @@ WithEvents.args = {
|
|
|
65
62
|
],
|
|
66
63
|
};
|
|
67
64
|
|
|
68
|
-
export const WithInvalidDates:
|
|
69
|
-
|
|
65
|
+
export const WithInvalidDates: StoryFn< typeof DateTimePicker > = Template.bind(
|
|
66
|
+
{}
|
|
67
|
+
);
|
|
70
68
|
WithInvalidDates.args = {
|
|
71
69
|
currentDate: new Date(),
|
|
72
70
|
isInvalidDate: isWeekend,
|
|
@@ -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, useEffect } from '@wordpress/element';
|
|
|
14
14
|
import DatePicker from '../date';
|
|
15
15
|
import { daysFromNow, isWeekend } from './utils';
|
|
16
16
|
|
|
17
|
-
const meta:
|
|
17
|
+
const meta: Meta< typeof DatePicker > = {
|
|
18
18
|
title: 'Components/DatePicker',
|
|
19
19
|
component: DatePicker,
|
|
20
20
|
argTypes: {
|
|
@@ -28,7 +28,7 @@ const meta: ComponentMeta< typeof DatePicker > = {
|
|
|
28
28
|
};
|
|
29
29
|
export default meta;
|
|
30
30
|
|
|
31
|
-
const Template:
|
|
31
|
+
const Template: StoryFn< typeof DatePicker > = ( {
|
|
32
32
|
currentDate,
|
|
33
33
|
onChange,
|
|
34
34
|
...args
|
|
@@ -49,11 +49,9 @@ const Template: ComponentStory< typeof DatePicker > = ( {
|
|
|
49
49
|
);
|
|
50
50
|
};
|
|
51
51
|
|
|
52
|
-
export const Default:
|
|
52
|
+
export const Default: StoryFn< typeof DatePicker > = Template.bind( {} );
|
|
53
53
|
|
|
54
|
-
export const WithEvents:
|
|
55
|
-
{}
|
|
56
|
-
);
|
|
54
|
+
export const WithEvents: StoryFn< typeof DatePicker > = Template.bind( {} );
|
|
57
55
|
WithEvents.args = {
|
|
58
56
|
currentDate: new Date(),
|
|
59
57
|
events: [
|
|
@@ -64,8 +62,9 @@ WithEvents.args = {
|
|
|
64
62
|
],
|
|
65
63
|
};
|
|
66
64
|
|
|
67
|
-
export const WithInvalidDates:
|
|
68
|
-
|
|
65
|
+
export const WithInvalidDates: StoryFn< typeof DatePicker > = Template.bind(
|
|
66
|
+
{}
|
|
67
|
+
);
|
|
69
68
|
WithInvalidDates.args = {
|
|
70
69
|
currentDate: new Date(),
|
|
71
70
|
isInvalidDate: isWeekend,
|
|
@@ -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, useEffect } from '@wordpress/element';
|
|
|
13
13
|
*/
|
|
14
14
|
import TimePicker from '../time';
|
|
15
15
|
|
|
16
|
-
const meta:
|
|
16
|
+
const meta: Meta< typeof TimePicker > = {
|
|
17
17
|
title: 'Components/TimePicker',
|
|
18
18
|
component: TimePicker,
|
|
19
19
|
argTypes: {
|
|
@@ -27,7 +27,7 @@ const meta: ComponentMeta< typeof TimePicker > = {
|
|
|
27
27
|
};
|
|
28
28
|
export default meta;
|
|
29
29
|
|
|
30
|
-
const Template:
|
|
30
|
+
const Template: StoryFn< typeof TimePicker > = ( {
|
|
31
31
|
currentTime,
|
|
32
32
|
onChange,
|
|
33
33
|
...args
|
|
@@ -48,4 +48,4 @@ const Template: ComponentStory< typeof TimePicker > = ( {
|
|
|
48
48
|
);
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
-
export const Default:
|
|
51
|
+
export const Default: StoryFn< typeof TimePicker > = Template.bind( {} );
|
|
@@ -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
|
* Internal dependencies
|
|
7
7
|
*/
|
|
@@ -34,9 +34,9 @@ export default {
|
|
|
34
34
|
docs: { canvas: { sourceState: 'shown' } },
|
|
35
35
|
},
|
|
36
36
|
},
|
|
37
|
-
} as
|
|
37
|
+
} as Meta< typeof DimensionControl >;
|
|
38
38
|
|
|
39
|
-
const Template:
|
|
39
|
+
const Template: StoryFn< typeof DimensionControl > = ( args ) => (
|
|
40
40
|
<DimensionControl { ...args } />
|
|
41
41
|
);
|
|
42
42
|
|
|
@@ -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
|
|
@@ -17,7 +17,7 @@ import TextControl from '../../text-control/';
|
|
|
17
17
|
import TextareaControl from '../../textarea-control/';
|
|
18
18
|
import { VStack } from '../../v-stack/';
|
|
19
19
|
|
|
20
|
-
const meta:
|
|
20
|
+
const meta: Meta< typeof Disabled > = {
|
|
21
21
|
title: 'Components/Disabled',
|
|
22
22
|
component: Disabled,
|
|
23
23
|
argTypes: {
|
|
@@ -66,7 +66,7 @@ const Form = () => {
|
|
|
66
66
|
);
|
|
67
67
|
};
|
|
68
68
|
|
|
69
|
-
export const Default:
|
|
69
|
+
export const Default: StoryFn< typeof Disabled > = ( args ) => {
|
|
70
70
|
return (
|
|
71
71
|
<Disabled { ...args }>
|
|
72
72
|
<Form />
|
|
@@ -77,7 +77,7 @@ Default.args = {
|
|
|
77
77
|
isDisabled: true,
|
|
78
78
|
};
|
|
79
79
|
|
|
80
|
-
export const ContentEditable:
|
|
80
|
+
export const ContentEditable: StoryFn< typeof Disabled > = ( args ) => {
|
|
81
81
|
return (
|
|
82
82
|
<Disabled { ...args }>
|
|
83
83
|
<div contentEditable tabIndex={ 0 }>
|
|
@@ -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,7 +10,7 @@ import { Text } from '../../text';
|
|
|
10
10
|
import { Divider } from '..';
|
|
11
11
|
import { Flex } from '../../flex';
|
|
12
12
|
|
|
13
|
-
const meta:
|
|
13
|
+
const meta: Meta< typeof Divider > = {
|
|
14
14
|
component: Divider,
|
|
15
15
|
title: 'Components (Experimental)/Divider',
|
|
16
16
|
argTypes: {
|
|
@@ -31,7 +31,7 @@ const meta: ComponentMeta< typeof Divider > = {
|
|
|
31
31
|
};
|
|
32
32
|
export default meta;
|
|
33
33
|
|
|
34
|
-
const Template:
|
|
34
|
+
const Template: StoryFn< typeof Divider > = ( args ) => (
|
|
35
35
|
<div>
|
|
36
36
|
<Text>Some text before the divider</Text>
|
|
37
37
|
<Divider { ...args } />
|
|
@@ -39,19 +39,19 @@ const Template: ComponentStory< typeof Divider > = ( args ) => (
|
|
|
39
39
|
</div>
|
|
40
40
|
);
|
|
41
41
|
|
|
42
|
-
export const Horizontal:
|
|
42
|
+
export const Horizontal: StoryFn< typeof Divider > = Template.bind( {} );
|
|
43
43
|
Horizontal.args = {
|
|
44
44
|
margin: '2',
|
|
45
45
|
};
|
|
46
46
|
|
|
47
|
-
export const Vertical:
|
|
47
|
+
export const Vertical: StoryFn< typeof Divider > = Template.bind( {} );
|
|
48
48
|
Vertical.args = {
|
|
49
49
|
...Horizontal.args,
|
|
50
50
|
orientation: 'vertical',
|
|
51
51
|
};
|
|
52
52
|
|
|
53
53
|
// Inside a `flex` container, the divider will need to be `stretch` aligned in order to be visible.
|
|
54
|
-
export const InFlexContainer:
|
|
54
|
+
export const InFlexContainer: StoryFn< typeof Divider > = ( args ) => {
|
|
55
55
|
return (
|
|
56
56
|
<Flex align="stretch">
|
|
57
57
|
<Text>
|
|
@@ -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 { DragEvent } from 'react';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -16,7 +16,7 @@ import { Icon, more } from '@wordpress/icons';
|
|
|
16
16
|
*/
|
|
17
17
|
import Draggable from '..';
|
|
18
18
|
|
|
19
|
-
const meta:
|
|
19
|
+
const meta: Meta< typeof Draggable > = {
|
|
20
20
|
component: Draggable,
|
|
21
21
|
title: 'Components/Draggable',
|
|
22
22
|
argTypes: {
|
|
@@ -31,7 +31,7 @@ const meta: ComponentMeta< typeof Draggable > = {
|
|
|
31
31
|
};
|
|
32
32
|
export default meta;
|
|
33
33
|
|
|
34
|
-
const DefaultTemplate:
|
|
34
|
+
const DefaultTemplate: StoryFn< typeof Draggable > = ( args ) => {
|
|
35
35
|
const [ isDragging, setDragging ] = useState( false );
|
|
36
36
|
const instanceId = useInstanceId( DefaultTemplate );
|
|
37
37
|
|
|
@@ -100,9 +100,7 @@ const DefaultTemplate: ComponentStory< typeof Draggable > = ( args ) => {
|
|
|
100
100
|
);
|
|
101
101
|
};
|
|
102
102
|
|
|
103
|
-
export const Default:
|
|
104
|
-
{}
|
|
105
|
-
);
|
|
103
|
+
export const Default: StoryFn< typeof Draggable > = DefaultTemplate.bind( {} );
|
|
106
104
|
Default.args = {};
|
|
107
105
|
|
|
108
106
|
/**
|
|
@@ -112,7 +110,7 @@ Default.args = {};
|
|
|
112
110
|
* For example, when the element's parent sets a `z-index` value that would cause the dragged
|
|
113
111
|
* element to be rendered behind other elements.
|
|
114
112
|
*/
|
|
115
|
-
export const AppendElementToOwnerDocument:
|
|
113
|
+
export const AppendElementToOwnerDocument: StoryFn< typeof Draggable > =
|
|
116
114
|
DefaultTemplate.bind( {} );
|
|
117
115
|
AppendElementToOwnerDocument.args = {
|
|
118
116
|
appendToOwnerDocument: true,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import type {
|
|
4
|
+
import type { Meta, StoryFn } from '@storybook/react';
|
|
5
5
|
/**
|
|
6
6
|
* Internal dependencies
|
|
7
7
|
*/
|
|
8
8
|
import DropZone from '..';
|
|
9
9
|
|
|
10
|
-
const meta:
|
|
10
|
+
const meta: Meta< typeof DropZone > = {
|
|
11
11
|
component: DropZone,
|
|
12
12
|
title: 'Components/DropZone',
|
|
13
13
|
parameters: {
|
|
@@ -18,7 +18,7 @@ const meta: ComponentMeta< typeof DropZone > = {
|
|
|
18
18
|
};
|
|
19
19
|
export default meta;
|
|
20
20
|
|
|
21
|
-
const Template:
|
|
21
|
+
const Template: StoryFn< typeof DropZone > = ( props ) => {
|
|
22
22
|
return (
|
|
23
23
|
<div style={ { background: 'lightgray', padding: 16 } }>
|
|
24
24
|
Drop something here
|
|
@@ -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 Dropdown from '..';
|
|
|
10
10
|
import Button from '../../button';
|
|
11
11
|
import { DropdownContentWrapper } from '../dropdown-content-wrapper';
|
|
12
12
|
|
|
13
|
-
const meta:
|
|
13
|
+
const meta: Meta< typeof Dropdown > = {
|
|
14
14
|
title: 'Components/Dropdown',
|
|
15
15
|
component: Dropdown,
|
|
16
|
+
// @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
|
|
17
|
+
subcomponents: { DropdownContentWrapper },
|
|
16
18
|
argTypes: {
|
|
17
19
|
focusOnMount: {
|
|
18
20
|
options: [ 'firstElement', true, false ],
|
|
@@ -32,7 +34,7 @@ const meta: ComponentMeta< typeof Dropdown > = {
|
|
|
32
34
|
};
|
|
33
35
|
export default meta;
|
|
34
36
|
|
|
35
|
-
const Template:
|
|
37
|
+
const Template: StoryFn< typeof Dropdown > = ( args ) => {
|
|
36
38
|
return (
|
|
37
39
|
<div style={ { height: 150 } }>
|
|
38
40
|
<Dropdown { ...args } />
|
|
@@ -40,7 +42,7 @@ const Template: Story< typeof Dropdown > = ( args ) => {
|
|
|
40
42
|
);
|
|
41
43
|
};
|
|
42
44
|
|
|
43
|
-
export const Default
|
|
45
|
+
export const Default = Template.bind( {} );
|
|
44
46
|
Default.args = {
|
|
45
47
|
renderToggle: ( { isOpen, onToggle } ) => (
|
|
46
48
|
<Button onClick={ onToggle } aria-expanded={ isOpen } variant="primary">
|
|
@@ -54,7 +56,7 @@ Default.args = {
|
|
|
54
56
|
* To apply more padding to the dropdown content, use the provided `<DropdownContentWrapper>`
|
|
55
57
|
* convenience wrapper. A `paddingSize` of `"medium"` is suitable for relatively larger dropdowns (default is `"small"`).
|
|
56
58
|
*/
|
|
57
|
-
export const WithMorePadding
|
|
59
|
+
export const WithMorePadding = Template.bind( {} );
|
|
58
60
|
WithMorePadding.args = {
|
|
59
61
|
...Default.args,
|
|
60
62
|
renderContent: () => (
|
|
@@ -69,7 +71,7 @@ WithMorePadding.args = {
|
|
|
69
71
|
* with a `paddingSize` of `"none"`. This can also serve as a clean foundation to add arbitrary
|
|
70
72
|
* paddings, for example when child components already have padding on their own.
|
|
71
73
|
*/
|
|
72
|
-
export const WithNoPadding
|
|
74
|
+
export const WithNoPadding = Template.bind( {} );
|
|
73
75
|
WithNoPadding.args = {
|
|
74
76
|
...Default.args,
|
|
75
77
|
renderContent: () => (
|
|
@@ -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
|
* Internal dependencies
|
|
7
7
|
*/
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
trash,
|
|
22
22
|
} from '@wordpress/icons';
|
|
23
23
|
|
|
24
|
-
const meta:
|
|
24
|
+
const meta: Meta< typeof DropdownMenu > = {
|
|
25
25
|
title: 'Components/DropdownMenu',
|
|
26
26
|
component: DropdownMenu,
|
|
27
27
|
parameters: {
|
|
@@ -38,7 +38,7 @@ const meta: ComponentMeta< typeof DropdownMenu > = {
|
|
|
38
38
|
};
|
|
39
39
|
export default meta;
|
|
40
40
|
|
|
41
|
-
const Template:
|
|
41
|
+
const Template: StoryFn< typeof DropdownMenu > = ( props ) => (
|
|
42
42
|
<div style={ { height: 150 } }>
|
|
43
43
|
<DropdownMenu { ...props } />
|
|
44
44
|
</div>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* External dependencies
|
|
3
3
|
*/
|
|
4
|
-
import type { Meta,
|
|
4
|
+
import type { Meta, StoryFn } from '@storybook/react';
|
|
5
5
|
import styled from '@emotion/styled';
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -21,8 +21,6 @@ import {
|
|
|
21
21
|
DropdownSubMenuTrigger,
|
|
22
22
|
} from '..';
|
|
23
23
|
import Button from '../../button';
|
|
24
|
-
import Popover from '../../popover';
|
|
25
|
-
import { Provider as SlotFillProvider } from '../../slot-fill';
|
|
26
24
|
|
|
27
25
|
/**
|
|
28
26
|
* WordPress dependencies
|
|
@@ -39,6 +37,26 @@ import { ContextSystemProvider } from '../../ui/context';
|
|
|
39
37
|
const meta: Meta< typeof DropdownMenu > = {
|
|
40
38
|
title: 'Components (Experimental)/DropdownMenu v2',
|
|
41
39
|
component: DropdownMenu,
|
|
40
|
+
subcomponents: {
|
|
41
|
+
// @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
|
|
42
|
+
DropdownMenuItem,
|
|
43
|
+
// @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
|
|
44
|
+
DropdownSubMenu,
|
|
45
|
+
// @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
|
|
46
|
+
DropdownSubMenuTrigger,
|
|
47
|
+
// @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
|
|
48
|
+
DropdownMenuSeparator,
|
|
49
|
+
// @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
|
|
50
|
+
DropdownMenuCheckboxItem,
|
|
51
|
+
// @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
|
|
52
|
+
DropdownMenuGroup,
|
|
53
|
+
// @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
|
|
54
|
+
DropdownMenuLabel,
|
|
55
|
+
// @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
|
|
56
|
+
DropdownMenuRadioGroup,
|
|
57
|
+
// @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
|
|
58
|
+
DropdownMenuRadioItem,
|
|
59
|
+
},
|
|
42
60
|
argTypes: {
|
|
43
61
|
children: { control: { type: null } },
|
|
44
62
|
trigger: { control: { type: null } },
|
|
@@ -122,12 +140,8 @@ const RadioItemsGroup = () => {
|
|
|
122
140
|
);
|
|
123
141
|
};
|
|
124
142
|
|
|
125
|
-
const Template:
|
|
126
|
-
<
|
|
127
|
-
<DropdownMenu { ...props } />
|
|
128
|
-
{ /* @ts-expect-error Slot is not currently typed on Popover */ }
|
|
129
|
-
<Popover.Slot />
|
|
130
|
-
</SlotFillProvider>
|
|
143
|
+
const Template: StoryFn< typeof DropdownMenu > = ( props ) => (
|
|
144
|
+
<DropdownMenu { ...props } />
|
|
131
145
|
);
|
|
132
146
|
export const Default = Template.bind( {} );
|
|
133
147
|
Default.args = {
|
|
@@ -197,7 +211,7 @@ const toolbarVariantContextValue = {
|
|
|
197
211
|
variant: 'toolbar',
|
|
198
212
|
},
|
|
199
213
|
};
|
|
200
|
-
export const ToolbarVariant:
|
|
214
|
+
export const ToolbarVariant: StoryFn< typeof DropdownMenu > = ( props ) => (
|
|
201
215
|
<ContextSystemProvider value={ toolbarVariantContextValue }>
|
|
202
216
|
<DropdownMenu { ...props } />
|
|
203
217
|
</ContextSystemProvider>
|
|
@@ -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 { DuotonePicker } from '..';
|
|
15
15
|
import type { DuotonePickerProps } from '../types';
|
|
16
16
|
|
|
17
|
-
const meta:
|
|
17
|
+
const meta: Meta< typeof DuotonePicker > = {
|
|
18
18
|
title: 'Components/DuotonePicker',
|
|
19
19
|
component: DuotonePicker,
|
|
20
20
|
argTypes: {
|
|
@@ -48,10 +48,7 @@ const COLOR_PALETTE = [
|
|
|
48
48
|
{ color: '#8c00b7', name: 'Purple', slug: 'purple' },
|
|
49
49
|
];
|
|
50
50
|
|
|
51
|
-
const Template:
|
|
52
|
-
onChange,
|
|
53
|
-
...args
|
|
54
|
-
} ) => {
|
|
51
|
+
const Template: StoryFn< typeof DuotonePicker > = ( { onChange, ...args } ) => {
|
|
55
52
|
const [ value, setValue ] = useState< DuotonePickerProps[ 'value' ] >();
|
|
56
53
|
|
|
57
54
|
return (
|
|
@@ -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 { DuotoneSwatch } from '..';
|
|
10
10
|
|
|
11
|
-
const meta:
|
|
11
|
+
const meta: Meta< typeof DuotoneSwatch > = {
|
|
12
12
|
title: 'Components/DuotoneSwatch',
|
|
13
13
|
component: DuotoneSwatch,
|
|
14
14
|
parameters: {
|
|
@@ -18,7 +18,7 @@ const meta: ComponentMeta< typeof DuotoneSwatch > = {
|
|
|
18
18
|
};
|
|
19
19
|
export default meta;
|
|
20
20
|
|
|
21
|
-
const Template:
|
|
21
|
+
const Template: StoryFn< typeof DuotoneSwatch > = ( args ) => {
|
|
22
22
|
return <DuotoneSwatch { ...args } />;
|
|
23
23
|
};
|
|
24
24
|
|
|
@@ -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 { Elevation } from '..';
|
|
10
10
|
|
|
11
|
-
const meta:
|
|
11
|
+
const meta: Meta< typeof Elevation > = {
|
|
12
12
|
component: Elevation,
|
|
13
13
|
title: 'Components (Experimental)/Elevation',
|
|
14
14
|
argTypes: {
|
|
@@ -24,7 +24,7 @@ const meta: ComponentMeta< typeof Elevation > = {
|
|
|
24
24
|
};
|
|
25
25
|
export default meta;
|
|
26
26
|
|
|
27
|
-
const Template:
|
|
27
|
+
const Template: StoryFn< typeof Elevation > = ( args ) => {
|
|
28
28
|
return (
|
|
29
29
|
<div
|
|
30
30
|
style={ {
|
|
@@ -38,7 +38,7 @@ const Template: ComponentStory< typeof Elevation > = ( args ) => {
|
|
|
38
38
|
);
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
-
const InteractiveTemplate:
|
|
41
|
+
const InteractiveTemplate: StoryFn< typeof Elevation > = ( args ) => {
|
|
42
42
|
return (
|
|
43
43
|
<button
|
|
44
44
|
style={ {
|
|
@@ -55,7 +55,7 @@ const InteractiveTemplate: ComponentStory< typeof Elevation > = ( args ) => {
|
|
|
55
55
|
);
|
|
56
56
|
};
|
|
57
57
|
|
|
58
|
-
export const Default:
|
|
58
|
+
export const Default: StoryFn< typeof Elevation > = Template.bind( {} );
|
|
59
59
|
Default.args = {
|
|
60
60
|
value: 5,
|
|
61
61
|
};
|
|
@@ -64,7 +64,7 @@ Default.args = {
|
|
|
64
64
|
* Enable the `isInteractive` prop to automatically generate values
|
|
65
65
|
* for the hover/active/focus states.
|
|
66
66
|
*/
|
|
67
|
-
export const WithInteractive:
|
|
67
|
+
export const WithInteractive: StoryFn< typeof Elevation > =
|
|
68
68
|
InteractiveTemplate.bind( {} );
|
|
69
69
|
WithInteractive.args = {
|
|
70
70
|
...Default.args,
|
|
@@ -75,7 +75,7 @@ WithInteractive.args = {
|
|
|
75
75
|
* You can also provide custom values for the hover/active/focus states
|
|
76
76
|
* instead of using the `isInteractive` prop.
|
|
77
77
|
*/
|
|
78
|
-
export const WithCustomInteractive:
|
|
78
|
+
export const WithCustomInteractive: StoryFn< typeof Elevation > =
|
|
79
79
|
InteractiveTemplate.bind( {} );
|
|
80
80
|
WithCustomInteractive.args = {
|
|
81
81
|
...Default.args,
|
|
@@ -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 ExternalLink from '..';
|
|
10
10
|
|
|
11
|
-
const meta:
|
|
11
|
+
const meta: Meta< typeof ExternalLink > = {
|
|
12
12
|
component: ExternalLink,
|
|
13
13
|
title: 'Components/ExternalLink',
|
|
14
14
|
argTypes: {
|
|
@@ -23,13 +23,11 @@ const meta: ComponentMeta< typeof ExternalLink > = {
|
|
|
23
23
|
};
|
|
24
24
|
export default meta;
|
|
25
25
|
|
|
26
|
-
const Template:
|
|
26
|
+
const Template: StoryFn< typeof ExternalLink > = ( { ...args } ) => {
|
|
27
27
|
return <ExternalLink { ...args } />;
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
-
export const Default:
|
|
31
|
-
{}
|
|
32
|
-
);
|
|
30
|
+
export const Default: StoryFn< typeof ExternalLink > = Template.bind( {} );
|
|
33
31
|
Default.args = {
|
|
34
32
|
children: 'WordPress',
|
|
35
33
|
href: 'https://wordpress.org',
|
|
@@ -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,9 +9,11 @@ import type { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
|
9
9
|
import { Flex, FlexItem, FlexBlock } from '../';
|
|
10
10
|
import { View } from '../../view';
|
|
11
11
|
|
|
12
|
-
const meta:
|
|
12
|
+
const meta: Meta< typeof Flex > = {
|
|
13
13
|
component: Flex,
|
|
14
14
|
title: 'Components/Flex',
|
|
15
|
+
// @ts-expect-error - See https://github.com/storybookjs/storybook/issues/23170
|
|
16
|
+
subcomponents: { FlexBlock, FlexItem },
|
|
15
17
|
argTypes: {
|
|
16
18
|
align: { control: { type: 'text' } },
|
|
17
19
|
as: { control: { type: 'text' } },
|
|
@@ -38,7 +40,7 @@ const GrayBox = ( { children }: { children: string } ) => (
|
|
|
38
40
|
<View style={ { backgroundColor: '#eee', padding: 10 } }>{ children }</View>
|
|
39
41
|
);
|
|
40
42
|
|
|
41
|
-
export const Default:
|
|
43
|
+
export const Default: StoryFn< typeof Flex > = ( { ...args } ) => {
|
|
42
44
|
return (
|
|
43
45
|
<Flex { ...args }>
|
|
44
46
|
<FlexItem>
|
|
@@ -55,9 +57,7 @@ export const Default: ComponentStory< typeof Flex > = ( { ...args } ) => {
|
|
|
55
57
|
};
|
|
56
58
|
Default.args = {};
|
|
57
59
|
|
|
58
|
-
export const ResponsiveDirection:
|
|
59
|
-
...args
|
|
60
|
-
} ) => {
|
|
60
|
+
export const ResponsiveDirection: StoryFn< typeof Flex > = ( { ...args } ) => {
|
|
61
61
|
return (
|
|
62
62
|
<Flex { ...args }>
|
|
63
63
|
<FlexItem>
|