@esportsplus/ui 0.57.0 → 0.58.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +123 -39
- package/build/components/accordion/group.d.ts +14 -0
- package/build/components/accordion/group.js +21 -0
- package/build/components/accordion/index.d.ts +9 -0
- package/build/components/accordion/index.js +20 -3
- package/build/components/accordion/scss/index.scss +1 -1
- package/build/components/announcement/scss/index.scss +1 -1
- package/build/components/breadcrumb/scss/index.scss +1 -1
- package/build/components/button/scss/index.scss +1 -1
- package/build/components/button/sidebar.d.ts +3 -0
- package/build/components/button/sidebar.js +40 -10
- package/build/components/capslock/index.js +1 -1
- package/build/components/capslock/scss/index.scss +1 -1
- package/build/components/card/scss/index.scss +1 -1
- package/build/components/cc/scss/index.scss +1 -1
- package/build/components/chat-minimap/scss/index.scss +1 -1
- package/build/components/checkbox/scss/index.scss +1 -1
- package/build/components/color-picker/index.d.ts +1 -0
- package/build/components/color-picker/index.js +166 -136
- package/build/components/color-picker/scss/index.scss +1 -1
- package/build/components/command/index.d.ts +0 -1
- package/build/components/command/index.js +3 -2
- package/build/components/command/scss/index.scss +1 -1
- package/build/components/copy/scss/index.scss +1 -1
- package/build/components/counter/scss/index.scss +1 -1
- package/build/components/datalist/index.js +3 -3
- package/build/components/datalist/scss/index.scss +1 -1
- package/build/components/dock/scss/index.scss +1 -1
- package/build/components/editor/code/index.d.ts +0 -1
- package/build/components/editor/code/index.js +0 -1
- package/build/components/editor/code/minimap.d.ts +2 -1
- package/build/components/editor/code/minimap.js +5 -2
- package/build/components/editor/code/view.d.ts +3 -1
- package/build/components/editor/code/view.js +37 -26
- package/build/components/editor/diffs/index.d.ts +0 -1
- package/build/components/editor/diffs/index.js +0 -1
- package/build/components/editor/diffs/merge.js +7 -3
- package/build/components/editor/diffs/view.js +3 -1
- package/build/components/editor/index.d.ts +4 -1
- package/build/components/editor/index.js +2 -1
- package/build/components/editor/markdown/editing.js +22 -3
- package/build/components/editor/markdown/erase.d.ts +9 -0
- package/build/components/editor/markdown/erase.js +78 -0
- package/build/components/editor/markdown/index.d.ts +0 -1
- package/build/components/editor/markdown/index.js +0 -1
- package/build/components/editor/markdown/layout.d.ts +2 -9
- package/build/components/editor/markdown/layout.js +2 -7
- package/build/components/editor/markdown/render.d.ts +0 -1
- package/build/components/editor/markdown/render.js +287 -235
- package/build/components/editor/markdown/view.js +566 -667
- package/build/components/editor/viewer/index.d.ts +27 -0
- package/build/components/editor/viewer/index.js +250 -0
- package/build/components/editor/viewer/model.d.ts +15 -0
- package/build/components/editor/viewer/model.js +73 -0
- package/build/components/editor/workspace/index.d.ts +6 -2
- package/build/components/editor/workspace/index.js +243 -137
- package/build/components/editor/workspace/keybindings.d.ts +37 -0
- package/build/components/editor/workspace/keybindings.js +288 -0
- package/build/components/editor/workspace/model.d.ts +55 -2
- package/build/components/editor/workspace/model.js +141 -3
- package/build/components/editor/workspace/navigate.d.ts +19 -0
- package/build/components/editor/workspace/navigate.js +118 -0
- package/build/components/editor/workspace/session.d.ts +29 -0
- package/build/components/editor/workspace/session.js +373 -0
- package/build/components/editor/workspace/shortcuts.d.ts +19 -0
- package/build/components/editor/workspace/shortcuts.js +185 -0
- package/build/components/editor/workspace/status.d.ts +34 -0
- package/build/components/editor/workspace/status.js +193 -0
- package/build/components/editor/workspace/statusbar.d.ts +15 -0
- package/build/components/editor/workspace/statusbar.js +190 -0
- package/build/components/editor/workspace/strip.d.ts +27 -0
- package/build/components/editor/workspace/strip.js +239 -0
- package/build/components/editor/workspace/tabs.d.ts +15 -0
- package/build/components/editor/workspace/tabs.js +63 -0
- package/build/components/error/index.js +1 -1
- package/build/components/error/scss/index.scss +1 -1
- package/build/components/filter/index.js +5 -3
- package/build/components/filter/scss/index.scss +1 -1
- package/build/components/frame/scss/index.scss +1 -1
- package/build/components/heatmap/index.js +3 -3
- package/build/components/heatmap/scss/index.scss +1 -1
- package/build/components/highlight/scss/index.scss +1 -1
- package/build/components/icon/scss/index.scss +1 -1
- package/build/components/image/scss/index.scss +1 -1
- package/build/components/index.d.ts +2 -0
- package/build/components/index.js +2 -0
- package/build/components/inline-edit/scss/index.scss +1 -1
- package/build/components/input/scss/index.scss +1 -1
- package/build/components/link/scss/index.scss +1 -1
- package/build/components/loading/scss/index.scss +1 -1
- package/build/components/marquee/scss/index.scss +1 -1
- package/build/components/metric/scss/index.scss +1 -1
- package/build/components/nav/index.d.ts +1 -1
- package/build/components/nav/scss/index.scss +1 -1
- package/build/components/nav/tree.d.ts +3 -1
- package/build/components/nav/tree.js +30 -60
- package/build/components/notification/scss/index.scss +1 -1
- package/build/components/overlay/scss/index.scss +1 -1
- package/build/components/page/scss/index.scss +1 -1
- package/build/components/pagination/arrows.d.ts +15 -0
- package/build/components/pagination/arrows.js +65 -0
- package/build/components/pagination/cards.d.ts +23 -0
- package/build/components/pagination/cards.js +66 -0
- package/build/components/pagination/index.d.ts +5 -0
- package/build/components/pagination/index.js +3 -1
- package/build/components/pagination/scss/index.scss +1 -1
- package/build/components/progress/scss/index.scss +1 -1
- package/build/components/pull-to-refresh/scss/index.scss +1 -1
- package/build/components/range/index.js +1 -1
- package/build/components/range/scss/index.scss +1 -1
- package/build/components/relative-time/scss/index.scss +1 -1
- package/build/components/root/scss/index.scss +1 -1
- package/build/components/section/scss/index.scss +2 -0
- package/build/components/select/index.d.ts +1 -0
- package/build/components/select/index.js +16 -11
- package/build/components/select/scss/index.scss +1 -1
- package/build/components/shortcut-recorder/scss/index.scss +1 -1
- package/build/components/sortable/scss/index.scss +1 -1
- package/build/components/sticky-header/index.js +3 -3
- package/build/components/sticky-header/scss/index.scss +1 -1
- package/build/components/story/scss/index.scss +1 -1
- package/build/components/surface-field/scss/index.scss +1 -1
- package/build/components/tasklist/scss/index.scss +1 -1
- package/build/components/text/scss/index.scss +1 -1
- package/build/components/textarea/scss/index.scss +1 -1
- package/build/{css-utilities → components}/theme/index.d.ts +1 -1
- package/build/{css-utilities → components}/theme/index.js +15 -5
- package/build/components/theme/scss/index.scss +2 -0
- package/build/components/theme-picker/index.d.ts +52 -0
- package/build/components/theme-picker/index.js +167 -0
- package/build/components/theme-picker/scss/index.scss +2 -0
- package/build/components/toast/index.js +3 -5
- package/build/components/toast/scss/index.scss +1 -1
- package/build/components/tooltip/menu.js +3 -1
- package/build/components/tooltip/scss/index.scss +1 -1
- package/build/components/typewriter/scss/index.scss +1 -1
- package/build/components/uptime/scss/index.scss +1 -1
- package/build/components/usage-meter/scss/index.scss +1 -1
- package/build/{css-utilities → modifiers}/glass/index.d.ts +2 -2
- package/build/modifiers/glass/index.js +28 -0
- package/build/modifiers/glass/scss/index.scss +2 -0
- package/build/{css-utilities → modifiers}/index.d.ts +0 -1
- package/build/{css-utilities → modifiers}/index.js +0 -1
- package/build/modifiers/scrollbar/index.d.ts +72 -0
- package/build/{css-utilities → modifiers}/scrollbar/index.js +52 -19
- package/build/modifiers/scrollbar/scss/index.scss +2 -0
- package/build/normalize/scss/index.scss +1 -2
- package/layer.scss +1 -1
- package/package.json +11 -18
- package/scripts/code-editor-markdown.test.mjs +45 -14
- package/scripts/code-viewer.test.mjs +69 -0
- package/scripts/workspace-keybindings.test.mjs +273 -0
- package/scripts/workspace-session.test.mjs +349 -0
- package/scripts/workspace-status.test.mjs +229 -0
- package/scripts/workspace-tabs.test.mjs +142 -0
- package/src/components/accordion/group.ts +39 -0
- package/src/components/accordion/index.ts +32 -6
- package/src/components/accordion/scss/index.scss +12 -21
- package/src/components/accordion/scss/variables.scss +18 -3
- package/src/components/announcement/scss/index.scss +4 -4
- package/src/components/announcement/scss/variables.scss +6 -6
- package/src/components/banner/scss/index.scss +1 -1
- package/src/components/breadcrumb/scss/index.scss +35 -50
- package/src/components/breadcrumb/scss/variables.scss +23 -31
- package/src/components/button/scss/_fan.scss +39 -43
- package/src/components/button/scss/_morph.scss +66 -78
- package/src/components/button/scss/_sidebar.scss +41 -30
- package/src/components/button/scss/_split.scss +9 -9
- package/src/components/button/scss/index.scss +23 -19
- package/src/components/button/scss/variables.scss +94 -90
- package/src/components/button/sidebar.ts +36 -24
- package/src/components/capslock/index.ts +2 -2
- package/src/components/capslock/scss/index.scss +11 -6
- package/src/components/capslock/scss/variables.scss +3 -5
- package/src/components/card/scss/_expand.scss +58 -64
- package/src/components/card/scss/index.scss +40 -21
- package/src/components/card/scss/variables.scss +40 -31
- package/src/components/cc/scss/index.scss +68 -68
- package/src/components/cc/scss/variables.scss +13 -14
- package/src/components/chat-minimap/scss/index.scss +24 -16
- package/src/components/chat-minimap/scss/variables.scss +37 -37
- package/src/components/checkbox/scss/index.scss +54 -52
- package/src/components/checkbox/scss/variables.scss +37 -39
- package/src/components/color-picker/index.ts +157 -120
- package/src/components/color-picker/scss/index.scss +159 -96
- package/src/components/color-picker/scss/variables.scss +33 -15
- package/src/components/command/index.ts +3 -2
- package/src/components/command/scss/index.scss +10 -14
- package/src/components/command/scss/variables.scss +12 -35
- package/src/components/copy/scss/index.scss +6 -6
- package/src/components/copy/scss/variables.scss +12 -15
- package/src/components/counter/scss/index.scss +14 -14
- package/src/components/counter/scss/variables.scss +1 -1
- package/src/components/datalist/index.ts +3 -3
- package/src/components/datalist/scss/index.scss +7 -6
- package/src/components/datalist/scss/variables.scss +7 -3
- package/src/components/dock/scss/index.scss +10 -15
- package/src/components/dock/scss/variables.scss +29 -25
- package/src/components/editor/code/index.ts +0 -1
- package/src/components/editor/code/minimap.ts +13 -5
- package/src/components/editor/code/scss/_editor.scss +83 -81
- package/src/components/editor/code/scss/_features.scss +106 -97
- package/src/components/editor/code/scss/_services.scss +27 -25
- package/src/components/editor/code/scss/index.scss +0 -1
- package/src/components/editor/code/scss/variables.scss +30 -26
- package/src/components/editor/code/view.ts +14 -5
- package/src/components/editor/diffs/index.ts +0 -1
- package/src/components/editor/diffs/merge.ts +2 -1
- package/src/components/editor/diffs/scss/_diffs.scss +67 -57
- package/src/components/editor/diffs/scss/_merge.scss +17 -14
- package/src/components/editor/diffs/scss/index.scss +0 -1
- package/src/components/editor/diffs/scss/variables.scss +25 -18
- package/src/components/editor/diffs/view.ts +2 -1
- package/src/components/editor/index.ts +7 -1
- package/src/components/editor/markdown/editing.ts +38 -3
- package/src/components/editor/markdown/erase.ts +124 -0
- package/src/components/editor/markdown/index.ts +0 -1
- package/src/components/editor/markdown/layout.ts +3 -12
- package/src/components/editor/markdown/render.ts +65 -37
- package/src/components/editor/markdown/scss/index.scss +92 -124
- package/src/components/editor/markdown/scss/variables.scss +39 -19
- package/src/components/editor/markdown/view.ts +737 -786
- package/src/components/editor/tree/scss/index.scss +121 -110
- package/src/components/editor/tree/scss/variables.scss +48 -54
- package/src/components/editor/viewer/index.ts +321 -0
- package/src/components/editor/viewer/model.ts +130 -0
- package/src/components/editor/viewer/scss/_viewer.scss +302 -0
- package/src/components/editor/viewer/scss/index.scss +2 -0
- package/src/components/editor/viewer/scss/variables.scss +69 -0
- package/src/components/editor/workspace/index.ts +159 -31
- package/src/components/editor/workspace/keybindings.ts +447 -0
- package/src/components/editor/workspace/model.ts +233 -3
- package/src/components/editor/workspace/navigate.ts +194 -0
- package/src/components/editor/workspace/scss/index.scss +72 -59
- package/src/components/editor/workspace/scss/keybindings.scss +190 -0
- package/src/components/editor/workspace/scss/status.scss +122 -0
- package/src/components/editor/workspace/scss/tabs.scss +56 -0
- package/src/components/editor/workspace/session.ts +551 -0
- package/src/components/editor/workspace/shortcuts.ts +255 -0
- package/src/components/editor/workspace/status.ts +259 -0
- package/src/components/editor/workspace/statusbar.ts +255 -0
- package/src/components/editor/workspace/strip.ts +273 -0
- package/src/components/editor/workspace/tabs.ts +106 -0
- package/src/components/error/index.ts +1 -1
- package/src/components/error/scss/index.scss +19 -19
- package/src/components/error/scss/variables.scss +2 -2
- package/src/components/filter/index.ts +7 -2
- package/src/components/filter/scss/index.scss +1 -1
- package/src/components/filter/scss/variables.scss +11 -10
- package/src/components/frame/scss/index.scss +12 -12
- package/src/components/frame/scss/variables.scss +8 -8
- package/src/components/heatmap/index.ts +3 -3
- package/src/components/heatmap/scss/index.scss +28 -26
- package/src/components/heatmap/scss/variables.scss +18 -17
- package/src/components/highlight/scss/index.scss +17 -13
- package/src/components/highlight/scss/variables.scss +8 -10
- package/src/components/icon/scss/index.scss +10 -0
- package/src/components/icon/scss/variables.scss +5 -0
- package/src/components/image/scss/index.scss +9 -9
- package/src/components/image/scss/variables.scss +7 -2
- package/src/components/index.ts +2 -0
- package/src/components/inline-edit/scss/index.scss +99 -104
- package/src/components/inline-edit/scss/variables.scss +40 -39
- package/src/components/input/scss/_field.scss +6 -20
- package/src/components/input/scss/_scrub.scss +10 -8
- package/src/components/input/scss/_tag.scss +35 -37
- package/src/components/input/scss/variables.scss +100 -99
- package/src/components/link/scss/index.scss +4 -1
- package/src/components/loading/scss/index.scss +1 -1
- package/src/components/loading/scss/variables.scss +1 -1
- package/src/components/marquee/scss/index.scss +9 -5
- package/src/components/marquee/scss/variables.scss +3 -1
- package/src/components/metric/scss/_flash.scss +3 -1
- package/src/components/metric/scss/index.scss +8 -6
- package/src/components/metric/scss/variables.scss +26 -20
- package/src/components/nav/index.ts +1 -1
- package/src/components/nav/scss/index.scss +12 -40
- package/src/components/nav/scss/variables.scss +30 -11
- package/src/components/nav/tree.ts +19 -62
- package/src/components/notification/scss/index.scss +7 -7
- package/src/components/notification/scss/variables.scss +7 -9
- package/src/components/overlay/scss/index.scss +181 -170
- package/src/components/overlay/scss/variables.scss +26 -57
- package/src/components/page/scss/index.scss +12 -11
- package/src/components/page/scss/variables.scss +5 -0
- package/src/components/pagination/arrows.ts +58 -0
- package/src/components/pagination/cards.ts +57 -0
- package/src/components/pagination/index.ts +4 -1
- package/src/components/pagination/scss/_arrows.scss +69 -0
- package/src/components/pagination/scss/_cards.scss +121 -0
- package/src/components/pagination/scss/_dots.scss +2 -5
- package/src/components/pagination/scss/index.scss +8 -6
- package/src/components/pagination/scss/variables.scss +87 -37
- package/src/components/progress/scss/_text.scss +21 -18
- package/src/components/progress/scss/index.scss +1 -1
- package/src/components/progress/scss/variables.scss +12 -12
- package/src/components/pull-to-refresh/scss/index.scss +2 -1
- package/src/components/pull-to-refresh/scss/variables.scss +11 -6
- package/src/components/range/index.ts +1 -1
- package/src/components/range/scss/_filter.scss +62 -51
- package/src/components/range/scss/_slider.scss +78 -75
- package/src/components/range/scss/_vertical.scss +6 -6
- package/src/components/range/scss/index.scss +3 -2
- package/src/components/range/scss/variables.scss +26 -23
- package/src/components/relative-time/scss/index.scss +27 -27
- package/src/components/relative-time/scss/variables.scss +10 -12
- package/src/components/root/scss/index.scss +71 -43
- package/src/components/root/scss/variables.scss +35 -31
- package/src/components/section/scss/index.scss +31 -0
- package/src/components/section/scss/variables.scss +21 -0
- package/src/components/select/index.ts +11 -6
- package/src/components/select/scss/index.scss +21 -32
- package/src/components/select/scss/variables.scss +25 -18
- package/src/components/shortcut-recorder/scss/index.scss +13 -12
- package/src/components/shortcut-recorder/scss/variables.scss +12 -13
- package/src/components/sortable/scss/index.scss +47 -44
- package/src/components/sortable/scss/variables.scss +4 -5
- package/src/components/sticky-header/index.ts +4 -4
- package/src/components/sticky-header/scss/index.scss +14 -13
- package/src/components/sticky-header/scss/variables.scss +9 -9
- package/src/components/story/scss/index.scss +26 -30
- package/src/components/story/scss/variables.scss +16 -9
- package/src/components/surface-field/scss/index.scss +45 -40
- package/src/components/surface-field/scss/variables.scss +5 -6
- package/src/components/tasklist/scss/index.scss +19 -19
- package/src/components/tasklist/scss/variables.scss +26 -29
- package/src/components/text/scss/index.scss +2 -1
- package/src/components/textarea/scss/variables.scss +1 -1
- package/src/{css-utilities → components}/theme/index.ts +17 -3
- package/src/components/theme/scss/index.scss +1 -0
- package/src/components/theme/scss/variables.scss +78 -0
- package/src/components/theme-picker/index.ts +231 -0
- package/src/components/theme-picker/scss/index.scss +264 -0
- package/src/components/toast/index.ts +28 -30
- package/src/components/toast/scss/index.scss +87 -87
- package/src/components/toast/scss/variables.scss +39 -39
- package/src/components/tooltip/menu.ts +4 -1
- package/src/components/tooltip/scss/_east.scss +10 -10
- package/src/components/tooltip/scss/_menu.scss +284 -269
- package/src/components/tooltip/scss/_north.scss +10 -10
- package/src/components/tooltip/scss/_shared.scss +7 -7
- package/src/components/tooltip/scss/_south.scss +10 -10
- package/src/components/tooltip/scss/_west.scss +10 -10
- package/src/components/tooltip/scss/index.scss +21 -20
- package/src/components/tooltip/scss/variables.scss +104 -96
- package/src/components/typewriter/scss/_retype.scss +12 -11
- package/src/components/typewriter/scss/_rotate.scss +2 -1
- package/src/components/typewriter/scss/variables.scss +41 -39
- package/src/components/uptime/scss/index.scss +15 -15
- package/src/components/uptime/scss/variables.scss +8 -8
- package/src/components/usage-meter/scss/index.scss +3 -1
- package/src/components/usage-meter/scss/variables.scss +5 -5
- package/src/css-utilities/absolute.scss +64 -0
- package/src/css-utilities/background.scss +43 -0
- package/src/css-utilities/border.scss +45 -0
- package/src/css-utilities/box-shadow.scss +29 -0
- package/src/css-utilities/color.scss +41 -0
- package/src/css-utilities/flex.scss +64 -0
- package/src/css-utilities/font/geist/{scss/index.scss → index.scss} +12 -4
- package/src/css-utilities/font/montserrat/Montserrat-Italic-Variable.woff2 +0 -0
- package/src/css-utilities/font/montserrat/Montserrat-Variable.woff2 +0 -0
- package/src/css-utilities/font/montserrat/OFL.txt +93 -0
- package/src/css-utilities/font/montserrat/index.scss +38 -0
- package/src/{shared/scss → css-utilities}/icon.scss +1 -1
- package/src/css-utilities/{inline/scss/index.scss → inline.scss} +1 -1
- package/src/css-utilities/{skeleton/scss/index.scss → skeleton.scss} +11 -11
- package/src/css-utilities/surface.scss +266 -0
- package/src/css-utilities/text.scss +191 -0
- package/src/modifiers/glass/index.ts +44 -0
- package/src/{css-utilities → modifiers}/glass/scss/index.scss +6 -6
- package/src/{css-utilities → modifiers}/glass/scss/variables.scss +1 -1
- package/src/{css-utilities → modifiers}/index.ts +0 -1
- package/src/{css-utilities → modifiers}/scrollbar/index.ts +92 -17
- package/src/{css-utilities → modifiers}/scrollbar/scss/index.scss +178 -177
- package/src/{css-utilities → modifiers}/scrollbar/scss/variables.scss +28 -21
- package/src/normalize/scss/index.scss +4 -2
- package/src/shared/scss/color-weights.scss +19 -0
- package/src/shared/scss/index.scss +1 -12
- package/src/tokens/scss/blur.scss +5 -0
- package/src/tokens/scss/color.scss +74 -50
- package/src/tokens/scss/index.scss +1 -2
- package/src/tokens/scss/size.scss +0 -2
- package/src/tokens/scss/state.scss +3 -2
- package/src/tokens/scss/transition.scss +19 -2
- package/storage/svg/monitor.svg +1 -0
- package/storage/svg/moon.svg +1 -0
- package/storage/svg/pin.svg +1 -0
- package/storage/svg/sun.svg +1 -0
- package/vite.config.ts +33 -8
- package/build/css-utilities/background/scss/index.scss +0 -2
- package/build/css-utilities/border/scss/index.scss +0 -2
- package/build/css-utilities/color/scss/index.scss +0 -2
- package/build/css-utilities/flex/scss/index.scss +0 -2
- package/build/css-utilities/font/geist/index.d.ts +0 -1
- package/build/css-utilities/font/geist/index.js +0 -1
- package/build/css-utilities/font/geist/scss/index.scss +0 -2
- package/build/css-utilities/font/montserrat/index.d.ts +0 -1
- package/build/css-utilities/font/montserrat/index.js +0 -1
- package/build/css-utilities/font/montserrat/scss/Montserrat-Bold.woff +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-Bold.woff2 +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-BoldItalic.woff +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-BoldItalic.woff2 +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-Italic.woff +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-Italic.woff2 +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-Medium.woff +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-Medium.woff2 +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-MediumItalic.woff +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-MediumItalic.woff2 +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-Regular.woff +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-Regular.woff2 +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-SemiBold.woff +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-SemiBold.woff2 +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-SemiBoldItalic.woff +0 -0
- package/build/css-utilities/font/montserrat/scss/Montserrat-SemiBoldItalic.woff2 +0 -0
- package/build/css-utilities/font/montserrat/scss/index.scss +0 -2
- package/build/css-utilities/glass/index.js +0 -26
- package/build/css-utilities/glass/scss/index.scss +0 -2
- package/build/css-utilities/index.scss +0 -2
- package/build/css-utilities/inline/scss/index.scss +0 -2
- package/build/css-utilities/scrollbar/index.d.ts +0 -42
- package/build/css-utilities/scrollbar/scss/index.scss +0 -2
- package/build/css-utilities/skeleton/scss/index.scss +0 -2
- package/build/css-utilities/text/scss/index.scss +0 -2
- package/build/themes/dark/index.d.ts +0 -3
- package/build/themes/dark/index.js +0 -3
- package/build/themes/dark/input.d.ts +0 -3
- package/build/themes/dark/input.js +0 -12
- package/build/themes/dark/select.d.ts +0 -3
- package/build/themes/dark/select.js +0 -23
- package/build/themes/dark/textarea.d.ts +0 -2186
- package/build/themes/dark/textarea.js +0 -11
- package/src/css-utilities/background/scss/index.scss +0 -1
- package/src/css-utilities/background/scss/variables.scss +0 -18
- package/src/css-utilities/border/scss/index.scss +0 -1
- package/src/css-utilities/border/scss/variables.scss +0 -23
- package/src/css-utilities/color/scss/index.scss +0 -1
- package/src/css-utilities/color/scss/variables.scss +0 -17
- package/src/css-utilities/flex/scss/index.scss +0 -57
- package/src/css-utilities/flex/scss/variables.scss +0 -16
- package/src/css-utilities/font/geist/index.ts +0 -1
- package/src/css-utilities/font/montserrat/index.ts +0 -1
- package/src/css-utilities/font/montserrat/scss/Montserrat-Bold.woff +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-Bold.woff2 +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-BoldItalic.woff +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-BoldItalic.woff2 +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-Italic.woff +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-Italic.woff2 +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-Medium.woff +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-Medium.woff2 +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-MediumItalic.woff +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-MediumItalic.woff2 +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-Regular.woff +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-Regular.woff2 +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-SemiBold.woff +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-SemiBold.woff2 +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-SemiBoldItalic.woff +0 -0
- package/src/css-utilities/font/montserrat/scss/Montserrat-SemiBoldItalic.woff2 +0 -0
- package/src/css-utilities/font/montserrat/scss/index.scss +0 -94
- package/src/css-utilities/glass/index.ts +0 -42
- package/src/css-utilities/index.scss +0 -13
- package/src/css-utilities/skeleton/scss/variables.scss +0 -3
- package/src/css-utilities/text/scss/index.scss +0 -152
- package/src/css-utilities/text/scss/variables.scss +0 -22
- package/src/shared/scss/absolute.scss +0 -28
- package/src/shared/scss/background.scss +0 -21
- package/src/shared/scss/border.scss +0 -21
- package/src/shared/scss/color.scss +0 -21
- package/src/shared/scss/position.scss +0 -55
- package/src/shared/scss/text.scss +0 -31
- package/src/themes/dark/index.ts +0 -3
- package/src/themes/dark/input.ts +0 -16
- package/src/themes/dark/select.ts +0 -28
- package/src/themes/dark/textarea.ts +0 -13
- package/src/tokens/scss/box-shadow.scss +0 -23
- package/src/tokens/scss/font-family.scss +0 -5
- package/storage/code.md +0 -180
- package/storage/editor-features.md +0 -227
- package/build/css-utilities/font/geist/{scss/Geist-Italic-Variable.woff2 → Geist-Italic-Variable.woff2} +0 -0
- package/build/css-utilities/font/geist/{scss/Geist-Variable.woff2 → Geist-Variable.woff2} +0 -0
- package/build/css-utilities/font/geist/{scss/GeistMono-Italic-Variable.woff2 → GeistMono-Italic-Variable.woff2} +0 -0
- package/build/css-utilities/font/geist/{scss/GeistMono-Variable.woff2 → GeistMono-Variable.woff2} +0 -0
- package/src/{shared/scss → css-utilities}/anchor.scss +6 -6
- package/src/{shared/scss → css-utilities}/drag.scss +0 -0
- package/src/css-utilities/font/geist/{scss/Geist-Italic-Variable.woff2 → Geist-Italic-Variable.woff2} +0 -0
- package/src/css-utilities/font/geist/{scss/Geist-Variable.woff2 → Geist-Variable.woff2} +0 -0
- package/src/css-utilities/font/geist/{scss/GeistMono-Italic-Variable.woff2 → GeistMono-Italic-Variable.woff2} +0 -0
- package/src/css-utilities/font/geist/{scss/GeistMono-Variable.woff2 → GeistMono-Variable.woff2} +0 -0
- package/src/{shared/scss → css-utilities}/hidden.scss +11 -11
- /package/src/{shared/scss → css-utilities}/layer.scss +0 -0
- /package/src/{shared/scss → css-utilities}/reset.scss +0 -0
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import assert from 'node:assert/strict';
|
|
2
|
+
import test from 'node:test';
|
|
3
|
+
import './resolve.mjs';
|
|
4
|
+
const { EditorWorkspaceModel, dirty } = await import('../src/components/editor/workspace/model.ts');
|
|
5
|
+
const { closable, compareKey, order, place, sides } = await import('../src/components/editor/workspace/tabs.ts');
|
|
6
|
+
const { createMemoryWorkspaceHost } = await import('../docs/src/examples/code-editor/fixtures/workspace.ts');
|
|
7
|
+
async function fixture(files = { 'a.ts': 'a', 'b.ts': 'b', 'c.ts': 'c', 'd.ts': 'd' }) {
|
|
8
|
+
const host = createMemoryWorkspaceHost(files),
|
|
9
|
+
model = new EditorWorkspaceModel(host, '/project');
|
|
10
|
+
await model.start();
|
|
11
|
+
return { host, model };
|
|
12
|
+
}
|
|
13
|
+
const paths = (model) => model.state.tabs.map((tab) => tab.path);
|
|
14
|
+
const stub = (path, fields = {}) => ({ document: { value: '' }, missing: false, path, pinned: false, preview: false, saved: '', ...fields });
|
|
15
|
+
|
|
16
|
+
test('a preview takes the last preview tab\'s place and pinned tabs sort first, stably', () => {
|
|
17
|
+
const tabs = [stub('a'), stub('b', { preview: true }), stub('c')];
|
|
18
|
+
assert.equal(place(tabs, stub('d', { preview: true })).path, 'b');
|
|
19
|
+
assert.deepEqual(tabs.map((tab) => tab.path), ['a', 'd', 'b', 'c']);
|
|
20
|
+
assert.equal(place(tabs, stub('e')), undefined);
|
|
21
|
+
assert.equal(tabs.at(-1).path, 'e');
|
|
22
|
+
const list = [stub('a'), stub('b', { pinned: true }), stub('c'), stub('d', { pinned: true })];
|
|
23
|
+
order(list);
|
|
24
|
+
assert.deepEqual(list.map((tab) => tab.path), ['b', 'd', 'a', 'c']);
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
test('bulk closes spare pinned tabs, the tab asked from, and unsaved or missing drafts for close saved', () => {
|
|
28
|
+
const tabs = [
|
|
29
|
+
stub('p', { pinned: true }),
|
|
30
|
+
stub('a'),
|
|
31
|
+
stub('b', { document: { value: 'draft' } }),
|
|
32
|
+
stub('c', { missing: true }),
|
|
33
|
+
stub('d')
|
|
34
|
+
];
|
|
35
|
+
const names = (list) => list.map((tab) => tab.path);
|
|
36
|
+
assert.deepEqual(names(closable(tabs, 'others', 'b')), ['a', 'c', 'd']);
|
|
37
|
+
assert.deepEqual(names(closable(tabs, 'right', 'b')), ['c', 'd']);
|
|
38
|
+
assert.deepEqual(names(closable(tabs, 'right', 'missing')), []);
|
|
39
|
+
assert.deepEqual(names(closable(tabs, 'saved')), ['a', 'd']);
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
test('conflict markers split back into the current, incoming and base versions', () => {
|
|
43
|
+
const text = 'top\n<<<<<<< ours\nmine\n||||||| base\nold\n=======\ntheirs\n>>>>>>> theirs\nmid\n<<<<<<< ours\nx\n=======\ny\n>>>>>>> theirs';
|
|
44
|
+
assert.deepEqual(sides(text), { base: null, current: 'top\nmine\nmid\nx', incoming: 'top\ntheirs\nmid\ny' });
|
|
45
|
+
const based = 'a\n<<<<<<< ours\nmine\n||||||| base\nold\n=======\ntheirs\n>>>>>>> theirs\nz\n';
|
|
46
|
+
assert.deepEqual(sides(based), { base: 'a\nold\nz\n', current: 'a\nmine\nz\n', incoming: 'a\ntheirs\nz\n' });
|
|
47
|
+
assert.equal(sides('no conflicts here'), null);
|
|
48
|
+
assert.match(compareKey('a.ts', 'b.ts'), /\0/);
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
test('single-click opens reuse one preview tab until it is edited or opened again as pinned', async (t) => {
|
|
52
|
+
const { model } = await fixture();
|
|
53
|
+
t.after(() => model.dispose());
|
|
54
|
+
await model.open('a.ts', undefined, undefined, true);
|
|
55
|
+
await model.open('b.ts', undefined, undefined, true);
|
|
56
|
+
assert.deepEqual(paths(model), ['b.ts']);
|
|
57
|
+
assert.equal(model.state.active.preview, true);
|
|
58
|
+
const b = model.state.active;
|
|
59
|
+
b.document.setValue('edited');
|
|
60
|
+
assert.equal(b.preview, false);
|
|
61
|
+
await model.open('c.ts', undefined, undefined, true);
|
|
62
|
+
assert.deepEqual(paths(model), ['b.ts', 'c.ts']);
|
|
63
|
+
await model.open('c.ts');
|
|
64
|
+
assert.equal(model.state.active.preview, false);
|
|
65
|
+
await model.open('d.ts', undefined, undefined, true);
|
|
66
|
+
await model.open('c.ts', undefined, undefined, true);
|
|
67
|
+
assert.deepEqual(paths(model), ['b.ts', 'c.ts', 'd.ts']);
|
|
68
|
+
assert.equal(model.state.tabs[1].preview, false);
|
|
69
|
+
assert.equal(model.state.active.path, 'c.ts');
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
test('concurrent preview and pinned opens of one file share its tab and leave it pinned', async (t) => {
|
|
73
|
+
const { model } = await fixture();
|
|
74
|
+
t.after(() => model.dispose());
|
|
75
|
+
const [first, second] = await Promise.all([model.open('a.ts', undefined, undefined, true), model.open('a.ts')]);
|
|
76
|
+
assert.equal(first, second);
|
|
77
|
+
assert.equal(first.preview, false);
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
test('pinning moves a tab to the end of the pinned group, keeps it from preview and close others', async (t) => {
|
|
81
|
+
const { model } = await fixture();
|
|
82
|
+
t.after(() => model.dispose());
|
|
83
|
+
for (const path of ['a.ts', 'b.ts', 'c.ts']) await model.open(path);
|
|
84
|
+
await model.open('d.ts', undefined, undefined, true);
|
|
85
|
+
model.pin('c.ts');
|
|
86
|
+
model.pin('d.ts');
|
|
87
|
+
assert.deepEqual(paths(model), ['c.ts', 'd.ts', 'a.ts', 'b.ts']);
|
|
88
|
+
assert.equal(model.state.tabs[1].preview, false);
|
|
89
|
+
assert.equal(model.state.tabs[1].pinned, true);
|
|
90
|
+
model.unpin('c.ts');
|
|
91
|
+
assert.deepEqual(paths(model), ['d.ts', 'c.ts', 'a.ts', 'b.ts']);
|
|
92
|
+
assert.equal(await model.closeOthers('a.ts'), true);
|
|
93
|
+
assert.deepEqual(paths(model), ['d.ts', 'a.ts']);
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
test('close to the right and close saved ask once for every unsaved draft they close', async (t) => {
|
|
97
|
+
const { model } = await fixture();
|
|
98
|
+
t.after(() => model.dispose());
|
|
99
|
+
for (const path of ['a.ts', 'b.ts', 'c.ts', 'd.ts']) await model.open(path);
|
|
100
|
+
model.state.tabs[2].document.setValue('draft');
|
|
101
|
+
model.state.tabs[3].document.setValue('draft');
|
|
102
|
+
const asked = [];
|
|
103
|
+
model.setConfirmation((request) => {
|
|
104
|
+
asked.push(request);
|
|
105
|
+
return 'discard';
|
|
106
|
+
});
|
|
107
|
+
assert.equal(await model.closeSaved(), true);
|
|
108
|
+
assert.deepEqual(paths(model), ['c.ts', 'd.ts']);
|
|
109
|
+
assert.equal(asked.length, 0);
|
|
110
|
+
assert.equal(await model.closeRight('c.ts'), true);
|
|
111
|
+
assert.deepEqual(asked.map((request) => request.dirty), [['d.ts']]);
|
|
112
|
+
assert.deepEqual(paths(model), ['c.ts']);
|
|
113
|
+
model.setConfirmation(() => 'cancel');
|
|
114
|
+
await model.open('a.ts');
|
|
115
|
+
model.state.active.document.setValue('draft');
|
|
116
|
+
assert.equal(await model.closeOthers('c.ts'), false);
|
|
117
|
+
assert.deepEqual(paths(model), ['c.ts', 'a.ts']);
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
test('a compare tab is read-only: never dirty, never saved, kept by refresh and apart from file paths', async (t) => {
|
|
121
|
+
const { host, model } = await fixture({ 'a.ts': 'one', 'b.ts': 'two' });
|
|
122
|
+
t.after(() => model.dispose());
|
|
123
|
+
const tab = await model.compare('a.ts', '/project/b.ts');
|
|
124
|
+
assert.deepEqual(tab.compare, { modified: 'two', original: 'one', paths: ['a.ts', 'b.ts'] });
|
|
125
|
+
assert.equal(model.state.active, tab);
|
|
126
|
+
assert.equal(dirty(tab), false);
|
|
127
|
+
assert.equal(await model.compare('a.ts', 'b.ts'), tab);
|
|
128
|
+
assert.equal(model.state.tabs.length, 1);
|
|
129
|
+
await model.refresh();
|
|
130
|
+
assert.equal(tab.missing, false);
|
|
131
|
+
assert.equal(await model.save(tab), false);
|
|
132
|
+
assert.equal(host.writes.length, 0);
|
|
133
|
+
const file = await model.open('a.ts');
|
|
134
|
+
assert.notEqual(file, tab);
|
|
135
|
+
await model.rename('a.ts', 'z.ts');
|
|
136
|
+
assert.equal(tab.path, compareKey('a.ts', 'b.ts'));
|
|
137
|
+
assert.equal(await model.close(tab.path), true);
|
|
138
|
+
assert.deepEqual(paths(model), ['z.ts']);
|
|
139
|
+
await model.compare('a.ts', 'b.ts');
|
|
140
|
+
assert.match(model.state.status, /Compare failed/);
|
|
141
|
+
assert.deepEqual(paths(model), ['z.ts']);
|
|
142
|
+
});
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
type Group = {
|
|
2
|
+
members: Set<State>;
|
|
3
|
+
required: boolean;
|
|
4
|
+
};
|
|
5
|
+
|
|
6
|
+
type State = { active: boolean | number };
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
// Brings a member's group in line with it: an open member closes the rest, and in a required group a closed member
|
|
10
|
+
// reopens when nothing else is open. Run when it joins and whenever it opens or closes, so several opened at once
|
|
11
|
+
// leave the last one to join or move open.
|
|
12
|
+
const settle = (group: Group, state: State) => {
|
|
13
|
+
if (state.active) {
|
|
14
|
+
for (let other of group.members) {
|
|
15
|
+
if (other !== state) {
|
|
16
|
+
other.active = false;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
if (!group.required) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
for (let other of group.members) {
|
|
28
|
+
if (other.active) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
state.active = true;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
export default ({ required = false }: { required?: boolean } = {}): Group => ({ members: new Set(), required });
|
|
38
|
+
export { settle };
|
|
39
|
+
export type { Group };
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { effect, reactive } from '@esportsplus/reactivity';
|
|
1
|
+
import { effect, reactive, untrack } from '@esportsplus/reactivity';
|
|
2
2
|
import { html, component, type Attributes } from '@esportsplus/template';
|
|
3
3
|
import { observeSize } from '~/shared/resize';
|
|
4
4
|
import { trackTransition } from '~/shared/transition';
|
|
5
|
+
import group, { settle, type Group } from './group';
|
|
5
6
|
import './scss/index.scss';
|
|
6
7
|
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
const accordion = component<Attributes & {
|
|
10
|
+
group?: Group,
|
|
9
11
|
lines?: number,
|
|
10
12
|
state?: { active: boolean | number, expandable?: boolean }
|
|
11
13
|
}>(
|
|
12
|
-
function({ lines, state = reactive({ active: false, expandable: false }), ...attributes }, content) {
|
|
14
|
+
function({ group, lines, state = reactive({ active: false, expandable: false }), ...attributes }, content) {
|
|
13
15
|
let a: Attributes | undefined,
|
|
14
16
|
c: Attributes | undefined,
|
|
15
17
|
property = lines === undefined ? 'grid-template-rows' : 'height',
|
|
@@ -17,8 +19,8 @@ export default component<Attributes & {
|
|
|
17
19
|
viewport: HTMLElement | undefined;
|
|
18
20
|
|
|
19
21
|
let motion = trackTransition(property, (running, element) => {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
ui.scrollable = !!state.active && !!element && !running;
|
|
23
|
+
});
|
|
22
24
|
|
|
23
25
|
effect(() => {
|
|
24
26
|
let active = !!state.active;
|
|
@@ -27,12 +29,25 @@ export default component<Attributes & {
|
|
|
27
29
|
|
|
28
30
|
// Scroll position survives the height change; reset it as soon as closing starts.
|
|
29
31
|
if (!active) {
|
|
30
|
-
viewport?.scrollTo({
|
|
32
|
+
viewport?.scrollTo({ behavior: 'instant', top: 0 });
|
|
31
33
|
}
|
|
32
34
|
|
|
33
35
|
motion.settle();
|
|
34
36
|
});
|
|
35
37
|
|
|
38
|
+
// Only this member's own state is tracked; the rest of the group is read and written as it stands.
|
|
39
|
+
if (group) {
|
|
40
|
+
effect(() => {
|
|
41
|
+
state.active;
|
|
42
|
+
|
|
43
|
+
untrack(() => {
|
|
44
|
+
if (group.members.has(state)) {
|
|
45
|
+
settle(group, state);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
36
51
|
if (lines !== undefined) {
|
|
37
52
|
let measured = reactive({ height: 0, instant: true });
|
|
38
53
|
|
|
@@ -69,11 +84,18 @@ export default component<Attributes & {
|
|
|
69
84
|
() => state.active && ui.scrollable && 'accordion--scrollable'
|
|
70
85
|
],
|
|
71
86
|
inert: () => lines === undefined && !state.active,
|
|
87
|
+
// Members join while mounted, so a removed one never closes or holds open the rest.
|
|
72
88
|
onconnect: (element: HTMLElement) => {
|
|
73
89
|
viewport = element;
|
|
74
90
|
motion.attributes.onconnect(element);
|
|
91
|
+
|
|
92
|
+
if (group) {
|
|
93
|
+
group.members.add(state);
|
|
94
|
+
settle(group, state);
|
|
95
|
+
}
|
|
75
96
|
},
|
|
76
97
|
ondisconnect: () => {
|
|
98
|
+
group?.members.delete(state);
|
|
77
99
|
motion.attributes.ondisconnect();
|
|
78
100
|
viewport = undefined;
|
|
79
101
|
}
|
|
@@ -84,3 +106,7 @@ export default component<Attributes & {
|
|
|
84
106
|
`;
|
|
85
107
|
}
|
|
86
108
|
);
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
export default Object.assign(accordion, { group });
|
|
112
|
+
export type { Group };
|
|
@@ -2,31 +2,15 @@
|
|
|
2
2
|
@use 'variables';
|
|
3
3
|
|
|
4
4
|
.accordion {
|
|
5
|
-
--scrollbar-overflow: hidden;
|
|
6
|
-
// Reserve the gutter throughout so enabling the bar cannot reflow and remeasure content.
|
|
7
|
-
--scrollbar-gutter: stable;
|
|
8
5
|
display: grid;
|
|
9
6
|
grid-template-rows: 1fr;
|
|
10
7
|
overflow: var(--scrollbar-overflow, hidden);
|
|
11
|
-
transition: grid-template-rows
|
|
12
|
-
|
|
13
|
-
@include tokens.state(active) {
|
|
14
|
-
&.accordion--scrollable {
|
|
15
|
-
--scrollbar-overflow: auto;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
8
|
+
transition: grid-template-rows var(--transition-duration) var(--transition-timing-function);
|
|
18
9
|
|
|
19
10
|
@include tokens.state(inactive) {
|
|
20
11
|
grid-template-rows: 0fr;
|
|
21
12
|
}
|
|
22
13
|
|
|
23
|
-
&-content {
|
|
24
|
-
display: flow-root;
|
|
25
|
-
min-height: 0;
|
|
26
|
-
// Clip the collapse without creating a nested scroll container that traps wheel input.
|
|
27
|
-
overflow: clip;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
14
|
&--more {
|
|
31
15
|
display: block;
|
|
32
16
|
// Animate the outer box while content retains its natural height for measurement.
|
|
@@ -35,16 +19,16 @@
|
|
|
35
19
|
overscroll-behavior: contain;
|
|
36
20
|
transition: height var(--transition-duration) var(--transition-timing-function);
|
|
37
21
|
|
|
22
|
+
&.accordion--instant {
|
|
23
|
+
transition: none;
|
|
24
|
+
}
|
|
25
|
+
|
|
38
26
|
&:focus-visible {
|
|
39
27
|
border-radius: var(--border-radius-300);
|
|
40
28
|
outline: var(--border-width-400) solid var(--focus-color);
|
|
41
29
|
outline-offset: var(--size-100);
|
|
42
30
|
}
|
|
43
31
|
|
|
44
|
-
&.accordion--instant {
|
|
45
|
-
transition: none;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
32
|
@include tokens.state(active) {
|
|
49
33
|
height: min(var(--height, var(--max-height)), var(--max-height));
|
|
50
34
|
}
|
|
@@ -54,6 +38,13 @@
|
|
|
54
38
|
}
|
|
55
39
|
}
|
|
56
40
|
|
|
41
|
+
&-content {
|
|
42
|
+
display: flow-root;
|
|
43
|
+
min-height: 0;
|
|
44
|
+
// Clip the collapse without creating a nested scroll container that traps wheel input.
|
|
45
|
+
overflow: clip;
|
|
46
|
+
}
|
|
47
|
+
|
|
57
48
|
@media (prefers-reduced-motion: reduce) {
|
|
58
49
|
transition: none;
|
|
59
50
|
}
|
|
@@ -1,7 +1,22 @@
|
|
|
1
|
+
@use '/tokens';
|
|
2
|
+
|
|
3
|
+
// Collapses a tier faster than it opens.
|
|
1
4
|
.accordion {
|
|
5
|
+
// Reserve the gutter throughout so enabling the bar cannot reflow and remeasure content.
|
|
6
|
+
--scrollbar-gutter: stable;
|
|
7
|
+
--scrollbar-overflow: hidden;
|
|
8
|
+
--transition-duration: var(--duration-moderate-exit);
|
|
9
|
+
|
|
10
|
+
@include tokens.state(active) {
|
|
11
|
+
--transition-duration: var(--duration-moderate);
|
|
12
|
+
|
|
13
|
+
&.accordion--scrollable {
|
|
14
|
+
--scrollbar-overflow: auto;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
2
18
|
&--more {
|
|
3
|
-
--focus-color: var(--color-
|
|
19
|
+
--focus-color: var(--color-accent-400);
|
|
4
20
|
--max-height: 320px;
|
|
5
|
-
--transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
|
|
6
21
|
}
|
|
7
|
-
}
|
|
22
|
+
}
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
display: grid;
|
|
6
6
|
grid-template-rows: 0fr;
|
|
7
7
|
overflow: hidden;
|
|
8
|
-
transition: grid-template-rows
|
|
8
|
+
transition: grid-template-rows var(--duration-slow-exit) var(--announcement-drawer);
|
|
9
9
|
|
|
10
10
|
// Qualified to outrank the '.overlay' it pairs with.
|
|
11
11
|
&-content.overlay {
|
|
12
|
-
filter: blur(
|
|
12
|
+
filter: blur(var(--blur-300));
|
|
13
13
|
transition:
|
|
14
14
|
filter var(--fade-duration) var(--announcement-ease),
|
|
15
15
|
opacity var(--fade-duration) var(--announcement-ease),
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
|
|
28
28
|
@include tokens.state(active) {
|
|
29
29
|
grid-template-rows: 1fr;
|
|
30
|
-
transition: grid-template-rows
|
|
30
|
+
transition: grid-template-rows var(--duration-slow) var(--announcement-drawer);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
@media (prefers-reduced-motion: reduce) {
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
&,
|
|
41
41
|
#{tokens.state(active)} {
|
|
42
42
|
filter: none;
|
|
43
|
-
transition: opacity
|
|
43
|
+
transition: opacity var(--fade-duration) var(--announcement-ease);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
@use '/tokens';
|
|
2
2
|
|
|
3
3
|
.announcement {
|
|
4
|
-
--announcement-drawer:
|
|
5
|
-
--announcement-ease:
|
|
4
|
+
--announcement-drawer: var(--easing-spring);
|
|
5
|
+
--announcement-ease: var(--easing-spring);
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
&-content.overlay {
|
|
9
|
-
--close-duration:
|
|
9
|
+
--close-duration: var(--duration-slow-exit);
|
|
10
10
|
--ease: var(--announcement-drawer);
|
|
11
|
-
--fade-duration:
|
|
12
|
-
--open-duration:
|
|
11
|
+
--fade-duration: var(--duration-fast-exit);
|
|
12
|
+
--open-duration: var(--duration-slow);
|
|
13
13
|
|
|
14
14
|
@include tokens.state(active) {
|
|
15
|
-
--fade-duration:
|
|
15
|
+
--fade-duration: var(--duration-fast);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
@media (prefers-reduced-motion: reduce) {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
@use '/shared';
|
|
2
1
|
@use '/tokens';
|
|
2
|
+
@use 'css-utilities/color';
|
|
3
|
+
@use 'css-utilities/reset';
|
|
4
|
+
@use 'css-utilities/text';
|
|
3
5
|
@use 'variables';
|
|
4
6
|
|
|
5
7
|
.breadcrumb {
|
|
@@ -11,13 +13,18 @@
|
|
|
11
13
|
|
|
12
14
|
&-current {
|
|
13
15
|
@extend %text-truncate;
|
|
16
|
+
--font-weight: var(--font-weight-current);
|
|
14
17
|
color: var(--color-active);
|
|
15
18
|
display: block;
|
|
16
|
-
font-weight: var(--font-weight
|
|
19
|
+
font-weight: var(--font-weight);
|
|
17
20
|
padding-inline: var(--link-padding);
|
|
18
21
|
}
|
|
19
22
|
|
|
20
23
|
&-link {
|
|
24
|
+
@extend %color-state;
|
|
25
|
+
--color-default: var(--link-color);
|
|
26
|
+
--color-hover: var(--link-color-hover);
|
|
27
|
+
--color-pressed: var(--color-hover);
|
|
21
28
|
align-items: center;
|
|
22
29
|
border-radius: var(--link-radius);
|
|
23
30
|
color: var(--color);
|
|
@@ -27,25 +34,19 @@
|
|
|
27
34
|
padding-inline: var(--link-padding);
|
|
28
35
|
text-decoration: underline;
|
|
29
36
|
text-decoration-color: transparent;
|
|
30
|
-
text-underline-offset:
|
|
37
|
+
text-underline-offset: calc(var(--size-100) / 2);
|
|
31
38
|
touch-action: manipulation;
|
|
32
39
|
transition:
|
|
33
|
-
color
|
|
34
|
-
|
|
35
|
-
text-decoration-color 0.15s ease-out;
|
|
40
|
+
color var(--duration-fast) var(--easing-spring),
|
|
41
|
+
text-decoration-color var(--duration-fast) var(--easing-spring);
|
|
36
42
|
user-select: none;
|
|
37
43
|
white-space: nowrap;
|
|
38
44
|
|
|
39
|
-
&:active {
|
|
40
|
-
scale: 0.96;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
45
|
&:focus-visible {
|
|
44
46
|
outline: 2px solid var(--focus-color);
|
|
45
47
|
}
|
|
46
48
|
|
|
47
49
|
&:hover {
|
|
48
|
-
color: var(--color-active);
|
|
49
50
|
text-decoration-color: var(--underline-color);
|
|
50
51
|
}
|
|
51
52
|
}
|
|
@@ -59,26 +60,26 @@
|
|
|
59
60
|
position: relative;
|
|
60
61
|
}
|
|
61
62
|
|
|
63
|
+
&-menu-root.tooltip {
|
|
64
|
+
cursor: default;
|
|
65
|
+
display: flex;
|
|
66
|
+
}
|
|
67
|
+
|
|
62
68
|
&-menu.tooltip-menu-panel {
|
|
63
69
|
display: flex;
|
|
64
70
|
flex-direction: column;
|
|
65
71
|
outline: none;
|
|
66
|
-
padding:
|
|
72
|
+
padding: calc(var(--size-100) / 2);
|
|
67
73
|
// Grows out of the dots.
|
|
68
74
|
transform-origin: calc(var(--trigger-width) / 2) 0;
|
|
69
75
|
width: var(--menu-width);
|
|
70
76
|
}
|
|
71
77
|
|
|
72
|
-
&-menu-root.tooltip {
|
|
73
|
-
cursor: default;
|
|
74
|
-
display: flex;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
78
|
&-option-icon {
|
|
78
79
|
color: var(--option-icon-color);
|
|
79
80
|
flex-shrink: 0;
|
|
80
|
-
height:
|
|
81
|
-
width:
|
|
81
|
+
height: var(--size-400);
|
|
82
|
+
width: var(--size-400);
|
|
82
83
|
}
|
|
83
84
|
|
|
84
85
|
// Paired with '.link', which the tooltip menu gives every option, so these win over its padding, wrapping,
|
|
@@ -92,10 +93,10 @@
|
|
|
92
93
|
display: flex;
|
|
93
94
|
flex-shrink: 0;
|
|
94
95
|
flex-wrap: nowrap;
|
|
95
|
-
gap:
|
|
96
|
+
gap: var(--size-200);
|
|
96
97
|
height: 36px;
|
|
97
98
|
outline: none;
|
|
98
|
-
padding: 0
|
|
99
|
+
padding: 0 var(--size-100);
|
|
99
100
|
text-decoration: none;
|
|
100
101
|
transition: none;
|
|
101
102
|
user-select: none;
|
|
@@ -133,9 +134,9 @@
|
|
|
133
134
|
flex-shrink: 0;
|
|
134
135
|
grid-template-columns: 1fr;
|
|
135
136
|
transition:
|
|
136
|
-
filter var(--enter-duration) var(--
|
|
137
|
+
filter var(--enter-duration) var(--easing-spring),
|
|
137
138
|
grid-template-columns var(--slide-duration) var(--slide-easing),
|
|
138
|
-
opacity var(--enter-duration) var(--
|
|
139
|
+
opacity var(--enter-duration) var(--easing-spring);
|
|
139
140
|
|
|
140
141
|
&--current {
|
|
141
142
|
flex-shrink: 1;
|
|
@@ -144,13 +145,13 @@
|
|
|
144
145
|
|
|
145
146
|
// Blur only matters on the way in, so it switches on after the fade out.
|
|
146
147
|
&--hidden {
|
|
147
|
-
filter: blur(
|
|
148
|
+
filter: blur(var(--blur-400));
|
|
148
149
|
grid-template-columns: 0fr;
|
|
149
150
|
opacity: 0;
|
|
150
151
|
transition:
|
|
151
152
|
filter 0s linear var(--exit-duration),
|
|
152
153
|
grid-template-columns var(--slide-duration) var(--slide-easing),
|
|
153
|
-
opacity var(--exit-duration) var(--
|
|
154
|
+
opacity var(--exit-duration) var(--easing-spring),
|
|
154
155
|
visibility 0s linear var(--slide-duration);
|
|
155
156
|
visibility: hidden;
|
|
156
157
|
}
|
|
@@ -180,7 +181,8 @@
|
|
|
180
181
|
padding-inline: var(--link-padding);
|
|
181
182
|
|
|
182
183
|
&--current {
|
|
183
|
-
font-weight: var(--font-weight-current);
|
|
184
|
+
--font-weight: var(--font-weight-current);
|
|
185
|
+
font-weight: var(--font-weight);
|
|
184
186
|
}
|
|
185
187
|
}
|
|
186
188
|
|
|
@@ -198,14 +200,14 @@
|
|
|
198
200
|
padding: 0;
|
|
199
201
|
touch-action: manipulation;
|
|
200
202
|
transition:
|
|
201
|
-
background-color
|
|
202
|
-
color
|
|
203
|
-
scale 0.15s ease-out;
|
|
203
|
+
background-color var(--duration-fast) var(--easing-spring),
|
|
204
|
+
color var(--duration-fast) var(--easing-spring);
|
|
204
205
|
user-select: none;
|
|
205
206
|
width: var(--trigger-width);
|
|
206
207
|
|
|
207
|
-
|
|
208
|
-
|
|
208
|
+
&-icon {
|
|
209
|
+
height: var(--size-400);
|
|
210
|
+
width: var(--size-400);
|
|
209
211
|
}
|
|
210
212
|
|
|
211
213
|
&:focus-visible {
|
|
@@ -218,28 +220,17 @@
|
|
|
218
220
|
background: var(--hover-background);
|
|
219
221
|
color: var(--color-active);
|
|
220
222
|
}
|
|
221
|
-
|
|
222
|
-
&-icon {
|
|
223
|
-
height: 16px;
|
|
224
|
-
width: 16px;
|
|
225
|
-
}
|
|
226
223
|
}
|
|
227
224
|
|
|
228
225
|
|
|
229
226
|
@media (prefers-reduced-motion: reduce) {
|
|
230
|
-
&-link {
|
|
231
|
-
transition:
|
|
232
|
-
color 0.15s ease-out,
|
|
233
|
-
text-decoration-color 0.15s ease-out;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
227
|
&-segment {
|
|
237
228
|
filter: none;
|
|
238
|
-
transition: opacity var(--enter-duration) var(--
|
|
229
|
+
transition: opacity var(--enter-duration) var(--easing-spring);
|
|
239
230
|
|
|
240
231
|
&--hidden {
|
|
241
232
|
transition:
|
|
242
|
-
opacity var(--exit-duration) var(--
|
|
233
|
+
opacity var(--exit-duration) var(--easing-spring),
|
|
243
234
|
visibility 0s linear var(--exit-duration);
|
|
244
235
|
}
|
|
245
236
|
|
|
@@ -247,11 +238,5 @@
|
|
|
247
238
|
transition-delay: 0s;
|
|
248
239
|
}
|
|
249
240
|
}
|
|
250
|
-
|
|
251
|
-
&-trigger {
|
|
252
|
-
transition:
|
|
253
|
-
background-color 0.15s ease-out,
|
|
254
|
-
color 0.15s ease-out;
|
|
255
|
-
}
|
|
256
241
|
}
|
|
257
242
|
}
|