@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,26 @@
|
|
|
1
|
+
// src/components/switch/switch.tsx
|
|
2
|
+
import { Switch as Base } from "@base-ui/react/switch";
|
|
3
|
+
import { cn } from "../../lib/cn.js";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
function Switch({ className, ...props }) {
|
|
6
|
+
return /* @__PURE__ */ jsx(
|
|
7
|
+
Base.Root,
|
|
8
|
+
{
|
|
9
|
+
className: cn(
|
|
10
|
+
"inline-flex h-6 w-10 shrink-0 cursor-pointer items-center rounded-full p-0.5 motion-interactive",
|
|
11
|
+
// Off, the track is the whole control (the thumb is light in both modes), so
|
|
12
|
+
// it takes the 3:1 control edge, not the quiet `input` hairline.
|
|
13
|
+
"bg-control-border data-[checked]:bg-primary",
|
|
14
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
15
|
+
"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50",
|
|
16
|
+
className
|
|
17
|
+
),
|
|
18
|
+
...props,
|
|
19
|
+
children: /* @__PURE__ */ jsx(Base.Thumb, { className: "block h-5 w-5 rounded-full bg-(--switch-thumb) shadow-(--knob-shadow) motion-interactive ease-spring data-[checked]:translate-x-4 rtl:data-[checked]:-translate-x-4 data-[checked]:bg-primary-foreground" })
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
Switch.displayName = "Switch";
|
|
24
|
+
export {
|
|
25
|
+
Switch
|
|
26
|
+
};
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
// src/components/switch/switch.meta.ts
|
|
2
|
+
var switchMeta = {
|
|
3
|
+
name: "Switch",
|
|
4
|
+
summary: "Binary on/off toggle for immediate-effect settings. Track fills with the primary tone when checked; the thumb slides on a spring-eased transform (mirrored in RTL).",
|
|
5
|
+
status: "stable",
|
|
6
|
+
keywords: [
|
|
7
|
+
"switch",
|
|
8
|
+
"toggle setting",
|
|
9
|
+
"on off",
|
|
10
|
+
"form control"
|
|
11
|
+
],
|
|
12
|
+
usage: {
|
|
13
|
+
description: "Use Switch for immediate on/off settings that take effect as a persistent preference or mode.",
|
|
14
|
+
bestPractices: [
|
|
15
|
+
{
|
|
16
|
+
guidance: "do",
|
|
17
|
+
description: "Use it for binary settings where the label describes the enabled state."
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
guidance: "do",
|
|
21
|
+
description: "Make the current state obvious through both position and accessible text."
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
guidance: "dont",
|
|
25
|
+
description: `Do not phrase the label as a negative, such as "Don't send read receipts". Turning off a negative is a double negative, and the user has to solve it before they can act.`
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
guidance: "dont",
|
|
29
|
+
description: "Do not use Switch for one-time agreement, multi-select choices, or submit-only booleans."
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
guidance: "dont",
|
|
33
|
+
description: "Do not use a Switch whose effect is not immediately visible somewhere. A toggle flipped with no observable consequence gives no confirmation it worked, so the user flips it again to check."
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
related: {
|
|
38
|
+
components: [
|
|
39
|
+
"Checkbox",
|
|
40
|
+
"Toggle",
|
|
41
|
+
"ThemeSwitcher"
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
props: [
|
|
45
|
+
{
|
|
46
|
+
name: "checked",
|
|
47
|
+
type: "boolean",
|
|
48
|
+
description: "Controlled on/off state. Pair with onCheckedChange. Omit for an uncontrolled switch."
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: "defaultChecked",
|
|
52
|
+
type: "boolean",
|
|
53
|
+
default: "false",
|
|
54
|
+
description: "Initial state for an uncontrolled switch."
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: "onCheckedChange",
|
|
58
|
+
type: "(checked: boolean, eventDetails) => void",
|
|
59
|
+
description: "Fired when the switch is toggled. Note: Base UI passes a second eventDetails arg \u2014 not the common (checked) => void, so a single-arg handler must widen its signature."
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: "disabled",
|
|
63
|
+
type: "boolean",
|
|
64
|
+
default: "false",
|
|
65
|
+
description: "Dims the control and ignores user interaction."
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: "readOnly",
|
|
69
|
+
type: "boolean",
|
|
70
|
+
default: "false",
|
|
71
|
+
description: "Prevents toggling while keeping the control fully visible."
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: "required",
|
|
75
|
+
type: "boolean",
|
|
76
|
+
default: "false",
|
|
77
|
+
description: "Marks the switch as required when inside a form."
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: "name",
|
|
81
|
+
type: "string",
|
|
82
|
+
description: "Identifies the field when the enclosing form is submitted."
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
tokensUsed: ["input", "primary", "primary-foreground", "ring"],
|
|
86
|
+
motion: [
|
|
87
|
+
{
|
|
88
|
+
slot: "arrival",
|
|
89
|
+
recipe: "none",
|
|
90
|
+
part: "Root",
|
|
91
|
+
why: "Switches arrive as part of a settings list. Animating each one in turns a form into a title sequence."
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
slot: "response",
|
|
95
|
+
recipe: "motion-interactive",
|
|
96
|
+
part: "Root",
|
|
97
|
+
why: "The track is small and its hover change is subtle; without the ease the colour shift reads as a rendering glitch rather than a reaction."
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
slot: "transition",
|
|
101
|
+
recipe: "motion-interactive",
|
|
102
|
+
part: "Thumb",
|
|
103
|
+
why: "The thumb sliding IS the affordance \u2014 it shows the control has two ends and which one you are now at. Teleporting the thumb makes on and off two unrelated pictures, and users re-read the label to work out which they are looking at. motion-interactive is the right recipe because it declares `translate`, so the thumb transform and the track colour ease on one timeline instead of two."
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
slot: "activity",
|
|
107
|
+
recipe: "none",
|
|
108
|
+
part: "Root",
|
|
109
|
+
why: "A switch commits instantly. If the write is slow enough to need a pending state, the surrounding form owns that, not the control."
|
|
110
|
+
}
|
|
111
|
+
],
|
|
112
|
+
a11y: [
|
|
113
|
+
"Renders Base UI's Switch with a hidden native <input> \u2014 role, ARIA, and keyboard (Space/Enter) toggling come for free.",
|
|
114
|
+
"Focus-visible draws a 2px ring in the --ring token.",
|
|
115
|
+
"Disabled state sets cursor-not-allowed and 50% opacity; readOnly keeps full contrast but blocks changes.",
|
|
116
|
+
'Give it an accessible name: wrap it in <Field label=\u2026 orientation="horizontal">, which wires the label for you.'
|
|
117
|
+
],
|
|
118
|
+
examples: [
|
|
119
|
+
{ label: "Default (uncontrolled)", code: "<Switch defaultChecked />" },
|
|
120
|
+
{
|
|
121
|
+
label: "Controlled",
|
|
122
|
+
code: "<Switch checked={on} onCheckedChange={setOn} />"
|
|
123
|
+
},
|
|
124
|
+
{ label: "Disabled", code: "<Switch disabled defaultChecked />" },
|
|
125
|
+
{
|
|
126
|
+
label: "With a label",
|
|
127
|
+
code: '<Field label="Reduce motion" orientation="horizontal"><Switch defaultChecked /></Field>'
|
|
128
|
+
}
|
|
129
|
+
]
|
|
130
|
+
};
|
|
131
|
+
export {
|
|
132
|
+
switchMeta
|
|
133
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// src/components/table/index.ts
|
|
2
|
+
import {
|
|
3
|
+
Table,
|
|
4
|
+
TableHeader,
|
|
5
|
+
TableBody,
|
|
6
|
+
TableFooter,
|
|
7
|
+
TableRow,
|
|
8
|
+
TableHead,
|
|
9
|
+
TableCell,
|
|
10
|
+
TableCaption
|
|
11
|
+
} from "./table.js";
|
|
12
|
+
import { tableMeta } from "./table.meta.js";
|
|
13
|
+
export {
|
|
14
|
+
Table,
|
|
15
|
+
TableBody,
|
|
16
|
+
TableCaption,
|
|
17
|
+
TableCell,
|
|
18
|
+
TableFooter,
|
|
19
|
+
TableHead,
|
|
20
|
+
TableHeader,
|
|
21
|
+
TableRow,
|
|
22
|
+
tableMeta
|
|
23
|
+
};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
// src/components/table/table.tsx
|
|
2
|
+
import { cn } from "../../lib/cn.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
function Table({ className, ...props }) {
|
|
5
|
+
return (
|
|
6
|
+
// Thin scrollbar so a wide table's horizontal bar reads as part of the
|
|
7
|
+
// table rather than as chrome, and contained overscroll so swiping past
|
|
8
|
+
// the last column does not trigger the browser's back gesture.
|
|
9
|
+
/* @__PURE__ */ jsx("div", { className: "w-full overflow-x-auto overscroll-x-contain scrollbar-quiet", children: /* @__PURE__ */ jsx(
|
|
10
|
+
"table",
|
|
11
|
+
{
|
|
12
|
+
className: cn("w-full caption-bottom text-body-sm", className),
|
|
13
|
+
...props
|
|
14
|
+
}
|
|
15
|
+
) })
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
Table.displayName = "Table";
|
|
19
|
+
function TableHeader({
|
|
20
|
+
className,
|
|
21
|
+
...props
|
|
22
|
+
}) {
|
|
23
|
+
return /* @__PURE__ */ jsx("thead", { className: cn("[&_tr]:border-b", className), ...props });
|
|
24
|
+
}
|
|
25
|
+
TableHeader.displayName = "TableHeader";
|
|
26
|
+
function TableBody({
|
|
27
|
+
className,
|
|
28
|
+
...props
|
|
29
|
+
}) {
|
|
30
|
+
return /* @__PURE__ */ jsx("tbody", { className: cn("[&_tr:last-child]:border-0", className), ...props });
|
|
31
|
+
}
|
|
32
|
+
TableBody.displayName = "TableBody";
|
|
33
|
+
function TableFooter({
|
|
34
|
+
className,
|
|
35
|
+
...props
|
|
36
|
+
}) {
|
|
37
|
+
return /* @__PURE__ */ jsx(
|
|
38
|
+
"tfoot",
|
|
39
|
+
{
|
|
40
|
+
className: cn(
|
|
41
|
+
"border-t border-border bg-muted/50 text-label-md [&>tr]:last:border-b-0",
|
|
42
|
+
className
|
|
43
|
+
),
|
|
44
|
+
...props
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
TableFooter.displayName = "TableFooter";
|
|
49
|
+
function TableRow({ className, ...props }) {
|
|
50
|
+
return /* @__PURE__ */ jsx(
|
|
51
|
+
"tr",
|
|
52
|
+
{
|
|
53
|
+
className: cn(
|
|
54
|
+
"border-b border-border motion-interactive [tbody>&:hover]:bg-muted/50",
|
|
55
|
+
"*:motion-interactive data-[selected]:*:bg-muted data-[selected]:*:shadow-[1px_0_0_var(--muted)]",
|
|
56
|
+
className
|
|
57
|
+
),
|
|
58
|
+
...props
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
TableRow.displayName = "TableRow";
|
|
63
|
+
var NUMERIC = "text-end tabular-nums";
|
|
64
|
+
function TableHead({ className, numeric = false, ...props }) {
|
|
65
|
+
return /* @__PURE__ */ jsx(
|
|
66
|
+
"th",
|
|
67
|
+
{
|
|
68
|
+
className: cn(
|
|
69
|
+
"h-10 px-3 text-start align-middle text-label-md text-muted-foreground first:ps-[var(--table-edge-px,--spacing(3))] last:pe-[var(--table-edge-px,--spacing(3))]",
|
|
70
|
+
numeric && NUMERIC,
|
|
71
|
+
className
|
|
72
|
+
),
|
|
73
|
+
...props
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
TableHead.displayName = "TableHead";
|
|
78
|
+
function TableCell({ className, numeric = false, ...props }) {
|
|
79
|
+
return /* @__PURE__ */ jsx(
|
|
80
|
+
"td",
|
|
81
|
+
{
|
|
82
|
+
className: cn(
|
|
83
|
+
"px-3 py-2.5 align-middle first:ps-[var(--table-edge-px,--spacing(3))] last:pe-[var(--table-edge-px,--spacing(3))]",
|
|
84
|
+
numeric && NUMERIC,
|
|
85
|
+
className
|
|
86
|
+
),
|
|
87
|
+
...props
|
|
88
|
+
}
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
TableCell.displayName = "TableCell";
|
|
92
|
+
function TableCaption({
|
|
93
|
+
className,
|
|
94
|
+
...props
|
|
95
|
+
}) {
|
|
96
|
+
return /* @__PURE__ */ jsx(
|
|
97
|
+
"caption",
|
|
98
|
+
{
|
|
99
|
+
className: cn(
|
|
100
|
+
"border-t border-border py-3 ps-[var(--table-edge-px,--spacing(3))] pe-[var(--table-edge-px,--spacing(3))] text-start text-caption text-muted-foreground",
|
|
101
|
+
className
|
|
102
|
+
),
|
|
103
|
+
...props
|
|
104
|
+
}
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
TableCaption.displayName = "TableCaption";
|
|
108
|
+
export {
|
|
109
|
+
Table,
|
|
110
|
+
TableBody,
|
|
111
|
+
TableCaption,
|
|
112
|
+
TableCell,
|
|
113
|
+
TableFooter,
|
|
114
|
+
TableHead,
|
|
115
|
+
TableHeader,
|
|
116
|
+
TableRow
|
|
117
|
+
};
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
// src/components/table/table.meta.ts
|
|
2
|
+
var tableMeta = {
|
|
3
|
+
name: "Table",
|
|
4
|
+
summary: "Styled native table subcomponents (Table, TableHeader, TableBody, TableFooter, TableRow, TableHead, TableCell, TableCaption). Horizontally scrollable frame, hairline row borders, hover-lift, and selectable rows via data-selected.",
|
|
5
|
+
keywords: [
|
|
6
|
+
"table",
|
|
7
|
+
"data table",
|
|
8
|
+
"rows",
|
|
9
|
+
"columns",
|
|
10
|
+
"grid",
|
|
11
|
+
"caption",
|
|
12
|
+
"header",
|
|
13
|
+
"cell",
|
|
14
|
+
"tabular"
|
|
15
|
+
],
|
|
16
|
+
usage: {
|
|
17
|
+
description: "Use Table for structured data with consistent columns and rows. Use DataTable when the table should be data-driven with sorting or empty state behavior, and use lists or cards when each item has a different shape.",
|
|
18
|
+
bestPractices: [
|
|
19
|
+
{
|
|
20
|
+
guidance: "do",
|
|
21
|
+
description: "Use TableCaption and TableHead so the table has a clear purpose and column semantics."
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
guidance: "do",
|
|
25
|
+
description: "Keep cells concise and scannable; compose Badge, StatusDot, Avatar, or Button only when they clarify the row."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
guidance: "do",
|
|
29
|
+
description: "Use the built-in horizontal frame for overflow instead of squeezing columns until content becomes unreadable."
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
guidance: "do",
|
|
33
|
+
description: "Put a table in a card with `<CardContent flush>`. The first and last columns then take the card's own padding (`--table-edge-px`), so they line up with the CardHeader at any density. Never hand-set `pl-6`/`pr-6` on edge cells."
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
guidance: "dont",
|
|
37
|
+
description: "Use Table for heterogeneous items with no stable columns. Use Card, Entity, or a list composition instead."
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
guidance: "dont",
|
|
41
|
+
description: "Put every possible action in every row. Use one primary row action, an OverflowMenu, or row detail navigation."
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
anatomy: [
|
|
45
|
+
{
|
|
46
|
+
name: "Caption",
|
|
47
|
+
required: false,
|
|
48
|
+
description: "Accessible summary of what the table contains."
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: "Header",
|
|
52
|
+
required: true,
|
|
53
|
+
description: "Column labels rendered with TableHead cells."
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: "Body",
|
|
57
|
+
required: true,
|
|
58
|
+
description: "Rows and cells containing the tabular data."
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: "Footer",
|
|
62
|
+
required: false,
|
|
63
|
+
description: "Optional totals or summary row group."
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
related: {
|
|
68
|
+
components: ["DataTable", "Pagination", "Badge", "StatusDot", "Avatar"],
|
|
69
|
+
patterns: ["DashboardPage", "ListDetailPage"]
|
|
70
|
+
},
|
|
71
|
+
status: "stable",
|
|
72
|
+
props: [
|
|
73
|
+
{
|
|
74
|
+
name: "className",
|
|
75
|
+
type: "string",
|
|
76
|
+
description: "The root renders a horizontally scrollable frame around a native <table>; forwards all native table attributes plus className. Each subcomponent likewise forwards its element's native attributes + className."
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
subcomponents: [
|
|
80
|
+
{
|
|
81
|
+
name: "TableHeader",
|
|
82
|
+
type: 'ComponentPropsWithRef<"thead">',
|
|
83
|
+
description: "The header row group (thead)."
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
name: "TableBody",
|
|
87
|
+
type: 'ComponentPropsWithRef<"tbody">',
|
|
88
|
+
description: "The data row group (tbody)."
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
name: "TableFooter",
|
|
92
|
+
type: 'ComponentPropsWithRef<"tfoot">',
|
|
93
|
+
description: "Summary row group (tfoot) with a muted fill."
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: "TableRow",
|
|
97
|
+
type: 'ComponentPropsWithRef<"tr">',
|
|
98
|
+
description: "A row (tr) \u2014 hairline bottom border, hover lift, and a selected state via the data-selected attribute."
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
name: "TableHead",
|
|
102
|
+
type: 'ComponentPropsWithRef<"th">',
|
|
103
|
+
description: "A column header cell (th) in muted label styling."
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
name: "TableCell",
|
|
107
|
+
type: 'ComponentPropsWithRef<"td">',
|
|
108
|
+
description: "A data cell (td)."
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
name: "TableCaption",
|
|
112
|
+
type: 'ComponentPropsWithRef<"caption">',
|
|
113
|
+
description: "Accessible description of the table (caption), muted."
|
|
114
|
+
}
|
|
115
|
+
],
|
|
116
|
+
tokensUsed: ["border", "muted", "muted-foreground"],
|
|
117
|
+
a11y: [
|
|
118
|
+
"Renders semantic native table elements (thead/tbody/tfoot/th/td/caption) preserving built-in table semantics.",
|
|
119
|
+
"Use TableHead (th) for column headers and TableCaption for an accessible description.",
|
|
120
|
+
"Mark the active row with the data-selected attribute for a visible selected state."
|
|
121
|
+
],
|
|
122
|
+
examples: [
|
|
123
|
+
{
|
|
124
|
+
label: "Collectors",
|
|
125
|
+
code: "<Table>\n <TableCaption>Recent collectors</TableCaption>\n <TableHeader>\n <TableRow>\n <TableHead>Collector</TableHead>\n <TableHead>Edition</TableHead>\n <TableHead>Paid</TableHead>\n </TableRow>\n </TableHeader>\n <TableBody>\n <TableRow>\n <TableCell>@nova</TableCell>\n <TableCell>#012</TableCell>\n <TableCell>0.5 SOL</TableCell>\n </TableRow>\n </TableBody>\n</Table>"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
label: "Rich status cells",
|
|
129
|
+
code: '<Table><TableCaption>Deployments</TableCaption><TableHeader><TableRow><TableHead>Name</TableHead><TableHead>Status</TableHead><TableHead>Owner</TableHead><TableHead className="text-end">Actions</TableHead></TableRow></TableHeader><TableBody><TableRow data-selected><TableCell>Catalog API</TableCell><TableCell><Badge appearance="plain" tone="warning" dot pulse>Building</Badge></TableCell><TableCell><Row gap={1}><Avatar fallback="NR" alt="Nova Reed" size="sm" /><span>Nova</span></Row></TableCell><TableCell className="text-end"><Button size="sm" variant="ghost">View</Button></TableCell></TableRow></TableBody></Table>'
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
label: "Flush in a card",
|
|
133
|
+
code: "<Card><CardHeader><CardTitle>Collectors</CardTitle></CardHeader><CardContent flush><Table><TableHeader><TableRow><TableHead>Collector</TableHead><TableHead>Paid</TableHead></TableRow></TableHeader><TableBody><TableRow><TableCell>@nova</TableCell><TableCell>0.5 SOL</TableCell></TableRow></TableBody></Table></CardContent></Card>"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
label: "Summary footer",
|
|
137
|
+
code: '<Table><TableHeader><TableRow><TableHead>Item</TableHead><TableHead className="text-end">Amount</TableHead></TableRow></TableHeader><TableBody><TableRow><TableCell>Primary sale</TableCell><TableCell className="text-end">42 SOL</TableCell></TableRow></TableBody><TableFooter><TableRow><TableCell>Total</TableCell><TableCell className="text-end">42 SOL</TableCell></TableRow></TableFooter></Table>'
|
|
138
|
+
}
|
|
139
|
+
]
|
|
140
|
+
};
|
|
141
|
+
export {
|
|
142
|
+
tableMeta
|
|
143
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// src/components/tabs/index.ts
|
|
2
|
+
import {
|
|
3
|
+
Tabs,
|
|
4
|
+
TabsList,
|
|
5
|
+
TabsTrigger,
|
|
6
|
+
TabsPanel,
|
|
7
|
+
TabsPanel as TabsPanel2
|
|
8
|
+
} from "./tabs.js";
|
|
9
|
+
import { tabsMeta } from "./tabs.meta.js";
|
|
10
|
+
export {
|
|
11
|
+
Tabs,
|
|
12
|
+
TabsPanel2 as TabsContent,
|
|
13
|
+
TabsList,
|
|
14
|
+
TabsPanel,
|
|
15
|
+
TabsTrigger,
|
|
16
|
+
tabsMeta
|
|
17
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// src/components/tabs/tabs.tsx
|
|
2
|
+
import { Tabs as Base } from "@base-ui/react/tabs";
|
|
3
|
+
import { createContext, useContext } from "react";
|
|
4
|
+
import { cn } from "../../lib/cn.js";
|
|
5
|
+
import { trimLabel } from "../../lib/trim-label.js";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
var Tabs = Base.Root;
|
|
8
|
+
var TabsVariantContext = createContext("underline");
|
|
9
|
+
function TabsList({ className, variant = "underline", ...props }) {
|
|
10
|
+
return /* @__PURE__ */ jsx(TabsVariantContext.Provider, { value: variant, children: /* @__PURE__ */ jsx(
|
|
11
|
+
Base.List,
|
|
12
|
+
{
|
|
13
|
+
"data-variant": variant,
|
|
14
|
+
className: cn(
|
|
15
|
+
variant === "underline" ? "inline-flex items-center gap-1 border-b border-border" : "inline-flex items-center gap-1",
|
|
16
|
+
className
|
|
17
|
+
),
|
|
18
|
+
...props
|
|
19
|
+
}
|
|
20
|
+
) });
|
|
21
|
+
}
|
|
22
|
+
function TabsTrigger({ className, children, ...props }) {
|
|
23
|
+
const variant = useContext(TabsVariantContext);
|
|
24
|
+
return /* @__PURE__ */ jsx(
|
|
25
|
+
Base.Tab,
|
|
26
|
+
{
|
|
27
|
+
className: cn(
|
|
28
|
+
"cursor-pointer text-label-lg text-muted-foreground motion-interactive hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring data-[active]:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
29
|
+
variant === "underline" ? (
|
|
30
|
+
// On the control ladder like the pill variant (it was py-2 plus
|
|
31
|
+
// the label's line, ~36px — no rung).
|
|
32
|
+
"-mb-px inline-flex h-(--control-md) items-center gap-(--control-gap) border-b-2 border-transparent px-3 data-[active]:border-foreground"
|
|
33
|
+
) : "inline-flex h-(--control-sm) items-center gap-(--control-gap) rounded-[var(--button-radius,9999px)] px-3 data-[active]:bg-muted",
|
|
34
|
+
className
|
|
35
|
+
),
|
|
36
|
+
...props,
|
|
37
|
+
children: variant === "pill" && typeof children !== "function" ? trimLabel(children) : children
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
function TabsPanel({ className, ...props }) {
|
|
42
|
+
return /* @__PURE__ */ jsx(
|
|
43
|
+
Base.Panel,
|
|
44
|
+
{
|
|
45
|
+
className: cn(
|
|
46
|
+
"pt-4 text-foreground focus-visible:outline-none",
|
|
47
|
+
className
|
|
48
|
+
),
|
|
49
|
+
...props
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
export {
|
|
54
|
+
Tabs,
|
|
55
|
+
TabsList,
|
|
56
|
+
TabsPanel,
|
|
57
|
+
TabsTrigger
|
|
58
|
+
};
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
// src/components/tabs/tabs.meta.ts
|
|
2
|
+
var tabsMeta = {
|
|
3
|
+
name: "Tabs",
|
|
4
|
+
summary: "Tabs over Base UI Tabs (roving focus, arrow-key nav, ARIA tablist wiring) in two styles: underline (page sections) or pill (compact switchers). Tabs (Root) + TabsList + TabsTrigger + TabsPanel.",
|
|
5
|
+
status: "stable",
|
|
6
|
+
keywords: [
|
|
7
|
+
"tabs",
|
|
8
|
+
"tablist",
|
|
9
|
+
"panels",
|
|
10
|
+
"segmented content"
|
|
11
|
+
],
|
|
12
|
+
usage: {
|
|
13
|
+
description: "Use Tabs to switch between related panels within the same page context.",
|
|
14
|
+
bestPractices: [
|
|
15
|
+
{
|
|
16
|
+
guidance: "do",
|
|
17
|
+
description: "Use tabs when each panel is peer content and users may compare or switch often."
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
guidance: "do",
|
|
21
|
+
description: "Keep tab labels short and make the active tab unmistakable."
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
guidance: "do",
|
|
25
|
+
description: 'Use variant="pill" for a short switcher inside a card or toolbar (Preview / Code, List / Grid); keep the default underline for sections of a page.'
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
guidance: "dont",
|
|
29
|
+
description: "Do not use Tabs for unrelated pages or primary navigation that needs distinct URLs."
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
guidance: "dont",
|
|
33
|
+
description: "Do not use tabs for sequential steps. Tabs are peer views the user returns to in any order; a process with an order needs a stepper, or the user will skip ahead."
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
anatomy: [
|
|
37
|
+
{
|
|
38
|
+
name: "TabsList",
|
|
39
|
+
required: true,
|
|
40
|
+
description: "The list of tab triggers."
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: "TabsTrigger",
|
|
44
|
+
required: true,
|
|
45
|
+
description: "One selectable tab."
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: "TabsPanel",
|
|
49
|
+
required: true,
|
|
50
|
+
description: "The content associated with a trigger."
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: "TabsContent",
|
|
54
|
+
required: false,
|
|
55
|
+
description: "Compatibility alias for panel content."
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
related: {
|
|
60
|
+
components: [
|
|
61
|
+
"Accordion",
|
|
62
|
+
"BottomNav",
|
|
63
|
+
"SideNav"
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
props: [
|
|
67
|
+
{
|
|
68
|
+
name: "Tabs (Root)",
|
|
69
|
+
type: "Base UI Tabs.Root props (value, defaultValue, onValueChange, orientation)",
|
|
70
|
+
default: "defaultValue: 0",
|
|
71
|
+
description: "Controls the active tab. Uncontrolled via defaultValue; controlled via value + onValueChange."
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
subcomponents: [
|
|
75
|
+
{
|
|
76
|
+
name: "TabsList",
|
|
77
|
+
type: 'Base UI Tabs.List props (activateOnFocus, loopFocus) + variant?: "underline" | "pill" + className',
|
|
78
|
+
description: `The tablist row. variant="underline" (default) draws a divider rule beneath the triggers; variant="pill" drops the rule and fills the active trigger, which takes the theme's button shape (--button-radius). Triggers inherit the variant.`
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: "TabsTrigger",
|
|
82
|
+
type: "Base UI Tabs.Tab props (value, disabled) + className",
|
|
83
|
+
description: "A single tab button. value pairs it with the panel of the same value."
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
name: "TabsPanel",
|
|
87
|
+
type: "Base UI Tabs.Panel props (value, keepMounted) + className",
|
|
88
|
+
description: "The content shown when the matching trigger is active."
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
name: "TabsContent",
|
|
92
|
+
type: "Alias of TabsPanel",
|
|
93
|
+
description: "Re-export of TabsPanel for consumers that prefer this name."
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
tokensUsed: ["border", "muted", "muted-foreground", "foreground", "ring"],
|
|
97
|
+
a11y: [
|
|
98
|
+
"Base UI provides the tablist/tab/tabpanel roles, aria-selected, and roving tabindex.",
|
|
99
|
+
"Arrow keys move between tabs; Home/End jump to first/last; panels are linked via aria-controls.",
|
|
100
|
+
"Active tab styling reads from the data-active attribute; disabled tabs from data-disabled. Disabled tabs are skipped by arrow-key navigation.",
|
|
101
|
+
"Keyboard focus shows a ring on the focused trigger in both variants; the panel remains focusable."
|
|
102
|
+
],
|
|
103
|
+
examples: [
|
|
104
|
+
{
|
|
105
|
+
label: "Basic",
|
|
106
|
+
code: '<Tabs defaultValue="overview"><TabsList><TabsTrigger value="overview">Overview</TabsTrigger><TabsTrigger value="activity">Activity</TabsTrigger></TabsList><TabsPanel value="overview">Overview content</TabsPanel><TabsPanel value="activity">Activity content</TabsPanel></Tabs>'
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
label: "Pill switcher",
|
|
110
|
+
code: '<Tabs defaultValue="preview"><TabsList variant="pill"><TabsTrigger value="preview">Preview</TabsTrigger><TabsTrigger value="code">Code</TabsTrigger></TabsList><TabsPanel value="preview">Rendered example</TabsPanel><TabsPanel value="code">Source</TabsPanel></Tabs>'
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
label: "With a disabled tab",
|
|
114
|
+
code: '<Tabs defaultValue="overview"><TabsList><TabsTrigger value="overview">Overview</TabsTrigger><TabsTrigger value="holders" disabled>Holders</TabsTrigger></TabsList><TabsPanel value="overview">Overview content</TabsPanel></Tabs>'
|
|
115
|
+
}
|
|
116
|
+
]
|
|
117
|
+
};
|
|
118
|
+
export {
|
|
119
|
+
tabsMeta
|
|
120
|
+
};
|