@esportsplus/ui 0.61.0 → 0.62.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.audit/audit.json +2 -42
- package/.audit/check-scss.mjs +2 -2
- package/.audit/rules-audit.md +1 -12
- 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/cc/index.d.ts +4 -1
- package/build/components/cc/index.js +203 -161
- package/build/components/cc/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 -3
- package/build/components/index.js +0 -3
- 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 +10 -11
- 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/cc/index.ts +32 -33
- package/src/components/cc/scss/index.scss +37 -7
- package/src/components/cc/scss/variables.scss +13 -10
- 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 -3
- 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 +1 -7
- package/src/components/pagination/scss/index.scss +12 -12
- package/src/components/pagination/scss/variables.scss +33 -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/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/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,10 +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 { computed, effect, onCleanup, read } from '@esportsplus/reactivity';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import input from '../input/index.js';
|
|
3
|
+
import * as template_u1 from '@esportsplus/template';
|
|
4
|
+
import { component } from '@esportsplus/template';
|
|
8
5
|
import amex from '@esportsplus/ui/svg/amex.svg';
|
|
9
6
|
import card from '@esportsplus/ui/svg/card.svg';
|
|
10
7
|
import checkSvg from '@esportsplus/ui/svg/check.svg';
|
|
@@ -13,23 +10,25 @@ import discover from '@esportsplus/ui/svg/discover.svg';
|
|
|
13
10
|
import lock from '@esportsplus/ui/svg/lock.svg';
|
|
14
11
|
import mastercard from '@esportsplus/ui/svg/mastercard.svg';
|
|
15
12
|
import visa from '@esportsplus/ui/svg/visa.svg';
|
|
13
|
+
import faces from '../button/faces.js';
|
|
14
|
+
import icon from '../icon/index.js';
|
|
15
|
+
import input from '../input/index.js';
|
|
16
16
|
import '../button/scss/index.scss';
|
|
17
17
|
import './scss/index.scss';
|
|
18
|
-
const
|
|
19
|
-
const template_02im3v1c = template_u1.template(`<span class='cc-error'
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
const
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
const template_02im3v12i = template_u1.template(`<p class='cc-note'><!--$-->`);
|
|
18
|
+
const template_02im3v18 = template_u1.template(`<div class='cc-shell cc-shell--cvc'><div class='cc-shell-header'><label class='cc-label'>`, true);
|
|
19
|
+
const template_02im3v1c = template_u1.template(`<span class='cc-error'>`, true);
|
|
20
|
+
const template_02im3v1e = template_u1.template(`<div class='cc-shell cc-shell--expiry'><div class='cc-shell-header'><label class='cc-label'>`, true);
|
|
21
|
+
const template_02im3v1j = template_u1.template(`<div class='cc-shell cc-shell--name'><div class='cc-shell-header'><label class='cc-label'>`, true);
|
|
22
|
+
const template_02im3v1o = template_u1.template(`<div class='cc-shell cc-shell--number'><div class='cc-shell-header'><label class='cc-label'>`, true);
|
|
23
|
+
const template_02im3v1t = template_u1.template(`<div><div class='cc-shell-header'><label class='cc-label'>`, true);
|
|
24
|
+
const template_02im3v1y = template_u1.template(`<span aria-hidden='true' class='cc-brand cc-brand--large'>`, true);
|
|
25
|
+
const template_02im3v110 = template_u1.template(`<span>`, true);
|
|
26
|
+
const template_02im3v112 = template_u1.template(`<span aria-hidden='true' class='cc-brand cc-brand--small'>`, true);
|
|
27
|
+
const template_02im3v115 = template_u1.template(`<span aria-hidden='true'>`, true);
|
|
28
|
+
const template_02im3v118 = template_u1.template(`<form aria-label='Card details' novalidate><div aria-hidden='true' class='cc-preview'><div><div class='cc-face cc-face--front'><span></span><div class='cc-face-top'><!--$--></div><div></div><div class='cc-face-bottom'><div><span class='cc-caption'>Card holder</span><span class='cc-holder-value'></span></div><div><span class='cc-caption'>Expires</span><span class='cc-expires-value'></span></div></div></div><div class='cc-face cc-face--back'><div class='cc-stripe'></div><div class='cc-signature'><div class='cc-signature-value'></div><span class='cc-caption'>CVC</span></div><p class='cc-disclaimer'>Not a real card. Nothing you type leaves this page.</p></div></div></div><div class='cc-fields'><!--$--><div class='cc-row'><!--$--></div></div><div class='cc-actions'><button type='submit'></button><!--$--><span aria-live='polite' class='button-status' role='status'></span><span aria-live='polite' class='cc-live'>`, true);
|
|
29
|
+
const template_02im3v11w = template_u1.template(`<div class='cc-control'><!--$--><span>`, true);
|
|
30
|
+
const template_02im3v120 = template_u1.template(`<!--$-->Details look valid`);
|
|
31
|
+
const template_02im3v123 = template_u1.template(`<p class='cc-note'><!--$-->`, true);
|
|
33
32
|
class ReactiveObject_02im3v10 extends reactivity_u0.ReactiveObject {
|
|
34
33
|
#cvc = this[reactivity_u0.SIGNAL]('');
|
|
35
34
|
#expiry = this[reactivity_u0.SIGNAL]('');
|
|
@@ -158,10 +157,43 @@ class ReactiveObject_02im3v15 extends reactivity_u0.ReactiveObject {
|
|
|
158
157
|
reactivity_u0.write(this.#ring, _v1);
|
|
159
158
|
}
|
|
160
159
|
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
160
|
+
class ReactiveObject_02im3v16 extends reactivity_u0.ReactiveObject {
|
|
161
|
+
#height;
|
|
162
|
+
#left;
|
|
163
|
+
#top;
|
|
164
|
+
#width;
|
|
165
|
+
constructor(_p0, _p1, _p2, _p3) {
|
|
166
|
+
super(null);
|
|
167
|
+
this.#height = this[reactivity_u0.SIGNAL](_p0);
|
|
168
|
+
this.#left = this[reactivity_u0.SIGNAL](_p1);
|
|
169
|
+
this.#top = this[reactivity_u0.SIGNAL](_p2);
|
|
170
|
+
this.#width = this[reactivity_u0.SIGNAL](_p3);
|
|
171
|
+
}
|
|
172
|
+
get height() {
|
|
173
|
+
return reactivity_u0.read(this.#height);
|
|
174
|
+
}
|
|
175
|
+
set height(_v0) {
|
|
176
|
+
reactivity_u0.write(this.#height, _v0);
|
|
177
|
+
}
|
|
178
|
+
get left() {
|
|
179
|
+
return reactivity_u0.read(this.#left);
|
|
180
|
+
}
|
|
181
|
+
set left(_v1) {
|
|
182
|
+
reactivity_u0.write(this.#left, _v1);
|
|
183
|
+
}
|
|
184
|
+
get top() {
|
|
185
|
+
return reactivity_u0.read(this.#top);
|
|
186
|
+
}
|
|
187
|
+
set top(_v2) {
|
|
188
|
+
reactivity_u0.write(this.#top, _v2);
|
|
189
|
+
}
|
|
190
|
+
get width() {
|
|
191
|
+
return reactivity_u0.read(this.#width);
|
|
192
|
+
}
|
|
193
|
+
set width(_v3) {
|
|
194
|
+
reactivity_u0.write(this.#width, _v3);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
165
197
|
const BRANDS = {
|
|
166
198
|
amex: { cvc: 4, gaps: [4, 10], icon: amex, lengths: [15], name: 'American Express', test: /^3[47]/ },
|
|
167
199
|
discover: { cvc: 3, gaps: [4, 8, 12, 16], icon: discover, lengths: [16, 19], name: 'Discover', test: /^(6011|65|64[4-9])/ },
|
|
@@ -172,7 +204,11 @@ const BRANDS = {
|
|
|
172
204
|
const CC_FIELD = Symbol.for('@esportsplus/ui/cc.field');
|
|
173
205
|
const CC_SUBMIT = Symbol.for('@esportsplus/ui/cc.submit');
|
|
174
206
|
const CONFIRM_FOR = 2000;
|
|
207
|
+
const DIGIT = /\d/;
|
|
175
208
|
const FIELDS = ['number', 'expiry', 'cvc', 'name'];
|
|
209
|
+
const INVALID_MONTH_START = /^[2-9]/;
|
|
210
|
+
const NON_DIGIT = /\D/;
|
|
211
|
+
const NON_DIGITS = /\D/g;
|
|
176
212
|
const ORDER = ['visa', 'mastercard', 'amex', 'discover'];
|
|
177
213
|
let uid = 0;
|
|
178
214
|
function caret(value, count) {
|
|
@@ -223,33 +259,33 @@ function luhn(digits) {
|
|
|
223
259
|
}
|
|
224
260
|
function mark(brand, size) {
|
|
225
261
|
return (size === "large" ? (() => {
|
|
226
|
-
let
|
|
227
|
-
template_u1.slot(
|
|
228
|
-
let
|
|
229
|
-
template_u1.slot(
|
|
230
|
-
template_u1.
|
|
231
|
-
return
|
|
262
|
+
let root_02im3v1x = template_02im3v1y();
|
|
263
|
+
template_u1.slot(root_02im3v1x, Object.keys(BRANDS).map((b) => {
|
|
264
|
+
let root_02im3v1z = template_02im3v110();
|
|
265
|
+
template_u1.slot(root_02im3v1z, icon({ class: 'cc-brand-icon' }, BRANDS[b].icon), 1);
|
|
266
|
+
template_u1.setClass(root_02im3v1z, ["cc-brand-mark", () => brand() === b && '--active']);
|
|
267
|
+
return root_02im3v1z;
|
|
232
268
|
}), 1);
|
|
233
|
-
return
|
|
269
|
+
return root_02im3v1x;
|
|
234
270
|
})() : size === "small" ? (() => {
|
|
235
|
-
let
|
|
236
|
-
template_u1.slot(
|
|
237
|
-
let
|
|
238
|
-
template_u1.slot(
|
|
239
|
-
template_u1.
|
|
240
|
-
return
|
|
271
|
+
let root_02im3v111 = template_02im3v112();
|
|
272
|
+
template_u1.slot(root_02im3v111, Object.keys(BRANDS).map((b) => {
|
|
273
|
+
let root_02im3v113 = template_02im3v110();
|
|
274
|
+
template_u1.slot(root_02im3v113, icon({ class: 'cc-brand-icon' }, BRANDS[b].icon), 1);
|
|
275
|
+
template_u1.setClass(root_02im3v113, ["cc-brand-mark", () => brand() === b && '--active']);
|
|
276
|
+
return root_02im3v113;
|
|
241
277
|
}), 1);
|
|
242
|
-
return
|
|
278
|
+
return root_02im3v111;
|
|
243
279
|
})() : (() => {
|
|
244
|
-
let
|
|
245
|
-
template_u1.slot(
|
|
246
|
-
let
|
|
247
|
-
template_u1.slot(
|
|
248
|
-
template_u1.
|
|
249
|
-
return
|
|
280
|
+
let root_02im3v114 = template_02im3v115();
|
|
281
|
+
template_u1.slot(root_02im3v114, Object.keys(BRANDS).map((b) => {
|
|
282
|
+
let root_02im3v116 = template_02im3v110();
|
|
283
|
+
template_u1.slot(root_02im3v116, icon({ class: 'cc-brand-icon' }, BRANDS[b].icon), 1);
|
|
284
|
+
template_u1.setClass(root_02im3v116, ["cc-brand-mark", () => brand() === b && '--active']);
|
|
285
|
+
return root_02im3v116;
|
|
250
286
|
}), 1);
|
|
251
|
-
template_u1.
|
|
252
|
-
return
|
|
287
|
+
template_u1.setClass(root_02im3v114, ["cc-brand", "cc-brand--" + (size)]);
|
|
288
|
+
return root_02im3v114;
|
|
253
289
|
})());
|
|
254
290
|
}
|
|
255
291
|
function reformat(element, max, format, pad) {
|
|
@@ -315,7 +351,7 @@ export default component(function ({ note = '', onvalid, state = new ReactiveObj
|
|
|
315
351
|
expiry: new ReactiveObject_02im3v12(),
|
|
316
352
|
name: new ReactiveObject_02im3v13(),
|
|
317
353
|
number: new ReactiveObject_02im3v14()
|
|
318
|
-
}, id = `cc-${++uid}`, local = new ReactiveObject_02im3v15(), parts = { ...this?.attributes?.[CC_FIELD], ...attributes[CC_FIELD] }, regions = {},
|
|
354
|
+
}, id = `cc-${++uid}`, local = new ReactiveObject_02im3v15(), outline = new ReactiveObject_02im3v16(undefined, undefined, undefined, undefined), parts = { ...this?.attributes?.[CC_FIELD], ...attributes[CC_FIELD] }, regions = {}, slots = new reactivity_u0.ReactiveArray(), timer;
|
|
319
355
|
let errors = Object.fromEntries(FIELDS.map((field) => [field, computed(() => !!fields[field].error)]));
|
|
320
356
|
function brand() {
|
|
321
357
|
return read(detected);
|
|
@@ -361,22 +397,14 @@ export default component(function ({ note = '', onvalid, state = new ReactiveObj
|
|
|
361
397
|
}
|
|
362
398
|
function frame(field) {
|
|
363
399
|
let region = field && field !== 'cvc' ? regions[field] : undefined;
|
|
364
|
-
if (!ring) {
|
|
365
|
-
return;
|
|
366
|
-
}
|
|
367
400
|
if (!region) {
|
|
368
401
|
local.ring = false;
|
|
369
402
|
return;
|
|
370
403
|
}
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
ring.style.removeProperty('transition-property');
|
|
376
|
-
}
|
|
377
|
-
else {
|
|
378
|
-
ring.style.cssText = style;
|
|
379
|
-
}
|
|
404
|
+
outline.height = `${region.offsetHeight + 12}px`;
|
|
405
|
+
outline.left = `${region.offsetLeft - 8}px`;
|
|
406
|
+
outline.top = `${region.offsetTop - 6}px`;
|
|
407
|
+
outline.width = `${region.offsetWidth + 16}px`;
|
|
380
408
|
local.ring = true;
|
|
381
409
|
}
|
|
382
410
|
function set(field, value) {
|
|
@@ -386,66 +414,66 @@ export default component(function ({ note = '', onvalid, state = new ReactiveObj
|
|
|
386
414
|
}
|
|
387
415
|
function shell(field, label, content) {
|
|
388
416
|
return (field === "cvc" ? (() => {
|
|
389
|
-
let
|
|
390
|
-
template_u1.slot(
|
|
391
|
-
new template_u1.EffectSlot(
|
|
392
|
-
let root_02im3v1b = template_02im3v1c()
|
|
393
|
-
new template_u1.EffectSlot(
|
|
394
|
-
template_u1.setProperty(
|
|
417
|
+
let root_02im3v17 = template_02im3v18(), element_02im3v19 = root_02im3v17.firstElementChild.firstElementChild, element_02im3v1a = root_02im3v17.firstElementChild;
|
|
418
|
+
template_u1.slot(element_02im3v19, label, 1);
|
|
419
|
+
new template_u1.EffectSlot(element_02im3v1a, () => read(errors[field]) && (() => {
|
|
420
|
+
let root_02im3v1b = template_02im3v1c();
|
|
421
|
+
new template_u1.EffectSlot(root_02im3v1b, () => fields[field].error, 1);
|
|
422
|
+
template_u1.setProperty(root_02im3v1b, 'id', "" + (id) + "-" + (field) + "-error");
|
|
395
423
|
return root_02im3v1b;
|
|
396
|
-
})(),
|
|
397
|
-
template_u1.slot(
|
|
398
|
-
template_u1.setProperty(
|
|
399
|
-
return
|
|
424
|
+
})(), 1);
|
|
425
|
+
template_u1.slot(root_02im3v17, content, 1);
|
|
426
|
+
template_u1.setProperty(element_02im3v19, 'for', "" + (id) + "-cvc");
|
|
427
|
+
return root_02im3v17;
|
|
400
428
|
})() : field === "expiry" ? (() => {
|
|
401
|
-
let
|
|
402
|
-
template_u1.slot(
|
|
403
|
-
new template_u1.EffectSlot(
|
|
404
|
-
let
|
|
405
|
-
new template_u1.EffectSlot(
|
|
406
|
-
template_u1.setProperty(
|
|
407
|
-
return
|
|
408
|
-
})(),
|
|
409
|
-
template_u1.slot(
|
|
410
|
-
template_u1.setProperty(
|
|
411
|
-
return
|
|
429
|
+
let root_02im3v1d = template_02im3v1e(), element_02im3v1f = root_02im3v1d.firstElementChild.firstElementChild, element_02im3v1g = root_02im3v1d.firstElementChild;
|
|
430
|
+
template_u1.slot(element_02im3v1f, label, 1);
|
|
431
|
+
new template_u1.EffectSlot(element_02im3v1g, () => read(errors[field]) && (() => {
|
|
432
|
+
let root_02im3v1h = template_02im3v1c();
|
|
433
|
+
new template_u1.EffectSlot(root_02im3v1h, () => fields[field].error, 1);
|
|
434
|
+
template_u1.setProperty(root_02im3v1h, 'id', "" + (id) + "-" + (field) + "-error");
|
|
435
|
+
return root_02im3v1h;
|
|
436
|
+
})(), 1);
|
|
437
|
+
template_u1.slot(root_02im3v1d, content, 1);
|
|
438
|
+
template_u1.setProperty(element_02im3v1f, 'for', "" + (id) + "-expiry");
|
|
439
|
+
return root_02im3v1d;
|
|
412
440
|
})() : field === "name" ? (() => {
|
|
413
|
-
let
|
|
414
|
-
template_u1.slot(
|
|
415
|
-
new template_u1.EffectSlot(
|
|
416
|
-
let
|
|
417
|
-
new template_u1.EffectSlot(
|
|
418
|
-
template_u1.setProperty(
|
|
419
|
-
return
|
|
420
|
-
})(),
|
|
421
|
-
template_u1.slot(
|
|
422
|
-
template_u1.setProperty(
|
|
423
|
-
return
|
|
441
|
+
let root_02im3v1i = template_02im3v1j(), element_02im3v1k = root_02im3v1i.firstElementChild.firstElementChild, element_02im3v1l = root_02im3v1i.firstElementChild;
|
|
442
|
+
template_u1.slot(element_02im3v1k, label, 1);
|
|
443
|
+
new template_u1.EffectSlot(element_02im3v1l, () => read(errors[field]) && (() => {
|
|
444
|
+
let root_02im3v1m = template_02im3v1c();
|
|
445
|
+
new template_u1.EffectSlot(root_02im3v1m, () => fields[field].error, 1);
|
|
446
|
+
template_u1.setProperty(root_02im3v1m, 'id', "" + (id) + "-" + (field) + "-error");
|
|
447
|
+
return root_02im3v1m;
|
|
448
|
+
})(), 1);
|
|
449
|
+
template_u1.slot(root_02im3v1i, content, 1);
|
|
450
|
+
template_u1.setProperty(element_02im3v1k, 'for', "" + (id) + "-name");
|
|
451
|
+
return root_02im3v1i;
|
|
424
452
|
})() : field === "number" ? (() => {
|
|
425
|
-
let
|
|
453
|
+
let root_02im3v1n = template_02im3v1o(), element_02im3v1p = root_02im3v1n.firstElementChild.firstElementChild, element_02im3v1q = root_02im3v1n.firstElementChild;
|
|
454
|
+
template_u1.slot(element_02im3v1p, label, 1);
|
|
455
|
+
new template_u1.EffectSlot(element_02im3v1q, () => read(errors[field]) && (() => {
|
|
456
|
+
let root_02im3v1r = template_02im3v1c();
|
|
457
|
+
new template_u1.EffectSlot(root_02im3v1r, () => fields[field].error, 1);
|
|
458
|
+
template_u1.setProperty(root_02im3v1r, 'id', "" + (id) + "-" + (field) + "-error");
|
|
459
|
+
return root_02im3v1r;
|
|
460
|
+
})(), 1);
|
|
461
|
+
template_u1.slot(root_02im3v1n, content, 1);
|
|
462
|
+
template_u1.setProperty(element_02im3v1p, 'for', "" + (id) + "-number");
|
|
463
|
+
return root_02im3v1n;
|
|
464
|
+
})() : (() => {
|
|
465
|
+
let root_02im3v1s = template_02im3v1t(), element_02im3v1u = root_02im3v1s.firstElementChild.firstElementChild, element_02im3v1v = root_02im3v1s.firstElementChild;
|
|
426
466
|
template_u1.slot(element_02im3v1u, label, 1);
|
|
427
467
|
new template_u1.EffectSlot(element_02im3v1v, () => read(errors[field]) && (() => {
|
|
428
|
-
let
|
|
429
|
-
new template_u1.EffectSlot(
|
|
430
|
-
template_u1.setProperty(
|
|
431
|
-
return
|
|
432
|
-
})(),
|
|
433
|
-
template_u1.slot(
|
|
434
|
-
template_u1.setProperty(element_02im3v1u, 'for',
|
|
468
|
+
let root_02im3v1w = template_02im3v1c();
|
|
469
|
+
new template_u1.EffectSlot(root_02im3v1w, () => fields[field].error, 1);
|
|
470
|
+
template_u1.setProperty(root_02im3v1w, 'id', "" + (id) + "-" + (field) + "-error");
|
|
471
|
+
return root_02im3v1w;
|
|
472
|
+
})(), 1);
|
|
473
|
+
template_u1.slot(root_02im3v1s, content, 1);
|
|
474
|
+
template_u1.setProperty(element_02im3v1u, 'for', "" + (id) + "-" + (field));
|
|
475
|
+
template_u1.setClass(root_02im3v1s, ["cc-shell", "cc-shell--" + (field)]);
|
|
435
476
|
return root_02im3v1s;
|
|
436
|
-
})() : (() => {
|
|
437
|
-
let root_02im3v1z = template_02im3v110(), element_02im3v111 = root_02im3v1z.firstChild, element_02im3v112 = element_02im3v111.firstElementChild.firstElementChild, element_02im3v113 = element_02im3v111.firstElementChild;
|
|
438
|
-
template_u1.slot(element_02im3v112, label, 1);
|
|
439
|
-
new template_u1.EffectSlot(element_02im3v113, () => read(errors[field]) && (() => {
|
|
440
|
-
let root_02im3v114 = template_02im3v1c(), element_02im3v115 = root_02im3v114.firstChild;
|
|
441
|
-
new template_u1.EffectSlot(element_02im3v115, () => fields[field].error, 1);
|
|
442
|
-
template_u1.setProperty(element_02im3v115, 'id', template_u1.interpolate([(id), "-", (field), "-error"]));
|
|
443
|
-
return root_02im3v114;
|
|
444
|
-
})(), 2);
|
|
445
|
-
template_u1.slot(element_02im3v111, content, 2);
|
|
446
|
-
template_u1.setProperty(element_02im3v112, 'for', template_u1.interpolate([(id), "-", (field)]));
|
|
447
|
-
template_u1.setList(element_02im3v111, 'class', template_u1.interpolate(["cc-shell--", (field)]));
|
|
448
|
-
return root_02im3v1z;
|
|
449
477
|
})());
|
|
450
478
|
}
|
|
451
479
|
effect(() => digitsOf(state.number), (digits) => {
|
|
@@ -468,24 +496,22 @@ export default component(function ({ note = '', onvalid, state = new ReactiveObj
|
|
|
468
496
|
});
|
|
469
497
|
effect(focused, frame);
|
|
470
498
|
onCleanup(() => clearTimeout(timer));
|
|
471
|
-
|
|
472
|
-
let
|
|
473
|
-
template_u1.slot(
|
|
474
|
-
template_u1.slot(
|
|
475
|
-
|
|
476
|
-
let
|
|
477
|
-
new template_u1.EffectSlot(
|
|
478
|
-
template_u1.
|
|
479
|
-
|
|
480
|
-
template_u1.setList(element_02im3v129, 'class', () => slot.roll && `cc-digit--roll-${slot.roll}`);
|
|
481
|
-
return root_02im3v127;
|
|
499
|
+
{
|
|
500
|
+
let root_02im3v117 = template_02im3v118(), element_02im3v119 = root_02im3v117.firstElementChild, element_02im3v11a = element_02im3v119.firstElementChild, element_02im3v11b = element_02im3v11a.firstElementChild, element_02im3v11c = element_02im3v11b.firstElementChild, element_02im3v11d = element_02im3v11c.nextElementSibling, element_02im3v11e = element_02im3v11d.firstChild, element_02im3v11f = element_02im3v11d.nextElementSibling, element_02im3v11g = element_02im3v11f.nextElementSibling.firstElementChild, element_02im3v11h = element_02im3v11g.firstElementChild.nextElementSibling, element_02im3v11i = element_02im3v11g.nextElementSibling, element_02im3v11j = element_02im3v11i.firstElementChild.nextElementSibling, element_02im3v11k = element_02im3v11b.nextElementSibling.firstElementChild.nextElementSibling.firstElementChild, element_02im3v11l = element_02im3v119.nextElementSibling, element_02im3v11m = element_02im3v11l.firstChild, element_02im3v11n = element_02im3v11l.firstElementChild.firstChild, element_02im3v11o = element_02im3v11l.firstElementChild, element_02im3v11p = element_02im3v11l.nextElementSibling, element_02im3v11q = element_02im3v11p.firstElementChild, element_02im3v11r = element_02im3v11p.firstChild.nextSibling, element_02im3v11s = element_02im3v11q.nextElementSibling, element_02im3v11t = element_02im3v11s.nextElementSibling;
|
|
501
|
+
template_u1.slot(element_02im3v11e, icon({ class: 'cc-chip' }, chip));
|
|
502
|
+
template_u1.slot(element_02im3v11d, mark(brand, 'large'), 1);
|
|
503
|
+
element_02im3v11f.appendChild(new template_u1.ArraySlot(slots, (slot) => {
|
|
504
|
+
let root_02im3v11u = template_02im3v110();
|
|
505
|
+
new template_u1.EffectSlot(root_02im3v11u, () => slot.char, 1);
|
|
506
|
+
template_u1.setClass(root_02im3v11u, ["cc-digit", () => slot.gap && 'cc-digit--gap', () => slot.char === '•' && 'cc-digit--placeholder', () => slot.roll && `cc-digit--roll-${slot.roll}`]);
|
|
507
|
+
return root_02im3v11u;
|
|
482
508
|
}, true).fragment);
|
|
483
|
-
new template_u1.EffectSlot(
|
|
484
|
-
new template_u1.EffectSlot(
|
|
485
|
-
new template_u1.EffectSlot(
|
|
486
|
-
template_u1.slot(
|
|
487
|
-
let
|
|
488
|
-
template_u1.slot(
|
|
509
|
+
new template_u1.EffectSlot(element_02im3v11h, () => state.name.trim() || 'Your name', 1);
|
|
510
|
+
new template_u1.EffectSlot(element_02im3v11j, () => state.expiry || 'MM/YY', 1);
|
|
511
|
+
new template_u1.EffectSlot(element_02im3v11k, () => state.cvc || (brand() === 'amex' ? '••••' : '•••'), 1);
|
|
512
|
+
template_u1.slot(element_02im3v11m, shell('number', 'Card number', (() => {
|
|
513
|
+
let root_02im3v11v = template_02im3v11w(), element_02im3v11x = root_02im3v11v.firstChild, element_02im3v11y = root_02im3v11v.firstElementChild;
|
|
514
|
+
template_u1.slot(element_02im3v11x, control('number', {
|
|
489
515
|
autocomplete: 'cc-number',
|
|
490
516
|
inputmode: 'numeric',
|
|
491
517
|
oninput: (e) => {
|
|
@@ -498,11 +524,11 @@ export default component(function ({ note = '', onvalid, state = new ReactiveObj
|
|
|
498
524
|
onkeydown: skip,
|
|
499
525
|
placeholder: '1234 5678 9012 3456'
|
|
500
526
|
}));
|
|
501
|
-
template_u1.slot(
|
|
502
|
-
template_u1.
|
|
503
|
-
return
|
|
527
|
+
template_u1.slot(element_02im3v11y, mark(brand, 'small'), 1);
|
|
528
|
+
template_u1.setClass(element_02im3v11y, ["cc-control-brand", () => brand() !== 'unknown' && 'cc-control-brand--known']);
|
|
529
|
+
return root_02im3v11v;
|
|
504
530
|
})()));
|
|
505
|
-
template_u1.slot(
|
|
531
|
+
template_u1.slot(element_02im3v11n, shell('expiry', 'Expiry', control('expiry', {
|
|
506
532
|
autocomplete: 'cc-exp',
|
|
507
533
|
inputmode: 'numeric',
|
|
508
534
|
oninput: (e) => {
|
|
@@ -511,15 +537,15 @@ export default component(function ({ note = '', onvalid, state = new ReactiveObj
|
|
|
511
537
|
onkeydown: skip,
|
|
512
538
|
placeholder: 'MM/YY'
|
|
513
539
|
})));
|
|
514
|
-
template_u1.slot(
|
|
540
|
+
template_u1.slot(element_02im3v11o, shell('cvc', 'CVC', control('cvc', {
|
|
515
541
|
autocomplete: 'cc-csc',
|
|
516
542
|
inputmode: 'numeric',
|
|
517
543
|
oninput: (e) => {
|
|
518
544
|
set('cvc', reformat(e.currentTarget, BRANDS[brand()].cvc, (d) => d));
|
|
519
545
|
},
|
|
520
546
|
placeholder: () => brand() === 'amex' ? '1234' : '123'
|
|
521
|
-
})),
|
|
522
|
-
template_u1.slot(
|
|
547
|
+
})), 1);
|
|
548
|
+
template_u1.slot(element_02im3v11l, shell('name', 'Name on card', control('name', {
|
|
523
549
|
autocapitalize: 'words',
|
|
524
550
|
autocomplete: 'cc-name',
|
|
525
551
|
maxlength: 40,
|
|
@@ -528,34 +554,50 @@ export default component(function ({ note = '', onvalid, state = new ReactiveObj
|
|
|
528
554
|
},
|
|
529
555
|
placeholder: 'Ada Lovelace',
|
|
530
556
|
spellcheck: false
|
|
531
|
-
})),
|
|
532
|
-
template_u1.slot(
|
|
557
|
+
})), 1);
|
|
558
|
+
template_u1.slot(element_02im3v11q, faces(() => local.confirmed ? 'valid' : 'idle', [
|
|
533
559
|
{ content: submit, key: 'idle' },
|
|
534
560
|
{ content: (() => {
|
|
535
|
-
let
|
|
536
|
-
template_u1.slot(
|
|
537
|
-
return
|
|
561
|
+
let root_02im3v11z = template_02im3v120(), element_02im3v121 = root_02im3v11z.firstChild;
|
|
562
|
+
template_u1.slot(element_02im3v121, icon({ 'aria-hidden': 'true', class: 'button-icon button-icon--draw' }, checkSvg));
|
|
563
|
+
return root_02im3v11z;
|
|
538
564
|
})(), key: 'valid' }
|
|
539
565
|
]), 1);
|
|
540
|
-
template_u1.slot(
|
|
541
|
-
let
|
|
542
|
-
template_u1.slot(
|
|
543
|
-
template_u1.slot(
|
|
544
|
-
return
|
|
566
|
+
template_u1.slot(element_02im3v11r, !!note && (() => {
|
|
567
|
+
let root_02im3v122 = template_02im3v123(), element_02im3v124 = root_02im3v122.firstChild;
|
|
568
|
+
template_u1.slot(element_02im3v124, icon({ 'aria-hidden': 'true', class: 'cc-note-icon' }, lock));
|
|
569
|
+
template_u1.slot(root_02im3v122, note, 1);
|
|
570
|
+
return root_02im3v122;
|
|
545
571
|
})());
|
|
546
|
-
new template_u1.EffectSlot(
|
|
547
|
-
new template_u1.EffectSlot(
|
|
548
|
-
|
|
549
|
-
template_u1.setProperties(
|
|
550
|
-
|
|
551
|
-
template_u1.
|
|
552
|
-
template_u1.
|
|
553
|
-
template_u1.
|
|
554
|
-
template_u1.onconnect(
|
|
555
|
-
template_u1.
|
|
556
|
-
template_u1.
|
|
557
|
-
template_u1.
|
|
558
|
-
template_u1.
|
|
559
|
-
|
|
560
|
-
|
|
572
|
+
new template_u1.EffectSlot(element_02im3v11s, () => local.confirmed && 'Card details look valid', 1);
|
|
573
|
+
new template_u1.EffectSlot(element_02im3v11t, () => brand() !== 'unknown' && `${BRANDS[brand()].name} card`, 1);
|
|
574
|
+
let attributes_02im3v125 = this?.attributes?.[CC_SUBMIT];
|
|
575
|
+
template_u1.setProperties(element_02im3v11q, attributes_02im3v125, true);
|
|
576
|
+
let attributes_02im3v126 = attributes[CC_SUBMIT];
|
|
577
|
+
template_u1.setProperties(element_02im3v11q, attributes_02im3v126, true);
|
|
578
|
+
template_u1.setClass(element_02im3v11q, ["button button--feedback cc-submit", attributes_02im3v125?.class, attributes_02im3v126?.class]);
|
|
579
|
+
template_u1.setStyle(element_02im3v11q, ["", attributes_02im3v125?.style, attributes_02im3v126?.style]);
|
|
580
|
+
template_u1.onconnect(element_02im3v11i, (element) => { regions.expiry = element; });
|
|
581
|
+
template_u1.setClass(element_02im3v11i, ["cc-expires"]);
|
|
582
|
+
template_u1.onconnect(element_02im3v11g, (element) => { regions.name = element; });
|
|
583
|
+
template_u1.setClass(element_02im3v11g, ["cc-holder"]);
|
|
584
|
+
template_u1.onconnect(element_02im3v11f, (element) => { regions.number = element; });
|
|
585
|
+
template_u1.setClass(element_02im3v11f, ["cc-number"]);
|
|
586
|
+
template_u1.setClass(element_02im3v11c, ["cc-ring", () => local.ring && '--active']);
|
|
587
|
+
template_u1.setStyle(element_02im3v11c, ["", () => ({
|
|
588
|
+
height: outline.height,
|
|
589
|
+
left: outline.left,
|
|
590
|
+
top: outline.top,
|
|
591
|
+
width: outline.width
|
|
592
|
+
})]);
|
|
593
|
+
template_u1.setClass(element_02im3v11a, ["cc-card", () => focused() === 'cvc' && 'cc-card--flipped']);
|
|
594
|
+
let attributes_02im3v127 = this?.attributes;
|
|
595
|
+
template_u1.setProperties(root_02im3v117, attributes_02im3v127, true);
|
|
596
|
+
let attributes_02im3v128 = attributes;
|
|
597
|
+
template_u1.setProperties(root_02im3v117, attributes_02im3v128, true);
|
|
598
|
+
template_u1.direct(root_02im3v117, 'submit', check);
|
|
599
|
+
template_u1.setClass(root_02im3v117, ["cc", attributes_02im3v127?.class, attributes_02im3v128?.class]);
|
|
600
|
+
template_u1.setStyle(root_02im3v117, ["", attributes_02im3v127?.style, attributes_02im3v128?.style]);
|
|
601
|
+
return root_02im3v117;
|
|
602
|
+
}
|
|
561
603
|
}, { field: CC_FIELD, submit: CC_SUBMIT });
|