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,12 @@
|
|
|
1
|
+
import { Breadcrumb } from "prime-ui-kit";
|
|
2
|
+
|
|
3
|
+
/** Smallest valid trail: previous level as link, current page as text with `current`. */
|
|
4
|
+
export default function BreadcrumbCanonicalExample() {
|
|
5
|
+
return (
|
|
6
|
+
<Breadcrumb.Root>
|
|
7
|
+
<Breadcrumb.Item href="/">Home</Breadcrumb.Item>
|
|
8
|
+
<Breadcrumb.Separator />
|
|
9
|
+
<Breadcrumb.Item current>Current page</Breadcrumb.Item>
|
|
10
|
+
</Breadcrumb.Root>
|
|
11
|
+
);
|
|
12
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Breadcrumb } from "prime-ui-kit";
|
|
2
|
+
|
|
3
|
+
/** Docs IA: section → subsection → article (no ellipsis). */
|
|
4
|
+
export default function BreadcrumbDeepDocumentationExample() {
|
|
5
|
+
return (
|
|
6
|
+
<Breadcrumb.Root>
|
|
7
|
+
<Breadcrumb.Item href="/docs">Documentation</Breadcrumb.Item>
|
|
8
|
+
<Breadcrumb.Separator />
|
|
9
|
+
<Breadcrumb.Item href="/docs/guides">Guides</Breadcrumb.Item>
|
|
10
|
+
<Breadcrumb.Separator />
|
|
11
|
+
<Breadcrumb.Item href="/docs/guides/accessibility">Accessibility</Breadcrumb.Item>
|
|
12
|
+
<Breadcrumb.Separator />
|
|
13
|
+
<Breadcrumb.Item current>Focus order</Breadcrumb.Item>
|
|
14
|
+
</Breadcrumb.Root>
|
|
15
|
+
);
|
|
16
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Breadcrumb } from "prime-ui-kit";
|
|
2
|
+
|
|
3
|
+
/** Storefront hierarchy down to a product detail page. */
|
|
4
|
+
export default function BreadcrumbEcommerceProductExample() {
|
|
5
|
+
return (
|
|
6
|
+
<Breadcrumb.Root>
|
|
7
|
+
<Breadcrumb.Item href="/">Home</Breadcrumb.Item>
|
|
8
|
+
<Breadcrumb.Separator />
|
|
9
|
+
<Breadcrumb.Item href="/catalog">Catalog</Breadcrumb.Item>
|
|
10
|
+
<Breadcrumb.Separator />
|
|
11
|
+
<Breadcrumb.Item href="/catalog/furniture">Furniture</Breadcrumb.Item>
|
|
12
|
+
<Breadcrumb.Separator />
|
|
13
|
+
<Breadcrumb.Item href="/catalog/furniture/chairs">Chairs</Breadcrumb.Item>
|
|
14
|
+
<Breadcrumb.Separator />
|
|
15
|
+
<Breadcrumb.Item current>Ergo Mesh Pro</Breadcrumb.Item>
|
|
16
|
+
</Breadcrumb.Root>
|
|
17
|
+
);
|
|
18
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Breadcrumb } from "prime-ui-kit";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Collapsed middle: you choose which segments stay visible; `Ellipsis` is static text, not a menu.
|
|
5
|
+
* Pair each part with `Separator` between items (including around the ellipsis).
|
|
6
|
+
*/
|
|
7
|
+
export default function BreadcrumbLongPathEllipsisExample() {
|
|
8
|
+
return (
|
|
9
|
+
<Breadcrumb.Root>
|
|
10
|
+
<Breadcrumb.Item href="/">Home</Breadcrumb.Item>
|
|
11
|
+
<Breadcrumb.Separator />
|
|
12
|
+
<Breadcrumb.Item href="/catalog">Catalog</Breadcrumb.Item>
|
|
13
|
+
<Breadcrumb.Separator />
|
|
14
|
+
<Breadcrumb.Ellipsis />
|
|
15
|
+
<Breadcrumb.Separator />
|
|
16
|
+
<Breadcrumb.Item href="/catalog/furniture/chairs/office">Office chairs</Breadcrumb.Item>
|
|
17
|
+
<Breadcrumb.Separator />
|
|
18
|
+
<Breadcrumb.Item current>Model X</Breadcrumb.Item>
|
|
19
|
+
</Breadcrumb.Root>
|
|
20
|
+
);
|
|
21
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Breadcrumb } from "prime-ui-kit";
|
|
2
|
+
|
|
3
|
+
/** Org → area → section → leaf screen in admin / settings. */
|
|
4
|
+
export default function BreadcrumbSaasSettingsExample() {
|
|
5
|
+
return (
|
|
6
|
+
<Breadcrumb.Root>
|
|
7
|
+
<Breadcrumb.Item href="/orgs/acme">Acme Inc</Breadcrumb.Item>
|
|
8
|
+
<Breadcrumb.Separator />
|
|
9
|
+
<Breadcrumb.Item href="/orgs/acme/settings">Workspace settings</Breadcrumb.Item>
|
|
10
|
+
<Breadcrumb.Separator />
|
|
11
|
+
<Breadcrumb.Item href="/orgs/acme/settings/billing">Billing</Breadcrumb.Item>
|
|
12
|
+
<Breadcrumb.Separator />
|
|
13
|
+
<Breadcrumb.Item current>Invoices</Breadcrumb.Item>
|
|
14
|
+
</Breadcrumb.Root>
|
|
15
|
+
);
|
|
16
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Button
|
|
2
|
+
|
|
3
|
+
**Проектирование по умолчанию:** при проектировании экранов и примеров изначально выбирай **`m`** для `size` (где есть ось размера), если явно не оговорено иное.
|
|
4
|
+
|
|
5
|
+
## About
|
|
6
|
+
|
|
7
|
+
Compound control for actions: a root that renders a native `<button>` (or merges props into one child with `asChild`), plus optional icon and loading indicator parts that share size via context.
|
|
8
|
+
|
|
9
|
+
- **Use** for primary, secondary, or destructive actions in forms, toolbars, dialogs, and empty states; submit/reset in forms; triggers that must look like a button.
|
|
10
|
+
- **Use** for async actions where you set `loading` on `Button.Root` and optionally render `Button.Spinner` next to the label.
|
|
11
|
+
- **Use** for full-width actions in narrow layouts via `fullWidth`.
|
|
12
|
+
- **Do not use** for navigation that should be a plain link semantically (consider [Link button](../link-button/COMPONENT.md) or `asChild` with a link).
|
|
13
|
+
- **Do not use** for binary on/off or multi-option selection (use [Switch](../switch/COMPONENT.md), [Checkbox](../checkbox/COMPONENT.md), [Segmented control](../segmented-control/COMPONENT.md), etc.).
|
|
14
|
+
- **Do not use** when several related buttons need shared chrome and spacing (see [Button group](../button-group/COMPONENT.md)).
|
|
15
|
+
|
|
16
|
+
## Composition
|
|
17
|
+
|
|
18
|
+
- **`Button.Root`** — required wrapper. Provides size to descendants via `ControlSizeProvider` (including in `asChild` mode). Place all other parts inside it.
|
|
19
|
+
- **`Button.Icon`** — optional; wraps the icon in a `span` with `aria-hidden="true"`. Use for decorative icons next to text.
|
|
20
|
+
- **`Button.Spinner`** — optional; renders nothing unless the nearest `Button.Root` has `loading={true}`. Place it inside `Button.Root` with visible text or a clear `aria-label`; order relative to the label is up to you.
|
|
21
|
+
|
|
22
|
+
### Minimal example
|
|
23
|
+
|
|
24
|
+
```tsx
|
|
25
|
+
import { Button } from "prime-ui-kit";
|
|
26
|
+
|
|
27
|
+
export function Example() {
|
|
28
|
+
return <Button.Root>Save</Button.Root>;
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Canonical composition (reference)
|
|
33
|
+
|
|
34
|
+
For **icon + label**, **several `variant` / `mode` pairs**, and **`loading` with `Button.Spinner`**, open **`examples/canonical-composition.tsx`** next to this file. Imports use **`"prime-ui-kit"`** so the same snippets work in an app after installing the package.
|
|
35
|
+
|
|
36
|
+
### Example files in `examples/`
|
|
37
|
+
|
|
38
|
+
| File | Scenario |
|
|
39
|
+
|------|----------|
|
|
40
|
+
| `canonical-composition.tsx` | Icon + text, variant/mode mix, loading + spinner |
|
|
41
|
+
| `form-submit-row.tsx` | English form footer: cancel vs submit, async loading |
|
|
42
|
+
| `destructive-confirm.tsx` | English confirm dialog: `error` + `Modal` |
|
|
43
|
+
| `toolbar.tsx` | English editor-style toolbar: ghost row + primary action |
|
|
44
|
+
| `marketing-cta.tsx` | English CTA column: `fancy` + `fullWidth` |
|
|
45
|
+
|
|
46
|
+
### Note for LLMs
|
|
47
|
+
|
|
48
|
+
- **Imports:** `Button` (and `Icon`, `Modal` where needed) from **`"prime-ui-kit"`** in these examples; paths are relative to `src/components/button/examples/`.
|
|
49
|
+
- **`loading`** is **controlled** on `Button.Root` only; there is no internal async state. When `loading` or `disabled` is true, the native `<button>` is disabled.
|
|
50
|
+
- **`Button.Spinner`** only appears when `loading` is true; keep button text or `aria-label` meaningful while loading (`aria-busy` is set on the root).
|
|
51
|
+
- **Forms:** default `type` is **`"button"`**; use **`"submit"`** / **`"reset"`** explicitly when the control lives in a `<form>`.
|
|
52
|
+
- **Destructive actions:** use **`variant="error"`**; pair **filled** confirm with **stroke/lighter** or neutral cancel for hierarchy.
|
|
53
|
+
- **`asChild`:** exactly one element child; `disabled`/`loading` map to `aria-disabled` and blocked clicks, not native `disabled` on non-button hosts.
|
|
54
|
+
|
|
55
|
+
## Rules
|
|
56
|
+
|
|
57
|
+
- `loading` is controlled only by the `loading` prop on `Button.Root`; there is no internal async state. When `loading` or `disabled` is true, the native `<button>` is disabled and `onClick` does not run.
|
|
58
|
+
- With `asChild`, pass exactly one React element child. `type` is not forwarded; `disabled`/`loading` become `aria-disabled`, blocked `onClick`, and styles—native `disabled` is not set on non-button elements.
|
|
59
|
+
- The `asChild` child must accept `className`, `aria-*`, `data-*`, and event props merged from the root.
|
|
60
|
+
- For icon-only buttons, set a clear `aria-label` or `aria-labelledby` on `Button.Root`.
|
|
61
|
+
- `variant` sets color role (`primary`, `neutral`, `error`); `mode` sets visual weight (`filled`, `stroke`, `lighter`, `ghost`, `fancy`).
|
|
62
|
+
|
|
63
|
+
## API
|
|
64
|
+
|
|
65
|
+
### Button.Root
|
|
66
|
+
|
|
67
|
+
| Prop | Type | Default | Required | Description |
|
|
68
|
+
|------|------|---------|----------|-------------|
|
|
69
|
+
| variant | `"primary" \| "neutral" \| "error"` | `"primary"` | No | Color semantics. |
|
|
70
|
+
| mode | `"filled" \| "stroke" \| "lighter" \| "ghost" \| "fancy"` | `"filled"` | No | Visual weight / style. |
|
|
71
|
+
| size | `"s" \| "m" \| "l" \| "xl"` | `"m"` | No | Height, radius, text, and icon scale. |
|
|
72
|
+
| fullWidth | `boolean` | — | No | Full-width layout (`data-full-width`). |
|
|
73
|
+
| loading | `boolean` | `false` | No | Disables interaction, sets `aria-busy`, exposes loading to `Button.Spinner`. |
|
|
74
|
+
| asChild | `boolean` | `false` | No | Merge props into the single child instead of rendering `<button>`. |
|
|
75
|
+
| type | `"button" \| "submit" \| "reset"` | `"button"` | No | Native button type; not forwarded when `asChild` is true. |
|
|
76
|
+
| disabled | `boolean` | — | No | Inactive state; combined with `loading` for effective disabled behavior. |
|
|
77
|
+
| className | `string` | — | No | Additional class on the root. |
|
|
78
|
+
| children | `React.ReactNode` | — | No | Label, `Button.Icon`, `Button.Spinner`, etc. |
|
|
79
|
+
| …rest | `Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "size">` | — | No | Other button attributes (`onClick`, `aria-*`, `data-*`, etc.); `size` is the component size prop, not the HTML attribute. |
|
|
80
|
+
|
|
81
|
+
### Button.Icon
|
|
82
|
+
|
|
83
|
+
| Prop | Type | Default | Required | Description |
|
|
84
|
+
|------|------|---------|----------|-------------|
|
|
85
|
+
| children | `React.ReactNode` | — | Yes | Icon node. |
|
|
86
|
+
| className | `string` | — | No | Additional class on the `span`. |
|
|
87
|
+
| …rest | `Omit<React.HTMLAttributes<HTMLSpanElement>, "children">` | — | No | Other `span` attributes; root sets `aria-hidden="true"`. |
|
|
88
|
+
|
|
89
|
+
### Button.Spinner
|
|
90
|
+
|
|
91
|
+
| Prop | Type | Default | Required | Description |
|
|
92
|
+
|------|------|---------|----------|-------------|
|
|
93
|
+
| className | `string` | — | No | Additional class on the indicator. |
|
|
94
|
+
| …rest | `React.HTMLAttributes<HTMLSpanElement>` | — | No | Other `span` attributes; not rendered when root `loading` is false. |
|
|
95
|
+
|
|
96
|
+
## Related
|
|
97
|
+
|
|
98
|
+
- [Link button](../link-button/COMPONENT.md) — link-styled control when the action is navigation.
|
|
99
|
+
- [Button group](../button-group/COMPONENT.md) — grouped actions with shared sizing and dividers.
|
|
100
|
+
- [Modal](../modal/COMPONENT.md), [Drawer](../drawer/COMPONENT.md) — common hosts for triggers and dialog footers.
|
|
101
|
+
- [Input](../input/COMPONENT.md), [Label](../label/COMPONENT.md), [Hint](../hint/COMPONENT.md) — form fields alongside submit/reset buttons.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Button, Icon } from "prime-ui-kit";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Canonical composition: icon + label, multiple variants/modes, and controlled loading with Button.Spinner.
|
|
5
|
+
*/
|
|
6
|
+
export default function CanonicalCompositionExample() {
|
|
7
|
+
return (
|
|
8
|
+
<div
|
|
9
|
+
style={{
|
|
10
|
+
display: "flex",
|
|
11
|
+
flexDirection: "column",
|
|
12
|
+
gap: "var(--prime-sys-spacing-l)",
|
|
13
|
+
alignItems: "flex-start",
|
|
14
|
+
}}
|
|
15
|
+
>
|
|
16
|
+
<div
|
|
17
|
+
style={{
|
|
18
|
+
display: "flex",
|
|
19
|
+
flexWrap: "wrap",
|
|
20
|
+
gap: "var(--prime-sys-spacing-m)",
|
|
21
|
+
alignItems: "center",
|
|
22
|
+
}}
|
|
23
|
+
>
|
|
24
|
+
<Button.Root variant="primary" mode="filled" size="m">
|
|
25
|
+
<Button.Icon>
|
|
26
|
+
<Icon name="action.copy" size="s" />
|
|
27
|
+
</Button.Icon>
|
|
28
|
+
Copy link
|
|
29
|
+
</Button.Root>
|
|
30
|
+
<Button.Root variant="neutral" mode="stroke" size="m">
|
|
31
|
+
<Button.Icon>
|
|
32
|
+
<Icon name="field.email" size="s" tone="subtle" />
|
|
33
|
+
</Button.Icon>
|
|
34
|
+
Contact sales
|
|
35
|
+
</Button.Root>
|
|
36
|
+
<Button.Root variant="error" mode="lighter" size="m">
|
|
37
|
+
Remove from list
|
|
38
|
+
</Button.Root>
|
|
39
|
+
</div>
|
|
40
|
+
<Button.Root variant="primary" mode="filled" size="m" loading>
|
|
41
|
+
<Button.Spinner />
|
|
42
|
+
Saving…
|
|
43
|
+
</Button.Root>
|
|
44
|
+
</div>
|
|
45
|
+
);
|
|
46
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Button, Modal } from "prime-ui-kit";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Destructive flow: `variant="error"` on the trigger and on the confirming action; neutral cancel.
|
|
6
|
+
*/
|
|
7
|
+
export default function DestructiveConfirmExample() {
|
|
8
|
+
const [open, setOpen] = React.useState(false);
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<Modal.Root open={open} onOpenChange={setOpen}>
|
|
12
|
+
<Modal.Trigger>
|
|
13
|
+
<Button.Root variant="error" mode="stroke" size="m">
|
|
14
|
+
Delete project
|
|
15
|
+
</Button.Root>
|
|
16
|
+
</Modal.Trigger>
|
|
17
|
+
<Modal.Panel
|
|
18
|
+
title="Delete this project?"
|
|
19
|
+
footer={
|
|
20
|
+
<>
|
|
21
|
+
<Modal.Close>
|
|
22
|
+
<Button.Root variant="neutral" mode="stroke" size="m">
|
|
23
|
+
Cancel
|
|
24
|
+
</Button.Root>
|
|
25
|
+
</Modal.Close>
|
|
26
|
+
<Button.Root variant="error" mode="filled" size="m" onClick={() => setOpen(false)}>
|
|
27
|
+
Delete
|
|
28
|
+
</Button.Root>
|
|
29
|
+
</>
|
|
30
|
+
}
|
|
31
|
+
>
|
|
32
|
+
<p style={{ margin: 0 }}>This permanently removes the project and its data.</p>
|
|
33
|
+
</Modal.Panel>
|
|
34
|
+
</Modal.Root>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Button } from "prime-ui-kit";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Form footer: explicit `type="button"` vs `type="submit"`, plus async submit with `loading` and Spinner.
|
|
6
|
+
*/
|
|
7
|
+
export default function FormSubmitRowExample() {
|
|
8
|
+
const [loading, setLoading] = React.useState(false);
|
|
9
|
+
|
|
10
|
+
return (
|
|
11
|
+
<form
|
|
12
|
+
onSubmit={(e) => {
|
|
13
|
+
e.preventDefault();
|
|
14
|
+
setLoading(true);
|
|
15
|
+
window.setTimeout(() => setLoading(false), 1200);
|
|
16
|
+
}}
|
|
17
|
+
style={{
|
|
18
|
+
display: "flex",
|
|
19
|
+
flexWrap: "wrap",
|
|
20
|
+
gap: "var(--prime-sys-spacing-m)",
|
|
21
|
+
justifyContent: "flex-end",
|
|
22
|
+
}}
|
|
23
|
+
>
|
|
24
|
+
<Button.Root type="button" variant="neutral" mode="stroke" size="m">
|
|
25
|
+
Cancel
|
|
26
|
+
</Button.Root>
|
|
27
|
+
<Button.Root type="submit" variant="primary" mode="filled" size="m" loading={loading}>
|
|
28
|
+
<Button.Spinner />
|
|
29
|
+
Save changes
|
|
30
|
+
</Button.Root>
|
|
31
|
+
</form>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Button, Icon } from "prime-ui-kit";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Marketing CTA stack: strong primary (`fancy` + `xl`), secondary outline with trailing icon.
|
|
5
|
+
*/
|
|
6
|
+
export default function MarketingCtaExample() {
|
|
7
|
+
return (
|
|
8
|
+
<div
|
|
9
|
+
style={{
|
|
10
|
+
display: "flex",
|
|
11
|
+
flexDirection: "column",
|
|
12
|
+
gap: "var(--prime-sys-spacing-m)",
|
|
13
|
+
}}
|
|
14
|
+
>
|
|
15
|
+
<Button.Root variant="primary" mode="fancy" size="xl" fullWidth>
|
|
16
|
+
Start free trial
|
|
17
|
+
</Button.Root>
|
|
18
|
+
<Button.Root variant="neutral" mode="stroke" size="l" fullWidth>
|
|
19
|
+
Compare plans
|
|
20
|
+
<Button.Icon>
|
|
21
|
+
<Icon name="nav.chevronRight" size="s" tone="subtle" />
|
|
22
|
+
</Button.Icon>
|
|
23
|
+
</Button.Root>
|
|
24
|
+
</div>
|
|
25
|
+
);
|
|
26
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Button, Icon } from "prime-ui-kit";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Dense toolbar: ghost neutrals for secondary actions, primary action with icon + label.
|
|
5
|
+
*/
|
|
6
|
+
export default function ToolbarExample() {
|
|
7
|
+
return (
|
|
8
|
+
<div
|
|
9
|
+
role="toolbar"
|
|
10
|
+
aria-label="Document actions"
|
|
11
|
+
style={{
|
|
12
|
+
display: "flex",
|
|
13
|
+
flexWrap: "wrap",
|
|
14
|
+
gap: "var(--prime-sys-spacing-s)",
|
|
15
|
+
alignItems: "center",
|
|
16
|
+
}}
|
|
17
|
+
>
|
|
18
|
+
<Button.Root variant="neutral" mode="ghost" size="m">
|
|
19
|
+
Bold
|
|
20
|
+
</Button.Root>
|
|
21
|
+
<Button.Root variant="neutral" mode="ghost" size="m">
|
|
22
|
+
Italic
|
|
23
|
+
</Button.Root>
|
|
24
|
+
<Button.Root variant="neutral" mode="ghost" size="m" aria-label="Insert link">
|
|
25
|
+
<Button.Icon>
|
|
26
|
+
<Icon name="field.email" size="s" tone="subtle" />
|
|
27
|
+
</Button.Icon>
|
|
28
|
+
</Button.Root>
|
|
29
|
+
<span style={{ flex: 1, minWidth: "var(--prime-sys-spacing-m)" }} aria-hidden />
|
|
30
|
+
<Button.Root variant="primary" mode="filled" size="m">
|
|
31
|
+
<Button.Icon>
|
|
32
|
+
<Icon name="action.upload" size="s" />
|
|
33
|
+
</Button.Icon>
|
|
34
|
+
Publish
|
|
35
|
+
</Button.Root>
|
|
36
|
+
</div>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# ButtonGroup
|
|
2
|
+
|
|
3
|
+
**Проектирование по умолчанию:** при проектировании экранов и примеров изначально выбирай **`m`** для `size` (где есть ось размера), если явно не оговорено иное.
|
|
4
|
+
|
|
5
|
+
## Canonical
|
|
6
|
+
|
|
7
|
+
- **What:** `ButtonGroup` groups native **`<button>`** segments that share one outline, inner dividers, and corner radius only on the outer shell; **`Root`** sets **`size`** and optional **`orientation`**, wraps **`ControlSizeProvider`**.
|
|
8
|
+
- **Pieces:** namespace **`ButtonGroup.Root`**, **`ButtonGroup.Item`**, **`ButtonGroup.Icon`** (decorative wrapper, **`aria-hidden`**); **`Item`** must live inside **`Root`**.
|
|
9
|
+
- **Selection look:** optional **`pressed`** on **`Item`** → **`data-state="on"`** and **`aria-pressed`** when boolean; mutual exclusivity is **parent state**, not enforced by the component.
|
|
10
|
+
- **Forms:** **`Item`** supports **`type="button" | "submit" | "reset"`** (default **`"button"`**).
|
|
11
|
+
- **Defaults:** **`size="m"`**, **`orientation="horizontal"`**; no **`variant`** or built-in **`fullWidth`** — widen via layout/`className` on **`Root`** and items if needed.
|
|
12
|
+
- **Prefer something else:** true **one-of-N** field with radio semantics → [Radio](../radio/COMPONENT.md); kit segmented control API → [SegmentedControl](../segmented-control/COMPONENT.md); single CTA → [Button](../button/COMPONENT.md).
|
|
13
|
+
|
|
14
|
+
## Extended
|
|
15
|
+
|
|
16
|
+
### About
|
|
17
|
+
|
|
18
|
+
A row or column of native buttons that share one bordered outline: one size tier for the whole group, internal dividers, and rounded corners only on the outer edges.
|
|
19
|
+
|
|
20
|
+
- **Use** for toolbars, filters, and view switches where segments should read as one control but keep separate button semantics (`type`, `disabled`, per-item handlers).
|
|
21
|
+
- **Use** for compact action pairs such as submit and reset inside a form.
|
|
22
|
+
- **Use** when you control which segment looks active with `pressed` and parent state (toggle or single-choice UX).
|
|
23
|
+
- **Do not use** when you need a true “one of N” form field with radio semantics and native submission — prefer [Radio](../radio/COMPONENT.md) or native radios.
|
|
24
|
+
- **Do not use** when the kit’s segmented switcher API fits better — see [SegmentedControl](../segmented-control/COMPONENT.md).
|
|
25
|
+
- **Do not use** for a single standalone call to action — use [Button](../button/COMPONENT.md) instead.
|
|
26
|
+
|
|
27
|
+
### Scenarios (examples)
|
|
28
|
+
|
|
29
|
+
Copy-ready demos live under **`examples/`** (same folder as this file):
|
|
30
|
+
|
|
31
|
+
| Scenario | File | Idea |
|
|
32
|
+
|----------|------|------|
|
|
33
|
+
| Editor toolbar | [`examples/editor-toolbar.tsx`](examples/editor-toolbar.tsx) | Icon segments + optional **`pressed`** for active format; **`aria-label`** on icon-only **`Item`**. |
|
|
34
|
+
| Form footer | [`examples/form-footer.tsx`](examples/form-footer.tsx) | **`type="submit"`** / **`type="reset"`** (or **`button`**) in one group; name **`Root`** with **`aria-label`**. |
|
|
35
|
+
| View switcher | [`examples/view-switcher.tsx`](examples/view-switcher.tsx) | Single choice in React state; exactly one **`pressed={true}`** at a time. |
|
|
36
|
+
| Wizard actions | [`examples/wizard-actions.tsx`](examples/wizard-actions.tsx) | Step **Back** / **Next** as a horizontal group; **`disabled`** on **Back** for the first step. |
|
|
37
|
+
|
|
38
|
+
Playground demos (sizes, orientation, states, composition, full-width layout) live in **`playground/snippets/button-group/`**.
|
|
39
|
+
|
|
40
|
+
### Composition
|
|
41
|
+
|
|
42
|
+
- **`ButtonGroup`** is a namespace object: **`Root`**, **`Item`**, **`Icon`**.
|
|
43
|
+
- **`ButtonGroup.Root`** — wrapper `div` with `data-size={size}`; for `orientation="vertical"` it sets `data-orientation="vertical"`. It provides group context and **`ControlSizeProvider`**, so nested controls inherit the same size tier.
|
|
44
|
+
- Place one or more **`ButtonGroup.Item`** elements inside **`Root`** (they call the group context; using **`Item`** outside **`Root`** throws).
|
|
45
|
+
- Optionally put **`ButtonGroup.Icon`** inside an **`Item`** to wrap an SVG: it renders a **`span`** with **`aria-hidden="true"`**.
|
|
46
|
+
|
|
47
|
+
### Minimal example
|
|
48
|
+
|
|
49
|
+
```tsx
|
|
50
|
+
import { ButtonGroup } from "prime-ui-kit";
|
|
51
|
+
|
|
52
|
+
export function Example() {
|
|
53
|
+
return (
|
|
54
|
+
<ButtonGroup.Root aria-label="Options" size="m">
|
|
55
|
+
<ButtonGroup.Item type="button">One</ButtonGroup.Item>
|
|
56
|
+
<ButtonGroup.Item type="button">Two</ButtonGroup.Item>
|
|
57
|
+
</ButtonGroup.Root>
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Rules
|
|
63
|
+
|
|
64
|
+
- There is no `variant` prop: appearance is always the shared-outline segment style; vary **`size`**, **`orientation`**, **`pressed`**, and **`disabled`** instead.
|
|
65
|
+
- **`pressed`**: when `true`, the segment gets `data-state="on"` and `aria-pressed="true"`; when `false`, you get `aria-pressed="false"`; when omitted, `aria-pressed` is not set.
|
|
66
|
+
- The component does not enforce a single selected segment: for mutually exclusive choice, keep state in the parent and set **`pressed`** (and handlers) accordingly; avoid multiple **`pressed`** items unless that is intentional.
|
|
67
|
+
- Give **`Root`** an accessible name with **`aria-label`** or **`aria-labelledby`** when the group is not labeled by visible text.
|
|
68
|
+
- For icon-only segments, set **`aria-label`** on **`ButtonGroup.Item`**; do not rely on **`ButtonGroup.Icon`** for a name (it is hidden from assistive tech).
|
|
69
|
+
- Segments always render as **`<button>`** (no `asChild`); there is no built-in **`fullWidth`** — widen the group with layout on the root and items if needed.
|
|
70
|
+
- **`ButtonGroup.Item`** supports **`type="button" | "submit" | "reset"`** (default **`"button"`**) for correct form behavior.
|
|
71
|
+
|
|
72
|
+
### API
|
|
73
|
+
|
|
74
|
+
#### ButtonGroup.Root
|
|
75
|
+
|
|
76
|
+
| Prop | Type | Default | Required | Description |
|
|
77
|
+
|------|------|---------|----------|-------------|
|
|
78
|
+
| orientation | `"horizontal" \| "vertical"` | `"horizontal"` | no | Layout direction of segments. |
|
|
79
|
+
| size | `"s" \| "m" \| "l" \| "xl"` | `"m"` | no | Size tier for the group (height, radius, typography, icon scale). |
|
|
80
|
+
| children | `React.ReactNode` | — | yes | Usually several `ButtonGroup.Item` nodes. |
|
|
81
|
+
| className | `string` | — | no | Additional class on the root element. |
|
|
82
|
+
| …rest | `React.HTMLAttributes<HTMLDivElement>` | — | no | Other div attributes (e.g. `aria-label`, `role`, event handlers). |
|
|
83
|
+
|
|
84
|
+
#### ButtonGroup.Item
|
|
85
|
+
|
|
86
|
+
| Prop | Type | Default | Required | Description |
|
|
87
|
+
|------|------|---------|----------|-------------|
|
|
88
|
+
| pressed | `boolean` | — | no | Selected look: `data-state="on"` when `true`; `aria-pressed` mirrors the prop when it is a boolean. |
|
|
89
|
+
| type | `"button" \| "submit" \| "reset"` | `"button"` | no | Native button type inside forms. |
|
|
90
|
+
| disabled | `boolean` | — | no | Disables the segment. |
|
|
91
|
+
| children | `React.ReactNode` | — | no | Label content; optional `ButtonGroup.Icon` for icons. |
|
|
92
|
+
| className | `string` | — | no | Additional class on the button. |
|
|
93
|
+
| …rest | `React.ButtonHTMLAttributes<HTMLButtonElement>` | — | no | Other native button attributes. |
|
|
94
|
+
|
|
95
|
+
#### ButtonGroup.Icon
|
|
96
|
+
|
|
97
|
+
| Prop | Type | Default | Required | Description |
|
|
98
|
+
|------|------|---------|----------|-------------|
|
|
99
|
+
| children | `React.ReactNode` | — | yes | Typically an SVG icon. |
|
|
100
|
+
| className | `string` | — | no | Additional class on the wrapper span. |
|
|
101
|
+
| …rest | `Omit<React.HTMLAttributes<HTMLSpanElement>, "children">` | — | no | Other span attributes (not `children`). |
|
|
102
|
+
|
|
103
|
+
### Related
|
|
104
|
+
|
|
105
|
+
- [Button](../button/COMPONENT.md) — single actions, variants, loading.
|
|
106
|
+
- [SegmentedControl](../segmented-control/COMPONENT.md) — alternative segmented switcher API.
|
|
107
|
+
- [Radio](../radio/COMPONENT.md) — form “one of N” with radio semantics.
|
|
108
|
+
|
|
109
|
+
## LLM note
|
|
110
|
+
|
|
111
|
+
```yaml
|
|
112
|
+
component: ButtonGroup
|
|
113
|
+
exports: [ButtonGroup.Root, ButtonGroup.Item, ButtonGroup.Icon]
|
|
114
|
+
defaults: { size: m, orientation: horizontal }
|
|
115
|
+
behavior:
|
|
116
|
+
items_are: native button elements
|
|
117
|
+
pressed: optional boolean per Item; parent owns mutual exclusion for single-choice UX
|
|
118
|
+
no_variant: true
|
|
119
|
+
no_fullWidth_prop: true # use layout / className on Root and Items
|
|
120
|
+
forms:
|
|
121
|
+
Item_type: [button, submit, reset]
|
|
122
|
+
a11y:
|
|
123
|
+
name_Root: aria-label or aria-labelledby when no visible label
|
|
124
|
+
icon_only_Item: aria-label on Item (not on Icon)
|
|
125
|
+
anti_patterns:
|
|
126
|
+
- Using as native radio group for form submit semantics → Radio
|
|
127
|
+
- Single CTA → Button
|
|
128
|
+
- Prefer SegmentedControl when that composable API is a better fit
|
|
129
|
+
doc_examples_dir: src/components/button-group/examples/
|
|
130
|
+
playground_snippets: playground/snippets/button-group/
|
|
131
|
+
```
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { Bold, Italic, Underline } from "lucide-react";
|
|
2
|
+
import { ButtonGroup } from "prime-ui-kit";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Editor toolbar: icon segments share one outline; active format uses `pressed`.
|
|
7
|
+
* Meaning for assistive tech: `aria-label` on each icon-only `Item`.
|
|
8
|
+
*/
|
|
9
|
+
export default function EditorToolbarExample() {
|
|
10
|
+
const [marks, setMarks] = React.useState({ bold: true, italic: false, underline: false });
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<ButtonGroup.Root aria-label="Text formatting" size="m">
|
|
14
|
+
<ButtonGroup.Item
|
|
15
|
+
aria-label="Bold"
|
|
16
|
+
pressed={marks.bold}
|
|
17
|
+
type="button"
|
|
18
|
+
onClick={() => setMarks((m) => ({ ...m, bold: !m.bold }))}
|
|
19
|
+
>
|
|
20
|
+
<ButtonGroup.Icon>
|
|
21
|
+
<Bold />
|
|
22
|
+
</ButtonGroup.Icon>
|
|
23
|
+
</ButtonGroup.Item>
|
|
24
|
+
<ButtonGroup.Item
|
|
25
|
+
aria-label="Italic"
|
|
26
|
+
pressed={marks.italic}
|
|
27
|
+
type="button"
|
|
28
|
+
onClick={() => setMarks((m) => ({ ...m, italic: !m.italic }))}
|
|
29
|
+
>
|
|
30
|
+
<ButtonGroup.Icon>
|
|
31
|
+
<Italic />
|
|
32
|
+
</ButtonGroup.Icon>
|
|
33
|
+
</ButtonGroup.Item>
|
|
34
|
+
<ButtonGroup.Item
|
|
35
|
+
aria-label="Underline"
|
|
36
|
+
pressed={marks.underline}
|
|
37
|
+
type="button"
|
|
38
|
+
onClick={() => setMarks((m) => ({ ...m, underline: !m.underline }))}
|
|
39
|
+
>
|
|
40
|
+
<ButtonGroup.Icon>
|
|
41
|
+
<Underline />
|
|
42
|
+
</ButtonGroup.Icon>
|
|
43
|
+
</ButtonGroup.Item>
|
|
44
|
+
</ButtonGroup.Root>
|
|
45
|
+
);
|
|
46
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ButtonGroup } from "prime-ui-kit";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Form footer: native submit + reset in one segmented control.
|
|
5
|
+
*/
|
|
6
|
+
export default function FormFooterExample() {
|
|
7
|
+
return (
|
|
8
|
+
<form
|
|
9
|
+
onSubmit={(e) => {
|
|
10
|
+
e.preventDefault();
|
|
11
|
+
}}
|
|
12
|
+
>
|
|
13
|
+
<ButtonGroup.Root aria-label="Save or reset draft" size="m">
|
|
14
|
+
<ButtonGroup.Item type="submit">Save</ButtonGroup.Item>
|
|
15
|
+
<ButtonGroup.Item type="reset">Reset</ButtonGroup.Item>
|
|
16
|
+
</ButtonGroup.Root>
|
|
17
|
+
</form>
|
|
18
|
+
);
|
|
19
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ButtonGroup } from "prime-ui-kit";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
|
|
4
|
+
type ViewMode = "list" | "grid" | "board";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* View switcher: one active segment; state lives in the parent.
|
|
8
|
+
*/
|
|
9
|
+
export default function ViewSwitcherExample() {
|
|
10
|
+
const [mode, setMode] = React.useState<ViewMode>("list");
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<ButtonGroup.Root aria-label="View layout" size="m">
|
|
14
|
+
<ButtonGroup.Item pressed={mode === "list"} type="button" onClick={() => setMode("list")}>
|
|
15
|
+
List
|
|
16
|
+
</ButtonGroup.Item>
|
|
17
|
+
<ButtonGroup.Item pressed={mode === "grid"} type="button" onClick={() => setMode("grid")}>
|
|
18
|
+
Grid
|
|
19
|
+
</ButtonGroup.Item>
|
|
20
|
+
<ButtonGroup.Item pressed={mode === "board"} type="button" onClick={() => setMode("board")}>
|
|
21
|
+
Board
|
|
22
|
+
</ButtonGroup.Item>
|
|
23
|
+
</ButtonGroup.Root>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ButtonGroup } from "prime-ui-kit";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
|
|
4
|
+
const STEP_LAST = 2;
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Wizard step actions: Back disabled on first step; Next advances (demo stops at last step).
|
|
8
|
+
*/
|
|
9
|
+
export default function WizardActionsExample() {
|
|
10
|
+
const [step, setStep] = React.useState(0);
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<ButtonGroup.Root aria-label="Wizard navigation" size="m">
|
|
14
|
+
<ButtonGroup.Item
|
|
15
|
+
disabled={step === 0}
|
|
16
|
+
type="button"
|
|
17
|
+
onClick={() => setStep((s) => Math.max(0, s - 1))}
|
|
18
|
+
>
|
|
19
|
+
Back
|
|
20
|
+
</ButtonGroup.Item>
|
|
21
|
+
<ButtonGroup.Item
|
|
22
|
+
disabled={step >= STEP_LAST}
|
|
23
|
+
type="button"
|
|
24
|
+
onClick={() => setStep((s) => Math.min(STEP_LAST, s + 1))}
|
|
25
|
+
>
|
|
26
|
+
Next
|
|
27
|
+
</ButtonGroup.Item>
|
|
28
|
+
</ButtonGroup.Root>
|
|
29
|
+
);
|
|
30
|
+
}
|