@sableui/react 0.6.2 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +2 -2
- package/CHANGELOG.md +315 -0
- package/CONTRIBUTING.md +16 -10
- package/DESIGN.md +3 -3
- package/README.md +3 -3
- package/bin/sable-lint.mjs +18 -0
- package/bin/sable.mjs +470 -62
- package/dist/blocks/api-keys-block.js +44 -0
- package/dist/blocks/api-keys-block.meta.js +21 -0
- package/dist/blocks/chat-thread-block.js +17 -0
- package/dist/blocks/chat-thread-block.meta.js +20 -0
- package/dist/blocks/command-palette-block.js +24 -0
- package/dist/blocks/command-palette-block.meta.js +21 -0
- package/dist/blocks/cta-band-block.js +27 -0
- package/dist/blocks/cta-band-block.meta.js +20 -0
- package/dist/blocks/danger-zone-block.js +39 -0
- package/dist/blocks/danger-zone-block.meta.js +21 -0
- package/dist/blocks/device-comparison-block.js +69 -0
- package/dist/blocks/device-comparison-block.meta.js +21 -0
- package/dist/blocks/event-card-block.js +40 -0
- package/dist/blocks/event-card-block.meta.js +21 -0
- package/dist/blocks/faq-block.js +38 -0
- package/dist/blocks/faq-block.meta.js +20 -0
- package/dist/blocks/feature-grid-block.js +38 -0
- package/dist/blocks/feature-grid-block.meta.js +21 -0
- package/dist/blocks/feedback-form-block.js +30 -0
- package/dist/blocks/feedback-form-block.meta.js +21 -0
- package/dist/blocks/goal-progress-block.js +24 -0
- package/dist/blocks/goal-progress-block.meta.js +21 -0
- package/dist/blocks/hero-block.js +33 -0
- package/dist/blocks/hero-block.meta.js +21 -0
- package/dist/blocks/index.js +162 -1964
- package/dist/blocks/invite-team-block.js +36 -0
- package/dist/blocks/invite-team-block.meta.js +20 -0
- package/dist/blocks/invoice-history-block.js +41 -0
- package/dist/blocks/invoice-history-block.meta.js +21 -0
- package/dist/blocks/kpi-sparkline-block.js +29 -0
- package/dist/blocks/kpi-sparkline-block.meta.js +20 -0
- package/dist/blocks/media-player-block.js +68 -0
- package/dist/blocks/media-player-block.meta.js +21 -0
- package/dist/blocks/newsletter-block.js +35 -0
- package/dist/blocks/newsletter-block.meta.js +21 -0
- package/dist/blocks/not-found-block.js +27 -0
- package/dist/blocks/not-found-block.meta.js +20 -0
- package/dist/blocks/notification-list-block.js +32 -0
- package/dist/blocks/notification-list-block.meta.js +21 -0
- package/dist/blocks/notification-settings-block.js +25 -0
- package/dist/blocks/notification-settings-block.meta.js +20 -0
- package/dist/blocks/order-tracking-block.js +26 -0
- package/dist/blocks/order-tracking-block.meta.js +20 -0
- package/dist/blocks/pricing-card-block.js +46 -0
- package/dist/blocks/pricing-card-block.meta.js +21 -0
- package/dist/blocks/pricing-table-block.js +88 -0
- package/dist/blocks/pricing-table-block.meta.js +20 -0
- package/dist/blocks/product-card-block.js +26 -0
- package/dist/blocks/product-card-block.meta.js +21 -0
- package/dist/blocks/profile-card-block.js +58 -0
- package/dist/blocks/profile-card-block.meta.js +21 -0
- package/dist/blocks/profile-form-block.js +70 -0
- package/dist/blocks/profile-form-block.meta.js +21 -0
- package/dist/blocks/revenue-breakdown-block.js +38 -0
- package/dist/blocks/revenue-breakdown-block.meta.js +21 -0
- package/dist/blocks/sign-in-block.js +38 -0
- package/dist/blocks/sign-in-block.meta.js +21 -0
- package/dist/blocks/sign-up-block.js +48 -0
- package/dist/blocks/sign-up-block.meta.js +21 -0
- package/dist/blocks/site-footer-block.js +54 -0
- package/dist/blocks/site-footer-block.meta.js +20 -0
- package/dist/blocks/stat-row-block.js +28 -0
- package/dist/blocks/stat-row-block.meta.js +21 -0
- package/dist/blocks/steps-block.js +37 -0
- package/dist/blocks/steps-block.meta.js +20 -0
- package/dist/blocks/task-list-block.js +52 -0
- package/dist/blocks/task-list-block.meta.js +21 -0
- package/dist/blocks/team-members-block.js +49 -0
- package/dist/blocks/team-members-block.meta.js +21 -0
- package/dist/blocks/testimonial-block.js +49 -0
- package/dist/blocks/testimonial-block.meta.js +20 -0
- package/dist/blocks/traffic-sources-block.js +39 -0
- package/dist/blocks/traffic-sources-block.meta.js +21 -0
- package/dist/blocks/traffic-trend-block.js +61 -0
- package/dist/blocks/traffic-trend-block.meta.js +21 -0
- package/dist/blocks/upload-list-block.js +39 -0
- package/dist/blocks/upload-list-block.meta.js +21 -0
- package/dist/blocks/verify-code-block.js +28 -0
- package/dist/blocks/verify-code-block.meta.js +21 -0
- package/dist/blocks/wallet-block.js +48 -0
- package/dist/blocks/wallet-block.meta.js +21 -0
- package/dist/components/accordion/accordion.js +63 -0
- package/dist/components/accordion/accordion.meta.js +155 -0
- package/dist/components/accordion/index.js +15 -0
- package/dist/components/app-header/app-header.js +30 -0
- package/dist/components/app-header/app-header.meta.js +88 -0
- package/dist/components/app-header/index.js +7 -0
- package/dist/components/app-shell/app-shell-dock.js +37 -0
- package/dist/components/app-shell/app-shell.js +67 -0
- package/dist/components/app-shell/app-shell.meta.js +176 -0
- package/dist/components/app-shell/index.js +7 -0
- package/dist/components/area-chart/area-chart.js +10 -0
- package/dist/components/area-chart/area-chart.meta.js +218 -0
- package/dist/components/area-chart/index.js +7 -0
- package/dist/components/attachment/attachment.js +176 -0
- package/dist/components/attachment/attachment.meta.js +179 -0
- package/dist/components/attachment/attachment.variants.js +47 -0
- package/dist/components/attachment/index.js +7 -0
- package/dist/components/avatar/avatar.js +192 -0
- package/dist/components/avatar/avatar.meta.js +233 -0
- package/dist/components/avatar/avatar.variants.js +44 -0
- package/dist/components/avatar/index.js +22 -0
- package/dist/components/badge/badge.js +26 -0
- package/dist/components/badge/badge.meta.js +171 -0
- package/dist/components/badge/badge.variants.js +103 -0
- package/dist/components/badge/index.js +11 -0
- package/dist/components/banner/banner.js +76 -0
- package/dist/components/banner/banner.meta.js +172 -0
- package/dist/components/banner/banner.variants.js +44 -0
- package/dist/components/banner/index.js +9 -0
- package/dist/components/bar-chart/bar-chart.js +10 -0
- package/dist/components/bar-chart/bar-chart.meta.js +245 -0
- package/dist/components/bar-chart/index.js +7 -0
- package/dist/components/bottom-nav/bottom-nav.js +63 -0
- package/dist/components/bottom-nav/bottom-nav.meta.js +95 -0
- package/dist/components/bottom-nav/index.js +11 -0
- package/dist/components/breadcrumbs/breadcrumbs.js +90 -0
- package/dist/components/breadcrumbs/breadcrumbs.meta.js +111 -0
- package/dist/components/breadcrumbs/index.js +17 -0
- package/dist/components/browser/browser.js +39 -0
- package/dist/components/browser/browser.meta.js +80 -0
- package/dist/components/browser/index.js +7 -0
- package/dist/components/bubble/bubble.js +110 -0
- package/dist/components/bubble/bubble.meta.js +158 -0
- package/dist/components/bubble/bubble.variants.js +90 -0
- package/dist/components/bubble/index.js +13 -0
- package/dist/components/button/button.js +87 -0
- package/dist/components/button/button.meta.js +302 -0
- package/dist/components/button/button.variants.js +137 -0
- package/dist/components/button/index.js +9 -0
- package/dist/components/calendar/calendar.js +89 -0
- package/dist/components/calendar/calendar.meta.js +136 -0
- package/dist/components/calendar/index.js +7 -0
- package/dist/components/card/card.js +203 -0
- package/dist/components/card/card.meta.js +212 -0
- package/dist/components/card/index.js +23 -0
- package/dist/components/carousel/carousel.js +428 -0
- package/dist/components/carousel/carousel.meta.js +100 -0
- package/dist/components/carousel/index.js +7 -0
- package/dist/components/chat-composer/chat-composer.js +174 -0
- package/dist/components/chat-composer/chat-composer.meta.js +241 -0
- package/dist/components/chat-composer/chat-composer.variants.js +17 -0
- package/dist/components/chat-composer/index.js +7 -0
- package/dist/components/checkbox/checkbox-mark.js +28 -0
- package/dist/components/checkbox/checkbox.js +30 -0
- package/dist/components/checkbox/checkbox.meta.js +127 -0
- package/dist/components/checkbox/index.js +7 -0
- package/dist/components/checkbox-card/checkbox-card.js +94 -0
- package/dist/components/checkbox-card/checkbox-card.meta.js +154 -0
- package/dist/components/checkbox-card/checkbox-card.variants.js +43 -0
- package/dist/components/checkbox-card/index.js +11 -0
- package/dist/components/code/code.js +19 -0
- package/dist/components/code/code.meta.js +71 -0
- package/dist/components/code/index.js +7 -0
- package/dist/components/code-block/code-block.js +84 -0
- package/dist/components/code-block/code-block.meta.js +103 -0
- package/dist/components/code-block/index.js +8 -0
- package/dist/components/collapsible/collapsible.js +38 -0
- package/dist/components/collapsible/collapsible.meta.js +117 -0
- package/dist/components/collapsible/index.js +15 -0
- package/dist/components/color-field/color-field.js +293 -0
- package/dist/components/color-field/color-field.meta.js +142 -0
- package/dist/components/color-field/color.js +69 -0
- package/dist/components/color-field/index.js +15 -0
- package/dist/components/combobox/combobox.js +486 -0
- package/dist/components/combobox/combobox.meta.js +217 -0
- package/dist/components/combobox/index.js +37 -0
- package/dist/components/command-menu/command-menu-trigger.js +122 -0
- package/dist/components/command-menu/command-menu.js +433 -0
- package/dist/components/command-menu/command-menu.meta.js +279 -0
- package/dist/components/command-menu/index.js +21 -0
- package/dist/components/context-card/context-card.js +62 -0
- package/dist/components/context-card/context-card.meta.js +106 -0
- package/dist/components/context-card/index.js +17 -0
- package/dist/components/context-menu/context-menu.js +92 -0
- package/dist/components/context-menu/context-menu.meta.js +138 -0
- package/dist/components/context-menu/index.js +23 -0
- package/dist/components/data-table/data-table.js +142 -0
- package/dist/components/data-table/data-table.meta.js +146 -0
- package/dist/components/data-table/index.js +9 -0
- package/dist/components/date-picker/date-picker.js +196 -0
- package/dist/components/date-picker/date-picker.meta.js +164 -0
- package/dist/components/date-picker/index.js +7 -0
- package/dist/components/date-tile/date-tile.js +29 -0
- package/dist/components/date-tile/date-tile.meta.js +72 -0
- package/dist/components/date-tile/index.js +7 -0
- package/dist/components/destructive-action-modal/destructive-action-modal.js +130 -0
- package/dist/components/destructive-action-modal/destructive-action-modal.meta.js +136 -0
- package/dist/components/destructive-action-modal/index.js +9 -0
- package/dist/components/dialog/dialog.js +207 -0
- package/dist/components/dialog/dialog.meta.js +239 -0
- package/dist/components/dialog/index.js +45 -0
- package/dist/components/disclosure-picker/disclosure-picker.js +417 -0
- package/dist/components/disclosure-picker/disclosure-picker.meta.js +213 -0
- package/dist/components/disclosure-picker/index.js +21 -0
- package/dist/components/empty-state/empty-state.js +52 -0
- package/dist/components/empty-state/empty-state.meta.js +158 -0
- package/dist/components/empty-state/index.js +7 -0
- package/dist/components/entity/entity.js +70 -0
- package/dist/components/entity/entity.meta.js +108 -0
- package/dist/components/entity/entity.variants.js +16 -0
- package/dist/components/entity/index.js +7 -0
- package/dist/components/feedback/feedback.js +93 -0
- package/dist/components/feedback/feedback.meta.js +109 -0
- package/dist/components/feedback/index.js +7 -0
- package/dist/components/fieldset/fieldset.js +80 -0
- package/dist/components/fieldset/fieldset.meta.js +160 -0
- package/dist/components/fieldset/index.js +17 -0
- package/dist/components/file-dropzone/file-dropzone.js +193 -0
- package/dist/components/file-dropzone/file-dropzone.meta.js +210 -0
- package/dist/components/file-dropzone/file-dropzone.variants.js +26 -0
- package/dist/components/file-dropzone/index.js +13 -0
- package/dist/components/font-picker/font-picker.js +77 -0
- package/dist/components/font-picker/font-picker.meta.js +119 -0
- package/dist/components/font-picker/index.js +7 -0
- package/dist/components/form/form.js +145 -0
- package/dist/components/form/form.meta.js +142 -0
- package/dist/components/form/index.js +11 -0
- package/dist/components/gliding-highlight/gliding-highlight.js +50 -0
- package/dist/components/gliding-highlight/gliding-highlight.meta.js +135 -0
- package/dist/components/gliding-highlight/index.js +9 -0
- package/dist/components/gradient-art/gradient-art.js +168 -0
- package/dist/components/gradient-art/gradient-art.meta.js +81 -0
- package/dist/components/gradient-art/index.js +7 -0
- package/dist/components/gradient-art/renderer.js +336 -0
- package/dist/components/inline-status/index.js +7 -0
- package/dist/components/inline-status/inline-status.js +33 -0
- package/dist/components/inline-status/inline-status.meta.js +83 -0
- package/dist/components/inline-status/inline-status.variants.js +18 -0
- package/dist/components/input/index.js +7 -0
- package/dist/components/input/input.js +33 -0
- package/dist/components/input/input.meta.js +155 -0
- package/dist/components/kbd/index.js +8 -0
- package/dist/components/kbd/kbd.js +54 -0
- package/dist/components/kbd/kbd.meta.js +95 -0
- package/dist/components/label/index.js +7 -0
- package/dist/components/label/label.js +51 -0
- package/dist/components/label/label.meta.js +98 -0
- package/dist/components/line-chart/index.js +7 -0
- package/dist/components/line-chart/line-chart.js +10 -0
- package/dist/components/line-chart/line-chart.meta.js +222 -0
- package/dist/components/marker/index.js +7 -0
- package/dist/components/marker/marker.js +39 -0
- package/dist/components/marker/marker.meta.js +132 -0
- package/dist/components/marker/marker.variants.js +25 -0
- package/dist/components/marquee/index.js +7 -0
- package/dist/components/marquee/marquee.js +146 -0
- package/dist/components/marquee/marquee.meta.js +106 -0
- package/dist/components/media-image/index.js +7 -0
- package/dist/components/media-image/media-image.js +56 -0
- package/dist/components/media-image/media-image.meta.js +92 -0
- package/dist/components/media-tile/index.js +7 -0
- package/dist/components/media-tile/media-tile.js +135 -0
- package/dist/components/media-tile/media-tile.meta.js +133 -0
- package/dist/components/media-tile/media-tile.variants.js +48 -0
- package/dist/components/menu/index.js +33 -0
- package/dist/components/menu/menu.js +168 -0
- package/dist/components/menu/menu.meta.js +176 -0
- package/dist/components/message/index.js +7 -0
- package/dist/components/message/message.js +83 -0
- package/dist/components/message/message.meta.js +150 -0
- package/dist/components/message/message.variants.js +41 -0
- package/dist/components/message-scroller/index.js +9 -0
- package/dist/components/message-scroller/message-scroller.js +300 -0
- package/dist/components/message-scroller/message-scroller.meta.js +172 -0
- package/dist/components/meter/index.js +20 -0
- package/dist/components/meter/meter.js +112 -0
- package/dist/components/meter/meter.meta.js +227 -0
- package/dist/components/meter/meter.variants.js +61 -0
- package/dist/components/middle-truncate/index.js +7 -0
- package/dist/components/middle-truncate/middle-truncate.js +28 -0
- package/dist/components/middle-truncate/middle-truncate.meta.js +77 -0
- package/dist/components/note/index.js +9 -0
- package/dist/components/note/note.js +73 -0
- package/dist/components/note/note.meta.js +112 -0
- package/dist/components/note/note.variants.js +22 -0
- package/dist/components/notification-badge/index.js +15 -0
- package/dist/components/notification-badge/notification-badge.js +48 -0
- package/dist/components/notification-badge/notification-badge.meta.js +107 -0
- package/dist/components/notification-badge/notification-badge.variants.js +57 -0
- package/dist/components/number-field/index.js +7 -0
- package/dist/components/number-field/number-field.js +70 -0
- package/dist/components/number-field/number-field.meta.js +109 -0
- package/dist/components/otp-field/index.js +7 -0
- package/dist/components/otp-field/otp-field.js +70 -0
- package/dist/components/otp-field/otp-field.meta.js +197 -0
- package/dist/components/overflow-menu/index.js +7 -0
- package/dist/components/overflow-menu/overflow-menu.js +26 -0
- package/dist/components/overflow-menu/overflow-menu.meta.js +100 -0
- package/dist/components/page-header/index.js +7 -0
- package/dist/components/page-header/page-header.js +34 -0
- package/dist/components/page-header/page-header.meta.js +104 -0
- package/dist/components/page-loader/index.js +7 -0
- package/dist/components/page-loader/page-loader.js +37 -0
- package/dist/components/page-loader/page-loader.meta.js +85 -0
- package/dist/components/pagination/index.js +7 -0
- package/dist/components/pagination/pagination.js +105 -0
- package/dist/components/pagination/pagination.meta.js +141 -0
- package/dist/components/panel-group/index.js +10 -0
- package/dist/components/panel-group/panel-group.js +168 -0
- package/dist/components/panel-group/panel-group.meta.js +153 -0
- package/dist/components/panel-section/index.js +9 -0
- package/dist/components/panel-section/panel-section.js +115 -0
- package/dist/components/panel-section/panel-section.meta.js +156 -0
- package/dist/components/phone/index.js +7 -0
- package/dist/components/phone/phone.js +50 -0
- package/dist/{chunk-KFZ43RKU.js → components/phone/phone.meta.js} +3 -50
- package/dist/{chunk-NEQNXI2G.js → components/phone/status-icons.js} +4 -4
- package/dist/components/pie-chart/index.js +7 -0
- package/dist/components/pie-chart/pie-chart.js +191 -0
- package/dist/components/pie-chart/pie-chart.meta.js +210 -0
- package/dist/components/pill/index.js +9 -0
- package/dist/components/pill/pill.js +24 -0
- package/dist/components/pill/pill.meta.js +108 -0
- package/dist/components/pill/pill.variants.js +65 -0
- package/dist/components/popover/index.js +23 -0
- package/dist/components/popover/popover.js +100 -0
- package/dist/components/popover/popover.meta.js +136 -0
- package/dist/components/progress/index.js +19 -0
- package/dist/components/progress/progress.js +70 -0
- package/dist/components/progress/progress.meta.js +171 -0
- package/dist/components/progress/progress.variants.js +17 -0
- package/dist/components/radar-chart/index.js +7 -0
- package/dist/components/radar-chart/radar-chart.js +161 -0
- package/dist/components/radar-chart/radar-chart.meta.js +204 -0
- package/dist/components/radial-chart/index.js +7 -0
- package/dist/components/radial-chart/radial-chart.js +175 -0
- package/dist/components/radial-chart/radial-chart.meta.js +216 -0
- package/dist/components/radio/index.js +8 -0
- package/dist/components/radio/radio.js +39 -0
- package/dist/components/radio/radio.meta.js +104 -0
- package/dist/components/radio-card/index.js +7 -0
- package/dist/components/radio-card/radio-card.js +81 -0
- package/dist/components/radio-card/radio-card.meta.js +144 -0
- package/dist/components/radio-card/radio-card.variants.js +43 -0
- package/dist/components/relative-time/index.js +7 -0
- package/dist/components/relative-time/relative-time.js +47 -0
- package/dist/components/relative-time/relative-time.meta.js +77 -0
- package/dist/components/scroller/index.js +7 -0
- package/dist/components/scroller/scroller.js +111 -0
- package/dist/components/scroller/scroller.meta.js +118 -0
- package/dist/components/scrub-field/index.js +7 -0
- package/dist/components/scrub-field/scrub-field.js +124 -0
- package/dist/components/scrub-field/scrub-field.meta.js +139 -0
- package/dist/components/search-input/index.js +7 -0
- package/dist/components/search-input/search-input.js +91 -0
- package/dist/components/search-input/search-input.meta.js +129 -0
- package/dist/components/section-header/index.js +7 -0
- package/dist/components/section-header/section-header.js +39 -0
- package/dist/components/section-header/section-header.meta.js +174 -0
- package/dist/components/segmented-bar/index.js +14 -0
- package/dist/components/segmented-bar/segmented-bar.js +26 -0
- package/dist/components/segmented-bar/segmented-bar.meta.js +108 -0
- package/dist/components/segmented-bar/segmented-bar.variants.js +39 -0
- package/dist/components/select/index.js +25 -0
- package/dist/components/select/select.js +191 -0
- package/dist/components/select/select.meta.js +189 -0
- package/dist/components/separator/index.js +7 -0
- package/dist/components/separator/separator.js +42 -0
- package/dist/components/separator/separator.meta.js +84 -0
- package/dist/components/settings-menu/index.js +11 -0
- package/dist/components/settings-menu/settings-menu.js +101 -0
- package/dist/components/settings-menu/settings-menu.meta.js +177 -0
- package/dist/components/settings-menu/settings-menu.variants.js +15 -0
- package/dist/components/sheet/index.js +29 -0
- package/dist/components/sheet/sheet.js +121 -0
- package/dist/components/sheet/sheet.meta.js +167 -0
- package/dist/components/sheet/sheet.variants.js +21 -0
- package/dist/components/show-more/index.js +7 -0
- package/dist/components/show-more/show-more.js +87 -0
- package/dist/components/show-more/show-more.meta.js +79 -0
- package/dist/components/side-nav/index.js +13 -0
- package/dist/components/side-nav/side-nav.js +75 -0
- package/dist/components/side-nav/side-nav.meta.js +139 -0
- package/dist/components/side-nav/side-nav.variants.js +34 -0
- package/dist/components/sidebar/index.js +21 -0
- package/dist/components/sidebar/sidebar.js +196 -0
- package/dist/components/sidebar/sidebar.meta.js +118 -0
- package/dist/components/skeleton/index.js +7 -0
- package/dist/components/skeleton/skeleton.js +16 -0
- package/dist/components/skeleton/skeleton.meta.js +90 -0
- package/dist/components/slider/index.js +21 -0
- package/dist/components/slider/slider.js +115 -0
- package/dist/components/slider/slider.meta.js +214 -0
- package/dist/components/sparkline/index.js +7 -0
- package/dist/components/sparkline/sparkline.js +84 -0
- package/dist/components/sparkline/sparkline.meta.js +147 -0
- package/dist/components/spinner/index.js +7 -0
- package/dist/components/spinner/spinner.js +59 -0
- package/dist/components/spinner/spinner.meta.js +118 -0
- package/dist/components/status-bar/index.js +9 -0
- package/dist/components/status-bar/status-bar.js +40 -0
- package/dist/components/status-bar/status-bar.meta.js +117 -0
- package/dist/components/status-dot/index.js +9 -0
- package/dist/components/status-dot/status-dot.js +40 -0
- package/dist/components/status-dot/status-dot.meta.js +113 -0
- package/dist/components/status-dot/status-dot.variants.js +28 -0
- package/dist/components/stepper/index.js +17 -0
- package/dist/components/stepper/stepper.js +161 -0
- package/dist/components/stepper/stepper.meta.js +190 -0
- package/dist/components/stepper/stepper.variants.js +72 -0
- package/dist/components/streaming-text/index.js +7 -0
- package/dist/components/streaming-text/streaming-text.js +55 -0
- package/dist/components/streaming-text/streaming-text.meta.js +147 -0
- package/dist/components/switch/index.js +7 -0
- package/dist/components/switch/switch.js +26 -0
- package/dist/components/switch/switch.meta.js +133 -0
- package/dist/components/table/index.js +23 -0
- package/dist/components/table/table.js +117 -0
- package/dist/components/table/table.meta.js +143 -0
- package/dist/components/tabs/index.js +17 -0
- package/dist/components/tabs/tabs.js +58 -0
- package/dist/components/tabs/tabs.meta.js +120 -0
- package/dist/components/textarea/index.js +7 -0
- package/dist/components/textarea/textarea.js +38 -0
- package/dist/components/textarea/textarea.meta.js +117 -0
- package/dist/components/theme-selector/index.js +11 -0
- package/dist/components/theme-selector/theme-selector.js +145 -0
- package/dist/components/theme-selector/theme-selector.meta.js +181 -0
- package/dist/components/theme-switcher/index.js +7 -0
- package/dist/components/theme-switcher/theme-switcher.js +106 -0
- package/dist/components/theme-switcher/theme-switcher.meta.js +99 -0
- package/dist/components/thinking-orb/index.js +9 -0
- package/dist/components/thinking-orb/thinking-orb.js +126 -0
- package/dist/components/thinking-orb/thinking-orb.meta.js +142 -0
- package/dist/components/thinking-orb/thinking-orb.render.js +252 -0
- package/dist/components/toast/index.js +29 -0
- package/dist/components/toast/toast.js +254 -0
- package/dist/components/toast/toast.meta.js +261 -0
- package/dist/components/toggle/index.js +13 -0
- package/dist/components/toggle/toggle.js +51 -0
- package/dist/components/toggle/toggle.meta.js +129 -0
- package/dist/components/toolbar/index.js +27 -0
- package/dist/components/toolbar/toolbar.js +80 -0
- package/dist/components/toolbar/toolbar.meta.js +272 -0
- package/dist/components/toolbar/toolbar.variants.js +16 -0
- package/dist/components/tooltip/index.js +21 -0
- package/dist/components/tooltip/tooltip.js +74 -0
- package/dist/components/tooltip/tooltip.meta.js +156 -0
- package/dist/components/tree/index.js +12 -0
- package/dist/components/tree/tree.js +364 -0
- package/dist/components/tree/tree.meta.js +334 -0
- package/dist/components/video/index.js +7 -0
- package/dist/components/video/video.js +59 -0
- package/dist/components/video/video.meta.js +81 -0
- package/dist/components/workspace/index.js +9 -0
- package/dist/components/workspace/workspace.js +79 -0
- package/dist/components/workspace/workspace.meta.js +183 -0
- package/dist/foundations/accessibility.js +107 -0
- package/dist/foundations/index.js +25 -792
- package/dist/foundations/motion.js +135 -0
- package/dist/foundations/scrolling.js +62 -0
- package/dist/foundations/shape.js +113 -0
- package/dist/foundations/spacing.js +121 -0
- package/dist/foundations/surfaces.js +107 -0
- package/dist/foundations/types.js +0 -0
- package/dist/foundations/typography.js +152 -0
- package/dist/icon/Icon.js +30 -0
- package/dist/icon/IconProvider.js +27 -0
- package/dist/icon/compose.js +13 -0
- package/dist/icon/index.d.ts +13 -5
- package/dist/icon/index.js +13 -2
- package/dist/icon/registry.js +0 -0
- package/dist/icon-sets/brands.generated.js +123 -0
- package/dist/icon-sets/brands.js +10 -123
- package/dist/icon-sets/reicon.d.ts +3 -1
- package/dist/icon-sets/reicon.js +209 -1
- package/dist/index.d.ts +618 -34
- package/dist/index.js +211 -11351
- package/dist/ios/chrome.js +36 -0
- package/dist/ios/index.js +19 -315
- package/dist/ios/liquid-glass.js +103 -0
- package/dist/ios/native-app.js +46 -0
- package/dist/ios/navigation.js +63 -0
- package/dist/ios/phone-frame.js +64 -0
- package/dist/ios/preview-theme.js +83 -0
- package/dist/ios/preview.js +10 -137
- package/dist/ios/sheet.js +85 -0
- package/dist/ios/theme.js +19 -0
- package/dist/layout/AspectBox.js +27 -0
- package/dist/layout/Bleed.js +15 -0
- package/dist/layout/Center.js +21 -0
- package/dist/layout/Columns.js +70 -0
- package/dist/layout/Grid.js +50 -0
- package/dist/layout/GridOverlay.js +41 -0
- package/dist/layout/Page.js +11 -0
- package/dist/layout/Region.js +39 -0
- package/dist/layout/Row.js +45 -0
- package/dist/layout/SafeArea.js +26 -0
- package/dist/layout/Spacer.js +9 -0
- package/dist/layout/SplitPane.js +55 -0
- package/dist/layout/Stack.js +42 -0
- package/dist/layout/_responsive.js +16 -0
- package/dist/layout/_safeArea.js +18 -0
- package/dist/layout/index.d.ts +30 -8
- package/dist/layout/index.js +14 -2
- package/dist/lib/anchored-scroll.js +7 -0
- package/dist/lib/bleed.js +7 -0
- package/dist/lib/chart/cartesian.js +365 -0
- package/dist/lib/chart/chart-frame.js +163 -0
- package/dist/lib/chart/chart-legend.js +13 -0
- package/dist/lib/chart/chart-tooltip.js +38 -0
- package/dist/lib/chart/format.js +24 -0
- package/dist/lib/chart/geometry.js +114 -0
- package/dist/lib/chart/motion.js +34 -0
- package/dist/lib/chart/scale.js +72 -0
- package/dist/lib/chart/types.js +45 -0
- package/dist/lib/chart/use-arrival.js +41 -0
- package/dist/{chunk-SRQWQUTW.js → lib/cn.js} +5 -5
- package/dist/lib/component-guidance.js +215 -0
- package/dist/lib/density.js +54 -0
- package/dist/lib/field-shell.js +11 -0
- package/dist/lib/glyphs.js +9 -0
- package/dist/lib/heading-row.js +36 -0
- package/dist/lib/highlight-glide.js +84 -0
- package/dist/lib/hit-target.js +5 -0
- package/dist/lib/meta.js +0 -0
- package/dist/lib/portal-theme-scope.js +74 -0
- package/dist/{chunk-FKZXAFIY.js → lib/presentation.js} +8 -3
- package/dist/lib/refs.js +14 -0
- package/dist/lib/scrub-gesture.js +50 -0
- package/dist/lib/segmented.js +13 -0
- package/dist/lib/selection-card.js +41 -0
- package/dist/lib/status-tone.js +13 -0
- package/dist/lib/taxonomy.js +214 -0
- package/dist/lib/trim-label.js +20 -0
- package/dist/lib/use-copy.js +27 -0
- package/dist/lib/use-edge-fade.js +32 -0
- package/dist/lib/use-isomorphic-layout-effect.js +8 -0
- package/dist/lib/use-resize-observer.js +18 -0
- package/dist/lib/use-scroll-activity.js +52 -0
- package/dist/lib/use-wheel-to-horizontal.js +65 -0
- package/dist/motion/MotionProvider.js +75 -0
- package/dist/motion/Presence.js +112 -0
- package/dist/motion/Reveal.js +42 -0
- package/dist/motion/TextReveal.js +61 -0
- package/dist/motion/index.js +24 -0
- package/dist/motion/useInView.js +36 -0
- package/dist/motion/useReducedMotion.js +25 -0
- package/dist/motion/viewTransition.js +47 -0
- package/dist/patterns/auth-page.js +90 -0
- package/dist/patterns/auth-page.meta.js +27 -0
- package/dist/patterns/brand-landing-page.js +341 -0
- package/dist/patterns/brand-landing-page.meta.js +28 -0
- package/dist/patterns/chat-panel.js +185 -0
- package/dist/patterns/chat-panel.meta.js +31 -0
- package/dist/patterns/dashboard-page.js +332 -0
- package/dist/patterns/dashboard-page.meta.js +29 -0
- package/dist/patterns/feed-page.js +205 -0
- package/dist/patterns/feed-page.meta.js +25 -0
- package/dist/patterns/index.js +34 -2140
- package/dist/patterns/landing-page.js +356 -0
- package/dist/patterns/landing-page.meta.js +26 -0
- package/dist/patterns/list-detail-page.js +373 -0
- package/dist/patterns/list-detail-page.meta.js +24 -0
- package/dist/patterns/settings-page.js +268 -0
- package/dist/patterns/settings-page.meta.js +27 -0
- package/dist/presets/index.d.ts +7 -1
- package/dist/presets/index.js +53 -185
- package/dist/styles.css +118 -3
- package/dist/{theme-provider-kQszHYji.d.ts → theme-provider-S0NVJs2Y.d.ts} +6 -1
- package/dist/{chunk-NETUFI34.js → themes/_contract.js} +14 -2
- package/dist/themes/atelier/index.js +17 -1
- package/dist/themes/contrast.js +288 -0
- package/dist/themes/ember/ember.css +6 -6
- package/dist/themes/ember/index.js +16 -1
- package/dist/themes/index.d.ts +1 -1
- package/dist/themes/index.js +3 -8
- package/dist/themes/meridian/index.js +16 -1
- package/dist/themes/poppy/index.js +17 -1
- package/dist/themes/prism/index.js +17 -1
- package/dist/themes/prism/prism.css +2 -2
- package/dist/themes/registry.js +59 -0
- package/dist/themes/sable/index.js +16 -1
- package/dist/{chunk-EFLC4NA3.js → themes/theme-provider.js} +38 -54
- package/dist/themes/verdant/index.js +17 -1
- package/llms/blocks/media-player-block.md +20 -7
- package/llms/blocks/product-card-block.md +6 -4
- package/llms/blocks/task-list-block.md +1 -1
- package/llms/blocks/traffic-sources-block.md +1 -1
- package/llms/blocks/traffic-trend-block.md +5 -3
- package/llms/blocks/verify-code-block.md +1 -1
- package/llms/components/app-shell.md +5 -2
- package/llms/components/avatar.md +25 -3
- package/llms/components/button.md +20 -1
- package/llms/components/card.md +1 -1
- package/llms/components/disclosure-picker.md +168 -0
- package/llms/components/font-picker.md +104 -0
- package/llms/components/media-image.md +98 -0
- package/llms/components/media-tile.md +143 -0
- package/llms/components/page-header.md +6 -5
- package/llms/components/pie-chart.md +2 -2
- package/llms/components/radial-chart.md +1 -1
- package/llms/components/section-header.md +144 -0
- package/llms/components/sheet.md +10 -0
- package/llms/components/sidebar.md +4 -3
- package/llms/components/slider.md +14 -2
- package/llms/components/theme-selector.md +44 -4
- package/llms/components/tree.md +3 -3
- package/llms/layout/grid.md +24 -3
- package/llms/layout/region.md +16 -3
- package/llms/patterns/dashboard-page.md +3 -6
- package/llms/patterns/feed-page.md +4 -4
- package/llms/patterns/list-detail-page.md +1 -0
- package/llms/patterns/settings-page.md +2 -5
- package/llms/reference/utilities.md +84 -4
- package/llms/tasks/building-a-page.md +34 -3
- package/llms/tasks/converting-an-app.md +14 -4
- package/llms/tasks/creating-a-preset.md +4 -1
- package/llms/tasks/reviewing-a-design.md +19 -0
- package/llms/tasks/using-presets.md +19 -0
- package/llms-full.txt +1066 -78
- package/llms.txt +26 -9
- package/package.json +1 -1
- package/registry.json +2342 -164
- package/scripts/agent-setup.mjs +90 -0
- package/scripts/design-presets.mjs +59 -6
- package/scripts/grade.mjs +195 -29
- package/scripts/lint-rules.mjs +486 -10
- package/scripts/review-evidence.mjs +28 -1
- package/skills/sable/SKILL.md +67 -24
- package/targets/ios.json +45 -0
- package/dist/chunk-3IWZYBGH.js +0 -398
- package/dist/chunk-7MG4SHYX.js +0 -15
- package/dist/chunk-7QSDYBXO.js +0 -7421
- package/dist/chunk-ADLLDWLW.js +0 -15
- package/dist/chunk-C4Z3CF54.js +0 -15
- package/dist/chunk-EDXLM7YL.js +0 -5078
- package/dist/chunk-EHH4MHO6.js +0 -14
- package/dist/chunk-K7RUHUGC.js +0 -14
- package/dist/chunk-KO3NAEBF.js +0 -15
- package/dist/chunk-L4IEIQQA.js +0 -14
- package/dist/chunk-QJ6FWTUG.js +0 -40
- package/dist/chunk-VVW4UCDI.js +0 -4908
- package/dist/chunk-XAZGMY73.js +0 -187
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
// src/components/notification-badge/notification-badge.meta.ts
|
|
2
|
+
var notificationBadgeMeta = {
|
|
3
|
+
name: "NotificationBadge",
|
|
4
|
+
summary: `An unread indicator. Renders a bare dot or a count pill (capped as "{max}+"), or nothing when there's nothing to show. overlay pins it to the corner of a relative host; it is aria-hidden, so the host's name carries the count.`,
|
|
5
|
+
status: "stable",
|
|
6
|
+
keywords: [
|
|
7
|
+
"notification",
|
|
8
|
+
"badge",
|
|
9
|
+
"count",
|
|
10
|
+
"unread"
|
|
11
|
+
],
|
|
12
|
+
usage: {
|
|
13
|
+
description: "Use NotificationBadge to show a compact unread count, alert count, or attention marker.",
|
|
14
|
+
bestPractices: [
|
|
15
|
+
{
|
|
16
|
+
guidance: "do",
|
|
17
|
+
description: "Place it on or near the item that owns the notifications."
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
guidance: "do",
|
|
21
|
+
description: "Use compact counts and cap large numbers when exact precision is not useful."
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
guidance: "dont",
|
|
25
|
+
description: "Do not use NotificationBadge as a standalone status label or category marker."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
guidance: "dont",
|
|
29
|
+
description: 'Do not show a bare dot when the count is meaningful. A dot says "something"; if the user can act on "how many", show the number.'
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
guidance: "dont",
|
|
33
|
+
description: "Do not put a neutral badge on a secondary host. Both are the secondary surface, so the badge disappears; use primary or destructive there."
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
related: {
|
|
38
|
+
components: ["Badge", "StatusDot"]
|
|
39
|
+
},
|
|
40
|
+
props: [
|
|
41
|
+
{
|
|
42
|
+
name: "dot",
|
|
43
|
+
type: "boolean",
|
|
44
|
+
default: "false",
|
|
45
|
+
description: "Render a bare dot indicator with no number. Takes precedence over count."
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: "count",
|
|
49
|
+
type: "number",
|
|
50
|
+
description: "Unread count. Renders nothing when <= 0 and dot is unset."
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: "max",
|
|
54
|
+
type: "number",
|
|
55
|
+
default: "99",
|
|
56
|
+
description: 'Cap before showing "{max}+".'
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: "tone",
|
|
60
|
+
type: '"destructive" | "primary" | "neutral"',
|
|
61
|
+
default: '"destructive"',
|
|
62
|
+
description: "Fill color. destructive for alarming counts; primary/neutral for non-alarming ones."
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: "size",
|
|
66
|
+
type: '"sm" | "md" | "lg"',
|
|
67
|
+
default: '"md"',
|
|
68
|
+
description: "Scales the dot/pill on the spacing scale (count pill: sm 16px, md 18px, lg 20px at the default density)."
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: "overlay",
|
|
72
|
+
type: "boolean",
|
|
73
|
+
default: "false",
|
|
74
|
+
description: "Pin to the top-end corner of the nearest relative host (an icon button) \u2014 one placement for every caller instead of hand-tuned absolute offsets."
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
variants: {
|
|
78
|
+
tone: ["destructive", "primary", "neutral"],
|
|
79
|
+
size: ["sm", "md", "lg"],
|
|
80
|
+
overlay: ["true", "false"]
|
|
81
|
+
},
|
|
82
|
+
tokensUsed: [
|
|
83
|
+
"destructive",
|
|
84
|
+
"destructive-foreground",
|
|
85
|
+
"primary",
|
|
86
|
+
"primary-foreground",
|
|
87
|
+
"secondary",
|
|
88
|
+
"secondary-foreground"
|
|
89
|
+
],
|
|
90
|
+
a11y: [
|
|
91
|
+
'The badge is aria-hidden: a count rendered on a control is not associated with it, so the host needs an accessible name that includes the count \u2014 "Notifications, 3 unread" \u2014 or a screen-reader user hears "Notifications, button" and never learns there is anything new. Pass aria-hidden={false} only for a standalone badge whose number is the information.',
|
|
92
|
+
"A dot carries no number and no words: on its own it tells a sighted user only that something changed, and tells everyone else nothing. Pair it with a label that says what is new, and never make its colour the only difference between two states."
|
|
93
|
+
],
|
|
94
|
+
examples: [
|
|
95
|
+
{
|
|
96
|
+
label: "Dot + counts",
|
|
97
|
+
code: "<Row gap={3}><NotificationBadge dot /><NotificationBadge count={3} /><NotificationBadge count={128} /></Row>"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
label: "Overlay on an icon button",
|
|
101
|
+
code: '<Button variant="secondary" size="icon" aria-label="Notifications, 5 unread" className="relative"><Icon name="bell" /><NotificationBadge count={5} overlay /></Button>'
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
};
|
|
105
|
+
export {
|
|
106
|
+
notificationBadgeMeta
|
|
107
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// src/components/notification-badge/notification-badge.variants.ts
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
var notificationDotVariants = cva("inline-block rounded-full", {
|
|
4
|
+
variants: {
|
|
5
|
+
tone: {
|
|
6
|
+
destructive: "bg-destructive",
|
|
7
|
+
primary: "bg-primary",
|
|
8
|
+
neutral: "bg-muted-foreground"
|
|
9
|
+
// StatusDot's neutral, so the two dots are one grey
|
|
10
|
+
},
|
|
11
|
+
size: {
|
|
12
|
+
sm: "size-1.5",
|
|
13
|
+
md: "size-2",
|
|
14
|
+
lg: "size-2.5"
|
|
15
|
+
},
|
|
16
|
+
// A dot is small enough to sit inside the corner; a count straddles it.
|
|
17
|
+
overlay: {
|
|
18
|
+
true: "absolute end-1 top-1",
|
|
19
|
+
false: ""
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
defaultVariants: {
|
|
23
|
+
tone: "destructive",
|
|
24
|
+
size: "md",
|
|
25
|
+
overlay: false
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
var notificationCountVariants = cva(
|
|
29
|
+
"inline-flex items-center justify-center rounded-full px-1 text-label-xs",
|
|
30
|
+
{
|
|
31
|
+
variants: {
|
|
32
|
+
tone: {
|
|
33
|
+
destructive: "bg-destructive text-destructive-foreground",
|
|
34
|
+
primary: "bg-primary text-primary-foreground",
|
|
35
|
+
neutral: "bg-secondary text-secondary-foreground"
|
|
36
|
+
},
|
|
37
|
+
size: {
|
|
38
|
+
sm: "h-4 min-w-4",
|
|
39
|
+
md: "h-4.5 min-w-4.5",
|
|
40
|
+
lg: "h-5 min-w-5"
|
|
41
|
+
},
|
|
42
|
+
overlay: {
|
|
43
|
+
true: "absolute -end-0.5 -top-0.5",
|
|
44
|
+
false: ""
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
defaultVariants: {
|
|
48
|
+
tone: "destructive",
|
|
49
|
+
size: "md",
|
|
50
|
+
overlay: false
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
export {
|
|
55
|
+
notificationCountVariants,
|
|
56
|
+
notificationDotVariants
|
|
57
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// src/components/number-field/number-field.tsx
|
|
2
|
+
import { NumberField as Base } from "@base-ui/react/number-field";
|
|
3
|
+
import { Icon } from "../../icon/index.js";
|
|
4
|
+
import { cn } from "../../lib/cn.js";
|
|
5
|
+
import { useDensity, useTypeTier } from "../../lib/density.js";
|
|
6
|
+
import { FIELD_SHELL, MOBILE_FIELD_TIER } from "../../lib/field-shell.js";
|
|
7
|
+
import { Button } from "../button/button.js";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
function NumberField({
|
|
10
|
+
className,
|
|
11
|
+
steppers = true,
|
|
12
|
+
"aria-describedby": ariaDescribedby,
|
|
13
|
+
"aria-invalid": ariaInvalid,
|
|
14
|
+
"aria-label": ariaLabel,
|
|
15
|
+
...root
|
|
16
|
+
}) {
|
|
17
|
+
const step = /* @__PURE__ */ jsx(
|
|
18
|
+
Button,
|
|
19
|
+
{
|
|
20
|
+
variant: "ghost",
|
|
21
|
+
size: "icon-sm",
|
|
22
|
+
className: "mx-[calc((var(--control-md)-var(--control-sm)-2px)/2)] shrink-0 self-center text-muted-foreground"
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
const tier = useTypeTier();
|
|
26
|
+
const density = useDensity();
|
|
27
|
+
return /* @__PURE__ */ jsx(Base.Root, { ...root, children: /* @__PURE__ */ jsxs(
|
|
28
|
+
Base.Group,
|
|
29
|
+
{
|
|
30
|
+
className: cn(
|
|
31
|
+
"inline-flex h-(--control-md) w-full items-stretch overflow-hidden text-foreground",
|
|
32
|
+
// The shell Input wears — lib/field-shell. Its focus ring keys on
|
|
33
|
+
// focus-visible; the shell here is a group, so ring on focus-within.
|
|
34
|
+
FIELD_SHELL,
|
|
35
|
+
"focus-within:ring-2 focus-within:ring-ring",
|
|
36
|
+
"has-[input:disabled]:cursor-not-allowed has-[input:disabled]:opacity-50",
|
|
37
|
+
// FIELD_INVALID, lifted to the group: `aria-invalid` lands on the
|
|
38
|
+
// inner <input> (a Field sets it there), and a group role cannot
|
|
39
|
+
// carry it, so the shell reads it with `has-`. Literal for the
|
|
40
|
+
// Tailwind scan; keep in step with lib/field-shell.
|
|
41
|
+
"has-[input[aria-invalid=true]]:border-destructive has-[input[aria-invalid=true]]:ring-destructive/30",
|
|
42
|
+
tier.body,
|
|
43
|
+
density === "comfortable" && MOBILE_FIELD_TIER,
|
|
44
|
+
className
|
|
45
|
+
),
|
|
46
|
+
children: [
|
|
47
|
+
steppers ? /* @__PURE__ */ jsx(Base.Decrement, { "aria-label": "Decrease", render: step, children: /* @__PURE__ */ jsx(Icon, { name: "minus" }) }) : null,
|
|
48
|
+
/* @__PURE__ */ jsx(
|
|
49
|
+
Base.Input,
|
|
50
|
+
{
|
|
51
|
+
"aria-describedby": ariaDescribedby,
|
|
52
|
+
"aria-invalid": ariaInvalid,
|
|
53
|
+
"aria-label": ariaLabel,
|
|
54
|
+
className: cn(
|
|
55
|
+
"w-full min-w-0 bg-transparent tabular-nums outline-none",
|
|
56
|
+
// Centred between two steppers; left-aligned without them, on
|
|
57
|
+
// Input's px-3 text column so a stack of fields shares one edge.
|
|
58
|
+
steppers ? "px-2 text-center" : "px-3 text-left"
|
|
59
|
+
)
|
|
60
|
+
}
|
|
61
|
+
),
|
|
62
|
+
steppers ? /* @__PURE__ */ jsx(Base.Increment, { "aria-label": "Increase", render: step, children: /* @__PURE__ */ jsx(Icon, { name: "plus" }) }) : null
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
) });
|
|
66
|
+
}
|
|
67
|
+
NumberField.displayName = "NumberField";
|
|
68
|
+
export {
|
|
69
|
+
NumberField
|
|
70
|
+
};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
// src/components/number-field/number-field.meta.ts
|
|
2
|
+
var numberFieldMeta = {
|
|
3
|
+
name: "NumberField",
|
|
4
|
+
summary: "Numeric input with decrement/increment steppers over Base UI NumberField \u2014 keyboard arrows, scroll, scrub-to-change, min/max clamping, locale formatting, and form integration. Styled like Input; drops straight into a Field.",
|
|
5
|
+
status: "stable",
|
|
6
|
+
keywords: [
|
|
7
|
+
"number field",
|
|
8
|
+
"numeric input",
|
|
9
|
+
"stepper",
|
|
10
|
+
"form"
|
|
11
|
+
],
|
|
12
|
+
usage: {
|
|
13
|
+
description: "Use NumberField for numeric values that benefit from validation, min/max bounds, or step controls.",
|
|
14
|
+
bestPractices: [
|
|
15
|
+
{
|
|
16
|
+
guidance: "do",
|
|
17
|
+
description: "Use it for quantities, thresholds, percentages, and other real numeric values."
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
guidance: "do",
|
|
21
|
+
description: "Set sensible min, max, and step behavior when the domain has bounds."
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
guidance: "dont",
|
|
25
|
+
description: "Do not use NumberField for identifiers such as phone numbers, ZIP codes, or credit card numbers."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
guidance: "dont",
|
|
29
|
+
description: "Do not use it in a property grid with steppers left on. Its two 32px stepper buttons (36px each with their inset) put a ~110px floor on a control that needs ~44px there \u2014 pass steppers={false}, or use ScrubField."
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
related: {
|
|
34
|
+
components: [
|
|
35
|
+
"Input",
|
|
36
|
+
"Slider"
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
props: [
|
|
40
|
+
{
|
|
41
|
+
name: "min",
|
|
42
|
+
type: "number",
|
|
43
|
+
description: "Lower bound. Clamps typing, arrows, scroll and scrub alike, so the value cannot leave the range by any route."
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: "max",
|
|
47
|
+
type: "number",
|
|
48
|
+
description: "Upper bound, clamped on every input route the same way as `min`."
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: "value / defaultValue",
|
|
52
|
+
type: "number",
|
|
53
|
+
description: "Controlled / uncontrolled numeric value."
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: "onValueChange",
|
|
57
|
+
type: "(value: number | null, event) => void",
|
|
58
|
+
description: "Fired when the value changes (null when cleared)."
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: "step / smallStep / largeStep",
|
|
62
|
+
type: "number",
|
|
63
|
+
description: "Increment amount; smallStep applies with the meta key, largeStep with shift."
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: "format",
|
|
67
|
+
type: "Intl.NumberFormatOptions",
|
|
68
|
+
description: "Locale formatting (currency, percent, units, \u2026)."
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: "steppers",
|
|
72
|
+
type: "boolean",
|
|
73
|
+
default: "true",
|
|
74
|
+
description: "Show the decrement / increment buttons. Turn off in a dense property grid \u2014 the two 32px stepper buttons (36px with their inset) put a ~110px floor on the control; without them the value left-aligns."
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
name: "disabled / readOnly / required / name / id",
|
|
78
|
+
type: "\u2014",
|
|
79
|
+
description: "Standard form-control props. Base UI applies id + required to the input, so it labels and validates correctly."
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
tokensUsed: [
|
|
83
|
+
"input",
|
|
84
|
+
"card",
|
|
85
|
+
"foreground",
|
|
86
|
+
"muted-foreground",
|
|
87
|
+
"accent",
|
|
88
|
+
"accent-foreground",
|
|
89
|
+
"ring"
|
|
90
|
+
],
|
|
91
|
+
a11y: [
|
|
92
|
+
"Decrement / Increment are labelled buttons (Decrease / Increase); the input is a spinbutton with aria-valuenow/min/max from Base UI.",
|
|
93
|
+
"Routes aria-describedby / aria-invalid onto the input, so a Field's helper + error are announced for it."
|
|
94
|
+
],
|
|
95
|
+
examples: [
|
|
96
|
+
{ label: "Bounded", code: "<NumberField defaultValue={1} min={0} max={99} />" },
|
|
97
|
+
{
|
|
98
|
+
label: "In a field",
|
|
99
|
+
code: '<Field label="Quantity"><NumberField min={1} defaultValue={1} /></Field>'
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
label: "Currency",
|
|
103
|
+
code: '<NumberField defaultValue={9.99} format={{ style: "currency", currency: "USD" }} />'
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
};
|
|
107
|
+
export {
|
|
108
|
+
numberFieldMeta
|
|
109
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// src/components/otp-field/otp-field.tsx
|
|
2
|
+
import * as OtpParts from "@base-ui/react/otp-field";
|
|
3
|
+
import { Fragment } from "react";
|
|
4
|
+
import { cn } from "../../lib/cn.js";
|
|
5
|
+
import { FIELD_INVALID, FIELD_SHELL } from "../../lib/field-shell.js";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
var resolvedBase;
|
|
8
|
+
function otpBase() {
|
|
9
|
+
if (!resolvedBase) {
|
|
10
|
+
const otpExports = Object.fromEntries(Object.entries(OtpParts));
|
|
11
|
+
resolvedBase = otpExports.OTPField ?? otpExports.OTPFieldPreview;
|
|
12
|
+
}
|
|
13
|
+
return resolvedBase;
|
|
14
|
+
}
|
|
15
|
+
var defaultSlotLabel = (index, length) => `Character ${index + 1} of ${length}`;
|
|
16
|
+
function OtpField({
|
|
17
|
+
className,
|
|
18
|
+
length = 6,
|
|
19
|
+
groupSize,
|
|
20
|
+
getSlotLabel = defaultSlotLabel,
|
|
21
|
+
"aria-invalid": ariaInvalid,
|
|
22
|
+
...root
|
|
23
|
+
}) {
|
|
24
|
+
const invalid = ariaInvalid === true || ariaInvalid === "true";
|
|
25
|
+
const Base = otpBase();
|
|
26
|
+
return /* @__PURE__ */ jsx(
|
|
27
|
+
Base.Root,
|
|
28
|
+
{
|
|
29
|
+
length,
|
|
30
|
+
"data-invalid": invalid ? "" : void 0,
|
|
31
|
+
className: cn("inline-flex max-w-full items-center gap-2", className),
|
|
32
|
+
...root,
|
|
33
|
+
children: Array.from({ length }, (_, index) => (
|
|
34
|
+
// Slots are positional and never reorder, so the index is the identity.
|
|
35
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: positional slots
|
|
36
|
+
/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
37
|
+
groupSize && index > 0 && index % groupSize === 0 ? /* @__PURE__ */ jsx(
|
|
38
|
+
"span",
|
|
39
|
+
{
|
|
40
|
+
"aria-hidden": "true",
|
|
41
|
+
"data-otp-gap": "",
|
|
42
|
+
className: "h-px w-2 shrink-0 bg-border-strong"
|
|
43
|
+
}
|
|
44
|
+
) : null,
|
|
45
|
+
/* @__PURE__ */ jsx(
|
|
46
|
+
Base.Input,
|
|
47
|
+
{
|
|
48
|
+
"aria-label": index === 0 ? void 0 : getSlotLabel(index, length),
|
|
49
|
+
"aria-invalid": invalid || void 0,
|
|
50
|
+
className: cn(
|
|
51
|
+
"h-(--control-lg) w-(--control-md) min-w-0 text-center text-mono-lg text-foreground caret-primary",
|
|
52
|
+
// The shell Input wears — lib/field-shell — so a slot reads as
|
|
53
|
+
// the same field; only the slot-specific states are added here.
|
|
54
|
+
FIELD_SHELL,
|
|
55
|
+
// Focus is FIELD_SHELL's ring alone, like every other field — a ring-
|
|
56
|
+
// coloured border under it made a 3px edge only here.
|
|
57
|
+
"data-[filled]:border-border-strong",
|
|
58
|
+
FIELD_INVALID
|
|
59
|
+
)
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
] }, index)
|
|
63
|
+
))
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
OtpField.displayName = "OtpField";
|
|
68
|
+
export {
|
|
69
|
+
OtpField
|
|
70
|
+
};
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
// src/components/otp-field/otp-field.meta.ts
|
|
2
|
+
var otpFieldMeta = {
|
|
3
|
+
name: "OtpField",
|
|
4
|
+
summary: "One-time-code entry over Base UI's OTP Field \u2014 one slot per character, SMS autofill on the first slot, paste fills every slot, and only one tab stop for the whole code.",
|
|
5
|
+
status: "stable",
|
|
6
|
+
keywords: [
|
|
7
|
+
"otp",
|
|
8
|
+
"one-time code",
|
|
9
|
+
"one-time password",
|
|
10
|
+
"verification code",
|
|
11
|
+
"2fa",
|
|
12
|
+
"two-factor",
|
|
13
|
+
"mfa",
|
|
14
|
+
"pin",
|
|
15
|
+
"passcode",
|
|
16
|
+
"input otp"
|
|
17
|
+
],
|
|
18
|
+
usage: {
|
|
19
|
+
description: "Use OtpField for a short, fixed-length code the user copies from somewhere else \u2014 an SMS or email verification code, an authenticator app, a device pairing PIN. The slots show how long the code is and where the user is in it, which a plain Input cannot.",
|
|
20
|
+
bestPractices: [
|
|
21
|
+
{
|
|
22
|
+
guidance: "do",
|
|
23
|
+
description: "Set `length` to the exact length the server sends, and verify in `onValueComplete` (or with `autoSubmit` inside a form). Most users paste or autofill the whole code at once, so the moment of completion is the natural submit."
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
guidance: "do",
|
|
27
|
+
description: 'Label it through a `Field` ("Verification code") and say where the code was sent in the description. The first slot takes the field\'s name; the rest are announced by position.'
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
guidance: "do",
|
|
31
|
+
description: "Use `groupSize` for codes of 6 or more so the user can check the code in chunks against the message they are reading from."
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
guidance: "dont",
|
|
35
|
+
description: 'Do not use OtpField for a password, an arbitrary-length PIN, or anything the user types from memory. Slots promise a fixed length; use Input with `type="password"` and `autocomplete="current-password"` instead.'
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
guidance: "dont",
|
|
39
|
+
description: "Do not intercept paste or clear the field on a wrong code before the user has seen the error. Blocking paste breaks SMS autofill and password managers, and wiping the slots erases the evidence of which digit was wrong."
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
guidance: "dont",
|
|
43
|
+
description: "Do not swap it for NumberField because the code is digits. A code is an identifier, not a quantity: NumberField strips leading zeros and offers steppers that make no sense here."
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
anatomy: [
|
|
47
|
+
{
|
|
48
|
+
name: "Root",
|
|
49
|
+
required: true,
|
|
50
|
+
description: "A role=group that holds the value, carries the field label and description, and reports completion."
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: "Slot",
|
|
54
|
+
required: true,
|
|
55
|
+
description: 'One input per character. The first carries autocomplete="one-time-code" and accepts the whole code.'
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: "Group gap",
|
|
59
|
+
required: false,
|
|
60
|
+
description: "A decorative dash inserted every `groupSize` slots; hidden from assistive tech."
|
|
61
|
+
}
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
related: {
|
|
65
|
+
components: ["Input", "Form", "NumberField"]
|
|
66
|
+
},
|
|
67
|
+
props: [
|
|
68
|
+
{
|
|
69
|
+
name: "length",
|
|
70
|
+
type: "number",
|
|
71
|
+
default: "6",
|
|
72
|
+
description: "Number of character slots. Completion fires when every slot is filled."
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: "groupSize",
|
|
76
|
+
type: "number",
|
|
77
|
+
description: "Insert a visual gap every N slots (3 renders 123 \u2013 456). The value stays one contiguous string."
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: "value / defaultValue",
|
|
81
|
+
type: "string",
|
|
82
|
+
description: "Controlled / uncontrolled code."
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: "onValueChange",
|
|
86
|
+
type: "(value: string, details) => void",
|
|
87
|
+
description: "Fires on every edit. `details.reason` is input-change, input-clear, input-paste or keyboard."
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: "onValueComplete",
|
|
91
|
+
type: "(value: string, details) => void",
|
|
92
|
+
description: "Fires once every slot is filled \u2014 the place to verify the code. Also fires when a complete code is pasted over a complete value."
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
name: "onValueInvalid",
|
|
96
|
+
type: "(attempted: string, details) => void",
|
|
97
|
+
description: "Fires when typed or pasted text contains characters `validationType` rejects, so you can explain the rejection rather than letting it vanish."
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
name: "validationType",
|
|
101
|
+
type: '"numeric" | "alpha" | "alphanumeric" | "none"',
|
|
102
|
+
default: '"numeric"',
|
|
103
|
+
description: "Which characters a slot accepts. Also picks the virtual keyboard (numeric \u2192 number pad)."
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
name: "autoSubmit",
|
|
107
|
+
type: "boolean",
|
|
108
|
+
default: "false",
|
|
109
|
+
description: "Submit the owning form when the code becomes complete."
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
name: "mask",
|
|
113
|
+
type: "boolean",
|
|
114
|
+
default: "false",
|
|
115
|
+
description: "Render slots as password inputs. Only for codes that are secret on screen, such as a card PIN."
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
name: "getSlotLabel",
|
|
119
|
+
type: "(index: number, length: number) => string",
|
|
120
|
+
default: "Character N of L",
|
|
121
|
+
description: "Accessible name for slots after the first. Override to localize."
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
name: "aria-invalid",
|
|
125
|
+
type: "boolean",
|
|
126
|
+
description: "Marks every slot invalid (destructive border). `<Field error>` sets it for you."
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
name: "disabled / readOnly / required / name / id / form",
|
|
130
|
+
type: "\u2014",
|
|
131
|
+
description: "Standard form-control props. `id` lands on the first slot, so `<Field>` and `<label htmlFor>` name the field."
|
|
132
|
+
}
|
|
133
|
+
],
|
|
134
|
+
tokensUsed: [
|
|
135
|
+
"input",
|
|
136
|
+
"card",
|
|
137
|
+
"foreground",
|
|
138
|
+
"muted-foreground",
|
|
139
|
+
"border-strong",
|
|
140
|
+
"primary",
|
|
141
|
+
"ring",
|
|
142
|
+
"destructive"
|
|
143
|
+
],
|
|
144
|
+
motion: [
|
|
145
|
+
{
|
|
146
|
+
slot: "arrival",
|
|
147
|
+
recipe: "none",
|
|
148
|
+
part: "Root",
|
|
149
|
+
why: "A code field is part of the form it sits in and appears with it. Animating it in would delay the one thing the user arrived to do \u2014 paste the code they just copied."
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
slot: "response",
|
|
153
|
+
recipe: "motion-interactive",
|
|
154
|
+
part: "Slot",
|
|
155
|
+
why: "Focus moves between slots on every keystroke. The eased ring and border are what let the eye follow the cursor across six identical boxes instead of hunting for it after each digit."
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
slot: "transition",
|
|
159
|
+
recipe: "motion-interactive",
|
|
160
|
+
part: "Slot",
|
|
161
|
+
why: "A filled slot strengthens its border, so a pasted code visibly lands in every slot at once. Easing it reads as the code arriving rather than the field flickering."
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
slot: "activity",
|
|
165
|
+
recipe: "none",
|
|
166
|
+
part: "Root",
|
|
167
|
+
why: "Verifying the code is the form's work, not the field's. Show it on the submit Button's `loading` state, where the user expects the answer to appear."
|
|
168
|
+
}
|
|
169
|
+
],
|
|
170
|
+
a11y: [
|
|
171
|
+
'The root is a role=group named by the field label; the first slot shares the label through `id`/`htmlFor`, and later slots are announced by position ("Character 2 of 6").',
|
|
172
|
+
"Only one slot is in the tab order. Arrow keys, Home/End and Backspace move between slots; Tab leaves the whole field.",
|
|
173
|
+
'The first slot carries autocomplete="one-time-code" and the numeric virtual keyboard, so iOS and Android offer the SMS code above the keyboard.',
|
|
174
|
+
"Slots render at 20px (`text-mono-lg`), above the 16px floor that stops iOS Safari zooming on focus."
|
|
175
|
+
],
|
|
176
|
+
examples: [
|
|
177
|
+
{
|
|
178
|
+
label: "Six digits",
|
|
179
|
+
code: '<Field label="Verification code"><OtpField length={6} onValueComplete={verify} /></Field>'
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
label: "In a field, grouped",
|
|
183
|
+
code: '<Field label="Verification code" description="Enter the 6-digit code we sent to your phone."><OtpField length={6} groupSize={3} /></Field>'
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
label: "With an error",
|
|
187
|
+
code: '<Field label="Verification code" error="That code has expired. Request a new code and try again."><OtpField length={6} groupSize={3} defaultValue="482913" /></Field>'
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
label: "Alphanumeric",
|
|
191
|
+
code: '<Field label="Pairing code"><OtpField length={8} groupSize={4} validationType="alphanumeric" /></Field>'
|
|
192
|
+
}
|
|
193
|
+
]
|
|
194
|
+
};
|
|
195
|
+
export {
|
|
196
|
+
otpFieldMeta
|
|
197
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// src/components/overflow-menu/overflow-menu.tsx
|
|
2
|
+
import { Icon } from "../../icon/index.js";
|
|
3
|
+
import { Button } from "../button/index.js";
|
|
4
|
+
import { Menu, MenuContent, MenuTrigger } from "../menu/index.js";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
function OverflowMenu({
|
|
7
|
+
children,
|
|
8
|
+
align = "end",
|
|
9
|
+
label = "More actions",
|
|
10
|
+
icon = "ellipsis",
|
|
11
|
+
size = "icon"
|
|
12
|
+
}) {
|
|
13
|
+
return /* @__PURE__ */ jsxs(Menu, { children: [
|
|
14
|
+
/* @__PURE__ */ jsx(
|
|
15
|
+
MenuTrigger,
|
|
16
|
+
{
|
|
17
|
+
render: /* @__PURE__ */ jsx(Button, { variant: "ghost", size, "aria-label": label, children: /* @__PURE__ */ jsx(Icon, { name: icon, variant: "solid" }) })
|
|
18
|
+
}
|
|
19
|
+
),
|
|
20
|
+
/* @__PURE__ */ jsx(MenuContent, { align, children })
|
|
21
|
+
] });
|
|
22
|
+
}
|
|
23
|
+
OverflowMenu.displayName = "OverflowMenu";
|
|
24
|
+
export {
|
|
25
|
+
OverflowMenu
|
|
26
|
+
};
|