@esportsplus/ui 0.59.0 → 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 +8 -8
- 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
|
@@ -2,13 +2,11 @@ import * as template_u1 from '@esportsplus/template';
|
|
|
2
2
|
import { component } from '@esportsplus/template';
|
|
3
3
|
import * as reactivity_u0 from '@esportsplus/reactivity';
|
|
4
4
|
import { drag, INTERACTIVE } from '../../shared/drag.js';
|
|
5
|
-
import pause from '@esportsplus/ui/svg/pause.svg';
|
|
6
|
-
import play from '@esportsplus/ui/svg/play.svg';
|
|
7
5
|
import '../frame/scss/index.scss';
|
|
8
6
|
import './scss/index.scss';
|
|
9
|
-
const template_1ugnadq3 = template_u1.template(`<div aria-roledescription='stories' class='story' role='region' tabindex='0'><div aria-hidden='true' class='story-bars'></div><div class='story-
|
|
10
|
-
const
|
|
11
|
-
const
|
|
7
|
+
const template_1ugnadq3 = template_u1.template(`<div aria-roledescription='stories' class='story' role='region' tabindex='0'><div aria-hidden='true' class='story-bars'></div><div class='story-track '><!--$--><p class='story-sr'></p></div><div class='story-zones'><button aria-label='Previous story' class='story-zone' tabindex='-1' type='button'></button><button aria-label='Next story' class='story-zone' tabindex='-1' type='button'>`);
|
|
8
|
+
const template_1ugnadqc = template_u1.template(`<span class='story-bar '><span class='story-fill'>`);
|
|
9
|
+
const template_1ugnadqg = template_u1.template(`<div aria-roledescription='story' class='story-slide frame frame--slide ' role='group'>`);
|
|
12
10
|
class ReactiveObject_1ugnadq0 extends reactivity_u0.ReactiveObject {
|
|
13
11
|
#index = this[reactivity_u0.SIGNAL](0);
|
|
14
12
|
#paused = this[reactivity_u0.SIGNAL](false);
|
|
@@ -75,7 +73,6 @@ class ReactiveObject_1ugnadq1 extends reactivity_u0.ReactiveObject {
|
|
|
75
73
|
reactivity_u0.write(this.#pressing, _v5);
|
|
76
74
|
}
|
|
77
75
|
}
|
|
78
|
-
const STORY_TOGGLE = Symbol.for('@esportsplus/ui/story.toggle');
|
|
79
76
|
const HOLD = 200;
|
|
80
77
|
const CONTROLS = `.story-slide :is(${INTERACTIVE}, [tabindex])`;
|
|
81
78
|
const LOCK = 6;
|
|
@@ -140,57 +137,40 @@ function template({ duration, label = 'Stories', state = new ReactiveObject_1ugn
|
|
|
140
137
|
view.pressing = false;
|
|
141
138
|
}
|
|
142
139
|
return (() => {
|
|
143
|
-
let root_1ugnadq2 = template_1ugnadq3(), element_1ugnadq4 = root_1ugnadq2.firstChild, element_1ugnadq5 = element_1ugnadq4.firstElementChild, element_1ugnadq6 = element_1ugnadq5.nextElementSibling
|
|
140
|
+
let root_1ugnadq2 = template_1ugnadq3(), element_1ugnadq4 = root_1ugnadq2.firstChild, element_1ugnadq5 = element_1ugnadq4.firstElementChild, element_1ugnadq6 = element_1ugnadq5.nextElementSibling, element_1ugnadq7 = element_1ugnadq6.firstChild, element_1ugnadq8 = element_1ugnadq6.firstElementChild, element_1ugnadq9 = element_1ugnadq6.nextElementSibling.firstElementChild, element_1ugnadqa = element_1ugnadq9.nextElementSibling;
|
|
144
141
|
template_u1.slot(element_1ugnadq5, stories.map((_, i) => {
|
|
145
|
-
let
|
|
146
|
-
template_u1.delegate(
|
|
142
|
+
let root_1ugnadqb = template_1ugnadqc(), element_1ugnadqd = root_1ugnadqb.firstChild, element_1ugnadqe = element_1ugnadqd.firstElementChild;
|
|
143
|
+
template_u1.delegate(element_1ugnadqe, 'animationend', () => {
|
|
147
144
|
if (i !== state.index) {
|
|
148
145
|
return;
|
|
149
146
|
}
|
|
150
147
|
view.manual = false;
|
|
151
148
|
state.index = (i + 1) % count;
|
|
152
149
|
});
|
|
153
|
-
template_u1.onconnect(
|
|
150
|
+
template_u1.onconnect(element_1ugnadqe, (element) => {
|
|
154
151
|
fills[i] = element;
|
|
155
152
|
});
|
|
156
|
-
template_u1.setList(
|
|
157
|
-
template_u1.setList(
|
|
158
|
-
return
|
|
153
|
+
template_u1.setList(element_1ugnadqd, 'class', () => i < state.index && 'story-bar--done');
|
|
154
|
+
template_u1.setList(element_1ugnadqd, 'class', () => i === state.index && '--active');
|
|
155
|
+
return root_1ugnadqb;
|
|
159
156
|
}), 1);
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
template_u1.
|
|
164
|
-
template_u1.
|
|
165
|
-
template_u1.setList(
|
|
166
|
-
template_u1.setList(
|
|
167
|
-
template_u1.
|
|
168
|
-
template_u1.setProperty(
|
|
169
|
-
|
|
170
|
-
return root_1ugnadqj;
|
|
157
|
+
template_u1.slot(element_1ugnadq7, stories.map((story, i) => {
|
|
158
|
+
let root_1ugnadqf = template_1ugnadqg(), element_1ugnadqh = root_1ugnadqf.firstChild;
|
|
159
|
+
template_u1.slot(element_1ugnadqh, story, 1);
|
|
160
|
+
template_u1.setProperty(element_1ugnadqh, 'aria-label', `${i + 1} of ${count}`);
|
|
161
|
+
template_u1.setList(element_1ugnadqh, 'class', () => state.index === i && '--active');
|
|
162
|
+
template_u1.setList(element_1ugnadqh, 'class', () => view.dragging && 'story-slide--dragging');
|
|
163
|
+
template_u1.setList(element_1ugnadqh, 'style', `--n: ${i}`);
|
|
164
|
+
template_u1.setProperty(element_1ugnadqh, 'aria-hidden', () => String(state.index !== i));
|
|
165
|
+
template_u1.setProperty(element_1ugnadqh, 'inert', () => state.index !== i);
|
|
166
|
+
return root_1ugnadqf;
|
|
171
167
|
}));
|
|
172
|
-
new template_u1.EffectSlot(
|
|
173
|
-
template_u1.delegate(
|
|
174
|
-
template_u1.delegate(
|
|
175
|
-
template_u1.setProperty(
|
|
176
|
-
template_u1.setList(
|
|
177
|
-
template_u1.setList(
|
|
178
|
-
template_u1.setProperty(element_1ugnadq9, 'href', template_u1.interpolate(["#", (play)]));
|
|
179
|
-
template_u1.setProperty(element_1ugnadq8, 'href', template_u1.interpolate(["#", (pause)]));
|
|
180
|
-
template_u1.setProperty(element_1ugnadq7, 'aria-label', () => state.paused ? 'Play' : 'Pause');
|
|
181
|
-
template_u1.setList(element_1ugnadq7, 'class', () => (view.held || state.paused) && 'story-toggle--paused');
|
|
182
|
-
template_u1.setProperties(element_1ugnadq7, bound?.[STORY_TOGGLE]);
|
|
183
|
-
template_u1.setProperties(element_1ugnadq7, attributes[STORY_TOGGLE]);
|
|
184
|
-
template_u1.delegate(element_1ugnadq7, 'click', () => {
|
|
185
|
-
state.paused = !state.paused;
|
|
186
|
-
});
|
|
187
|
-
template_u1.delegate(element_1ugnadq7, 'keydown', (e) => {
|
|
188
|
-
if (e.key !== ' ' && e.key !== 'Enter') {
|
|
189
|
-
keydown(e);
|
|
190
|
-
}
|
|
191
|
-
});
|
|
192
|
-
template_u1.delegate(element_1ugnadq7, 'pointerdown', () => { });
|
|
193
|
-
template_u1.delegate(element_1ugnadq7, 'pointerup', () => { });
|
|
168
|
+
new template_u1.EffectSlot(element_1ugnadq8, () => `Story ${state.index + 1} of ${count}`, 1);
|
|
169
|
+
template_u1.delegate(element_1ugnadqa, 'click', (e) => e.detail === 0 && go(1));
|
|
170
|
+
template_u1.delegate(element_1ugnadq9, 'click', (e) => e.detail === 0 && go(-1));
|
|
171
|
+
template_u1.setProperty(element_1ugnadq8, 'aria-live', () => view.manual ? 'polite' : 'off');
|
|
172
|
+
template_u1.setList(element_1ugnadq6, 'class', () => (view.held || state.paused) && 'story-track--dimmed');
|
|
173
|
+
template_u1.setList(element_1ugnadq6, 'style', () => `--i: ${state.index - view.offset}`);
|
|
194
174
|
template_u1.setProperty(element_1ugnadq4, 'aria-label', label);
|
|
195
175
|
template_u1.setProperties(element_1ugnadq4, bound);
|
|
196
176
|
template_u1.setProperties(element_1ugnadq4, attributes);
|
|
@@ -250,4 +230,4 @@ function template({ duration, label = 'Stories', state = new ReactiveObject_1ugn
|
|
|
250
230
|
return root_1ugnadq2;
|
|
251
231
|
})();
|
|
252
232
|
}
|
|
253
|
-
export default component(template
|
|
233
|
+
export default component(template);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@layer components{.story-toggle{--color:var(--color-default);--color-active:var(--color-default);--color-default:var(--color-text-400);--color-hover:var(--color-default);--color-pressed:var(--color-default)}.--active.story-toggle{--color:var(--color-active)}.story-toggle:not(.--active):hover{--color:var(--color-hover)}.story-toggle:not(.--active):active{--color:var(--color-pressed)}.story-sr{clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}.story-pause,.story-play{filter:blur(var(--blur-400));opacity:0;transition:filter var(--icon-swap-duration) var(--icon-swap-timing-function), opacity var(--icon-swap-duration) var(--icon-swap-timing-function), scale var(--icon-swap-duration) var(--icon-swap-timing-function);scale:.25}@media (prefers-reduced-motion:reduce){.story-pause,.story-play{transition:none}}.story-toggle:not(.story-toggle--paused) .story-pause,.story-toggle--paused .story-play{filter:blur();opacity:1;scale:1}.story{--surface-shadow-weight:6;--surface-background-active:light-dark(oklch(from var(--surface-background-default) calc(l + .01) c h),oklch(from var(--surface-background-default) calc(l + .02) c h));--surface-background-default:light-dark(oklch(from var(--color-surface) clamp(0, l + max(var(--surface-level), 0) * .01 + min(var(--surface-level), 0) * .01, 1) calc(c * (1 - clamp(0, l + max(var(--surface-level), 0) * .01 + min(var(--surface-level), 0) * .01, 1)) / max(1 - l, .01)) h),oklch(from var(--color-surface) clamp(0, l + max(var(--surface-level), 0) * .02 + min(var(--surface-level), 0) * .02, l + .12) calc(c * clamp(0, l + max(var(--surface-level), 0) * .02 + min(var(--surface-level), 0) * .02, l + .12) / max(l, .01)) h));--surface-background-hover:light-dark(oklch(from var(--surface-background-default) calc(l + .005) c h),oklch(from var(--surface-background-default) calc(l + .01) c h));--surface-background-pressed:light-dark(oklch(from var(--surface-background-default) calc(l - .02) c h),oklch(from var(--surface-background-default) calc(l - .04) c h));--surface-border-active:light-dark(oklch(from var(--surface-background-active) max(0, l - .04) c h),oklch(from var(--surface-background-active) min(1, l + .06) c h));--surface-border-default:light-dark(oklch(from var(--surface-background-default) max(0, l - .04) c h),oklch(from var(--surface-background-default) min(1, l + .06) c h));--surface-border-hover:light-dark(oklch(from var(--surface-background-hover) max(0, l - .04) c h),oklch(from var(--surface-background-hover) min(1, l + .06) c h));--surface-border-pressed:light-dark(oklch(from var(--surface-background-pressed) max(0, l - .04) c h),oklch(from var(--surface-background-pressed) min(1, l + .06) c h));--surface-shadow-active:var(--surface-shadow-hover);--surface-shadow-color:light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .16));--surface-shadow-cast:light-dark(oklch(from light-dark(oklch(from var(--color-surface) clamp(0, l + max(calc(var(--surface-level) - 1), 0) * .01 + min(calc(var(--surface-level) - 1), 0) * .01, 1) calc(c * (1 - clamp(0, l + max(calc(var(--surface-level) - 1), 0) * .01 + min(calc(var(--surface-level) - 1), 0) * .01, 1)) / max(1 - l, .01)) h),oklch(from var(--color-surface) clamp(0, l + max(calc(var(--surface-level) - 1), 0) * .02 + min(calc(var(--surface-level) - 1), 0) * .02, l + .12) calc(c * clamp(0, l + max(calc(var(--surface-level) - 1), 0) * .02 + min(calc(var(--surface-level) - 1), 0) * .02, l + .12) / max(l, .01)) h)) calc(l * .24) calc(c * .24) h / .08),oklch(from light-dark(oklch(from var(--color-surface) clamp(0, l + max(calc(var(--surface-level) - 1), 0) * .01 + min(calc(var(--surface-level) - 1), 0) * .01, 1) calc(c * (1 - clamp(0, l + max(calc(var(--surface-level) - 1), 0) * .01 + min(calc(var(--surface-level) - 1), 0) * .01, 1)) / max(1 - l, .01)) h),oklch(from var(--color-surface) clamp(0, l + max(calc(var(--surface-level) - 1), 0) * .02 + min(calc(var(--surface-level) - 1), 0) * .02, l + .12) calc(c * clamp(0, l + max(calc(var(--surface-level) - 1), 0) * .02 + min(calc(var(--surface-level) - 1), 0) * .02, l + .12) / max(l, .01)) h)) calc(l * .24) calc(c * .24) h / .16));--surface-shadow-default:0 calc((0 + 1 * clamp(0, var(--surface-shadow-weight) - 0, 1) + 3 * clamp(0, var(--surface-shadow-weight) - 3, 1) + 6 * clamp(0, var(--surface-shadow-weight) - 4, 1) + 10 * clamp(0, var(--surface-shadow-weight) - 5, 1) + 5 * clamp(0, var(--surface-shadow-weight) - 6, 1)) * 1px) calc((0 + 2 * clamp(0, var(--surface-shadow-weight) - 1, 1) + 1 * clamp(0, var(--surface-shadow-weight) - 2, 1) + 3 * clamp(0, var(--surface-shadow-weight) - 3, 1) + 9 * clamp(0, var(--surface-shadow-weight) - 4, 1) + 10 * clamp(0, var(--surface-shadow-weight) - 5, 1) + 25 * clamp(0, var(--surface-shadow-weight) - 6, 1)) * 1px) calc((0 + -1 * clamp(0, var(--surface-shadow-weight) - 3, 1) + -2 * clamp(0, var(--surface-shadow-weight) - 4, 1) + -2 * clamp(0, var(--surface-shadow-weight) - 5, 1) + -7 * clamp(0, var(--surface-shadow-weight) - 6, 1)) * 1px) oklch(from var(--surface-shadow-cast) l c h / calc(alpha * (0 + .05 * clamp(0, var(--surface-shadow-weight) - 0, 1) + .05 * clamp(0, var(--surface-shadow-weight) - 2, 1) + .15 * clamp(0, var(--surface-shadow-weight) - 6, 1)) * 10)), 0 calc((0 + 1 * clamp(0, var(--surface-shadow-weight) - 2, 1) + 1 * clamp(0, var(--surface-shadow-weight) - 3, 1) + 2 * clamp(0, var(--surface-shadow-weight) - 4, 1) + 4 * clamp(0, var(--surface-shadow-weight) - 5, 1) + -8 * clamp(0, var(--surface-shadow-weight) - 6, 1)) * 1px) calc((0 + 2 * clamp(0, var(--surface-shadow-weight) - 2, 1) + 2 * clamp(0, var(--surface-shadow-weight) - 3, 1) + 2 * clamp(0, var(--surface-shadow-weight) - 4, 1) + 4 * clamp(0, var(--surface-shadow-weight) - 5, 1) + -10 * clamp(0, var(--surface-shadow-weight) - 6, 1)) * 1px) calc((0 + -1 * clamp(0, var(--surface-shadow-weight) - 2, 1) + -1 * clamp(0, var(--surface-shadow-weight) - 3, 1) + -2 * clamp(0, var(--surface-shadow-weight) - 4, 1) + -2 * clamp(0, var(--surface-shadow-weight) - 5, 1) + 6 * clamp(0, var(--surface-shadow-weight) - 6, 1)) * 1px) oklch(from var(--surface-shadow-cast) l c h / calc(alpha * (0 + .1 * clamp(0, var(--surface-shadow-weight) - 2, 1) + -.1 * clamp(0, var(--surface-shadow-weight) - 6, 1)) * 10));--surface-shadow-hover:0 calc((0 + 1 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 0, 1) + 3 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 3, 1) + 6 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 4, 1) + 10 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 5, 1) + 5 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 6, 1)) * 1px) calc((0 + 2 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 1, 1) + 1 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 2, 1) + 3 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 3, 1) + 9 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 4, 1) + 10 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 5, 1) + 25 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 6, 1)) * 1px) calc((0 + -1 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 3, 1) + -2 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 4, 1) + -2 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 5, 1) + -7 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 6, 1)) * 1px) oklch(from var(--surface-shadow-cast) l c h / calc(alpha * (0 + .05 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 0, 1) + .05 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 2, 1) + .15 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 6, 1)) * 10)), 0 calc((0 + 1 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 2, 1) + 1 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 3, 1) + 2 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 4, 1) + 4 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 5, 1) + -8 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 6, 1)) * 1px) calc((0 + 2 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 2, 1) + 2 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 3, 1) + 2 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 4, 1) + 4 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 5, 1) + -10 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 6, 1)) * 1px) calc((0 + -1 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 2, 1) + -1 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 3, 1) + -2 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 4, 1) + -2 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 5, 1) + 6 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 6, 1)) * 1px) oklch(from var(--surface-shadow-cast) l c h / calc(alpha * (0 + .1 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 2, 1) + -.1 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 6, 1)) * 10));--surface-shadow-pressed:0 calc((0 + 1 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 0, 1) + 3 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 3, 1) + 6 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 4, 1) + 10 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 5, 1) + 5 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 6, 1)) * 1px) calc((0 + 2 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 1, 1) + 1 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 2, 1) + 3 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 3, 1) + 9 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 4, 1) + 10 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 5, 1) + 25 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 6, 1)) * 1px) calc((0 + -1 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 3, 1) + -2 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 4, 1) + -2 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 5, 1) + -7 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 6, 1)) * 1px) oklch(from var(--surface-shadow-cast) l c h / calc(alpha * (0 + .05 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 0, 1) + .05 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 2, 1) + .15 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 6, 1)) * 10)), 0 calc((0 + 1 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 2, 1) + 1 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 3, 1) + 2 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 4, 1) + 4 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 5, 1) + -8 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 6, 1)) * 1px) calc((0 + 2 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 2, 1) + 2 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 3, 1) + 2 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 4, 1) + 4 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 5, 1) + -10 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 6, 1)) * 1px) calc((0 + -1 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 2, 1) + -1 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 3, 1) + -2 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 4, 1) + -2 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 5, 1) + 6 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 6, 1)) * 1px) oklch(from var(--surface-shadow-cast) l c h / calc(alpha * (0 + .1 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 2, 1) + -.1 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 6, 1)) * 10))}@container style(--surface-level:-3){.story{--surface-level:-2;--surface-shadow-weight:0}}@container style(--surface-level:-2){.story{--surface-level:-1;--surface-shadow-weight:0}}@container style(--surface-level:-1){.story{--surface-level:0;--surface-shadow-weight:0}}@container style(--surface-level:0){.story{--surface-level:1;--surface-shadow-weight:1}}@container style(--surface-level:1){.story{--surface-level:2;--surface-shadow-weight:2}}@container style(--surface-level:2){.story{--surface-level:3;--surface-shadow-weight:3}}@container style(--surface-level:3){.story{--surface-level:4;--surface-shadow-weight:4}}@container style(--surface-level:4){.story{--surface-level:5;--surface-shadow-weight:5}}@container style(--surface-level:5){.story{--surface-level:6;--surface-shadow-weight:6}}.story{--background:var(--background-default);--background-active:var(--background-default);--background-default:transparent;--background-hover:var(--background-default);--background-pressed:var(--background-default)}.--active.story{--background:var(--background-active)}.story:not(.--active):hover{--background:var(--background-hover)}.story:not(.--active):active{--background:var(--background-pressed)}.story{--box-shadow:var(--box-shadow-default);--box-shadow-active:var(--box-shadow-default);--box-shadow-default:none;--box-shadow-hover:var(--box-shadow-default);--box-shadow-pressed:var(--box-shadow-default)}.--active.story{--box-shadow:var(--box-shadow-active)}.story:not(.--active):hover{--box-shadow:var(--box-shadow-hover)}.story:not(.--active):active{--box-shadow:var(--box-shadow-pressed)}.story{--background-default:var(--surface-background-default);--bar-color:oklch(from var(--color-primary-500) l c h / .15);--bar-height:3px;--box-shadow-default:var(--surface-shadow-default);--color:var(--color-text-500);--dim-opacity:.6;--duration:4s;--fill-color:var(--color-primary-500);--focus-ring-color:var(--surface-border-pressed);--height:480px;--icon-swap-duration:var(--duration-moderate);--icon-swap-timing-function:var(--spring);--max-width:320px;--muted-color:var(--color-text-300);--radius:24px;--spring:linear(0, .0575, .1803, .3208, .4551, .5729, .6711, .7501, .8122, .8601, .8966, .924, .9445, .9596, .9708, .9789, .9848, .9891, .9922, .9944, .996, .9972, .998, .9986, 1);--toggle-color-hover:var(--color)}.story-slide.frame{--opacity:1}.story{background:var(--background);border-radius:var(--radius);box-shadow:var(--box-shadow);color:var(--color);height:var(--height);touch-action:pan-y;-webkit-user-select:none;user-select:none;width:min(var(--max-width), 100%);outline:none;flex-direction:column;display:flex;position:relative;overflow:hidden}.story--paused{--play-state:paused}.story-bar{background:var(--bar-color);height:var(--bar-height);border-radius:999px;flex:1;overflow:hidden}.story-bar--done{--scale:1}.story-bar.--active{--fill-animation:story-fill var(--duration) linear forwards var(--play-state,running)}.story-bars{gap:calc(var(--size-100) / 2);padding:12px 12px 0;display:flex}.story-count{color:var(--muted-color);font-size:var(--font-size-300);font-variant-numeric:tabular-nums}.story-fill{animation:var(--fill-animation,none);background:var(--fill-color);height:100%;transform:scaleX(var(--scale,0));transform-origin:0;border-radius:999px;display:block}.story-header{height:44px;padding:0 var(--size-400);justify-content:space-between;align-items:center;display:flex}.story-pause,.story-play{height:var(--size-400);width:var(--size-400);grid-area:1/1}.story-slide{min-height:0;overflow:hidden}.story-slide--dragging.frame{transition:none}.story-sr{margin:0}.story-toggle{--color-default:var(--muted-color);--color-hover:var(--toggle-color-hover);--color-pressed:var(--color-hover);color:var(--color);cursor:pointer;height:40px;margin-right:calc(var(--size-100) * -1);transition:color var(--duration-fast) var(--easing-spring);background:0 0;border:0;border-radius:999px;outline:none;place-items:center;width:40px;padding:0;display:grid}.story-toggle:focus-visible{outline:2px solid var(--focus-ring-color)}.story-track{min-height:0;transition:opacity var(--duration-fast) var(--easing-spring);z-index:1;flex:1;position:relative}.story-track--dimmed{opacity:var(--dim-opacity)}.story-zone{background:0 0;border:0;outline:none;flex:1;padding:0}.story-zone:last-child{flex:2}.story-zones{display:flex;position:absolute;inset:60px 0 0}.story:focus-visible{outline:2px solid var(--focus-ring-color);outline-offset:calc(var(--size-100) / 4)}@media (prefers-reduced-motion:reduce){.story-toggle{transition:color var(--duration-fast) var(--easing-spring)}}@keyframes story-fill{0%{transform:scaleX(0)}to{transform:scaleX(1)}}}
|
|
1
|
+
@layer components{.story-sr{clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}.story{--background:var(--background-default);--background-active:var(--background-default);--background-default:transparent;--background-hover:var(--background-default);--background-pressed:var(--background-default)}.--active.story{--background:var(--background-active)}.story:not(.--active):hover{--background:var(--background-hover)}.story:not(.--active):active{--background:var(--background-pressed)}.story{--box-shadow:var(--box-shadow-default);--box-shadow-active:var(--box-shadow-default);--box-shadow-default:none;--box-shadow-hover:var(--box-shadow-default);--box-shadow-pressed:var(--box-shadow-default)}.--active.story{--box-shadow:var(--box-shadow-active)}.story:not(.--active):hover{--box-shadow:var(--box-shadow-hover)}.story:not(.--active):active{--box-shadow:var(--box-shadow-pressed)}@keyframes text-gradient{to{background-position:var(--background-size) 0}}@keyframes text-line-shadow{0%{background-position:0 0}to{background-position:100% -100%}}@keyframes text-shiny{0%,90%,to{background-position:calc(-100% - var(--shine-width)) 0}30%,60%{background-position:calc(100% + var(--shine-width)) 0}}.story{--surface-background-active:light-dark(oklch(from var(--surface-background-default) calc(l + .02) c h),oklch(from var(--surface-background-default) calc(l + .03) c h));--surface-background-below:light-dark(oklch(from var(--color-surface) clamp(0, l + max(calc(var(--surface-level) - 1), 0) * .01 + min(calc(var(--surface-level) - 1), 0) * .016, 1) calc(c * (1 - clamp(0, l + max(calc(var(--surface-level) - 1), 0) * .01 + min(calc(var(--surface-level) - 1), 0) * .016, 1)) / max(1 - l, .01)) h),oklch(from var(--color-surface) clamp(0, l + calc(var(--surface-level) - 1) * .016, l + .096) calc(c * clamp(0, l + calc(var(--surface-level) - 1) * .016, l + .096) / max(l, .01)) h));--surface-background-default:light-dark(oklch(from var(--color-surface) clamp(0, l + max(var(--surface-level), 0) * .01 + min(var(--surface-level), 0) * .016, 1) calc(c * (1 - clamp(0, l + max(var(--surface-level), 0) * .01 + min(var(--surface-level), 0) * .016, 1)) / max(1 - l, .01)) h),oklch(from var(--color-surface) clamp(0, l + var(--surface-level) * .016, l + .096) calc(c * clamp(0, l + var(--surface-level) * .016, l + .096) / max(l, .01)) h));--surface-background-hover:light-dark(oklch(from var(--surface-background-default) calc(l + .01) c h),oklch(from var(--surface-background-default) calc(l + .02) c h));--surface-background-pressed:light-dark(oklch(from var(--surface-background-default) calc(l - .02) c h),oklch(from var(--surface-background-default) calc(l - .03) c h));--surface-border-active:light-dark(oklch(from var(--surface-background-active) max(0, l - .046) c h),oklch(from var(--surface-background-active) min(1, l + .024) c h));--surface-border-default:light-dark(oklch(from var(--surface-background-default) max(0, l - .046) c h),oklch(from var(--surface-background-default) min(1, l + .024) c h));--surface-border-hover:light-dark(oklch(from var(--surface-background-hover) max(0, l - .046) c h),oklch(from var(--surface-background-hover) min(1, l + .024) c h));--surface-border-pressed:light-dark(oklch(from var(--surface-background-pressed) max(0, l - .046) c h),oklch(from var(--surface-background-pressed) min(1, l + .024) c h));--surface-primary-active:light-dark(oklch(from var(--surface-primary-default) calc(l + .02) c h),oklch(from var(--surface-primary-default) calc(l + .03) c h));--surface-primary-default:light-dark(oklch(from var(--color-surface) clamp(0, l + max(calc(var(--surface-level) + -3.2), 0) * .01 + min(calc(var(--surface-level) + -3.2), 0) * .016, 1) calc(c * (1 - clamp(0, l + max(calc(var(--surface-level) + -3.2), 0) * .01 + min(calc(var(--surface-level) + -3.2), 0) * .016, 1)) / max(1 - l, .01)) h),oklch(from var(--color-surface) clamp(0, l + calc(var(--surface-level) + 1.6) * .016, l + .096) calc(c * clamp(0, l + calc(var(--surface-level) + 1.6) * .016, l + .096) / max(l, .01)) h));--surface-primary-hover:light-dark(oklch(from var(--surface-primary-default) calc(l + .01) c h),oklch(from var(--surface-primary-default) calc(l + .02) c h));--surface-primary-pressed:light-dark(oklch(from var(--surface-primary-default) calc(l - .02) c h),oklch(from var(--surface-primary-default) calc(l - .03) c h));--surface-shadow-active:var(--surface-shadow-hover);--surface-shadow-cast:light-dark(oklch(from var(--surface-background-below) calc(l * .2) calc(c * .2) h / .08),oklch(from var(--surface-background-below) calc(l * .2) calc(c * .2) h / .16));--surface-shadow-color:light-dark(oklch(from var(--surface-background-default) calc(l * .2) calc(c * .2) h / .08),oklch(from var(--surface-background-default) calc(l * .2) calc(c * .2) h / .16));--surface-shadow-default:0 20px 25px -5px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1)), 0 8px 10px -6px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1));--surface-shadow-hover:0 25px 50px -12px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 2.5)), 0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0));--surface-shadow-pressed:0 10px 15px -3px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1)), 0 4px 6px -4px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1))}@container style(--surface-level:-3){.story{--surface-level:-2;--surface-shadow-default:0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0)), 0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0));--surface-shadow-hover:0 1px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * .5)), 0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0));--surface-shadow-pressed:0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0)), 0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0))}}@container style(--surface-level:-2){.story{--surface-level:-1;--surface-shadow-default:0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0)), 0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0));--surface-shadow-hover:0 1px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * .5)), 0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0));--surface-shadow-pressed:0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0)), 0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0))}}@container style(--surface-level:-1){.story{--surface-level:0;--surface-shadow-default:0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0)), 0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0));--surface-shadow-hover:0 1px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * .5)), 0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0));--surface-shadow-pressed:0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0)), 0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0))}}@container style(--surface-level:0){.story{--surface-level:1;--surface-shadow-default:0 1px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * .5)), 0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0));--surface-shadow-hover:0 1px 2px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * .5)), 0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0));--surface-shadow-pressed:0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0)), 0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0))}}@container style(--surface-level:1){.story{--surface-level:2;--surface-shadow-default:0 1px 2px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * .5)), 0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0));--surface-shadow-hover:0 1px 3px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1)), 0 1px 2px -1px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1));--surface-shadow-pressed:0 1px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * .5)), 0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0))}}@container style(--surface-level:2){.story{--surface-level:3;--surface-shadow-default:0 1px 3px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1)), 0 1px 2px -1px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1));--surface-shadow-hover:0 4px 6px -1px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1)), 0 2px 4px -2px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1));--surface-shadow-pressed:0 1px 2px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * .5)), 0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0))}}@container style(--surface-level:3){.story{--surface-level:4;--surface-shadow-default:0 4px 6px -1px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1)), 0 2px 4px -2px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1));--surface-shadow-hover:0 10px 15px -3px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1)), 0 4px 6px -4px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1));--surface-shadow-pressed:0 1px 3px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1)), 0 1px 2px -1px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1))}}@container style(--surface-level:4){.story{--surface-level:5;--surface-shadow-default:0 10px 15px -3px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1)), 0 4px 6px -4px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1));--surface-shadow-hover:0 20px 25px -5px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1)), 0 8px 10px -6px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1));--surface-shadow-pressed:0 4px 6px -1px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1)), 0 2px 4px -2px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1))}}@container style(--surface-level:5){.story{--surface-level:6;--surface-shadow-default:0 20px 25px -5px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1)), 0 8px 10px -6px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1));--surface-shadow-hover:0 25px 50px -12px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 2.5)), 0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0));--surface-shadow-pressed:0 10px 15px -3px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1)), 0 4px 6px -4px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1))}}.story{--background-default:var(--surface-background-default);--box-shadow-default:var(--surface-shadow-default);--color:var(--color-text-500);--duration:4s;--focus-color:var(--surface-border-pressed);--focus-offset:calc(var(--size-100) / 4);--focus-width:2px;--height:480px;--max-width:320px;--radius:24px}.story--paused .story-fill{--play-state:paused}.story-bar{--background:oklch(from var(--color-primary-500) l c h / .15);--border-radius:999px;--height:3px}.story-bar--done .story-fill{--scale:1}.story-bar.--active .story-fill{--animation:story-fill var(--duration) linear forwards var(--play-state)}.story-bars{--gap-horizontal:calc(var(--size-100) / 2);--gap-vertical:0px;--padding-horizontal:12px;--padding-top:12px}.story-fill{--animation:none;--background:var(--color-primary-500);--border-radius:999px;--play-state:running;--scale:0}.story-slide.frame{--opacity:1}.story-track{--opacity:1;--transition-duration:.2s;--transition-timing-function:ease-out}.story-track--dimmed{--opacity:.6}.story{background:var(--background);border-radius:var(--radius);box-shadow:var(--box-shadow);color:var(--color);height:var(--height);touch-action:pan-y;-webkit-user-select:none;user-select:none;width:min(var(--max-width), 100%);outline:none;position:relative;overflow:hidden}.story-bar{background:var(--background);border-radius:var(--border-radius);height:var(--height);flex:1;overflow:hidden}.story-bars{gap:var(--gap-vertical) var(--gap-horizontal);padding:var(--padding-top) var(--padding-horizontal) 0;pointer-events:none;z-index:2;display:flex;position:absolute;top:0;left:0;right:0}.story-fill{animation:var(--animation);background:var(--background);border-radius:var(--border-radius);height:100%;transform:scaleX(var(--scale));transform-origin:0;display:block}.story-slide{min-height:0;overflow:hidden}.story-slide--dragging.frame{transition:none}.story-sr{margin:0}.story-track{opacity:var(--opacity);transition:opacity var(--transition-duration) var(--transition-timing-function);z-index:1;position:absolute;inset:0}.story-zone{background:0 0;border:0;outline:none;flex:1;padding:0}.story-zone:last-child{flex:2}.story-zones{display:flex;position:absolute;inset:0}.story:focus-visible{outline:var(--focus-width) solid var(--focus-color);outline-offset:var(--focus-offset)}@keyframes story-fill{0%{transform:scaleX(0)}to{transform:scaleX(1)}}}
|
|
2
2
|
/*$vite$:1*/
|
|
@@ -125,7 +125,7 @@ export default component(function (attributes, content) {
|
|
|
125
125
|
rest[key] = attributes[key];
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
|
-
let bounds = null, canvas, elements = null, field = null, generation = signal(0), host, last = { accent: '', camera: null, color: '', shapes: [], size: '' }, listening, measuring = 0, relink = true, resizer, running = 0, settle = 0, shown = true, styles = new WeakMap();
|
|
128
|
+
let bounds = null, canvas, elements = null, field = null, generation = signal(0), host, last = { accent: '', camera: null, color: '', shapes: [], size: '' }, listening, measuring = 0, pressed = new Set(), relink = true, resizer, running = 0, settle = 0, shown = true, styles = new WeakMap();
|
|
129
129
|
function box() {
|
|
130
130
|
return bounds ??= host.getBoundingClientRect();
|
|
131
131
|
}
|
|
@@ -448,6 +448,7 @@ export default component(function (attributes, content) {
|
|
|
448
448
|
template_u1.ondisconnect(element_1a5zh7n2, () => {
|
|
449
449
|
listening?.abort();
|
|
450
450
|
listening = undefined;
|
|
451
|
+
pressed.clear();
|
|
451
452
|
cancelAnimationFrame(measuring);
|
|
452
453
|
measuring = 0;
|
|
453
454
|
field?.dispose();
|
|
@@ -464,22 +465,8 @@ export default component(function (attributes, content) {
|
|
|
464
465
|
if (event.button !== 0 || event.target.closest?.(SELECTOR)) {
|
|
465
466
|
return;
|
|
466
467
|
}
|
|
467
|
-
let finish = (e) => {
|
|
468
|
-
if (e.pointerId !== id) {
|
|
469
|
-
return;
|
|
470
|
-
}
|
|
471
|
-
if (e.type === 'pointercancel') {
|
|
472
|
-
field?.cancel(id);
|
|
473
|
-
}
|
|
474
|
-
else {
|
|
475
|
-
field?.release(id);
|
|
476
|
-
}
|
|
477
|
-
window.removeEventListener('pointercancel', finish);
|
|
478
|
-
window.removeEventListener('pointerup', finish);
|
|
479
|
-
};
|
|
480
468
|
field.press(id, x, y);
|
|
481
|
-
|
|
482
|
-
window.addEventListener('pointerup', finish, { signal: listening?.signal });
|
|
469
|
+
pressed.add(id);
|
|
483
470
|
});
|
|
484
471
|
template_u1.on(element_1a5zh7n2, 'pointerleave', (event) => {
|
|
485
472
|
field?.pointer(event.pointerId, 0, 0, false);
|
|
@@ -491,6 +478,16 @@ export default component(function (attributes, content) {
|
|
|
491
478
|
let b = box();
|
|
492
479
|
field.pointer(event.pointerId, event.clientX - b.left, event.clientY - b.top, true);
|
|
493
480
|
});
|
|
481
|
+
template_u1.onwindow(element_1a5zh7n2, 'pointercancel', (event) => {
|
|
482
|
+
if (pressed.delete(event.pointerId)) {
|
|
483
|
+
field?.cancel(event.pointerId);
|
|
484
|
+
}
|
|
485
|
+
});
|
|
486
|
+
template_u1.onwindow(element_1a5zh7n2, 'pointerup', (event) => {
|
|
487
|
+
if (pressed.delete(event.pointerId)) {
|
|
488
|
+
field?.release(event.pointerId);
|
|
489
|
+
}
|
|
490
|
+
});
|
|
494
491
|
template_u1.onwindow(element_1a5zh7n2, 'resize', viewport);
|
|
495
492
|
return root_1a5zh7n0;
|
|
496
493
|
})();
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@layer components{.surface-field-canvas,.surface-field-surface-lift{position:absolute;inset:0}.surface-field-surface-lift{border-radius:inherit;pointer-events:none}.surface-field-surface{--surface-shadow-weight:6;--surface-background-active:light-dark(oklch(from var(--surface-background-default) calc(l + .01) c h),oklch(from var(--surface-background-default) calc(l + .02) c h));--surface-background-default:light-dark(oklch(from var(--color-surface) clamp(0, l + max(var(--surface-level), 0) * .01 + min(var(--surface-level), 0) * .01, 1) calc(c * (1 - clamp(0, l + max(var(--surface-level), 0) * .01 + min(var(--surface-level), 0) * .01, 1)) / max(1 - l, .01)) h),oklch(from var(--color-surface) clamp(0, l + max(var(--surface-level), 0) * .02 + min(var(--surface-level), 0) * .02, l + .12) calc(c * clamp(0, l + max(var(--surface-level), 0) * .02 + min(var(--surface-level), 0) * .02, l + .12) / max(l, .01)) h));--surface-background-hover:light-dark(oklch(from var(--surface-background-default) calc(l + .005) c h),oklch(from var(--surface-background-default) calc(l + .01) c h));--surface-background-pressed:light-dark(oklch(from var(--surface-background-default) calc(l - .02) c h),oklch(from var(--surface-background-default) calc(l - .04) c h));--surface-border-active:light-dark(oklch(from var(--surface-background-active) max(0, l - .04) c h),oklch(from var(--surface-background-active) min(1, l + .06) c h));--surface-border-default:light-dark(oklch(from var(--surface-background-default) max(0, l - .04) c h),oklch(from var(--surface-background-default) min(1, l + .06) c h));--surface-border-hover:light-dark(oklch(from var(--surface-background-hover) max(0, l - .04) c h),oklch(from var(--surface-background-hover) min(1, l + .06) c h));--surface-border-pressed:light-dark(oklch(from var(--surface-background-pressed) max(0, l - .04) c h),oklch(from var(--surface-background-pressed) min(1, l + .06) c h));--surface-shadow-active:var(--surface-shadow-hover);--surface-shadow-color:light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .16));--surface-shadow-cast:light-dark(oklch(from light-dark(oklch(from var(--color-surface) clamp(0, l + max(calc(var(--surface-level) - 1), 0) * .01 + min(calc(var(--surface-level) - 1), 0) * .01, 1) calc(c * (1 - clamp(0, l + max(calc(var(--surface-level) - 1), 0) * .01 + min(calc(var(--surface-level) - 1), 0) * .01, 1)) / max(1 - l, .01)) h),oklch(from var(--color-surface) clamp(0, l + max(calc(var(--surface-level) - 1), 0) * .02 + min(calc(var(--surface-level) - 1), 0) * .02, l + .12) calc(c * clamp(0, l + max(calc(var(--surface-level) - 1), 0) * .02 + min(calc(var(--surface-level) - 1), 0) * .02, l + .12) / max(l, .01)) h)) calc(l * .24) calc(c * .24) h / .08),oklch(from light-dark(oklch(from var(--color-surface) clamp(0, l + max(calc(var(--surface-level) - 1), 0) * .01 + min(calc(var(--surface-level) - 1), 0) * .01, 1) calc(c * (1 - clamp(0, l + max(calc(var(--surface-level) - 1), 0) * .01 + min(calc(var(--surface-level) - 1), 0) * .01, 1)) / max(1 - l, .01)) h),oklch(from var(--color-surface) clamp(0, l + max(calc(var(--surface-level) - 1), 0) * .02 + min(calc(var(--surface-level) - 1), 0) * .02, l + .12) calc(c * clamp(0, l + max(calc(var(--surface-level) - 1), 0) * .02 + min(calc(var(--surface-level) - 1), 0) * .02, l + .12) / max(l, .01)) h)) calc(l * .24) calc(c * .24) h / .16));--surface-shadow-default:0 calc((0 + 1 * clamp(0, var(--surface-shadow-weight) - 0, 1) + 3 * clamp(0, var(--surface-shadow-weight) - 3, 1) + 6 * clamp(0, var(--surface-shadow-weight) - 4, 1) + 10 * clamp(0, var(--surface-shadow-weight) - 5, 1) + 5 * clamp(0, var(--surface-shadow-weight) - 6, 1)) * 1px) calc((0 + 2 * clamp(0, var(--surface-shadow-weight) - 1, 1) + 1 * clamp(0, var(--surface-shadow-weight) - 2, 1) + 3 * clamp(0, var(--surface-shadow-weight) - 3, 1) + 9 * clamp(0, var(--surface-shadow-weight) - 4, 1) + 10 * clamp(0, var(--surface-shadow-weight) - 5, 1) + 25 * clamp(0, var(--surface-shadow-weight) - 6, 1)) * 1px) calc((0 + -1 * clamp(0, var(--surface-shadow-weight) - 3, 1) + -2 * clamp(0, var(--surface-shadow-weight) - 4, 1) + -2 * clamp(0, var(--surface-shadow-weight) - 5, 1) + -7 * clamp(0, var(--surface-shadow-weight) - 6, 1)) * 1px) oklch(from var(--surface-shadow-cast) l c h / calc(alpha * (0 + .05 * clamp(0, var(--surface-shadow-weight) - 0, 1) + .05 * clamp(0, var(--surface-shadow-weight) - 2, 1) + .15 * clamp(0, var(--surface-shadow-weight) - 6, 1)) * 10)), 0 calc((0 + 1 * clamp(0, var(--surface-shadow-weight) - 2, 1) + 1 * clamp(0, var(--surface-shadow-weight) - 3, 1) + 2 * clamp(0, var(--surface-shadow-weight) - 4, 1) + 4 * clamp(0, var(--surface-shadow-weight) - 5, 1) + -8 * clamp(0, var(--surface-shadow-weight) - 6, 1)) * 1px) calc((0 + 2 * clamp(0, var(--surface-shadow-weight) - 2, 1) + 2 * clamp(0, var(--surface-shadow-weight) - 3, 1) + 2 * clamp(0, var(--surface-shadow-weight) - 4, 1) + 4 * clamp(0, var(--surface-shadow-weight) - 5, 1) + -10 * clamp(0, var(--surface-shadow-weight) - 6, 1)) * 1px) calc((0 + -1 * clamp(0, var(--surface-shadow-weight) - 2, 1) + -1 * clamp(0, var(--surface-shadow-weight) - 3, 1) + -2 * clamp(0, var(--surface-shadow-weight) - 4, 1) + -2 * clamp(0, var(--surface-shadow-weight) - 5, 1) + 6 * clamp(0, var(--surface-shadow-weight) - 6, 1)) * 1px) oklch(from var(--surface-shadow-cast) l c h / calc(alpha * (0 + .1 * clamp(0, var(--surface-shadow-weight) - 2, 1) + -.1 * clamp(0, var(--surface-shadow-weight) - 6, 1)) * 10));--surface-shadow-hover:0 calc((0 + 1 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 0, 1) + 3 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 3, 1) + 6 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 4, 1) + 10 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 5, 1) + 5 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 6, 1)) * 1px) calc((0 + 2 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 1, 1) + 1 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 2, 1) + 3 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 3, 1) + 9 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 4, 1) + 10 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 5, 1) + 25 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 6, 1)) * 1px) calc((0 + -1 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 3, 1) + -2 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 4, 1) + -2 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 5, 1) + -7 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 6, 1)) * 1px) oklch(from var(--surface-shadow-cast) l c h / calc(alpha * (0 + .05 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 0, 1) + .05 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 2, 1) + .15 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 6, 1)) * 10)), 0 calc((0 + 1 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 2, 1) + 1 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 3, 1) + 2 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 4, 1) + 4 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 5, 1) + -8 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 6, 1)) * 1px) calc((0 + 2 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 2, 1) + 2 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 3, 1) + 2 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 4, 1) + 4 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 5, 1) + -10 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 6, 1)) * 1px) calc((0 + -1 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 2, 1) + -1 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 3, 1) + -2 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 4, 1) + -2 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 5, 1) + 6 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 6, 1)) * 1px) oklch(from var(--surface-shadow-cast) l c h / calc(alpha * (0 + .1 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 2, 1) + -.1 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 6, 1)) * 10));--surface-shadow-pressed:0 calc((0 + 1 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 0, 1) + 3 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 3, 1) + 6 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 4, 1) + 10 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 5, 1) + 5 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 6, 1)) * 1px) calc((0 + 2 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 1, 1) + 1 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 2, 1) + 3 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 3, 1) + 9 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 4, 1) + 10 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 5, 1) + 25 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 6, 1)) * 1px) calc((0 + -1 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 3, 1) + -2 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 4, 1) + -2 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 5, 1) + -7 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 6, 1)) * 1px) oklch(from var(--surface-shadow-cast) l c h / calc(alpha * (0 + .05 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 0, 1) + .05 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 2, 1) + .15 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 6, 1)) * 10)), 0 calc((0 + 1 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 2, 1) + 1 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 3, 1) + 2 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 4, 1) + 4 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 5, 1) + -8 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 6, 1)) * 1px) calc((0 + 2 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 2, 1) + 2 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 3, 1) + 2 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 4, 1) + 4 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 5, 1) + -10 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 6, 1)) * 1px) calc((0 + -1 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 2, 1) + -1 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 3, 1) + -2 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 4, 1) + -2 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 5, 1) + 6 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 6, 1)) * 1px) oklch(from var(--surface-shadow-cast) l c h / calc(alpha * (0 + .1 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 2, 1) + -.1 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 6, 1)) * 10))}@container style(--surface-level:-3){.surface-field-surface{--surface-level:-2;--surface-shadow-weight:0}}@container style(--surface-level:-2){.surface-field-surface{--surface-level:-1;--surface-shadow-weight:0}}@container style(--surface-level:-1){.surface-field-surface{--surface-level:0;--surface-shadow-weight:0}}@container style(--surface-level:0){.surface-field-surface{--surface-level:1;--surface-shadow-weight:1}}@container style(--surface-level:1){.surface-field-surface{--surface-level:2;--surface-shadow-weight:2}}@container style(--surface-level:2){.surface-field-surface{--surface-level:3;--surface-shadow-weight:3}}@container style(--surface-level:3){.surface-field-surface{--surface-level:4;--surface-shadow-weight:4}}@container style(--surface-level:4){.surface-field-surface{--surface-level:5;--surface-shadow-weight:5}}@container style(--surface-level:5){.surface-field-surface{--surface-level:6;--surface-shadow-weight:6}}.surface-field-surface-title{text-overflow:ellipsis;white-space:nowrap;max-width:100%;overflow:hidden}@keyframes text-gradient{to{background-position:var(--background-size) 0}}@keyframes text-line-shadow{0%{background-position:0 0}to{background-position:100% -100%}}@keyframes text-shiny{0%,90%,to{background-position:calc(-100% - var(--shine-width)) 0}30%,60%{background-position:calc(100% + var(--shine-width)) 0}}.surface-field{--accent:#6683e8;--color:var(--color-text-500);--still:0;--surface-body-color:var(--color-text-300);--surface-body-font-size:calc(var(--font-size-400) * .8125);--surface-border-color:var(--surface-border-default);--surface-border-radius:14px;--surface-box-shadow:0 1px 2px oklch(from var(--surface-shadow-color) l c h / calc(alpha * .6)), 0 8px 24px -8px oklch(from var(--surface-shadow-color) l c h / calc(alpha * 1.55));--surface-box-shadow-active:0 2px 4px oklch(from var(--surface-shadow-color) l c h / calc(alpha * .8)), 0 20px 40px -12px oklch(from var(--surface-shadow-color) l c h / calc(alpha * 2.7));--surface-grip-color:var(--color-primary-300);--surface-grip-width:32px;--surface-handle-height:28px;--surface-header-cursor:grab;--surface-lift-duration:var(--duration-moderate);--surface-lift-opacity:0;--surface-title-color:var(--color-text-500)}@media (prefers-reduced-motion:reduce){.surface-field{--still:1}}.surface-field-surface.--active{--surface-header-cursor:grabbing;--surface-lift-opacity:1}@property --still{syntax:"<number>";inherits:true;initial-value:0}.surface-field{isolation:isolate;position:relative}.surface-field-canvas{accent-color:var(--accent);color:var(--color);pointer-events:none;z-index:0;width:100%;height:100%;transition:--still 1ms}.surface-field-content{z-index:1;height:100%;position:relative}.surface-field-surface{background:var(--surface-background-default);border-radius:var(--surface-border-radius);box-shadow:0 0 0 1px var(--surface-border-color), var(--surface-box-shadow);transition:scale var(--surface-lift-duration) ease;flex-direction:column;display:flex;position:absolute;top:0;left:0}.surface-field-surface.--active{scale:1.01}.surface-field-surface-body{color:var(--surface-body-color);font-size:var(--surface-body-font-size);overflow-wrap:break-word;margin:0;line-height:1.5}.surface-field-surface-content{gap:var(--size-100);min-height:0;padding:0 var(--size-400) var(--size-400);flex-direction:column;flex:1;display:flex;overflow:hidden}.surface-field-surface-handle{border-radius:0 var(--surface-border-radius) 0 0;cursor:inherit;width:var(--surface-grip-width);flex-shrink:0;align-self:stretch;position:relative}.surface-field-surface-handle:before{content:"";opacity:.7;background:currentColor;border-radius:999px;width:18px;height:2px;position:absolute;top:50%;left:50%;translate:-50% -50%}.surface-field-surface-handle:only-child{border-radius:var(--surface-border-radius) var(--surface-border-radius) 0 0;flex:1;margin-inline-start:calc(var(--size-400) * -1)}.surface-field-surface-handle,.surface-field-surface-resize{color:var(--surface-grip-color);touch-action:none;background:0 0;border:0;padding:0}.surface-field-surface-handle:focus-visible,.surface-field-surface-resize:focus-visible{outline:2px solid oklch(from var(--color) l c h/.4);outline-offset:calc(var(--size-100) / -4)}.surface-field-surface-header{cursor:var(--surface-header-cursor);align-items:center;gap:calc(var(--size-100) / 2);min-height:var(--surface-handle-height);touch-action:none;flex-shrink:0;padding-inline-start:var(--size-400);display:flex}.surface-field-surface-lift{box-shadow:var(--surface-box-shadow-active);opacity:var(--surface-lift-opacity);transition:opacity var(--surface-lift-duration) ease}.surface-field-surface-resize{border-radius:0 0 var(--surface-border-radius) 0;cursor:nwse-resize;opacity:.7;background:linear-gradient(135deg,#0000 45%,currentColor 45% 52%,#0000 52%) 4px 4px/12px 12px no-repeat,linear-gradient(135deg,#0000 70%,currentColor 70% 77%,#0000 77%) 4px 4px/12px 12px no-repeat;width:22px;height:22px;position:absolute;bottom:0;right:0}.surface-field-surface-title{color:var(--surface-title-color);font-weight:var(--font-weight-600);flex:0 auto;min-width:0}.surface-field-surface-title+.surface-field-surface-handle{margin-inline-start:auto}@media (prefers-reduced-motion:reduce){.surface-field-surface{transition:none}.surface-field-surface.--active{scale:1}}}
|
|
1
|
+
@layer components{.surface-field-canvas,.surface-field-surface-lift{position:absolute;inset:0}.surface-field-surface-lift{border-radius:inherit;pointer-events:none}.surface-field-surface-title{text-overflow:ellipsis;white-space:nowrap;max-width:100%;overflow:hidden}@keyframes text-gradient{to{background-position:var(--background-size) 0}}@keyframes text-line-shadow{0%{background-position:0 0}to{background-position:100% -100%}}@keyframes text-shiny{0%,90%,to{background-position:calc(-100% - var(--shine-width)) 0}30%,60%{background-position:calc(100% + var(--shine-width)) 0}}.surface-field-surface{--surface-background-active:light-dark(oklch(from var(--surface-background-default) calc(l + .02) c h),oklch(from var(--surface-background-default) calc(l + .03) c h));--surface-background-below:light-dark(oklch(from var(--color-surface) clamp(0, l + max(calc(var(--surface-level) - 1), 0) * .01 + min(calc(var(--surface-level) - 1), 0) * .016, 1) calc(c * (1 - clamp(0, l + max(calc(var(--surface-level) - 1), 0) * .01 + min(calc(var(--surface-level) - 1), 0) * .016, 1)) / max(1 - l, .01)) h),oklch(from var(--color-surface) clamp(0, l + calc(var(--surface-level) - 1) * .016, l + .096) calc(c * clamp(0, l + calc(var(--surface-level) - 1) * .016, l + .096) / max(l, .01)) h));--surface-background-default:light-dark(oklch(from var(--color-surface) clamp(0, l + max(var(--surface-level), 0) * .01 + min(var(--surface-level), 0) * .016, 1) calc(c * (1 - clamp(0, l + max(var(--surface-level), 0) * .01 + min(var(--surface-level), 0) * .016, 1)) / max(1 - l, .01)) h),oklch(from var(--color-surface) clamp(0, l + var(--surface-level) * .016, l + .096) calc(c * clamp(0, l + var(--surface-level) * .016, l + .096) / max(l, .01)) h));--surface-background-hover:light-dark(oklch(from var(--surface-background-default) calc(l + .01) c h),oklch(from var(--surface-background-default) calc(l + .02) c h));--surface-background-pressed:light-dark(oklch(from var(--surface-background-default) calc(l - .02) c h),oklch(from var(--surface-background-default) calc(l - .03) c h));--surface-border-active:light-dark(oklch(from var(--surface-background-active) max(0, l - .046) c h),oklch(from var(--surface-background-active) min(1, l + .024) c h));--surface-border-default:light-dark(oklch(from var(--surface-background-default) max(0, l - .046) c h),oklch(from var(--surface-background-default) min(1, l + .024) c h));--surface-border-hover:light-dark(oklch(from var(--surface-background-hover) max(0, l - .046) c h),oklch(from var(--surface-background-hover) min(1, l + .024) c h));--surface-border-pressed:light-dark(oklch(from var(--surface-background-pressed) max(0, l - .046) c h),oklch(from var(--surface-background-pressed) min(1, l + .024) c h));--surface-primary-active:light-dark(oklch(from var(--surface-primary-default) calc(l + .02) c h),oklch(from var(--surface-primary-default) calc(l + .03) c h));--surface-primary-default:light-dark(oklch(from var(--color-surface) clamp(0, l + max(calc(var(--surface-level) + -3.2), 0) * .01 + min(calc(var(--surface-level) + -3.2), 0) * .016, 1) calc(c * (1 - clamp(0, l + max(calc(var(--surface-level) + -3.2), 0) * .01 + min(calc(var(--surface-level) + -3.2), 0) * .016, 1)) / max(1 - l, .01)) h),oklch(from var(--color-surface) clamp(0, l + calc(var(--surface-level) + 1.6) * .016, l + .096) calc(c * clamp(0, l + calc(var(--surface-level) + 1.6) * .016, l + .096) / max(l, .01)) h));--surface-primary-hover:light-dark(oklch(from var(--surface-primary-default) calc(l + .01) c h),oklch(from var(--surface-primary-default) calc(l + .02) c h));--surface-primary-pressed:light-dark(oklch(from var(--surface-primary-default) calc(l - .02) c h),oklch(from var(--surface-primary-default) calc(l - .03) c h));--surface-shadow-active:var(--surface-shadow-hover);--surface-shadow-cast:light-dark(oklch(from var(--surface-background-below) calc(l * .2) calc(c * .2) h / .08),oklch(from var(--surface-background-below) calc(l * .2) calc(c * .2) h / .16));--surface-shadow-color:light-dark(oklch(from var(--surface-background-default) calc(l * .2) calc(c * .2) h / .08),oklch(from var(--surface-background-default) calc(l * .2) calc(c * .2) h / .16));--surface-shadow-default:0 20px 25px -5px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1)), 0 8px 10px -6px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1));--surface-shadow-hover:0 25px 50px -12px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 2.5)), 0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0));--surface-shadow-pressed:0 10px 15px -3px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1)), 0 4px 6px -4px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1))}@container style(--surface-level:-3){.surface-field-surface{--surface-level:-2;--surface-shadow-default:0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0)), 0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0));--surface-shadow-hover:0 1px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * .5)), 0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0));--surface-shadow-pressed:0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0)), 0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0))}}@container style(--surface-level:-2){.surface-field-surface{--surface-level:-1;--surface-shadow-default:0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0)), 0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0));--surface-shadow-hover:0 1px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * .5)), 0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0));--surface-shadow-pressed:0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0)), 0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0))}}@container style(--surface-level:-1){.surface-field-surface{--surface-level:0;--surface-shadow-default:0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0)), 0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0));--surface-shadow-hover:0 1px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * .5)), 0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0));--surface-shadow-pressed:0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0)), 0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0))}}@container style(--surface-level:0){.surface-field-surface{--surface-level:1;--surface-shadow-default:0 1px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * .5)), 0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0));--surface-shadow-hover:0 1px 2px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * .5)), 0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0));--surface-shadow-pressed:0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0)), 0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0))}}@container style(--surface-level:1){.surface-field-surface{--surface-level:2;--surface-shadow-default:0 1px 2px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * .5)), 0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0));--surface-shadow-hover:0 1px 3px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1)), 0 1px 2px -1px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1));--surface-shadow-pressed:0 1px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * .5)), 0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0))}}@container style(--surface-level:2){.surface-field-surface{--surface-level:3;--surface-shadow-default:0 1px 3px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1)), 0 1px 2px -1px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1));--surface-shadow-hover:0 4px 6px -1px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1)), 0 2px 4px -2px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1));--surface-shadow-pressed:0 1px 2px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * .5)), 0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0))}}@container style(--surface-level:3){.surface-field-surface{--surface-level:4;--surface-shadow-default:0 4px 6px -1px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1)), 0 2px 4px -2px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1));--surface-shadow-hover:0 10px 15px -3px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1)), 0 4px 6px -4px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1));--surface-shadow-pressed:0 1px 3px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1)), 0 1px 2px -1px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1))}}@container style(--surface-level:4){.surface-field-surface{--surface-level:5;--surface-shadow-default:0 10px 15px -3px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1)), 0 4px 6px -4px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1));--surface-shadow-hover:0 20px 25px -5px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1)), 0 8px 10px -6px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1));--surface-shadow-pressed:0 4px 6px -1px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1)), 0 2px 4px -2px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1))}}@container style(--surface-level:5){.surface-field-surface{--surface-level:6;--surface-shadow-default:0 20px 25px -5px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1)), 0 8px 10px -6px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1));--surface-shadow-hover:0 25px 50px -12px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 2.5)), 0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0));--surface-shadow-pressed:0 10px 15px -3px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1)), 0 4px 6px -4px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 1))}}.surface-field-canvas{--accent:#6683e8;--color:var(--color-text-500);--still:0}@media (prefers-reduced-motion:reduce){.surface-field-canvas{--still:1}}.surface-field-surface{--border-color:var(--surface-border-default);--border-width:1px;--box-shadow:0 1px 2px oklch(from var(--surface-shadow-color) l c h / calc(alpha * .6)), 0 8px 24px -8px oklch(from var(--surface-shadow-color) l c h / calc(alpha * 1.55));--radius:14px;--scale:1;--transition-duration:.2s;--transition-timing-function:ease}.surface-field-surface.--active{--scale:1.01}.surface-field-surface.--active .surface-field-surface-header{--cursor:grabbing}.surface-field-surface.--active .surface-field-surface-lift{--opacity:1}@media (prefers-reduced-motion:reduce){.surface-field-surface{--transition-duration:0s}.surface-field-surface.--active{--scale:1}}.surface-field-surface-body{--color:var(--color-text-300);--font-size:calc(var(--font-size-400) * .8125);--line-height:1.5}.surface-field-surface-content{--gap-horizontal:0px;--gap-vertical:var(--size-100);--padding-bottom:var(--size-400);--padding-horizontal:var(--size-400)}.surface-field-surface-handle{--width:32px}.surface-field-surface-handle:before{--height:2px;--opacity:.7;--width:18px}.surface-field-surface-handle,.surface-field-surface-resize{--color:var(--color-primary-300);--focus-color:oklch(from var(--color-text-500) l c h / .4);--focus-offset:calc(var(--size-100) / -4);--focus-width:2px}.surface-field-surface-header{--cursor:grab;--gap-horizontal:calc(var(--size-100) / 2);--gap-vertical:0px;--height:28px;--padding-start:var(--size-400)}.surface-field-surface-lift{--box-shadow:0 2px 4px oklch(from var(--surface-shadow-color) l c h / calc(alpha * .8)), 0 20px 40px -12px oklch(from var(--surface-shadow-color) l c h / calc(alpha * 2.7));--opacity:0}.surface-field-surface-resize{--opacity:.7;--size:22px}.surface-field-surface-title{--color:var(--color-text-500)}@property --still{syntax:"<number>";inherits:true;initial-value:0}.surface-field{isolation:isolate;position:relative}.surface-field-canvas{accent-color:var(--accent);color:var(--color);pointer-events:none;z-index:0;width:100%;height:100%;transition:--still 1ms}.surface-field-content{z-index:1;height:100%;position:relative}.surface-field-surface{background:var(--surface-background-default);border-radius:var(--radius);box-shadow:0 0 0 var(--border-width) var(--border-color), var(--box-shadow);scale:var(--scale);transition:scale var(--transition-duration) var(--transition-timing-function);flex-direction:column;display:flex;position:absolute;top:0;left:0}.surface-field-surface-body{color:var(--color);font-size:var(--font-size);line-height:var(--line-height);overflow-wrap:break-word;margin:0}.surface-field-surface-content{gap:var(--gap-vertical) var(--gap-horizontal);min-height:0;padding:0 var(--padding-horizontal) var(--padding-bottom);flex-direction:column;flex:1;display:flex;overflow:hidden}.surface-field-surface-handle{border-radius:0 var(--radius) 0 0;cursor:inherit;width:var(--width);flex-shrink:0;align-self:stretch;position:relative}.surface-field-surface-handle:before{content:"";height:var(--height);opacity:var(--opacity);width:var(--width);background:currentColor;border-radius:999px;position:absolute;top:50%;left:50%;translate:-50% -50%}.surface-field-surface-handle:only-child{border-radius:var(--radius) var(--radius) 0 0;flex:1;margin-inline-start:calc(var(--size-400) * -1)}.surface-field-surface-handle,.surface-field-surface-resize{color:var(--color);touch-action:none;background:0 0;border:0;padding:0}.surface-field-surface-handle:focus-visible,.surface-field-surface-resize:focus-visible{outline:var(--focus-width) solid var(--focus-color);outline-offset:var(--focus-offset)}.surface-field-surface-header{cursor:var(--cursor);align-items:center;gap:var(--gap-vertical) var(--gap-horizontal);min-height:var(--height);touch-action:none;flex-shrink:0;padding-inline-start:var(--padding-start);display:flex}.surface-field-surface-lift{box-shadow:var(--box-shadow);opacity:var(--opacity);transition:opacity var(--transition-duration) var(--transition-timing-function)}.surface-field-surface-resize{border-radius:0 0 var(--radius) 0;cursor:nwse-resize;height:var(--size);opacity:var(--opacity);width:var(--size);background:linear-gradient(135deg,#0000 45%,currentColor 45% 52%,#0000 52%) 4px 4px/12px 12px no-repeat,linear-gradient(135deg,#0000 70%,currentColor 70% 77%,#0000 77%) 4px 4px/12px 12px no-repeat;position:absolute;bottom:0;right:0}.surface-field-surface-title{color:var(--color);font-weight:var(--font-weight-600);flex:0 auto;min-width:0}.surface-field-surface-title+.surface-field-surface-handle{margin-inline-start:auto}}
|
|
2
2
|
/*$vite$:1*/
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import options from '../checkbox/options.js';
|
|
2
|
-
|
|
3
|
-
export default
|
|
2
|
+
import '../checkbox/scss/index.scss';
|
|
3
|
+
export default options.switch;
|
|
@@ -80,10 +80,11 @@ export default component(function ({ ordered = false, reorder = true, sortable:
|
|
|
80
80
|
if (!list || before === (rows[at + 1] ?? null)) {
|
|
81
81
|
return;
|
|
82
82
|
}
|
|
83
|
-
let items = list.children, rest = rows.filter((r) => r !== entry), shift = timing(getComputedStyle(items[at]), 'move');
|
|
83
|
+
let active = list.ownerDocument.activeElement, focused = active instanceof HTMLElement && list.contains(active) ? active : null, items = list.children, rest = rows.filter((r) => r !== entry), shift = timing(getComputedStyle(items[at]), 'move');
|
|
84
84
|
rest.splice(before ? rest.indexOf(before) : rest.length, 0, entry);
|
|
85
85
|
let rank = new Map(rest.map((r, i) => [r, i]));
|
|
86
86
|
measure(items);
|
|
87
|
+
focused?.blur();
|
|
87
88
|
rows.sort((a, b) => rank.get(a) - rank.get(b));
|
|
88
89
|
if (view) {
|
|
89
90
|
view.flush();
|
|
@@ -91,6 +92,7 @@ export default component(function ({ ordered = false, reorder = true, sortable:
|
|
|
91
92
|
else {
|
|
92
93
|
slot.flush();
|
|
93
94
|
}
|
|
95
|
+
focused?.focus({ preventScroll: true });
|
|
94
96
|
slides(items, shift);
|
|
95
97
|
entry.state.moving = true;
|
|
96
98
|
let element = items[rows.indexOf(entry)];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@layer components{.tasklist{margin:0;padding:0;list-style:none}.tasklist-item{--background:var(--background-default);--background-active:var(--background-default);--background-default:transparent;--background-hover:var(--background-default);--background-pressed:var(--background-default)}.--active.tasklist-item{--background:var(--background-active)}.tasklist-item:not(.--active):hover{--background:var(--background-hover)}.tasklist-item:not(.--active):active{--background:var(--background-pressed)}@font-face{font-display:swap;font-family:Geist;font-style:normal;font-weight:100 900;src:url(../../../css-utilities/font/geist/Geist-Variable.woff2)format("woff2")}@font-face{font-display:swap;font-family:Geist;font-style:italic;font-weight:100 900;src:url(../../../css-utilities/font/geist/Geist-Italic-Variable.woff2)format("woff2")}@font-face{font-display:swap;font-family:Geist Mono;font-style:normal;font-weight:100 900;src:url(../../../css-utilities/font/geist/GeistMono-Variable.woff2)format("woff2")}@font-face{font-display:swap;font-family:Geist Mono;font-style:italic;font-weight:100 900;src:url(../../../css-utilities/font/geist/GeistMono-Italic-Variable.woff2)format("woff2")}.tasklist--plan .tasklist-label:before{--font-weight-300:300;--font-weight-400:400;--font-weight-500:500;--font-weight-600:600;--font-family:"Geist Mono", monospace}.tasklist{--check-duration:var(--
|
|
1
|
+
@layer components{.tasklist{margin:0;padding:0;list-style:none}.tasklist-item{--background:var(--background-default);--background-active:var(--background-default);--background-default:transparent;--background-hover:var(--background-default);--background-pressed:var(--background-default)}.--active.tasklist-item{--background:var(--background-active)}.tasklist-item:not(.--active):hover{--background:var(--background-hover)}.tasklist-item:not(.--active):active{--background:var(--background-pressed)}@font-face{font-display:swap;font-family:Geist;font-style:normal;font-weight:100 900;src:url(../../../css-utilities/font/geist/Geist-Variable.woff2)format("woff2")}@font-face{font-display:swap;font-family:Geist;font-style:italic;font-weight:100 900;src:url(../../../css-utilities/font/geist/Geist-Italic-Variable.woff2)format("woff2")}@font-face{font-display:swap;font-family:Geist Mono;font-style:normal;font-weight:100 900;src:url(../../../css-utilities/font/geist/GeistMono-Variable.woff2)format("woff2")}@font-face{font-display:swap;font-family:Geist Mono;font-style:italic;font-weight:100 900;src:url(../../../css-utilities/font/geist/GeistMono-Italic-Variable.woff2)format("woff2")}.tasklist--plan .tasklist-label:before{--font-weight-300:300;--font-weight-400:400;--font-weight-500:500;--font-weight-600:600;--font-family:"Geist Mono", monospace}.tasklist{--check-duration:.15s;--gap-horizontal:calc(var(--size-100) / 4);--gap-vertical:calc(var(--size-100) / 4);--strike-duration:.2s;--strike-timing-function:cubic-bezier(.65, 0, .35, 1)}@media (prefers-reduced-motion:reduce){.tasklist{--check-duration:0s;--strike-duration:0s}}.tasklist--plan .tasklist-label:before{--color:var(--color-text-300);--font-size:var(--font-size-200);--font-weight:var(--font-weight-500);--gap-horizontal:calc(var(--size-300) / 2)}.tasklist-checkbox{--background-active:var(--color-primary-500);--border-color-active:var(--color-primary-500);--border-width:var(--border-width-400);--indicator-color-default:var(--color-surface);--size:var(--size-500)}.tasklist-content{--opacity:var(--opacity-default);--opacity-active:.65;--opacity-default:1}.tasklist-description{--color:var(--color-text-300);--font-size:var(--font-size-300)}.tasklist-item{--background-hover:color-mix(in oklch, var(--color-primary-500) 3%, var(--background-default));--background-pressed:var(--background-hover);--border-radius:var(--border-radius-400);--move-duration:.5s;--move-timing-function:linear(0, .109, .322, .536, .71, .835, .916, .965, .991, 1.003, 1.007, 1.008, 1.006, 1.005, 1.003, 1.002, 1);--strike-delay:0s;--strike-length:0%;--transition-duration:.16s;--transition-timing-function:cubic-bezier(.65, 0, .35, 1)}@media (prefers-reduced-motion:reduce){.tasklist-item{--move-duration:0s}}.tasklist-item--checking{--strike-delay:var(--check-duration)}.tasklist-item:has(.checkbox-tag:checked){--strike-length:100%}.tasklist-item:has(.checkbox-tag:checked) .tasklist-content{--opacity:var(--opacity-active)}.tasklist-label{--color:var(--color-text-500);--font-weight:var(--font-weight-500);--strike-color:var(--color-text-300);--strike-width:2px}.tasklist-row{--font-size:var(--font-size-400);--gap-horizontal:var(--size-200);--gap-vertical:var(--size-200);--line-height:var(--size-500);--padding-horizontal:var(--size-100);--padding-vertical:var(--size-100)}.tasklist-row--sortable:before{--background:var(--color-primary-300);--opacity:var(--opacity-default);--opacity-default:0;--opacity-hover:1;--size:var(--size-400);--transition-duration:.16s;--transition-timing-function:cubic-bezier(.65, 0, .35, 1)}.tasklist-row--sortable:not(.--active):hover:before{--opacity:var(--opacity-hover)}.tasklist{gap:var(--gap-vertical) var(--gap-horizontal);flex-direction:column;display:flex}.tasklist--plan .tasklist-item{counter-set:tasklist var(--index)}.tasklist--plan .tasklist-label:before{color:var(--color);content:counter(tasklist, decimal-leading-zero);font-family:var(--font-family);font-size:var(--font-size);font-variant-numeric:tabular-nums;font-weight:var(--font-weight);margin-right:var(--gap-horizontal)}.tasklist-checkbox{margin-top:calc((var(--line-height) - var(--size)) / 2)}.tasklist-content{min-width:0;opacity:var(--opacity);transition:opacity var(--strike-duration) var(--strike-timing-function) var(--strike-delay)}.tasklist-description{color:var(--color);font-size:var(--font-size);margin-top:calc(var(--size-100) / 4);display:block}.tasklist-item{background:var(--background);border-radius:var(--border-radius);transition:background-color var(--transition-duration) var(--transition-timing-function);position:relative}.tasklist-item--moving{z-index:1}.tasklist-item--unchecking .tasklist-checkbox,.tasklist-item--unchecking .tasklist-checkbox .checkbox-check svg{transition-delay:var(--strike-duration)}.tasklist-label{-webkit-box-decoration-break:clone;box-decoration-break:clone;background-image:linear-gradient(var(--strike-color), var(--strike-color));background-position:0 55%;background-repeat:no-repeat;background-size:var(--strike-length) var(--strike-width);color:var(--color);font-weight:var(--font-weight);transition:background-size var(--strike-duration) var(--strike-timing-function) var(--strike-delay)}.tasklist-row{cursor:pointer;font-size:var(--font-size);align-items:flex-start;gap:var(--gap-vertical) var(--gap-horizontal);line-height:var(--line-height);padding:var(--padding-vertical) var(--padding-horizontal);-webkit-user-select:none;user-select:none;display:flex}.tasklist-row--sortable:before{background:var(--background);content:"";flex:0 0 var(--size);height:var(--size);margin-top:calc((var(--line-height) - var(--size)) / 2);opacity:var(--opacity);transition:opacity var(--transition-duration) var(--transition-timing-function);mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='9' cy='5' r='1.5'/%3E%3Ccircle cx='9' cy='12' r='1.5'/%3E%3Ccircle cx='9' cy='19' r='1.5'/%3E%3Ccircle cx='15' cy='5' r='1.5'/%3E%3Ccircle cx='15' cy='12' r='1.5'/%3E%3Ccircle cx='15' cy='19' r='1.5'/%3E%3C/svg%3E") 50%/contain no-repeat}}
|
|
2
2
|
/*$vite$:1*/
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@layer components{.textarea{--background:var(--background-default);--background-active:var(--background-default);--background-default:transparent;--background-hover:var(--background-default);--background-pressed:var(--background-default)}.--active.textarea{--background:var(--background-active)}.textarea:not(.--active):hover{--background:var(--background-hover)}.textarea:not(.--active):active{--background:var(--background-pressed)}.textarea{--border-color:var(--border-color-default);--border-color-active:var(--border-color-default);--border-color-default:transparent;--border-color-hover:var(--border-color-default);--border-color-pressed:var(--border-color-default)}.--active.textarea{--border-color:var(--border-color-active)}.textarea:not(.--active):hover{--border-color:var(--border-color-hover)}.textarea:not(.--active):active{--border-color:var(--border-color-pressed)}.textarea{--box-shadow:var(--box-shadow-default);--box-shadow-active:var(--box-shadow-default);--box-shadow-default:none;--box-shadow-hover:var(--box-shadow-default);--box-shadow-pressed:var(--box-shadow-default)}.--active.textarea{--box-shadow:var(--box-shadow-active)}.textarea:not(.--active):hover{--box-shadow:var(--box-shadow-hover)}.textarea:not(.--active):active{--box-shadow:var(--box-shadow-pressed)}.textarea{--color:var(--color-default);--color-active:var(--color-default);--color-default:var(--color-text-400);--color-hover:var(--color-default);--color-pressed:var(--color-default)}.--active.textarea{--color:var(--color-active)}.textarea:not(.--active):hover{--color:var(--color-hover)}.textarea:not(.--active):active{--color:var(--color-pressed)}.textarea{--
|
|
1
|
+
@layer components{.textarea{--background:var(--background-default);--background-active:var(--background-default);--background-default:transparent;--background-hover:var(--background-default);--background-pressed:var(--background-default)}.--active.textarea{--background:var(--background-active)}.textarea:not(.--active):hover{--background:var(--background-hover)}.textarea:not(.--active):active{--background:var(--background-pressed)}.textarea{--border-color:var(--border-color-default);--border-color-active:var(--border-color-default);--border-color-default:transparent;--border-color-hover:var(--border-color-default);--border-color-pressed:var(--border-color-default)}.--active.textarea{--border-color:var(--border-color-active)}.textarea:not(.--active):hover{--border-color:var(--border-color-hover)}.textarea:not(.--active):active{--border-color:var(--border-color-pressed)}.textarea{--box-shadow:var(--box-shadow-default);--box-shadow-active:var(--box-shadow-default);--box-shadow-default:none;--box-shadow-hover:var(--box-shadow-default);--box-shadow-pressed:var(--box-shadow-default)}.--active.textarea{--box-shadow:var(--box-shadow-active)}.textarea:not(.--active):hover{--box-shadow:var(--box-shadow-hover)}.textarea:not(.--active):active{--box-shadow:var(--box-shadow-pressed)}@keyframes text-gradient{to{background-position:var(--background-size) 0}}@keyframes text-line-shadow{0%{background-position:0 0}to{background-position:100% -100%}}@keyframes text-shiny{0%,90%,to{background-position:calc(-100% - var(--shine-width)) 0}30%,60%{background-position:calc(100% + var(--shine-width)) 0}}.textarea{--color:var(--color-default);--color-active:var(--color-default);--color-default:var(--color-text-400);--color-hover:var(--color-default);--color-pressed:var(--color-default)}.--active.textarea{--color:var(--color-active)}.textarea:not(.--active):hover{--color:var(--color-hover)}.textarea:not(.--active):active{--color:var(--color-pressed)}.textarea{--border-color-default:var(--background);--border-radius:var(--border-radius-400);--border-style:solid;--border-width:0px;--font-size:var(--font-size-400);--padding-horizontal:var(--size-400);--padding-vertical:var(--size-400);--size:var(--size-400);--resize-duration:.24s;--resize-timing-function:cubic-bezier(.4, 0, .2, 1);transition:background var(--transition-duration) var(--transition-timing-function), border-color var(--transition-duration) var(--transition-timing-function), box-shadow var(--transition-duration) var(--transition-timing-function), height var(--resize-duration) var(--resize-timing-function), opacity var(--transition-duration) var(--transition-timing-function), transform var(--transition-duration) var(--transition-timing-function);background:var(--background);border:var(--border-width) var(--border-style) var(--border-color);border-radius:var(--border-radius);color:var(--color);cursor:text;font-size:var(--font-size);min-width:0;padding-block:max(0px, var(--padding-vertical) - var(--border-width));padding-inline:max(0px, var(--padding-horizontal) - var(--border-width));flex:auto;width:100%;position:relative}.textarea:invalid,.textarea:required{box-shadow:none}.textarea--autoresize{--scrollbar-gutter:stable;--scrollbar-overflow:hidden;box-sizing:border-box;field-sizing:fixed;height:var(--height,var(--min-height));max-height:var(--max-height);min-height:var(--min-height);overflow-y:var(--scrollbar-overflow);resize:none;scrollbar-gutter:var(--scrollbar-gutter)}@media (prefers-reduced-motion:reduce){.textarea--autoresize{transition:none}}.textarea--measure{--scrollbar-gutter:stable;box-sizing:border-box;field-sizing:content;height:auto;max-height:var(--max-height);min-height:var(--min-height);pointer-events:none;resize:none;scrollbar-gutter:var(--scrollbar-gutter);visibility:hidden;transition:none;position:absolute;inset:0 auto auto 0;overflow-y:auto}.textarea--measure-fallback{height:calc(var(--content-height,var(--min-height)) + 2 * var(--border-width))}.textarea--scrollable{--scrollbar-overflow:auto}.textarea-resize{flex:auto;width:100%;min-width:0;display:grid;position:relative}}
|
|
2
2
|
/*$vite$:1*/
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import './scss/index.scss';
|
|
2
2
|
type Mode = 'dark' | 'light';
|
|
3
|
+
type Options = {
|
|
4
|
+
fallback?: Preference;
|
|
5
|
+
store?: Store;
|
|
6
|
+
};
|
|
3
7
|
type Preference = Mode | 'system';
|
|
4
8
|
type Store = {
|
|
5
9
|
delete(...keys: (typeof KEY)[]): Promise<void>;
|
|
@@ -8,9 +12,9 @@ type Store = {
|
|
|
8
12
|
};
|
|
9
13
|
declare const KEY = "theme";
|
|
10
14
|
export default _default;
|
|
11
|
-
declare function _default(store?:
|
|
15
|
+
declare function _default({ fallback, store }?: Options): {
|
|
12
16
|
readonly mode: Mode;
|
|
13
17
|
readonly preference: Preference;
|
|
14
18
|
set(preference: Preference): void;
|
|
15
19
|
};
|
|
16
|
-
export type { Mode, Preference, Store };
|
|
20
|
+
export type { Mode, Options, Preference, Store };
|
|
@@ -37,8 +37,9 @@ function apply(preference) {
|
|
|
37
37
|
function system(dark) {
|
|
38
38
|
return dark ? 'dark' : 'light';
|
|
39
39
|
}
|
|
40
|
-
export default (store) => {
|
|
41
|
-
let media = matchMedia(QUERY), state = new ReactiveObject_1y66z620(
|
|
40
|
+
export default ({ fallback = 'system', store } = {}) => {
|
|
41
|
+
let media = matchMedia(QUERY), state = new ReactiveObject_1y66z620(fallback, system(media.matches)), touched = false;
|
|
42
|
+
apply(fallback);
|
|
42
43
|
media.addEventListener('change', (event) => {
|
|
43
44
|
state.system = system(event.matches);
|
|
44
45
|
});
|
|
@@ -59,7 +60,7 @@ export default (store) => {
|
|
|
59
60
|
touched = true;
|
|
60
61
|
state.preference = preference;
|
|
61
62
|
apply(preference);
|
|
62
|
-
if (preference ===
|
|
63
|
+
if (preference === fallback) {
|
|
63
64
|
void store?.delete(KEY);
|
|
64
65
|
}
|
|
65
66
|
else {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@layer components{:root{--color-primary:light-dark(oklch(16% .0102 257),oklch(98% .0032 257));--color-surface:light-dark(oklch(98% .0032 257),oklch(16% .0102 257));--color-text:light-dark(oklch(36% .0325 257),oklch(90% .0162 257));--surface-background-active:light-dark(oklch(from var(--surface-background-default) calc(l + .01) c h),oklch(from var(--surface-background-default) calc(l + .02) c h));--surface-background-default:light-dark(oklch(from var(--color-surface) clamp(0, l + max(var(--surface-level), 0) * .01 + min(var(--surface-level), 0) * .01, 1) calc(c * (1 - clamp(0, l + max(var(--surface-level), 0) * .01 + min(var(--surface-level), 0) * .01, 1)) / max(1 - l, .01)) h),oklch(from var(--color-surface) clamp(0, l + max(var(--surface-level), 0) * .02 + min(var(--surface-level), 0) * .02, l + .12) calc(c * clamp(0, l + max(var(--surface-level), 0) * .02 + min(var(--surface-level), 0) * .02, l + .12) / max(l, .01)) h));--surface-background-hover:light-dark(oklch(from var(--surface-background-default) calc(l + .005) c h),oklch(from var(--surface-background-default) calc(l + .01) c h));--surface-background-pressed:light-dark(oklch(from var(--surface-background-default) calc(l - .02) c h),oklch(from var(--surface-background-default) calc(l - .04) c h));--surface-border-active:light-dark(oklch(from var(--surface-background-active) max(0, l - .04) c h),oklch(from var(--surface-background-active) min(1, l + .06) c h));--surface-border-default:light-dark(oklch(from var(--surface-background-default) max(0, l - .04) c h),oklch(from var(--surface-background-default) min(1, l + .06) c h));--surface-border-hover:light-dark(oklch(from var(--surface-background-hover) max(0, l - .04) c h),oklch(from var(--surface-background-hover) min(1, l + .06) c h));--surface-border-pressed:light-dark(oklch(from var(--surface-background-pressed) max(0, l - .04) c h),oklch(from var(--surface-background-pressed) min(1, l + .06) c h));--surface-shadow-active:var(--surface-shadow-hover);--surface-shadow-color:light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .16));--surface-shadow-weight:0;--surface-shadow-cast:light-dark(oklch(from light-dark(oklch(from var(--color-surface) clamp(0, l + max(calc(var(--surface-level) - 1), 0) * .01 + min(calc(var(--surface-level) - 1), 0) * .01, 1) calc(c * (1 - clamp(0, l + max(calc(var(--surface-level) - 1), 0) * .01 + min(calc(var(--surface-level) - 1), 0) * .01, 1)) / max(1 - l, .01)) h),oklch(from var(--color-surface) clamp(0, l + max(calc(var(--surface-level) - 1), 0) * .02 + min(calc(var(--surface-level) - 1), 0) * .02, l + .12) calc(c * clamp(0, l + max(calc(var(--surface-level) - 1), 0) * .02 + min(calc(var(--surface-level) - 1), 0) * .02, l + .12) / max(l, .01)) h)) calc(l * .24) calc(c * .24) h / .08),oklch(from light-dark(oklch(from var(--color-surface) clamp(0, l + max(calc(var(--surface-level) - 1), 0) * .01 + min(calc(var(--surface-level) - 1), 0) * .01, 1) calc(c * (1 - clamp(0, l + max(calc(var(--surface-level) - 1), 0) * .01 + min(calc(var(--surface-level) - 1), 0) * .01, 1)) / max(1 - l, .01)) h),oklch(from var(--color-surface) clamp(0, l + max(calc(var(--surface-level) - 1), 0) * .02 + min(calc(var(--surface-level) - 1), 0) * .02, l + .12) calc(c * clamp(0, l + max(calc(var(--surface-level) - 1), 0) * .02 + min(calc(var(--surface-level) - 1), 0) * .02, l + .12) / max(l, .01)) h)) calc(l * .24) calc(c * .24) h / .16));--surface-shadow-default:0 calc((0 + 1 * clamp(0, var(--surface-shadow-weight) - 0, 1) + 3 * clamp(0, var(--surface-shadow-weight) - 3, 1) + 6 * clamp(0, var(--surface-shadow-weight) - 4, 1) + 10 * clamp(0, var(--surface-shadow-weight) - 5, 1) + 5 * clamp(0, var(--surface-shadow-weight) - 6, 1)) * 1px) calc((0 + 2 * clamp(0, var(--surface-shadow-weight) - 1, 1) + 1 * clamp(0, var(--surface-shadow-weight) - 2, 1) + 3 * clamp(0, var(--surface-shadow-weight) - 3, 1) + 9 * clamp(0, var(--surface-shadow-weight) - 4, 1) + 10 * clamp(0, var(--surface-shadow-weight) - 5, 1) + 25 * clamp(0, var(--surface-shadow-weight) - 6, 1)) * 1px) calc((0 + -1 * clamp(0, var(--surface-shadow-weight) - 3, 1) + -2 * clamp(0, var(--surface-shadow-weight) - 4, 1) + -2 * clamp(0, var(--surface-shadow-weight) - 5, 1) + -7 * clamp(0, var(--surface-shadow-weight) - 6, 1)) * 1px) oklch(from var(--surface-shadow-cast) l c h / calc(alpha * (0 + .05 * clamp(0, var(--surface-shadow-weight) - 0, 1) + .05 * clamp(0, var(--surface-shadow-weight) - 2, 1) + .15 * clamp(0, var(--surface-shadow-weight) - 6, 1)) * 10)), 0 calc((0 + 1 * clamp(0, var(--surface-shadow-weight) - 2, 1) + 1 * clamp(0, var(--surface-shadow-weight) - 3, 1) + 2 * clamp(0, var(--surface-shadow-weight) - 4, 1) + 4 * clamp(0, var(--surface-shadow-weight) - 5, 1) + -8 * clamp(0, var(--surface-shadow-weight) - 6, 1)) * 1px) calc((0 + 2 * clamp(0, var(--surface-shadow-weight) - 2, 1) + 2 * clamp(0, var(--surface-shadow-weight) - 3, 1) + 2 * clamp(0, var(--surface-shadow-weight) - 4, 1) + 4 * clamp(0, var(--surface-shadow-weight) - 5, 1) + -10 * clamp(0, var(--surface-shadow-weight) - 6, 1)) * 1px) calc((0 + -1 * clamp(0, var(--surface-shadow-weight) - 2, 1) + -1 * clamp(0, var(--surface-shadow-weight) - 3, 1) + -2 * clamp(0, var(--surface-shadow-weight) - 4, 1) + -2 * clamp(0, var(--surface-shadow-weight) - 5, 1) + 6 * clamp(0, var(--surface-shadow-weight) - 6, 1)) * 1px) oklch(from var(--surface-shadow-cast) l c h / calc(alpha * (0 + .1 * clamp(0, var(--surface-shadow-weight) - 2, 1) + -.1 * clamp(0, var(--surface-shadow-weight) - 6, 1)) * 10));--surface-shadow-hover:0 calc((0 + 1 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 0, 1) + 3 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 3, 1) + 6 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 4, 1) + 10 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 5, 1) + 5 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 6, 1)) * 1px) calc((0 + 2 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 1, 1) + 1 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 2, 1) + 3 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 3, 1) + 9 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 4, 1) + 10 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 5, 1) + 25 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 6, 1)) * 1px) calc((0 + -1 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 3, 1) + -2 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 4, 1) + -2 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 5, 1) + -7 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 6, 1)) * 1px) oklch(from var(--surface-shadow-cast) l c h / calc(alpha * (0 + .05 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 0, 1) + .05 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 2, 1) + .15 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 6, 1)) * 10)), 0 calc((0 + 1 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 2, 1) + 1 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 3, 1) + 2 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 4, 1) + 4 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 5, 1) + -8 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 6, 1)) * 1px) calc((0 + 2 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 2, 1) + 2 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 3, 1) + 2 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 4, 1) + 4 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 5, 1) + -10 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 6, 1)) * 1px) calc((0 + -1 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 2, 1) + -1 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 3, 1) + -2 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 4, 1) + -2 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 5, 1) + 6 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 6, 1)) * 1px) oklch(from var(--surface-shadow-cast) l c h / calc(alpha * (0 + .1 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 2, 1) + -.1 * clamp(0, min(var(--surface-shadow-weight) + 1, 7) - 6, 1)) * 10));--surface-shadow-pressed:0 calc((0 + 1 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 0, 1) + 3 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 3, 1) + 6 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 4, 1) + 10 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 5, 1) + 5 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 6, 1)) * 1px) calc((0 + 2 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 1, 1) + 1 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 2, 1) + 3 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 3, 1) + 9 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 4, 1) + 10 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 5, 1) + 25 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 6, 1)) * 1px) calc((0 + -1 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 3, 1) + -2 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 4, 1) + -2 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 5, 1) + -7 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 6, 1)) * 1px) oklch(from var(--surface-shadow-cast) l c h / calc(alpha * (0 + .05 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 0, 1) + .05 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 2, 1) + .15 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 6, 1)) * 10)), 0 calc((0 + 1 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 2, 1) + 1 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 3, 1) + 2 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 4, 1) + 4 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 5, 1) + -8 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 6, 1)) * 1px) calc((0 + 2 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 2, 1) + 2 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 3, 1) + 2 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 4, 1) + 4 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 5, 1) + -10 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 6, 1)) * 1px) calc((0 + -1 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 2, 1) + -1 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 3, 1) + -2 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 4, 1) + -2 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 5, 1) + 6 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 6, 1)) * 1px) oklch(from var(--surface-shadow-cast) l c h / calc(alpha * (0 + .1 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 2, 1) + -.1 * clamp(0, max(var(--surface-shadow-weight) - 1, 0) - 6, 1)) * 10));--color-primary-300:light-dark(oklch(from var(--color-primary) min(1, l + .03) c h),oklch(from var(--color-primary) min(1, l + .03) c h));--color-primary-400:var(--color-primary);--color-primary-500:light-dark(oklch(from var(--color-primary) max(0, l - .03) c h),oklch(from var(--color-primary) max(0, l - .03) c h));--background:var(--surface-background-default);--color:var(--color-text-400);--color-text-300:light-dark(oklch(from var(--color-text) min(1, pow(1.5 * (pow(l, 3) + .05) - .05, 1 / 3)) calc(c * min(1, (1 - min(1, pow(1.5 * (pow(l, 3) + .05) - .05, 1 / 3))) / max(1 - l, .01))) h),oklch(from var(--color-text) pow(max(0, (pow(l, 3) + .05) / 1.5 - .05), 1 / 3) calc(c * min(1, pow(max(0, (pow(l, 3) + .05) / 1.5 - .05), 1 / 3) / max(l, .01))) h));--color-text-400:var(--color-text);--color-text-500:light-dark(oklch(from var(--color-text) pow(max(0, (pow(l, 3) + .05) / 1.5 - .05), 1 / 3) calc(c * min(1, pow(max(0, (pow(l, 3) + .05) / 1.5 - .05), 1 / 3) / max(l, .01))) h),oklch(from var(--color-text) min(1, pow(1.5 * (pow(l, 3) + .05) - .05, 1 / 3)) calc(c * min(1, (1 - min(1, pow(1.5 * (pow(l, 3) + .05) - .05, 1 / 3))) / max(1 - l, .01))) h));color-scheme:light dark}[data-theme=dark]{color-scheme:dark}[data-theme=light]{color-scheme:light}}
|
|
1
|
+
@layer components{@keyframes text-gradient{to{background-position:var(--background-size) 0}}@keyframes text-line-shadow{0%{background-position:0 0}to{background-position:100% -100%}}@keyframes text-shiny{0%,90%,to{background-position:calc(-100% - var(--shine-width)) 0}30%,60%{background-position:calc(100% + var(--shine-width)) 0}}:root{--color-primary:light-dark(oklch(16% .012 257),oklch(97% .0032 257));--color-surface:light-dark(oklch(97% .0032 257),oklch(16% .012 257));--color-text:light-dark(oklch(36% .032 257),oklch(90% .016 257));--surface-background-active:light-dark(oklch(from var(--surface-background-default) calc(l + .02) c h),oklch(from var(--surface-background-default) calc(l + .03) c h));--surface-background-below:light-dark(oklch(from var(--color-surface) clamp(0, l + max(calc(var(--surface-level) - 1), 0) * .01 + min(calc(var(--surface-level) - 1), 0) * .016, 1) calc(c * (1 - clamp(0, l + max(calc(var(--surface-level) - 1), 0) * .01 + min(calc(var(--surface-level) - 1), 0) * .016, 1)) / max(1 - l, .01)) h),oklch(from var(--color-surface) clamp(0, l + calc(var(--surface-level) - 1) * .016, l + .096) calc(c * clamp(0, l + calc(var(--surface-level) - 1) * .016, l + .096) / max(l, .01)) h));--surface-background-default:light-dark(oklch(from var(--color-surface) clamp(0, l + max(var(--surface-level), 0) * .01 + min(var(--surface-level), 0) * .016, 1) calc(c * (1 - clamp(0, l + max(var(--surface-level), 0) * .01 + min(var(--surface-level), 0) * .016, 1)) / max(1 - l, .01)) h),oklch(from var(--color-surface) clamp(0, l + var(--surface-level) * .016, l + .096) calc(c * clamp(0, l + var(--surface-level) * .016, l + .096) / max(l, .01)) h));--surface-background-hover:light-dark(oklch(from var(--surface-background-default) calc(l + .01) c h),oklch(from var(--surface-background-default) calc(l + .02) c h));--surface-background-pressed:light-dark(oklch(from var(--surface-background-default) calc(l - .02) c h),oklch(from var(--surface-background-default) calc(l - .03) c h));--surface-border-active:light-dark(oklch(from var(--surface-background-active) max(0, l - .046) c h),oklch(from var(--surface-background-active) min(1, l + .024) c h));--surface-border-default:light-dark(oklch(from var(--surface-background-default) max(0, l - .046) c h),oklch(from var(--surface-background-default) min(1, l + .024) c h));--surface-border-hover:light-dark(oklch(from var(--surface-background-hover) max(0, l - .046) c h),oklch(from var(--surface-background-hover) min(1, l + .024) c h));--surface-border-pressed:light-dark(oklch(from var(--surface-background-pressed) max(0, l - .046) c h),oklch(from var(--surface-background-pressed) min(1, l + .024) c h));--surface-primary-active:light-dark(oklch(from var(--surface-primary-default) calc(l + .02) c h),oklch(from var(--surface-primary-default) calc(l + .03) c h));--surface-primary-default:light-dark(oklch(from var(--color-surface) clamp(0, l + max(calc(var(--surface-level) + -3.2), 0) * .01 + min(calc(var(--surface-level) + -3.2), 0) * .016, 1) calc(c * (1 - clamp(0, l + max(calc(var(--surface-level) + -3.2), 0) * .01 + min(calc(var(--surface-level) + -3.2), 0) * .016, 1)) / max(1 - l, .01)) h),oklch(from var(--color-surface) clamp(0, l + calc(var(--surface-level) + 1.6) * .016, l + .096) calc(c * clamp(0, l + calc(var(--surface-level) + 1.6) * .016, l + .096) / max(l, .01)) h));--surface-primary-hover:light-dark(oklch(from var(--surface-primary-default) calc(l + .01) c h),oklch(from var(--surface-primary-default) calc(l + .02) c h));--surface-primary-pressed:light-dark(oklch(from var(--surface-primary-default) calc(l - .02) c h),oklch(from var(--surface-primary-default) calc(l - .03) c h));--surface-shadow-active:var(--surface-shadow-hover);--surface-shadow-cast:light-dark(oklch(from var(--surface-background-below) calc(l * .2) calc(c * .2) h / .08),oklch(from var(--surface-background-below) calc(l * .2) calc(c * .2) h / .16));--surface-shadow-color:light-dark(oklch(from var(--surface-background-default) calc(l * .2) calc(c * .2) h / .08),oklch(from var(--surface-background-default) calc(l * .2) calc(c * .2) h / .16));--surface-shadow-default:0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0)), 0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0));--surface-shadow-hover:0 1px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * .5)), 0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0));--surface-shadow-pressed:0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0)), 0 0px 0px 0px oklch(from var(--surface-shadow-cast) l c h / calc(alpha * 0));--color-primary-300:light-dark(oklch(from var(--color-primary) min(1, l + .03) c h),oklch(from var(--color-primary) min(1, l + .03) c h));--color-primary-400:var(--color-primary);--color-primary-500:light-dark(oklch(from var(--color-primary) max(0, l - .03) c h),oklch(from var(--color-primary) max(0, l - .03) c h));--background:var(--surface-background-default);--color:var(--color-text-400);--color-text-300:light-dark(oklch(from var(--color-text) min(1, pow(1.6 * (pow(l, 3) + .05) - .05, 1 / 3)) calc(c * min(1, (1 - min(1, pow(1.6 * (pow(l, 3) + .05) - .05, 1 / 3))) / max(1 - l, .01))) h),oklch(from var(--color-text) pow(max(0, (pow(l, 3) + .05) / 1.6 - .05), 1 / 3) calc(c * min(1, pow(max(0, (pow(l, 3) + .05) / 1.6 - .05), 1 / 3) / max(l, .01))) h));--color-text-400:var(--color-text);--color-text-500:light-dark(oklch(from var(--color-text) pow(max(0, (pow(l, 3) + .05) / 1.6 - .05), 1 / 3) calc(c * min(1, pow(max(0, (pow(l, 3) + .05) / 1.6 - .05), 1 / 3) / max(l, .01))) h),oklch(from var(--color-text) min(1, pow(1.6 * (pow(l, 3) + .05) - .05, 1 / 3)) calc(c * min(1, (1 - min(1, pow(1.6 * (pow(l, 3) + .05) - .05, 1 / 3))) / max(1 - l, .01))) h));color-scheme:light dark}[data-theme=dark]{color-scheme:dark}[data-theme=light]{color-scheme:light}}
|
|
2
2
|
/*$vite$:1*/
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as template_u1 from '@esportsplus/template';
|
|
2
|
+
import { type A } from './shared.js';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
(): template_u1.Renderable<any>;
|
|
5
|
+
<T extends A>(attributes: T): template_u1.Renderable<any>;
|
|
6
|
+
<T extends template_u1.Renderable<any>>(content: T): template_u1.Renderable<any>;
|
|
7
|
+
(attributes: A, content?: template_u1.Renderable<any>): template_u1.Renderable<any>;
|
|
8
|
+
bind(context: {
|
|
9
|
+
attributes?: Partial<A> | undefined;
|
|
10
|
+
content?: template_u1.Renderable<any>;
|
|
11
|
+
}): any;
|
|
12
|
+
};
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as template_u1 from '@esportsplus/template';
|
|
2
|
+
import { component } from '@esportsplus/template';
|
|
3
|
+
import { CHOICES, radio } from './shared.js';
|
|
4
|
+
const template_1tpeu1k1 = template_u1.template(`<div aria-label='Theme' class='theme-picker-cards' role='radiogroup'>`);
|
|
5
|
+
const template_1tpeu1k4 = template_u1.template(`<button class='theme-picker-cards-option'><span class='theme-picker-cards-preview '><span class='theme-picker-cards-preview-bar'></span><span class='theme-picker-cards-preview-line'></span><span class='theme-picker-cards-preview-line theme-picker-cards-preview-line--short'></span></span><span class='theme-picker-cards-label'>`);
|
|
6
|
+
export default component(({ mode, ...attributes }) => {
|
|
7
|
+
let root_1tpeu1k0 = template_1tpeu1k1(), element_1tpeu1k2 = root_1tpeu1k0.firstChild;
|
|
8
|
+
template_u1.slot(element_1tpeu1k2, CHOICES.map((choice) => {
|
|
9
|
+
let root_1tpeu1k3 = template_1tpeu1k4(), element_1tpeu1k5 = root_1tpeu1k3.firstChild, element_1tpeu1k6 = element_1tpeu1k5.firstElementChild, element_1tpeu1k7 = element_1tpeu1k6.nextElementSibling;
|
|
10
|
+
template_u1.slot(element_1tpeu1k7, choice.label, 1);
|
|
11
|
+
template_u1.setList(element_1tpeu1k6, 'class', template_u1.interpolate(["theme-picker-cards-preview--", (choice.value)]));
|
|
12
|
+
template_u1.setProperties(element_1tpeu1k5, radio(mode, choice));
|
|
13
|
+
return root_1tpeu1k3;
|
|
14
|
+
}), 1);
|
|
15
|
+
template_u1.setProperties(element_1tpeu1k2, attributes);
|
|
16
|
+
return root_1tpeu1k0;
|
|
17
|
+
});
|
|
@@ -1,52 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import cards from './cards.js';
|
|
2
|
+
import swatches from './swatches.js';
|
|
3
|
+
import toggle from './toggle.js';
|
|
4
4
|
import '../button/scss/index.scss';
|
|
5
5
|
import './scss/index.scss';
|
|
6
|
-
declare const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
declare const themePicker: {
|
|
7
|
+
cards: typeof cards;
|
|
8
|
+
swatches: typeof swatches;
|
|
9
|
+
toggle: typeof toggle;
|
|
10
10
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
[TOGGLE_TRIGGER]?: Attributes;
|
|
14
|
-
onconnect?: never;
|
|
15
|
-
ondocumentclick?: never;
|
|
16
|
-
onkeydown?: never;
|
|
17
|
-
onpointerenter?: never;
|
|
18
|
-
onpointerleave?: never;
|
|
19
|
-
};
|
|
20
|
-
type Theme = {
|
|
21
|
-
readonly mode: Mode;
|
|
22
|
-
readonly preference: Preference;
|
|
23
|
-
set(preference: Preference): void;
|
|
24
|
-
};
|
|
25
|
-
declare const _default: {
|
|
26
|
-
cards: {
|
|
27
|
-
(): template_u1.Renderable<any>;
|
|
28
|
-
<T extends A>(attributes: T): template_u1.Renderable<any>;
|
|
29
|
-
<T extends template_u1.Renderable<any>>(content: T): template_u1.Renderable<any>;
|
|
30
|
-
(attributes: A, content?: template_u1.Renderable<any>): template_u1.Renderable<any>;
|
|
31
|
-
bind(context: {
|
|
32
|
-
attributes?: Partial<A> | undefined;
|
|
33
|
-
content?: template_u1.Renderable<any>;
|
|
34
|
-
}): any;
|
|
35
|
-
};
|
|
36
|
-
swatches: {
|
|
37
|
-
(): template_u1.Renderable<any>;
|
|
38
|
-
<T extends A>(attributes: T): template_u1.Renderable<any>;
|
|
39
|
-
<T extends template_u1.Renderable<any>>(content: T): template_u1.Renderable<any>;
|
|
40
|
-
(attributes: A, content?: template_u1.Renderable<any>): template_u1.Renderable<any>;
|
|
41
|
-
bind(context: {
|
|
42
|
-
attributes?: Partial<A> | undefined;
|
|
43
|
-
content?: template_u1.Renderable<any>;
|
|
44
|
-
}): any;
|
|
45
|
-
};
|
|
46
|
-
toggle: template_u1.Factory<T, template_u1.Renderable<any>, template_u1.Renderable<any>, {
|
|
47
|
-
readonly option: typeof TOGGLE_OPTION;
|
|
48
|
-
readonly trigger: typeof TOGGLE_TRIGGER;
|
|
49
|
-
}>;
|
|
50
|
-
};
|
|
51
|
-
export default _default;
|
|
52
|
-
export type { Theme };
|
|
11
|
+
export default themePicker;
|
|
12
|
+
export type { Theme } from './shared.js';
|