@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,336 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// src/components/gradient-art/renderer.ts
|
|
4
|
+
import {
|
|
5
|
+
getShaderNoiseTexture,
|
|
6
|
+
grainGradientFragmentShader,
|
|
7
|
+
grainGradientMeta,
|
|
8
|
+
staticMeshGradientFragmentShader,
|
|
9
|
+
staticMeshGradientMeta
|
|
10
|
+
} from "@paper-design/shaders";
|
|
11
|
+
var VERTEX = `#version 300 es
|
|
12
|
+
precision mediump float;
|
|
13
|
+
|
|
14
|
+
layout(location = 0) in vec4 a_position;
|
|
15
|
+
|
|
16
|
+
uniform vec2 u_resolution;
|
|
17
|
+
uniform float u_pixelRatio;
|
|
18
|
+
uniform float u_originX;
|
|
19
|
+
uniform float u_originY;
|
|
20
|
+
uniform float u_worldWidth;
|
|
21
|
+
uniform float u_worldHeight;
|
|
22
|
+
uniform float u_fit;
|
|
23
|
+
uniform float u_scale;
|
|
24
|
+
uniform float u_rotation;
|
|
25
|
+
uniform float u_offsetX;
|
|
26
|
+
uniform float u_offsetY;
|
|
27
|
+
|
|
28
|
+
out vec2 v_objectUV;
|
|
29
|
+
out vec2 v_objectBoxSize;
|
|
30
|
+
out vec2 v_patternUV;
|
|
31
|
+
out vec2 v_patternBoxSize;
|
|
32
|
+
|
|
33
|
+
vec3 getBoxSize(float boxRatio, vec2 givenBoxSize) {
|
|
34
|
+
vec2 box = vec2(0.);
|
|
35
|
+
box.x = boxRatio * min(givenBoxSize.x / boxRatio, givenBoxSize.y);
|
|
36
|
+
float noFitBoxWidth = box.x;
|
|
37
|
+
if (u_fit == 1.) {
|
|
38
|
+
box.x = boxRatio * min(u_resolution.x / boxRatio, u_resolution.y);
|
|
39
|
+
} else if (u_fit == 2.) {
|
|
40
|
+
box.x = boxRatio * max(u_resolution.x / boxRatio, u_resolution.y);
|
|
41
|
+
}
|
|
42
|
+
box.y = box.x / boxRatio;
|
|
43
|
+
return vec3(box, noFitBoxWidth);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
void main() {
|
|
47
|
+
gl_Position = a_position;
|
|
48
|
+
|
|
49
|
+
vec2 uv = gl_Position.xy * .5;
|
|
50
|
+
vec2 boxOrigin = vec2(.5 - u_originX, u_originY - .5);
|
|
51
|
+
vec2 givenBoxSize = vec2(u_worldWidth, u_worldHeight);
|
|
52
|
+
givenBoxSize = max(givenBoxSize, vec2(1.)) * u_pixelRatio;
|
|
53
|
+
float r = u_rotation * 3.14159265358979323846 / 180.;
|
|
54
|
+
mat2 graphicRotation = mat2(cos(r), sin(r), -sin(r), cos(r));
|
|
55
|
+
vec2 graphicOffset = vec2(-u_offsetX, u_offsetY);
|
|
56
|
+
|
|
57
|
+
vec2 fixedRatioBoxGivenSize = vec2(
|
|
58
|
+
(u_worldWidth == 0.) ? u_resolution.x : givenBoxSize.x,
|
|
59
|
+
(u_worldHeight == 0.) ? u_resolution.y : givenBoxSize.y
|
|
60
|
+
);
|
|
61
|
+
v_objectBoxSize = getBoxSize(1., fixedRatioBoxGivenSize).xy;
|
|
62
|
+
vec2 objectWorldScale = u_resolution.xy / v_objectBoxSize;
|
|
63
|
+
v_objectUV = uv;
|
|
64
|
+
v_objectUV *= objectWorldScale;
|
|
65
|
+
v_objectUV += boxOrigin * (objectWorldScale - 1.);
|
|
66
|
+
v_objectUV += graphicOffset;
|
|
67
|
+
v_objectUV /= u_scale;
|
|
68
|
+
v_objectUV = graphicRotation * v_objectUV;
|
|
69
|
+
|
|
70
|
+
vec2 patternBoxGivenSize = vec2(
|
|
71
|
+
(u_worldWidth == 0.) ? u_resolution.x : givenBoxSize.x,
|
|
72
|
+
(u_worldHeight == 0.) ? u_resolution.y : givenBoxSize.y
|
|
73
|
+
);
|
|
74
|
+
float patternBoxRatio = patternBoxGivenSize.x / patternBoxGivenSize.y;
|
|
75
|
+
vec3 boxSizeData = getBoxSize(patternBoxRatio, patternBoxGivenSize);
|
|
76
|
+
v_patternBoxSize = boxSizeData.xy;
|
|
77
|
+
float patternBoxNoFitBoxWidth = boxSizeData.z;
|
|
78
|
+
vec2 patternBoxScale = u_resolution.xy / v_patternBoxSize;
|
|
79
|
+
v_patternUV = uv;
|
|
80
|
+
v_patternUV += graphicOffset / patternBoxScale;
|
|
81
|
+
v_patternUV += boxOrigin;
|
|
82
|
+
v_patternUV -= boxOrigin / patternBoxScale;
|
|
83
|
+
v_patternUV *= u_resolution.xy;
|
|
84
|
+
v_patternUV /= u_pixelRatio;
|
|
85
|
+
if (u_fit > 0.) {
|
|
86
|
+
v_patternUV *= (patternBoxNoFitBoxWidth / v_patternBoxSize.x);
|
|
87
|
+
}
|
|
88
|
+
v_patternUV /= u_scale;
|
|
89
|
+
v_patternUV = graphicRotation * v_patternUV;
|
|
90
|
+
v_patternUV += boxOrigin / patternBoxScale;
|
|
91
|
+
v_patternUV -= boxOrigin;
|
|
92
|
+
v_patternUV *= .01;
|
|
93
|
+
}
|
|
94
|
+
`;
|
|
95
|
+
var FRAGMENTS = { mesh: staticMeshGradientFragmentShader, grain: grainGradientFragmentShader };
|
|
96
|
+
var MAX_COLORS = { mesh: staticMeshGradientMeta.maxColorCount, grain: grainGradientMeta.maxColorCount };
|
|
97
|
+
var GRAIN_CORNERS = 4;
|
|
98
|
+
var state;
|
|
99
|
+
var noiseImage = null;
|
|
100
|
+
var listeners = /* @__PURE__ */ new Set();
|
|
101
|
+
function onArtInvalidate(listener) {
|
|
102
|
+
listeners.add(listener);
|
|
103
|
+
return () => listeners.delete(listener);
|
|
104
|
+
}
|
|
105
|
+
var invalidate = () => {
|
|
106
|
+
for (const listener of listeners) listener();
|
|
107
|
+
};
|
|
108
|
+
function compile(gl, type, source) {
|
|
109
|
+
const shader = gl.createShader(type);
|
|
110
|
+
if (!shader) return null;
|
|
111
|
+
gl.shaderSource(shader, source);
|
|
112
|
+
gl.compileShader(shader);
|
|
113
|
+
if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {
|
|
114
|
+
console.error("GradientArt: shader failed to compile", gl.getShaderInfoLog(shader));
|
|
115
|
+
gl.deleteShader(shader);
|
|
116
|
+
return null;
|
|
117
|
+
}
|
|
118
|
+
return shader;
|
|
119
|
+
}
|
|
120
|
+
function programFor(s, variant) {
|
|
121
|
+
const cached = s.programs[variant];
|
|
122
|
+
if (cached !== void 0) return cached;
|
|
123
|
+
s.programs[variant] = null;
|
|
124
|
+
const { gl } = s;
|
|
125
|
+
const vertex = compile(gl, gl.VERTEX_SHADER, VERTEX);
|
|
126
|
+
const fragment = compile(gl, gl.FRAGMENT_SHADER, FRAGMENTS[variant]);
|
|
127
|
+
if (!vertex || !fragment) return null;
|
|
128
|
+
const program = gl.createProgram();
|
|
129
|
+
if (!program) return null;
|
|
130
|
+
gl.attachShader(program, vertex);
|
|
131
|
+
gl.attachShader(program, fragment);
|
|
132
|
+
gl.linkProgram(program);
|
|
133
|
+
gl.deleteShader(vertex);
|
|
134
|
+
gl.deleteShader(fragment);
|
|
135
|
+
if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {
|
|
136
|
+
console.error("GradientArt: shader failed to link", gl.getProgramInfoLog(program));
|
|
137
|
+
return null;
|
|
138
|
+
}
|
|
139
|
+
const entry = { program, uniforms: /* @__PURE__ */ new Map() };
|
|
140
|
+
s.programs[variant] = entry;
|
|
141
|
+
return entry;
|
|
142
|
+
}
|
|
143
|
+
function setup(s) {
|
|
144
|
+
const { gl } = s;
|
|
145
|
+
const buffer = gl.createBuffer();
|
|
146
|
+
gl.bindBuffer(gl.ARRAY_BUFFER, buffer);
|
|
147
|
+
gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([-1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1]), gl.STATIC_DRAW);
|
|
148
|
+
gl.enableVertexAttribArray(0);
|
|
149
|
+
gl.vertexAttribPointer(0, 2, gl.FLOAT, false, 0, 0);
|
|
150
|
+
s.programs = {};
|
|
151
|
+
s.noise = null;
|
|
152
|
+
if (noiseImage?.complete && noiseImage.naturalWidth) uploadNoise(s, noiseImage);
|
|
153
|
+
}
|
|
154
|
+
function uploadNoise(s, image) {
|
|
155
|
+
const { gl } = s;
|
|
156
|
+
const texture = gl.createTexture();
|
|
157
|
+
gl.activeTexture(gl.TEXTURE0);
|
|
158
|
+
gl.bindTexture(gl.TEXTURE_2D, texture);
|
|
159
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
|
|
160
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
|
|
161
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
|
|
162
|
+
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
|
|
163
|
+
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image);
|
|
164
|
+
s.noise = texture;
|
|
165
|
+
}
|
|
166
|
+
function getState() {
|
|
167
|
+
if (state !== void 0) return state;
|
|
168
|
+
if (typeof document === "undefined") return null;
|
|
169
|
+
const canvas = document.createElement("canvas");
|
|
170
|
+
const gl = canvas.getContext("webgl2", { alpha: true, premultipliedAlpha: true, antialias: false, preserveDrawingBuffer: true });
|
|
171
|
+
if (!gl) {
|
|
172
|
+
state = null;
|
|
173
|
+
return state;
|
|
174
|
+
}
|
|
175
|
+
const s = { canvas, gl, programs: {}, noise: null, lost: false };
|
|
176
|
+
setup(s);
|
|
177
|
+
canvas.addEventListener("webglcontextlost", (event) => {
|
|
178
|
+
event.preventDefault();
|
|
179
|
+
s.lost = true;
|
|
180
|
+
});
|
|
181
|
+
canvas.addEventListener("webglcontextrestored", () => {
|
|
182
|
+
s.lost = false;
|
|
183
|
+
setup(s);
|
|
184
|
+
invalidate();
|
|
185
|
+
});
|
|
186
|
+
state = s;
|
|
187
|
+
return state;
|
|
188
|
+
}
|
|
189
|
+
function noiseReady(s) {
|
|
190
|
+
if (s.noise) return true;
|
|
191
|
+
if (!noiseImage) {
|
|
192
|
+
noiseImage = getShaderNoiseTexture() ?? null;
|
|
193
|
+
noiseImage?.decode().then(
|
|
194
|
+
() => {
|
|
195
|
+
const current = getState();
|
|
196
|
+
if (current && noiseImage) uploadNoise(current, noiseImage);
|
|
197
|
+
invalidate();
|
|
198
|
+
},
|
|
199
|
+
() => {
|
|
200
|
+
}
|
|
201
|
+
);
|
|
202
|
+
}
|
|
203
|
+
return false;
|
|
204
|
+
}
|
|
205
|
+
function artSupported() {
|
|
206
|
+
return getState() !== null;
|
|
207
|
+
}
|
|
208
|
+
function paintArt(target, job) {
|
|
209
|
+
const s = getState();
|
|
210
|
+
if (!s || s.lost) return false;
|
|
211
|
+
if (job.variant === "grain" && !noiseReady(s)) return false;
|
|
212
|
+
const entry = programFor(s, job.variant);
|
|
213
|
+
if (!entry) return false;
|
|
214
|
+
const { gl, canvas } = s;
|
|
215
|
+
const { width, height } = job;
|
|
216
|
+
if (canvas.width !== width || canvas.height !== height) {
|
|
217
|
+
canvas.width = width;
|
|
218
|
+
canvas.height = height;
|
|
219
|
+
}
|
|
220
|
+
gl.viewport(0, 0, width, height);
|
|
221
|
+
gl.useProgram(entry.program);
|
|
222
|
+
const at = (name) => {
|
|
223
|
+
if (!entry.uniforms.has(name)) entry.uniforms.set(name, gl.getUniformLocation(entry.program, name));
|
|
224
|
+
return entry.uniforms.get(name) ?? null;
|
|
225
|
+
};
|
|
226
|
+
const float = (name, value) => gl.uniform1f(at(name), value);
|
|
227
|
+
gl.uniform2f(at("u_resolution"), width, height);
|
|
228
|
+
float("u_pixelRatio", job.pixelRatio);
|
|
229
|
+
float("u_originX", 0.5);
|
|
230
|
+
float("u_originY", 0.5);
|
|
231
|
+
float("u_worldWidth", 0);
|
|
232
|
+
float("u_worldHeight", 0);
|
|
233
|
+
float("u_fit", 2);
|
|
234
|
+
float("u_scale", 1);
|
|
235
|
+
float("u_offsetX", 0);
|
|
236
|
+
float("u_offsetY", 0);
|
|
237
|
+
const max = MAX_COLORS[job.variant];
|
|
238
|
+
const fill = (colors) => {
|
|
239
|
+
const flat = new Float32Array(max * 4);
|
|
240
|
+
colors.slice(0, max).forEach((color, i) => flat.set(color, i * 4));
|
|
241
|
+
gl.uniform4fv(at("u_colors"), flat);
|
|
242
|
+
float("u_colorsCount", Math.min(colors.length, max));
|
|
243
|
+
};
|
|
244
|
+
if (job.variant === "mesh") {
|
|
245
|
+
float("u_scale", 0.72);
|
|
246
|
+
float("u_rotation", job.seed * 360);
|
|
247
|
+
fill(job.colors);
|
|
248
|
+
float("u_positions", job.seed * 100);
|
|
249
|
+
float("u_waveX", job.warp);
|
|
250
|
+
float("u_waveXShift", job.seed);
|
|
251
|
+
float("u_waveY", job.warp);
|
|
252
|
+
float("u_waveYShift", job.seed * 7.3 % 1);
|
|
253
|
+
float("u_mixing", job.softness);
|
|
254
|
+
float("u_grainMixer", job.grain * 0.6);
|
|
255
|
+
float("u_grainOverlay", job.grain);
|
|
256
|
+
} else {
|
|
257
|
+
const [ground = [0, 0, 0, 1], ...bands] = job.colors;
|
|
258
|
+
float("u_rotation", job.seed * 360);
|
|
259
|
+
gl.uniform4fv(at("u_colorBack"), ground);
|
|
260
|
+
fill(bands.length ? bands : [ground]);
|
|
261
|
+
float("u_time", job.seed * 100);
|
|
262
|
+
float("u_softness", job.softness * 0.8);
|
|
263
|
+
float("u_intensity", 0.15 + job.warp * 0.2);
|
|
264
|
+
float("u_noise", 0.15 + job.grain * 0.5);
|
|
265
|
+
float("u_shape", GRAIN_CORNERS);
|
|
266
|
+
gl.activeTexture(gl.TEXTURE0);
|
|
267
|
+
gl.bindTexture(gl.TEXTURE_2D, s.noise);
|
|
268
|
+
gl.uniform1i(at("u_noiseTexture"), 0);
|
|
269
|
+
}
|
|
270
|
+
gl.clearColor(0, 0, 0, 0);
|
|
271
|
+
gl.clear(gl.COLOR_BUFFER_BIT);
|
|
272
|
+
gl.drawArrays(gl.TRIANGLES, 0, 6);
|
|
273
|
+
if (target.width !== width || target.height !== height) {
|
|
274
|
+
target.width = width;
|
|
275
|
+
target.height = height;
|
|
276
|
+
}
|
|
277
|
+
const context = target.getContext("2d");
|
|
278
|
+
if (!context) return false;
|
|
279
|
+
context.clearRect(0, 0, width, height);
|
|
280
|
+
context.drawImage(canvas, 0, 0);
|
|
281
|
+
return true;
|
|
282
|
+
}
|
|
283
|
+
var swatch;
|
|
284
|
+
var parsed = /* @__PURE__ */ new Map();
|
|
285
|
+
function cssColorToRgba(color) {
|
|
286
|
+
const hit = parsed.get(color);
|
|
287
|
+
if (hit) return hit;
|
|
288
|
+
if (swatch === void 0) {
|
|
289
|
+
swatch = typeof document === "undefined" ? null : document.createElement("canvas").getContext("2d", { willReadFrequently: true });
|
|
290
|
+
if (swatch) swatch.canvas.width = swatch.canvas.height = 1;
|
|
291
|
+
}
|
|
292
|
+
if (!swatch) return null;
|
|
293
|
+
swatch.clearRect(0, 0, 1, 1);
|
|
294
|
+
swatch.fillStyle = "transparent";
|
|
295
|
+
swatch.fillStyle = color;
|
|
296
|
+
swatch.fillRect(0, 0, 1, 1);
|
|
297
|
+
const [r, g, b, a] = swatch.getImageData(0, 0, 1, 1).data;
|
|
298
|
+
const out = [r / 255, g / 255, b / 255, a / 255];
|
|
299
|
+
if (parsed.size > 512) parsed.clear();
|
|
300
|
+
parsed.set(color, out);
|
|
301
|
+
return out;
|
|
302
|
+
}
|
|
303
|
+
var themeListeners = /* @__PURE__ */ new Set();
|
|
304
|
+
var observer = null;
|
|
305
|
+
var pending = 0;
|
|
306
|
+
function onThemeChange(listener) {
|
|
307
|
+
themeListeners.add(listener);
|
|
308
|
+
if (!observer && typeof MutationObserver !== "undefined") {
|
|
309
|
+
const notify = () => {
|
|
310
|
+
if (pending) return;
|
|
311
|
+
pending = requestAnimationFrame(() => {
|
|
312
|
+
pending = 0;
|
|
313
|
+
for (const fn of themeListeners) fn();
|
|
314
|
+
});
|
|
315
|
+
};
|
|
316
|
+
observer = new MutationObserver(notify);
|
|
317
|
+
observer.observe(document.documentElement, { attributes: true, attributeFilter: ["class", "style", "data-sable-theme"] });
|
|
318
|
+
observer.observe(document.head, { childList: true, subtree: true, characterData: true });
|
|
319
|
+
}
|
|
320
|
+
return () => {
|
|
321
|
+
themeListeners.delete(listener);
|
|
322
|
+
if (!themeListeners.size && observer) {
|
|
323
|
+
observer.disconnect();
|
|
324
|
+
observer = null;
|
|
325
|
+
cancelAnimationFrame(pending);
|
|
326
|
+
pending = 0;
|
|
327
|
+
}
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
export {
|
|
331
|
+
artSupported,
|
|
332
|
+
cssColorToRgba,
|
|
333
|
+
onArtInvalidate,
|
|
334
|
+
onThemeChange,
|
|
335
|
+
paintArt
|
|
336
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// src/components/inline-status/inline-status.tsx
|
|
2
|
+
import { Icon } from "../../icon/index.js";
|
|
3
|
+
import { cn } from "../../lib/cn.js";
|
|
4
|
+
import {
|
|
5
|
+
inlineStatusVariants,
|
|
6
|
+
inlineToneIcon
|
|
7
|
+
} from "./inline-status.variants.js";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
function InlineStatus({
|
|
10
|
+
tone = "neutral",
|
|
11
|
+
size,
|
|
12
|
+
icon,
|
|
13
|
+
className,
|
|
14
|
+
children,
|
|
15
|
+
...props
|
|
16
|
+
}) {
|
|
17
|
+
const { name, className: iconClassName } = inlineToneIcon[tone];
|
|
18
|
+
return /* @__PURE__ */ jsxs(
|
|
19
|
+
"div",
|
|
20
|
+
{
|
|
21
|
+
className: cn(inlineStatusVariants({ size }), iconClassName, className),
|
|
22
|
+
...props,
|
|
23
|
+
children: [
|
|
24
|
+
/* @__PURE__ */ jsx("span", { className: "flex h-[1lh] shrink-0 items-center", children: icon ?? /* @__PURE__ */ jsx(Icon, { name, className: "text-[1.15em]" }) }),
|
|
25
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0", children })
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
InlineStatus.displayName = "InlineStatus";
|
|
31
|
+
export {
|
|
32
|
+
InlineStatus
|
|
33
|
+
};
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
// src/components/inline-status/inline-status.meta.ts
|
|
2
|
+
var inlineStatusMeta = {
|
|
3
|
+
name: "InlineStatus",
|
|
4
|
+
summary: "A borderless single-line status message \u2014 a leading semantic icon + one line of text over the canonical tone scale (neutral/info/success/warning/destructive). The non-boxed sibling of Note for inline affirmations, errors, and progress; pass a custom icon (e.g. a Spinner) for a pending row.",
|
|
5
|
+
status: "stable",
|
|
6
|
+
keywords: [
|
|
7
|
+
"inline status",
|
|
8
|
+
"state",
|
|
9
|
+
"message",
|
|
10
|
+
"availability"
|
|
11
|
+
],
|
|
12
|
+
usage: {
|
|
13
|
+
description: "Use InlineStatus for short state messages placed near the thing they describe.",
|
|
14
|
+
bestPractices: [
|
|
15
|
+
{
|
|
16
|
+
guidance: "do",
|
|
17
|
+
description: "Use it beside inputs, rows, actions, or settings that need local status."
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
guidance: "do",
|
|
21
|
+
description: "Keep the message brief and pair color with text."
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
guidance: "dont",
|
|
25
|
+
description: "Do not use InlineStatus for global announcements or page-level alerts."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
guidance: "dont",
|
|
29
|
+
description: "Do not use tone as the only signal. Colour alone fails for colour-blind users \u2014 the leading icon is what carries the meaning, so never hide it."
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
related: {
|
|
34
|
+
components: ["StatusDot", "Badge", "Banner", "Note"]
|
|
35
|
+
},
|
|
36
|
+
props: [
|
|
37
|
+
{
|
|
38
|
+
name: "tone",
|
|
39
|
+
type: '"neutral" | "info" | "success" | "warning" | "destructive"',
|
|
40
|
+
default: '"neutral"',
|
|
41
|
+
description: "Severity tone \u2014 drives the leading icon (name + color) and the text color. The shared status-tone vocabulary (STATUS_TONES)."
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: "size",
|
|
45
|
+
type: '"sm" | "md"',
|
|
46
|
+
default: '"sm"',
|
|
47
|
+
description: "Text size: sm (text-body-sm) or md (text-body-md). sm is the default for inline placement under a control; md matches surrounding body copy."
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: "icon",
|
|
51
|
+
type: "ReactNode",
|
|
52
|
+
description: "Override the leading glyph (e.g. a <Spinner />); otherwise the tone selects it."
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
variants: {
|
|
56
|
+
tone: ["neutral", "info", "success", "warning", "destructive"],
|
|
57
|
+
size: ["sm", "md"]
|
|
58
|
+
},
|
|
59
|
+
tokensUsed: [
|
|
60
|
+
"tone-info",
|
|
61
|
+
"success",
|
|
62
|
+
"tone-warning",
|
|
63
|
+
"destructive",
|
|
64
|
+
"muted-foreground"
|
|
65
|
+
],
|
|
66
|
+
a11y: [
|
|
67
|
+
"Color reinforces, never replaces, meaning \u2014 the leading icon and the message text carry the status.",
|
|
68
|
+
"For a live status (e.g. a form submit result), render it in an aria-live region or pair it with the field's error wiring so the change is announced."
|
|
69
|
+
],
|
|
70
|
+
examples: [
|
|
71
|
+
{
|
|
72
|
+
label: "Tones",
|
|
73
|
+
code: '<Stack gap={1}><InlineStatus tone="success">Top-up confirmed.</InlineStatus><InlineStatus tone="destructive">Insufficient balance.</InlineStatus></Stack>'
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
label: "Pending (custom icon)",
|
|
77
|
+
code: '<InlineStatus tone="neutral" icon={<Spinner size="sm" />}>Preparing transaction\u2026</InlineStatus>'
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
};
|
|
81
|
+
export {
|
|
82
|
+
inlineStatusMeta
|
|
83
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// src/components/inline-status/inline-status.variants.ts
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import { STATUS_TONE_ICON } from "../../lib/status-tone.js";
|
|
4
|
+
var inlineStatusVariants = cva("inline-flex items-start gap-1.5", {
|
|
5
|
+
variants: {
|
|
6
|
+
size: {
|
|
7
|
+
sm: "text-body-sm",
|
|
8
|
+
md: "text-body-md"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
defaultVariants: {
|
|
12
|
+
size: "sm"
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
export {
|
|
16
|
+
inlineStatusVariants,
|
|
17
|
+
STATUS_TONE_ICON as inlineToneIcon
|
|
18
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// src/components/input/input.tsx
|
|
2
|
+
import { Input as BaseInput } from "@base-ui/react/input";
|
|
3
|
+
import { cn } from "../../lib/cn.js";
|
|
4
|
+
import { FIELD_INVALID, FIELD_SHELL, FIELD_SHELL_XS, MOBILE_FIELD_TIER } from "../../lib/field-shell.js";
|
|
5
|
+
import { useDensity, useTypeTier } from "../../lib/density.js";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
function Input({ className, type, size = "md", ref, ...props }) {
|
|
8
|
+
const tier = useTypeTier();
|
|
9
|
+
const density = useDensity();
|
|
10
|
+
return /* @__PURE__ */ jsx(
|
|
11
|
+
BaseInput,
|
|
12
|
+
{
|
|
13
|
+
ref,
|
|
14
|
+
type: type ?? "text",
|
|
15
|
+
className: cn(
|
|
16
|
+
"flex w-full text-foreground",
|
|
17
|
+
FIELD_SHELL,
|
|
18
|
+
FIELD_INVALID,
|
|
19
|
+
size === "xs" ? cn("h-(--control-xs) px-1.5", FIELD_SHELL_XS) : "h-(--control-md) px-3",
|
|
20
|
+
// type="file": style the native selector button (otherwise unstyled).
|
|
21
|
+
"file:mr-3 file:cursor-pointer file:border-0 file:bg-transparent file:py-2 file:text-foreground",
|
|
22
|
+
tier.body,
|
|
23
|
+
density === "comfortable" && MOBILE_FIELD_TIER,
|
|
24
|
+
className
|
|
25
|
+
),
|
|
26
|
+
...props
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
Input.displayName = "Input";
|
|
31
|
+
export {
|
|
32
|
+
Input
|
|
33
|
+
};
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
// src/components/input/input.meta.ts
|
|
2
|
+
var inputMeta = {
|
|
3
|
+
name: "Input",
|
|
4
|
+
summary: "Styled native text input. Soft-square (rounded-sm), card surface, 2px focus ring; aria-invalid raises the destructive error treatment.",
|
|
5
|
+
keywords: [
|
|
6
|
+
"input",
|
|
7
|
+
"text input",
|
|
8
|
+
"field",
|
|
9
|
+
"form",
|
|
10
|
+
"email",
|
|
11
|
+
"search",
|
|
12
|
+
"file",
|
|
13
|
+
"invalid",
|
|
14
|
+
"validation"
|
|
15
|
+
],
|
|
16
|
+
usage: {
|
|
17
|
+
description: "Use Input for short freeform text, search, email, password, file, and native input types. In forms, wrap Input in Field so label, description, required state, and validation messaging stay accessible and consistent.",
|
|
18
|
+
bestPractices: [
|
|
19
|
+
{
|
|
20
|
+
guidance: "do",
|
|
21
|
+
description: "Pair every Input with a visible label through Field or an explicit label/htmlFor connection."
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
guidance: "do",
|
|
25
|
+
description: "Use type, inputMode, autoComplete, and placeholder as progressive hints, not as the only label."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
guidance: "do",
|
|
29
|
+
description: "Set aria-invalid or use Field error copy when validation fails."
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
guidance: "do",
|
|
33
|
+
description: "Keep a focusable field at 16px or larger on mobile. iOS Safari zooms the whole page when a focused input computes under 16px and never zooms back out. Input handles this itself \u2014 below the sm breakpoint it renders text-body-lg (17px) and returns to text-body-md at sm and up. Build a custom field the same way: a second paired tier under a max-sm: variant, never a hand-set font-size."
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
guidance: "dont",
|
|
37
|
+
description: "Override an Input's type with a page tier below 16px (text-body-md, text-body-sm, text-label-*) without a >=16px mobile arm \u2014 that reintroduces the iOS focus zoom."
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
guidance: "dont",
|
|
41
|
+
description: "Use placeholder text as the label; it disappears once the user types and is not enough context."
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
guidance: "dont",
|
|
45
|
+
description: "Use Input for long body copy. Use Textarea for multi-line content."
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
anatomy: [
|
|
49
|
+
{
|
|
50
|
+
name: "Input",
|
|
51
|
+
required: true,
|
|
52
|
+
description: "The native input element with Sable surface, disabled, focus, and invalid styling."
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: "Label",
|
|
56
|
+
required: true,
|
|
57
|
+
description: "Usually provided by Field or a separate Label. It gives the input its visible purpose."
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: "Description",
|
|
61
|
+
required: false,
|
|
62
|
+
description: "Optional helper copy connected through aria-describedby when using Field."
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: "Error",
|
|
66
|
+
required: false,
|
|
67
|
+
description: "Validation message paired with aria-invalid and destructive styling."
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
related: {
|
|
72
|
+
components: ["Field", "Form", "Textarea", "SearchInput", "NumberField"],
|
|
73
|
+
patterns: ["SettingsPage", "AuthPage"]
|
|
74
|
+
},
|
|
75
|
+
status: "stable",
|
|
76
|
+
props: [
|
|
77
|
+
{
|
|
78
|
+
name: "size",
|
|
79
|
+
type: '"md" | "xs"',
|
|
80
|
+
default: '"md"',
|
|
81
|
+
description: "md is the form field. xs is the dense inset field of a tool panel (an inset panel-field fill, no outline, tight padding) \u2014 the same ladder as Select and Combobox. Use it instead of overriding the height with className."
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: "type",
|
|
85
|
+
type: "string",
|
|
86
|
+
default: '"text"',
|
|
87
|
+
description: 'Native input type (text, email, password, search, number, file, \u2026). type="file" themes the native selector button via file: token utilities.'
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: "disabled",
|
|
91
|
+
type: "boolean",
|
|
92
|
+
default: "false",
|
|
93
|
+
description: "Dims the control and blocks pointer interaction."
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: "aria-invalid",
|
|
97
|
+
type: "boolean",
|
|
98
|
+
description: "Surfaces the destructive border + ring. Base UI form fields set this automatically."
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
name: "...props",
|
|
102
|
+
type: 'ComponentPropsWithRef<"input">',
|
|
103
|
+
description: "All native input attributes (placeholder, value, onChange, ref, \u2026) pass through."
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
tokensUsed: [
|
|
107
|
+
"input",
|
|
108
|
+
"card",
|
|
109
|
+
"foreground",
|
|
110
|
+
"muted-foreground",
|
|
111
|
+
"ring",
|
|
112
|
+
"destructive"
|
|
113
|
+
],
|
|
114
|
+
a11y: [
|
|
115
|
+
"Renders a native <input> \u2014 labels, keyboard, and form semantics come for free.",
|
|
116
|
+
"Renders through Base UI's Input (Field.Control): inside a Field it picks up the label, description, error and validity wiring from context, even when nested in a wrapper.",
|
|
117
|
+
"Always associate a <label htmlFor> (or wrap) \u2014 placeholder text is not a label.",
|
|
118
|
+
"Focus-visible ring uses the --ring token at 40% opacity.",
|
|
119
|
+
"Set aria-invalid='true' on error so the destructive treatment is conveyed, not color-only."
|
|
120
|
+
],
|
|
121
|
+
variants: {
|
|
122
|
+
size: ["md", "xs"]
|
|
123
|
+
},
|
|
124
|
+
examples: [
|
|
125
|
+
{ label: "Default", code: '<Input placeholder="Search posts" />' },
|
|
126
|
+
{
|
|
127
|
+
label: "With a label",
|
|
128
|
+
code: '<Field label="Email"><Input type="email" placeholder="you@example.com" /></Field>'
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
label: "Field with helper text",
|
|
132
|
+
code: '<Field label="Display name" description="Shown on your public profile."><Input placeholder="Nova Reed" /></Field>'
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
label: "Field error",
|
|
136
|
+
code: '<Field label="Email" error="Enter a valid email address."><Input type="email" defaultValue="not-an-email" /></Field>'
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
label: "Search input",
|
|
140
|
+
code: '<Field label="Search posts"><Input type="search" placeholder="Search by title, creator, or tag" /></Field>'
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
label: "Invalid",
|
|
144
|
+
code: '<Input aria-invalid defaultValue="not-an-email" />'
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
label: "File",
|
|
148
|
+
code: '<Input type="file" accept="image/*" />'
|
|
149
|
+
},
|
|
150
|
+
{ label: "Disabled", code: '<Input disabled placeholder="Disabled" />' }
|
|
151
|
+
]
|
|
152
|
+
};
|
|
153
|
+
export {
|
|
154
|
+
inputMeta
|
|
155
|
+
};
|