@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,245 @@
|
|
|
1
|
+
// src/components/bar-chart/bar-chart.meta.ts
|
|
2
|
+
var barChartMeta = {
|
|
3
|
+
name: "BarChart",
|
|
4
|
+
summary: "Bars comparing amounts across categories: grouped, stacked or stacked to 100%, vertical columns or horizontal bars, with value labels, per-category colours and a separate tone for negative values. Bars rise from the baseline in sequence as the chart scrolls into view.",
|
|
5
|
+
keywords: [
|
|
6
|
+
"chart",
|
|
7
|
+
"bar",
|
|
8
|
+
"column",
|
|
9
|
+
"histogram",
|
|
10
|
+
"compare",
|
|
11
|
+
"stacked",
|
|
12
|
+
"grouped",
|
|
13
|
+
"horizontal",
|
|
14
|
+
"analytics",
|
|
15
|
+
"dashboard"
|
|
16
|
+
],
|
|
17
|
+
usage: {
|
|
18
|
+
description: 'Use BarChart to compare amounts across categories \u2014 the default chart for "how much of each". Go horizontal (`orientation="horizontal"`) when category names are long or there are many of them; group series side by side to compare them, stack them to show a total. For parts of one whole, a stacked bar or PieChart; for a trend, AreaChart or LineChart.',
|
|
19
|
+
bestPractices: [
|
|
20
|
+
{
|
|
21
|
+
guidance: "do",
|
|
22
|
+
description: "Sort categories by value unless they have a natural order (months, steps)."
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
guidance: "do",
|
|
26
|
+
description: "Use negativeTone for diverging data (profit and loss), so a loss reads apart from a gain."
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
guidance: "dont",
|
|
30
|
+
description: "Group more than three series side by side \u2014 the bars get too thin to compare; stack them or split the chart."
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
guidance: "dont",
|
|
34
|
+
description: "Use it for data-heavy views \u2014 streaming or real-time data, thousands of points, zoom and brushing, trading charts. Those belong on a charting library (Recharts, visx, ECharts); Sable's charts are for dashboards, landing pages and decks."
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
related: {
|
|
39
|
+
components: [
|
|
40
|
+
"AreaChart",
|
|
41
|
+
"PieChart",
|
|
42
|
+
"SegmentedBar",
|
|
43
|
+
"Card"
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
status: "beta",
|
|
47
|
+
props: [
|
|
48
|
+
{
|
|
49
|
+
name: "data",
|
|
50
|
+
type: "Record<string, unknown>[]",
|
|
51
|
+
description: "The rows, in order along the category axis."
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: "index",
|
|
55
|
+
type: "string",
|
|
56
|
+
description: "The datum field naming each row's category (a month, a day, a channel)."
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: "series",
|
|
60
|
+
type: "{ key: string; label: string; tone?: ChartTone; color?: string; icon?: string }[]",
|
|
61
|
+
description: "The measures to plot: the datum field, its name in the legend/tooltip/table, and its colour (a tone by role, or any CSS colour). Omitted, series take the chart palette in order: --chart-1 \u2026 --chart-8, validated for colour-blind separation in light and dark; a theme may override the set."
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: "label",
|
|
65
|
+
type: "string",
|
|
66
|
+
description: "What the chart shows. Its accessible name and the caption of the data table assistive tech reads."
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: "className",
|
|
70
|
+
type: "string",
|
|
71
|
+
default: '"h-60"',
|
|
72
|
+
description: "Sizes the chart (plot + legend). Set a height: `h-72`, `aspect-video h-auto`."
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: "valueFormatter",
|
|
76
|
+
type: "(value: number) => string",
|
|
77
|
+
description: 'Format values everywhere (axis, labels, tooltip, table) \u2014 units like "$12,480". Default: compact on the axis, full elsewhere.'
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: "indexFormatter",
|
|
81
|
+
type: "(value: string) => string",
|
|
82
|
+
description: 'Shorten category labels on the axis ("January" \u2192 "Jan"); the tooltip keeps the full value.'
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: "locale",
|
|
86
|
+
type: "string",
|
|
87
|
+
default: "runtime locale",
|
|
88
|
+
description: "BCP 47 locale for default number and date formatting."
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
name: "tooltip",
|
|
92
|
+
type: 'boolean | { indicator?: "dot" | "line" | "dashed" | "none"; hideLabel?: boolean; labelFormatter?: (label, datum) => ReactNode; showTotal?: boolean }',
|
|
93
|
+
default: "true",
|
|
94
|
+
description: "Show a tooltip on hover and keyboard focus, or configure it: the row marker, hiding the heading, rewriting it, adding a Total row."
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
name: "legend",
|
|
98
|
+
type: "boolean",
|
|
99
|
+
default: "true when there is more than one series",
|
|
100
|
+
description: "Show the legend under the chart."
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
name: "grid",
|
|
104
|
+
type: "boolean",
|
|
105
|
+
default: "true (false for horizontal bars)",
|
|
106
|
+
description: "Hairline gridlines along the value axis."
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
name: "xAxis",
|
|
110
|
+
type: "boolean",
|
|
111
|
+
default: "true for columns; false for horizontal bars",
|
|
112
|
+
description: "The horizontal axis."
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
name: "yAxis",
|
|
116
|
+
type: "boolean",
|
|
117
|
+
default: "false for columns; true for horizontal bars",
|
|
118
|
+
description: "The vertical axis."
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
name: "animate",
|
|
122
|
+
type: "boolean",
|
|
123
|
+
default: "true",
|
|
124
|
+
description: "Play the arrival once the chart scrolls into view. Reduced motion shows the finished chart."
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
name: "activeIndex",
|
|
128
|
+
type: "number | null",
|
|
129
|
+
description: "The highlighted row (controlled); `null` for none."
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
name: "defaultActiveIndex",
|
|
133
|
+
type: "number | null",
|
|
134
|
+
description: "The row highlighted at first \u2014 a tooltip already open before anyone hovers."
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
name: "onActiveIndexChange",
|
|
138
|
+
type: "(index: number | null) => void",
|
|
139
|
+
description: "Called as the pointer or keyboard moves between rows."
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
name: "orientation",
|
|
143
|
+
type: '"vertical" | "horizontal"',
|
|
144
|
+
default: '"vertical"',
|
|
145
|
+
description: "`vertical` columns rise from the bottom; `horizontal` bars run from the left, for long category names."
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
name: "stacked",
|
|
149
|
+
type: 'boolean | "expand"',
|
|
150
|
+
default: "false",
|
|
151
|
+
description: 'Stack the series in one bar, or `"expand"` to show each category as 100%. Unstacked series sit side by side.'
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
name: "labels",
|
|
155
|
+
type: 'boolean | "inside"',
|
|
156
|
+
default: "false",
|
|
157
|
+
description: 'Print each bar\'s value at its end, or (`"inside"`, horizontal) the category name inside the bar as well.'
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
name: "colorBy",
|
|
161
|
+
type: '"series" | "index"',
|
|
162
|
+
default: '"series"',
|
|
163
|
+
description: "Colour by series, or give each category its own tone (one series)."
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
name: "negativeTone",
|
|
167
|
+
type: '"edition" | "collectible" | "standard" | "info" | "warning" | "primary" | "neutral" | "success" | "destructive"',
|
|
168
|
+
description: "Colour negative values with this tone."
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
name: "radius",
|
|
172
|
+
type: "number",
|
|
173
|
+
default: "4",
|
|
174
|
+
description: "Corner radius of each bar's far end, in px. Stacks round only the outer segment."
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
name: "barWidth",
|
|
178
|
+
type: "number",
|
|
179
|
+
default: "24",
|
|
180
|
+
description: "Maximum thickness of a bar, in px: the band's leftover is air, not a fatter bar. Raise it for a bolder presentation look."
|
|
181
|
+
}
|
|
182
|
+
],
|
|
183
|
+
tokensUsed: [
|
|
184
|
+
"tone-edition",
|
|
185
|
+
"tone-collectible",
|
|
186
|
+
"tone-standard",
|
|
187
|
+
"tone-info",
|
|
188
|
+
"tone-warning",
|
|
189
|
+
"primary",
|
|
190
|
+
"muted-foreground",
|
|
191
|
+
"border",
|
|
192
|
+
"popover",
|
|
193
|
+
"popover-foreground",
|
|
194
|
+
"foreground",
|
|
195
|
+
"background"
|
|
196
|
+
],
|
|
197
|
+
motion: [
|
|
198
|
+
{
|
|
199
|
+
slot: "arrival",
|
|
200
|
+
recipe: "custom",
|
|
201
|
+
part: "Bar",
|
|
202
|
+
why: "Once on screen, bars rise from the baseline in sequence on the emphasized easing (scale from the zero line) and their labels fade in. On the motion tokens; reduced motion shows the finished chart."
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
slot: "response",
|
|
206
|
+
recipe: "none",
|
|
207
|
+
part: "Cursor + tooltip",
|
|
208
|
+
why: "The hovered category gets a band behind it and the other bars dim at once \u2014 a lagging highlight reads as a slow chart."
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
slot: "transition",
|
|
212
|
+
recipe: "custom",
|
|
213
|
+
part: "Bar",
|
|
214
|
+
why: "Geometry eases from the old shape to the new one through a CSS `d` transition on the motion tokens (no recipe animates path geometry); browsers without `d` transitions update in place."
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
slot: "activity",
|
|
218
|
+
recipe: "none",
|
|
219
|
+
part: "BarChart",
|
|
220
|
+
why: "A chart has no indeterminate state; show a Skeleton while the data loads."
|
|
221
|
+
}
|
|
222
|
+
],
|
|
223
|
+
a11y: [
|
|
224
|
+
"The drawing is aria-hidden; the same numbers are in a visually hidden data table (captioned by `label`) that the chart is aria-describedby, so assistive tech reads values, not shapes.",
|
|
225
|
+
'With a tooltip, the chart is one tab stop (role=group, aria-roledescription="chart"): arrow keys, Home and End step through the data, Escape clears, and each step is announced in a polite live region.',
|
|
226
|
+
"Colour is never the only key: series are named in the legend, tooltip and table."
|
|
227
|
+
],
|
|
228
|
+
examples: [
|
|
229
|
+
{
|
|
230
|
+
label: "Grouped series",
|
|
231
|
+
code: '<BarChart\n label="Visitors by device"\n data={visitors}\n index="month"\n series={[\n { key: "desktop", label: "Desktop" },\n { key: "mobile", label: "Mobile" },\n ]}\n indexFormatter={(m) => m.slice(0, 3)}\n/>'
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
label: "Horizontal, labelled inside",
|
|
235
|
+
code: 'const browsers = [\n { browser: "Chrome", visitors: 275 },\n { browser: "Safari", visitors: 200 },\n { browser: "Firefox", visitors: 187 },\n { browser: "Edge", visitors: 173 },\n]\n\n<BarChart\n label="Visitors by browser"\n data={browsers}\n index="browser"\n series={[{ key: "visitors", label: "Visitors" }]}\n orientation="horizontal"\n labels="inside"\n yAxis={false}\n grid={false}\n/>'
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
label: "Profit and loss",
|
|
239
|
+
code: '<BarChart\n label="Net revenue by month"\n data={[\n { month: "Jan", net: 186 },\n { month: "Feb", net: -95 },\n { month: "Mar", net: 137 },\n { month: "Apr", net: -60 },\n ]}\n index="month"\n series={[{ key: "net", label: "Net", tone: "success" }]}\n negativeTone="destructive"\n labels\n/>'
|
|
240
|
+
}
|
|
241
|
+
]
|
|
242
|
+
};
|
|
243
|
+
export {
|
|
244
|
+
barChartMeta
|
|
245
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
// src/components/bottom-nav/bottom-nav.tsx
|
|
2
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
3
|
+
import { cn } from "../../lib/cn.js";
|
|
4
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
function BottomNav({
|
|
6
|
+
className,
|
|
7
|
+
children,
|
|
8
|
+
...props
|
|
9
|
+
}) {
|
|
10
|
+
return /* @__PURE__ */ jsx(
|
|
11
|
+
"nav",
|
|
12
|
+
{
|
|
13
|
+
className: cn(
|
|
14
|
+
"fixed inset-x-0 bottom-0 z-(--z-nav) border-t border-border bg-background/95 pb-[env(safe-area-inset-bottom,0px)] backdrop-blur-sm lg:hidden",
|
|
15
|
+
className
|
|
16
|
+
),
|
|
17
|
+
...props,
|
|
18
|
+
children: /* @__PURE__ */ jsx("div", { className: "flex h-[var(--nav-height,56px)] items-center justify-around px-2", children })
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
BottomNav.displayName = "BottomNav";
|
|
23
|
+
function BottomNavItem({
|
|
24
|
+
icon,
|
|
25
|
+
label,
|
|
26
|
+
active,
|
|
27
|
+
badge,
|
|
28
|
+
showLabel = false,
|
|
29
|
+
render,
|
|
30
|
+
className,
|
|
31
|
+
...props
|
|
32
|
+
}) {
|
|
33
|
+
return useRender({
|
|
34
|
+
render: render ?? /* @__PURE__ */ jsx("button", { type: "button" }),
|
|
35
|
+
props: {
|
|
36
|
+
...props,
|
|
37
|
+
"aria-label": label,
|
|
38
|
+
"data-active": active ? "" : void 0,
|
|
39
|
+
"aria-current": active ? "page" : void 0,
|
|
40
|
+
className: cn(
|
|
41
|
+
// design-lint-disable-next-line raw-control-height -- the WCAG 2.5.5 touch-target floor, deliberately density-independent: a compact register still owes a 44px hit area.
|
|
42
|
+
"relative flex min-h-[44px] min-w-[44px] flex-col items-center justify-center gap-0.5 rounded-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",
|
|
43
|
+
className
|
|
44
|
+
),
|
|
45
|
+
children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
46
|
+
/* @__PURE__ */ jsxs("span", { className: "relative grid size-[1em] place-items-center text-2xl", children: [
|
|
47
|
+
icon,
|
|
48
|
+
badge ? (
|
|
49
|
+
// flex, not block: a block wrapper takes the icon's text-2xl line box and drops an inline dot to its baseline, off the corner.
|
|
50
|
+
/* @__PURE__ */ jsx("span", { className: "absolute -right-1 -top-1 flex", children: badge })
|
|
51
|
+
) : null
|
|
52
|
+
] }),
|
|
53
|
+
showLabel ? /* @__PURE__ */ jsx("span", { className: "text-label-sm", children: label }) : null
|
|
54
|
+
] })
|
|
55
|
+
},
|
|
56
|
+
defaultTagName: "button"
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
BottomNavItem.displayName = "BottomNavItem";
|
|
60
|
+
export {
|
|
61
|
+
BottomNav,
|
|
62
|
+
BottomNavItem
|
|
63
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
// src/components/bottom-nav/bottom-nav.meta.ts
|
|
2
|
+
var bottomNavMeta = {
|
|
3
|
+
name: "BottomNav",
|
|
4
|
+
summary: "Mobile bottom tab bar (fixed, hidden at lg), with home-indicator safe-area padding and evenly distributed BottomNavItem tabs. Items are router-agnostic via `render`.",
|
|
5
|
+
status: "stable",
|
|
6
|
+
keywords: [
|
|
7
|
+
"bottom nav",
|
|
8
|
+
"mobile nav",
|
|
9
|
+
"tabs",
|
|
10
|
+
"app navigation"
|
|
11
|
+
],
|
|
12
|
+
usage: {
|
|
13
|
+
description: "Use BottomNav for a small set of top-level mobile destinations that should remain reachable with one thumb. Mount it through `<AppShell bottomNav={\u2026}>` so the content area reserves matching bottom space; it hides at lg, where the Sidebar takes over.",
|
|
14
|
+
bestPractices: [
|
|
15
|
+
{
|
|
16
|
+
guidance: "do",
|
|
17
|
+
description: "Limit the nav to the primary destinations users switch between often."
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
guidance: "do",
|
|
21
|
+
description: "Give every item a clear label (it is the accessible name), and turn on showLabel when the icons alone are not obvious."
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
guidance: "dont",
|
|
25
|
+
description: "Do not use BottomNav for desktop navigation, dense menus, or page-local actions."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
guidance: "dont",
|
|
29
|
+
description: "Do not omit the safe-area padding by overriding its padding-bottom. On a device with a home indicator the last row of targets ends up under the gesture area, where taps dismiss the app instead."
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
anatomy: [
|
|
33
|
+
{
|
|
34
|
+
name: "BottomNav",
|
|
35
|
+
required: true,
|
|
36
|
+
description: "The fixed or anchored navigation container."
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: "BottomNavItem",
|
|
40
|
+
required: true,
|
|
41
|
+
description: "One destination with label, icon, and active state."
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
related: {
|
|
46
|
+
components: [
|
|
47
|
+
"Sidebar",
|
|
48
|
+
"SideNav",
|
|
49
|
+
"AppHeader"
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
props: [],
|
|
53
|
+
subcomponents: [
|
|
54
|
+
{
|
|
55
|
+
name: "BottomNavItem",
|
|
56
|
+
type: "{ label: string; icon?: ReactNode; active?: boolean; badge?: ReactNode; showLabel?: boolean; render?: useRender.RenderProp } + button props",
|
|
57
|
+
description: 'A single tab, placed as a child of BottomNav. `label` is the accessible name (aria-label) and optional visible label; `icon` is the glyph node (consumer swaps fill weight for the active state); `active` marks the current route (active ink + aria-current); `badge` overlays a corner dot/count on the icon; `showLabel` shows the label text beneath the icon \u2014 defaults to false (icon-only); turn it on when the icons alone are not self-evident; `render` renders as another element, e.g. render={<Link to="/x" />}.'
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
a11y: [
|
|
61
|
+
"BottomNav renders a <nav> landmark.",
|
|
62
|
+
"Each tab is a 44px minimum touch target with an aria-label.",
|
|
63
|
+
'Active tab carries aria-current="page".'
|
|
64
|
+
],
|
|
65
|
+
tokensUsed: ["background", "border", "muted-foreground", "foreground", "ring"],
|
|
66
|
+
examples: [
|
|
67
|
+
{
|
|
68
|
+
label: "Tab bar",
|
|
69
|
+
code: '<BottomNav><BottomNavItem icon={<Icon name="home" />} label="Home" active render={<Link to="/" />} /><BottomNavItem icon={<Icon name="bell" />} label="Notifications" badge={<NotificationBadge dot />} render={<Link to="/notifications" />} /></BottomNav>'
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
label: "When NOT to use it",
|
|
73
|
+
code: `// BottomNav is for 3\u20135 PEER destinations on a small viewport \u2014 the mobile
|
|
74
|
+
// counterpart to SideNav, not an action bar.
|
|
75
|
+
|
|
76
|
+
// \u2717 Actions. A bottom bar of verbs (Save / Share / Delete) is a toolbar; it
|
|
77
|
+
// competes with the OS gesture area and has no "current" state to show.
|
|
78
|
+
// \u2717 More than five items. Past that, labels truncate and targets shrink below
|
|
79
|
+
// the 44px floor \u2014 use a "More" destination that opens a Sheet.
|
|
80
|
+
// \u2717 Nested navigation. BottomNav switches top-level sections only; drilling in
|
|
81
|
+
// happens inside the section, with Breadcrumbs or a back affordance.
|
|
82
|
+
|
|
83
|
+
<AppShell bottomNav={<BottomNav>
|
|
84
|
+
<BottomNavItem label="Home" icon={<Icon name="home" />} active />
|
|
85
|
+
<BottomNavItem label="Search" icon={<Icon name="search" />} />
|
|
86
|
+
<BottomNavItem label="Account" icon={<Icon name="user" />} />
|
|
87
|
+
</BottomNav>}>
|
|
88
|
+
<Region max="feed">Route content</Region>
|
|
89
|
+
</AppShell>`
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
};
|
|
93
|
+
export {
|
|
94
|
+
bottomNavMeta
|
|
95
|
+
};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
// src/components/breadcrumbs/breadcrumbs.tsx
|
|
2
|
+
import { Icon } from "../../icon/index.js";
|
|
3
|
+
import { cn } from "../../lib/cn.js";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
function Breadcrumbs({
|
|
6
|
+
className,
|
|
7
|
+
children,
|
|
8
|
+
ref,
|
|
9
|
+
...props
|
|
10
|
+
}) {
|
|
11
|
+
return /* @__PURE__ */ jsx("nav", { "aria-label": "Breadcrumb", ref, className, ...props, children: /* @__PURE__ */ jsx("ol", { className: "flex flex-wrap items-center gap-1.5 text-body-sm", children }) });
|
|
12
|
+
}
|
|
13
|
+
Breadcrumbs.displayName = "Breadcrumbs";
|
|
14
|
+
function BreadcrumbItem({
|
|
15
|
+
className,
|
|
16
|
+
ref,
|
|
17
|
+
...props
|
|
18
|
+
}) {
|
|
19
|
+
return /* @__PURE__ */ jsx(
|
|
20
|
+
"li",
|
|
21
|
+
{
|
|
22
|
+
ref,
|
|
23
|
+
className: cn("inline-flex items-center gap-1.5", className),
|
|
24
|
+
...props
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
BreadcrumbItem.displayName = "BreadcrumbItem";
|
|
29
|
+
function BreadcrumbLink({
|
|
30
|
+
className,
|
|
31
|
+
ref,
|
|
32
|
+
...props
|
|
33
|
+
}) {
|
|
34
|
+
return /* @__PURE__ */ jsx(
|
|
35
|
+
"a",
|
|
36
|
+
{
|
|
37
|
+
ref,
|
|
38
|
+
className: cn(
|
|
39
|
+
"rounded-sm text-muted-foreground motion-interactive hover:text-foreground focus-visible:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
40
|
+
className
|
|
41
|
+
),
|
|
42
|
+
...props
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
BreadcrumbLink.displayName = "BreadcrumbLink";
|
|
47
|
+
function BreadcrumbPage({
|
|
48
|
+
className,
|
|
49
|
+
ref,
|
|
50
|
+
...props
|
|
51
|
+
}) {
|
|
52
|
+
return /* @__PURE__ */ jsx(
|
|
53
|
+
"span",
|
|
54
|
+
{
|
|
55
|
+
ref,
|
|
56
|
+
"aria-current": "page",
|
|
57
|
+
className: cn("text-foreground", className),
|
|
58
|
+
...props
|
|
59
|
+
}
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
BreadcrumbPage.displayName = "BreadcrumbPage";
|
|
63
|
+
function BreadcrumbSeparator({
|
|
64
|
+
className,
|
|
65
|
+
children,
|
|
66
|
+
ref,
|
|
67
|
+
...props
|
|
68
|
+
}) {
|
|
69
|
+
return /* @__PURE__ */ jsx(
|
|
70
|
+
"li",
|
|
71
|
+
{
|
|
72
|
+
ref,
|
|
73
|
+
"aria-hidden": "true",
|
|
74
|
+
className: cn(
|
|
75
|
+
"inline-flex select-none items-center text-muted-foreground",
|
|
76
|
+
className
|
|
77
|
+
),
|
|
78
|
+
...props,
|
|
79
|
+
children: children ?? /* @__PURE__ */ jsx(Icon, { name: "chevron-right", className: "text-xs" })
|
|
80
|
+
}
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
BreadcrumbSeparator.displayName = "BreadcrumbSeparator";
|
|
84
|
+
export {
|
|
85
|
+
BreadcrumbItem,
|
|
86
|
+
BreadcrumbLink,
|
|
87
|
+
BreadcrumbPage,
|
|
88
|
+
BreadcrumbSeparator,
|
|
89
|
+
Breadcrumbs
|
|
90
|
+
};
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
// src/components/breadcrumbs/breadcrumbs.meta.ts
|
|
2
|
+
var breadcrumbsMeta = {
|
|
3
|
+
name: "Breadcrumbs",
|
|
4
|
+
summary: "Navigation trail showing the path to the current page. A labelled <nav> wraps an inline <ol> of crumbs \u2014 interactive ancestor links, separators, and a non-interactive current page. No Base UI.",
|
|
5
|
+
status: "stable",
|
|
6
|
+
keywords: [
|
|
7
|
+
"breadcrumbs",
|
|
8
|
+
"hierarchy",
|
|
9
|
+
"path",
|
|
10
|
+
"navigation"
|
|
11
|
+
],
|
|
12
|
+
usage: {
|
|
13
|
+
description: "Use Breadcrumbs to show the user's location inside a hierarchy and provide lightweight parent navigation.",
|
|
14
|
+
bestPractices: [
|
|
15
|
+
{
|
|
16
|
+
guidance: "do",
|
|
17
|
+
description: "Use breadcrumbs when users can arrive deep in a nested structure."
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
guidance: "do",
|
|
21
|
+
description: "Keep the current page as text so it reads as location, not another link."
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
guidance: "dont",
|
|
25
|
+
description: "Do not use breadcrumbs as a substitute for primary navigation or step progress."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
guidance: "dont",
|
|
29
|
+
description: "Do not make the last crumb a link. It points at the page you are already on, and screen readers announce it as a destination; render it as the current page with aria-current."
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
anatomy: [
|
|
33
|
+
{
|
|
34
|
+
name: "BreadcrumbItem",
|
|
35
|
+
required: true,
|
|
36
|
+
description: "A single step in the path."
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: "BreadcrumbLink",
|
|
40
|
+
required: false,
|
|
41
|
+
description: "A linked ancestor destination."
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: "BreadcrumbPage",
|
|
45
|
+
required: true,
|
|
46
|
+
description: "The current non-linked page."
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: "BreadcrumbSeparator",
|
|
50
|
+
required: false,
|
|
51
|
+
description: "The visual separator between steps."
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
related: {
|
|
56
|
+
components: [
|
|
57
|
+
"SideNav",
|
|
58
|
+
"PageHeader"
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
props: [
|
|
62
|
+
{
|
|
63
|
+
name: "Breadcrumbs",
|
|
64
|
+
type: "ComponentPropsWithRef<'nav'>",
|
|
65
|
+
default: "\u2014",
|
|
66
|
+
description: 'The trail root. Renders <nav aria-label="Breadcrumb"> around a flex <ol>. Pass the crumb parts as children.'
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
subcomponents: [
|
|
70
|
+
{
|
|
71
|
+
name: "BreadcrumbItem",
|
|
72
|
+
type: "ComponentPropsWithRef<'li'>",
|
|
73
|
+
description: "A single crumb slot (<li>) holding a link or the current page."
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: "BreadcrumbLink",
|
|
77
|
+
type: "ComponentPropsWithRef<'a'>",
|
|
78
|
+
description: "An interactive ancestor crumb (<a>). Muted by default, brightens to foreground on hover/focus."
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: "BreadcrumbPage",
|
|
82
|
+
type: "ComponentPropsWithRef<'span'>",
|
|
83
|
+
description: 'The current-page crumb (<span aria-current="page">). Non-interactive, full-contrast.'
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
name: "BreadcrumbSeparator",
|
|
87
|
+
type: "ComponentPropsWithRef<'li'> + { children? }",
|
|
88
|
+
description: "Decorative divider (<li aria-hidden>) between crumbs. Defaults to a chevron-right icon; pass children to swap the glyph."
|
|
89
|
+
}
|
|
90
|
+
],
|
|
91
|
+
tokensUsed: ["muted-foreground", "foreground"],
|
|
92
|
+
a11y: [
|
|
93
|
+
'The <nav> carries aria-label="Breadcrumb" so assistive tech announces the landmark.',
|
|
94
|
+
"Crumbs sit in an ordered list (<ol>) to convey hierarchy and position.",
|
|
95
|
+
'The current page uses aria-current="page" and is rendered as plain text, not a link.',
|
|
96
|
+
"Separators are aria-hidden so the chevron glyph is not announced."
|
|
97
|
+
],
|
|
98
|
+
examples: [
|
|
99
|
+
{
|
|
100
|
+
label: "Three-level trail",
|
|
101
|
+
code: '<Breadcrumbs><BreadcrumbItem><BreadcrumbLink href="/">Home</BreadcrumbLink></BreadcrumbItem><BreadcrumbSeparator /><BreadcrumbItem><BreadcrumbLink href="/library">Library</BreadcrumbLink></BreadcrumbItem><BreadcrumbSeparator /><BreadcrumbItem><BreadcrumbPage>Editions</BreadcrumbPage></BreadcrumbItem></Breadcrumbs>'
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
label: "Custom separator",
|
|
105
|
+
code: '<Breadcrumbs><BreadcrumbItem><BreadcrumbLink href="/">Home</BreadcrumbLink></BreadcrumbItem><BreadcrumbSeparator>/</BreadcrumbSeparator><BreadcrumbItem><BreadcrumbPage>Settings</BreadcrumbPage></BreadcrumbItem></Breadcrumbs>'
|
|
106
|
+
}
|
|
107
|
+
]
|
|
108
|
+
};
|
|
109
|
+
export {
|
|
110
|
+
breadcrumbsMeta
|
|
111
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// src/components/breadcrumbs/index.ts
|
|
2
|
+
import {
|
|
3
|
+
Breadcrumbs,
|
|
4
|
+
BreadcrumbItem,
|
|
5
|
+
BreadcrumbLink,
|
|
6
|
+
BreadcrumbPage,
|
|
7
|
+
BreadcrumbSeparator
|
|
8
|
+
} from "./breadcrumbs.js";
|
|
9
|
+
import { breadcrumbsMeta } from "./breadcrumbs.meta.js";
|
|
10
|
+
export {
|
|
11
|
+
BreadcrumbItem,
|
|
12
|
+
BreadcrumbLink,
|
|
13
|
+
BreadcrumbPage,
|
|
14
|
+
BreadcrumbSeparator,
|
|
15
|
+
Breadcrumbs,
|
|
16
|
+
breadcrumbsMeta
|
|
17
|
+
};
|