@sableui/react 0.6.1 → 0.7.0
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 +285 -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 +200 -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 +33 -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 +611 -33
- 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 +25 -6
- 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 +19 -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 +210 -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.js +43 -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/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/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/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/converting-an-app.md +14 -4
- package/llms/tasks/reviewing-a-design.md +15 -0
- package/llms-full.txt +981 -65
- package/llms.txt +27 -10
- package/package.json +1 -1
- package/registry.json +2324 -171
- package/scripts/agent-setup.mjs +90 -0
- package/scripts/design-presets.mjs +46 -4
- 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 +56 -22
- 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,94 @@
|
|
|
1
|
+
// src/components/checkbox-card/checkbox-card.tsx
|
|
2
|
+
import { Checkbox as Base } from "@base-ui/react/checkbox";
|
|
3
|
+
import { CheckboxGroup as BaseGroup } from "@base-ui/react/checkbox-group";
|
|
4
|
+
import { cn } from "../../lib/cn.js";
|
|
5
|
+
import {
|
|
6
|
+
CHECK_BOX,
|
|
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 { CheckboxMark } from "../checkbox/checkbox-mark.js";
|
|
13
|
+
import {
|
|
14
|
+
checkboxCardToneClasses
|
|
15
|
+
} from "./checkbox-card.variants.js";
|
|
16
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
17
|
+
function CheckboxGroup({
|
|
18
|
+
className,
|
|
19
|
+
children,
|
|
20
|
+
...props
|
|
21
|
+
}) {
|
|
22
|
+
const classes = cn("grid grid-cols-1 gap-2", className);
|
|
23
|
+
const {
|
|
24
|
+
value,
|
|
25
|
+
defaultValue,
|
|
26
|
+
onValueChange,
|
|
27
|
+
allValues,
|
|
28
|
+
disabled,
|
|
29
|
+
render,
|
|
30
|
+
style,
|
|
31
|
+
...domProps
|
|
32
|
+
} = props;
|
|
33
|
+
const groupOwned = value !== void 0 || defaultValue !== void 0 || onValueChange !== void 0 || allValues !== void 0 || disabled !== void 0 || render !== void 0 || typeof style === "function";
|
|
34
|
+
if (!groupOwned) {
|
|
35
|
+
return /* @__PURE__ */ jsx(
|
|
36
|
+
"div",
|
|
37
|
+
{
|
|
38
|
+
role: "group",
|
|
39
|
+
className: classes,
|
|
40
|
+
style: typeof style === "function" ? void 0 : style,
|
|
41
|
+
...domProps,
|
|
42
|
+
children
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
return /* @__PURE__ */ jsx(BaseGroup, { className: classes, ...props, children });
|
|
47
|
+
}
|
|
48
|
+
CheckboxGroup.displayName = "CheckboxGroup";
|
|
49
|
+
function CheckboxCard({
|
|
50
|
+
className,
|
|
51
|
+
title,
|
|
52
|
+
description,
|
|
53
|
+
icon,
|
|
54
|
+
tone = "neutral",
|
|
55
|
+
...props
|
|
56
|
+
}) {
|
|
57
|
+
const t = checkboxCardToneClasses[tone];
|
|
58
|
+
const box = /* @__PURE__ */ jsx("span", { className: cn(CHECK_BOX, t.box), children: /* @__PURE__ */ jsx(CheckboxMark, { className: t.check }) });
|
|
59
|
+
return /* @__PURE__ */ jsxs(
|
|
60
|
+
Base.Root,
|
|
61
|
+
{
|
|
62
|
+
className: cn(
|
|
63
|
+
SELECTION_CARD_SHELL,
|
|
64
|
+
icon != null ? SELECTION_CARD_LAYOUT.tile : SELECTION_CARD_LAYOUT.row,
|
|
65
|
+
t.card,
|
|
66
|
+
className
|
|
67
|
+
),
|
|
68
|
+
...props,
|
|
69
|
+
children: [
|
|
70
|
+
icon != null ? (
|
|
71
|
+
// The tile, as RadioCard draws it (lib/selection-card).
|
|
72
|
+
/* @__PURE__ */ jsxs("span", { className: SELECTION_CARD_TILE_HEAD, children: [
|
|
73
|
+
/* @__PURE__ */ jsx("span", { className: cn(SELECTION_CARD_GLYPH, t.glyph), children: icon }),
|
|
74
|
+
box
|
|
75
|
+
] })
|
|
76
|
+
) : (
|
|
77
|
+
// The box sits on the title's first line — a box `1lh` tall in the
|
|
78
|
+
// title's tier, centred — rather than nudged down by a fixed margin
|
|
79
|
+
// that only matched one line height.
|
|
80
|
+
/* @__PURE__ */ jsx("span", { className: "flex h-[1lh] shrink-0 items-center text-title-sm", children: box })
|
|
81
|
+
),
|
|
82
|
+
/* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
|
|
83
|
+
/* @__PURE__ */ jsx("span", { className: "text-title-sm", children: title }),
|
|
84
|
+
description ? /* @__PURE__ */ jsx("span", { className: "text-body-sm text-muted-foreground", children: description }) : null
|
|
85
|
+
] })
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
CheckboxCard.displayName = "CheckboxCard";
|
|
91
|
+
export {
|
|
92
|
+
CheckboxCard,
|
|
93
|
+
CheckboxGroup
|
|
94
|
+
};
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
// src/components/checkbox-card/checkbox-card.meta.ts
|
|
2
|
+
var checkboxCardMeta = {
|
|
3
|
+
name: "CheckboxCard",
|
|
4
|
+
summary: 'A multi-select selection card \u2014 a card-sized Base UI Checkbox with a checkbox box, title, and optional description. The checkbox twin of RadioCard (same tone table). CheckboxGroup lays a column out and can own the selection: give each card a `value` and the group holds the checked values as an array, with an optional parent "select all" Checkbox.',
|
|
5
|
+
status: "stable",
|
|
6
|
+
keywords: [
|
|
7
|
+
"checkbox card",
|
|
8
|
+
"select card",
|
|
9
|
+
"multi select",
|
|
10
|
+
"option card"
|
|
11
|
+
],
|
|
12
|
+
usage: {
|
|
13
|
+
description: "Use CheckboxCard when an option needs more visual weight, supporting text, or iconography than a plain checkbox row.",
|
|
14
|
+
bestPractices: [
|
|
15
|
+
{
|
|
16
|
+
guidance: "do",
|
|
17
|
+
description: "Use it for a small number of options where details help users compare choices."
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
guidance: "do",
|
|
21
|
+
description: "Keep the checked state visible across the full card, not only inside the indicator."
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
guidance: "do",
|
|
25
|
+
description: "Let CheckboxGroup own the selection when the cards answer one question: give each card a `value` and read one array from `onValueChange` instead of wiring a toggle per card."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
guidance: "do",
|
|
29
|
+
description: 'Use a plain Checkbox with `parent` for "select all", and list every child value in the group\'s `allValues`. The group works out its checked and mixed states.'
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
guidance: "dont",
|
|
33
|
+
description: "Do not use CheckboxCard for long lists; use Checkbox rows or a Combobox with `multiple` instead."
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
guidance: "dont",
|
|
37
|
+
description: "Do not put a link or a button inside the card. The whole card is the checkbox's label, so a nested interactive element is either unreachable or steals the click that should toggle it."
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
anatomy: [
|
|
41
|
+
{
|
|
42
|
+
name: "CheckboxCard",
|
|
43
|
+
required: true,
|
|
44
|
+
description: "One card-shaped checkbox option."
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: "CheckboxGroup",
|
|
48
|
+
required: false,
|
|
49
|
+
description: 'A grouped set of related checkbox cards. Optionally owns the selected values and a parent "select all" checkbox.'
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
related: {
|
|
54
|
+
components: [
|
|
55
|
+
"Checkbox",
|
|
56
|
+
"RadioCard"
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
props: [
|
|
60
|
+
{
|
|
61
|
+
name: "onCheckedChange",
|
|
62
|
+
type: "(checked: boolean, eventDetails) => void",
|
|
63
|
+
description: "Fires with the next checked state (Base UI passes eventDetails second). Pair with `checked` for a controlled card; omit both to let it manage its own state."
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
name: "title",
|
|
67
|
+
type: "ReactNode",
|
|
68
|
+
description: "The card's primary label (text-title-sm)."
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: "description",
|
|
72
|
+
type: "ReactNode",
|
|
73
|
+
description: "Optional supporting copy beneath the title (text-body-sm, muted)."
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: "icon",
|
|
77
|
+
type: "ReactNode",
|
|
78
|
+
description: "Optional glyph (a solid <Icon>) in the tone colour. Its presence switches to the two-dimensional card RadioCard uses \u2014 icon top-left, checkbox top-right, copy below \u2014 so the two cards match in one form."
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: "tone",
|
|
82
|
+
type: '"neutral" | "standard" | "collectible" | "edition" | "info" | "warning"',
|
|
83
|
+
default: '"neutral"',
|
|
84
|
+
description: "Semantic colour the checked state carries across the border, checkbox box, and icon."
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
name: "value",
|
|
88
|
+
type: "string",
|
|
89
|
+
description: "Names the card inside a group-owned CheckboxGroup: the card is checked when the group's value array includes it. Also the value submitted with a form. Inside a CheckboxGroup, `name` stands in for `value` when `value` is omitted."
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
name: "checked / onCheckedChange / defaultChecked / disabled",
|
|
93
|
+
type: "Base UI Checkbox.Root props",
|
|
94
|
+
description: "Standard checkbox state. Without a group-owned value, each card is independent \u2014 drive checked/onCheckedChange per item for multi-select."
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
subcomponents: [
|
|
98
|
+
{
|
|
99
|
+
name: "CheckboxGroup",
|
|
100
|
+
type: "{ className?: string; children: ReactNode; value?: string[]; defaultValue?: string[]; onValueChange?: (value: string[]) => void; allValues?: string[]; disabled?: boolean }",
|
|
101
|
+
description: "Column wrapper (role=group) over Base UI's CheckboxGroup. With no group props it is layout only and each card stays independent. Pass value/defaultValue/onValueChange (string[]) and give each child a `value` to let the group own the selection \u2014 works for CheckboxCard and plain Checkbox children alike. Add allValues plus a `<Checkbox parent />` for a select-all box that turns mixed when only some are checked. `disabled` disables every child. onValueChange gets (value, eventDetails). Override the grid via className for multi-column layouts."
|
|
102
|
+
}
|
|
103
|
+
],
|
|
104
|
+
variants: {
|
|
105
|
+
tone: ["neutral", "standard", "collectible", "edition", "info", "warning"]
|
|
106
|
+
},
|
|
107
|
+
tokensUsed: [
|
|
108
|
+
"input",
|
|
109
|
+
"card",
|
|
110
|
+
"ring",
|
|
111
|
+
"primary",
|
|
112
|
+
"primary-foreground",
|
|
113
|
+
"accent",
|
|
114
|
+
"foreground",
|
|
115
|
+
"muted-foreground",
|
|
116
|
+
"tone-standard",
|
|
117
|
+
"tone-standard-foreground",
|
|
118
|
+
"tone-collectible",
|
|
119
|
+
"tone-collectible-foreground",
|
|
120
|
+
"tone-edition",
|
|
121
|
+
"tone-edition-foreground",
|
|
122
|
+
"tone-info",
|
|
123
|
+
"tone-info-foreground",
|
|
124
|
+
"tone-warning",
|
|
125
|
+
"tone-warning-foreground"
|
|
126
|
+
],
|
|
127
|
+
a11y: [
|
|
128
|
+
"Base UI provides the checkbox role, aria-checked, hidden native input, keyboard toggle, and data-[checked]/data-disabled state.",
|
|
129
|
+
"The whole card is the hit target; focus draws a 2px outline outside the card (not a ring, so the checked tone ring survives focus); Space toggles the focused card.",
|
|
130
|
+
"Selection never relies on colour alone \u2014 the filled checkbox box + check mark and the card border all shift.",
|
|
131
|
+
"A parent select-all Checkbox gets aria-checked=mixed and aria-controls pointing at its children from Base UI; give it a visible label."
|
|
132
|
+
],
|
|
133
|
+
examples: [
|
|
134
|
+
{
|
|
135
|
+
label: "Group-owned selection",
|
|
136
|
+
code: "<CheckboxGroup value={selected} onValueChange={setSelected}>{REASONS.map((r) => (<CheckboxCard key={r} value={r} title={r} />))}</CheckboxGroup>"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
label: "Select all",
|
|
140
|
+
code: '<CheckboxGroup allValues={REASONS} value={selected} onValueChange={setSelected}><Field label="All reasons" orientation="horizontal"><Checkbox parent /></Field>{REASONS.map((r) => (<CheckboxCard key={r} value={r} title={r} />))}</CheckboxGroup>'
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
label: "A single independent card",
|
|
144
|
+
code: '<CheckboxCard title="Email me a receipt" description="Sent when the mint settles" checked={receipt} onCheckedChange={setReceipt} />'
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
label: "Toned with description",
|
|
148
|
+
code: '<CheckboxCard tone="edition" title="Editions" description="Sell as numbered NFT editions" defaultChecked />'
|
|
149
|
+
}
|
|
150
|
+
]
|
|
151
|
+
};
|
|
152
|
+
export {
|
|
153
|
+
checkboxCardMeta
|
|
154
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// src/components/checkbox-card/checkbox-card.variants.ts
|
|
2
|
+
import { SELECTION_CARD_CHECKED } from "../../lib/selection-card.js";
|
|
3
|
+
var checkboxCardToneClasses = {
|
|
4
|
+
neutral: {
|
|
5
|
+
card: SELECTION_CARD_CHECKED.neutral,
|
|
6
|
+
box: "group-data-[checked]:border-primary group-data-[checked]:bg-primary group-data-[indeterminate]:border-primary group-data-[indeterminate]:bg-primary",
|
|
7
|
+
check: "text-primary-foreground",
|
|
8
|
+
glyph: "text-foreground"
|
|
9
|
+
},
|
|
10
|
+
standard: {
|
|
11
|
+
card: SELECTION_CARD_CHECKED.standard,
|
|
12
|
+
box: "group-data-[checked]:border-tone-standard group-data-[checked]:bg-tone-standard group-data-[indeterminate]:border-tone-standard group-data-[indeterminate]:bg-tone-standard",
|
|
13
|
+
check: "text-tone-standard-foreground",
|
|
14
|
+
glyph: "text-tone-standard"
|
|
15
|
+
},
|
|
16
|
+
collectible: {
|
|
17
|
+
card: SELECTION_CARD_CHECKED.collectible,
|
|
18
|
+
box: "group-data-[checked]:border-tone-collectible group-data-[checked]:bg-tone-collectible group-data-[indeterminate]:border-tone-collectible group-data-[indeterminate]:bg-tone-collectible",
|
|
19
|
+
check: "text-tone-collectible-foreground",
|
|
20
|
+
glyph: "text-tone-collectible"
|
|
21
|
+
},
|
|
22
|
+
edition: {
|
|
23
|
+
card: SELECTION_CARD_CHECKED.edition,
|
|
24
|
+
box: "group-data-[checked]:border-tone-edition group-data-[checked]:bg-tone-edition group-data-[indeterminate]:border-tone-edition group-data-[indeterminate]:bg-tone-edition",
|
|
25
|
+
check: "text-tone-edition-foreground",
|
|
26
|
+
glyph: "text-tone-edition"
|
|
27
|
+
},
|
|
28
|
+
info: {
|
|
29
|
+
card: SELECTION_CARD_CHECKED.info,
|
|
30
|
+
box: "group-data-[checked]:border-tone-info group-data-[checked]:bg-tone-info group-data-[indeterminate]:border-tone-info group-data-[indeterminate]:bg-tone-info",
|
|
31
|
+
check: "text-tone-info-foreground",
|
|
32
|
+
glyph: "text-tone-info"
|
|
33
|
+
},
|
|
34
|
+
warning: {
|
|
35
|
+
card: SELECTION_CARD_CHECKED.warning,
|
|
36
|
+
box: "group-data-[checked]:border-tone-warning group-data-[checked]:bg-tone-warning group-data-[indeterminate]:border-tone-warning group-data-[indeterminate]:bg-tone-warning",
|
|
37
|
+
check: "text-tone-warning-foreground",
|
|
38
|
+
glyph: "text-tone-warning"
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
export {
|
|
42
|
+
checkboxCardToneClasses
|
|
43
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// src/components/code/code.tsx
|
|
2
|
+
import { cn } from "../../lib/cn.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
function Code({ className, ...props }) {
|
|
5
|
+
return /* @__PURE__ */ jsx(
|
|
6
|
+
"code",
|
|
7
|
+
{
|
|
8
|
+
className: cn(
|
|
9
|
+
"rounded-xs bg-muted px-[0.35em] py-[0.15em] font-mono text-[0.875em] tabular-nums text-foreground",
|
|
10
|
+
className
|
|
11
|
+
),
|
|
12
|
+
...props
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
Code.displayName = "Code";
|
|
17
|
+
export {
|
|
18
|
+
Code
|
|
19
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
// src/components/code/code.meta.ts
|
|
2
|
+
var codeMeta = {
|
|
3
|
+
name: "Code",
|
|
4
|
+
summary: "Inline code. A styled `<code>` for code spans, keys, and identifiers inside running text \u2014 soft muted fill, monospace.",
|
|
5
|
+
status: "stable",
|
|
6
|
+
keywords: [
|
|
7
|
+
"code",
|
|
8
|
+
"inline code",
|
|
9
|
+
"token",
|
|
10
|
+
"monospace"
|
|
11
|
+
],
|
|
12
|
+
usage: {
|
|
13
|
+
description: "Use Code for short inline identifiers, commands, tokens, props, and file names inside prose.",
|
|
14
|
+
bestPractices: [
|
|
15
|
+
{
|
|
16
|
+
guidance: "do",
|
|
17
|
+
description: "Use it for brief technical literals that need to stand apart from body copy."
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
guidance: "do",
|
|
21
|
+
description: "Keep inline code short enough that it does not dominate the paragraph."
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
guidance: "dont",
|
|
25
|
+
description: "Do not use Code for multiline snippets; use CodeBlock instead."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
guidance: "dont",
|
|
29
|
+
description: "Do not put a value the reader needs to copy inside it. Code has no copy affordance, so they will select it by hand and catch the surrounding punctuation; use CodeBlock with a prompt."
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
related: {
|
|
34
|
+
components: [
|
|
35
|
+
"CodeBlock",
|
|
36
|
+
"Kbd"
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
props: [
|
|
40
|
+
{
|
|
41
|
+
name: "...props",
|
|
42
|
+
type: 'ComponentPropsWithRef<"code">',
|
|
43
|
+
description: "All native `<code>` attributes (children, className, ref, \u2026) pass through."
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
tokensUsed: ["muted", "foreground"],
|
|
47
|
+
a11y: [
|
|
48
|
+
"Renders a semantic `<code>` element so assistive tech announces it as code.",
|
|
49
|
+
"A `<code>` element is not announced distinctly by most screen readers \u2014 a code span in running prose is read as ordinary text. Where the exactness matters (a command to type verbatim, a case-sensitive identifier), say so in the sentence rather than relying on the styling to carry it."
|
|
50
|
+
],
|
|
51
|
+
examples: [
|
|
52
|
+
{
|
|
53
|
+
label: "Inline",
|
|
54
|
+
code: "Run <Code>pnpm dev</Code> to start the server."
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
label: "Code vs CodeBlock",
|
|
58
|
+
code: `// Picking the wrong one is the usual mistake:
|
|
59
|
+
//
|
|
60
|
+
// Code inline, inside a sentence \u2192 \`useState\`
|
|
61
|
+
// CodeBlock multi-line, read-only \u2192 an example to study
|
|
62
|
+
// CodeBlock prompt="$" one line, meant to be COPIED \u2192 an install command
|
|
63
|
+
|
|
64
|
+
Install with <Code>pnpm add @sableui/react</Code> {/* \u2717 they will want to copy it */}
|
|
65
|
+
<CodeBlock prompt="$" code="pnpm add @sableui/react" /> {/* \u2713 one line, with a copy button */}`
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
};
|
|
69
|
+
export {
|
|
70
|
+
codeMeta
|
|
71
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
// src/components/code-block/code-block.tsx
|
|
2
|
+
import { createContext, useContext, useRef } from "react";
|
|
3
|
+
import { Icon } from "../../icon/index.js";
|
|
4
|
+
import { useCopy } from "../../lib/use-copy.js";
|
|
5
|
+
import { useEdgeFade } from "../../lib/use-edge-fade.js";
|
|
6
|
+
import { Button } from "../button/button.js";
|
|
7
|
+
import { cn } from "../../lib/cn.js";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
var CodeHighlightContext = createContext(null);
|
|
10
|
+
function CodeHighlightProvider({ highlight, children }) {
|
|
11
|
+
return /* @__PURE__ */ jsx(CodeHighlightContext.Provider, { value: highlight, children });
|
|
12
|
+
}
|
|
13
|
+
function CodeBlock({
|
|
14
|
+
code,
|
|
15
|
+
filename,
|
|
16
|
+
showCopy = true,
|
|
17
|
+
highlight,
|
|
18
|
+
prompt,
|
|
19
|
+
className,
|
|
20
|
+
...props
|
|
21
|
+
}) {
|
|
22
|
+
const contextHighlight = useContext(CodeHighlightContext);
|
|
23
|
+
const highlighter = highlight === false ? null : highlight ?? contextHighlight;
|
|
24
|
+
const hasHeader = Boolean(filename);
|
|
25
|
+
const { copy, copied } = useCopy(code);
|
|
26
|
+
const preRef = useRef(null);
|
|
27
|
+
const fade = useEdgeFade(preRef, "horizontal");
|
|
28
|
+
if (prompt != null) {
|
|
29
|
+
return /* @__PURE__ */ jsxs(
|
|
30
|
+
"div",
|
|
31
|
+
{
|
|
32
|
+
className: cn("flex items-center justify-between gap-3 rounded-md border border-border bg-muted/40 py-1 ps-3 pe-1", className),
|
|
33
|
+
...props,
|
|
34
|
+
children: [
|
|
35
|
+
/* @__PURE__ */ jsxs("code", { className: "truncate text-mono-md text-foreground", children: [
|
|
36
|
+
/* @__PURE__ */ jsxs("span", { className: "select-none text-muted-foreground", children: [
|
|
37
|
+
prompt,
|
|
38
|
+
" "
|
|
39
|
+
] }),
|
|
40
|
+
code
|
|
41
|
+
] }),
|
|
42
|
+
showCopy ? /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "icon-sm", "aria-label": "Copy command", onClick: copy, className: "shrink-0 text-muted-foreground", children: /* @__PURE__ */ jsx(Icon, { name: copied ? "check" : "copy" }) }) : null
|
|
43
|
+
]
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
const copyColumn = !hasHeader && showCopy;
|
|
48
|
+
return /* @__PURE__ */ jsxs(
|
|
49
|
+
"div",
|
|
50
|
+
{
|
|
51
|
+
className: cn(
|
|
52
|
+
"overflow-hidden rounded-md border border-border bg-muted/40",
|
|
53
|
+
copyColumn && "flex items-start",
|
|
54
|
+
className
|
|
55
|
+
),
|
|
56
|
+
...props,
|
|
57
|
+
children: [
|
|
58
|
+
hasHeader ? /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-3 border-b border-border px-4 py-2", children: [
|
|
59
|
+
/* @__PURE__ */ jsx("span", { className: "text-mono-caption text-muted-foreground", children: filename }),
|
|
60
|
+
showCopy ? /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "icon-sm", "aria-label": "Copy code", onClick: copy, className: "text-muted-foreground", children: /* @__PURE__ */ jsx(Icon, { name: copied ? "check" : "copy" }) }) : null
|
|
61
|
+
] }) : null,
|
|
62
|
+
/* @__PURE__ */ jsx(
|
|
63
|
+
"pre",
|
|
64
|
+
{
|
|
65
|
+
ref: preRef,
|
|
66
|
+
onScroll: fade.sync,
|
|
67
|
+
style: fade.style,
|
|
68
|
+
className: cn(
|
|
69
|
+
"overflow-x-auto overscroll-x-contain p-4 text-mono-md text-foreground scrollbar-quiet",
|
|
70
|
+
copyColumn && "min-w-0 flex-1 pe-2"
|
|
71
|
+
),
|
|
72
|
+
children: /* @__PURE__ */ jsx("code", { children: highlighter ? highlighter(code) : code })
|
|
73
|
+
}
|
|
74
|
+
),
|
|
75
|
+
copyColumn ? /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "icon-sm", "aria-label": "Copy code", onClick: copy, className: "m-2 ms-0 shrink-0 text-muted-foreground", children: /* @__PURE__ */ jsx(Icon, { name: copied ? "check" : "copy" }) }) : null
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
CodeBlock.displayName = "CodeBlock";
|
|
81
|
+
export {
|
|
82
|
+
CodeBlock,
|
|
83
|
+
CodeHighlightProvider
|
|
84
|
+
};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
// src/components/code-block/code-block.meta.ts
|
|
2
|
+
var codeBlockMeta = {
|
|
3
|
+
name: "CodeBlock",
|
|
4
|
+
summary: "Multi-line code surface. Optional header bar carries a filename and a copy affordance; the body is a horizontally scrollable monospace pre. Syntax highlighting is opt-in: pass a highlighter per block or once via CodeHighlightProvider (the package ships none).",
|
|
5
|
+
status: "stable",
|
|
6
|
+
keywords: [
|
|
7
|
+
"code block",
|
|
8
|
+
"snippet",
|
|
9
|
+
"pre",
|
|
10
|
+
"example"
|
|
11
|
+
],
|
|
12
|
+
usage: {
|
|
13
|
+
description: "Use CodeBlock for multiline code samples that users may read, inspect, or copy.",
|
|
14
|
+
anatomy: [
|
|
15
|
+
{ name: "CodeBlock", required: true, description: "The surface: optional filename header, copy affordance, scrollable pre." },
|
|
16
|
+
{ name: "CodeHighlightProvider", required: false, description: "Optional app-level wrapper that supplies one highlighter to every CodeBlock inside it." }
|
|
17
|
+
],
|
|
18
|
+
bestPractices: [
|
|
19
|
+
{
|
|
20
|
+
guidance: "do",
|
|
21
|
+
description: "Give the snippet a filename, or a sentence of surrounding copy, when it helps readers and agents place it."
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
guidance: "do",
|
|
25
|
+
description: "Keep examples complete enough to teach the intended pattern."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
guidance: "do",
|
|
29
|
+
description: "Wire highlighting once with CodeHighlightProvider and map token colors to semantic tone tokens (keywords \u2192 tone-edition, strings \u2192 success, comments \u2192 muted-foreground), so code follows the theme instead of a fixed palette."
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
guidance: "dont",
|
|
33
|
+
description: "Do not put short inline identifiers in a CodeBlock; use Code for those."
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
guidance: "dont",
|
|
37
|
+
description: "Do not paste code with the indentation the surrounding file had. A block indented to sit inside your JSX shows the reader leading whitespace that is not part of the example."
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
related: {
|
|
42
|
+
components: [
|
|
43
|
+
"Code"
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
props: [
|
|
47
|
+
{
|
|
48
|
+
name: "code",
|
|
49
|
+
type: "string",
|
|
50
|
+
description: "The code to display. Always what the copy button copies, whatever the highlighter renders."
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: "filename",
|
|
54
|
+
type: "string",
|
|
55
|
+
description: "Optional filename shown in the header bar."
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: "showCopy",
|
|
59
|
+
type: "boolean",
|
|
60
|
+
default: "true",
|
|
61
|
+
description: "Show the copy affordance \u2014 in the header bar with a filename, floating in the corner without one."
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: "highlight",
|
|
65
|
+
type: "((code: string) => ReactNode) | false",
|
|
66
|
+
description: "Highlighter for this block; overrides CodeHighlightProvider. false renders plain text inside a provider."
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: "prompt",
|
|
70
|
+
type: "string",
|
|
71
|
+
description: 'A shell prompt ("$", ">"). Makes it a one-line command: the prompt is dimmed and unselectable, the line truncates, and copy takes only code.'
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
subcomponents: [
|
|
75
|
+
{
|
|
76
|
+
name: "CodeHighlightProvider",
|
|
77
|
+
type: "{ highlight: (code: string) => ReactNode; children: ReactNode }",
|
|
78
|
+
description: "Supplies one highlighter to every CodeBlock beneath it, so an app wires highlighting once. Map the highlighter's token colors to Sable tone tokens so code follows the theme."
|
|
79
|
+
}
|
|
80
|
+
],
|
|
81
|
+
tokensUsed: ["border", "muted", "muted-foreground", "foreground"],
|
|
82
|
+
a11y: [
|
|
83
|
+
"Code renders inside a <pre><code> for correct semantics and screen-reader handling.",
|
|
84
|
+
"Copy is the ghost icon Button with `useCopy`, which guards clipboard access for SSR safety."
|
|
85
|
+
],
|
|
86
|
+
examples: [
|
|
87
|
+
{
|
|
88
|
+
label: "With filename + copy",
|
|
89
|
+
code: '<CodeBlock filename="cn.ts" code={"import { clsx } from \\"clsx\\"\\nexport const cn = clsx"} />'
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
label: "With a highlighter for the whole app",
|
|
93
|
+
code: '<CodeHighlightProvider highlight={(code) => <span dangerouslySetInnerHTML={{ __html: highlightToHtml(code) }} />}><CodeBlock code={"const a = 1"} /></CodeHighlightProvider>'
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
label: "No header",
|
|
97
|
+
code: '<CodeBlock showCopy={false} code={"type Size = \\"sm\\" | \\"md\\"\\nconst size: Size = \\"md\\""} />'
|
|
98
|
+
}
|
|
99
|
+
]
|
|
100
|
+
};
|
|
101
|
+
export {
|
|
102
|
+
codeBlockMeta
|
|
103
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// src/components/collapsible/collapsible.tsx
|
|
2
|
+
import { Collapsible as Base } from "@base-ui/react/collapsible";
|
|
3
|
+
import { Icon } from "../../icon/index.js";
|
|
4
|
+
import { cn } from "../../lib/cn.js";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
var Collapsible = Base.Root;
|
|
7
|
+
var CollapsibleTrigger = Base.Trigger;
|
|
8
|
+
function CollapsibleIndicator({ className }) {
|
|
9
|
+
return /* @__PURE__ */ jsx(
|
|
10
|
+
Icon,
|
|
11
|
+
{
|
|
12
|
+
name: "chevron-down",
|
|
13
|
+
className: cn(
|
|
14
|
+
"text-xs text-muted-foreground motion-interactive group-data-[panel-open]/collapsible:rotate-180",
|
|
15
|
+
className
|
|
16
|
+
)
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
function CollapsiblePanel({ className, ...props }) {
|
|
21
|
+
return /* @__PURE__ */ jsx(
|
|
22
|
+
Base.Panel,
|
|
23
|
+
{
|
|
24
|
+
className: cn(
|
|
25
|
+
"h-[var(--collapsible-panel-height)] text-body-md text-foreground",
|
|
26
|
+
"motion-disclosure data-[ending-style]:h-0 data-[starting-style]:h-0",
|
|
27
|
+
className
|
|
28
|
+
),
|
|
29
|
+
...props
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
Collapsible,
|
|
35
|
+
CollapsibleIndicator,
|
|
36
|
+
CollapsiblePanel,
|
|
37
|
+
CollapsibleTrigger
|
|
38
|
+
};
|