prime-ui-kit 0.6.0 → 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/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 +254 -106
- 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 +373 -337
- 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 +254 -106
- package/dist/index.css.map +4 -4
- package/dist/index.js +375 -338
- 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/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 +1 -0
- 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/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
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { PackagePlus } from "lucide-react";
|
|
2
|
+
import { Button, EmptyPage } from "prime-ui-kit";
|
|
3
|
+
|
|
4
|
+
import styles from "./examples-demos.module.css";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Пустое состояние в «области таблицы»: родитель с фиксированной минимальной высотой,
|
|
8
|
+
* `layout="fill"` растягивает блок и центрирует содержимое.
|
|
9
|
+
*/
|
|
10
|
+
export function EmptyPageTableRegion() {
|
|
11
|
+
return (
|
|
12
|
+
<div>
|
|
13
|
+
<p className={styles.lead}>
|
|
14
|
+
Имитация тела таблицы или карточки со списком: обводка задаёт границу области данных.
|
|
15
|
+
</p>
|
|
16
|
+
<div className={styles.tableRegion}>
|
|
17
|
+
<EmptyPage.Root layout="fill" aria-labelledby="empty-table-heading">
|
|
18
|
+
<EmptyPage.Icon aria-hidden>
|
|
19
|
+
<PackagePlus strokeWidth={2} aria-hidden />
|
|
20
|
+
</EmptyPage.Icon>
|
|
21
|
+
<EmptyPage.Title id="empty-table-heading">Пока нет позиций</EmptyPage.Title>
|
|
22
|
+
<EmptyPage.Description>
|
|
23
|
+
Импортируйте каталог или создайте первую строку вручную — таблица заполнится
|
|
24
|
+
автоматически.
|
|
25
|
+
</EmptyPage.Description>
|
|
26
|
+
<EmptyPage.Actions>
|
|
27
|
+
<Button.Root type="button" variant="primary">
|
|
28
|
+
Добавить позицию
|
|
29
|
+
</Button.Root>
|
|
30
|
+
</EmptyPage.Actions>
|
|
31
|
+
</EmptyPage.Root>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
);
|
|
35
|
+
}
|
|
@@ -4,9 +4,7 @@ import { Hint, Label } from "prime-ui-kit";
|
|
|
4
4
|
export default function HintA11yDescribedbyExample() {
|
|
5
5
|
return (
|
|
6
6
|
<>
|
|
7
|
-
<Label.Root htmlFor="hint-ex-a11y-volume"
|
|
8
|
-
Notification volume
|
|
9
|
-
</Label.Root>
|
|
7
|
+
<Label.Root htmlFor="hint-ex-a11y-volume">Notification volume</Label.Root>
|
|
10
8
|
<input
|
|
11
9
|
id="hint-ex-a11y-volume"
|
|
12
10
|
type="range"
|
|
@@ -15,7 +13,7 @@ export default function HintA11yDescribedbyExample() {
|
|
|
15
13
|
defaultValue={40}
|
|
16
14
|
aria-describedby="hint-ex-a11y-volume-help"
|
|
17
15
|
/>
|
|
18
|
-
<Hint.Root id="hint-ex-a11y-volume-help"
|
|
16
|
+
<Hint.Root id="hint-ex-a11y-volume-help" variant="default">
|
|
19
17
|
Does not affect calls and alarms in the mobile app.
|
|
20
18
|
</Hint.Root>
|
|
21
19
|
</>
|
|
@@ -13,7 +13,7 @@ export default function HintControlledVariantExample() {
|
|
|
13
13
|
<Button.Root size="s" variant="error" mode="lighter" onClick={() => setVariant("error")}>
|
|
14
14
|
Show error
|
|
15
15
|
</Button.Root>
|
|
16
|
-
<Hint.Root
|
|
16
|
+
<Hint.Root variant={variant}>
|
|
17
17
|
{variant === "error"
|
|
18
18
|
? "Fill the field before saving the draft."
|
|
19
19
|
: "You can save the draft without required fields."}
|
|
@@ -6,15 +6,13 @@ export default function ErrorHintExample() {
|
|
|
6
6
|
|
|
7
7
|
return (
|
|
8
8
|
<>
|
|
9
|
-
<Label.Root htmlFor="hint-example-error"
|
|
10
|
-
|
|
11
|
-
</Label.Root>
|
|
12
|
-
<Input.Root size="m" id="hint-example-error" hasError>
|
|
9
|
+
<Label.Root htmlFor="hint-example-error">Tax ID</Label.Root>
|
|
10
|
+
<Input.Root id="hint-example-error" hasError>
|
|
13
11
|
<Input.Wrapper>
|
|
14
12
|
<Input.Field type="text" defaultValue="12" aria-describedby={hintId} />
|
|
15
13
|
</Input.Wrapper>
|
|
16
14
|
</Input.Root>
|
|
17
|
-
<Hint.Root id={hintId}
|
|
15
|
+
<Hint.Root id={hintId} variant="error" role="alert">
|
|
18
16
|
Enter 10 or 12 digits.
|
|
19
17
|
</Hint.Root>
|
|
20
18
|
</>
|
|
@@ -6,10 +6,8 @@ export default function FieldHelpExample() {
|
|
|
6
6
|
|
|
7
7
|
return (
|
|
8
8
|
<>
|
|
9
|
-
<Label.Root htmlFor="hint-example-field-help"
|
|
10
|
-
|
|
11
|
-
</Label.Root>
|
|
12
|
-
<Input.Root size="m" id="hint-example-field-help">
|
|
9
|
+
<Label.Root htmlFor="hint-example-field-help">Project name</Label.Root>
|
|
10
|
+
<Input.Root id="hint-example-field-help">
|
|
13
11
|
<Input.Wrapper>
|
|
14
12
|
<Input.Field
|
|
15
13
|
type="text"
|
|
@@ -19,7 +17,7 @@ export default function FieldHelpExample() {
|
|
|
19
17
|
/>
|
|
20
18
|
</Input.Wrapper>
|
|
21
19
|
</Input.Root>
|
|
22
|
-
<Hint.Root id={hintId}
|
|
20
|
+
<Hint.Root id={hintId} variant="default">
|
|
23
21
|
Visible to everyone in this workspace.
|
|
24
22
|
</Hint.Root>
|
|
25
23
|
</>
|
|
@@ -4,41 +4,31 @@ import { Hint, Input, Label } from "prime-ui-kit";
|
|
|
4
4
|
export default function HintFieldStatesExample() {
|
|
5
5
|
return (
|
|
6
6
|
<>
|
|
7
|
-
<Label.Root htmlFor="hint-ex-st-ok"
|
|
8
|
-
|
|
9
|
-
</Label.Root>
|
|
10
|
-
<Input.Root size="m" id="hint-ex-st-ok">
|
|
7
|
+
<Label.Root htmlFor="hint-ex-st-ok">Project name</Label.Root>
|
|
8
|
+
<Input.Root id="hint-ex-st-ok">
|
|
11
9
|
<Input.Wrapper>
|
|
12
10
|
<Input.Field type="text" defaultValue="Alpha" />
|
|
13
11
|
</Input.Wrapper>
|
|
14
12
|
</Input.Root>
|
|
15
|
-
<Hint.Root
|
|
16
|
-
Visible to everyone in this workspace.
|
|
17
|
-
</Hint.Root>
|
|
13
|
+
<Hint.Root variant="default">Visible to everyone in this workspace.</Hint.Root>
|
|
18
14
|
|
|
19
|
-
<Label.Root htmlFor="hint-ex-st-err"
|
|
20
|
-
|
|
21
|
-
</Label.Root>
|
|
22
|
-
<Input.Root size="m" id="hint-ex-st-err" hasError>
|
|
15
|
+
<Label.Root htmlFor="hint-ex-st-err">Tax ID</Label.Root>
|
|
16
|
+
<Input.Root id="hint-ex-st-err" hasError>
|
|
23
17
|
<Input.Wrapper>
|
|
24
18
|
<Input.Field type="text" defaultValue="12" />
|
|
25
19
|
</Input.Wrapper>
|
|
26
20
|
</Input.Root>
|
|
27
|
-
<Hint.Root
|
|
28
|
-
Enter 10 or 12 digits.
|
|
29
|
-
</Hint.Root>
|
|
21
|
+
<Hint.Root variant="error">Enter 10 or 12 digits.</Hint.Root>
|
|
30
22
|
|
|
31
|
-
<Label.Root htmlFor="hint-ex-st-dis"
|
|
23
|
+
<Label.Root htmlFor="hint-ex-st-dis" disabled>
|
|
32
24
|
Request limit
|
|
33
25
|
</Label.Root>
|
|
34
|
-
<Input.Root
|
|
26
|
+
<Input.Root id="hint-ex-st-dis">
|
|
35
27
|
<Input.Wrapper>
|
|
36
28
|
<Input.Field type="text" disabled defaultValue="read only" />
|
|
37
29
|
</Input.Wrapper>
|
|
38
30
|
</Input.Root>
|
|
39
|
-
<Hint.Root
|
|
40
|
-
Value comes from the plan and cannot be edited.
|
|
41
|
-
</Hint.Root>
|
|
31
|
+
<Hint.Root variant="disabled">Value comes from the plan and cannot be edited.</Hint.Root>
|
|
42
32
|
</>
|
|
43
33
|
);
|
|
44
34
|
}
|
|
@@ -7,10 +7,8 @@ export default function InlineTipFormExample() {
|
|
|
7
7
|
|
|
8
8
|
return (
|
|
9
9
|
<>
|
|
10
|
-
<Label.Root htmlFor="hint-example-form-email"
|
|
11
|
-
|
|
12
|
-
</Label.Root>
|
|
13
|
-
<Input.Root size="m" id="hint-example-form-email">
|
|
10
|
+
<Label.Root htmlFor="hint-example-form-email">Billing email</Label.Root>
|
|
11
|
+
<Input.Root id="hint-example-form-email">
|
|
14
12
|
<Input.Wrapper>
|
|
15
13
|
<Input.Field
|
|
16
14
|
type="email"
|
|
@@ -19,14 +17,12 @@ export default function InlineTipFormExample() {
|
|
|
19
17
|
/>
|
|
20
18
|
</Input.Wrapper>
|
|
21
19
|
</Input.Root>
|
|
22
|
-
<Hint.Root id={emailHintId}
|
|
20
|
+
<Hint.Root id={emailHintId} variant="default">
|
|
23
21
|
Invoices and receipts go here; not the same as your login email.
|
|
24
22
|
</Hint.Root>
|
|
25
23
|
|
|
26
|
-
<Label.Root htmlFor="hint-example-form-budget"
|
|
27
|
-
|
|
28
|
-
</Label.Root>
|
|
29
|
-
<Input.Root size="m" id="hint-example-form-budget">
|
|
24
|
+
<Label.Root htmlFor="hint-example-form-budget">Monthly budget</Label.Root>
|
|
25
|
+
<Input.Root id="hint-example-form-budget">
|
|
30
26
|
<Input.Wrapper>
|
|
31
27
|
<Input.Field
|
|
32
28
|
type="text"
|
|
@@ -36,7 +32,7 @@ export default function InlineTipFormExample() {
|
|
|
36
32
|
/>
|
|
37
33
|
</Input.Wrapper>
|
|
38
34
|
</Input.Root>
|
|
39
|
-
<Hint.Root id={budgetHintId}
|
|
35
|
+
<Hint.Root id={budgetHintId} variant="disabled">
|
|
40
36
|
Optional — leave empty to use the workspace default.
|
|
41
37
|
</Hint.Root>
|
|
42
38
|
</>
|
|
@@ -9,10 +9,8 @@ export default function SuccessConfirmationExample() {
|
|
|
9
9
|
|
|
10
10
|
return (
|
|
11
11
|
<>
|
|
12
|
-
<Label.Root htmlFor="hint-example-success"
|
|
13
|
-
|
|
14
|
-
</Label.Root>
|
|
15
|
-
<Input.Root size="m" id="hint-example-success">
|
|
12
|
+
<Label.Root htmlFor="hint-example-success">API token</Label.Root>
|
|
13
|
+
<Input.Root id="hint-example-success">
|
|
16
14
|
<Input.Wrapper>
|
|
17
15
|
<Input.Field
|
|
18
16
|
type="text"
|
|
@@ -22,7 +20,7 @@ export default function SuccessConfirmationExample() {
|
|
|
22
20
|
/>
|
|
23
21
|
</Input.Wrapper>
|
|
24
22
|
</Input.Root>
|
|
25
|
-
<Hint.Root id={hintId}
|
|
23
|
+
<Hint.Root id={hintId} variant="default">
|
|
26
24
|
Token saved. Rotate it from settings anytime.
|
|
27
25
|
</Hint.Root>
|
|
28
26
|
</>
|
|
@@ -4,15 +4,9 @@ import { Hint } from "prime-ui-kit";
|
|
|
4
4
|
export default function HintVariantsExample() {
|
|
5
5
|
return (
|
|
6
6
|
<>
|
|
7
|
-
<Hint.Root
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
<Hint.Root size="m" variant="error">
|
|
11
|
-
Value does not meet password policy requirements.
|
|
12
|
-
</Hint.Root>
|
|
13
|
-
<Hint.Root size="m" variant="disabled">
|
|
14
|
-
Editing is not available for the selected role.
|
|
15
|
-
</Hint.Root>
|
|
7
|
+
<Hint.Root variant="default">Neutral helper or format guidance.</Hint.Root>
|
|
8
|
+
<Hint.Root variant="error">Value does not meet password policy requirements.</Hint.Root>
|
|
9
|
+
<Hint.Root variant="disabled">Editing is not available for the selected role.</Hint.Root>
|
|
16
10
|
</>
|
|
17
11
|
);
|
|
18
12
|
}
|
|
@@ -3,7 +3,7 @@ import { Hint, Icon } from "prime-ui-kit";
|
|
|
3
3
|
/** Decorative leading icon; meaning must be repeated in text (`Hint.Icon` is `aria-hidden`). */
|
|
4
4
|
export default function HintWithIconExample() {
|
|
5
5
|
return (
|
|
6
|
-
<Hint.Root
|
|
6
|
+
<Hint.Root variant="default">
|
|
7
7
|
<Hint.Icon>
|
|
8
8
|
<Icon name="field.email" tone="subtle" />
|
|
9
9
|
</Hint.Icon>
|
|
@@ -6,14 +6,14 @@ import { Input } from "prime-ui-kit";
|
|
|
6
6
|
export default function AffixUrlAndAmountExample() {
|
|
7
7
|
return (
|
|
8
8
|
<>
|
|
9
|
-
<Input.Root
|
|
9
|
+
<Input.Root label="Сайт" hint="Поддомен без схемы">
|
|
10
10
|
<Input.Wrapper>
|
|
11
11
|
<Input.Affix side="start">https://</Input.Affix>
|
|
12
12
|
<Input.Field placeholder="поддомен" />
|
|
13
13
|
<Input.Affix side="end">.example</Input.Affix>
|
|
14
14
|
</Input.Wrapper>
|
|
15
15
|
</Input.Root>
|
|
16
|
-
<Input.Root
|
|
16
|
+
<Input.Root label="Сумма" hint="Дробная часть через запятую">
|
|
17
17
|
<Input.Wrapper>
|
|
18
18
|
<Input.InlineAffix side="start">₽</Input.InlineAffix>
|
|
19
19
|
<Input.Field placeholder="0,00" inputMode="decimal" />
|
|
@@ -12,7 +12,7 @@ export default function CheckoutFullWidthExample() {
|
|
|
12
12
|
|
|
13
13
|
return (
|
|
14
14
|
<div className={styles.column}>
|
|
15
|
-
<Input.Root
|
|
15
|
+
<Input.Root label="ФИО получателя" hint="Как в паспорте — для доставки">
|
|
16
16
|
<Input.Wrapper>
|
|
17
17
|
<Input.Field
|
|
18
18
|
name="fullName"
|
|
@@ -23,7 +23,7 @@ export default function CheckoutFullWidthExample() {
|
|
|
23
23
|
/>
|
|
24
24
|
</Input.Wrapper>
|
|
25
25
|
</Input.Root>
|
|
26
|
-
<Input.Root
|
|
26
|
+
<Input.Root label="Адрес доставки" optionalLabel="квартира, подъезд">
|
|
27
27
|
<Input.Wrapper>
|
|
28
28
|
<Input.Field
|
|
29
29
|
name="address"
|
|
@@ -8,11 +8,7 @@ export default function LoginEmailExample() {
|
|
|
8
8
|
const [email, setEmail] = React.useState("");
|
|
9
9
|
|
|
10
10
|
return (
|
|
11
|
-
<Input.Root
|
|
12
|
-
size="m"
|
|
13
|
-
label="Электронная почта"
|
|
14
|
-
hint="Мы отправим код подтверждения на этот адрес"
|
|
15
|
-
>
|
|
11
|
+
<Input.Root label="Электронная почта" hint="Мы отправим код подтверждения на этот адрес">
|
|
16
12
|
<Input.Wrapper>
|
|
17
13
|
<Input.Icon side="start">
|
|
18
14
|
<Icon name="field.email" size="s" tone="subtle" />
|
|
@@ -8,7 +8,7 @@ export default function PasswordWithHintExample() {
|
|
|
8
8
|
const [password, setPassword] = React.useState("");
|
|
9
9
|
|
|
10
10
|
return (
|
|
11
|
-
<Input.Root
|
|
11
|
+
<Input.Root label="Пароль" hint="Не менее 8 символов, буквы и цифры">
|
|
12
12
|
<Input.Wrapper>
|
|
13
13
|
<Input.Field
|
|
14
14
|
type="password"
|
|
@@ -19,11 +19,11 @@ export default function ToolbarHintsExample() {
|
|
|
19
19
|
return (
|
|
20
20
|
<div role="toolbar" aria-label="Formatting" style={toolbar}>
|
|
21
21
|
<div style={hintCluster}>
|
|
22
|
-
<Button.Root
|
|
22
|
+
<Button.Root>Bold</Button.Root>
|
|
23
23
|
<Kbd.Root size="s">⌘B</Kbd.Root>
|
|
24
24
|
</div>
|
|
25
25
|
<div style={hintCluster}>
|
|
26
|
-
<Button.Root
|
|
26
|
+
<Button.Root>Italic</Button.Root>
|
|
27
27
|
<Kbd.Root size="s">⌘I</Kbd.Root>
|
|
28
28
|
</div>
|
|
29
29
|
</div>
|
|
@@ -4,7 +4,7 @@ import { Icon, Label } from "prime-ui-kit";
|
|
|
4
4
|
export function WithIconExample() {
|
|
5
5
|
return (
|
|
6
6
|
<>
|
|
7
|
-
<Label.Root
|
|
7
|
+
<Label.Root htmlFor="example-label-icon-upload">
|
|
8
8
|
<Label.Icon>
|
|
9
9
|
<Icon aria-hidden name="action.upload" />
|
|
10
10
|
</Label.Icon>
|
|
@@ -11,15 +11,15 @@ export default function LinkButtonCompositionExample() {
|
|
|
11
11
|
|
|
12
12
|
return (
|
|
13
13
|
<div style={rowStyle}>
|
|
14
|
-
<LinkButton.Root href="#"
|
|
14
|
+
<LinkButton.Root href="#">
|
|
15
15
|
<Icon name="field.email" size="s" />
|
|
16
16
|
Link with icon on the left
|
|
17
17
|
</LinkButton.Root>
|
|
18
|
-
<LinkButton.Root href="#"
|
|
18
|
+
<LinkButton.Root href="#">
|
|
19
19
|
Icon on the right
|
|
20
20
|
<Icon name="action.close" size="s" />
|
|
21
21
|
</LinkButton.Root>
|
|
22
|
-
<LinkButton.Root href="#"
|
|
22
|
+
<LinkButton.Root href="#" aria-label="Open profile">
|
|
23
23
|
<Icon name="field.email" size="s" />
|
|
24
24
|
</LinkButton.Root>
|
|
25
25
|
</div>
|
|
@@ -8,10 +8,8 @@ import { LinkButton } from "prime-ui-kit";
|
|
|
8
8
|
export default function LinkButtonDisabledExample() {
|
|
9
9
|
return (
|
|
10
10
|
<div>
|
|
11
|
-
<LinkButton.Root href="/available"
|
|
12
|
-
|
|
13
|
-
</LinkButton.Root>
|
|
14
|
-
<LinkButton.Root href="/ignored-when-disabled" size="m" disabled>
|
|
11
|
+
<LinkButton.Root href="/available">Available route</LinkButton.Root>
|
|
12
|
+
<LinkButton.Root href="/ignored-when-disabled" disabled>
|
|
15
13
|
Coming soon
|
|
16
14
|
</LinkButton.Root>
|
|
17
15
|
</div>
|
|
@@ -5,12 +5,7 @@ export default function LinkButtonExternalExample() {
|
|
|
5
5
|
return (
|
|
6
6
|
<p>
|
|
7
7
|
Documentation in a separate tab:{" "}
|
|
8
|
-
<LinkButton.Root
|
|
9
|
-
href="https://example.com/docs"
|
|
10
|
-
target="_blank"
|
|
11
|
-
rel="noopener noreferrer"
|
|
12
|
-
size="m"
|
|
13
|
-
>
|
|
8
|
+
<LinkButton.Root href="https://example.com/docs" target="_blank" rel="noopener noreferrer">
|
|
14
9
|
Open help
|
|
15
10
|
</LinkButton.Root>
|
|
16
11
|
</p>
|
|
@@ -5,10 +5,8 @@ export default function LinkButtonInlineTextLinkExample() {
|
|
|
5
5
|
return (
|
|
6
6
|
<p>
|
|
7
7
|
Need more detail? See{" "}
|
|
8
|
-
<LinkButton.Root href="/docs/billing"
|
|
9
|
-
|
|
10
|
-
</LinkButton.Root>{" "}
|
|
11
|
-
for proration rules.
|
|
8
|
+
<LinkButton.Root href="/docs/billing">billing documentation</LinkButton.Root> for proration
|
|
9
|
+
rules.
|
|
12
10
|
</p>
|
|
13
11
|
);
|
|
14
12
|
}
|
|
@@ -4,21 +4,13 @@ import { LinkButton } from "prime-ui-kit";
|
|
|
4
4
|
export default function LinkButtonNavigationClusterExample() {
|
|
5
5
|
return (
|
|
6
6
|
<nav aria-label="Product sections">
|
|
7
|
-
<LinkButton.Root href="/product/overview"
|
|
8
|
-
Overview
|
|
9
|
-
</LinkButton.Root>
|
|
7
|
+
<LinkButton.Root href="/product/overview">Overview</LinkButton.Root>
|
|
10
8
|
<span aria-hidden> · </span>
|
|
11
|
-
<LinkButton.Root href="/product/pricing"
|
|
12
|
-
Pricing
|
|
13
|
-
</LinkButton.Root>
|
|
9
|
+
<LinkButton.Root href="/product/pricing">Pricing</LinkButton.Root>
|
|
14
10
|
<span aria-hidden> · </span>
|
|
15
|
-
<LinkButton.Root href="/product/security"
|
|
16
|
-
Security
|
|
17
|
-
</LinkButton.Root>
|
|
11
|
+
<LinkButton.Root href="/product/security">Security</LinkButton.Root>
|
|
18
12
|
<span aria-hidden> · </span>
|
|
19
|
-
<LinkButton.Root href="/product/changelog"
|
|
20
|
-
Changelog
|
|
21
|
-
</LinkButton.Root>
|
|
13
|
+
<LinkButton.Root href="/product/changelog">Changelog</LinkButton.Root>
|
|
22
14
|
</nav>
|
|
23
15
|
);
|
|
24
16
|
}
|
|
@@ -48,7 +48,7 @@ export function InviteTeammateModal() {
|
|
|
48
48
|
return (
|
|
49
49
|
<Modal.Root>
|
|
50
50
|
<Modal.Trigger>
|
|
51
|
-
<Button.Root
|
|
51
|
+
<Button.Root variant="neutral" mode="stroke">
|
|
52
52
|
Open workspace invite
|
|
53
53
|
</Button.Root>
|
|
54
54
|
</Modal.Trigger>
|
|
@@ -59,17 +59,17 @@ export function InviteTeammateModal() {
|
|
|
59
59
|
footer={
|
|
60
60
|
<>
|
|
61
61
|
<Modal.Close>
|
|
62
|
-
<Button.Root
|
|
62
|
+
<Button.Root variant="neutral" mode="stroke">
|
|
63
63
|
Cancel
|
|
64
64
|
</Button.Root>
|
|
65
65
|
</Modal.Close>
|
|
66
|
-
<Button.Root
|
|
66
|
+
<Button.Root variant="primary" type="button">
|
|
67
67
|
Send invite
|
|
68
68
|
</Button.Root>
|
|
69
69
|
</>
|
|
70
70
|
}
|
|
71
71
|
>
|
|
72
|
-
<Input.Root label="Email address"
|
|
72
|
+
<Input.Root label="Email address" hint="Work email preferred">
|
|
73
73
|
<Input.Wrapper>
|
|
74
74
|
<Input.Field autoComplete="email" placeholder="name@company.com" type="email" />
|
|
75
75
|
</Input.Wrapper>
|
|
@@ -11,7 +11,7 @@ export default function ModalCanonicalMaximalExample() {
|
|
|
11
11
|
return (
|
|
12
12
|
<Modal.Root>
|
|
13
13
|
<Modal.Trigger>
|
|
14
|
-
<Button.Root
|
|
14
|
+
<Button.Root variant="neutral" mode="stroke">
|
|
15
15
|
Open workspace invite
|
|
16
16
|
</Button.Root>
|
|
17
17
|
</Modal.Trigger>
|
|
@@ -20,11 +20,11 @@ export default function ModalCanonicalMaximalExample() {
|
|
|
20
20
|
footer={
|
|
21
21
|
<>
|
|
22
22
|
<Modal.Close>
|
|
23
|
-
<Button.Root
|
|
23
|
+
<Button.Root variant="neutral" mode="stroke">
|
|
24
24
|
Cancel
|
|
25
25
|
</Button.Root>
|
|
26
26
|
</Modal.Close>
|
|
27
|
-
<Button.Root
|
|
27
|
+
<Button.Root variant="primary" type="button">
|
|
28
28
|
Send invite
|
|
29
29
|
</Button.Root>
|
|
30
30
|
</>
|
|
@@ -32,7 +32,7 @@ export default function ModalCanonicalMaximalExample() {
|
|
|
32
32
|
icon={<Icon name="field.email" tone="subtle" />}
|
|
33
33
|
title="Invite teammate"
|
|
34
34
|
>
|
|
35
|
-
<Input.Root label="Email address"
|
|
35
|
+
<Input.Root label="Email address" hint="Work email preferred">
|
|
36
36
|
<Input.Wrapper>
|
|
37
37
|
<Input.Field autoComplete="email" placeholder="name@company.com" type="email" />
|
|
38
38
|
</Input.Wrapper>
|
|
@@ -8,7 +8,7 @@ export default function ModalPatternCloseBehaviorExample() {
|
|
|
8
8
|
<>
|
|
9
9
|
<Modal.Root>
|
|
10
10
|
<Modal.Trigger>
|
|
11
|
-
<Button.Root
|
|
11
|
+
<Button.Root variant="neutral" mode="stroke">
|
|
12
12
|
Standard dismiss
|
|
13
13
|
</Button.Root>
|
|
14
14
|
</Modal.Trigger>
|
|
@@ -24,7 +24,7 @@ export default function ModalPatternCloseBehaviorExample() {
|
|
|
24
24
|
|
|
25
25
|
<Modal.Root closeOnEscape={false} closeOnOverlayClick={false}>
|
|
26
26
|
<Modal.Trigger>
|
|
27
|
-
<Button.Root
|
|
27
|
+
<Button.Root variant="error" mode="lighter">
|
|
28
28
|
<Button.Icon>
|
|
29
29
|
<Icon name="status.locked" />
|
|
30
30
|
</Button.Icon>
|
|
@@ -35,7 +35,7 @@ export default function ModalPatternCloseBehaviorExample() {
|
|
|
35
35
|
description="With both flags false, only buttons dismiss the dialog."
|
|
36
36
|
footer={
|
|
37
37
|
<Modal.Close>
|
|
38
|
-
<Button.Root
|
|
38
|
+
<Button.Root variant="neutral" mode="stroke">
|
|
39
39
|
OK
|
|
40
40
|
</Button.Root>
|
|
41
41
|
</Modal.Close>
|
|
@@ -10,10 +10,10 @@ export default function ModalPatternControlledExample() {
|
|
|
10
10
|
|
|
11
11
|
return (
|
|
12
12
|
<div style={{ display: "flex", flexWrap: "wrap", gap: "var(--prime-sys-spacing-x2)" }}>
|
|
13
|
-
<Button.Root
|
|
13
|
+
<Button.Root variant="primary" onClick={() => setOpen(true)}>
|
|
14
14
|
Open from outside
|
|
15
15
|
</Button.Root>
|
|
16
|
-
<Button.Root
|
|
16
|
+
<Button.Root mode="stroke" variant="neutral" onClick={() => setOpen(false)}>
|
|
17
17
|
Close from outside
|
|
18
18
|
</Button.Root>
|
|
19
19
|
|
|
@@ -23,9 +23,7 @@ export default function ModalPatternControlledExample() {
|
|
|
23
23
|
description="Open and close are driven by `open` and `onOpenChange` on the root."
|
|
24
24
|
footer={
|
|
25
25
|
<Modal.Close>
|
|
26
|
-
<Button.Root
|
|
27
|
-
Done
|
|
28
|
-
</Button.Root>
|
|
26
|
+
<Button.Root variant="primary">Done</Button.Root>
|
|
29
27
|
</Modal.Close>
|
|
30
28
|
}
|
|
31
29
|
icon={<Icon name="action.copy" />}
|
|
@@ -8,7 +8,7 @@ export default function ModalPatternFullWidthFooterExample() {
|
|
|
8
8
|
return (
|
|
9
9
|
<Modal.Root>
|
|
10
10
|
<Modal.Trigger>
|
|
11
|
-
<Button.Root
|
|
11
|
+
<Button.Root variant="neutral" mode="stroke">
|
|
12
12
|
Checkout
|
|
13
13
|
</Button.Root>
|
|
14
14
|
</Modal.Trigger>
|
|
@@ -23,12 +23,12 @@ export default function ModalPatternFullWidthFooterExample() {
|
|
|
23
23
|
}}
|
|
24
24
|
>
|
|
25
25
|
<Modal.Close>
|
|
26
|
-
<Button.Root
|
|
26
|
+
<Button.Root variant="primary" fullWidth>
|
|
27
27
|
Pay now
|
|
28
28
|
</Button.Root>
|
|
29
29
|
</Modal.Close>
|
|
30
30
|
<Modal.Close>
|
|
31
|
-
<Button.Root
|
|
31
|
+
<Button.Root variant="neutral" mode="stroke" fullWidth>
|
|
32
32
|
Back to cart
|
|
33
33
|
</Button.Root>
|
|
34
34
|
</Modal.Close>
|
|
@@ -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" />}
|