@wordpress/ui 0.12.0 → 0.13.1-next.v.202605131006.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 +35 -0
- package/CONTRIBUTING.md +34 -0
- package/build/alert-dialog/popup.cjs +92 -22
- package/build/alert-dialog/popup.cjs.map +3 -3
- package/build/badge/badge.cjs +84 -5
- package/build/badge/badge.cjs.map +3 -3
- package/build/button/button.cjs +90 -20
- package/build/button/button.cjs.map +3 -3
- package/build/button/icon.cjs.map +2 -2
- package/build/button/index.cjs +1 -0
- package/build/button/index.cjs.map +3 -3
- package/build/button/types.cjs.map +1 -1
- package/build/card/content.cjs +84 -5
- package/build/card/content.cjs.map +3 -3
- package/build/card/full-bleed.cjs +84 -5
- package/build/card/full-bleed.cjs.map +3 -3
- package/build/card/header.cjs +84 -5
- package/build/card/header.cjs.map +3 -3
- package/build/card/root.cjs +86 -10
- package/build/card/root.cjs.map +3 -3
- package/build/collapsible-card/content.cjs +85 -6
- package/build/collapsible-card/content.cjs.map +3 -3
- package/build/collapsible-card/header.cjs +131 -52
- package/build/collapsible-card/header.cjs.map +3 -3
- package/build/dialog/content.cjs +86 -10
- package/build/dialog/content.cjs.map +3 -3
- package/build/dialog/description.cjs +84 -5
- package/build/dialog/description.cjs.map +3 -3
- package/build/dialog/footer.cjs +84 -5
- package/build/dialog/footer.cjs.map +3 -3
- package/build/dialog/header.cjs +84 -5
- package/build/dialog/header.cjs.map +3 -3
- package/build/dialog/popup.cjs +86 -7
- package/build/dialog/popup.cjs.map +3 -3
- package/build/dialog/title.cjs +84 -5
- package/build/dialog/title.cjs.map +3 -3
- package/build/drawer/content.cjs +103 -19
- package/build/drawer/content.cjs.map +4 -4
- package/build/drawer/footer.cjs +84 -5
- package/build/drawer/footer.cjs.map +3 -3
- package/build/drawer/header.cjs +84 -5
- package/build/drawer/header.cjs.map +3 -3
- package/build/drawer/popup.cjs +86 -7
- package/build/drawer/popup.cjs.map +3 -3
- package/build/drawer/title.cjs +84 -5
- package/build/drawer/title.cjs.map +3 -3
- package/build/drawer/types.cjs.map +1 -1
- package/build/empty-state/actions.cjs +84 -5
- package/build/empty-state/actions.cjs.map +3 -3
- package/build/empty-state/description.cjs +84 -5
- package/build/empty-state/description.cjs.map +3 -3
- package/build/empty-state/icon.cjs +84 -5
- package/build/empty-state/icon.cjs.map +3 -3
- package/build/empty-state/root.cjs +84 -5
- package/build/empty-state/root.cjs.map +3 -3
- package/build/empty-state/title.cjs +84 -5
- package/build/empty-state/title.cjs.map +3 -3
- package/build/empty-state/visual.cjs +84 -5
- package/build/empty-state/visual.cjs.map +3 -3
- package/build/form/index.cjs +3 -1
- package/build/form/index.cjs.map +2 -2
- package/build/form/primitives/autocomplete/empty.cjs +84 -5
- package/build/form/primitives/autocomplete/empty.cjs.map +3 -3
- package/build/form/primitives/autocomplete/item.cjs +86 -10
- package/build/form/primitives/autocomplete/item.cjs.map +3 -3
- package/build/form/primitives/autocomplete/list-body.cjs +84 -5
- package/build/form/primitives/autocomplete/list-body.cjs.map +3 -3
- package/build/form/primitives/autocomplete/list.cjs +84 -5
- package/build/form/primitives/autocomplete/list.cjs.map +3 -3
- package/build/form/primitives/autocomplete/popup.cjs +90 -17
- package/build/form/primitives/autocomplete/popup.cjs.map +3 -3
- package/build/form/primitives/field/description.cjs +86 -10
- package/build/form/primitives/field/description.cjs.map +3 -3
- package/build/form/primitives/field/details.cjs +84 -5
- package/build/form/primitives/field/details.cjs.map +3 -3
- package/build/form/primitives/field/label.cjs +84 -5
- package/build/form/primitives/field/label.cjs.map +3 -3
- package/build/form/primitives/field/root.cjs +84 -5
- package/build/form/primitives/field/root.cjs.map +3 -3
- package/build/form/primitives/fieldset/description.cjs +86 -10
- package/build/form/primitives/fieldset/description.cjs.map +3 -3
- package/build/form/primitives/fieldset/details.cjs +84 -5
- package/build/form/primitives/fieldset/details.cjs.map +3 -3
- package/build/form/primitives/fieldset/legend.cjs +84 -5
- package/build/form/primitives/fieldset/legend.cjs.map +3 -3
- package/build/form/primitives/fieldset/root.cjs +84 -5
- package/build/form/primitives/fieldset/root.cjs.map +3 -3
- package/build/form/primitives/input/input.cjs +88 -15
- package/build/form/primitives/input/input.cjs.map +3 -3
- package/build/form/primitives/input-layout/input-layout.cjs +88 -15
- package/build/form/primitives/input-layout/input-layout.cjs.map +3 -3
- package/build/form/primitives/input-layout/slot.cjs +84 -5
- package/build/form/primitives/input-layout/slot.cjs.map +3 -3
- package/build/form/primitives/select/item.cjs +87 -11
- package/build/form/primitives/select/item.cjs.map +3 -3
- package/build/form/primitives/select/popup.cjs +90 -17
- package/build/form/primitives/select/popup.cjs.map +3 -3
- package/build/form/primitives/select/root.cjs.map +2 -2
- package/build/form/primitives/select/trigger.cjs +98 -16
- package/build/form/primitives/select/trigger.cjs.map +3 -3
- package/build/form/primitives/select/types.cjs.map +1 -1
- package/build/form/primitives/textarea/textarea.cjs +86 -10
- package/build/form/primitives/textarea/textarea.cjs.map +3 -3
- package/build/form/select-control/context.cjs +37 -0
- package/build/form/select-control/context.cjs.map +7 -0
- package/build/form/select-control/index.cjs +39 -0
- package/build/form/select-control/index.cjs.map +7 -0
- package/build/form/select-control/item.cjs +41 -0
- package/build/form/select-control/item.cjs.map +7 -0
- package/build/form/select-control/select-control.cjs +75 -0
- package/build/form/select-control/select-control.cjs.map +7 -0
- package/build/form/select-control/types.cjs +19 -0
- package/build/form/select-control/types.cjs.map +7 -0
- package/build/form/types.cjs.map +1 -1
- package/build/icon-button/icon-button.cjs +86 -6
- package/build/icon-button/icon-button.cjs.map +3 -3
- package/build/icon-button/types.cjs.map +1 -1
- package/build/link/link.cjs +90 -20
- package/build/link/link.cjs.map +3 -3
- package/build/notice/action-button.cjs +84 -5
- package/build/notice/action-button.cjs.map +3 -3
- package/build/notice/action-link.cjs +84 -5
- package/build/notice/action-link.cjs.map +3 -3
- package/build/notice/actions.cjs +84 -5
- package/build/notice/actions.cjs.map +3 -3
- package/build/notice/close-icon.cjs +84 -5
- package/build/notice/close-icon.cjs.map +3 -3
- package/build/notice/description.cjs +84 -5
- package/build/notice/description.cjs.map +3 -3
- package/build/notice/root.cjs +86 -10
- package/build/notice/root.cjs.map +3 -3
- package/build/notice/title.cjs +84 -5
- package/build/notice/title.cjs.map +3 -3
- package/build/popover/arrow.cjs +84 -5
- package/build/popover/arrow.cjs.map +3 -3
- package/build/popover/popup.cjs +88 -12
- package/build/popover/popup.cjs.map +3 -3
- package/build/popover/title.cjs +84 -5
- package/build/popover/title.cjs.map +3 -3
- package/build/stack/stack.cjs +84 -5
- package/build/stack/stack.cjs.map +3 -3
- package/build/tabs/list.cjs +84 -5
- package/build/tabs/list.cjs.map +3 -3
- package/build/tabs/panel.cjs +86 -10
- package/build/tabs/panel.cjs.map +3 -3
- package/build/tabs/tab.cjs +84 -5
- package/build/tabs/tab.cjs.map +3 -3
- package/build/text/text.cjs +86 -10
- package/build/text/text.cjs.map +3 -3
- package/build/tooltip/index.cjs +3 -0
- package/build/tooltip/index.cjs.map +2 -2
- package/build/tooltip/popup.cjs +111 -40
- package/build/tooltip/popup.cjs.map +3 -3
- package/build/tooltip/positioner.cjs +159 -0
- package/build/tooltip/positioner.cjs.map +7 -0
- package/build/tooltip/types.cjs.map +1 -1
- package/build/utils/{render-portal-with-children.cjs → render-slot-with-children.cjs} +9 -12
- package/build/utils/render-slot-with-children.cjs.map +7 -0
- package/build/visually-hidden/visually-hidden.cjs +84 -5
- package/build/visually-hidden/visually-hidden.cjs.map +3 -3
- package/build-module/alert-dialog/popup.mjs +92 -22
- package/build-module/alert-dialog/popup.mjs.map +3 -3
- package/build-module/badge/badge.mjs +84 -5
- package/build-module/badge/badge.mjs.map +3 -3
- package/build-module/button/button.mjs +90 -20
- package/build-module/button/button.mjs.map +3 -3
- package/build-module/button/icon.mjs.map +2 -2
- package/build-module/button/index.mjs +3 -2
- package/build-module/button/index.mjs.map +2 -2
- package/build-module/card/content.mjs +84 -5
- package/build-module/card/content.mjs.map +3 -3
- package/build-module/card/full-bleed.mjs +84 -5
- package/build-module/card/full-bleed.mjs.map +3 -3
- package/build-module/card/header.mjs +84 -5
- package/build-module/card/header.mjs.map +3 -3
- package/build-module/card/root.mjs +86 -10
- package/build-module/card/root.mjs.map +3 -3
- package/build-module/collapsible-card/content.mjs +85 -6
- package/build-module/collapsible-card/content.mjs.map +3 -3
- package/build-module/collapsible-card/header.mjs +131 -52
- package/build-module/collapsible-card/header.mjs.map +3 -3
- package/build-module/dialog/content.mjs +86 -10
- package/build-module/dialog/content.mjs.map +3 -3
- package/build-module/dialog/description.mjs +84 -5
- package/build-module/dialog/description.mjs.map +3 -3
- package/build-module/dialog/footer.mjs +84 -5
- package/build-module/dialog/footer.mjs.map +3 -3
- package/build-module/dialog/header.mjs +84 -5
- package/build-module/dialog/header.mjs.map +3 -3
- package/build-module/dialog/popup.mjs +86 -7
- package/build-module/dialog/popup.mjs.map +3 -3
- package/build-module/dialog/title.mjs +84 -5
- package/build-module/dialog/title.mjs.map +3 -3
- package/build-module/drawer/content.mjs +103 -19
- package/build-module/drawer/content.mjs.map +3 -3
- package/build-module/drawer/footer.mjs +84 -5
- package/build-module/drawer/footer.mjs.map +3 -3
- package/build-module/drawer/header.mjs +84 -5
- package/build-module/drawer/header.mjs.map +3 -3
- package/build-module/drawer/popup.mjs +86 -7
- package/build-module/drawer/popup.mjs.map +3 -3
- package/build-module/drawer/title.mjs +84 -5
- package/build-module/drawer/title.mjs.map +3 -3
- package/build-module/empty-state/actions.mjs +84 -5
- package/build-module/empty-state/actions.mjs.map +3 -3
- package/build-module/empty-state/description.mjs +84 -5
- package/build-module/empty-state/description.mjs.map +3 -3
- package/build-module/empty-state/icon.mjs +84 -5
- package/build-module/empty-state/icon.mjs.map +3 -3
- package/build-module/empty-state/root.mjs +84 -5
- package/build-module/empty-state/root.mjs.map +3 -3
- package/build-module/empty-state/title.mjs +84 -5
- package/build-module/empty-state/title.mjs.map +3 -3
- package/build-module/empty-state/visual.mjs +84 -5
- package/build-module/empty-state/visual.mjs.map +3 -3
- package/build-module/form/index.mjs +1 -0
- package/build-module/form/index.mjs.map +2 -2
- package/build-module/form/primitives/autocomplete/empty.mjs +84 -5
- package/build-module/form/primitives/autocomplete/empty.mjs.map +3 -3
- package/build-module/form/primitives/autocomplete/item.mjs +86 -10
- package/build-module/form/primitives/autocomplete/item.mjs.map +3 -3
- package/build-module/form/primitives/autocomplete/list-body.mjs +84 -5
- package/build-module/form/primitives/autocomplete/list-body.mjs.map +3 -3
- package/build-module/form/primitives/autocomplete/list.mjs +84 -5
- package/build-module/form/primitives/autocomplete/list.mjs.map +3 -3
- package/build-module/form/primitives/autocomplete/popup.mjs +90 -17
- package/build-module/form/primitives/autocomplete/popup.mjs.map +3 -3
- package/build-module/form/primitives/field/description.mjs +86 -10
- package/build-module/form/primitives/field/description.mjs.map +3 -3
- package/build-module/form/primitives/field/details.mjs +84 -5
- package/build-module/form/primitives/field/details.mjs.map +3 -3
- package/build-module/form/primitives/field/label.mjs +84 -5
- package/build-module/form/primitives/field/label.mjs.map +3 -3
- package/build-module/form/primitives/field/root.mjs +84 -5
- package/build-module/form/primitives/field/root.mjs.map +3 -3
- package/build-module/form/primitives/fieldset/description.mjs +86 -10
- package/build-module/form/primitives/fieldset/description.mjs.map +3 -3
- package/build-module/form/primitives/fieldset/details.mjs +84 -5
- package/build-module/form/primitives/fieldset/details.mjs.map +3 -3
- package/build-module/form/primitives/fieldset/legend.mjs +84 -5
- package/build-module/form/primitives/fieldset/legend.mjs.map +3 -3
- package/build-module/form/primitives/fieldset/root.mjs +84 -5
- package/build-module/form/primitives/fieldset/root.mjs.map +3 -3
- package/build-module/form/primitives/input/input.mjs +88 -15
- package/build-module/form/primitives/input/input.mjs.map +3 -3
- package/build-module/form/primitives/input-layout/input-layout.mjs +88 -15
- package/build-module/form/primitives/input-layout/input-layout.mjs.map +3 -3
- package/build-module/form/primitives/input-layout/slot.mjs +84 -5
- package/build-module/form/primitives/input-layout/slot.mjs.map +3 -3
- package/build-module/form/primitives/select/item.mjs +87 -11
- package/build-module/form/primitives/select/item.mjs.map +3 -3
- package/build-module/form/primitives/select/popup.mjs +90 -17
- package/build-module/form/primitives/select/popup.mjs.map +3 -3
- package/build-module/form/primitives/select/root.mjs.map +2 -2
- package/build-module/form/primitives/select/trigger.mjs +98 -16
- package/build-module/form/primitives/select/trigger.mjs.map +3 -3
- package/build-module/form/primitives/textarea/textarea.mjs +86 -10
- package/build-module/form/primitives/textarea/textarea.mjs.map +3 -3
- package/build-module/form/select-control/context.mjs +11 -0
- package/build-module/form/select-control/context.mjs.map +7 -0
- package/build-module/form/select-control/index.mjs +14 -0
- package/build-module/form/select-control/index.mjs.map +7 -0
- package/build-module/form/select-control/item.mjs +16 -0
- package/build-module/form/select-control/item.mjs.map +7 -0
- package/build-module/form/select-control/select-control.mjs +50 -0
- package/build-module/form/select-control/select-control.mjs.map +7 -0
- package/build-module/form/select-control/types.mjs +1 -0
- package/build-module/form/select-control/types.mjs.map +7 -0
- package/build-module/icon-button/icon-button.mjs +86 -6
- package/build-module/icon-button/icon-button.mjs.map +3 -3
- package/build-module/link/link.mjs +90 -20
- package/build-module/link/link.mjs.map +3 -3
- package/build-module/notice/action-button.mjs +84 -5
- package/build-module/notice/action-button.mjs.map +3 -3
- package/build-module/notice/action-link.mjs +84 -5
- package/build-module/notice/action-link.mjs.map +3 -3
- package/build-module/notice/actions.mjs +84 -5
- package/build-module/notice/actions.mjs.map +3 -3
- package/build-module/notice/close-icon.mjs +84 -5
- package/build-module/notice/close-icon.mjs.map +3 -3
- package/build-module/notice/description.mjs +84 -5
- package/build-module/notice/description.mjs.map +3 -3
- package/build-module/notice/root.mjs +86 -10
- package/build-module/notice/root.mjs.map +3 -3
- package/build-module/notice/title.mjs +84 -5
- package/build-module/notice/title.mjs.map +3 -3
- package/build-module/popover/arrow.mjs +84 -5
- package/build-module/popover/arrow.mjs.map +3 -3
- package/build-module/popover/popup.mjs +88 -12
- package/build-module/popover/popup.mjs.map +3 -3
- package/build-module/popover/title.mjs +84 -5
- package/build-module/popover/title.mjs.map +3 -3
- package/build-module/stack/stack.mjs +84 -5
- package/build-module/stack/stack.mjs.map +3 -3
- package/build-module/tabs/list.mjs +84 -5
- package/build-module/tabs/list.mjs.map +3 -3
- package/build-module/tabs/panel.mjs +86 -10
- package/build-module/tabs/panel.mjs.map +3 -3
- package/build-module/tabs/tab.mjs +84 -5
- package/build-module/tabs/tab.mjs.map +3 -3
- package/build-module/text/text.mjs +86 -10
- package/build-module/text/text.mjs.map +3 -3
- package/build-module/tooltip/index.mjs +2 -0
- package/build-module/tooltip/index.mjs.map +2 -2
- package/build-module/tooltip/popup.mjs +111 -40
- package/build-module/tooltip/popup.mjs.map +3 -3
- package/build-module/tooltip/positioner.mjs +124 -0
- package/build-module/tooltip/positioner.mjs.map +7 -0
- package/build-module/utils/render-slot-with-children.mjs +9 -0
- package/build-module/utils/render-slot-with-children.mjs.map +7 -0
- package/build-module/visually-hidden/visually-hidden.mjs +84 -5
- package/build-module/visually-hidden/visually-hidden.mjs.map +3 -3
- package/build-types/alert-dialog/portal.d.ts +1 -1
- package/build-types/alert-dialog/portal.d.ts.map +1 -1
- package/build-types/alert-dialog/root.d.ts +1 -1
- package/build-types/alert-dialog/root.d.ts.map +1 -1
- package/build-types/alert-dialog/stories/index.story.d.ts.map +1 -1
- package/build-types/badge/stories/choosing-intent.story.d.ts.map +1 -1
- package/build-types/badge/stories/index.story.d.ts.map +1 -1
- package/build-types/button/button.d.ts +3 -0
- package/build-types/button/button.d.ts.map +1 -1
- package/build-types/button/icon.d.ts +1 -8
- package/build-types/button/icon.d.ts.map +1 -1
- package/build-types/button/index.d.ts +6 -5
- package/build-types/button/index.d.ts.map +1 -1
- package/build-types/button/stories/index.story.d.ts.map +1 -1
- package/build-types/button/types.d.ts +7 -0
- package/build-types/button/types.d.ts.map +1 -1
- package/build-types/card/stories/index.story.d.ts.map +1 -1
- package/build-types/collapsible/panel.d.ts +1 -1
- package/build-types/collapsible/root.d.ts +1 -1
- package/build-types/collapsible/stories/index.story.d.ts.map +1 -1
- package/build-types/collapsible/trigger.d.ts +1 -1
- package/build-types/collapsible-card/header.d.ts +6 -0
- package/build-types/collapsible-card/header.d.ts.map +1 -1
- package/build-types/collapsible-card/stories/index.story.d.ts +8 -0
- package/build-types/collapsible-card/stories/index.story.d.ts.map +1 -1
- package/build-types/dialog/context.d.ts +2 -2
- package/build-types/dialog/popup.d.ts +1 -2
- package/build-types/dialog/popup.d.ts.map +1 -1
- package/build-types/dialog/portal.d.ts +1 -1
- package/build-types/dialog/portal.d.ts.map +1 -1
- package/build-types/dialog/stories/index.story.d.ts.map +1 -1
- package/build-types/drawer/content.d.ts +7 -4
- package/build-types/drawer/content.d.ts.map +1 -1
- package/build-types/drawer/context.d.ts +2 -2
- package/build-types/drawer/popup.d.ts +1 -2
- package/build-types/drawer/popup.d.ts.map +1 -1
- package/build-types/drawer/stories/index.story.d.ts.map +1 -1
- package/build-types/drawer/types.d.ts +1 -1
- package/build-types/empty-state/stories/index.story.d.ts.map +1 -1
- package/build-types/form/index.d.ts +1 -0
- package/build-types/form/index.d.ts.map +1 -1
- package/build-types/form/input-control/stories/index.story.d.ts.map +1 -1
- package/build-types/form/primitives/autocomplete/clear.d.ts +1 -1
- package/build-types/form/primitives/autocomplete/empty.d.ts +1 -1
- package/build-types/form/primitives/autocomplete/input-group.d.ts +1 -1
- package/build-types/form/primitives/autocomplete/item.d.ts +1 -1
- package/build-types/form/primitives/autocomplete/list-body.d.ts +1 -1
- package/build-types/form/primitives/autocomplete/list.d.ts +2 -2
- package/build-types/form/primitives/autocomplete/popup.d.ts +2 -2
- package/build-types/form/primitives/autocomplete/portal.d.ts +1 -1
- package/build-types/form/primitives/autocomplete/portal.d.ts.map +1 -1
- package/build-types/form/primitives/autocomplete/stories/index.story.d.ts.map +1 -1
- package/build-types/form/primitives/field/control.d.ts +2 -2
- package/build-types/form/primitives/field/description.d.ts +1 -1
- package/build-types/form/primitives/field/details.d.ts +1 -1
- package/build-types/form/primitives/field/label.d.ts +3 -3
- package/build-types/form/primitives/field/root.d.ts +3 -3
- package/build-types/form/primitives/field/stories/index.story.d.ts.map +1 -1
- package/build-types/form/primitives/fieldset/description.d.ts +1 -1
- package/build-types/form/primitives/fieldset/details.d.ts +1 -1
- package/build-types/form/primitives/fieldset/legend.d.ts +1 -1
- package/build-types/form/primitives/fieldset/root.d.ts +1 -1
- package/build-types/form/primitives/fieldset/stories/index.story.d.ts.map +1 -1
- package/build-types/form/primitives/input/input.d.ts +5 -5
- package/build-types/form/primitives/input/stories/index.story.d.ts.map +1 -1
- package/build-types/form/primitives/input-layout/stories/index.story.d.ts.map +1 -1
- package/build-types/form/primitives/select/item.d.ts +3 -3
- package/build-types/form/primitives/select/popup.d.ts +2 -2
- package/build-types/form/primitives/select/root.d.ts +12 -1
- package/build-types/form/primitives/select/root.d.ts.map +1 -1
- package/build-types/form/primitives/select/stories/index.story.d.ts +9 -6
- package/build-types/form/primitives/select/stories/index.story.d.ts.map +1 -1
- package/build-types/form/primitives/select/trigger.d.ts +5 -4
- package/build-types/form/primitives/select/trigger.d.ts.map +1 -1
- package/build-types/form/primitives/select/types.d.ts +12 -4
- package/build-types/form/primitives/select/types.d.ts.map +1 -1
- package/build-types/form/primitives/textarea/stories/index.story.d.ts.map +1 -1
- package/build-types/form/primitives/textarea/textarea.d.ts +2 -2
- package/build-types/form/select-control/context.d.ts +3 -0
- package/build-types/form/select-control/context.d.ts.map +1 -0
- package/build-types/form/select-control/index.d.ts +20 -0
- package/build-types/form/select-control/index.d.ts.map +1 -0
- package/build-types/form/select-control/item.d.ts +6 -0
- package/build-types/form/select-control/item.d.ts.map +1 -0
- package/build-types/form/select-control/select-control.d.ts +11 -0
- package/build-types/form/select-control/select-control.d.ts.map +1 -0
- package/build-types/form/select-control/stories/index.story.d.ts +40 -0
- package/build-types/form/select-control/stories/index.story.d.ts.map +1 -0
- package/build-types/form/select-control/test/index.test.d.ts +2 -0
- package/build-types/form/select-control/test/index.test.d.ts.map +1 -0
- package/build-types/form/select-control/types.d.ts +40 -0
- package/build-types/form/select-control/types.d.ts.map +1 -0
- package/build-types/form/types.d.ts +1 -1
- package/build-types/form/types.d.ts.map +1 -1
- package/build-types/icon/stories/index.story.d.ts.map +1 -1
- package/build-types/icon-button/icon-button.d.ts +2 -1
- package/build-types/icon-button/icon-button.d.ts.map +1 -1
- package/build-types/icon-button/stories/index.story.d.ts +5 -0
- package/build-types/icon-button/stories/index.story.d.ts.map +1 -1
- package/build-types/icon-button/types.d.ts +8 -0
- package/build-types/icon-button/types.d.ts.map +1 -1
- package/build-types/link/stories/index.story.d.ts.map +1 -1
- package/build-types/notice/stories/index.story.d.ts.map +1 -1
- package/build-types/popover/stories/index.story.d.ts.map +1 -1
- package/build-types/stack/stories/index.story.d.ts.map +1 -1
- package/build-types/tabs/context.d.ts +1 -1
- package/build-types/tabs/context.d.ts.map +1 -1
- package/build-types/tabs/list.d.ts +2 -2
- package/build-types/tabs/panel.d.ts +1 -1
- package/build-types/tabs/root.d.ts +1 -1
- package/build-types/tabs/stories/index.story.d.ts.map +1 -1
- package/build-types/tabs/tab.d.ts +1 -1
- package/build-types/text/stories/index.story.d.ts.map +1 -1
- package/build-types/tooltip/index.d.ts +2 -1
- package/build-types/tooltip/index.d.ts.map +1 -1
- package/build-types/tooltip/popup.d.ts.map +1 -1
- package/build-types/tooltip/positioner.d.ts +9 -0
- package/build-types/tooltip/positioner.d.ts.map +1 -0
- package/build-types/tooltip/stories/index.story.d.ts +11 -2
- package/build-types/tooltip/stories/index.story.d.ts.map +1 -1
- package/build-types/tooltip/stories/usage-guidelines.story.d.ts.map +1 -1
- package/build-types/tooltip/types.d.ts +10 -1
- package/build-types/tooltip/types.d.ts.map +1 -1
- package/build-types/utils/create-overlay-modal-context.d.ts.map +1 -1
- package/build-types/utils/render-slot-with-children.d.ts +24 -0
- package/build-types/utils/render-slot-with-children.d.ts.map +1 -0
- package/build-types/utils/use-deprioritized-initial-focus.d.ts +1 -1
- package/build-types/utils/use-deprioritized-initial-focus.d.ts.map +1 -1
- package/build-types/visually-hidden/stories/index.story.d.ts.map +1 -1
- package/package.json +13 -12
- package/src/alert-dialog/popup.tsx +2 -2
- package/src/alert-dialog/stories/index.story.tsx +8 -0
- package/src/badge/stories/index.story.tsx +6 -0
- package/src/button/button.tsx +3 -0
- package/src/button/icon.tsx +1 -8
- package/src/button/index.ts +5 -6
- package/src/button/stories/index.story.tsx +10 -0
- package/src/button/types.ts +8 -0
- package/src/card/stories/index.story.tsx +6 -0
- package/src/collapsible/stories/index.story.tsx +6 -0
- package/src/collapsible-card/header.tsx +55 -42
- package/src/collapsible-card/stories/index.story.tsx +61 -0
- package/src/collapsible-card/style.module.css +20 -0
- package/src/collapsible-card/test/index.test.tsx +60 -1
- package/src/dialog/popup.tsx +3 -4
- package/src/dialog/stories/index.story.tsx +8 -0
- package/src/dialog/style.module.css +3 -9
- package/src/drawer/content.tsx +31 -16
- package/src/drawer/popup.tsx +3 -4
- package/src/drawer/stories/index.story.tsx +7 -0
- package/src/drawer/style.module.css +41 -9
- package/src/drawer/test/index.test.tsx +56 -0
- package/src/drawer/types.ts +1 -1
- package/src/empty-state/stories/index.story.tsx +7 -0
- package/src/form/index.ts +1 -0
- package/src/form/input-control/stories/index.story.tsx +7 -0
- package/src/form/primitives/autocomplete/popup.tsx +2 -2
- package/src/form/primitives/autocomplete/stories/index.story.tsx +18 -10
- package/src/form/primitives/field/stories/index.story.tsx +12 -5
- package/src/form/primitives/fieldset/stories/index.story.tsx +10 -3
- package/src/form/primitives/input/stories/index.story.tsx +7 -0
- package/src/form/primitives/input-layout/stories/index.story.tsx +8 -1
- package/src/form/primitives/select/item.tsx +1 -1
- package/src/form/primitives/select/popup.tsx +2 -2
- package/src/form/primitives/select/root.tsx +13 -2
- package/src/form/primitives/select/stories/index.story.tsx +132 -61
- package/src/form/primitives/select/test/index.test.tsx +123 -5
- package/src/form/primitives/select/trigger.tsx +11 -8
- package/src/form/primitives/select/types.ts +13 -5
- package/src/form/primitives/textarea/stories/index.story.tsx +7 -0
- package/src/form/select-control/context.tsx +9 -0
- package/src/form/select-control/index.ts +14 -0
- package/src/form/select-control/item.tsx +13 -0
- package/src/form/select-control/select-control.tsx +65 -0
- package/src/form/select-control/stories/index.story.tsx +220 -0
- package/src/form/select-control/test/index.test.tsx +196 -0
- package/src/form/select-control/types.ts +50 -0
- package/src/form/types.ts +1 -1
- package/src/icon/stories/index.story.tsx +7 -0
- package/src/icon-button/icon-button.tsx +2 -1
- package/src/icon-button/stories/index.story.tsx +20 -0
- package/src/icon-button/types.ts +9 -0
- package/src/link/stories/index.story.tsx +6 -0
- package/src/link/style.module.css +1 -0
- package/src/notice/stories/index.story.tsx +7 -0
- package/src/popover/popup.tsx +2 -2
- package/src/popover/stories/index.story.tsx +7 -0
- package/src/stack/stories/index.story.tsx +6 -0
- package/src/tabs/stories/index.story.tsx +15 -1
- package/src/text/stories/index.story.tsx +6 -0
- package/src/text/style.module.css +25 -0
- package/src/tooltip/index.ts +2 -1
- package/src/tooltip/popup.tsx +30 -38
- package/src/tooltip/positioner.tsx +36 -0
- package/src/tooltip/stories/index.story.tsx +61 -10
- package/src/tooltip/stories/usage-guidelines.story.tsx +5 -0
- package/src/tooltip/types.ts +14 -3
- package/src/utils/css/dropdown-motion.module.css +3 -3
- package/src/utils/css/item-popup.module.css +5 -1
- package/src/utils/css/overlay-chrome.module.css +21 -4
- package/src/utils/css/select-trigger.module.css +5 -2
- package/src/utils/render-slot-with-children.ts +31 -0
- package/src/visually-hidden/stories/index.story.tsx +6 -0
- package/build/utils/render-portal-with-children.cjs.map +0 -7
- package/build-module/utils/render-portal-with-children.mjs +0 -12
- package/build-module/utils/render-portal-with-children.mjs.map +0 -7
- package/build-types/utils/render-portal-with-children.d.ts +0 -16
- package/build-types/utils/render-portal-with-children.d.ts.map +0 -1
- package/src/utils/render-portal-with-children.ts +0 -27
|
@@ -10,6 +10,7 @@ const meta: Meta< typeof Dialog.Root > = {
|
|
|
10
10
|
component: Dialog.Root,
|
|
11
11
|
subcomponents: {
|
|
12
12
|
'Dialog.Trigger': Dialog.Trigger,
|
|
13
|
+
'Dialog.Portal': Dialog.Portal,
|
|
13
14
|
'Dialog.Popup': Dialog.Popup,
|
|
14
15
|
'Dialog.Header': Dialog.Header,
|
|
15
16
|
'Dialog.Title': Dialog.Title,
|
|
@@ -25,6 +26,13 @@ const meta: Meta< typeof Dialog.Root > = {
|
|
|
25
26
|
options: [ true, false, 'trap-focus' ],
|
|
26
27
|
},
|
|
27
28
|
},
|
|
29
|
+
parameters: {
|
|
30
|
+
componentStatus: {
|
|
31
|
+
status: 'use-with-caution',
|
|
32
|
+
whereUsed: 'global',
|
|
33
|
+
notes: 'Not yet recommended for use alongside components from `@wordpress/components`, pending review of overlays compatibility. See [WordPress/gutenberg#76135](https://github.com/WordPress/gutenberg/issues/76135).',
|
|
34
|
+
},
|
|
35
|
+
},
|
|
28
36
|
};
|
|
29
37
|
export default meta;
|
|
30
38
|
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
@media not (prefers-reduced-motion) {
|
|
20
|
-
transition: opacity
|
|
20
|
+
transition: opacity var(--wpds-motion-duration-md) var(--wpds-motion-easing-subtle);
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
|
|
@@ -60,14 +60,8 @@
|
|
|
60
60
|
|
|
61
61
|
@media not (prefers-reduced-motion) {
|
|
62
62
|
transition:
|
|
63
|
-
opacity
|
|
64
|
-
transform
|
|
65
|
-
|
|
66
|
-
&[data-open] {
|
|
67
|
-
transition:
|
|
68
|
-
opacity 0.2s cubic-bezier(0.29, 0, 0, 1),
|
|
69
|
-
transform 0.2s cubic-bezier(0.29, 0, 0, 1);
|
|
70
|
-
}
|
|
63
|
+
opacity var(--wpds-motion-duration-md) var(--wpds-motion-easing-expressive),
|
|
64
|
+
transform var(--wpds-motion-duration-md) var(--wpds-motion-easing-expressive);
|
|
71
65
|
}
|
|
72
66
|
|
|
73
67
|
@media (min-width: 480px) {
|
package/src/drawer/content.tsx
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { mergeProps, useRender } from '@base-ui/react';
|
|
1
2
|
import { Drawer as _Drawer } from '@base-ui/react/drawer';
|
|
2
3
|
import clsx from 'clsx';
|
|
3
4
|
import { forwardRef } from '@wordpress/element';
|
|
@@ -13,37 +14,51 @@ import type { ContentProps } from './types';
|
|
|
13
14
|
*
|
|
14
15
|
* **Required for scrolling** — `Drawer.Content` is the element that owns
|
|
15
16
|
* the popup's overflow. Without it, body content that exceeds the popup's
|
|
16
|
-
* available space clips instead of scrolling, and
|
|
17
|
-
*
|
|
17
|
+
* available space clips instead of scrolling, and swipe-to-dismiss on
|
|
18
|
+
* scrollable vertical drawers won't gate correctly at the scroll edge.
|
|
18
19
|
* Render it once per popup and wrap any freeform body content in it.
|
|
19
20
|
*
|
|
20
21
|
* Placing `Drawer.Header` or `Drawer.Footer` *inside* `Drawer.Content`
|
|
21
22
|
* makes them scroll with the body (the "non-sticky" opt-out) rather than
|
|
22
23
|
* staying pinned to the popup's edges.
|
|
23
24
|
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
25
|
+
* Mouse-drag swipe-to-dismiss is preserved in the popup-edge padding
|
|
26
|
+
* gutter and on the chrome regions; mouse drag over the body itself
|
|
27
|
+
* does not dismiss the drawer, so text selection inside the body keeps
|
|
28
|
+
* working normally. Touch swipe-to-dismiss engages from anywhere in
|
|
29
|
+
* the popup (gated by the scroll edge on vertical drawers).
|
|
26
30
|
*/
|
|
27
31
|
const Content = forwardRef< HTMLDivElement, ContentProps >(
|
|
28
|
-
function DrawerContent(
|
|
32
|
+
function DrawerContent(
|
|
33
|
+
{ className, render, children, onScroll, ...props },
|
|
34
|
+
ref
|
|
35
|
+
) {
|
|
29
36
|
const { ref: scrollStateRef, onScroll: scrollStateOnScroll } =
|
|
30
37
|
useOverlayScrollStateAttributes< HTMLDivElement >( onScroll );
|
|
31
38
|
const mergedRef = useMergeRefs( [ ref, scrollStateRef ] );
|
|
32
39
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
40
|
+
const element = useRender( {
|
|
41
|
+
defaultTagName: 'div',
|
|
42
|
+
render,
|
|
43
|
+
ref: mergedRef,
|
|
44
|
+
props: mergeProps< 'div' >( props, {
|
|
45
|
+
className: clsx(
|
|
37
46
|
styles.content,
|
|
38
47
|
focusStyles[ 'outset-ring--focus-visible' ],
|
|
39
48
|
className
|
|
40
|
-
)
|
|
41
|
-
onScroll
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
49
|
+
),
|
|
50
|
+
onScroll: scrollStateOnScroll,
|
|
51
|
+
// `_Drawer.Content` carries the `[data-drawer-content]`
|
|
52
|
+
// marker that Base UI's swipe-dismiss logic uses to skip
|
|
53
|
+
// mouse-drag swipes started inside the body, preserving
|
|
54
|
+
// text selection. It must sit *inside* the scroll
|
|
55
|
+
// container so the popup's edge padding gutter falls
|
|
56
|
+
// outside the marker and stays mouse-draggable.
|
|
57
|
+
children: <_Drawer.Content>{ children }</_Drawer.Content>,
|
|
58
|
+
} ),
|
|
59
|
+
} );
|
|
60
|
+
|
|
61
|
+
return element;
|
|
47
62
|
}
|
|
48
63
|
);
|
|
49
64
|
|
package/src/drawer/popup.tsx
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
import { unlock } from '../lock-unlock';
|
|
10
10
|
import { useDeprioritizedInitialFocus } from '../utils/use-deprioritized-initial-focus';
|
|
11
11
|
import { SCROLL_CONTAINER_ATTR } from '../utils/use-overlay-scroll-state-attributes';
|
|
12
|
-
import {
|
|
12
|
+
import { renderSlotWithChildren } from '../utils/render-slot-with-children';
|
|
13
13
|
import { DrawerValidationProvider, useDrawerModal } from './context';
|
|
14
14
|
import { Portal } from './portal';
|
|
15
15
|
import styles from './style.module.css';
|
|
@@ -24,8 +24,7 @@ const CLOSE_ICON_ATTR = 'data-wp-ui-drawer-close-icon';
|
|
|
24
24
|
* Renders the drawer popup element that contains the drawer content.
|
|
25
25
|
* Uses a portal to render outside the DOM hierarchy.
|
|
26
26
|
*
|
|
27
|
-
* When `portal` is omitted, defaults to `Drawer.Portal`.
|
|
28
|
-
* handled by `renderPortalWithChildren` (shared with other overlay `Popup`s).
|
|
27
|
+
* When `portal` is omitted, defaults to `Drawer.Portal`.
|
|
29
28
|
*
|
|
30
29
|
* The popup is a flex column; scroll ownership lives on `Drawer.Content`,
|
|
31
30
|
* which children are expected to render. Without it, long body content will
|
|
@@ -94,7 +93,7 @@ const Popup = forwardRef< HTMLDivElement, PopupProps >( function DrawerPopup(
|
|
|
94
93
|
</>
|
|
95
94
|
);
|
|
96
95
|
|
|
97
|
-
return
|
|
96
|
+
return renderSlotWithChildren( portal, <Portal />, portalChildren );
|
|
98
97
|
} );
|
|
99
98
|
|
|
100
99
|
export { Popup };
|
|
@@ -25,6 +25,13 @@ const meta: Meta< typeof Drawer.Root > = {
|
|
|
25
25
|
options: [ true, false, 'trap-focus' ],
|
|
26
26
|
},
|
|
27
27
|
},
|
|
28
|
+
parameters: {
|
|
29
|
+
componentStatus: {
|
|
30
|
+
status: 'use-with-caution',
|
|
31
|
+
whereUsed: 'global',
|
|
32
|
+
notes: 'Not yet recommended for use alongside components from `@wordpress/components`, pending review of overlays compatibility. See [WordPress/gutenberg#76135](https://github.com/WordPress/gutenberg/issues/76135).',
|
|
33
|
+
},
|
|
34
|
+
},
|
|
28
35
|
};
|
|
29
36
|
export default meta;
|
|
30
37
|
|
|
@@ -91,20 +91,52 @@
|
|
|
91
91
|
color: var(--wpds-color-fg-content-neutral);
|
|
92
92
|
touch-action: auto;
|
|
93
93
|
|
|
94
|
+
/*
|
|
95
|
+
* Hint compositing while the popup is in motion (opening, swiping,
|
|
96
|
+
* or closing). Scoping `will-change` to these states avoids
|
|
97
|
+
* retaining a transform layer while the drawer is fully idle.
|
|
98
|
+
*
|
|
99
|
+
* Limited to `transform` because that's the only animated property
|
|
100
|
+
* the compositor can take off the main thread; `box-shadow` (also
|
|
101
|
+
* transitioned below) is repainted on the main thread regardless,
|
|
102
|
+
* so listing it here would just bloat the layer.
|
|
103
|
+
*/
|
|
94
104
|
&[data-open],
|
|
95
|
-
&[data-swiping]
|
|
105
|
+
&[data-swiping],
|
|
106
|
+
&[data-ending-style] {
|
|
96
107
|
will-change: transform;
|
|
108
|
+
}
|
|
97
109
|
|
|
98
|
-
|
|
99
|
-
|
|
110
|
+
/*
|
|
111
|
+
* Drop the elevation shadow while the popup is offscreen
|
|
112
|
+
* (`[data-starting-style]` and `[data-ending-style]` translate the
|
|
113
|
+
* popup fully past the viewport edge). The shadow's blur radius
|
|
114
|
+
* would otherwise bleed back into the viewport at the screen edge,
|
|
115
|
+
* appearing as a faint halo at mount/unmount instead of fading
|
|
116
|
+
* with the slide. `box-shadow: none` interpolates against the
|
|
117
|
+
* resolved token value as a list of zero-shadow layers.
|
|
118
|
+
*
|
|
119
|
+
* Kept outside the `prefers-reduced-motion` guard below so the
|
|
120
|
+
* popup still mounts / unmounts without a stray shadow when
|
|
121
|
+
* transitions are disabled — the value flips instantly to `none`
|
|
122
|
+
* at the offscreen states, matching the instantaneous transform.
|
|
123
|
+
*/
|
|
124
|
+
&[data-starting-style],
|
|
125
|
+
&[data-ending-style] {
|
|
126
|
+
box-shadow: none;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
@media not (prefers-reduced-motion) {
|
|
130
|
+
transition:
|
|
131
|
+
transform 450ms cubic-bezier(0.32, 0.72, 0, 1),
|
|
132
|
+
box-shadow 450ms cubic-bezier(0.32, 0.72, 0, 1);
|
|
100
133
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
134
|
+
&[data-ending-style] {
|
|
135
|
+
transition-duration: calc(var(--drawer-swipe-strength) * 400ms);
|
|
136
|
+
}
|
|
104
137
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
}
|
|
138
|
+
&[data-swiping] {
|
|
139
|
+
transition-duration: 0ms;
|
|
108
140
|
}
|
|
109
141
|
}
|
|
110
142
|
|
|
@@ -810,6 +810,62 @@ describe( 'Drawer', () => {
|
|
|
810
810
|
);
|
|
811
811
|
} );
|
|
812
812
|
|
|
813
|
+
// Locks the wrapper structure that Drawer.Content relies on:
|
|
814
|
+
//
|
|
815
|
+
// - The forwarded ref / scroll listener / overlay-chrome class
|
|
816
|
+
// must land on the visible scroll container (the outer div),
|
|
817
|
+
// so it does NOT carry [data-drawer-content].
|
|
818
|
+
// - Base UI's [data-drawer-content] marker must sit *inside*
|
|
819
|
+
// that scroll container so the popup-edge padding gutter
|
|
820
|
+
// falls outside the marker and stays mouse-draggable for
|
|
821
|
+
// swipe-dismiss (Base UI excludes mouse-drag swipe over
|
|
822
|
+
// [data-drawer-content] to preserve text selection).
|
|
823
|
+
//
|
|
824
|
+
// Not asserted here: the marker rendering as a real block-level
|
|
825
|
+
// element rather than `display: contents` (which would neuter
|
|
826
|
+
// `useOverlayScrollStateAttributes`'s `ResizeObserver`). CSS
|
|
827
|
+
// modules resolve to empty stubs in this jsdom test environment,
|
|
828
|
+
// so a `display: contents` regression introduced via CSS would
|
|
829
|
+
// not be observable from `getComputedStyle`. Catching it
|
|
830
|
+
// requires reviewing the marker's stylesheet rules at code
|
|
831
|
+
// review time.
|
|
832
|
+
it( 'wraps a [data-drawer-content] marker as the only direct child', async () => {
|
|
833
|
+
const user = userEvent.setup();
|
|
834
|
+
const contentRef = createRef< HTMLDivElement >();
|
|
835
|
+
|
|
836
|
+
render(
|
|
837
|
+
<Drawer.Root>
|
|
838
|
+
<Drawer.Trigger>Open</Drawer.Trigger>
|
|
839
|
+
<Drawer.Popup>
|
|
840
|
+
<Drawer.Title>Title</Drawer.Title>
|
|
841
|
+
<Drawer.Content ref={ contentRef }>
|
|
842
|
+
<p>Body</p>
|
|
843
|
+
</Drawer.Content>
|
|
844
|
+
</Drawer.Popup>
|
|
845
|
+
</Drawer.Root>
|
|
846
|
+
);
|
|
847
|
+
|
|
848
|
+
await user.click( screen.getByRole( 'button', { name: 'Open' } ) );
|
|
849
|
+
await waitFor( () => {
|
|
850
|
+
expect( contentRef.current ).toBeInstanceOf( HTMLDivElement );
|
|
851
|
+
} );
|
|
852
|
+
|
|
853
|
+
expect( contentRef.current ).not.toHaveAttribute(
|
|
854
|
+
'data-drawer-content'
|
|
855
|
+
);
|
|
856
|
+
|
|
857
|
+
// Direct DOM access is intentional: this test locks the
|
|
858
|
+
// concrete element-level wrapping that other invariants
|
|
859
|
+
// (mouse-drag swipe-dismiss, ResizeObserver-driven scroll
|
|
860
|
+
// state) silently depend on.
|
|
861
|
+
// eslint-disable-next-line testing-library/no-node-access
|
|
862
|
+
const marker = contentRef.current?.firstElementChild;
|
|
863
|
+
expect( marker ).toBeInstanceOf( HTMLDivElement );
|
|
864
|
+
expect( marker ).toHaveAttribute( 'data-drawer-content' );
|
|
865
|
+
// eslint-disable-next-line testing-library/no-node-access
|
|
866
|
+
expect( contentRef.current?.children ).toHaveLength( 1 );
|
|
867
|
+
} );
|
|
868
|
+
|
|
813
869
|
it( 'sets data-wp-ui-overlay-modal on the popup when modal is true', async () => {
|
|
814
870
|
const user = userEvent.setup();
|
|
815
871
|
const popupRef = createRef< HTMLDivElement >();
|
package/src/drawer/types.ts
CHANGED
|
@@ -101,7 +101,7 @@ export interface HeaderProps extends ComponentProps< 'header' > {
|
|
|
101
101
|
|
|
102
102
|
export interface ContentProps extends ComponentProps< 'div' > {
|
|
103
103
|
/**
|
|
104
|
-
* The body content to be rendered inside the scroll
|
|
104
|
+
* The body content to be rendered inside the scroll region.
|
|
105
105
|
*/
|
|
106
106
|
children?: ReactNode;
|
|
107
107
|
/**
|
|
@@ -4,6 +4,7 @@ import { Button } from '../../button';
|
|
|
4
4
|
import * as EmptyState from '../';
|
|
5
5
|
|
|
6
6
|
const meta: Meta< typeof EmptyState.Root > = {
|
|
7
|
+
tags: [ 'manifest' ],
|
|
7
8
|
title: 'Design System/Components/EmptyState',
|
|
8
9
|
component: EmptyState.Root,
|
|
9
10
|
subcomponents: {
|
|
@@ -13,6 +14,12 @@ const meta: Meta< typeof EmptyState.Root > = {
|
|
|
13
14
|
'EmptyState.Description': EmptyState.Description,
|
|
14
15
|
'EmptyState.Actions': EmptyState.Actions,
|
|
15
16
|
},
|
|
17
|
+
parameters: {
|
|
18
|
+
componentStatus: {
|
|
19
|
+
status: 'recommended',
|
|
20
|
+
whereUsed: 'global',
|
|
21
|
+
},
|
|
22
|
+
},
|
|
16
23
|
};
|
|
17
24
|
export default meta;
|
|
18
25
|
|
package/src/form/index.ts
CHANGED
|
@@ -23,6 +23,13 @@ const meta: Meta< typeof InputControl > = {
|
|
|
23
23
|
value: { control: false },
|
|
24
24
|
type: { control: 'text' },
|
|
25
25
|
},
|
|
26
|
+
parameters: {
|
|
27
|
+
componentStatus: {
|
|
28
|
+
status: 'use-with-caution',
|
|
29
|
+
whereUsed: 'global',
|
|
30
|
+
notes: 'Not yet recommended for use alongside components from `@wordpress/components`, pending review of style consistency with `@wordpress/components`. See [WordPress/gutenberg#76135](https://github.com/WordPress/gutenberg/issues/76135).',
|
|
31
|
+
},
|
|
32
|
+
},
|
|
26
33
|
};
|
|
27
34
|
export default meta;
|
|
28
35
|
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
privateApis as themePrivateApis,
|
|
7
7
|
} from '@wordpress/theme';
|
|
8
8
|
import { unlock } from '../../../lock-unlock';
|
|
9
|
-
import {
|
|
9
|
+
import { renderSlotWithChildren } from '../../../utils/render-slot-with-children';
|
|
10
10
|
import itemPopupStyles from '../../../utils/css/item-popup.module.css';
|
|
11
11
|
import resetStyles from '../../../utils/css/resets.module.css';
|
|
12
12
|
import styles from './style.module.css';
|
|
@@ -37,6 +37,6 @@ export const Popup = forwardRef< HTMLDivElement, AutocompletePopupProps >(
|
|
|
37
37
|
</_Autocomplete.Positioner>
|
|
38
38
|
);
|
|
39
39
|
|
|
40
|
-
return
|
|
40
|
+
return renderSlotWithChildren( portal, <Portal />, portalChildren );
|
|
41
41
|
}
|
|
42
42
|
);
|
|
@@ -12,16 +12,24 @@ const meta: Meta< typeof Autocomplete.Root > = {
|
|
|
12
12
|
title: 'Design System/Components/Form/Primitives/Autocomplete',
|
|
13
13
|
component: Autocomplete.Root,
|
|
14
14
|
subcomponents: {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
15
|
+
'Autocomplete.Portal': Autocomplete.Portal,
|
|
16
|
+
'Autocomplete.Popup': Autocomplete.Popup,
|
|
17
|
+
'Autocomplete.Input': Autocomplete.Input,
|
|
18
|
+
'Autocomplete.InputGroup': Autocomplete.InputGroup,
|
|
19
|
+
'Autocomplete.List': Autocomplete.List,
|
|
20
|
+
'Autocomplete.ListBody': Autocomplete.ListBody,
|
|
21
|
+
'Autocomplete.Collection': Autocomplete.Collection,
|
|
22
|
+
'Autocomplete.Item': Autocomplete.Item,
|
|
23
|
+
'Autocomplete.Value': Autocomplete.Value,
|
|
24
|
+
'Autocomplete.Empty': Autocomplete.Empty,
|
|
25
|
+
'Autocomplete.Clear': Autocomplete.Clear,
|
|
26
|
+
},
|
|
27
|
+
parameters: {
|
|
28
|
+
componentStatus: {
|
|
29
|
+
status: 'use-with-caution',
|
|
30
|
+
whereUsed: 'global',
|
|
31
|
+
notes: 'Not yet recommended for use alongside components from `@wordpress/components`, pending review of style consistency with `@wordpress/components`, overlays compatibility, and component set completeness. See [WordPress/gutenberg#76135](https://github.com/WordPress/gutenberg/issues/76135).',
|
|
32
|
+
},
|
|
25
33
|
},
|
|
26
34
|
};
|
|
27
35
|
export default meta;
|
|
@@ -7,11 +7,18 @@ const meta: Meta< typeof Field.Root > = {
|
|
|
7
7
|
title: 'Design System/Components/Form/Primitives/Field',
|
|
8
8
|
component: Field.Root,
|
|
9
9
|
subcomponents: {
|
|
10
|
-
Item: Field.Item,
|
|
11
|
-
Label: Field.Label,
|
|
12
|
-
Control: Field.Control,
|
|
13
|
-
Description: Field.Description,
|
|
14
|
-
Details: Field.Details,
|
|
10
|
+
'Field.Item': Field.Item,
|
|
11
|
+
'Field.Label': Field.Label,
|
|
12
|
+
'Field.Control': Field.Control,
|
|
13
|
+
'Field.Description': Field.Description,
|
|
14
|
+
'Field.Details': Field.Details,
|
|
15
|
+
},
|
|
16
|
+
parameters: {
|
|
17
|
+
componentStatus: {
|
|
18
|
+
status: 'use-with-caution',
|
|
19
|
+
whereUsed: 'global',
|
|
20
|
+
notes: 'Not yet recommended for use alongside components from `@wordpress/components`, pending review of style consistency with `@wordpress/components` and component set completeness. See [WordPress/gutenberg#76135](https://github.com/WordPress/gutenberg/issues/76135).',
|
|
21
|
+
},
|
|
15
22
|
},
|
|
16
23
|
};
|
|
17
24
|
export default meta;
|
|
@@ -6,9 +6,16 @@ const meta: Meta< typeof Fieldset.Root > = {
|
|
|
6
6
|
title: 'Design System/Components/Form/Primitives/Fieldset',
|
|
7
7
|
component: Fieldset.Root,
|
|
8
8
|
subcomponents: {
|
|
9
|
-
Legend: Fieldset.Legend,
|
|
10
|
-
Description: Fieldset.Description,
|
|
11
|
-
Details: Fieldset.Details,
|
|
9
|
+
'Fieldset.Legend': Fieldset.Legend,
|
|
10
|
+
'Fieldset.Description': Fieldset.Description,
|
|
11
|
+
'Fieldset.Details': Fieldset.Details,
|
|
12
|
+
},
|
|
13
|
+
parameters: {
|
|
14
|
+
componentStatus: {
|
|
15
|
+
status: 'use-with-caution',
|
|
16
|
+
whereUsed: 'global',
|
|
17
|
+
notes: 'Not yet recommended for use alongside components from `@wordpress/components`, pending review of style consistency with `@wordpress/components` and component set completeness. See [WordPress/gutenberg#76135](https://github.com/WordPress/gutenberg/issues/76135).',
|
|
18
|
+
},
|
|
12
19
|
},
|
|
13
20
|
};
|
|
14
21
|
export default meta;
|
|
@@ -12,6 +12,13 @@ const meta: Meta< typeof Input > = {
|
|
|
12
12
|
value: { control: false },
|
|
13
13
|
type: { control: 'text' },
|
|
14
14
|
},
|
|
15
|
+
parameters: {
|
|
16
|
+
componentStatus: {
|
|
17
|
+
status: 'use-with-caution',
|
|
18
|
+
whereUsed: 'global',
|
|
19
|
+
notes: 'Not yet recommended for use alongside components from `@wordpress/components`, pending review of style consistency with `@wordpress/components`, and component set completeness. See [WordPress/gutenberg#76135](https://github.com/WordPress/gutenberg/issues/76135).',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
15
22
|
};
|
|
16
23
|
export default meta;
|
|
17
24
|
|
|
@@ -7,7 +7,14 @@ const meta: Meta< typeof InputLayout > = {
|
|
|
7
7
|
title: 'Design System/Components/Form/Primitives/InputLayout',
|
|
8
8
|
component: InputLayout,
|
|
9
9
|
subcomponents: {
|
|
10
|
-
Slot: InputLayout.Slot,
|
|
10
|
+
'InputLayout.Slot': InputLayout.Slot,
|
|
11
|
+
},
|
|
12
|
+
parameters: {
|
|
13
|
+
componentStatus: {
|
|
14
|
+
status: 'use-with-caution',
|
|
15
|
+
whereUsed: 'global',
|
|
16
|
+
notes: 'Not yet recommended for use alongside components from `@wordpress/components`, pending review of style consistency with `@wordpress/components`, and component set completeness. See [WordPress/gutenberg#76135](https://github.com/WordPress/gutenberg/issues/76135).',
|
|
17
|
+
},
|
|
11
18
|
},
|
|
12
19
|
};
|
|
13
20
|
export default meta;
|
|
@@ -9,7 +9,7 @@ import type { SelectItemProps } from './types';
|
|
|
9
9
|
|
|
10
10
|
export const Item = forwardRef< HTMLDivElement, SelectItemProps >(
|
|
11
11
|
function Item(
|
|
12
|
-
{ className, value, size = 'default', children
|
|
12
|
+
{ className, value, size = 'default', children, ...restProps },
|
|
13
13
|
ref
|
|
14
14
|
) {
|
|
15
15
|
return (
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from '@wordpress/theme';
|
|
8
8
|
import { unlock } from '../../../lock-unlock';
|
|
9
9
|
import { Portal } from './portal';
|
|
10
|
-
import {
|
|
10
|
+
import { renderSlotWithChildren } from '../../../utils/render-slot-with-children';
|
|
11
11
|
import itemPopupStyles from '../../../utils/css/item-popup.module.css';
|
|
12
12
|
import resetStyles from '../../../utils/css/resets.module.css';
|
|
13
13
|
import styles from './style.module.css';
|
|
@@ -50,6 +50,6 @@ export const Popup = forwardRef< HTMLDivElement, SelectPopupProps >(
|
|
|
50
50
|
</_Select.Positioner>
|
|
51
51
|
);
|
|
52
52
|
|
|
53
|
-
return
|
|
53
|
+
return renderSlotWithChildren( portal, <Portal />, portalChildren );
|
|
54
54
|
}
|
|
55
55
|
);
|
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import { Select as _Select } from '@base-ui/react/select';
|
|
2
2
|
import type { SelectRootProps } from './types';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
/**
|
|
5
|
+
* A component that lets users choose one option from a list.
|
|
6
|
+
*
|
|
7
|
+
* When using object values, pass an `items` array so `Select.Trigger` can
|
|
8
|
+
* auto-resolve the selected item's label. By default, items should use a
|
|
9
|
+
* `{ value, label }` shape, or provide `itemToStringLabel` for a custom shape.
|
|
10
|
+
*
|
|
11
|
+
* Object values are compared with `Object.is` by default, so use the same
|
|
12
|
+
* object references for `value` / `defaultValue` and `Select.Item` values, or
|
|
13
|
+
* provide `isItemEqualToValue`.
|
|
14
|
+
*/
|
|
15
|
+
export function Root< Value = unknown >( props: SelectRootProps< Value > ) {
|
|
16
|
+
return <_Select.Root< Value, false > { ...props } />;
|
|
6
17
|
}
|