@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,216 @@
|
|
|
1
|
+
// src/components/radial-chart/radial-chart.meta.ts
|
|
2
|
+
var radialChartMeta = {
|
|
3
|
+
name: "RadialChart",
|
|
4
|
+
summary: "Progress or share as rings: one ring per row against a muted track, a full circle or a gauge (`sweep`), one ring split between rows (`stacked`), ring labels and a value in the middle. Rings draw round as the chart scrolls into view.",
|
|
5
|
+
keywords: [
|
|
6
|
+
"chart",
|
|
7
|
+
"radial",
|
|
8
|
+
"ring",
|
|
9
|
+
"gauge",
|
|
10
|
+
"progress",
|
|
11
|
+
"goal",
|
|
12
|
+
"score",
|
|
13
|
+
"activity rings",
|
|
14
|
+
"donut"
|
|
15
|
+
],
|
|
16
|
+
usage: {
|
|
17
|
+
description: "Use RadialChart for progress toward goals (several rings), a single score or usage gauge (`sweep={180}` with `centerLabel`), or a split of one total along a gauge (`stacked`). For one reading in a form or settings row, Meter's ring shape is lighter.",
|
|
18
|
+
bestPractices: [
|
|
19
|
+
{
|
|
20
|
+
guidance: "do",
|
|
21
|
+
description: 'Set max to the goal, so a full ring means "done".'
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
guidance: "do",
|
|
25
|
+
description: "Pair a gauge with centerLabel stating the value in words or units."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
guidance: "dont",
|
|
29
|
+
description: "Compare more than four rings \u2014 inner rings are shorter for the same value, which misleads; use BarChart."
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
guidance: "dont",
|
|
33
|
+
description: "Use it for data-heavy views \u2014 streaming or real-time data, thousands of points, zoom and brushing, trading charts. Those belong on a charting library (Recharts, visx, ECharts); Sable's charts are for dashboards, landing pages and decks."
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
related: {
|
|
38
|
+
components: [
|
|
39
|
+
"Meter",
|
|
40
|
+
"PieChart",
|
|
41
|
+
"Progress",
|
|
42
|
+
"Card"
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
status: "beta",
|
|
46
|
+
props: [
|
|
47
|
+
{
|
|
48
|
+
name: "data",
|
|
49
|
+
type: "Record<string, unknown>[]",
|
|
50
|
+
description: "One row per ring, outermost first."
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: "index",
|
|
54
|
+
type: "string",
|
|
55
|
+
description: "The datum field naming each ring."
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: "valueKey",
|
|
59
|
+
type: "string",
|
|
60
|
+
description: "The datum field holding each ring's amount."
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: "label",
|
|
64
|
+
type: "string",
|
|
65
|
+
description: "What the chart shows. Its accessible name and the caption of the data table assistive tech reads."
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: "categories",
|
|
69
|
+
type: "Record<string, { label?: string; tone?: ChartTone; color?: string; icon?: string }>",
|
|
70
|
+
description: "Labels, tones and icons per ring, keyed by the ring's name."
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: "className",
|
|
74
|
+
type: "string",
|
|
75
|
+
default: '"h-64"',
|
|
76
|
+
description: "Sizes the chart. Set a height."
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: "max",
|
|
80
|
+
type: "number",
|
|
81
|
+
default: "the largest value (stacked: the total; labelled: the largest value \xF7 0.75, leaving room for the labels)",
|
|
82
|
+
description: "The value a full ring stands for."
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: "sweep",
|
|
86
|
+
type: "number",
|
|
87
|
+
default: "360",
|
|
88
|
+
description: "How far round a full ring runs, in degrees: 360 for a circle, 180 for a gauge."
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
name: "stacked",
|
|
92
|
+
type: "boolean",
|
|
93
|
+
default: "false",
|
|
94
|
+
description: "Split ONE ring between the rows instead of a ring each."
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
name: "track",
|
|
98
|
+
type: "boolean",
|
|
99
|
+
default: "true",
|
|
100
|
+
description: "Draw each ring's full track behind it."
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
name: "labels",
|
|
104
|
+
type: "boolean",
|
|
105
|
+
default: "false",
|
|
106
|
+
description: "Name each ring at its start."
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
name: "centerLabel",
|
|
110
|
+
type: "{ value: string | number; label?: string }",
|
|
111
|
+
description: 'A value and caption in the middle. On a full ring the value holds the centre and the caption hangs below it. A number is formatted for you: in full up to 9,999, compact from 10,000 (10.2K); pass a string for units ("7.2 GB", "72%").'
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
name: "legend",
|
|
115
|
+
type: "boolean",
|
|
116
|
+
default: "true unless rings are labelled",
|
|
117
|
+
description: "Show the legend."
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: "tooltip",
|
|
121
|
+
type: 'boolean | { indicator?: "dot" | "line" | "dashed" | "none"; hideLabel?: boolean; labelFormatter?: (label, datum) => ReactNode; showTotal?: boolean }',
|
|
122
|
+
default: "true",
|
|
123
|
+
description: "Show a tooltip on hover and keyboard focus, or configure it: the row marker, hiding the heading, rewriting it, adding a Total row."
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
name: "valueFormatter",
|
|
127
|
+
type: "(value: number) => string",
|
|
128
|
+
description: 'Format values everywhere (axis, labels, tooltip, table) \u2014 units like "$12,480". Default: compact on the axis, full elsewhere.'
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
name: "locale",
|
|
132
|
+
type: "string",
|
|
133
|
+
default: "runtime locale",
|
|
134
|
+
description: "BCP 47 locale for default number and date formatting."
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
name: "animate",
|
|
138
|
+
type: "boolean",
|
|
139
|
+
default: "true",
|
|
140
|
+
description: "Draw the rings round from their start when the chart scrolls into view."
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
name: "activeIndex",
|
|
144
|
+
type: "number | null",
|
|
145
|
+
description: "The highlighted row (controlled); `null` for none."
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
name: "defaultActiveIndex",
|
|
149
|
+
type: "number | null",
|
|
150
|
+
description: "The row highlighted at first \u2014 a tooltip already open before anyone hovers."
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
name: "onActiveIndexChange",
|
|
154
|
+
type: "(index: number | null) => void",
|
|
155
|
+
description: "Called as the pointer or keyboard moves between rows."
|
|
156
|
+
}
|
|
157
|
+
],
|
|
158
|
+
tokensUsed: [
|
|
159
|
+
"tone-edition",
|
|
160
|
+
"tone-collectible",
|
|
161
|
+
"tone-standard",
|
|
162
|
+
"tone-info",
|
|
163
|
+
"tone-warning",
|
|
164
|
+
"primary",
|
|
165
|
+
"muted-foreground",
|
|
166
|
+
"border",
|
|
167
|
+
"popover",
|
|
168
|
+
"popover-foreground",
|
|
169
|
+
"foreground",
|
|
170
|
+
"background"
|
|
171
|
+
],
|
|
172
|
+
motion: [
|
|
173
|
+
{
|
|
174
|
+
slot: "arrival",
|
|
175
|
+
recipe: "custom",
|
|
176
|
+
part: "Ring",
|
|
177
|
+
why: "Once on screen each ring draws round from its start (stroke-dashoffset on a round-capped arc), staggered outside in. On the motion tokens; reduced motion shows the finished chart."
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
slot: "response",
|
|
181
|
+
recipe: "none",
|
|
182
|
+
part: "Active ring",
|
|
183
|
+
why: "The hovered ring stays full strength and the others dim at once."
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
slot: "transition",
|
|
187
|
+
recipe: "custom",
|
|
188
|
+
part: "Ring",
|
|
189
|
+
why: "Geometry eases from the old shape to the new one through a CSS `d` transition on the motion tokens (no recipe animates path geometry); browsers without `d` transitions update in place."
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
slot: "activity",
|
|
193
|
+
recipe: "none",
|
|
194
|
+
part: "RadialChart",
|
|
195
|
+
why: "A chart has no indeterminate state; show a Skeleton while the data loads."
|
|
196
|
+
}
|
|
197
|
+
],
|
|
198
|
+
a11y: [
|
|
199
|
+
"The drawing is aria-hidden; the same numbers are in a visually hidden data table (captioned by `label`) that the chart is aria-describedby, so assistive tech reads values, not shapes.",
|
|
200
|
+
'With a tooltip, the chart is one tab stop (role=group, aria-roledescription="chart"): arrow keys, Home and End step through the data, Escape clears, and each step is announced in a polite live region.',
|
|
201
|
+
"Colour is never the only key: series are named in the legend, tooltip and table."
|
|
202
|
+
],
|
|
203
|
+
examples: [
|
|
204
|
+
{
|
|
205
|
+
label: "Goal rings",
|
|
206
|
+
code: '<RadialChart\n label="Weekly goals"\n data={[\n { goal: "Move", progress: 82 },\n { goal: "Exercise", progress: 64 },\n { goal: "Stand", progress: 91 },\n ]}\n index="goal"\n valueKey="progress"\n max={100}\n labels\n/>'
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
label: "Gauge with a value",
|
|
210
|
+
code: '<RadialChart\n label="Plan usage"\n data={[{ plan: "Used", gb: 7.2 }]}\n index="plan"\n valueKey="gb"\n max={10}\n sweep={180}\n centerLabel={{ value: "7.2 GB", label: "of 10 GB" }}\n legend={false}\n/>'
|
|
211
|
+
}
|
|
212
|
+
]
|
|
213
|
+
};
|
|
214
|
+
export {
|
|
215
|
+
radialChartMeta
|
|
216
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// src/components/radio/radio.tsx
|
|
2
|
+
import { Radio as RadioBase } from "@base-ui/react/radio";
|
|
3
|
+
import { RadioGroup as RadioGroupBase } from "@base-ui/react/radio-group";
|
|
4
|
+
import { cn } from "../../lib/cn.js";
|
|
5
|
+
import { RADIO_DOT, RADIO_RING } from "../../lib/selection-card.js";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
function RadioGroup({ className, ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(
|
|
9
|
+
RadioGroupBase,
|
|
10
|
+
{
|
|
11
|
+
className: cn("flex flex-col gap-2", className),
|
|
12
|
+
...props
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
RadioGroup.displayName = "RadioGroup";
|
|
17
|
+
function Radio({ className, ...props }) {
|
|
18
|
+
return /* @__PURE__ */ jsx(
|
|
19
|
+
RadioBase.Root,
|
|
20
|
+
{
|
|
21
|
+
render: /* @__PURE__ */ jsx("button", { type: "button" }),
|
|
22
|
+
nativeButton: true,
|
|
23
|
+
className: cn(
|
|
24
|
+
RADIO_RING,
|
|
25
|
+
"data-[checked]:border-primary",
|
|
26
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
27
|
+
"disabled:cursor-not-allowed disabled:opacity-50",
|
|
28
|
+
className
|
|
29
|
+
),
|
|
30
|
+
...props,
|
|
31
|
+
children: /* @__PURE__ */ jsx(RadioBase.Indicator, { className: cn(RADIO_DOT, "bg-primary") })
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
Radio.displayName = "Radio";
|
|
36
|
+
export {
|
|
37
|
+
Radio,
|
|
38
|
+
RadioGroup
|
|
39
|
+
};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
// src/components/radio/radio.meta.ts
|
|
2
|
+
var radioMeta = {
|
|
3
|
+
name: "Radio",
|
|
4
|
+
summary: "Single-select control over Base UI RadioGroup + Radio (roving focus, arrow-key nav, ARIA radiogroup wiring, form integration). RadioGroup + Radio.",
|
|
5
|
+
status: "stable",
|
|
6
|
+
keywords: [
|
|
7
|
+
"radio",
|
|
8
|
+
"radio group",
|
|
9
|
+
"single choice",
|
|
10
|
+
"form control"
|
|
11
|
+
],
|
|
12
|
+
usage: {
|
|
13
|
+
description: "Use Radio when a user must choose exactly one option from a visible set.",
|
|
14
|
+
bestPractices: [
|
|
15
|
+
{
|
|
16
|
+
guidance: "do",
|
|
17
|
+
description: "Use it when all options should be visible for comparison."
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
guidance: "do",
|
|
21
|
+
description: "Keep option labels mutually exclusive and easy to understand."
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
guidance: "dont",
|
|
25
|
+
description: "Do not use Radio for independent toggles or multiple selection; use Checkbox or Switch."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
guidance: "dont",
|
|
29
|
+
description: "Do not use a radio group with only one option, and do not omit the Fieldset. Without the fieldset the options share no accessible name, so a screen reader reads the choices with no question attached."
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
anatomy: [
|
|
33
|
+
{
|
|
34
|
+
name: "RadioGroup",
|
|
35
|
+
required: true,
|
|
36
|
+
description: "The grouped set that manages one selected value."
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: "Radio",
|
|
40
|
+
required: true,
|
|
41
|
+
description: "One selectable option in the group."
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
related: {
|
|
46
|
+
components: [
|
|
47
|
+
"Checkbox",
|
|
48
|
+
"RadioCard",
|
|
49
|
+
"Field",
|
|
50
|
+
"Fieldset",
|
|
51
|
+
"Select"
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
props: [
|
|
55
|
+
{
|
|
56
|
+
name: "Radio",
|
|
57
|
+
type: "Base UI Radio.Root props (value, disabled, readOnly, required) + className",
|
|
58
|
+
description: "A single radio button. value pairs it with the group's selected value. Renders a native button with radio semantics, the ring and an inner Indicator dot. A custom non-button render must also set nativeButton={false}."
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
subcomponents: [
|
|
62
|
+
{
|
|
63
|
+
name: "RadioGroup",
|
|
64
|
+
type: "Base UI RadioGroup props (value, defaultValue, onValueChange, name, disabled, readOnly, required) + className",
|
|
65
|
+
description: "The group container that wraps Radio items and shares selection state across them. Controlled via value + onValueChange; uncontrolled via defaultValue. Lays its Radio items out in a vertical stack."
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
tokensUsed: ["input", "card", "primary", "ring"],
|
|
69
|
+
a11y: [
|
|
70
|
+
"Base UI provides the radiogroup/radio roles, aria-checked, hidden native inputs, and roving tabindex.",
|
|
71
|
+
"Arrow keys move and select between items; Space selects the focused item; Tab enters/leaves the group.",
|
|
72
|
+
"Checked state styling reads from the data-[checked] attribute; disabled items from the disabled state.",
|
|
73
|
+
'Focus-visible draws a 2px ring on the focused item. Wrap each Radio in <Field label orientation="horizontal"> so the label names it, is part of the hit target, sits on the first line, and dims with it when disabled \u2014 do not hand-build a <label> row.'
|
|
74
|
+
],
|
|
75
|
+
examples: [
|
|
76
|
+
{
|
|
77
|
+
label: "Basic",
|
|
78
|
+
code: `<Fieldset>
|
|
79
|
+
<FieldsetLegend>Post type</FieldsetLegend>
|
|
80
|
+
<FieldsetContent>
|
|
81
|
+
<RadioGroup defaultValue="standard">
|
|
82
|
+
<Field label="Standard" orientation="horizontal"><Radio value="standard" /></Field>
|
|
83
|
+
<Field label="Edition" orientation="horizontal"><Radio value="edition" /></Field>
|
|
84
|
+
</RadioGroup>
|
|
85
|
+
</FieldsetContent>
|
|
86
|
+
</Fieldset>`
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
label: "With a disabled option",
|
|
90
|
+
code: `<Fieldset>
|
|
91
|
+
<FieldsetLegend>Post type</FieldsetLegend>
|
|
92
|
+
<FieldsetContent>
|
|
93
|
+
<RadioGroup defaultValue="standard">
|
|
94
|
+
<Field label="Standard" orientation="horizontal"><Radio value="standard" /></Field>
|
|
95
|
+
<Field label="Edition" orientation="horizontal" disabled><Radio value="edition" /></Field>
|
|
96
|
+
</RadioGroup>
|
|
97
|
+
</FieldsetContent>
|
|
98
|
+
</Fieldset>`
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
};
|
|
102
|
+
export {
|
|
103
|
+
radioMeta
|
|
104
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
// src/components/radio-card/radio-card.tsx
|
|
2
|
+
import { Radio as RadioBase } from "@base-ui/react/radio";
|
|
3
|
+
import { cn } from "../../lib/cn.js";
|
|
4
|
+
import {
|
|
5
|
+
RADIO_DOT,
|
|
6
|
+
RADIO_RING,
|
|
7
|
+
SELECTION_CARD_GLYPH,
|
|
8
|
+
SELECTION_CARD_LAYOUT,
|
|
9
|
+
SELECTION_CARD_SHELL,
|
|
10
|
+
SELECTION_CARD_TILE_HEAD
|
|
11
|
+
} from "../../lib/selection-card.js";
|
|
12
|
+
import { radioCardToneClasses } from "./radio-card.variants.js";
|
|
13
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
14
|
+
function RadioCard({
|
|
15
|
+
className,
|
|
16
|
+
title,
|
|
17
|
+
description,
|
|
18
|
+
icon,
|
|
19
|
+
tone = "neutral",
|
|
20
|
+
titleClassName,
|
|
21
|
+
descriptionClassName,
|
|
22
|
+
...props
|
|
23
|
+
}) {
|
|
24
|
+
const t = radioCardToneClasses[tone];
|
|
25
|
+
const marker = /* @__PURE__ */ jsx(
|
|
26
|
+
"span",
|
|
27
|
+
{
|
|
28
|
+
className: cn(
|
|
29
|
+
RADIO_RING,
|
|
30
|
+
t.marker
|
|
31
|
+
),
|
|
32
|
+
children: /* @__PURE__ */ jsx(
|
|
33
|
+
RadioBase.Indicator,
|
|
34
|
+
{
|
|
35
|
+
className: cn(
|
|
36
|
+
RADIO_DOT,
|
|
37
|
+
t.dot
|
|
38
|
+
)
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
const content = /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-col gap-0.5", children: [
|
|
44
|
+
/* @__PURE__ */ jsx("span", { className: cn("text-title-sm", titleClassName), children: title }),
|
|
45
|
+
description ? /* @__PURE__ */ jsx(
|
|
46
|
+
"span",
|
|
47
|
+
{
|
|
48
|
+
className: cn("text-body-sm text-muted-foreground", descriptionClassName),
|
|
49
|
+
children: description
|
|
50
|
+
}
|
|
51
|
+
) : null
|
|
52
|
+
] });
|
|
53
|
+
return /* @__PURE__ */ jsx(
|
|
54
|
+
RadioBase.Root,
|
|
55
|
+
{
|
|
56
|
+
render: /* @__PURE__ */ jsx("button", { type: "button" }),
|
|
57
|
+
nativeButton: true,
|
|
58
|
+
className: cn(
|
|
59
|
+
SELECTION_CARD_SHELL,
|
|
60
|
+
t.card,
|
|
61
|
+
icon != null ? SELECTION_CARD_LAYOUT.tile : SELECTION_CARD_LAYOUT.row,
|
|
62
|
+
className
|
|
63
|
+
),
|
|
64
|
+
...props,
|
|
65
|
+
children: icon != null ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
66
|
+
/* @__PURE__ */ jsxs("span", { className: SELECTION_CARD_TILE_HEAD, children: [
|
|
67
|
+
/* @__PURE__ */ jsx("span", { className: cn(SELECTION_CARD_GLYPH, t.glyph), children: icon }),
|
|
68
|
+
marker
|
|
69
|
+
] }),
|
|
70
|
+
content
|
|
71
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
72
|
+
/* @__PURE__ */ jsx("span", { className: cn("flex h-[1lh] shrink-0 items-center text-title-sm", titleClassName), children: marker }),
|
|
73
|
+
content
|
|
74
|
+
] })
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
RadioCard.displayName = "RadioCard";
|
|
79
|
+
export {
|
|
80
|
+
RadioCard
|
|
81
|
+
};
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
// src/components/radio-card/radio-card.meta.ts
|
|
2
|
+
var radioCardMeta = {
|
|
3
|
+
name: "RadioCard",
|
|
4
|
+
summary: "A selectable card option (radio-card) over Base UI RadioGroup + Radio. RadioGroup shares selection state; each RadioCard is a card with a radio indicator, title, and description. Add an icon to switch to the richer two-dimensional card, and a tone to give the selected state a semantic colour identity.",
|
|
5
|
+
status: "stable",
|
|
6
|
+
keywords: [
|
|
7
|
+
"radio-card",
|
|
8
|
+
"choice card",
|
|
9
|
+
"selection",
|
|
10
|
+
"option card"
|
|
11
|
+
],
|
|
12
|
+
usage: {
|
|
13
|
+
description: "Use RadioCard for visual choice cards when users compare a small set of named options.",
|
|
14
|
+
bestPractices: [
|
|
15
|
+
{
|
|
16
|
+
guidance: "do",
|
|
17
|
+
description: "Use it when labels, descriptions, or icons make options easier to understand."
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
guidance: "do",
|
|
21
|
+
description: "Make the selected state explicit and preserve keyboard access through the group."
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
guidance: "dont",
|
|
25
|
+
description: "Do not use RadioCard for dense menus, long lists, or simple yes/no settings."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
guidance: "dont",
|
|
29
|
+
description: "Do not use a single RadioCard on its own. It is a radio, so one option cannot be deselected \u2014 a lone one is a switch, and should be a Switch."
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
anatomy: [
|
|
33
|
+
{
|
|
34
|
+
name: "RadioCard",
|
|
35
|
+
required: true,
|
|
36
|
+
description: "One selectable option card."
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: "RadioGroup",
|
|
40
|
+
required: false,
|
|
41
|
+
description: "A grouped set of related choice cards."
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
related: {
|
|
46
|
+
components: [
|
|
47
|
+
"Radio",
|
|
48
|
+
"CheckboxCard",
|
|
49
|
+
"Select"
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
props: [
|
|
53
|
+
{
|
|
54
|
+
name: "value",
|
|
55
|
+
type: "string",
|
|
56
|
+
description: "The unique value that pairs this card with the group's selected value."
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: "title",
|
|
60
|
+
type: "ReactNode",
|
|
61
|
+
description: "The card's primary label (rendered as text-title-sm)."
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: "description",
|
|
65
|
+
type: "ReactNode",
|
|
66
|
+
description: "Optional supporting copy beneath the title (text-body-sm, muted)."
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: "icon",
|
|
70
|
+
type: "ReactNode",
|
|
71
|
+
description: "Leading icon (e.g. a solid <Icon>). Its presence switches to the two-dimensional card \u2014 icon top-left, indicator top-right, copy below \u2014 and the glyph is rendered as a solid-fill icon in the tone colour."
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: "tone",
|
|
75
|
+
type: '"neutral" | "standard" | "collectible" | "edition" | "info" | "warning"',
|
|
76
|
+
default: '"neutral"',
|
|
77
|
+
description: "Semantic colour the selected state carries across the border, radio, and icon glyph. Neutral uses the primary ring with a muted wash."
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: "disabled",
|
|
81
|
+
type: "boolean",
|
|
82
|
+
default: "false",
|
|
83
|
+
description: "Dims the card and blocks selection. The group skips it during keyboard navigation."
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
name: "titleClassName",
|
|
87
|
+
type: "string",
|
|
88
|
+
description: "Merged onto the title span (default text-title-sm) \u2014 e.g. to tighten copy in a two-column layout."
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
name: "descriptionClassName",
|
|
92
|
+
type: "string",
|
|
93
|
+
description: "Merged onto the description span (default text-body-sm text-muted-foreground)."
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
subcomponents: [
|
|
97
|
+
{
|
|
98
|
+
name: "RadioGroup",
|
|
99
|
+
type: "Base UI RadioGroup props (value, defaultValue, onValueChange, name, disabled, readOnly, required) + className",
|
|
100
|
+
description: "The group container that wraps the RadioCard cards and shares their selection state. Controlled via value + onValueChange; uncontrolled via defaultValue. Lays its cards out in a single column by default; override with className (e.g. 'grid sm:grid-cols-3') for a grid \u2014 the group is a flex column, so a grid-cols-* class alone does nothing."
|
|
101
|
+
}
|
|
102
|
+
],
|
|
103
|
+
variants: {
|
|
104
|
+
tone: ["neutral", "standard", "collectible", "edition", "info", "warning"]
|
|
105
|
+
},
|
|
106
|
+
tokensUsed: [
|
|
107
|
+
"input",
|
|
108
|
+
"card",
|
|
109
|
+
"foreground",
|
|
110
|
+
"primary",
|
|
111
|
+
"muted",
|
|
112
|
+
"ring",
|
|
113
|
+
"muted-foreground",
|
|
114
|
+
"tone-standard",
|
|
115
|
+
"tone-collectible",
|
|
116
|
+
"tone-edition",
|
|
117
|
+
"tone-info",
|
|
118
|
+
"tone-warning"
|
|
119
|
+
],
|
|
120
|
+
a11y: [
|
|
121
|
+
"Base UI provides the radiogroup/radio roles, aria-checked, hidden native inputs, and roving tabindex.",
|
|
122
|
+
"Arrow keys move and select between cards; Space selects the focused card; Tab enters/leaves the group.",
|
|
123
|
+
"Checked state styling reads from the data-[checked] attribute; disabled cards from data-disabled.",
|
|
124
|
+
"focus-within draws a 2px ring on the focused card; the whole card is the hit target.",
|
|
125
|
+
"The icon is decorative \u2014 the title labels the card \u2014 so selection meaning never relies on colour alone (the border ring and the filled radio both shift; the neutral tone adds a muted fill)."
|
|
126
|
+
],
|
|
127
|
+
examples: [
|
|
128
|
+
{
|
|
129
|
+
label: "Post type (tone + icon)",
|
|
130
|
+
code: '<RadioGroup defaultValue="post" className="grid sm:grid-cols-3"><RadioCard value="post" tone="standard" icon={<Icon name="plus" />} title="Standard" description="Share without minting" /><RadioCard value="collectible" tone="collectible" icon={<Icon name="gem" />} title="Collectible" description="Free to collect as NFT" /><RadioCard value="edition" tone="edition" icon={<Icon name="image-stack" />} title="Edition" description="Sell as NFT editions" /></RadioGroup>'
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
label: "Plan picker (plain)",
|
|
134
|
+
code: '<RadioGroup defaultValue="pro"><RadioCard value="free" title="Free" description="For trying things out." /><RadioCard value="pro" title="Pro" description="For growing teams." /><RadioCard value="enterprise" title="Enterprise" description="Custom limits and support." /></RadioGroup>'
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
label: "With a disabled option",
|
|
138
|
+
code: '<RadioGroup defaultValue="free"><RadioCard value="free" title="Free" description="For trying things out." /><RadioCard value="enterprise" title="Enterprise" description="Contact sales to enable." disabled /></RadioGroup>'
|
|
139
|
+
}
|
|
140
|
+
]
|
|
141
|
+
};
|
|
142
|
+
export {
|
|
143
|
+
radioCardMeta
|
|
144
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// src/components/radio-card/radio-card.variants.ts
|
|
2
|
+
import { SELECTION_CARD_CHECKED } from "../../lib/selection-card.js";
|
|
3
|
+
var radioCardToneClasses = {
|
|
4
|
+
neutral: {
|
|
5
|
+
card: SELECTION_CARD_CHECKED.neutral,
|
|
6
|
+
marker: "group-data-[checked]:border-primary",
|
|
7
|
+
dot: "bg-primary",
|
|
8
|
+
glyph: "text-foreground"
|
|
9
|
+
},
|
|
10
|
+
standard: {
|
|
11
|
+
card: SELECTION_CARD_CHECKED.standard,
|
|
12
|
+
marker: "group-data-[checked]:border-tone-standard",
|
|
13
|
+
dot: "bg-tone-standard",
|
|
14
|
+
glyph: "text-tone-standard"
|
|
15
|
+
},
|
|
16
|
+
collectible: {
|
|
17
|
+
card: SELECTION_CARD_CHECKED.collectible,
|
|
18
|
+
marker: "group-data-[checked]:border-tone-collectible",
|
|
19
|
+
dot: "bg-tone-collectible",
|
|
20
|
+
glyph: "text-tone-collectible"
|
|
21
|
+
},
|
|
22
|
+
edition: {
|
|
23
|
+
card: SELECTION_CARD_CHECKED.edition,
|
|
24
|
+
marker: "group-data-[checked]:border-tone-edition",
|
|
25
|
+
dot: "bg-tone-edition",
|
|
26
|
+
glyph: "text-tone-edition"
|
|
27
|
+
},
|
|
28
|
+
info: {
|
|
29
|
+
card: SELECTION_CARD_CHECKED.info,
|
|
30
|
+
marker: "group-data-[checked]:border-tone-info",
|
|
31
|
+
dot: "bg-tone-info",
|
|
32
|
+
glyph: "text-tone-info"
|
|
33
|
+
},
|
|
34
|
+
warning: {
|
|
35
|
+
card: SELECTION_CARD_CHECKED.warning,
|
|
36
|
+
marker: "group-data-[checked]:border-tone-warning",
|
|
37
|
+
dot: "bg-tone-warning",
|
|
38
|
+
glyph: "text-tone-warning"
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
export {
|
|
42
|
+
radioCardToneClasses
|
|
43
|
+
};
|