@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,227 @@
|
|
|
1
|
+
// src/components/meter/meter.meta.ts
|
|
2
|
+
var meterMeta = {
|
|
3
|
+
name: "Meter",
|
|
4
|
+
summary: "A role=meter reading over Base UI Meter, drawn as a bar or a ring \u2014 how full something is within a known range (storage, quota, strength), with a tone for good/caution/bad. Not task progress.",
|
|
5
|
+
status: "stable",
|
|
6
|
+
keywords: [
|
|
7
|
+
"meter",
|
|
8
|
+
"usage bar",
|
|
9
|
+
"storage",
|
|
10
|
+
"quota",
|
|
11
|
+
"capacity",
|
|
12
|
+
"limit",
|
|
13
|
+
"password strength",
|
|
14
|
+
"level"
|
|
15
|
+
],
|
|
16
|
+
usage: {
|
|
17
|
+
description: "Use Meter to show a static measurement against a known maximum \u2014 storage used, seats taken, API quota, password strength. It is announced as a meter, not a progress bar, so a screen-reader user hears a level rather than a task underway.",
|
|
18
|
+
bestPractices: [
|
|
19
|
+
{
|
|
20
|
+
guidance: "do",
|
|
21
|
+
description: 'Label it and show the reading in units people use ("7.2 of 10 GB"), with MeterLabel and MeterValue. The bar shows proportion; the number is what gets acted on.'
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
guidance: "do",
|
|
25
|
+
description: "Pick `tone` from thresholds you own and apply them consistently across the page \u2014 warning near the limit, destructive at or over it. The component does not guess where good becomes bad."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
guidance: "dont",
|
|
29
|
+
description: "Do not use Meter for a task in flight \u2014 an upload, an install, a step count. That is Progress; Meter tells assistive tech nothing is happening."
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
guidance: "dont",
|
|
33
|
+
description: "Do not use it for a value without a meaningful maximum (followers, total spend). A bar implies a full scale; an unbounded count is a stat."
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
guidance: "do",
|
|
37
|
+
description: 'Use shape="ring" when the reading is a score that belongs in a small, glanceable spot on a card. It is the same measurement drawn as a circular gauge, not a different component.'
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
anatomy: [
|
|
41
|
+
{
|
|
42
|
+
name: "MeterTrack",
|
|
43
|
+
required: true,
|
|
44
|
+
description: "The rail that represents the full range."
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: "MeterIndicator",
|
|
48
|
+
required: true,
|
|
49
|
+
description: "The fill, sized from value and coloured by tone."
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: "MeterLabel",
|
|
53
|
+
required: false,
|
|
54
|
+
description: "The visible name; also names the meter for assistive tech."
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: "MeterValue",
|
|
58
|
+
required: false,
|
|
59
|
+
description: "The formatted reading."
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
related: {
|
|
64
|
+
components: ["Progress", "Badge"]
|
|
65
|
+
},
|
|
66
|
+
props: [
|
|
67
|
+
{
|
|
68
|
+
name: "value",
|
|
69
|
+
type: "number",
|
|
70
|
+
description: "The current reading, between min and max. Required."
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: "min",
|
|
74
|
+
type: "number",
|
|
75
|
+
default: "0",
|
|
76
|
+
description: "The bottom of the range."
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: "max",
|
|
80
|
+
type: "number",
|
|
81
|
+
default: "100",
|
|
82
|
+
description: "The top of the range."
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: "tone",
|
|
86
|
+
type: '"primary" | "standard" | "success" | "warning" | "destructive"',
|
|
87
|
+
default: '"primary"',
|
|
88
|
+
description: "Fill colour, mapped to a semantic token. Choose it from your own thresholds."
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
name: "shape",
|
|
92
|
+
type: '"bar" | "ring"',
|
|
93
|
+
default: '"bar"',
|
|
94
|
+
description: "bar is a horizontal track; ring is a circular gauge for a small, glanceable reading \u2014 the same value, min, max and tones."
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
name: "size",
|
|
98
|
+
type: '"sm" | "md" | "lg"',
|
|
99
|
+
default: '"md"',
|
|
100
|
+
description: "Ring diameter (40 / 64 / 96px at the default spacing; the centre value steps with it), or bar thickness on the same sm / md / lg rails as Progress."
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
name: "showValue",
|
|
104
|
+
type: "boolean",
|
|
105
|
+
description: "Print the value in the ring's centre (formatted like MeterValue)."
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
name: "strokeWidth",
|
|
109
|
+
type: "number",
|
|
110
|
+
default: "6",
|
|
111
|
+
description: "Ring stroke width, in viewBox units of 100."
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
name: "format",
|
|
115
|
+
type: "Intl.NumberFormatOptions",
|
|
116
|
+
description: "Formatting for MeterValue and aria-valuetext (percent, unit, currency)."
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
name: "getAriaValueText",
|
|
120
|
+
type: "(formatted: string, value: number) => string",
|
|
121
|
+
description: 'Human-readable reading for assistive tech ("7.2 of 10 gigabytes used").'
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
name: "locale",
|
|
125
|
+
type: "Intl.LocalesArgument",
|
|
126
|
+
description: "Locale for formatting. Defaults to the runtime locale."
|
|
127
|
+
}
|
|
128
|
+
],
|
|
129
|
+
subcomponents: [
|
|
130
|
+
{
|
|
131
|
+
name: "MeterTrack",
|
|
132
|
+
type: "Base UI Track props + className + size",
|
|
133
|
+
description: "The rail. Rendered automatically when Meter has no children; renders a MeterIndicator by default."
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
name: "MeterIndicator",
|
|
137
|
+
type: "Base UI Indicator props + className + tone",
|
|
138
|
+
description: "The fill. Inherits the Meter's tone unless given its own."
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
name: "MeterLabel",
|
|
142
|
+
type: "Base UI Label props + className",
|
|
143
|
+
description: "Visible label; wires aria-labelledby on the root."
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
name: "MeterValue",
|
|
147
|
+
type: "Base UI Value props + className",
|
|
148
|
+
description: "Formatted reading. Accepts a `(formatted, value) => ReactNode` child."
|
|
149
|
+
}
|
|
150
|
+
],
|
|
151
|
+
variants: {
|
|
152
|
+
tone: ["primary", "standard", "success", "warning", "destructive"],
|
|
153
|
+
shape: ["bar", "ring"],
|
|
154
|
+
size: ["sm", "md", "lg"]
|
|
155
|
+
},
|
|
156
|
+
tokensUsed: [
|
|
157
|
+
"secondary",
|
|
158
|
+
"primary",
|
|
159
|
+
"success",
|
|
160
|
+
"tone-warning",
|
|
161
|
+
"destructive",
|
|
162
|
+
"foreground",
|
|
163
|
+
"muted-foreground"
|
|
164
|
+
],
|
|
165
|
+
motion: [
|
|
166
|
+
{
|
|
167
|
+
slot: "arrival",
|
|
168
|
+
recipe: "none",
|
|
169
|
+
part: "Meter",
|
|
170
|
+
why: "A meter is a reading, present with the page that reports it. Animating the fill up from zero on load would act out a change that did not happen."
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
slot: "response",
|
|
174
|
+
recipe: "none",
|
|
175
|
+
part: "Meter",
|
|
176
|
+
why: "It reports and accepts no input. A bar that reacted to the pointer would read as a Slider the user could drag."
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
slot: "transition",
|
|
180
|
+
recipe: "custom",
|
|
181
|
+
part: "MeterIndicator",
|
|
182
|
+
why: "Width and colour ease on the motion tokens (no recipe animates width) when the reading changes \u2014 freeing space after a delete visibly shrinks the bar, so the user sees the cause and effect rather than a different bar."
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
slot: "activity",
|
|
186
|
+
recipe: "none",
|
|
187
|
+
part: "Meter",
|
|
188
|
+
why: "A meter has no indeterminate state; a reading is either known or not shown. Unknown-but-working is Progress with no value."
|
|
189
|
+
}
|
|
190
|
+
],
|
|
191
|
+
a11y: [
|
|
192
|
+
"Base UI renders role=meter with aria-valuenow, aria-valuemin, aria-valuemax and aria-valuetext \u2014 distinct from Progress's role=progressbar.",
|
|
193
|
+
"Name it with MeterLabel or aria-label; an unnamed meter is announced as a bare number.",
|
|
194
|
+
'Tone is colour only. Say the state in text too ("Almost full") when it matters, and use getAriaValueText to give units.'
|
|
195
|
+
],
|
|
196
|
+
examples: [
|
|
197
|
+
{
|
|
198
|
+
label: "Ring",
|
|
199
|
+
code: '<Meter shape="ring" value={72} showValue aria-label="Storage used" />'
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
label: "Bare",
|
|
203
|
+
code: '<Meter value={64} aria-label="Storage used" />'
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
label: "Storage with label and reading",
|
|
207
|
+
code: `<Meter value={7.2} max={10} tone="warning" getAriaValueText={(_, v) => \`\${v} of 10 gigabytes used\`}>
|
|
208
|
+
<div className="mb-2 flex flex-wrap items-center justify-between gap-x-3 gap-y-1">
|
|
209
|
+
<MeterLabel>Storage</MeterLabel>
|
|
210
|
+
<MeterValue>{(_, value) => \`\${value} of 10 GB\`}</MeterValue>
|
|
211
|
+
</div>
|
|
212
|
+
<MeterTrack />
|
|
213
|
+
</Meter>`
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
label: "Tones",
|
|
217
|
+
code: `<div className="flex flex-col gap-3">
|
|
218
|
+
<Meter value={30} tone="success" aria-label="Seats used" />
|
|
219
|
+
<Meter value={82} tone="warning" aria-label="API quota used" />
|
|
220
|
+
<Meter value={100} tone="destructive" aria-label="Storage used" />
|
|
221
|
+
</div>`
|
|
222
|
+
}
|
|
223
|
+
]
|
|
224
|
+
};
|
|
225
|
+
export {
|
|
226
|
+
meterMeta
|
|
227
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// src/components/meter/meter.variants.ts
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
var meterIndicatorVariants = cva(
|
|
4
|
+
"h-full rounded-full transition-[width,background-color] duration-(--motion-duration-slow) ease-decelerate",
|
|
5
|
+
{
|
|
6
|
+
variants: {
|
|
7
|
+
tone: {
|
|
8
|
+
primary: "bg-primary",
|
|
9
|
+
standard: "bg-tone-standard",
|
|
10
|
+
success: "bg-success",
|
|
11
|
+
warning: "bg-tone-warning",
|
|
12
|
+
destructive: "bg-destructive"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: {
|
|
16
|
+
tone: "primary"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
var meterTrackVariants = cva("relative w-full overflow-hidden rounded-full bg-secondary", {
|
|
21
|
+
variants: {
|
|
22
|
+
size: {
|
|
23
|
+
sm: "h-1.5",
|
|
24
|
+
md: "h-2",
|
|
25
|
+
lg: "h-3"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
defaultVariants: {
|
|
29
|
+
size: "md"
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
var meterRingValueVariants = cva("absolute inset-0 flex items-center justify-center text-foreground", {
|
|
33
|
+
variants: {
|
|
34
|
+
size: {
|
|
35
|
+
sm: "text-label-xs",
|
|
36
|
+
md: "text-label-md",
|
|
37
|
+
lg: "text-title-sm"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
defaultVariants: {
|
|
41
|
+
size: "md"
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
var meterRingVariants = cva("relative inline-flex shrink-0", {
|
|
45
|
+
variants: {
|
|
46
|
+
size: {
|
|
47
|
+
sm: "size-10",
|
|
48
|
+
md: "size-16",
|
|
49
|
+
lg: "size-24"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
defaultVariants: {
|
|
53
|
+
size: "md"
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
export {
|
|
57
|
+
meterIndicatorVariants,
|
|
58
|
+
meterRingValueVariants,
|
|
59
|
+
meterRingVariants,
|
|
60
|
+
meterTrackVariants
|
|
61
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
// src/components/middle-truncate/middle-truncate.tsx
|
|
2
|
+
import { cn } from "../../lib/cn.js";
|
|
3
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
function MiddleTruncate({
|
|
5
|
+
text,
|
|
6
|
+
startChars = 6,
|
|
7
|
+
endChars = 6,
|
|
8
|
+
className,
|
|
9
|
+
...props
|
|
10
|
+
}) {
|
|
11
|
+
const fits = text.length <= startChars + endChars + 1;
|
|
12
|
+
return /* @__PURE__ */ jsx(
|
|
13
|
+
"span",
|
|
14
|
+
{
|
|
15
|
+
title: fits ? void 0 : text,
|
|
16
|
+
className: cn("text-mono-sm tabular-nums", className),
|
|
17
|
+
...props,
|
|
18
|
+
children: fits ? text : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
19
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: `${text.slice(0, startChars)}\u2026${text.slice(-endChars)}` }),
|
|
20
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: text })
|
|
21
|
+
] })
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
MiddleTruncate.displayName = "MiddleTruncate";
|
|
26
|
+
export {
|
|
27
|
+
MiddleTruncate
|
|
28
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
// src/components/middle-truncate/middle-truncate.meta.ts
|
|
2
|
+
var middleTruncateMeta = {
|
|
3
|
+
name: "MiddleTruncate",
|
|
4
|
+
summary: "Middle-truncates a long string (hash, address, signature) to `5J7s\u20268xQp`, keeping the start and end legible while preserving the full value on hover.",
|
|
5
|
+
status: "stable",
|
|
6
|
+
keywords: [
|
|
7
|
+
"truncate",
|
|
8
|
+
"middle truncate",
|
|
9
|
+
"hash",
|
|
10
|
+
"identifier"
|
|
11
|
+
],
|
|
12
|
+
usage: {
|
|
13
|
+
description: "Use MiddleTruncate when both the beginning and end of a long identifier must remain visible.",
|
|
14
|
+
bestPractices: [
|
|
15
|
+
{
|
|
16
|
+
guidance: "do",
|
|
17
|
+
description: "Use it for hashes, addresses, long filenames, URLs, or generated IDs."
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
guidance: "do",
|
|
21
|
+
description: "Provide the full value through title text, copy action, or surrounding detail when needed."
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
guidance: "dont",
|
|
25
|
+
description: "Do not use MiddleTruncate for human prose where the middle words carry meaning."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
guidance: "dont",
|
|
29
|
+
description: "Do not middle-truncate a value with no way to obtain it in full. Truncation removes characters from the page, so the value needs a copy affordance beside it: an icon Button with useCopy, as in the Copyable value example."
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
related: {
|
|
34
|
+
components: ["Code", "Button"]
|
|
35
|
+
},
|
|
36
|
+
props: [
|
|
37
|
+
{
|
|
38
|
+
name: "text",
|
|
39
|
+
type: "string",
|
|
40
|
+
description: "The full string to render. When it is truncated, the full value is also set as the title attribute (a pointer tooltip)."
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: "startChars",
|
|
44
|
+
type: "number",
|
|
45
|
+
default: "6",
|
|
46
|
+
description: "How many leading characters to keep before the ellipsis."
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: "endChars",
|
|
50
|
+
type: "number",
|
|
51
|
+
default: "6",
|
|
52
|
+
description: "How many trailing characters to keep after the ellipsis."
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
tokensUsed: [],
|
|
56
|
+
a11y: [
|
|
57
|
+
"When truncated, the visible abbreviation is aria-hidden and a visually hidden copy carries the full value, so screen readers announce the whole string. The title attribute holds it too, for a pointer tooltip only.",
|
|
58
|
+
"Renders the string verbatim when it is too short to benefit from truncation, so no value is hidden needlessly."
|
|
59
|
+
],
|
|
60
|
+
examples: [
|
|
61
|
+
{
|
|
62
|
+
label: "Solana address",
|
|
63
|
+
code: '<MiddleTruncate text="5J7sX2QpHt9vK4mNbR8wYcZ3dF6gH1jL0pA8xQpVnTu" />'
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
label: "Custom start/end counts",
|
|
67
|
+
code: '<MiddleTruncate text="0xAbC1234567890dEf1234567890aBcDeF12345678" startChars={4} endChars={4} />'
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
label: "Copyable value",
|
|
71
|
+
code: 'const { copy, copied } = useCopy(address)\n<Row gap={1}><MiddleTruncate text={address} /><Button variant="ghost" size="icon-xs" aria-label="Copy address" onClick={copy}><Icon name={copied ? "check" : "copy"} /></Button></Row>'
|
|
72
|
+
}
|
|
73
|
+
]
|
|
74
|
+
};
|
|
75
|
+
export {
|
|
76
|
+
middleTruncateMeta
|
|
77
|
+
};
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
// src/components/note/note.tsx
|
|
2
|
+
import { Icon } from "../../icon/index.js";
|
|
3
|
+
import { cn } from "../../lib/cn.js";
|
|
4
|
+
import { STATUS_TONE_ICON } from "../../lib/status-tone.js";
|
|
5
|
+
import { noteVariants } from "./note.variants.js";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
var toneAction = {
|
|
8
|
+
info: "text-tone-info",
|
|
9
|
+
warning: "text-tone-warning",
|
|
10
|
+
success: "text-success",
|
|
11
|
+
destructive: "text-destructive",
|
|
12
|
+
neutral: "text-foreground"
|
|
13
|
+
};
|
|
14
|
+
function Note({
|
|
15
|
+
tone = "info",
|
|
16
|
+
title,
|
|
17
|
+
icon,
|
|
18
|
+
action,
|
|
19
|
+
className,
|
|
20
|
+
children,
|
|
21
|
+
...props
|
|
22
|
+
}) {
|
|
23
|
+
const resolved = tone ?? "info";
|
|
24
|
+
const { name, className: iconClassName } = STATUS_TONE_ICON[resolved];
|
|
25
|
+
const glyph = icon === void 0 ? /* @__PURE__ */ jsx(Icon, { name, className: cn("text-base", iconClassName) }) : icon === null ? null : typeof icon === "string" ? /* @__PURE__ */ jsx(Icon, { name: icon, className: cn("text-base", iconClassName) }) : icon;
|
|
26
|
+
const leadingIcon = glyph ? /* @__PURE__ */ jsx(
|
|
27
|
+
"span",
|
|
28
|
+
{
|
|
29
|
+
"data-slot": "note-icon",
|
|
30
|
+
className: cn("flex h-[1lh] shrink-0 items-center", title ? "text-title-sm" : "text-body-sm"),
|
|
31
|
+
children: glyph
|
|
32
|
+
}
|
|
33
|
+
) : null;
|
|
34
|
+
return /* @__PURE__ */ jsxs(
|
|
35
|
+
"div",
|
|
36
|
+
{
|
|
37
|
+
role: "note",
|
|
38
|
+
className: cn(noteVariants({ tone: resolved }), className),
|
|
39
|
+
...props,
|
|
40
|
+
children: [
|
|
41
|
+
leadingIcon,
|
|
42
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
43
|
+
title ? /* @__PURE__ */ jsx("p", { className: "text-title-sm", children: title }) : null,
|
|
44
|
+
/* @__PURE__ */ jsx("div", { className: cn(title && "mt-1"), children }),
|
|
45
|
+
action ? /* @__PURE__ */ jsx(NoteActionControl, { action, tone: resolved }) : null
|
|
46
|
+
] })
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
Note.displayName = "Note";
|
|
52
|
+
function NoteActionControl({
|
|
53
|
+
action,
|
|
54
|
+
tone
|
|
55
|
+
}) {
|
|
56
|
+
const className = cn(
|
|
57
|
+
"mt-2 inline-flex items-center gap-0.5 rounded-sm text-label-sm",
|
|
58
|
+
toneAction[tone],
|
|
59
|
+
"underline underline-offset-4 decoration-1 hover:decoration-2",
|
|
60
|
+
"motion-interactive motion-press",
|
|
61
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
62
|
+
);
|
|
63
|
+
if (action.href) {
|
|
64
|
+
return /* @__PURE__ */ jsxs("a", { href: action.href, className, children: [
|
|
65
|
+
action.label,
|
|
66
|
+
/* @__PURE__ */ jsx(Icon, { name: "chevron-right", className: "text-sm" })
|
|
67
|
+
] });
|
|
68
|
+
}
|
|
69
|
+
return /* @__PURE__ */ jsx("button", { type: "button", onClick: action.onClick, className, children: action.label });
|
|
70
|
+
}
|
|
71
|
+
export {
|
|
72
|
+
Note
|
|
73
|
+
};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
// src/components/note/note.meta.ts
|
|
2
|
+
var noteMeta = {
|
|
3
|
+
name: "Note",
|
|
4
|
+
summary: "Callout / admonition box. Its tone follows the shared status-tone vocabulary (neutral/info/success/warning/destructive), pairing a soft tone fill with a matching leading icon. Optional title.",
|
|
5
|
+
status: "stable",
|
|
6
|
+
keywords: [
|
|
7
|
+
"note",
|
|
8
|
+
"callout",
|
|
9
|
+
"admonition",
|
|
10
|
+
"warning",
|
|
11
|
+
"caveat",
|
|
12
|
+
"hint",
|
|
13
|
+
"context"
|
|
14
|
+
],
|
|
15
|
+
usage: {
|
|
16
|
+
description: "Use Note for helpful supporting information that should sit near the relevant content \u2014 including a caveat or warning attached to a form, a dialog, or a section. It is the in-context callout; Banner is the page-level strip.",
|
|
17
|
+
bestPractices: [
|
|
18
|
+
{
|
|
19
|
+
guidance: "do",
|
|
20
|
+
description: "Use it for tips, caveats, or secondary context that improves understanding."
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
guidance: "do",
|
|
24
|
+
description: "Reach for Note rather than Banner when the message qualifies something on the page \u2014 a warning inside a dialog, a caveat above a submit button. Banner is a full-width announcement strip for page- or app-level state; inside a form it reads as a slab, and its soft fill carries no border or tone-colored icon, so the severity stops being visible."
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
guidance: "do",
|
|
28
|
+
description: "Keep tone calm and concise so the note does not compete with primary content."
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
guidance: "do",
|
|
32
|
+
description: "When the reader can resolve the state, pass `action` rather than putting a Button in children. The prop is data \u2014 label plus handler \u2014 so the callout owns the placement and weight; a Button dropped into children inherits neither, floats in the box's padding, and (in `secondary`) punches a near-background hole in the tone fill."
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
guidance: "dont",
|
|
36
|
+
description: "Do not use Note for state the whole page or app is in (an outage, an offline session, a blocked account) \u2014 that is Banner \u2014 or for a message tied to one field, which is the field's own error text."
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
guidance: "dont",
|
|
40
|
+
description: "Do not give a Note two actions. One remedy reads as the sentence's next move; two make it a decision point, which is a Dialog's job."
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
guidance: "dont",
|
|
44
|
+
description: "Do not stack several in a row. Three notes together are a wall of asides; if everything is called out, nothing is."
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
related: {
|
|
49
|
+
components: ["Banner", "InlineStatus", "EmptyState"]
|
|
50
|
+
},
|
|
51
|
+
props: [
|
|
52
|
+
{
|
|
53
|
+
name: "action",
|
|
54
|
+
type: "{ label: string; onClick?: () => void; href?: string }",
|
|
55
|
+
description: "A single remedy, rendered below the body and aligned to the text column. Deliberately data, not a slot: Note owns the placement, weight, ink and motion, so the action cannot be styled into a button that outweighs the sentence explaining it. Use onClick for an in-place action (renders a button, no glyph) or href for a link (renders an anchor with a trailing chevron) \u2014 the chevron means navigate, so it appears only when the action genuinely goes somewhere."
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: "tone",
|
|
59
|
+
type: '"neutral" | "info" | "success" | "warning" | "destructive"',
|
|
60
|
+
default: '"info"',
|
|
61
|
+
description: "Severity tone \u2014 drives the border, fill, and leading icon color/name. The shared status-tone vocabulary (STATUS_TONES)."
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: "title",
|
|
65
|
+
type: "string",
|
|
66
|
+
description: "Optional bold lead-in rendered above the body (text-title-sm)."
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: "icon",
|
|
70
|
+
type: "string | ReactNode | null",
|
|
71
|
+
description: "Override the variant glyph: a string swaps the icon name (keeping the tone color), a ReactNode replaces it, null removes it; omit for the variant default."
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
variants: {
|
|
75
|
+
tone: ["neutral", "info", "success", "warning", "destructive"]
|
|
76
|
+
},
|
|
77
|
+
tokensUsed: [
|
|
78
|
+
"foreground",
|
|
79
|
+
"border",
|
|
80
|
+
"muted",
|
|
81
|
+
"muted-foreground",
|
|
82
|
+
"tone-info",
|
|
83
|
+
"tone-warning",
|
|
84
|
+
"success",
|
|
85
|
+
"destructive"
|
|
86
|
+
],
|
|
87
|
+
a11y: [
|
|
88
|
+
'Rendered with role="note" so assistive tech can announce it as an aside.',
|
|
89
|
+
"Color is never the sole signal \u2014 the leading icon and optional title reinforce severity."
|
|
90
|
+
],
|
|
91
|
+
examples: [
|
|
92
|
+
{
|
|
93
|
+
label: "Info",
|
|
94
|
+
code: '<Note tone="info">Editions mint on Solana mainnet.</Note>'
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
label: "With title",
|
|
98
|
+
code: '<Note tone="warning" title="Low balance">Top up SOL before minting.</Note>'
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
label: "Warning with a remedy, inside a dialog",
|
|
102
|
+
code: '<Note tone="warning" action={{ label: "Unload chat model", onClick: unloadChatModel }}>gemma-4 is holding VRAM \u2014 generating now may be slow or fail.</Note>'
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
label: "Custom icon",
|
|
106
|
+
code: '<Note tone="neutral" icon="lock">Pricing and supply cannot be changed after an edition is purchased.</Note>'
|
|
107
|
+
}
|
|
108
|
+
]
|
|
109
|
+
};
|
|
110
|
+
export {
|
|
111
|
+
noteMeta
|
|
112
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// src/components/note/note.variants.ts
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
var noteVariants = cva(
|
|
4
|
+
"flex gap-3 rounded-md border p-4 text-body-sm text-foreground",
|
|
5
|
+
{
|
|
6
|
+
variants: {
|
|
7
|
+
tone: {
|
|
8
|
+
info: "border-tone-info/30 bg-tone-info/10",
|
|
9
|
+
warning: "border-tone-warning/30 bg-tone-warning/10",
|
|
10
|
+
success: "border-success/30 bg-success/10",
|
|
11
|
+
destructive: "border-destructive/30 bg-destructive/10",
|
|
12
|
+
neutral: "border-border bg-muted/40"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: {
|
|
16
|
+
tone: "info"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
export {
|
|
21
|
+
noteVariants
|
|
22
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// src/components/notification-badge/index.ts
|
|
2
|
+
import {
|
|
3
|
+
NotificationBadge
|
|
4
|
+
} from "./notification-badge.js";
|
|
5
|
+
import {
|
|
6
|
+
notificationCountVariants,
|
|
7
|
+
notificationDotVariants
|
|
8
|
+
} from "./notification-badge.variants.js";
|
|
9
|
+
import { notificationBadgeMeta } from "./notification-badge.meta.js";
|
|
10
|
+
export {
|
|
11
|
+
NotificationBadge,
|
|
12
|
+
notificationBadgeMeta,
|
|
13
|
+
notificationCountVariants,
|
|
14
|
+
notificationDotVariants
|
|
15
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// src/components/notification-badge/notification-badge.tsx
|
|
2
|
+
import { cn } from "../../lib/cn.js";
|
|
3
|
+
import { trimLabel } from "../../lib/trim-label.js";
|
|
4
|
+
import {
|
|
5
|
+
notificationCountVariants,
|
|
6
|
+
notificationDotVariants
|
|
7
|
+
} from "./notification-badge.variants.js";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
function NotificationBadge({
|
|
10
|
+
dot,
|
|
11
|
+
count,
|
|
12
|
+
max = 99,
|
|
13
|
+
tone,
|
|
14
|
+
size,
|
|
15
|
+
overlay = false,
|
|
16
|
+
className,
|
|
17
|
+
...props
|
|
18
|
+
}) {
|
|
19
|
+
if (dot) {
|
|
20
|
+
return /* @__PURE__ */ jsx(
|
|
21
|
+
"span",
|
|
22
|
+
{
|
|
23
|
+
"data-slot": "notification-badge",
|
|
24
|
+
"aria-hidden": true,
|
|
25
|
+
className: cn(notificationDotVariants({ tone, size, overlay }), className),
|
|
26
|
+
...props
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
if (count === void 0 || count <= 0) {
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
const label = count > max ? `${max}+` : String(count);
|
|
34
|
+
return /* @__PURE__ */ jsx(
|
|
35
|
+
"span",
|
|
36
|
+
{
|
|
37
|
+
"data-slot": "notification-badge",
|
|
38
|
+
"aria-hidden": true,
|
|
39
|
+
className: cn(notificationCountVariants({ tone, size, overlay }), className),
|
|
40
|
+
...props,
|
|
41
|
+
children: trimLabel(label)
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
NotificationBadge.displayName = "NotificationBadge";
|
|
46
|
+
export {
|
|
47
|
+
NotificationBadge
|
|
48
|
+
};
|