prime-ui-kit 0.2.5 → 0.3.2
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 +165 -35
- package/dist/components/accordion/Accordion.d.ts +70 -0
- package/dist/components/accordion/Accordion.d.ts.map +1 -0
- package/dist/components/accordion/examples/01-faq-marketing.d.ts +5 -0
- package/dist/components/accordion/examples/01-faq-marketing.d.ts.map +1 -0
- package/dist/components/accordion/examples/02-settings-panels.d.ts +6 -0
- package/dist/components/accordion/examples/02-settings-panels.d.ts.map +1 -0
- package/dist/components/accordion/examples/03-checkout-order-summary.d.ts +5 -0
- package/dist/components/accordion/examples/03-checkout-order-summary.d.ts.map +1 -0
- package/dist/components/accordion/examples/04-api-docs-sections.d.ts +6 -0
- package/dist/components/accordion/examples/04-api-docs-sections.d.ts.map +1 -0
- package/dist/components/accordion/examples/05-knowledge-base-categories.d.ts +6 -0
- package/dist/components/accordion/examples/05-knowledge-base-categories.d.ts.map +1 -0
- package/dist/components/avatar/Avatar.d.ts +58 -0
- package/dist/components/avatar/Avatar.d.ts.map +1 -0
- package/dist/components/avatar/examples/app-header-nav.d.ts +5 -0
- package/dist/components/avatar/examples/app-header-nav.d.ts.map +1 -0
- package/dist/components/avatar/examples/comment-thread.d.ts +5 -0
- package/dist/components/avatar/examples/comment-thread.d.ts.map +1 -0
- package/dist/components/avatar/examples/fallback-variants.d.ts +5 -0
- package/dist/components/avatar/examples/fallback-variants.d.ts.map +1 -0
- package/dist/components/avatar/examples/group-overflow.d.ts +5 -0
- package/dist/components/avatar/examples/group-overflow.d.ts.map +1 -0
- package/dist/components/avatar/examples/team-list.d.ts +5 -0
- package/dist/components/avatar/examples/team-list.d.ts.map +1 -0
- package/dist/components/badge/Badge.d.ts +51 -0
- package/dist/components/badge/Badge.d.ts.map +1 -0
- package/dist/components/badge/examples/admin-tags.d.ts +3 -0
- package/dist/components/badge/examples/admin-tags.d.ts.map +1 -0
- package/dist/components/badge/examples/canonical.d.ts +3 -0
- package/dist/components/badge/examples/canonical.d.ts.map +1 -0
- package/dist/components/badge/examples/ecommerce-inventory.d.ts +3 -0
- package/dist/components/badge/examples/ecommerce-inventory.d.ts.map +1 -0
- package/dist/components/badge/examples/inbox-labels.d.ts +3 -0
- package/dist/components/badge/examples/inbox-labels.d.ts.map +1 -0
- package/dist/components/badge/examples/status-presence.d.ts +6 -0
- package/dist/components/badge/examples/status-presence.d.ts.map +1 -0
- package/dist/components/banner/Banner.d.ts +78 -0
- package/dist/components/banner/Banner.d.ts.map +1 -0
- package/dist/components/banner/examples/billing-alert.d.ts +3 -0
- package/dist/components/banner/examples/billing-alert.d.ts.map +1 -0
- package/dist/components/banner/examples/cookie-consent-row.d.ts +3 -0
- package/dist/components/banner/examples/cookie-consent-row.d.ts.map +1 -0
- package/dist/components/banner/examples/feature-promo.d.ts +3 -0
- package/dist/components/banner/examples/feature-promo.d.ts.map +1 -0
- package/dist/components/banner/examples/maintenance.d.ts +3 -0
- package/dist/components/banner/examples/maintenance.d.ts.map +1 -0
- package/dist/components/breadcrumb/Breadcrumb.d.ts +47 -0
- package/dist/components/breadcrumb/Breadcrumb.d.ts.map +1 -0
- package/dist/components/breadcrumb/examples/canonical.d.ts +3 -0
- package/dist/components/breadcrumb/examples/canonical.d.ts.map +1 -0
- package/dist/components/breadcrumb/examples/deep-documentation.d.ts +3 -0
- package/dist/components/breadcrumb/examples/deep-documentation.d.ts.map +1 -0
- package/dist/components/breadcrumb/examples/ecommerce-product.d.ts +3 -0
- package/dist/components/breadcrumb/examples/ecommerce-product.d.ts.map +1 -0
- package/dist/components/breadcrumb/examples/long-path-ellipsis.d.ts +6 -0
- package/dist/components/breadcrumb/examples/long-path-ellipsis.d.ts.map +1 -0
- package/dist/components/breadcrumb/examples/saas-settings.d.ts +3 -0
- package/dist/components/breadcrumb/examples/saas-settings.d.ts.map +1 -0
- package/dist/components/button/Button.d.ts +57 -0
- package/dist/components/button/Button.d.ts.map +1 -0
- package/dist/components/button/examples/canonical-composition.d.ts +5 -0
- package/dist/components/button/examples/canonical-composition.d.ts.map +1 -0
- package/dist/components/button/examples/destructive-confirm.d.ts +5 -0
- package/dist/components/button/examples/destructive-confirm.d.ts.map +1 -0
- package/dist/components/button/examples/form-submit-row.d.ts +5 -0
- package/dist/components/button/examples/form-submit-row.d.ts.map +1 -0
- package/dist/components/button/examples/marketing-cta.d.ts +5 -0
- package/dist/components/button/examples/marketing-cta.d.ts.map +1 -0
- package/dist/components/button/examples/toolbar.d.ts +5 -0
- package/dist/components/button/examples/toolbar.d.ts.map +1 -0
- package/dist/components/button-group/ButtonGroup.d.ts +34 -0
- package/dist/components/button-group/ButtonGroup.d.ts.map +1 -0
- package/dist/components/button-group/examples/editor-toolbar.d.ts +6 -0
- package/dist/components/button-group/examples/editor-toolbar.d.ts.map +1 -0
- package/dist/components/button-group/examples/form-footer.d.ts +5 -0
- package/dist/components/button-group/examples/form-footer.d.ts.map +1 -0
- package/dist/components/button-group/examples/view-switcher.d.ts +5 -0
- package/dist/components/button-group/examples/view-switcher.d.ts.map +1 -0
- package/dist/components/button-group/examples/wizard-actions.d.ts +5 -0
- package/dist/components/button-group/examples/wizard-actions.d.ts.map +1 -0
- package/dist/components/card/Card.d.ts +234 -0
- package/dist/components/card/Card.d.ts.map +1 -0
- package/dist/components/card/examples/cta-cover.d.ts +5 -0
- package/dist/components/card/examples/cta-cover.d.ts.map +1 -0
- package/dist/components/card/examples/list-card.d.ts +3 -0
- package/dist/components/card/examples/list-card.d.ts.map +1 -0
- package/dist/components/card/examples/media-mini.d.ts +3 -0
- package/dist/components/card/examples/media-mini.d.ts.map +1 -0
- package/dist/components/card/examples/metric-dashboard.d.ts +3 -0
- package/dist/components/card/examples/metric-dashboard.d.ts.map +1 -0
- package/dist/components/card/examples/split-layout.d.ts +3 -0
- package/dist/components/card/examples/split-layout.d.ts.map +1 -0
- package/dist/components/checkbox/Checkbox.d.ts +42 -0
- package/dist/components/checkbox/Checkbox.d.ts.map +1 -0
- package/dist/components/checkbox/examples/bulk-select-rows.d.ts +5 -0
- package/dist/components/checkbox/examples/bulk-select-rows.d.ts.map +1 -0
- package/dist/components/checkbox/examples/feature-flags-list.d.ts +5 -0
- package/dist/components/checkbox/examples/feature-flags-list.d.ts.map +1 -0
- package/dist/components/checkbox/examples/settings-panel.d.ts +5 -0
- package/dist/components/checkbox/examples/settings-panel.d.ts.map +1 -0
- package/dist/components/checkbox/examples/terms-acceptance.d.ts +5 -0
- package/dist/components/checkbox/examples/terms-acceptance.d.ts.map +1 -0
- package/dist/components/code-block/CodeBlock.d.ts +17 -0
- package/dist/components/code-block/CodeBlock.d.ts.map +1 -0
- package/dist/components/code-block/examples/api-response-preview.d.ts +3 -0
- package/dist/components/code-block/examples/api-response-preview.d.ts.map +1 -0
- package/dist/components/code-block/examples/config-snippet.d.ts +3 -0
- package/dist/components/code-block/examples/config-snippet.d.ts.map +1 -0
- package/dist/components/code-block/examples/error-stack.d.ts +3 -0
- package/dist/components/code-block/examples/error-stack.d.ts.map +1 -0
- package/dist/components/code-block/examples/minimal.d.ts +3 -0
- package/dist/components/code-block/examples/minimal.d.ts.map +1 -0
- package/dist/components/code-block/examples/tutorial-step.d.ts +3 -0
- package/dist/components/code-block/examples/tutorial-step.d.ts.map +1 -0
- package/dist/components/color-picker/ColorPicker.d.ts +76 -0
- package/dist/components/color-picker/ColorPicker.d.ts.map +1 -0
- package/dist/components/color-picker/ColorPickerRac.d.ts +76 -0
- package/dist/components/color-picker/ColorPickerRac.d.ts.map +1 -0
- package/dist/components/color-picker/examples/brand-kit.d.ts +3 -0
- package/dist/components/color-picker/examples/brand-kit.d.ts.map +1 -0
- package/dist/components/color-picker/examples/controlled-form-field.d.ts +3 -0
- package/dist/components/color-picker/examples/controlled-form-field.d.ts.map +1 -0
- package/dist/components/color-picker/examples/minimal-popover.d.ts +3 -0
- package/dist/components/color-picker/examples/minimal-popover.d.ts.map +1 -0
- package/dist/components/color-picker/examples/product-variant-swatch.d.ts +3 -0
- package/dist/components/color-picker/examples/product-variant-swatch.d.ts.map +1 -0
- package/dist/components/color-picker/examples/theme-accent.d.ts +3 -0
- package/dist/components/color-picker/examples/theme-accent.d.ts.map +1 -0
- package/dist/components/command-menu/CommandMenu.d.ts +74 -0
- package/dist/components/command-menu/CommandMenu.d.ts.map +1 -0
- package/dist/components/command-menu/examples/app-palette.d.ts +5 -0
- package/dist/components/command-menu/examples/app-palette.d.ts.map +1 -0
- package/dist/components/command-menu/examples/disabled-items.d.ts +6 -0
- package/dist/components/command-menu/examples/disabled-items.d.ts.map +1 -0
- package/dist/components/command-menu/examples/file-search.d.ts +5 -0
- package/dist/components/command-menu/examples/file-search.d.ts.map +1 -0
- package/dist/components/command-menu/examples/quick-actions.d.ts +5 -0
- package/dist/components/command-menu/examples/quick-actions.d.ts.map +1 -0
- package/dist/components/data-table/DataTable.d.ts +78 -0
- package/dist/components/data-table/DataTable.d.ts.map +1 -0
- package/dist/components/data-table/examples/canonical-orders.d.ts +6 -0
- package/dist/components/data-table/examples/canonical-orders.d.ts.map +1 -0
- package/dist/components/data-table/examples/controlled-sort-and-page.d.ts +5 -0
- package/dist/components/data-table/examples/controlled-sort-and-page.d.ts.map +1 -0
- package/dist/components/data-table/examples/infinite-scroll-load-more.d.ts +6 -0
- package/dist/components/data-table/examples/infinite-scroll-load-more.d.ts.map +1 -0
- package/dist/components/data-table/examples/row-selection.d.ts +6 -0
- package/dist/components/data-table/examples/row-selection.d.ts.map +1 -0
- package/dist/components/data-table/examples/sticky-header-first-column.d.ts +6 -0
- package/dist/components/data-table/examples/sticky-header-first-column.d.ts.map +1 -0
- package/dist/components/datepicker/Datepicker.d.ts +104 -0
- package/dist/components/datepicker/Datepicker.d.ts.map +1 -0
- package/dist/components/datepicker/examples/birthdate.d.ts +5 -0
- package/dist/components/datepicker/examples/birthdate.d.ts.map +1 -0
- package/dist/components/datepicker/examples/booking.d.ts +5 -0
- package/dist/components/datepicker/examples/booking.d.ts.map +1 -0
- package/dist/components/datepicker/examples/full-width-form.d.ts +5 -0
- package/dist/components/datepicker/examples/full-width-form.d.ts.map +1 -0
- package/dist/components/datepicker/examples/range-report.d.ts +5 -0
- package/dist/components/datepicker/examples/range-report.d.ts.map +1 -0
- package/dist/components/digit-input/DigitInput.d.ts +21 -0
- package/dist/components/digit-input/DigitInput.d.ts.map +1 -0
- package/dist/components/digit-input/examples/error-state.d.ts +3 -0
- package/dist/components/digit-input/examples/error-state.d.ts.map +1 -0
- package/dist/components/digit-input/examples/otp-login.d.ts +3 -0
- package/dist/components/digit-input/examples/otp-login.d.ts.map +1 -0
- package/dist/components/digit-input/examples/pin.d.ts +3 -0
- package/dist/components/digit-input/examples/pin.d.ts.map +1 -0
- package/dist/components/digit-input/examples/resend-and-clear.d.ts +3 -0
- package/dist/components/digit-input/examples/resend-and-clear.d.ts.map +1 -0
- package/dist/components/digit-input/examples/verification-step.d.ts +3 -0
- package/dist/components/digit-input/examples/verification-step.d.ts.map +1 -0
- package/dist/components/divider/Divider.d.ts +26 -0
- package/dist/components/divider/Divider.d.ts.map +1 -0
- package/dist/components/divider/examples/card-splits.d.ts +3 -0
- package/dist/components/divider/examples/card-splits.d.ts.map +1 -0
- package/dist/components/divider/examples/inset-stack.d.ts +6 -0
- package/dist/components/divider/examples/inset-stack.d.ts.map +1 -0
- package/dist/components/divider/examples/line-spacing-column.d.ts +6 -0
- package/dist/components/divider/examples/line-spacing-column.d.ts.map +1 -0
- package/dist/components/divider/examples/list-separators.d.ts +3 -0
- package/dist/components/divider/examples/list-separators.d.ts.map +1 -0
- package/dist/components/divider/examples/section-breaks.d.ts +3 -0
- package/dist/components/divider/examples/section-breaks.d.ts.map +1 -0
- package/dist/components/drawer/Drawer.d.ts +71 -0
- package/dist/components/drawer/Drawer.d.ts.map +1 -0
- package/dist/components/drawer/examples/cart-preview.d.ts +5 -0
- package/dist/components/drawer/examples/cart-preview.d.ts.map +1 -0
- package/dist/components/drawer/examples/explicit-panel.d.ts +5 -0
- package/dist/components/drawer/examples/explicit-panel.d.ts.map +1 -0
- package/dist/components/drawer/examples/filters-panel.d.ts +5 -0
- package/dist/components/drawer/examples/filters-panel.d.ts.map +1 -0
- package/dist/components/drawer/examples/mobile-nav-sheet.d.ts +5 -0
- package/dist/components/drawer/examples/mobile-nav-sheet.d.ts.map +1 -0
- package/dist/components/drawer/examples/settings-side.d.ts +5 -0
- package/dist/components/drawer/examples/settings-side.d.ts.map +1 -0
- package/dist/components/dropdown/Dropdown.d.ts +147 -0
- package/dist/components/dropdown/Dropdown.d.ts.map +1 -0
- package/dist/components/dropdown/dropdownGeometry.d.ts +10 -0
- package/dist/components/dropdown/dropdownGeometry.d.ts.map +1 -0
- package/dist/components/dropdown/examples/account-menu.d.ts +3 -0
- package/dist/components/dropdown/examples/account-menu.d.ts.map +1 -0
- package/dist/components/dropdown/examples/actions-menu.d.ts +3 -0
- package/dist/components/dropdown/examples/actions-menu.d.ts.map +1 -0
- package/dist/components/dropdown/examples/placement-demo.d.ts +3 -0
- package/dist/components/dropdown/examples/placement-demo.d.ts.map +1 -0
- package/dist/components/dropdown/examples/select-like-list.d.ts +7 -0
- package/dist/components/dropdown/examples/select-like-list.d.ts.map +1 -0
- package/dist/components/dropdown/menuKeyboard.d.ts +4 -0
- package/dist/components/dropdown/menuKeyboard.d.ts.map +1 -0
- package/dist/components/dropdown/useDropdownPosition.d.ts +18 -0
- package/dist/components/dropdown/useDropdownPosition.d.ts.map +1 -0
- package/dist/components/example-frame/ExampleFrame.d.ts +53 -0
- package/dist/components/example-frame/ExampleFrame.d.ts.map +1 -0
- package/dist/components/file-upload/FileUpload.d.ts +176 -0
- package/dist/components/file-upload/FileUpload.d.ts.map +1 -0
- package/dist/components/file-upload/examples/avatar-upload.d.ts +6 -0
- package/dist/components/file-upload/examples/avatar-upload.d.ts.map +1 -0
- package/dist/components/file-upload/examples/controlled-list.d.ts +5 -0
- package/dist/components/file-upload/examples/controlled-list.d.ts.map +1 -0
- package/dist/components/file-upload/examples/document-attach.d.ts +5 -0
- package/dist/components/file-upload/examples/document-attach.d.ts.map +1 -0
- package/dist/components/file-upload/examples/drag-area.d.ts +5 -0
- package/dist/components/file-upload/examples/drag-area.d.ts.map +1 -0
- package/dist/components/hint/Hint.d.ts +27 -0
- package/dist/components/hint/Hint.d.ts.map +1 -0
- package/dist/components/hint/examples/error-hint.d.ts +3 -0
- package/dist/components/hint/examples/error-hint.d.ts.map +1 -0
- package/dist/components/hint/examples/field-help.d.ts +3 -0
- package/dist/components/hint/examples/field-help.d.ts.map +1 -0
- package/dist/components/hint/examples/inline-tip-form.d.ts +3 -0
- package/dist/components/hint/examples/inline-tip-form.d.ts.map +1 -0
- package/dist/components/hint/examples/success-confirmation.d.ts +6 -0
- package/dist/components/hint/examples/success-confirmation.d.ts.map +1 -0
- package/dist/components/hint/examples/with-icon.d.ts +3 -0
- package/dist/components/hint/examples/with-icon.d.ts.map +1 -0
- package/dist/components/index.css +6101 -5759
- package/dist/components/index.css.map +4 -4
- package/dist/components/index.d.ts +95 -2679
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +8510 -7659
- package/dist/components/index.js.map +4 -4
- package/dist/components/input/Input.d.ts +73 -0
- package/dist/components/input/Input.d.ts.map +1 -0
- package/dist/components/input/examples/checkout-full-width.d.ts +5 -0
- package/dist/components/input/examples/checkout-full-width.d.ts.map +1 -0
- package/dist/components/input/examples/login-email.d.ts +5 -0
- package/dist/components/input/examples/login-email.d.ts.map +1 -0
- package/dist/components/input/examples/password-with-hint.d.ts +5 -0
- package/dist/components/input/examples/password-with-hint.d.ts.map +1 -0
- package/dist/components/input/examples/search.d.ts +5 -0
- package/dist/components/input/examples/search.d.ts.map +1 -0
- package/dist/components/kbd/Kbd.d.ts +15 -0
- package/dist/components/kbd/Kbd.d.ts.map +1 -0
- package/dist/components/kbd/examples/combination-keys.d.ts +3 -0
- package/dist/components/kbd/examples/combination-keys.d.ts.map +1 -0
- package/dist/components/kbd/examples/docs-legend.d.ts +3 -0
- package/dist/components/kbd/examples/docs-legend.d.ts.map +1 -0
- package/dist/components/kbd/examples/inline-doc-hint.d.ts +3 -0
- package/dist/components/kbd/examples/inline-doc-hint.d.ts.map +1 -0
- package/dist/components/kbd/examples/shortcut-row.d.ts +3 -0
- package/dist/components/kbd/examples/shortcut-row.d.ts.map +1 -0
- package/dist/components/kbd/examples/toolbar-hints.d.ts +3 -0
- package/dist/components/kbd/examples/toolbar-hints.d.ts.map +1 -0
- package/dist/components/label/Label.d.ts +29 -0
- package/dist/components/label/Label.d.ts.map +1 -0
- package/dist/components/label/examples/accessibility-pattern.d.ts +6 -0
- package/dist/components/label/examples/accessibility-pattern.d.ts.map +1 -0
- package/dist/components/label/examples/grouped-labels.d.ts +6 -0
- package/dist/components/label/examples/grouped-labels.d.ts.map +1 -0
- package/dist/components/label/examples/optional-field.d.ts +3 -0
- package/dist/components/label/examples/optional-field.d.ts.map +1 -0
- package/dist/components/label/examples/required-field.d.ts +3 -0
- package/dist/components/label/examples/required-field.d.ts.map +1 -0
- package/dist/components/label/examples/with-icon.d.ts +3 -0
- package/dist/components/label/examples/with-icon.d.ts.map +1 -0
- package/dist/components/link-button/LinkButton.d.ts +18 -0
- package/dist/components/link-button/LinkButton.d.ts.map +1 -0
- package/dist/components/link-button/examples/disabled.d.ts +6 -0
- package/dist/components/link-button/examples/disabled.d.ts.map +1 -0
- package/dist/components/link-button/examples/external.d.ts +3 -0
- package/dist/components/link-button/examples/external.d.ts.map +1 -0
- package/dist/components/link-button/examples/footer-legal.d.ts +3 -0
- package/dist/components/link-button/examples/footer-legal.d.ts.map +1 -0
- package/dist/components/link-button/examples/inline-text-link.d.ts +3 -0
- package/dist/components/link-button/examples/inline-text-link.d.ts.map +1 -0
- package/dist/components/link-button/examples/navigation-cluster.d.ts +3 -0
- package/dist/components/link-button/examples/navigation-cluster.d.ts.map +1 -0
- package/dist/components/modal/Modal.d.ts +58 -0
- package/dist/components/modal/Modal.d.ts.map +1 -0
- package/dist/components/modal/examples/canonical-maximal.d.ts +6 -0
- package/dist/components/modal/examples/canonical-maximal.d.ts.map +1 -0
- package/dist/components/modal/examples/scenario-confirm-delete.d.ts +3 -0
- package/dist/components/modal/examples/scenario-confirm-delete.d.ts.map +1 -0
- package/dist/components/modal/examples/scenario-edit-entity.d.ts +3 -0
- package/dist/components/modal/examples/scenario-edit-entity.d.ts.map +1 -0
- package/dist/components/modal/examples/scenario-legal-consent.d.ts +3 -0
- package/dist/components/modal/examples/scenario-legal-consent.d.ts.map +1 -0
- package/dist/components/modal/examples/scenario-multi-field-form.d.ts +3 -0
- package/dist/components/modal/examples/scenario-multi-field-form.d.ts.map +1 -0
- package/dist/components/notification/Notification.d.ts +42 -0
- package/dist/components/notification/Notification.d.ts.map +1 -0
- package/dist/components/notification/NotificationStore.d.ts +18 -0
- package/dist/components/notification/NotificationStore.d.ts.map +1 -0
- package/dist/components/notification/examples/action-toast.d.ts +2 -0
- package/dist/components/notification/examples/action-toast.d.ts.map +1 -0
- package/dist/components/notification/examples/error-success.d.ts +2 -0
- package/dist/components/notification/examples/error-success.d.ts.map +1 -0
- package/dist/components/notification/examples/notification-store.d.ts +2 -0
- package/dist/components/notification/examples/notification-store.d.ts.map +1 -0
- package/dist/components/notification/examples/positions.d.ts +2 -0
- package/dist/components/notification/examples/positions.d.ts.map +1 -0
- package/dist/components/notification/examples/toast-queue.d.ts +2 -0
- package/dist/components/notification/examples/toast-queue.d.ts.map +1 -0
- package/dist/components/page-content/PageContent.d.ts +51 -0
- package/dist/components/page-content/PageContent.d.ts.map +1 -0
- package/dist/components/pagination/Pagination.d.ts +19 -0
- package/dist/components/pagination/Pagination.d.ts.map +1 -0
- package/dist/components/pagination/examples/canonical-composition.d.ts +5 -0
- package/dist/components/pagination/examples/canonical-composition.d.ts.map +1 -0
- package/dist/components/pagination/examples/compact.d.ts +3 -0
- package/dist/components/pagination/examples/compact.d.ts.map +1 -0
- package/dist/components/pagination/examples/controlled-page.d.ts +3 -0
- package/dist/components/pagination/examples/controlled-page.d.ts.map +1 -0
- package/dist/components/pagination/examples/full-width-list.d.ts +3 -0
- package/dist/components/pagination/examples/full-width-list.d.ts.map +1 -0
- package/dist/components/pagination/examples/table-footer.d.ts +3 -0
- package/dist/components/pagination/examples/table-footer.d.ts.map +1 -0
- package/dist/components/popover/Popover.d.ts +48 -0
- package/dist/components/popover/Popover.d.ts.map +1 -0
- package/dist/components/popover/examples/canonical-panel.d.ts +5 -0
- package/dist/components/popover/examples/canonical-panel.d.ts.map +1 -0
- package/dist/components/popover/examples/date-trigger.d.ts +5 -0
- package/dist/components/popover/examples/date-trigger.d.ts.map +1 -0
- package/dist/components/popover/examples/form-in-popover.d.ts +5 -0
- package/dist/components/popover/examples/form-in-popover.d.ts.map +1 -0
- package/dist/components/popover/examples/placement.d.ts +5 -0
- package/dist/components/popover/examples/placement.d.ts.map +1 -0
- package/dist/components/popover/examples/rich-content.d.ts +5 -0
- package/dist/components/popover/examples/rich-content.d.ts.map +1 -0
- package/dist/components/popover/popoverGeometry.d.ts +6 -0
- package/dist/components/popover/popoverGeometry.d.ts.map +1 -0
- package/dist/components/popover/usePopoverPosition.d.ts +18 -0
- package/dist/components/popover/usePopoverPosition.d.ts.map +1 -0
- package/dist/components/progress-bar/ProgressBar.d.ts +14 -0
- package/dist/components/progress-bar/ProgressBar.d.ts.map +1 -0
- package/dist/components/progress-bar/examples/indeterminate-busy-state.d.ts +6 -0
- package/dist/components/progress-bar/examples/indeterminate-busy-state.d.ts.map +1 -0
- package/dist/components/progress-bar/examples/labeled.d.ts +3 -0
- package/dist/components/progress-bar/examples/labeled.d.ts.map +1 -0
- package/dist/components/progress-bar/examples/step-progress.d.ts +3 -0
- package/dist/components/progress-bar/examples/step-progress.d.ts.map +1 -0
- package/dist/components/progress-bar/examples/upload-progress.d.ts +3 -0
- package/dist/components/progress-bar/examples/upload-progress.d.ts.map +1 -0
- package/dist/components/progress-bar/examples/wizard-composition.d.ts +3 -0
- package/dist/components/progress-bar/examples/wizard-composition.d.ts.map +1 -0
- package/dist/components/progress-circle/ProgressCircle.d.ts +33 -0
- package/dist/components/progress-circle/ProgressCircle.d.ts.map +1 -0
- package/dist/components/progress-circle/examples/a11y-label.d.ts +6 -0
- package/dist/components/progress-circle/examples/a11y-label.d.ts.map +1 -0
- package/dist/components/progress-circle/examples/composition.d.ts +3 -0
- package/dist/components/progress-circle/examples/composition.d.ts.map +1 -0
- package/dist/components/progress-circle/examples/controlled.d.ts +3 -0
- package/dist/components/progress-circle/examples/controlled.d.ts.map +1 -0
- package/dist/components/progress-circle/examples/dashboard-ring.d.ts +3 -0
- package/dist/components/progress-circle/examples/dashboard-ring.d.ts.map +1 -0
- package/dist/components/progress-circle/examples/max-scale.d.ts +3 -0
- package/dist/components/progress-circle/examples/max-scale.d.ts.map +1 -0
- package/dist/components/radio/Radio.d.ts +40 -0
- package/dist/components/radio/Radio.d.ts.map +1 -0
- package/dist/components/radio/examples/notification-channel.d.ts +3 -0
- package/dist/components/radio/examples/notification-channel.d.ts.map +1 -0
- package/dist/components/radio/examples/plan-picker.d.ts +3 -0
- package/dist/components/radio/examples/plan-picker.d.ts.map +1 -0
- package/dist/components/radio/examples/settings-group.d.ts +3 -0
- package/dist/components/radio/examples/settings-group.d.ts.map +1 -0
- package/dist/components/radio/examples/shipping-method.d.ts +3 -0
- package/dist/components/radio/examples/shipping-method.d.ts.map +1 -0
- package/dist/components/scroll-container/ScrollContainer.d.ts +42 -0
- package/dist/components/scroll-container/ScrollContainer.d.ts.map +1 -0
- package/dist/components/segmented-control/SegmentedControl.d.ts +40 -0
- package/dist/components/segmented-control/SegmentedControl.d.ts.map +1 -0
- package/dist/components/segmented-control/examples/canonical-composition.d.ts +5 -0
- package/dist/components/segmented-control/examples/canonical-composition.d.ts.map +1 -0
- package/dist/components/segmented-control/examples/catalog-filters.d.ts +5 -0
- package/dist/components/segmented-control/examples/catalog-filters.d.ts.map +1 -0
- package/dist/components/segmented-control/examples/pricing-toggle.d.ts +5 -0
- package/dist/components/segmented-control/examples/pricing-toggle.d.ts.map +1 -0
- package/dist/components/segmented-control/examples/view-mode.d.ts +5 -0
- package/dist/components/segmented-control/examples/view-mode.d.ts.map +1 -0
- package/dist/components/segmented-progress-bar/SegmentedProgressBar.d.ts +22 -0
- package/dist/components/segmented-progress-bar/SegmentedProgressBar.d.ts.map +1 -0
- package/dist/components/segmented-progress-bar/examples/distribution-breakdown.d.ts +3 -0
- package/dist/components/segmented-progress-bar/examples/distribution-breakdown.d.ts.map +1 -0
- package/dist/components/segmented-progress-bar/examples/multi-phase-rollout.d.ts +3 -0
- package/dist/components/segmented-progress-bar/examples/multi-phase-rollout.d.ts.map +1 -0
- package/dist/components/segmented-progress-bar/examples/segment-gaps.d.ts +3 -0
- package/dist/components/segmented-progress-bar/examples/segment-gaps.d.ts.map +1 -0
- package/dist/components/segmented-progress-bar/examples/size-ladder.d.ts +3 -0
- package/dist/components/segmented-progress-bar/examples/size-ladder.d.ts.map +1 -0
- package/dist/components/segmented-progress-bar/examples/storage-mix.d.ts +3 -0
- package/dist/components/segmented-progress-bar/examples/storage-mix.d.ts.map +1 -0
- package/dist/components/select/Select.d.ts +84 -0
- package/dist/components/select/Select.d.ts.map +1 -0
- package/dist/components/select/examples/01-country.d.ts +6 -0
- package/dist/components/select/examples/01-country.d.ts.map +1 -0
- package/dist/components/select/examples/02-controlled.d.ts +5 -0
- package/dist/components/select/examples/02-controlled.d.ts.map +1 -0
- package/dist/components/select/examples/03-groups.d.ts +5 -0
- package/dist/components/select/examples/03-groups.d.ts.map +1 -0
- package/dist/components/select/examples/04-full-width-form.d.ts +6 -0
- package/dist/components/select/examples/04-full-width-form.d.ts.map +1 -0
- package/dist/components/select/selectListbox.d.ts +13 -0
- package/dist/components/select/selectListbox.d.ts.map +1 -0
- package/dist/components/slider/Slider.d.ts +23 -0
- package/dist/components/slider/Slider.d.ts.map +1 -0
- package/dist/components/slider/examples/01-volume.d.ts +5 -0
- package/dist/components/slider/examples/01-volume.d.ts.map +1 -0
- package/dist/components/slider/examples/02-price-range.d.ts +5 -0
- package/dist/components/slider/examples/02-price-range.d.ts.map +1 -0
- package/dist/components/slider/examples/03-controlled.d.ts +5 -0
- package/dist/components/slider/examples/03-controlled.d.ts.map +1 -0
- package/dist/components/slider/examples/04-disabled.d.ts +5 -0
- package/dist/components/slider/examples/04-disabled.d.ts.map +1 -0
- package/dist/components/stepper/HorizontalStepper.d.ts +41 -0
- package/dist/components/stepper/HorizontalStepper.d.ts.map +1 -0
- package/dist/components/stepper/Stepper.d.ts +77 -0
- package/dist/components/stepper/Stepper.d.ts.map +1 -0
- package/dist/components/stepper/VerticalStepper.d.ts +41 -0
- package/dist/components/stepper/VerticalStepper.d.ts.map +1 -0
- package/dist/components/stepper/examples/01-checkout-horizontal.d.ts +5 -0
- package/dist/components/stepper/examples/01-checkout-horizontal.d.ts.map +1 -0
- package/dist/components/stepper/examples/02-onboarding-vertical.d.ts +5 -0
- package/dist/components/stepper/examples/02-onboarding-vertical.d.ts.map +1 -0
- package/dist/components/stepper/examples/03-vertical-primitive-rail.d.ts +5 -0
- package/dist/components/stepper/examples/03-vertical-primitive-rail.d.ts.map +1 -0
- package/dist/components/stepper/examples/04-checkout-step-error.d.ts +6 -0
- package/dist/components/stepper/examples/04-checkout-step-error.d.ts.map +1 -0
- package/dist/components/stepper/examples/05-horizontal-primitive.d.ts +5 -0
- package/dist/components/stepper/examples/05-horizontal-primitive.d.ts.map +1 -0
- package/dist/components/stepper/stepperAlignContext.d.ts +11 -0
- package/dist/components/stepper/stepperAlignContext.d.ts.map +1 -0
- package/dist/components/switch/Switch.d.ts +48 -0
- package/dist/components/switch/Switch.d.ts.map +1 -0
- package/dist/components/switch/examples/canonical-maximal.d.ts +5 -0
- package/dist/components/switch/examples/canonical-maximal.d.ts.map +1 -0
- package/dist/components/switch/examples/scenario-billing-annual.d.ts +5 -0
- package/dist/components/switch/examples/scenario-billing-annual.d.ts.map +1 -0
- package/dist/components/switch/examples/scenario-feature-flag.d.ts +5 -0
- package/dist/components/switch/examples/scenario-feature-flag.d.ts.map +1 -0
- package/dist/components/switch/examples/scenario-form-consent.d.ts +5 -0
- package/dist/components/switch/examples/scenario-form-consent.d.ts.map +1 -0
- package/dist/components/switch/examples/scenario-settings-toggle.d.ts +5 -0
- package/dist/components/switch/examples/scenario-settings-toggle.d.ts.map +1 -0
- package/dist/components/tabs/Tabs.d.ts +69 -0
- package/dist/components/tabs/Tabs.d.ts.map +1 -0
- package/dist/components/tabs/examples/01-settings-vertical-rail.d.ts +6 -0
- package/dist/components/tabs/examples/01-settings-vertical-rail.d.ts.map +1 -0
- package/dist/components/tabs/examples/02-dashboard-subviews.d.ts +6 -0
- package/dist/components/tabs/examples/02-dashboard-subviews.d.ts.map +1 -0
- package/dist/components/tabs/examples/03-tab-triggers-with-icons.d.ts +6 -0
- package/dist/components/tabs/examples/03-tab-triggers-with-icons.d.ts.map +1 -0
- package/dist/components/tabs/examples/04-long-labels-narrow.d.ts +6 -0
- package/dist/components/tabs/examples/04-long-labels-narrow.d.ts.map +1 -0
- package/dist/components/tabs/examples/05-controlled-active-tab.d.ts +6 -0
- package/dist/components/tabs/examples/05-controlled-active-tab.d.ts.map +1 -0
- package/dist/components/tag/Tag.d.ts +29 -0
- package/dist/components/tag/Tag.d.ts.map +1 -0
- package/dist/components/tag/examples/01-filter-chips.d.ts +5 -0
- package/dist/components/tag/examples/01-filter-chips.d.ts.map +1 -0
- package/dist/components/tag/examples/02-removable-selected-values.d.ts +6 -0
- package/dist/components/tag/examples/02-removable-selected-values.d.ts.map +1 -0
- package/dist/components/tag/examples/03-status-metadata.d.ts +5 -0
- package/dist/components/tag/examples/03-status-metadata.d.ts.map +1 -0
- package/dist/components/tag/examples/04-tag-sizes.d.ts +3 -0
- package/dist/components/tag/examples/04-tag-sizes.d.ts.map +1 -0
- package/dist/components/textarea/Textarea.d.ts +43 -0
- package/dist/components/textarea/Textarea.d.ts.map +1 -0
- package/dist/components/textarea/examples/01-support-ticket.d.ts +5 -0
- package/dist/components/textarea/examples/01-support-ticket.d.ts.map +1 -0
- package/dist/components/textarea/examples/02-comment.d.ts +5 -0
- package/dist/components/textarea/examples/02-comment.d.ts.map +1 -0
- package/dist/components/textarea/examples/03-controlled.d.ts +5 -0
- package/dist/components/textarea/examples/03-controlled.d.ts.map +1 -0
- package/dist/components/textarea/examples/04-full-width.d.ts +5 -0
- package/dist/components/textarea/examples/04-full-width.d.ts.map +1 -0
- package/dist/components/tooltip/Tooltip.d.ts +47 -0
- package/dist/components/tooltip/Tooltip.d.ts.map +1 -0
- package/dist/components/tooltip/examples/canonical-icon-hint.d.ts +5 -0
- package/dist/components/tooltip/examples/canonical-icon-hint.d.ts.map +1 -0
- package/dist/components/tooltip/examples/scenario-controlled-programmatic.d.ts +5 -0
- package/dist/components/tooltip/examples/scenario-controlled-programmatic.d.ts.map +1 -0
- package/dist/components/tooltip/examples/scenario-delay-provider.d.ts +5 -0
- package/dist/components/tooltip/examples/scenario-delay-provider.d.ts.map +1 -0
- package/dist/components/tooltip/examples/scenario-long-content.d.ts +5 -0
- package/dist/components/tooltip/examples/scenario-long-content.d.ts.map +1 -0
- package/dist/components/tooltip/examples/scenario-side-bottom.d.ts +5 -0
- package/dist/components/tooltip/examples/scenario-side-bottom.d.ts.map +1 -0
- package/dist/components/typography/Typography.d.ts +30 -0
- package/dist/components/typography/Typography.d.ts.map +1 -0
- package/dist/components/typography/examples/01-article.d.ts +5 -0
- package/dist/components/typography/examples/01-article.d.ts.map +1 -0
- package/dist/components/typography/examples/02-form-labels-contrast.d.ts +6 -0
- package/dist/components/typography/examples/02-form-labels-contrast.d.ts.map +1 -0
- package/dist/components/typography/examples/03-marketing-hero.d.ts +3 -0
- package/dist/components/typography/examples/03-marketing-hero.d.ts.map +1 -0
- package/dist/components/typography/examples/04-reading-scale.d.ts +3 -0
- package/dist/components/typography/examples/04-reading-scale.d.ts.map +1 -0
- package/dist/components/typography/examples/05-inline-emphasis.d.ts +3 -0
- package/dist/components/typography/examples/05-inline-emphasis.d.ts.map +1 -0
- package/dist/hooks/useControllableState.d.ts +8 -0
- package/dist/hooks/useControllableState.d.ts.map +1 -0
- package/dist/hooks/useEscapeKey.d.ts +7 -0
- package/dist/hooks/useEscapeKey.d.ts.map +1 -0
- package/dist/hooks/useFieldIds.d.ts +17 -0
- package/dist/hooks/useFieldIds.d.ts.map +1 -0
- package/dist/hooks/useFocusTrap.d.ts +16 -0
- package/dist/hooks/useFocusTrap.d.ts.map +1 -0
- package/dist/hooks/useMergedRefs.d.ts +3 -0
- package/dist/hooks/useMergedRefs.d.ts.map +1 -0
- package/dist/hooks/useOutsideClick.d.ts +16 -0
- package/dist/hooks/useOutsideClick.d.ts.map +1 -0
- package/dist/hooks/useOverlayModal.d.ts +7 -0
- package/dist/hooks/useOverlayModal.d.ts.map +1 -0
- package/dist/hooks/usePosition.d.ts +41 -0
- package/dist/hooks/usePosition.d.ts.map +1 -0
- package/dist/hooks/useResponsiveMonths.d.ts +18 -0
- package/dist/hooks/useResponsiveMonths.d.ts.map +1 -0
- package/dist/hooks/useScrollLock.d.ts +8 -0
- package/dist/hooks/useScrollLock.d.ts.map +1 -0
- package/dist/icons/Icon.d.ts +13 -0
- package/dist/icons/Icon.d.ts.map +1 -0
- package/dist/icons/index.d.ts +40 -0
- package/dist/icons/index.d.ts.map +1 -0
- package/dist/index.css +6101 -5759
- package/dist/index.css.map +4 -4
- package/dist/index.d.ts +4 -8
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8509 -7660
- package/dist/index.js.map +4 -4
- package/dist/internal/ControlSizeContext.d.ts +17 -0
- package/dist/internal/ControlSizeContext.d.ts.map +1 -0
- package/dist/internal/DividerContentContext.d.ts +4 -0
- package/dist/internal/DividerContentContext.d.ts.map +1 -0
- package/dist/internal/OverlayPortalLayerContext.d.ts +13 -0
- package/dist/internal/OverlayPortalLayerContext.d.ts.map +1 -0
- package/dist/internal/Portal.d.ts +8 -0
- package/dist/internal/Portal.d.ts.map +1 -0
- package/dist/internal/context.d.ts +11 -0
- package/dist/internal/context.d.ts.map +1 -0
- package/dist/internal/cx.d.ts +2 -0
- package/dist/internal/cx.d.ts.map +1 -0
- package/dist/internal/data-attributes.d.ts +6 -0
- package/dist/internal/data-attributes.d.ts.map +1 -0
- package/dist/internal/highlightTsxHtml.d.ts +3 -0
- package/dist/internal/highlightTsxHtml.d.ts.map +1 -0
- package/dist/internal/layoutPxFromPrimitives.d.ts +13 -0
- package/dist/internal/layoutPxFromPrimitives.d.ts.map +1 -0
- package/dist/internal/mergeRefs.d.ts +4 -0
- package/dist/internal/mergeRefs.d.ts.map +1 -0
- package/dist/internal/runtimeUnits.d.ts +3 -0
- package/dist/internal/runtimeUnits.d.ts.map +1 -0
- package/dist/internal/scrollAncestors.d.ts +3 -0
- package/dist/internal/scrollAncestors.d.ts.map +1 -0
- package/dist/internal/slot.d.ts +19 -0
- package/dist/internal/slot.d.ts.map +1 -0
- package/dist/internal/states.d.ts +87 -0
- package/dist/internal/states.d.ts.map +1 -0
- package/dist/layout/app-shell/AppShell.d.ts +54 -0
- package/dist/layout/app-shell/AppShell.d.ts.map +1 -0
- package/dist/layout/index.d.ts +7 -0
- package/dist/layout/index.d.ts.map +1 -0
- package/dist/layout/sidebar/Sidebar.d.ts +241 -0
- package/dist/layout/sidebar/Sidebar.d.ts.map +1 -0
- package/dist/layout/sidebar/SidebarRoot.d.ts +51 -0
- package/dist/layout/sidebar/SidebarRoot.d.ts.map +1 -0
- package/dist/layout/sidebar/examples/01-app-shell-nav.d.ts +5 -0
- package/dist/layout/sidebar/examples/01-app-shell-nav.d.ts.map +1 -0
- package/dist/layout/sidebar/examples/02-collapsible-desktop.d.ts +6 -0
- package/dist/layout/sidebar/examples/02-collapsible-desktop.d.ts.map +1 -0
- package/dist/layout/sidebar/examples/03-controlled-state.d.ts +5 -0
- package/dist/layout/sidebar/examples/03-controlled-state.d.ts.map +1 -0
- package/dist/layout/sidebar/examples/04-router-navigation.d.ts +6 -0
- package/dist/layout/sidebar/examples/04-router-navigation.d.ts.map +1 -0
- package/dist/layout/sidebar/examples/05-responsive-behavior.d.ts +7 -0
- package/dist/layout/sidebar/examples/05-responsive-behavior.d.ts.map +1 -0
- package/dist/layout/sidebar/sidebar-context.d.ts +19 -0
- package/dist/layout/sidebar/sidebar-context.d.ts.map +1 -0
- package/dist/layout/sidebar/sidebarLayout.d.ts +12 -0
- package/dist/layout/sidebar/sidebarLayout.d.ts.map +1 -0
- package/dist/tokens/primitives.d.ts +390 -0
- package/dist/tokens/primitives.d.ts.map +1 -0
- package/dist/tokens/semantic.d.ts +732 -0
- package/dist/tokens/semantic.d.ts.map +1 -0
- package/dist/tokens/themes/dark.d.ts +143 -0
- package/dist/tokens/themes/dark.d.ts.map +1 -0
- package/dist/tokens/themes/light.d.ts +16 -0
- package/dist/tokens/themes/light.d.ts.map +1 -0
- package/package.json +12 -4
- package/src/components/accordion/COMPONENT.md +190 -0
- package/src/components/accordion/examples/01-faq-marketing.tsx +62 -0
- package/src/components/accordion/examples/02-settings-panels.tsx +67 -0
- package/src/components/accordion/examples/03-checkout-order-summary.tsx +87 -0
- package/src/components/accordion/examples/04-api-docs-sections.tsx +86 -0
- package/src/components/accordion/examples/05-knowledge-base-categories.tsx +65 -0
- package/src/components/accordion/examples/examples.module.css +30 -0
- package/src/components/avatar/COMPONENT.md +152 -0
- package/src/components/avatar/examples/app-header-nav.tsx +41 -0
- package/src/components/avatar/examples/comment-thread.tsx +57 -0
- package/src/components/avatar/examples/examples.module.css +72 -0
- package/src/components/avatar/examples/fallback-variants.tsx +33 -0
- package/src/components/avatar/examples/group-overflow.tsx +32 -0
- package/src/components/avatar/examples/team-list.tsx +45 -0
- package/src/components/badge/COMPONENT.md +101 -0
- package/src/components/badge/examples/admin-tags.tsx +35 -0
- package/src/components/badge/examples/canonical.tsx +6 -0
- package/src/components/badge/examples/ecommerce-inventory.tsx +35 -0
- package/src/components/badge/examples/inbox-labels.tsx +36 -0
- package/src/components/badge/examples/status-presence.tsx +32 -0
- package/src/components/banner/COMPONENT.md +145 -0
- package/src/components/banner/examples/billing-alert.tsx +35 -0
- package/src/components/banner/examples/cookie-consent-row.tsx +36 -0
- package/src/components/banner/examples/feature-promo.tsx +36 -0
- package/src/components/banner/examples/maintenance.tsx +23 -0
- package/src/components/breadcrumb/COMPONENT.md +127 -0
- package/src/components/breadcrumb/examples/canonical.tsx +12 -0
- package/src/components/breadcrumb/examples/deep-documentation.tsx +16 -0
- package/src/components/breadcrumb/examples/ecommerce-product.tsx +18 -0
- package/src/components/breadcrumb/examples/long-path-ellipsis.tsx +21 -0
- package/src/components/breadcrumb/examples/saas-settings.tsx +16 -0
- package/src/components/button/COMPONENT.md +101 -0
- package/src/components/button/examples/canonical-composition.tsx +46 -0
- package/src/components/button/examples/destructive-confirm.tsx +36 -0
- package/src/components/button/examples/form-submit-row.tsx +33 -0
- package/src/components/button/examples/marketing-cta.tsx +26 -0
- package/src/components/button/examples/toolbar.tsx +38 -0
- package/src/components/button-group/COMPONENT.md +131 -0
- package/src/components/button-group/examples/editor-toolbar.tsx +46 -0
- package/src/components/button-group/examples/form-footer.tsx +19 -0
- package/src/components/button-group/examples/view-switcher.tsx +25 -0
- package/src/components/button-group/examples/wizard-actions.tsx +30 -0
- package/src/components/card/COMPONENT.md +307 -0
- package/src/components/card/examples/cover-banner.module.css +8 -0
- package/src/components/card/examples/cta-cover.tsx +44 -0
- package/src/components/card/examples/layout.module.css +7 -0
- package/src/components/card/examples/list-card.tsx +20 -0
- package/src/components/card/examples/media-mini.tsx +55 -0
- package/src/components/card/examples/metric-dashboard.tsx +60 -0
- package/src/components/card/examples/sparkline.module.css +10 -0
- package/src/components/card/examples/split-layout.tsx +29 -0
- package/src/components/checkbox/COMPONENT.md +129 -0
- package/src/components/checkbox/examples/bulk-select-rows.tsx +54 -0
- package/src/components/checkbox/examples/feature-flags-list.tsx +43 -0
- package/src/components/checkbox/examples/settings-panel.tsx +50 -0
- package/src/components/checkbox/examples/terms-acceptance.tsx +42 -0
- package/src/components/code-block/COMPONENT.md +88 -0
- package/src/components/code-block/examples/api-response-preview.tsx +21 -0
- package/src/components/code-block/examples/config-snippet.tsx +17 -0
- package/src/components/code-block/examples/error-stack.tsx +19 -0
- package/src/components/code-block/examples/minimal.tsx +6 -0
- package/src/components/code-block/examples/tutorial-step.tsx +28 -0
- package/src/components/color-picker/COMPONENT.md +171 -0
- package/src/components/color-picker/examples/brand-kit.tsx +48 -0
- package/src/components/color-picker/examples/controlled-form-field.tsx +40 -0
- package/src/components/color-picker/examples/minimal-popover.tsx +26 -0
- package/src/components/color-picker/examples/product-variant-swatch.tsx +42 -0
- package/src/components/color-picker/examples/theme-accent.tsx +46 -0
- package/src/components/command-menu/COMPONENT.md +195 -0
- package/src/components/command-menu/examples/app-palette.tsx +129 -0
- package/src/components/command-menu/examples/disabled-items.tsx +73 -0
- package/src/components/command-menu/examples/file-search.tsx +98 -0
- package/src/components/command-menu/examples/quick-actions.tsx +74 -0
- package/src/components/data-table/COMPONENT.md +114 -0
- package/src/components/data-table/examples/canonical-orders.tsx +107 -0
- package/src/components/data-table/examples/controlled-sort-and-page.tsx +66 -0
- package/src/components/data-table/examples/infinite-scroll-load-more.tsx +63 -0
- package/src/components/data-table/examples/row-selection.tsx +90 -0
- package/src/components/data-table/examples/sticky-header-first-column.tsx +55 -0
- package/src/components/datepicker/COMPONENT.md +169 -0
- package/src/components/datepicker/examples/birthdate.tsx +43 -0
- package/src/components/datepicker/examples/booking.tsx +71 -0
- package/src/components/datepicker/examples/full-width-form.tsx +59 -0
- package/src/components/datepicker/examples/range-report.tsx +54 -0
- package/src/components/digit-input/COMPONENT.md +100 -0
- package/src/components/digit-input/examples/error-state.tsx +14 -0
- package/src/components/digit-input/examples/otp-login.tsx +17 -0
- package/src/components/digit-input/examples/pin.tsx +11 -0
- package/src/components/digit-input/examples/resend-and-clear.tsx +23 -0
- package/src/components/digit-input/examples/verification-step.tsx +21 -0
- package/src/components/divider/COMPONENT.md +98 -0
- package/src/components/divider/examples/card-splits.tsx +27 -0
- package/src/components/divider/examples/divider-examples.module.css +137 -0
- package/src/components/divider/examples/inset-stack.tsx +33 -0
- package/src/components/divider/examples/line-spacing-column.tsx +27 -0
- package/src/components/divider/examples/list-separators.tsx +20 -0
- package/src/components/divider/examples/section-breaks.tsx +27 -0
- package/src/components/drawer/COMPONENT.md +149 -0
- package/src/components/drawer/examples/cart-preview.tsx +55 -0
- package/src/components/drawer/examples/examples-scenarios.module.css +79 -0
- package/src/components/drawer/examples/explicit-panel.tsx +40 -0
- package/src/components/drawer/examples/filters-panel.tsx +53 -0
- package/src/components/drawer/examples/mobile-nav-sheet.tsx +43 -0
- package/src/components/drawer/examples/settings-side.tsx +54 -0
- package/src/components/dropdown/COMPONENT.md +231 -0
- package/src/components/dropdown/examples/account-menu.tsx +52 -0
- package/src/components/dropdown/examples/actions-menu.tsx +37 -0
- package/src/components/dropdown/examples/placement-demo.tsx +59 -0
- package/src/components/dropdown/examples/select-like-list.tsx +31 -0
- package/src/components/file-upload/COMPONENT.md +229 -0
- package/src/components/file-upload/examples/avatar-upload.tsx +54 -0
- package/src/components/file-upload/examples/controlled-list.tsx +103 -0
- package/src/components/file-upload/examples/document-attach.tsx +70 -0
- package/src/components/file-upload/examples/drag-area.tsx +49 -0
- package/src/components/hint/COMPONENT.md +99 -0
- package/src/components/hint/examples/error-hint.tsx +22 -0
- package/src/components/hint/examples/field-help.tsx +27 -0
- package/src/components/hint/examples/inline-tip-form.tsx +44 -0
- package/src/components/hint/examples/success-confirmation.tsx +30 -0
- package/src/components/hint/examples/with-icon.tsx +13 -0
- package/src/components/input/COMPONENT.md +139 -0
- package/src/components/input/examples/checkout-full-width.module.css +8 -0
- package/src/components/input/examples/checkout-full-width.tsx +39 -0
- package/src/components/input/examples/login-email.tsx +33 -0
- package/src/components/input/examples/password-with-hint.tsx +28 -0
- package/src/components/input/examples/search.tsx +30 -0
- package/src/components/kbd/COMPONENT.md +87 -0
- package/src/components/kbd/examples/combination-keys.tsx +22 -0
- package/src/components/kbd/examples/docs-legend.tsx +44 -0
- package/src/components/kbd/examples/inline-doc-hint.tsx +18 -0
- package/src/components/kbd/examples/shortcut-row.tsx +21 -0
- package/src/components/kbd/examples/toolbar-hints.tsx +31 -0
- package/src/components/label/COMPONENT.md +125 -0
- package/src/components/label/examples/accessibility-pattern.tsx +28 -0
- package/src/components/label/examples/grouped-labels.tsx +30 -0
- package/src/components/label/examples/optional-field.tsx +14 -0
- package/src/components/label/examples/required-field.tsx +20 -0
- package/src/components/label/examples/with-icon.tsx +16 -0
- package/src/components/link-button/COMPONENT.md +79 -0
- package/src/components/link-button/examples/disabled.tsx +18 -0
- package/src/components/link-button/examples/external.tsx +18 -0
- package/src/components/link-button/examples/footer-legal.tsx +22 -0
- package/src/components/link-button/examples/inline-text-link.tsx +14 -0
- package/src/components/link-button/examples/navigation-cluster.tsx +24 -0
- package/src/components/modal/COMPONENT.md +176 -0
- package/src/components/modal/examples/canonical-maximal.tsx +43 -0
- package/src/components/modal/examples/examples.module.css +13 -0
- package/src/components/modal/examples/scenario-confirm-delete.tsx +38 -0
- package/src/components/modal/examples/scenario-edit-entity.tsx +50 -0
- package/src/components/modal/examples/scenario-legal-consent.tsx +36 -0
- package/src/components/modal/examples/scenario-multi-field-form.tsx +75 -0
- package/src/components/notification/COMPONENT.md +150 -0
- package/src/components/notification/examples/action-toast.tsx +84 -0
- package/src/components/notification/examples/error-success.tsx +70 -0
- package/src/components/notification/examples/notification-store.tsx +58 -0
- package/src/components/notification/examples/positions.tsx +73 -0
- package/src/components/notification/examples/toast-queue.tsx +63 -0
- package/src/components/pagination/COMPONENT.md +101 -0
- package/src/components/pagination/examples/canonical-composition.tsx +20 -0
- package/src/components/pagination/examples/compact.tsx +32 -0
- package/src/components/pagination/examples/controlled-page.tsx +57 -0
- package/src/components/pagination/examples/full-width-list.tsx +37 -0
- package/src/components/pagination/examples/table-footer.tsx +74 -0
- package/src/components/popover/COMPONENT.md +157 -0
- package/src/components/popover/examples/canonical-panel.tsx +24 -0
- package/src/components/popover/examples/date-trigger.tsx +33 -0
- package/src/components/popover/examples/form-in-popover.tsx +79 -0
- package/src/components/popover/examples/placement.tsx +42 -0
- package/src/components/popover/examples/rich-content.tsx +39 -0
- package/src/components/progress-bar/COMPONENT.md +84 -0
- package/src/components/progress-bar/examples/indeterminate-busy-state.tsx +21 -0
- package/src/components/progress-bar/examples/labeled.tsx +6 -0
- package/src/components/progress-bar/examples/progress-bar-examples.module.css +22 -0
- package/src/components/progress-bar/examples/step-progress.tsx +23 -0
- package/src/components/progress-bar/examples/upload-progress.tsx +27 -0
- package/src/components/progress-bar/examples/wizard-composition.tsx +18 -0
- package/src/components/progress-circle/COMPONENT.md +93 -0
- package/src/components/progress-circle/examples/a11y-label.tsx +32 -0
- package/src/components/progress-circle/examples/composition.tsx +66 -0
- package/src/components/progress-circle/examples/controlled.tsx +58 -0
- package/src/components/progress-circle/examples/dashboard-ring.tsx +36 -0
- package/src/components/progress-circle/examples/max-scale.tsx +61 -0
- package/src/components/radio/COMPONENT.md +123 -0
- package/src/components/radio/examples/notification-channel.tsx +29 -0
- package/src/components/radio/examples/plan-picker.tsx +53 -0
- package/src/components/radio/examples/radio-examples.module.css +31 -0
- package/src/components/radio/examples/settings-group.tsx +30 -0
- package/src/components/radio/examples/shipping-method.tsx +26 -0
- package/src/components/segmented-control/COMPONENT.md +108 -0
- package/src/components/segmented-control/examples/canonical-composition.tsx +70 -0
- package/src/components/segmented-control/examples/catalog-filters.tsx +41 -0
- package/src/components/segmented-control/examples/pricing-toggle.tsx +40 -0
- package/src/components/segmented-control/examples/segmented-examples.module.css +12 -0
- package/src/components/segmented-control/examples/view-mode.tsx +53 -0
- package/src/components/segmented-progress-bar/COMPONENT.md +104 -0
- package/src/components/segmented-progress-bar/examples/distribution-breakdown.tsx +16 -0
- package/src/components/segmented-progress-bar/examples/multi-phase-rollout.tsx +15 -0
- package/src/components/segmented-progress-bar/examples/segment-gaps.tsx +23 -0
- package/src/components/segmented-progress-bar/examples/size-ladder.tsx +19 -0
- package/src/components/segmented-progress-bar/examples/storage-mix.tsx +16 -0
- package/src/components/select/COMPONENT.md +202 -0
- package/src/components/select/examples/01-country.tsx +37 -0
- package/src/components/select/examples/02-controlled.tsx +35 -0
- package/src/components/select/examples/03-groups.tsx +45 -0
- package/src/components/select/examples/04-full-width-form.tsx +51 -0
- package/src/components/select/examples/examples.module.css +37 -0
- package/src/components/slider/COMPONENT.md +78 -0
- package/src/components/slider/examples/01-volume.tsx +17 -0
- package/src/components/slider/examples/02-price-range.tsx +18 -0
- package/src/components/slider/examples/03-controlled.tsx +30 -0
- package/src/components/slider/examples/04-disabled.tsx +25 -0
- package/src/components/slider/examples/examples.module.css +17 -0
- package/src/components/stepper/COMPONENT.md +211 -0
- package/src/components/stepper/examples/01-checkout-horizontal.tsx +32 -0
- package/src/components/stepper/examples/02-onboarding-vertical.tsx +51 -0
- package/src/components/stepper/examples/03-vertical-primitive-rail.tsx +36 -0
- package/src/components/stepper/examples/04-checkout-step-error.tsx +30 -0
- package/src/components/stepper/examples/05-horizontal-primitive.tsx +37 -0
- package/src/components/stepper/examples/examples.module.css +16 -0
- package/src/components/switch/COMPONENT.md +144 -0
- package/src/components/switch/examples/canonical-maximal.tsx +19 -0
- package/src/components/switch/examples/examples.module.css +56 -0
- package/src/components/switch/examples/scenario-billing-annual.tsx +27 -0
- package/src/components/switch/examples/scenario-feature-flag.tsx +30 -0
- package/src/components/switch/examples/scenario-form-consent.tsx +34 -0
- package/src/components/switch/examples/scenario-settings-toggle.tsx +26 -0
- package/src/components/tabs/COMPONENT.md +141 -0
- package/src/components/tabs/examples/01-settings-vertical-rail.tsx +49 -0
- package/src/components/tabs/examples/02-dashboard-subviews.tsx +42 -0
- package/src/components/tabs/examples/03-tab-triggers-with-icons.tsx +49 -0
- package/src/components/tabs/examples/04-long-labels-narrow.tsx +35 -0
- package/src/components/tabs/examples/05-controlled-active-tab.tsx +48 -0
- package/src/components/tabs/examples/examples.module.css +58 -0
- package/src/components/tag/COMPONENT.md +82 -0
- package/src/components/tag/examples/01-filter-chips.tsx +36 -0
- package/src/components/tag/examples/02-removable-selected-values.tsx +33 -0
- package/src/components/tag/examples/03-status-metadata.tsx +24 -0
- package/src/components/tag/examples/04-tag-sizes.tsx +18 -0
- package/src/components/tag/examples/examples.module.css +20 -0
- package/src/components/textarea/COMPONENT.md +120 -0
- package/src/components/textarea/examples/01-support-ticket.tsx +35 -0
- package/src/components/textarea/examples/02-comment.tsx +35 -0
- package/src/components/textarea/examples/03-controlled.tsx +27 -0
- package/src/components/textarea/examples/04-full-width.tsx +23 -0
- package/src/components/textarea/examples/examples.module.css +21 -0
- package/src/components/tooltip/COMPONENT.md +144 -0
- package/src/components/tooltip/examples/canonical-icon-hint.tsx +19 -0
- package/src/components/tooltip/examples/examples.module.css +6 -0
- package/src/components/tooltip/examples/scenario-controlled-programmatic.tsx +32 -0
- package/src/components/tooltip/examples/scenario-delay-provider.tsx +19 -0
- package/src/components/tooltip/examples/scenario-long-content.tsx +22 -0
- package/src/components/tooltip/examples/scenario-side-bottom.tsx +21 -0
- package/src/components/typography/COMPONENT.md +113 -0
- package/src/components/typography/examples/01-article.tsx +45 -0
- package/src/components/typography/examples/02-form-labels-contrast.tsx +61 -0
- package/src/components/typography/examples/03-marketing-hero.tsx +25 -0
- package/src/components/typography/examples/04-reading-scale.tsx +47 -0
- package/src/components/typography/examples/05-inline-emphasis.tsx +30 -0
- package/src/components/typography/examples/examples.module.css +30 -0
- package/src/layout/sidebar/COMPONENT.md +138 -0
- package/src/layout/sidebar/examples/01-app-shell-nav.tsx +79 -0
- package/src/layout/sidebar/examples/02-collapsible-desktop.tsx +64 -0
- package/src/layout/sidebar/examples/03-controlled-state.tsx +72 -0
- package/src/layout/sidebar/examples/04-router-navigation.tsx +70 -0
- package/src/layout/sidebar/examples/05-responsive-behavior.tsx +46 -0
- package/src/layout/sidebar/examples/examples.module.css +67 -0
- package/src/styles/theme-dark.css +43 -0
- package/src/styles/theme-light.css +43 -0
- package/src/styles/tokens.css +23 -4
- package/src/styles/tokens.test.ts +0 -27
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { ArrowDown, ArrowUp, CornerDownLeft, Search } from "lucide-react";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
|
|
4
|
+
import { Button } from "@/components/button/Button";
|
|
5
|
+
import { CommandMenu } from "@/components/command-menu/CommandMenu";
|
|
6
|
+
|
|
7
|
+
const inputIconStyle: React.CSSProperties = {
|
|
8
|
+
width: "var(--prime-sys-size-control-m-icon)",
|
|
9
|
+
height: "var(--prime-sys-size-control-m-icon)",
|
|
10
|
+
color: "var(--prime-sys-color-content-muted)",
|
|
11
|
+
flexShrink: 0,
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const footerRowStyle: React.CSSProperties = {
|
|
15
|
+
display: "flex",
|
|
16
|
+
flexWrap: "wrap",
|
|
17
|
+
alignItems: "center",
|
|
18
|
+
gap: "var(--prime-sys-spacing-x3)",
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const footerHintStyle: React.CSSProperties = {
|
|
22
|
+
display: "flex",
|
|
23
|
+
alignItems: "center",
|
|
24
|
+
gap: "var(--prime-sys-spacing-x2)",
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const footerTextStyle: React.CSSProperties = {
|
|
28
|
+
fontSize: "var(--prime-sys-size-control-s-supportText)",
|
|
29
|
+
lineHeight: "var(--prime-sys-typography-body-lineHeight)",
|
|
30
|
+
color: "var(--prime-sys-color-content-secondary)",
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* App-wide command palette: routes and settings, keyboard legend in the footer.
|
|
35
|
+
*/
|
|
36
|
+
export default function CommandMenuExampleAppPalette() {
|
|
37
|
+
const [open, setOpen] = React.useState(false);
|
|
38
|
+
|
|
39
|
+
React.useEffect(() => {
|
|
40
|
+
const onKey = (e: KeyboardEvent) => {
|
|
41
|
+
if (e.key === "k" && (e.metaKey || e.ctrlKey)) {
|
|
42
|
+
e.preventDefault();
|
|
43
|
+
setOpen((v) => !v);
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
document.addEventListener("keydown", onKey);
|
|
47
|
+
return () => document.removeEventListener("keydown", onKey);
|
|
48
|
+
}, []);
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<>
|
|
52
|
+
<Button.Root size="m" variant="primary" onClick={() => setOpen(true)}>
|
|
53
|
+
Open palette (⌘K / Ctrl+K)
|
|
54
|
+
</Button.Root>
|
|
55
|
+
|
|
56
|
+
<CommandMenu.Dialog open={open} onOpenChange={setOpen} aria-labelledby="palette-title">
|
|
57
|
+
<CommandMenu.DialogTitle id="palette-title">Go to</CommandMenu.DialogTitle>
|
|
58
|
+
<CommandMenu.DialogDescription>
|
|
59
|
+
Type to filter pages and settings.
|
|
60
|
+
</CommandMenu.DialogDescription>
|
|
61
|
+
|
|
62
|
+
<CommandMenu.InputRow
|
|
63
|
+
leading={<Search style={inputIconStyle} strokeWidth={2} aria-hidden />}
|
|
64
|
+
>
|
|
65
|
+
<CommandMenu.Input placeholder="Where to…" aria-label="Search commands" />
|
|
66
|
+
</CommandMenu.InputRow>
|
|
67
|
+
|
|
68
|
+
<CommandMenu.List>
|
|
69
|
+
<CommandMenu.Group heading="Pages">
|
|
70
|
+
<CommandMenu.Item
|
|
71
|
+
value="dashboard"
|
|
72
|
+
keywords="home overview"
|
|
73
|
+
onSelect={() => setOpen(false)}
|
|
74
|
+
>
|
|
75
|
+
Dashboard
|
|
76
|
+
</CommandMenu.Item>
|
|
77
|
+
<CommandMenu.Item
|
|
78
|
+
value="reports"
|
|
79
|
+
keywords="analytics charts metrics"
|
|
80
|
+
onSelect={() => setOpen(false)}
|
|
81
|
+
>
|
|
82
|
+
Reports
|
|
83
|
+
</CommandMenu.Item>
|
|
84
|
+
<CommandMenu.Item
|
|
85
|
+
value="team"
|
|
86
|
+
keywords="people members"
|
|
87
|
+
onSelect={() => setOpen(false)}
|
|
88
|
+
>
|
|
89
|
+
Team
|
|
90
|
+
</CommandMenu.Item>
|
|
91
|
+
</CommandMenu.Group>
|
|
92
|
+
<CommandMenu.Group heading="Settings">
|
|
93
|
+
<CommandMenu.Item
|
|
94
|
+
value="account"
|
|
95
|
+
keywords="profile billing plan"
|
|
96
|
+
onSelect={() => setOpen(false)}
|
|
97
|
+
>
|
|
98
|
+
Account
|
|
99
|
+
</CommandMenu.Item>
|
|
100
|
+
</CommandMenu.Group>
|
|
101
|
+
</CommandMenu.List>
|
|
102
|
+
|
|
103
|
+
<CommandMenu.Footer>
|
|
104
|
+
<div style={footerRowStyle}>
|
|
105
|
+
<div style={footerHintStyle}>
|
|
106
|
+
<CommandMenu.FooterKeyBox>
|
|
107
|
+
<ArrowUp size={14} strokeWidth={2} aria-hidden />
|
|
108
|
+
</CommandMenu.FooterKeyBox>
|
|
109
|
+
<CommandMenu.FooterKeyBox>
|
|
110
|
+
<ArrowDown size={14} strokeWidth={2} aria-hidden />
|
|
111
|
+
</CommandMenu.FooterKeyBox>
|
|
112
|
+
<span style={footerTextStyle}>Navigate</span>
|
|
113
|
+
</div>
|
|
114
|
+
<div style={footerHintStyle}>
|
|
115
|
+
<CommandMenu.FooterKeyBox>
|
|
116
|
+
<CornerDownLeft size={14} strokeWidth={2} aria-hidden />
|
|
117
|
+
</CommandMenu.FooterKeyBox>
|
|
118
|
+
<span style={footerTextStyle}>Select</span>
|
|
119
|
+
</div>
|
|
120
|
+
<div style={footerHintStyle}>
|
|
121
|
+
<CommandMenu.FooterKeyBox tone="muted">Esc</CommandMenu.FooterKeyBox>
|
|
122
|
+
<span style={footerTextStyle}>Close</span>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
</CommandMenu.Footer>
|
|
126
|
+
</CommandMenu.Dialog>
|
|
127
|
+
</>
|
|
128
|
+
);
|
|
129
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { Search } from "lucide-react";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
|
|
4
|
+
import { Button } from "@/components/button/Button";
|
|
5
|
+
import { CommandMenu } from "@/components/command-menu/CommandMenu";
|
|
6
|
+
import { Typography } from "@/components/typography/Typography";
|
|
7
|
+
|
|
8
|
+
const inputIconStyle: React.CSSProperties = {
|
|
9
|
+
width: "var(--prime-sys-size-control-m-icon)",
|
|
10
|
+
height: "var(--prime-sys-size-control-m-icon)",
|
|
11
|
+
color: "var(--prime-sys-color-content-muted)",
|
|
12
|
+
flexShrink: 0,
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const footerStyle: React.CSSProperties = {
|
|
16
|
+
background: "var(--prime-sys-color-surface-default)",
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Items with `disabled` are omitted from the filtered list and keyboard order (not shown as gray rows).
|
|
21
|
+
* Use conditional rendering instead if you need a visible “locked” row.
|
|
22
|
+
*/
|
|
23
|
+
export default function CommandMenuExampleDisabledItems() {
|
|
24
|
+
const [open, setOpen] = React.useState(false);
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<>
|
|
28
|
+
<Button.Root size="m" variant="neutral" mode="stroke" onClick={() => setOpen(true)}>
|
|
29
|
+
Disabled items behavior
|
|
30
|
+
</Button.Root>
|
|
31
|
+
|
|
32
|
+
<CommandMenu.Dialog open={open} onOpenChange={setOpen} aria-labelledby="disabled-demo-title">
|
|
33
|
+
<CommandMenu.DialogTitle id="disabled-demo-title">Commands</CommandMenu.DialogTitle>
|
|
34
|
+
<CommandMenu.InputRow
|
|
35
|
+
leading={<Search style={inputIconStyle} strokeWidth={2} aria-hidden />}
|
|
36
|
+
>
|
|
37
|
+
<CommandMenu.Input placeholder="Try “delete”…" aria-label="Filter commands" />
|
|
38
|
+
</CommandMenu.InputRow>
|
|
39
|
+
<CommandMenu.List>
|
|
40
|
+
<CommandMenu.Group heading="Available">
|
|
41
|
+
<CommandMenu.Item value="save draft" keywords="write" onSelect={() => setOpen(false)}>
|
|
42
|
+
Save draft
|
|
43
|
+
</CommandMenu.Item>
|
|
44
|
+
<CommandMenu.Item
|
|
45
|
+
value="publish"
|
|
46
|
+
keywords="release ship"
|
|
47
|
+
onSelect={() => setOpen(false)}
|
|
48
|
+
>
|
|
49
|
+
Publish
|
|
50
|
+
</CommandMenu.Item>
|
|
51
|
+
</CommandMenu.Group>
|
|
52
|
+
{/* `disabled` items are excluded from visible options — this row never appears in the listbox */}
|
|
53
|
+
<CommandMenu.Group heading="Hidden when disabled">
|
|
54
|
+
<CommandMenu.Item
|
|
55
|
+
value="delete production database"
|
|
56
|
+
keywords="delete destroy danger"
|
|
57
|
+
disabled
|
|
58
|
+
onSelect={() => setOpen(false)}
|
|
59
|
+
>
|
|
60
|
+
Delete production (disabled in code)
|
|
61
|
+
</CommandMenu.Item>
|
|
62
|
+
</CommandMenu.Group>
|
|
63
|
+
</CommandMenu.List>
|
|
64
|
+
<CommandMenu.Footer style={footerStyle}>
|
|
65
|
+
<Typography.Root variant="body-compact" tone="muted">
|
|
66
|
+
Searching “delete” finds no option: the dangerous action is disabled and removed from
|
|
67
|
+
the palette, not listed as inactive.
|
|
68
|
+
</Typography.Root>
|
|
69
|
+
</CommandMenu.Footer>
|
|
70
|
+
</CommandMenu.Dialog>
|
|
71
|
+
</>
|
|
72
|
+
);
|
|
73
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { File, FileCode, Search } from "lucide-react";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
|
|
4
|
+
import { Button } from "@/components/button/Button";
|
|
5
|
+
import { CommandMenu } from "@/components/command-menu/CommandMenu";
|
|
6
|
+
|
|
7
|
+
const inputIconStyle: React.CSSProperties = {
|
|
8
|
+
width: "var(--prime-sys-size-control-m-icon)",
|
|
9
|
+
height: "var(--prime-sys-size-control-m-icon)",
|
|
10
|
+
color: "var(--prime-sys-color-content-muted)",
|
|
11
|
+
flexShrink: 0,
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
type FileRow = { id: string; label: string; value: string; keywords: string };
|
|
15
|
+
|
|
16
|
+
const FILES: FileRow[] = [
|
|
17
|
+
{
|
|
18
|
+
id: "1",
|
|
19
|
+
label: "README.md",
|
|
20
|
+
value: "readme",
|
|
21
|
+
keywords: "markdown docs root getting started",
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
id: "2",
|
|
25
|
+
label: "src/components/Button.tsx",
|
|
26
|
+
value: "button tsx",
|
|
27
|
+
keywords: "src components button react",
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
id: "3",
|
|
31
|
+
label: "playground/vite.config.ts",
|
|
32
|
+
value: "vite config",
|
|
33
|
+
keywords: "playground vite build",
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
id: "4",
|
|
37
|
+
label: "tokens/semantic.ts",
|
|
38
|
+
value: "semantic tokens",
|
|
39
|
+
keywords: "tokens theme design system",
|
|
40
|
+
},
|
|
41
|
+
];
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* File picker-style palette: match on file name, path segments, and extra keywords.
|
|
45
|
+
*/
|
|
46
|
+
export default function CommandMenuExampleFileSearch() {
|
|
47
|
+
const [open, setOpen] = React.useState(false);
|
|
48
|
+
const [activeId, setActiveId] = React.useState<string | null>(null);
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<>
|
|
52
|
+
<Button.Root size="m" variant="neutral" mode="stroke" onClick={() => setOpen(true)}>
|
|
53
|
+
Search files
|
|
54
|
+
</Button.Root>
|
|
55
|
+
|
|
56
|
+
<CommandMenu.Dialog open={open} onOpenChange={setOpen} aria-labelledby="files-title">
|
|
57
|
+
<CommandMenu.DialogTitle id="files-title">Open file</CommandMenu.DialogTitle>
|
|
58
|
+
<CommandMenu.InputRow
|
|
59
|
+
leading={<Search style={inputIconStyle} strokeWidth={2} aria-hidden />}
|
|
60
|
+
>
|
|
61
|
+
<CommandMenu.Input placeholder="Filter by name or path…" aria-label="Filter files" />
|
|
62
|
+
</CommandMenu.InputRow>
|
|
63
|
+
<CommandMenu.List>
|
|
64
|
+
<CommandMenu.Group heading="Repository">
|
|
65
|
+
{FILES.map((f) => {
|
|
66
|
+
const Icon = f.label.endsWith(".tsx") || f.label.endsWith(".ts") ? FileCode : File;
|
|
67
|
+
return (
|
|
68
|
+
<CommandMenu.Item
|
|
69
|
+
key={f.id}
|
|
70
|
+
value={f.value}
|
|
71
|
+
keywords={f.keywords}
|
|
72
|
+
onSelect={() => {
|
|
73
|
+
setActiveId(f.id);
|
|
74
|
+
setOpen(false);
|
|
75
|
+
}}
|
|
76
|
+
>
|
|
77
|
+
<CommandMenu.ItemIcon as={Icon} strokeWidth={2} />
|
|
78
|
+
{f.label}
|
|
79
|
+
</CommandMenu.Item>
|
|
80
|
+
);
|
|
81
|
+
})}
|
|
82
|
+
</CommandMenu.Group>
|
|
83
|
+
</CommandMenu.List>
|
|
84
|
+
</CommandMenu.Dialog>
|
|
85
|
+
|
|
86
|
+
{activeId ? (
|
|
87
|
+
<p
|
|
88
|
+
style={{
|
|
89
|
+
marginTop: "var(--prime-sys-spacing-x3)",
|
|
90
|
+
color: "var(--prime-sys-color-content-muted)",
|
|
91
|
+
}}
|
|
92
|
+
>
|
|
93
|
+
Last opened id: {activeId}
|
|
94
|
+
</p>
|
|
95
|
+
) : null}
|
|
96
|
+
</>
|
|
97
|
+
);
|
|
98
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { Copy, Link2, Mail, Search, UserPlus } from "lucide-react";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
|
|
4
|
+
import { Button } from "@/components/button/Button";
|
|
5
|
+
import { CommandMenu } from "@/components/command-menu/CommandMenu";
|
|
6
|
+
|
|
7
|
+
const inputIconStyle: React.CSSProperties = {
|
|
8
|
+
width: "var(--prime-sys-size-control-m-icon)",
|
|
9
|
+
height: "var(--prime-sys-size-control-m-icon)",
|
|
10
|
+
color: "var(--prime-sys-color-content-muted)",
|
|
11
|
+
flexShrink: 0,
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Quick actions on the current context: copy, share, invite — grouped under one palette.
|
|
16
|
+
*/
|
|
17
|
+
export default function CommandMenuExampleQuickActions() {
|
|
18
|
+
const [open, setOpen] = React.useState(false);
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<>
|
|
22
|
+
<Button.Root size="m" variant="neutral" mode="stroke" onClick={() => setOpen(true)}>
|
|
23
|
+
Quick actions
|
|
24
|
+
</Button.Root>
|
|
25
|
+
|
|
26
|
+
<CommandMenu.Dialog open={open} onOpenChange={setOpen} aria-labelledby="actions-title">
|
|
27
|
+
<CommandMenu.DialogTitle id="actions-title">Actions</CommandMenu.DialogTitle>
|
|
28
|
+
<CommandMenu.InputRow
|
|
29
|
+
leading={<Search style={inputIconStyle} strokeWidth={2} aria-hidden />}
|
|
30
|
+
>
|
|
31
|
+
<CommandMenu.Input placeholder="Run an action…" aria-label="Filter actions" />
|
|
32
|
+
</CommandMenu.InputRow>
|
|
33
|
+
<CommandMenu.List>
|
|
34
|
+
<CommandMenu.Group heading="Clipboard">
|
|
35
|
+
<CommandMenu.Item
|
|
36
|
+
value="copy link"
|
|
37
|
+
keywords="url clipboard"
|
|
38
|
+
onSelect={() => setOpen(false)}
|
|
39
|
+
>
|
|
40
|
+
<CommandMenu.ItemIcon as={Link2} strokeWidth={2} />
|
|
41
|
+
Copy link
|
|
42
|
+
</CommandMenu.Item>
|
|
43
|
+
<CommandMenu.Item
|
|
44
|
+
value="copy page as markdown"
|
|
45
|
+
keywords="clipboard md export"
|
|
46
|
+
onSelect={() => setOpen(false)}
|
|
47
|
+
>
|
|
48
|
+
<CommandMenu.ItemIcon as={Copy} strokeWidth={2} />
|
|
49
|
+
Copy page as Markdown
|
|
50
|
+
</CommandMenu.Item>
|
|
51
|
+
</CommandMenu.Group>
|
|
52
|
+
<CommandMenu.Group heading="People">
|
|
53
|
+
<CommandMenu.Item
|
|
54
|
+
value="invite teammate"
|
|
55
|
+
keywords="email share member"
|
|
56
|
+
onSelect={() => setOpen(false)}
|
|
57
|
+
>
|
|
58
|
+
<CommandMenu.ItemIcon as={UserPlus} strokeWidth={2} />
|
|
59
|
+
Invite teammate
|
|
60
|
+
</CommandMenu.Item>
|
|
61
|
+
<CommandMenu.Item
|
|
62
|
+
value="message owner"
|
|
63
|
+
keywords="dm mail contact"
|
|
64
|
+
onSelect={() => setOpen(false)}
|
|
65
|
+
>
|
|
66
|
+
<CommandMenu.ItemIcon as={Mail} strokeWidth={2} />
|
|
67
|
+
Message owner
|
|
68
|
+
</CommandMenu.Item>
|
|
69
|
+
</CommandMenu.Group>
|
|
70
|
+
</CommandMenu.List>
|
|
71
|
+
</CommandMenu.Dialog>
|
|
72
|
+
</>
|
|
73
|
+
);
|
|
74
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# DataTable
|
|
2
|
+
|
|
3
|
+
**Проектирование по умолчанию:** при проектировании экранов и примеров изначально выбирай **`m`** для `size` (где есть ось размера), если явно не оговорено иное.
|
|
4
|
+
|
|
5
|
+
## About
|
|
6
|
+
|
|
7
|
+
`DataTable.Root` renders a semantic `<table>` inside a scroll viewport, with optional client-side sorting, classic pagination or infinite-scroll slicing, sticky header and sticky first column, and a footer with row counts (and pagination or infinite-scroll hints).
|
|
8
|
+
|
|
9
|
+
- **Use** when you need sortable tabular data with built-in pagination or “load more while scrolling” without building table chrome from scratch.
|
|
10
|
+
- **Use** when row hover / column hover highlights or zebra striping should stay consistent with kit tokens via `size` and `ControlSizeProvider`.
|
|
11
|
+
- **Use** when the first column must stay visible during horizontal scroll (`stickyFirstColumn`).
|
|
12
|
+
- **Do not use** when you need arbitrary column pinning, resizable columns, or spreadsheet-style keyboard grid navigation — the table does not implement those.
|
|
13
|
+
- **Do not use** when sorting or filtering must run on the server only without mirroring logic in the parent — sorting is applied in memory to the `rows` you pass; supply pre-sorted data or control `sort` yourself and replace `rows` accordingly.
|
|
14
|
+
- **Do not use** when you need a loading overlay on top of already rendered rows — `loading` only affects the body when there are zero rows to display.
|
|
15
|
+
|
|
16
|
+
## Composition
|
|
17
|
+
|
|
18
|
+
- **Public API** — a single compound entry: `DataTable` with `Root` (`DataTableRoot`). There are no other exported subcomponents.
|
|
19
|
+
- **Structure** — `ControlSizeProvider` wraps a root `div` (data attributes for size, dividers, header visibility, stickiness, table width mode, hover highlights, zebra). Inside: `ScrollContainer` viewport → `<table>`, optional `<thead>` (`<th>` per column), `<tbody>` with rows, and an `aria-hidden` sentinel at the bottom when `infiniteScroll` is on (for `IntersectionObserver` or scroll fallback).
|
|
20
|
+
- **Footer** — always shows a “shown range / total” line; if not `infiniteScroll` and `showPagination` and there is more than one page, it renders `Pagination.Root`; in infinite mode it may show a short status when more rows can be revealed or loaded.
|
|
21
|
+
- **Reference examples** — longer patterns (full column set, controlled sort/page, row selection with `Checkbox`, infinite `onLoadMore`, sticky header and first column) live under [`examples/`](./examples/) as copy-ready `tsx` modules that import from `"prime-ui-kit"`.
|
|
22
|
+
|
|
23
|
+
### Minimal example
|
|
24
|
+
|
|
25
|
+
```tsx
|
|
26
|
+
import { DataTable, type DataTableColumn } from "prime-ui-kit";
|
|
27
|
+
|
|
28
|
+
type Row = { id: string };
|
|
29
|
+
|
|
30
|
+
const columns: DataTableColumn<Row>[] = [{ id: "id", header: "ID", accessor: "id" }];
|
|
31
|
+
const rows: Row[] = [{ id: "1" }];
|
|
32
|
+
|
|
33
|
+
export function Example() {
|
|
34
|
+
return <DataTable.Root columns={columns} rows={rows} />;
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Rules
|
|
39
|
+
|
|
40
|
+
- Pass **`columns`** with unique **`id`** and **`header`** for every column; **`accessor`** (key or function), **`cell`**, **`sortable`**, and the rest are optional.
|
|
41
|
+
- **Sort** — controlled: `sort` + `onSortChange`. Uncontrolled initial order: `defaultSort` (default `null`). Clicking a sortable header cycles **asc → desc → none** for that column; changing sort sets the page to **1** in paginated mode.
|
|
42
|
+
- **Page** — controlled: `page` + `onPageChange`. Uncontrolled: `defaultPage` (default `1`). Page index is clamped when row count changes. Toggling **`infiniteScroll`** resets the visible slice; leaving infinite mode resets page to **1** via internal effect.
|
|
43
|
+
- **Infinite scroll** — set `infiniteScroll`. The visible slice grows by **`infiniteBatchSize`** up to the current **`rows.length`** first; when the slice shows all local rows and **`hasMore`**, **`onLoadMore`** runs when the sentinel intersects (or on near-bottom scroll if `IntersectionObserver` is missing). **`initialVisibleRows`** defaults to **`pageSize`** when omitted.
|
|
44
|
+
- **`loading`** — shows **`loadingText`** in a single spanning row only when there are no displayed rows yet; it does not dim existing rows.
|
|
45
|
+
- **Empty** — when not loading and there are no rows, **`emptyText`** is shown in a spanning row.
|
|
46
|
+
- **Row keys** — provide **`getRowKey`** for stable identity; otherwise React **`key`** falls back to the row **index** (fragile if row order changes).
|
|
47
|
+
- **Localization** — default **`loadingText`**, **`emptyText`**, footer range text, and infinite-scroll hints are **Russian** in the implementation; override with props where needed.
|
|
48
|
+
- **Accessibility** — sortable headers use an inner control pattern inside **`th`** with **`scope="col"`**; sort icons are **`aria-hidden`**. Cells with **`onCellClick`** get **`role="button"`**, **`tabIndex={0}`**, and **Enter / Space**. There is no **`grid`** role or arrow-key cell navigation.
|
|
49
|
+
|
|
50
|
+
## API
|
|
51
|
+
|
|
52
|
+
### DataTable.Root
|
|
53
|
+
|
|
54
|
+
| Prop | Type | Default | Required | Description |
|
|
55
|
+
| --- | --- | --- | --- | --- |
|
|
56
|
+
| columns | `DataTableColumn<Row>[]` | — | Yes | Column definitions |
|
|
57
|
+
| rows | `Row[]` | — | Yes | Data rows (sorted in memory when `sort` applies) |
|
|
58
|
+
| size | `DataTableSize` | `"m"` | No | Row density; forwarded to nested `Pagination` unless `paginationSize` is set |
|
|
59
|
+
| className | `string` | — | No | Class on the outer wrapper |
|
|
60
|
+
| showHeader | `boolean` | `true` | No | Render `<thead>` |
|
|
61
|
+
| stickyHeader | `boolean` | `false` | No | Sticky header row |
|
|
62
|
+
| stickyFirstColumn | `boolean` | `false` | No | Sticky first column (and corner cell when header is sticky) |
|
|
63
|
+
| getRowKey | `(row: Row, index: number) => React.Key` | — | No | Stable row key; default is index |
|
|
64
|
+
| onRowClick | `(row: Row, index: number, event: React.MouseEvent<HTMLTableRowElement>) => void` | — | No | Row click handler |
|
|
65
|
+
| loading | `boolean` | `false` | No | Loading state when no rows are displayed |
|
|
66
|
+
| loadingText | `React.ReactNode` | `"Загрузка данных…"` | No | Message in loading state |
|
|
67
|
+
| emptyText | `React.ReactNode` | `"Нет данных для отображения."` | No | Message when there are no rows |
|
|
68
|
+
| dividerStyle | `DataTableDividerStyle` | `"standard"` | No | Cell border style: `standard`, `dashed`, `dotted`, `none` |
|
|
69
|
+
| sort | `DataTableSortState` | — | No | Controlled sort (`null` or `{ columnId, order }`) |
|
|
70
|
+
| defaultSort | `DataTableSortState` | `null` | No | Initial sort when uncontrolled |
|
|
71
|
+
| onSortChange | `(sort: DataTableSortState) => void` | — | No | Sort change callback |
|
|
72
|
+
| page | `number` | — | No | Controlled current page (1-based) |
|
|
73
|
+
| defaultPage | `number` | `1` | No | Initial page when uncontrolled |
|
|
74
|
+
| onPageChange | `(page: number) => void` | — | No | Page change callback |
|
|
75
|
+
| pageSize | `number` | `10` | No | Rows per page in pagination mode; also default for `initialVisibleRows` in infinite mode |
|
|
76
|
+
| showPagination | `boolean` | `true` | No | Show `Pagination` when not in infinite mode and `totalPages > 1` |
|
|
77
|
+
| siblingCount | `number` | `1` | No | Page window size passed to `Pagination.Root` |
|
|
78
|
+
| paginationSize | `DataTableSize` | — | No | Pagination size; defaults to root `size` |
|
|
79
|
+
| infiniteScroll | `boolean` | `false` | No | Scroll viewport with growing slice / `onLoadMore` |
|
|
80
|
+
| initialVisibleRows | `number` | `pageSize` | No | Initial number of rows shown in infinite mode |
|
|
81
|
+
| infiniteBatchSize | `number` | `20` | No | Rows added per reach-end step before `onLoadMore` |
|
|
82
|
+
| hasMore | `boolean` | `false` | No | Server has more data after current `rows` |
|
|
83
|
+
| loadingMore | `boolean` | `false` | No | While an async `onLoadMore` is in progress |
|
|
84
|
+
| onLoadMore | `() => void \| Promise<void>` | — | No | Fetch next chunk when local slice is exhausted |
|
|
85
|
+
| scrollHeight | `number \| string` | `360` | No | Max height of the scroll viewport in infinite mode |
|
|
86
|
+
| fillWidth | `boolean` | `true` | No | When `true`, table is full container width; extra space is distributed by the browser’s automatic table layout (`table-layout: auto`) from cell content and `width` / `minWidth` / `maxWidth`. When `false`, table width follows content (`max-content`) |
|
|
87
|
+
| highlightRowOnHover | `boolean` | `true` | No | Row hover highlight |
|
|
88
|
+
| highlightColumnOnHover | `boolean` | `false` | No | Column hover highlight (header + cells) |
|
|
89
|
+
| striped | `boolean` | `false` | No | Alternating row backgrounds |
|
|
90
|
+
|
|
91
|
+
### `DataTableColumn<Row>`
|
|
92
|
+
|
|
93
|
+
| Field | Type | Default | Required | Description |
|
|
94
|
+
| --- | --- | --- | --- | --- |
|
|
95
|
+
| id | `string` | — | Yes | Column id (used for sort state and DOM data attributes) |
|
|
96
|
+
| header | `React.ReactNode` | — | Yes | Header content |
|
|
97
|
+
| accessor | `keyof Row \| ((row: Row) => unknown)` | — | No | Value for default cell text and sort (unless `sortAccessor` / `sortComparator` override) |
|
|
98
|
+
| cell | `(row: Row) => React.ReactNode` | — | No | Custom cell render |
|
|
99
|
+
| sortable | `boolean` | `false` | No | Header toggles sort on click |
|
|
100
|
+
| sortAccessor | `(row: Row) => unknown` | — | No | Value used for sorting (and default sort comparison) instead of `accessor` |
|
|
101
|
+
| sortComparator | `(a: Row, b: Row, order: DataTableOrder) => number` | — | No | Custom comparator; when set, default primitive compare is not used |
|
|
102
|
+
| align | `DataTableCellAlign` | `"start"` | No | `start`, `center`, or `end` |
|
|
103
|
+
| width | `string` | — | No | Column width on `th` / `td` (CSS `width`) |
|
|
104
|
+
| minWidth | `string` | — | No | Minimum column width on `th` / `td` |
|
|
105
|
+
| maxWidth | `string` | — | No | Maximum column width on `th` / `td` |
|
|
106
|
+
| onHeaderClick | `(event: React.MouseEvent<HTMLTableCellElement>) => void` | — | No | Fires on header click before sort handling |
|
|
107
|
+
| onCellClick | `(row: Row, event: React.MouseEvent<HTMLTableCellElement> \| React.KeyboardEvent<HTMLTableCellElement>) => void` | — | No | Makes the cell focusable and keyboard-activable |
|
|
108
|
+
|
|
109
|
+
Exported types: `DataTableSortState`, `DataTableOrder`, `DataTableSize`, `DataTableCellAlign`, `DataTableDividerStyle`, `DataTableRootProps`, `DataTableColumn`.
|
|
110
|
+
|
|
111
|
+
## Related
|
|
112
|
+
|
|
113
|
+
- [Pagination](../pagination/COMPONENT.md) — used under the table for page navigation.
|
|
114
|
+
- [LinkButton](../link-button/COMPONENT.md), [Badge](../badge/COMPONENT.md), [Tag](../tag/COMPONENT.md) — common cell content; they pick up size from the table’s `ControlSizeProvider` unless overridden.
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { Badge, DataTable, type DataTableColumn, Tag } from "prime-ui-kit";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
|
|
4
|
+
type OrderRow = {
|
|
5
|
+
id: string;
|
|
6
|
+
customer: string;
|
|
7
|
+
amount: number;
|
|
8
|
+
region: string;
|
|
9
|
+
status: "Оплачен" | "В работе" | "Просрочен";
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const rows: OrderRow[] = [
|
|
13
|
+
{ id: "ORD-104", customer: "ООО «Север»", amount: 128_400, region: "СЗФО", status: "Оплачен" },
|
|
14
|
+
{ id: "ORD-105", customer: "ИП Ким", amount: 42_100, region: "ДВФО", status: "В работе" },
|
|
15
|
+
{ id: "ORD-106", customer: "АО «Транзит»", amount: 901_000, region: "ЦФО", status: "Оплачен" },
|
|
16
|
+
{ id: "ORD-107", customer: "ООО «Логистик»", amount: 15_750, region: "ЮФО", status: "Просрочен" },
|
|
17
|
+
{
|
|
18
|
+
id: "ORD-108",
|
|
19
|
+
customer: "Самозанятый Орлов",
|
|
20
|
+
amount: 6_200,
|
|
21
|
+
region: "ПФО",
|
|
22
|
+
status: "В работе",
|
|
23
|
+
},
|
|
24
|
+
{ id: "ORD-109", customer: "ООО «Полюс»", amount: 333_000, region: "УФО", status: "Оплачен" },
|
|
25
|
+
{ id: "ORD-110", customer: "КФХ «Рядок»", amount: 88_500, region: "ЮФО", status: "В работе" },
|
|
26
|
+
{ id: "ORD-111", customer: "АНО «Школа»", amount: 12_000, region: "СКФО", status: "Просрочен" },
|
|
27
|
+
];
|
|
28
|
+
|
|
29
|
+
function statusColor(status: OrderRow["status"]) {
|
|
30
|
+
if (status === "Оплачен") return "green";
|
|
31
|
+
if (status === "Просрочен") return "red";
|
|
32
|
+
return "yellow";
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const columns: DataTableColumn<OrderRow>[] = [
|
|
36
|
+
{
|
|
37
|
+
id: "id",
|
|
38
|
+
header: "Заказ",
|
|
39
|
+
accessor: "id",
|
|
40
|
+
sortable: true,
|
|
41
|
+
minWidth: "8.5rem",
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
id: "customer",
|
|
45
|
+
header: "Клиент",
|
|
46
|
+
accessor: "customer",
|
|
47
|
+
sortable: true,
|
|
48
|
+
minWidth: "12rem",
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
id: "amount",
|
|
52
|
+
header: "Сумма, ₽",
|
|
53
|
+
accessor: "amount",
|
|
54
|
+
sortable: true,
|
|
55
|
+
align: "end",
|
|
56
|
+
minWidth: "9rem",
|
|
57
|
+
cell: (row) => row.amount.toLocaleString("ru-RU"),
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: "region",
|
|
61
|
+
header: "Округ",
|
|
62
|
+
accessor: "region",
|
|
63
|
+
sortable: true,
|
|
64
|
+
minWidth: "6rem",
|
|
65
|
+
cell: (row) => <Tag.Root>{row.region}</Tag.Root>,
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
id: "status",
|
|
69
|
+
header: "Статус",
|
|
70
|
+
accessor: "status",
|
|
71
|
+
sortable: true,
|
|
72
|
+
minWidth: "9rem",
|
|
73
|
+
cell: (row) => (
|
|
74
|
+
<Badge.Root color={statusColor(row.status)} variant="light">
|
|
75
|
+
{row.status}
|
|
76
|
+
</Badge.Root>
|
|
77
|
+
),
|
|
78
|
+
},
|
|
79
|
+
];
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Полноценная таблица: сортировка по умолчанию, пагинация (`pageSize` меньше числа строк),
|
|
83
|
+
* стабильные ключи строк и типичное оформление ячеек через `Tag` / `Badge`.
|
|
84
|
+
*/
|
|
85
|
+
export default function DataTableCanonicalOrdersExample() {
|
|
86
|
+
const [lastOpened, setLastOpened] = React.useState<string | null>(null);
|
|
87
|
+
|
|
88
|
+
return (
|
|
89
|
+
<div>
|
|
90
|
+
{lastOpened ? (
|
|
91
|
+
<p style={{ marginBottom: "0.75rem" }}>Открыт заказ: {lastOpened}</p>
|
|
92
|
+
) : (
|
|
93
|
+
<p style={{ marginBottom: "0.75rem" }}>
|
|
94
|
+
Клик по строке выбирает заказ для сценария «открыть».
|
|
95
|
+
</p>
|
|
96
|
+
)}
|
|
97
|
+
<DataTable.Root
|
|
98
|
+
columns={columns}
|
|
99
|
+
rows={rows}
|
|
100
|
+
getRowKey={(row) => row.id}
|
|
101
|
+
defaultSort={{ columnId: "amount", order: "desc" }}
|
|
102
|
+
pageSize={4}
|
|
103
|
+
onRowClick={(row) => setLastOpened(row.id)}
|
|
104
|
+
/>
|
|
105
|
+
</div>
|
|
106
|
+
);
|
|
107
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { DataTable, type DataTableColumn, type DataTableSortState } from "prime-ui-kit";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
|
|
4
|
+
type TaskRow = {
|
|
5
|
+
id: string;
|
|
6
|
+
title: string;
|
|
7
|
+
assignee: string;
|
|
8
|
+
priority: number;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const rows: TaskRow[] = [
|
|
12
|
+
{ id: "T-01", title: "Сверстать отчёт", assignee: "Аня", priority: 2 },
|
|
13
|
+
{ id: "T-02", title: "Починить билд", assignee: "Борис", priority: 1 },
|
|
14
|
+
{ id: "T-03", title: "Обновить зависимости", assignee: "Вика", priority: 3 },
|
|
15
|
+
{ id: "T-04", title: "Ревью API", assignee: "Гриша", priority: 2 },
|
|
16
|
+
{ id: "T-05", title: "Документация полей", assignee: "Даша", priority: 4 },
|
|
17
|
+
{ id: "T-06", title: "E2E флейки", assignee: "Егор", priority: 1 },
|
|
18
|
+
];
|
|
19
|
+
|
|
20
|
+
const columns: DataTableColumn<TaskRow>[] = [
|
|
21
|
+
{ id: "id", header: "ID", accessor: "id", sortable: true, minWidth: "5rem" },
|
|
22
|
+
{ id: "title", header: "Задача", accessor: "title", sortable: true, minWidth: "14rem" },
|
|
23
|
+
{
|
|
24
|
+
id: "assignee",
|
|
25
|
+
header: "Исполнитель",
|
|
26
|
+
accessor: "assignee",
|
|
27
|
+
sortable: true,
|
|
28
|
+
minWidth: "10rem",
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
id: "priority",
|
|
32
|
+
header: "Приоритет",
|
|
33
|
+
accessor: "priority",
|
|
34
|
+
sortable: true,
|
|
35
|
+
align: "end",
|
|
36
|
+
minWidth: "8rem",
|
|
37
|
+
},
|
|
38
|
+
];
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Управляемые `sort` и `page`: родитель синхронизирует состояние с URL, стором или формой фильтров.
|
|
42
|
+
*/
|
|
43
|
+
export default function DataTableControlledSortAndPageExample() {
|
|
44
|
+
const [sort, setSort] = React.useState<DataTableSortState>({
|
|
45
|
+
columnId: "priority",
|
|
46
|
+
order: "asc",
|
|
47
|
+
});
|
|
48
|
+
const [page, setPage] = React.useState(1);
|
|
49
|
+
|
|
50
|
+
return (
|
|
51
|
+
<DataTable.Root
|
|
52
|
+
columns={columns}
|
|
53
|
+
rows={rows}
|
|
54
|
+
getRowKey={(row) => row.id}
|
|
55
|
+
sort={sort}
|
|
56
|
+
onSortChange={(next) => {
|
|
57
|
+
setSort(next);
|
|
58
|
+
setPage(1);
|
|
59
|
+
}}
|
|
60
|
+
page={page}
|
|
61
|
+
onPageChange={setPage}
|
|
62
|
+
pageSize={3}
|
|
63
|
+
siblingCount={1}
|
|
64
|
+
/>
|
|
65
|
+
);
|
|
66
|
+
}
|