@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,45 +1,22 @@
|
|
|
1
|
-
@use '/shared';
|
|
2
1
|
@use '/tokens';
|
|
2
|
+
@use 'css-utilities/hidden';
|
|
3
3
|
@use 'variables';
|
|
4
4
|
|
|
5
5
|
.relative-time {
|
|
6
6
|
border-radius: var(--border-radius-100);
|
|
7
|
+
color: var(--color);
|
|
7
8
|
display: inline-flex;
|
|
8
9
|
font-variant-numeric: tabular-nums;
|
|
9
10
|
outline: none;
|
|
10
|
-
transition: color
|
|
11
|
+
transition: color var(--duration-fast) var(--easing-spring);
|
|
11
12
|
white-space: nowrap;
|
|
12
13
|
|
|
13
|
-
// Qualified so it beats the reused tooltip's own cursor.
|
|
14
|
-
&.tooltip {
|
|
15
|
-
cursor: default;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// Brightens on hover so the text reads as something with more to say.
|
|
19
|
-
&:focus-visible,
|
|
20
|
-
&:hover {
|
|
21
|
-
color: var(--color-hover);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
&:focus-visible {
|
|
25
|
-
outline: 2px solid var(--focus-color);
|
|
26
|
-
outline-offset: 2px;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
14
|
&-digit,
|
|
30
15
|
&-rest {
|
|
31
16
|
display: inline-block;
|
|
32
17
|
white-space: pre;
|
|
33
18
|
}
|
|
34
19
|
|
|
35
|
-
&-digits,
|
|
36
|
-
&-rests,
|
|
37
|
-
&-roll,
|
|
38
|
-
&-slot {
|
|
39
|
-
display: inline-flex;
|
|
40
|
-
position: relative;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
20
|
&-digit--entering,
|
|
44
21
|
&-rest--entering,
|
|
45
22
|
&-slot--entering {
|
|
@@ -54,6 +31,14 @@
|
|
|
54
31
|
position: absolute;
|
|
55
32
|
}
|
|
56
33
|
|
|
34
|
+
&-digits,
|
|
35
|
+
&-rests,
|
|
36
|
+
&-roll,
|
|
37
|
+
&-slot {
|
|
38
|
+
display: inline-flex;
|
|
39
|
+
position: relative;
|
|
40
|
+
}
|
|
41
|
+
|
|
57
42
|
// An empty flex item would lend the line its bottom edge as a baseline, lifting "just now".
|
|
58
43
|
&-digits:empty {
|
|
59
44
|
display: none;
|
|
@@ -71,7 +56,7 @@
|
|
|
71
56
|
|
|
72
57
|
// Opens from slightly below, smaller and blurred; closes faster than it opens.
|
|
73
58
|
&-tooltip.tooltip-message {
|
|
74
|
-
filter: blur(
|
|
59
|
+
filter: blur(var(--blur-300));
|
|
75
60
|
transform-origin: bottom center;
|
|
76
61
|
transition:
|
|
77
62
|
filter var(--transition-duration) var(--transition-timing-function),
|
|
@@ -88,6 +73,21 @@
|
|
|
88
73
|
}
|
|
89
74
|
}
|
|
90
75
|
|
|
76
|
+
// Qualified so it beats the reused tooltip's own cursor.
|
|
77
|
+
&.tooltip {
|
|
78
|
+
cursor: default;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Brightens on hover so the text reads as something with more to say.
|
|
82
|
+
&:focus-visible {
|
|
83
|
+
--color: var(--color-hover);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&:focus-visible {
|
|
87
|
+
outline: 2px solid var(--focus-color);
|
|
88
|
+
outline-offset: calc(var(--size-100) / 4);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
91
|
@media (prefers-reduced-motion: reduce) {
|
|
92
92
|
&-tooltip.tooltip-message {
|
|
93
93
|
filter: none;
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
@use '/
|
|
1
|
+
@use 'css-utilities/color';
|
|
2
|
+
|
|
2
3
|
|
|
3
4
|
.relative-time {
|
|
5
|
+
@extend %color-state;
|
|
6
|
+
--color-active: var(--color-hover);
|
|
7
|
+
--color-default: currentColor;
|
|
4
8
|
--color-hover: var(--color-text-500);
|
|
5
|
-
--focus-color: var(--color-
|
|
9
|
+
--focus-color: var(--color-primary-500);
|
|
6
10
|
--placeholder: '0 min ago';
|
|
7
|
-
--roll-blur:
|
|
11
|
+
--roll-blur: var(--blur-400);
|
|
8
12
|
// Long enough to read as motion, short enough that a seconds counter never has two rolls overlapping.
|
|
9
|
-
--roll-duration:
|
|
13
|
+
--roll-duration: var(--duration-moderate);
|
|
10
14
|
--roll-enter-offset: 0.55em;
|
|
11
15
|
// Travels less than the entrance did: the exit shouldn't hold the eye.
|
|
12
16
|
--roll-exit-offset: -0.4em;
|
|
@@ -22,20 +26,14 @@
|
|
|
22
26
|
|
|
23
27
|
.relative-time-tooltip.tooltip-message {
|
|
24
28
|
--border-radius: var(--border-radius-300);
|
|
25
|
-
--box-shadow: var(--
|
|
29
|
+
--box-shadow-default: var(--surface-shadow-default);
|
|
26
30
|
--font-size: var(--font-size-300);
|
|
27
31
|
--font-weight: var(--font-weight-500);
|
|
28
|
-
--offset:
|
|
32
|
+
--offset: calc(var(--size-300) / 4);
|
|
29
33
|
--padding-horizontal: var(--size-100);
|
|
30
34
|
--padding-vertical: calc(var(--size-100) / 2);
|
|
31
35
|
--scale: 0.9;
|
|
32
36
|
--spacer: 6px;
|
|
33
|
-
--transition-duration: 0.1s;
|
|
34
|
-
--transition-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
|
|
35
|
-
|
|
36
|
-
#{tokens.state(active, '.relative-time')} > & {
|
|
37
|
-
--transition-duration: 0.16s;
|
|
38
|
-
}
|
|
39
37
|
|
|
40
38
|
@media (prefers-reduced-motion: reduce) {
|
|
41
39
|
--offset: 0px;
|
|
@@ -1,5 +1,70 @@
|
|
|
1
1
|
@use 'variables';
|
|
2
2
|
|
|
3
|
+
|
|
4
|
+
// The weight as a number, so it can animate and the tracking below can follow it.
|
|
5
|
+
@property --font-weight {
|
|
6
|
+
inherits: true;
|
|
7
|
+
initial-value: 400;
|
|
8
|
+
syntax: '<number>';
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// The surface counter. Registered as an integer so a level is always whole, starts at 0, the page, and matches the
|
|
12
|
+
// surface style queries exactly.
|
|
13
|
+
@property --surface-level {
|
|
14
|
+
inherits: true;
|
|
15
|
+
initial-value: 0;
|
|
16
|
+
syntax: '<integer>';
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// A surface's step on the shadow ladder. Not inherited, since each surface sets its own, and a number so a weight can
|
|
20
|
+
// fall between two steps and animate.
|
|
21
|
+
@property --surface-shadow-weight {
|
|
22
|
+
inherits: false;
|
|
23
|
+
initial-value: 0;
|
|
24
|
+
syntax: '<number>';
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
* {
|
|
28
|
+
// Recalculate at each element's font size instead of inheriting the body's computed length. A font's '-uniwidth'
|
|
29
|
+
// placeholder sets '--font-weight-tracking', tightening tracking as the weight rises past the body's, so a label
|
|
30
|
+
// changing weight keeps its width; without one it is 0.
|
|
31
|
+
letter-spacing: calc(
|
|
32
|
+
var(--letter-spacing) - (var(--font-weight) - var(--font-weight-400)) * var(--font-weight-tracking, 0em)
|
|
33
|
+
);
|
|
34
|
+
line-height: var(--line-height);
|
|
35
|
+
|
|
36
|
+
&,
|
|
37
|
+
&::after,
|
|
38
|
+
&::before {
|
|
39
|
+
box-sizing: border-box;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
a {
|
|
44
|
+
color: var(--color, inherit);
|
|
45
|
+
cursor: pointer;
|
|
46
|
+
outline: none;
|
|
47
|
+
text-decoration: none;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
b,
|
|
51
|
+
strong {
|
|
52
|
+
color: var(--color, inherit);
|
|
53
|
+
font-weight: var(--font-weight);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
body {
|
|
57
|
+
-moz-osx-font-smoothing: grayscale;
|
|
58
|
+
-webkit-font-smoothing: antialiased;
|
|
59
|
+
background-color: var(--background);
|
|
60
|
+
color: var(--color);
|
|
61
|
+
font-family: var(--font-family);
|
|
62
|
+
font-size: var(--font-size);
|
|
63
|
+
font-weight: var(--font-weight);
|
|
64
|
+
min-width: var(--min-width);
|
|
65
|
+
text-rendering: optimizeLegibility;
|
|
66
|
+
}
|
|
67
|
+
|
|
3
68
|
body,
|
|
4
69
|
html {
|
|
5
70
|
height: 100%;
|
|
@@ -29,53 +94,11 @@ h6 {
|
|
|
29
94
|
}
|
|
30
95
|
}
|
|
31
96
|
|
|
32
|
-
b,
|
|
33
|
-
strong {
|
|
34
|
-
color: var(--color, inherit);
|
|
35
|
-
font-weight: var(--font-weight);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
sub,
|
|
39
|
-
sup {
|
|
40
|
-
font-size: 0.8em;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
body {
|
|
44
|
-
background-color: var(--background);
|
|
45
|
-
color: var(--color);
|
|
46
|
-
font-family: var(--font-family);
|
|
47
|
-
font-size: var(--font-size);
|
|
48
|
-
font-weight: var(--font-weight);
|
|
49
|
-
min-width: var(--min-width);
|
|
50
|
-
text-rendering: optimizeLegibility;
|
|
51
|
-
-webkit-font-smoothing: antialiased;
|
|
52
|
-
-moz-osx-font-smoothing: grayscale;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
* {
|
|
56
|
-
// Recalculate at each element's font size instead of inheriting
|
|
57
|
-
// the body's computed length.
|
|
58
|
-
letter-spacing: var(--letter-spacing);
|
|
59
|
-
line-height: var(--line-height);
|
|
60
|
-
|
|
61
|
-
&,
|
|
62
|
-
&::after,
|
|
63
|
-
&::before {
|
|
64
|
-
box-sizing: border-box;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
a {
|
|
69
|
-
color: var(--color, inherit);
|
|
70
|
-
cursor: pointer;
|
|
71
|
-
outline: none;
|
|
72
|
-
text-decoration: none;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
97
|
p {
|
|
76
98
|
margin: 0;
|
|
77
99
|
overflow-wrap: break-word;
|
|
78
100
|
padding: 0;
|
|
101
|
+
text-wrap: pretty;
|
|
79
102
|
width: 100%;
|
|
80
103
|
}
|
|
81
104
|
|
|
@@ -100,6 +123,11 @@ sub {
|
|
|
100
123
|
bottom: -0.48em;
|
|
101
124
|
}
|
|
102
125
|
|
|
126
|
+
sub,
|
|
127
|
+
sup {
|
|
128
|
+
font-size: 0.8em;
|
|
129
|
+
}
|
|
130
|
+
|
|
103
131
|
sup {
|
|
104
132
|
top: -0.48em;
|
|
105
133
|
}
|
|
@@ -1,36 +1,50 @@
|
|
|
1
1
|
@use 'sass:list';
|
|
2
|
+
@use 'sass:map';
|
|
2
3
|
@use '/shared';
|
|
3
4
|
@use '/tokens';
|
|
4
5
|
|
|
5
6
|
|
|
7
|
+
* {
|
|
8
|
+
--border-radius: calc(1em / 1.618);
|
|
9
|
+
--gap: calc(1em / 1.618);
|
|
10
|
+
--gap-horizontal: var(--gap);
|
|
11
|
+
--gap-vertical: var(--gap);
|
|
12
|
+
--letter-spacing: clamp(-0.022em, calc(0.060542rem - 0.051418em), 0em);
|
|
13
|
+
--line-height: clamp(1.128em, calc(0.95em + 0.668rem), 1.618em);
|
|
14
|
+
--padding-horizontal: 1em;
|
|
15
|
+
--padding-vertical: calc(1em * 1.272 / (1.618 * 1.618));
|
|
16
|
+
}
|
|
17
|
+
|
|
6
18
|
:root {
|
|
19
|
+
@include shared.css-variables(blur, tokens.$blur);
|
|
7
20
|
@include shared.css-variables(border-radius, tokens.$border-radius);
|
|
8
21
|
@include shared.css-variables(border-width, tokens.$border-width);
|
|
9
|
-
@include shared.css-variables(box-shadow, tokens.$box-shadow);
|
|
10
22
|
@include shared.css-variables(color, tokens.$color);
|
|
11
|
-
@include shared.css-variables(
|
|
23
|
+
@include shared.css-variables(duration, map.get(tokens.$transition, duration));
|
|
24
|
+
@include shared.css-variables(easing, map.get(tokens.$transition, easing));
|
|
12
25
|
@include shared.css-variables(font-size, tokens.$font-size);
|
|
13
26
|
@include shared.css-variables(size, tokens.$size);
|
|
14
27
|
@include shared.css-variables(spacer, tokens.$spacer);
|
|
15
28
|
|
|
16
|
-
|
|
17
|
-
|
|
29
|
+
@each $name in map.keys(tokens.$color) {
|
|
30
|
+
@include shared.color-weights(
|
|
31
|
+
$name,
|
|
32
|
+
map.get(tokens.$themes, light, surface, color),
|
|
33
|
+
map.get(tokens.$themes, dark, surface, color)
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
|
|
18
37
|
--font-size: var(--font-size-400);
|
|
19
38
|
--font-weight: var(--font-weight-400);
|
|
20
39
|
--min-width: 320px;
|
|
21
|
-
--transition-duration:
|
|
22
|
-
--transition-timing-function:
|
|
40
|
+
--transition-duration: var(--duration-fast);
|
|
41
|
+
--transition-timing-function: var(--easing-spring);
|
|
23
42
|
}
|
|
24
43
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
--gap-vertical: var(--gap);
|
|
30
|
-
--letter-spacing: clamp(-0.022em, calc(0.060542rem - 0.051418em), 0em);
|
|
31
|
-
--line-height: clamp(1.128em, calc(0.95em + 0.668rem), 1.618em);
|
|
32
|
-
--padding-horizontal: 1em;
|
|
33
|
-
--padding-vertical: calc(1em * 1.272 / (1.618 * 1.618));
|
|
44
|
+
// Light, as a page declaring no color scheme is drawn, until the page declares one: 'light-dark()' needs a scheme,
|
|
45
|
+
// and the fallback Lightning CSS writes for older browsers has none to read without it.
|
|
46
|
+
:where(:root) {
|
|
47
|
+
color-scheme: light;
|
|
34
48
|
}
|
|
35
49
|
|
|
36
50
|
b,
|
|
@@ -39,6 +53,10 @@ strong {
|
|
|
39
53
|
--font-weight: var(--font-weight-500);
|
|
40
54
|
}
|
|
41
55
|
|
|
56
|
+
h1 {
|
|
57
|
+
--font-size: var(--font-size-800);
|
|
58
|
+
}
|
|
59
|
+
|
|
42
60
|
h1,
|
|
43
61
|
h2,
|
|
44
62
|
h3,
|
|
@@ -47,32 +65,18 @@ h4 {
|
|
|
47
65
|
--font-weight: var(--font-weight-500);
|
|
48
66
|
}
|
|
49
67
|
|
|
50
|
-
h1 {
|
|
51
|
-
--font-size: var(--font-size-800);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
68
|
h2 {
|
|
55
|
-
--font-size: var(--font-size-700);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
h3 {
|
|
59
69
|
--font-size: var(--font-size-600);
|
|
60
70
|
}
|
|
61
71
|
|
|
62
|
-
|
|
72
|
+
h3 {
|
|
63
73
|
--font-size: var(--font-size-500);
|
|
64
74
|
}
|
|
65
75
|
|
|
66
|
-
|
|
76
|
+
h4 {
|
|
67
77
|
--font-size: var(--font-size-400);
|
|
68
78
|
}
|
|
69
79
|
|
|
70
80
|
section {
|
|
71
81
|
--width: 100%;
|
|
72
82
|
}
|
|
73
|
-
|
|
74
|
-
// Light, as a page declaring no color scheme is drawn, until the page declares one: 'light-dark()' needs a scheme,
|
|
75
|
-
// and the fallback Lightning CSS writes for older browsers has none to read without it.
|
|
76
|
-
:where(:root) {
|
|
77
|
-
color-scheme: light;
|
|
78
|
-
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
@use 'variables';
|
|
2
|
+
|
|
3
|
+
.section {
|
|
4
|
+
&,
|
|
5
|
+
&-header {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-flow: column;
|
|
8
|
+
gap: var(--gap-vertical) var(--gap-horizontal);
|
|
9
|
+
position: relative;
|
|
10
|
+
width: 100%;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&-subtitle,
|
|
14
|
+
&-suptitle {
|
|
15
|
+
font-size: var(--font-size);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&-subtitle,
|
|
19
|
+
&-suptitle,
|
|
20
|
+
&-title {
|
|
21
|
+
color: var(--color);
|
|
22
|
+
display: block;
|
|
23
|
+
position: relative;
|
|
24
|
+
width: 100%;
|
|
25
|
+
z-index: 1;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&-title {
|
|
29
|
+
text-wrap: balance;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
.section {
|
|
2
|
+
--gap-horizontal: 0px;
|
|
3
|
+
--gap-vertical: 0px;
|
|
4
|
+
|
|
5
|
+
&-header {
|
|
6
|
+
--gap-horizontal: var(--size-300);
|
|
7
|
+
--gap-vertical: calc(var(--size-100) / 2);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
&-subtitle,
|
|
11
|
+
&-suptitle {
|
|
12
|
+
--color: var(--color-default);
|
|
13
|
+
--color-default: var(--color-text-400);
|
|
14
|
+
--font-size: var(--font-size-400);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&-title {
|
|
18
|
+
--color: var(--color-default);
|
|
19
|
+
--color-default: var(--color-text-500);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -38,6 +38,9 @@ type A = Attributes & {
|
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
type Option = {
|
|
41
|
+
// Replaces the whole row (check, label and detail); a '.select-menu-option-label' inside it keeps the open panel's
|
|
42
|
+
// text aligned with the trigger's, and a '.select-menu-check' still shows on the chosen row.
|
|
43
|
+
content?: Renderable<unknown>;
|
|
41
44
|
detail?: string;
|
|
42
45
|
label: Renderable<unknown>;
|
|
43
46
|
selected?: Renderable<unknown>;
|
|
@@ -453,8 +456,8 @@ function template(
|
|
|
453
456
|
class='select-menu-scroller'
|
|
454
457
|
${{
|
|
455
458
|
onconnect: (element: HTMLElement) => {
|
|
456
|
-
parts.label = element.querySelector<HTMLElement>('.select-menu-option-label') ?? undefined;
|
|
457
459
|
parts.option = element.querySelector<HTMLElement>('.select-menu-option') ?? undefined;
|
|
460
|
+
parts.label = element.querySelector<HTMLElement>('.select-menu-option-label') ?? parts.option;
|
|
458
461
|
parts.scroller = element;
|
|
459
462
|
},
|
|
460
463
|
onscroll: function(this: HTMLElement) {
|
|
@@ -493,11 +496,13 @@ function template(
|
|
|
493
496
|
}
|
|
494
497
|
}}
|
|
495
498
|
>
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
499
|
+
${option.content ?? html`
|
|
500
|
+
<svg aria-hidden='true' class='select-menu-check'><use href='#${check}' /></svg>
|
|
501
|
+
<span class='select-menu-option-label'>
|
|
502
|
+
${option.label}
|
|
503
|
+
</span>
|
|
504
|
+
${option.detail && html`<span class='select-menu-option-detail'>${option.detail}</span>`}
|
|
505
|
+
`}
|
|
501
506
|
</div>
|
|
502
507
|
`)}
|
|
503
508
|
</div>
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
@use '/shared';
|
|
2
1
|
@use '/tokens';
|
|
2
|
+
@use 'css-utilities/hidden';
|
|
3
|
+
@use 'css-utilities/icon';
|
|
4
|
+
@use 'css-utilities/text';
|
|
3
5
|
@use 'variables';
|
|
4
6
|
|
|
5
7
|
.select {
|
|
@@ -18,16 +20,16 @@
|
|
|
18
20
|
&-check {
|
|
19
21
|
@extend %icon-stroke, %icon-swap;
|
|
20
22
|
flex: 0 0 auto;
|
|
21
|
-
height:
|
|
23
|
+
height: var(--size-400);
|
|
22
24
|
stroke-width: 2.25;
|
|
23
|
-
width:
|
|
25
|
+
width: var(--size-400);
|
|
24
26
|
}
|
|
25
27
|
|
|
26
28
|
&-chevron {
|
|
27
29
|
color: var(--color-muted);
|
|
28
30
|
flex: 0 0 auto;
|
|
29
|
-
height:
|
|
30
|
-
width:
|
|
31
|
+
height: var(--size-400);
|
|
32
|
+
width: var(--size-400);
|
|
31
33
|
}
|
|
32
34
|
|
|
33
35
|
&-label {
|
|
@@ -36,6 +38,7 @@
|
|
|
36
38
|
|
|
37
39
|
&-option {
|
|
38
40
|
align-items: center;
|
|
41
|
+
background: var(--background);
|
|
39
42
|
border-radius: var(--border-radius-400);
|
|
40
43
|
cursor: default;
|
|
41
44
|
display: flex;
|
|
@@ -44,14 +47,11 @@
|
|
|
44
47
|
padding: 0 var(--size-100);
|
|
45
48
|
user-select: none;
|
|
46
49
|
|
|
47
|
-
// No transition on the highlight: it follows every move, so easing would read as lag.
|
|
50
|
+
// No transition on the highlight: it follows every move, so easing would read as lag. Highlighting moves
|
|
51
|
+
// the option's resting fill, so the pointer's own hover adds nothing and pressing still steps from it.
|
|
48
52
|
&--highlighted,
|
|
49
53
|
&:focus {
|
|
50
|
-
background: var(--highlight);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
&[aria-selected='true'] .select-menu-check {
|
|
54
|
-
@extend %icon-swap-active;
|
|
54
|
+
--background-default: var(--highlight);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
&-detail {
|
|
@@ -66,6 +66,10 @@
|
|
|
66
66
|
flex: 1;
|
|
67
67
|
min-width: 0;
|
|
68
68
|
}
|
|
69
|
+
|
|
70
|
+
&[aria-selected='true'] .select-menu-check {
|
|
71
|
+
@extend %icon-swap-active;
|
|
72
|
+
}
|
|
69
73
|
}
|
|
70
74
|
|
|
71
75
|
// Closed, it is inert, so it takes no pointer or focus while it fades out.
|
|
@@ -105,7 +109,7 @@
|
|
|
105
109
|
opacity: 0;
|
|
106
110
|
pointer-events: none;
|
|
107
111
|
position: absolute;
|
|
108
|
-
transition: opacity
|
|
112
|
+
transition: opacity var(--duration-fast) var(--easing-spring);
|
|
109
113
|
|
|
110
114
|
@include tokens.state(active) {
|
|
111
115
|
opacity: 1;
|
|
@@ -152,20 +156,15 @@
|
|
|
152
156
|
height: var(--height);
|
|
153
157
|
margin: 0;
|
|
154
158
|
outline: none;
|
|
155
|
-
padding: 0
|
|
159
|
+
padding: 0 var(--size-200) 0 var(--size-300);
|
|
156
160
|
text-align: left;
|
|
157
161
|
touch-action: manipulation;
|
|
158
|
-
transition: scale var(--transition-duration) var(--transition-timing-function);
|
|
159
162
|
user-select: none;
|
|
160
163
|
width: 100%;
|
|
161
164
|
|
|
162
|
-
&:active {
|
|
163
|
-
scale: var(--press-scale);
|
|
164
|
-
}
|
|
165
|
-
|
|
166
165
|
&:focus-visible {
|
|
167
166
|
outline: var(--focus-width) solid var(--color);
|
|
168
|
-
outline-offset:
|
|
167
|
+
outline-offset: calc(var(--size-100) / 4);
|
|
169
168
|
}
|
|
170
169
|
}
|
|
171
170
|
|
|
@@ -177,19 +176,9 @@
|
|
|
177
176
|
}
|
|
178
177
|
|
|
179
178
|
@media (prefers-reduced-motion: reduce) {
|
|
180
|
-
&-menu {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
scale: 1;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
&-trigger {
|
|
187
|
-
transition: none;
|
|
188
|
-
|
|
189
|
-
&:active {
|
|
190
|
-
scale: 1;
|
|
191
|
-
}
|
|
192
|
-
}
|
|
179
|
+
&-menu-check {
|
|
180
|
+
filter: none;
|
|
181
|
+
scale: 1;
|
|
193
182
|
}
|
|
194
183
|
}
|
|
195
184
|
}
|
|
@@ -1,21 +1,26 @@
|
|
|
1
1
|
@use '/tokens';
|
|
2
|
+
@use 'css-utilities/background';
|
|
3
|
+
@use 'css-utilities/box-shadow';
|
|
4
|
+
@use 'css-utilities/surface';
|
|
2
5
|
|
|
6
|
+
// The trigger is a surface, lifting on hover, settling when pressed and holding the selected fill while open; its panel
|
|
7
|
+
// is a surface above it, whose options take the panel's own hover and pressed steps.
|
|
3
8
|
.select {
|
|
4
|
-
|
|
5
|
-
--
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
@extend %background-state, %box-shadow-state, %surface-raised-level;
|
|
10
|
+
--background-active: var(--surface-background-active);
|
|
11
|
+
--background-default: var(--surface-background-default);
|
|
12
|
+
--background-hover: var(--surface-background-hover);
|
|
13
|
+
--background-pressed: var(--surface-background-pressed);
|
|
14
|
+
--box-shadow-active: var(--surface-shadow-active);
|
|
15
|
+
--box-shadow-default: var(--surface-shadow-default);
|
|
16
|
+
--box-shadow-hover: var(--surface-shadow-hover);
|
|
17
|
+
--box-shadow-pressed: var(--surface-shadow-pressed);
|
|
9
18
|
--color: var(--color-text-500);
|
|
10
19
|
--color-muted: var(--color-text-300);
|
|
11
20
|
--focus-width: var(--border-width-500);
|
|
12
21
|
--font-size: calc(var(--font-size-400) * 0.875);
|
|
13
22
|
--height: 40px;
|
|
14
|
-
--highlight: color-mix(in oklch, var(--color) 6%, transparent);
|
|
15
23
|
--item-height: 36px;
|
|
16
|
-
--press-scale: 0.96;
|
|
17
|
-
--transition-duration: 150ms;
|
|
18
|
-
--transition-timing-function: ease-out;
|
|
19
24
|
--trigger-border-radius: var(--border-radius-400);
|
|
20
25
|
--width: min(260px, 100%);
|
|
21
26
|
|
|
@@ -23,28 +28,30 @@
|
|
|
23
28
|
&-menu {
|
|
24
29
|
// Read by the option's check, which pops in once the option is chosen.
|
|
25
30
|
&-option {
|
|
26
|
-
|
|
31
|
+
@extend %background-state;
|
|
32
|
+
--background-pressed: var(--highlight-pressed);
|
|
33
|
+
--icon-swap-duration: var(--duration-moderate);
|
|
27
34
|
--icon-swap-timing-function: linear(0, 0.058, 0.18, 0.321, 0.455, 0.573, 0.671, 0.75, 0.812, 0.86, 0.897, 0.924, 0.944, 0.96, 0.971, 0.979, 0.985, 0.989, 0.992, 0.994, 0.996, 0.997, 0.998, 0.999, 1);
|
|
28
35
|
}
|
|
29
36
|
|
|
30
37
|
&-panel {
|
|
31
|
-
|
|
38
|
+
@extend %background-state, %box-shadow-state, %surface-raised-level;
|
|
39
|
+
--background-default: var(--surface-background-default);
|
|
32
40
|
--border-radius: var(--border-radius-600);
|
|
33
|
-
--box-shadow:
|
|
34
|
-
0 0 0 1px oklch(from var(--color-black-500) l c h / 0.06),
|
|
35
|
-
0 1px 2px oklch(from var(--color-black-500) l c h / 0.06),
|
|
36
|
-
0 6px 16px -6px oklch(from var(--color-black-500) l c h / 0.12);
|
|
41
|
+
--box-shadow-default: var(--surface-shadow-default);
|
|
37
42
|
--fade: 24px;
|
|
43
|
+
--highlight: var(--surface-background-hover);
|
|
44
|
+
--highlight-pressed: var(--surface-background-pressed);
|
|
38
45
|
--pad: 4px;
|
|
39
46
|
--rows: 8;
|
|
40
47
|
--scale: 0.96;
|
|
41
|
-
--transition-duration:
|
|
42
|
-
--transition-timing-function:
|
|
48
|
+
--transition-duration: var(--duration-moderate);
|
|
49
|
+
--transition-timing-function: var(--easing-spring);
|
|
43
50
|
--width: auto;
|
|
44
51
|
|
|
45
52
|
// Leaves faster than it arrives, so choosing never waits on the list.
|
|
46
53
|
@include tokens.state(inactive) {
|
|
47
|
-
--transition-duration:
|
|
54
|
+
--transition-duration: var(--duration-moderate-exit);
|
|
48
55
|
}
|
|
49
56
|
|
|
50
57
|
@media (prefers-reduced-motion: reduce) {
|