@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,5 +1,4 @@
|
|
|
1
1
|
@use '/tokens';
|
|
2
|
-
@use 'css-utilities/anchor';
|
|
3
2
|
@use 'variables';
|
|
4
3
|
|
|
5
4
|
// Hovered or holding focus, the stack fans out and every clock stops.
|
|
@@ -7,100 +6,127 @@ $open: ':is(:hover, :focus-within)';
|
|
|
7
6
|
|
|
8
7
|
|
|
9
8
|
// The toast's clock: 0 to 1 over its duration. Inherited, so anything in its content can count down on it.
|
|
10
|
-
@property --
|
|
9
|
+
@property --progress {
|
|
11
10
|
inherits: true;
|
|
12
11
|
initial-value: 0;
|
|
13
12
|
syntax: '<number>';
|
|
14
13
|
}
|
|
15
14
|
|
|
16
15
|
|
|
16
|
+
.toast {
|
|
17
|
+
// Pinned over the toast's corner; qualified to outrank the '.button' layout it pairs with.
|
|
18
|
+
&-close {
|
|
19
|
+
height: var(--size);
|
|
20
|
+
inset-inline-end: var(--offset);
|
|
21
|
+
opacity: var(--content-opacity);
|
|
22
|
+
position: absolute;
|
|
23
|
+
top: var(--offset);
|
|
24
|
+
width: var(--size);
|
|
25
|
+
z-index: 1;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&-content {
|
|
29
|
+
align-items: center;
|
|
30
|
+
display: flex;
|
|
31
|
+
gap: var(--gap-vertical) var(--gap-horizontal);
|
|
32
|
+
min-width: 0;
|
|
33
|
+
opacity: var(--content-opacity);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
17
37
|
// Sized to the stack so the gaps between expanded toasts still count as hovering it.
|
|
18
38
|
.toaster {
|
|
19
|
-
|
|
20
|
-
height: max(0px, calc(var(--toast-frontmost-height) + (min(var(--toast-count), var(--toast-limit)) - 1) * var(--stack-peek) + min(1, var(--toast-hidden)) * var(--toast-overflow-peek)));
|
|
39
|
+
height: max(0px, calc(var(--frontmost-height) + (min(var(--count), var(--limit)) - 1) * var(--stack-peek) + min(1, var(--hidden)) * var(--overflow-peek)));
|
|
21
40
|
inset: var(--margin-vertical) var(--margin-horizontal) auto auto;
|
|
22
41
|
position: fixed;
|
|
23
|
-
transition: translate var(--
|
|
24
|
-
width: min(var(--
|
|
42
|
+
transition: translate var(--transition-duration) var(--transition-timing-function);
|
|
43
|
+
width: min(var(--width), calc(100% - (var(--margin-horizontal) * 2)));
|
|
25
44
|
z-index: 9999;
|
|
26
45
|
|
|
27
46
|
|
|
28
|
-
//
|
|
29
|
-
|
|
30
|
-
|
|
47
|
+
// Side placements center the newest toast on the edge; the list grows downward from it when open.
|
|
48
|
+
&--e {
|
|
49
|
+
inset: 50% var(--margin-horizontal) auto auto;
|
|
50
|
+
translate: 0 calc(var(--anchor-height) / -2);
|
|
31
51
|
}
|
|
32
52
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
53
|
+
&--e,
|
|
54
|
+
&--w {
|
|
55
|
+
height: var(--frontmost-height);
|
|
37
56
|
}
|
|
38
57
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
translate: 0 calc(var(--toast-anchor-height) / -2);
|
|
58
|
+
&--n {
|
|
59
|
+
inset: var(--margin-vertical) auto auto 50%;
|
|
60
|
+
translate: -50% 0;
|
|
43
61
|
}
|
|
44
62
|
|
|
45
|
-
&--
|
|
63
|
+
&--ne {
|
|
64
|
+
inset: var(--margin-vertical) var(--margin-horizontal) auto auto;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&--nw {
|
|
68
|
+
inset: var(--margin-vertical) auto auto var(--margin-horizontal);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&--s {
|
|
72
|
+
inset: auto auto var(--margin-vertical) 50%;
|
|
73
|
+
translate: -50% 0;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&--se {
|
|
77
|
+
inset: auto var(--margin-horizontal) var(--margin-vertical) auto;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&--sw {
|
|
81
|
+
inset: auto auto var(--margin-vertical) var(--margin-horizontal);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&--w {
|
|
85
|
+
inset: 50% auto auto var(--margin-horizontal);
|
|
86
|
+
translate: 0 calc(var(--anchor-height) / -2);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// What a placement re-pins in its toasts and overflow card is qualified by the toaster, so it outranks their
|
|
90
|
+
// unplaced rules below wherever it sits.
|
|
91
|
+
&.toaster--e {
|
|
46
92
|
> .toast {
|
|
47
|
-
--stack-translate: calc(var(--stack-shift) * -1) calc((var(--
|
|
93
|
+
--stack-translate: calc(var(--stack-shift) * -1) calc((var(--frontmost-height) - var(--height)) / 2);
|
|
48
94
|
transform-origin: right;
|
|
49
95
|
}
|
|
50
96
|
|
|
51
97
|
> .toaster-overflow {
|
|
52
|
-
translate: calc(((var(--
|
|
98
|
+
translate: calc(((var(--limit) - 1) * var(--stack-peek) + var(--overflow-peek)) * -1) 0;
|
|
53
99
|
}
|
|
54
100
|
}
|
|
55
101
|
|
|
56
102
|
// Side stacks recede sideways, back from their edge, the way overlay's do: every toast is as wide as the
|
|
57
103
|
// next, so the overlay's own shift applies, and back toasts are centered on the front one and trimmed to its
|
|
58
104
|
// height.
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
height: var(--toast-frontmost-height);
|
|
62
|
-
|
|
105
|
+
&.toaster--e,
|
|
106
|
+
&.toaster--w {
|
|
63
107
|
> .toast {
|
|
64
|
-
--stack-shift: calc(var(--depth) * var(--stack-peek) + (1 - var(--
|
|
108
|
+
--stack-shift: calc(var(--depth) * var(--stack-peek) + (1 - var(--scale)) * var(--stack-span));
|
|
65
109
|
}
|
|
66
110
|
|
|
67
111
|
> .toast.toast--behind {
|
|
68
|
-
clip-path: inset(calc((100% - var(--
|
|
112
|
+
clip-path: inset(calc((100% - var(--frontmost-height)) / 2) calc(var(--bleed) * -1));
|
|
69
113
|
}
|
|
70
114
|
|
|
71
115
|
// Its count runs down the strip it shows beside the stack. Physical sides: in vertical writing its logical
|
|
72
116
|
// ones turn with the text.
|
|
73
117
|
> .toaster-overflow {
|
|
74
118
|
bottom: auto;
|
|
75
|
-
height: calc(var(--
|
|
119
|
+
height: calc(var(--frontmost-height) * pow(var(--stack-scale), var(--limit)));
|
|
76
120
|
left: 0;
|
|
77
121
|
right: 0;
|
|
78
|
-
top: calc(var(--
|
|
122
|
+
top: calc(var(--frontmost-height) * (1 - pow(var(--stack-scale), var(--limit))) / 2);
|
|
79
123
|
writing-mode: vertical-rl;
|
|
80
124
|
}
|
|
81
125
|
}
|
|
82
126
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
&--ne {
|
|
89
|
-
inset: var(--margin-vertical) var(--margin-horizontal) auto auto;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
&--nw {
|
|
93
|
-
inset: var(--margin-vertical) auto auto var(--margin-horizontal);
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
&--s {
|
|
97
|
-
inset: auto auto var(--margin-vertical) 50%;
|
|
98
|
-
translate: -50% 0;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
&--s,
|
|
102
|
-
&--se,
|
|
103
|
-
&--sw {
|
|
127
|
+
&.toaster--s,
|
|
128
|
+
&.toaster--se,
|
|
129
|
+
&.toaster--sw {
|
|
104
130
|
> .toast {
|
|
105
131
|
--stack-translate: 0 calc(var(--stack-shift) * -1);
|
|
106
132
|
bottom: 0;
|
|
@@ -109,7 +135,7 @@ $open: ':is(:hover, :focus-within)';
|
|
|
109
135
|
}
|
|
110
136
|
|
|
111
137
|
> .toast.toast--behind {
|
|
112
|
-
clip-path: inset(calc(var(--
|
|
138
|
+
clip-path: inset(calc(var(--bleed) * -1) calc(var(--bleed) * -1) calc(100% - var(--frontmost-height)));
|
|
113
139
|
}
|
|
114
140
|
|
|
115
141
|
> .toaster-overflow {
|
|
@@ -119,58 +145,56 @@ $open: ':is(:hover, :focus-within)';
|
|
|
119
145
|
}
|
|
120
146
|
}
|
|
121
147
|
|
|
122
|
-
|
|
123
|
-
&--se {
|
|
124
|
-
inset: auto var(--margin-horizontal) var(--margin-vertical) auto;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
&--sw {
|
|
128
|
-
inset: auto auto var(--margin-vertical) var(--margin-horizontal);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
&--w {
|
|
132
|
-
inset: 50% auto auto var(--margin-horizontal);
|
|
133
|
-
translate: 0 calc(var(--toast-anchor-height) / -2);
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
&--w {
|
|
148
|
+
&.toaster--w {
|
|
137
149
|
> .toast {
|
|
138
|
-
--stack-translate: var(--stack-shift) calc((var(--
|
|
150
|
+
--stack-translate: var(--stack-shift) calc((var(--frontmost-height) - var(--height)) / 2);
|
|
139
151
|
transform-origin: left;
|
|
140
152
|
}
|
|
141
153
|
|
|
142
154
|
> .toaster-overflow {
|
|
143
155
|
align-items: flex-start;
|
|
144
|
-
translate: calc((var(--
|
|
156
|
+
translate: calc((var(--limit) - 1) * var(--stack-peek) + var(--overflow-peek)) 0;
|
|
145
157
|
}
|
|
146
158
|
}
|
|
147
159
|
|
|
148
160
|
// Scoped under the toaster to outrank consumer pairings like '.card { position: relative }'. The slot it stands
|
|
149
161
|
// in is its 'translate', a swipe (and the way in or out) its 'transform', so the two compose.
|
|
150
162
|
> .toast {
|
|
151
|
-
clip-path: inset(calc(var(--
|
|
163
|
+
clip-path: inset(calc(var(--bleed) * -1));
|
|
152
164
|
inset-inline: 0;
|
|
153
165
|
position: absolute;
|
|
154
|
-
scale: var(--
|
|
166
|
+
scale: var(--scale);
|
|
155
167
|
top: 0;
|
|
156
168
|
touch-action: none;
|
|
157
|
-
transform: translate(var(--
|
|
169
|
+
transform: translate(var(--swipe-x), var(--swipe-y));
|
|
158
170
|
transform-origin: top;
|
|
159
171
|
transition:
|
|
160
|
-
clip-path var(--
|
|
161
|
-
opacity var(--
|
|
162
|
-
scale var(--
|
|
163
|
-
transform var(--
|
|
164
|
-
translate var(--
|
|
172
|
+
clip-path var(--transition-duration) var(--transition-timing-function),
|
|
173
|
+
opacity var(--transition-duration) var(--transition-timing-function),
|
|
174
|
+
scale var(--transition-duration) var(--transition-timing-function),
|
|
175
|
+
transform var(--transition-duration) var(--transition-timing-function),
|
|
176
|
+
translate var(--transition-duration) var(--transition-timing-function);
|
|
165
177
|
translate: var(--stack-translate);
|
|
166
178
|
user-select: none;
|
|
167
|
-
z-index: calc(9999 - var(--
|
|
179
|
+
z-index: calc(9999 - var(--index));
|
|
180
|
+
|
|
181
|
+
// Entering, from beyond the edge the toaster is pinned to.
|
|
182
|
+
@starting-style {
|
|
183
|
+
opacity: 0;
|
|
184
|
+
scale: 1;
|
|
185
|
+
transform: translate(var(--translate-x), var(--translate-y));
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
// Every placement fades in place instead of travelling.
|
|
189
|
+
@media (prefers-reduced-motion: reduce) {
|
|
190
|
+
transition: none;
|
|
191
|
+
}
|
|
168
192
|
}
|
|
169
193
|
|
|
170
194
|
// Collapsed back toasts show only the front toast's height; the rest would hang past the stack.
|
|
171
195
|
> .toast.toast--behind {
|
|
172
|
-
--
|
|
173
|
-
clip-path: inset(calc(100% - var(--
|
|
196
|
+
--content-opacity: 0;
|
|
197
|
+
clip-path: inset(calc(100% - var(--frontmost-height)) calc(var(--bleed) * -1) calc(var(--bleed) * -1));
|
|
174
198
|
}
|
|
175
199
|
|
|
176
200
|
> .toast.toast--hidden {
|
|
@@ -178,7 +202,7 @@ $open: ':is(:hover, :focus-within)';
|
|
|
178
202
|
}
|
|
179
203
|
|
|
180
204
|
> .toast.toast--timed {
|
|
181
|
-
animation: toast-timer var(--
|
|
205
|
+
animation: toast-timer var(--duration) linear forwards;
|
|
182
206
|
}
|
|
183
207
|
|
|
184
208
|
// Stands one card further back than the limit, reaching past the last visible layer far enough for its count.
|
|
@@ -186,19 +210,19 @@ $open: ':is(:hover, :focus-within)';
|
|
|
186
210
|
> .toaster-overflow {
|
|
187
211
|
align-items: flex-end;
|
|
188
212
|
display: flex;
|
|
189
|
-
height: var(--
|
|
190
|
-
inset-inline: calc((1 - pow(var(--stack-scale), var(--
|
|
213
|
+
height: var(--frontmost-height);
|
|
214
|
+
inset-inline: calc((1 - pow(var(--stack-scale), var(--limit))) * 50%);
|
|
191
215
|
justify-content: center;
|
|
192
|
-
line-height: var(--
|
|
193
|
-
opacity: min(1, var(--
|
|
216
|
+
line-height: var(--overflow-peek);
|
|
217
|
+
opacity: min(1, var(--hidden));
|
|
194
218
|
pointer-events: none;
|
|
195
219
|
position: absolute;
|
|
196
220
|
top: 0;
|
|
197
221
|
transition:
|
|
198
|
-
opacity var(--
|
|
199
|
-
translate var(--
|
|
200
|
-
translate: 0 calc(((var(--
|
|
201
|
-
z-index: calc(9999 - var(--
|
|
222
|
+
opacity var(--transition-duration) var(--transition-timing-function),
|
|
223
|
+
translate var(--transition-duration) var(--transition-timing-function);
|
|
224
|
+
translate: 0 calc(((var(--limit) - 1) * var(--stack-peek) + var(--overflow-peek)) * var(--direction));
|
|
225
|
+
z-index: calc(9999 - var(--limit));
|
|
202
226
|
}
|
|
203
227
|
|
|
204
228
|
// Only the front toast's clock runs, and none while the stack is open or a toast is being swiped.
|
|
@@ -209,17 +233,17 @@ $open: ':is(:hover, :focus-within)';
|
|
|
209
233
|
}
|
|
210
234
|
|
|
211
235
|
&#{$open} {
|
|
212
|
-
height: max(0px, calc(var(--
|
|
236
|
+
height: max(0px, calc(var(--stack-height) + (var(--count) - 1) * var(--stack-gap-vertical)));
|
|
213
237
|
|
|
214
238
|
> .toast {
|
|
215
|
-
--
|
|
239
|
+
--content-opacity: 1;
|
|
216
240
|
opacity: 1;
|
|
217
241
|
scale: 1;
|
|
218
|
-
translate: 0 var(--
|
|
242
|
+
translate: 0 var(--expanded-y);
|
|
219
243
|
|
|
220
244
|
&,
|
|
221
245
|
&.toast--behind {
|
|
222
|
-
clip-path: inset(calc(var(--
|
|
246
|
+
clip-path: inset(calc(var(--bleed) * -1));
|
|
223
247
|
}
|
|
224
248
|
}
|
|
225
249
|
|
|
@@ -231,8 +255,12 @@ $open: ':is(:hover, :focus-within)';
|
|
|
231
255
|
// Leaving plays out from wherever the toast stands, toward its edge; its clock stays stopped where it ended so
|
|
232
256
|
// anything counting down on it holds still as it goes.
|
|
233
257
|
> .toast.toast--ending {
|
|
234
|
-
animation: toast-exit var(--
|
|
258
|
+
animation: toast-exit var(--exit-duration) var(--exit-timing-function) forwards;
|
|
235
259
|
pointer-events: none;
|
|
260
|
+
|
|
261
|
+
@media (prefers-reduced-motion: reduce) {
|
|
262
|
+
animation-name: toast-fade;
|
|
263
|
+
}
|
|
236
264
|
}
|
|
237
265
|
|
|
238
266
|
// Swiped away, it is thrown on until it has left the screen, whole, rather than fading out on the way.
|
|
@@ -246,8 +274,12 @@ $open: ':is(:hover, :focus-within)';
|
|
|
246
274
|
|
|
247
275
|
> .toast.toast--ending.toast--timed {
|
|
248
276
|
animation:
|
|
249
|
-
toast-timer var(--
|
|
250
|
-
toast-exit var(--
|
|
277
|
+
toast-timer var(--duration) linear forwards paused,
|
|
278
|
+
toast-exit var(--exit-duration) var(--exit-timing-function) forwards;
|
|
279
|
+
|
|
280
|
+
@media (prefers-reduced-motion: reduce) {
|
|
281
|
+
animation-name: toast-timer, toast-fade;
|
|
282
|
+
}
|
|
251
283
|
}
|
|
252
284
|
|
|
253
285
|
> .toast.toast--swiping {
|
|
@@ -255,68 +287,11 @@ $open: ':is(:hover, :focus-within)';
|
|
|
255
287
|
}
|
|
256
288
|
}
|
|
257
289
|
|
|
258
|
-
// Entering, from beyond the edge the toaster is pinned to.
|
|
259
|
-
@starting-style {
|
|
260
|
-
.toaster > .toast {
|
|
261
|
-
opacity: 0;
|
|
262
|
-
scale: 1;
|
|
263
|
-
transform: translate(var(--translate-x), var(--translate-y));
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
.toast {
|
|
269
|
-
&-close-icon {
|
|
270
|
-
height: var(--icon-size);
|
|
271
|
-
width: var(--icon-size);
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
// Pinned over the toast's corner; qualified to outrank the '.button' layout it pairs with.
|
|
275
|
-
&-close.button {
|
|
276
|
-
height: var(--size);
|
|
277
|
-
inset-inline-end: var(--offset);
|
|
278
|
-
opacity: var(--toast-content-opacity);
|
|
279
|
-
position: absolute;
|
|
280
|
-
top: var(--offset);
|
|
281
|
-
width: var(--size);
|
|
282
|
-
z-index: 1;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
&-content {
|
|
286
|
-
align-items: center;
|
|
287
|
-
display: flex;
|
|
288
|
-
gap: var(--toast-content-gap);
|
|
289
|
-
min-width: 0;
|
|
290
|
-
opacity: var(--toast-content-opacity);
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
// Every placement fades in place instead of travelling.
|
|
296
|
-
@media (prefers-reduced-motion: reduce) {
|
|
297
|
-
.toaster {
|
|
298
|
-
--translate-x: 0px;
|
|
299
|
-
--translate-y: 0px;
|
|
300
|
-
|
|
301
|
-
> .toast {
|
|
302
|
-
transition: none;
|
|
303
|
-
|
|
304
|
-
&.toast--ending {
|
|
305
|
-
animation-name: toast-fade;
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
&.toast--ending.toast--timed {
|
|
309
|
-
animation-name: toast-timer, toast-fade;
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
|
|
315
290
|
|
|
316
291
|
@keyframes toast-exit {
|
|
317
292
|
to {
|
|
318
293
|
opacity: 0;
|
|
319
|
-
transform: translate(calc(var(--
|
|
294
|
+
transform: translate(calc(var(--swipe-x) + var(--translate-x)), calc(var(--swipe-y) + var(--translate-y)));
|
|
320
295
|
}
|
|
321
296
|
}
|
|
322
297
|
|
|
@@ -328,16 +303,16 @@ $open: ':is(:hover, :focus-within)';
|
|
|
328
303
|
|
|
329
304
|
@keyframes toast-fling {
|
|
330
305
|
to {
|
|
331
|
-
transform: translate(calc(var(--
|
|
306
|
+
transform: translate(calc(var(--swipe-x) + var(--translate-x)), calc(var(--swipe-y) + var(--translate-y)));
|
|
332
307
|
}
|
|
333
308
|
}
|
|
334
309
|
|
|
335
310
|
@keyframes toast-timer {
|
|
336
311
|
from {
|
|
337
|
-
--
|
|
312
|
+
--progress: 0;
|
|
338
313
|
}
|
|
339
314
|
|
|
340
315
|
to {
|
|
341
|
-
--
|
|
316
|
+
--progress: 1;
|
|
342
317
|
}
|
|
343
318
|
}
|
|
@@ -1,48 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
// Collapsed layer: toasts past the limit wait, unseen, in the last visible one.
|
|
4
|
-
--depth: min(var(--toast-index), var(--toast-limit) - 1);
|
|
5
|
-
// Read by JS: the longest a swiped-away toast is thrown for.
|
|
6
|
-
--fling-duration: 500ms;
|
|
7
|
-
// Each layer's far edge sits one peek past the layer in front of it, measured from the front toast's height so
|
|
8
|
-
// a taller toast behind never shows more of itself.
|
|
9
|
-
--stack-shift: calc(var(--toast-frontmost-height) + var(--depth) * var(--stack-peek) - var(--toast-scale) * var(--toast-height));
|
|
10
|
-
--stack-translate: 0 var(--stack-shift);
|
|
11
|
-
// Room past the box for shadows and the close button, which the collapsed clip would otherwise cut.
|
|
12
|
-
--toast-bleed: 32px;
|
|
13
|
-
--toast-content-gap: var(--size-300);
|
|
14
|
-
// Read by the content and close button: collapsed back toasts hide theirs.
|
|
15
|
-
--toast-content-opacity: 1;
|
|
16
|
-
// Written by the toast: its duration, and the same in whole seconds for a countdown in its content.
|
|
17
|
-
--toast-duration: 0ms;
|
|
18
|
-
--toast-exit-duration: var(--duration-slow-exit);
|
|
19
|
-
--toast-exit-timing-function: var(--easing-spring);
|
|
20
|
-
--toast-expanded-y: calc((var(--toast-offset-y) + var(--toast-index) * var(--toast-gap)) * var(--toast-direction));
|
|
21
|
-
--toast-height: 0px;
|
|
22
|
-
--toast-index: 0;
|
|
23
|
-
--toast-offset-y: 0px;
|
|
24
|
-
--toast-scale: pow(var(--stack-scale), var(--depth));
|
|
25
|
-
--toast-seconds: 0;
|
|
26
|
-
--toast-swipe-x: 0px;
|
|
27
|
-
--toast-swipe-y: 0px;
|
|
1
|
+
@use 'css-utilities/anchor';
|
|
2
|
+
@use 'css-utilities/color';
|
|
28
3
|
|
|
29
|
-
// Swiped away, it fades where it was let go.
|
|
30
|
-
@media (prefers-reduced-motion: reduce) {
|
|
31
|
-
--fling-duration: 0s;
|
|
32
|
-
}
|
|
33
4
|
|
|
34
|
-
|
|
5
|
+
.toast {
|
|
6
|
+
&-close {
|
|
7
|
+
@extend %color-text;
|
|
35
8
|
--background-default: var(--surface-background-default);
|
|
36
9
|
--background-hover: var(--surface-background-hover);
|
|
37
10
|
--border-radius: 999px;
|
|
38
11
|
--box-shadow-default: 0 0 0 var(--border-width-400) var(--surface-border-hover);
|
|
39
|
-
--color-default: var(--color-text-300);
|
|
40
|
-
--color-hover: var(--color-text-500);
|
|
41
|
-
--icon-size: var(--size-200);
|
|
42
12
|
--offset: calc(var(--size-200) * -1);
|
|
43
13
|
--padding-horizontal: 0px;
|
|
44
14
|
--padding-vertical: 0px;
|
|
45
15
|
--size: var(--size-500);
|
|
16
|
+
|
|
17
|
+
// Chained through '.icon' so it wins over the icon's own size regardless of stylesheet order.
|
|
18
|
+
&-icon.icon {
|
|
19
|
+
--size: var(--size-200);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&-content {
|
|
24
|
+
--gap-horizontal: var(--size-300);
|
|
25
|
+
--gap-vertical: var(--size-300);
|
|
46
26
|
}
|
|
47
27
|
}
|
|
48
28
|
|
|
@@ -50,31 +30,88 @@
|
|
|
50
30
|
// Placed like overlay, extending the same anchor placements and stack variables: 'toaster--n' is top center,
|
|
51
31
|
// 'toaster--ne' top right, and so on round; unplaced, it sits top right.
|
|
52
32
|
.toaster {
|
|
53
|
-
|
|
54
|
-
--margin-vertical: var(--size-500);
|
|
55
|
-
--stack-peek: var(--size-300);
|
|
56
|
-
--stack-scale: 0.94;
|
|
33
|
+
@extend %anchor;
|
|
57
34
|
// Written by the toaster: the newest toast's height, live toasts, the front one's height, how many the limit
|
|
58
35
|
// keeps out of the collapsed stack, the limit itself, and every live toast's height summed.
|
|
59
|
-
--
|
|
60
|
-
--
|
|
36
|
+
--anchor-height: 0px;
|
|
37
|
+
--count: 0;
|
|
61
38
|
// The way the expanded list grows from the front toast.
|
|
62
|
-
--
|
|
63
|
-
--
|
|
64
|
-
--
|
|
65
|
-
--
|
|
66
|
-
--
|
|
39
|
+
--direction: 1;
|
|
40
|
+
--frontmost-height: 0px;
|
|
41
|
+
--hidden: 0;
|
|
42
|
+
--limit: 3;
|
|
43
|
+
--margin-horizontal: var(--size-500);
|
|
44
|
+
--margin-vertical: var(--size-500);
|
|
67
45
|
// How far the overflow card reaches past the last visible layer: room for its line of text.
|
|
68
|
-
--
|
|
69
|
-
|
|
70
|
-
--
|
|
71
|
-
--
|
|
72
|
-
--
|
|
46
|
+
--overflow-peek: 24px;
|
|
47
|
+
// Between expanded toasts; inherited by each toast, which places itself with it.
|
|
48
|
+
--stack-gap-vertical: var(--size-300);
|
|
49
|
+
--stack-height: 0px;
|
|
50
|
+
--stack-peek: var(--size-300);
|
|
51
|
+
--stack-scale: 0.94;
|
|
52
|
+
--transition-duration: 0.4s;
|
|
53
|
+
--transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
|
|
54
|
+
--width: 360px;
|
|
55
|
+
|
|
56
|
+
// Every placement fades in place instead of travelling. Doubled so it wins over each placement's travel, the
|
|
57
|
+
// unplaced one's included.
|
|
58
|
+
@media (prefers-reduced-motion: reduce) {
|
|
59
|
+
&#{&} {
|
|
60
|
+
--translate-x: 0px;
|
|
61
|
+
--translate-y: 0px;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// Qualified by the toaster so these win over the consumer's classes (e.g. '.card') sharing the element.
|
|
66
|
+
> .toast {
|
|
67
|
+
// Room past the box for shadows and the close button, which the collapsed clip would otherwise cut.
|
|
68
|
+
--bleed: 32px;
|
|
69
|
+
// Read by the content and close button: collapsed back toasts hide theirs.
|
|
70
|
+
--content-opacity: 1;
|
|
71
|
+
// Collapsed layer: toasts past the limit wait, unseen, in the last visible one.
|
|
72
|
+
--depth: min(var(--index), var(--limit) - 1);
|
|
73
|
+
// Written by the toast: its duration, and the same in whole seconds for a countdown in its content.
|
|
74
|
+
--duration: 0ms;
|
|
75
|
+
--exit-duration: 0.3s;
|
|
76
|
+
--exit-timing-function: var(--transition-timing-function);
|
|
77
|
+
--expanded-y: calc((var(--offset-y) + var(--index) * var(--stack-gap-vertical)) * var(--direction));
|
|
78
|
+
// Read by JS: the longest a swiped-away toast is thrown for.
|
|
79
|
+
--fling-duration: 500ms;
|
|
80
|
+
--height: 0px;
|
|
81
|
+
--index: 0;
|
|
82
|
+
--offset-y: 0px;
|
|
83
|
+
--scale: pow(var(--stack-scale), var(--depth));
|
|
84
|
+
--seconds: 0;
|
|
85
|
+
// Each layer's far edge sits one peek past the layer in front of it, measured from the front toast's height
|
|
86
|
+
// so a taller toast behind never shows more of itself.
|
|
87
|
+
--stack-shift: calc(var(--frontmost-height) + var(--depth) * var(--stack-peek) - var(--scale) * var(--height));
|
|
88
|
+
--stack-translate: 0 var(--stack-shift);
|
|
89
|
+
--swipe-x: 0px;
|
|
90
|
+
--swipe-y: 0px;
|
|
91
|
+
--transition-duration: 0.4s;
|
|
92
|
+
--transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
|
|
73
93
|
|
|
94
|
+
// Swiped away, it fades where it was let go.
|
|
95
|
+
@media (prefers-reduced-motion: reduce) {
|
|
96
|
+
--fling-duration: 0s;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
@each $placement in anchor.$placements {
|
|
102
|
+
&--#{$placement} {
|
|
103
|
+
@extend %anchor--#{$placement};
|
|
104
|
+
}
|
|
105
|
+
}
|
|
74
106
|
|
|
75
107
|
&--s,
|
|
76
108
|
&--se,
|
|
77
109
|
&--sw {
|
|
78
|
-
--
|
|
110
|
+
--direction: -1;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// Unplaced, it sits top right; only then, so any placement still wins.
|
|
114
|
+
&:not([class*='toaster--']) {
|
|
115
|
+
@extend %anchor--ne;
|
|
79
116
|
}
|
|
80
117
|
}
|