@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
|
@@ -2,7 +2,14 @@ import * as template_u1 from '@esportsplus/template';
|
|
|
2
2
|
import { type Attributes } from '@esportsplus/template';
|
|
3
3
|
import './scss/index.scss';
|
|
4
4
|
type A = Attributes & {
|
|
5
|
+
[COLOR_PICKER_ALPHA]?: Attributes;
|
|
6
|
+
[COLOR_PICKER_COPY]?: Attributes;
|
|
7
|
+
[COLOR_PICKER_HEX]?: Attributes;
|
|
8
|
+
[COLOR_PICKER_HUE]?: Attributes;
|
|
9
|
+
[COLOR_PICKER_PAD]?: Attributes;
|
|
10
|
+
[COLOR_PICKER_PREVIEW]?: Attributes;
|
|
5
11
|
[COLOR_PICKER_SWATCH]?: Attributes;
|
|
12
|
+
[COLOR_PICKER_SWATCHES]?: Attributes;
|
|
6
13
|
compact?: boolean;
|
|
7
14
|
recent?: false | string[];
|
|
8
15
|
state?: {
|
|
@@ -11,8 +18,31 @@ type A = Attributes & {
|
|
|
11
18
|
};
|
|
12
19
|
value: string;
|
|
13
20
|
};
|
|
21
|
+
declare const COLOR_PICKER_ALPHA: unique symbol;
|
|
22
|
+
declare const COLOR_PICKER_COPY: unique symbol;
|
|
23
|
+
declare const COLOR_PICKER_HEX: unique symbol;
|
|
24
|
+
declare const COLOR_PICKER_HUE: unique symbol;
|
|
25
|
+
declare const COLOR_PICKER_PAD: unique symbol;
|
|
26
|
+
declare const COLOR_PICKER_PREVIEW: unique symbol;
|
|
14
27
|
declare const COLOR_PICKER_SWATCH: unique symbol;
|
|
28
|
+
declare const COLOR_PICKER_SWATCHES: unique symbol;
|
|
15
29
|
declare const _default: template_u1.Factory<A, template_u1.Renderable<any>, template_u1.Renderable<any>, {
|
|
30
|
+
readonly alpha: typeof COLOR_PICKER_ALPHA;
|
|
31
|
+
readonly copy: typeof COLOR_PICKER_COPY;
|
|
32
|
+
readonly hex: typeof COLOR_PICKER_HEX;
|
|
33
|
+
readonly hue: typeof COLOR_PICKER_HUE;
|
|
34
|
+
readonly pad: typeof COLOR_PICKER_PAD;
|
|
35
|
+
readonly preview: typeof COLOR_PICKER_PREVIEW;
|
|
16
36
|
readonly swatch: typeof COLOR_PICKER_SWATCH;
|
|
17
|
-
|
|
37
|
+
readonly swatches: typeof COLOR_PICKER_SWATCHES;
|
|
38
|
+
}> & {
|
|
39
|
+
readonly alpha: typeof COLOR_PICKER_ALPHA;
|
|
40
|
+
readonly copy: typeof COLOR_PICKER_COPY;
|
|
41
|
+
readonly hex: typeof COLOR_PICKER_HEX;
|
|
42
|
+
readonly hue: typeof COLOR_PICKER_HUE;
|
|
43
|
+
readonly pad: typeof COLOR_PICKER_PAD;
|
|
44
|
+
readonly preview: typeof COLOR_PICKER_PREVIEW;
|
|
45
|
+
readonly swatch: typeof COLOR_PICKER_SWATCH;
|
|
46
|
+
readonly swatches: typeof COLOR_PICKER_SWATCHES;
|
|
47
|
+
};
|
|
18
48
|
export default _default;
|
|
@@ -1,65 +1,58 @@
|
|
|
1
|
-
import * as template_u1 from '@esportsplus/template';
|
|
2
|
-
import { component } from '@esportsplus/template';
|
|
3
1
|
import * as reactivity_u0 from '@esportsplus/reactivity';
|
|
4
2
|
import { effect } from '@esportsplus/reactivity';
|
|
3
|
+
import * as template_u1 from '@esportsplus/template';
|
|
4
|
+
import { component } from '@esportsplus/template';
|
|
5
5
|
import { measure, slides, timing } from '../../shared/animation.js';
|
|
6
6
|
import { clamp } from '../../shared/clamp.js';
|
|
7
7
|
import { keystep } from '../../shared/keystep.js';
|
|
8
|
-
import copy from '../copy
|
|
8
|
+
import copy from '../button/copy.js';
|
|
9
|
+
import icon from '../icon/index.js';
|
|
9
10
|
import input from '../input/index.js';
|
|
10
11
|
import range from '../range/index.js';
|
|
11
12
|
import contrast from '@esportsplus/ui/svg/contrast.svg';
|
|
12
13
|
import './scss/index.scss';
|
|
13
|
-
const
|
|
14
|
-
const template_0zt12vja = template_u1.template(`<div
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
14
|
+
const template_0zt12vj5 = template_u1.template(`<div aria-label='Saturation and brightness' aria-roledescription='2D slider' aria-valuemax='100' aria-valuemin='0' role='slider' tabindex='0'><span class='color-picker-thumb'>`, true);
|
|
15
|
+
const template_0zt12vja = template_u1.template(`<div><div class='color-picker-header'><!--$--><span class='color-picker-value'></span></div><div class='color-picker-body'><!--$--><!--$-->`, true);
|
|
16
|
+
const template_0zt12vjj = template_u1.template(`<div><!--$--><div class='color-picker-channels'><div class='color-picker-sliders'><!--$--></div><span aria-hidden='true'></span></div><div class='color-picker-fields'><div class='color-picker-field'><!--$--></div><span aria-hidden='true' class='input color-picker-alpha'></span><span aria-live='polite' class='color-picker-status'>`, true);
|
|
17
|
+
const template_0zt12vju = template_u1.template(`<div><p class='color-picker-recent-label'>Recent</p><div role='group'><!--$-->`, true);
|
|
18
|
+
const template_0zt12vjz = template_u1.template(`<button type='button'>`, true);
|
|
19
|
+
const template_0zt12vj13 = template_u1.template(`<span aria-hidden='true'>`, true);
|
|
19
20
|
class ReactiveObject_0zt12vj0 extends reactivity_u0.ReactiveObject {
|
|
21
|
+
#active = this[reactivity_u0.SIGNAL](false);
|
|
20
22
|
#error = this[reactivity_u0.SIGNAL]('');
|
|
21
|
-
#value = this[reactivity_u0.SIGNAL]('');
|
|
22
23
|
constructor() {
|
|
23
24
|
super(null);
|
|
24
25
|
}
|
|
25
|
-
get
|
|
26
|
-
return reactivity_u0.read(this.#
|
|
26
|
+
get active() {
|
|
27
|
+
return reactivity_u0.read(this.#active);
|
|
27
28
|
}
|
|
28
|
-
set
|
|
29
|
-
reactivity_u0.write(this.#
|
|
29
|
+
set active(_v0) {
|
|
30
|
+
reactivity_u0.write(this.#active, _v0);
|
|
30
31
|
}
|
|
31
|
-
get
|
|
32
|
-
return reactivity_u0.read(this.#
|
|
32
|
+
get error() {
|
|
33
|
+
return reactivity_u0.read(this.#error);
|
|
33
34
|
}
|
|
34
|
-
set
|
|
35
|
-
reactivity_u0.write(this.#
|
|
35
|
+
set error(_v1) {
|
|
36
|
+
reactivity_u0.write(this.#error, _v1);
|
|
36
37
|
}
|
|
37
38
|
}
|
|
38
39
|
class ReactiveObject_0zt12vj1 extends reactivity_u0.ReactiveObject {
|
|
39
|
-
#active = this[reactivity_u0.SIGNAL](false);
|
|
40
40
|
#error = this[reactivity_u0.SIGNAL]('');
|
|
41
|
-
#value;
|
|
42
|
-
constructor(
|
|
41
|
+
#value = this[reactivity_u0.SIGNAL]('');
|
|
42
|
+
constructor() {
|
|
43
43
|
super(null);
|
|
44
|
-
this.#value = this[reactivity_u0.SIGNAL](_p0);
|
|
45
|
-
}
|
|
46
|
-
get active() {
|
|
47
|
-
return reactivity_u0.read(this.#active);
|
|
48
|
-
}
|
|
49
|
-
set active(_v0) {
|
|
50
|
-
reactivity_u0.write(this.#active, _v0);
|
|
51
44
|
}
|
|
52
45
|
get error() {
|
|
53
46
|
return reactivity_u0.read(this.#error);
|
|
54
47
|
}
|
|
55
|
-
set error(
|
|
56
|
-
reactivity_u0.write(this.#error,
|
|
48
|
+
set error(_v0) {
|
|
49
|
+
reactivity_u0.write(this.#error, _v0);
|
|
57
50
|
}
|
|
58
51
|
get value() {
|
|
59
52
|
return reactivity_u0.read(this.#value);
|
|
60
53
|
}
|
|
61
|
-
set value(
|
|
62
|
-
reactivity_u0.write(this.#value,
|
|
54
|
+
set value(_v1) {
|
|
55
|
+
reactivity_u0.write(this.#value, _v1);
|
|
63
56
|
}
|
|
64
57
|
}
|
|
65
58
|
class ReactiveObject_0zt12vj2 extends reactivity_u0.ReactiveObject {
|
|
@@ -100,12 +93,13 @@ class ReactiveObject_0zt12vj2 extends reactivity_u0.ReactiveObject {
|
|
|
100
93
|
}
|
|
101
94
|
}
|
|
102
95
|
class ReactiveObject_0zt12vj3 extends reactivity_u0.ReactiveObject {
|
|
103
|
-
#active = this[reactivity_u0.SIGNAL](
|
|
104
|
-
#
|
|
105
|
-
#
|
|
96
|
+
#active = this[reactivity_u0.SIGNAL]('');
|
|
97
|
+
#focused = this[reactivity_u0.SIGNAL](false);
|
|
98
|
+
#invalid = this[reactivity_u0.SIGNAL](false);
|
|
99
|
+
#text;
|
|
106
100
|
constructor(_p0) {
|
|
107
101
|
super(null);
|
|
108
|
-
this.#
|
|
102
|
+
this.#text = this[reactivity_u0.SIGNAL](_p0);
|
|
109
103
|
}
|
|
110
104
|
get active() {
|
|
111
105
|
return reactivity_u0.read(this.#active);
|
|
@@ -113,43 +107,62 @@ class ReactiveObject_0zt12vj3 extends reactivity_u0.ReactiveObject {
|
|
|
113
107
|
set active(_v0) {
|
|
114
108
|
reactivity_u0.write(this.#active, _v0);
|
|
115
109
|
}
|
|
116
|
-
get
|
|
117
|
-
return reactivity_u0.read(this.#
|
|
110
|
+
get focused() {
|
|
111
|
+
return reactivity_u0.read(this.#focused);
|
|
118
112
|
}
|
|
119
|
-
set
|
|
120
|
-
reactivity_u0.write(this.#
|
|
121
|
-
}
|
|
122
|
-
get value() {
|
|
123
|
-
return reactivity_u0.read(this.#value);
|
|
124
|
-
}
|
|
125
|
-
set value(_v2) {
|
|
126
|
-
reactivity_u0.write(this.#value, _v2);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
class ReactiveObject_0zt12vj4 extends reactivity_u0.ReactiveObject {
|
|
130
|
-
#active = this[reactivity_u0.SIGNAL]('');
|
|
131
|
-
#invalid = this[reactivity_u0.SIGNAL](false);
|
|
132
|
-
constructor() {
|
|
133
|
-
super(null);
|
|
134
|
-
}
|
|
135
|
-
get active() {
|
|
136
|
-
return reactivity_u0.read(this.#active);
|
|
137
|
-
}
|
|
138
|
-
set active(_v0) {
|
|
139
|
-
reactivity_u0.write(this.#active, _v0);
|
|
113
|
+
set focused(_v1) {
|
|
114
|
+
reactivity_u0.write(this.#focused, _v1);
|
|
140
115
|
}
|
|
141
116
|
get invalid() {
|
|
142
117
|
return reactivity_u0.read(this.#invalid);
|
|
143
118
|
}
|
|
144
|
-
set invalid(
|
|
145
|
-
reactivity_u0.write(this.#invalid,
|
|
119
|
+
set invalid(_v2) {
|
|
120
|
+
reactivity_u0.write(this.#invalid, _v2);
|
|
121
|
+
}
|
|
122
|
+
get text() {
|
|
123
|
+
return reactivity_u0.read(this.#text);
|
|
124
|
+
}
|
|
125
|
+
set text(_v3) {
|
|
126
|
+
reactivity_u0.write(this.#text, _v3);
|
|
146
127
|
}
|
|
147
128
|
}
|
|
148
|
-
const
|
|
149
|
-
const
|
|
129
|
+
const COLOR_PICKER_ALPHA = Symbol.for('@esportsplus/ui/color-picker.alpha');
|
|
130
|
+
const COLOR_PICKER_COPY = Symbol.for('@esportsplus/ui/color-picker.copy');
|
|
131
|
+
const COLOR_PICKER_HEX = Symbol.for('@esportsplus/ui/color-picker.hex');
|
|
132
|
+
const COLOR_PICKER_HUE = Symbol.for('@esportsplus/ui/color-picker.hue');
|
|
133
|
+
const COLOR_PICKER_PAD = Symbol.for('@esportsplus/ui/color-picker.pad');
|
|
134
|
+
const COLOR_PICKER_PREVIEW = Symbol.for('@esportsplus/ui/color-picker.preview');
|
|
150
135
|
const COLOR_PICKER_SWATCH = Symbol.for('@esportsplus/ui/color-picker.swatch');
|
|
136
|
+
const COLOR_PICKER_SWATCHES = Symbol.for('@esportsplus/ui/color-picker.swatches');
|
|
137
|
+
const HEX_COLOR = /^([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i;
|
|
138
|
+
const HEX_PREFIX = /^#/;
|
|
151
139
|
const MAX_RECENT = 8;
|
|
152
140
|
let uid = 0;
|
|
141
|
+
function channel(get, set) {
|
|
142
|
+
let flags = new ReactiveObject_0zt12vj0();
|
|
143
|
+
return {
|
|
144
|
+
get active() {
|
|
145
|
+
return flags.active;
|
|
146
|
+
},
|
|
147
|
+
set active(value) {
|
|
148
|
+
flags.active = value;
|
|
149
|
+
},
|
|
150
|
+
get error() {
|
|
151
|
+
return flags.error;
|
|
152
|
+
},
|
|
153
|
+
set error(value) {
|
|
154
|
+
flags.error = value;
|
|
155
|
+
},
|
|
156
|
+
get value() {
|
|
157
|
+
return get();
|
|
158
|
+
},
|
|
159
|
+
set value(value) {
|
|
160
|
+
if (value !== get()) {
|
|
161
|
+
set(value);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
};
|
|
165
|
+
}
|
|
153
166
|
function fromHex(hex, previous) {
|
|
154
167
|
let rgba = parse(hex);
|
|
155
168
|
if (!rgba) {
|
|
@@ -203,22 +216,18 @@ function toHsv(r, g, b, previous) {
|
|
|
203
216
|
}
|
|
204
217
|
return { h, s: max === 0 ? previous.s : d / max, v: max };
|
|
205
218
|
}
|
|
206
|
-
function template({ compact = false, recent: initial = [], state = new
|
|
219
|
+
function template({ compact = false, recent: initial = [], state = new ReactiveObject_0zt12vj1(), value, ...attributes }) {
|
|
207
220
|
let start = fromHex(state.value || value, { a: 1, h: 0, s: 0, v: 0 });
|
|
208
221
|
if (!start) {
|
|
209
222
|
throw new Error(`Color picker: '${state.value || value}' is not a valid hex color`);
|
|
210
223
|
}
|
|
211
|
-
let alpha =
|
|
224
|
+
let alpha = channel(() => Math.round(color.a * 100), (value) => update({ a: value / 100 })), color = new ReactiveObject_0zt12vj2(start.a, start.h, start.s, start.v), dirty = { alpha: false, hue: false, pad: false }, history = initial !== false && !compact, hue = channel(() => Math.round(color.h), (value) => update({ h: value })), id = `color-picker-${++uid}`, leaving = new reactivity_u0.ReactiveArray(), parts = {}, picker = new ReactiveObject_0zt12vj3(toHex(start)), pointer = { alpha: false, hue: false, pad: -1 }, presets = this?.attributes, recent = reactivity_u0.reactive((initial || []).map((hex) => hex.toUpperCase()));
|
|
212
225
|
state.value = toHex(color);
|
|
213
226
|
function apply(leaving) {
|
|
214
|
-
let
|
|
215
|
-
if (!field) {
|
|
216
|
-
return;
|
|
217
|
-
}
|
|
218
|
-
let next = fromHex(field.value, read());
|
|
227
|
+
let next = fromHex(picker.text, read());
|
|
219
228
|
if (!next) {
|
|
220
229
|
if (leaving) {
|
|
221
|
-
|
|
230
|
+
picker.text = toHex(read());
|
|
222
231
|
}
|
|
223
232
|
picker.invalid = !leaving;
|
|
224
233
|
return;
|
|
@@ -226,7 +235,7 @@ function template({ compact = false, recent: initial = [], state = new ReactiveO
|
|
|
226
235
|
let changed = toHex(next) !== toHex(read());
|
|
227
236
|
picker.invalid = false;
|
|
228
237
|
update(next);
|
|
229
|
-
|
|
238
|
+
picker.text = toHex(next);
|
|
230
239
|
if (changed) {
|
|
231
240
|
commit();
|
|
232
241
|
}
|
|
@@ -262,11 +271,11 @@ function template({ compact = false, recent: initial = [], state = new ReactiveO
|
|
|
262
271
|
return `--alpha: ${color.a}; --hue: ${color.h}; --rgb: ${r} ${g} ${b};`;
|
|
263
272
|
}
|
|
264
273
|
function flip(container, dropped) {
|
|
265
|
-
let box = container.getBoundingClientRect(), computed = getComputedStyle(container), enter = timing(computed, '
|
|
266
|
-
filter: `blur(${computed.getPropertyValue('--
|
|
274
|
+
let box = container.getBoundingClientRect(), computed = getComputedStyle(container), enter = timing(computed, 'enter'), from = {
|
|
275
|
+
filter: `blur(${computed.getPropertyValue('--blur').trim()})`,
|
|
267
276
|
opacity: 0,
|
|
268
|
-
scale: computed.getPropertyValue('--
|
|
269
|
-
}, move = timing(computed, '
|
|
277
|
+
scale: computed.getPropertyValue('--scale').trim()
|
|
278
|
+
}, move = timing(computed, 'shift');
|
|
270
279
|
slides([...container.children].slice(0, recent.$length), move, (element) => {
|
|
271
280
|
if (enter) {
|
|
272
281
|
element.animate([from, { filter: 'blur(0px)', opacity: 1, scale: '1' }], enter);
|
|
@@ -276,6 +285,10 @@ function template({ compact = false, recent: initial = [], state = new ReactiveO
|
|
|
276
285
|
leaving.push({ hex, left: rect.left - box.left, top: rect.top - box.top });
|
|
277
286
|
}
|
|
278
287
|
}
|
|
288
|
+
function part(key, own) {
|
|
289
|
+
let given = attributes[key], preset = presets?.[key];
|
|
290
|
+
return { ...preset, ...given, ...own, class: [own.class, preset?.class, given?.class].flat() };
|
|
291
|
+
}
|
|
279
292
|
function pick(pad, e) {
|
|
280
293
|
let rect = pad.getBoundingClientRect();
|
|
281
294
|
update({
|
|
@@ -299,14 +312,6 @@ function template({ compact = false, recent: initial = [], state = new ReactiveO
|
|
|
299
312
|
e.preventDefault();
|
|
300
313
|
target.value = clamp(target.value + delta, 0, Number(e.currentTarget.max));
|
|
301
314
|
}
|
|
302
|
-
function sync(hex) {
|
|
303
|
-
let field = parts.hex;
|
|
304
|
-
alpha.value = Math.round(color.a * 100);
|
|
305
|
-
hue.value = Math.round(color.h);
|
|
306
|
-
if (field && document.activeElement !== field) {
|
|
307
|
-
field.value = hex;
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
315
|
function update(patch) {
|
|
311
316
|
if (patch.a !== undefined) {
|
|
312
317
|
color.a = patch.a;
|
|
@@ -325,25 +330,17 @@ function template({ compact = false, recent: initial = [], state = new ReactiveO
|
|
|
325
330
|
picker.active = '';
|
|
326
331
|
}
|
|
327
332
|
state.value = hex;
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
effect(() => alpha.value, (next) => {
|
|
331
|
-
if (Math.round(color.a * 100) !== next) {
|
|
332
|
-
update({ a: next / 100 });
|
|
333
|
-
}
|
|
334
|
-
});
|
|
335
|
-
effect(() => hue.value, (next) => {
|
|
336
|
-
if (Math.round(color.h) !== next) {
|
|
337
|
-
update({ h: next });
|
|
333
|
+
if (!picker.focused) {
|
|
334
|
+
picker.text = hex;
|
|
338
335
|
}
|
|
339
|
-
}
|
|
336
|
+
}
|
|
340
337
|
effect(() => state.value, (next) => {
|
|
341
338
|
let parsed = next && toHex(read()) !== next.toUpperCase() ? fromHex(next, read()) : null;
|
|
342
339
|
if (parsed) {
|
|
343
340
|
update(parsed);
|
|
344
341
|
}
|
|
345
342
|
});
|
|
346
|
-
let alphaChannel = range({
|
|
343
|
+
let alphaChannel = range(part(COLOR_PICKER_ALPHA, {
|
|
347
344
|
'aria-label': 'Opacity',
|
|
348
345
|
'aria-valuetext': () => `${alpha.value}%`,
|
|
349
346
|
class: 'color-picker-channel color-picker-channel--alpha',
|
|
@@ -367,8 +364,8 @@ function template({ compact = false, recent: initial = [], state = new ReactiveO
|
|
|
367
364
|
orientation: compact ? 'vertical' : 'horizontal',
|
|
368
365
|
state: alpha,
|
|
369
366
|
step: 1
|
|
370
|
-
});
|
|
371
|
-
let hueChannel = range({
|
|
367
|
+
}));
|
|
368
|
+
let hueChannel = range(part(COLOR_PICKER_HUE, {
|
|
372
369
|
'aria-label': 'Hue',
|
|
373
370
|
'aria-valuetext': () => `${hue.value} degrees`,
|
|
374
371
|
class: 'color-picker-channel color-picker-channel--hue',
|
|
@@ -392,19 +389,23 @@ function template({ compact = false, recent: initial = [], state = new ReactiveO
|
|
|
392
389
|
orientation: compact ? 'vertical' : 'horizontal',
|
|
393
390
|
state: hue,
|
|
394
391
|
step: 1
|
|
395
|
-
});
|
|
392
|
+
}));
|
|
396
393
|
let pad = (() => {
|
|
397
|
-
let
|
|
398
|
-
template_u1.
|
|
399
|
-
|
|
400
|
-
template_u1.
|
|
401
|
-
|
|
394
|
+
let root_0zt12vj4 = template_0zt12vj5(), element_0zt12vj6 = root_0zt12vj4.firstElementChild;
|
|
395
|
+
template_u1.setStyle(element_0zt12vj6, ["", () => `left: ${color.s * 100}%; top: ${(1 - color.v) * 100}%;`]);
|
|
396
|
+
let attributes_0zt12vj7 = presets?.[COLOR_PICKER_PAD];
|
|
397
|
+
template_u1.setProperties(root_0zt12vj4, attributes_0zt12vj7, true);
|
|
398
|
+
let attributes_0zt12vj8 = attributes[COLOR_PICKER_PAD];
|
|
399
|
+
template_u1.setProperties(root_0zt12vj4, attributes_0zt12vj8, true);
|
|
400
|
+
template_u1.setProperty(root_0zt12vj4, 'aria-valuenow', () => Math.round(color.s * 100));
|
|
401
|
+
template_u1.setProperty(root_0zt12vj4, 'aria-valuetext', () => `Saturation ${Math.round(color.s * 100)}%, brightness ${Math.round(color.v * 100)}%`);
|
|
402
|
+
template_u1.direct(root_0zt12vj4, 'blur', () => {
|
|
402
403
|
if (dirty.pad) {
|
|
403
404
|
commit();
|
|
404
405
|
}
|
|
405
406
|
dirty.pad = false;
|
|
406
407
|
});
|
|
407
|
-
template_u1.delegate(
|
|
408
|
+
template_u1.delegate(root_0zt12vj4, 'keydown', (e) => {
|
|
408
409
|
let delta = keystep(e, 0.01);
|
|
409
410
|
if (delta === null) {
|
|
410
411
|
return;
|
|
@@ -418,13 +419,13 @@ function template({ compact = false, recent: initial = [], state = new ReactiveO
|
|
|
418
419
|
update({ v: clamp(color.v + delta, 0, 1) });
|
|
419
420
|
}
|
|
420
421
|
});
|
|
421
|
-
template_u1.delegate(
|
|
422
|
+
template_u1.delegate(root_0zt12vj4, 'pointercancel', (e) => {
|
|
422
423
|
if (e.pointerId === pointer.pad) {
|
|
423
424
|
pointer.pad = -1;
|
|
424
425
|
commit();
|
|
425
426
|
}
|
|
426
427
|
});
|
|
427
|
-
template_u1.delegate(
|
|
428
|
+
template_u1.delegate(root_0zt12vj4, 'pointerdown', function (e) {
|
|
428
429
|
if (pointer.pad !== -1 || (e.pointerType === 'mouse' && e.button !== 0)) {
|
|
429
430
|
return;
|
|
430
431
|
}
|
|
@@ -432,86 +433,92 @@ function template({ compact = false, recent: initial = [], state = new ReactiveO
|
|
|
432
433
|
this.setPointerCapture(e.pointerId);
|
|
433
434
|
pick(this, e);
|
|
434
435
|
});
|
|
435
|
-
template_u1.delegate(
|
|
436
|
+
template_u1.delegate(root_0zt12vj4, 'pointermove', function (e) {
|
|
436
437
|
if (e.pointerId === pointer.pad) {
|
|
437
438
|
pick(this, e);
|
|
438
439
|
}
|
|
439
440
|
});
|
|
440
|
-
template_u1.delegate(
|
|
441
|
+
template_u1.delegate(root_0zt12vj4, 'pointerup', (e) => {
|
|
441
442
|
if (e.pointerId === pointer.pad) {
|
|
442
443
|
pointer.pad = -1;
|
|
443
444
|
commit();
|
|
444
445
|
}
|
|
445
446
|
});
|
|
446
|
-
|
|
447
|
+
template_u1.setClass(root_0zt12vj4, ["color-picker-pad", attributes_0zt12vj7?.class, attributes_0zt12vj8?.class]);
|
|
448
|
+
template_u1.setStyle(root_0zt12vj4, ["", attributes_0zt12vj7?.style, attributes_0zt12vj8?.style]);
|
|
449
|
+
return root_0zt12vj4;
|
|
447
450
|
})();
|
|
448
451
|
if (compact) {
|
|
449
|
-
|
|
450
|
-
let root_0zt12vj9 = template_0zt12vja(), element_0zt12vjb = root_0zt12vj9.
|
|
452
|
+
{
|
|
453
|
+
let root_0zt12vj9 = template_0zt12vja(), element_0zt12vjb = root_0zt12vj9.firstElementChild, element_0zt12vjc = element_0zt12vjb.firstChild, element_0zt12vjd = element_0zt12vjb.firstElementChild, element_0zt12vje = element_0zt12vjb.nextElementSibling.firstChild, element_0zt12vjf = element_0zt12vje.nextSibling, element_0zt12vjg = element_0zt12vjb.nextElementSibling;
|
|
454
|
+
template_u1.slot(element_0zt12vjc, icon({ 'aria-hidden': 'true', class: 'color-picker-icon' }, contrast));
|
|
451
455
|
new template_u1.EffectSlot(element_0zt12vjd, () => hsl(read()), 1);
|
|
452
456
|
template_u1.slot(element_0zt12vje, pad);
|
|
453
457
|
template_u1.slot(element_0zt12vjf, alphaChannel);
|
|
454
|
-
template_u1.slot(element_0zt12vjg, hueChannel,
|
|
455
|
-
template_u1.
|
|
456
|
-
|
|
457
|
-
template_u1.setProperties(
|
|
458
|
-
template_u1.
|
|
458
|
+
template_u1.slot(element_0zt12vjg, hueChannel, 1);
|
|
459
|
+
template_u1.setProperties(root_0zt12vj9, this?.attributes);
|
|
460
|
+
let attributes_0zt12vjh = attributes;
|
|
461
|
+
template_u1.setProperties(root_0zt12vj9, attributes_0zt12vjh, true);
|
|
462
|
+
template_u1.setClass(root_0zt12vj9, ["color-picker color-picker--compact", attributes_0zt12vjh?.class]);
|
|
463
|
+
template_u1.setStyle(root_0zt12vj9, ["", attributes_0zt12vjh?.style, css]);
|
|
459
464
|
return root_0zt12vj9;
|
|
460
|
-
}
|
|
465
|
+
}
|
|
461
466
|
}
|
|
462
|
-
|
|
463
|
-
let
|
|
467
|
+
{
|
|
468
|
+
let root_0zt12vji = template_0zt12vjj(), element_0zt12vjk = root_0zt12vji.firstChild, element_0zt12vjl = root_0zt12vji.firstElementChild, element_0zt12vjm = element_0zt12vjl.firstElementChild, element_0zt12vjn = element_0zt12vjm.firstChild, element_0zt12vjo = element_0zt12vjm.nextElementSibling, element_0zt12vjp = element_0zt12vjl.nextElementSibling.firstElementChild, element_0zt12vjq = element_0zt12vjp.firstChild, element_0zt12vjr = element_0zt12vjp.nextElementSibling, element_0zt12vjs = element_0zt12vjr.nextElementSibling;
|
|
464
469
|
template_u1.slot(element_0zt12vjk, pad);
|
|
465
|
-
template_u1.slot(
|
|
466
|
-
template_u1.slot(element_0zt12vjm, alphaChannel,
|
|
467
|
-
template_u1.slot(
|
|
470
|
+
template_u1.slot(element_0zt12vjn, hueChannel);
|
|
471
|
+
template_u1.slot(element_0zt12vjm, alphaChannel, 1);
|
|
472
|
+
template_u1.slot(element_0zt12vjq, input(part(COLOR_PICKER_HEX, {
|
|
468
473
|
'aria-invalid': () => picker.invalid ? 'true' : 'false',
|
|
469
474
|
'aria-label': 'Hex color',
|
|
470
475
|
autocapitalize: 'characters',
|
|
471
476
|
autocomplete: 'off',
|
|
472
477
|
class: 'color-picker-hex',
|
|
473
478
|
maxlength: 9,
|
|
474
|
-
onblur: () =>
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
element.value = toHex(read());
|
|
479
|
+
onblur: () => {
|
|
480
|
+
picker.focused = false;
|
|
481
|
+
apply(true);
|
|
478
482
|
},
|
|
479
483
|
onfocus: function () {
|
|
484
|
+
picker.focused = true;
|
|
480
485
|
this.select();
|
|
481
486
|
},
|
|
482
|
-
oninput: ()
|
|
487
|
+
oninput: function () {
|
|
483
488
|
picker.invalid = false;
|
|
489
|
+
picker.text = this.value;
|
|
484
490
|
},
|
|
485
|
-
onkeydown:
|
|
491
|
+
onkeydown: (e) => {
|
|
486
492
|
if (e.key === 'Enter') {
|
|
487
493
|
apply(false);
|
|
488
494
|
}
|
|
489
495
|
else if (e.key === 'Escape') {
|
|
490
|
-
this.value = toHex(read());
|
|
491
496
|
picker.invalid = false;
|
|
497
|
+
picker.text = toHex(read());
|
|
492
498
|
}
|
|
493
499
|
},
|
|
494
|
-
spellcheck: false
|
|
495
|
-
|
|
496
|
-
|
|
500
|
+
spellcheck: false,
|
|
501
|
+
value: () => picker.text
|
|
502
|
+
})));
|
|
503
|
+
template_u1.slot(element_0zt12vjp, copy(part(COLOR_PICKER_COPY, {
|
|
497
504
|
class: 'color-picker-copy',
|
|
498
505
|
label: 'Copy hex color',
|
|
499
506
|
success: 'Hex color copied',
|
|
500
507
|
value: () => toHex(read())
|
|
501
|
-
}),
|
|
502
|
-
new template_u1.EffectSlot(
|
|
503
|
-
new template_u1.EffectSlot(
|
|
504
|
-
template_u1.slot(
|
|
505
|
-
let
|
|
506
|
-
|
|
507
|
-
let
|
|
508
|
-
template_u1.setProperty(
|
|
509
|
-
|
|
510
|
-
template_u1.setProperties(
|
|
511
|
-
|
|
512
|
-
template_u1.
|
|
513
|
-
template_u1.
|
|
514
|
-
template_u1.delegate(
|
|
508
|
+
})), 1);
|
|
509
|
+
new template_u1.EffectSlot(element_0zt12vjr, () => `${Math.round(color.a * 100)}%`, 1);
|
|
510
|
+
new template_u1.EffectSlot(element_0zt12vjs, () => picker.invalid && 'Not a valid hex color', 1);
|
|
511
|
+
template_u1.slot(root_0zt12vji, history && (() => {
|
|
512
|
+
let root_0zt12vjt = template_0zt12vju(), element_0zt12vjv = root_0zt12vjt.firstElementChild, element_0zt12vjw = element_0zt12vjv.nextElementSibling, element_0zt12vjx = element_0zt12vjw.firstChild;
|
|
513
|
+
element_0zt12vjx.parentNode.insertBefore(new template_u1.ArraySlot(recent, (hex) => {
|
|
514
|
+
let root_0zt12vjy = template_0zt12vjz();
|
|
515
|
+
template_u1.setProperty(root_0zt12vjy, 'aria-label', "Use " + (hex));
|
|
516
|
+
let attributes_0zt12vj10 = presets?.[COLOR_PICKER_SWATCH];
|
|
517
|
+
template_u1.setProperties(root_0zt12vjy, attributes_0zt12vj10, true);
|
|
518
|
+
let attributes_0zt12vj11 = attributes[COLOR_PICKER_SWATCH];
|
|
519
|
+
template_u1.setProperties(root_0zt12vjy, attributes_0zt12vj11, true);
|
|
520
|
+
template_u1.setProperty(root_0zt12vjy, 'aria-pressed', () => picker.active === hex ? 'true' : 'false');
|
|
521
|
+
template_u1.delegate(root_0zt12vjy, 'click', () => {
|
|
515
522
|
let next = fromHex(hex, read());
|
|
516
523
|
if (!next) {
|
|
517
524
|
return;
|
|
@@ -520,33 +527,58 @@ function template({ compact = false, recent: initial = [], state = new ReactiveO
|
|
|
520
527
|
picker.active = hex;
|
|
521
528
|
picker.invalid = false;
|
|
522
529
|
});
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
template_u1.
|
|
530
|
-
template_u1.delegate(element_0zt12vj12, 'animationend', () => {
|
|
530
|
+
template_u1.setClass(root_0zt12vjy, ["color-picker-swatch", attributes_0zt12vj10?.class, attributes_0zt12vj11?.class, () => picker.active === hex && '--active']);
|
|
531
|
+
template_u1.setStyle(root_0zt12vjy, ["", "--value: " + (hex), attributes_0zt12vj10?.style, attributes_0zt12vj11?.style]);
|
|
532
|
+
return root_0zt12vjy;
|
|
533
|
+
}).fragment, element_0zt12vjx);
|
|
534
|
+
element_0zt12vjw.appendChild(new template_u1.ArraySlot(leaving, (ghost) => {
|
|
535
|
+
let root_0zt12vj12 = template_0zt12vj13();
|
|
536
|
+
template_u1.delegate(root_0zt12vj12, 'animationend', () => {
|
|
531
537
|
let at = leaving.indexOf(ghost);
|
|
532
538
|
if (at !== -1) {
|
|
533
539
|
leaving.splice(at, 1);
|
|
534
540
|
}
|
|
535
541
|
});
|
|
536
|
-
|
|
542
|
+
template_u1.setClass(root_0zt12vj12, ["color-picker-swatch color-picker-swatch--leaving"]);
|
|
543
|
+
template_u1.setStyle(root_0zt12vj12, ["", "--value: " + (ghost.hex), " left: " + (ghost.left) + "px", " top: " + (ghost.top) + "px"]);
|
|
544
|
+
return root_0zt12vj12;
|
|
537
545
|
}).fragment);
|
|
538
|
-
template_u1.setProperty(
|
|
539
|
-
|
|
546
|
+
template_u1.setProperty(element_0zt12vjw, 'aria-labelledby', "" + (id) + "-recent");
|
|
547
|
+
let attributes_0zt12vj14 = presets?.[COLOR_PICKER_SWATCHES];
|
|
548
|
+
template_u1.setProperties(element_0zt12vjw, attributes_0zt12vj14, true);
|
|
549
|
+
let attributes_0zt12vj15 = attributes[COLOR_PICKER_SWATCHES];
|
|
550
|
+
template_u1.setProperties(element_0zt12vjw, attributes_0zt12vj15, true);
|
|
551
|
+
template_u1.onconnect(element_0zt12vjw, (element) => {
|
|
540
552
|
parts.swatches = element;
|
|
541
553
|
});
|
|
542
|
-
template_u1.
|
|
543
|
-
template_u1.
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
554
|
+
template_u1.setClass(element_0zt12vjw, ["color-picker-swatches", attributes_0zt12vj14?.class, attributes_0zt12vj15?.class]);
|
|
555
|
+
template_u1.setStyle(element_0zt12vjw, ["", attributes_0zt12vj14?.style, attributes_0zt12vj15?.style]);
|
|
556
|
+
template_u1.setProperty(element_0zt12vjv, 'id', "" + (id) + "-recent");
|
|
557
|
+
template_u1.setProperty(root_0zt12vjt, 'hidden', () => recent.$length === 0);
|
|
558
|
+
template_u1.setClass(root_0zt12vjt, ["color-picker-recent"]);
|
|
559
|
+
return root_0zt12vjt;
|
|
560
|
+
})(), 1);
|
|
561
|
+
let attributes_0zt12vj16 = presets?.[COLOR_PICKER_PREVIEW];
|
|
562
|
+
template_u1.setProperties(element_0zt12vjo, attributes_0zt12vj16, true);
|
|
563
|
+
let attributes_0zt12vj17 = attributes[COLOR_PICKER_PREVIEW];
|
|
564
|
+
template_u1.setProperties(element_0zt12vjo, attributes_0zt12vj17, true);
|
|
565
|
+
template_u1.setClass(element_0zt12vjo, ["color-picker-preview", attributes_0zt12vj16?.class, attributes_0zt12vj17?.class]);
|
|
566
|
+
template_u1.setStyle(element_0zt12vjo, ["", attributes_0zt12vj16?.style, attributes_0zt12vj17?.style]);
|
|
567
|
+
template_u1.setProperties(root_0zt12vji, this?.attributes);
|
|
568
|
+
let attributes_0zt12vj18 = attributes;
|
|
569
|
+
template_u1.setProperties(root_0zt12vji, attributes_0zt12vj18, true);
|
|
570
|
+
template_u1.setClass(root_0zt12vji, ["color-picker", attributes_0zt12vj18?.class]);
|
|
571
|
+
template_u1.setStyle(root_0zt12vji, ["", attributes_0zt12vj18?.style, css]);
|
|
572
|
+
return root_0zt12vji;
|
|
573
|
+
}
|
|
551
574
|
}
|
|
552
|
-
export default component(template, {
|
|
575
|
+
export default component(template, {
|
|
576
|
+
alpha: COLOR_PICKER_ALPHA,
|
|
577
|
+
copy: COLOR_PICKER_COPY,
|
|
578
|
+
hex: COLOR_PICKER_HEX,
|
|
579
|
+
hue: COLOR_PICKER_HUE,
|
|
580
|
+
pad: COLOR_PICKER_PAD,
|
|
581
|
+
preview: COLOR_PICKER_PREVIEW,
|
|
582
|
+
swatch: COLOR_PICKER_SWATCH,
|
|
583
|
+
swatches: COLOR_PICKER_SWATCHES
|
|
584
|
+
});
|