@esportsplus/ui 0.59.1 → 0.61.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/.audit/audit.json +2810 -0
- package/.audit/check-scss.mjs +20 -0
- package/.audit/rules-audit.md +542 -0
- package/README.md +42 -31
- package/RULES.md +115 -0
- package/build/components/accordion/index.d.ts +12 -2175
- package/build/components/accordion/index.js +3 -4
- package/build/components/accordion/scss/index.scss +1 -1
- package/build/components/announcement/scss/index.scss +1 -1
- package/build/components/breadcrumb/index.js +47 -64
- package/build/components/breadcrumb/scss/index.scss +1 -1
- package/build/components/button/copy.d.ts +6 -4
- package/build/components/button/copy.js +24 -20
- package/build/components/button/faces.d.ts +0 -1
- package/build/components/button/faces.js +5 -6
- package/build/components/button/index.d.ts +3 -7
- package/build/components/button/index.js +3 -5
- package/build/components/button/kbd.d.ts +12 -8
- package/build/components/button/kbd.js +59 -74
- package/build/components/button/morph/index.d.ts +2169 -0
- package/build/components/button/morph/index.js +4 -0
- package/build/components/button/morph/save.d.ts +19 -0
- package/build/components/button/morph/save.js +57 -0
- package/build/components/button/morph/template.d.ts +22 -0
- package/build/components/button/morph/template.js +90 -0
- package/build/components/button/scss/index.scss +1 -1
- package/build/components/button/sidebar.js +2 -2
- package/build/components/button/split.d.ts +1 -1
- package/build/components/button/split.js +11 -15
- package/build/components/capslock/index.js +6 -5
- package/build/components/capslock/scss/index.scss +1 -1
- package/build/components/card/scss/index.scss +1 -1
- package/build/components/cc/index.js +103 -111
- package/build/components/cc/scss/index.scss +1 -1
- package/build/components/chat/index.d.ts +6 -0
- package/build/components/chat/index.js +3 -0
- package/build/components/chat/minimap/index.d.ts +52 -0
- package/build/components/chat/minimap/index.js +248 -0
- package/build/components/{chat-minimap/range.js → chat/minimap/model.js} +1 -1
- package/build/components/{chat-minimap → chat/minimap}/spy.d.ts +1 -1
- package/build/components/{chat-minimap → chat/minimap}/spy.js +1 -1
- package/build/components/checkbox/index.d.ts +1 -0
- package/build/components/checkbox/index.js +1 -0
- package/build/components/checkbox/options.d.ts +0 -1
- package/build/components/checkbox/options.js +0 -1
- package/build/components/checkbox/scss/index.scss +1 -1
- package/build/components/clipboard/index.d.ts +3 -2181
- package/build/components/clipboard/index.js +2 -3
- package/build/components/color-picker/index.d.ts +21 -0
- package/build/components/color-picker/index.js +153 -138
- package/build/components/color-picker/scss/index.scss +1 -1
- package/build/components/command/index.d.ts +6 -93
- package/build/components/command/index.js +4 -601
- package/build/components/command/palette.d.ts +103 -0
- package/build/components/command/palette.js +595 -0
- package/build/components/command/scss/index.scss +1 -1
- package/build/components/command/search.d.ts +37 -0
- package/build/components/command/search.js +67 -0
- package/build/components/counter/index.d.ts +15 -4
- package/build/components/counter/index.js +3 -2
- package/build/components/counter/scss/index.scss +1 -1
- package/build/components/datalist/scss/index.scss +1 -1
- package/build/components/dock/index.d.ts +24 -5
- package/build/components/dock/index.js +389 -51
- package/build/components/dock/scss/index.scss +1 -1
- package/build/components/editor/markdown/index.d.ts +3 -22
- package/build/components/editor/markdown/index.js +3 -30
- package/build/components/editor/markdown/render.js +3 -5
- package/build/components/editor/markdown/template.d.ts +22 -0
- package/build/components/editor/markdown/template.js +30 -0
- package/build/components/editor/tree/find.js +3 -3
- package/build/components/editor/tree/index.d.ts +3 -116
- package/build/components/editor/tree/index.js +3 -2225
- package/build/components/editor/tree/template.d.ts +116 -0
- package/build/components/editor/tree/template.js +2225 -0
- package/build/components/editor/viewer/index.d.ts +3 -26
- package/build/components/editor/viewer/index.js +3 -249
- package/build/components/editor/viewer/template.d.ts +26 -0
- package/build/components/editor/viewer/template.js +249 -0
- package/build/components/editor/workspace/index.d.ts +4 -65
- package/build/components/editor/workspace/index.js +4 -1228
- package/build/components/editor/workspace/model.d.ts +29 -37
- package/build/components/editor/workspace/model.js +186 -155
- package/build/components/editor/workspace/session.d.ts +3 -0
- package/build/components/editor/workspace/session.js +61 -34
- package/build/components/editor/workspace/shortcuts.d.ts +0 -2
- package/build/components/editor/workspace/shortcuts.js +0 -2
- package/build/components/editor/workspace/status.d.ts +4 -5
- package/build/components/editor/workspace/status.js +79 -61
- package/build/components/editor/workspace/statusbar.d.ts +5 -3
- package/build/components/editor/workspace/statusbar.js +66 -80
- package/build/components/editor/workspace/strip.d.ts +1 -2
- package/build/components/editor/workspace/strip.js +4 -3
- package/build/components/editor/workspace/tabs.d.ts +35 -3
- package/build/components/editor/workspace/tabs.js +75 -13
- package/build/components/editor/workspace/template.d.ts +65 -0
- package/build/components/editor/workspace/template.js +1145 -0
- package/build/components/error/scss/index.scss +1 -1
- package/build/components/filter/index.js +0 -3
- package/build/components/filter/scss/index.scss +1 -1
- package/build/components/form/index.d.ts +6 -32
- package/build/components/form/index.js +2 -1
- package/build/components/frame/scss/index.scss +1 -1
- package/build/components/grid/scss/index.scss +1 -1
- package/build/components/group/index.d.ts +12 -0
- package/build/components/group/index.js +15 -0
- package/build/components/group/scss/index.scss +2 -0
- package/build/components/heatmap/index.js +10 -32
- package/build/components/heatmap/scss/index.scss +1 -1
- package/build/components/highlight/index.d.ts +2 -3
- package/build/components/highlight/index.js +79 -78
- package/build/components/highlight/scss/index.scss +1 -1
- package/build/components/icon/index.d.ts +4 -3
- package/build/components/icon/index.js +2 -1
- package/build/components/icon/scss/index.scss +1 -1
- package/build/components/image/index.d.ts +3 -16
- package/build/components/image/index.js +2 -2
- package/build/components/image/scss/index.scss +1 -1
- package/build/components/index.d.ts +6 -4
- package/build/components/index.js +6 -4
- package/build/components/inline-edit/index.js +5 -4
- package/build/components/inline-edit/rich.js +79 -82
- package/build/components/inline-edit/scss/index.scss +1 -1
- package/build/components/inline-edit/status.js +4 -3
- package/build/components/input/scss/index.scss +1 -1
- package/build/components/input/tag.js +84 -67
- package/build/components/json/index.d.ts +4 -3
- package/build/components/json/index.js +2 -1
- package/build/components/link/scss/index.scss +1 -1
- package/build/components/loading/scss/index.scss +1 -1
- package/build/components/marquee/index.js +74 -71
- package/build/components/marquee/scss/index.scss +1 -1
- package/build/components/metric/flash.js +12 -11
- 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/toc.d.ts +8 -13
- package/build/components/nav/toc.js +9 -21
- package/build/components/nav/tree.d.ts +13 -14
- package/build/components/nav/tree.js +32 -19
- package/build/components/notification/index.d.ts +14 -3
- package/build/components/notification/index.js +4 -3
- 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/cards.d.ts +1 -0
- package/build/components/pagination/cards.js +4 -6
- package/build/components/pagination/scss/index.scss +1 -1
- package/build/components/panels/dnd.d.ts +47 -0
- package/build/components/panels/dnd.js +106 -0
- package/build/components/panels/group.d.ts +35 -0
- package/build/components/panels/group.js +319 -0
- package/build/components/panels/index.d.ts +25 -0
- package/build/components/panels/index.js +520 -0
- package/build/components/panels/model.d.ts +64 -0
- package/build/components/panels/model.js +446 -0
- package/build/components/panels/resize.d.ts +9 -0
- package/build/components/panels/resize.js +87 -0
- package/build/components/panels/scss/index.scss +2 -0
- package/build/components/panels/subtree.d.ts +3 -0
- package/build/components/panels/subtree.js +43 -0
- package/build/components/preview/buttons.d.ts +20 -0
- package/build/components/preview/buttons.js +26 -0
- package/build/components/{copy/index.d.ts → preview/code.d.ts} +3 -9
- package/build/components/preview/code.js +18 -0
- package/build/components/preview/header.d.ts +16 -0
- package/build/components/preview/header.js +18 -0
- package/build/components/preview/index.d.ts +8704 -0
- package/build/components/preview/index.js +123 -0
- package/build/components/preview/scss/index.scss +2 -0
- package/build/components/preview/source.d.ts +21 -0
- package/build/components/preview/source.js +76 -0
- package/build/components/preview/stage.d.ts +16 -0
- package/build/components/preview/stage.js +24 -0
- package/build/components/progress/scss/index.scss +1 -1
- package/build/components/progress/text.js +9 -11
- package/build/components/radio/index.d.ts +3 -2
- package/build/components/radio/index.js +2 -2
- package/build/components/range/filter.js +8 -9
- package/build/components/range/scss/index.scss +1 -1
- package/build/components/relative-time/index.js +4 -7
- package/build/components/relative-time/scss/index.scss +1 -1
- package/build/components/root/scss/index.scss +1 -1
- package/build/components/select/index.d.ts +1 -1
- package/build/components/select/index.js +72 -59
- package/build/components/select/scss/index.scss +1 -1
- package/build/components/shell/index.d.ts +22 -0
- package/build/components/shell/index.js +272 -0
- package/build/components/shell/scss/index.scss +2 -0
- package/build/components/shortcut-recorder/index.d.ts +2 -3
- package/build/components/shortcut-recorder/index.js +3 -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/scss/index.scss +1 -1
- package/build/components/story/index.d.ts +10 -6
- package/build/components/story/index.js +27 -47
- package/build/components/story/scss/index.scss +1 -1
- package/build/components/surface-field/index.js +13 -16
- package/build/components/surface-field/scss/index.scss +1 -1
- package/build/components/switch/index.d.ts +3 -2
- package/build/components/switch/index.js +2 -2
- package/build/components/tasklist/index.js +3 -1
- package/build/components/tasklist/scss/index.scss +1 -1
- package/build/components/textarea/scss/index.scss +1 -1
- package/build/components/theme/index.d.ts +6 -2
- package/build/components/theme/index.js +4 -3
- package/build/components/theme/scss/index.scss +1 -1
- package/build/components/theme-picker/cards.d.ts +13 -0
- package/build/components/theme-picker/cards.js +17 -0
- package/build/components/theme-picker/index.d.ts +9 -49
- package/build/components/theme-picker/index.js +5 -165
- package/build/components/theme-picker/scss/index.scss +1 -1
- package/build/components/theme-picker/shared.d.ts +26 -0
- package/build/components/theme-picker/shared.js +24 -0
- package/build/components/theme-picker/swatches.d.ts +13 -0
- package/build/components/theme-picker/swatches.js +17 -0
- package/build/components/theme-picker/toggle.d.ts +19 -0
- package/build/components/theme-picker/toggle.js +109 -0
- package/build/components/toast/index.js +10 -10
- package/build/components/toast/scss/index.scss +1 -1
- package/build/components/tooltip/menu.d.ts +2 -0
- package/build/components/tooltip/menu.js +88 -45
- package/build/components/tooltip/scss/index.scss +1 -1
- package/build/components/tooltip/shared.js +2 -2
- package/build/components/typewriter/rotate.js +7 -16
- package/build/components/typewriter/scss/index.scss +1 -1
- package/build/components/uptime/index.js +26 -33
- package/build/components/uptime/scss/index.scss +1 -1
- package/build/components/usage-meter/scss/index.scss +1 -1
- package/build/modifiers/background/scss/index.scss +2 -0
- package/build/modifiers/border/scss/index.scss +2 -0
- package/build/modifiers/box-shadow/scss/index.scss +2 -0
- package/build/modifiers/color/scss/index.scss +2 -0
- package/build/modifiers/scrollbar/scss/index.scss +1 -1
- package/build/shared/animation.js +1 -1
- package/build/shared/drag.d.ts +2 -1
- package/build/shared/drag.js +4 -3
- package/package.json +5 -5
- package/scripts/code-editor-services.test.mjs +1 -1
- package/scripts/code-editor-workspace.test.mjs +28 -18
- package/scripts/panels.test.mjs +262 -0
- package/scripts/workspace-keybindings.test.mjs +1 -1
- package/scripts/workspace-session.test.mjs +8 -6
- package/scripts/workspace-status.test.mjs +9 -1
- package/scripts/workspace-tabs.test.mjs +5 -5
- package/src/components/accordion/index.ts +11 -8
- package/src/components/accordion/scss/index.scss +15 -15
- package/src/components/accordion/scss/variables.scss +11 -7
- package/src/components/announcement/scss/index.scss +21 -24
- package/src/components/announcement/scss/variables.scss +13 -7
- package/src/components/breadcrumb/index.ts +8 -10
- package/src/components/breadcrumb/scss/index.scss +48 -122
- package/src/components/breadcrumb/scss/variables.scss +73 -55
- package/src/components/button/copy.ts +34 -27
- package/src/components/button/faces.ts +2 -4
- package/src/components/button/index.ts +3 -7
- package/src/components/button/kbd.ts +37 -95
- package/src/components/button/morph/index.ts +6 -0
- package/src/components/button/morph/save.ts +55 -0
- package/src/components/button/morph/template.ts +135 -0
- package/src/components/button/scss/index.scss +218 -99
- package/src/components/button/scss/variables.scss +160 -115
- package/src/components/button/sidebar.ts +6 -6
- package/src/components/button/split.ts +5 -6
- package/src/components/capslock/index.ts +9 -8
- package/src/components/capslock/scss/index.scss +21 -25
- package/src/components/capslock/scss/variables.scss +31 -12
- package/src/components/card/scss/index.scss +9 -24
- package/src/components/card/scss/variables.scss +29 -76
- package/src/components/cc/index.ts +15 -10
- package/src/components/cc/scss/index.scss +110 -153
- package/src/components/cc/scss/variables.scss +231 -44
- package/src/components/chat/index.ts +10 -0
- package/src/components/{chat-minimap → chat/minimap}/index.ts +66 -21
- package/src/components/{chat-minimap → chat/minimap}/scss/index.scss +26 -54
- package/src/components/chat/minimap/scss/variables.scss +178 -0
- package/src/components/{chat-minimap → chat/minimap}/spy.ts +1 -1
- package/src/components/checkbox/index.ts +1 -0
- package/src/components/checkbox/options.ts +0 -1
- package/src/components/checkbox/scss/index.scss +25 -31
- package/src/components/checkbox/scss/variables.scss +50 -19
- package/src/components/clipboard/index.ts +4 -3
- package/src/components/color-picker/index.ts +131 -67
- package/src/components/color-picker/scss/index.scss +138 -221
- package/src/components/color-picker/scss/variables.scss +228 -81
- package/src/components/command/index.ts +5 -860
- package/src/components/command/palette.ts +879 -0
- package/src/components/command/scss/index.scss +82 -99
- package/src/components/command/scss/variables.scss +129 -50
- package/src/components/command/search.ts +67 -0
- package/src/components/counter/index.ts +90 -85
- package/src/components/counter/scss/index.scss +32 -41
- package/src/components/counter/scss/variables.scss +44 -16
- package/src/components/datalist/scss/index.scss +25 -25
- package/src/components/datalist/scss/variables.scss +21 -11
- package/src/components/dock/index.ts +505 -42
- package/src/components/dock/scss/index.scss +318 -73
- package/src/components/dock/scss/variables.scss +310 -39
- package/src/components/editor/code/features.ts +0 -1
- package/src/components/editor/code/find.ts +0 -1
- package/src/components/editor/code/keymap.ts +0 -1
- package/src/components/editor/code/scss/_editor.scss +12 -31
- package/src/components/editor/code/scss/_features.scss +12 -45
- package/src/components/editor/code/scss/_services.scss +15 -23
- package/src/components/editor/code/scss/index.scss +1 -1
- package/src/components/editor/code/scss/variables.scss +195 -42
- package/src/components/editor/code/view.ts +0 -1
- package/src/components/editor/diffs/scss/_diffs.scss +24 -77
- package/src/components/editor/diffs/scss/_merge.scss +5 -16
- package/src/components/editor/diffs/scss/index.scss +1 -1
- package/src/components/editor/diffs/scss/variables.scss +148 -11
- package/src/components/editor/markdown/index.ts +3 -67
- package/src/components/editor/markdown/render.ts +3 -6
- package/src/components/editor/markdown/scss/index.scss +30 -48
- package/src/components/editor/markdown/scss/variables.scss +117 -32
- package/src/components/editor/markdown/template.ts +69 -0
- package/src/components/editor/tree/drag.ts +5 -2
- package/src/components/editor/tree/find.ts +5 -4
- package/src/components/editor/tree/index.ts +3 -3434
- package/src/components/editor/tree/scss/index.scss +204 -262
- package/src/components/editor/tree/scss/variables.scss +198 -31
- package/src/components/editor/tree/template.ts +3436 -0
- package/src/components/editor/viewer/index.ts +3 -318
- package/src/components/editor/viewer/scss/_viewer.scss +15 -31
- package/src/components/editor/viewer/scss/index.scss +1 -1
- package/src/components/editor/viewer/scss/variables.scss +56 -14
- package/src/components/editor/viewer/template.ts +321 -0
- package/src/components/editor/workspace/index.ts +4 -1480
- package/src/components/editor/workspace/model.ts +225 -185
- package/src/components/editor/workspace/scss/_keybindings.scss +163 -0
- package/src/components/editor/workspace/scss/{status.scss → _status.scss} +11 -44
- package/src/components/editor/workspace/scss/_tabs.scss +57 -0
- package/src/components/editor/workspace/scss/index.scss +82 -312
- package/src/components/editor/workspace/scss/variables.scss +427 -0
- package/src/components/editor/workspace/session.ts +80 -44
- package/src/components/editor/workspace/shortcuts.ts +0 -2
- package/src/components/editor/workspace/status.ts +110 -80
- package/src/components/editor/workspace/statusbar.ts +38 -35
- package/src/components/editor/workspace/strip.ts +6 -5
- package/src/components/editor/workspace/tabs.ts +115 -15
- package/src/components/editor/workspace/template.ts +1486 -0
- package/src/components/error/index.ts +3 -0
- package/src/components/error/scss/index.scss +34 -65
- package/src/components/error/scss/variables.scss +28 -9
- package/src/components/filter/index.ts +2 -6
- package/src/components/filter/scss/index.scss +9 -2
- package/src/components/filter/scss/variables.scss +6 -6
- package/src/components/form/index.ts +4 -1
- package/src/components/frame/scss/index.scss +31 -42
- package/src/components/frame/scss/variables.scss +25 -18
- package/src/components/grid/scss/index.scss +2 -1
- package/src/components/group/index.ts +24 -0
- package/src/components/group/scss/index.scss +6 -0
- package/src/components/group/scss/variables.scss +4 -0
- package/src/components/heatmap/index.ts +14 -44
- package/src/components/heatmap/scss/index.scss +38 -44
- package/src/components/heatmap/scss/variables.scss +100 -59
- package/src/components/highlight/index.ts +133 -119
- package/src/components/highlight/scss/index.scss +49 -43
- package/src/components/highlight/scss/variables.scss +71 -30
- package/src/components/icon/index.ts +7 -5
- package/src/components/icon/scss/index.scss +7 -2
- package/src/components/icon/scss/variables.scss +2 -0
- package/src/components/image/index.ts +4 -2
- package/src/components/image/scss/index.scss +14 -22
- package/src/components/image/scss/variables.scss +30 -15
- package/src/components/index.ts +6 -4
- package/src/components/inline-edit/index.ts +3 -2
- package/src/components/inline-edit/rich.ts +17 -15
- package/src/components/inline-edit/scss/index.scss +165 -254
- package/src/components/inline-edit/scss/variables.scss +311 -83
- package/src/components/inline-edit/status.ts +2 -1
- package/src/components/input/scrub.ts +1 -1
- package/src/components/input/scss/_field.scss +1 -1
- package/src/components/input/scss/_scrub.scss +14 -25
- package/src/components/input/scss/_tag.scss +26 -46
- package/src/components/input/scss/variables.scss +167 -77
- package/src/components/input/tag.ts +59 -49
- package/src/components/json/index.ts +4 -1
- package/src/components/link/scss/index.scss +1 -4
- package/src/components/link/scss/variables.scss +5 -1
- package/src/components/loading/scss/index.scss +3 -23
- package/src/components/loading/scss/variables.scss +3 -6
- package/src/components/marquee/index.ts +33 -28
- package/src/components/marquee/scss/index.scss +32 -26
- package/src/components/marquee/scss/variables.scss +35 -23
- package/src/components/metric/flash.ts +2 -1
- package/src/components/metric/scss/_flash.scss +125 -145
- package/src/components/metric/scss/index.scss +31 -43
- package/src/components/metric/scss/variables.scss +192 -98
- package/src/components/nav/index.ts +1 -1
- package/src/components/nav/scss/index.scss +46 -49
- package/src/components/nav/scss/variables.scss +61 -64
- package/src/components/nav/spy.ts +2 -0
- package/src/components/nav/toc.ts +11 -31
- package/src/components/nav/tree.ts +56 -24
- package/src/components/notification/index.ts +94 -89
- package/src/components/notification/scss/index.scss +77 -76
- package/src/components/notification/scss/variables.scss +55 -38
- package/src/components/overlay/index.ts +3 -1
- package/src/components/overlay/scss/index.scss +94 -114
- package/src/components/overlay/scss/variables.scss +46 -18
- package/src/components/page/scss/variables.scss +1 -1
- package/src/components/pagination/cards.ts +2 -1
- package/src/components/pagination/scss/index.scss +191 -7
- package/src/components/pagination/scss/variables.scss +112 -36
- package/src/components/panels/dnd.ts +184 -0
- package/src/components/panels/group.ts +437 -0
- package/src/components/panels/index.ts +678 -0
- package/src/components/panels/model.ts +675 -0
- package/src/components/panels/resize.ts +131 -0
- package/src/components/panels/scss/index.scss +394 -0
- package/src/components/panels/scss/variables.scss +197 -0
- package/src/components/panels/subtree.ts +65 -0
- package/src/components/preview/buttons.ts +48 -0
- package/src/components/preview/code.ts +28 -0
- package/src/components/preview/header.ts +23 -0
- package/src/components/preview/index.ts +144 -0
- package/src/components/preview/scss/index.scss +143 -0
- package/src/components/preview/scss/variables.scss +127 -0
- package/src/components/preview/source.ts +73 -0
- package/src/components/preview/stage.ts +33 -0
- package/src/components/progress/scss/index.scss +117 -15
- package/src/components/progress/scss/variables.scss +140 -40
- package/src/components/progress/text.ts +5 -4
- package/src/components/radio/index.ts +2 -4
- package/src/components/range/filter.ts +7 -11
- package/src/components/range/scss/_filter.scss +301 -327
- package/src/components/range/scss/_slider.scss +31 -110
- package/src/components/range/scss/_vertical.scss +8 -20
- package/src/components/range/scss/index.scss +1 -4
- package/src/components/range/scss/variables.scss +374 -70
- package/src/components/relative-time/index.ts +9 -14
- package/src/components/relative-time/scss/index.scss +13 -21
- package/src/components/relative-time/scss/variables.scss +46 -29
- package/src/components/root/scss/index.scss +11 -20
- package/src/components/root/scss/variables.scss +17 -15
- package/src/components/select/index.ts +37 -15
- package/src/components/select/scss/index.scss +24 -51
- package/src/components/select/scss/variables.scss +77 -19
- package/src/components/shell/index.ts +321 -0
- package/src/components/shell/scss/index.scss +214 -0
- package/src/components/shell/scss/variables.scss +89 -0
- package/src/components/shortcut-recorder/index.ts +6 -3
- package/src/components/shortcut-recorder/scss/index.scss +71 -56
- package/src/components/shortcut-recorder/scss/variables.scss +47 -21
- package/src/components/sortable/index.ts +1 -0
- package/src/components/sortable/scss/index.scss +37 -42
- package/src/components/sortable/scss/variables.scss +76 -52
- package/src/components/sticky-header/scss/index.scss +11 -10
- package/src/components/sticky-header/scss/variables.scss +36 -4
- package/src/components/story/index.ts +1 -36
- package/src/components/story/scss/index.scss +22 -98
- package/src/components/story/scss/variables.scss +57 -15
- package/src/components/surface-field/index.ts +18 -20
- package/src/components/surface-field/scss/index.scss +32 -46
- package/src/components/surface-field/scss/variables.scss +92 -23
- package/src/components/switch/index.ts +2 -4
- package/src/components/tasklist/index.ts +8 -2
- package/src/components/tasklist/scss/index.scss +7 -7
- package/src/components/tasklist/scss/variables.scss +18 -13
- package/src/components/textarea/index.ts +1 -0
- package/src/components/textarea/scss/index.scss +9 -7
- package/src/components/textarea/scss/variables.scss +2 -2
- package/src/components/theme/index.ts +12 -4
- package/src/components/theme/scss/index.scss +13 -0
- package/src/components/theme/scss/variables.scss +5 -16
- package/src/components/theme-picker/cards.ts +19 -0
- package/src/components/theme-picker/index.ts +6 -225
- package/src/components/theme-picker/scss/index.scss +77 -167
- package/src/components/theme-picker/scss/variables.scss +220 -0
- package/src/components/theme-picker/shared.ts +54 -0
- package/src/components/theme-picker/swatches.ts +15 -0
- package/src/components/theme-picker/toggle.ts +150 -0
- package/src/components/toast/index.ts +14 -14
- package/src/components/toast/scss/index.scss +130 -155
- package/src/components/toast/scss/variables.scss +89 -52
- package/src/components/tooltip/menu.ts +77 -10
- package/src/components/tooltip/scss/_menu.scss +96 -138
- package/src/components/tooltip/scss/_shared.scss +93 -90
- package/src/components/tooltip/scss/index.scss +52 -54
- package/src/components/tooltip/scss/variables.scss +187 -67
- package/src/components/tooltip/shared.ts +8 -6
- package/src/components/typewriter/rotate.ts +15 -24
- package/src/components/typewriter/scss/index.scss +131 -3
- package/src/components/typewriter/scss/variables.scss +56 -44
- package/src/components/uptime/index.ts +1 -13
- package/src/components/uptime/scss/index.scss +28 -66
- package/src/components/uptime/scss/variables.scss +63 -48
- package/src/components/usage-meter/scss/index.scss +19 -19
- package/src/components/usage-meter/scss/variables.scss +80 -35
- package/src/css-utilities/absolute.scss +54 -52
- package/src/css-utilities/background.scss +22 -24
- package/src/css-utilities/border.scss +21 -21
- package/src/css-utilities/box-shadow.scss +32 -21
- package/src/css-utilities/color.scss +23 -21
- package/src/css-utilities/flex.scss +55 -53
- package/src/css-utilities/group.scss +7 -0
- package/src/css-utilities/hidden.scss +22 -20
- package/src/css-utilities/icon.scss +32 -30
- package/src/css-utilities/layer.scss +10 -10
- package/src/css-utilities/reset.scss +27 -16
- package/src/css-utilities/surface.scss +206 -128
- package/src/css-utilities/text.scss +114 -114
- package/src/modifiers/background/scss/index.scss +1 -0
- package/src/modifiers/background/scss/variables.scss +24 -0
- package/src/modifiers/border/scss/index.scss +1 -0
- package/src/modifiers/border/scss/variables.scss +21 -0
- package/src/modifiers/box-shadow/scss/index.scss +1 -0
- package/src/modifiers/box-shadow/scss/variables.scss +12 -0
- package/src/modifiers/color/scss/index.scss +1 -0
- package/src/modifiers/color/scss/variables.scss +10 -0
- package/src/modifiers/scrollbar/scss/index.scss +3 -2
- package/src/modifiers/scrollbar/scss/variables.scss +4 -3
- package/src/shared/animation.ts +3 -3
- package/src/shared/drag.ts +8 -3
- package/src/tokens/scss/color.scss +53 -37
- package/src/tokens/scss/index.scss +0 -1
- package/src/tokens/scss/state.scss +16 -1
- package/storage/svg/code.svg +1 -1
- package/storage/svg/collapse.svg +1 -0
- package/storage/svg/grid.svg +1 -0
- package/storage/svg/stack.svg +1 -0
- package/build/components/banner/scss/index.scss +0 -2
- package/build/components/button/fan.d.ts +0 -24
- package/build/components/button/fan.js +0 -118
- package/build/components/button/hold.d.ts +0 -31
- package/build/components/button/hold.js +0 -115
- package/build/components/button/icons.d.ts +0 -6
- package/build/components/button/icons.js +0 -35
- package/build/components/button/loading.d.ts +0 -22
- package/build/components/button/loading.js +0 -60
- package/build/components/button/morph.d.ts +0 -22
- package/build/components/button/morph.js +0 -115
- package/build/components/card/expand.d.ts +0 -22
- package/build/components/card/expand.js +0 -118
- package/build/components/card/index.d.ts +0 -6
- package/build/components/card/index.js +0 -4
- package/build/components/chat-minimap/index.d.ts +0 -28
- package/build/components/chat-minimap/index.js +0 -223
- package/build/components/chat-minimap/scss/index.scss +0 -2
- package/build/components/clipboard/copy.d.ts +0 -27
- package/build/components/clipboard/copy.js +0 -48
- package/build/components/copy/index.js +0 -61
- package/build/components/copy/scss/index.scss +0 -2
- package/build/components/highlight/easing.d.ts +0 -2
- package/build/components/highlight/easing.js +0 -19
- package/build/components/pull-to-refresh/index.d.ts +0 -18
- package/build/components/pull-to-refresh/index.js +0 -222
- package/build/components/pull-to-refresh/scss/index.scss +0 -2
- package/src/components/banner/scss/index.scss +0 -37
- package/src/components/banner/scss/variables.scss +0 -16
- package/src/components/button/fan.ts +0 -170
- package/src/components/button/hold.ts +0 -154
- package/src/components/button/icons.ts +0 -21
- package/src/components/button/loading.ts +0 -77
- package/src/components/button/morph.ts +0 -153
- package/src/components/button/scss/_fan.scss +0 -121
- package/src/components/button/scss/_kbd.scss +0 -11
- package/src/components/button/scss/_morph.scss +0 -107
- package/src/components/button/scss/_sidebar.scss +0 -61
- package/src/components/button/scss/_split.scss +0 -53
- package/src/components/card/expand.ts +0 -141
- package/src/components/card/index.ts +0 -8
- package/src/components/card/scss/_expand.scss +0 -234
- package/src/components/chat-minimap/scss/variables.scss +0 -97
- package/src/components/clipboard/copy.ts +0 -49
- package/src/components/copy/index.ts +0 -69
- package/src/components/copy/scss/index.scss +0 -52
- package/src/components/copy/scss/variables.scss +0 -19
- package/src/components/editor/workspace/scss/keybindings.scss +0 -190
- package/src/components/editor/workspace/scss/tabs.scss +0 -56
- package/src/components/highlight/easing.ts +0 -33
- package/src/components/pagination/scss/_arrows.scss +0 -69
- package/src/components/pagination/scss/_cards.scss +0 -121
- package/src/components/pagination/scss/_dots.scss +0 -64
- package/src/components/progress/scss/_text.scss +0 -135
- package/src/components/pull-to-refresh/index.ts +0 -316
- package/src/components/pull-to-refresh/scss/index.scss +0 -128
- package/src/components/pull-to-refresh/scss/variables.scss +0 -38
- package/src/components/typewriter/scss/_caret.scss +0 -34
- package/src/components/typewriter/scss/_retype.scss +0 -68
- package/src/components/typewriter/scss/_rotate.scss +0 -29
- package/src/tokens/scss/transition.scss +0 -21
- /package/build/components/{chat-minimap/range.d.ts → chat/minimap/model.d.ts} +0 -0
- /package/src/components/{chat-minimap/range.ts → chat/minimap/model.ts} +0 -0
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
import { effect, flush, reactive } from '@esportsplus/reactivity';
|
|
2
|
-
import { component, html, type Attributes } from '@esportsplus/template';
|
|
3
|
-
import overlay from '~/components/overlay';
|
|
4
|
-
import close from '@esportsplus/ui/svg/close.svg';
|
|
5
|
-
import '~/components/button/scss/index.scss';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const EXPAND_TRIGGER = Symbol.for('@esportsplus/ui/card.expand.trigger');
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
type A = Attributes & {
|
|
12
|
-
[EXPAND_TRIGGER]?: Attributes;
|
|
13
|
-
items: Item[];
|
|
14
|
-
state?: { open: string | null };
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
type Item = {
|
|
18
|
-
detail: string;
|
|
19
|
-
id: string;
|
|
20
|
-
meta: string;
|
|
21
|
-
summary: string;
|
|
22
|
-
title: string;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
let uid = 0;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
export default component(
|
|
30
|
-
function(this: { attributes?: Partial<A> } | void, { items, state = reactive({ open: null as string | null }), ...attributes }: A) {
|
|
31
|
-
let id = `card-expand-${++uid}`,
|
|
32
|
-
view = reactive({ morph: null as string | null, open: state.open });
|
|
33
|
-
|
|
34
|
-
// Clicks, the overlay's own dismissals and callers all write 'state.open'; only this effect moves the view.
|
|
35
|
-
effect(() => state.open, (next) => {
|
|
36
|
-
if (next === view.open) {
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
let key = next ?? view.open;
|
|
41
|
-
|
|
42
|
-
if (typeof document.startViewTransition !== 'function') {
|
|
43
|
-
view.open = next;
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
let settle = () => {
|
|
48
|
-
if (view.morph === key) {
|
|
49
|
-
view.morph = null;
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
// 'card--morphing' names the moving card; it lands at the end of this task, before the old state is captured.
|
|
54
|
-
view.morph = key;
|
|
55
|
-
|
|
56
|
-
// Flushed so the new state, its bindings and the overlay's dialog included, is in place before it's captured.
|
|
57
|
-
void document.startViewTransition(() => {
|
|
58
|
-
view.open = next;
|
|
59
|
-
flush();
|
|
60
|
-
}).finished.then(settle, settle);
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
return html`
|
|
64
|
-
<ul class='card-expand' ${this?.attributes} ${attributes}>
|
|
65
|
-
${items.map((item, i) => html`
|
|
66
|
-
<li
|
|
67
|
-
class='card-expand-item'
|
|
68
|
-
${{
|
|
69
|
-
class: [
|
|
70
|
-
() => view.open === item.id && '--active',
|
|
71
|
-
() => view.morph === item.id && 'card-expand-item--morphing'
|
|
72
|
-
]
|
|
73
|
-
}}
|
|
74
|
-
>
|
|
75
|
-
<button
|
|
76
|
-
aria-haspopup='dialog'
|
|
77
|
-
class='card card--expand'
|
|
78
|
-
type='button'
|
|
79
|
-
${this?.attributes?.[EXPAND_TRIGGER]}
|
|
80
|
-
${attributes[EXPAND_TRIGGER]}
|
|
81
|
-
${{
|
|
82
|
-
class: () => view.morph === item.id && 'card--morphing',
|
|
83
|
-
onclick: () => {
|
|
84
|
-
state.open = item.id;
|
|
85
|
-
}
|
|
86
|
-
}}
|
|
87
|
-
>
|
|
88
|
-
<span class='card-expand-row'>
|
|
89
|
-
<span class='card-expand-title'>${item.title}</span>
|
|
90
|
-
<span class='card-expand-meta'>${item.meta}</span>
|
|
91
|
-
</span>
|
|
92
|
-
<span class='card-expand-summary'>${item.summary}</span>
|
|
93
|
-
</button>
|
|
94
|
-
|
|
95
|
-
${overlay(
|
|
96
|
-
{
|
|
97
|
-
'aria-labelledby': `${id}-${i}`,
|
|
98
|
-
class: 'card card-expand-dialog',
|
|
99
|
-
state: {
|
|
100
|
-
get active() {
|
|
101
|
-
return view.open === item.id;
|
|
102
|
-
},
|
|
103
|
-
set active(value: boolean) {
|
|
104
|
-
if (!value && state.open === item.id) {
|
|
105
|
-
state.open = null;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
},
|
|
110
|
-
html`
|
|
111
|
-
<div class='card-expand-panel'>
|
|
112
|
-
<div class='card-expand-header'>
|
|
113
|
-
<div class='card-expand-heading'>
|
|
114
|
-
<h2 class='card-expand-title' id='${id}-${i}'>${item.title}</h2>
|
|
115
|
-
<p class='card-expand-meta'>${item.meta}</p>
|
|
116
|
-
</div>
|
|
117
|
-
<button
|
|
118
|
-
aria-label='Close'
|
|
119
|
-
class='button card-expand-close card-expand-delayed'
|
|
120
|
-
type='button'
|
|
121
|
-
${{
|
|
122
|
-
onclick: () => {
|
|
123
|
-
state.open = null;
|
|
124
|
-
}
|
|
125
|
-
}}
|
|
126
|
-
>
|
|
127
|
-
<svg aria-hidden='true' class='card-expand-icon'><use href='#${close}' /></svg>
|
|
128
|
-
</button>
|
|
129
|
-
</div>
|
|
130
|
-
<p class='card-expand-summary card-expand-summary--full'>${item.summary}</p>
|
|
131
|
-
<p class='card-expand-detail card-expand-delayed'>${item.detail}</p>
|
|
132
|
-
</div>
|
|
133
|
-
`
|
|
134
|
-
)}
|
|
135
|
-
</li>
|
|
136
|
-
`)}
|
|
137
|
-
</ul>
|
|
138
|
-
`;
|
|
139
|
-
},
|
|
140
|
-
{ trigger: EXPAND_TRIGGER }
|
|
141
|
-
);
|
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
@use '/tokens';
|
|
2
|
-
@use 'css-utilities/reset';
|
|
3
|
-
@use 'css-utilities/surface';
|
|
4
|
-
@use 'css-utilities/text';
|
|
5
|
-
@use 'variables';
|
|
6
|
-
|
|
7
|
-
.card-expand {
|
|
8
|
-
@extend %reset-list;
|
|
9
|
-
color: var(--text-color);
|
|
10
|
-
display: flex;
|
|
11
|
-
flex-direction: column;
|
|
12
|
-
gap: var(--list-gap);
|
|
13
|
-
max-width: 100%;
|
|
14
|
-
width: var(--max-width);
|
|
15
|
-
|
|
16
|
-
&-close {
|
|
17
|
-
flex-shrink: 0;
|
|
18
|
-
height: var(--size);
|
|
19
|
-
margin: calc(var(--size-100) * -1) calc(var(--size-100) * -1) 0 0;
|
|
20
|
-
width: var(--size);
|
|
21
|
-
|
|
22
|
-
// Grows the hit area to 44px around the 32px circle.
|
|
23
|
-
&::before {
|
|
24
|
-
border-radius: inherit;
|
|
25
|
-
content: '';
|
|
26
|
-
inset: calc(var(--size-300) / -2);
|
|
27
|
-
position: absolute;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
&:focus-visible {
|
|
31
|
-
outline: 2px solid var(--focus-ring-color);
|
|
32
|
-
outline-offset: calc(var(--size-100) / 4);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// Held until the morph has visibly settled, so nothing shows while its box is still growing.
|
|
37
|
-
&-delayed {
|
|
38
|
-
animation: var(--delayed-animation, none);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
&-detail {
|
|
42
|
-
color: var(--muted-color);
|
|
43
|
-
font-size: var(--font-size-400);
|
|
44
|
-
line-height: 24px;
|
|
45
|
-
margin: var(--size-200) 0 0;
|
|
46
|
-
text-wrap: pretty;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
// Visible overflow keeps the card's '::after' shadow; the panel scrolls instead.
|
|
50
|
-
&-dialog {
|
|
51
|
-
overflow: visible;
|
|
52
|
-
|
|
53
|
-
@include tokens.state(active) {
|
|
54
|
-
--delayed-animation: card-expand-reveal 0.25s var(--ease-out) 0.25s backwards;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
&-header {
|
|
59
|
-
align-items: flex-start;
|
|
60
|
-
display: flex;
|
|
61
|
-
gap: var(--size-400);
|
|
62
|
-
justify-content: space-between;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
&-heading {
|
|
66
|
-
align-items: flex-start;
|
|
67
|
-
display: flex;
|
|
68
|
-
flex-direction: column;
|
|
69
|
-
gap: calc(var(--size-100) / 2);
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
&-icon {
|
|
73
|
-
height: 18px;
|
|
74
|
-
width: 18px;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
// The view transition is the only motion; the overlay's own fade would play inside the snapshot.
|
|
78
|
-
&-item--morphing > .card.card-expand-dialog {
|
|
79
|
-
&,
|
|
80
|
-
&::backdrop {
|
|
81
|
-
transition: none;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
// Holds the slot at the card's exact size so the list never jumps, and marks where it returns to. The item's
|
|
86
|
-
// classes are bound to the same state as its dialog's '--active' and land in the same flush, before the view
|
|
87
|
-
// transition captures the new state; ':has()' on the dialog would restyle the whole document on every DOM change.
|
|
88
|
-
// Chained through '.card' to outrank the card's own states, its pressed scale among them.
|
|
89
|
-
&-item.--active > .card.card--expand {
|
|
90
|
-
@extend %surface-sunken-level;
|
|
91
|
-
--background-default: var(--surface-background-default);
|
|
92
|
-
--box-shadow-default: inset 0 0 0 var(--border-width-400) var(--slot-border-color);
|
|
93
|
-
cursor: default;
|
|
94
|
-
scale: 1;
|
|
95
|
-
|
|
96
|
-
> * {
|
|
97
|
-
visibility: hidden;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
&-meta {
|
|
102
|
-
color: var(--muted-color);
|
|
103
|
-
flex-shrink: 0;
|
|
104
|
-
font-size: var(--font-size-300);
|
|
105
|
-
font-variant-numeric: tabular-nums;
|
|
106
|
-
margin: 0;
|
|
107
|
-
view-transition-name: var(--meta-transition-name, none);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
&-panel {
|
|
111
|
-
border-radius: inherit;
|
|
112
|
-
max-height: calc(100dvh - (var(--margin-horizontal) * 2));
|
|
113
|
-
overflow: auto;
|
|
114
|
-
padding: var(--padding);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
&-row {
|
|
118
|
-
align-items: baseline;
|
|
119
|
-
display: flex;
|
|
120
|
-
gap: var(--size-400);
|
|
121
|
-
justify-content: space-between;
|
|
122
|
-
width: 100%;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
&-summary {
|
|
126
|
-
@extend %text-truncate;
|
|
127
|
-
color: var(--muted-color);
|
|
128
|
-
font-size: var(--font-size-300);
|
|
129
|
-
margin: 0;
|
|
130
|
-
view-transition-name: var(--summary-transition-name, none);
|
|
131
|
-
|
|
132
|
-
// In the open panel, where it shows in full.
|
|
133
|
-
&--full {
|
|
134
|
-
font-size: var(--font-size-400);
|
|
135
|
-
line-height: 24px;
|
|
136
|
-
margin-top: var(--size-400);
|
|
137
|
-
white-space: normal;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
&-title {
|
|
142
|
-
@extend %text-truncate;
|
|
143
|
-
color: var(--text-color);
|
|
144
|
-
font-size: var(--font-size-400);
|
|
145
|
-
font-weight: var(--font-weight-500);
|
|
146
|
-
margin: 0;
|
|
147
|
-
view-transition-name: var(--title-transition-name, none);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
// Only the card on the move and its open dialog are named, so the rest of the list stays under the backdrop.
|
|
151
|
-
// Reduced motion leaves them unnamed and the whole page cross-fades instead.
|
|
152
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
153
|
-
&-item:not(.--active) > .card.card--expand.card--morphing,
|
|
154
|
-
&-item--morphing > #{tokens.state(active, '.card.card-expand-dialog')} {
|
|
155
|
-
--meta-transition-name: card-expand-meta;
|
|
156
|
-
--summary-transition-name: card-expand-summary;
|
|
157
|
-
--title-transition-name: card-expand-title;
|
|
158
|
-
view-transition-name: card-expand;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
@media (prefers-reduced-motion: reduce) {
|
|
163
|
-
&-close {
|
|
164
|
-
transition: none;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
&-delayed {
|
|
168
|
-
animation: none;
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
// Chained through '.card' so the base transition and padding, emitted after this file, can't override it.
|
|
174
|
-
.card.card--expand {
|
|
175
|
-
align-items: flex-start;
|
|
176
|
-
border: 0;
|
|
177
|
-
color: inherit;
|
|
178
|
-
cursor: pointer;
|
|
179
|
-
display: flex;
|
|
180
|
-
flex-direction: column;
|
|
181
|
-
font: inherit;
|
|
182
|
-
gap: calc(var(--size-300) / 2);
|
|
183
|
-
outline: none;
|
|
184
|
-
text-align: left;
|
|
185
|
-
touch-action: manipulation;
|
|
186
|
-
user-select: none;
|
|
187
|
-
|
|
188
|
-
&:focus-visible {
|
|
189
|
-
outline: 2px solid var(--focus-ring-color);
|
|
190
|
-
outline-offset: calc(var(--size-100) / 4);
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
@media (prefers-reduced-motion: reduce) {
|
|
195
|
-
.card.card--expand {
|
|
196
|
-
transition: none;
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
// The snapshots can't carry the shadow through a clip, so the box wears its own.
|
|
201
|
-
::view-transition-group(card-expand) {
|
|
202
|
-
border-radius: variables.$expand-border-radius;
|
|
203
|
-
box-shadow: variables.$expand-transition-box-shadow;
|
|
204
|
-
overflow: clip;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
::view-transition-group(card-expand),
|
|
208
|
-
::view-transition-group(card-expand-meta),
|
|
209
|
-
::view-transition-group(card-expand-summary),
|
|
210
|
-
::view-transition-group(card-expand-title) {
|
|
211
|
-
animation-duration: var(--duration-slow);
|
|
212
|
-
// Critically damped spring: a card overshooting its own slot reads as a glitch, not play.
|
|
213
|
-
animation-timing-function: linear(0, 0.0575, 0.1803, 0.3208, 0.4551, 0.5729, 0.6711, 0.7501, 0.8122, 0.8601, 0.8966, 0.924, 0.9445, 0.9596, 0.9708, 0.9789, 0.9848, 0.9891, 0.9922, 0.9944, 0.996, 0.9972, 0.998, 0.9986, 1);
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
// Kept at natural size: the growing box uncovers the dialog, and text moves without its glyphs being squashed.
|
|
217
|
-
::view-transition-new(card-expand),
|
|
218
|
-
::view-transition-new(card-expand-meta),
|
|
219
|
-
::view-transition-new(card-expand-summary),
|
|
220
|
-
::view-transition-new(card-expand-title),
|
|
221
|
-
::view-transition-old(card-expand),
|
|
222
|
-
::view-transition-old(card-expand-meta),
|
|
223
|
-
::view-transition-old(card-expand-summary),
|
|
224
|
-
::view-transition-old(card-expand-title) {
|
|
225
|
-
inline-size: auto;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
@keyframes card-expand-reveal {
|
|
229
|
-
from {
|
|
230
|
-
filter: blur(var(--blur-400));
|
|
231
|
-
opacity: 0;
|
|
232
|
-
translate: 0 4px;
|
|
233
|
-
}
|
|
234
|
-
}
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
@use '/tokens';
|
|
2
|
-
|
|
3
|
-
.chat-minimap {
|
|
4
|
-
--card-border: var(--surface-border-default);
|
|
5
|
-
--card-description-color: var(--color-text-300);
|
|
6
|
-
--card-title-color: var(--color-text-500);
|
|
7
|
-
--card-width: 256px;
|
|
8
|
-
--color-active: var(--color-text-500);
|
|
9
|
-
--color-far: color-mix(in oklab, var(--color-primary-500) 55%, transparent);
|
|
10
|
-
--color-near: color-mix(in oklab, var(--color-primary-500) 75%, transparent);
|
|
11
|
-
--color-rest: color-mix(in oklab, var(--color-primary-300) 40%, transparent);
|
|
12
|
-
--focus-color: var(--color-primary-500);
|
|
13
|
-
// Lines sit this far in from the rail's leading edge, inside a hit area wider than the longest line.
|
|
14
|
-
--inset: calc(var(--size-100) / 2);
|
|
15
|
-
--item-height: var(--size-100);
|
|
16
|
-
--item-width: 32px;
|
|
17
|
-
// At rest every line shares one length; the hovered one peaks and its two neighbours either side step back down.
|
|
18
|
-
--length-far: var(--size-400);
|
|
19
|
-
--length-near: var(--size-500);
|
|
20
|
-
--length-peak: 24px;
|
|
21
|
-
--length-rest: 12px;
|
|
22
|
-
// Resolved here, since the nav's color state redefines --color-active on it.
|
|
23
|
-
--nav-color-hover: var(--color-active);
|
|
24
|
-
--nav-duration: var(--duration-fast);
|
|
25
|
-
--nav-height: var(--size-500);
|
|
26
|
-
--stroke: 2px;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
&-item {
|
|
30
|
-
--length: var(--length-rest);
|
|
31
|
-
--line-color: var(--color-rest);
|
|
32
|
-
|
|
33
|
-
@include tokens.state(active) {
|
|
34
|
-
--line-color: var(--color-active);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
// Touch has no hover to follow, and reduced motion keeps the lengths still; keyboard focus swells too.
|
|
38
|
-
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
|
|
39
|
-
&:has(+ .chat-minimap-item + .chat-minimap-item:is(:hover, :focus-visible)),
|
|
40
|
-
&:is(:hover, :focus-visible) + .chat-minimap-item + .chat-minimap-item {
|
|
41
|
-
--length: var(--length-far);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
&:has(+ .chat-minimap-item:is(:hover, :focus-visible)),
|
|
45
|
-
&:is(:hover, :focus-visible) + .chat-minimap-item {
|
|
46
|
-
--length: var(--length-near);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
&:is(:hover, :focus-visible) {
|
|
50
|
-
--length: var(--length-peak);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
&:is(:hover, :focus-visible) {
|
|
55
|
-
--line-color: var(--color-active);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
// Turns in view keep their full color while a neighbour is hovered, so the indicator never fades under the
|
|
59
|
-
// pointer.
|
|
60
|
-
&:not(.--active) {
|
|
61
|
-
&:has(+ .chat-minimap-item + .chat-minimap-item:is(:hover, :focus-visible)),
|
|
62
|
-
&:is(:hover, :focus-visible) + .chat-minimap-item + .chat-minimap-item {
|
|
63
|
-
--line-color: var(--color-far);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
&:has(+ .chat-minimap-item:is(:hover, :focus-visible)),
|
|
67
|
-
&:is(:hover, :focus-visible) + .chat-minimap-item {
|
|
68
|
-
--line-color: var(--color-near);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
&-label.tooltip-shared {
|
|
74
|
-
--padding: calc(var(--size-100) / 2) var(--size-200);
|
|
75
|
-
--radius: var(--border-radius-500);
|
|
76
|
-
--spacer: 4px;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
// A white card rather than the dark label bubble; '--padding' stays 0 so the card sets its own width.
|
|
80
|
-
// A surface through the shared tooltip, so its colors are read at its own level.
|
|
81
|
-
&-preview.tooltip-shared {
|
|
82
|
-
--background-default: var(--surface-background-default);
|
|
83
|
-
--box-shadow-default: 0 0 0 var(--border-width-400) var(--card-border), var(--surface-shadow-default);
|
|
84
|
-
--color: var(--card-title-color);
|
|
85
|
-
--font-size: var(--font-size-400);
|
|
86
|
-
--padding: 0;
|
|
87
|
-
--radius: var(--border-radius-600);
|
|
88
|
-
--spacer: var(--size-100);
|
|
89
|
-
--white-space: normal;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
// The lines hold their length; the nav still fades.
|
|
94
|
-
@media (prefers-reduced-motion: reduce) {
|
|
95
|
-
--transition-duration: 0s;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { component, html, type Attributes, type Renderable } from '@esportsplus/template';
|
|
2
|
-
import { reactive } from '@esportsplus/reactivity';
|
|
3
|
-
import write from './write';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
type A = Attributes & {
|
|
7
|
-
ondisconnect?: never;
|
|
8
|
-
onclick?: never;
|
|
9
|
-
timeout?: number;
|
|
10
|
-
value: string;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export default component<A, (state: { copied: boolean, failed: boolean }) => Renderable<unknown>>(
|
|
15
|
-
({ timeout = 3000, value, ...attributes }, content) => {
|
|
16
|
-
let state = reactive({ copied: false, failed: false }),
|
|
17
|
-
reset = () => {
|
|
18
|
-
clearTimeout(timer);
|
|
19
|
-
state.copied = false;
|
|
20
|
-
state.failed = false;
|
|
21
|
-
},
|
|
22
|
-
timer: ReturnType<typeof setTimeout> | undefined;
|
|
23
|
-
|
|
24
|
-
return html`
|
|
25
|
-
<div
|
|
26
|
-
${attributes}
|
|
27
|
-
${{
|
|
28
|
-
ondisconnect: reset,
|
|
29
|
-
onclick: async (e) => {
|
|
30
|
-
e.preventDefault();
|
|
31
|
-
e.stopPropagation();
|
|
32
|
-
|
|
33
|
-
reset();
|
|
34
|
-
|
|
35
|
-
let copied = await write(value);
|
|
36
|
-
|
|
37
|
-
// A second click can land while the first is still writing; only the last one's timer runs.
|
|
38
|
-
clearTimeout(timer);
|
|
39
|
-
state.copied = copied;
|
|
40
|
-
state.failed = !copied;
|
|
41
|
-
timer = setTimeout(reset, timeout);
|
|
42
|
-
}
|
|
43
|
-
}}
|
|
44
|
-
>
|
|
45
|
-
${() => content(state)}
|
|
46
|
-
</div>
|
|
47
|
-
`;
|
|
48
|
-
}
|
|
49
|
-
);
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { component, html, type Attributes } from '@esportsplus/template';
|
|
2
|
-
import { reactive } from '@esportsplus/reactivity';
|
|
3
|
-
import checkSvg from '@esportsplus/ui/svg/check.svg';
|
|
4
|
-
import copySvg from '@esportsplus/ui/svg/copy.svg';
|
|
5
|
-
import write from '~/components/clipboard/write';
|
|
6
|
-
import './scss/index.scss';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
type A = Attributes & {
|
|
10
|
-
error?: string;
|
|
11
|
-
label?: string;
|
|
12
|
-
onclick?: never;
|
|
13
|
-
ondisconnect?: never;
|
|
14
|
-
success?: string;
|
|
15
|
-
timeout?: number;
|
|
16
|
-
value: string | (() => string);
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
// SVG elements take no dynamic class, so each icon is its own static template.
|
|
21
|
-
const check = () => html`<svg aria-hidden='true' class='copy-icon copy-icon--check'><use href='#${checkSvg}' /></svg>`;
|
|
22
|
-
|
|
23
|
-
const idle = () => html`<svg aria-hidden='true' class='copy-icon'><use href='#${copySvg}' /></svg>`;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
export default component(
|
|
27
|
-
({ error = 'Copy failed', label = 'Copy', success = 'Copied', timeout = 3000, value, ...attributes }: A) => {
|
|
28
|
-
let request = 0,
|
|
29
|
-
state = reactive({ status: 'idle' as 'error' | 'idle' | 'success' }),
|
|
30
|
-
text = () => state.status === 'success' ? success : state.status === 'error' ? error : label,
|
|
31
|
-
timer: ReturnType<typeof setTimeout> | undefined;
|
|
32
|
-
|
|
33
|
-
return html`
|
|
34
|
-
<button
|
|
35
|
-
class='copy'
|
|
36
|
-
type='button'
|
|
37
|
-
${attributes}
|
|
38
|
-
${{
|
|
39
|
-
'aria-label': text,
|
|
40
|
-
ondisconnect: () => {
|
|
41
|
-
request++;
|
|
42
|
-
clearTimeout(timer);
|
|
43
|
-
},
|
|
44
|
-
onclick: async (e: MouseEvent) => {
|
|
45
|
-
e.preventDefault();
|
|
46
|
-
e.stopPropagation();
|
|
47
|
-
|
|
48
|
-
let current = ++request,
|
|
49
|
-
copied = await write(typeof value === 'function' ? value() : value);
|
|
50
|
-
|
|
51
|
-
// A second click can land while the first is still writing; only the last one's timer runs.
|
|
52
|
-
if (current !== request) {
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
clearTimeout(timer);
|
|
57
|
-
state.status = copied ? 'success' : 'error';
|
|
58
|
-
timer = setTimeout(() => {
|
|
59
|
-
state.status = 'idle';
|
|
60
|
-
}, timeout);
|
|
61
|
-
},
|
|
62
|
-
title: text
|
|
63
|
-
}}
|
|
64
|
-
>
|
|
65
|
-
${() => state.status === 'success' ? check() : idle()}
|
|
66
|
-
</button>
|
|
67
|
-
`;
|
|
68
|
-
}
|
|
69
|
-
);
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
@use 'css-utilities/icon';
|
|
2
|
-
@use 'variables';
|
|
3
|
-
|
|
4
|
-
.copy {
|
|
5
|
-
align-items: center;
|
|
6
|
-
background: var(--background);
|
|
7
|
-
border: 0;
|
|
8
|
-
border-radius: var(--border-radius);
|
|
9
|
-
color: var(--color);
|
|
10
|
-
cursor: pointer;
|
|
11
|
-
display: flex;
|
|
12
|
-
flex: 0 0 auto;
|
|
13
|
-
height: var(--size);
|
|
14
|
-
justify-content: center;
|
|
15
|
-
margin: 0;
|
|
16
|
-
outline: none;
|
|
17
|
-
padding: 0;
|
|
18
|
-
transition:
|
|
19
|
-
background-color var(--transition-duration) var(--transition-timing-function),
|
|
20
|
-
color var(--transition-duration) var(--transition-timing-function);
|
|
21
|
-
width: var(--size);
|
|
22
|
-
|
|
23
|
-
&-icon {
|
|
24
|
-
flex-shrink: 0;
|
|
25
|
-
height: var(--icon-size);
|
|
26
|
-
width: var(--icon-size);
|
|
27
|
-
|
|
28
|
-
// The shared check carries no stroke of its own; it draws in once the copy lands.
|
|
29
|
-
&--check {
|
|
30
|
-
@extend %icon-stroke, %icon-stroke-draw;
|
|
31
|
-
animation: copy-check-draw var(--draw-duration) var(--draw-timing-function) forwards;
|
|
32
|
-
stroke-width: 4;
|
|
33
|
-
|
|
34
|
-
@media (prefers-reduced-motion: reduce) {
|
|
35
|
-
animation: none;
|
|
36
|
-
stroke-dashoffset: 0;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
&:focus-visible {
|
|
42
|
-
outline: var(--outline-width) solid var(--outline-color);
|
|
43
|
-
outline-offset: calc(var(--outline-width) * -1);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
@keyframes copy-check-draw {
|
|
49
|
-
to {
|
|
50
|
-
stroke-dashoffset: 0;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
@use 'css-utilities/background';
|
|
2
|
-
@use 'css-utilities/color';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
.copy {
|
|
6
|
-
@extend %background-state, %color-state;
|
|
7
|
-
--background-hover: var(--surface-background-hover);
|
|
8
|
-
--background-pressed: var(--surface-background-pressed);
|
|
9
|
-
--border-radius: var(--border-radius-300);
|
|
10
|
-
--color-default: var(--color-text-300);
|
|
11
|
-
--color-hover: var(--color-text-500);
|
|
12
|
-
--color-pressed: var(--color-hover);
|
|
13
|
-
--draw-duration: var(--duration-moderate);
|
|
14
|
-
--draw-timing-function: ease;
|
|
15
|
-
--icon-size: var(--size-400);
|
|
16
|
-
--outline-color: var(--color-blue-400);
|
|
17
|
-
--outline-width: var(--border-width-500);
|
|
18
|
-
--size: 28px;
|
|
19
|
-
}
|