@esportsplus/ui 0.57.0 → 0.58.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/README.md +123 -39
- package/build/components/accordion/group.d.ts +14 -0
- package/build/components/accordion/group.js +21 -0
- package/build/components/accordion/index.d.ts +9 -0
- package/build/components/accordion/index.js +20 -3
- package/build/components/accordion/scss/index.scss +1 -1
- package/build/components/announcement/scss/index.scss +1 -1
- package/build/components/breadcrumb/scss/index.scss +1 -1
- package/build/components/button/scss/index.scss +1 -1
- package/build/components/button/sidebar.d.ts +3 -0
- package/build/components/button/sidebar.js +40 -10
- package/build/components/capslock/index.js +1 -1
- package/build/components/capslock/scss/index.scss +1 -1
- package/build/components/card/scss/index.scss +1 -1
- package/build/components/cc/scss/index.scss +1 -1
- package/build/components/chat-minimap/scss/index.scss +1 -1
- package/build/components/checkbox/scss/index.scss +1 -1
- package/build/components/color-picker/index.d.ts +1 -0
- package/build/components/color-picker/index.js +166 -136
- package/build/components/color-picker/scss/index.scss +1 -1
- package/build/components/command/index.d.ts +0 -1
- package/build/components/command/index.js +3 -2
- package/build/components/command/scss/index.scss +1 -1
- package/build/components/copy/scss/index.scss +1 -1
- package/build/components/counter/scss/index.scss +1 -1
- package/build/components/datalist/index.js +3 -3
- package/build/components/datalist/scss/index.scss +1 -1
- package/build/components/dock/scss/index.scss +1 -1
- package/build/components/editor/code/index.d.ts +0 -1
- package/build/components/editor/code/index.js +0 -1
- package/build/components/editor/code/minimap.d.ts +2 -1
- package/build/components/editor/code/minimap.js +5 -2
- package/build/components/editor/code/view.d.ts +3 -1
- package/build/components/editor/code/view.js +37 -26
- package/build/components/editor/diffs/index.d.ts +0 -1
- package/build/components/editor/diffs/index.js +0 -1
- package/build/components/editor/diffs/merge.js +7 -3
- package/build/components/editor/diffs/view.js +3 -1
- package/build/components/editor/index.d.ts +4 -1
- package/build/components/editor/index.js +2 -1
- package/build/components/editor/markdown/editing.js +22 -3
- package/build/components/editor/markdown/erase.d.ts +9 -0
- package/build/components/editor/markdown/erase.js +78 -0
- package/build/components/editor/markdown/index.d.ts +0 -1
- package/build/components/editor/markdown/index.js +0 -1
- package/build/components/editor/markdown/layout.d.ts +2 -9
- package/build/components/editor/markdown/layout.js +2 -7
- package/build/components/editor/markdown/render.d.ts +0 -1
- package/build/components/editor/markdown/render.js +287 -235
- package/build/components/editor/markdown/view.js +566 -667
- package/build/components/editor/viewer/index.d.ts +27 -0
- package/build/components/editor/viewer/index.js +250 -0
- package/build/components/editor/viewer/model.d.ts +15 -0
- package/build/components/editor/viewer/model.js +73 -0
- package/build/components/editor/workspace/index.d.ts +6 -2
- package/build/components/editor/workspace/index.js +243 -137
- package/build/components/editor/workspace/keybindings.d.ts +37 -0
- package/build/components/editor/workspace/keybindings.js +288 -0
- package/build/components/editor/workspace/model.d.ts +55 -2
- package/build/components/editor/workspace/model.js +141 -3
- package/build/components/editor/workspace/navigate.d.ts +19 -0
- package/build/components/editor/workspace/navigate.js +118 -0
- package/build/components/editor/workspace/session.d.ts +29 -0
- package/build/components/editor/workspace/session.js +373 -0
- package/build/components/editor/workspace/shortcuts.d.ts +19 -0
- package/build/components/editor/workspace/shortcuts.js +185 -0
- package/build/components/editor/workspace/status.d.ts +34 -0
- package/build/components/editor/workspace/status.js +193 -0
- package/build/components/editor/workspace/statusbar.d.ts +15 -0
- package/build/components/editor/workspace/statusbar.js +190 -0
- package/build/components/editor/workspace/strip.d.ts +27 -0
- package/build/components/editor/workspace/strip.js +239 -0
- package/build/components/editor/workspace/tabs.d.ts +15 -0
- package/build/components/editor/workspace/tabs.js +63 -0
- package/build/components/error/index.js +1 -1
- package/build/components/error/scss/index.scss +1 -1
- package/build/components/filter/index.js +5 -3
- package/build/components/filter/scss/index.scss +1 -1
- package/build/components/frame/scss/index.scss +1 -1
- package/build/components/heatmap/index.js +3 -3
- package/build/components/heatmap/scss/index.scss +1 -1
- package/build/components/highlight/scss/index.scss +1 -1
- package/build/components/icon/scss/index.scss +1 -1
- package/build/components/image/scss/index.scss +1 -1
- package/build/components/index.d.ts +2 -0
- package/build/components/index.js +2 -0
- package/build/components/inline-edit/scss/index.scss +1 -1
- package/build/components/input/scss/index.scss +1 -1
- package/build/components/link/scss/index.scss +1 -1
- package/build/components/loading/scss/index.scss +1 -1
- package/build/components/marquee/scss/index.scss +1 -1
- package/build/components/metric/scss/index.scss +1 -1
- package/build/components/nav/index.d.ts +1 -1
- package/build/components/nav/scss/index.scss +1 -1
- package/build/components/nav/tree.d.ts +3 -1
- package/build/components/nav/tree.js +30 -60
- package/build/components/notification/scss/index.scss +1 -1
- package/build/components/overlay/scss/index.scss +1 -1
- package/build/components/page/scss/index.scss +1 -1
- package/build/components/pagination/arrows.d.ts +15 -0
- package/build/components/pagination/arrows.js +65 -0
- package/build/components/pagination/cards.d.ts +23 -0
- package/build/components/pagination/cards.js +66 -0
- package/build/components/pagination/index.d.ts +5 -0
- package/build/components/pagination/index.js +3 -1
- package/build/components/pagination/scss/index.scss +1 -1
- package/build/components/progress/scss/index.scss +1 -1
- package/build/components/pull-to-refresh/scss/index.scss +1 -1
- package/build/components/range/index.js +1 -1
- package/build/components/range/scss/index.scss +1 -1
- package/build/components/relative-time/scss/index.scss +1 -1
- package/build/components/root/scss/index.scss +1 -1
- package/build/components/section/scss/index.scss +2 -0
- package/build/components/select/index.d.ts +1 -0
- package/build/components/select/index.js +16 -11
- package/build/components/select/scss/index.scss +1 -1
- package/build/components/shortcut-recorder/scss/index.scss +1 -1
- package/build/components/sortable/scss/index.scss +1 -1
- package/build/components/sticky-header/index.js +3 -3
- package/build/components/sticky-header/scss/index.scss +1 -1
- package/build/components/story/scss/index.scss +1 -1
- package/build/components/surface-field/scss/index.scss +1 -1
- package/build/components/tasklist/scss/index.scss +1 -1
- package/build/components/text/scss/index.scss +1 -1
- package/build/components/textarea/scss/index.scss +1 -1
- package/build/{css-utilities → components}/theme/index.d.ts +1 -1
- package/build/{css-utilities → components}/theme/index.js +15 -5
- package/build/components/theme/scss/index.scss +2 -0
- package/build/components/theme-picker/index.d.ts +52 -0
- package/build/components/theme-picker/index.js +167 -0
- package/build/components/theme-picker/scss/index.scss +2 -0
- package/build/components/toast/index.js +3 -5
- package/build/components/toast/scss/index.scss +1 -1
- package/build/components/tooltip/menu.js +3 -1
- package/build/components/tooltip/scss/index.scss +1 -1
- package/build/components/typewriter/scss/index.scss +1 -1
- package/build/components/uptime/scss/index.scss +1 -1
- package/build/components/usage-meter/scss/index.scss +1 -1
- package/build/{css-utilities → modifiers}/glass/index.d.ts +2 -2
- package/build/modifiers/glass/index.js +28 -0
- package/build/modifiers/glass/scss/index.scss +2 -0
- package/build/{css-utilities → modifiers}/index.d.ts +0 -1
- package/build/{css-utilities → modifiers}/index.js +0 -1
- package/build/modifiers/scrollbar/index.d.ts +72 -0
- package/build/{css-utilities → modifiers}/scrollbar/index.js +52 -19
- package/build/modifiers/scrollbar/scss/index.scss +2 -0
- package/build/normalize/scss/index.scss +1 -2
- package/layer.scss +1 -1
- package/package.json +11 -18
- package/scripts/code-editor-markdown.test.mjs +45 -14
- package/scripts/code-viewer.test.mjs +69 -0
- package/scripts/workspace-keybindings.test.mjs +273 -0
- package/scripts/workspace-session.test.mjs +349 -0
- package/scripts/workspace-status.test.mjs +229 -0
- package/scripts/workspace-tabs.test.mjs +142 -0
- package/src/components/accordion/group.ts +39 -0
- package/src/components/accordion/index.ts +32 -6
- package/src/components/accordion/scss/index.scss +12 -21
- package/src/components/accordion/scss/variables.scss +18 -3
- package/src/components/announcement/scss/index.scss +4 -4
- package/src/components/announcement/scss/variables.scss +6 -6
- package/src/components/banner/scss/index.scss +1 -1
- package/src/components/breadcrumb/scss/index.scss +35 -50
- package/src/components/breadcrumb/scss/variables.scss +23 -31
- package/src/components/button/scss/_fan.scss +39 -43
- package/src/components/button/scss/_morph.scss +66 -78
- package/src/components/button/scss/_sidebar.scss +41 -30
- package/src/components/button/scss/_split.scss +9 -9
- package/src/components/button/scss/index.scss +23 -19
- package/src/components/button/scss/variables.scss +94 -90
- package/src/components/button/sidebar.ts +36 -24
- package/src/components/capslock/index.ts +2 -2
- package/src/components/capslock/scss/index.scss +11 -6
- package/src/components/capslock/scss/variables.scss +3 -5
- package/src/components/card/scss/_expand.scss +58 -64
- package/src/components/card/scss/index.scss +40 -21
- package/src/components/card/scss/variables.scss +40 -31
- package/src/components/cc/scss/index.scss +68 -68
- package/src/components/cc/scss/variables.scss +13 -14
- package/src/components/chat-minimap/scss/index.scss +24 -16
- package/src/components/chat-minimap/scss/variables.scss +37 -37
- package/src/components/checkbox/scss/index.scss +54 -52
- package/src/components/checkbox/scss/variables.scss +37 -39
- package/src/components/color-picker/index.ts +157 -120
- package/src/components/color-picker/scss/index.scss +159 -96
- package/src/components/color-picker/scss/variables.scss +33 -15
- package/src/components/command/index.ts +3 -2
- package/src/components/command/scss/index.scss +10 -14
- package/src/components/command/scss/variables.scss +12 -35
- package/src/components/copy/scss/index.scss +6 -6
- package/src/components/copy/scss/variables.scss +12 -15
- package/src/components/counter/scss/index.scss +14 -14
- package/src/components/counter/scss/variables.scss +1 -1
- package/src/components/datalist/index.ts +3 -3
- package/src/components/datalist/scss/index.scss +7 -6
- package/src/components/datalist/scss/variables.scss +7 -3
- package/src/components/dock/scss/index.scss +10 -15
- package/src/components/dock/scss/variables.scss +29 -25
- package/src/components/editor/code/index.ts +0 -1
- package/src/components/editor/code/minimap.ts +13 -5
- package/src/components/editor/code/scss/_editor.scss +83 -81
- package/src/components/editor/code/scss/_features.scss +106 -97
- package/src/components/editor/code/scss/_services.scss +27 -25
- package/src/components/editor/code/scss/index.scss +0 -1
- package/src/components/editor/code/scss/variables.scss +30 -26
- package/src/components/editor/code/view.ts +14 -5
- package/src/components/editor/diffs/index.ts +0 -1
- package/src/components/editor/diffs/merge.ts +2 -1
- package/src/components/editor/diffs/scss/_diffs.scss +67 -57
- package/src/components/editor/diffs/scss/_merge.scss +17 -14
- package/src/components/editor/diffs/scss/index.scss +0 -1
- package/src/components/editor/diffs/scss/variables.scss +25 -18
- package/src/components/editor/diffs/view.ts +2 -1
- package/src/components/editor/index.ts +7 -1
- package/src/components/editor/markdown/editing.ts +38 -3
- package/src/components/editor/markdown/erase.ts +124 -0
- package/src/components/editor/markdown/index.ts +0 -1
- package/src/components/editor/markdown/layout.ts +3 -12
- package/src/components/editor/markdown/render.ts +65 -37
- package/src/components/editor/markdown/scss/index.scss +92 -124
- package/src/components/editor/markdown/scss/variables.scss +39 -19
- package/src/components/editor/markdown/view.ts +737 -786
- package/src/components/editor/tree/scss/index.scss +121 -110
- package/src/components/editor/tree/scss/variables.scss +48 -54
- package/src/components/editor/viewer/index.ts +321 -0
- package/src/components/editor/viewer/model.ts +130 -0
- package/src/components/editor/viewer/scss/_viewer.scss +302 -0
- package/src/components/editor/viewer/scss/index.scss +2 -0
- package/src/components/editor/viewer/scss/variables.scss +69 -0
- package/src/components/editor/workspace/index.ts +159 -31
- package/src/components/editor/workspace/keybindings.ts +447 -0
- package/src/components/editor/workspace/model.ts +233 -3
- package/src/components/editor/workspace/navigate.ts +194 -0
- package/src/components/editor/workspace/scss/index.scss +72 -59
- package/src/components/editor/workspace/scss/keybindings.scss +190 -0
- package/src/components/editor/workspace/scss/status.scss +122 -0
- package/src/components/editor/workspace/scss/tabs.scss +56 -0
- package/src/components/editor/workspace/session.ts +551 -0
- package/src/components/editor/workspace/shortcuts.ts +255 -0
- package/src/components/editor/workspace/status.ts +259 -0
- package/src/components/editor/workspace/statusbar.ts +255 -0
- package/src/components/editor/workspace/strip.ts +273 -0
- package/src/components/editor/workspace/tabs.ts +106 -0
- package/src/components/error/index.ts +1 -1
- package/src/components/error/scss/index.scss +19 -19
- package/src/components/error/scss/variables.scss +2 -2
- package/src/components/filter/index.ts +7 -2
- package/src/components/filter/scss/index.scss +1 -1
- package/src/components/filter/scss/variables.scss +11 -10
- package/src/components/frame/scss/index.scss +12 -12
- package/src/components/frame/scss/variables.scss +8 -8
- package/src/components/heatmap/index.ts +3 -3
- package/src/components/heatmap/scss/index.scss +28 -26
- package/src/components/heatmap/scss/variables.scss +18 -17
- package/src/components/highlight/scss/index.scss +17 -13
- package/src/components/highlight/scss/variables.scss +8 -10
- package/src/components/icon/scss/index.scss +10 -0
- package/src/components/icon/scss/variables.scss +5 -0
- package/src/components/image/scss/index.scss +9 -9
- package/src/components/image/scss/variables.scss +7 -2
- package/src/components/index.ts +2 -0
- package/src/components/inline-edit/scss/index.scss +99 -104
- package/src/components/inline-edit/scss/variables.scss +40 -39
- package/src/components/input/scss/_field.scss +6 -20
- package/src/components/input/scss/_scrub.scss +10 -8
- package/src/components/input/scss/_tag.scss +35 -37
- package/src/components/input/scss/variables.scss +100 -99
- package/src/components/link/scss/index.scss +4 -1
- package/src/components/loading/scss/index.scss +1 -1
- package/src/components/loading/scss/variables.scss +1 -1
- package/src/components/marquee/scss/index.scss +9 -5
- package/src/components/marquee/scss/variables.scss +3 -1
- package/src/components/metric/scss/_flash.scss +3 -1
- package/src/components/metric/scss/index.scss +8 -6
- package/src/components/metric/scss/variables.scss +26 -20
- package/src/components/nav/index.ts +1 -1
- package/src/components/nav/scss/index.scss +12 -40
- package/src/components/nav/scss/variables.scss +30 -11
- package/src/components/nav/tree.ts +19 -62
- package/src/components/notification/scss/index.scss +7 -7
- package/src/components/notification/scss/variables.scss +7 -9
- package/src/components/overlay/scss/index.scss +181 -170
- package/src/components/overlay/scss/variables.scss +26 -57
- package/src/components/page/scss/index.scss +12 -11
- package/src/components/page/scss/variables.scss +5 -0
- package/src/components/pagination/arrows.ts +58 -0
- package/src/components/pagination/cards.ts +57 -0
- package/src/components/pagination/index.ts +4 -1
- package/src/components/pagination/scss/_arrows.scss +69 -0
- package/src/components/pagination/scss/_cards.scss +121 -0
- package/src/components/pagination/scss/_dots.scss +2 -5
- package/src/components/pagination/scss/index.scss +8 -6
- package/src/components/pagination/scss/variables.scss +87 -37
- package/src/components/progress/scss/_text.scss +21 -18
- package/src/components/progress/scss/index.scss +1 -1
- package/src/components/progress/scss/variables.scss +12 -12
- package/src/components/pull-to-refresh/scss/index.scss +2 -1
- package/src/components/pull-to-refresh/scss/variables.scss +11 -6
- package/src/components/range/index.ts +1 -1
- package/src/components/range/scss/_filter.scss +62 -51
- package/src/components/range/scss/_slider.scss +78 -75
- package/src/components/range/scss/_vertical.scss +6 -6
- package/src/components/range/scss/index.scss +3 -2
- package/src/components/range/scss/variables.scss +26 -23
- package/src/components/relative-time/scss/index.scss +27 -27
- package/src/components/relative-time/scss/variables.scss +10 -12
- package/src/components/root/scss/index.scss +71 -43
- package/src/components/root/scss/variables.scss +35 -31
- package/src/components/section/scss/index.scss +31 -0
- package/src/components/section/scss/variables.scss +21 -0
- package/src/components/select/index.ts +11 -6
- package/src/components/select/scss/index.scss +21 -32
- package/src/components/select/scss/variables.scss +25 -18
- package/src/components/shortcut-recorder/scss/index.scss +13 -12
- package/src/components/shortcut-recorder/scss/variables.scss +12 -13
- package/src/components/sortable/scss/index.scss +47 -44
- package/src/components/sortable/scss/variables.scss +4 -5
- package/src/components/sticky-header/index.ts +4 -4
- package/src/components/sticky-header/scss/index.scss +14 -13
- package/src/components/sticky-header/scss/variables.scss +9 -9
- package/src/components/story/scss/index.scss +26 -30
- package/src/components/story/scss/variables.scss +16 -9
- package/src/components/surface-field/scss/index.scss +45 -40
- package/src/components/surface-field/scss/variables.scss +5 -6
- package/src/components/tasklist/scss/index.scss +19 -19
- package/src/components/tasklist/scss/variables.scss +26 -29
- package/src/components/text/scss/index.scss +2 -1
- package/src/components/textarea/scss/variables.scss +1 -1
- package/src/{css-utilities → components}/theme/index.ts +17 -3
- package/src/components/theme/scss/index.scss +1 -0
- package/src/components/theme/scss/variables.scss +78 -0
- package/src/components/theme-picker/index.ts +231 -0
- package/src/components/theme-picker/scss/index.scss +264 -0
- package/src/components/toast/index.ts +28 -30
- package/src/components/toast/scss/index.scss +87 -87
- package/src/components/toast/scss/variables.scss +39 -39
- package/src/components/tooltip/menu.ts +4 -1
- package/src/components/tooltip/scss/_east.scss +10 -10
- package/src/components/tooltip/scss/_menu.scss +284 -269
- package/src/components/tooltip/scss/_north.scss +10 -10
- package/src/components/tooltip/scss/_shared.scss +7 -7
- package/src/components/tooltip/scss/_south.scss +10 -10
- package/src/components/tooltip/scss/_west.scss +10 -10
- package/src/components/tooltip/scss/index.scss +21 -20
- package/src/components/tooltip/scss/variables.scss +104 -96
- package/src/components/typewriter/scss/_retype.scss +12 -11
- package/src/components/typewriter/scss/_rotate.scss +2 -1
- package/src/components/typewriter/scss/variables.scss +41 -39
- package/src/components/uptime/scss/index.scss +15 -15
- package/src/components/uptime/scss/variables.scss +8 -8
- package/src/components/usage-meter/scss/index.scss +3 -1
- package/src/components/usage-meter/scss/variables.scss +5 -5
- package/src/css-utilities/absolute.scss +64 -0
- package/src/css-utilities/background.scss +43 -0
- package/src/css-utilities/border.scss +45 -0
- package/src/css-utilities/box-shadow.scss +29 -0
- package/src/css-utilities/color.scss +41 -0
- package/src/css-utilities/flex.scss +64 -0
- package/src/css-utilities/font/geist/{scss/index.scss → index.scss} +12 -4
- package/src/css-utilities/font/montserrat/Montserrat-Italic-Variable.woff2 +0 -0
- package/src/css-utilities/font/montserrat/Montserrat-Variable.woff2 +0 -0
- package/src/css-utilities/font/montserrat/OFL.txt +93 -0
- package/src/css-utilities/font/montserrat/index.scss +38 -0
- package/src/{shared/scss → css-utilities}/icon.scss +1 -1
- package/src/css-utilities/{inline/scss/index.scss → inline.scss} +1 -1
- package/src/css-utilities/{skeleton/scss/index.scss → skeleton.scss} +11 -11
- package/src/css-utilities/surface.scss +266 -0
- package/src/css-utilities/text.scss +191 -0
- package/src/modifiers/glass/index.ts +44 -0
- package/src/{css-utilities → modifiers}/glass/scss/index.scss +6 -6
- package/src/{css-utilities → modifiers}/glass/scss/variables.scss +1 -1
- package/src/{css-utilities → modifiers}/index.ts +0 -1
- package/src/{css-utilities → modifiers}/scrollbar/index.ts +92 -17
- package/src/{css-utilities → modifiers}/scrollbar/scss/index.scss +178 -177
- package/src/{css-utilities → modifiers}/scrollbar/scss/variables.scss +28 -21
- package/src/normalize/scss/index.scss +4 -2
- package/src/shared/scss/color-weights.scss +19 -0
- package/src/shared/scss/index.scss +1 -12
- package/src/tokens/scss/blur.scss +5 -0
- package/src/tokens/scss/color.scss +74 -50
- package/src/tokens/scss/index.scss +1 -2
- package/src/tokens/scss/size.scss +0 -2
- package/src/tokens/scss/state.scss +3 -2
- package/src/tokens/scss/transition.scss +19 -2
- package/storage/svg/monitor.svg +1 -0
- package/storage/svg/moon.svg +1 -0
- package/storage/svg/pin.svg +1 -0
- package/storage/svg/sun.svg +1 -0
- package/vite.config.ts +33 -8
- package/build/css-utilities/background/scss/index.scss +0 -2
- package/build/css-utilities/border/scss/index.scss +0 -2
- package/build/css-utilities/color/scss/index.scss +0 -2
- package/build/css-utilities/flex/scss/index.scss +0 -2
- package/build/css-utilities/font/geist/index.d.ts +0 -1
- package/build/css-utilities/font/geist/index.js +0 -1
- package/build/css-utilities/font/geist/scss/index.scss +0 -2
- package/build/css-utilities/font/montserrat/index.d.ts +0 -1
- package/build/css-utilities/font/montserrat/index.js +0 -1
- package/build/css-utilities/font/montserrat/scss/Montserrat-Bold.woff +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-Bold.woff2 +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-BoldItalic.woff +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-BoldItalic.woff2 +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-Italic.woff +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-Italic.woff2 +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-Medium.woff +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-Medium.woff2 +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-MediumItalic.woff +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-MediumItalic.woff2 +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-Regular.woff +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-Regular.woff2 +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-SemiBold.woff +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-SemiBold.woff2 +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-SemiBoldItalic.woff +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-SemiBoldItalic.woff2 +0 -0
- package/build/css-utilities/font/montserrat/scss/index.scss +0 -2
- package/build/css-utilities/glass/index.js +0 -26
- package/build/css-utilities/glass/scss/index.scss +0 -2
- package/build/css-utilities/index.scss +0 -2
- package/build/css-utilities/inline/scss/index.scss +0 -2
- package/build/css-utilities/scrollbar/index.d.ts +0 -42
- package/build/css-utilities/scrollbar/scss/index.scss +0 -2
- package/build/css-utilities/skeleton/scss/index.scss +0 -2
- package/build/css-utilities/text/scss/index.scss +0 -2
- package/build/themes/dark/index.d.ts +0 -3
- package/build/themes/dark/index.js +0 -3
- package/build/themes/dark/input.d.ts +0 -3
- package/build/themes/dark/input.js +0 -12
- package/build/themes/dark/select.d.ts +0 -3
- package/build/themes/dark/select.js +0 -23
- package/build/themes/dark/textarea.d.ts +0 -2186
- package/build/themes/dark/textarea.js +0 -11
- package/src/css-utilities/background/scss/index.scss +0 -1
- package/src/css-utilities/background/scss/variables.scss +0 -18
- package/src/css-utilities/border/scss/index.scss +0 -1
- package/src/css-utilities/border/scss/variables.scss +0 -23
- package/src/css-utilities/color/scss/index.scss +0 -1
- package/src/css-utilities/color/scss/variables.scss +0 -17
- package/src/css-utilities/flex/scss/index.scss +0 -57
- package/src/css-utilities/flex/scss/variables.scss +0 -16
- package/src/css-utilities/font/geist/index.ts +0 -1
- package/src/css-utilities/font/montserrat/index.ts +0 -1
- package/src/css-utilities/font/montserrat/scss/Montserrat-Bold.woff +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-Bold.woff2 +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-BoldItalic.woff +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-BoldItalic.woff2 +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-Italic.woff +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-Italic.woff2 +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-Medium.woff +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-Medium.woff2 +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-MediumItalic.woff +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-MediumItalic.woff2 +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-Regular.woff +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-Regular.woff2 +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-SemiBold.woff +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-SemiBold.woff2 +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-SemiBoldItalic.woff +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-SemiBoldItalic.woff2 +0 -0
- package/src/css-utilities/font/montserrat/scss/index.scss +0 -94
- package/src/css-utilities/glass/index.ts +0 -42
- package/src/css-utilities/index.scss +0 -13
- package/src/css-utilities/skeleton/scss/variables.scss +0 -3
- package/src/css-utilities/text/scss/index.scss +0 -152
- package/src/css-utilities/text/scss/variables.scss +0 -22
- package/src/shared/scss/absolute.scss +0 -28
- package/src/shared/scss/background.scss +0 -21
- package/src/shared/scss/border.scss +0 -21
- package/src/shared/scss/color.scss +0 -21
- package/src/shared/scss/position.scss +0 -55
- package/src/shared/scss/text.scss +0 -31
- package/src/themes/dark/index.ts +0 -3
- package/src/themes/dark/input.ts +0 -16
- package/src/themes/dark/select.ts +0 -28
- package/src/themes/dark/textarea.ts +0 -13
- package/src/tokens/scss/box-shadow.scss +0 -23
- package/src/tokens/scss/font-family.scss +0 -5
- package/storage/code.md +0 -180
- package/storage/editor-features.md +0 -227
- package/build/css-utilities/font/geist/{scss/Geist-Italic-Variable.woff2 → Geist-Italic-Variable.woff2} +0 -0
- package/build/css-utilities/font/geist/{scss/Geist-Variable.woff2 → Geist-Variable.woff2} +0 -0
- package/build/css-utilities/font/geist/{scss/GeistMono-Italic-Variable.woff2 → GeistMono-Italic-Variable.woff2} +0 -0
- package/build/css-utilities/font/geist/{scss/GeistMono-Variable.woff2 → GeistMono-Variable.woff2} +0 -0
- package/src/{shared/scss → css-utilities}/anchor.scss +6 -6
- package/src/{shared/scss → css-utilities}/drag.scss +0 -0
- package/src/css-utilities/font/geist/{scss/Geist-Italic-Variable.woff2 → Geist-Italic-Variable.woff2} +0 -0
- package/src/css-utilities/font/geist/{scss/Geist-Variable.woff2 → Geist-Variable.woff2} +0 -0
- package/src/css-utilities/font/geist/{scss/GeistMono-Italic-Variable.woff2 → GeistMono-Italic-Variable.woff2} +0 -0
- package/src/css-utilities/font/geist/{scss/GeistMono-Variable.woff2 → GeistMono-Variable.woff2} +0 -0
- package/src/{shared/scss → css-utilities}/hidden.scss +11 -11
- /package/src/{shared/scss → css-utilities}/layer.scss +0 -0
- /package/src/{shared/scss → css-utilities}/reset.scss +0 -0
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
@use 'sass:list';
|
|
2
|
+
@use 'sass:map';
|
|
3
|
+
@use 'sass:math';
|
|
4
|
+
@use 'sass:meta';
|
|
5
|
+
@use '../tokens/scss' as tokens;
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
// The shadow at each weight, 0 to 7, as two layers of y offset, blur, spread in px and opacity: Tailwind v4's
|
|
9
|
+
// 'shadow-2xs' through 'shadow-2xl', a missing second layer written as zeros. Every opacity runs at the mode's shadow
|
|
10
|
+
// 'opacity' in the theme's surface tokens over Tailwind's 10%.
|
|
11
|
+
$shadow-steps: (
|
|
12
|
+
((0 0 0 0), (0 0 0 0)),
|
|
13
|
+
((1 0 0 0.05), (0 0 0 0)),
|
|
14
|
+
((1 2 0 0.05), (0 0 0 0)),
|
|
15
|
+
((1 3 0 0.1), (1 2 -1 0.1)),
|
|
16
|
+
((4 6 -1 0.1), (2 4 -2 0.1)),
|
|
17
|
+
((10 15 -3 0.1), (4 6 -4 0.1)),
|
|
18
|
+
((20 25 -5 0.1), (8 10 -6 0.1)),
|
|
19
|
+
((25 50 -12 0.25), (0 0 0 0))
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
// The heaviest shadow weight, the ladder's last step.
|
|
23
|
+
$shadow-weight-max: list.length($shadow-steps) - 1;
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
// A ladder step as a lightness fraction.
|
|
27
|
+
@function ladder-step($mode, $key) {
|
|
28
|
+
@return math.div(map.get(tokens.$themes, $mode, surface, $key), 100);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// The lightness a level moves from the page in a mode: raised levels by one step, sunken ones by another.
|
|
32
|
+
@function level-offset($level, $mode) {
|
|
33
|
+
@return 'max(#{$level}, 0) * #{ladder-step($mode, raised)} + min(#{$level}, 0) * #{ladder-step($mode, sunken)}';
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Light chroma at a new lightness, holding the origin's ratio of chroma to its distance from white: fading to none at
|
|
37
|
+
// white and deepening toward the darker fills, as dark scales chroma with the distance from black.
|
|
38
|
+
@function light-chroma($light) {
|
|
39
|
+
@return 'calc(c * (1 - #{$light}) / max(1 - l, 0.01))';
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// The background at a level, stepped from the theme's surface by the ladder: light raised levels climb to white, where
|
|
43
|
+
// the shadow alone carries elevation, and dark ones stop 6 levels above it. Chroma keeps the page's tint on its hue,
|
|
44
|
+
// scaled with the distance from white in light and from black in dark.
|
|
45
|
+
@function surface-background($level) {
|
|
46
|
+
$dark: 'clamp(0, l + #{level-offset($level, dark)}, l + #{6 * ladder-step(dark, raised)})';
|
|
47
|
+
$light: 'clamp(0, l + #{level-offset($level, light)}, 1)';
|
|
48
|
+
|
|
49
|
+
@return light-dark(
|
|
50
|
+
#{'oklch(from var(--color-surface) #{$light} #{light-chroma($light)} h)'},
|
|
51
|
+
#{'oklch(from var(--color-surface) #{$dark} calc(c * #{$dark} / max(l, 0.01)) h)'}
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// The default background moved for a state, so it follows any background a component sets in its place: active and
|
|
56
|
+
// hover lighter, pressed darker, in both modes.
|
|
57
|
+
@function surface-shift($state) {
|
|
58
|
+
$sign: '+';
|
|
59
|
+
|
|
60
|
+
@if $state == 'pressed' {
|
|
61
|
+
$sign: '-';
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@return light-dark(
|
|
65
|
+
#{'oklch(from var(--surface-background-default) calc(l #{$sign} #{ladder-step(light, $state)}) c h)'},
|
|
66
|
+
#{'oklch(from var(--surface-background-default) calc(l #{$sign} #{ladder-step(dark, $state)}) c h)'}
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// A state's background moved by the mode's border step, darker in light and lighter in dark, so each border follows the
|
|
71
|
+
// background it edges in that state and stands out from it in both modes.
|
|
72
|
+
@function surface-border($state) {
|
|
73
|
+
@return light-dark(
|
|
74
|
+
#{'oklch(from var(--surface-background-#{$state}) max(0, l - #{ladder-step(light, border)}) c h)'},
|
|
75
|
+
#{'oklch(from var(--surface-background-#{$state}) min(1, l + #{ladder-step(dark, border)}) c h)'}
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// A mode's shadow token.
|
|
80
|
+
@function shadow-token($mode, $key) {
|
|
81
|
+
@return map.get(tokens.$themes, $mode, surface, shadow, $key);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// The color of a shadow falling on a background in a mode: that background deepened in its own hue by the mode's depth,
|
|
85
|
+
// at its 10% step's opacity.
|
|
86
|
+
@function shadow-color-in($background, $mode) {
|
|
87
|
+
$depth: shadow-token($mode, depth);
|
|
88
|
+
$opacity: math.div(shadow-token($mode, opacity), 100);
|
|
89
|
+
|
|
90
|
+
@return 'oklch(from #{$background} calc(l * #{$depth}) calc(c * #{$depth}) h / #{$opacity})';
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// The color of a shadow falling on a background, in each mode.
|
|
94
|
+
@function shadow-color($background) {
|
|
95
|
+
@return light-dark(#{shadow-color-in($background, light)}, #{shadow-color-in($background, dark)});
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// One of a layer's y, blur, spread or opacity at a weight. A number reads its step; anything else, such as a custom
|
|
99
|
+
// property, sums each step's change, in full once the weight passes the step and in part between steps, so a weight
|
|
100
|
+
// set where the shadow is used picks its step without a query and a fraction lands between two.
|
|
101
|
+
@function shadow-value($layer, $index, $weight) {
|
|
102
|
+
$steps: $shadow-steps;
|
|
103
|
+
|
|
104
|
+
@if meta.type-of($weight) == 'number' {
|
|
105
|
+
@return list.nth(list.nth(list.nth($steps, $weight + 1), $layer), $index);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
$terms: '0';
|
|
109
|
+
|
|
110
|
+
@for $i from 2 through list.length($steps) {
|
|
111
|
+
$delta: list.nth(list.nth(list.nth($steps, $i), $layer), $index) -
|
|
112
|
+
list.nth(list.nth(list.nth($steps, $i - 1), $layer), $index);
|
|
113
|
+
|
|
114
|
+
@if $delta != 0 {
|
|
115
|
+
$terms: '#{$terms} + #{$delta} * clamp(0, #{$weight} - #{$i - 2}, 1)';
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
@return '(#{$terms})';
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// Both layers of the shadow at a weight, in a shadow color: by default the color of a shadow falling on the surface it
|
|
123
|
+
// is used in.
|
|
124
|
+
@function shadow($weight, $color: 'var(--surface-shadow-color)') {
|
|
125
|
+
$layers: ();
|
|
126
|
+
|
|
127
|
+
@each $layer in (1, 2) {
|
|
128
|
+
$lengths: ();
|
|
129
|
+
|
|
130
|
+
$fixed: meta.type-of($weight) == 'number';
|
|
131
|
+
|
|
132
|
+
@for $i from 1 through 3 {
|
|
133
|
+
$length: shadow-value($layer, $i, $weight);
|
|
134
|
+
|
|
135
|
+
@if $fixed {
|
|
136
|
+
$length: $length * 1px;
|
|
137
|
+
}
|
|
138
|
+
@else {
|
|
139
|
+
$length: 'calc(#{$length} * 1px)';
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
$lengths: list.append($lengths, $length);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// The step's opacity over a 10% step, the opacity the shadow color carries.
|
|
146
|
+
$share: shadow-value($layer, 4, $weight);
|
|
147
|
+
|
|
148
|
+
@if $fixed {
|
|
149
|
+
$share: $share * 10;
|
|
150
|
+
}
|
|
151
|
+
@else {
|
|
152
|
+
$share: '#{$share} * 10';
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
$opacity: 'calc(alpha * #{$share})';
|
|
156
|
+
$layers: list.append($layers, '0 #{$lengths} oklch(from #{$color} l c h / #{$opacity})');
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
@return list.join($layers, (), comma);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
// A layer's colors, read from its level: 0 the page, each surface a level above the one it sits in, in the states
|
|
164
|
+
// components already name, following any background a component sets in its place. Active, hover and pressed step the
|
|
165
|
+
// background as 'surface-shift()' sets. Each state's border is that state's background moved by the border step,
|
|
166
|
+
// darker in light and lighter in dark. Another level is never a color to paint: an element reaches it by extending
|
|
167
|
+
// '%surface-raised' or '%surface-sunken', so whatever sits in it reads its states from the level it shows.
|
|
168
|
+
@mixin surface-colors {
|
|
169
|
+
--surface-background-active: #{surface-shift('active')};
|
|
170
|
+
--surface-background-default: #{surface-background('var(--surface-level)')};
|
|
171
|
+
--surface-background-hover: #{surface-shift('hover')};
|
|
172
|
+
--surface-background-pressed: #{surface-shift('pressed')};
|
|
173
|
+
--surface-border-active: #{surface-border('active')};
|
|
174
|
+
--surface-border-default: #{surface-border('default')};
|
|
175
|
+
--surface-border-hover: #{surface-border('hover')};
|
|
176
|
+
--surface-border-pressed: #{surface-border('pressed')};
|
|
177
|
+
--surface-shadow-active: var(--surface-shadow-hover);
|
|
178
|
+
--surface-shadow-color: #{shadow-color('var(--surface-background-default)')};
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
// A layer's shadow weight, which picks its step on the ladder. Each surface sets it from its level; set it on a surface
|
|
182
|
+
// to choose another step without moving the level.
|
|
183
|
+
@mixin surface-shadow($weight) {
|
|
184
|
+
--surface-shadow-weight: #{$weight};
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// A layer's shadows at its weight, cast on what it sits in, a level below: lifted one step on hover and while active,
|
|
188
|
+
// settled one when pressed.
|
|
189
|
+
@mixin surface-shadows {
|
|
190
|
+
--surface-shadow-cast: #{shadow-color(surface-background('calc(var(--surface-level) - 1)'))};
|
|
191
|
+
--surface-shadow-default: #{shadow('var(--surface-shadow-weight)', 'var(--surface-shadow-cast)')};
|
|
192
|
+
--surface-shadow-hover: #{
|
|
193
|
+
shadow('min(var(--surface-shadow-weight) + 1, #{$shadow-weight-max})', 'var(--surface-shadow-cast)')
|
|
194
|
+
};
|
|
195
|
+
--surface-shadow-pressed: #{shadow('max(var(--surface-shadow-weight) - 1, 0)', 'var(--surface-shadow-cast)')};
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
// Only a surface already at the top matches no raised query, so it keeps the top level's weight.
|
|
200
|
+
%surface-raised-level {
|
|
201
|
+
@include surface-shadow(6);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
// A layer a level above or below whatever it sits in, counted and colored without being painted: for components that
|
|
205
|
+
// route their background and shadow through their own variables, pointing them at '--surface-background-*' and
|
|
206
|
+
// '--surface-shadow-*'. A sunken layer is recessed, so it casts no shadow.
|
|
207
|
+
%surface-raised-level,
|
|
208
|
+
%surface-sunken-level {
|
|
209
|
+
@include surface-colors;
|
|
210
|
+
@include surface-shadows;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
%surface-sunken-level {
|
|
214
|
+
@include surface-shadow(0);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
// Its level is its parent's one up or down. Every element is a style container, so a style query reads the parent's
|
|
218
|
+
// level where the surface sets its own, which a 'var()' on the same property could not, and sets the shadow weight to
|
|
219
|
+
// match. Raised levels stop at 6, where the dark steps top out, and sunken ones at -3, so a surface can still
|
|
220
|
+
// sink inside one that already sits below the page; past either, a surface matches no query and keeps its parent's
|
|
221
|
+
// level.
|
|
222
|
+
@for $level from -3 through 5 {
|
|
223
|
+
@container style(--surface-level: #{$level}) {
|
|
224
|
+
%surface-raised-level {
|
|
225
|
+
--surface-level: #{$level + 1};
|
|
226
|
+
@include surface-shadow(math.max($level + 1, 0));
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
@for $level from -2 through 6 {
|
|
232
|
+
@container style(--surface-level: #{$level}) {
|
|
233
|
+
%surface-sunken-level {
|
|
234
|
+
--surface-level: #{$level - 1};
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
%surface-raised {
|
|
240
|
+
@extend %surface-raised-level;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
// The same, painted: the surface's background and shadow on the element itself.
|
|
244
|
+
%surface-raised,
|
|
245
|
+
%surface-root,
|
|
246
|
+
%surface-sunken {
|
|
247
|
+
background: var(--surface-background-default);
|
|
248
|
+
box-shadow: var(--surface-shadow-default);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
%surface-root {
|
|
252
|
+
@extend %surface-root-level;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
// A fresh stack above everything, for dialogs: level 1 wherever it opens, so whatever opens inside counts up from it,
|
|
256
|
+
// with the heaviest shadow since nothing sits above it. Not counted from its parent, so it skips the queries.
|
|
257
|
+
%surface-root-level {
|
|
258
|
+
@include surface-colors;
|
|
259
|
+
@include surface-shadow($shadow-weight-max);
|
|
260
|
+
@include surface-shadows;
|
|
261
|
+
--surface-level: 1;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
%surface-sunken {
|
|
265
|
+
@extend %surface-sunken-level;
|
|
266
|
+
}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
%text {
|
|
2
|
+
--border-width: 0px;
|
|
3
|
+
--color: var(--color-default, inherit);
|
|
4
|
+
--color-active: var(--color-default);
|
|
5
|
+
--color-default: var(--color-text-400);
|
|
6
|
+
--color-hover: var(--color-default);
|
|
7
|
+
--color-pressed: var(--color-default);
|
|
8
|
+
--width: auto;
|
|
9
|
+
|
|
10
|
+
color: var(--color);
|
|
11
|
+
display: flex;
|
|
12
|
+
font-size: var(--font-size);
|
|
13
|
+
font-weight: var(--font-weight);
|
|
14
|
+
gap: var(--gap-vertical) var(--gap-horizontal);
|
|
15
|
+
line-height: var(--line-height);
|
|
16
|
+
position: relative;
|
|
17
|
+
transition: color var(--transition-duration) var(--transition-timing-function);
|
|
18
|
+
width: var(--width);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// Ellipsis needs a block container, not '%text''s flex. Extends only meet within one stylesheet, so this applies
|
|
22
|
+
// where both are extended in the same file.
|
|
23
|
+
%text%text-truncate {
|
|
24
|
+
display: block;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
%text-crop {
|
|
28
|
+
@supports (text-box: trim-both cap alphabetic) {
|
|
29
|
+
& {
|
|
30
|
+
text-box: trim-both cap alphabetic;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&-bottom {
|
|
34
|
+
text-box: trim-end cap alphabetic;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&-top {
|
|
38
|
+
text-box: trim-start cap alphabetic;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@supports not (text-box: trim-both cap alphabetic) {
|
|
43
|
+
&::after,
|
|
44
|
+
&-bottom::after {
|
|
45
|
+
margin-bottom: calc((1em - 1lh) * 0.618);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&::after,
|
|
49
|
+
&::before,
|
|
50
|
+
&-bottom::after,
|
|
51
|
+
&-top::before {
|
|
52
|
+
content: '';
|
|
53
|
+
display: block;
|
|
54
|
+
height: 0;
|
|
55
|
+
width: 100%;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&::before,
|
|
59
|
+
&-top::before {
|
|
60
|
+
margin-top: calc((1em - 1lh) * 0.618);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&-first-child {
|
|
65
|
+
&:first-child {
|
|
66
|
+
@extend %text-crop-top;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&-last-child {
|
|
71
|
+
&:last-child {
|
|
72
|
+
@extend %text-crop-bottom;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// The gradient repeats its first stop at the end, so sliding it one full background-size loops seamlessly.
|
|
78
|
+
%text-gradient {
|
|
79
|
+
--background-size: calc(var(--speed) * 300%);
|
|
80
|
+
--color-from: #ffaa40;
|
|
81
|
+
--color-to: #9c40ff;
|
|
82
|
+
--duration: 8s;
|
|
83
|
+
// Multiplies how far the gradient travels per loop; 2 sweeps twice the distance in the same time.
|
|
84
|
+
--speed: 1;
|
|
85
|
+
animation: text-gradient var(--duration) linear infinite;
|
|
86
|
+
background-clip: text;
|
|
87
|
+
background-image: linear-gradient(to right, var(--color-from), var(--color-to), var(--color-from));
|
|
88
|
+
background-size: var(--background-size) 100%;
|
|
89
|
+
color: transparent;
|
|
90
|
+
|
|
91
|
+
@media (prefers-reduced-motion: reduce) {
|
|
92
|
+
animation: none;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// A copy of the text from 'data-text', nudged down-right and filled with fine diagonal hatching that drifts, like a
|
|
97
|
+
// printed drop shadow.
|
|
98
|
+
%text-line-shadow {
|
|
99
|
+
--duration: 15s;
|
|
100
|
+
--line-size: 0.06em;
|
|
101
|
+
--offset: 0.04em;
|
|
102
|
+
--shadow-color: var(--color-primary-500);
|
|
103
|
+
display: inline-flex;
|
|
104
|
+
position: relative;
|
|
105
|
+
z-index: 0;
|
|
106
|
+
|
|
107
|
+
&::after {
|
|
108
|
+
animation: text-line-shadow var(--duration) linear infinite;
|
|
109
|
+
background-clip: text;
|
|
110
|
+
background-image: linear-gradient(
|
|
111
|
+
45deg,
|
|
112
|
+
transparent 45%,
|
|
113
|
+
var(--shadow-color) 45%,
|
|
114
|
+
var(--shadow-color) 55%,
|
|
115
|
+
transparent 0
|
|
116
|
+
);
|
|
117
|
+
background-size: var(--line-size) var(--line-size);
|
|
118
|
+
color: transparent;
|
|
119
|
+
content: attr(data-text);
|
|
120
|
+
left: var(--offset);
|
|
121
|
+
pointer-events: none;
|
|
122
|
+
position: absolute;
|
|
123
|
+
top: var(--offset);
|
|
124
|
+
z-index: -1;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
@media (prefers-reduced-motion: reduce) {
|
|
128
|
+
&::after {
|
|
129
|
+
animation: none;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// The text keeps a translucent fill, so the clipped band behind it reads as a glint passing through the letters.
|
|
135
|
+
// Prefixed, so the host component's own '--color' is left alone.
|
|
136
|
+
%text-shiny {
|
|
137
|
+
--shine-color: oklch(from var(--color-primary-500) l c h / 0.8);
|
|
138
|
+
--shine-duration: 8s;
|
|
139
|
+
--shine-text-color: oklch(from var(--color-primary-300) l c h / 0.7);
|
|
140
|
+
--shine-width: 100px;
|
|
141
|
+
animation: text-shiny var(--shine-duration) infinite;
|
|
142
|
+
background-clip: text;
|
|
143
|
+
background-image: linear-gradient(to right, transparent, var(--shine-color) 50%, transparent);
|
|
144
|
+
background-position: 0 0;
|
|
145
|
+
background-repeat: no-repeat;
|
|
146
|
+
background-size: var(--shine-width) 100%;
|
|
147
|
+
color: var(--shine-text-color);
|
|
148
|
+
|
|
149
|
+
@media (prefers-reduced-motion: reduce) {
|
|
150
|
+
animation: none;
|
|
151
|
+
background-image: none;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
%text-truncate {
|
|
156
|
+
max-width: 100%;
|
|
157
|
+
overflow: hidden;
|
|
158
|
+
text-overflow: ellipsis;
|
|
159
|
+
white-space: nowrap;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
@keyframes text-gradient {
|
|
164
|
+
to {
|
|
165
|
+
background-position: var(--background-size) 0;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
@keyframes text-line-shadow {
|
|
170
|
+
0% {
|
|
171
|
+
background-position: 0 0;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
100% {
|
|
175
|
+
background-position: 100% -100%;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
// Sweeps across and back, then rests for the final stretch of each cycle.
|
|
180
|
+
@keyframes text-shiny {
|
|
181
|
+
0%,
|
|
182
|
+
90%,
|
|
183
|
+
100% {
|
|
184
|
+
background-position: calc(-100% - var(--shine-width)) 0;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
30%,
|
|
188
|
+
60% {
|
|
189
|
+
background-position: calc(100% + var(--shine-width)) 0;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { html } from '@esportsplus/template';
|
|
2
|
+
import './scss/index.scss';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
type GlassMode = 'uniform' | 'progressive';
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
// Uniform glass uses one full-strength layer; progressive glass uses seven masked layers.
|
|
9
|
+
const overlay = (mode: GlassMode = 'uniform', classes = '') => mode === 'progressive'
|
|
10
|
+
? html`
|
|
11
|
+
<div aria-hidden='true' class='--glass-blur --glass-blur-progressive ${classes}'>
|
|
12
|
+
<span></span>
|
|
13
|
+
<span></span>
|
|
14
|
+
<span></span>
|
|
15
|
+
<span></span>
|
|
16
|
+
<span></span>
|
|
17
|
+
<span></span>
|
|
18
|
+
<span></span>
|
|
19
|
+
</div>
|
|
20
|
+
`
|
|
21
|
+
: html`
|
|
22
|
+
<div aria-hidden='true' class='--glass-blur ${classes}'>
|
|
23
|
+
<span></span>
|
|
24
|
+
</div>
|
|
25
|
+
`;
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
export default (mode: GlassMode = 'uniform') => ({
|
|
29
|
+
class: mode === 'progressive' ? ['--glass', '--glass-progressive'] : ['--glass'],
|
|
30
|
+
onconnect: (element: HTMLElement) => {
|
|
31
|
+
let container = element.querySelector(':scope > .--glass-blur');
|
|
32
|
+
|
|
33
|
+
if (!container) {
|
|
34
|
+
element.appendChild( overlay(mode) );
|
|
35
|
+
}
|
|
36
|
+
else if (container.classList.contains('--glass-blur-progressive') !== (mode === 'progressive')) {
|
|
37
|
+
container.replaceWith( overlay(mode) );
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
export { overlay };
|
|
44
|
+
export type { GlassMode };
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
.--glass {
|
|
13
|
-
backdrop-filter: blur(var(--blur));
|
|
13
|
+
backdrop-filter: blur(var(--glass-blur));
|
|
14
14
|
|
|
15
15
|
&-blur {
|
|
16
16
|
border-radius: inherit;
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
z-index: -1;
|
|
23
23
|
|
|
24
24
|
// Seven overlapping masks and blur steps from https://www.spaceui.one/components/frost-blurred.
|
|
25
|
-
// --blur is the uniform radius or the strongest progressive radius.
|
|
25
|
+
// --glass-blur is the uniform radius or the strongest progressive radius.
|
|
26
26
|
&.--glass-blur-progressive {
|
|
27
27
|
$steps: 0.084, 0.125, 0.214, 0.386, 0.664, 0.986, 1.15;
|
|
28
28
|
$count: list.length($steps);
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
> span:nth-child(#{$layer}) {
|
|
45
|
-
-webkit-backdrop-filter: blur(calc(var(--blur, 24px) * #{math.div(list.nth($steps, $layer), 1.15)}));
|
|
45
|
+
-webkit-backdrop-filter: blur(calc(var(--glass-blur, 24px) * #{math.div(list.nth($steps, $layer), 1.15)}));
|
|
46
46
|
-webkit-mask-image: $mask;
|
|
47
|
-
backdrop-filter: blur(calc(var(--blur, 24px) * #{math.div(list.nth($steps, $layer), 1.15)}));
|
|
47
|
+
backdrop-filter: blur(calc(var(--glass-blur, 24px) * #{math.div(list.nth($steps, $layer), 1.15)}));
|
|
48
48
|
mask-image: $mask;
|
|
49
49
|
z-index: $layer;
|
|
50
50
|
}
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
> span {
|
|
55
|
-
-webkit-backdrop-filter: blur(var(--blur, 24px));
|
|
56
|
-
backdrop-filter: blur(var(--blur, 24px));
|
|
55
|
+
-webkit-backdrop-filter: blur(var(--glass-blur, 24px));
|
|
56
|
+
backdrop-filter: blur(var(--glass-blur, 24px));
|
|
57
57
|
border-radius: inherit;
|
|
58
58
|
inset: 0;
|
|
59
59
|
opacity: var(--glass-opacity, 1);
|