@wordpress/ui 0.9.1-next.v.202603161435.0 → 0.11.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 +76 -1
- package/CONTRIBUTING.md +180 -0
- package/README.md +34 -6
- package/build/alert-dialog/context.cjs +39 -0
- package/build/alert-dialog/context.cjs.map +7 -0
- package/build/alert-dialog/index.cjs +37 -0
- package/build/alert-dialog/index.cjs.map +7 -0
- package/build/alert-dialog/popup.cjs +165 -0
- package/build/alert-dialog/popup.cjs.map +7 -0
- package/build/alert-dialog/root.cjs +152 -0
- package/build/alert-dialog/root.cjs.map +7 -0
- package/build/alert-dialog/trigger.cjs +38 -0
- package/build/alert-dialog/trigger.cjs.map +7 -0
- package/build/alert-dialog/types.cjs +19 -0
- package/build/alert-dialog/types.cjs.map +7 -0
- package/build/badge/badge.cjs +14 -14
- package/build/badge/badge.cjs.map +2 -2
- package/build/button/button.cjs +18 -8
- package/build/button/button.cjs.map +3 -3
- package/build/card/content.cjs +4 -4
- package/build/card/content.cjs.map +2 -2
- package/build/card/full-bleed.cjs +4 -4
- package/build/card/full-bleed.cjs.map +2 -2
- package/build/card/header.cjs +4 -4
- package/build/card/header.cjs.map +2 -2
- package/build/card/root.cjs +6 -6
- package/build/card/root.cjs.map +2 -2
- package/build/card/title.cjs +14 -21
- package/build/card/title.cjs.map +3 -3
- package/build/collapsible-card/content.cjs +24 -3
- package/build/collapsible-card/content.cjs.map +4 -4
- package/build/collapsible-card/context.cjs +35 -0
- package/build/collapsible-card/context.cjs.map +7 -0
- package/build/collapsible-card/header-description.cjs +52 -0
- package/build/collapsible-card/header-description.cjs.map +7 -0
- package/build/collapsible-card/header.cjs +39 -18
- package/build/collapsible-card/header.cjs.map +2 -2
- package/build/collapsible-card/index.cjs +3 -0
- package/build/collapsible-card/index.cjs.map +2 -2
- package/build/collapsible-card/types.cjs.map +1 -1
- package/build/dialog/action.cjs +4 -2
- package/build/dialog/action.cjs.map +2 -2
- package/build/dialog/close-icon.cjs +2 -1
- package/build/dialog/close-icon.cjs.map +2 -2
- package/build/dialog/footer.cjs +3 -3
- package/build/dialog/footer.cjs.map +2 -2
- package/build/dialog/header.cjs +3 -3
- package/build/dialog/header.cjs.map +2 -2
- package/build/dialog/popup.cjs +24 -6
- package/build/dialog/popup.cjs.map +2 -2
- package/build/dialog/title.cjs +10 -19
- package/build/dialog/title.cjs.map +3 -3
- package/build/dialog/types.cjs.map +1 -1
- package/build/empty-state/actions.cjs +66 -0
- package/build/empty-state/actions.cjs.map +7 -0
- package/build/empty-state/description.cjs +69 -0
- package/build/empty-state/description.cjs.map +7 -0
- package/build/empty-state/icon.cjs +69 -0
- package/build/empty-state/icon.cjs.map +7 -0
- package/build/empty-state/index.cjs +46 -0
- package/build/empty-state/index.cjs.map +7 -0
- package/build/empty-state/root.cjs +66 -0
- package/build/empty-state/root.cjs.map +7 -0
- package/build/empty-state/title.cjs +71 -0
- package/build/empty-state/title.cjs.map +7 -0
- package/build/empty-state/types.cjs +19 -0
- package/build/empty-state/types.cjs.map +7 -0
- package/build/empty-state/visual.cjs +66 -0
- package/build/empty-state/visual.cjs.map +7 -0
- package/build/form/index.cjs +27 -0
- package/build/form/index.cjs.map +7 -0
- package/build/form/input-control/index.cjs +31 -0
- package/build/form/input-control/index.cjs.map +7 -0
- package/build/form/input-control/input-control.cjs +50 -0
- package/build/form/input-control/input-control.cjs.map +7 -0
- package/build/form/input-control/types.cjs +19 -0
- package/build/form/input-control/types.cjs.map +7 -0
- package/build/form/primitives/field/description.cjs +17 -4
- package/build/form/primitives/field/description.cjs.map +3 -3
- package/build/form/primitives/field/details.cjs +4 -4
- package/build/form/primitives/field/details.cjs.map +2 -2
- package/build/form/primitives/field/label.cjs +8 -8
- package/build/form/primitives/field/label.cjs.map +2 -2
- package/build/form/primitives/field/root.cjs +2 -2
- package/build/form/primitives/field/root.cjs.map +1 -1
- package/build/form/primitives/fieldset/description.cjs +20 -4
- package/build/form/primitives/fieldset/description.cjs.map +3 -3
- package/build/form/primitives/fieldset/details.cjs +3 -3
- package/build/form/primitives/fieldset/details.cjs.map +2 -2
- package/build/form/primitives/fieldset/legend.cjs +8 -7
- package/build/form/primitives/fieldset/legend.cjs.map +2 -2
- package/build/form/primitives/fieldset/root.cjs +2 -2
- package/build/form/primitives/fieldset/root.cjs.map +1 -1
- package/build/form/primitives/input/input.cjs +23 -7
- package/build/form/primitives/input/input.cjs.map +3 -3
- package/build/form/primitives/input-layout/input-layout.cjs +15 -5
- package/build/form/primitives/input-layout/input-layout.cjs.map +3 -3
- package/build/form/primitives/input-layout/slot.cjs +6 -5
- package/build/form/primitives/input-layout/slot.cjs.map +2 -2
- package/build/form/primitives/select/item.cjs +5 -5
- package/build/form/primitives/select/item.cjs.map +2 -2
- package/build/form/primitives/select/popup.cjs +9 -9
- package/build/form/primitives/select/popup.cjs.map +2 -2
- package/build/form/primitives/select/trigger.cjs +6 -6
- package/build/form/primitives/select/trigger.cjs.map +2 -2
- package/build/form/primitives/select/types.cjs.map +1 -1
- package/build/form/primitives/textarea/textarea.cjs +23 -4
- package/build/form/primitives/textarea/textarea.cjs.map +3 -3
- package/build/form/types.cjs +19 -0
- package/build/form/types.cjs.map +7 -0
- package/build/icon-button/icon-button.cjs +2 -2
- package/build/icon-button/icon-button.cjs.map +1 -1
- package/build/index.cjs +11 -2
- package/build/index.cjs.map +2 -2
- package/build/link/link.cjs +18 -8
- package/build/link/link.cjs.map +3 -3
- package/build/notice/action-button.cjs +3 -3
- package/build/notice/action-button.cjs.map +2 -2
- package/build/notice/action-link.cjs +3 -3
- package/build/notice/action-link.cjs.map +2 -2
- package/build/notice/actions.cjs +3 -3
- package/build/notice/actions.cjs.map +2 -2
- package/build/notice/close-icon.cjs +3 -3
- package/build/notice/close-icon.cjs.map +2 -2
- package/build/notice/description.cjs +3 -3
- package/build/notice/description.cjs.map +2 -2
- package/build/notice/index.cjs.map +1 -1
- package/build/notice/root.cjs +5 -5
- package/build/notice/root.cjs.map +2 -2
- package/build/notice/title.cjs +3 -3
- package/build/notice/title.cjs.map +2 -2
- package/build/popover/arrow.cjs +94 -0
- package/build/popover/arrow.cjs.map +7 -0
- package/build/popover/close.cjs +45 -0
- package/build/popover/close.cjs.map +7 -0
- package/build/popover/context.cjs +76 -0
- package/build/popover/context.cjs.map +7 -0
- package/build/popover/description.cjs +70 -0
- package/build/popover/description.cjs.map +7 -0
- package/build/popover/index.cjs +49 -0
- package/build/popover/index.cjs.map +7 -0
- package/build/popover/popup.cjs +138 -0
- package/build/popover/popup.cjs.map +7 -0
- package/build/popover/root.cjs +35 -0
- package/build/popover/root.cjs.map +7 -0
- package/build/popover/title.cjs +56 -0
- package/build/popover/title.cjs.map +7 -0
- package/build/popover/trigger.cjs +38 -0
- package/build/popover/trigger.cjs.map +7 -0
- package/build/popover/types.cjs +19 -0
- package/build/popover/types.cjs.map +7 -0
- package/build/stack/stack.cjs +2 -2
- package/build/stack/stack.cjs.map +1 -1
- package/build/tabs/context.cjs +121 -0
- package/build/tabs/context.cjs.map +7 -0
- package/build/tabs/list.cjs +3 -4
- package/build/tabs/list.cjs.map +2 -2
- package/build/tabs/panel.cjs +5 -3
- package/build/tabs/panel.cjs.map +2 -2
- package/build/tabs/root.cjs +2 -1
- package/build/tabs/root.cjs.map +2 -2
- package/build/tabs/tab.cjs +5 -3
- package/build/tabs/tab.cjs.map +2 -2
- package/build/text/text.cjs +20 -5
- package/build/text/text.cjs.map +3 -3
- package/build/tooltip/popup.cjs +7 -6
- package/build/tooltip/popup.cjs.map +2 -2
- package/build/tooltip/root.cjs.map +2 -2
- package/build/tooltip/types.cjs.map +1 -1
- package/build/utils/types.cjs.map +1 -1
- package/build/utils/use-deprioritized-initial-focus.cjs +64 -0
- package/build/utils/use-deprioritized-initial-focus.cjs.map +7 -0
- package/build/visually-hidden/visually-hidden.cjs +2 -2
- package/build/visually-hidden/visually-hidden.cjs.map +2 -2
- package/build-module/alert-dialog/context.mjs +14 -0
- package/build-module/alert-dialog/context.mjs.map +7 -0
- package/build-module/alert-dialog/index.mjs +10 -0
- package/build-module/alert-dialog/index.mjs.map +7 -0
- package/build-module/alert-dialog/popup.mjs +132 -0
- package/build-module/alert-dialog/popup.mjs.map +7 -0
- package/build-module/alert-dialog/root.mjs +133 -0
- package/build-module/alert-dialog/root.mjs.map +7 -0
- package/build-module/alert-dialog/trigger.mjs +13 -0
- package/build-module/alert-dialog/trigger.mjs.map +7 -0
- package/build-module/alert-dialog/types.mjs +1 -0
- package/build-module/alert-dialog/types.mjs.map +7 -0
- package/build-module/badge/badge.mjs +14 -14
- package/build-module/badge/badge.mjs.map +2 -2
- package/build-module/button/button.mjs +18 -8
- package/build-module/button/button.mjs.map +3 -3
- package/build-module/card/content.mjs +4 -4
- package/build-module/card/content.mjs.map +2 -2
- package/build-module/card/full-bleed.mjs +4 -4
- package/build-module/card/full-bleed.mjs.map +2 -2
- package/build-module/card/header.mjs +4 -4
- package/build-module/card/header.mjs.map +2 -2
- package/build-module/card/root.mjs +6 -6
- package/build-module/card/root.mjs.map +2 -2
- package/build-module/card/title.mjs +14 -21
- package/build-module/card/title.mjs.map +3 -3
- package/build-module/collapsible-card/content.mjs +24 -3
- package/build-module/collapsible-card/content.mjs.map +3 -3
- package/build-module/collapsible-card/context.mjs +10 -0
- package/build-module/collapsible-card/context.mjs.map +7 -0
- package/build-module/collapsible-card/header-description.mjs +27 -0
- package/build-module/collapsible-card/header-description.mjs.map +7 -0
- package/build-module/collapsible-card/header.mjs +40 -19
- package/build-module/collapsible-card/header.mjs.map +2 -2
- package/build-module/collapsible-card/index.mjs +2 -0
- package/build-module/collapsible-card/index.mjs.map +2 -2
- package/build-module/dialog/action.mjs +4 -2
- package/build-module/dialog/action.mjs.map +2 -2
- package/build-module/dialog/close-icon.mjs +2 -1
- package/build-module/dialog/close-icon.mjs.map +2 -2
- package/build-module/dialog/footer.mjs +3 -3
- package/build-module/dialog/footer.mjs.map +2 -2
- package/build-module/dialog/header.mjs +3 -3
- package/build-module/dialog/header.mjs.map +2 -2
- package/build-module/dialog/popup.mjs +24 -6
- package/build-module/dialog/popup.mjs.map +2 -2
- package/build-module/dialog/title.mjs +10 -9
- package/build-module/dialog/title.mjs.map +2 -2
- package/build-module/empty-state/actions.mjs +31 -0
- package/build-module/empty-state/actions.mjs.map +7 -0
- package/build-module/empty-state/description.mjs +34 -0
- package/build-module/empty-state/description.mjs.map +7 -0
- package/build-module/empty-state/icon.mjs +34 -0
- package/build-module/empty-state/icon.mjs.map +7 -0
- package/build-module/empty-state/index.mjs +16 -0
- package/build-module/empty-state/index.mjs.map +7 -0
- package/build-module/empty-state/root.mjs +31 -0
- package/build-module/empty-state/root.mjs.map +7 -0
- package/build-module/empty-state/title.mjs +36 -0
- package/build-module/empty-state/title.mjs.map +7 -0
- package/build-module/empty-state/types.mjs +1 -0
- package/build-module/empty-state/types.mjs.map +7 -0
- package/build-module/empty-state/visual.mjs +31 -0
- package/build-module/empty-state/visual.mjs.map +7 -0
- package/build-module/form/index.mjs +4 -0
- package/build-module/form/index.mjs.map +7 -0
- package/build-module/form/input-control/index.mjs +6 -0
- package/build-module/form/input-control/index.mjs.map +7 -0
- package/build-module/form/input-control/input-control.mjs +25 -0
- package/build-module/form/input-control/input-control.mjs.map +7 -0
- package/build-module/form/input-control/types.mjs +1 -0
- package/build-module/form/input-control/types.mjs.map +7 -0
- package/build-module/form/primitives/field/description.mjs +17 -4
- package/build-module/form/primitives/field/description.mjs.map +3 -3
- package/build-module/form/primitives/field/details.mjs +4 -4
- package/build-module/form/primitives/field/details.mjs.map +2 -2
- package/build-module/form/primitives/field/label.mjs +8 -8
- package/build-module/form/primitives/field/label.mjs.map +2 -2
- package/build-module/form/primitives/field/root.mjs +2 -2
- package/build-module/form/primitives/field/root.mjs.map +1 -1
- package/build-module/form/primitives/fieldset/description.mjs +20 -4
- package/build-module/form/primitives/fieldset/description.mjs.map +3 -3
- package/build-module/form/primitives/fieldset/details.mjs +3 -3
- package/build-module/form/primitives/fieldset/details.mjs.map +2 -2
- package/build-module/form/primitives/fieldset/legend.mjs +8 -7
- package/build-module/form/primitives/fieldset/legend.mjs.map +2 -2
- package/build-module/form/primitives/fieldset/root.mjs +2 -2
- package/build-module/form/primitives/fieldset/root.mjs.map +1 -1
- package/build-module/form/primitives/input/input.mjs +23 -7
- package/build-module/form/primitives/input/input.mjs.map +3 -3
- package/build-module/form/primitives/input-layout/input-layout.mjs +15 -5
- package/build-module/form/primitives/input-layout/input-layout.mjs.map +3 -3
- package/build-module/form/primitives/input-layout/slot.mjs +6 -5
- package/build-module/form/primitives/input-layout/slot.mjs.map +2 -2
- package/build-module/form/primitives/select/item.mjs +5 -5
- package/build-module/form/primitives/select/item.mjs.map +2 -2
- package/build-module/form/primitives/select/popup.mjs +9 -9
- package/build-module/form/primitives/select/popup.mjs.map +2 -2
- package/build-module/form/primitives/select/trigger.mjs +6 -6
- package/build-module/form/primitives/select/trigger.mjs.map +2 -2
- package/build-module/form/primitives/textarea/textarea.mjs +23 -4
- package/build-module/form/primitives/textarea/textarea.mjs.map +3 -3
- package/build-module/form/types.mjs +1 -0
- package/build-module/form/types.mjs.map +7 -0
- package/build-module/icon-button/icon-button.mjs +2 -2
- package/build-module/icon-button/icon-button.mjs.map +1 -1
- package/build-module/index.mjs +7 -1
- package/build-module/index.mjs.map +2 -2
- package/build-module/link/link.mjs +18 -8
- package/build-module/link/link.mjs.map +3 -3
- package/build-module/notice/action-button.mjs +3 -3
- package/build-module/notice/action-button.mjs.map +2 -2
- package/build-module/notice/action-link.mjs +3 -3
- package/build-module/notice/action-link.mjs.map +2 -2
- package/build-module/notice/actions.mjs +3 -3
- package/build-module/notice/actions.mjs.map +2 -2
- package/build-module/notice/close-icon.mjs +3 -3
- package/build-module/notice/close-icon.mjs.map +2 -2
- package/build-module/notice/description.mjs +3 -3
- package/build-module/notice/description.mjs.map +2 -2
- package/build-module/notice/index.mjs.map +1 -1
- package/build-module/notice/root.mjs +5 -5
- package/build-module/notice/root.mjs.map +2 -2
- package/build-module/notice/title.mjs +3 -3
- package/build-module/notice/title.mjs.map +2 -2
- package/build-module/popover/arrow.mjs +59 -0
- package/build-module/popover/arrow.mjs.map +7 -0
- package/build-module/popover/close.mjs +20 -0
- package/build-module/popover/close.mjs.map +7 -0
- package/build-module/popover/context.mjs +57 -0
- package/build-module/popover/context.mjs.map +7 -0
- package/build-module/popover/description.mjs +35 -0
- package/build-module/popover/description.mjs.map +7 -0
- package/build-module/popover/index.mjs +18 -0
- package/build-module/popover/index.mjs.map +7 -0
- package/build-module/popover/popup.mjs +105 -0
- package/build-module/popover/popup.mjs.map +7 -0
- package/build-module/popover/root.mjs +10 -0
- package/build-module/popover/root.mjs.map +7 -0
- package/build-module/popover/title.mjs +31 -0
- package/build-module/popover/title.mjs.map +7 -0
- package/build-module/popover/trigger.mjs +13 -0
- package/build-module/popover/trigger.mjs.map +7 -0
- package/build-module/popover/types.mjs +1 -0
- package/build-module/popover/types.mjs.map +7 -0
- package/build-module/stack/stack.mjs +2 -2
- package/build-module/stack/stack.mjs.map +1 -1
- package/build-module/tabs/context.mjs +101 -0
- package/build-module/tabs/context.mjs.map +7 -0
- package/build-module/tabs/list.mjs +3 -4
- package/build-module/tabs/list.mjs.map +2 -2
- package/build-module/tabs/panel.mjs +5 -3
- package/build-module/tabs/panel.mjs.map +2 -2
- package/build-module/tabs/root.mjs +2 -1
- package/build-module/tabs/root.mjs.map +2 -2
- package/build-module/tabs/tab.mjs +5 -3
- package/build-module/tabs/tab.mjs.map +2 -2
- package/build-module/text/text.mjs +20 -5
- package/build-module/text/text.mjs.map +3 -3
- package/build-module/tooltip/popup.mjs +7 -6
- package/build-module/tooltip/popup.mjs.map +2 -2
- package/build-module/tooltip/root.mjs.map +2 -2
- package/build-module/utils/use-deprioritized-initial-focus.mjs +39 -0
- package/build-module/utils/use-deprioritized-initial-focus.mjs.map +7 -0
- package/build-module/visually-hidden/visually-hidden.mjs +2 -2
- package/build-module/visually-hidden/visually-hidden.mjs.map +2 -2
- package/build-types/alert-dialog/context.d.ts +11 -0
- package/build-types/alert-dialog/context.d.ts.map +1 -0
- package/build-types/alert-dialog/index.d.ts +4 -0
- package/build-types/alert-dialog/index.d.ts.map +1 -0
- package/build-types/alert-dialog/popup.d.ts +4 -0
- package/build-types/alert-dialog/popup.d.ts.map +1 -0
- package/build-types/alert-dialog/root.d.ts +18 -0
- package/build-types/alert-dialog/root.d.ts.map +1 -0
- package/build-types/alert-dialog/stories/index.story.d.ts +56 -0
- package/build-types/alert-dialog/stories/index.story.d.ts.map +1 -0
- package/build-types/alert-dialog/test/index.test.d.ts +2 -0
- package/build-types/alert-dialog/test/index.test.d.ts.map +1 -0
- package/build-types/alert-dialog/trigger.d.ts +7 -0
- package/build-types/alert-dialog/trigger.d.ts.map +1 -0
- package/build-types/alert-dialog/types.d.ts +105 -0
- package/build-types/alert-dialog/types.d.ts.map +1 -0
- package/build-types/badge/badge.d.ts.map +1 -1
- package/build-types/button/button.d.ts.map +1 -1
- package/build-types/card/stories/index.story.d.ts.map +1 -1
- package/build-types/card/title.d.ts.map +1 -1
- package/build-types/collapsible/panel.d.ts +2 -1
- package/build-types/collapsible/panel.d.ts.map +1 -1
- package/build-types/collapsible/root.d.ts +2 -1
- package/build-types/collapsible/root.d.ts.map +1 -1
- package/build-types/collapsible/trigger.d.ts +2 -1
- package/build-types/collapsible/trigger.d.ts.map +1 -1
- package/build-types/collapsible-card/content.d.ts.map +1 -1
- package/build-types/collapsible-card/context.d.ts +4 -0
- package/build-types/collapsible-card/context.d.ts.map +1 -0
- package/build-types/collapsible-card/header-description.d.ts +15 -0
- package/build-types/collapsible-card/header-description.d.ts.map +1 -0
- package/build-types/collapsible-card/header.d.ts.map +1 -1
- package/build-types/collapsible-card/index.d.ts +2 -1
- package/build-types/collapsible-card/index.d.ts.map +1 -1
- package/build-types/collapsible-card/stories/index.story.d.ts +10 -0
- package/build-types/collapsible-card/stories/index.story.d.ts.map +1 -1
- package/build-types/collapsible-card/types.d.ts +21 -0
- package/build-types/collapsible-card/types.d.ts.map +1 -1
- package/build-types/dialog/action.d.ts.map +1 -1
- package/build-types/dialog/close-icon.d.ts.map +1 -1
- package/build-types/dialog/popup.d.ts.map +1 -1
- package/build-types/dialog/stories/index.story.d.ts +8 -6
- package/build-types/dialog/stories/index.story.d.ts.map +1 -1
- package/build-types/dialog/title.d.ts +12 -2
- package/build-types/dialog/title.d.ts.map +1 -1
- package/build-types/dialog/types.d.ts +13 -6
- package/build-types/dialog/types.d.ts.map +1 -1
- package/build-types/empty-state/actions.d.ts +7 -0
- package/build-types/empty-state/actions.d.ts.map +1 -0
- package/build-types/empty-state/description.d.ts +7 -0
- package/build-types/empty-state/description.d.ts.map +1 -0
- package/build-types/empty-state/icon.d.ts +7 -0
- package/build-types/empty-state/icon.d.ts.map +1 -0
- package/build-types/empty-state/index.d.ts +8 -0
- package/build-types/empty-state/index.d.ts.map +1 -0
- package/build-types/empty-state/root.d.ts +6 -0
- package/build-types/empty-state/root.d.ts.map +1 -0
- package/build-types/empty-state/stories/index.story.d.ts +8 -0
- package/build-types/empty-state/stories/index.story.d.ts.map +1 -0
- package/build-types/empty-state/test/actions.test.d.ts +2 -0
- package/build-types/empty-state/test/actions.test.d.ts.map +1 -0
- package/build-types/empty-state/test/description.test.d.ts +2 -0
- package/build-types/empty-state/test/description.test.d.ts.map +1 -0
- package/build-types/empty-state/test/icon.test.d.ts +2 -0
- package/build-types/empty-state/test/icon.test.d.ts.map +1 -0
- package/build-types/empty-state/test/root.test.d.ts +2 -0
- package/build-types/empty-state/test/root.test.d.ts.map +1 -0
- package/build-types/empty-state/test/title.test.d.ts +2 -0
- package/build-types/empty-state/test/title.test.d.ts.map +1 -0
- package/build-types/empty-state/test/visual.test.d.ts +2 -0
- package/build-types/empty-state/test/visual.test.d.ts.map +1 -0
- package/build-types/empty-state/title.d.ts +6 -0
- package/build-types/empty-state/title.d.ts.map +1 -0
- package/build-types/empty-state/types.d.ts +40 -0
- package/build-types/empty-state/types.d.ts.map +1 -0
- package/build-types/empty-state/visual.d.ts +7 -0
- package/build-types/empty-state/visual.d.ts.map +1 -0
- package/build-types/form/index.d.ts +3 -0
- package/build-types/form/index.d.ts.map +1 -0
- package/build-types/form/input-control/index.d.ts +2 -0
- package/build-types/form/input-control/index.d.ts.map +1 -0
- package/build-types/form/input-control/input-control.d.ts +6 -0
- package/build-types/form/input-control/input-control.d.ts.map +1 -0
- package/build-types/form/input-control/stories/index.story.d.ts +16 -0
- package/build-types/form/input-control/stories/index.story.d.ts.map +1 -0
- package/build-types/form/input-control/test/index.test.d.ts +2 -0
- package/build-types/form/input-control/test/index.test.d.ts.map +1 -0
- package/build-types/form/input-control/types.d.ts +4 -0
- package/build-types/form/input-control/types.d.ts.map +1 -0
- package/build-types/form/primitives/field/description.d.ts +2 -1
- package/build-types/form/primitives/field/description.d.ts.map +1 -1
- package/build-types/form/primitives/field/details.d.ts +2 -1
- package/build-types/form/primitives/field/details.d.ts.map +1 -1
- package/build-types/form/primitives/field/label.d.ts +2 -1
- package/build-types/form/primitives/field/label.d.ts.map +1 -1
- package/build-types/form/primitives/field/stories/index.story.d.ts.map +1 -1
- package/build-types/form/primitives/fieldset/description.d.ts +2 -1
- package/build-types/form/primitives/fieldset/description.d.ts.map +1 -1
- package/build-types/form/primitives/fieldset/details.d.ts +2 -1
- package/build-types/form/primitives/fieldset/details.d.ts.map +1 -1
- package/build-types/form/primitives/fieldset/legend.d.ts +2 -1
- package/build-types/form/primitives/fieldset/legend.d.ts.map +1 -1
- package/build-types/form/primitives/fieldset/root.d.ts +2 -1
- package/build-types/form/primitives/fieldset/root.d.ts.map +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.map +1 -1
- package/build-types/form/primitives/input/stories/index.story.d.ts +2 -0
- package/build-types/form/primitives/input/stories/index.story.d.ts.map +1 -1
- package/build-types/form/primitives/input-layout/input-layout.d.ts.map +1 -1
- package/build-types/form/primitives/input-layout/slot.d.ts.map +1 -1
- package/build-types/form/primitives/input-layout/stories/index.story.d.ts +5 -0
- package/build-types/form/primitives/input-layout/stories/index.story.d.ts.map +1 -1
- package/build-types/form/primitives/select/item.d.ts +6 -2
- package/build-types/form/primitives/select/item.d.ts.map +1 -1
- package/build-types/form/primitives/select/popup.d.ts +11 -1
- package/build-types/form/primitives/select/popup.d.ts.map +1 -1
- package/build-types/form/primitives/select/trigger.d.ts +12 -2
- package/build-types/form/primitives/select/trigger.d.ts.map +1 -1
- package/build-types/form/primitives/select/types.d.ts +13 -3
- package/build-types/form/primitives/select/types.d.ts.map +1 -1
- package/build-types/form/primitives/textarea/textarea.d.ts.map +1 -1
- package/build-types/form/stories/shared.d.ts +3 -0
- package/build-types/form/stories/shared.d.ts.map +1 -0
- package/build-types/form/types.d.ts +30 -0
- package/build-types/form/types.d.ts.map +1 -0
- package/build-types/index.d.ts +4 -1
- package/build-types/index.d.ts.map +1 -1
- package/build-types/link/link.d.ts.map +1 -1
- package/build-types/notice/index.d.ts +0 -1
- package/build-types/notice/index.d.ts.map +1 -1
- package/build-types/popover/arrow.d.ts +10 -0
- package/build-types/popover/arrow.d.ts.map +1 -0
- package/build-types/popover/close.d.ts +11 -0
- package/build-types/popover/close.d.ts.map +1 -0
- package/build-types/popover/context.d.ts +22 -0
- package/build-types/popover/context.d.ts.map +1 -0
- package/build-types/popover/description.d.ts +10 -0
- package/build-types/popover/description.d.ts.map +1 -0
- package/build-types/popover/index.d.ts +9 -0
- package/build-types/popover/index.d.ts.map +1 -0
- package/build-types/popover/popup.d.ts +11 -0
- package/build-types/popover/popup.d.ts.map +1 -0
- package/build-types/popover/root.d.ts +37 -0
- package/build-types/popover/root.d.ts.map +1 -0
- package/build-types/popover/stories/index.story.d.ts +211 -0
- package/build-types/popover/stories/index.story.d.ts.map +1 -0
- package/build-types/popover/stories/utils.d.ts +25 -0
- package/build-types/popover/stories/utils.d.ts.map +1 -0
- package/build-types/popover/test/index.test.d.ts +2 -0
- package/build-types/popover/test/index.test.d.ts.map +1 -0
- package/build-types/popover/title.d.ts +20 -0
- package/build-types/popover/title.d.ts.map +1 -0
- package/build-types/popover/trigger.d.ts +10 -0
- package/build-types/popover/trigger.d.ts.map +1 -0
- package/build-types/popover/types.d.ts +83 -0
- package/build-types/popover/types.d.ts.map +1 -0
- package/build-types/tabs/context.d.ts +26 -0
- package/build-types/tabs/context.d.ts.map +1 -0
- package/build-types/tabs/list.d.ts +2 -1
- package/build-types/tabs/list.d.ts.map +1 -1
- package/build-types/tabs/panel.d.ts +2 -1
- package/build-types/tabs/panel.d.ts.map +1 -1
- package/build-types/tabs/root.d.ts +2 -1
- package/build-types/tabs/root.d.ts.map +1 -1
- package/build-types/tabs/tab.d.ts +2 -1
- package/build-types/tabs/tab.d.ts.map +1 -1
- package/build-types/text/stories/index.story.d.ts +4 -0
- package/build-types/text/stories/index.story.d.ts.map +1 -1
- package/build-types/text/text.d.ts.map +1 -1
- package/build-types/tooltip/popup.d.ts.map +1 -1
- package/build-types/tooltip/root.d.ts +13 -0
- package/build-types/tooltip/root.d.ts.map +1 -1
- package/build-types/tooltip/stories/index.story.d.ts.map +1 -1
- package/build-types/tooltip/stories/usage-guidelines.story.d.ts +21 -0
- package/build-types/tooltip/stories/usage-guidelines.story.d.ts.map +1 -0
- package/build-types/tooltip/types.d.ts +4 -0
- package/build-types/tooltip/types.d.ts.map +1 -1
- package/build-types/utils/test/use-deprioritized-initial-focus.test.d.ts +2 -0
- package/build-types/utils/test/use-deprioritized-initial-focus.test.d.ts.map +1 -0
- package/build-types/utils/types.d.ts +6 -2
- package/build-types/utils/types.d.ts.map +1 -1
- package/build-types/utils/use-deprioritized-initial-focus.d.ts +36 -0
- package/build-types/utils/use-deprioritized-initial-focus.d.ts.map +1 -0
- package/build-types/visually-hidden/stories/index.story.d.ts +7 -0
- package/build-types/visually-hidden/stories/index.story.d.ts.map +1 -1
- package/build-types/visually-hidden/visually-hidden.d.ts +34 -0
- package/build-types/visually-hidden/visually-hidden.d.ts.map +1 -1
- package/package.json +17 -16
- package/src/alert-dialog/context.tsx +22 -0
- package/src/alert-dialog/index.ts +3 -0
- package/src/alert-dialog/popup.tsx +116 -0
- package/src/alert-dialog/root.tsx +226 -0
- package/src/alert-dialog/stories/index.story.tsx +305 -0
- package/src/alert-dialog/style.module.css +21 -0
- package/src/alert-dialog/test/index.test.tsx +1509 -0
- package/src/alert-dialog/trigger.tsx +15 -0
- package/src/alert-dialog/types.ts +119 -0
- package/src/badge/badge.tsx +11 -14
- package/src/badge/style.module.css +0 -4
- package/src/button/button.tsx +2 -0
- package/src/button/style.module.css +9 -3
- package/src/card/stories/index.story.tsx +4 -5
- package/src/card/style.module.css +4 -10
- package/src/card/test/index.test.tsx +17 -1
- package/src/card/title.tsx +14 -12
- package/src/collapsible-card/content.tsx +16 -3
- package/src/collapsible-card/context.ts +7 -0
- package/src/collapsible-card/header-description.tsx +43 -0
- package/src/collapsible-card/header.tsx +47 -24
- package/src/collapsible-card/index.ts +2 -1
- package/src/collapsible-card/stories/index.story.tsx +102 -4
- package/src/collapsible-card/style.module.css +34 -2
- package/src/collapsible-card/test/index.test.tsx +96 -9
- package/src/collapsible-card/types.ts +22 -0
- package/src/dialog/action.tsx +8 -2
- package/src/dialog/close-icon.tsx +1 -0
- package/src/dialog/popup.tsx +23 -3
- package/src/dialog/stories/index.story.tsx +33 -28
- package/src/dialog/style.module.css +18 -14
- package/src/dialog/test/index.test.tsx +180 -4
- package/src/dialog/title.tsx +21 -9
- package/src/dialog/types.ts +20 -6
- package/src/empty-state/actions.tsx +24 -0
- package/src/empty-state/description.tsx +31 -0
- package/src/empty-state/icon.tsx +24 -0
- package/src/empty-state/index.ts +8 -0
- package/src/empty-state/root.tsx +23 -0
- package/src/empty-state/stories/index.story.tsx +64 -0
- package/src/empty-state/style.module.css +53 -0
- package/src/empty-state/test/actions.test.tsx +18 -0
- package/src/empty-state/test/description.test.tsx +26 -0
- package/src/empty-state/test/icon.test.tsx +13 -0
- package/src/empty-state/test/root.test.tsx +13 -0
- package/src/empty-state/test/title.test.tsx +26 -0
- package/src/empty-state/test/visual.test.tsx +17 -0
- package/src/empty-state/title.tsx +29 -0
- package/src/empty-state/types.ts +45 -0
- package/src/empty-state/visual.tsx +24 -0
- package/src/form/index.ts +3 -0
- package/src/form/input-control/index.ts +1 -0
- package/src/form/input-control/input-control.tsx +33 -0
- package/src/form/input-control/stories/index.story.tsx +163 -0
- package/src/form/input-control/test/index.test.tsx +53 -0
- package/src/form/input-control/types.ts +5 -0
- package/src/form/primitives/field/description.tsx +6 -1
- package/src/form/primitives/field/details.tsx +4 -2
- package/src/form/primitives/field/label.tsx +9 -5
- package/src/form/primitives/field/stories/index.story.tsx +2 -7
- package/src/form/primitives/field/test/index.test.tsx +11 -0
- package/src/form/primitives/fieldset/description.tsx +9 -1
- package/src/form/primitives/fieldset/legend.tsx +9 -4
- package/src/form/primitives/fieldset/stories/index.story.tsx +2 -7
- package/src/form/primitives/fieldset/test/index.test.tsx +22 -0
- package/src/form/primitives/input/input.tsx +6 -1
- package/src/form/primitives/input/stories/index.story.tsx +7 -0
- package/src/form/primitives/input/style.module.css +4 -0
- package/src/form/primitives/input-layout/input-layout.tsx +2 -0
- package/src/form/primitives/input-layout/slot.tsx +6 -2
- package/src/form/primitives/input-layout/stories/index.story.tsx +22 -1
- package/src/form/primitives/input-layout/style.module.css +3 -3
- package/src/form/primitives/select/popup.tsx +5 -2
- package/src/form/primitives/select/test/index.test.tsx +60 -1
- package/src/form/primitives/select/types.ts +14 -4
- package/src/form/primitives/stories/overview.mdx +15 -0
- package/src/form/primitives/textarea/textarea.tsx +11 -2
- package/src/form/stories/shared.tsx +21 -0
- package/src/form/types.ts +34 -0
- package/src/index.ts +4 -1
- package/src/link/link.tsx +2 -0
- package/src/link/style.module.css +11 -1
- package/src/notice/index.ts +0 -2
- package/src/notice/style.module.css +6 -6
- package/src/popover/arrow.tsx +49 -0
- package/src/popover/close.tsx +24 -0
- package/src/popover/context.tsx +100 -0
- package/src/popover/description.tsx +29 -0
- package/src/popover/index.ts +9 -0
- package/src/popover/popup.tsx +106 -0
- package/src/popover/root.tsx +41 -0
- package/src/popover/stories/index.story.tsx +1315 -0
- package/src/popover/stories/utils.tsx +91 -0
- package/src/popover/style.module.css +64 -0
- package/src/popover/test/index.test.tsx +727 -0
- package/src/popover/title.tsx +47 -0
- package/src/popover/trigger.tsx +17 -0
- package/src/popover/types.ts +113 -0
- package/src/tabs/context.tsx +170 -0
- package/src/tabs/list.tsx +0 -1
- package/src/tabs/panel.tsx +3 -0
- package/src/tabs/root.tsx +6 -1
- package/src/tabs/style.module.css +3 -3
- package/src/tabs/tab.tsx +3 -0
- package/src/tabs/test/index.test.tsx +162 -0
- package/src/text/stories/index.story.tsx +4 -2
- package/src/text/style.module.css +62 -36
- package/src/text/test/index.test.tsx +1 -4
- package/src/text/text.tsx +8 -1
- package/src/tooltip/popup.tsx +2 -1
- package/src/tooltip/root.tsx +13 -0
- package/src/tooltip/stories/index.story.tsx +20 -15
- package/src/tooltip/stories/usage-guidelines.mdx +91 -0
- package/src/tooltip/stories/usage-guidelines.story.tsx +119 -0
- package/src/tooltip/style.module.css +2 -2
- package/src/tooltip/test/index.test.tsx +61 -0
- package/src/tooltip/types.ts +5 -0
- package/src/utils/css/field.module.css +12 -9
- package/src/utils/css/focus.module.css +7 -5
- package/src/utils/css/global-css-defense.module.css +117 -0
- package/src/utils/css/item-popup.module.css +3 -2
- package/src/utils/css/select-trigger.module.css +1 -0
- package/src/utils/test/use-deprioritized-initial-focus.test.tsx +230 -0
- package/src/utils/types.ts +7 -2
- package/src/utils/use-deprioritized-initial-focus.ts +84 -0
- package/src/visually-hidden/stories/index.story.tsx +25 -0
- package/src/visually-hidden/visually-hidden.tsx +34 -0
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { Select as _Select } from '@base-ui/react/select';
|
|
2
|
+
import type { ComponentProps } from '../../../utils/types';
|
|
2
3
|
import type { InputLayoutProps } from '../input-layout/types';
|
|
3
4
|
export type SelectRootProps = Omit<_Select.Root.Props<string, false>, 'multiple'>;
|
|
4
|
-
export type SelectTriggerProps =
|
|
5
|
+
export type SelectTriggerProps = ComponentProps<typeof _Select.Trigger> & {
|
|
5
6
|
/**
|
|
6
7
|
* The size of the trigger.
|
|
7
8
|
*
|
|
@@ -20,8 +21,17 @@ export type SelectTriggerProps = Omit<_Select.Trigger.Props, 'children'> & {
|
|
|
20
21
|
*/
|
|
21
22
|
children?: _Select.Value.Props['children'];
|
|
22
23
|
};
|
|
23
|
-
export type SelectPopupProps = _Select.Popup
|
|
24
|
-
|
|
24
|
+
export type SelectPopupProps = ComponentProps<typeof _Select.Popup> & {
|
|
25
|
+
/**
|
|
26
|
+
* The content to be rendered inside the popup.
|
|
27
|
+
*/
|
|
28
|
+
children?: React.ReactNode;
|
|
29
|
+
/**
|
|
30
|
+
* A parent element to render the portal into.
|
|
31
|
+
*/
|
|
32
|
+
container?: _Select.Portal.Props['container'];
|
|
33
|
+
};
|
|
34
|
+
export type SelectItemProps = Omit<ComponentProps<typeof _Select.Item>, 'value'> & {
|
|
25
35
|
/**
|
|
26
36
|
* A unique value that identifies this select item.
|
|
27
37
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/select/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAG9D,MAAM,MAAM,eAAe,GAAG,IAAI,CACjC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAE,MAAM,EAAE,KAAK,CAAE,EACnC,UAAU,CACV,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/select/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAG9D,MAAM,MAAM,eAAe,GAAG,IAAI,CACjC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAE,MAAM,EAAE,KAAK,CAAE,EACnC,UAAU,CACV,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAAE,OAAO,OAAO,CAAC,OAAO,CAAE,GAAG;IAC3E;;;;OAIG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAE,MAAM,CAAE,CAAC;IAClC;;;;OAIG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAChC;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,KAAK,CAAE,UAAU,CAAE,CAAC;CAC7C,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAE,OAAO,OAAO,CAAC,KAAK,CAAE,GAAG;IACvE;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAE,WAAW,CAAE,CAAC;CAChD,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,IAAI,CACjC,cAAc,CAAE,OAAO,OAAO,CAAC,IAAI,CAAE,EACrC,OAAO,CACP,GAAG;IACH;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAE,MAAM,CAAE,CAAC;IAClC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAE,UAAU,CAAE,CAAC;CAC5C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/textarea/textarea.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../../../src/form/primitives/textarea/textarea.tsx"],"names":[],"mappings":"AAqBA,eAAO,MAAM,QAAQ;;uDAsCpB,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const WITH_DETAILS_DESCRIPTION = "To add rich content (such as links) to the description, use the `details` prop.\n\nAlthough this content is not associated with the field using direct semantics,\nit is made discoverable to screen reader users via a visually hidden description,\nalerting them to the presence of additional information below.\n\n**Important:** If the content only includes plain text, use `description` instead,\nso the readout is not unnecessarily verbose for screen reader users.";
|
|
2
|
+
export declare const DETAILS_EXAMPLE: import("react").JSX.Element;
|
|
3
|
+
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/form/stories/shared.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,wBAAwB,qdAQgC,CAAC;AAEtE,eAAO,MAAM,eAAe,6BAQ3B,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Field } from './primitives';
|
|
2
|
+
export type ControlProps = {
|
|
3
|
+
/**
|
|
4
|
+
* The accessible label. All controls must be labeled.
|
|
5
|
+
*/
|
|
6
|
+
label: React.ComponentProps<typeof Field.Label>['children'];
|
|
7
|
+
/**
|
|
8
|
+
* The accessible description, associated using `aria-describedby`.
|
|
9
|
+
*
|
|
10
|
+
* For screen reader accessibility, this should only contain plain text,
|
|
11
|
+
* and no semantics such as links.
|
|
12
|
+
*/
|
|
13
|
+
description?: React.ComponentProps<typeof Field.Description>['children'];
|
|
14
|
+
/**
|
|
15
|
+
* Additional information about the field, which unlike a normal description,
|
|
16
|
+
* can include links and other semantic elements.
|
|
17
|
+
*
|
|
18
|
+
* Do not use this prop when the content is only plain text;
|
|
19
|
+
* use `description` instead.
|
|
20
|
+
*/
|
|
21
|
+
details?: React.ComponentProps<typeof Field.Details>['children'];
|
|
22
|
+
/**
|
|
23
|
+
* Whether to visually hide the label while keeping it accessible
|
|
24
|
+
* to screen readers.
|
|
25
|
+
*
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
28
|
+
hideLabelFromVision?: React.ComponentProps<typeof Field.Label>['hideFromVision'];
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/form/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,MAAM,YAAY,GAAG;IAC1B;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC,cAAc,CAAE,OAAO,KAAK,CAAC,KAAK,CAAE,CAAE,UAAU,CAAE,CAAC;IAChE;;;;;OAKG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,cAAc,CACjC,OAAO,KAAK,CAAC,WAAW,CACxB,CAAE,UAAU,CAAE,CAAC;IAChB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,cAAc,CAAE,OAAO,KAAK,CAAC,OAAO,CAAE,CAAE,UAAU,CAAE,CAAC;IACrE;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,KAAK,CAAC,cAAc,CACzC,OAAO,KAAK,CAAC,KAAK,CAClB,CAAE,gBAAgB,CAAE,CAAC;CACtB,CAAC"}
|
package/build-types/index.d.ts
CHANGED
|
@@ -3,12 +3,15 @@ export * from './button';
|
|
|
3
3
|
export * as Card from './card';
|
|
4
4
|
export * as Collapsible from './collapsible';
|
|
5
5
|
export * as CollapsibleCard from './collapsible-card';
|
|
6
|
+
export * as AlertDialog from './alert-dialog';
|
|
6
7
|
export * as Dialog from './dialog';
|
|
7
|
-
export * from './
|
|
8
|
+
export * as EmptyState from './empty-state';
|
|
9
|
+
export * from './form';
|
|
8
10
|
export * from './icon';
|
|
9
11
|
export * from './icon-button';
|
|
10
12
|
export * from './link';
|
|
11
13
|
export * as Notice from './notice';
|
|
14
|
+
export * as Popover from './popover';
|
|
12
15
|
export * from './stack';
|
|
13
16
|
export * as Tabs from './tabs';
|
|
14
17
|
export * from './text';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,WAAW,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,eAAe,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,WAAW,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,eAAe,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,WAAW,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,UAAU,MAAM,eAAe,CAAC;AAC5C,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,cAAc,SAAS,CAAC;AACxB,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,cAAc,mBAAmB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../src/link/link.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../src/link/link.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAMzC;;;GAGG;AACH,eAAO,MAAM,IAAI,yGA4Dd,CAAC"}
|
|
@@ -6,5 +6,4 @@ import { CloseIcon } from './close-icon';
|
|
|
6
6
|
import { ActionButton } from './action-button';
|
|
7
7
|
import { ActionLink } from './action-link';
|
|
8
8
|
export { Root, Title, Description, Actions, CloseIcon, ActionButton, ActionLink, };
|
|
9
|
-
export type { NoticeIntent } from './types';
|
|
10
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/notice/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EACN,IAAI,EACJ,KAAK,EACL,WAAW,EACX,OAAO,EACP,SAAS,EACT,YAAY,EACZ,UAAU,GACV,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/notice/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EACN,IAAI,EACJ,KAAK,EACL,WAAW,EACX,OAAO,EACP,SAAS,EACT,YAAY,EACZ,UAAU,GACV,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ArrowProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Renders an optional arrow element that points toward the anchor.
|
|
4
|
+
*
|
|
5
|
+
* Must be placed inside `Popover.Popup`. The arrow automatically rotates
|
|
6
|
+
* to match the current placement side.
|
|
7
|
+
*/
|
|
8
|
+
declare const Arrow: import("react").ForwardRefExoticComponent<ArrowProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
9
|
+
export { Arrow };
|
|
10
|
+
//# sourceMappingURL=arrow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arrow.d.ts","sourceRoot":"","sources":["../../src/popover/arrow.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAuB1C;;;;;GAKG;AACH,QAAA,MAAM,KAAK,uGAaR,CAAC;AAEJ,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { CloseProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Renders a button that closes the popover when clicked.
|
|
4
|
+
*
|
|
5
|
+
* When the popover opens, initial focus skips this button in favor of
|
|
6
|
+
* the first interactive element inside the popup (unless `initialFocus`
|
|
7
|
+
* on `Popover.Popup` overrides this behavior).
|
|
8
|
+
*/
|
|
9
|
+
declare const Close: import("react").ForwardRefExoticComponent<CloseProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
export { Close };
|
|
11
|
+
//# sourceMappingURL=close.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"close.d.ts","sourceRoot":"","sources":["../../src/popover/close.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C;;;;;;GAMG;AACH,QAAA,MAAM,KAAK,0GAUV,CAAC;AAEF,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
type PopoverValidationContextType = {
|
|
2
|
+
registerTitle: (element: HTMLElement | null) => void;
|
|
3
|
+
};
|
|
4
|
+
declare function usePopoverValidationContextDev(): PopoverValidationContextType | null;
|
|
5
|
+
/**
|
|
6
|
+
* Hook to access the popover validation context.
|
|
7
|
+
* Returns null in production or if not within a Popover.Popup.
|
|
8
|
+
*/
|
|
9
|
+
export declare const usePopoverValidationContext: typeof usePopoverValidationContextDev;
|
|
10
|
+
/**
|
|
11
|
+
* Development-only provider that tracks whether Popover.Title is rendered.
|
|
12
|
+
*/
|
|
13
|
+
declare function PopoverValidationProviderDev({ children, }: {
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
}): import("react").JSX.Element;
|
|
16
|
+
/**
|
|
17
|
+
* Provider component that validates Popover.Title presence in development mode.
|
|
18
|
+
* In production, this component is a no-op and just renders children.
|
|
19
|
+
*/
|
|
20
|
+
export declare const PopoverValidationProvider: typeof PopoverValidationProviderDev;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/popover/context.tsx"],"names":[],"mappings":"AAeA,KAAK,4BAA4B,GAAG;IACnC,aAAa,EAAE,CAAE,OAAO,EAAE,WAAW,GAAG,IAAI,KAAM,IAAI,CAAC;CACvD,CAAC;AAMF,iBAAS,8BAA8B,wCAEtC;AAMD;;;GAGG;AACH,eAAO,MAAM,2BAA2B,uCAEN,CAAC;AAEnC;;GAEG;AACH,iBAAS,4BAA4B,CAAE,EACtC,QAAQ,GACR,EAAE;IACF,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B,+BAqCA;AAUD;;;GAGG;AACH,eAAO,MAAM,yBAAyB,qCAEN,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { DescriptionProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Renders an optional paragraph that describes the popover content.
|
|
4
|
+
*
|
|
5
|
+
* The rendered element is linked to the popup via `aria-describedby`.
|
|
6
|
+
* Uses the `body-md` text variant by default.
|
|
7
|
+
*/
|
|
8
|
+
declare const Description: import("react").ForwardRefExoticComponent<DescriptionProps & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
9
|
+
export { Description };
|
|
10
|
+
//# sourceMappingURL=description.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"description.d.ts","sourceRoot":"","sources":["../../src/popover/description.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD;;;;;GAKG;AACH,QAAA,MAAM,WAAW,mHAahB,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Arrow } from './arrow';
|
|
2
|
+
import { Close } from './close';
|
|
3
|
+
import { Description } from './description';
|
|
4
|
+
import { Popup } from './popup';
|
|
5
|
+
import { Root } from './root';
|
|
6
|
+
import { Title } from './title';
|
|
7
|
+
import { Trigger } from './trigger';
|
|
8
|
+
export { Arrow, Close, Description, Popup, Root, Title, Trigger };
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/popover/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PopupProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Renders the floating popup container for the popover content.
|
|
4
|
+
*
|
|
5
|
+
* Handles portal rendering, positioning relative to the anchor, collision
|
|
6
|
+
* avoidance, focus management, and optional backdrop. Supply a `container`
|
|
7
|
+
* element for cross-document scenarios such as iframes.
|
|
8
|
+
*/
|
|
9
|
+
declare const Popup: import("react").ForwardRefExoticComponent<PopupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
10
|
+
export { Popup };
|
|
11
|
+
//# sourceMappingURL=popup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popup.d.ts","sourceRoot":"","sources":["../../src/popover/popup.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAO1C;;;;;;GAMG;AACH,QAAA,MAAM,KAAK,uGA4ER,CAAC;AAEJ,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { RootProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* An accessible popup anchored to a trigger element.
|
|
4
|
+
*
|
|
5
|
+
* Popover renders ARIA-compliant floating content that appears next to its
|
|
6
|
+
* trigger. It can contain interactive content such as form controls, menus,
|
|
7
|
+
* and rich descriptions.
|
|
8
|
+
*
|
|
9
|
+
* Compose the compound components to build a popover:
|
|
10
|
+
*
|
|
11
|
+
* - `Popover.Root` — provides open state and context to all sub-components.
|
|
12
|
+
* - `Popover.Trigger` — the button that toggles the popup.
|
|
13
|
+
* - `Popover.Popup` — the floating container (portal, positioning, collision
|
|
14
|
+
* avoidance).
|
|
15
|
+
* - `Popover.Arrow` — an optional arrow pointing toward the anchor.
|
|
16
|
+
* - `Popover.Title` — **required** heading that labels the popover for
|
|
17
|
+
* accessibility (can be visually hidden).
|
|
18
|
+
* - `Popover.Description` — optional paragraph linked via `aria-describedby`.
|
|
19
|
+
* - `Popover.Close` — a button that closes the popover when clicked.
|
|
20
|
+
* **Required** when `modal` is `true` or `'trap-focus'` so that focus
|
|
21
|
+
* can cycle correctly and the user can dismiss the popover.
|
|
22
|
+
*
|
|
23
|
+
* ```jsx
|
|
24
|
+
* <Popover.Root>
|
|
25
|
+
* <Popover.Trigger>Open</Popover.Trigger>
|
|
26
|
+
* <Popover.Popup>
|
|
27
|
+
* <Popover.Arrow />
|
|
28
|
+
* <Popover.Title>Popover title</Popover.Title>
|
|
29
|
+
* <Popover.Description>Popover description</Popover.Description>
|
|
30
|
+
* <Popover.Close>Close</Popover.Close>
|
|
31
|
+
* </Popover.Popup>
|
|
32
|
+
* </Popover.Root>
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
declare function Root(props: RootProps): import("react").JSX.Element;
|
|
36
|
+
export { Root };
|
|
37
|
+
//# sourceMappingURL=root.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"root.d.ts","sourceRoot":"","sources":["../../src/popover/root.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,iBAAS,IAAI,CAAE,KAAK,EAAE,SAAS,+BAE9B;AAED,OAAO,EAAE,IAAI,EAAE,CAAC"}
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Popover } from '../..';
|
|
3
|
+
declare const meta: Meta<typeof Popover.Root>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Popover.Root>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
/**
|
|
8
|
+
* A popover without the arrow sub-component. Omit `Popover.Arrow`
|
|
9
|
+
* from the popup content when an arrow indicator is not desired.
|
|
10
|
+
*/
|
|
11
|
+
export declare const NoArrow: Story;
|
|
12
|
+
/**
|
|
13
|
+
* All combinations of `side` and `align` props on `Popover.Popup`.
|
|
14
|
+
*
|
|
15
|
+
* Each row shows a side (`top`, `right`, `bottom`, `left`), and each column
|
|
16
|
+
* shows an alignment (`start`, `center`, `end`).
|
|
17
|
+
*/
|
|
18
|
+
export declare const Positioning: Story;
|
|
19
|
+
/**
|
|
20
|
+
* A popover with a close icon button, title, and description. The
|
|
21
|
+
* `Popover.Close` component renders a button that closes the popover when
|
|
22
|
+
* clicked. Here it wraps an `IconButton` for a properly sized, accessible
|
|
23
|
+
* close action — matching the Dialog close-icon pattern.
|
|
24
|
+
*/
|
|
25
|
+
export declare const WithCloseButton: Story;
|
|
26
|
+
/**
|
|
27
|
+
* Use the `open` and `onOpenChange` props on `Popover.Root` to control the
|
|
28
|
+
* popover's visibility programmatically.
|
|
29
|
+
*
|
|
30
|
+
* The checkbox drives the popover state externally. The popover's trigger
|
|
31
|
+
* and click-outside dismiss both sync back to the same state via
|
|
32
|
+
* `onOpenChange`, keeping everything in sync.
|
|
33
|
+
*/
|
|
34
|
+
export declare const Controlled: Story;
|
|
35
|
+
/**
|
|
36
|
+
* Set `modal` to `true` to trap focus inside the popover when it is open.
|
|
37
|
+
* This is useful for complex popover content that requires user interaction,
|
|
38
|
+
* such as forms. Try tabbing through the fields — focus stays inside the
|
|
39
|
+
* popover until it is dismissed.
|
|
40
|
+
*
|
|
41
|
+
* **Note:** focus trapping requires a `Popover.Close` part inside the popup
|
|
42
|
+
* so that screen readers always have an escape route. It can be visually
|
|
43
|
+
* hidden if needed.
|
|
44
|
+
*
|
|
45
|
+
* Pass `backdrop` to `Popover.Popup` to display a semi-transparent overlay
|
|
46
|
+
* beneath the popover, signalling that the page is blocked.
|
|
47
|
+
*/
|
|
48
|
+
export declare const Modal: Story;
|
|
49
|
+
/**
|
|
50
|
+
* The `variant="unstyled"` option strips all visual styling from the popup,
|
|
51
|
+
* making it a blank positioning container for fully custom content.
|
|
52
|
+
*/
|
|
53
|
+
export declare const Unstyled: Story;
|
|
54
|
+
/**
|
|
55
|
+
* Overlay placement positions the popover centered on top of its trigger,
|
|
56
|
+
* effectively covering it. This is achieved by computing a negative
|
|
57
|
+
* `sideOffset` based on the measured sizes of the trigger and popup.
|
|
58
|
+
*
|
|
59
|
+
* This technique is useful when you want the popover to visually replace
|
|
60
|
+
* the trigger element in place.
|
|
61
|
+
*/
|
|
62
|
+
export declare const OverlayPlacement: Story;
|
|
63
|
+
/**
|
|
64
|
+
* To render the popup inline (without a portal), create a local ref to a
|
|
65
|
+
* `<span>` with `display: contents` and pass it as the `container` prop.
|
|
66
|
+
* The popup will render inside the span rather than being portaled to
|
|
67
|
+
* `document.body`, while retaining all positioning behavior.
|
|
68
|
+
*
|
|
69
|
+
* **Note:** `backdrop` will not cover the full viewport in this mode.
|
|
70
|
+
*/
|
|
71
|
+
export declare const Inline: Story;
|
|
72
|
+
/**
|
|
73
|
+
* Use the `collisionAvoidance` prop to control how the popover behaves when
|
|
74
|
+
* it collides with the edges of its collision boundary.
|
|
75
|
+
*
|
|
76
|
+
* Because the popup renders via a portal (outside the scrollable container),
|
|
77
|
+
* the container must be passed as `collisionBoundary` so Floating UI treats
|
|
78
|
+
* it as the clipping edge.
|
|
79
|
+
*
|
|
80
|
+
* - `side: 'flip'` flips to the opposite side (default).
|
|
81
|
+
* - `side: 'none'` disables collision handling.
|
|
82
|
+
*
|
|
83
|
+
* Scroll the container to see collision avoidance in action.
|
|
84
|
+
*/
|
|
85
|
+
export declare const CollisionAvoidance: Story;
|
|
86
|
+
/**
|
|
87
|
+
* When the popover's trigger lives inside an iframe but the popover should
|
|
88
|
+
* render in the parent document, pass a parent-document element to the
|
|
89
|
+
* `container` prop on `Popover.Popup`.
|
|
90
|
+
*
|
|
91
|
+
* This technique is used in Gutenberg where the block editor canvas is an
|
|
92
|
+
* iframe but toolbars and menus must appear outside it.
|
|
93
|
+
*
|
|
94
|
+
* Scroll inside the iframe to verify that the popover tracks the trigger
|
|
95
|
+
* position across document boundaries.
|
|
96
|
+
*/
|
|
97
|
+
export declare const CrossIframe: Story;
|
|
98
|
+
/**
|
|
99
|
+
* Same cross-iframe scenario, but using `SlotFillProvider` and `Slot` from
|
|
100
|
+
* `@wordpress/components` as the render target.
|
|
101
|
+
*
|
|
102
|
+
* The `Slot` renders a `div` in the parent document, and its forwarded ref
|
|
103
|
+
* is passed to `Popover.Popup`'s `container` prop so the popup portals into
|
|
104
|
+
* the slot element. This mirrors the legacy Popover's `WithSlotOutsideIframe`
|
|
105
|
+
* pattern.
|
|
106
|
+
*/
|
|
107
|
+
export declare const CrossIframeWithSlotFill: Story;
|
|
108
|
+
/**
|
|
109
|
+
* Popovers in Gutenberg are managed with explicit z-index values, which can
|
|
110
|
+
* create situations where a popover renders below another popover, when you
|
|
111
|
+
* want it to be rendered above.
|
|
112
|
+
*
|
|
113
|
+
* The `--wp-ui-popover-z-index` CSS variable, available on the
|
|
114
|
+
* `Popover.Popup` component, is an escape hatch that can be used to override
|
|
115
|
+
* the z-index of a given popover on a case-by-case basis.
|
|
116
|
+
*/
|
|
117
|
+
export declare const WithCustomZIndex: Story;
|
|
118
|
+
/**
|
|
119
|
+
* Use the `anchor` prop on `Popover.Popup` to position the popover against an
|
|
120
|
+
* arbitrary element instead of the built-in trigger. Base UI accepts four
|
|
121
|
+
* anchor types:
|
|
122
|
+
*
|
|
123
|
+
* 1. **Element** — a direct DOM element reference.
|
|
124
|
+
* 2. **VirtualElement** — an object with a `getBoundingClientRect()` method.
|
|
125
|
+
* 3. **RefObject** — a `React.RefObject` pointing to an element.
|
|
126
|
+
* 4. **Callback** — a function returning an Element or VirtualElement.
|
|
127
|
+
*
|
|
128
|
+
* This is the most-used pattern in Gutenberg: block popovers anchor to
|
|
129
|
+
* selected block elements, the link popover anchors to the text selection, and
|
|
130
|
+
* data views anchor to right-click positions.
|
|
131
|
+
*/
|
|
132
|
+
export declare const Anchor: Story;
|
|
133
|
+
/**
|
|
134
|
+
* Use `variant="unstyled"` and custom inline styles to replicate a toolbar-like
|
|
135
|
+
* appearance: high-contrast border, no shadow, and a smaller border radius.
|
|
136
|
+
*
|
|
137
|
+
* A first-class `variant="toolbar"` may be added in the future if this pattern
|
|
138
|
+
* becomes widespread.
|
|
139
|
+
*/
|
|
140
|
+
export declare const ToolbarVariant: Story;
|
|
141
|
+
/**
|
|
142
|
+
* Base UI's Positioner exposes `--available-height` and
|
|
143
|
+
* `--available-width` CSS variables representing the space
|
|
144
|
+
* between the anchor and the viewport edge. Apply them as `max-height` /
|
|
145
|
+
* `max-width` via the `style` prop (which targets the positioner) to
|
|
146
|
+
* constrain the popup size. Then add `overflow: auto` on an inner wrapper
|
|
147
|
+
* so scrolling happens inside the popup content area — this replaces the
|
|
148
|
+
* legacy Popover's `resize` prop.
|
|
149
|
+
*
|
|
150
|
+
* Open the popover and resize or scroll the container to see the popup shrink
|
|
151
|
+
* to fit.
|
|
152
|
+
*/
|
|
153
|
+
export declare const ViewportConstrainedSize: Story;
|
|
154
|
+
/**
|
|
155
|
+
* The `onOpenChange` callback on `Popover.Root` receives an `eventDetails`
|
|
156
|
+
* object with a `reason` field that describes why the popover is
|
|
157
|
+
* opening/closing. This replaces the legacy Popover's separate `onClose` and
|
|
158
|
+
* `onFocusOutside` callbacks:
|
|
159
|
+
*
|
|
160
|
+
* - `reason === 'escape-key'` — user pressed Escape (was `onClose`)
|
|
161
|
+
* - `reason === 'outside-press'` — user clicked outside (was `onClose`)
|
|
162
|
+
* - `reason === 'focus-out'` — focus moved outside (was `onFocusOutside`)
|
|
163
|
+
*
|
|
164
|
+
* Open the popover, then dismiss it in different ways to see the logged reason.
|
|
165
|
+
*/
|
|
166
|
+
export declare const OnOpenChangeDetails: Story;
|
|
167
|
+
/**
|
|
168
|
+
* Pass a ref to `initialFocus` on `Popover.Popup` to focus a specific element
|
|
169
|
+
* when the popover opens. This replaces the legacy Popover's `focusOnMount`
|
|
170
|
+
* prop.
|
|
171
|
+
*
|
|
172
|
+
* In this example, the Email field receives focus instead of the first
|
|
173
|
+
* focusable element (Name).
|
|
174
|
+
*/
|
|
175
|
+
export declare const InitialFocus: Story;
|
|
176
|
+
/**
|
|
177
|
+
* Set `modal="trap-focus"` on `Popover.Root` to trap keyboard focus inside the
|
|
178
|
+
* popover without making it fully modal. Unlike `modal={true}`, this mode:
|
|
179
|
+
*
|
|
180
|
+
* - Traps Tab/Shift+Tab cycling within the popover
|
|
181
|
+
* - Does **not** lock page scroll
|
|
182
|
+
* - Does **not** block pointer interaction outside
|
|
183
|
+
*
|
|
184
|
+
* A `Popover.Close` part must be rendered inside the popup so that screen
|
|
185
|
+
* readers can escape. It can be visually hidden if not needed visually.
|
|
186
|
+
*
|
|
187
|
+
* This replaces the legacy Popover's `constrainTabbing` prop. Try tabbing
|
|
188
|
+
* through the fields — focus stays inside — then click the button outside
|
|
189
|
+
* to verify that pointer interaction still works.
|
|
190
|
+
*/
|
|
191
|
+
export declare const TrapFocus: Story;
|
|
192
|
+
/**
|
|
193
|
+
* Set `openOnHover` on `Popover.Trigger` to open the popover when the trigger
|
|
194
|
+
* is hovered. The `delay` and `closeDelay` props control the timing (in ms).
|
|
195
|
+
*
|
|
196
|
+
* This is a capability the legacy Popover does not have natively — consumers
|
|
197
|
+
* would need to wire up `mouseenter`/`mouseleave` handlers manually.
|
|
198
|
+
*/
|
|
199
|
+
export declare const HoverTrigger: Story;
|
|
200
|
+
/**
|
|
201
|
+
* Popups that open when hovering an info icon should use Popover with the
|
|
202
|
+
* `openOnHover` prop on the trigger instead of a tooltip. This way, touch
|
|
203
|
+
* users and screen reader users can access the content.
|
|
204
|
+
*
|
|
205
|
+
* To know when to reach for a popover instead of a tooltip, consider the
|
|
206
|
+
* purpose of the trigger element: If the trigger's purpose is to open the
|
|
207
|
+
* popup itself, it's a popover. If the trigger's purpose is unrelated to
|
|
208
|
+
* opening the popup, it's a tooltip.
|
|
209
|
+
*/
|
|
210
|
+
export declare const Infotip: Story;
|
|
211
|
+
//# sourceMappingURL=index.story.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/popover/stories/index.story.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAI5D,OAAO,EAAE,OAAO,EAAkB,MAAM,OAAO,CAAC;AAKhD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,OAAO,CAAC,IAAI,CAcpC,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAE,OAAO,OAAO,CAAC,IAAI,CAAE,CAAC;AAE7C,eAAO,MAAM,OAAO,EAAE,KAwBrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,KAoBrB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,WAAW,EAAE,KA4CzB,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,KAoC7B,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,EAAE,KA4ExB,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,KAAK,EAAE,KAkFnB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,KAqBtB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,EAAE,KA+C9B,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,MAAM,EAAE,KA+BpB,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAwEhC,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,EAAE,KAyEzB,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,EAAE,KA6ErC,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAuB9B,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,MAAM,EAAE,KA0HpB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,EAAE,KA4B5B,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,uBAAuB,EAAE,KAkDrC,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAoDjC,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,EAAE,KAiE1B,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,SAAS,EAAE,KAiDvB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,EAAE,KAyB1B,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,OAAO,EAAE,KA6CrB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { RefCallback } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Tracks the dimensions of a DOM element via ResizeObserver.
|
|
4
|
+
* Returns a ref callback to attach to the element and its current size.
|
|
5
|
+
*
|
|
6
|
+
* The ref callback performs a synchronous `getBoundingClientRect` read so
|
|
7
|
+
* the first render already has accurate dimensions (avoids a 0×0 flash).
|
|
8
|
+
*/
|
|
9
|
+
export declare function useMeasure<TRef extends HTMLElement>(): readonly [RefCallback<TRef>, {
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
}];
|
|
13
|
+
/**
|
|
14
|
+
* Renders an iframe and portals its `children` into the iframe's body.
|
|
15
|
+
* Forwards a ref to the underlying `<iframe>` element.
|
|
16
|
+
*
|
|
17
|
+
* Waits for the iframe's `load` event before portaling to ensure
|
|
18
|
+
* compatibility with Firefox.
|
|
19
|
+
* See https://github.com/facebook/react/issues/22847#issuecomment-991394558
|
|
20
|
+
*/
|
|
21
|
+
export declare const GenericIframe: import("react").ForwardRefExoticComponent<Omit<GenericIframeProps, "ref"> & import("react").RefAttributes<HTMLIFrameElement>>;
|
|
22
|
+
export type GenericIframeProps = React.ComponentProps<'iframe'> & {
|
|
23
|
+
children: React.ReactNode;
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/popover/stories/utils.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEzC;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAE,IAAI,SAAS,WAAW;;;GAgCnD;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,+HA0BvB,CAAC;AAEJ,MAAM,MAAM,kBAAkB,GAAG,KAAK,CAAC,cAAc,CAAE,QAAQ,CAAE,GAAG;IACnE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../../src/popover/test/index.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { TitleProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Renders a heading that labels the popover for accessibility.
|
|
4
|
+
*
|
|
5
|
+
* **Required** — every popover must include a `Popover.Title`, even if
|
|
6
|
+
* visually hidden. The rendered element is linked to the popup via
|
|
7
|
+
* `aria-labelledby`. Uses the `heading-xl` text variant, matching Dialog.
|
|
8
|
+
*
|
|
9
|
+
* To visually hide the title while keeping it accessible, wrap it with
|
|
10
|
+
* `VisuallyHidden` using the `render` prop:
|
|
11
|
+
*
|
|
12
|
+
* ```jsx
|
|
13
|
+
* <VisuallyHidden render={ <Popover.Title /> }>
|
|
14
|
+
* Accessible title text
|
|
15
|
+
* </VisuallyHidden>
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
declare const Title: import("react").ForwardRefExoticComponent<TitleProps & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
19
|
+
export { Title };
|
|
20
|
+
//# sourceMappingURL=title.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"title.d.ts","sourceRoot":"","sources":["../../src/popover/title.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C;;;;;;;;;;;;;;;GAeG;AACH,QAAA,MAAM,KAAK,2GAqBV,CAAC;AAEF,OAAO,EAAE,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { TriggerProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Renders a button that toggles the popover popup when clicked.
|
|
4
|
+
*
|
|
5
|
+
* Renders as a `<button>` by default. Also supports hover-triggered
|
|
6
|
+
* popovers via the `openOnHover`, `delay`, and `closeDelay` props.
|
|
7
|
+
*/
|
|
8
|
+
declare const Trigger: import("react").ForwardRefExoticComponent<TriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
export { Trigger };
|
|
10
|
+
//# sourceMappingURL=trigger.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trigger.d.ts","sourceRoot":"","sources":["../../src/popover/trigger.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C;;;;;GAKG;AACH,QAAA,MAAM,OAAO,4GAIZ,CAAC;AAEF,OAAO,EAAE,OAAO,EAAE,CAAC"}
|