@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,302 @@
|
|
|
1
|
+
// src/components/button/button.meta.ts
|
|
2
|
+
var buttonMeta = {
|
|
3
|
+
name: "Button",
|
|
4
|
+
summary: "Pill-shaped action primitive (theme-driven radius via --button-radius, defaults to full). Neutral tiers (primary/secondary/ghost/outline), plus destructive and link, and three on-color tiers (on-color/on-color-outline/on-color-ghost) that paint with the surrounding ink so a button reads on any tone or brand fill. Optional loading state shows a spinner and disables the button.",
|
|
5
|
+
keywords: [
|
|
6
|
+
"button",
|
|
7
|
+
"action",
|
|
8
|
+
"cta",
|
|
9
|
+
"submit",
|
|
10
|
+
"save",
|
|
11
|
+
"cancel",
|
|
12
|
+
"destructive",
|
|
13
|
+
"loading",
|
|
14
|
+
"link",
|
|
15
|
+
"icon button",
|
|
16
|
+
"on color",
|
|
17
|
+
"inverse",
|
|
18
|
+
"band",
|
|
19
|
+
"brand fill",
|
|
20
|
+
"tone fill",
|
|
21
|
+
"bleed",
|
|
22
|
+
"optical alignment",
|
|
23
|
+
"align label to edge",
|
|
24
|
+
"negative margin",
|
|
25
|
+
"view all"
|
|
26
|
+
],
|
|
27
|
+
usage: {
|
|
28
|
+
description: "Use Button when the user commits an action, submits a form, opens UI, or confirms a decision. Use the visual tier to communicate priority: one primary action per local decision area, then secondary, ghost, outline, or link for lower-emphasis choices.",
|
|
29
|
+
bestPractices: [
|
|
30
|
+
{
|
|
31
|
+
guidance: "do",
|
|
32
|
+
description: "Use a single primary button in a view or dense panel so the action hierarchy stays obvious."
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
guidance: "do",
|
|
36
|
+
description: 'Write labels as actions, such as "Save changes" or "Delete draft", instead of vague labels like "OK".'
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
guidance: "do",
|
|
40
|
+
description: "Use loading with loadingLabel for async work so the action cannot double-fire and the state is announced."
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
guidance: "do",
|
|
44
|
+
description: "Put icons in iconStart / iconEnd rather than as children, so the button applies its optical padding. Start icons say what the action is (plus, share); end icons say where it goes (chevron-right, external)."
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
guidance: "do",
|
|
48
|
+
description: `Set bleed on a ghost or link button that sits at the start or end of a row, so its LABEL lines up with the content edge the row shares ("View all" over a grid, "Add task" under a list, "Resend code" at a card footer's end). The box moves out by exactly its own padding; the hit area and hover fill stay full size and run past the edge. SectionHeader, PageHeader (back and actions) and CardAction already do this for their outermost ghost/link child \u2014 don't add it there, and use bleed="none" to opt one out.`
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
guidance: "dont",
|
|
52
|
+
description: "Pull a ghost button onto an edge with -ms-3 / -me-3 classNames. That number is one size's padding: it is wrong at xs, md and cta, wrong on a side carrying an icon, and wrong once a preset retunes the spacing. bleed reads the button's own padding var. And don't bleed a filled or outlined button \u2014 its visible edge is what aligns, so bleed is a no-op there."
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
guidance: "dont",
|
|
56
|
+
description: "Use destructive for reversible or low-risk actions; reserve it for operations with real loss or danger."
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
guidance: "dont",
|
|
60
|
+
description: "Use a button for plain navigation. Compose with render={<a />} when the element should behave like a link."
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
guidance: "dont",
|
|
64
|
+
description: "Use secondary on a tinted surface \u2014 inside a Note, a soft Banner, or any tone fill. `secondary` is a near-background surface token (in some themes within 2% of the page), so on a tint it reads as a hole punched in the fill rather than as a control sitting on it. On a soft tint use outline or ghost; on a full-strength fill use the on-color tiers."
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
guidance: "do",
|
|
68
|
+
description: `On a coloured fill \u2014 a solid Banner, a bg-tone-* or bg-primary band, an inverse (bg-foreground) section, a brand panel \u2014 use variant="on-color" for the main action and on-color-outline / on-color-ghost for the rest. They paint with the band's inherited ink (currentColor), so the surface must set its paired ink (text-tone-info-foreground, text-primary-foreground, text-background\u2026), which it already should. Name the fill once on the surface, e.g. [--on-color-fill:var(--tone-info)], and the solid button's label takes the fill colour; unnamed, it falls back to black or white against the ink. Both clear 4.5:1 in every shipped theme and mode.`
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
guidance: "dont",
|
|
72
|
+
description: "Use the on-color tiers on the page, a Card, a Note, or a soft tint \u2014 there the ink is the page foreground and the normal tiers already fit. And don't restyle a normal variant with bg-*/text-* classNames to make it read on a band; that hard-codes colours per theme and skips the contrast and focus handling on-color carries."
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
anatomy: [
|
|
76
|
+
{
|
|
77
|
+
name: "Container",
|
|
78
|
+
required: true,
|
|
79
|
+
description: "The rounded hit target that carries the visual tier, focus ring, disabled state, and loading affordance."
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
name: "Label",
|
|
83
|
+
required: true,
|
|
84
|
+
description: "Visible action text and the default accessible name. Icon-only buttons still need an aria-label."
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
name: "Leading icon",
|
|
88
|
+
required: false,
|
|
89
|
+
description: "An optional semantic Icon that reinforces the label without replacing it."
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
name: "Spinner",
|
|
93
|
+
required: false,
|
|
94
|
+
description: "Displayed during loading and paired with aria-busy plus disabled activation."
|
|
95
|
+
}
|
|
96
|
+
]
|
|
97
|
+
},
|
|
98
|
+
related: {
|
|
99
|
+
components: ["Menu", "OverflowMenu", "Icon", "Banner"],
|
|
100
|
+
patterns: ["SettingsPage", "AuthPage", "DashboardPage"]
|
|
101
|
+
},
|
|
102
|
+
status: "stable",
|
|
103
|
+
props: [
|
|
104
|
+
{
|
|
105
|
+
name: "variant",
|
|
106
|
+
type: '"primary" | "secondary" | "ghost" | "outline" | "destructive" | "link" | "floating" | "field" | "on-color" | "on-color-outline" | "on-color-ghost"',
|
|
107
|
+
default: '"primary"',
|
|
108
|
+
description: "Visual emphasis tier. One primary per screen. The on-color tiers are for buttons ON a coloured fill: they paint with the inherited text colour (the fill's ink) \u2014 on-color is solid (ink background, fill-coloured label via the optional --on-color-fill var, else black/white), on-color-outline and on-color-ghost are transparent with an ink label. Never use them on page or card surfaces. floating is for a control that sits OVER content (carousel arrows, a marquee pause, a jump-to-latest over a conversation): its own edge, lift and translucent popover fill, so it reads on arbitrary content beneath. field is for a button docked in a workspace panel among xs fields: the inset panel-field fill and the field's corner, so a picker trigger or an add action reads as one of the row's controls; pair it with size xs or icon-xs."
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
name: "size",
|
|
112
|
+
type: '"xs" | "sm" | "md" | "cta" | "icon" | "icon-sm" | "icon-xs"',
|
|
113
|
+
default: '"md"',
|
|
114
|
+
description: "Reads the density ladder, so every value differs by register: page 28/32/40/44, workspace 24/28/32/36. xs and icon-xs were added in 0.31.0 for the workspace control floor and are the sizes tool chrome wants; md is the default everywhere. icon/icon-sm/icon-xs are square."
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
name: "render",
|
|
118
|
+
type: "ReactElement | (props, state) => ReactElement",
|
|
119
|
+
description: "Compose with another element/component through the Base UI render prop."
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
name: "loading",
|
|
123
|
+
type: "boolean",
|
|
124
|
+
default: "false",
|
|
125
|
+
description: "Disable the button and show a leading Spinner while an action is in flight. Sets aria-busy; a native button is disabled, a render element (e.g. an <a>) gets aria-disabled."
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
name: "badge",
|
|
129
|
+
type: "ReactNode",
|
|
130
|
+
description: "A corner indicator (usually <NotificationBadge dot /> or a count) overlaid on the top-end corner of the glyph. For icon-only sizes; never hand-position a badge over a Button with absolute offsets."
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
name: "loadingLabel",
|
|
134
|
+
type: "ReactNode",
|
|
135
|
+
description: "Optional text shown in place of children while loading."
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
name: "iconStart",
|
|
139
|
+
type: "ReactNode",
|
|
140
|
+
description: "Icon before the label. The button takes one 2px step off its start padding so icon + label read as centred. Replaced by the spinner while loading."
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
name: "iconEnd",
|
|
144
|
+
type: "ReactNode",
|
|
145
|
+
description: "Icon after the label (disclosure, external link, next). Same optical correction on the end side."
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
name: "bleed",
|
|
149
|
+
type: '"start" | "end" | "both" | "none"',
|
|
150
|
+
description: `Optical alignment for a borderless button (ghost, link, on-color-ghost): a negative inline margin of exactly its own padding on that side \u2014 --button-px, or the icon side's optical padding when an icon sits there; an icon-only size bleeds by its inset to the glyph \u2014 so the label (or glyph) lands on the content edge. Hit area and hover/focus fill keep their full size. Logical sides, so it mirrors in RTL. A no-op on variants with a visible edge (primary, secondary, outline, destructive, floating, field, on-color, on-color-outline): a filled button aligns its edge, not its label. Unset, a borderless button renders data-bleed="auto" and SectionHeader, PageHeader and CardAction bleed it when it is their outermost child; none opts out.`
|
|
151
|
+
}
|
|
152
|
+
],
|
|
153
|
+
variants: {
|
|
154
|
+
variant: [
|
|
155
|
+
"primary",
|
|
156
|
+
"secondary",
|
|
157
|
+
"ghost",
|
|
158
|
+
"outline",
|
|
159
|
+
"destructive",
|
|
160
|
+
"link",
|
|
161
|
+
"floating",
|
|
162
|
+
"field",
|
|
163
|
+
"on-color",
|
|
164
|
+
"on-color-outline",
|
|
165
|
+
"on-color-ghost"
|
|
166
|
+
],
|
|
167
|
+
size: ["xs", "sm", "md", "cta", "icon", "icon-sm", "icon-xs"]
|
|
168
|
+
},
|
|
169
|
+
tokensUsed: [
|
|
170
|
+
"primary",
|
|
171
|
+
"primary-foreground",
|
|
172
|
+
"secondary",
|
|
173
|
+
"secondary-foreground",
|
|
174
|
+
"accent",
|
|
175
|
+
"accent-foreground",
|
|
176
|
+
"input",
|
|
177
|
+
"destructive",
|
|
178
|
+
"destructive-foreground",
|
|
179
|
+
"ring",
|
|
180
|
+
"panel-field",
|
|
181
|
+
"panel-field-hover",
|
|
182
|
+
"panel-foreground"
|
|
183
|
+
],
|
|
184
|
+
motion: [
|
|
185
|
+
{
|
|
186
|
+
slot: "arrival",
|
|
187
|
+
recipe: "none",
|
|
188
|
+
part: "Root",
|
|
189
|
+
why: "A button belongs to the layout it ships in. Whatever staged that region owns the entrance; a button that fades in on its own is a button that is briefly un-clickable for no stated reason."
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
slot: "response",
|
|
193
|
+
recipe: "motion-interactive",
|
|
194
|
+
part: "Root",
|
|
195
|
+
why: "Hover, focus ring and disabled fade all ease on one declaration. This is the reference case for the whole recipe: it lists scale and translate alongside the colours specifically so motion-press can add a transform without a second, conflicting transition-property."
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
slot: "response",
|
|
199
|
+
recipe: "motion-press",
|
|
200
|
+
part: "Root",
|
|
201
|
+
why: "The 0.97 settle on pointer-down is the only confirmation the press registered before the action's own result arrives \u2014 which on a slow network is the difference between waiting and clicking again. It skips disabled elements, so a dead button stays visibly dead."
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
slot: "transition",
|
|
205
|
+
recipe: "none",
|
|
206
|
+
part: "Root",
|
|
207
|
+
why: "A button has no state of its own to move between. A control that toggles is a Switch or a Toggle, and those carry the transition."
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
slot: "activity",
|
|
211
|
+
recipe: "none",
|
|
212
|
+
part: "Root",
|
|
213
|
+
why: "Pending work is passed in via `loading`, which renders a Spinner \u2014 the activity motion lives there rather than being duplicated here."
|
|
214
|
+
}
|
|
215
|
+
],
|
|
216
|
+
a11y: [
|
|
217
|
+
"Renders a native <button> by default (keyboard + role free).",
|
|
218
|
+
"Focus-visible ring uses the --ring token at 50% opacity.",
|
|
219
|
+
"Use render={<a/>} for link semantics rather than onClick navigation.",
|
|
220
|
+
"On-color tiers replace the --ring focus ring with one drawn in the band's ink past a transparent 2px gap, so focus stays visible on any fill (ink-on-fill is the theme's own tested pair).",
|
|
221
|
+
"On-color contrast is measured in button.test.tsx for every shipped theme and mode on each tone, primary, destructive, success, highlight and inverse fill: solid label at rest and hover, and outline/ghost label on the hover wash, all at least 4.5:1.",
|
|
222
|
+
"bleed moves only the box, never the hit target: the full padded area stays clickable and the focus ring still draws around the whole button, past the content edge.",
|
|
223
|
+
"loading sets aria-busy and disables activation (disabled on a native button, aria-disabled on a render element) so the action can't double-fire."
|
|
224
|
+
],
|
|
225
|
+
examples: [
|
|
226
|
+
{ label: "Primary", code: "<Button>Collect</Button>" },
|
|
227
|
+
{
|
|
228
|
+
label: "Secondary + ghost",
|
|
229
|
+
code: '<Row gap={1}><Button variant="secondary">Cancel</Button><Button variant="ghost">Skip</Button></Row>'
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
label: "Loading",
|
|
233
|
+
code: '<Button loading loadingLabel="Saving\u2026">Save</Button>'
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
label: "Main action with options",
|
|
237
|
+
code: '<Row gap={2}><Button onClick={deploy}>Deploy</Button><Menu><MenuTrigger render={<Button variant="secondary" size="icon" aria-label="Deploy options"><Icon name="chevron-down" /></Button>} /><MenuContent align="end"><MenuItem>Deploy to preview</MenuItem><MenuItem>Deploy to production</MenuItem></MenuContent></Menu></Row>'
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
label: "Copy to clipboard",
|
|
241
|
+
code: 'const { copy, copied } = useCopy(address)\n<Button variant="ghost" size="icon-sm" aria-label="Copy address" onClick={copy}><Icon name={copied ? "check" : "copy"} /></Button>'
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
label: "As link",
|
|
245
|
+
code: '<Button render={<a href="/explore" />}>Explore</Button>'
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
label: "Primary + secondary decision row",
|
|
249
|
+
code: '<Row gap={1}><Button>Publish</Button><Button variant="secondary">Save draft</Button><Button variant="ghost">Cancel</Button></Row>'
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
label: "Destructive with confirmation copy",
|
|
253
|
+
code: '<Row gap={1}><Button variant="secondary">Cancel</Button><Button variant="destructive">Delete edition</Button></Row>'
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
label: "Leading icon",
|
|
257
|
+
code: '<Button iconStart={<Icon name="plus" />}>New project</Button>'
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
label: "Trailing icon",
|
|
261
|
+
code: '<Button variant="secondary" iconEnd={<Icon name="chevron-right" />}>Continue</Button>'
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
label: "Both icons",
|
|
265
|
+
code: '<Button variant="outline" iconStart={<Icon name="file" />} iconEnd={<Icon name="chevron-down" />}>Export</Button>'
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
label: "Icon-only",
|
|
269
|
+
code: '<Button size="icon" variant="ghost" aria-label="Share"><Icon name="share" /></Button>'
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
label: "Optically aligned to the row's edges",
|
|
273
|
+
code: `<Stack gap={1.5}>
|
|
274
|
+
<Row justify="between">
|
|
275
|
+
<span className="text-title-md">Tasks</span>
|
|
276
|
+
<Button variant="ghost" size="sm" bleed="end">View all</Button>
|
|
277
|
+
</Row>
|
|
278
|
+
<span className="text-body-sm text-muted-foreground">Ship the release notes</span>
|
|
279
|
+
<Button variant="ghost" size="sm" bleed="start" iconStart={<Icon name="plus" />} className="self-start">Add task</Button>
|
|
280
|
+
</Stack>`
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
label: "Icon button with an unread badge",
|
|
284
|
+
code: '<Button size="icon" variant="ghost" aria-label="Notifications" badge={<NotificationBadge dot />}><Icon name="bell" /></Button>'
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
label: "Field button in a panel row",
|
|
288
|
+
code: '<PanelSection title="Text">\n <PropertyRow label="Font">\n <Button variant="field" size="xs" className="w-full justify-between" iconEnd={<Icon name="chevron-down" />}>Figtree</Button>\n </PropertyRow>\n</PanelSection>'
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
label: "On a coloured band",
|
|
292
|
+
code: '<div className="flex gap-3 bg-tone-info p-6 text-tone-info-foreground [--on-color-fill:var(--tone-info)]"><Button variant="on-color">Join the beta</Button><Button variant="on-color-outline">Read the notes</Button></div>'
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
label: "Action in a solid Banner",
|
|
296
|
+
code: '<Banner tone="warning" appearance="solid" action={<Button variant="on-color" size="sm">Reconnect</Button>}>Wallet connection paused.</Banner>'
|
|
297
|
+
}
|
|
298
|
+
]
|
|
299
|
+
};
|
|
300
|
+
export {
|
|
301
|
+
buttonMeta
|
|
302
|
+
};
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
// src/components/button/button.variants.ts
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
var ON_COLOR_FOCUS = "focus-visible:ring-current focus-visible:ring-offset-2 focus-visible:ring-offset-transparent";
|
|
4
|
+
var buttonVariants = cva(
|
|
5
|
+
"inline-flex items-center justify-center gap-(--control-gap) whitespace-nowrap rounded-[var(--button-radius,9999px)] motion-interactive motion-press focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg]:shrink-0 [&_svg]:size-(--button-icon)",
|
|
6
|
+
{
|
|
7
|
+
variants: {
|
|
8
|
+
variant: {
|
|
9
|
+
/*
|
|
10
|
+
* Primary's hover reads `--primary-hover` — another OPTIONAL,
|
|
11
|
+
* mode-dependent var outside the `_contract.ts` token set, with the
|
|
12
|
+
* previous expression as its fallback. `hover:bg-primary/90` compiles
|
|
13
|
+
* to exactly the `color-mix(in oklab, …, transparent)` written below,
|
|
14
|
+
* so a theme that says nothing renders byte-identical to before.
|
|
15
|
+
*
|
|
16
|
+
* Why a hook rather than a constant: darkening on hover is a house
|
|
17
|
+
* convention, not a law. A dark-first reference commonly does the
|
|
18
|
+
* opposite — its brand fill BRIGHTENS under the pointer,
|
|
19
|
+
* because on a near-black ground a darker fill reads as disabled
|
|
20
|
+
* rather than as pressed. A theme sets `--primary-hover: <colour>` once
|
|
21
|
+
* (both modes if they differ) and the whole primary tier follows.
|
|
22
|
+
*/
|
|
23
|
+
primary: "bg-primary text-primary-foreground hover:bg-[var(--primary-hover,color-mix(in_oklab,var(--primary)_90%,transparent))]",
|
|
24
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
25
|
+
ghost: "bg-transparent text-foreground hover:bg-accent hover:text-accent-foreground",
|
|
26
|
+
outline: "border border-input bg-transparent text-foreground hover:bg-accent hover:text-accent-foreground",
|
|
27
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
28
|
+
link: "bg-transparent text-foreground underline-offset-4 hover:underline",
|
|
29
|
+
/*
|
|
30
|
+
* A control that floats OVER content — a carousel's arrows over its
|
|
31
|
+
* slides, a marquee's pause over its strip, a scroller's "jump to
|
|
32
|
+
* latest" over the conversation. It needs its own edge and lift
|
|
33
|
+
* because the content under it is arbitrary; the page tiers assume
|
|
34
|
+
* the page behind them. One look for all of them: three components
|
|
35
|
+
* restyling secondary/ghost three different ways was the alternative.
|
|
36
|
+
*/
|
|
37
|
+
floating: "border border-border-floating bg-popover/90 text-popover-foreground shadow-md backdrop-blur hover:bg-popover",
|
|
38
|
+
/*
|
|
39
|
+
* A button docked in a panel among compact fields — a picker that
|
|
40
|
+
* opens a popover, "Add fill", a swatch's trigger. It wears the xs
|
|
41
|
+
* field rung's shell (lib/field-shell → FIELD_SHELL_XS): the inset
|
|
42
|
+
* `panel-field` fill, no border, the field's corner rather than the
|
|
43
|
+
* button's pill, so it reads as one of the row's controls. Secondary
|
|
44
|
+
* or ghost there read as page buttons dropped into tool chrome.
|
|
45
|
+
*/
|
|
46
|
+
field: "rounded-[var(--panel-field-radius,var(--radius-xs))] bg-panel-field text-panel-foreground hover:bg-panel-field-hover",
|
|
47
|
+
/*
|
|
48
|
+
* On-colour tiers — for a button sitting ON a coloured fill (a tone
|
|
49
|
+
* band, a solid Banner, a brand panel, a dark section in a light
|
|
50
|
+
* page). Every tier above paints fixed page tokens, so on a fill
|
|
51
|
+
* they read as holes (secondary), vanish (ghost/outline ink is
|
|
52
|
+
* `foreground`, not the band's ink) or clash (primary).
|
|
53
|
+
*
|
|
54
|
+
* These derive everything from the SURFACE'S INK instead: the
|
|
55
|
+
* button keeps the colour it inherits (`currentColor` = the band's
|
|
56
|
+
* `text-*-foreground`) and paints with it, so one variant works on
|
|
57
|
+
* any fill, in any theme and mode, with no per-theme token.
|
|
58
|
+
*
|
|
59
|
+
* - `on-color`: solid. Background = the ink; label = the fill.
|
|
60
|
+
* The button cannot see its parent's background, so the fill is
|
|
61
|
+
* read from `--on-color-fill` when the surface names it (then
|
|
62
|
+
* label/background contrast is exactly the theme's own tested
|
|
63
|
+
* ink-on-fill pair, inverted). Unnamed, the label falls back to
|
|
64
|
+
* black or white derived from the ink's OKLCH lightness — the
|
|
65
|
+
* 0.565 split is where both sides clear 4.5:1 against the ink.
|
|
66
|
+
* Hover pushes the ink a quarter-step further from the fill (toward
|
|
67
|
+
* white if the ink is light, black if dark) — never toward the
|
|
68
|
+
* fill, because the themes' tone pairs sit close to 4.5:1 and any
|
|
69
|
+
* fade toward the fill (the `/90` other tiers use) drops below it.
|
|
70
|
+
* The label colour is set on the CHILDREN (`*:`), never on the
|
|
71
|
+
* button: `bg-current` must keep reading the inherited ink, and
|
|
72
|
+
* `trimLabel` wraps every text child in a span, so text, icons
|
|
73
|
+
* and the loading spinner are all direct children.
|
|
74
|
+
* - `on-color-outline`: transparent, ink label, ink hairline.
|
|
75
|
+
* - `on-color-ghost`: transparent, ink label.
|
|
76
|
+
* Both hover by washing the fill 12% toward the ink's OPPOSITE (a
|
|
77
|
+
* shade under a light ink, a tint under a dark one). An ink-coloured
|
|
78
|
+
* wash — the obvious `bg-current/10` — pulls the fill toward the
|
|
79
|
+
* label and measured below 4.5:1 on twelve shipped pairs.
|
|
80
|
+
*
|
|
81
|
+
* Focus: `--ring` is tuned for page surfaces and can disappear on
|
|
82
|
+
* a fill, so these ring in the ink, offset by a transparent gap
|
|
83
|
+
* that shows the fill through — the ink-on-fill pair again.
|
|
84
|
+
*/
|
|
85
|
+
// design-lint-disable-next-line inline-color -- derives a contrast ink FROM currentColor (relative colour syntax); no literal colour is introduced
|
|
86
|
+
"on-color": `${ON_COLOR_FOCUS} bg-current *:text-[color:var(--on-color-fill,oklch(from_currentColor_calc((0.565_-_l)*1000)_0_0))] hover:bg-[color:color-mix(in_oklab,currentColor_75%,oklch(from_currentColor_calc((l_-_0.565)*1000)_0_0))]`,
|
|
87
|
+
// design-lint-disable-next-line inline-color -- the hover wash is derived FROM currentColor (relative colour syntax); no literal colour
|
|
88
|
+
"on-color-outline": `${ON_COLOR_FOCUS} border border-current/50 bg-transparent hover:border-current hover:bg-[color:oklch(from_currentColor_calc((0.565_-_l)*1000)_0_0_/_0.12)]`,
|
|
89
|
+
// design-lint-disable-next-line inline-color -- the hover wash is derived FROM currentColor (relative colour syntax); no literal colour
|
|
90
|
+
"on-color-ghost": `${ON_COLOR_FOCUS} bg-transparent hover:bg-[color:oklch(from_currentColor_calc((0.565_-_l)*1000)_0_0_/_0.12)]`
|
|
91
|
+
},
|
|
92
|
+
/**
|
|
93
|
+
* Heights read the density ladder (`--control-*`) rather than hardcoding
|
|
94
|
+
* px, which is what makes the two registers work: a
|
|
95
|
+
* `data-density="compact"` scope redefines the vars and every control
|
|
96
|
+
* follows, with no selector overriding a height after the fact. See
|
|
97
|
+
* styles.css → Density and themes/_contract.ts → DENSITY_TOKENS.
|
|
98
|
+
*
|
|
99
|
+
* Comfortable values are exactly the previous literals (sm 32, md 40,
|
|
100
|
+
* cta 44, icon 40, icon-sm 32), so the page register is unchanged.
|
|
101
|
+
* `xs` / `icon-xs` are new and exist for the workspace floor — 24px icon
|
|
102
|
+
* buttons in a 240px panel, which is what Paper and Figma both run.
|
|
103
|
+
*/
|
|
104
|
+
size: {
|
|
105
|
+
/*
|
|
106
|
+
* --button-icon: icons render a step LARGER than the label. A
|
|
107
|
+
* 24-grid glyph shrunk to label size (14px) thins its 1.5px strokes
|
|
108
|
+
* to ~0.9px against a ~1.7px type stem — the icon reads faint and
|
|
109
|
+
* small beside its word. One size per step keeps glyph and label at
|
|
110
|
+
* matching weight; icon-only sizes run a step larger again.
|
|
111
|
+
*/
|
|
112
|
+
/*
|
|
113
|
+
* --button-px: the inline padding, named so `bleed` can pull the box
|
|
114
|
+
* outward by exactly this much and land the label on the edge. The
|
|
115
|
+
* padding READS it, so the two cannot drift; to retune a button's
|
|
116
|
+
* padding set the var (`[--button-px:--spacing(2)]`), not px-*.
|
|
117
|
+
* Icon-only sizes have no padding — the glyph is centred in a
|
|
118
|
+
* square — so theirs is the inset from the box edge to the glyph's.
|
|
119
|
+
*/
|
|
120
|
+
xs: "h-(--control-xs) px-(--button-px) [--button-px:--spacing(2)] [--button-icon:0.875rem]",
|
|
121
|
+
sm: "h-(--control-sm) px-(--button-px) [--button-px:--spacing(3)] [--button-icon:1rem]",
|
|
122
|
+
md: "h-(--control-md) px-(--button-px) [--button-px:--spacing(4)] [--button-icon:1.125rem]",
|
|
123
|
+
cta: "h-(--control-cta) px-(--button-px) [--button-px:--spacing(5)] [--button-icon:1.25rem]",
|
|
124
|
+
icon: "h-(--control-md) w-(--control-md) [--button-icon:1.25rem] [--button-px:calc((var(--control-md)-var(--button-icon))/2)]",
|
|
125
|
+
"icon-sm": "h-(--control-sm) w-(--control-sm) [--button-icon:1.125rem] [--button-px:calc((var(--control-sm)-var(--button-icon))/2)]",
|
|
126
|
+
"icon-xs": "h-(--control-xs) w-(--control-xs) p-0 [--button-icon:1rem] [--button-px:calc((var(--control-xs)-var(--button-icon))/2)]"
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
defaultVariants: {
|
|
130
|
+
variant: "primary",
|
|
131
|
+
size: "md"
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
);
|
|
135
|
+
export {
|
|
136
|
+
buttonVariants
|
|
137
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/components/calendar/calendar.tsx
|
|
4
|
+
import { Icon } from "../../icon/index.js";
|
|
5
|
+
import { cn } from "../../lib/cn.js";
|
|
6
|
+
import { buttonVariants } from "../button/button.variants.js";
|
|
7
|
+
import {
|
|
8
|
+
DayPicker
|
|
9
|
+
} from "react-day-picker";
|
|
10
|
+
import { jsx } from "react/jsx-runtime";
|
|
11
|
+
function CalendarChevron({ orientation }) {
|
|
12
|
+
return /* @__PURE__ */ jsx(
|
|
13
|
+
Icon,
|
|
14
|
+
{
|
|
15
|
+
name: orientation === "left" ? "chevron-left" : "chevron-right",
|
|
16
|
+
className: "text-sm"
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
function Calendar({
|
|
21
|
+
className,
|
|
22
|
+
classNames,
|
|
23
|
+
showOutsideDays = true,
|
|
24
|
+
components,
|
|
25
|
+
bare = false,
|
|
26
|
+
...props
|
|
27
|
+
}) {
|
|
28
|
+
return /* @__PURE__ */ jsx(
|
|
29
|
+
DayPicker,
|
|
30
|
+
{
|
|
31
|
+
"data-slot": "calendar",
|
|
32
|
+
showOutsideDays,
|
|
33
|
+
className: cn(
|
|
34
|
+
// relative: the nav is absolutely positioned (react-day-picker v9
|
|
35
|
+
// renders it inside `months`, not inside each month), and with no
|
|
36
|
+
// positioned ancestor of our own the chevrons escaped to whatever
|
|
37
|
+
// the host page had positioned — top of the page, in the docs.
|
|
38
|
+
"relative inline-block",
|
|
39
|
+
!bare && "rounded-lg border border-border bg-card p-3 text-card-foreground",
|
|
40
|
+
className
|
|
41
|
+
),
|
|
42
|
+
classNames: {
|
|
43
|
+
months: "relative flex flex-col gap-4 sm:flex-row",
|
|
44
|
+
month: "relative flex flex-col gap-4",
|
|
45
|
+
nav: "absolute inset-x-0 top-0 z-10 flex items-center justify-between px-1",
|
|
46
|
+
// The month arrows are Sable's ghost icon button — same height ladder,
|
|
47
|
+
// radius (--button-radius), hover and focus ring — not a lookalike.
|
|
48
|
+
button_previous: buttonVariants({ variant: "ghost", size: "icon-sm" }),
|
|
49
|
+
button_next: buttonVariants({ variant: "ghost", size: "icon-sm" }),
|
|
50
|
+
month_caption: "relative flex h-(--control-sm) items-center justify-center px-(--control-sm)",
|
|
51
|
+
caption_label: "text-title-sm",
|
|
52
|
+
month_grid: "w-full border-collapse",
|
|
53
|
+
weekdays: "flex",
|
|
54
|
+
weekday: "flex size-9 items-center justify-center text-caption text-muted-foreground",
|
|
55
|
+
week: "mt-1 flex w-full",
|
|
56
|
+
day: "p-0 text-center",
|
|
57
|
+
day_button: "inline-flex size-9 items-center justify-center rounded-md text-body-sm motion-interactive outline-none hover:bg-accent hover:text-accent-foreground focus-visible:ring-2 focus-visible:ring-ring",
|
|
58
|
+
// Range fill lives on the CELL so it forms one continuous bar; only the
|
|
59
|
+
// outer ends are rounded. The selected (primary) endpoint buttons sit on
|
|
60
|
+
// top — their rounded corners reveal the accent fill, connecting them to
|
|
61
|
+
// the middle instead of leaving a card-colored gap.
|
|
62
|
+
range_start: "rounded-s-md bg-accent",
|
|
63
|
+
// `selected` also lands on every middle day, so its primary fill/text
|
|
64
|
+
// competes with ours at equal specificity (and Tailwind's alphabetical
|
|
65
|
+
// utility order lets `text-primary-foreground` win). Force the in-range
|
|
66
|
+
// button to stay transparent with accent-foreground text so it always
|
|
67
|
+
// wins — otherwise the numbers render near-invisible (primary-on-accent).
|
|
68
|
+
range_middle: "rounded-none bg-accent [&>button]:rounded-none [&>button]:bg-transparent! [&>button]:text-accent-foreground! [&>button]:hover:bg-transparent! [&>button]:hover:text-accent-foreground!",
|
|
69
|
+
range_end: "rounded-e-md bg-accent",
|
|
70
|
+
selected: "[&>button]:bg-primary [&>button]:text-primary-foreground [&>button]:hover:bg-primary [&>button]:hover:text-primary-foreground",
|
|
71
|
+
// Today is a dot under the number, in the button's own ink — never a
|
|
72
|
+
// ring, which is what keyboard focus draws and would be mistaken for it.
|
|
73
|
+
today: "[&>button]:relative [&>button]:after:absolute [&>button]:after:bottom-1 [&>button]:after:size-1 [&>button]:after:rounded-full [&>button]:after:bg-current",
|
|
74
|
+
// Muted ink alone (4.5:1+): these are live, clickable days. At 50%
|
|
75
|
+
// opacity they measured 2.2:1 and looked exactly like `disabled`.
|
|
76
|
+
outside: "[&>button]:text-muted-foreground",
|
|
77
|
+
disabled: "[&>button]:pointer-events-none [&>button]:text-muted-foreground [&>button]:opacity-50",
|
|
78
|
+
hidden: "invisible",
|
|
79
|
+
...classNames
|
|
80
|
+
},
|
|
81
|
+
components: { Chevron: CalendarChevron, ...components },
|
|
82
|
+
...props
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
Calendar.displayName = "Calendar";
|
|
87
|
+
export {
|
|
88
|
+
Calendar
|
|
89
|
+
};
|