@zonsh/ui 0.4.1 → 0.6.0
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/CHANGELOG.md +639 -0
- package/README.md +49 -21
- package/dist/brand.d.ts +3 -0
- package/dist/brand.js +7 -0
- package/dist/components/_breadcrumb-more.d.ts +6 -0
- package/dist/components/_breadcrumb-more.js +5 -0
- package/dist/components/_drawing-svg.d.ts +11 -0
- package/dist/components/_drawing-svg.js +30 -0
- package/dist/components/_media.d.ts +159 -0
- package/dist/components/_media.js +266 -0
- package/dist/components/_overlay.d.ts +8 -5
- package/dist/components/_overlay.js +11 -6
- package/dist/components/_scheduler-calendar.d.ts +71 -0
- package/dist/components/_scheduler-calendar.js +940 -0
- package/dist/components/_scheduler-editor.d.ts +29 -0
- package/dist/components/_scheduler-editor.js +111 -0
- package/dist/components/_scheduler-menu.d.ts +16 -0
- package/dist/components/_scheduler-menu.js +18 -0
- package/dist/components/_scheduler-parts.d.ts +164 -0
- package/dist/components/_scheduler-parts.js +327 -0
- package/dist/components/_suggest-list.d.ts +142 -0
- package/dist/components/_suggest-list.js +159 -0
- package/dist/components/_toolbar-more.d.ts +24 -0
- package/dist/components/_toolbar-more.js +25 -0
- package/dist/components/accordion.d.ts +1 -1
- package/dist/components/accordion.js +7 -7
- package/dist/components/action-sheet.d.ts +88 -0
- package/dist/components/action-sheet.js +124 -0
- package/dist/components/alert-dialog.js +3 -1
- package/dist/components/alert.d.ts +11 -18
- package/dist/components/alert.js +9 -6
- package/dist/components/app-bar.d.ts +93 -0
- package/dist/components/app-bar.js +175 -0
- package/dist/components/ascii-field.js +2 -1
- package/dist/components/audio-player.d.ts +134 -0
- package/dist/components/audio-player.js +618 -0
- package/dist/components/avatar.d.ts +6 -6
- package/dist/components/avatar.js +13 -11
- package/dist/components/badge.d.ts +12 -12
- package/dist/components/badge.js +7 -5
- package/dist/components/bottom-nav.d.ts +53 -11
- package/dist/components/bottom-nav.js +389 -24
- package/dist/components/breadcrumb.d.ts +11 -2
- package/dist/components/breadcrumb.js +60 -6
- package/dist/components/button-group.js +5 -1
- package/dist/components/button.d.ts +23 -6
- package/dist/components/button.js +64 -8
- package/dist/components/calendar.js +8 -6
- package/dist/components/card.d.ts +10 -8
- package/dist/components/card.js +15 -14
- package/dist/components/carousel.d.ts +2 -2
- package/dist/components/carousel.js +21 -8
- package/dist/components/chart.d.ts +38 -1
- package/dist/components/chart.js +27 -5
- package/dist/components/checkbox.js +2 -2
- package/dist/components/code-block.d.ts +9 -2
- package/dist/components/code-block.js +26 -7
- package/dist/components/collapsible.js +4 -4
- package/dist/components/color-picker.d.ts +2 -2
- package/dist/components/color-picker.js +5 -5
- package/dist/components/combobox.d.ts +26 -7
- package/dist/components/combobox.js +32 -13
- package/dist/components/command.d.ts +29 -5
- package/dist/components/command.js +37 -12
- package/dist/components/context-menu.d.ts +5 -2
- package/dist/components/context-menu.js +24 -3
- package/dist/components/conversation.d.ts +1 -1
- package/dist/components/conversation.js +77 -16
- package/dist/components/copy-button.d.ts +1 -1
- package/dist/components/copy-button.js +8 -6
- package/dist/components/data-table.d.ts +6 -6
- package/dist/components/data-table.js +41 -15
- package/dist/components/date-picker.d.ts +31 -9
- package/dist/components/date-picker.js +100 -18
- package/dist/components/dialog.d.ts +17 -10
- package/dist/components/dialog.js +20 -13
- package/dist/components/drawer.d.ts +26 -8
- package/dist/components/drawer.js +75 -16
- package/dist/components/drawing.d.ts +25 -0
- package/dist/components/drawing.js +32 -0
- package/dist/components/empty.js +2 -2
- package/dist/components/feature-list.d.ts +65 -13
- package/dist/components/feature-list.js +116 -15
- package/dist/components/field.js +2 -2
- package/dist/components/file-drop.d.ts +9 -7
- package/dist/components/file-drop.js +8 -43
- package/dist/components/filter-bar.d.ts +10 -9
- package/dist/components/filter-bar.js +42 -25
- package/dist/components/graph.d.ts +19 -3
- package/dist/components/graph.js +190 -28
- package/dist/components/illustration.js +53 -31
- package/dist/components/input-group.d.ts +6 -11
- package/dist/components/input-group.js +21 -19
- package/dist/components/input.d.ts +2 -2
- package/dist/components/input.js +3 -3
- package/dist/components/item.d.ts +9 -6
- package/dist/components/item.js +13 -8
- package/dist/components/kbd.d.ts +1 -1
- package/dist/components/kbd.js +1 -1
- package/dist/components/layout.d.ts +2 -1
- package/dist/components/layout.js +55 -11
- package/dist/components/lightbox.d.ts +76 -9
- package/dist/components/lightbox.js +354 -48
- package/dist/components/locale.d.ts +6 -6
- package/dist/components/logo.d.ts +21 -1
- package/dist/components/logo.js +32 -2
- package/dist/components/markdown-editor.d.ts +275 -0
- package/dist/components/markdown-editor.js +831 -0
- package/dist/components/mentions.d.ts +153 -0
- package/dist/components/mentions.js +507 -0
- package/dist/components/menu.d.ts +2 -1
- package/dist/components/menu.js +5 -4
- package/dist/components/menubar.d.ts +23 -5
- package/dist/components/menubar.js +153 -31
- package/dist/components/message.d.ts +62 -11
- package/dist/components/message.js +51 -14
- package/dist/components/meter.js +1 -1
- package/dist/components/money-input.d.ts +1 -1
- package/dist/components/money-input.js +1 -1
- package/dist/components/native-select.d.ts +2 -2
- package/dist/components/native-select.js +4 -4
- package/dist/components/navigation-menu.d.ts +3 -1
- package/dist/components/navigation-menu.js +23 -10
- package/dist/components/number-field.d.ts +2 -9
- package/dist/components/number-field.js +90 -26
- package/dist/components/number-roll.d.ts +26 -0
- package/dist/components/number-roll.js +81 -0
- package/dist/components/otp-field.d.ts +1 -1
- package/dist/components/otp-field.js +24 -3
- package/dist/components/pagination.d.ts +11 -3
- package/dist/components/pagination.js +59 -13
- package/dist/components/pdf-viewer.d.ts +1 -1
- package/dist/components/pdf-viewer.js +8 -8
- package/dist/components/phone-input.d.ts +1 -1
- package/dist/components/phone-input.js +2 -2
- package/dist/components/popover.js +5 -3
- package/dist/components/preview-card.d.ts +37 -2
- package/dist/components/preview-card.js +226 -2
- package/dist/components/progress.js +1 -1
- package/dist/components/prompt-input.d.ts +1 -1
- package/dist/components/prompt-input.js +35 -17
- package/dist/components/pull-to-refresh.d.ts +50 -0
- package/dist/components/pull-to-refresh.js +189 -0
- package/dist/components/quote.d.ts +6 -1
- package/dist/components/quote.js +3 -2
- package/dist/components/radio-group.js +8 -3
- package/dist/components/rating.d.ts +4 -1
- package/dist/components/rating.js +131 -10
- package/dist/components/reasoning.d.ts +1 -1
- package/dist/components/reasoning.js +7 -3
- package/dist/components/resizable.d.ts +1 -1
- package/dist/components/resizable.js +2 -2
- package/dist/components/response.d.ts +4 -3
- package/dist/components/response.js +39 -15
- package/dist/components/scheduler.d.ts +352 -0
- package/dist/components/scheduler.js +1717 -0
- package/dist/components/scroll-area.js +1 -1
- package/dist/components/select.d.ts +17 -4
- package/dist/components/select.js +140 -9
- package/dist/components/separator.d.ts +1 -1
- package/dist/components/separator.js +3 -3
- package/dist/components/sidebar.d.ts +44 -3
- package/dist/components/sidebar.js +90 -31
- package/dist/components/site-header.d.ts +18 -13
- package/dist/components/site-header.js +26 -9
- package/dist/components/skeleton.d.ts +18 -8
- package/dist/components/skeleton.js +23 -8
- package/dist/components/slider.js +2 -2
- package/dist/components/sortable.d.ts +55 -4
- package/dist/components/sortable.js +187 -94
- package/dist/components/sources.d.ts +1 -1
- package/dist/components/sources.js +2 -2
- package/dist/components/spinner.d.ts +4 -4
- package/dist/components/spinner.js +4 -4
- package/dist/components/stat.d.ts +21 -4
- package/dist/components/stat.js +17 -8
- package/dist/components/stepper.d.ts +1 -1
- package/dist/components/stepper.js +8 -7
- package/dist/components/suggestions.d.ts +11 -3
- package/dist/components/suggestions.js +10 -4
- package/dist/components/swipe-actions.d.ts +66 -0
- package/dist/components/swipe-actions.js +292 -0
- package/dist/components/switch.js +1 -1
- package/dist/components/table.d.ts +13 -7
- package/dist/components/table.js +124 -23
- package/dist/components/tabs.js +15 -8
- package/dist/components/tag.d.ts +19 -20
- package/dist/components/tag.js +9 -5
- package/dist/components/tags-input.d.ts +2 -7
- package/dist/components/tags-input.js +11 -8
- package/dist/components/textarea.d.ts +3 -2
- package/dist/components/textarea.js +4 -3
- package/dist/components/theme.d.ts +50 -7
- package/dist/components/theme.js +168 -12
- package/dist/components/time-field.d.ts +6 -10
- package/dist/components/time-field.js +19 -9
- package/dist/components/timeline.d.ts +19 -3
- package/dist/components/timeline.js +21 -9
- package/dist/components/tippy.d.ts +17 -1
- package/dist/components/tippy.js +95 -15
- package/dist/components/toast.d.ts +2 -7
- package/dist/components/toast.js +12 -8
- package/dist/components/toggle-group.d.ts +7 -1
- package/dist/components/toggle-group.js +17 -5
- package/dist/components/toggle.d.ts +2 -2
- package/dist/components/toggle.js +3 -2
- package/dist/components/tool-call.d.ts +1 -1
- package/dist/components/tool-call.js +8 -3
- package/dist/components/toolbar.d.ts +57 -4
- package/dist/components/toolbar.js +219 -16
- package/dist/components/tooltip.d.ts +5 -3
- package/dist/components/tooltip.js +14 -6
- package/dist/components/tour.d.ts +1 -1
- package/dist/components/tour.js +70 -24
- package/dist/components/tree.js +33 -10
- package/dist/components/typography.d.ts +31 -8
- package/dist/components/typography.js +21 -10
- package/dist/components/video-player.d.ts +7 -2
- package/dist/components/video-player.js +182 -225
- package/dist/index.d.ts +99 -92
- package/dist/index.js +99 -92
- package/dist/lib/calendar.d.ts +153 -0
- package/dist/lib/calendar.js +312 -0
- package/dist/lib/cn.d.ts +3 -1
- package/dist/lib/cn.js +5 -0
- package/dist/lib/code-highlight.d.ts +14 -0
- package/dist/lib/code-highlight.js +81 -18
- package/dist/lib/drag.d.ts +39 -0
- package/dist/lib/drag.js +96 -0
- package/dist/lib/editorial-assets.js +16 -8
- package/dist/lib/figure/figures/automation.js +25 -6
- package/dist/lib/figure/figures/bar-chart.js +6 -1
- package/dist/lib/figure/figures/brackets-classic.js +4 -1
- package/dist/lib/figure/figures/city.js +12 -2
- package/dist/lib/figure/figures/conveyor.js +17 -4
- package/dist/lib/figure/figures/database.js +5 -2
- package/dist/lib/figure/figures/documents.js +11 -3
- package/dist/lib/figure/figures/inbox.js +5 -2
- package/dist/lib/figure/figures/laptop.js +3 -1
- package/dist/lib/figure/figures/pipeline.js +45 -10
- package/dist/lib/figure/figures/platform.js +62 -7
- package/dist/lib/figure/figures/server.js +21 -5
- package/dist/lib/figure/figures/spreadsheet.js +29 -5
- package/dist/lib/figure/kernel.d.ts +4 -2
- package/dist/lib/figure/kernel.js +10 -5
- package/dist/lib/figure/parts.js +6 -2
- package/dist/lib/files.d.ts +31 -0
- package/dist/lib/files.js +60 -0
- package/dist/lib/gesture.d.ts +70 -0
- package/dist/lib/gesture.js +141 -0
- package/dist/lib/glide.d.ts +10 -4
- package/dist/lib/glide.js +14 -5
- package/dist/lib/icons.d.ts +1 -0
- package/dist/lib/icons.js +6 -0
- package/dist/lib/illustration-library.js +1 -6
- package/dist/lib/markdown-edit.d.ts +112 -0
- package/dist/lib/markdown-edit.js +557 -0
- package/dist/lib/markdown-rich-editor.d.ts +188 -0
- package/dist/lib/markdown-rich-editor.js +1153 -0
- package/dist/lib/markdown-rich.d.ts +63 -0
- package/dist/lib/markdown-rich.js +534 -0
- package/dist/lib/mentions.d.ts +100 -0
- package/dist/lib/mentions.js +246 -0
- package/dist/lib/motion.d.ts +18 -0
- package/dist/lib/motion.js +43 -5
- package/dist/lib/number-roll.d.ts +89 -0
- package/dist/lib/number-roll.js +391 -0
- package/dist/lib/platform.d.ts +6 -0
- package/dist/lib/platform.js +14 -0
- package/dist/lib/portal-container.d.ts +9 -0
- package/dist/lib/portal-container.js +10 -0
- package/dist/lib/press.d.ts +5 -0
- package/dist/lib/press.js +186 -0
- package/dist/lib/scheduler.d.ts +128 -0
- package/dist/lib/scheduler.js +272 -0
- package/dist/lib/scroll-edges.d.ts +9 -0
- package/dist/lib/scroll-edges.js +50 -0
- package/dist/lib/table-fit.d.ts +4 -3
- package/dist/lib/table-fit.js +92 -25
- package/dist/lib/theme-preset.d.ts +267 -0
- package/dist/lib/theme-preset.js +1046 -0
- package/dist/lib/theme-script.d.ts +23 -3
- package/dist/lib/theme-script.js +17 -5
- package/dist/lib/tippy/sprite.d.ts +36 -4
- package/dist/lib/tippy/sprite.js +188 -15
- package/dist/lib/tone.d.ts +4 -0
- package/dist/lib/tone.js +1 -0
- package/dist/messages/de.d.ts +3 -3
- package/dist/messages/de.js +274 -3
- package/dist/skills/zon-ui/SKILL.md +279 -0
- package/dist/skills/zon-ui/references/authoring.md +265 -0
- package/dist/skills/zon-ui/references/brand.md +416 -0
- package/dist/skills/zon-ui/references/components/accordion.md +199 -0
- package/dist/skills/zon-ui/references/components/action-sheet.md +268 -0
- package/dist/skills/zon-ui/references/components/alert-dialog.md +276 -0
- package/dist/skills/zon-ui/references/components/alert.md +167 -0
- package/dist/skills/zon-ui/references/components/app-bar.md +307 -0
- package/dist/skills/zon-ui/references/components/ascii-field.md +121 -0
- package/dist/skills/zon-ui/references/components/aspect-ratio.md +112 -0
- package/dist/skills/zon-ui/references/components/audio-player.md +231 -0
- package/dist/skills/zon-ui/references/components/avatar.md +98 -0
- package/dist/skills/zon-ui/references/components/badge.md +227 -0
- package/dist/skills/zon-ui/references/components/bottom-nav.md +709 -0
- package/dist/skills/zon-ui/references/components/breadcrumb.md +143 -0
- package/dist/skills/zon-ui/references/components/button-group.md +216 -0
- package/dist/skills/zon-ui/references/components/button.md +309 -0
- package/dist/skills/zon-ui/references/components/calendar.md +296 -0
- package/dist/skills/zon-ui/references/components/card.md +158 -0
- package/dist/skills/zon-ui/references/components/carousel.md +297 -0
- package/dist/skills/zon-ui/references/components/chart.md +739 -0
- package/dist/skills/zon-ui/references/components/chat.md +417 -0
- package/dist/skills/zon-ui/references/components/checkbox.md +219 -0
- package/dist/skills/zon-ui/references/components/code-block.md +143 -0
- package/dist/skills/zon-ui/references/components/code-highlight.md +118 -0
- package/dist/skills/zon-ui/references/components/collapsible.md +146 -0
- package/dist/skills/zon-ui/references/components/color-picker.md +200 -0
- package/dist/skills/zon-ui/references/components/combobox.md +455 -0
- package/dist/skills/zon-ui/references/components/command.md +326 -0
- package/dist/skills/zon-ui/references/components/contact-form.md +562 -0
- package/dist/skills/zon-ui/references/components/context-menu.md +159 -0
- package/dist/skills/zon-ui/references/components/conversation.md +146 -0
- package/dist/skills/zon-ui/references/components/copy-button.md +162 -0
- package/dist/skills/zon-ui/references/components/crm.md +1022 -0
- package/dist/skills/zon-ui/references/components/dashboard.md +612 -0
- package/dist/skills/zon-ui/references/components/data-table.md +776 -0
- package/dist/skills/zon-ui/references/components/date-picker.md +444 -0
- package/dist/skills/zon-ui/references/components/dialog.md +335 -0
- package/dist/skills/zon-ui/references/components/direction.md +165 -0
- package/dist/skills/zon-ui/references/components/drawer.md +276 -0
- package/dist/skills/zon-ui/references/components/drawing.md +94 -0
- package/dist/skills/zon-ui/references/components/empty.md +225 -0
- package/dist/skills/zon-ui/references/components/feature-list.md +412 -0
- package/dist/skills/zon-ui/references/components/field.md +209 -0
- package/dist/skills/zon-ui/references/components/file-drop.md +234 -0
- package/dist/skills/zon-ui/references/components/filter-bar.md +485 -0
- package/dist/skills/zon-ui/references/components/form.md +970 -0
- package/dist/skills/zon-ui/references/components/graph.md +339 -0
- package/dist/skills/zon-ui/references/components/illustration.md +497 -0
- package/dist/skills/zon-ui/references/components/inbox.md +263 -0
- package/dist/skills/zon-ui/references/components/input-group.md +339 -0
- package/dist/skills/zon-ui/references/components/input.md +189 -0
- package/dist/skills/zon-ui/references/components/item.md +277 -0
- package/dist/skills/zon-ui/references/components/kanban.md +626 -0
- package/dist/skills/zon-ui/references/components/kbd.md +116 -0
- package/dist/skills/zon-ui/references/components/label.md +104 -0
- package/dist/skills/zon-ui/references/components/layout.md +291 -0
- package/dist/skills/zon-ui/references/components/lightbox.md +235 -0
- package/dist/skills/zon-ui/references/components/locale.md +279 -0
- package/dist/skills/zon-ui/references/components/logo.md +257 -0
- package/dist/skills/zon-ui/references/components/markdown-editor.md +558 -0
- package/dist/skills/zon-ui/references/components/mentions.md +512 -0
- package/dist/skills/zon-ui/references/components/menu.md +218 -0
- package/dist/skills/zon-ui/references/components/menubar.md +292 -0
- package/dist/skills/zon-ui/references/components/message.md +243 -0
- package/dist/skills/zon-ui/references/components/meter.md +105 -0
- package/dist/skills/zon-ui/references/components/money-input.md +333 -0
- package/dist/skills/zon-ui/references/components/native-select.md +197 -0
- package/dist/skills/zon-ui/references/components/navigation-menu.md +253 -0
- package/dist/skills/zon-ui/references/components/number-field.md +210 -0
- package/dist/skills/zon-ui/references/components/number-roll.md +175 -0
- package/dist/skills/zon-ui/references/components/onboarding.md +896 -0
- package/dist/skills/zon-ui/references/components/otp-field.md +166 -0
- package/dist/skills/zon-ui/references/components/pagination.md +109 -0
- package/dist/skills/zon-ui/references/components/pdf-viewer.md +177 -0
- package/dist/skills/zon-ui/references/components/phone-input.md +252 -0
- package/dist/skills/zon-ui/references/components/popover.md +176 -0
- package/dist/skills/zon-ui/references/components/preview-card.md +193 -0
- package/dist/skills/zon-ui/references/components/pricing.md +724 -0
- package/dist/skills/zon-ui/references/components/progress.md +92 -0
- package/dist/skills/zon-ui/references/components/prompt-input.md +307 -0
- package/dist/skills/zon-ui/references/components/pull-to-refresh.md +188 -0
- package/dist/skills/zon-ui/references/components/quote.md +115 -0
- package/dist/skills/zon-ui/references/components/radio-group.md +215 -0
- package/dist/skills/zon-ui/references/components/rating.md +260 -0
- package/dist/skills/zon-ui/references/components/reasoning.md +102 -0
- package/dist/skills/zon-ui/references/components/resizable.md +213 -0
- package/dist/skills/zon-ui/references/components/response.md +170 -0
- package/dist/skills/zon-ui/references/components/scheduler.md +732 -0
- package/dist/skills/zon-ui/references/components/scroll-area.md +122 -0
- package/dist/skills/zon-ui/references/components/select.md +351 -0
- package/dist/skills/zon-ui/references/components/separator.md +103 -0
- package/dist/skills/zon-ui/references/components/settings.md +793 -0
- package/dist/skills/zon-ui/references/components/shop.md +1715 -0
- package/dist/skills/zon-ui/references/components/sidebar.md +813 -0
- package/dist/skills/zon-ui/references/components/sign-in.md +1639 -0
- package/dist/skills/zon-ui/references/components/site-header.md +303 -0
- package/dist/skills/zon-ui/references/components/skeleton.md +256 -0
- package/dist/skills/zon-ui/references/components/slider.md +172 -0
- package/dist/skills/zon-ui/references/components/sortable.md +405 -0
- package/dist/skills/zon-ui/references/components/sources.md +106 -0
- package/dist/skills/zon-ui/references/components/spinner.md +222 -0
- package/dist/skills/zon-ui/references/components/stat.md +267 -0
- package/dist/skills/zon-ui/references/components/stepper.md +285 -0
- package/dist/skills/zon-ui/references/components/suggestions.md +146 -0
- package/dist/skills/zon-ui/references/components/swipe-actions.md +344 -0
- package/dist/skills/zon-ui/references/components/switch.md +160 -0
- package/dist/skills/zon-ui/references/components/table.md +999 -0
- package/dist/skills/zon-ui/references/components/tabs.md +258 -0
- package/dist/skills/zon-ui/references/components/tag.md +115 -0
- package/dist/skills/zon-ui/references/components/tags-input.md +216 -0
- package/dist/skills/zon-ui/references/components/textarea.md +95 -0
- package/dist/skills/zon-ui/references/components/theme-editor.md +3940 -0
- package/dist/skills/zon-ui/references/components/theme.md +362 -0
- package/dist/skills/zon-ui/references/components/time-field.md +222 -0
- package/dist/skills/zon-ui/references/components/timeline.md +285 -0
- package/dist/skills/zon-ui/references/components/tippy.md +243 -0
- package/dist/skills/zon-ui/references/components/toast.md +220 -0
- package/dist/skills/zon-ui/references/components/toggle-group.md +261 -0
- package/dist/skills/zon-ui/references/components/toggle.md +167 -0
- package/dist/skills/zon-ui/references/components/tool-call.md +146 -0
- package/dist/skills/zon-ui/references/components/toolbar.md +260 -0
- package/dist/skills/zon-ui/references/components/tooltip.md +172 -0
- package/dist/skills/zon-ui/references/components/tour.md +423 -0
- package/dist/skills/zon-ui/references/components/tree.md +481 -0
- package/dist/skills/zon-ui/references/components/typography.md +347 -0
- package/dist/skills/zon-ui/references/components/video-player.md +386 -0
- package/dist/skills/zon-ui/references/marketing.md +467 -0
- package/dist/skills/zon-ui/references/motion.md +455 -0
- package/dist/skills/zon-ui/references/recipes.md +1232 -0
- package/dist/skills/zon-ui/references/tokens.md +866 -0
- package/dist/sources/accordion.css +4 -0
- package/dist/sources/action-sheet.css +11 -0
- package/dist/sources/alert-dialog.css +6 -0
- package/dist/sources/alert.css +3 -0
- package/dist/sources/app-bar.css +14 -0
- package/dist/sources/ascii-field.css +3 -0
- package/dist/sources/aspect-ratio.css +3 -0
- package/dist/sources/audio-player.css +20 -0
- package/dist/sources/avatar.css +3 -0
- package/dist/sources/badge.css +3 -0
- package/dist/sources/bottom-nav.css +9 -0
- package/dist/sources/breadcrumb.css +14 -0
- package/dist/sources/button-group.css +3 -0
- package/dist/sources/button.css +9 -0
- package/dist/sources/calendar.css +13 -0
- package/dist/sources/card.css +3 -0
- package/dist/sources/carousel.css +11 -0
- package/dist/sources/chart.css +5 -0
- package/dist/sources/checkbox.css +6 -0
- package/dist/sources/code-block.css +13 -0
- package/dist/sources/collapsible.css +4 -0
- package/dist/sources/color-picker.css +13 -0
- package/dist/sources/combobox.css +13 -0
- package/dist/sources/command.css +13 -0
- package/dist/sources/context-menu.css +12 -0
- package/dist/sources/conversation.css +10 -0
- package/dist/sources/copy-button.css +10 -0
- package/dist/sources/data-table.css +27 -0
- package/dist/sources/date-picker.css +20 -0
- package/dist/sources/dialog.css +9 -0
- package/dist/sources/direction.css +2 -0
- package/dist/sources/drawer.css +9 -0
- package/dist/sources/drawing.css +5 -0
- package/dist/sources/empty.css +3 -0
- package/dist/sources/feature-list.css +4 -0
- package/dist/sources/field.css +4 -0
- package/dist/sources/file-drop.css +15 -0
- package/dist/sources/filter-bar.css +30 -0
- package/dist/sources/form.css +4 -0
- package/dist/sources/graph.css +19 -0
- package/dist/sources/illustration.css +28 -0
- package/dist/sources/input-group.css +7 -0
- package/dist/sources/input.css +3 -0
- package/dist/sources/item.css +4 -0
- package/dist/sources/kbd.css +5 -0
- package/dist/sources/label.css +3 -0
- package/dist/sources/layout.css +3 -0
- package/dist/sources/lightbox.css +33 -0
- package/dist/sources/locale.css +2 -0
- package/dist/sources/logo.css +4 -0
- package/dist/sources/markdown-editor.css +41 -0
- package/dist/sources/mentions.css +13 -0
- package/dist/sources/menu.css +11 -0
- package/dist/sources/menubar.css +14 -0
- package/dist/sources/message.css +16 -0
- package/dist/sources/meter.css +4 -0
- package/dist/sources/money-input.css +10 -0
- package/dist/sources/native-select.css +4 -0
- package/dist/sources/navigation-menu.css +8 -0
- package/dist/sources/number-field.css +8 -0
- package/dist/sources/number-roll.css +6 -0
- package/dist/sources/otp-field.css +5 -0
- package/dist/sources/pagination.css +11 -0
- package/dist/sources/pdf-viewer.css +30 -0
- package/dist/sources/phone-input.css +20 -0
- package/dist/sources/popover.css +7 -0
- package/dist/sources/preview-card.css +7 -0
- package/dist/sources/progress.css +4 -0
- package/dist/sources/prompt-input.css +15 -0
- package/dist/sources/pull-to-refresh.css +14 -0
- package/dist/sources/quote.css +3 -0
- package/dist/sources/radio-group.css +5 -0
- package/dist/sources/rating.css +6 -0
- package/dist/sources/reasoning.css +6 -0
- package/dist/sources/resizable.css +4 -0
- package/dist/sources/response.css +16 -0
- package/dist/sources/scheduler.css +44 -0
- package/dist/sources/scroll-area.css +3 -0
- package/dist/sources/select.css +12 -0
- package/dist/sources/separator.css +3 -0
- package/dist/sources/sidebar.css +19 -0
- package/dist/sources/site-header.css +15 -0
- package/dist/sources/skeleton.css +3 -0
- package/dist/sources/slider.css +6 -0
- package/dist/sources/sortable.css +12 -0
- package/dist/sources/sources.css +6 -0
- package/dist/sources/spinner.css +6 -0
- package/dist/sources/stat.css +9 -0
- package/dist/sources/stepper.css +6 -0
- package/dist/sources/suggestions.css +10 -0
- package/dist/sources/swipe-actions.css +20 -0
- package/dist/sources/switch.css +5 -0
- package/dist/sources/table.css +7 -0
- package/dist/sources/tabs.css +5 -0
- package/dist/sources/tag.css +3 -0
- package/dist/sources/tags-input.css +6 -0
- package/dist/sources/textarea.css +3 -0
- package/dist/sources/theme.css +13 -0
- package/dist/sources/time-field.css +7 -0
- package/dist/sources/timeline.css +7 -0
- package/dist/sources/tippy.css +6 -0
- package/dist/sources/toast.css +6 -0
- package/dist/sources/toggle-group.css +5 -0
- package/dist/sources/toggle.css +3 -0
- package/dist/sources/tool-call.css +16 -0
- package/dist/sources/toolbar.css +14 -0
- package/dist/sources/tooltip.css +6 -0
- package/dist/sources/tour.css +14 -0
- package/dist/sources/tree.css +6 -0
- package/dist/sources/typography.css +4 -0
- package/dist/sources/video-player.css +21 -0
- package/dist/styles/ai.css +3 -0
- package/dist/styles/brand.css +98 -0
- package/dist/styles/core.css +266 -0
- package/dist/styles/editor.css +3 -0
- package/dist/styles/expressive.css +75 -77
- package/dist/styles/fonts.css +61 -117
- package/dist/styles/graph.css +4 -0
- package/dist/styles/illustration.css +4 -0
- package/dist/styles/index.css +11 -193
- package/dist/styles/material.css +177 -31
- package/dist/styles/parts/ai.css +20 -14
- package/dist/styles/parts/brand.css +2 -2
- package/dist/styles/parts/controls.css +51 -38
- package/dist/styles/parts/data.css +43 -11
- package/dist/styles/parts/editor.css +372 -0
- package/dist/styles/parts/feedback.css +75 -15
- package/dist/styles/parts/foundations.css +12 -7
- package/dist/styles/parts/graph.css +25 -9
- package/dist/styles/parts/inputs.css +172 -9
- package/dist/styles/parts/isometric.css +6 -5
- package/dist/styles/parts/navigation.css +237 -25
- package/dist/styles/parts/overlays.css +110 -8
- package/dist/styles/parts/pdf.css +15 -9
- package/dist/styles/pdf.css +3 -0
- package/dist/styles/prose.css +3 -0
- package/dist/styles/tokens.css +105 -15
- package/dist/theme.d.ts +1 -0
- package/dist/theme.js +5 -0
- package/dist/vite.d.ts +48 -59
- package/dist/vite.js +54 -21
- package/package.json +69 -2
|
@@ -0,0 +1,866 @@
|
|
|
1
|
+
# Tokens and material utilities
|
|
2
|
+
|
|
3
|
+
Use utilities generated from these tokens (`bg-control-hover`, `text-foreground-soft`,
|
|
4
|
+
`border-field-edge`, `rounded-button`, `min-h-(--control-h)` …) rather than literal values.
|
|
5
|
+
|
|
6
|
+
## tokens.css
|
|
7
|
+
|
|
8
|
+
```css
|
|
9
|
+
/*
|
|
10
|
+
* zon tokens — the single source of truth for colour, material, geometry and motion.
|
|
11
|
+
*
|
|
12
|
+
* Light is the default (:root). Dark applies under `.dark` / `[data-theme="dark"]`.
|
|
13
|
+
* `.theme-dark` / `.theme-light` force a scheme locally (e.g. a night footer on a light page).
|
|
14
|
+
*
|
|
15
|
+
* Surfaces, controls and type are monochrome. Colour carries meaning, in small marks: four status
|
|
16
|
+
* colours (`--success`, `--warning`, `--info`, `--destructive`) and six category tones
|
|
17
|
+
* (`--tone-*`) for things people need to tell apart. Never decoration, never a fill for a button,
|
|
18
|
+
* a card or a page. Every colour reads at 4.5:1 or better as text on the grey grounds of its own
|
|
19
|
+
* theme: the page, a card, a raised surface, a menu and --control-hover, the hovered and selected
|
|
20
|
+
* fill (a selected table row).
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
:root,
|
|
24
|
+
.theme-light {
|
|
25
|
+
color-scheme: light;
|
|
26
|
+
|
|
27
|
+
/* ── Canvas & ink ─────────────────────────────────────────── */
|
|
28
|
+
--background: oklch(0.99 0 0);
|
|
29
|
+
--foreground: oklch(0.145 0 0);
|
|
30
|
+
--foreground-soft: oklch(0.37 0 0);
|
|
31
|
+
--muted-foreground: oklch(0.556 0 0);
|
|
32
|
+
--card: oklch(1 0 0);
|
|
33
|
+
--card-foreground: oklch(0.145 0 0);
|
|
34
|
+
--popover: oklch(1 0 0);
|
|
35
|
+
--popover-foreground: oklch(0.145 0 0);
|
|
36
|
+
--primary: oklch(0.205 0 0);
|
|
37
|
+
--primary-foreground: oklch(0.985 0 0);
|
|
38
|
+
--secondary: oklch(0.97 0 0);
|
|
39
|
+
--secondary-foreground: oklch(0.205 0 0);
|
|
40
|
+
--muted: oklch(0.97 0 0);
|
|
41
|
+
--accent: oklch(0.97 0 0);
|
|
42
|
+
/* Dark enough to keep 4.5:1 on --control-hover (#ebebeb). Success and destructive keep their
|
|
43
|
+
hue at the edge of sRGB, the most chroma an sRGB screen shows at this lightness. */
|
|
44
|
+
--destructive: oklch(0.55 0.224 27.325); /* errors, failed, destructive actions */
|
|
45
|
+
--success: oklch(0.505 0.133 152); /* saved, sent, connected, complete */
|
|
46
|
+
--warning: oklch(0.53 0.12 65); /* needs attention soon: nearly full, partial, expiring */
|
|
47
|
+
--info: oklch(0.52 0.15 250); /* neutral news: selected, unsaved, in progress, new */
|
|
48
|
+
|
|
49
|
+
/* ── Category tones ───────────────────────────────────────── */
|
|
50
|
+
/* No fixed meaning: the app decides what each stands for (a type, a phase, a kind), and keeps
|
|
51
|
+
it the same everywhere. About the lightness of the status colours, so none shouts, and like
|
|
52
|
+
them dark enough to keep 4.5:1 as text on --control-hover. Blue is info's colour; orange keeps
|
|
53
|
+
its hue at the edge of sRGB. */
|
|
54
|
+
--tone-blue: oklch(0.52 0.15 250);
|
|
55
|
+
--tone-aqua: oklch(0.51 0.09 195);
|
|
56
|
+
--tone-violet: oklch(0.53 0.17 300);
|
|
57
|
+
--tone-magenta: oklch(0.54 0.2 340);
|
|
58
|
+
--tone-orange: oklch(0.535 0.153 45);
|
|
59
|
+
--tone-lime: oklch(0.51 0.13 130);
|
|
60
|
+
--border: oklch(0.922 0 0);
|
|
61
|
+
--input: oklch(0.922 0 0);
|
|
62
|
+
--ring: oklch(0.708 0 0);
|
|
63
|
+
|
|
64
|
+
/* ── Material: controls ───────────────────────────────────── */
|
|
65
|
+
--control-surface: #f5f5f5; /* resting fill of secondary/raised surfaces */
|
|
66
|
+
--control-hover: #ebebeb; /* hovered / current fill — never use surface for this */
|
|
67
|
+
--control-pressed: #e4e4e4; /* a raised control held down: a step below hover */
|
|
68
|
+
--control-edge: #0000002e; /* fine outer stroke */
|
|
69
|
+
--control-highlight: #ffffffe6; /* inset top highlight */
|
|
70
|
+
--control-inner-edge: #00000009; /* inner hairline + top shading */
|
|
71
|
+
--control-menu: #fafafa; /* menus, popovers, toasts */
|
|
72
|
+
--control-muted: #737373; /* placeholder, inactive segment text */
|
|
73
|
+
--control-focus: #737373; /* 2px flush focus outline */
|
|
74
|
+
--control-thumb: #ffffff; /* switch/slider thumb at rest */
|
|
75
|
+
--control-thumb-on: #ffffff; /* thumb on a primary-filled (checked) track */
|
|
76
|
+
|
|
77
|
+
/* Internal geometry: controls nested inside a field (steppers, clear buttons, chips, addon
|
|
78
|
+
buttons). Not steps on the 30/38/46 scale — they are the field height minus its inset, so a
|
|
79
|
+
theme that changes the heights moves them too. A theme that sets the heights on part of a page
|
|
80
|
+
sets these there as well: computed here, they follow only the heights on :root. */
|
|
81
|
+
--control-inset: calc(var(--control-h) - 8px); /* 30px inside a 38px field (3px inset + 1px border) */
|
|
82
|
+
--control-inset-sm: calc(var(--control-h-sm) - 6px); /* 24px inside a 30px dense field */
|
|
83
|
+
|
|
84
|
+
/* ── Material: fields (recessed) ──────────────────────────── */
|
|
85
|
+
--field-surface: #ffffff;
|
|
86
|
+
--field-edge: #d4d4d4;
|
|
87
|
+
--field-inset: #00000009;
|
|
88
|
+
|
|
89
|
+
/* ── Material: primary (layered, not flat) ────────────────── */
|
|
90
|
+
--primary-fill: #292929;
|
|
91
|
+
--primary-fill-hover: #383838;
|
|
92
|
+
--primary-fill-pressed: #232323; /* the primary held down: a step below rest */
|
|
93
|
+
--primary-text: #fafafa;
|
|
94
|
+
--primary-text-shadow: 0 1px 1px #0003;
|
|
95
|
+
--primary-shadow:
|
|
96
|
+
0 4px 4px #2a2a2a33, 0 0 0 1px #0e0e0e, inset 0 4px 6px #fff3, inset 0 0 0 1px #ffffff26,
|
|
97
|
+
inset 0 -8px 14px #00000026;
|
|
98
|
+
/* Pressed: the same five layers as --primary-shadow, in the same order, so a press animates
|
|
99
|
+
(lists that do not line up swap at once): the drop shadow and the bottom shading fade out,
|
|
100
|
+
the top light turns into a dark inset. */
|
|
101
|
+
--primary-shadow-pressed:
|
|
102
|
+
0 0 0 #2a2a2a00, 0 0 0 1px #0e0e0e, inset 0 2px 6px #0000004d, inset 0 0 0 1px #ffffff1a,
|
|
103
|
+
inset 0 -8px 14px #00000000;
|
|
104
|
+
|
|
105
|
+
/* ── Drawing: grids, guides, light ────────────────────────── */
|
|
106
|
+
--grid-line: #0a0a0a0f;
|
|
107
|
+
--grid-bright: #0a0a0a42;
|
|
108
|
+
--guide: #0a0a0a29;
|
|
109
|
+
--ink-ghost: #0a0a0a14;
|
|
110
|
+
--glow: #fffffff2;
|
|
111
|
+
--grain-opacity: 0.35;
|
|
112
|
+
/* The page ground's light and grain, drawn by brand.css (zon.sh's look) and by the bars that
|
|
113
|
+
stand on the ground (surface-page, SiteHeader, BottomNav). Off here: without brand.css the
|
|
114
|
+
ground is plain --background. brand.css sets them in each theme. */
|
|
115
|
+
--page-glow: transparent;
|
|
116
|
+
/* Overlay and screen vanish on a light ground: the page grain multiplies there instead. */
|
|
117
|
+
--page-grain-blend: multiply;
|
|
118
|
+
--page-grain-opacity: 0;
|
|
119
|
+
--page-grain-screen: 0;
|
|
120
|
+
/* The page ground as one flat colour: what zon.sh's grain over --background averages to. The
|
|
121
|
+
browser's own bars take it (theme-color, kept in step by themeScript and ThemeProvider), and
|
|
122
|
+
with brand.css so does whatever of the page the browser shows past its edges. Re-measure
|
|
123
|
+
when the background or the grain changes. */
|
|
124
|
+
--page-tone: #f9f9f9;
|
|
125
|
+
|
|
126
|
+
/* ── Isometric illustrations (<Illustration name="iso/…">) ───────────── */
|
|
127
|
+
|
|
128
|
+
/* ── Data ─────────────────────────────────────────────────── */
|
|
129
|
+
--chart-1: oklch(0.205 0 0);
|
|
130
|
+
--chart-2: oklch(0.38 0 0);
|
|
131
|
+
--chart-3: oklch(0.52 0 0);
|
|
132
|
+
--chart-4: oklch(0.66 0 0);
|
|
133
|
+
--chart-5: oklch(0.8 0 0);
|
|
134
|
+
|
|
135
|
+
/* ── Type ─────────────────────────────────────────────────── */
|
|
136
|
+
/* Each face's fallback is sized to it (fonts.css): text holds still when Licht arrives. */
|
|
137
|
+
--font-heading: "Licht", "Licht Fallback", "Iowan Old Style", Georgia, serif;
|
|
138
|
+
--font-body: "Licht Sans", "Licht Sans Fallback", ui-sans-serif, system-ui, sans-serif;
|
|
139
|
+
--font-mono: "Licht Mono", "Licht Mono Fallback", ui-monospace, "SF Mono", monospace;
|
|
140
|
+
|
|
141
|
+
/* ── Geometry ─────────────────────────────────────────────── */
|
|
142
|
+
--radius-button: 12px; /* text buttons, menus, toasts, nav rows, panels */
|
|
143
|
+
--radius-control: 10px; /* inputs, textareas, select triggers */
|
|
144
|
+
--radius-item: 7px; /* select/menu items, segments, tags, swatches */
|
|
145
|
+
--radius-checkbox: 5px;
|
|
146
|
+
--radius-card: 20px; /* objects: cards, tables, form panels */
|
|
147
|
+
--radius-region: 0px; /* regions are square */
|
|
148
|
+
|
|
149
|
+
--control-h-sm: 30px; /* dense */
|
|
150
|
+
--control-h: 38px; /* default */
|
|
151
|
+
--control-h-lg: 46px; /* prominent */
|
|
152
|
+
--icon-button: calc(var(--control-h) - 2px); /* the round icon button, 2px under the default height: 36px */
|
|
153
|
+
|
|
154
|
+
/* ── Control parts ────────────────────────────────────────── */
|
|
155
|
+
/* The fixed sizes of the small parts: zon's values, kept out of --density (a tick box or a key
|
|
156
|
+
cap stays the size the eye and the finger know). The tracks and the scroll thumb are the
|
|
157
|
+
exception: they were Tailwind steps and still scale with --density, from these values. A
|
|
158
|
+
theme can set any of them; theme.md lists them. */
|
|
159
|
+
--focus-width: 2px; /* every focus outline */
|
|
160
|
+
--check-size: 18px; /* checkbox and radio */
|
|
161
|
+
--touch-target: 44px; /* the least a finger hits on a coarse pointer (`touch-target`) */
|
|
162
|
+
--switch-w: 38px; /* switch track */
|
|
163
|
+
--switch-h: 22px;
|
|
164
|
+
--switch-thumb: 18px; /* its thumb; pressed, it stretches 7px */
|
|
165
|
+
--slider-thumb: 18px; /* slider, media scrubber and colour picker handles */
|
|
166
|
+
--track-h: calc(var(--zon-spacing) * 1.5); /* 6px: slider, progress and meter tracks (× --density) */
|
|
167
|
+
--badge-h-sm: 16px; /* badge, size sm */
|
|
168
|
+
--badge-h: 20px; /* badge, default size */
|
|
169
|
+
--kbd-h: 20px; /* key cap */
|
|
170
|
+
--tag-h: 22px;
|
|
171
|
+
--scroll-thumb: var(--zon-spacing); /* 4px: the ScrollArea thumb (× --density) */
|
|
172
|
+
--hairline-opacity: 60%; /* a component's hairline rule: --border at this strength */
|
|
173
|
+
--card-space: 24px; /* surface-card padding: on a phone, */
|
|
174
|
+
--card-space-sm: 32px; /* from 40rem */
|
|
175
|
+
--card-space-md: 40px; /* and from 48rem */
|
|
176
|
+
--drag-lift: 1.02; /* the scale of a dragged item */
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
--container: 80rem;
|
|
180
|
+
--gutter: 24px;
|
|
181
|
+
--section-pad: clamp(3.5rem, 7vw, 7rem);
|
|
182
|
+
|
|
183
|
+
/* ── Motion (docs/motion.md) ──────────────────────────────── */
|
|
184
|
+
/* Entering, leaving and colour: a strong ease-out, quick to start. */
|
|
185
|
+
--ease: cubic-bezier(0.16, 1, 0.3, 1);
|
|
186
|
+
/* What travels under the pointer's eye and lands softly: the gliding indicators, a height that
|
|
187
|
+
opens, a value that follows the pointer. A milder ease-out, so a long glide does not jump. */
|
|
188
|
+
--ease-glide: cubic-bezier(0.33, 1, 0.68, 1);
|
|
189
|
+
/* A move the interface makes from A to B on its own, and loops: ease in and out. */
|
|
190
|
+
--ease-move: cubic-bezier(0.77, 0, 0.175, 1);
|
|
191
|
+
/* A small mark that lands with a little give: overshoots its size, then settles (a stepper's
|
|
192
|
+
check, BottomNav's icon springing back). Only for a mark a few pixels across. */
|
|
193
|
+
--ease-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
194
|
+
/* Something going away that nobody is watching (a bar sliding off as the page scrolls): starts
|
|
195
|
+
gently and goes. Never on something someone did. */
|
|
196
|
+
--ease-in: cubic-bezier(0.32, 0, 0.67, 0);
|
|
197
|
+
--duration: 150ms;
|
|
198
|
+
/* Every gliding indicator, one speed. */
|
|
199
|
+
--duration-glide: calc(var(--duration) * 1.6);
|
|
200
|
+
/* Leaving is quicker than arriving. */
|
|
201
|
+
--duration-exit: calc(var(--duration) * 0.7);
|
|
202
|
+
/* Opacity and colour only: kept under reduced motion, which drops movement, not every change. */
|
|
203
|
+
--duration-fade: 150ms;
|
|
204
|
+
--duration-reveal: 420ms;
|
|
205
|
+
/* Decoration's long settle: which part of an illustration is lit, the blueprint's light under
|
|
206
|
+
the pointer. Never for anything that answers an action. */
|
|
207
|
+
--duration-settle: 700ms;
|
|
208
|
+
|
|
209
|
+
/* ── The zon mark ─────────────────────────────────────────── */
|
|
210
|
+
/* One flat colour: the ink of zon.sh/logo-ink.svg here, the light of logo.svg on dark grounds. */
|
|
211
|
+
--logo: #141414;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
:root {
|
|
215
|
+
/* How dense the whole interface is: 1 is zon's, a theme sets it with its control heights (0.79 for
|
|
216
|
+
30px controls, 1.21 for 46px). The library's parts scale their padding, gaps and Tailwind sizes
|
|
217
|
+
by it, and the type by half as much (--type) — see core.css. Your own layout keeps Tailwind's
|
|
218
|
+
step, captured here as --zon-spacing before the parts redefine it. */
|
|
219
|
+
--density: 1;
|
|
220
|
+
--type: calc(1 + (var(--density) - 1) / 2);
|
|
221
|
+
--space: min(var(--density), var(--type));
|
|
222
|
+
--zon-spacing: var(--spacing, 0.25rem);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/* The primary's edges, from its fill: zon's grey fill gives the values above, a coloured one
|
|
226
|
+
(a theme's own --primary-fill) an outer line and highlights in its own hue, never a grey or white
|
|
227
|
+
ring around it. Behind @supports: a browser without relative colours would drop the shadow. */
|
|
228
|
+
@supports (color: oklch(from red l c h)) {
|
|
229
|
+
:root,
|
|
230
|
+
.theme-light {
|
|
231
|
+
--primary-shadow:
|
|
232
|
+
0 4px 4px #2a2a2a33, 0 0 0 1px oklch(from var(--primary-fill) min(l, 0.2) c h), inset 0 4px 6px #fff3,
|
|
233
|
+
inset 0 0 0 1px #ffffff26, inset 0 -8px 14px #00000026;
|
|
234
|
+
--primary-shadow-pressed:
|
|
235
|
+
0 0 0 #2a2a2a00, 0 0 0 1px oklch(from var(--primary-fill) min(l, 0.2) c h), inset 0 2px 6px #0000004d,
|
|
236
|
+
inset 0 0 0 1px #ffffff1a, inset 0 -8px 14px #00000000;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/* A night region (.theme-night, below) takes every dark token too, then deepens the ground and
|
|
241
|
+
inks; otherwise a primary, a card or a chart inside it on a light page would keep light values. */
|
|
242
|
+
.dark,
|
|
243
|
+
[data-theme="dark"],
|
|
244
|
+
.theme-dark,
|
|
245
|
+
.theme-night {
|
|
246
|
+
color-scheme: dark;
|
|
247
|
+
|
|
248
|
+
--background: oklch(0.07 0 0);
|
|
249
|
+
--foreground: oklch(0.985 0 0);
|
|
250
|
+
--foreground-soft: oklch(0.75 0 0);
|
|
251
|
+
--muted-foreground: oklch(0.66 0 0);
|
|
252
|
+
--card: oklch(0.115 0 0);
|
|
253
|
+
--card-foreground: oklch(0.985 0 0);
|
|
254
|
+
--popover: oklch(0.115 0 0);
|
|
255
|
+
--popover-foreground: oklch(0.985 0 0);
|
|
256
|
+
--primary: oklch(0.985 0 0);
|
|
257
|
+
--primary-foreground: oklch(0.145 0 0);
|
|
258
|
+
--secondary: oklch(0.16 0 0);
|
|
259
|
+
--secondary-foreground: oklch(0.985 0 0);
|
|
260
|
+
--muted: oklch(0.155 0 0);
|
|
261
|
+
--accent: oklch(0.18 0 0);
|
|
262
|
+
--accent-foreground: oklch(0.985 0 0);
|
|
263
|
+
--destructive: oklch(0.704 0.191 22.216);
|
|
264
|
+
--success: oklch(0.76 0.16 152);
|
|
265
|
+
--warning: oklch(0.78 0.15 75);
|
|
266
|
+
--info: oklch(0.74 0.14 245);
|
|
267
|
+
--tone-blue: oklch(0.74 0.14 245);
|
|
268
|
+
--tone-aqua: oklch(0.78 0.12 195);
|
|
269
|
+
--tone-violet: oklch(0.75 0.15 300);
|
|
270
|
+
--tone-magenta: oklch(0.74 0.18 340);
|
|
271
|
+
--tone-orange: oklch(0.76 0.15 50);
|
|
272
|
+
--tone-lime: oklch(0.8 0.16 130);
|
|
273
|
+
--border: oklch(1 0 0 / 10%);
|
|
274
|
+
--input: oklch(1 0 0 / 14%);
|
|
275
|
+
--ring: oklch(0.556 0 0);
|
|
276
|
+
|
|
277
|
+
--control-surface: #1e1e1e;
|
|
278
|
+
--control-hover: #2a2a2a;
|
|
279
|
+
--control-pressed: #1e1e1e;
|
|
280
|
+
--control-edge: #000000a6;
|
|
281
|
+
--control-highlight: #ffffff1a;
|
|
282
|
+
--control-inner-edge: #ffffff0f;
|
|
283
|
+
--control-menu: #1e1e1e;
|
|
284
|
+
--control-muted: #a3a3a3;
|
|
285
|
+
--control-focus: #999999;
|
|
286
|
+
--control-thumb: #8f8f8f; /* light enough to read on the #161616 track */
|
|
287
|
+
--control-thumb-on: #1c1c1c; /* dark thumb on the near-white checked track */
|
|
288
|
+
|
|
289
|
+
--field-surface: #161616;
|
|
290
|
+
--field-edge: #393939;
|
|
291
|
+
--field-inset: #00000038;
|
|
292
|
+
|
|
293
|
+
/* The dark primary mirrors the light one by perceived contrast (OKLab L), not by inverting
|
|
294
|
+
* colours: the fill sits as far from the page as #292929 does in light mode, and leaves the
|
|
295
|
+
* white glow and rim the same headroom to read (+0.16 / +0.14 L). A fill near white (#ededed)
|
|
296
|
+
* left them nowhere to go and the button went flat. Hover brightens only a little, for the
|
|
297
|
+
* same reason. */
|
|
298
|
+
--primary-fill: #cbcbcb;
|
|
299
|
+
--primary-fill-hover: #d5d5d5;
|
|
300
|
+
--primary-fill-pressed: #b9b9b9;
|
|
301
|
+
--primary-text: #171717;
|
|
302
|
+
--primary-text-shadow: 0 1px 0 #ffffffb3;
|
|
303
|
+
--primary-shadow:
|
|
304
|
+
0 4px 4px #00000073, 0 0 0 1px #000000, inset 0 4px 7px #ffffff, inset 0 0 0 1px #ffffffe6,
|
|
305
|
+
inset 0 -8px 14px #0000000b;
|
|
306
|
+
--primary-shadow-pressed:
|
|
307
|
+
0 0 0 #00000000, 0 0 0 1px #000000, inset 0 2px 6px #00000059, inset 0 0 0 1px #ffffff66,
|
|
308
|
+
inset 0 -8px 14px #00000000;
|
|
309
|
+
|
|
310
|
+
--grid-line: #ffffff0d;
|
|
311
|
+
--grid-bright: #ffffff38;
|
|
312
|
+
--guide: #ffffff29;
|
|
313
|
+
--ink-ghost: #ffffff12;
|
|
314
|
+
--glow: #ffffff1f;
|
|
315
|
+
--grain-opacity: 0.55;
|
|
316
|
+
--page-grain-blend: overlay;
|
|
317
|
+
--page-tone: #141414;
|
|
318
|
+
|
|
319
|
+
/* re-declared so var(--background) resolves inside dark regions, not at :root */
|
|
320
|
+
|
|
321
|
+
--chart-1: oklch(0.985 0 0);
|
|
322
|
+
--chart-2: oklch(0.8 0 0);
|
|
323
|
+
--chart-3: oklch(0.66 0 0);
|
|
324
|
+
--chart-4: oklch(0.52 0 0);
|
|
325
|
+
--chart-5: oklch(0.38 0 0);
|
|
326
|
+
|
|
327
|
+
--logo: #f6f6f4;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
@supports (color: oklch(from red l c h)) {
|
|
331
|
+
.dark,
|
|
332
|
+
[data-theme="dark"],
|
|
333
|
+
.theme-dark,
|
|
334
|
+
.theme-night {
|
|
335
|
+
--primary-shadow:
|
|
336
|
+
0 4px 4px #00000073, 0 0 0 1px #000000, inset 0 4px 7px oklch(from var(--primary-fill) calc(l + 0.17) calc(c * 0.8) h),
|
|
337
|
+
inset 0 0 0 1px oklch(from var(--primary-fill) calc(l + 0.17) calc(c * 0.8) h / 0.9), inset 0 -8px 14px #0000000b;
|
|
338
|
+
--primary-shadow-pressed:
|
|
339
|
+
0 0 0 #00000000, 0 0 0 1px #000000, inset 0 2px 6px #00000059,
|
|
340
|
+
inset 0 0 0 1px oklch(from var(--primary-fill-pressed) calc(l + 0.1) calc(c * 0.8) h), inset 0 -8px 14px #00000000;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
/* Night: the deepest ground, for a closing section on a marketing page and dark specimen sheets. On top of the dark
|
|
345
|
+
tokens; later in the file, so these win. */
|
|
346
|
+
.theme-night {
|
|
347
|
+
color-scheme: dark;
|
|
348
|
+
--background: #040404;
|
|
349
|
+
--destructive: oklch(0.704 0.191 22.216);
|
|
350
|
+
--success: oklch(0.76 0.16 152);
|
|
351
|
+
--warning: oklch(0.78 0.15 75);
|
|
352
|
+
--info: oklch(0.74 0.14 245);
|
|
353
|
+
--tone-blue: oklch(0.74 0.14 245);
|
|
354
|
+
--tone-aqua: oklch(0.78 0.12 195);
|
|
355
|
+
--tone-violet: oklch(0.75 0.15 300);
|
|
356
|
+
--tone-magenta: oklch(0.74 0.18 340);
|
|
357
|
+
--tone-orange: oklch(0.76 0.15 50);
|
|
358
|
+
--tone-lime: oklch(0.8 0.16 130);
|
|
359
|
+
--foreground: #fafafa;
|
|
360
|
+
--foreground-soft: #aeaeae;
|
|
361
|
+
--muted-foreground: #929292;
|
|
362
|
+
--border: #ffffff1a;
|
|
363
|
+
--control-surface: #1e1e1e;
|
|
364
|
+
--control-hover: #2a2a2a;
|
|
365
|
+
--control-pressed: #1e1e1e;
|
|
366
|
+
--control-edge: #000000a6;
|
|
367
|
+
--control-highlight: #ffffff1a;
|
|
368
|
+
--control-inner-edge: #ffffff0f;
|
|
369
|
+
--control-focus: #999999;
|
|
370
|
+
--control-thumb: #8f8f8f;
|
|
371
|
+
--control-thumb-on: #1c1c1c;
|
|
372
|
+
--field-surface: #161616;
|
|
373
|
+
--field-edge: #393939;
|
|
374
|
+
--field-inset: #00000038;
|
|
375
|
+
--grid-line: #ffffff0d;
|
|
376
|
+
--grid-bright: #ffffff38;
|
|
377
|
+
--guide: #ffffff29;
|
|
378
|
+
/* Lower than dark: on a #040404 ground the default reads as grey static. */
|
|
379
|
+
--grain-opacity: 0.3;
|
|
380
|
+
--page-grain-blend: overlay;
|
|
381
|
+
--page-tone: #0f0f0f;
|
|
382
|
+
|
|
383
|
+
--logo: #f6f6f4;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
/* .theme-light sets the durations again, so a forced light scope is named here too. */
|
|
387
|
+
@media (prefers-reduced-motion: reduce) {
|
|
388
|
+
:root,
|
|
389
|
+
.theme-light {
|
|
390
|
+
--duration: 0ms;
|
|
391
|
+
--duration-glide: 0ms;
|
|
392
|
+
--duration-exit: 0ms;
|
|
393
|
+
--duration-reveal: 0ms;
|
|
394
|
+
--duration-settle: 0ms;
|
|
395
|
+
/* --duration-fade stays: a fade is not movement, and things should not pop in and out. */
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
## material.css
|
|
401
|
+
|
|
402
|
+
```css
|
|
403
|
+
/*
|
|
404
|
+
* The zon material, as Tailwind utilities.
|
|
405
|
+
*
|
|
406
|
+
* Every interactive or enclosing surface uses one of these. Do not invent flat fills:
|
|
407
|
+
* material-primary — the layered dark (light mode) / light (dark mode) primary button
|
|
408
|
+
* material-raised — secondary buttons, nav rows, tabs, active segments, hoverable rows
|
|
409
|
+
* material-field — recessed inputs, textareas, select triggers, tracks
|
|
410
|
+
* material-menu — popups: menus, select lists, popovers, toasts, tooltips
|
|
411
|
+
* surface-container — regions: square, bordered, 160° gradient, inset highlight
|
|
412
|
+
* surface-card — objects: the container material + 20px radius + padding + soft lift
|
|
413
|
+
* surface-page — the page ground for a sticky bar content scrolls under (with brand.css,
|
|
414
|
+
* its grain and light too)
|
|
415
|
+
* touch-target — a 44px tap area around a small control on a touch screen, nothing drawn
|
|
416
|
+
* press-shade — the press of a flat row or tile: a shade of its ink on pointer-down
|
|
417
|
+
*
|
|
418
|
+
* State hooks are shared: Base UI's data attributes (data-pressed, data-highlighted,
|
|
419
|
+
* data-popup-open, data-active, data-selected) and ARIA (aria-current, aria-pressed).
|
|
420
|
+
*/
|
|
421
|
+
|
|
422
|
+
/* ── Focus ─────────────────────────────────────────────────────────────────── */
|
|
423
|
+
|
|
424
|
+
@utility focus-ring {
|
|
425
|
+
&:focus-visible {
|
|
426
|
+
outline: var(--focus-width) solid var(--control-focus);
|
|
427
|
+
outline-offset: 0;
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
/* ── Touch target ──────────────────────────────────────────────────────────── */
|
|
432
|
+
|
|
433
|
+
/*
|
|
434
|
+
* The fixed geometry draws controls under 44px — a 30px icon button, an 18px checkbox, a slider
|
|
435
|
+
* thumb. On a coarse pointer (a finger) `touch-target` widens what a tap hits to at least 44 ×
|
|
436
|
+
* 44px, centred on the control, with nothing drawn: an invisible ::before that the press lands on.
|
|
437
|
+
* A control already 44px or more keeps its own box. The control becomes the containing block
|
|
438
|
+
* (position: relative, from the base layer below, so `absolute`, `fixed` or `sticky` on the
|
|
439
|
+
* control still win); the area may reach past a neighbour, and the later one in the page takes a
|
|
440
|
+
* tap where two areas overlap. Use it on small, isolated controls; a grid of cells (calendar
|
|
441
|
+
* days) already tiles its area.
|
|
442
|
+
*/
|
|
443
|
+
@utility touch-target {
|
|
444
|
+
@media (pointer: coarse) {
|
|
445
|
+
&::before {
|
|
446
|
+
content: "";
|
|
447
|
+
position: absolute;
|
|
448
|
+
top: 50%;
|
|
449
|
+
left: 50%;
|
|
450
|
+
width: max(100%, var(--touch-target));
|
|
451
|
+
height: max(100%, var(--touch-target));
|
|
452
|
+
translate: -50% -50%;
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
@layer base {
|
|
458
|
+
@media (pointer: coarse) {
|
|
459
|
+
:where(.touch-target) {
|
|
460
|
+
position: relative;
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
/*
|
|
466
|
+
* The button materials end their transition list with --material-motion, a slot for what else a
|
|
467
|
+
* part animates (a collapsible Button's padding and corners). Its fallback is a no-op. The press
|
|
468
|
+
* states repeat it, so a press never cuts a fold short.
|
|
469
|
+
*/
|
|
470
|
+
|
|
471
|
+
/* ── Press shade ───────────────────────────────────────────────────────────── */
|
|
472
|
+
|
|
473
|
+
/*
|
|
474
|
+
* The press of a flat surface that has no material of its own to sink: a list row, an action
|
|
475
|
+
* sheet's choice, a swipe action's tile. Pressed, a shade of the ink comes over it in 90ms (0.6 ×
|
|
476
|
+
* --duration-fade) and eases off over 255ms (1.7 ×) when let go, as the materials do; a press that
|
|
477
|
+
* moves (a scroll, a swipe) lets go at once. It answers a button's `:active` and `data-pressing`, which
|
|
478
|
+
* lib/press.ts sets the moment a finger lands on an element marked `data-press` — before the
|
|
479
|
+
* browser is sure it is not a scroll — and takes away when it moves. Colour only, so it stays
|
|
480
|
+
* under reduced motion. The shade is drawn on ::after, over the surface and under nothing, so the
|
|
481
|
+
* element's own fill, tint and transitions are left alone; give the element a position.
|
|
482
|
+
*/
|
|
483
|
+
@utility press-shade {
|
|
484
|
+
-webkit-tap-highlight-color: transparent;
|
|
485
|
+
|
|
486
|
+
&::after {
|
|
487
|
+
content: "";
|
|
488
|
+
position: absolute;
|
|
489
|
+
inset: 0;
|
|
490
|
+
border-radius: inherit;
|
|
491
|
+
pointer-events: none;
|
|
492
|
+
/* The surface's own ink, faint: a grey row darkens, a red tile deepens its red. */
|
|
493
|
+
background-color: var(--press-shade, color-mix(in oklab, currentColor 10%, transparent));
|
|
494
|
+
opacity: 0;
|
|
495
|
+
transition: opacity calc(var(--duration-fade) * 1.7) var(--ease-glide);
|
|
496
|
+
}
|
|
497
|
+
/* :active only on the control itself: a row's :active would light it for a button inside. */
|
|
498
|
+
&:not(:disabled, [data-disabled], [aria-disabled="true"]):is(
|
|
499
|
+
:is(button, a[href]):active,
|
|
500
|
+
[data-pressing]
|
|
501
|
+
)::after {
|
|
502
|
+
opacity: 1;
|
|
503
|
+
transition-duration: calc(var(--duration-fade) * 0.6);
|
|
504
|
+
}
|
|
505
|
+
&[data-press-cancel]:not([data-pressing])::after {
|
|
506
|
+
transition-duration: 0s;
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
/* ── Primary ───────────────────────────────────────────────────────────────── */
|
|
511
|
+
|
|
512
|
+
@utility material-primary {
|
|
513
|
+
color: var(--primary-text);
|
|
514
|
+
text-shadow: var(--primary-text-shadow);
|
|
515
|
+
background-color: var(--primary-fill);
|
|
516
|
+
background-image: linear-gradient(#ffffff0f, transparent 55%);
|
|
517
|
+
border: 1px solid transparent;
|
|
518
|
+
box-shadow: var(--primary-shadow);
|
|
519
|
+
/* A press sinks in fast and rises back gently: the release eases over longer, on a softer curve
|
|
520
|
+
than the brand ease, so even a quick click is seen to press and settle. Fill and shadow are
|
|
521
|
+
fades (--duration-fade), so reduced motion keeps them: the press still shows. */
|
|
522
|
+
transition:
|
|
523
|
+
background-color calc(var(--duration-fade) * 1.7) var(--ease-glide),
|
|
524
|
+
color var(--duration-fade) var(--ease),
|
|
525
|
+
box-shadow calc(var(--duration-fade) * 1.7) var(--ease-glide),
|
|
526
|
+
var(--material-motion, padding 0s);
|
|
527
|
+
|
|
528
|
+
@media (hover: hover) {
|
|
529
|
+
&:not(:disabled, [data-disabled]):hover {
|
|
530
|
+
background-color: var(--primary-fill-hover);
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
&:not(:disabled, [data-disabled]):is(:active, [data-pressing]),
|
|
534
|
+
&[data-pressed] {
|
|
535
|
+
/* Pressed, the key goes down: its fill dips darker and the inset shadow takes the edge. */
|
|
536
|
+
background-color: var(--primary-fill-pressed);
|
|
537
|
+
box-shadow: var(--primary-shadow-pressed);
|
|
538
|
+
transition:
|
|
539
|
+
background-color calc(var(--duration-fade) * 0.6) var(--ease-glide),
|
|
540
|
+
color var(--duration-fade) var(--ease),
|
|
541
|
+
box-shadow calc(var(--duration-fade) * 0.6) var(--ease-glide),
|
|
542
|
+
var(--material-motion, padding 0s);
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
/* ── Raised (secondary) ────────────────────────────────────────────────────── */
|
|
547
|
+
|
|
548
|
+
@utility material-raised {
|
|
549
|
+
color: var(--foreground);
|
|
550
|
+
background-color: var(--control-surface);
|
|
551
|
+
background-image: linear-gradient(180deg, var(--control-inner-edge), transparent);
|
|
552
|
+
border: 1px solid transparent;
|
|
553
|
+
box-shadow:
|
|
554
|
+
0 0 0 1px var(--control-edge),
|
|
555
|
+
inset 0 1px 0 var(--control-highlight),
|
|
556
|
+
inset 0 0 0 1px var(--control-inner-edge);
|
|
557
|
+
/* A press sinks in fast and rises back gently: the release eases over longer, on a softer curve
|
|
558
|
+
than the brand ease, so even a quick click is seen to press and settle. Fill and shadow are
|
|
559
|
+
fades (--duration-fade), so reduced motion keeps them: the press still shows. */
|
|
560
|
+
transition:
|
|
561
|
+
background-color calc(var(--duration-fade) * 1.7) var(--ease-glide),
|
|
562
|
+
color var(--duration-fade) var(--ease),
|
|
563
|
+
box-shadow calc(var(--duration-fade) * 1.7) var(--ease-glide),
|
|
564
|
+
var(--material-motion, padding 0s);
|
|
565
|
+
|
|
566
|
+
@media (hover: hover) {
|
|
567
|
+
&:not(:disabled, [data-disabled]):hover {
|
|
568
|
+
background-color: var(--control-hover);
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
&:not(:disabled, [data-disabled]):is(:active, [data-pressing]) {
|
|
572
|
+
/* Pressed, the key goes down: a darker fill and a deeper inset, visible on a dark ground too. */
|
|
573
|
+
background-color: var(--control-pressed);
|
|
574
|
+
box-shadow:
|
|
575
|
+
0 0 0 1px var(--control-edge),
|
|
576
|
+
inset 0 2px 6px #00000047,
|
|
577
|
+
inset 0 0 0 1px var(--control-inner-edge);
|
|
578
|
+
transition:
|
|
579
|
+
background-color calc(var(--duration-fade) * 0.6) var(--ease-glide),
|
|
580
|
+
color var(--duration-fade) var(--ease),
|
|
581
|
+
box-shadow calc(var(--duration-fade) * 0.6) var(--ease-glide),
|
|
582
|
+
var(--material-motion, padding 0s);
|
|
583
|
+
}
|
|
584
|
+
&[data-popup-open] {
|
|
585
|
+
background-color: var(--control-hover);
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
/*
|
|
590
|
+
* Lift-on-interaction: a row that is flat at rest and takes the raised treatment when
|
|
591
|
+
* hovered, highlighted or current (nav rows, sidebar items, menu items, glyph cells).
|
|
592
|
+
*/
|
|
593
|
+
@utility material-row {
|
|
594
|
+
color: var(--foreground-soft);
|
|
595
|
+
border: 1px solid transparent;
|
|
596
|
+
background-color: transparent;
|
|
597
|
+
transition:
|
|
598
|
+
background-color var(--duration-fade) var(--ease),
|
|
599
|
+
color var(--duration-fade) var(--ease),
|
|
600
|
+
box-shadow var(--duration-fade) var(--ease),
|
|
601
|
+
var(--material-motion, padding 0s);
|
|
602
|
+
|
|
603
|
+
@media (hover: hover) {
|
|
604
|
+
&:not(:disabled, [data-disabled]):hover {
|
|
605
|
+
color: var(--foreground);
|
|
606
|
+
background-color: var(--control-hover);
|
|
607
|
+
background-image: linear-gradient(180deg, var(--control-inner-edge), transparent);
|
|
608
|
+
box-shadow:
|
|
609
|
+
0 0 0 1px var(--control-edge),
|
|
610
|
+
inset 0 1px 0 var(--control-highlight),
|
|
611
|
+
inset 0 0 0 1px var(--control-inner-edge);
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
&[data-highlighted],
|
|
615
|
+
&[data-current],
|
|
616
|
+
&[data-active],
|
|
617
|
+
&[aria-current="page"],
|
|
618
|
+
&[aria-current="true"] {
|
|
619
|
+
color: var(--foreground);
|
|
620
|
+
background-color: var(--control-hover);
|
|
621
|
+
background-image: linear-gradient(180deg, var(--control-inner-edge), transparent);
|
|
622
|
+
box-shadow:
|
|
623
|
+
0 0 0 1px var(--control-edge),
|
|
624
|
+
inset 0 1px 0 var(--control-highlight),
|
|
625
|
+
inset 0 0 0 1px var(--control-inner-edge);
|
|
626
|
+
}
|
|
627
|
+
/* Pressed, a row answers on pointer-down, as a button does: the fill a step below hover, sinking
|
|
628
|
+
in fast. */
|
|
629
|
+
&:not(:disabled, [data-disabled]):is(:active, [data-pressing]) {
|
|
630
|
+
color: var(--foreground);
|
|
631
|
+
background-color: var(--control-pressed);
|
|
632
|
+
transition:
|
|
633
|
+
background-color calc(var(--duration-fade) * 0.6) var(--ease-glide),
|
|
634
|
+
color var(--duration-fade) var(--ease),
|
|
635
|
+
box-shadow calc(var(--duration-fade) * 0.6) var(--ease-glide),
|
|
636
|
+
var(--material-motion, padding 0s);
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
/* ── Field (recessed) ──────────────────────────────────────────────────────── */
|
|
641
|
+
|
|
642
|
+
@utility material-field {
|
|
643
|
+
color: var(--foreground);
|
|
644
|
+
background-color: var(--field-surface);
|
|
645
|
+
background-image: linear-gradient(180deg, var(--field-inset), transparent 12px);
|
|
646
|
+
border: 1px solid var(--field-edge);
|
|
647
|
+
box-shadow:
|
|
648
|
+
inset 0 1px 2px var(--field-inset),
|
|
649
|
+
0 1px 0 var(--control-highlight);
|
|
650
|
+
transition:
|
|
651
|
+
border-color var(--duration-fade) var(--ease),
|
|
652
|
+
box-shadow var(--duration-fade) var(--ease),
|
|
653
|
+
background-color var(--duration-fade) var(--ease);
|
|
654
|
+
|
|
655
|
+
/* Focus is a softer edge, not a ring: a focused text field — or a field holding one — and an
|
|
656
|
+
open select take a border halfway to --control-focus. A field that is a button (a select's
|
|
657
|
+
trigger, a native select) also keeps the 2px ring for keyboard focus, which a click never
|
|
658
|
+
shows. A field marked invalid keeps its red edge. */
|
|
659
|
+
&:is(:is(input, textarea):focus, :has(:is(input, textarea):focus), [data-popup-open]):not(
|
|
660
|
+
[data-invalid],
|
|
661
|
+
[aria-invalid="true"]
|
|
662
|
+
) {
|
|
663
|
+
border-color: color-mix(in oklab, var(--field-edge), var(--control-focus));
|
|
664
|
+
}
|
|
665
|
+
&:is(input, textarea):focus-visible {
|
|
666
|
+
outline: none;
|
|
667
|
+
}
|
|
668
|
+
&:not(input, textarea):focus-visible {
|
|
669
|
+
outline: var(--focus-width) solid var(--control-focus);
|
|
670
|
+
outline-offset: 0;
|
|
671
|
+
}
|
|
672
|
+
&[data-invalid],
|
|
673
|
+
&[aria-invalid="true"] {
|
|
674
|
+
border-color: var(--destructive);
|
|
675
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--destructive) 18%, transparent);
|
|
676
|
+
}
|
|
677
|
+
&[data-disabled],
|
|
678
|
+
&:disabled {
|
|
679
|
+
opacity: 0.55;
|
|
680
|
+
cursor: not-allowed;
|
|
681
|
+
}
|
|
682
|
+
/* Read-only is quieter than editable, and not dimmed like disabled: the field is no longer
|
|
683
|
+
recessed — no fill, no inset — and its text takes the softer ink, inside the same edge. It
|
|
684
|
+
can still be focused, selected and copied, so it keeps the focus edge. */
|
|
685
|
+
&:is(input, textarea)[readonly],
|
|
686
|
+
&[data-readonly],
|
|
687
|
+
&:has(> :is(input, textarea)[readonly]) {
|
|
688
|
+
color: var(--foreground-soft);
|
|
689
|
+
background-color: transparent;
|
|
690
|
+
background-image: none;
|
|
691
|
+
box-shadow: none;
|
|
692
|
+
cursor: default;
|
|
693
|
+
}
|
|
694
|
+
&::placeholder {
|
|
695
|
+
color: var(--control-muted);
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
/* ── Menu / popup ──────────────────────────────────────────────────────────── */
|
|
700
|
+
|
|
701
|
+
@utility material-menu {
|
|
702
|
+
color: var(--foreground);
|
|
703
|
+
background-color: var(--control-menu);
|
|
704
|
+
border: 1px solid var(--field-edge);
|
|
705
|
+
box-shadow:
|
|
706
|
+
0 0 0 1px var(--control-edge),
|
|
707
|
+
inset 0 1px 0 var(--control-highlight),
|
|
708
|
+
0 12px 32px #0003,
|
|
709
|
+
0 2px 6px #0000001a;
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
/* ── Surfaces ──────────────────────────────────────────────────────────────── */
|
|
713
|
+
|
|
714
|
+
@utility surface-container {
|
|
715
|
+
border: 1px solid var(--field-edge);
|
|
716
|
+
background: linear-gradient(160deg, var(--control-surface), var(--field-surface) 55%);
|
|
717
|
+
box-shadow: inset 0 1px 0 var(--control-highlight);
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
/* The page ground itself — --background, and with brand.css the faint light from above and the
|
|
721
|
+
two grain layers, fixed to the viewport so they line up with the page's — for a bar that content
|
|
722
|
+
scrolls under: an app shell's sticky header, a sticky toolbar or footer. `bg-background` alone
|
|
723
|
+
is the ground without its grain and light, a visibly darker band in dark mode under brand.css.
|
|
724
|
+
The grain is drawn by ::before and ::after, so the element must be positioned (sticky, fixed,
|
|
725
|
+
relative). Without brand.css the light and grain tokens are off, and it is plain --background. */
|
|
726
|
+
@utility surface-page {
|
|
727
|
+
isolation: isolate;
|
|
728
|
+
background-color: var(--background);
|
|
729
|
+
background-image: radial-gradient(110% 65% at 50% -10%, var(--page-glow), transparent 60%);
|
|
730
|
+
background-attachment: fixed;
|
|
731
|
+
|
|
732
|
+
&::before,
|
|
733
|
+
&::after {
|
|
734
|
+
content: "";
|
|
735
|
+
position: absolute;
|
|
736
|
+
inset: 0;
|
|
737
|
+
z-index: -1;
|
|
738
|
+
pointer-events: none;
|
|
739
|
+
background-image: var(--grain-noise);
|
|
740
|
+
background-size: 200px auto;
|
|
741
|
+
background-attachment: fixed;
|
|
742
|
+
}
|
|
743
|
+
&::before {
|
|
744
|
+
mix-blend-mode: var(--page-grain-blend);
|
|
745
|
+
opacity: var(--page-grain-opacity);
|
|
746
|
+
}
|
|
747
|
+
&::after {
|
|
748
|
+
mix-blend-mode: screen;
|
|
749
|
+
opacity: var(--page-grain-screen);
|
|
750
|
+
background-position: 97px 61px;
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
@utility surface-card {
|
|
755
|
+
border: 1px solid var(--field-edge);
|
|
756
|
+
background: linear-gradient(160deg, var(--control-surface), var(--field-surface) 55%);
|
|
757
|
+
box-shadow:
|
|
758
|
+
inset 0 1px 0 var(--control-highlight),
|
|
759
|
+
0 4px 16px #0000000a;
|
|
760
|
+
border-radius: var(--radius-card);
|
|
761
|
+
/* Padding belongs to the card: --card-space, -sm and -md (24 / 32 / 40), times the theme's
|
|
762
|
+
spacing step (--space: the density, but only half as much above 1), so a dense theme's cards
|
|
763
|
+
are tighter and a spacious one's are not padded out. Set --card-padding (e.g.
|
|
764
|
+
[--card-padding:0]) to override one card, as it is. */
|
|
765
|
+
padding: var(--card-padding, calc(var(--card-space) * var(--space, 1)));
|
|
766
|
+
|
|
767
|
+
@media (width >= 40rem) {
|
|
768
|
+
padding: var(--card-padding, calc(var(--card-space-sm) * var(--space, 1)));
|
|
769
|
+
}
|
|
770
|
+
@media (width >= 48rem) {
|
|
771
|
+
padding: var(--card-padding, calc(var(--card-space-md) * var(--space, 1)));
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
/* ── Popup motion (Base UI starting/ending styles) ─────────────────────────── */
|
|
776
|
+
|
|
777
|
+
@utility popup-motion {
|
|
778
|
+
/* From the trigger (Base UI's --transform-origin; a dialog has none and stays centred), from 97%
|
|
779
|
+
and transparent, never from nothing. Leaving takes 0.7 of arriving. Under reduced motion the
|
|
780
|
+
scale has no time to move and only the fade (--duration-fade) is left. */
|
|
781
|
+
transform-origin: var(--transform-origin);
|
|
782
|
+
transition:
|
|
783
|
+
opacity var(--duration-fade) var(--ease),
|
|
784
|
+
scale var(--duration) var(--ease),
|
|
785
|
+
translate var(--duration) var(--ease);
|
|
786
|
+
|
|
787
|
+
&[data-starting-style],
|
|
788
|
+
&[data-ending-style] {
|
|
789
|
+
opacity: 0;
|
|
790
|
+
scale: 0.97;
|
|
791
|
+
}
|
|
792
|
+
&[data-ending-style] {
|
|
793
|
+
transition:
|
|
794
|
+
opacity calc(var(--duration-fade) * 0.7) var(--ease),
|
|
795
|
+
scale var(--duration-exit) var(--ease),
|
|
796
|
+
translate var(--duration-exit) var(--ease);
|
|
797
|
+
}
|
|
798
|
+
&[data-instant] {
|
|
799
|
+
transition: none;
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
/* ── Typography helpers ────────────────────────────────────────────────────── */
|
|
804
|
+
|
|
805
|
+
/* Licht headlines are Light (300) only. licht ships Licht's heavier cuts too, so the weight
|
|
806
|
+
is set with the family and the browser never makes up a bolder one. `font-heading` gets the same
|
|
807
|
+
weight (merged into Tailwind's font-family utility); a font-weight utility after it still wins,
|
|
808
|
+
so never put one on Licht text. */
|
|
809
|
+
@utility font-heading {
|
|
810
|
+
font-weight: 300;
|
|
811
|
+
font-synthesis: none;
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
@utility display {
|
|
815
|
+
font-family: var(--font-heading);
|
|
816
|
+
font-weight: 300;
|
|
817
|
+
font-synthesis: none;
|
|
818
|
+
font-kerning: normal;
|
|
819
|
+
letter-spacing: -0.02em;
|
|
820
|
+
line-height: 1.03;
|
|
821
|
+
text-wrap: balance;
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
@utility eyebrow {
|
|
825
|
+
font-family: var(--font-mono);
|
|
826
|
+
font-size: max(10px, calc(12px * var(--type)));
|
|
827
|
+
line-height: 1.4;
|
|
828
|
+
letter-spacing: 0.18em;
|
|
829
|
+
text-transform: uppercase;
|
|
830
|
+
color: var(--muted-foreground);
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
@utility link {
|
|
834
|
+
color: var(--foreground);
|
|
835
|
+
text-decoration-line: underline;
|
|
836
|
+
text-decoration-color: color-mix(in oklab, var(--foreground) 35%, transparent);
|
|
837
|
+
text-underline-offset: 4px;
|
|
838
|
+
transition: text-decoration-color var(--duration-fade) var(--ease);
|
|
839
|
+
|
|
840
|
+
&:hover {
|
|
841
|
+
text-decoration-color: var(--foreground);
|
|
842
|
+
}
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
@utility container-page {
|
|
846
|
+
--container-gutter: 24px;
|
|
847
|
+
width: 100%;
|
|
848
|
+
max-width: var(--container);
|
|
849
|
+
margin-inline: auto;
|
|
850
|
+
/* Never less than the safe area: a phone on its side keeps the column clear of the notch on a
|
|
851
|
+
page that draws under it (viewport-fit=cover). */
|
|
852
|
+
padding-left: max(var(--container-gutter), env(safe-area-inset-left, 0px));
|
|
853
|
+
padding-right: max(var(--container-gutter), env(safe-area-inset-right, 0px));
|
|
854
|
+
|
|
855
|
+
@media (width >= 40rem) {
|
|
856
|
+
--container-gutter: 40px;
|
|
857
|
+
}
|
|
858
|
+
@media (width >= 64rem) {
|
|
859
|
+
--container-gutter: 64px;
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
@utility hairline {
|
|
864
|
+
border-top: 1px solid color-mix(in oklab, var(--border) 70%, transparent);
|
|
865
|
+
}
|
|
866
|
+
```
|