@esportsplus/ui 0.59.1 → 0.62.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 +2770 -0
- package/.audit/check-scss.mjs +20 -0
- package/.audit/rules-audit.md +531 -0
- package/README.md +52 -40
- package/RULES.md +145 -0
- package/build/components/accordion/index.d.ts +15 -2174
- package/build/components/accordion/index.js +32 -31
- package/build/components/accordion/scss/index.scss +1 -1
- package/build/components/announcement/index.d.ts +720 -2164
- package/build/components/announcement/index.js +12 -9
- package/build/components/announcement/scss/index.scss +1 -1
- package/build/components/breadcrumb/index.d.ts +4 -1
- package/build/components/breadcrumb/index.js +57 -69
- package/build/components/breadcrumb/scss/index.scss +1 -1
- package/build/components/button/copy.d.ts +4 -11
- package/build/components/button/copy.js +32 -25
- package/build/components/button/faces.d.ts +2 -2
- package/build/components/button/faces.js +9 -11
- package/build/components/button/index.d.ts +3 -7
- package/build/components/button/index.js +3 -5
- package/build/components/button/kbd.d.ts +3 -7
- package/build/components/button/kbd.js +63 -76
- package/build/components/button/morph/index.d.ts +1447 -0
- package/build/components/button/morph/index.js +4 -0
- package/build/components/button/morph/save.d.ts +10 -0
- package/build/components/button/morph/save.js +57 -0
- package/build/components/button/morph/template.d.ts +23 -0
- package/build/components/button/morph/template.js +110 -0
- package/build/components/button/scss/index.scss +1 -1
- package/build/components/button/sidebar.d.ts +1 -10
- package/build/components/button/sidebar.js +14 -12
- package/build/components/button/split.d.ts +7 -2
- package/build/components/button/split.js +20 -19
- package/build/components/capslock/index.d.ts +1 -10
- package/build/components/capslock/index.js +18 -14
- package/build/components/capslock/scss/index.scss +1 -1
- package/build/components/card/scss/index.scss +1 -1
- package/build/components/cc/index.d.ts +4 -1
- package/build/components/cc/index.js +209 -175
- 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 +63 -0
- package/build/components/chat/minimap/index.js +272 -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/group.d.ts +2 -10
- package/build/components/checkbox/group.js +39 -29
- package/build/components/checkbox/index.d.ts +1 -0
- package/build/components/checkbox/index.js +1 -0
- package/build/components/checkbox/options.d.ts +5005 -6441
- package/build/components/checkbox/options.js +72 -45
- 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 +31 -1
- package/build/components/color-picker/index.js +200 -168
- 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 +111 -0
- package/build/components/command/palette.js +606 -0
- package/build/components/command/scss/index.scss +1 -1
- package/build/components/command/search.d.ts +19 -0
- package/build/components/command/search.js +68 -0
- package/build/components/container/scss/index.scss +1 -1
- package/build/components/counter/index.d.ts +6 -4
- package/build/components/counter/index.js +36 -32
- package/build/components/counter/scss/index.scss +1 -1
- package/build/components/dock/index.d.ts +28 -6
- package/build/components/dock/index.js +433 -55
- package/build/components/dock/scss/index.scss +1 -1
- package/build/components/editor/code/editor.d.ts +1 -10
- package/build/components/editor/code/features.d.ts +3 -3
- package/build/components/editor/code/features.js +65 -52
- package/build/components/editor/code/field.d.ts +1 -1
- package/build/components/editor/code/find.d.ts +4 -4
- package/build/components/editor/code/find.js +39 -37
- package/build/components/editor/code/folding.d.ts +1 -1
- package/build/components/editor/code/goto.d.ts +2 -1
- package/build/components/editor/code/goto.js +7 -7
- package/build/components/editor/code/gutter.js +12 -12
- package/build/components/editor/code/html.d.ts +4 -0
- package/build/components/editor/code/html.js +8 -0
- package/build/components/editor/code/minimap.d.ts +4 -10
- package/build/components/editor/code/minimap.js +18 -13
- package/build/components/editor/code/rows.js +6 -12
- package/build/components/editor/code/search.d.ts +1 -2
- package/build/components/editor/code/search.js +1 -1
- package/build/components/editor/code/services/index.d.ts +1 -1
- package/build/components/editor/code/services/index.js +27 -23
- package/build/components/editor/code/services/model.d.ts +1 -5
- package/build/components/editor/code/services/model.js +1 -1
- package/build/components/editor/code/services/session.d.ts +3 -2
- package/build/components/editor/code/services/session.js +1 -4
- package/build/components/editor/code/syntax.d.ts +1 -1
- package/build/components/editor/code/view.d.ts +2 -1
- package/build/components/editor/code/view.js +50 -39
- package/build/components/editor/diffs/merge.d.ts +1 -10
- package/build/components/editor/diffs/merge.js +126 -102
- package/build/components/editor/diffs/render.d.ts +1 -2
- package/build/components/editor/diffs/render.js +2 -8
- package/build/components/editor/diffs/view.d.ts +1 -10
- package/build/components/editor/diffs/view.js +112 -105
- package/build/components/editor/markdown/editing.d.ts +1 -1
- package/build/components/editor/markdown/erase.js +1 -1
- package/build/components/editor/markdown/format.d.ts +23 -0
- package/build/components/editor/markdown/format.js +319 -0
- package/build/components/editor/markdown/html.d.ts +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/inline.d.ts +1 -1
- package/build/components/editor/markdown/inline.js +6 -5
- package/build/components/editor/markdown/layout.d.ts +1 -3
- package/build/components/editor/markdown/layout.js +1 -1
- package/build/components/editor/markdown/model.d.ts +3 -9
- package/build/components/editor/markdown/model.js +1 -8
- package/build/components/editor/markdown/render.d.ts +2 -1
- package/build/components/editor/markdown/render.js +281 -252
- package/build/components/editor/markdown/template.d.ts +13 -0
- package/build/components/editor/markdown/template.js +30 -0
- package/build/components/editor/markdown/toolbar.d.ts +32 -0
- package/build/components/editor/markdown/toolbar.js +556 -0
- package/build/components/editor/markdown/view.d.ts +12 -1
- package/build/components/editor/markdown/view.js +154 -60
- package/build/components/editor/tree/compact.d.ts +2 -1
- package/build/components/editor/tree/compact.js +12 -11
- package/build/components/editor/tree/drag.d.ts +3 -2
- package/build/components/editor/tree/drag.js +29 -26
- package/build/components/editor/tree/edit.d.ts +1 -1
- package/build/components/editor/tree/edit.js +10 -9
- package/build/components/editor/tree/find.d.ts +1 -1
- package/build/components/editor/tree/find.js +13 -9
- package/build/components/editor/tree/icons.d.ts +1 -1
- package/build/components/editor/tree/icons.js +1 -1
- package/build/components/editor/tree/index.d.ts +3 -116
- package/build/components/editor/tree/index.js +3 -2225
- package/build/components/editor/tree/lazy.d.ts +2 -1
- package/build/components/editor/tree/lazy.js +17 -16
- package/build/components/editor/tree/sticky.d.ts +3 -2
- package/build/components/editor/tree/sticky.js +7 -6
- package/build/components/editor/tree/template.d.ts +117 -0
- package/build/components/editor/tree/template.js +2212 -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/model.js +1 -7
- package/build/components/editor/viewer/template.d.ts +17 -0
- package/build/components/editor/viewer/template.js +258 -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/navigate.d.ts +2 -1
- package/build/components/editor/workspace/navigate.js +2 -4
- package/build/components/editor/workspace/session.d.ts +5 -1
- package/build/components/editor/workspace/session.js +71 -39
- package/build/components/editor/workspace/shortcuts.d.ts +0 -2
- package/build/components/editor/workspace/shortcuts.js +39 -35
- 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 +7 -4
- package/build/components/editor/workspace/statusbar.js +73 -86
- package/build/components/editor/workspace/strip.d.ts +1 -2
- package/build/components/editor/workspace/strip.js +10 -8
- 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 +57 -0
- package/build/components/editor/workspace/template.js +1150 -0
- package/build/components/error/index.d.ts +1 -10
- package/build/components/error/index.js +64 -32
- package/build/components/error/scss/index.scss +1 -1
- package/build/components/filter/index.js +138 -77
- package/build/components/filter/scss/index.scss +1 -1
- package/build/components/form/action.d.ts +2 -2
- package/build/components/form/action.js +12 -9
- 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 +14 -0
- package/build/components/group/index.js +18 -0
- package/build/components/group/scss/index.scss +2 -0
- package/build/components/heatmap/index.d.ts +5 -2
- package/build/components/heatmap/index.js +79 -88
- package/build/components/heatmap/scss/index.scss +1 -1
- package/build/components/highlight/index.d.ts +3 -13
- package/build/components/highlight/index.js +95 -92
- package/build/components/highlight/scss/index.scss +1 -1
- package/build/components/icon/index.d.ts +2 -10
- package/build/components/icon/index.js +12 -10
- 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/lazyload.d.ts +2 -1
- package/build/components/image/lazyload.js +29 -26
- package/build/components/image/scss/index.scss +1 -1
- package/build/components/index.d.ts +6 -7
- package/build/components/index.js +6 -7
- package/build/components/inline-edit/index.d.ts +5 -1
- package/build/components/inline-edit/index.js +35 -27
- package/build/components/inline-edit/rich.d.ts +10 -15
- package/build/components/inline-edit/rich.js +82 -1197
- package/build/components/inline-edit/scss/index.scss +1 -1
- package/build/components/inline-edit/status.d.ts +3 -2
- package/build/components/inline-edit/status.js +23 -18
- package/build/components/input/field.d.ts +2 -1
- package/build/components/input/field.js +12 -9
- package/build/components/input/scrub.d.ts +4 -1
- package/build/components/input/scrub.js +25 -20
- package/build/components/input/scss/index.scss +1 -1
- package/build/components/input/tag.d.ts +4 -2
- package/build/components/input/tag.js +105 -83
- 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/index.d.ts +2 -1
- package/build/components/loading/index.js +6 -3
- package/build/components/loading/scss/index.scss +1 -1
- package/build/components/marquee/index.d.ts +2 -1
- package/build/components/marquee/index.js +92 -84
- package/build/components/marquee/scss/index.scss +1 -1
- package/build/components/marquee/velocity.js +4 -3
- package/build/components/metric/flash.d.ts +2 -1
- package/build/components/metric/flash.js +26 -25
- package/build/components/metric/index.d.ts +13 -2
- package/build/components/metric/index.js +60 -56
- 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/spy.js +9 -6
- package/build/components/nav/toc.d.ts +4 -18
- package/build/components/nav/toc.js +9 -21
- package/build/components/nav/tree.d.ts +14 -13
- package/build/components/nav/tree.js +80 -65
- package/build/components/notification/index.d.ts +5 -3
- package/build/components/notification/index.js +30 -39
- package/build/components/notification/scss/index.scss +1 -1
- package/build/components/overlay/index.d.ts +4 -5
- package/build/components/overlay/index.js +399 -196
- package/build/components/overlay/popup.d.ts +5 -6
- package/build/components/overlay/popup.js +80 -39
- package/build/components/overlay/scss/index.scss +1 -1
- package/build/components/page/scss/index.scss +1 -1
- package/build/components/pagination/arrows.d.ts +2 -1
- package/build/components/pagination/arrows.js +48 -45
- package/build/components/pagination/cards.d.ts +5 -1
- package/build/components/pagination/cards.js +70 -47
- package/build/components/pagination/dots.d.ts +3 -1
- package/build/components/pagination/dots.js +29 -24
- package/build/components/pagination/index.d.ts +2 -1
- package/build/components/pagination/index.js +27 -28
- package/build/components/pagination/scss/index.scss +1 -1
- package/build/components/panels/dnd.d.ts +47 -0
- package/build/components/panels/dnd.js +114 -0
- package/build/components/panels/group.d.ts +36 -0
- package/build/components/panels/group.js +322 -0
- package/build/components/panels/index.d.ts +17 -0
- package/build/components/panels/index.js +524 -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 +123 -0
- package/build/components/panels/scss/index.scss +2 -0
- package/build/components/panels/subtree.d.ts +4 -0
- package/build/components/panels/subtree.js +44 -0
- package/build/components/preview/buttons.d.ts +12 -0
- package/build/components/preview/buttons.js +26 -0
- package/build/components/preview/code.d.ts +8 -0
- package/build/components/preview/code.js +18 -0
- package/build/components/preview/header.d.ts +8 -0
- package/build/components/preview/header.js +21 -0
- package/build/components/preview/index.d.ts +37 -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 +12 -0
- package/build/components/preview/source.js +79 -0
- package/build/components/preview/stage.d.ts +8 -0
- package/build/components/preview/stage.js +28 -0
- package/build/components/progress/index.d.ts +2 -1
- package/build/components/progress/index.js +30 -26
- package/build/components/progress/scss/index.scss +1 -1
- package/build/components/progress/text.d.ts +2 -1
- package/build/components/progress/text.js +30 -30
- package/build/components/radio/index.d.ts +3 -2
- package/build/components/radio/index.js +2 -2
- package/build/components/range/filter.d.ts +2 -1
- package/build/components/range/filter.js +130 -132
- package/build/components/range/index.d.ts +2 -1
- package/build/components/range/index.js +17 -22
- package/build/components/range/scss/index.scss +1 -1
- package/build/components/relative-time/index.d.ts +3 -1
- package/build/components/relative-time/index.js +60 -48
- package/build/components/relative-time/scss/index.scss +1 -1
- package/build/components/root/scss/index.scss +1 -1
- package/build/components/select/expand.d.ts +44 -0
- package/build/components/select/expand.js +215 -0
- package/build/components/select/index.d.ts +19 -10
- package/build/components/select/index.js +130 -90
- package/build/components/select/scss/index.scss +1 -1
- package/build/components/shell/index.d.ts +23 -0
- package/build/components/shell/index.js +290 -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 +49 -44
- package/build/components/shortcut-recorder/scss/index.scss +1 -1
- package/build/components/sortable/index.d.ts +2 -714
- package/build/components/sortable/index.js +75 -64
- package/build/components/sortable/scss/index.scss +1 -1
- package/build/components/story/index.d.ts +3 -5
- package/build/components/story/index.js +122 -84
- package/build/components/story/scss/index.scss +1 -1
- package/build/components/surface-field/engine.js +51 -53
- package/build/components/surface-field/index.d.ts +2180 -2921
- package/build/components/surface-field/index.js +52 -51
- package/build/components/surface-field/scss/index.scss +1 -1
- package/build/components/surface-field/surface.d.ts +1 -10
- package/build/components/surface-field/surface.js +42 -36
- package/build/components/switch/index.d.ts +3 -2
- package/build/components/switch/index.js +2 -2
- package/build/components/tasklist/index.d.ts +8 -1
- package/build/components/tasklist/index.js +66 -47
- package/build/components/tasklist/scss/index.scss +1 -1
- package/build/components/textarea/index.d.ts +722 -2170
- package/build/components/textarea/index.js +67 -91
- package/build/components/textarea/scss/index.scss +1 -1
- package/build/components/theme/cards.d.ts +4 -0
- package/build/components/theme/cards.js +21 -0
- package/build/components/theme/index.d.ts +17 -4
- package/build/components/theme/index.js +40 -15
- package/build/components/theme/reveal.d.ts +6 -0
- package/build/components/theme/reveal.js +100 -0
- package/build/components/theme/scss/index.scss +1 -1
- package/build/components/theme/shared.d.ts +26 -0
- package/build/components/theme/shared.js +26 -0
- package/build/components/theme/swatches.d.ts +4 -0
- package/build/components/theme/swatches.js +21 -0
- package/build/components/theme/toggle.d.ts +15 -0
- package/build/components/theme/toggle.js +33 -0
- package/build/components/toast/index.d.ts +6 -2
- package/build/components/toast/index.js +68 -56
- package/build/components/toast/scss/index.scss +1 -1
- package/build/components/tooltip/menu.d.ts +12 -2
- package/build/components/tooltip/menu.js +234 -176
- package/build/components/tooltip/onclick.d.ts +1 -10
- package/build/components/tooltip/onclick.js +25 -27
- package/build/components/tooltip/onhover.d.ts +8 -709
- package/build/components/tooltip/onhover.js +60 -60
- package/build/components/tooltip/scss/index.scss +1 -1
- package/build/components/tooltip/shared.d.ts +5 -3
- package/build/components/tooltip/shared.js +201 -91
- package/build/components/tooltip/utilities.d.ts +10 -4
- package/build/components/tooltip/utilities.js +95 -18
- package/build/components/typewriter/index.d.ts +2855 -1413
- package/build/components/typewriter/index.js +17 -18
- package/build/components/typewriter/retype.d.ts +2 -1
- package/build/components/typewriter/retype.js +21 -18
- package/build/components/typewriter/rotate.d.ts +2 -1
- package/build/components/typewriter/rotate.js +41 -45
- package/build/components/typewriter/scss/index.scss +1 -1
- package/build/components/uptime/index.d.ts +2 -1
- package/build/components/uptime/index.js +51 -54
- package/build/components/uptime/scss/index.scss +1 -1
- package/build/components/usage-meter/index.d.ts +719 -2161
- package/build/components/usage-meter/index.js +23 -20
- 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/disabled/scss/index.scss +2 -0
- package/build/modifiers/glass/index.d.ts +3 -2
- package/build/modifiers/glass/index.js +7 -7
- package/build/modifiers/glass/scss/index.scss +1 -1
- package/build/modifiers/scrollbar/index.d.ts +13 -13
- package/build/modifiers/scrollbar/index.js +74 -90
- package/build/modifiers/scrollbar/scss/index.scss +1 -1
- package/build/shared/animation.d.ts +1 -1
- package/build/shared/animation.js +6 -4
- package/build/shared/dispatch.d.ts +7 -0
- package/build/shared/dispatch.js +25 -0
- package/build/shared/drag.d.ts +4 -5
- package/build/shared/drag.js +4 -3
- package/build/shared/press.d.ts +1 -1
- package/build/shared/press.js +5 -3
- package/build/shared/resize.js +2 -25
- package/build/shared/transition.d.ts +1 -1
- package/build/shared/transition.js +2 -2
- package/build/shared/visible.js +1 -24
- package/package.json +10 -11
- 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 +13 -12
- package/src/components/accordion/scss/index.scss +16 -13
- package/src/components/accordion/scss/variables.scss +13 -10
- package/src/components/announcement/scss/index.scss +16 -24
- package/src/components/announcement/scss/variables.scss +20 -10
- package/src/components/breadcrumb/index.ts +11 -13
- package/src/components/breadcrumb/scss/index.scss +52 -126
- package/src/components/breadcrumb/scss/variables.scss +64 -53
- package/src/components/button/copy.ts +35 -28
- package/src/components/button/faces.ts +2 -4
- package/src/components/button/index.ts +3 -7
- package/src/components/button/kbd.ts +42 -99
- 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 +133 -0
- package/src/components/button/scss/index.scss +263 -119
- package/src/components/button/scss/variables.scss +180 -120
- package/src/components/button/sidebar.ts +7 -7
- package/src/components/button/split.ts +11 -13
- package/src/components/capslock/index.ts +11 -10
- package/src/components/capslock/scss/index.scss +24 -26
- package/src/components/capslock/scss/variables.scss +32 -14
- package/src/components/card/scss/index.scss +12 -36
- package/src/components/card/scss/variables.scss +33 -76
- package/src/components/cc/index.ts +46 -42
- package/src/components/cc/scss/index.scss +142 -155
- package/src/components/cc/scss/variables.scss +234 -44
- package/src/components/chat/index.ts +10 -0
- package/src/components/{chat-minimap → chat/minimap}/index.ts +74 -28
- package/src/components/chat/minimap/scss/index.scss +111 -0
- package/src/components/chat/minimap/scss/variables.scss +182 -0
- package/src/components/{chat-minimap → chat/minimap}/spy.ts +1 -1
- package/src/components/checkbox/group.ts +5 -5
- package/src/components/checkbox/index.ts +1 -0
- package/src/components/checkbox/options.ts +2 -3
- package/src/components/checkbox/scss/index.scss +33 -35
- package/src/components/checkbox/scss/variables.scss +102 -56
- package/src/components/clipboard/index.ts +4 -3
- package/src/components/clipboard/write.ts +2 -1
- package/src/components/color-picker/index.ts +131 -69
- package/src/components/color-picker/scss/index.scss +138 -221
- package/src/components/color-picker/scss/variables.scss +205 -73
- package/src/components/command/index.ts +5 -860
- package/src/components/command/palette.ts +865 -0
- package/src/components/command/scss/index.scss +77 -99
- package/src/components/command/scss/variables.scss +129 -50
- package/src/components/command/search.ts +62 -0
- package/src/components/container/scss/index.scss +2 -4
- package/src/components/container/scss/variables.scss +0 -2
- package/src/components/counter/index.ts +91 -85
- package/src/components/counter/scss/index.scss +33 -41
- package/src/components/counter/scss/variables.scss +41 -19
- package/src/components/dock/index.ts +514 -42
- package/src/components/dock/scss/index.scss +288 -73
- package/src/components/dock/scss/variables.scss +301 -39
- package/src/components/editor/code/features.ts +4 -6
- package/src/components/editor/code/field.ts +1 -1
- package/src/components/editor/code/find.ts +1 -2
- package/src/components/editor/code/folding.ts +1 -1
- package/src/components/editor/code/html.ts +17 -0
- package/src/components/editor/code/keymap.ts +0 -1
- package/src/components/editor/code/minimap.ts +7 -5
- package/src/components/editor/code/rows.ts +1 -14
- package/src/components/editor/code/scss/_editor.scss +22 -54
- package/src/components/editor/code/scss/_features.scss +28 -70
- package/src/components/editor/code/scss/_minimap.scss +29 -0
- package/src/components/editor/code/scss/_services.scss +19 -30
- package/src/components/editor/code/scss/index.scss +1 -2
- package/src/components/editor/code/scss/variables.scss +217 -56
- package/src/components/editor/code/search.ts +1 -1
- package/src/components/editor/code/services/completion.ts +1 -0
- package/src/components/editor/code/services/hover.ts +1 -0
- package/src/components/editor/code/services/index.ts +1 -1
- package/src/components/editor/code/services/model.ts +1 -1
- package/src/components/editor/code/services/session.ts +1 -4
- package/src/components/editor/code/syntax.ts +1 -1
- package/src/components/editor/code/view.ts +0 -1
- package/src/components/editor/diffs/merge.ts +3 -3
- package/src/components/editor/diffs/render.ts +2 -17
- package/src/components/editor/diffs/scss/_diffs.scss +41 -129
- package/src/components/editor/diffs/scss/_merge.scss +9 -41
- package/src/components/editor/diffs/scss/index.scss +1 -1
- package/src/components/editor/diffs/scss/variables.scss +141 -13
- package/src/components/editor/diffs/view.ts +4 -5
- package/src/components/editor/markdown/editing.ts +1 -1
- package/src/components/editor/markdown/erase.ts +3 -3
- package/src/components/editor/markdown/format.ts +517 -0
- package/src/components/editor/markdown/html.ts +1 -1
- package/src/components/editor/markdown/index.ts +3 -67
- package/src/components/editor/markdown/inline.ts +9 -6
- package/src/components/editor/markdown/layout.ts +1 -1
- package/src/components/editor/markdown/model.ts +2 -17
- package/src/components/editor/markdown/render.ts +6 -8
- package/src/components/editor/markdown/scss/index.scss +157 -100
- package/src/components/editor/markdown/scss/variables.scss +241 -36
- package/src/components/editor/markdown/template.ts +69 -0
- package/src/components/editor/markdown/toolbar.ts +628 -0
- package/src/components/editor/markdown/view.ts +121 -10
- package/src/components/editor/tree/drag.ts +19 -15
- package/src/components/editor/tree/find.ts +5 -4
- package/src/components/editor/tree/icons.ts +1 -1
- package/src/components/editor/tree/index.ts +3 -3434
- package/src/components/editor/tree/scss/index.scss +261 -294
- package/src/components/editor/tree/scss/variables.scss +263 -65
- package/src/components/editor/tree/sticky.ts +1 -1
- package/src/components/editor/tree/template.ts +3436 -0
- package/src/components/editor/viewer/index.ts +3 -318
- package/src/components/editor/viewer/model.ts +1 -14
- package/src/components/editor/viewer/scss/_viewer.scss +31 -97
- package/src/components/editor/viewer/scss/variables.scss +56 -16
- package/src/components/editor/viewer/template.ts +323 -0
- package/src/components/editor/workspace/index.ts +4 -1480
- package/src/components/editor/workspace/model.ts +225 -185
- package/src/components/editor/workspace/navigate.ts +3 -6
- package/src/components/editor/workspace/scss/_keybindings.scss +165 -0
- package/src/components/editor/workspace/scss/_status.scss +65 -0
- package/src/components/editor/workspace/scss/_tabs.scss +60 -0
- package/src/components/editor/workspace/scss/index.scss +105 -330
- package/src/components/editor/workspace/scss/variables.scss +431 -0
- package/src/components/editor/workspace/session.ts +96 -53
- 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 +1477 -0
- package/src/components/error/index.ts +36 -15
- package/src/components/error/scss/index.scss +35 -64
- package/src/components/error/scss/variables.scss +29 -9
- package/src/components/filter/index.ts +147 -104
- package/src/components/filter/scss/index.scss +9 -2
- package/src/components/filter/scss/variables.scss +6 -6
- package/src/components/form/action.ts +1 -1
- package/src/components/form/index.ts +4 -1
- package/src/components/frame/scss/index.scss +37 -44
- package/src/components/frame/scss/variables.scss +31 -19
- package/src/components/grid/scss/index.scss +3 -2
- package/src/components/grid/scss/variables.scss +1 -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 +16 -46
- package/src/components/heatmap/scss/index.scss +48 -49
- package/src/components/heatmap/scss/variables.scss +74 -51
- package/src/components/highlight/index.ts +133 -120
- package/src/components/highlight/scss/index.scss +43 -45
- package/src/components/highlight/scss/variables.scss +70 -31
- package/src/components/icon/index.ts +7 -9
- package/src/components/icon/scss/index.scss +9 -2
- package/src/components/icon/scss/variables.scss +2 -0
- package/src/components/image/index.ts +4 -2
- package/src/components/image/lazyload.ts +1 -1
- package/src/components/image/scss/index.scss +18 -25
- package/src/components/image/scss/variables.scss +31 -12
- package/src/components/index.ts +6 -7
- package/src/components/inline-edit/index.ts +9 -7
- package/src/components/inline-edit/rich.ts +88 -1401
- package/src/components/inline-edit/scss/index.scss +125 -381
- package/src/components/inline-edit/scss/variables.scss +153 -92
- package/src/components/inline-edit/status.ts +8 -4
- package/src/components/input/field.ts +2 -2
- package/src/components/input/scrub.ts +1 -5
- package/src/components/input/scss/_field.scss +1 -1
- package/src/components/input/scss/_scrub.scss +21 -25
- package/src/components/input/scss/_tag.scss +28 -46
- package/src/components/input/scss/index.scss +1 -2
- package/src/components/input/scss/variables.scss +160 -77
- package/src/components/input/tag.ts +65 -56
- package/src/components/json/download.ts +2 -1
- package/src/components/json/index.ts +4 -1
- package/src/components/link/scss/index.scss +1 -5
- package/src/components/link/scss/variables.scss +5 -1
- package/src/components/loading/index.ts +1 -1
- package/src/components/loading/scss/index.scss +7 -27
- package/src/components/loading/scss/variables.scss +7 -10
- package/src/components/marquee/index.ts +36 -31
- package/src/components/marquee/scss/index.scss +37 -29
- package/src/components/marquee/scss/variables.scss +35 -24
- package/src/components/marquee/velocity.ts +7 -3
- package/src/components/metric/flash.ts +3 -2
- package/src/components/metric/index.ts +5 -13
- package/src/components/metric/scss/_flash.scss +129 -144
- package/src/components/metric/scss/index.scss +38 -48
- package/src/components/metric/scss/variables.scss +196 -102
- package/src/components/nav/index.ts +1 -1
- package/src/components/nav/scss/index.scss +47 -49
- package/src/components/nav/scss/variables.scss +59 -64
- package/src/components/nav/spy.ts +15 -6
- package/src/components/nav/toc.ts +11 -31
- package/src/components/nav/tree.ts +77 -47
- package/src/components/notification/index.ts +115 -89
- package/src/components/notification/scss/index.scss +91 -75
- package/src/components/notification/scss/variables.scss +55 -38
- package/src/components/overlay/index.ts +211 -139
- package/src/components/overlay/popup.ts +89 -52
- package/src/components/overlay/scss/index.scss +152 -189
- package/src/components/overlay/scss/variables.scss +54 -23
- package/src/components/page/scss/variables.scss +1 -1
- package/src/components/pagination/cards.ts +1 -1
- package/src/components/pagination/index.ts +1 -7
- package/src/components/pagination/scss/index.scss +191 -7
- package/src/components/pagination/scss/variables.scss +128 -40
- package/src/components/panels/dnd.ts +190 -0
- package/src/components/panels/group.ts +429 -0
- package/src/components/panels/index.ts +676 -0
- package/src/components/panels/model.ts +675 -0
- package/src/components/panels/resize.ts +157 -0
- package/src/components/panels/scss/index.scss +379 -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 +149 -0
- package/src/components/preview/scss/index.scss +158 -0
- package/src/components/preview/scss/variables.scss +149 -0
- package/src/components/preview/source.ts +73 -0
- package/src/components/preview/stage.ts +33 -0
- package/src/components/progress/scss/index.scss +120 -15
- package/src/components/progress/scss/variables.scss +144 -41
- package/src/components/progress/text.ts +11 -9
- package/src/components/radio/index.ts +2 -4
- package/src/components/range/filter.ts +16 -22
- package/src/components/range/index.ts +2 -9
- package/src/components/range/scss/_filter.scss +300 -325
- package/src/components/range/scss/_slider.scss +32 -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 +361 -71
- package/src/components/relative-time/index.ts +22 -28
- package/src/components/relative-time/scss/index.scss +17 -21
- package/src/components/relative-time/scss/variables.scss +51 -30
- package/src/components/root/scss/index.scss +14 -20
- package/src/components/root/scss/variables.scss +24 -22
- package/src/components/select/expand.ts +272 -0
- package/src/components/select/index.ts +155 -110
- package/src/components/select/scss/index.scss +99 -54
- package/src/components/select/scss/variables.scss +141 -19
- package/src/components/shell/index.ts +344 -0
- package/src/components/shell/scss/index.scss +201 -0
- package/src/components/shell/scss/variables.scss +89 -0
- package/src/components/shortcut-recorder/index.ts +20 -20
- package/src/components/shortcut-recorder/scss/index.scss +78 -58
- package/src/components/shortcut-recorder/scss/variables.scss +48 -25
- package/src/components/sortable/index.ts +25 -27
- package/src/components/sortable/scss/index.scss +59 -63
- package/src/components/sortable/scss/variables.scss +81 -52
- package/src/components/story/index.ts +111 -83
- package/src/components/story/scss/index.scss +26 -107
- package/src/components/story/scss/variables.scss +52 -22
- package/src/components/surface-field/engine.ts +71 -72
- package/src/components/surface-field/index.ts +32 -37
- package/src/components/surface-field/scss/index.scss +36 -52
- package/src/components/surface-field/scss/variables.scss +89 -23
- package/src/components/surface-field/surface.ts +4 -3
- package/src/components/switch/index.ts +2 -4
- package/src/components/tasklist/index.ts +9 -8
- package/src/components/tasklist/scss/index.scss +28 -32
- package/src/components/tasklist/scss/variables.scss +31 -32
- package/src/components/textarea/index.ts +50 -91
- package/src/components/textarea/scss/index.scss +28 -21
- package/src/components/textarea/scss/variables.scss +17 -2
- package/src/components/theme/cards.ts +19 -0
- package/src/components/theme/index.ts +68 -19
- package/src/components/theme/reveal.ts +190 -0
- package/src/components/theme/scss/index.scss +122 -0
- package/src/components/theme/scss/variables.scss +155 -16
- package/src/components/theme/shared.ts +57 -0
- package/src/components/theme/swatches.ts +15 -0
- package/src/components/theme/toggle.ts +47 -0
- package/src/components/toast/index.ts +16 -17
- package/src/components/toast/scss/index.scss +193 -155
- package/src/components/toast/scss/variables.scss +195 -53
- package/src/components/tooltip/menu.ts +194 -117
- package/src/components/tooltip/onclick.ts +16 -21
- package/src/components/tooltip/onhover.ts +5 -8
- package/src/components/tooltip/scss/index.scss +561 -85
- package/src/components/tooltip/scss/variables.scss +243 -72
- package/src/components/tooltip/shared.ts +129 -85
- package/src/components/tooltip/utilities.ts +75 -24
- package/src/components/typewriter/index.ts +7 -10
- package/src/components/typewriter/rotate.ts +26 -31
- package/src/components/typewriter/scss/index.scss +133 -3
- package/src/components/typewriter/scss/variables.scss +56 -44
- package/src/components/uptime/index.ts +13 -19
- package/src/components/uptime/scss/index.scss +99 -126
- package/src/components/uptime/scss/variables.scss +101 -55
- package/src/components/usage-meter/index.ts +1 -1
- package/src/components/usage-meter/scss/index.scss +19 -22
- package/src/components/usage-meter/scss/variables.scss +80 -36
- package/src/css-utilities/absolute.scss +54 -52
- package/src/css-utilities/background.scss +29 -23
- package/src/css-utilities/border.scss +24 -21
- package/src/css-utilities/box-shadow.scss +33 -21
- package/src/css-utilities/color.scss +34 -22
- package/src/css-utilities/disabled.scss +12 -0
- package/src/css-utilities/flex.scss +55 -53
- package/src/css-utilities/font/geist/index.scss +2 -1
- package/src/css-utilities/font/montserrat/index.scss +1 -1
- package/src/css-utilities/group.scss +6 -0
- package/src/css-utilities/hidden.scss +22 -20
- package/src/css-utilities/icon.scss +33 -30
- package/src/css-utilities/layer.scss +12 -11
- package/src/css-utilities/reset.scss +27 -16
- package/src/css-utilities/skeleton.scss +4 -1
- package/src/css-utilities/surface.scss +217 -150
- package/src/css-utilities/text.scss +115 -115
- package/src/modifiers/background/scss/index.scss +1 -0
- package/src/modifiers/background/scss/variables.scss +22 -0
- package/src/modifiers/border/scss/index.scss +1 -0
- package/src/modifiers/border/scss/variables.scss +19 -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/disabled/scss/index.scss +5 -0
- package/src/modifiers/glass/index.ts +2 -1
- package/src/modifiers/glass/scss/index.scss +8 -11
- package/src/modifiers/glass/scss/variables.scss +1 -0
- package/src/modifiers/scrollbar/index.ts +94 -113
- package/src/modifiers/scrollbar/scss/index.scss +23 -4
- package/src/modifiers/scrollbar/scss/variables.scss +6 -5
- package/src/normalize/scss/index.scss +1 -0
- package/src/shared/anchor.ts +1 -1
- package/src/shared/animation.ts +9 -7
- package/src/shared/dispatch.ts +42 -0
- package/src/shared/drag.ts +10 -4
- package/src/shared/press.ts +7 -5
- package/src/shared/resize.ts +4 -35
- package/src/shared/scss/list.scss +1 -2
- package/src/shared/transition.ts +2 -2
- package/src/shared/visible.ts +3 -35
- package/src/tokens/scss/color.scss +50 -38
- package/src/tokens/scss/focus.scss +5 -0
- package/src/tokens/scss/font-size.scss +1 -2
- package/src/tokens/scss/index.scss +1 -1
- package/src/tokens/scss/scale.scss +4 -8
- package/src/tokens/scss/size.scss +3 -3
- package/src/tokens/scss/spacer.scss +1 -1
- package/src/tokens/scss/state.scss +25 -29
- 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/vite-env.d.ts +1 -1
- package/vite.config.ts +10 -8
- 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.d.ts +0 -23
- package/build/components/copy/index.js +0 -61
- package/build/components/copy/scss/index.scss +0 -2
- package/build/components/datalist/index.d.ts +0 -42
- package/build/components/datalist/index.js +0 -186
- package/build/components/datalist/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/inline-edit/format.d.ts +0 -29
- package/build/components/inline-edit/format.js +0 -112
- package/build/components/inline-edit/history.d.ts +0 -14
- package/build/components/inline-edit/history.js +0 -40
- package/build/components/inline-edit/markdown.d.ts +0 -7
- package/build/components/inline-edit/markdown.js +0 -314
- package/build/components/inline-edit/model.d.ts +0 -61
- package/build/components/inline-edit/model.js +0 -192
- package/build/components/inline-edit/selection.d.ts +0 -7
- package/build/components/inline-edit/selection.js +0 -114
- package/build/components/inline-edit/utilities.d.ts +0 -4
- package/build/components/inline-edit/utilities.js +0 -12
- 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/build/components/sticky-header/index.d.ts +0 -2166
- package/build/components/sticky-header/index.js +0 -58
- package/build/components/sticky-header/scss/index.scss +0 -2
- package/build/components/theme-picker/index.d.ts +0 -52
- package/build/components/theme-picker/index.js +0 -167
- package/build/components/theme-picker/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/index.scss +0 -148
- 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/datalist/index.ts +0 -256
- package/src/components/datalist/scss/index.scss +0 -104
- package/src/components/datalist/scss/variables.scss +0 -33
- package/src/components/editor/workspace/scss/keybindings.scss +0 -190
- package/src/components/editor/workspace/scss/status.scss +0 -122
- package/src/components/editor/workspace/scss/tabs.scss +0 -56
- package/src/components/highlight/easing.ts +0 -33
- package/src/components/inline-edit/format.ts +0 -183
- package/src/components/inline-edit/history.ts +0 -71
- package/src/components/inline-edit/markdown.ts +0 -485
- package/src/components/inline-edit/model.ts +0 -366
- package/src/components/inline-edit/selection.ts +0 -188
- package/src/components/inline-edit/utilities.ts +0 -18
- 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/sticky-header/index.ts +0 -78
- package/src/components/sticky-header/scss/index.scss +0 -140
- package/src/components/sticky-header/scss/variables.scss +0 -46
- package/src/components/theme-picker/index.ts +0 -231
- package/src/components/theme-picker/scss/index.scss +0 -264
- package/src/components/tooltip/scss/_center.scss +0 -9
- package/src/components/tooltip/scss/_east.scss +0 -33
- package/src/components/tooltip/scss/_menu.scss +0 -367
- package/src/components/tooltip/scss/_north.scss +0 -33
- package/src/components/tooltip/scss/_shared.scss +0 -109
- package/src/components/tooltip/scss/_south.scss +0 -33
- package/src/components/tooltip/scss/_west.scss +0 -33
- 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
package/README.md
CHANGED
|
@@ -57,36 +57,32 @@ html`
|
|
|
57
57
|
| `checkbox` | Checkbox with label; `checkbox.group` builds a checklist with a select-all header (mixed state), optional counter, and Shift-click ranges | `checkbox.group` |
|
|
58
58
|
| `radio` | Radio button group | - |
|
|
59
59
|
| `range` | Range slider; add `class: 'range--slider'` to `range` or `range.filter` for the compact slider appearance (replaces the standalone `slider` component); `orientation: 'vertical'` supports vertical single and dual thumbs, with height set by `--vertical-size` (default `176px`); `range.filter` is a range filter with rolling-digit values, a Clear button, a ghost preview of where a click would stretch the selection, and scale ticks; a number `value` gives one thumb, a pair gives two that stop at each other; `fields` adds editable min/max `input` fields, `disabled`; `state.low`/`state.high`, `format`, `prefix`, `step`, `ticks` | `range.filter` |
|
|
60
|
-
| `
|
|
61
|
-
| `select` | Dropdown with custom options; `select.menu` is a tooltip-powered macOS-style listbox opening with the selected option over the trigger, with typeahead and hover scrolling. Its surface, checks, and animations are reusable on tooltips with `--select-menu` | `select.menu` |
|
|
60
|
+
| `select` | Dropdown with custom options; `select.menu` is a tooltip-powered macOS-style listbox opening with the selected option over the trigger, with typeahead and hover scrolling. Its surface, checks, and animations are reusable on tooltips with `--select-menu`. `select.expand` is a compact single choice: a button showing the current option that morphs into a row of every option over itself (`openOn: 'click' \| 'hover'`) | `select.menu`, `select.expand` |
|
|
62
61
|
| `switch` | Toggle switch; `switch.group` builds the same group as `checkbox.group` with switches, the select-all knob resting midway when mixed | `switch.group` |
|
|
63
62
|
| `tasklist` | Checklist that strikes through checked tasks and moves them below the open ones; `ordered` keeps both groups in task order, `sortable` lets rows be dragged within their group | `tasklist.checkbox`, `tasklist.content`, `tasklist.description`, `tasklist.item`, `tasklist.label`, `tasklist.row` |
|
|
64
63
|
| `form` | Form wrapper | `form.action`, `form.input` |
|
|
65
64
|
| `cc` | Payment card form (`input` fields) with a live card preview that flips for the CVC, brand detection, caret-safe formatting and Luhn/expiry validation; `onvalid` receives brand, last 4, expiry and name | `cc.field`, `cc.submit` |
|
|
66
|
-
| `colorPicker` | Saturation pad, hue/opacity sliders (`range`), hex field (`input`) with a `copy
|
|
65
|
+
| `colorPicker` | Saturation pad, hue/opacity sliders (`range`), hex field (`input`) with a `button.copy`, and an animated recent-colors row (hidden while empty; `recent: false` leaves it out entirely); `value` is required, no surface of its own, so place it in a `card` | `colorPicker.swatch` |
|
|
67
66
|
| `inlineEdit` | Click-to-edit text that swaps in an `input` (or `textarea` with `multiline`) without moving a glyph; Enter/blur saves, Escape cancels, `onsave` fires. `inlineEdit.rich` edits markdown in place as a controlled editor: the text is a document of blocks and marks rendered by the template, every input (typing, deleting, Enter, formatting, paste, drop, an input method's composition) changes that document rather than the DOM, and it keeps its own undo/redo (Mod+Z, Mod+Shift+Z/Mod+Y). `features` whitelists what each field allows (bold, italic, strike, code, highlight, link, heading, quote, codeblock, bullet, ordered, task, clear, copy), and only those appear in its selection toolbar, shortcuts, pastes and saved markdown. `status: true` (or a `{ phase, savedAt }` object to read or drive it) shows the save status under either field: unsaved while the edit differs, saving while a promise returned by `onsave` is pending, then saved, rolling to "Saved 3 min ago" | `inlineEdit.display`, `inlineEdit.field`, `inlineEdit.status`, `inlineEdit.rich.editor`, `inlineEdit.rich.status`, `inlineEdit.rich.toolbar`, `inline-edit--seamless` |
|
|
68
67
|
|
|
69
68
|
### Interactive
|
|
70
69
|
| Component | Description | Variants |
|
|
71
70
|
|-----------|-------------|----------|
|
|
72
|
-
| `button` | Standard button
|
|
73
|
-
| `tooltip` | Popup content; `tooltip.onhover` also opens on keyboard focus and closes on Escape, and `tooltip.onhover.trigger({ delay, state })` is the same behaviour to spread on your own `.tooltip` element; `delay: { open?, close? }` (ms, on `tooltip.onhover` and `tooltip.shared`; each left out is instant) holds the pointer before opening and after leaving, and for 500ms after a delayed tooltip closes the next opens at once, without its entrance; `tooltip.menu` is a keyboard menu (arrows, Home/End, Escape returns focus, Tab closes) that closes once an option is chosen; `tooltip.nestedMenu({ animate, items, onnavigate, state })` is a drill-down menu whose `items` nest to any depth: a branch's panel grows out of its row over the dimmed parent, and its header or the parent's scrim goes back; arrows/Home/End move, Right/Left drill and return, Escape goes back a level then closes (`animate: false` skips the motion, `tooltip.nestedMenu.trigger` styles the button); `tooltip.shared({ delay, direction, dismiss, interactive, keep, state })` is one tooltip for any number of triggers: spread `tip.bind(content)` on a trigger (a string, or a function returning a template, rendered on every open unless `keep`), or `tip.delegate({ content, edge, selector })` on a container to make every matching descendant a trigger (default `[data-tooltip]`, its value the content; `edge` lines the tooltip up past the container's edge), and place `tip.render(
|
|
71
|
+
| `button` | Standard button, filled by `button--black`, `button--primary` (the theme's ink, lettered in the page color), `button--surface` (its raised surface), `button--surface-primary` or `button--white`; `button.copy` is an icon button copying `value` (a string or a function read on click) whose copy icon turns into a check that draws in, then back after `timeout` ms (default `3000`), with `label`, `success` and `error` as its accessible name per state; `button.faces(status, faces)` stacks keyed faces in one grid cell and shows the one whose `key` matches `status()`; `button.morph` runs an async `onaction` through idle, loading, success and error, carrying the status as a `button--morph-{status}` class (also readable through a passed `state`), collapsing to a circle while `compact(status)` holds (default: loading and success), shaking on error and announcing `announce[status]`; its content is yours, layered with `button-morph-text` (mark the shown one `--active`) and `button-morph-icon--loading` / `--success`; `button.morph.save` is the ready-made save (`onsave`, `label`, `retryLabel`) that morphs into a spinner circle and confirms with a check, coloured by its `--background-default` | `button.copy`, `button.faces`, `button.morph`, `button.morph.save`, `button--black`, `button--primary`, `button--surface`, `button--surface-primary`, `button--white` |
|
|
72
|
+
| `tooltip` | Popup content; `tooltip.onhover` also opens on keyboard focus and closes on Escape, and `tooltip.onhover.trigger({ delay, state })` is the same behaviour to spread on your own `.tooltip` element; `delay: { open?, close? }` (ms, on `tooltip.onhover` and `tooltip.shared`; each left out is instant) holds the pointer before opening and after leaving, and for 500ms after a delayed tooltip closes the next opens at once, without its entrance; `tooltip.menu` is a keyboard menu (arrows, Home/End, Escape returns focus, Tab closes) that opens in the top layer, above every stacking context around it, and closes once an option is chosen, `highlight` (default `false`; `true` or the highlight's own attributes) glides a layer between its rows on hover and keyboard focus in place of each item's own fill, its panels a surface whose item hover and pressed fills and highlight are surface primary, `tooltip-menu--surface` restoring that fill on the menu or any ancestor (such as a `button.split`); `tooltip.nestedMenu({ animate, items, onnavigate, state })` is a drill-down menu whose `items` nest to any depth: a branch's panel grows out of its row over the dimmed parent, and its header or the parent's scrim goes back; arrows/Home/End move, Right/Left drill and return, Escape goes back a level then closes (`animate: false` skips the motion, `tooltip.nestedMenu.trigger` styles the button); `tooltip.shared({ delay, direction, dismiss, interactive, keep, state, ...attributes })` is one tooltip for any number of triggers: spread `tip.bind(content)` on a trigger (a string, or a function returning a template, rendered on every open unless `keep`), or `tip.delegate({ content, edge, selector })` on a container to make every matching descendant a trigger (default `[data-tooltip]`, its value the content; `edge` lines the tooltip up past the container's edge), and place `tip.render()` once, carrying the remaining attributes; it opens in the top layer beside the trigger, flips when out of room, and glides between triggers while its content slides in the direction of travel; `interactive` makes it a card the pointer can enter, toggled by taps and keys, with Tab carried into it; `keep` mounts each bound trigger's content on its first open and keeps it for reopening until that trigger unmounts; `dismiss` is a selector whose clicks inside close it (`'a[href]'` for navigation); `state.active` is whether it is open and `state.index` which bound trigger, numbered in `bind()` order (-1 for none), and setting it opens that trigger | `tooltip.context`, `tooltip.menu`, `tooltip.nestedMenu`, `tooltip.onclick`, `tooltip.onhover`, `tooltip.onhover.trigger`, `tooltip.shared`, `tooltip-menu--surface` |
|
|
74
73
|
| `accordion` | Collapsible sections driven by `state.active`; `group` (from `accordion.group()`) keeps at most one member open, closing the rest when one opens, and `accordion.group({ required: true })` keeps exactly one open, reopening a member closed while nothing else is. Several opened at once leave the last to join or open; a required group opens its first member when none starts open. Members join while mounted | `accordion.group` |
|
|
75
|
-
| `clipboard` |
|
|
76
|
-
| `copy` | Icon button copying `value` (a string or a function read on click); the copy icon turns into a check that draws in, then back after `timeout` ms (default `3000`); `label`, `success` and `error` set its accessible name per state | - |
|
|
74
|
+
| `clipboard` | `clipboard.write(value)` copies text, resolving `true` once it lands and `false` if the browser refuses | `clipboard.write` |
|
|
77
75
|
| `command` | ⌘K/Ctrl+K command palette on `overlay` + `input`: substring-then-subsequence matching with highlighted runs, grouped results, arrow/Enter keys, `onrun`; `tabs` adds a row of tabs under the search, marked by `highlight`, whose views are `frame--swap`s, drifting in from their side, and cycle with Tab/Shift+Tab (All leads with recent commands, persisted through any `store` implementing `get`/`set`, then lists every command; each command group gets its own tab; a Shortcuts tab lists `shortcuts`); setting `state.tab` (`'all'`, `'shortcuts'` or a group name) switches views and clears the search. `render(groups)` supplies custom result markup: each item exposes its `label`, highlighted `content`, command `id`, and `attributes` to spread onto the option element so selection and keyboard navigation keep working. Icons are sprite ids; `.command-trigger` also styles standalone search buttons | `command.dialog` (e.g. `overlay--blur`), `command.input`, `command.option`, `command.trigger`, `command--centered` |
|
|
78
76
|
| `editor` | Editor family under one namespace. `editor.code` is a source editor on a persistent native textarea editing an `EditorDocument` that keeps its own undo history: syntax colors (TypeScript/TSX, JavaScript, CSS/SCSS, HTML, JSON, Python, Markdown), line numbers, multiple and rectangular selections, find/replace, go to line, folding, wrap, visible whitespace and a minimap; `options.services` adds completion, hover and diagnostics from a language-server `transport` (or completes from the document's own words); `editor.markdown` renders Markdown in place and edits one block at a time; `editor.code` adds sticky scroll, color swatches, links, unicode warnings, rulers, a git gutter (`baseline`), keybinding overrides (`keybindings`, exported `commands`) and merge-conflict lenses; `editor.tree` is the file tree, with drops from the desktop (`operations.import`), dragging files out (`export`) and next/previous change or problem; `editor.diffs` is a split or unified diff viewer and `editor.diffs.merge` a three-way merge editor; `editor.workspace` combines them with an explorer, tabs, quick open and file operations over a host you supply; `editor.viewer` shows source read-only with syntax colors, line numbers, folding, wrap, visible whitespace, a minimap and an optional copy button, without the editor (import `@esportsplus/ui/editor/viewer` directly to leave the rest of the family out of the bundle) | `editor.code`, `editor.diffs`, `editor.diffs.merge`, `editor.markdown`, `editor.tree`, `editor.viewer`, `editor.workspace` |
|
|
79
77
|
| `alert` | Notifications | error, info, success types |
|
|
80
|
-
| `chatMinimap` | Rail of lines mapping a conversation, one per turn: the hovered line swells its two neighbours either side, one gliding `tooltip.shared` card previews each turn's `title` and `description`, previous/next buttons step through the thread, and `state` (`start`/`end`) lights the turns in view. `turns` may be a `ReactiveArray` so the rail grows with the chat; `chatMinimap.spy({ state, turns })` drives `state` from an `IntersectionObserver` on the thread and its `scrollTo` is the `onnavigate` | `chatMinimap.item`, `side: 'left'` |
|
|
81
|
-
| `dock` | macOS-style
|
|
82
|
-
| `card.expand` | List of `card--expand` cards that each morph into their own `card` `overlay` and fly back into their slot through a view transition (a plain `overlay` fade where unsupported, a cross-fade under reduced motion); `state.open` is two-way | `card.expand.trigger` |
|
|
78
|
+
| `chatMinimap` | Rail of lines mapping a conversation, one per turn: the hovered line swells its two neighbours either side, one gliding `tooltip.shared` card previews each turn's `title` and `description`, previous/next buttons step through the thread, and `state` (`start`/`end`) lights the turns in view. `turns` may be a `ReactiveArray` so the rail grows with the chat; `chatMinimap.spy({ state, turns })` drives `state` from an `IntersectionObserver` on the thread and its `scrollTo` is the `onnavigate` | `chatMinimap.card`, `chatMinimap.description`, `chatMinimap.item`, `chatMinimap.items`, `chatMinimap.label`, `chatMinimap.line`, `chatMinimap.nav`, `chatMinimap.preview`, `chatMinimap.title`, `side: 'left'` |
|
|
79
|
+
| `dock` | macOS-style shelf, unpainted so it is themed where it is placed, whose icons swell toward the cursor on a spring, with one delayed `tooltip.shared` label gliding between its items, items showing an `icon` (a sprite id or a function rendering it) or a `thumbnail` image covering the button, each optionally shaped by its own `modifier` (`plain` for the icon alone, `square`, `squircle`), sortable by drag, with `arrows` paging through whole icons once they outgrow the room the dock has; `direction` (`n`, `s`, `e`, `w`) sets the side the launcher and labels open toward and the way icons swell, east and west standing the dock upright; given `apps`, an 'All apps' button opens a launcher on that side, centered on the dock as a `tooltip-content`, laid out like `command`: a search (an `input`), the apps in a grid the arrow keys walk and Enter opens, and a legend of its keys; the dock and the launcher sort into each other, so dragging moves apps in and out of `items` (`state.active` opens it, `onsort` reports each move), and a hop-and-squash launch that lights a running dot (per-item `state.running`, `onlaunch`) | `dock.button`, `dock.launcher`, `dock--plain`, `dock--square`, `dock--squircle` |
|
|
83
80
|
| `pagination.dots` | Page indicator driven by a continuous `state.progress`; the pill stretches between dots like a worm, with an optional autoplay countdown | `pagination.dots.dot`, `pagination--dots-large` |
|
|
84
81
|
| `pagination.cards` | Previous and next links as two cards, each a small `label` (default 'Previous'/'Next'), a `title` and an optional `description`; the chevron nudges the way it points on hover and focus, and a lone next card keeps the right column | `{ next, previous }`, each `{ description?, href, label?, title }` |
|
|
85
82
|
| `pagination.arrows` | The same links as two square arrow buttons; a missing side stays in place, disabled, so the pair never shifts | `{ next, previous }` |
|
|
86
|
-
| `nav` | `nav.tree` link tree
|
|
87
|
-
| `pullToRefresh` | Rubber-band pull gesture (touch and mouse) with a stepped tick spinner; new items above the old first one slide in | - |
|
|
83
|
+
| `nav` | `nav.tree` link tree marking the active link with a gliding `highlight`: given its attributes as `[nav.tree.highlight]`, left out for none: a pill, or with a `border` a `highlight--rail` along a rail on that edge; `nav.toc` table of contents, a `nav.tree` of one group with `{ border: 'left', fill: false }`; `nav.spy(ids)` marks the section in view within whichever ancestor scrolls it | `nav.tree`, `nav.toc`, `nav.spy` |
|
|
88
84
|
| `sortable` | Drag-and-drop reordering of a reactive list's items, across lists with `group` | `sortable--{effect}` modifiers |
|
|
89
|
-
| `story` | Auto-advancing stories, each any `Renderable`, on a `frame--slide` track with segmented progress bars whose CSS fill is the timer (`--duration`, or `duration` in ms); tap the left third to go back (replaying the first story) and the rest to advance, drag or flick between stories (rubber-banding at the ends), press-and-hold or Space to pause; links and controls inside a story keep their own clicks |
|
|
85
|
+
| `story` | Auto-advancing stories, each any `Renderable`, on a `frame--slide` track filling the card, with segmented progress bars overlaid on top whose CSS fill is the timer (`--duration`, or `duration` in ms); tap the left third to go back (replaying the first story) and the rest to advance, drag or flick between stories (rubber-banding at the ends), press-and-hold, hover or Space to pause; past the last story, `repeat` returns to the first (dragging it in after the last), otherwise it stops with its bar full; `state.done` turns true the first time the last story is finished; links and controls inside a story keep their own clicks | |
|
|
90
86
|
|
|
91
87
|
### Display
|
|
92
88
|
| Component | Description |
|
|
@@ -95,14 +91,17 @@ html`
|
|
|
95
91
|
| `loader` | Loading spinner |
|
|
96
92
|
| `loading` | Border loading indicator |
|
|
97
93
|
| `typewriter` | Animated typing effect; `typewriter.retype` is a headline word that is selected and typed over with a jittered, human rhythm, landing whole words under reduced motion. Both share the caret variables and `--block`/`--hard`/`--underscore` modifiers. `typewriter.rotate` is a rotating word (`state.index`, `state.paused`) whose shared letters glide into place while the others blur out and in; `typewriter-rotate--accent` |
|
|
98
|
-
| `
|
|
94
|
+
| `group` | Row of items on `%group`, spaced by `--gap-horizontal` / `--gap-vertical` (a quarter of `--size-100`); attributes under `[group.highlight]` add a `highlight` behind the items, none without them; `button--group` items make a segmented control, medium weight while `--active` | `group.highlight` |
|
|
95
|
+
| `preview` | An example's card that mounts its content once near the viewport and answers its hash (and its `anchors`) by revealing itself; its parts compose inside it, sharing one `preview.state()`: `preview.header` (numbered title plus controls), `preview.stage` (renders the example untracked, hidden while the source shows), `preview.source` (loads, caches and retries a source on the code view) and `preview.code` (a flush `editor.viewer` with a copy button). `preview.buttons` sits just above the card, a `group` of view buttons from `{ content, view }` items | `preview.buttons`, `preview.code`, `preview.header`, `preview.source`, `preview.stage`, `preview.state` |
|
|
96
|
+
| `panels` | Tabbed groups of surfaces in resizable splits, from a `catalog` of kinds (`title`, `render`, optional `icon`, `description`, `shortcut`, `multiple`) and a `panels.state()` holding the layout (`root`, optional `storage` key to persist it); `icons: true` shows tabs as their kind's icon alone, closed from their menu. Tabs drag to reorder, into another group, onto a group's half to split it, or onto the bottom strip to dock a full-width bottom group; separators resize, a double-clicked header maximizes, groups clicked with Ctrl (⌘ on Apple platforms) held fill the layout together once it is let go (Esc cancels) until a double click steps back out, and tabs carry a close menu. `+` and an empty group's launcher open a kind. Each surface renders once and moves between slots, keeping its state until its tab closes | `panels.state` |
|
|
97
|
+
| `highlight` | Layer that glides behind its parent's children on hover and focus and rests on the `--active` one (`target` for nested items, `hover: false` for the active layer only); `border: 'bottom' \| 'left' \| 'right' \| 'top'` adds an edge border to the active layer with both fills kept `--border-inset-horizontal` / `--border-inset-vertical` clear of it, `fill: false` drops the active background, `--glide-tail-duration-active` longer than `--glide-duration-active` stretches it toward the next item, `--inset-horizontal` / `--inset-vertical` pull the fill in from the item; `highlight--rail` on the highlight and `highlight-rail` with `highlight-rail--{bottom,left,right,top}` on its container make tabs along a rail at `--rail-width`, the border on the same edge lying over it |
|
|
99
98
|
| `ellipsis` | Animated dots |
|
|
100
|
-
| `icon` | SVG sprite wrapper; `icon--rotate` turns it by `--rotate` (default `0deg`) with an eased transition, skipped under reduced motion |
|
|
99
|
+
| `icon` | SVG sprite wrapper, `icon(attributes, href)`: the sized box (`--size`, or `--width`/`--height`) colored by `--color`, whose `fill` the `<svg>` inherits, so a stroked icon sets `fill: none` on the box; attributes under `[icon.svg]` go on the `<svg>` itself, `class` included; `icon--rotate` turns it by `--rotate` (default `0deg`) with an eased transition, skipped under reduced motion | `icon.svg` |
|
|
101
100
|
| `number` | Number formatting |
|
|
102
101
|
| `truncate` | Text truncation |
|
|
103
102
|
| `json` | JSON display |
|
|
104
103
|
| `announcement` | Animated top-of-page container (`state.active`) built on a non-modal `overlay` in the page flow; slides its content in and collapses the space it held, with overlay's drag dismissal and background fill when pulled away from its top edge; the content and close control are the consumer's |
|
|
105
|
-
| `toaster` | `toaster(attributes)` returns `{ content, toast }`: place `content` on the page, and `toast(attributes, (state) => content)` queues into that toaster alone, so separate toasters can differ in placement and style. Placed with overlay's own placement modifiers and variables (`toaster--{n,ne,e,se,s,sw,w,nw}`, `--margin-*`, `--translate`, `--stack-peek`, `--stack-scale`); side stacks recede sideways like overlay's; collapsed it shows `limit` toasts (default 3) and an overflow card counting the rest (`overflow: (count) => content`, `toaster.overflow` attributes), and hovering fans all of them out. Content renders lazily with the toast's `state`: `state.active = false` dismisses it and changing `state.duration` keeps the time already spent; pass `state` to hold it from outside, `toast.dismiss()` clears the toaster. The timer is a CSS animation, exposed as `--
|
|
104
|
+
| `toaster` | `toaster(attributes)` returns `{ content, toast }`: place `content` on the page, and `toast(attributes, (state) => content)` queues into that toaster alone, so separate toasters can differ in placement and style. Placed with overlay's own placement modifiers and variables (`toaster--{n,ne,e,se,s,sw,w,nw}`, `--margin-*`, `--translate`, `--stack-peek`, `--stack-scale`); side stacks recede sideways like overlay's; collapsed it shows `limit` toasts (default 3) and an overflow card counting the rest (`overflow: (count) => content`, `toaster.overflow` attributes), and hovering fans all of them out. Content renders lazily with the toast's `state`: `state.active = false` dismisses it and changing `state.duration` keeps the time already spent; pass `state` to hold it from outside, `toast.dismiss()` clears the toaster. The timer is a CSS animation, exposed as `--progress` (0 to 1) and `--seconds`, that runs only on the front toast and stops while the stack is hovered. The toast is only the stacking container, so its surface is the consumer's class; it keeps a close button (`toast.close` attributes) around its content (`toast.content` attributes) |
|
|
106
105
|
| `progress` | Progress bar (`state.value`) with an optional label, percentage and a `status` line derived from the value; `progress.text` is a `progressbar` whose label fills with ink on a spring (`state.value`), with rolling digits and a drawn check on done |
|
|
107
106
|
| `heatmap` | Calendar of daily values that sweeps in by column; one `tooltip.shared` delegated across the cells renders each day through your `tooltip(day, index)` template (`describe(day)` names the cell), drag-to-scroll via `scrollbar.drag`, roving-tabindex grid keys and `heatmap.legend`; `heatmap--blue` |
|
|
108
107
|
| `relativeTime` | Self-updating `<time>` ("4 min ago") that wakes once per visible change and rolls its digits; full date in a `tooltip` on hover/focus; `state.now` pins the clock |
|
|
@@ -117,6 +116,7 @@ html`
|
|
|
117
116
|
| `frame.scss` | Sibling frames sharing one spot, the `--active` one shown: instant by default, `frame--slide` / `frame--scroll` move them like a horizontal / vertical track, `frame--swap` crossfades in place with a directional drift and blur (the `tooltip.shared` swap); shared by `command`, `tooltip.shared` and `card--morph` |
|
|
118
117
|
| `overlay` | Native `<dialog>` driven by `state.active` (Esc and backdrop click close it), placed by `overlay--c` (default), an edge (`overlay--n`, `overlay--s`, `overlay--w`, `overlay--e`) or a corner (`overlay--ne`, `overlay--se`, `overlay--sw`, `overlay--nw`, which enter and drag off by their top or bottom edge); placements slide in from their side on the iOS drawer curve and square the corners they touch unless `overlay--floating`. Every overlay but a rail drags to dismiss (toward its edge, or downward when centered) past 25% or on a flick, rubber-bands inward and fades the backdrop with the drag; when its own content scrolls, touch drags only from `overlay.handle`. Overlays opened over one another stack: each covered layer shrinks, dims and peeks out from under the one above (`--stack-scale`, `--stack-dim`, `--stack-peek`) and follows the top layer back as it is dragged away; an `overlay-page` direct child of `<body>` (or of a non-modal overlay's container) recedes the same way; `modal: false` opens without a backdrop, leaves the page interactive and sits in its positioned container; `flow: true` keeps it non-modal in the page layout, preserves focus, skips layer stacking, and collapses its parent row during vertical drag dismissal (used by `announcement`); `rail: true` keeps it open non-modal and widens it while a mouse hovers or keyboard focus is inside (or `state.active` is set) from `--width-closed` to `--max-width`, clipping rows rather than reflowing them. Motion: `overlay--fade`, `overlay--scale`, `overlay--spring`, `overlay--alert`, `overlay--blur` |
|
|
119
118
|
| `breadcrumb` | Path trail that folds middle segments into a `tooltip.menu` as space runs out, the rest sliding over as each one closes; `onnavigate` intercepts links; `separator: 'chevron' \| 'slash'` (default `'slash'`) |
|
|
119
|
+
| `shell` | App frame `shell({ left, right }, content)`: a sidebar on either edge (`Side`: `id`, `label`, `state.active`, optional `content`, `class` and `hover` to peek while the pointer rests on its edge), each with a mirrored `button.sidebar` toggle in its top corner, around a root-surface `card` the page scrolls in. A closed side's edge holds a handle that follows the pointer; dragging from the edge opens the sidebar and dragging a sidebar toward its edge closes it. Below 1024px one sidebar opens at a time; `shell.close(side)` closes one, returning focus to its toggle. `--gap-horizontal` / `--gap-vertical` inset the card from the window, `--space` sizes an open sidebar, `--slide-duration` / `--slide-easing` time the motion |
|
|
120
120
|
|
|
121
121
|
### Utility
|
|
122
122
|
| Component | Description |
|
|
@@ -157,11 +157,12 @@ frames in one grid cell so the tallest sets the height:
|
|
|
157
157
|
- `.frame--slide` / `.frame--scroll` move the frames together like a
|
|
158
158
|
horizontal / vertical track.
|
|
159
159
|
- `.frame--swap` crossfades in place, like `tooltip.shared` content: a waiting
|
|
160
|
-
frame sits one `--
|
|
160
|
+
frame sits one `--shift` off to its side, faded and blurred, so the
|
|
161
161
|
incoming frame drifts in while the outgoing one carries on out the other way.
|
|
162
|
-
Frames without an index set the direction themselves through `--
|
|
163
|
-
`--
|
|
164
|
-
|
|
162
|
+
Frames without an index set the direction themselves through `--translate-x` /
|
|
163
|
+
`--translate-y` and mark the outgoing frame `frame--swap-leaving`.
|
|
164
|
+
`--transition-duration`, `--fade-duration` and `--blur` tune it; the outgoing
|
|
165
|
+
frame takes `--fade-duration` throughout.
|
|
165
166
|
|
|
166
167
|
```html
|
|
167
168
|
<div style="overflow: hidden; --i: 1;">
|
|
@@ -332,7 +333,7 @@ plugin. `check.svg` carries no stroke styling, so set `fill: none` and a `stroke
|
|
|
332
333
|
|
|
333
334
|
Located in `tokens.scss`:
|
|
334
335
|
|
|
335
|
-
- **Colors**: `--color-{name}` (black, blue, green, grey, purple, red, white, yellow), each written once and weighted at the root as `--color-{name}-{300|400|500}`: 400 itself, 300 and 500 the mode's `color`
|
|
336
|
+
- **Colors**: `--color-{name}` (black, blue, green, grey, purple, red, white, yellow), each written once and weighted at the root as `--color-{name}-{300|400|500}`: 400 itself, 300 and 500 the mode's `color` weight (in `$themes` `weights`) lightness points lighter and darker
|
|
336
337
|
- **Theme colors**: `--color-surface`, `--color-primary-{300|400|500}` and `--color-text-{300|400|500}`, the only colors that change with the mode, declared by the theme stylesheet (see Theming)
|
|
337
338
|
- **Sizing**: `--size-{300-800}` (12px-80px)
|
|
338
339
|
- **Spacing**: `--spacing-{0-600}`
|
|
@@ -376,7 +377,8 @@ family is its own stylesheet, used where it is extended, so a stylesheet only em
|
|
|
376
377
|
`--gap-vertical` to space children.
|
|
377
378
|
- **text**: `%text`, `%text-crop` (`-top`, `-bottom`, `-first-child`, `-last-child`), `%text-gradient`,
|
|
378
379
|
`%text-line-shadow`, `%text-shiny` and `%text-truncate`.
|
|
379
|
-
- **surface**: `%surface-
|
|
380
|
+
- **surface**: `%surface-raise` / `%surface-lower` (one level up or down), `%surface` (its parent's level) and
|
|
381
|
+
`%surface-root`; all count and color without painting, and `--surface-level` pins any of them.
|
|
380
382
|
- **font/geist**, **font/montserrat**: see Fonts.
|
|
381
383
|
- **drag**, **hidden**, **icon**, **inline** and **skeleton** (painted from `--from` to `--to`).
|
|
382
384
|
|
|
@@ -402,20 +404,23 @@ Each component exposes CSS custom properties:
|
|
|
402
404
|
```typescript
|
|
403
405
|
import theme from '@esportsplus/ui/theme';
|
|
404
406
|
|
|
405
|
-
let mode = theme();
|
|
407
|
+
let mode = theme({ fallback: 'dark', store });
|
|
406
408
|
|
|
407
|
-
mode.set('
|
|
409
|
+
mode.set('light'); // 'dark' | 'light' | 'system'
|
|
408
410
|
```
|
|
409
411
|
|
|
412
|
+
`fallback` (default `'system'`) is the mode shown until the user picks one; `store` keeps their pick across reloads.
|
|
413
|
+
Picking the fallback clears the stored pick, so the page follows the site's default again.
|
|
414
|
+
|
|
410
415
|
`theme.scss` declares the only colors that change with the mode once on `:root`, as a `light-dark()` of their light and
|
|
411
416
|
dark values: `--color-surface` (the page, a 99% neutral in light and `black-400` in dark), `--color-primary-*` (its
|
|
412
417
|
opposite, `black-*` in light and `white-*` in dark), `--color-text` (text, one color, which is `--color-text-400`;
|
|
413
|
-
`--color-text-300` and `-500` derive from it in CSS, each holding the mode's `text` contrast in `$themes` against it, so
|
|
418
|
+
`--color-text-300` and `-500` derive from it in CSS, each holding the mode's `text` weight, a contrast ratio in `$themes` `weights`, against it, so
|
|
414
419
|
setting `--color-text` on `:root` moves all three). It also sets `--background`, `--color` and `color-scheme: light dark`, so with no script at all the page
|
|
415
420
|
follows the operating system.
|
|
416
421
|
|
|
417
422
|
`light-dark()` picks its side where a color is used, by that element's `color-scheme`. `data-theme="light"` or
|
|
418
|
-
`data-theme="dark"` pins it:
|
|
423
|
+
`data-theme="dark"` pins it: the theme always writes the mode showing to `<html>`, and under `'system'` that is the operating system's, updated as it changes. Any element
|
|
419
424
|
can carry the attribute to render its subtree in the other mode. Text and shadows follow the mode on their own; for
|
|
420
425
|
anything else, wrap two palette colors in `light-dark()`, such as
|
|
421
426
|
`light-dark(var(--color-white-300), var(--color-black-300))` for a surface. A palette token alone stays constant.
|
|
@@ -425,19 +430,26 @@ the `--surface-level` custom property, and reads its colors from that level inst
|
|
|
425
430
|
parent's level with a container style query, so it counts up even set directly inside another surface; levels stop at 6.
|
|
426
431
|
Its tokens follow the state names components use, `default`, `hover`, `active` and `pressed`:
|
|
427
432
|
`--surface-background-*` steps the default from `--color-surface` by the lightness points in each mode's `$themes`
|
|
428
|
-
`surface` map, raised levels lighter and
|
|
433
|
+
`surface` map, raised levels lighter and lowered ones darker (in light mode raised levels climb to white, leaving further
|
|
429
434
|
elevation to the shadow), then moves it for each state, active and hover lighter and pressed darker in both modes;
|
|
430
435
|
`--surface-border-*` moves the matching `--surface-background-*` by the mode's `border` step, darker in light and
|
|
431
436
|
lighter in dark, for lines, rings and small marks; and `--surface-shadow-*` is the
|
|
432
|
-
shadow at the layer's
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
on, that background deepened in its own hue, at the mode's shadow `opacity`;
|
|
436
|
-
|
|
437
|
+
shadow at the layer's weight, a step on Tailwind v4's `shadow-2xs` to `shadow-2xl` ladder (1 to 7), moved in each state by
|
|
438
|
+
the levels that state moves the background: heavier on hover and active, lighter when pressed. The weight follows the level (lowered layers 0, dialogs 7), written out as fixed
|
|
439
|
+
shadows for each level; include `surface.shadow($weight)` on a surface to pick another step. A shadow takes the color of what it falls
|
|
440
|
+
on, that background deepened in its own hue, at the mode's shadow `opacity`; `surface.shadow-color($share)` writes
|
|
441
|
+
that color at a share of the opacity for component shadows and scrims. `--surface-primary-{state}` is a
|
|
442
|
+
primary fill on a layer, the mode's `primary` levels below it in light and above it in dark, its states stepped from it as
|
|
443
|
+
the layer's own are; `%border-surface-primary` edges it. A quiet fill, such as a track
|
|
437
444
|
or an inline code chip, is a surface of its own a level below what holds it. Dialogs reset the stack to level 1 wherever they open. Another level is never a color to paint: a
|
|
438
|
-
component reaches it by extending `%surface-
|
|
439
|
-
`%surface-
|
|
440
|
-
|
|
445
|
+
component reaches it by extending `%surface-raise` or `%surface-lower` (one level up or down), `%surface` (its
|
|
446
|
+
parent's level) or `%surface-root`, or by setting `--surface-level` on one to pin it, so whatever sits in it reads its
|
|
447
|
+
states from the level it shows; only a layer moved up casts a shadow. None of them paint: set
|
|
448
|
+
`background`/`box-shadow` from `--surface-background-default`/`--surface-shadow-default`, or extend
|
|
449
|
+
`%background-surface`, `%border-surface` and `%box-shadow-surface` with their state placeholders for fills that step with
|
|
450
|
+
the state; `%box-shadow-surface` belongs on a surface, since any other element would show the shadow of the surface it
|
|
451
|
+
sits in. A primary fill is painted by `%background-surface-primary` and `%border-surface-primary`, and casts a shadow as
|
|
452
|
+
a surface does, by `%surface-raise` with `%box-shadow-surface`. Style queries on custom
|
|
441
453
|
properties need Chrome and Edge 111, Safari 18 or Firefox 151; elsewhere every surface keeps its parent's level. The
|
|
442
454
|
ladder and shadows live in each mode's `surface` map in `$themes` (`tokens/scss/color.scss`), with `shadow` holding its
|
|
443
455
|
`depth` and `opacity`; the Tailwind shadow ladder itself sits with the surface utilities, and `surface.shadow($weight)`
|
|
@@ -446,12 +458,12 @@ writes a fixed step's shadow.
|
|
|
446
458
|
Ready-made pickers drive the same instance:
|
|
447
459
|
|
|
448
460
|
```typescript
|
|
449
|
-
import {
|
|
461
|
+
import { theme } from '@esportsplus/ui/components';
|
|
450
462
|
|
|
451
|
-
|
|
452
|
-
//
|
|
453
|
-
|
|
454
|
-
|
|
463
|
+
theme.toggle({ mode }); // select.expand of the three choices' icons, opening on hover; closes on a pick,
|
|
464
|
+
// a click outside, Escape or the pointer leaving
|
|
465
|
+
theme.cards({ mode }); // miniature page previews
|
|
466
|
+
theme.swatches({ mode }); // round swatches
|
|
455
467
|
```
|
|
456
468
|
|
|
457
469
|
## Build
|
package/RULES.md
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# Rules
|
|
2
|
+
|
|
3
|
+
Component conventions. Reference implementation: `src/components/button`.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Directory structure
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
src/components/{component}/
|
|
10
|
+
├── index.ts barrel; imports './scss/index.scss' and exports the default object
|
|
11
|
+
├── {variant}.ts one file per sub-component (copy.ts, kbd.ts, split.ts, ...)
|
|
12
|
+
├── {variant}/ a sub-component spanning several files (index.ts, template.ts, save.ts, ...)
|
|
13
|
+
└── scss/
|
|
14
|
+
├── index.scss logic, rules, structure
|
|
15
|
+
├── variables.scss css variables only
|
|
16
|
+
└── _{partial}.scss optional partials when index.scss grows too large (see tooltip)
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
- SCSS always lives in `{component}/scss/`; CSS-only components may have nothing but `scss/`.
|
|
20
|
+
- `index.ts` imports sub-components alphabetically, then `./scss/index.scss`, and exports a typed object of them:
|
|
21
|
+
`const button: { copy: typeof copy, ... } = { copy, ... }; export default button;`
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
## TypeScript
|
|
25
|
+
|
|
26
|
+
- Use CSS whenever it can do the job, so the browser does the work instead of the script. States (`:hover`, `:active`,
|
|
27
|
+
`:focus-visible`, `:has()`), transitions, `@starting-style`, layout and `@media` preferences belong in SCSS. Keep TS
|
|
28
|
+
for what CSS can't express, such as measuring layout or state CSS can't see.
|
|
29
|
+
- Build components with `@esportsplus/template` (`component`, `html`, attribute objects) and
|
|
30
|
+
`@esportsplus/reactivity` (`reactive`, ...). We own both libraries; use them for as much as possible.
|
|
31
|
+
- Don't manipulate the DOM directly (`addEventListener`, `classList`, `setAttribute`, `appendChild`, manual `window`
|
|
32
|
+
listeners, ...) when template has a way to do it. Template handles cleanup and lifecycle. For example, bind
|
|
33
|
+
`onwindowkeydown` / `onpointerdown` and reactive `class: () => ...` in the attribute object, as `button/kbd.ts` does.
|
|
34
|
+
- Optimize with fine-grained reactivity: keep state in `reactive(...)` and bind functions only where a value changes,
|
|
35
|
+
so updates touch only the affected node or attribute. Never re-render whole templates for a small change.
|
|
36
|
+
- Drop to raw DOM only when neither library covers the case (e.g. measuring layout). Keep it minimal and say why in a
|
|
37
|
+
comment.
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
## index.scss vs variables.scss
|
|
41
|
+
|
|
42
|
+
- `index.scss` holds the logic: layout, properties, selectors, transitions, keyframes. Values come from `var(--*)`, not literals.
|
|
43
|
+
- `variables.scss` holds only css variables (plus themed `%placeholder` extends such as `%background-primary`). They act as
|
|
44
|
+
arguments: every tunable value is a variable so variants and consumers can finely control the component without
|
|
45
|
+
touching the logic.
|
|
46
|
+
- `index.scss` `@use`s `variables`; both `@use '/tokens'` and any `css-utilities/*` they need, alphabetically.
|
|
47
|
+
- Variants (`&--primary`, `&--kbd`, ...) should mostly be variable overrides in `variables.scss`; only add rules to
|
|
48
|
+
`index.scss` when the structure actually changes.
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
## Variables
|
|
52
|
+
|
|
53
|
+
- Split multi-value properties into one variable per axis/side so the logic can compute with each part:
|
|
54
|
+
`--padding-horizontal` / `--padding-vertical`, `--gap-horizontal` / `--gap-vertical`. A single `--padding` would need
|
|
55
|
+
parsing of 1/2/4-value shorthands. Example from button:
|
|
56
|
+
```scss
|
|
57
|
+
padding-block: max(0px, calc(var(--padding-vertical) - var(--border-width)));
|
|
58
|
+
padding-inline: max(0px, calc(var(--padding-horizontal) - var(--border-width)));
|
|
59
|
+
```
|
|
60
|
+
- Variables live on the selector that consumes them, not on a parent with a prefix. The icon's size is `--size` set on
|
|
61
|
+
`.button-icon` / `&-kbd-icon.icon`, not `--icon-size` on `.button` that reaches down into the child. Prefixes are
|
|
62
|
+
only for distinct concerns of the same selector that would otherwise collide, e.g. `card--morph`'s `--morph-duration`,
|
|
63
|
+
`--morph-fade-duration` alongside its own `--transition-duration`.
|
|
64
|
+
- Stateful values use a `-default` / `-hover` / `-active` / `-pressed` family, with the bare variable resolving to the
|
|
65
|
+
current state: `--background: var(--background-default)`.
|
|
66
|
+
- Timing is always a pair: `--transition-duration` + `--transition-timing-function` (likewise `--{name}-duration` /
|
|
67
|
+
`--{name}-timing-function` for animations, e.g. `--shake-duration`).
|
|
68
|
+
- Prefer tokens (`--size-*`, `--border-radius-*`, `--font-size-*`, `--color-*`) over raw values.
|
|
69
|
+
- Reduced motion is handled by zeroing durations or removing transitions/animations under
|
|
70
|
+
`@media (prefers-reduced-motion: reduce)`.
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
## Naming (BEM-like)
|
|
74
|
+
|
|
75
|
+
- Block: `.button`
|
|
76
|
+
- Modifier: `.button--kbd`, `.button--processing` (double dash)
|
|
77
|
+
- Element: `.button-face`, `.button-split-chevron` (single dash, not `__`)
|
|
78
|
+
- Element modifier: `.button-face--error`, `.button-icon--draw`
|
|
79
|
+
- Modifier element/sub-state: `.button--morph-error`, `.button--sidebar-right`
|
|
80
|
+
- States use the `tokens.state(...)` mixin (`--active`, `pressed`, ...), not hand-written state classes.
|
|
81
|
+
- Always build names with `&--` / `&-` nesting rather than repeating the block name.
|
|
82
|
+
- Nested/chained selectors are fine when composing components or winning specificity regardless of load order
|
|
83
|
+
(`& > &-menu > &-trigger`, `&-kbd-icon.icon`, `> .tooltip-menu-layer > .tooltip-menu-panel`). Use `:where()` for
|
|
84
|
+
zero-specificity defaults that the other component should be able to override.
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
## Keyframes
|
|
88
|
+
|
|
89
|
+
- Name keyframes after the class that uses them when possible: `.button--processing` → `button--processing`. When a
|
|
90
|
+
name describes the motion rather than a single class, prefix it with the block/element path (`button-icon-draw`,
|
|
91
|
+
`button-morph-shake`).
|
|
92
|
+
- Place them either nested inside the class using them or at the bottom of `index.scss`.
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
## Ordering
|
|
96
|
+
|
|
97
|
+
Alphabetize everything: `@use` statements, selectors, properties, variables, transition lists, `@extend` lists.
|
|
98
|
+
|
|
99
|
+
Within a block, in this order. Two blank lines separate each group; one blank line separates rules within a group:
|
|
100
|
+
|
|
101
|
+
1. `@extend`s, then variables (`--*`), then properties — each alphabetical
|
|
102
|
+
2. Pseudo elements (`&::after`), nested `:where()` / descendant rules, `@media` for the block itself
|
|
103
|
+
3. Modifiers `&--*`, alphabetical
|
|
104
|
+
4. Elements `&-*`, alphabetical
|
|
105
|
+
5. State / relational selectors (`&:has(...)`, `&:not(...)`) and descendant selectors (`.button-check`, `svg`)
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
## SCSS style
|
|
109
|
+
|
|
110
|
+
- Use nesting wherever possible: `&--`, `&-`, `&::before`, `&:focus-visible`, `@media` and `@include tokens.state()`
|
|
111
|
+
nested inside the selector they affect.
|
|
112
|
+
- Reuse `css-utilities` placeholders via `@extend` (`%absolute-center`, `%hidden-visually`, `%icon-stroke`, ...) instead
|
|
113
|
+
of rewriting their rules.
|
|
114
|
+
- Use `@each` loops for symmetric variants (`left`/`right`) instead of duplicating rules.
|
|
115
|
+
- Comments only for a non-obvious why (specificity tricks, timing choices, math); never restate the code.
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
## Touching existing code
|
|
119
|
+
|
|
120
|
+
Every file you open is held to the rules above, not just the lines you came for. Apply these in the same change; the
|
|
121
|
+
result must behave identically, and the gate (`tsc --noEmit`, build) must stay clean.
|
|
122
|
+
|
|
123
|
+
- Modernize outdated techniques, bounded by the floor in `vite.config.ts` (`BROWSERS`: the first 2026 release of each
|
|
124
|
+
browser, Chrome/Edge 144, Firefox 147, Safari/iOS 26.3). Anything every floor browser supports is fair game:
|
|
125
|
+
`:has()`, `:is()`/`:where()`, `inset`, logical properties (`padding-inline`, `margin-block`), `gap` instead of margin
|
|
126
|
+
hacks, `light-dark()`, `@container`, `@layer`, `@property`, `@starting-style` with
|
|
127
|
+
`transition-behavior: allow-discrete`, `popover`, `aspect-ratio`, `clamp()`/`min()`/`max()`, `color-mix()`,
|
|
128
|
+
`text-wrap: balance`, `dvh` units, anchor positioning (`anchor-name`, `position-anchor`, `anchor()`,
|
|
129
|
+
`position-area`). Features above the floor are only allowed as progressive enhancement where the
|
|
130
|
+
fallback is still correct, never to gate layout or visibility. Check caniuse against the floor before using anything
|
|
131
|
+
not listed. Replace JS that only exists because CSS once couldn't: hover/focus/open state, entry/exit transitions,
|
|
132
|
+
measuring for simple layout, resize listeners for things `@container` handles.
|
|
133
|
+
- Reduce lines of code wherever it keeps behavior and readability: collapse selectors into `&-`/`&--` nesting, replace
|
|
134
|
+
hand-written rules with `css-utilities` placeholders, fold symmetric variants into `@each`, turn repeated
|
|
135
|
+
`calc()`s into one variable, use shorthands only when every value is being set on purpose.
|
|
136
|
+
- Consolidate duplicate styling within a component. If two selectors, variants or rules achieve the same thing in
|
|
137
|
+
different ways (one via `transform`, one via `margin`; two variants each re-declaring the same transition; the same
|
|
138
|
+
`padding` math in `index.scss` and a partial), pick the one that fits these rules and delete the other. One mechanism
|
|
139
|
+
per concern. Variants express their differences as variable overrides in `variables.scss`, not as a second copy of
|
|
140
|
+
the logic.
|
|
141
|
+
- Remove dead code. Before finishing, grep the component (and its consumers) for every selector, `--variable`,
|
|
142
|
+
`%placeholder`, keyframe, mixin and exported TS member the file declares; anything with no reader is deleted.
|
|
143
|
+
Variables declared in `variables.scss` but never read in `index.scss` or a partial, selectors no template renders,
|
|
144
|
+
keyframes no `animation` references, and leftover vendor prefixes (autoprefixer owns prefixes) all count.
|
|
145
|
+
- Do not leave both the old and new approach in place "for safety". A superseded rule is removed in the same change.
|