prime-ui-kit 0.5.1 → 0.7.1
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/README.md +11 -2
- package/dist/components/accordion/examples/02-settings-panels.d.ts.map +1 -1
- package/dist/components/accordion/examples/04-api-docs-sections.d.ts.map +1 -1
- package/dist/components/accordion/examples/05-knowledge-base-categories.d.ts.map +1 -1
- package/dist/components/avatar/examples/app-header-nav.d.ts.map +1 -1
- package/dist/components/avatar/examples/src-from-state.d.ts.map +1 -1
- package/dist/components/banner/examples/cookie-consent-row.d.ts.map +1 -1
- package/dist/components/banner/examples/feature-promo.d.ts.map +1 -1
- package/dist/components/checkbox/examples/bulk-select-rows.d.ts.map +1 -1
- package/dist/components/checkbox/examples/empty-label-form.d.ts.map +1 -1
- package/dist/components/checkbox/examples/feature-flags-list.d.ts.map +1 -1
- package/dist/components/checkbox/examples/settings-panel.d.ts.map +1 -1
- package/dist/components/color-picker/ColorPicker.d.ts.map +1 -1
- package/dist/components/color-picker/ColorPickerRac.d.ts.map +1 -1
- package/dist/components/color-picker/examples/controlled-form-field.d.ts.map +1 -1
- package/dist/components/color-picker/examples/theme-accent.d.ts.map +1 -1
- package/dist/components/command-menu/examples/composition-tags-footer.d.ts.map +1 -1
- package/dist/components/command-menu/examples/variants-density-items.d.ts.map +1 -1
- package/dist/components/datepicker/examples/full-width-form.d.ts.map +1 -1
- package/dist/components/digit-input/examples/error-state.d.ts.map +1 -1
- package/dist/components/digit-input/examples/resend-and-clear.d.ts.map +1 -1
- package/dist/components/divider/examples/section-breaks.d.ts.map +1 -1
- package/dist/components/dropdown/Dropdown.d.ts +0 -14
- package/dist/components/dropdown/Dropdown.d.ts.map +1 -1
- package/dist/components/dropdown/examples/account-menu.d.ts.map +1 -1
- package/dist/components/dropdown/examples/actions-menu.d.ts.map +1 -1
- package/dist/components/dropdown/examples/full-width.d.ts.map +1 -1
- package/dist/components/empty-page/EmptyPage.d.ts +63 -0
- package/dist/components/empty-page/EmptyPage.d.ts.map +1 -0
- package/dist/components/empty-page/examples/canonical.d.ts +3 -0
- package/dist/components/empty-page/examples/canonical.d.ts.map +1 -0
- package/dist/components/empty-page/examples/sizes.d.ts +3 -0
- package/dist/components/empty-page/examples/sizes.d.ts.map +1 -0
- package/dist/components/empty-page/examples/table-region.d.ts +6 -0
- package/dist/components/empty-page/examples/table-region.d.ts.map +1 -0
- package/dist/components/hint/examples/a11y-describedby.d.ts.map +1 -1
- package/dist/components/hint/examples/error-hint.d.ts.map +1 -1
- package/dist/components/hint/examples/field-help.d.ts.map +1 -1
- package/dist/components/hint/examples/field-states.d.ts.map +1 -1
- package/dist/components/hint/examples/inline-tip-form.d.ts.map +1 -1
- package/dist/components/hint/examples/success-confirmation.d.ts.map +1 -1
- package/dist/components/hint/examples/variants.d.ts.map +1 -1
- package/dist/components/index.css +278 -115
- package/dist/components/index.css.map +4 -4
- package/dist/components/index.d.ts +3 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +376 -356
- package/dist/components/index.js.map +4 -4
- package/dist/components/input/examples/login-email.d.ts.map +1 -1
- package/dist/components/input/examples/search.d.ts.map +1 -1
- package/dist/components/link-button/examples/disabled.d.ts.map +1 -1
- package/dist/components/link-button/examples/external.d.ts.map +1 -1
- package/dist/components/link-button/examples/inline-text-link.d.ts.map +1 -1
- package/dist/components/link-button/examples/navigation-cluster.d.ts.map +1 -1
- package/dist/components/modal/examples/pattern-controlled.d.ts.map +1 -1
- package/dist/components/modal/examples/pattern-portal-and-scroll.d.ts.map +1 -1
- package/dist/components/modal/examples/scenario-multi-field-form.d.ts.map +1 -1
- package/dist/components/notification/examples/action-toast.d.ts.map +1 -1
- package/dist/components/notification/examples/error-success.d.ts.map +1 -1
- package/dist/components/popover/Popover.d.ts +3 -3
- package/dist/components/popover/Popover.d.ts.map +1 -1
- package/dist/components/popover/examples/composition.d.ts +1 -1
- package/dist/components/popover/examples/date-trigger.d.ts.map +1 -1
- package/dist/components/popover/examples/features.d.ts.map +1 -1
- package/dist/components/popover/examples/form-in-popover.d.ts.map +1 -1
- package/dist/components/popover/examples/full-width.d.ts.map +1 -1
- package/dist/components/popover/examples/placement.d.ts.map +1 -1
- package/dist/components/popover/examples/rich-content.d.ts.map +1 -1
- package/dist/components/popover/examples/sizes.d.ts +1 -1
- package/dist/components/progress-bar/examples/step-progress.d.ts.map +1 -1
- package/dist/components/progress-circle/examples/dashboard-ring.d.ts.map +1 -1
- package/dist/components/progress-circle/examples/states.d.ts.map +1 -1
- package/dist/components/radio/examples/plan-picker.d.ts.map +1 -1
- package/dist/components/segmented-control/examples/pricing-toggle.d.ts.map +1 -1
- package/dist/components/segmented-control/examples/view-mode.d.ts.map +1 -1
- package/dist/components/select/examples/01-country.d.ts.map +1 -1
- package/dist/components/select/examples/02-controlled.d.ts.map +1 -1
- package/dist/components/select/examples/03-groups.d.ts.map +1 -1
- package/dist/components/select/examples/04-full-width-form.d.ts.map +1 -1
- package/dist/components/switch/examples/composition.d.ts.map +1 -1
- package/dist/components/switch/examples/scenario-feature-flag.d.ts.map +1 -1
- package/dist/components/tabs/examples/01-settings-vertical-rail.d.ts.map +1 -1
- package/dist/components/tag/examples/controlled.d.ts.map +1 -1
- package/dist/components/textarea/examples/01-support-ticket.d.ts.map +1 -1
- package/dist/components/textarea/examples/02-comment.d.ts.map +1 -1
- package/dist/components/textarea/examples/controlled.d.ts.map +1 -1
- package/dist/components/textarea/examples/features.d.ts.map +1 -1
- package/dist/components/tooltip/examples/composition.d.ts.map +1 -1
- package/dist/index.css +278 -115
- package/dist/index.css.map +4 -4
- package/dist/index.js +378 -357
- package/dist/index.js.map +4 -4
- package/dist/internal/states.d.ts +2 -0
- package/dist/internal/states.d.ts.map +1 -1
- package/dist/layout/app-shell/AppShell.d.ts +0 -8
- package/dist/layout/app-shell/AppShell.d.ts.map +1 -1
- package/dist/layout/index.d.ts +1 -1
- package/dist/layout/index.d.ts.map +1 -1
- package/dist/layout/sidebar/examples/01-app-shell-nav.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/accordion/COMPONENT.md +1 -1
- package/src/components/accordion/examples/01-faq-marketing.tsx +1 -1
- package/src/components/accordion/examples/02-settings-panels.tsx +1 -6
- package/src/components/accordion/examples/03-checkout-order-summary.tsx +1 -1
- package/src/components/accordion/examples/04-api-docs-sections.tsx +0 -1
- package/src/components/accordion/examples/05-knowledge-base-categories.tsx +1 -7
- package/src/components/avatar/COMPONENT.md +2 -2
- package/src/components/avatar/examples/app-header-nav.tsx +5 -13
- package/src/components/avatar/examples/comment-thread.tsx +1 -1
- package/src/components/avatar/examples/src-from-state.tsx +0 -1
- package/src/components/badge/examples/admin-tags.tsx +6 -6
- package/src/components/badge/examples/ecommerce-inventory.tsx +5 -5
- package/src/components/badge/examples/inbox-labels.tsx +5 -5
- package/src/components/badge/examples/status-presence.tsx +4 -4
- package/src/components/banner/examples/controlled-visibility.tsx +1 -1
- package/src/components/banner/examples/cookie-consent-row.tsx +0 -1
- package/src/components/banner/examples/feature-promo.tsx +0 -1
- package/src/components/button/examples/canonical-composition.tsx +4 -4
- package/src/components/button/examples/destructive-confirm.tsx +3 -3
- package/src/components/button/examples/form-submit-row.tsx +2 -2
- package/src/components/button/examples/full-width-stack.tsx +2 -2
- package/src/components/button/examples/icon-composition.tsx +6 -6
- package/src/components/button/examples/toolbar.tsx +4 -4
- package/src/components/button-group/COMPONENT.md +1 -1
- package/src/components/button-group/examples/editor-toolbar.tsx +1 -1
- package/src/components/button-group/examples/form-footer.tsx +1 -1
- package/src/components/button-group/examples/full-width.tsx +1 -1
- package/src/components/button-group/examples/view-switcher.tsx +1 -1
- package/src/components/button-group/examples/wizard-actions.tsx +1 -1
- package/src/components/checkbox/examples/bulk-select-rows.tsx +0 -2
- package/src/components/checkbox/examples/empty-label-form.tsx +1 -2
- package/src/components/checkbox/examples/feature-flags-list.tsx +0 -1
- package/src/components/checkbox/examples/settings-panel.tsx +1 -4
- package/src/components/color-picker/COMPONENT.md +2 -2
- package/src/components/color-picker/examples/brand-kit.tsx +3 -3
- package/src/components/color-picker/examples/controlled-form-field.tsx +4 -6
- package/src/components/color-picker/examples/field-eyedropper.tsx +2 -2
- package/src/components/color-picker/examples/format-variants.tsx +2 -2
- package/src/components/color-picker/examples/full-width.tsx +2 -2
- package/src/components/color-picker/examples/minimal-popover.tsx +2 -2
- package/src/components/color-picker/examples/panel-placement.tsx +4 -4
- package/src/components/color-picker/examples/product-variant-swatch.tsx +2 -2
- package/src/components/color-picker/examples/readout-trigger.tsx +2 -2
- package/src/components/color-picker/examples/states.tsx +4 -4
- package/src/components/color-picker/examples/theme-accent.tsx +2 -7
- package/src/components/command-menu/examples/app-palette.tsx +1 -1
- package/src/components/command-menu/examples/composition-tags-footer.tsx +2 -7
- package/src/components/command-menu/examples/controlled-open-search.tsx +1 -1
- package/src/components/command-menu/examples/disabled-items.tsx +1 -1
- package/src/components/command-menu/examples/file-search.tsx +1 -1
- package/src/components/command-menu/examples/full-width-panel.tsx +1 -1
- package/src/components/command-menu/examples/item-icon-as.tsx +1 -1
- package/src/components/command-menu/examples/quick-actions.tsx +1 -1
- package/src/components/command-menu/examples/variants-density-items.tsx +2 -4
- package/src/components/data-table/COMPONENT.md +2 -0
- package/src/components/datepicker/examples/birthdate.tsx +2 -2
- package/src/components/datepicker/examples/booking.tsx +2 -2
- package/src/components/datepicker/examples/full-width-form.tsx +3 -10
- package/src/components/datepicker/examples/range-report.tsx +2 -2
- package/src/components/digit-input/examples/composition.tsx +3 -3
- package/src/components/digit-input/examples/error-state.tsx +3 -5
- package/src/components/digit-input/examples/otp-login.tsx +3 -3
- package/src/components/digit-input/examples/resend-and-clear.tsx +3 -9
- package/src/components/digit-input/examples/verification-step.tsx +4 -4
- package/src/components/divider/examples/card-splits.tsx +2 -2
- package/src/components/divider/examples/inset-stack.tsx +1 -1
- package/src/components/divider/examples/line-spacing-column.tsx +3 -3
- package/src/components/divider/examples/section-breaks.tsx +2 -6
- package/src/components/drawer/COMPONENT.md +1 -1
- package/src/components/drawer/examples/cart-preview.tsx +4 -4
- package/src/components/drawer/examples/explicit-panel.tsx +3 -3
- package/src/components/drawer/examples/filters-panel.tsx +7 -7
- package/src/components/drawer/examples/mobile-nav-sheet.tsx +3 -3
- package/src/components/drawer/examples/settings-side.tsx +6 -6
- package/src/components/dropdown/COMPONENT.md +5 -18
- package/src/components/dropdown/examples/account-menu.tsx +31 -33
- package/src/components/dropdown/examples/actions-menu.tsx +0 -1
- package/src/components/dropdown/examples/composition.tsx +1 -1
- package/src/components/dropdown/examples/controlled.tsx +1 -1
- package/src/components/dropdown/examples/dropdown-examples.module.css +0 -4
- package/src/components/dropdown/examples/full-width.tsx +0 -1
- package/src/components/dropdown/examples/select-like-list.tsx +1 -1
- package/src/components/dropdown/examples/states.tsx +1 -1
- package/src/components/dropdown/examples/variants.tsx +1 -1
- package/src/components/empty-page/COMPONENT.md +143 -0
- package/src/components/empty-page/examples/canonical.tsx +22 -0
- package/src/components/empty-page/examples/examples-demos.module.css +25 -0
- package/src/components/empty-page/examples/sizes.tsx +23 -0
- package/src/components/empty-page/examples/table-region.tsx +35 -0
- package/src/components/file-upload/examples/full-width.tsx +1 -1
- package/src/components/hint/examples/a11y-describedby.tsx +2 -4
- package/src/components/hint/examples/controlled-variant.tsx +1 -1
- package/src/components/hint/examples/error-hint.tsx +3 -5
- package/src/components/hint/examples/field-help.tsx +3 -5
- package/src/components/hint/examples/field-states.tsx +9 -19
- package/src/components/hint/examples/inline-tip-form.tsx +6 -10
- package/src/components/hint/examples/success-confirmation.tsx +3 -5
- package/src/components/hint/examples/variants.tsx +3 -9
- package/src/components/hint/examples/with-icon.tsx +1 -1
- package/src/components/input/examples/affix-url-and-amount.tsx +2 -2
- package/src/components/input/examples/checkout-full-width.tsx +2 -2
- package/src/components/input/examples/login-email.tsx +1 -5
- package/src/components/input/examples/password-with-hint.tsx +1 -1
- package/src/components/input/examples/search.tsx +0 -1
- package/src/components/kbd/examples/composition-chord-icon.tsx +1 -1
- package/src/components/kbd/examples/toolbar-hints.tsx +2 -2
- package/src/components/label/examples/with-icon.tsx +1 -1
- package/src/components/link-button/COMPONENT.md +1 -1
- package/src/components/link-button/examples/composition.tsx +3 -3
- package/src/components/link-button/examples/disabled.tsx +2 -4
- package/src/components/link-button/examples/external.tsx +1 -6
- package/src/components/link-button/examples/inline-text-link.tsx +2 -4
- package/src/components/link-button/examples/navigation-cluster.tsx +4 -12
- package/src/components/modal/COMPONENT.md +4 -4
- package/src/components/modal/examples/canonical-maximal.tsx +4 -4
- package/src/components/modal/examples/pattern-close-behavior.tsx +3 -3
- package/src/components/modal/examples/pattern-controlled.tsx +3 -5
- package/src/components/modal/examples/pattern-full-width-footer.tsx +3 -3
- package/src/components/modal/examples/pattern-portal-and-scroll.tsx +3 -5
- package/src/components/modal/examples/scenario-confirm-delete.tsx +3 -3
- package/src/components/modal/examples/scenario-edit-entity.tsx +4 -4
- package/src/components/modal/examples/scenario-legal-consent.tsx +2 -2
- package/src/components/modal/examples/scenario-multi-field-form.tsx +7 -13
- package/src/components/notification/examples/action-toast.tsx +0 -2
- package/src/components/notification/examples/error-success.tsx +0 -2
- package/src/components/page-content/COMPONENT.md +10 -5
- package/src/components/popover/COMPONENT.md +1 -1
- package/src/components/popover/examples/as-child.tsx +1 -1
- package/src/components/popover/examples/canonical-panel.tsx +2 -2
- package/src/components/popover/examples/composition.tsx +7 -7
- package/src/components/popover/examples/controlled.tsx +4 -4
- package/src/components/popover/examples/date-trigger.tsx +3 -10
- package/src/components/popover/examples/features.tsx +6 -13
- package/src/components/popover/examples/form-in-popover.tsx +5 -13
- package/src/components/popover/examples/full-width.tsx +2 -9
- package/src/components/popover/examples/inset-variants.tsx +6 -6
- package/src/components/popover/examples/placement.tsx +2 -7
- package/src/components/popover/examples/rich-content.tsx +6 -8
- package/src/components/popover/examples/sizes.tsx +5 -5
- package/src/components/popover/examples/states.tsx +4 -4
- package/src/components/progress-bar/examples/indeterminate-busy-state.tsx +1 -1
- package/src/components/progress-bar/examples/step-progress.tsx +0 -1
- package/src/components/progress-bar/examples/upload-progress.tsx +1 -1
- package/src/components/progress-bar/examples/wizard-composition.tsx +1 -1
- package/src/components/progress-circle/examples/a11y-label.tsx +1 -1
- package/src/components/progress-circle/examples/composition.tsx +2 -2
- package/src/components/progress-circle/examples/dashboard-ring.tsx +1 -6
- package/src/components/progress-circle/examples/max-scale.tsx +3 -3
- package/src/components/progress-circle/examples/states.tsx +5 -13
- package/src/components/radio/examples/notification-channel.tsx +3 -3
- package/src/components/radio/examples/plan-picker.tsx +0 -3
- package/src/components/radio/examples/settings-group.tsx +4 -4
- package/src/components/radio/examples/shipping-method.tsx +3 -3
- package/src/components/segmented-control/examples/canonical-composition.tsx +7 -7
- package/src/components/segmented-control/examples/composition.tsx +7 -7
- package/src/components/segmented-control/examples/features.tsx +3 -3
- package/src/components/segmented-control/examples/full-width.tsx +1 -1
- package/src/components/segmented-control/examples/pricing-toggle.tsx +0 -1
- package/src/components/segmented-control/examples/states.tsx +3 -3
- package/src/components/segmented-control/examples/view-mode.tsx +0 -1
- package/src/components/segmented-progress-bar/examples/size-ladder.tsx +1 -1
- package/src/components/select/COMPONENT.md +3 -3
- package/src/components/select/examples/01-country.tsx +2 -4
- package/src/components/select/examples/02-controlled.tsx +2 -4
- package/src/components/select/examples/03-groups.tsx +2 -4
- package/src/components/select/examples/04-full-width-form.tsx +4 -8
- package/src/components/select/examples/pattern-composition.tsx +1 -1
- package/src/components/select/examples/pattern-controlled.tsx +1 -1
- package/src/components/select/examples/pattern-features.tsx +1 -1
- package/src/components/select/examples/pattern-full-width.tsx +1 -1
- package/src/components/select/examples/pattern-native.tsx +1 -1
- package/src/components/select/examples/pattern-states.tsx +4 -4
- package/src/components/slider/COMPONENT.md +1 -1
- package/src/components/stepper/COMPONENT.md +1 -1
- package/src/components/stepper/examples/01-checkout-horizontal.tsx +1 -1
- package/src/components/stepper/examples/02-onboarding-vertical.tsx +1 -1
- package/src/components/stepper/examples/03-vertical-primitive-rail.tsx +1 -1
- package/src/components/stepper/examples/04-checkout-step-error.tsx +1 -1
- package/src/components/stepper/examples/05-horizontal-primitive.tsx +1 -1
- package/src/components/switch/COMPONENT.md +1 -1
- package/src/components/switch/examples/canonical-maximal.tsx +1 -1
- package/src/components/switch/examples/composition.tsx +1 -2
- package/src/components/switch/examples/controlled.tsx +1 -1
- package/src/components/switch/examples/full-width.tsx +1 -1
- package/src/components/switch/examples/scenario-billing-annual.tsx +1 -1
- package/src/components/switch/examples/scenario-feature-flag.tsx +1 -6
- package/src/components/switch/examples/scenario-settings-toggle.tsx +3 -3
- package/src/components/switch/examples/states.tsx +6 -6
- package/src/components/switch/examples/variants.tsx +2 -2
- package/src/components/tabs/COMPONENT.md +1 -1
- package/src/components/tabs/examples/01-settings-vertical-rail.tsx +1 -6
- package/src/components/tag/COMPONENT.md +1 -1
- package/src/components/tag/examples/01-filter-chips.tsx +1 -1
- package/src/components/tag/examples/02-removable-selected-values.tsx +1 -1
- package/src/components/tag/examples/03-status-metadata.tsx +3 -3
- package/src/components/tag/examples/controlled.tsx +1 -6
- package/src/components/tag/examples/removable.tsx +1 -1
- package/src/components/textarea/examples/01-support-ticket.tsx +0 -1
- package/src/components/textarea/examples/02-comment.tsx +1 -2
- package/src/components/textarea/examples/composition.tsx +2 -2
- package/src/components/textarea/examples/controlled.tsx +0 -1
- package/src/components/textarea/examples/features.tsx +3 -12
- package/src/components/textarea/examples/full-width.tsx +1 -1
- package/src/components/textarea/examples/states.tsx +4 -4
- package/src/components/textarea/examples/variants.tsx +2 -2
- package/src/components/tooltip/COMPONENT.md +0 -1
- package/src/components/tooltip/examples/canonical-icon-hint.tsx +1 -1
- package/src/components/tooltip/examples/composition.tsx +3 -9
- package/src/components/tooltip/examples/controlled.tsx +2 -2
- package/src/components/tooltip/examples/delay.tsx +1 -1
- package/src/components/tooltip/examples/long-content.tsx +2 -2
- package/src/components/tooltip/examples/side.tsx +4 -4
- package/src/components/tooltip/examples/states.tsx +2 -2
- package/src/components/tooltip/examples/surfaces.tsx +2 -2
- package/src/layout/app-shell/COMPONENT.md +77 -27
- package/src/layout/sidebar/COMPONENT.md +1 -1
- package/src/layout/sidebar/examples/01-app-shell-nav.tsx +11 -13
- package/src/layout/sidebar/examples/examples.module.css +0 -10
- package/dist/components/dropdown/examples/inset.d.ts +0 -3
- package/dist/components/dropdown/examples/inset.d.ts.map +0 -1
- package/src/components/dropdown/examples/inset.tsx +0 -51
|
@@ -36,7 +36,7 @@ export default function ModalPatternPortalAndScrollExample() {
|
|
|
36
36
|
{portalHost ? (
|
|
37
37
|
<Modal.Root>
|
|
38
38
|
<Modal.Trigger>
|
|
39
|
-
<Button.Root
|
|
39
|
+
<Button.Root variant="neutral" mode="stroke">
|
|
40
40
|
Portal into host
|
|
41
41
|
</Button.Root>
|
|
42
42
|
</Modal.Trigger>
|
|
@@ -54,7 +54,7 @@ export default function ModalPatternPortalAndScrollExample() {
|
|
|
54
54
|
|
|
55
55
|
<Modal.Root>
|
|
56
56
|
<Modal.Trigger>
|
|
57
|
-
<Button.Root
|
|
57
|
+
<Button.Root variant="neutral" mode="stroke">
|
|
58
58
|
Long body (scroll)
|
|
59
59
|
</Button.Root>
|
|
60
60
|
</Modal.Trigger>
|
|
@@ -64,9 +64,7 @@ export default function ModalPatternPortalAndScrollExample() {
|
|
|
64
64
|
description="Cap the body height with `bodyStyle` (or `bodyClassName`) so only the panel scrolls."
|
|
65
65
|
footer={
|
|
66
66
|
<Modal.Close>
|
|
67
|
-
<Button.Root
|
|
68
|
-
Close
|
|
69
|
-
</Button.Root>
|
|
67
|
+
<Button.Root variant="primary">Close</Button.Root>
|
|
70
68
|
</Modal.Close>
|
|
71
69
|
}
|
|
72
70
|
icon={<Icon name="nav.itemDot" />}
|
|
@@ -8,7 +8,7 @@ export default function ModalConfirmDeleteExample() {
|
|
|
8
8
|
return (
|
|
9
9
|
<Modal.Root>
|
|
10
10
|
<Modal.Trigger>
|
|
11
|
-
<Button.Root
|
|
11
|
+
<Button.Root variant="error" mode="stroke">
|
|
12
12
|
Delete project
|
|
13
13
|
</Button.Root>
|
|
14
14
|
</Modal.Trigger>
|
|
@@ -17,11 +17,11 @@ export default function ModalConfirmDeleteExample() {
|
|
|
17
17
|
footer={
|
|
18
18
|
<>
|
|
19
19
|
<Modal.Close>
|
|
20
|
-
<Button.Root
|
|
20
|
+
<Button.Root variant="neutral" mode="stroke">
|
|
21
21
|
Cancel
|
|
22
22
|
</Button.Root>
|
|
23
23
|
</Modal.Close>
|
|
24
|
-
<Button.Root
|
|
24
|
+
<Button.Root variant="error" type="button">
|
|
25
25
|
Delete permanently
|
|
26
26
|
</Button.Root>
|
|
27
27
|
</>
|
|
@@ -12,7 +12,7 @@ export default function ModalEditEntityExample() {
|
|
|
12
12
|
return (
|
|
13
13
|
<Modal.Root>
|
|
14
14
|
<Modal.Trigger>
|
|
15
|
-
<Button.Root
|
|
15
|
+
<Button.Root variant="neutral" mode="stroke">
|
|
16
16
|
Rename account
|
|
17
17
|
</Button.Root>
|
|
18
18
|
</Modal.Trigger>
|
|
@@ -21,12 +21,12 @@ export default function ModalEditEntityExample() {
|
|
|
21
21
|
footer={
|
|
22
22
|
<>
|
|
23
23
|
<Modal.Close>
|
|
24
|
-
<Button.Root
|
|
24
|
+
<Button.Root variant="neutral" mode="stroke">
|
|
25
25
|
Cancel
|
|
26
26
|
</Button.Root>
|
|
27
27
|
</Modal.Close>
|
|
28
28
|
<Modal.Close>
|
|
29
|
-
<Button.Root
|
|
29
|
+
<Button.Root variant="primary" type="button">
|
|
30
30
|
Save changes
|
|
31
31
|
</Button.Root>
|
|
32
32
|
</Modal.Close>
|
|
@@ -35,7 +35,7 @@ export default function ModalEditEntityExample() {
|
|
|
35
35
|
icon={<Icon name="nav.layoutGrid" tone="subtle" />}
|
|
36
36
|
title="Edit account name"
|
|
37
37
|
>
|
|
38
|
-
<Input.Root label="Account name"
|
|
38
|
+
<Input.Root label="Account name">
|
|
39
39
|
<Input.Wrapper>
|
|
40
40
|
<Input.Field
|
|
41
41
|
onChange={(e) => setName(e.target.value)}
|
|
@@ -8,7 +8,7 @@ export default function ModalLegalConsentExample() {
|
|
|
8
8
|
return (
|
|
9
9
|
<Modal.Root closeOnOverlayClick={false}>
|
|
10
10
|
<Modal.Trigger>
|
|
11
|
-
<Button.Root
|
|
11
|
+
<Button.Root variant="neutral" mode="stroke">
|
|
12
12
|
Review terms
|
|
13
13
|
</Button.Root>
|
|
14
14
|
</Modal.Trigger>
|
|
@@ -16,7 +16,7 @@ export default function ModalLegalConsentExample() {
|
|
|
16
16
|
description="Please read the following before continuing to use the service."
|
|
17
17
|
footer={
|
|
18
18
|
<Modal.Close>
|
|
19
|
-
<Button.Root
|
|
19
|
+
<Button.Root variant="primary" type="button">
|
|
20
20
|
I agree
|
|
21
21
|
</Button.Root>
|
|
22
22
|
</Modal.Close>
|
|
@@ -17,7 +17,7 @@ export default function ModalMultiFieldFormExample() {
|
|
|
17
17
|
return (
|
|
18
18
|
<Modal.Root>
|
|
19
19
|
<Modal.Trigger>
|
|
20
|
-
<Button.Root
|
|
20
|
+
<Button.Root variant="neutral" mode="stroke">
|
|
21
21
|
New support ticket
|
|
22
22
|
</Button.Root>
|
|
23
23
|
</Modal.Trigger>
|
|
@@ -26,11 +26,11 @@ export default function ModalMultiFieldFormExample() {
|
|
|
26
26
|
footer={
|
|
27
27
|
<>
|
|
28
28
|
<Modal.Close>
|
|
29
|
-
<Button.Root
|
|
29
|
+
<Button.Root variant="neutral" mode="stroke">
|
|
30
30
|
Cancel
|
|
31
31
|
</Button.Root>
|
|
32
32
|
</Modal.Close>
|
|
33
|
-
<Button.Root
|
|
33
|
+
<Button.Root variant="primary" type="submit" form="modal-ticket-form">
|
|
34
34
|
Submit ticket
|
|
35
35
|
</Button.Root>
|
|
36
36
|
</>
|
|
@@ -43,12 +43,12 @@ export default function ModalMultiFieldFormExample() {
|
|
|
43
43
|
id="modal-ticket-form"
|
|
44
44
|
onSubmit={(e) => e.preventDefault()}
|
|
45
45
|
>
|
|
46
|
-
<Input.Root label="Subject"
|
|
46
|
+
<Input.Root label="Subject">
|
|
47
47
|
<Input.Wrapper>
|
|
48
48
|
<Input.Field name="subject" placeholder="Short summary" />
|
|
49
49
|
</Input.Wrapper>
|
|
50
50
|
</Input.Root>
|
|
51
|
-
<Select.Root placeholder="Area"
|
|
51
|
+
<Select.Root placeholder="Area">
|
|
52
52
|
<Select.Trigger>
|
|
53
53
|
<Select.Value />
|
|
54
54
|
</Select.Trigger>
|
|
@@ -59,14 +59,8 @@ export default function ModalMultiFieldFormExample() {
|
|
|
59
59
|
</Select.Content>
|
|
60
60
|
</Select.Root>
|
|
61
61
|
<div className={styles.labeledControl}>
|
|
62
|
-
<Label.Root htmlFor={messageId}
|
|
63
|
-
|
|
64
|
-
</Label.Root>
|
|
65
|
-
<Textarea.Root
|
|
66
|
-
id={messageId}
|
|
67
|
-
placeholder="Steps, expected result, actual result"
|
|
68
|
-
size="m"
|
|
69
|
-
/>
|
|
62
|
+
<Label.Root htmlFor={messageId}>Message</Label.Root>
|
|
63
|
+
<Textarea.Root id={messageId} placeholder="Steps, expected result, actual result" />
|
|
70
64
|
</div>
|
|
71
65
|
</form>
|
|
72
66
|
</Modal.Panel>
|
|
@@ -36,7 +36,6 @@ function ActionToastDemo() {
|
|
|
36
36
|
type="button"
|
|
37
37
|
variant="primary"
|
|
38
38
|
mode="filled"
|
|
39
|
-
size="m"
|
|
40
39
|
onClick={() =>
|
|
41
40
|
notify({
|
|
42
41
|
type: "info",
|
|
@@ -58,7 +57,6 @@ function ActionToastDemo() {
|
|
|
58
57
|
</Button.Root>
|
|
59
58
|
<LinkButton.Root
|
|
60
59
|
href="#"
|
|
61
|
-
size="m"
|
|
62
60
|
onClick={(event) => {
|
|
63
61
|
event.preventDefault();
|
|
64
62
|
notify({
|
|
@@ -30,7 +30,6 @@ function ErrorSuccessDemo() {
|
|
|
30
30
|
type="button"
|
|
31
31
|
variant="error"
|
|
32
32
|
mode="lighter"
|
|
33
|
-
size="m"
|
|
34
33
|
onClick={() =>
|
|
35
34
|
notify({
|
|
36
35
|
type: "error",
|
|
@@ -45,7 +44,6 @@ function ErrorSuccessDemo() {
|
|
|
45
44
|
type="button"
|
|
46
45
|
variant="primary"
|
|
47
46
|
mode="filled"
|
|
48
|
-
size="m"
|
|
49
47
|
onClick={() =>
|
|
50
48
|
notify({
|
|
51
49
|
type: "success",
|
|
@@ -4,13 +4,17 @@
|
|
|
4
4
|
|
|
5
5
|
Семантические примитивы **контентной колонки**: **`PageContent.Section`** (регион страницы **`<section>`** без собственных внешних полей), **`PageContent.Root`** (обёртка страницы с опциональным **`maxWidth`**, **без** дублирующих полей к краю колонки), **`PageContent.Title`** → **`<h1>`**, **`PageContent.Description`** с **`measure`**, **`PageContent.Body`**. Типографика — токены кита.
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
- **`PageContent.Root`** — когда нужен **`maxWidth`** (`full` | `readable` | `wide`; по умолчанию **`full`**) и структура шапки/тела; краевые поля **не** входят в корень — их даёт **`
|
|
7
|
+
- **С `AppShell.Template`** краевые поля колонки задаёт **`AppShell.Main`**. Для маршрута чаще берут **`PageContent.Section`** + **`Header`** / **`Body`**, либо **`PageContent.Root`** только ради **`maxWidth`**, без второго слоя полей.
|
|
8
|
+
- **`PageContent.Root`** — когда нужен **`maxWidth`** (`full` | `readable` | `wide`; по умолчанию **`full`**) и структура шапки/тела; краевые поля **не** входят в корень — их даёт **`AppShell.Main`**.
|
|
9
9
|
- **`Description`** с **`measure="full"`**, если ширину уже ограничивает родитель; по умолчанию **`measure="readable"`** — узкая мера лида ~65ch.
|
|
10
10
|
|
|
11
|
+
### Краевые поля колонки
|
|
12
|
+
|
|
13
|
+
Они **не** задаются **`PageContent`**: их даёт **`AppShell.Main`**. Если контент «прилип» к краю экрана, проверьте шелл и стили — см. [AppShell](../../layout/app-shell/COMPONENT.md).
|
|
14
|
+
|
|
11
15
|
## Composition
|
|
12
16
|
|
|
13
|
-
- **`PageContent.Root`** — внешняя обёртка: **`maxWidth`** через `data-max-width` (кроме `full`), **padding по краям колонки — 0** (поля у **`AppShell.
|
|
17
|
+
- **`PageContent.Root`** — внешняя обёртка: **`maxWidth`** через `data-max-width` (кроме `full`), **padding по краям колонки — 0** (поля у **`AppShell.Main`**).
|
|
14
18
|
- **`PageContent.Section`** — **`<section>`**; сочетайте с **`aria-labelledby`** на заголовок **`PageContent.Title`**.
|
|
15
19
|
- **`PageContent.Header`** — заголовок + описание с отступами.
|
|
16
20
|
- **`PageContent.Title`** — **`<h1>`** (один на вью).
|
|
@@ -62,7 +66,7 @@ export function AccountPage() {
|
|
|
62
66
|
## Rules
|
|
63
67
|
|
|
64
68
|
- На вью — **один** `h1` через **`PageContent.Title`**.
|
|
65
|
-
- **Не** вкладывайте **`PageContent.Root`**
|
|
69
|
+
- **Не** вкладывайте **`PageContent.Root`** так, чтобы дублировать краевые поля, которые уже даёт **`AppShell.Main`**.
|
|
66
70
|
- **`Description`**: по умолчанию узкая мера; **`measure="full"`**, когда колонка уже ограничена снаружи.
|
|
67
71
|
|
|
68
72
|
## API
|
|
@@ -120,4 +124,5 @@ export function AccountPage() {
|
|
|
120
124
|
## Related
|
|
121
125
|
|
|
122
126
|
- [Typography](../typography/COMPONENT.md) — роли текста на странице.
|
|
123
|
-
- [
|
|
127
|
+
- [EmptyPage](../empty-page/COMPONENT.md) — пустое состояние списка или области данных (**`h2`**, не дублирует **`PageContent.Title`**).
|
|
128
|
+
- [AppShell](../../layout/app-shell/COMPONENT.md) — сетка и **`Main`**.
|
|
@@ -13,7 +13,7 @@ export default function PopoverAsChildExample() {
|
|
|
13
13
|
Text button trigger
|
|
14
14
|
</button>
|
|
15
15
|
</Popover.Trigger>
|
|
16
|
-
<Popover.Content align="start"
|
|
16
|
+
<Popover.Content align="start" side="bottom">
|
|
17
17
|
<p className={styles.panelTextMuted}>
|
|
18
18
|
One arbitrary element as the anchor; the kit merges <code>ref</code>,{" "}
|
|
19
19
|
<code>aria-expanded</code>, <code>aria-controls</code>, and the click toggle handler.
|
|
@@ -7,11 +7,11 @@ export default function CanonicalPanelExample() {
|
|
|
7
7
|
return (
|
|
8
8
|
<Popover.Root>
|
|
9
9
|
<Popover.Trigger asChild>
|
|
10
|
-
<Button.Root mode="stroke"
|
|
10
|
+
<Button.Root mode="stroke" variant="neutral">
|
|
11
11
|
View details
|
|
12
12
|
</Button.Root>
|
|
13
13
|
</Popover.Trigger>
|
|
14
|
-
<Popover.Content align="start"
|
|
14
|
+
<Popover.Content align="start" side="bottom">
|
|
15
15
|
<Typography.Root as="p" variant="body-small" weight="semibold">
|
|
16
16
|
Shipping estimate
|
|
17
17
|
</Typography.Root>
|
|
@@ -4,20 +4,20 @@ import { Button, Checkbox, Popover, Typography } from "prime-ui-kit";
|
|
|
4
4
|
import styles from "./popover-examples.module.css";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* Trigger with `Button.Icon`, header row, body copy, and native checkboxes with
|
|
7
|
+
* Trigger with `Button.Icon`, header row, body copy, and native checkboxes with panel padding from `Content` `size`.
|
|
8
8
|
*/
|
|
9
9
|
export default function PopoverCompositionExample() {
|
|
10
10
|
return (
|
|
11
11
|
<Popover.Root>
|
|
12
12
|
<Popover.Trigger asChild>
|
|
13
|
-
<Button.Root mode="stroke"
|
|
13
|
+
<Button.Root mode="stroke" variant="neutral">
|
|
14
14
|
<Button.Icon>
|
|
15
15
|
<SlidersHorizontal aria-hidden strokeWidth={1.75} />
|
|
16
16
|
</Button.Icon>
|
|
17
17
|
Report filters
|
|
18
18
|
</Button.Root>
|
|
19
19
|
</Popover.Trigger>
|
|
20
|
-
<Popover.Content align="start"
|
|
20
|
+
<Popover.Content align="start" side="bottom">
|
|
21
21
|
<div className={styles.compositionHeader}>
|
|
22
22
|
<Filter aria-hidden className={styles.headerIcon} strokeWidth={1.75} />
|
|
23
23
|
<Typography.Root as="span" variant="body-small" weight="semibold">
|
|
@@ -25,14 +25,14 @@ export default function PopoverCompositionExample() {
|
|
|
25
25
|
</Typography.Root>
|
|
26
26
|
</div>
|
|
27
27
|
<Typography.Root as="p" className={styles.panelTextMuted} variant="body-small">
|
|
28
|
-
Icon on the trigger, header and copy
|
|
29
|
-
<code>
|
|
28
|
+
Icon on the trigger, header and copy; panel padding comes from <code>Content</code>{" "}
|
|
29
|
+
<code>size</code>.
|
|
30
30
|
</Typography.Root>
|
|
31
31
|
<div className={styles.checkboxStack}>
|
|
32
|
-
<Checkbox.Root
|
|
32
|
+
<Checkbox.Root defaultChecked>
|
|
33
33
|
<Checkbox.Label>Active only</Checkbox.Label>
|
|
34
34
|
</Checkbox.Root>
|
|
35
|
-
<Checkbox.Root
|
|
35
|
+
<Checkbox.Root>
|
|
36
36
|
<Checkbox.Label>Hide zero values</Checkbox.Label>
|
|
37
37
|
</Checkbox.Root>
|
|
38
38
|
</div>
|
|
@@ -15,21 +15,21 @@ export default function PopoverControlledExample() {
|
|
|
15
15
|
Panel is {open ? "open" : "closed"}
|
|
16
16
|
</Typography.Root>
|
|
17
17
|
<div className={styles.sizesRow}>
|
|
18
|
-
<Button.Root mode="stroke"
|
|
18
|
+
<Button.Root mode="stroke" variant="neutral" onClick={() => setOpen(true)}>
|
|
19
19
|
Open from outside
|
|
20
20
|
</Button.Root>
|
|
21
21
|
<Popover.Root open={open} onOpenChange={setOpen}>
|
|
22
22
|
<Popover.Trigger asChild>
|
|
23
|
-
<Button.Root mode="filled"
|
|
23
|
+
<Button.Root mode="filled" variant="primary">
|
|
24
24
|
Toggle with trigger
|
|
25
25
|
</Button.Root>
|
|
26
26
|
</Popover.Trigger>
|
|
27
|
-
<Popover.Content align="start"
|
|
27
|
+
<Popover.Content align="start" side="bottom">
|
|
28
28
|
<p className={styles.panelTextMuted}>
|
|
29
29
|
State is driven by <code>open</code> and <code>onOpenChange</code> on{" "}
|
|
30
30
|
<code>Popover.Root</code>.
|
|
31
31
|
</p>
|
|
32
|
-
<Button.Root mode="ghost"
|
|
32
|
+
<Button.Root mode="ghost" variant="neutral" onClick={() => setOpen(false)}>
|
|
33
33
|
Close
|
|
34
34
|
</Button.Root>
|
|
35
35
|
</Popover.Content>
|
|
@@ -7,22 +7,15 @@ export default function DateTriggerExample() {
|
|
|
7
7
|
return (
|
|
8
8
|
<Popover.Root>
|
|
9
9
|
<Popover.Trigger asChild>
|
|
10
|
-
<Button.Root aria-label="Choose due date" mode="stroke"
|
|
10
|
+
<Button.Root aria-label="Choose due date" mode="stroke" variant="neutral">
|
|
11
11
|
Due · Mar 27, 2025
|
|
12
12
|
</Button.Root>
|
|
13
13
|
</Popover.Trigger>
|
|
14
|
-
<Popover.Content
|
|
15
|
-
align="start"
|
|
16
|
-
insetGap="x3"
|
|
17
|
-
insetPadding="x2"
|
|
18
|
-
side="bottom"
|
|
19
|
-
size="m"
|
|
20
|
-
trapFocus
|
|
21
|
-
>
|
|
14
|
+
<Popover.Content align="start" side="bottom" trapFocus>
|
|
22
15
|
<Typography.Root as="p" variant="body-small" weight="semibold">
|
|
23
16
|
Adjust due date
|
|
24
17
|
</Typography.Root>
|
|
25
|
-
<Input.Root hint="Uses the control size from Popover.Content." label="Due date"
|
|
18
|
+
<Input.Root hint="Uses the control size from Popover.Content." label="Due date">
|
|
26
19
|
<Input.Wrapper>
|
|
27
20
|
<Input.Field defaultValue="2025-03-27" name="dueDate" type="date" />
|
|
28
21
|
</Input.Wrapper>
|
|
@@ -13,18 +13,11 @@ export default function PopoverFeaturesExample() {
|
|
|
13
13
|
return (
|
|
14
14
|
<Popover.Root open={open} onOpenChange={setOpen}>
|
|
15
15
|
<Popover.Trigger asChild>
|
|
16
|
-
<Button.Root className={styles.triggerWide} mode="stroke"
|
|
16
|
+
<Button.Root className={styles.triggerWide} mode="stroke" variant="neutral">
|
|
17
17
|
Access request
|
|
18
18
|
</Button.Root>
|
|
19
19
|
</Popover.Trigger>
|
|
20
|
-
<Popover.Content
|
|
21
|
-
align="start"
|
|
22
|
-
className={styles.formPanel}
|
|
23
|
-
insetGap="x3"
|
|
24
|
-
insetPadding="x2"
|
|
25
|
-
sameMinWidthAsTrigger
|
|
26
|
-
trapFocus
|
|
27
|
-
>
|
|
20
|
+
<Popover.Content align="start" className={styles.formPanel} sameMinWidthAsTrigger trapFocus>
|
|
28
21
|
<Typography.Root as="p" variant="body-small" weight="medium">
|
|
29
22
|
Short form
|
|
30
23
|
</Typography.Root>
|
|
@@ -32,7 +25,7 @@ export default function PopoverFeaturesExample() {
|
|
|
32
25
|
<code>trapFocus</code> keeps Tab inside the panel; opening the Select listbox does not
|
|
33
26
|
count as an outside click, so the popover stays open.
|
|
34
27
|
</Typography.Root>
|
|
35
|
-
<Input.Root label="Comment"
|
|
28
|
+
<Input.Root label="Comment">
|
|
36
29
|
<Input.Wrapper>
|
|
37
30
|
<Input.Field
|
|
38
31
|
placeholder="Why access is needed"
|
|
@@ -41,7 +34,7 @@ export default function PopoverFeaturesExample() {
|
|
|
41
34
|
/>
|
|
42
35
|
</Input.Wrapper>
|
|
43
36
|
</Input.Root>
|
|
44
|
-
<Select.Root placeholder="Role"
|
|
37
|
+
<Select.Root placeholder="Role">
|
|
45
38
|
<Select.Trigger>
|
|
46
39
|
<Select.Value />
|
|
47
40
|
</Select.Trigger>
|
|
@@ -52,10 +45,10 @@ export default function PopoverFeaturesExample() {
|
|
|
52
45
|
</Select.Content>
|
|
53
46
|
</Select.Root>
|
|
54
47
|
<div className={styles.actionsRow}>
|
|
55
|
-
<Button.Root mode="ghost"
|
|
48
|
+
<Button.Root mode="ghost" variant="neutral" onClick={() => setOpen(false)}>
|
|
56
49
|
Cancel
|
|
57
50
|
</Button.Root>
|
|
58
|
-
<Button.Root mode="filled"
|
|
51
|
+
<Button.Root mode="filled" variant="primary" onClick={() => setOpen(false)}>
|
|
59
52
|
Submit
|
|
60
53
|
</Button.Root>
|
|
61
54
|
</div>
|
|
@@ -10,18 +10,11 @@ export default function FormInPopoverExample() {
|
|
|
10
10
|
return (
|
|
11
11
|
<Popover.Root open={open} onOpenChange={setOpen}>
|
|
12
12
|
<Popover.Trigger asChild>
|
|
13
|
-
<Button.Root mode="stroke"
|
|
13
|
+
<Button.Root mode="stroke" variant="neutral">
|
|
14
14
|
Quick edit
|
|
15
15
|
</Button.Root>
|
|
16
16
|
</Popover.Trigger>
|
|
17
|
-
<Popover.Content
|
|
18
|
-
align="start"
|
|
19
|
-
insetGap="x3"
|
|
20
|
-
insetPadding="x2"
|
|
21
|
-
side="bottom"
|
|
22
|
-
size="m"
|
|
23
|
-
trapFocus
|
|
24
|
-
>
|
|
17
|
+
<Popover.Content align="start" side="bottom" trapFocus>
|
|
25
18
|
<form
|
|
26
19
|
style={{ width: "min(22rem, 100vw)" }}
|
|
27
20
|
onSubmit={(e) => {
|
|
@@ -40,12 +33,12 @@ export default function FormInPopoverExample() {
|
|
|
40
33
|
marginTop: "var(--prime-sys-spacing-x2)",
|
|
41
34
|
}}
|
|
42
35
|
>
|
|
43
|
-
<Input.Root label="Display name"
|
|
36
|
+
<Input.Root label="Display name">
|
|
44
37
|
<Input.Wrapper>
|
|
45
38
|
<Input.Field autoComplete="organization" name="displayName" type="text" />
|
|
46
39
|
</Input.Wrapper>
|
|
47
40
|
</Input.Root>
|
|
48
|
-
<Input.Root label="Slug" hint="Lowercase, no spaces."
|
|
41
|
+
<Input.Root label="Slug" hint="Lowercase, no spaces.">
|
|
49
42
|
<Input.Wrapper>
|
|
50
43
|
<Input.Field name="slug" type="text" />
|
|
51
44
|
</Input.Wrapper>
|
|
@@ -61,14 +54,13 @@ export default function FormInPopoverExample() {
|
|
|
61
54
|
>
|
|
62
55
|
<Button.Root
|
|
63
56
|
mode="stroke"
|
|
64
|
-
size="m"
|
|
65
57
|
type="button"
|
|
66
58
|
variant="neutral"
|
|
67
59
|
onClick={() => setOpen(false)}
|
|
68
60
|
>
|
|
69
61
|
Cancel
|
|
70
62
|
</Button.Root>
|
|
71
|
-
<Button.Root
|
|
63
|
+
<Button.Root type="submit" variant="primary">
|
|
72
64
|
Save
|
|
73
65
|
</Button.Root>
|
|
74
66
|
</div>
|
|
@@ -10,18 +10,11 @@ export default function PopoverFullWidthExample() {
|
|
|
10
10
|
<div className={styles.narrowColumn}>
|
|
11
11
|
<Popover.Root>
|
|
12
12
|
<Popover.Trigger asChild>
|
|
13
|
-
<Button.Root className={styles.fullWidthTrigger} mode="stroke"
|
|
13
|
+
<Button.Root className={styles.fullWidthTrigger} mode="stroke" variant="neutral">
|
|
14
14
|
Match trigger width
|
|
15
15
|
</Button.Root>
|
|
16
16
|
</Popover.Trigger>
|
|
17
|
-
<Popover.Content
|
|
18
|
-
align="start"
|
|
19
|
-
insetGap="x3"
|
|
20
|
-
insetPadding="x2"
|
|
21
|
-
sameMinWidthAsTrigger
|
|
22
|
-
side="bottom"
|
|
23
|
-
size="m"
|
|
24
|
-
>
|
|
17
|
+
<Popover.Content align="start" sameMinWidthAsTrigger side="bottom">
|
|
25
18
|
<p className={styles.panelTextMuted}>
|
|
26
19
|
<code>sameMinWidthAsTrigger</code> sets panel <code>width</code> and{" "}
|
|
27
20
|
<code>minWidth</code> to the anchor — text wraps, still capped by panel max width and
|
|
@@ -10,33 +10,33 @@ export default function PopoverInsetVariantsExample() {
|
|
|
10
10
|
<div className={styles.sizesRow}>
|
|
11
11
|
<Popover.Root>
|
|
12
12
|
<Popover.Trigger asChild>
|
|
13
|
-
<Button.Root mode="stroke"
|
|
13
|
+
<Button.Root mode="stroke" variant="neutral">
|
|
14
14
|
padding: none
|
|
15
15
|
</Button.Root>
|
|
16
16
|
</Popover.Trigger>
|
|
17
|
-
<Popover.Content insetGap="none" insetPadding="none"
|
|
17
|
+
<Popover.Content insetGap="none" insetPadding="none">
|
|
18
18
|
<p className={styles.flushText}>Content flush to the panel radius.</p>
|
|
19
19
|
</Popover.Content>
|
|
20
20
|
</Popover.Root>
|
|
21
21
|
|
|
22
22
|
<Popover.Root>
|
|
23
23
|
<Popover.Trigger asChild>
|
|
24
|
-
<Button.Root mode="stroke"
|
|
24
|
+
<Button.Root mode="stroke" variant="neutral">
|
|
25
25
|
padding: x2
|
|
26
26
|
</Button.Root>
|
|
27
27
|
</Popover.Trigger>
|
|
28
|
-
<Popover.Content insetGap="x2" insetPadding="x2"
|
|
28
|
+
<Popover.Content insetGap="x2" insetPadding="x2">
|
|
29
29
|
<p className={styles.panelTextMuted}>Typical inset defaults for inner spacing.</p>
|
|
30
30
|
</Popover.Content>
|
|
31
31
|
</Popover.Root>
|
|
32
32
|
|
|
33
33
|
<Popover.Root>
|
|
34
34
|
<Popover.Trigger asChild>
|
|
35
|
-
<Button.Root mode="stroke"
|
|
35
|
+
<Button.Root mode="stroke" variant="neutral">
|
|
36
36
|
padding: x3
|
|
37
37
|
</Button.Root>
|
|
38
38
|
</Popover.Trigger>
|
|
39
|
-
<Popover.Content insetGap="x4" insetPadding="x3"
|
|
39
|
+
<Popover.Content insetGap="x4" insetPadding="x3">
|
|
40
40
|
<p className={styles.panelTextMuted}>More air between blocks (gap x4).</p>
|
|
41
41
|
<p className={styles.panelTextMuted}>Second paragraph shows vertical rhythm.</p>
|
|
42
42
|
</Popover.Content>
|
|
@@ -20,16 +20,11 @@ export default function PlacementExample() {
|
|
|
20
20
|
{demos.map(({ label, side, align }) => (
|
|
21
21
|
<Popover.Root key={label}>
|
|
22
22
|
<Popover.Trigger asChild>
|
|
23
|
-
<Button.Root
|
|
24
|
-
className={styles.placementTrigger}
|
|
25
|
-
mode="stroke"
|
|
26
|
-
size="m"
|
|
27
|
-
variant="neutral"
|
|
28
|
-
>
|
|
23
|
+
<Button.Root className={styles.placementTrigger} mode="stroke" variant="neutral">
|
|
29
24
|
{label}
|
|
30
25
|
</Button.Root>
|
|
31
26
|
</Popover.Trigger>
|
|
32
|
-
<Popover.Content align={align}
|
|
27
|
+
<Popover.Content align={align} side={side}>
|
|
33
28
|
<Typography.Root as="p" variant="body-small">
|
|
34
29
|
<code>side="{side}"</code>, <code>align="{align}"</code>. Near the
|
|
35
30
|
viewport edge the panel may flip to stay on screen.
|
|
@@ -7,16 +7,16 @@ export default function RichContentExample() {
|
|
|
7
7
|
return (
|
|
8
8
|
<Popover.Root>
|
|
9
9
|
<Popover.Trigger asChild>
|
|
10
|
-
<Button.Root mode="ghost"
|
|
10
|
+
<Button.Root mode="ghost" variant="neutral">
|
|
11
11
|
Release notes
|
|
12
12
|
</Button.Root>
|
|
13
13
|
</Popover.Trigger>
|
|
14
|
-
<Popover.Content align="start"
|
|
14
|
+
<Popover.Content align="start" side="bottom">
|
|
15
15
|
<div style={{ display: "flex", flexWrap: "wrap", gap: "var(--prime-sys-spacing-x2)" }}>
|
|
16
|
-
<Badge.Root color="green"
|
|
16
|
+
<Badge.Root color="green" variant="light">
|
|
17
17
|
Stable
|
|
18
18
|
</Badge.Root>
|
|
19
|
-
<Badge.Root color="blue"
|
|
19
|
+
<Badge.Root color="blue" variant="stroke">
|
|
20
20
|
v2.4
|
|
21
21
|
</Badge.Root>
|
|
22
22
|
</div>
|
|
@@ -27,10 +27,8 @@ export default function RichContentExample() {
|
|
|
27
27
|
Command menu now respects nested Select listboxes without closing the panel on outside
|
|
28
28
|
detection.
|
|
29
29
|
</Typography.Root>
|
|
30
|
-
<Divider.Root
|
|
31
|
-
|
|
32
|
-
</Divider.Root>
|
|
33
|
-
<Hint.Root size="m" variant="default">
|
|
30
|
+
<Divider.Root variant="text">Heads-up</Divider.Root>
|
|
31
|
+
<Hint.Root variant="default">
|
|
34
32
|
Prefer Modal when the flow must block the page or trap focus by default.
|
|
35
33
|
</Hint.Root>
|
|
36
34
|
</Popover.Content>
|
|
@@ -5,7 +5,7 @@ import styles from "./popover-examples.module.css";
|
|
|
5
5
|
const sizes = ["s", "m", "l", "xl"] as const;
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* Content `size` tier: padding,
|
|
8
|
+
* Content `size` tier: panel padding, type scale, and `ControlSizeProvider` for nested controls.
|
|
9
9
|
*/
|
|
10
10
|
export default function PopoverSizesExample() {
|
|
11
11
|
return (
|
|
@@ -13,14 +13,14 @@ export default function PopoverSizesExample() {
|
|
|
13
13
|
{sizes.map((size) => (
|
|
14
14
|
<Popover.Root key={size}>
|
|
15
15
|
<Popover.Trigger asChild>
|
|
16
|
-
<Button.Root mode="stroke"
|
|
16
|
+
<Button.Root mode="stroke" variant="neutral">
|
|
17
17
|
Size {size}
|
|
18
18
|
</Button.Root>
|
|
19
19
|
</Popover.Trigger>
|
|
20
|
-
<Popover.Content align="start"
|
|
20
|
+
<Popover.Content align="start" side="bottom" size={size}>
|
|
21
21
|
<p className={styles.panelTextMuted}>
|
|
22
|
-
Panel with <code>size="{size}"</code>: padding
|
|
23
|
-
|
|
22
|
+
Panel with <code>size="{size}"</code>: padding and type scale from the
|
|
23
|
+
control tier; nested controls use <code>ControlSizeProvider</code>.
|
|
24
24
|
</p>
|
|
25
25
|
</Popover.Content>
|
|
26
26
|
</Popover.Root>
|