@esportsplus/ui 0.61.0 → 0.63.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 +4 -132
- package/.audit/check-scss.mjs +2 -2
- package/.audit/rules-audit.md +3 -28
- package/README.md +18 -17
- package/RULES.md +30 -0
- package/build/components/accordion/index.d.ts +5 -1
- package/build/components/accordion/index.js +29 -27
- 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 +54 -49
- package/build/components/breadcrumb/scss/index.scss +1 -1
- package/build/components/button/copy.d.ts +1 -10
- package/build/components/button/copy.js +14 -11
- package/build/components/button/faces.d.ts +2 -1
- package/build/components/button/faces.js +9 -10
- package/build/components/button/kbd.d.ts +2 -10
- package/build/components/button/kbd.js +17 -15
- package/build/components/button/morph/index.d.ts +1443 -2165
- package/build/components/button/morph/save.d.ts +1 -10
- package/build/components/button/morph/save.js +5 -5
- package/build/components/button/morph/template.d.ts +2 -1
- package/build/components/button/morph/template.js +49 -29
- 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 +6 -1
- package/build/components/button/split.js +16 -11
- package/build/components/capslock/index.d.ts +1 -10
- package/build/components/capslock/index.js +16 -13
- package/build/components/capslock/scss/index.scss +1 -1
- package/build/components/card/scss/index.scss +1 -1
- package/build/components/chat/minimap/index.d.ts +12 -1
- package/build/components/chat/minimap/index.js +98 -74
- package/build/components/checkbox/group.d.ts +2 -10
- package/build/components/checkbox/group.js +39 -29
- package/build/components/checkbox/options.d.ts +5005 -6440
- package/build/components/checkbox/options.js +72 -44
- package/build/components/checkbox/scss/index.scss +1 -1
- package/build/components/color-picker/index.d.ts +10 -1
- package/build/components/color-picker/index.js +99 -82
- package/build/components/color-picker/scss/index.scss +1 -1
- package/build/components/command/palette.d.ts +13 -5
- package/build/components/command/palette.js +141 -130
- package/build/components/command/scss/index.scss +1 -1
- package/build/components/command/search.d.ts +2 -20
- package/build/components/command/search.js +17 -16
- package/build/components/container/scss/index.scss +1 -1
- package/build/components/counter/index.d.ts +1 -10
- package/build/components/counter/index.js +34 -31
- package/build/components/counter/scss/index.scss +1 -1
- package/build/components/dock/index.d.ts +4 -1
- package/build/components/dock/index.js +154 -114
- 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/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 +278 -247
- package/build/components/editor/markdown/template.d.ts +1 -10
- 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 +10 -6
- package/build/components/editor/tree/icons.d.ts +1 -1
- package/build/components/editor/tree/icons.js +1 -1
- 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 +2 -1
- package/build/components/editor/tree/template.js +144 -157
- package/build/components/editor/viewer/model.js +1 -7
- package/build/components/editor/viewer/template.d.ts +1 -10
- package/build/components/editor/viewer/template.js +74 -65
- 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 +2 -1
- package/build/components/editor/workspace/session.js +14 -9
- package/build/components/editor/workspace/shortcuts.js +39 -33
- package/build/components/editor/workspace/status.js +2 -2
- package/build/components/editor/workspace/statusbar.d.ts +2 -1
- package/build/components/editor/workspace/statusbar.js +49 -48
- package/build/components/editor/workspace/strip.js +6 -5
- package/build/components/editor/workspace/template.d.ts +2 -10
- package/build/components/editor/workspace/template.js +149 -144
- 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 -74
- 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/frame/scss/index.scss +1 -1
- package/build/components/group/index.d.ts +3 -1
- package/build/components/group/index.js +10 -7
- package/build/components/group/scss/index.scss +1 -1
- package/build/components/heatmap/index.d.ts +5 -2
- package/build/components/heatmap/index.js +72 -59
- package/build/components/heatmap/scss/index.scss +1 -1
- package/build/components/highlight/index.d.ts +1 -10
- package/build/components/highlight/index.js +21 -19
- package/build/components/highlight/scss/index.scss +1 -1
- package/build/components/icon/index.d.ts +1 -10
- package/build/components/icon/index.js +11 -10
- 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 +0 -4
- package/build/components/index.js +0 -4
- package/build/components/inline-edit/index.d.ts +5 -1
- package/build/components/inline-edit/index.js +34 -27
- package/build/components/inline-edit/rich.d.ts +10 -15
- package/build/components/inline-edit/rich.js +81 -1193
- 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 +22 -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 +58 -53
- 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 +77 -72
- 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 +25 -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/scss/index.scss +1 -1
- package/build/components/nav/spy.js +9 -6
- package/build/components/nav/toc.d.ts +1 -10
- package/build/components/nav/tree.d.ts +3 -1
- package/build/components/nav/tree.js +60 -58
- package/build/components/notification/index.d.ts +1 -10
- package/build/components/notification/index.js +26 -36
- 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/pagination/arrows.d.ts +2 -1
- package/build/components/pagination/arrows.js +48 -45
- package/build/components/pagination/cards.d.ts +5 -2
- package/build/components/pagination/cards.js +70 -45
- 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.js +30 -22
- package/build/components/panels/group.d.ts +3 -2
- package/build/components/panels/group.js +134 -131
- package/build/components/panels/index.d.ts +2 -10
- package/build/components/panels/index.js +84 -80
- package/build/components/panels/resize.js +39 -3
- package/build/components/panels/scss/index.scss +1 -1
- package/build/components/panels/subtree.d.ts +2 -1
- package/build/components/panels/subtree.js +8 -7
- package/build/components/preview/buttons.d.ts +2 -10
- package/build/components/preview/buttons.js +6 -6
- package/build/components/preview/code.d.ts +1 -10
- package/build/components/preview/code.js +6 -6
- package/build/components/preview/header.d.ts +2 -10
- package/build/components/preview/header.js +15 -12
- package/build/components/preview/index.d.ts +13 -8680
- package/build/components/preview/index.js +22 -22
- package/build/components/preview/scss/index.scss +1 -1
- package/build/components/preview/source.d.ts +1 -10
- package/build/components/preview/source.js +18 -15
- package/build/components/preview/stage.d.ts +2 -10
- package/build/components/preview/stage.js +19 -15
- 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 +27 -25
- package/build/components/range/filter.d.ts +2 -1
- package/build/components/range/filter.js +126 -127
- 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 +56 -41
- 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 +18 -9
- package/build/components/select/index.js +108 -81
- package/build/components/select/scss/index.scss +1 -1
- package/build/components/shell/index.d.ts +2 -1
- package/build/components/shell/index.js +127 -109
- package/build/components/shell/scss/index.scss +1 -1
- package/build/components/shortcut-recorder/index.js +46 -43
- 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 +4 -10
- package/build/components/story/index.js +121 -63
- 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 +42 -38
- 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/tasklist/index.d.ts +8 -1
- package/build/components/tasklist/index.js +63 -46
- 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 +12 -3
- package/build/components/theme/index.js +38 -14
- 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-picker → theme}/shared.d.ts +4 -4
- package/build/components/{theme-picker → theme}/shared.js +5 -3
- 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 +62 -50
- package/build/components/toast/scss/index.scss +1 -1
- package/build/components/tooltip/menu.d.ts +10 -2
- package/build/components/tooltip/menu.js +194 -179
- 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 +34 -29
- 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 -47
- 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/border/scss/index.scss +1 -1
- package/build/modifiers/box-shadow/scss/index.scss +1 -1
- package/build/modifiers/color/scss/index.scss +1 -1
- 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 +5 -3
- package/build/shared/dispatch.d.ts +7 -0
- package/build/shared/dispatch.js +25 -0
- package/build/shared/drag.d.ts +2 -4
- 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 +13 -14
- package/src/components/accordion/index.ts +2 -4
- package/src/components/accordion/scss/index.scss +17 -14
- package/src/components/accordion/scss/variables.scss +6 -7
- package/src/components/announcement/scss/index.scss +8 -13
- package/src/components/announcement/scss/variables.scss +12 -8
- package/src/components/breadcrumb/index.ts +4 -4
- package/src/components/breadcrumb/scss/index.scss +12 -12
- package/src/components/breadcrumb/scss/variables.scss +5 -12
- package/src/components/button/copy.ts +1 -1
- package/src/components/button/kbd.ts +8 -7
- package/src/components/button/morph/save.ts +2 -2
- package/src/components/button/morph/template.ts +18 -20
- package/src/components/button/scss/index.scss +84 -59
- package/src/components/button/scss/variables.scss +44 -29
- package/src/components/button/sidebar.ts +2 -2
- package/src/components/button/split.ts +7 -8
- package/src/components/capslock/index.ts +4 -4
- package/src/components/capslock/scss/index.scss +4 -2
- package/src/components/capslock/scss/variables.scss +14 -15
- package/src/components/card/scss/index.scss +10 -19
- package/src/components/card/scss/variables.scss +6 -2
- package/src/components/chat/minimap/index.ts +14 -13
- package/src/components/chat/minimap/scss/index.scss +19 -28
- package/src/components/chat/minimap/scss/variables.scss +33 -29
- package/src/components/checkbox/group.ts +5 -5
- package/src/components/checkbox/options.ts +2 -2
- package/src/components/checkbox/scss/index.scss +10 -6
- package/src/components/checkbox/scss/variables.scss +59 -44
- package/src/components/clipboard/write.ts +2 -1
- package/src/components/color-picker/index.ts +9 -11
- package/src/components/color-picker/scss/index.scss +2 -2
- package/src/components/color-picker/scss/variables.scss +26 -41
- package/src/components/command/palette.ts +15 -29
- package/src/components/command/scss/index.scss +8 -13
- package/src/components/command/scss/variables.scss +8 -8
- package/src/components/command/search.ts +3 -8
- package/src/components/container/scss/index.scss +2 -4
- package/src/components/container/scss/variables.scss +0 -2
- package/src/components/counter/index.ts +2 -1
- package/src/components/counter/scss/index.scss +2 -1
- package/src/components/counter/scss/variables.scss +3 -9
- package/src/components/dock/index.ts +17 -8
- package/src/components/dock/scss/index.scss +26 -56
- package/src/components/dock/scss/variables.scss +11 -20
- package/src/components/editor/code/features.ts +4 -5
- package/src/components/editor/code/field.ts +1 -1
- package/src/components/editor/code/find.ts +1 -1
- package/src/components/editor/code/folding.ts +1 -1
- package/src/components/editor/code/html.ts +17 -0
- 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 +10 -23
- package/src/components/editor/code/scss/_features.scss +17 -26
- package/src/components/editor/code/scss/_minimap.scss +29 -0
- package/src/components/editor/code/scss/_services.scss +4 -7
- package/src/components/editor/code/scss/index.scss +0 -1
- package/src/components/editor/code/scss/variables.scss +22 -14
- 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/diffs/merge.ts +3 -3
- package/src/components/editor/diffs/render.ts +2 -17
- package/src/components/editor/diffs/scss/_diffs.scss +22 -57
- package/src/components/editor/diffs/scss/_merge.scss +8 -29
- package/src/components/editor/diffs/scss/variables.scss +1 -10
- 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/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 +3 -2
- package/src/components/editor/markdown/scss/index.scss +132 -57
- package/src/components/editor/markdown/scss/variables.scss +124 -4
- 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 +16 -15
- package/src/components/editor/tree/icons.ts +1 -1
- package/src/components/editor/tree/scss/index.scss +69 -44
- package/src/components/editor/tree/scss/variables.scss +75 -44
- package/src/components/editor/tree/sticky.ts +1 -1
- package/src/components/editor/tree/template.ts +2 -2
- package/src/components/editor/viewer/model.ts +1 -14
- package/src/components/editor/viewer/scss/_viewer.scss +22 -72
- package/src/components/editor/viewer/scss/index.scss +1 -1
- package/src/components/editor/viewer/scss/variables.scss +1 -3
- package/src/components/editor/viewer/template.ts +4 -2
- package/src/components/editor/workspace/navigate.ts +3 -6
- package/src/components/editor/workspace/scss/_keybindings.scss +9 -7
- package/src/components/editor/workspace/scss/_status.scss +14 -38
- package/src/components/editor/workspace/scss/_tabs.scss +6 -3
- package/src/components/editor/workspace/scss/index.scss +38 -33
- package/src/components/editor/workspace/scss/variables.scss +57 -53
- package/src/components/editor/workspace/session.ts +20 -13
- package/src/components/editor/workspace/status.ts +2 -2
- package/src/components/editor/workspace/template.ts +12 -21
- package/src/components/error/index.ts +36 -18
- package/src/components/error/scss/index.scss +3 -1
- package/src/components/error/scss/variables.scss +1 -0
- package/src/components/filter/index.ts +146 -99
- package/src/components/filter/scss/variables.scss +1 -1
- package/src/components/form/action.ts +1 -1
- package/src/components/frame/scss/index.scss +10 -6
- package/src/components/frame/scss/variables.scss +11 -6
- package/src/components/grid/scss/index.scss +1 -1
- package/src/components/grid/scss/variables.scss +1 -1
- package/src/components/heatmap/index.ts +2 -2
- package/src/components/heatmap/scss/index.scss +22 -17
- package/src/components/heatmap/scss/variables.scss +16 -34
- package/src/components/highlight/index.ts +0 -1
- package/src/components/highlight/scss/index.scss +13 -21
- package/src/components/highlight/scss/variables.scss +12 -14
- package/src/components/icon/index.ts +0 -4
- package/src/components/icon/scss/index.scss +2 -0
- package/src/components/image/lazyload.ts +1 -1
- package/src/components/image/scss/index.scss +14 -13
- package/src/components/image/scss/variables.scss +16 -12
- package/src/components/index.ts +0 -4
- package/src/components/inline-edit/index.ts +6 -5
- package/src/components/inline-edit/rich.ts +85 -1400
- package/src/components/inline-edit/scss/index.scss +24 -191
- package/src/components/inline-edit/scss/variables.scss +24 -191
- package/src/components/inline-edit/status.ts +6 -3
- package/src/components/input/field.ts +2 -2
- package/src/components/input/scrub.ts +1 -5
- package/src/components/input/scss/_scrub.scss +7 -0
- package/src/components/input/scss/_tag.scss +4 -2
- package/src/components/input/scss/index.scss +1 -2
- package/src/components/input/scss/variables.scss +14 -21
- package/src/components/input/tag.ts +6 -7
- package/src/components/json/download.ts +2 -1
- package/src/components/link/scss/index.scss +0 -1
- package/src/components/loading/index.ts +1 -1
- package/src/components/loading/scss/index.scss +4 -4
- package/src/components/loading/scss/variables.scss +4 -4
- package/src/components/marquee/index.ts +5 -5
- package/src/components/marquee/scss/index.scss +6 -4
- package/src/components/marquee/scss/variables.scss +3 -4
- package/src/components/marquee/velocity.ts +7 -3
- package/src/components/metric/flash.ts +1 -1
- package/src/components/metric/index.ts +5 -13
- package/src/components/metric/scss/_flash.scss +9 -4
- package/src/components/metric/scss/index.scss +11 -9
- package/src/components/metric/scss/variables.scss +73 -73
- package/src/components/nav/scss/index.scss +2 -1
- package/src/components/nav/scss/variables.scss +9 -11
- package/src/components/nav/spy.ts +15 -8
- package/src/components/nav/tree.ts +28 -30
- package/src/components/notification/index.ts +37 -16
- package/src/components/notification/scss/index.scss +32 -17
- package/src/components/notification/scss/variables.scss +12 -12
- package/src/components/overlay/index.ts +212 -142
- package/src/components/overlay/popup.ts +89 -52
- package/src/components/overlay/scss/index.scss +68 -85
- package/src/components/overlay/scss/variables.scss +15 -12
- package/src/components/pagination/cards.ts +1 -2
- package/src/components/pagination/index.ts +3 -9
- package/src/components/pagination/scss/index.scss +12 -12
- package/src/components/pagination/scss/variables.scss +39 -21
- package/src/components/panels/dnd.ts +35 -29
- package/src/components/panels/group.ts +5 -13
- package/src/components/panels/index.ts +4 -6
- package/src/components/panels/resize.ts +30 -4
- package/src/components/panels/scss/index.scss +13 -28
- package/src/components/panels/scss/variables.scss +3 -3
- package/src/components/preview/code.ts +1 -1
- package/src/components/preview/index.ts +12 -7
- package/src/components/preview/scss/index.scss +30 -15
- package/src/components/preview/scss/variables.scss +56 -34
- package/src/components/progress/scss/index.scss +14 -11
- package/src/components/progress/scss/variables.scss +34 -31
- package/src/components/progress/text.ts +9 -8
- package/src/components/range/filter.ts +9 -11
- package/src/components/range/index.ts +2 -9
- package/src/components/range/scss/_filter.scss +4 -3
- package/src/components/range/scss/_slider.scss +2 -1
- package/src/components/range/scss/variables.scss +2 -16
- package/src/components/relative-time/index.ts +15 -16
- package/src/components/relative-time/scss/index.scss +8 -4
- package/src/components/relative-time/scss/variables.scss +7 -3
- package/src/components/root/scss/index.scss +3 -0
- package/src/components/root/scss/variables.scss +11 -11
- package/src/components/select/expand.ts +272 -0
- package/src/components/select/index.ts +142 -119
- package/src/components/select/scss/index.scss +79 -7
- package/src/components/select/scss/variables.scss +67 -3
- package/src/components/shell/index.ts +73 -50
- package/src/components/shell/scss/index.scss +34 -47
- package/src/components/shell/scss/variables.scss +16 -16
- package/src/components/shortcut-recorder/index.ts +14 -17
- package/src/components/shortcut-recorder/scss/index.scss +15 -10
- package/src/components/shortcut-recorder/scss/variables.scss +4 -7
- package/src/components/sortable/index.ts +25 -28
- package/src/components/sortable/scss/index.scss +28 -27
- package/src/components/sortable/scss/variables.scss +12 -7
- package/src/components/story/index.ts +110 -47
- package/src/components/story/scss/index.scss +13 -18
- package/src/components/story/scss/variables.scss +4 -16
- package/src/components/surface-field/engine.ts +71 -72
- package/src/components/surface-field/index.ts +17 -20
- package/src/components/surface-field/scss/index.scss +9 -11
- package/src/components/surface-field/scss/variables.scss +20 -23
- package/src/components/surface-field/surface.ts +4 -3
- package/src/components/tasklist/index.ts +1 -6
- package/src/components/tasklist/scss/index.scss +22 -26
- package/src/components/tasklist/scss/variables.scss +14 -20
- package/src/components/textarea/index.ts +49 -91
- package/src/components/textarea/scss/index.scss +20 -15
- package/src/components/textarea/scss/variables.scss +15 -0
- package/src/components/theme/cards.ts +19 -0
- package/src/components/theme/index.ts +58 -17
- package/src/components/theme/reveal.ts +190 -0
- package/src/components/theme/scss/index.scss +109 -0
- package/src/components/theme/scss/variables.scss +153 -3
- package/src/components/{theme-picker → theme}/shared.ts +9 -6
- package/src/components/theme/swatches.ts +15 -0
- package/src/components/theme/toggle.ts +47 -0
- package/src/components/toast/index.ts +2 -3
- package/src/components/toast/scss/index.scss +63 -0
- package/src/components/toast/scss/variables.scss +121 -16
- package/src/components/tooltip/menu.ts +141 -131
- package/src/components/tooltip/onclick.ts +16 -21
- package/src/components/tooltip/onhover.ts +5 -8
- package/src/components/tooltip/scss/index.scss +534 -56
- package/src/components/tooltip/scss/variables.scss +64 -13
- package/src/components/tooltip/shared.ts +129 -87
- package/src/components/tooltip/utilities.ts +75 -24
- package/src/components/typewriter/index.ts +7 -10
- package/src/components/typewriter/rotate.ts +11 -7
- package/src/components/typewriter/scss/index.scss +2 -0
- package/src/components/typewriter/scss/variables.scss +1 -1
- package/src/components/uptime/index.ts +12 -6
- package/src/components/uptime/scss/index.scss +86 -75
- package/src/components/uptime/scss/variables.scss +82 -51
- package/src/components/usage-meter/index.ts +1 -1
- package/src/components/usage-meter/scss/index.scss +0 -3
- package/src/components/usage-meter/scss/variables.scss +13 -14
- package/src/css-utilities/background.scss +9 -1
- package/src/css-utilities/border.scss +3 -0
- package/src/css-utilities/box-shadow.scss +3 -2
- package/src/css-utilities/color.scss +13 -3
- package/src/css-utilities/disabled.scss +12 -0
- 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 +1 -2
- package/src/css-utilities/icon.scss +1 -0
- package/src/css-utilities/layer.scss +2 -1
- package/src/css-utilities/skeleton.scss +4 -1
- package/src/css-utilities/surface.scss +97 -108
- package/src/css-utilities/text.scss +13 -13
- package/src/modifiers/background/scss/variables.scss +2 -4
- package/src/modifiers/border/scss/variables.scss +6 -8
- 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 +20 -2
- package/src/modifiers/scrollbar/scss/variables.scss +2 -2
- package/src/normalize/scss/index.scss +1 -0
- package/src/shared/anchor.ts +1 -1
- package/src/shared/animation.ts +6 -4
- package/src/shared/dispatch.ts +42 -0
- package/src/shared/drag.ts +2 -1
- 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 +16 -20
- package/src/tokens/scss/focus.scss +5 -0
- package/src/tokens/scss/font-size.scss +1 -2
- package/src/tokens/scss/index.scss +1 -0
- 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 +11 -30
- package/vite-env.d.ts +1 -1
- package/vite.config.ts +10 -8
- package/build/components/cc/index.d.ts +0 -30
- package/build/components/cc/index.js +0 -561
- package/build/components/cc/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/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/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/cards.d.ts +0 -13
- package/build/components/theme-picker/cards.js +0 -17
- package/build/components/theme-picker/index.d.ts +0 -12
- package/build/components/theme-picker/index.js +0 -7
- package/build/components/theme-picker/scss/index.scss +0 -2
- package/build/components/theme-picker/swatches.d.ts +0 -13
- package/build/components/theme-picker/swatches.js +0 -17
- package/build/components/theme-picker/toggle.d.ts +0 -19
- package/build/components/theme-picker/toggle.js +0 -109
- package/src/components/cc/index.ts +0 -563
- package/src/components/cc/scss/index.scss +0 -386
- package/src/components/cc/scss/variables.scss +0 -254
- 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 -43
- 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/sticky-header/index.ts +0 -78
- package/src/components/sticky-header/scss/index.scss +0 -141
- package/src/components/sticky-header/scss/variables.scss +0 -78
- package/src/components/theme-picker/cards.ts +0 -19
- package/src/components/theme-picker/index.ts +0 -12
- package/src/components/theme-picker/scss/index.scss +0 -174
- package/src/components/theme-picker/scss/variables.scss +0 -220
- package/src/components/theme-picker/swatches.ts +0 -15
- package/src/components/theme-picker/toggle.ts +0 -150
- 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 -325
- package/src/components/tooltip/scss/_north.scss +0 -33
- package/src/components/tooltip/scss/_shared.scss +0 -112
- package/src/components/tooltip/scss/_south.scss +0 -33
- package/src/components/tooltip/scss/_west.scss +0 -33
|
@@ -1,13 +1,13 @@
|
|
|
1
|
+
import * as reactivity_u0 from '@esportsplus/reactivity';
|
|
1
2
|
import * as template_u1 from '@esportsplus/template';
|
|
2
3
|
import { component } from '@esportsplus/template';
|
|
3
|
-
import
|
|
4
|
+
import check from '@esportsplus/ui/svg/check.svg';
|
|
4
5
|
import form from '../form/index.js';
|
|
5
6
|
import icon from '../icon/index.js';
|
|
6
|
-
import check from '@esportsplus/ui/svg/check.svg';
|
|
7
7
|
import { group } from './group.js';
|
|
8
|
-
const template_10ly6fa2 = template_u1.template(`<div
|
|
9
|
-
const
|
|
10
|
-
const
|
|
8
|
+
const template_10ly6fa2 = template_u1.template(`<div><input type=checkbox value='1'><!--$-->`, true);
|
|
9
|
+
const template_10ly6faa = template_u1.template(`<div><input type=radio value='1'><!--$-->`, true);
|
|
10
|
+
const template_10ly6fap = template_u1.template(`<div><input value='1'><!--$-->`, true);
|
|
11
11
|
class ReactiveObject_10ly6fa0 extends reactivity_u0.ReactiveObject {
|
|
12
12
|
#error = this[reactivity_u0.SIGNAL]('');
|
|
13
13
|
constructor() {
|
|
@@ -24,50 +24,78 @@ const CHECKBOX_INPUT = Symbol.for('@esportsplus/ui/checkbox.input');
|
|
|
24
24
|
function factory(type, properties) {
|
|
25
25
|
return component(function ({ state = new ReactiveObject_10ly6fa0(), ...attributes }, content) {
|
|
26
26
|
return (type === "checkbox" ? (() => {
|
|
27
|
-
let root_10ly6fa1 = template_10ly6fa2(), element_10ly6fa3 = root_10ly6fa1.
|
|
28
|
-
template_u1.slot(
|
|
29
|
-
template_u1.slot(
|
|
30
|
-
template_u1.onconnect(
|
|
31
|
-
|
|
32
|
-
template_u1.setProperties(
|
|
33
|
-
|
|
34
|
-
template_u1.setProperties(element_10ly6fa3,
|
|
35
|
-
template_u1.
|
|
27
|
+
let root_10ly6fa1 = template_10ly6fa2(), element_10ly6fa3 = root_10ly6fa1.firstElementChild, element_10ly6fa4 = root_10ly6fa1.firstChild.nextSibling;
|
|
28
|
+
template_u1.slot(element_10ly6fa4, type === 'checkbox' && icon({ 'aria-hidden': true, class: 'checkbox-check' }, check));
|
|
29
|
+
template_u1.slot(root_10ly6fa1, content, 1);
|
|
30
|
+
template_u1.onconnect(element_10ly6fa3, form.input.onconnect(state));
|
|
31
|
+
let attributes_10ly6fa5 = this?.attributes?.[CHECKBOX_INPUT];
|
|
32
|
+
template_u1.setProperties(element_10ly6fa3, attributes_10ly6fa5, true);
|
|
33
|
+
let attributes_10ly6fa6 = attributes[CHECKBOX_INPUT];
|
|
34
|
+
template_u1.setProperties(element_10ly6fa3, attributes_10ly6fa6, true);
|
|
35
|
+
template_u1.setClass(element_10ly6fa3, ["checkbox-tag", attributes_10ly6fa5?.class, attributes_10ly6fa6?.class]);
|
|
36
|
+
template_u1.setStyle(element_10ly6fa3, ["", attributes_10ly6fa5?.style, attributes_10ly6fa6?.style]);
|
|
37
|
+
let attributes_10ly6fa7 = this?.attributes;
|
|
38
|
+
template_u1.setProperties(root_10ly6fa1, attributes_10ly6fa7, true);
|
|
39
|
+
let attributes_10ly6fa8 = attributes;
|
|
40
|
+
template_u1.setProperties(root_10ly6fa1, attributes_10ly6fa8, true);
|
|
41
|
+
template_u1.setClass(root_10ly6fa1, ["checkbox", type !== 'checkbox' && `checkbox--${type}`, attributes_10ly6fa7?.class, attributes_10ly6fa8?.class]);
|
|
42
|
+
template_u1.setStyle(root_10ly6fa1, ["", attributes_10ly6fa7?.style, attributes_10ly6fa8?.style]);
|
|
36
43
|
return root_10ly6fa1;
|
|
37
44
|
})() : type === "radio" ? (() => {
|
|
38
|
-
let
|
|
39
|
-
template_u1.slot(
|
|
40
|
-
template_u1.slot(
|
|
41
|
-
template_u1.onconnect(
|
|
42
|
-
|
|
43
|
-
template_u1.setProperties(
|
|
44
|
-
|
|
45
|
-
template_u1.setProperties(
|
|
46
|
-
template_u1.
|
|
47
|
-
|
|
45
|
+
let root_10ly6fa9 = template_10ly6faa(), element_10ly6fab = root_10ly6fa9.firstElementChild, element_10ly6fac = root_10ly6fa9.firstChild.nextSibling;
|
|
46
|
+
template_u1.slot(element_10ly6fac, type === 'checkbox' && icon({ 'aria-hidden': true, class: 'checkbox-check' }, check));
|
|
47
|
+
template_u1.slot(root_10ly6fa9, content, 1);
|
|
48
|
+
template_u1.onconnect(element_10ly6fab, form.input.onconnect(state));
|
|
49
|
+
let attributes_10ly6fad = this?.attributes?.[CHECKBOX_INPUT];
|
|
50
|
+
template_u1.setProperties(element_10ly6fab, attributes_10ly6fad, true);
|
|
51
|
+
let attributes_10ly6fae = attributes[CHECKBOX_INPUT];
|
|
52
|
+
template_u1.setProperties(element_10ly6fab, attributes_10ly6fae, true);
|
|
53
|
+
template_u1.setClass(element_10ly6fab, ["checkbox-tag", attributes_10ly6fad?.class, attributes_10ly6fae?.class]);
|
|
54
|
+
template_u1.setStyle(element_10ly6fab, ["", attributes_10ly6fad?.style, attributes_10ly6fae?.style]);
|
|
55
|
+
let attributes_10ly6faf = this?.attributes;
|
|
56
|
+
template_u1.setProperties(root_10ly6fa9, attributes_10ly6faf, true);
|
|
57
|
+
let attributes_10ly6fag = attributes;
|
|
58
|
+
template_u1.setProperties(root_10ly6fa9, attributes_10ly6fag, true);
|
|
59
|
+
template_u1.setClass(root_10ly6fa9, ["checkbox", type !== 'checkbox' && `checkbox--${type}`, attributes_10ly6faf?.class, attributes_10ly6fag?.class]);
|
|
60
|
+
template_u1.setStyle(root_10ly6fa9, ["", attributes_10ly6faf?.style, attributes_10ly6fag?.style]);
|
|
61
|
+
return root_10ly6fa9;
|
|
48
62
|
})() : type === "switch" ? (() => {
|
|
49
|
-
let
|
|
50
|
-
template_u1.slot(element_10ly6fae, type === 'checkbox' && icon({ 'aria-hidden': true, class: 'checkbox-check' }, check));
|
|
51
|
-
template_u1.slot(element_10ly6fac, content, 2);
|
|
52
|
-
template_u1.onconnect(element_10ly6fad, form.input.onconnect(state));
|
|
53
|
-
template_u1.setProperties(element_10ly6fad, this?.attributes?.[CHECKBOX_INPUT]);
|
|
54
|
-
template_u1.setProperties(element_10ly6fad, attributes[CHECKBOX_INPUT]);
|
|
55
|
-
template_u1.setList(element_10ly6fac, 'class', type !== 'checkbox' && `checkbox--${type}`);
|
|
56
|
-
template_u1.setProperties(element_10ly6fac, this?.attributes);
|
|
57
|
-
template_u1.setProperties(element_10ly6fac, attributes);
|
|
58
|
-
return root_10ly6fab;
|
|
59
|
-
})() : (() => {
|
|
60
|
-
let root_10ly6faf = template_10ly6fag(), element_10ly6fah = root_10ly6faf.firstChild, element_10ly6fai = element_10ly6fah.firstElementChild, element_10ly6faj = element_10ly6fah.firstChild.nextSibling;
|
|
63
|
+
let root_10ly6fah = template_10ly6fa2(), element_10ly6fai = root_10ly6fah.firstElementChild, element_10ly6faj = root_10ly6fah.firstChild.nextSibling;
|
|
61
64
|
template_u1.slot(element_10ly6faj, type === 'checkbox' && icon({ 'aria-hidden': true, class: 'checkbox-check' }, check));
|
|
62
|
-
template_u1.slot(
|
|
65
|
+
template_u1.slot(root_10ly6fah, content, 1);
|
|
63
66
|
template_u1.onconnect(element_10ly6fai, form.input.onconnect(state));
|
|
64
|
-
|
|
65
|
-
template_u1.setProperties(element_10ly6fai,
|
|
66
|
-
|
|
67
|
-
template_u1.
|
|
68
|
-
template_u1.
|
|
69
|
-
template_u1.
|
|
70
|
-
|
|
67
|
+
let attributes_10ly6fak = this?.attributes?.[CHECKBOX_INPUT];
|
|
68
|
+
template_u1.setProperties(element_10ly6fai, attributes_10ly6fak, true);
|
|
69
|
+
let attributes_10ly6fal = attributes[CHECKBOX_INPUT];
|
|
70
|
+
template_u1.setProperties(element_10ly6fai, attributes_10ly6fal, true);
|
|
71
|
+
template_u1.setClass(element_10ly6fai, ["checkbox-tag", attributes_10ly6fak?.class, attributes_10ly6fal?.class]);
|
|
72
|
+
template_u1.setStyle(element_10ly6fai, ["", attributes_10ly6fak?.style, attributes_10ly6fal?.style]);
|
|
73
|
+
let attributes_10ly6fam = this?.attributes;
|
|
74
|
+
template_u1.setProperties(root_10ly6fah, attributes_10ly6fam, true);
|
|
75
|
+
let attributes_10ly6fan = attributes;
|
|
76
|
+
template_u1.setProperties(root_10ly6fah, attributes_10ly6fan, true);
|
|
77
|
+
template_u1.setClass(root_10ly6fah, ["checkbox", type !== 'checkbox' && `checkbox--${type}`, attributes_10ly6fam?.class, attributes_10ly6fan?.class]);
|
|
78
|
+
template_u1.setStyle(root_10ly6fah, ["", attributes_10ly6fam?.style, attributes_10ly6fan?.style]);
|
|
79
|
+
return root_10ly6fah;
|
|
80
|
+
})() : (() => {
|
|
81
|
+
let root_10ly6fao = template_10ly6fap(), element_10ly6faq = root_10ly6fao.firstElementChild, element_10ly6far = root_10ly6fao.firstChild.nextSibling;
|
|
82
|
+
template_u1.slot(element_10ly6far, type === 'checkbox' && icon({ 'aria-hidden': true, class: 'checkbox-check' }, check));
|
|
83
|
+
template_u1.slot(root_10ly6fao, content, 1);
|
|
84
|
+
template_u1.onconnect(element_10ly6faq, form.input.onconnect(state));
|
|
85
|
+
template_u1.setProperty(element_10ly6faq, 'type', type === 'radio' ? 'radio' : 'checkbox');
|
|
86
|
+
let attributes_10ly6fas = this?.attributes?.[CHECKBOX_INPUT];
|
|
87
|
+
template_u1.setProperties(element_10ly6faq, attributes_10ly6fas, true);
|
|
88
|
+
let attributes_10ly6fat = attributes[CHECKBOX_INPUT];
|
|
89
|
+
template_u1.setProperties(element_10ly6faq, attributes_10ly6fat, true);
|
|
90
|
+
template_u1.setClass(element_10ly6faq, ["checkbox-tag", attributes_10ly6fas?.class, attributes_10ly6fat?.class]);
|
|
91
|
+
template_u1.setStyle(element_10ly6faq, ["", attributes_10ly6fas?.style, attributes_10ly6fat?.style]);
|
|
92
|
+
let attributes_10ly6fau = this?.attributes;
|
|
93
|
+
template_u1.setProperties(root_10ly6fao, attributes_10ly6fau, true);
|
|
94
|
+
let attributes_10ly6fav = attributes;
|
|
95
|
+
template_u1.setProperties(root_10ly6fao, attributes_10ly6fav, true);
|
|
96
|
+
template_u1.setClass(root_10ly6fao, ["checkbox", type !== 'checkbox' && `checkbox--${type}`, attributes_10ly6fau?.class, attributes_10ly6fav?.class]);
|
|
97
|
+
template_u1.setStyle(root_10ly6fao, ["", attributes_10ly6fau?.style, attributes_10ly6fav?.style]);
|
|
98
|
+
return root_10ly6fao;
|
|
71
99
|
})());
|
|
72
100
|
}, { ...properties, input: CHECKBOX_INPUT });
|
|
73
101
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@layer components{.checkbox--radio:before,.checkbox-tag,.checkbox .checkbox-check,.checkbox .checkbox-group-dash{position:absolute;inset:0}.checkbox .checkbox-check svg,.checkbox .checkbox-group-dash svg{stroke-dasharray:1;stroke-dashoffset:1px}.checkbox{--background:var(--background-default);--background-active:var(--background-default);--background-default:transparent;--background-hover:var(--background-default);--background-pressed:var(--background-default);--border-color:var(--border-color-default);--border-color-active:var(--surface-border-active);--border-color-default:var(--surface-border-default);--border-color-hover:var(--surface-border-hover);--border-color-pressed:var(--surface-border-pressed);--border-radius:var(--border-radius-300);--border-style:solid;--border-width:var(--border-width-400);--border-width-offset:0px;--border-width-offset-hover:var(--border-width-400);--box-shadow:var(--box-shadow-default);--box-shadow-active:0 3px 8px oklch(from var(--surface-shadow-color) l c h / calc(alpha * 2));--box-shadow-default:none;--box-shadow-hover:var(--box-shadow-default);--box-shadow-pressed:var(--box-shadow-default);--focus-color:var(--border-color-active);--focus-offset:calc(var(--size-100) / 4);--focus-width:var(--border-width-500);--height:var(--size);--indicator-color:var(--indicator-color-default);--indicator-color-active:var(--indicator-color-default);--indicator-color-default:var(--color-white-400);--indicator-color-hover:var(--indicator-color-default);--indicator-color-pressed:var(--indicator-color-default);--scale:var(--scale-default);--scale-active:1;--scale-default:.92;--scale-hover:.96;--scale-pressed:var(--scale-default);--size:var(--size-500);--width:var(--height)}.checkbox--radio{--border-radius:100%;--scale-default:0;--scale-hover:0}.checkbox--radio:before{--height:var(--size-100);--width:var(--height)}.checkbox--radio:before,.checkbox--switch:before{--box-shadow:0 2px 4px oklch(from var(--surface-shadow-color) l c h / calc(alpha * 2))}.checkbox--switch{--background-default:var(--surface-primary-default);--background-hover:var(--surface-primary-hover);--background-pressed:var(--surface-primary-pressed);--border-width:0px;--border-width-offset-hover:0px;--box-shadow-active:var(--box-shadow-default);--focus-color:var(--background-active);--padding-horizontal:calc(var(--size-100) / 4);--padding-vertical:calc(var(--size-100) / 4);--progress:0;--translateX-active:calc(var(--width-rail) - (var(--border-width) * 2) - var(--height) - (var(--padding-horizontal) * 2));--width:var(--width-rail);--width-rail:calc(var(--height) * 1.8)}.checkbox--switch:before{--translateX:calc(var(--translateX-active) * var(--progress));--width:var(--height)}.checkbox--switch:has(input:checked){--progress:1}.checkbox-group{--color:var(--color-text-500);--gap-horizontal:0px;--gap-vertical:0px}.checkbox-group-counter{--color:var(--color-text-300)}.checkbox-group-header{--gap-horizontal:var(--size-300);--gap-vertical:0px}.checkbox-group-hint{--color:var(--color-text-300)}.checkbox-group-hint-key{--border-color:var(--surface-border-default);--border-width:1px;--padding-horizontal:calc(var(--size-100) / 2);--padding-vertical:1px}.checkbox:has(input:checked) .checkbox-check.icon{--offset:0}.checkbox:has(input:checked,input:indeterminate){--background:var(--background-active);--border-color:var(--border-color-active);--box-shadow:var(--box-shadow-active);--indicator-color:var(--indicator-color-active);--scale:var(--scale-active)}.checkbox:has(input:indeterminate) .checkbox-group-dash.icon{--offset:0}.checkbox:not(:has(input:checked,input:indeterminate)):active{--background:var(--background-pressed);--border-color:var(--border-color-pressed);--box-shadow:var(--box-shadow-pressed);--indicator-color:var(--indicator-color-pressed);--scale:var(--scale-pressed)}label:active .checkbox:not(:has(input:checked,input:indeterminate)){--background:var(--background-pressed);--border-color:var(--border-color-pressed);--box-shadow:var(--box-shadow-pressed);--indicator-color:var(--indicator-color-pressed);--scale:var(--scale-pressed)}.checkbox:not(:has(input:checked,input:indeterminate)):hover{--background:var(--background-hover);--border-color:var(--border-color-hover);--border-width-offset:var(--border-width-offset-hover);--box-shadow:var(--box-shadow-hover);--indicator-color:var(--indicator-color-hover);--scale:var(--scale-hover)}label:hover .checkbox:not(:has(input:checked,input:indeterminate)){--background:var(--background-hover);--border-color:var(--border-color-hover);--border-width-offset:var(--border-width-offset-hover);--box-shadow:var(--box-shadow-hover);--indicator-color:var(--indicator-color-hover);--scale:var(--scale-hover)}.checkbox .checkbox-check.icon,.checkbox .checkbox-group-dash.icon{--linecap:round;--linejoin:round;--offset:1;--size:80%;--stroke-width:4;--transition-duration:.16s;--transition-timing-function:ease}.checkbox .checkbox-check.icon{--inset-horizontal:1px}.checkbox{background:var(--background);border-color:var(--border-color);border-radius:var(--border-radius);border-style:var(--border-style);border-width:calc(var(--border-width) + var(--border-width-offset));box-shadow:var(--box-shadow);cursor:pointer;flex:0 0 var(--width);height:var(--height);pointer-events:none;transition:background var(--transition-duration) var(--transition-timing-function), border-color var(--transition-duration) var(--transition-timing-function), border-width var(--transition-duration) var(--transition-timing-function), box-shadow var(--transition-duration) var(--transition-timing-function);width:var(--width);position:relative}@media (prefers-reduced-motion:reduce){.checkbox{transition:none}}.checkbox--radio:before{border-radius:calc(var(--border-radius) - var(--height) / 2);height:var(--height);scale:var(--scale);margin:auto}.checkbox--radio:before,.checkbox--switch:before{background:var(--indicator-color);box-shadow:var(--box-shadow);content:"";pointer-events:none;transform-origin:50%;transition:scale var(--transition-duration) var(--transition-timing-function), translate var(--transition-duration) var(--transition-timing-function);width:var(--width)}@media (prefers-reduced-motion:reduce){.checkbox--radio:before,.checkbox--switch:before{transition:none}}.checkbox--switch:before{border-radius:calc(var(--border-radius) - var(--padding-vertical) / 1.5);height:calc(var(--height) - var(--border-width) * 2 - var(--padding-vertical) * 2);inset:var(--padding-vertical) auto auto var(--padding-horizontal);scale:var(--scale);translate:var(--translateX);position:absolute}.checkbox-group{color:var(--color);gap:var(--gap-vertical) var(--gap-horizontal);flex-direction:column;display:flex}.checkbox-group-counter{color:var(--color);font-size:var(--font-size-300);font-variant-numeric:tabular-nums;flex:none}.checkbox-group-header{cursor:pointer;align-items:center;gap:var(--gap-vertical) var(--gap-horizontal);-webkit-user-select:none;user-select:none;display:flex}.checkbox-group-hint{color:var(--color);font-size:var(--font-size-300);-webkit-user-select:none;user-select:none;margin:0}.checkbox-group-hint-key{border:var(--border-width) solid var(--border-color);border-radius:var(--border-radius-200);font-family:inherit;font-size:inherit;padding-block:var(--padding-vertical);padding-inline:var(--padding-horizontal)}.checkbox-group-label{font-weight:var(--font-weight-500);flex:1;min-width:0}.checkbox-tag{cursor:inherit;opacity:0;pointer-events:all;z-index:1;width:100%;height:100%;margin:0}.checkbox:has(>.checkbox-tag:focus-visible){outline:var(--focus-width) solid var(--focus-color);outline-offset:var(--focus-offset)}.checkbox .checkbox-check{left:var(--inset-horizontal)}.checkbox .checkbox-check,.checkbox .checkbox-group-dash{pointer-events:none;margin:auto}.checkbox .checkbox-check svg,.checkbox .checkbox-group-dash svg{fill:none;stroke:var(--indicator-color);stroke-dashoffset:var(--offset);stroke-linecap:var(--linecap);stroke-linejoin:var(--linejoin);stroke-width:var(--stroke-width);transition:stroke-dashoffset var(--transition-duration) var(--transition-timing-function)}@media (prefers-reduced-motion:reduce){.checkbox .checkbox-check svg,.checkbox .checkbox-group-dash svg{transition:none}}}
|
|
1
|
+
@layer components{.checkbox--radio:before,.checkbox-tag,.checkbox .checkbox-check,.checkbox .checkbox-group-dash{position:absolute;inset:0}.checkbox .checkbox-check svg,.checkbox .checkbox-group-dash svg{stroke-dasharray:1;stroke-dashoffset:1px}:where([data-theme=dark]) .checkbox,:where([data-theme=light]) .checkbox{--surface-shadow-active:0 1px 2px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02),transparent), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),transparent), 0 1px 1.75px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04)), 0 0px 0px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-default:0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-hover:0 1px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02),transparent), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),transparent), 0 1px .5px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04)), 0 0px 0px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-pressed:0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-background-active:light-dark(oklch(from var(--surface-background-default) calc(l + .02) c h),oklch(from var(--surface-background-default) calc(l + .03) c h));--surface-background-default:light-dark(oklch(from var(--color-surface) clamp(0, l + max(var(--surface-level), 0) * .01 + min(var(--surface-level), 0) * .016, 1) calc(c * (1 - clamp(0, l + max(var(--surface-level), 0) * .01 + min(var(--surface-level), 0) * .016, 1)) / max(1 - l, .01)) h),oklch(from var(--color-surface) clamp(0, l + var(--surface-level) * .016, l + .096) calc(c * clamp(0, l + var(--surface-level) * .016, l + .096) / max(l, .01)) h));--surface-background-hover:light-dark(oklch(from var(--surface-background-default) calc(l + .01) c h),oklch(from var(--surface-background-default) calc(l + .02) c h));--surface-background-pressed:light-dark(oklch(from var(--surface-background-default) calc(l - .02) c h),oklch(from var(--surface-background-default) calc(l - .03) c h));--surface-border-active:light-dark(oklch(from var(--surface-background-active) max(0, l - .046) c h),oklch(from var(--surface-background-active) min(1, l + .036) c h));--surface-border-default:light-dark(oklch(from var(--surface-background-default) max(0, l - .046) c h),oklch(from var(--surface-background-default) min(1, l + .036) c h));--surface-border-hover:light-dark(oklch(from var(--surface-background-hover) max(0, l - .046) c h),oklch(from var(--surface-background-hover) min(1, l + .036) c h));--surface-border-pressed:light-dark(oklch(from var(--surface-background-pressed) max(0, l - .046) c h),oklch(from var(--surface-background-pressed) min(1, l + .036) c h));--surface-primary-active:light-dark(oklch(from var(--surface-primary-default) calc(l + .02) c h),oklch(from var(--surface-primary-default) calc(l + .03) c h));--surface-primary-default:light-dark(oklch(from var(--color-surface) clamp(0, l + max(calc(var(--surface-level) + -3.6), 0) * .01 + min(calc(var(--surface-level) + -3.6), 0) * .016, 1) calc(c * (1 - clamp(0, l + max(calc(var(--surface-level) + -3.6), 0) * .01 + min(calc(var(--surface-level) + -3.6), 0) * .016, 1)) / max(1 - l, .01)) h),oklch(from var(--color-surface) clamp(0, l + calc(var(--surface-level) + 1.6) * .016, l + .096) calc(c * clamp(0, l + calc(var(--surface-level) + 1.6) * .016, l + .096) / max(l, .01)) h));--surface-primary-hover:light-dark(oklch(from var(--surface-primary-default) calc(l + .01) c h),oklch(from var(--surface-primary-default) calc(l + .02) c h));--surface-primary-pressed:light-dark(oklch(from var(--surface-primary-default) calc(l - .02) c h),oklch(from var(--surface-primary-default) calc(l - .03) c h))}.checkbox{--border-color-active:var(--background-active);--border-color-default:var(--surface-border-default);--border-color-hover:var(--surface-border-hover);--border-color-pressed:var(--surface-border-pressed);--box-shadow-active:var(--surface-shadow-active);--box-shadow-default:var(--surface-shadow-default);--box-shadow-hover:var(--surface-shadow-hover);--box-shadow-pressed:var(--surface-shadow-pressed);--border-color:var(--border-color-default);--border-radius:var(--border-radius-300);--border-width:var(--border-width-400);--border-width-offset:var(--border-width-offset-default);--border-width-offset-default:0px;--border-width-offset-hover:var(--border-width);--box-shadow:var(--box-shadow-default);--height:var(--size);--indicator-color:var(--indicator-color-default);--indicator-color-active:var(--indicator-color-default);--indicator-color-default:var(--color-surface);--indicator-color-hover:var(--indicator-color-default);--indicator-color-pressed:var(--indicator-color-default);--scale:var(--scale-default);--scale-active:1;--scale-default:.92;--scale-hover:.96;--scale-pressed:var(--scale-default);--size:var(--size-500);--width:var(--height)}@container style(--surface-level:-3){:where([data-theme=dark]) .checkbox{--surface-level:5;--surface-shadow-active:0 25px 50px -12px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .1),transparent), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),transparent), 0 24.375px 46.875px -11.125px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .185)), 0 1px 1.25px -.75px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .01));--surface-shadow-default:0 10px 15px -3px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 4px 6px -4px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08));--surface-shadow-hover:0 20px 25px -5px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),transparent), 0 8px 10px -6px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),transparent), 0 21.25px 31.25px -6.75px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .11)), 0 6px 7.5px -4.5px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .06));--surface-shadow-pressed:0 3.25px 5.25px -.75px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),transparent), 0 1.75px 3.5px -1.75px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),transparent), 0 1.375px 3.375px -.125px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 1.125px 2.25px -1.125px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08))}}@container style(--surface-level:-2){:where([data-theme=dark]) .checkbox{--surface-level:6;--surface-shadow-active:0 25px 50px -12px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .1),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .2)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-default:0 20px 25px -5px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 8px 10px -6px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08));--surface-shadow-hover:0 25px 50px -12px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .1),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .2)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-pressed:0 8.5px 12.75px -2.5px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),transparent), 0 3.5px 5.5px -3.5px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),transparent), 0 4.75px 7.125px -1.25px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 2.25px 4.25px -2.25px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08))}}@container style(--surface-level:-1){:where([data-theme=dark]) .checkbox{--surface-level:6;--surface-shadow-active:0 25px 50px -12px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .1),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .2)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-default:0 20px 25px -5px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 8px 10px -6px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08));--surface-shadow-hover:0 25px 50px -12px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .1),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .2)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-pressed:0 8.5px 12.75px -2.5px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),transparent), 0 3.5px 5.5px -3.5px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),transparent), 0 4.75px 7.125px -1.25px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 2.25px 4.25px -2.25px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08))}}@container style(--surface-level:0){:where([data-theme=dark]) .checkbox{--surface-level:6;--surface-shadow-active:0 25px 50px -12px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .1),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .2)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-default:0 20px 25px -5px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 8px 10px -6px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08));--surface-shadow-hover:0 25px 50px -12px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .1),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .2)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-pressed:0 8.5px 12.75px -2.5px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),transparent), 0 3.5px 5.5px -3.5px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),transparent), 0 4.75px 7.125px -1.25px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 2.25px 4.25px -2.25px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08))}}@container style(--surface-level:1){:where([data-theme=dark]) .checkbox{--surface-level:6;--surface-shadow-active:0 25px 50px -12px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .1),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .2)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-default:0 20px 25px -5px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 8px 10px -6px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08));--surface-shadow-hover:0 25px 50px -12px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .1),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .2)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-pressed:0 8.5px 12.75px -2.5px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),transparent), 0 3.5px 5.5px -3.5px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),transparent), 0 4.75px 7.125px -1.25px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 2.25px 4.25px -2.25px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08))}}@container style(--surface-level:2){:where([data-theme=dark]) .checkbox{--surface-level:6;--surface-shadow-active:0 25px 50px -12px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .1),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .2)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-default:0 20px 25px -5px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 8px 10px -6px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08));--surface-shadow-hover:0 25px 50px -12px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .1),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .2)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-pressed:0 8.5px 12.75px -2.5px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),transparent), 0 3.5px 5.5px -3.5px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),transparent), 0 4.75px 7.125px -1.25px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 2.25px 4.25px -2.25px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08))}}@container style(--surface-level:3){:where([data-theme=dark]) .checkbox{--surface-level:6;--surface-shadow-active:0 25px 50px -12px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .1),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .2)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-default:0 20px 25px -5px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 8px 10px -6px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08));--surface-shadow-hover:0 25px 50px -12px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .1),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .2)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-pressed:0 8.5px 12.75px -2.5px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),transparent), 0 3.5px 5.5px -3.5px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),transparent), 0 4.75px 7.125px -1.25px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 2.25px 4.25px -2.25px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08))}}@container style(--surface-level:4){:where([data-theme=dark]) .checkbox{--surface-level:6;--surface-shadow-active:0 25px 50px -12px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .1),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .2)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-default:0 20px 25px -5px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 8px 10px -6px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08));--surface-shadow-hover:0 25px 50px -12px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .1),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .2)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-pressed:0 8.5px 12.75px -2.5px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),transparent), 0 3.5px 5.5px -3.5px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),transparent), 0 4.75px 7.125px -1.25px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 2.25px 4.25px -2.25px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08))}}@container style(--surface-level:5){:where([data-theme=dark]) .checkbox{--surface-level:6;--surface-shadow-active:0 25px 50px -12px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .1),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .2)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-default:0 20px 25px -5px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 8px 10px -6px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08));--surface-shadow-hover:0 25px 50px -12px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .1),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .2)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-pressed:0 8.5px 12.75px -2.5px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),transparent), 0 3.5px 5.5px -3.5px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),transparent), 0 4.75px 7.125px -1.25px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 2.25px 4.25px -2.25px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08))}}@container style(--surface-level:6){:where([data-theme=dark]) .checkbox{--surface-level:6;--surface-shadow-active:0 25px 50px -12px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .1),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .2)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-default:0 20px 25px -5px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 8px 10px -6px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08));--surface-shadow-hover:0 25px 50px -12px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .1),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .2)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-pressed:0 8.5px 12.75px -2.5px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),transparent), 0 3.5px 5.5px -3.5px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04),transparent), 0 4.75px 7.125px -1.25px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 2.25px 4.25px -2.25px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08))}}:where([data-theme=dark]) .checkbox{--background:var(--background-default);--background-active:var(--color-primary-500);--background-default:transparent}@container style(--surface-level:-3){:where([data-theme=light]) .checkbox{--surface-level:-3}}@container style(--surface-level:-2){:where([data-theme=light]) .checkbox{--surface-level:-3}}@container style(--surface-level:-1){:where([data-theme=light]) .checkbox{--surface-level:-3}}@container style(--surface-level:0){:where([data-theme=light]) .checkbox{--surface-level:-3}}@container style(--surface-level:1){:where([data-theme=light]) .checkbox{--surface-level:-2}}@container style(--surface-level:2){:where([data-theme=light]) .checkbox{--surface-level:-1}}@container style(--surface-level:3){:where([data-theme=light]) .checkbox{--surface-level:0}}@container style(--surface-level:4){:where([data-theme=light]) .checkbox{--surface-level:1}}@container style(--surface-level:5){:where([data-theme=light]) .checkbox{--surface-level:2}}@container style(--surface-level:6){:where([data-theme=light]) .checkbox{--surface-level:3}}:where([data-theme=light]) .checkbox{--background:var(--background-default);--background-active:var(--color-primary-500);--background-default:transparent;--background-hover:var(--color-white-400);--background-pressed:var(--color-white-400)}.checkbox--radio:before,.checkbox--switch:before{--box-shadow:0 2px 4px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .16))}.checkbox--radio{--border-radius:100%;--scale-default:0;--scale-hover:0}.checkbox--radio:before{--height:var(--size-100);--width:var(--height)}.checkbox--switch{--border-width:0px;--border-width-offset-hover:0px;--box-shadow-active:var(--box-shadow-default);--padding-horizontal:1px;--padding-vertical:1px;--progress:0;--translate-horizontal-active:calc(var(--width-rail) - (var(--border-width) * 2) - var(--height) - (var(--padding-horizontal) * 2));--width:var(--width-rail);--width-rail:calc(var(--height) * 1.8)}.checkbox--switch:before{--translate-horizontal:calc(var(--translate-horizontal-active) * var(--progress));--width:var(--height)}:where([data-theme=dark]) .checkbox--switch,:where([data-theme=light]) .checkbox--switch{--background-default:var(--surface-primary-default);--background-hover:var(--surface-primary-hover);--background-pressed:var(--surface-primary-pressed)}.checkbox--switch:has(input:checked){--progress:1}.checkbox-group{--color:var(--color-text-500);--gap-horizontal:0px;--gap-vertical:0px}.checkbox-group-counter{--color:var(--color-text-300)}.checkbox-group-header{--gap-horizontal:var(--size-300);--gap-vertical:0px}.checkbox-group-hint{--color:var(--color-text-300)}.checkbox-group-hint-key{--border-color:var(--surface-border-default);--border-width:1px;--padding-horizontal:calc(var(--size-100) / 2);--padding-vertical:1px}.checkbox:has(input:checked) .checkbox-check.icon{--offset:0}.checkbox:has(input:checked,input:indeterminate){--background:var(--background-active);--border-color:var(--border-color-active);--box-shadow:var(--box-shadow-active);--indicator-color:var(--indicator-color-active);--scale:var(--scale-active)}.checkbox:has(input:indeterminate) .checkbox-group-dash.icon{--offset:0}.checkbox:not(:has(input:checked,input:indeterminate)):hover,label:hover .checkbox:not(:has(input:checked,input:indeterminate)){--background:var(--background-hover);--border-color:var(--border-color-hover);--border-width-offset:var(--border-width-offset-hover);--box-shadow:var(--box-shadow-hover);--indicator-color:var(--indicator-color-hover);--scale:var(--scale-hover)}.checkbox:not(:has(input:checked,input:indeterminate)):active,label:active .checkbox:not(:has(input:checked,input:indeterminate)){--background:var(--background-pressed);--border-color:var(--border-color-pressed);--box-shadow:var(--box-shadow-pressed);--indicator-color:var(--indicator-color-pressed);--scale:var(--scale-pressed)}.checkbox .checkbox-check.icon,.checkbox .checkbox-group-dash.icon{--linecap:round;--linejoin:round;--offset:1;--size:80%;--stroke-width:4;--transition-duration:.16s;--transition-timing-function:ease}.checkbox .checkbox-check.icon{--inset-horizontal:1px}.checkbox{background:var(--background);border:calc(var(--border-width) + var(--border-width-offset)) solid var(--border-color);border-radius:var(--border-radius);box-shadow:var(--box-shadow);cursor:pointer;flex:0 0 var(--width);height:var(--height);pointer-events:none;transition:background var(--transition-duration) var(--transition-timing-function), border-color var(--transition-duration) var(--transition-timing-function), border-width var(--transition-duration) var(--transition-timing-function), box-shadow var(--transition-duration) var(--transition-timing-function);width:var(--width);position:relative}@media (prefers-reduced-motion:reduce){.checkbox{transition:none}}.checkbox--radio:before{border-radius:calc(var(--border-radius) - var(--height) / 2);height:var(--height);margin:auto}.checkbox--radio:before,.checkbox--switch:before{background:var(--indicator-color);box-shadow:var(--box-shadow);content:"";pointer-events:none;scale:var(--scale);transform-origin:50%;transition:scale var(--transition-duration) var(--transition-timing-function), translate var(--transition-duration) var(--transition-timing-function);width:var(--width)}@media (prefers-reduced-motion:reduce){.checkbox--radio:before,.checkbox--switch:before{transition:none}}.checkbox--switch:before{border-radius:calc(var(--border-radius) - var(--padding-vertical) / 1.5);height:calc(var(--height) - var(--border-width) * 2 - var(--padding-vertical) * 2);inset:var(--padding-vertical) auto auto var(--padding-horizontal);translate:var(--translate-horizontal);position:absolute}.checkbox-group{color:var(--color);gap:var(--gap-vertical) var(--gap-horizontal);flex-direction:column;display:flex}.checkbox-group-counter{color:var(--color);font-size:var(--font-size-300);font-variant-numeric:tabular-nums;flex:none}.checkbox-group-header{cursor:pointer;align-items:center;gap:var(--gap-vertical) var(--gap-horizontal);-webkit-user-select:none;user-select:none;display:flex}.checkbox-group-hint{color:var(--color);font-size:var(--font-size-300);-webkit-user-select:none;user-select:none;margin:0}.checkbox-group-hint-key{border:var(--border-width) solid var(--border-color);border-radius:var(--border-radius-200);font-family:inherit;font-size:inherit;padding-block:var(--padding-vertical);padding-inline:var(--padding-horizontal)}.checkbox-group-label{font-weight:var(--font-weight-500);flex:1;min-width:0}.checkbox-tag{cursor:inherit;opacity:0;pointer-events:all;z-index:1;width:100%;height:100%;margin:0}.checkbox:has(>.checkbox-tag:focus-visible){outline:var(--focus-width) solid var(--focus-color);outline-offset:var(--focus-offset)}.checkbox .checkbox-check{left:var(--inset-horizontal)}.checkbox .checkbox-check,.checkbox .checkbox-group-dash{pointer-events:none;margin:auto}.checkbox .checkbox-check svg,.checkbox .checkbox-group-dash svg{fill:none;stroke:var(--indicator-color);stroke-dashoffset:var(--offset);stroke-linecap:var(--linecap);stroke-linejoin:var(--linejoin);stroke-width:var(--stroke-width);transition:stroke-dashoffset var(--transition-duration) var(--transition-timing-function)}@media (prefers-reduced-motion:reduce){.checkbox .checkbox-check svg,.checkbox .checkbox-group-dash svg{transition:none}}}
|
|
2
2
|
/*$vite$:1*/
|
|
@@ -35,5 +35,14 @@ declare const _default: template_u1.Factory<A, template_u1.Renderable<any>, temp
|
|
|
35
35
|
readonly preview: typeof COLOR_PICKER_PREVIEW;
|
|
36
36
|
readonly swatch: typeof COLOR_PICKER_SWATCH;
|
|
37
37
|
readonly swatches: typeof COLOR_PICKER_SWATCHES;
|
|
38
|
-
}
|
|
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
|
+
};
|
|
39
48
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
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';
|
|
@@ -11,12 +11,12 @@ import input from '../input/index.js';
|
|
|
11
11
|
import range from '../range/index.js';
|
|
12
12
|
import contrast from '@esportsplus/ui/svg/contrast.svg';
|
|
13
13
|
import './scss/index.scss';
|
|
14
|
-
const template_0zt12vj5 = template_u1.template(`<div aria-label='Saturation and brightness' aria-roledescription='2D slider' aria-valuemax='100' aria-valuemin='0'
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
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);
|
|
20
20
|
class ReactiveObject_0zt12vj0 extends reactivity_u0.ReactiveObject {
|
|
21
21
|
#active = this[reactivity_u0.SIGNAL](false);
|
|
22
22
|
#error = this[reactivity_u0.SIGNAL]('');
|
|
@@ -126,8 +126,6 @@ class ReactiveObject_0zt12vj3 extends reactivity_u0.ReactiveObject {
|
|
|
126
126
|
reactivity_u0.write(this.#text, _v3);
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
|
-
const HEX_PREFIX = /^#/;
|
|
130
|
-
const HEX_COLOR = /^([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i;
|
|
131
129
|
const COLOR_PICKER_ALPHA = Symbol.for('@esportsplus/ui/color-picker.alpha');
|
|
132
130
|
const COLOR_PICKER_COPY = Symbol.for('@esportsplus/ui/color-picker.copy');
|
|
133
131
|
const COLOR_PICKER_HEX = Symbol.for('@esportsplus/ui/color-picker.hex');
|
|
@@ -136,6 +134,8 @@ const COLOR_PICKER_PAD = Symbol.for('@esportsplus/ui/color-picker.pad');
|
|
|
136
134
|
const COLOR_PICKER_PREVIEW = Symbol.for('@esportsplus/ui/color-picker.preview');
|
|
137
135
|
const COLOR_PICKER_SWATCH = Symbol.for('@esportsplus/ui/color-picker.swatch');
|
|
138
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 = /^#/;
|
|
139
139
|
const MAX_RECENT = 8;
|
|
140
140
|
let uid = 0;
|
|
141
141
|
function channel(get, set) {
|
|
@@ -221,8 +221,7 @@ function template({ compact = false, recent: initial = [], state = new ReactiveO
|
|
|
221
221
|
if (!start) {
|
|
222
222
|
throw new Error(`Color picker: '${state.value || value}' is not a valid hex color`);
|
|
223
223
|
}
|
|
224
|
-
let color = new ReactiveObject_0zt12vj2(start.a, start.h, start.s, start.v), dirty = { alpha: false, hue: false, pad: false }, history = initial !== false && !compact, 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()));
|
|
225
|
-
let alpha = channel(() => Math.round(color.a * 100), (value) => update({ a: value / 100 })), hue = channel(() => Math.round(color.h), (value) => update({ h: value }));
|
|
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()));
|
|
226
225
|
state.value = toHex(color);
|
|
227
226
|
function apply(leaving) {
|
|
228
227
|
let next = fromHex(picker.text, read());
|
|
@@ -392,19 +391,21 @@ function template({ compact = false, recent: initial = [], state = new ReactiveO
|
|
|
392
391
|
step: 1
|
|
393
392
|
}));
|
|
394
393
|
let pad = (() => {
|
|
395
|
-
let root_0zt12vj4 = template_0zt12vj5(), element_0zt12vj6 = root_0zt12vj4.
|
|
396
|
-
template_u1.
|
|
397
|
-
|
|
398
|
-
template_u1.setProperties(
|
|
399
|
-
|
|
400
|
-
template_u1.
|
|
401
|
-
template_u1.
|
|
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,39 +433,43 @@ 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
|
});
|
|
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]);
|
|
446
449
|
return root_0zt12vj4;
|
|
447
450
|
})();
|
|
448
451
|
if (compact) {
|
|
449
|
-
|
|
450
|
-
let
|
|
451
|
-
template_u1.slot(
|
|
452
|
-
new template_u1.EffectSlot(
|
|
453
|
-
template_u1.slot(
|
|
454
|
-
template_u1.slot(
|
|
455
|
-
template_u1.slot(
|
|
456
|
-
template_u1.setProperties(
|
|
457
|
-
|
|
458
|
-
template_u1.
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
template_u1.slot(
|
|
467
|
-
template_u1.slot(element_0zt12vjn,
|
|
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));
|
|
455
|
+
new template_u1.EffectSlot(element_0zt12vjd, () => hsl(read()), 1);
|
|
456
|
+
template_u1.slot(element_0zt12vje, pad);
|
|
457
|
+
template_u1.slot(element_0zt12vjf, alphaChannel);
|
|
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]);
|
|
464
|
+
return root_0zt12vj9;
|
|
465
|
+
}
|
|
466
|
+
}
|
|
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;
|
|
469
|
+
template_u1.slot(element_0zt12vjk, pad);
|
|
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',
|
|
@@ -495,25 +500,25 @@ function template({ compact = false, recent: initial = [], state = new ReactiveO
|
|
|
495
500
|
spellcheck: false,
|
|
496
501
|
value: () => picker.text
|
|
497
502
|
})));
|
|
498
|
-
template_u1.slot(
|
|
503
|
+
template_u1.slot(element_0zt12vjp, copy(part(COLOR_PICKER_COPY, {
|
|
499
504
|
class: 'color-picker-copy',
|
|
500
505
|
label: 'Copy hex color',
|
|
501
506
|
success: 'Hex color copied',
|
|
502
507
|
value: () => toHex(read())
|
|
503
|
-
})),
|
|
504
|
-
new template_u1.EffectSlot(
|
|
505
|
-
new template_u1.EffectSlot(
|
|
506
|
-
template_u1.slot(
|
|
507
|
-
let
|
|
508
|
-
|
|
509
|
-
let
|
|
510
|
-
template_u1.setProperty(
|
|
511
|
-
|
|
512
|
-
template_u1.setProperties(
|
|
513
|
-
|
|
514
|
-
template_u1.
|
|
515
|
-
template_u1.
|
|
516
|
-
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', () => {
|
|
517
522
|
let next = fromHex(hex, read());
|
|
518
523
|
if (!next) {
|
|
519
524
|
return;
|
|
@@ -522,38 +527,50 @@ function template({ compact = false, recent: initial = [], state = new ReactiveO
|
|
|
522
527
|
picker.active = hex;
|
|
523
528
|
picker.invalid = false;
|
|
524
529
|
});
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
template_u1.
|
|
532
|
-
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', () => {
|
|
533
537
|
let at = leaving.indexOf(ghost);
|
|
534
538
|
if (at !== -1) {
|
|
535
539
|
leaving.splice(at, 1);
|
|
536
540
|
}
|
|
537
541
|
});
|
|
538
|
-
|
|
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;
|
|
539
545
|
}).fragment);
|
|
540
|
-
template_u1.setProperty(
|
|
541
|
-
|
|
542
|
-
template_u1.setProperties(
|
|
543
|
-
|
|
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) => {
|
|
544
552
|
parts.swatches = element;
|
|
545
553
|
});
|
|
546
|
-
template_u1.
|
|
547
|
-
template_u1.
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
template_u1.
|
|
555
|
-
|
|
556
|
-
|
|
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
|
+
}
|
|
557
574
|
}
|
|
558
575
|
export default component(template, {
|
|
559
576
|
alpha: COLOR_PICKER_ALPHA,
|