@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
|
@@ -1,11 +1,28 @@
|
|
|
1
1
|
import { reactive } from '@esportsplus/reactivity';
|
|
2
2
|
import { observer, type Observer } from '~/shared/resize';
|
|
3
|
-
import {
|
|
3
|
+
import { overlay } from '../glass';
|
|
4
4
|
import './scss/index.scss';
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
type Axis = 'both' | 'horizontal' | 'vertical';
|
|
8
8
|
|
|
9
|
+
// Mirrors tokens' '$colors', which generates a '--scrollbar-<color>' class for each.
|
|
10
|
+
type Color = 'black' | 'blue' | 'green' | 'grey' | 'primary' | 'purple' | 'red' | 'text' | 'white' | 'yellow';
|
|
11
|
+
|
|
12
|
+
// Blur and fade are both edge effects, so a scroller takes one or the other; drag combines with either.
|
|
13
|
+
type Options = {
|
|
14
|
+
auto?: boolean;
|
|
15
|
+
color?: Color;
|
|
16
|
+
drag?: Axis | boolean;
|
|
17
|
+
hidden?: boolean;
|
|
18
|
+
horizontal?: boolean;
|
|
19
|
+
hover?: boolean;
|
|
20
|
+
snap?: boolean;
|
|
21
|
+
} & (
|
|
22
|
+
{ blur?: boolean; fade?: never } |
|
|
23
|
+
{ blur?: never; fade?: boolean }
|
|
24
|
+
);
|
|
25
|
+
|
|
9
26
|
type Press = {
|
|
10
27
|
id: number;
|
|
11
28
|
left: number;
|
|
@@ -22,9 +39,9 @@ const SLOP = 4;
|
|
|
22
39
|
|
|
23
40
|
// 'size' names the effect's registered length, which computes to pixels: like the scroll-driven animation ranges,
|
|
24
41
|
// each edge reaches full strength once the content has scrolled that far past it.
|
|
25
|
-
function
|
|
42
|
+
function edges(size: string, horizontal: boolean) {
|
|
26
43
|
if (typeof CSS === 'undefined' || CSS.supports('animation-timeline: scroll()')) {
|
|
27
|
-
return {
|
|
44
|
+
return {};
|
|
28
45
|
}
|
|
29
46
|
|
|
30
47
|
let mutation: MutationObserver | undefined,
|
|
@@ -39,8 +56,7 @@ function attributes(name: string, size: string) {
|
|
|
39
56
|
}
|
|
40
57
|
|
|
41
58
|
function update(element: HTMLElement) {
|
|
42
|
-
let
|
|
43
|
-
offset = horizontal ? Math.abs(element.scrollLeft) : element.scrollTop,
|
|
59
|
+
let offset = horizontal ? Math.abs(element.scrollLeft) : element.scrollTop,
|
|
44
60
|
range = horizontal ? element.scrollWidth - element.clientWidth : element.scrollHeight - element.clientHeight,
|
|
45
61
|
end = range > 0 ? Math.min(1, (range - offset) / ramp) : 0,
|
|
46
62
|
start = range > 0 ? Math.min(1, offset / ramp) : 0;
|
|
@@ -58,7 +74,6 @@ function attributes(name: string, size: string) {
|
|
|
58
74
|
// Returned as a reactive style, not set imperatively, because the template rewrites the whole
|
|
59
75
|
// style attribute whenever any other reactive style on the element changes.
|
|
60
76
|
return {
|
|
61
|
-
class: ['--scrollbar', name],
|
|
62
77
|
onconnect: (element: HTMLElement) => {
|
|
63
78
|
mutation?.disconnect();
|
|
64
79
|
resize?.disconnect();
|
|
@@ -104,33 +119,33 @@ function attributes(name: string, size: string) {
|
|
|
104
119
|
onscroll: function(this: HTMLElement) {
|
|
105
120
|
update(this);
|
|
106
121
|
},
|
|
107
|
-
style: () => state.toggle !== undefined && `--
|
|
122
|
+
style: () => state.toggle !== undefined && `--scrollbar-overflow-end: ${overflow.end}; --scrollbar-overflow-start: ${overflow.start};`
|
|
108
123
|
};
|
|
109
124
|
}
|
|
110
125
|
|
|
111
126
|
|
|
112
|
-
|
|
113
|
-
let scroll =
|
|
127
|
+
function blur(horizontal: boolean) {
|
|
128
|
+
let scroll = edges('--scrollbar-blur-size', horizontal);
|
|
114
129
|
|
|
115
130
|
return {
|
|
116
131
|
...scroll,
|
|
117
132
|
onconnect: (element: HTMLElement) => {
|
|
118
133
|
if (!element.querySelector(':scope > .--scrollbar-blur-start')) {
|
|
119
|
-
element.prepend(
|
|
134
|
+
element.prepend(overlay('progressive', '--scrollbar-blur-edge --scrollbar-blur-start'));
|
|
120
135
|
}
|
|
121
136
|
|
|
122
137
|
if (!element.querySelector(':scope > .--scrollbar-blur-end')) {
|
|
123
|
-
element.appendChild(
|
|
138
|
+
element.appendChild(overlay('progressive', '--scrollbar-blur-edge --scrollbar-blur-end'));
|
|
124
139
|
}
|
|
125
140
|
|
|
126
141
|
scroll.onconnect?.(element);
|
|
127
142
|
}
|
|
128
143
|
};
|
|
129
|
-
}
|
|
144
|
+
}
|
|
130
145
|
|
|
131
146
|
// Mouse only: touch, pen and trackpads already scroll natively, with their own momentum. The pointer is
|
|
132
147
|
// captured only once the press moves past the slop, so a plain click still reaches whatever it landed on.
|
|
133
|
-
|
|
148
|
+
function drag(axis: Axis) {
|
|
134
149
|
let press: Press | null = null,
|
|
135
150
|
state = reactive({ dragging: false });
|
|
136
151
|
|
|
@@ -144,7 +159,7 @@ const drag = (axis: Axis = 'both') => {
|
|
|
144
159
|
}
|
|
145
160
|
|
|
146
161
|
return {
|
|
147
|
-
class: ['--scrollbar
|
|
162
|
+
class: ['--scrollbar-drag', () => state.dragging && '--dragging'],
|
|
148
163
|
// Links and images would otherwise start a native drag-and-drop mid-scroll.
|
|
149
164
|
ondragstart: (e: DragEvent) => {
|
|
150
165
|
e.preventDefault();
|
|
@@ -192,9 +207,69 @@ const drag = (axis: Axis = 'both') => {
|
|
|
192
207
|
},
|
|
193
208
|
onpointerup: end
|
|
194
209
|
};
|
|
195
|
-
}
|
|
210
|
+
}
|
|
211
|
+
|
|
196
212
|
|
|
197
|
-
|
|
213
|
+
// One scroller's attributes: the bar and its variants, an edge effect if asked for, and mouse drag along 'drag''s axis,
|
|
214
|
+
// both when true.
|
|
215
|
+
const scrollbar = ({
|
|
216
|
+
auto,
|
|
217
|
+
blur: blurred,
|
|
218
|
+
color,
|
|
219
|
+
drag: dragged,
|
|
220
|
+
fade: faded,
|
|
221
|
+
hidden,
|
|
222
|
+
horizontal = false,
|
|
223
|
+
hover,
|
|
224
|
+
snap
|
|
225
|
+
}: Options = {}) => {
|
|
226
|
+
let classes: (string | (() => false | string))[] = ['--scrollbar'],
|
|
227
|
+
effect = blurred
|
|
228
|
+
? blur(horizontal)
|
|
229
|
+
: faded
|
|
230
|
+
? edges('--scrollbar-fade-size', horizontal)
|
|
231
|
+
: {},
|
|
232
|
+
grab = dragged ? drag(dragged === true ? 'both' : dragged) : null;
|
|
233
|
+
|
|
234
|
+
if (auto) {
|
|
235
|
+
classes.push('--scrollbar-auto');
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
if (blurred) {
|
|
239
|
+
classes.push('--scrollbar-blur');
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
if (color) {
|
|
243
|
+
classes.push(`--scrollbar-${color}`);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
if (faded) {
|
|
247
|
+
classes.push('--scrollbar-fade');
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
if (hidden) {
|
|
251
|
+
classes.push('--scrollbar-hidden');
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
if (horizontal) {
|
|
255
|
+
classes.push('--scrollbar-horizontal');
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
if (hover) {
|
|
259
|
+
classes.push('--scrollbar-hover');
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
if (snap) {
|
|
263
|
+
classes.push('--scrollbar-snap');
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
if (!grab) {
|
|
267
|
+
return { ...effect, class: classes };
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
return { ...effect, ...grab, class: [...classes, ...grab.class] };
|
|
271
|
+
};
|
|
198
272
|
|
|
199
273
|
|
|
200
|
-
export default
|
|
274
|
+
export default scrollbar;
|
|
275
|
+
export type { Axis, Color, Options };
|
|
@@ -3,175 +3,39 @@
|
|
|
3
3
|
|
|
4
4
|
// The sizes are registered so they compute to pixels, which the fallback reads as its ramp and the animation
|
|
5
5
|
// ranges accept; the fade lengths so the scroll-driven animations below can interpolate them.
|
|
6
|
-
@property --
|
|
6
|
+
@property --scrollbar-blur-size {
|
|
7
7
|
inherits: true;
|
|
8
8
|
initial-value: 0px;
|
|
9
9
|
syntax: '<length>';
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
@property --
|
|
12
|
+
@property --scrollbar-fade-end {
|
|
13
13
|
inherits: false;
|
|
14
14
|
initial-value: 0px;
|
|
15
15
|
syntax: '<length>';
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
@property --
|
|
18
|
+
@property --scrollbar-fade-size {
|
|
19
19
|
inherits: true;
|
|
20
20
|
initial-value: 0px;
|
|
21
21
|
syntax: '<length>';
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
@property --
|
|
24
|
+
@property --scrollbar-fade-start {
|
|
25
25
|
inherits: false;
|
|
26
26
|
initial-value: 0px;
|
|
27
27
|
syntax: '<length>';
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
// Clipped descendants must pass wheel input to their scroller instead of trapping it at their own boundary.
|
|
31
|
-
.--scrollbar,
|
|
32
|
-
:where(.--scrollbar-scope) {
|
|
33
|
-
overscroll-behavior: var(--scrollbar-overscroll);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.--scrollbar,
|
|
37
|
-
:where(.--scrollbar-scope, .--scrollbar-scope *) {
|
|
38
|
-
scroll-behavior: var(--scrollbar-behavior);
|
|
39
|
-
scrollbar-color: var(--scrollbar-color-default) var(--scrollbar-rail-color);
|
|
40
|
-
scrollbar-width: var(--scrollbar-width);
|
|
41
|
-
|
|
42
|
-
@media (prefers-reduced-motion: reduce) {
|
|
43
|
-
scroll-behavior: auto;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
// Custom rendering exposes thumb shape and state; other browsers keep the native color and width above.
|
|
47
|
-
// Size-derived values resolve on each element rather than as root defaults, so a descendant that overrides
|
|
48
|
-
// --scrollbar-size keeps its own proportions.
|
|
49
|
-
@supports selector(::-webkit-scrollbar) {
|
|
50
|
-
--scrollbar-growth: calc(var(--scrollbar-size-hover, calc(var(--scrollbar-size) + 2px)) - var(--scrollbar-size));
|
|
51
|
-
--scrollbar-inset-edge: calc(var(--scrollbar-growth) * var(--scrollbar-align));
|
|
52
|
-
--scrollbar-inset-inner: calc(var(--scrollbar-growth) * (1 - var(--scrollbar-align)));
|
|
53
|
-
--scrollbar-radius: var(--scrollbar-border-radius, calc(var(--scrollbar-size) / 3));
|
|
54
|
-
--scrollbar-track-size: calc(var(--scrollbar-size) + var(--scrollbar-growth));
|
|
55
|
-
scrollbar-color: auto;
|
|
56
|
-
scrollbar-width: auto;
|
|
57
|
-
|
|
58
|
-
// Sized for the hovered thumb, so widening it never reflows the gutter.
|
|
59
|
-
&::-webkit-scrollbar {
|
|
60
|
-
height: calc(var(--scrollbar-size) + var(--scrollbar-growth));
|
|
61
|
-
width: calc(var(--scrollbar-size) + var(--scrollbar-growth));
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
&::-webkit-scrollbar-thumb {
|
|
65
|
-
background-clip: padding-box;
|
|
66
|
-
background-color: var(--scrollbar-color-default);
|
|
67
|
-
border: 0 solid transparent;
|
|
68
|
-
border-radius: var(--scrollbar-radius);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
// Transparent borders across the thumb inset its paint to --scrollbar-size, split between the window edge
|
|
72
|
-
// and the content side by --scrollbar-align. Each corner's cross-axis radius grows by its side's inset so
|
|
73
|
-
// the painted corners keep --scrollbar-radius.
|
|
74
|
-
&::-webkit-scrollbar-thumb:vertical {
|
|
75
|
-
border-end-end-radius: calc(var(--scrollbar-radius) + var(--scrollbar-inset-edge)) var(--scrollbar-radius);
|
|
76
|
-
border-end-start-radius: calc(var(--scrollbar-radius) + var(--scrollbar-inset-inner)) var(--scrollbar-radius);
|
|
77
|
-
border-inline-end-width: var(--scrollbar-inset-edge);
|
|
78
|
-
border-inline-start-width: var(--scrollbar-inset-inner);
|
|
79
|
-
border-start-end-radius: calc(var(--scrollbar-radius) + var(--scrollbar-inset-edge)) var(--scrollbar-radius);
|
|
80
|
-
border-start-start-radius: calc(var(--scrollbar-radius) + var(--scrollbar-inset-inner)) var(--scrollbar-radius);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
&::-webkit-scrollbar-thumb:horizontal {
|
|
84
|
-
border-block-end-width: var(--scrollbar-inset-edge);
|
|
85
|
-
border-block-start-width: var(--scrollbar-inset-inner);
|
|
86
|
-
border-end-end-radius: var(--scrollbar-radius) calc(var(--scrollbar-radius) + var(--scrollbar-inset-edge));
|
|
87
|
-
border-end-start-radius: var(--scrollbar-radius) calc(var(--scrollbar-radius) + var(--scrollbar-inset-edge));
|
|
88
|
-
border-start-end-radius: var(--scrollbar-radius) calc(var(--scrollbar-radius) + var(--scrollbar-inset-inner));
|
|
89
|
-
border-start-start-radius: var(--scrollbar-radius) calc(var(--scrollbar-radius) + var(--scrollbar-inset-inner));
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
&::-webkit-scrollbar-thumb:active,
|
|
93
|
-
&::-webkit-scrollbar-thumb:hover {
|
|
94
|
-
border-radius: var(--scrollbar-radius);
|
|
95
|
-
border-width: 0;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
&::-webkit-scrollbar-thumb:hover {
|
|
99
|
-
background-color: var(--scrollbar-color-hover);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
&::-webkit-scrollbar-thumb:active {
|
|
103
|
-
background-color: var(--scrollbar-color-pressed);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
&::-webkit-scrollbar-button {
|
|
107
|
-
display: none;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
&::-webkit-scrollbar-corner,
|
|
111
|
-
&::-webkit-scrollbar-track {
|
|
112
|
-
background: var(--scrollbar-rail-color);
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
30
|
// The scope styles existing scroll containers without making every descendant scrollable or reserving gutters.
|
|
118
31
|
.--scrollbar {
|
|
119
32
|
overflow: var(--scrollbar-overflow, auto);
|
|
120
33
|
scrollbar-gutter: var(--scrollbar-gutter, stable);
|
|
121
34
|
|
|
122
|
-
&.--flex-column {
|
|
123
|
-
overflow-x: hidden;
|
|
124
|
-
}
|
|
125
|
-
&.--flex-row {
|
|
126
|
-
overflow-y: hidden;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
// An `auto` size has no width to inset from, so the platform bar paints at full width. Its width is unknown,
|
|
130
|
-
// so a fade covers it rather than leaving a strip of the wrong size.
|
|
131
|
-
&-auto {
|
|
132
|
-
--scrollbar-growth: 0px;
|
|
133
|
-
--scrollbar-track-size: 0px;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
35
|
// Sticky edges pin to the scrollport and cancel their own size with a negative margin. Scoped under the
|
|
137
36
|
// scroller to outrank the overlay's own absolute '--glass-blur' placement whatever order the stylesheets load
|
|
138
37
|
// in; absolute edges would also resolve scroll(nearest) to an ancestor that never scrolls.
|
|
139
38
|
&-blur {
|
|
140
|
-
> .--scrollbar-blur-edge {
|
|
141
|
-
--blur: var(--scroll-blur);
|
|
142
|
-
flex-shrink: 0;
|
|
143
|
-
height: var(--scroll-blur-size);
|
|
144
|
-
position: sticky;
|
|
145
|
-
z-index: 1;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
> .--scrollbar-blur-end {
|
|
149
|
-
--glass-direction: to bottom;
|
|
150
|
-
--glass-opacity: calc(var(--scroll-overflow-end, 0) * 0.9);
|
|
151
|
-
inset: auto 0 0;
|
|
152
|
-
margin-top: calc(var(--scroll-blur-size) * -1);
|
|
153
|
-
translate: 0 var(--scroll-blur-offset-end);
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
> .--scrollbar-blur-start {
|
|
157
|
-
--glass-direction: to top;
|
|
158
|
-
--glass-opacity: calc(var(--scroll-overflow-start, 0) * 0.9);
|
|
159
|
-
inset: 0 0 auto;
|
|
160
|
-
margin-bottom: calc(var(--scroll-blur-size) * -1);
|
|
161
|
-
translate: 0 var(--scroll-blur-offset-start);
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
// The column utility adds a gap beside each edge, even when its height is cancelled.
|
|
165
|
-
&.--flex-column {
|
|
166
|
-
> .--scrollbar-blur-end {
|
|
167
|
-
margin-top: calc((var(--scroll-blur-size) + var(--gap-vertical)) * -1);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
> .--scrollbar-blur-start {
|
|
171
|
-
margin-bottom: calc((var(--scroll-blur-size) + var(--gap-vertical)) * -1);
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
|
|
175
39
|
// Block flow would stack the edges above and below the content, so a row lays them beside it. A flex
|
|
176
40
|
// item's containing block is the scroller itself, letting the edges stick across the whole scroll, and
|
|
177
41
|
// stretching gives them its full height however it is sized. Content keeps its own width to overflow.
|
|
@@ -184,52 +48,66 @@
|
|
|
184
48
|
|
|
185
49
|
> .--scrollbar-blur-edge {
|
|
186
50
|
height: auto;
|
|
187
|
-
width: var(--
|
|
51
|
+
width: var(--scrollbar-blur-size);
|
|
188
52
|
}
|
|
189
53
|
|
|
190
54
|
> .--scrollbar-blur-end {
|
|
191
55
|
--glass-direction: to right;
|
|
192
56
|
inset: auto 0 auto auto;
|
|
193
|
-
margin: 0 0 0 calc(var(--
|
|
194
|
-
translate: var(--
|
|
57
|
+
margin: 0 0 0 calc(var(--scrollbar-blur-size) * -1);
|
|
58
|
+
translate: var(--scrollbar-blur-offset-end) 0;
|
|
195
59
|
}
|
|
196
60
|
|
|
197
61
|
> .--scrollbar-blur-start {
|
|
198
62
|
--glass-direction: to left;
|
|
199
63
|
inset: auto auto auto 0;
|
|
200
|
-
margin: 0 calc(var(--
|
|
201
|
-
translate: var(--
|
|
64
|
+
margin: 0 calc(var(--scrollbar-blur-size) * -1) 0 0;
|
|
65
|
+
translate: var(--scrollbar-blur-offset-start) 0;
|
|
202
66
|
}
|
|
67
|
+
}
|
|
203
68
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
69
|
+
> .--scrollbar-blur-edge {
|
|
70
|
+
--glass-blur: var(--scrollbar-blur);
|
|
71
|
+
flex-shrink: 0;
|
|
72
|
+
height: var(--scrollbar-blur-size);
|
|
73
|
+
position: sticky;
|
|
74
|
+
z-index: 1;
|
|
75
|
+
}
|
|
208
76
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
77
|
+
> .--scrollbar-blur-end {
|
|
78
|
+
--glass-direction: to bottom;
|
|
79
|
+
--glass-opacity: calc(var(--scrollbar-overflow-end, 0) * 0.9);
|
|
80
|
+
inset: auto 0 0;
|
|
81
|
+
margin-top: calc(var(--scrollbar-blur-size) * -1);
|
|
82
|
+
translate: 0 var(--scrollbar-blur-offset-end);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
> .--scrollbar-blur-start {
|
|
86
|
+
--glass-direction: to top;
|
|
87
|
+
--glass-opacity: calc(var(--scrollbar-overflow-start, 0) * 0.9);
|
|
88
|
+
inset: 0 0 auto;
|
|
89
|
+
margin-bottom: calc(var(--scrollbar-blur-size) * -1);
|
|
90
|
+
translate: 0 var(--scrollbar-blur-offset-start);
|
|
213
91
|
}
|
|
214
92
|
|
|
215
93
|
// The scroller is the edges' nearest scroll container, so they follow its own scroll. Each edge reaches
|
|
216
94
|
// full strength once the content has scrolled the blur's size past it, however long the content is.
|
|
217
95
|
@supports (animation-timeline: scroll()) {
|
|
96
|
+
&.--scrollbar-horizontal > .--scrollbar-blur-edge {
|
|
97
|
+
animation-timeline: scroll(nearest x);
|
|
98
|
+
}
|
|
99
|
+
|
|
218
100
|
> .--scrollbar-blur-end {
|
|
219
101
|
animation: scrollbar-blur-end 1ms linear both;
|
|
220
|
-
animation-range: calc(100% - var(--
|
|
102
|
+
animation-range: calc(100% - var(--scrollbar-blur-size)) 100%;
|
|
221
103
|
animation-timeline: scroll(nearest);
|
|
222
104
|
}
|
|
223
105
|
|
|
224
106
|
> .--scrollbar-blur-start {
|
|
225
107
|
animation: scrollbar-blur-start 1ms linear both;
|
|
226
|
-
animation-range: 0px var(--
|
|
108
|
+
animation-range: 0px var(--scrollbar-blur-size);
|
|
227
109
|
animation-timeline: scroll(nearest);
|
|
228
110
|
}
|
|
229
|
-
|
|
230
|
-
&.--scrollbar-horizontal > .--scrollbar-blur-edge {
|
|
231
|
-
animation-timeline: scroll(nearest x);
|
|
232
|
-
}
|
|
233
111
|
}
|
|
234
112
|
|
|
235
113
|
@keyframes scrollbar-blur-end {
|
|
@@ -262,13 +140,13 @@
|
|
|
262
140
|
user-select: none;
|
|
263
141
|
}
|
|
264
142
|
|
|
265
|
-
// Unsupported browsers get --
|
|
143
|
+
// Unsupported browsers get --scrollbar-overflow-* from the scrollbar.fade() fallback instead of the timeline. The
|
|
266
144
|
// mask spans the scrollbar too, so a second, opaque layer keeps the custom bar's strip out of the fade.
|
|
267
145
|
&-fade {
|
|
268
|
-
--
|
|
269
|
-
--
|
|
146
|
+
--scrollbar-fade-end: calc(var(--scrollbar-fade-size) * var(--scrollbar-overflow-end, 0));
|
|
147
|
+
--scrollbar-fade-start: calc(var(--scrollbar-fade-size) * var(--scrollbar-overflow-start, 0));
|
|
270
148
|
mask-image:
|
|
271
|
-
linear-gradient(to bottom, transparent, #000 var(--
|
|
149
|
+
linear-gradient(to bottom, transparent, #000 var(--scrollbar-fade-start), #000 calc(100% - var(--scrollbar-fade-end)), transparent),
|
|
272
150
|
linear-gradient(#000 0 0);
|
|
273
151
|
mask-position: left, right;
|
|
274
152
|
mask-repeat: no-repeat;
|
|
@@ -276,7 +154,7 @@
|
|
|
276
154
|
|
|
277
155
|
&.--scrollbar-horizontal {
|
|
278
156
|
mask-image:
|
|
279
|
-
linear-gradient(to right, transparent, #000 var(--
|
|
157
|
+
linear-gradient(to right, transparent, #000 var(--scrollbar-fade-start), #000 calc(100% - var(--scrollbar-fade-end)), transparent),
|
|
280
158
|
linear-gradient(#000 0 0);
|
|
281
159
|
mask-position: top, bottom;
|
|
282
160
|
mask-size: 100% calc(100% - var(--scrollbar-track-size, 0px)), 100% var(--scrollbar-track-size, 0px);
|
|
@@ -286,7 +164,7 @@
|
|
|
286
164
|
// content is.
|
|
287
165
|
@supports (animation-timeline: scroll()) {
|
|
288
166
|
animation: scrollbar-fade-end 1ms linear both, scrollbar-fade-start 1ms linear both;
|
|
289
|
-
animation-range: calc(100% - var(--
|
|
167
|
+
animation-range: calc(100% - var(--scrollbar-fade-size)) 100%, 0px var(--scrollbar-fade-size);
|
|
290
168
|
animation-timeline: scroll(self);
|
|
291
169
|
|
|
292
170
|
&.--scrollbar-horizontal {
|
|
@@ -296,21 +174,21 @@
|
|
|
296
174
|
|
|
297
175
|
@keyframes scrollbar-fade-end {
|
|
298
176
|
from {
|
|
299
|
-
--
|
|
177
|
+
--scrollbar-fade-end: var(--scrollbar-fade-size);
|
|
300
178
|
}
|
|
301
179
|
|
|
302
180
|
to {
|
|
303
|
-
--
|
|
181
|
+
--scrollbar-fade-end: 0px;
|
|
304
182
|
}
|
|
305
183
|
}
|
|
306
184
|
|
|
307
185
|
@keyframes scrollbar-fade-start {
|
|
308
186
|
from {
|
|
309
|
-
--
|
|
187
|
+
--scrollbar-fade-start: 0px;
|
|
310
188
|
}
|
|
311
189
|
|
|
312
190
|
to {
|
|
313
|
-
--
|
|
191
|
+
--scrollbar-fade-start: var(--scrollbar-fade-size);
|
|
314
192
|
}
|
|
315
193
|
}
|
|
316
194
|
}
|
|
@@ -324,6 +202,14 @@
|
|
|
324
202
|
}
|
|
325
203
|
}
|
|
326
204
|
|
|
205
|
+
// No vertical gutter held open, and vertical wheels chain through to the page.
|
|
206
|
+
&-horizontal {
|
|
207
|
+
overflow-x: auto;
|
|
208
|
+
overflow-y: hidden;
|
|
209
|
+
overscroll-behavior-y: auto;
|
|
210
|
+
scrollbar-gutter: auto;
|
|
211
|
+
}
|
|
212
|
+
|
|
327
213
|
// Hide only the paint, preserving the scrollbar's size and gutter. Touch keeps its native affordance.
|
|
328
214
|
&-hover {
|
|
329
215
|
@media (hover: hover) and (pointer: fine) {
|
|
@@ -343,14 +229,6 @@
|
|
|
343
229
|
}
|
|
344
230
|
}
|
|
345
231
|
|
|
346
|
-
// No vertical gutter held open, and vertical wheels chain through to the page.
|
|
347
|
-
&-horizontal {
|
|
348
|
-
overflow-x: auto;
|
|
349
|
-
overflow-y: hidden;
|
|
350
|
-
overscroll-behavior-y: auto;
|
|
351
|
-
scrollbar-gutter: auto;
|
|
352
|
-
}
|
|
353
|
-
|
|
354
232
|
&-snap {
|
|
355
233
|
overflow: auto;
|
|
356
234
|
overscroll-behavior-x: contain;
|
|
@@ -362,3 +240,126 @@
|
|
|
362
240
|
}
|
|
363
241
|
}
|
|
364
242
|
}
|
|
243
|
+
|
|
244
|
+
// Clipped descendants must pass wheel input to their scroller instead of trapping it at their own boundary.
|
|
245
|
+
.--scrollbar,
|
|
246
|
+
:where(.--scrollbar-scope) {
|
|
247
|
+
overscroll-behavior: var(--scrollbar-overscroll);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.--scrollbar,
|
|
251
|
+
:where(.--scrollbar-scope, .--scrollbar-scope *) {
|
|
252
|
+
scroll-behavior: var(--scrollbar-behavior);
|
|
253
|
+
scrollbar-color: var(--scrollbar-color-default) var(--scrollbar-rail-color);
|
|
254
|
+
scrollbar-width: var(--scrollbar-width);
|
|
255
|
+
|
|
256
|
+
@media (prefers-reduced-motion: reduce) {
|
|
257
|
+
scroll-behavior: auto;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
// Custom rendering exposes thumb shape and state; other browsers keep the native color and width above.
|
|
261
|
+
// Size-derived values resolve on each element rather than as root defaults, so a descendant that overrides
|
|
262
|
+
// --scrollbar-size keeps its own proportions.
|
|
263
|
+
@supports selector(::-webkit-scrollbar) {
|
|
264
|
+
--scrollbar-growth: calc(var(--scrollbar-size-hover, calc(var(--scrollbar-size) + 2px)) - var(--scrollbar-size));
|
|
265
|
+
--scrollbar-inset-edge: calc(var(--scrollbar-growth) * var(--scrollbar-align) + var(--scrollbar-offset));
|
|
266
|
+
--scrollbar-inset-inner: calc(var(--scrollbar-growth) * (1 - var(--scrollbar-align)));
|
|
267
|
+
--scrollbar-radius: var(--scrollbar-border-radius, calc(var(--scrollbar-size) / 3));
|
|
268
|
+
--scrollbar-track-size: calc(var(--scrollbar-size) + var(--scrollbar-growth) + var(--scrollbar-offset));
|
|
269
|
+
scrollbar-color: auto;
|
|
270
|
+
scrollbar-width: auto;
|
|
271
|
+
|
|
272
|
+
// Sized for the hovered thumb, so widening it never reflows the gutter.
|
|
273
|
+
&::-webkit-scrollbar {
|
|
274
|
+
height: var(--scrollbar-track-size);
|
|
275
|
+
width: var(--scrollbar-track-size);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
&::-webkit-scrollbar-button {
|
|
279
|
+
display: none;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
&::-webkit-scrollbar-corner,
|
|
283
|
+
&::-webkit-scrollbar-track {
|
|
284
|
+
background-color: var(--scrollbar-rail-color);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
&::-webkit-scrollbar-thumb {
|
|
288
|
+
background-color: var(--scrollbar-color-default);
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
// Transparent borders across the thumb inset its paint to --scrollbar-size, split between the window edge
|
|
292
|
+
// and the content side by --scrollbar-align, plus --scrollbar-offset on the edge. Each corner's cross-axis
|
|
293
|
+
// radius grows by its side's inset so the painted corners keep --scrollbar-radius. The rail takes the
|
|
294
|
+
// resting thumb's shape, so it runs under the thumb rather than filling the gutter.
|
|
295
|
+
&::-webkit-scrollbar-thumb,
|
|
296
|
+
&::-webkit-scrollbar-track {
|
|
297
|
+
background-clip: padding-box;
|
|
298
|
+
border: 0 solid transparent;
|
|
299
|
+
border-radius: var(--scrollbar-radius);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
&::-webkit-scrollbar-thumb:active {
|
|
303
|
+
background-color: var(--scrollbar-color-pressed);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
&::-webkit-scrollbar-thumb:horizontal,
|
|
307
|
+
&::-webkit-scrollbar-track:horizontal {
|
|
308
|
+
border-block-end-width: var(--scrollbar-inset-edge);
|
|
309
|
+
border-block-start-width: var(--scrollbar-inset-inner);
|
|
310
|
+
border-end-end-radius: var(--scrollbar-radius) calc(var(--scrollbar-radius) + var(--scrollbar-inset-edge));
|
|
311
|
+
border-end-start-radius: var(--scrollbar-radius) calc(var(--scrollbar-radius) + var(--scrollbar-inset-edge));
|
|
312
|
+
border-start-end-radius: var(--scrollbar-radius) calc(var(--scrollbar-radius) + var(--scrollbar-inset-inner));
|
|
313
|
+
border-start-start-radius: var(--scrollbar-radius) calc(var(--scrollbar-radius) + var(--scrollbar-inset-inner));
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
&::-webkit-scrollbar-thumb:hover {
|
|
317
|
+
background-color: var(--scrollbar-color-hover);
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
&::-webkit-scrollbar-thumb:vertical,
|
|
321
|
+
&::-webkit-scrollbar-track:vertical {
|
|
322
|
+
border-end-end-radius: calc(var(--scrollbar-radius) + var(--scrollbar-inset-edge)) var(--scrollbar-radius);
|
|
323
|
+
border-end-start-radius: calc(var(--scrollbar-radius) + var(--scrollbar-inset-inner)) var(--scrollbar-radius);
|
|
324
|
+
border-inline-end-width: var(--scrollbar-inset-edge);
|
|
325
|
+
border-inline-start-width: var(--scrollbar-inset-inner);
|
|
326
|
+
border-start-end-radius: calc(var(--scrollbar-radius) + var(--scrollbar-inset-edge)) var(--scrollbar-radius);
|
|
327
|
+
border-start-start-radius: calc(var(--scrollbar-radius) + var(--scrollbar-inset-inner)) var(--scrollbar-radius);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
&::-webkit-scrollbar-track:horizontal {
|
|
331
|
+
margin-inline: var(--scrollbar-track-inset);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
&::-webkit-scrollbar-track:vertical {
|
|
335
|
+
margin-block: var(--scrollbar-track-inset);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
&:hover::-webkit-scrollbar-thumb:horizontal,
|
|
339
|
+
&:hover::-webkit-scrollbar-track:horizontal,
|
|
340
|
+
&::-webkit-scrollbar-thumb:horizontal:active,
|
|
341
|
+
&::-webkit-scrollbar-track:horizontal:active {
|
|
342
|
+
border-block-end-width: var(--scrollbar-offset);
|
|
343
|
+
border-block-start-width: 0;
|
|
344
|
+
border-end-end-radius: var(--scrollbar-radius) calc(var(--scrollbar-radius) + var(--scrollbar-offset));
|
|
345
|
+
border-end-start-radius: var(--scrollbar-radius) calc(var(--scrollbar-radius) + var(--scrollbar-offset));
|
|
346
|
+
border-start-end-radius: var(--scrollbar-radius);
|
|
347
|
+
border-start-start-radius: var(--scrollbar-radius);
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
// Grown to the full track, less the offset that keeps it off the window edge. A scrollbar part only matches
|
|
351
|
+
// its own hover, so the scroller's hover grows the thumb and rail together; pressing either holds it through
|
|
352
|
+
// a drag.
|
|
353
|
+
&:hover::-webkit-scrollbar-thumb:vertical,
|
|
354
|
+
&:hover::-webkit-scrollbar-track:vertical,
|
|
355
|
+
&::-webkit-scrollbar-thumb:vertical:active,
|
|
356
|
+
&::-webkit-scrollbar-track:vertical:active {
|
|
357
|
+
border-end-end-radius: calc(var(--scrollbar-radius) + var(--scrollbar-offset)) var(--scrollbar-radius);
|
|
358
|
+
border-end-start-radius: var(--scrollbar-radius);
|
|
359
|
+
border-inline-end-width: var(--scrollbar-offset);
|
|
360
|
+
border-inline-start-width: 0;
|
|
361
|
+
border-start-end-radius: calc(var(--scrollbar-radius) + var(--scrollbar-offset)) var(--scrollbar-radius);
|
|
362
|
+
border-start-start-radius: var(--scrollbar-radius);
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
}
|