@esportsplus/ui 0.63.0 → 0.64.1
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 -2
- package/.audit/rules-audit.md +2 -2
- package/README.md +15 -18
- package/RULES.md +80 -9
- package/bin/agent-cli +300 -0
- package/build/components/accordion/index.d.ts +4 -0
- package/build/components/accordion/index.js +13 -10
- package/build/components/breadcrumb/index.d.ts +1 -0
- package/build/components/breadcrumb/index.js +43 -37
- package/build/components/breadcrumb/scss/index.scss +1 -1
- package/build/components/button/kbd.d.ts +1 -1
- package/build/components/button/kbd.js +17 -15
- package/build/components/button/scss/index.scss +1 -1
- package/build/components/button/split.js +14 -16
- package/build/components/capslock/scss/index.scss +1 -1
- package/build/components/card/scss/index.scss +1 -1
- package/build/components/chat/minimap/index.js +4 -5
- package/build/components/checkbox/group.d.ts +1 -0
- package/build/components/checkbox/group.js +21 -20
- package/build/components/checkbox/scss/index.scss +1 -1
- package/build/components/color-picker/index.js +6 -6
- package/build/components/color-picker/scss/index.scss +1 -1
- package/build/components/command/index.d.ts +1 -1
- package/build/components/command/palette.d.ts +13 -9
- package/build/components/command/palette.js +143 -152
- package/build/components/command/scss/index.scss +1 -1
- package/build/components/command/search.d.ts +5 -7
- package/build/components/command/search.js +6 -26
- package/build/components/counter/scss/index.scss +1 -1
- package/build/components/editor/code/commands.js +1 -1
- package/build/components/editor/code/document.d.ts +1 -3
- package/build/components/editor/code/document.js +1 -1
- package/build/components/editor/code/editor.d.ts +18 -6
- package/build/components/editor/code/editor.js +9 -7
- package/build/components/editor/code/features.js +27 -18
- package/build/components/editor/code/find.d.ts +1 -1
- package/build/components/editor/code/find.js +5 -6
- package/build/components/editor/code/folding.d.ts +3 -5
- package/build/components/editor/code/folding.js +2 -15
- package/build/components/editor/code/gutter.js +2 -2
- package/build/components/editor/code/index.d.ts +1 -0
- package/build/components/editor/code/index.js +1 -0
- package/build/components/editor/code/minimap.d.ts +3 -1
- package/build/components/editor/code/minimap.js +31 -5
- package/build/components/editor/code/services/model.js +2 -1
- package/build/components/editor/code/syntax.js +2 -1
- package/build/components/editor/code/view.d.ts +8 -2
- package/build/components/editor/code/view.js +37 -56
- package/build/components/editor/diffs/index.d.ts +1 -0
- package/build/components/editor/diffs/index.js +1 -0
- package/build/components/editor/diffs/merge.js +16 -17
- package/build/components/editor/diffs/view.js +10 -11
- package/build/components/editor/markdown/editing.d.ts +2 -1
- package/build/components/editor/markdown/editing.js +14 -5
- package/build/components/editor/markdown/format.d.ts +1 -1
- package/build/components/editor/markdown/format.js +116 -26
- package/build/components/editor/markdown/layout.js +2 -1
- package/build/components/editor/markdown/model.d.ts +1 -2
- package/build/components/editor/markdown/model.js +1 -29
- package/build/components/editor/markdown/render.js +1 -1
- package/build/components/editor/markdown/template.d.ts +3 -10
- package/build/components/editor/markdown/template.js +2 -29
- package/build/components/editor/markdown/toolbar.d.ts +2 -2
- package/build/components/editor/markdown/toolbar.js +90 -126
- package/build/components/editor/markdown/view.d.ts +1 -1
- package/build/components/editor/markdown/view.js +54 -87
- package/build/components/editor/tree/drag.js +1 -1
- package/build/components/editor/tree/find.js +70 -64
- package/build/components/editor/tree/template.js +8 -7
- package/build/components/editor/viewer/model.d.ts +1 -1
- package/build/components/editor/viewer/template.js +4 -26
- package/build/components/editor/workspace/keybindings.d.ts +1 -1
- package/build/components/editor/workspace/model.d.ts +12 -2
- package/build/components/editor/workspace/model.js +87 -31
- package/build/components/editor/workspace/session.d.ts +2 -6
- package/build/components/editor/workspace/session.js +99 -16
- package/build/components/editor/workspace/status.d.ts +1 -1
- package/build/components/editor/workspace/strip.d.ts +10 -9
- package/build/components/editor/workspace/strip.js +99 -141
- package/build/components/editor/workspace/tabs.d.ts +2 -4
- package/build/components/editor/workspace/tabs.js +1 -14
- package/build/components/editor/workspace/template.d.ts +1 -1
- package/build/components/editor/workspace/template.js +305 -435
- package/build/components/error/index.d.ts +4 -13
- package/build/components/error/index.js +53 -172
- package/build/components/error/scss/index.scss +1 -1
- package/build/components/form/action.d.ts +2 -2
- package/build/components/form/action.js +2 -2
- package/build/components/form/input.d.ts +3 -3
- package/build/components/form/input.js +32 -10
- package/build/components/frame/scss/index.scss +1 -1
- package/build/components/group/index.js +96 -9
- package/build/components/group/scss/index.scss +1 -1
- package/build/components/heatmap/scss/index.scss +1 -1
- package/build/components/highlight/index.js +55 -48
- package/build/components/highlight/scss/index.scss +1 -1
- package/build/components/icon/scss/index.scss +1 -1
- package/build/components/image/scss/index.scss +1 -1
- package/build/components/index.d.ts +3 -6
- package/build/components/index.js +3 -6
- package/build/components/inline-edit/index.d.ts +2 -2
- package/build/components/inline-edit/index.js +5 -5
- package/build/components/inline-edit/rich.js +4 -4
- package/build/components/inline-edit/scss/index.scss +1 -1
- package/build/components/inline-edit/status.js +1 -0
- package/build/components/input/index.d.ts +4 -0
- package/build/components/input/index.js +3 -1
- package/build/components/input/otp.d.ts +18 -0
- package/build/components/input/otp.js +112 -0
- package/build/components/input/password.d.ts +15 -0
- package/build/components/input/password.js +163 -0
- package/build/components/input/scrub.d.ts +1 -0
- package/build/components/input/scrub.js +103 -89
- package/build/components/input/scss/index.scss +1 -1
- package/build/components/input/tag.d.ts +5 -0
- package/build/components/input/tag.js +116 -69
- package/build/components/json/download.js +1 -1
- package/build/components/link/scss/index.scss +1 -1
- package/build/components/marquee/index.js +1 -1
- package/build/components/marquee/scss/index.scss +1 -1
- package/build/components/nav/scss/index.scss +1 -1
- package/build/components/nav/tree.d.ts +2 -1
- package/build/components/nav/tree.js +6 -5
- package/build/components/notification/index.js +3 -3
- package/build/components/notification/scss/index.scss +1 -1
- package/build/components/overlay/popup.d.ts +2 -2
- package/build/components/overlay/popup.js +1 -1
- package/build/components/overlay/scss/index.scss +1 -1
- package/build/components/pagination/arrows.js +2 -3
- package/build/components/pagination/cards.js +2 -3
- package/build/components/pagination/index.d.ts +2 -3
- package/build/components/pagination/index.js +18 -13
- package/build/components/pagination/scss/index.scss +1 -1
- package/build/components/progress/index.js +1 -1
- package/build/components/progress/scss/index.scss +1 -1
- package/build/components/progress/text.js +3 -3
- package/build/components/range/filter.d.ts +7 -1
- package/build/components/range/filter.js +188 -171
- package/build/components/range/index.d.ts +14 -9
- package/build/components/range/index.js +11 -8
- package/build/components/range/scss/index.scss +1 -1
- package/build/components/range/surface.d.ts +21 -0
- package/build/components/range/surface.js +144 -0
- package/build/components/relative-time/index.js +2 -2
- package/build/components/relative-time/scss/index.scss +1 -1
- package/build/components/root/scss/index.scss +1 -1
- package/build/components/{preview/header.d.ts → search/button.d.ts} +3 -3
- package/build/components/search/button.js +18 -0
- package/build/components/search/index.d.ts +8 -0
- package/build/components/search/index.js +5 -0
- package/build/components/search/input.d.ts +9 -0
- package/build/components/search/input.js +23 -0
- package/build/components/search/parts.d.ts +5 -0
- package/build/components/search/parts.js +17 -0
- package/build/components/search/scss/index.scss +2 -0
- package/build/components/select/expand.js +4 -5
- package/build/components/select/index.d.ts +7 -7
- package/build/components/select/index.js +127 -117
- package/build/components/select/placement.js +8 -1
- package/build/components/select/scss/index.scss +1 -1
- package/build/components/{panels → shell}/group.d.ts +21 -5
- package/build/components/shell/group.js +336 -0
- package/build/components/shell/index.d.ts +15 -17
- package/build/components/shell/index.js +583 -238
- package/build/components/shell/model.d.ts +94 -0
- package/build/components/{panels → shell}/model.js +199 -73
- package/build/components/shell/resize.d.ts +5 -0
- package/build/components/{panels → shell}/resize.js +54 -30
- package/build/components/shell/scss/index.scss +1 -1
- package/build/components/shell/sidebar.d.ts +34 -0
- package/build/components/shell/sidebar.js +362 -0
- package/build/components/{panels → shell}/subtree.js +7 -8
- package/build/components/shortcut-recorder/index.d.ts +5 -4
- package/build/components/shortcut-recorder/index.js +69 -44
- package/build/components/shortcut-recorder/scss/index.scss +1 -1
- package/build/components/sortable/index.d.ts +16 -2
- package/build/components/sortable/index.js +237 -134
- package/build/components/sortable/scss/index.scss +1 -1
- package/build/components/story/index.js +46 -34
- package/build/components/story/scss/index.scss +1 -1
- package/build/components/surface-field/engine.d.ts +2 -0
- package/build/components/surface-field/engine.js +86 -33
- package/build/components/surface-field/index.d.ts +26 -4
- package/build/components/surface-field/index.js +35 -4
- package/build/components/surface-field/scss/index.scss +1 -1
- package/build/components/surface-field/surface.d.ts +13 -1
- package/build/components/surface-field/surface.js +149 -58
- package/build/components/tasklist/index.d.ts +1 -4
- package/build/components/tasklist/index.js +36 -43
- package/build/components/tasklist/scss/index.scss +1 -1
- package/build/components/textarea/index.d.ts +1 -1
- package/build/components/textarea/index.js +14 -14
- package/build/components/theme/scss/index.scss +1 -1
- package/build/components/theme/shared.d.ts +1 -2
- package/build/components/theme/shared.js +2 -5
- package/build/components/toast/index.d.ts +3 -3
- package/build/components/toast/index.js +3 -3
- package/build/components/toast/scss/index.scss +1 -1
- package/build/components/toolbar/index.d.ts +91 -0
- package/build/components/toolbar/index.js +1281 -0
- package/build/components/toolbar/scss/index.scss +2 -0
- package/build/components/tooltip/menu.d.ts +9 -8
- package/build/components/tooltip/menu.js +397 -279
- package/build/components/tooltip/onclick.d.ts +2 -0
- package/build/components/tooltip/onclick.js +13 -4
- package/build/components/tooltip/onhover.d.ts +3 -1
- package/build/components/tooltip/onhover.js +10 -9
- package/build/components/tooltip/scss/index.scss +1 -1
- package/build/components/tooltip/shared.d.ts +4 -4
- package/build/components/tooltip/shared.js +27 -46
- package/build/components/tooltip/utilities.d.ts +5 -2
- package/build/components/tooltip/utilities.js +169 -9
- package/build/components/typewriter/rotate.js +6 -6
- package/build/components/typewriter/scss/index.scss +1 -1
- package/build/components/uptime/scss/index.scss +1 -1
- package/build/components/usage-meter/index.js +1 -1
- package/build/components/usage-meter/scss/index.scss +1 -1
- package/build/css-utilities/font/montserrat/OFL.txt +93 -0
- package/build/shared/drag.d.ts +15 -9
- package/build/shared/drag.js +41 -28
- package/build/shared/placement.d.ts +39 -0
- package/build/shared/placement.js +55 -0
- package/build/shared/transition.js +1 -1
- package/build/shared/viewport.d.ts +1 -2
- package/build/shared/viewport.js +1 -4
- package/package.json +2 -5
- package/src/components/accordion/index.ts +12 -5
- package/src/components/announcement/index.ts +1 -1
- package/src/components/breadcrumb/index.ts +13 -3
- package/src/components/breadcrumb/scss/index.scss +6 -6
- package/src/components/breadcrumb/scss/variables.scss +7 -0
- package/src/components/button/kbd.ts +22 -17
- package/src/components/button/scss/index.scss +69 -76
- package/src/components/button/scss/variables.scss +51 -18
- package/src/components/button/split.ts +12 -8
- package/src/components/capslock/index.ts +2 -0
- package/src/components/capslock/scss/index.scss +21 -21
- package/src/components/card/scss/index.scss +16 -0
- package/src/components/card/scss/variables.scss +25 -2
- package/src/components/chat/minimap/index.ts +5 -6
- package/src/components/chat/minimap/scss/index.scss +12 -11
- package/src/components/chat/minimap/scss/variables.scss +23 -17
- package/src/components/checkbox/group.ts +8 -7
- package/src/components/checkbox/scss/index.scss +59 -35
- package/src/components/checkbox/scss/variables.scss +24 -17
- package/src/components/color-picker/index.ts +6 -6
- package/src/components/color-picker/scss/index.scss +35 -22
- package/src/components/color-picker/scss/variables.scss +11 -3
- package/src/components/command/index.ts +1 -1
- package/src/components/command/palette.ts +174 -166
- package/src/components/command/scss/index.scss +18 -51
- package/src/components/command/scss/variables.scss +37 -71
- package/src/components/command/search.ts +9 -31
- package/src/components/counter/index.ts +22 -22
- package/src/components/counter/scss/variables.scss +10 -7
- package/src/components/editor/code/commands.ts +1 -1
- package/src/components/editor/code/document.ts +0 -2
- package/src/components/editor/code/editor.ts +31 -13
- package/src/components/editor/code/features.ts +39 -24
- package/src/components/editor/code/find.ts +5 -6
- package/src/components/editor/code/folding.ts +3 -21
- package/src/components/editor/code/gutter.ts +2 -2
- package/src/components/editor/code/index.ts +1 -0
- package/src/components/editor/code/minimap.ts +39 -5
- package/src/components/editor/code/scss/_editor.scss +28 -21
- package/src/components/editor/code/scss/_features.scss +19 -21
- package/src/components/editor/code/scss/_services.scss +14 -11
- package/src/components/editor/code/scss/variables.scss +31 -12
- package/src/components/editor/code/services/model.ts +2 -1
- package/src/components/editor/code/syntax.ts +2 -1
- package/src/components/editor/code/view.ts +22 -45
- package/src/components/editor/diffs/index.ts +1 -0
- package/src/components/editor/diffs/merge.ts +9 -10
- package/src/components/editor/diffs/scss/_diffs.scss +39 -63
- package/src/components/editor/diffs/scss/_merge.scss +10 -2
- package/src/components/editor/diffs/scss/index.scss +0 -1
- package/src/components/editor/diffs/scss/variables.scss +36 -17
- package/src/components/editor/diffs/view.ts +8 -9
- package/src/components/editor/markdown/editing.ts +18 -6
- package/src/components/editor/markdown/format.ts +180 -32
- package/src/components/editor/markdown/layout.ts +2 -1
- package/src/components/editor/markdown/model.ts +0 -38
- package/src/components/editor/markdown/render.ts +1 -1
- package/src/components/editor/markdown/scss/index.scss +38 -52
- package/src/components/editor/markdown/scss/variables.scss +24 -50
- package/src/components/editor/markdown/template.ts +3 -63
- package/src/components/editor/markdown/toolbar.ts +76 -127
- package/src/components/editor/markdown/view.ts +9 -32
- package/src/components/editor/tree/drag.ts +1 -1
- package/src/components/editor/tree/find.ts +61 -64
- package/src/components/editor/tree/scss/index.scss +29 -30
- package/src/components/editor/tree/scss/variables.scss +34 -15
- package/src/components/editor/tree/template.ts +9 -9
- package/src/components/editor/viewer/model.ts +1 -1
- package/src/components/editor/viewer/scss/_viewer.scss +4 -5
- package/src/components/editor/viewer/scss/variables.scss +3 -3
- package/src/components/editor/viewer/template.ts +4 -31
- package/src/components/editor/workspace/keybindings.ts +1 -1
- package/src/components/editor/workspace/model.ts +136 -37
- package/src/components/editor/workspace/scss/_keybindings.scss +3 -20
- package/src/components/editor/workspace/scss/_status.scss +0 -1
- package/src/components/editor/workspace/scss/_tabs.scss +2 -41
- package/src/components/editor/workspace/scss/index.scss +49 -71
- package/src/components/editor/workspace/scss/variables.scss +1 -135
- package/src/components/editor/workspace/session.ts +138 -18
- package/src/components/editor/workspace/status.ts +1 -1
- package/src/components/editor/workspace/strip.ts +96 -115
- package/src/components/editor/workspace/tabs.ts +2 -23
- package/src/components/editor/workspace/template.ts +323 -458
- package/src/components/error/index.ts +47 -183
- package/src/components/error/scss/index.scss +34 -35
- package/src/components/error/scss/variables.scss +14 -26
- package/src/components/filter/scss/index.scss +6 -5
- package/src/components/form/action.ts +7 -7
- package/src/components/form/input.ts +25 -12
- package/src/components/frame/scss/index.scss +5 -5
- package/src/components/group/index.ts +77 -2
- package/src/components/group/scss/index.scss +164 -0
- package/src/components/group/scss/variables.scss +110 -2
- package/src/components/heatmap/scss/variables.scss +13 -10
- package/src/components/highlight/index.ts +87 -79
- package/src/components/highlight/scss/index.scss +6 -16
- package/src/components/highlight/scss/variables.scss +33 -5
- package/src/components/icon/scss/index.scss +2 -2
- package/src/components/icon/scss/variables.scss +14 -1
- package/src/components/image/scss/index.scss +9 -9
- package/src/components/image/scss/variables.scss +1 -1
- package/src/components/index.ts +3 -6
- package/src/components/inline-edit/index.ts +8 -6
- package/src/components/inline-edit/rich.ts +8 -8
- package/src/components/inline-edit/scss/index.scss +50 -36
- package/src/components/inline-edit/scss/variables.scss +28 -18
- package/src/components/inline-edit/status.ts +2 -0
- package/src/components/input/index.ts +3 -1
- package/src/components/input/otp.ts +175 -0
- package/src/components/input/password.ts +178 -0
- package/src/components/input/scrub.ts +197 -178
- package/src/components/input/scss/index.scss +344 -4
- package/src/components/input/scss/variables.scss +234 -65
- package/src/components/input/tag.ts +98 -53
- package/src/components/json/download.ts +2 -5
- package/src/components/link/scss/index.scss +3 -5
- package/src/components/loading/scss/index.scss +1 -0
- package/src/components/loading/scss/variables.scss +1 -0
- package/src/components/marquee/index.ts +1 -1
- package/src/components/marquee/scss/index.scss +11 -4
- package/src/components/nav/scss/index.scss +10 -26
- package/src/components/nav/scss/variables.scss +13 -23
- package/src/components/nav/tree.ts +10 -8
- package/src/components/notification/index.ts +3 -3
- package/src/components/notification/scss/index.scss +7 -14
- package/src/components/notification/scss/variables.scss +10 -2
- package/src/components/number/index.ts +1 -1
- package/src/components/overlay/popup.ts +2 -2
- package/src/components/overlay/scss/index.scss +60 -51
- package/src/components/page/scss/variables.scss +1 -0
- package/src/components/pagination/arrows.ts +2 -3
- package/src/components/pagination/cards.ts +2 -3
- package/src/components/pagination/index.ts +11 -9
- package/src/components/pagination/scss/index.scss +38 -101
- package/src/components/pagination/scss/variables.scss +24 -75
- package/src/components/progress/index.ts +1 -1
- package/src/components/progress/scss/index.scss +22 -11
- package/src/components/progress/scss/variables.scss +13 -5
- package/src/components/progress/text.ts +3 -3
- package/src/components/range/filter.ts +249 -246
- package/src/components/range/index.ts +22 -7
- package/src/components/range/scss/index.scss +470 -15
- package/src/components/range/scss/variables.scss +402 -198
- package/src/components/range/surface.ts +135 -0
- package/src/components/relative-time/index.ts +2 -2
- package/src/components/relative-time/scss/index.scss +4 -2
- package/src/components/relative-time/scss/variables.scss +4 -5
- package/src/components/root/scss/index.scss +11 -11
- package/src/components/root/scss/variables.scss +4 -4
- package/src/components/search/button.ts +24 -0
- package/src/components/search/index.ts +12 -0
- package/src/components/search/input.ts +35 -0
- package/src/components/search/parts.ts +24 -0
- package/src/components/search/scss/index.scss +36 -0
- package/src/components/search/scss/variables.scss +67 -0
- package/src/components/section/scss/variables.scss +1 -0
- package/src/components/select/expand.ts +3 -4
- package/src/components/select/index.ts +55 -41
- package/src/components/select/placement.ts +17 -1
- package/src/components/select/scss/index.scss +57 -29
- package/src/components/select/scss/variables.scss +91 -53
- package/src/components/{panels → shell}/group.ts +151 -98
- package/src/components/shell/index.ts +805 -284
- package/src/components/{panels → shell}/model.ts +329 -102
- package/src/components/shell/resize.ts +176 -0
- package/src/components/shell/scss/index.scss +502 -89
- package/src/components/shell/scss/variables.scss +264 -39
- package/src/components/shell/sidebar.ts +325 -0
- package/src/components/{panels → shell}/subtree.ts +1 -2
- package/src/components/shortcut-recorder/index.ts +99 -61
- package/src/components/shortcut-recorder/scss/index.scss +76 -52
- package/src/components/shortcut-recorder/scss/variables.scss +25 -30
- package/src/components/sortable/index.ts +364 -63
- package/src/components/sortable/scss/index.scss +22 -2
- package/src/components/sortable/scss/variables.scss +16 -4
- package/src/components/story/index.ts +56 -33
- package/src/components/story/scss/index.scss +67 -16
- package/src/components/story/scss/variables.scss +59 -18
- package/src/components/surface-field/engine.ts +157 -61
- package/src/components/surface-field/index.ts +64 -9
- package/src/components/surface-field/scss/index.scss +88 -77
- package/src/components/surface-field/scss/variables.scss +84 -36
- package/src/components/surface-field/surface.ts +225 -76
- package/src/components/tasklist/index.ts +10 -14
- package/src/components/tasklist/scss/index.scss +25 -45
- package/src/components/tasklist/scss/variables.scss +12 -29
- package/src/components/textarea/index.ts +39 -42
- package/src/components/theme/reveal.ts +1 -0
- package/src/components/theme/scss/index.scss +20 -16
- package/src/components/theme/scss/variables.scss +11 -5
- package/src/components/theme/shared.ts +3 -7
- package/src/components/toast/index.ts +7 -8
- package/src/components/toast/scss/index.scss +44 -36
- package/src/components/toast/scss/variables.scss +36 -33
- package/src/components/toolbar/index.ts +1675 -0
- package/src/components/toolbar/scss/index.scss +759 -0
- package/src/components/toolbar/scss/variables.scss +555 -0
- package/src/components/tooltip/menu.ts +301 -220
- package/src/components/tooltip/onclick.ts +18 -3
- package/src/components/tooltip/onhover.ts +13 -9
- package/src/components/tooltip/scss/index.scss +155 -188
- package/src/components/tooltip/scss/variables.scss +151 -135
- package/src/components/tooltip/shared.ts +47 -74
- package/src/components/tooltip/utilities.ts +151 -10
- package/src/components/truncate/index.ts +1 -1
- package/src/components/typewriter/rotate.ts +6 -6
- package/src/components/typewriter/scss/index.scss +14 -5
- package/src/components/uptime/scss/index.scss +8 -15
- package/src/components/uptime/scss/variables.scss +12 -1
- package/src/components/usage-meter/index.ts +1 -1
- package/src/components/usage-meter/scss/index.scss +6 -4
- package/src/components/usage-meter/scss/variables.scss +11 -11
- package/src/css-utilities/box-shadow.scss +0 -1
- package/src/css-utilities/icon.scss +9 -9
- package/src/css-utilities/surface.scss +27 -17
- package/src/modifiers/glass/index.ts +2 -2
- package/src/modifiers/glass/scss/index.scss +2 -2
- package/src/normalize/scss/index.scss +1 -1
- package/src/shared/drag.ts +92 -53
- package/src/shared/placement.ts +145 -0
- package/src/shared/transition.ts +1 -1
- package/src/shared/viewport.ts +1 -7
- package/src/tokens/scss/color.scss +2 -2
- package/src/tokens/scss/scale.scss +5 -1
- package/src/tokens/scss/size.scss +0 -7
- package/storage/svg/angle.svg +1 -0
- package/storage/svg/{chevron-left.svg → arrow.svg} +1 -1
- package/storage/svg/calendar.svg +1 -0
- package/storage/svg/circle-filled.svg +1 -0
- package/storage/svg/cursor-arrow-left.svg +1 -0
- package/storage/svg/cursor-arrow-right.svg +1 -0
- package/storage/svg/fit.svg +1 -0
- package/storage/svg/grip.svg +1 -0
- package/storage/svg/mail.svg +1 -0
- package/storage/svg/{chevron-down.svg → minus.svg} +1 -1
- package/storage/svg/music.svg +1 -0
- package/storage/svg/{chevron-up.svg → rotate-ccw.svg} +1 -1
- package/vite.config.ts +9 -13
- package/NOTICE +0 -232
- package/build/components/dock/index.d.ts +0 -47
- package/build/components/dock/index.js +0 -469
- package/build/components/dock/scss/index.scss +0 -2
- package/build/components/metric/flash.d.ts +0 -12
- package/build/components/metric/flash.js +0 -117
- package/build/components/metric/index.d.ts +0 -44
- package/build/components/metric/index.js +0 -275
- package/build/components/metric/scss/index.scss +0 -2
- package/build/components/pagination/dots.d.ts +0 -23
- package/build/components/pagination/dots.js +0 -115
- package/build/components/panels/dnd.d.ts +0 -47
- package/build/components/panels/dnd.js +0 -114
- package/build/components/panels/group.js +0 -322
- package/build/components/panels/index.d.ts +0 -17
- package/build/components/panels/index.js +0 -524
- package/build/components/panels/model.d.ts +0 -64
- package/build/components/panels/resize.d.ts +0 -9
- package/build/components/panels/scss/index.scss +0 -2
- package/build/components/preview/buttons.d.ts +0 -12
- package/build/components/preview/buttons.js +0 -26
- package/build/components/preview/code.d.ts +0 -8
- package/build/components/preview/code.js +0 -18
- package/build/components/preview/header.js +0 -21
- package/build/components/preview/index.d.ts +0 -37
- package/build/components/preview/index.js +0 -123
- package/build/components/preview/scss/index.scss +0 -2
- package/build/components/preview/source.d.ts +0 -12
- package/build/components/preview/source.js +0 -79
- package/build/components/preview/stage.d.ts +0 -8
- package/build/components/preview/stage.js +0 -28
- package/build/components/textarea/scss/index.scss +0 -2
- package/src/components/dock/index.ts +0 -567
- package/src/components/dock/scss/index.scss +0 -346
- package/src/components/dock/scss/variables.scss +0 -357
- package/src/components/input/scss/_field.scss +0 -39
- package/src/components/input/scss/_scrub.scss +0 -89
- package/src/components/input/scss/_tag.scss +0 -142
- package/src/components/metric/flash.ts +0 -129
- package/src/components/metric/index.ts +0 -307
- package/src/components/metric/scss/_flash.scss +0 -150
- package/src/components/metric/scss/index.scss +0 -155
- package/src/components/metric/scss/variables.scss +0 -233
- package/src/components/pagination/dots.ts +0 -132
- package/src/components/panels/dnd.ts +0 -190
- package/src/components/panels/index.ts +0 -676
- package/src/components/panels/resize.ts +0 -157
- package/src/components/panels/scss/index.scss +0 -379
- package/src/components/panels/scss/variables.scss +0 -197
- package/src/components/preview/buttons.ts +0 -48
- package/src/components/preview/code.ts +0 -28
- package/src/components/preview/header.ts +0 -23
- package/src/components/preview/index.ts +0 -149
- package/src/components/preview/scss/index.scss +0 -158
- package/src/components/preview/scss/variables.scss +0 -149
- package/src/components/preview/source.ts +0 -73
- package/src/components/preview/stage.ts +0 -33
- package/src/components/range/scss/_filter.scss +0 -360
- package/src/components/range/scss/_slider.scss +0 -65
- package/src/components/range/scss/_vertical.scss +0 -10
- package/src/components/textarea/scss/index.scss +0 -72
- package/src/components/textarea/scss/variables.scss +0 -22
- package/storage/svg/amex.svg +0 -1
- package/storage/svg/arrow-down.svg +0 -1
- package/storage/svg/arrow-left.svg +0 -1
- package/storage/svg/arrow-right.svg +0 -1
- package/storage/svg/arrow-up.svg +0 -1
- package/storage/svg/card.svg +0 -1
- package/storage/svg/chip.svg +0 -1
- package/storage/svg/discover.svg +0 -1
- package/storage/svg/mastercard.svg +0 -1
- package/storage/svg/visa.svg +0 -1
- /package/build/components/{panels → shell}/subtree.d.ts +0 -0
- /package/storage/svg/{chevron-right.svg → chevron.svg} +0 -0
|
@@ -3,109 +3,172 @@ import { flush, onCleanup } from '@esportsplus/reactivity';
|
|
|
3
3
|
import * as template_u1 from '@esportsplus/template';
|
|
4
4
|
import { component } from '@esportsplus/template';
|
|
5
5
|
import highlight from '../highlight/index.js';
|
|
6
|
+
import icon from '../icon/index.js';
|
|
6
7
|
import overlay from '../overlay/index.js';
|
|
8
|
+
import scrollbar from '../../modifiers/scrollbar/index.js';
|
|
7
9
|
import { finished } from '../../shared/animation.js';
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
+
import { expand as cover, margin, place } from '../../shared/placement.js';
|
|
11
|
+
import { viewport } from '../../shared/viewport.js';
|
|
12
|
+
import { morph, px } from './utilities.js';
|
|
13
|
+
import chevron from '@esportsplus/ui/svg/chevron.svg';
|
|
10
14
|
const template_0p4v5175 = template_u1.template(`<!--$--><span class='tooltip-menu-label'></span><!--$--><!--$-->`);
|
|
11
15
|
const template_0p4v517b = template_u1.template(`<span class='tooltip-menu-icon'>`, true);
|
|
12
16
|
const template_0p4v517d = template_u1.template(`<span class='tooltip-menu-hint'>`, true);
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
20
|
-
const
|
|
21
|
-
const template_0p4v51716 = template_u1.template(`<button aria-haspopup='menu' type='button'>`, true);
|
|
17
|
+
const template_0p4v517f = template_u1.template(`<div>`, true);
|
|
18
|
+
const template_0p4v517h = template_u1.template(`<a role='menuitem' tabindex='-1'>`, true);
|
|
19
|
+
const template_0p4v517k = template_u1.template(`<button role='menuitem' tabindex='-1' type='button'>`, true);
|
|
20
|
+
const template_0p4v517n = template_u1.template(`<div role='menu'><!--$--><div><!--$-->`, true);
|
|
21
|
+
const template_0p4v517s = template_u1.template(`<div class='tooltip-menu-header'><!--$--><span class='tooltip-menu-title'><span class='tooltip-menu-title-regular'></span><span aria-hidden='true' class='tooltip-menu-title-bold'>`, true);
|
|
22
|
+
const template_0p4v517y = template_u1.template(`<!--$-->`);
|
|
23
|
+
const template_0p4v51712 = template_u1.template(`<!--$--><div popover='manual'>`);
|
|
24
|
+
const template_0p4v51718 = template_u1.template(`<button aria-haspopup='menu' type='button'>`, true);
|
|
22
25
|
class ReactiveObject_0p4v5170 extends reactivity_u0.ReactiveObject {
|
|
23
|
-
#
|
|
24
|
-
#render = this[reactivity_u0.SIGNAL](false);
|
|
25
|
-
#settled = this[reactivity_u0.SIGNAL](false);
|
|
26
|
+
#active = this[reactivity_u0.SIGNAL](false);
|
|
26
27
|
constructor() {
|
|
27
28
|
super(null);
|
|
28
29
|
}
|
|
29
|
-
get
|
|
30
|
-
return reactivity_u0.read(this.#
|
|
30
|
+
get active() {
|
|
31
|
+
return reactivity_u0.read(this.#active);
|
|
31
32
|
}
|
|
32
|
-
set
|
|
33
|
-
reactivity_u0.write(this.#
|
|
33
|
+
set active(_v0) {
|
|
34
|
+
reactivity_u0.write(this.#active, _v0);
|
|
34
35
|
}
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
}
|
|
37
|
+
class ReactiveObject_0p4v5171 extends reactivity_u0.ReactiveObject {
|
|
38
|
+
#direction = this[reactivity_u0.SIGNAL](1);
|
|
39
|
+
#height;
|
|
40
|
+
#x;
|
|
41
|
+
#y;
|
|
42
|
+
constructor(_p0, _p1, _p2) {
|
|
43
|
+
super(null);
|
|
44
|
+
this.#height = this[reactivity_u0.SIGNAL](_p0);
|
|
45
|
+
this.#x = this[reactivity_u0.SIGNAL](_p1);
|
|
46
|
+
this.#y = this[reactivity_u0.SIGNAL](_p2);
|
|
37
47
|
}
|
|
38
|
-
|
|
39
|
-
reactivity_u0.
|
|
48
|
+
get direction() {
|
|
49
|
+
return reactivity_u0.read(this.#direction);
|
|
40
50
|
}
|
|
41
|
-
|
|
42
|
-
|
|
51
|
+
set direction(_v0) {
|
|
52
|
+
reactivity_u0.write(this.#direction, _v0);
|
|
43
53
|
}
|
|
44
|
-
|
|
45
|
-
reactivity_u0.
|
|
54
|
+
get height() {
|
|
55
|
+
return reactivity_u0.read(this.#height);
|
|
46
56
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
#active = this[reactivity_u0.SIGNAL](false);
|
|
50
|
-
constructor() {
|
|
51
|
-
super(null);
|
|
57
|
+
set height(_v1) {
|
|
58
|
+
reactivity_u0.write(this.#height, _v1);
|
|
52
59
|
}
|
|
53
|
-
get
|
|
54
|
-
return reactivity_u0.read(this.#
|
|
60
|
+
get x() {
|
|
61
|
+
return reactivity_u0.read(this.#x);
|
|
55
62
|
}
|
|
56
|
-
set
|
|
57
|
-
reactivity_u0.write(this.#
|
|
63
|
+
set x(_v2) {
|
|
64
|
+
reactivity_u0.write(this.#x, _v2);
|
|
65
|
+
}
|
|
66
|
+
get y() {
|
|
67
|
+
return reactivity_u0.read(this.#y);
|
|
68
|
+
}
|
|
69
|
+
set y(_v3) {
|
|
70
|
+
reactivity_u0.write(this.#y, _v3);
|
|
58
71
|
}
|
|
59
72
|
}
|
|
60
73
|
class ReactiveObject_0p4v5172 extends reactivity_u0.ReactiveObject {
|
|
74
|
+
#height;
|
|
75
|
+
#lift = this[reactivity_u0.SIGNAL](0);
|
|
61
76
|
#open = this[reactivity_u0.SIGNAL](true);
|
|
62
77
|
#render = this[reactivity_u0.SIGNAL](true);
|
|
63
78
|
#settled = this[reactivity_u0.SIGNAL](true);
|
|
64
|
-
|
|
79
|
+
#top = this[reactivity_u0.SIGNAL](0);
|
|
80
|
+
constructor(_p0) {
|
|
65
81
|
super(null);
|
|
82
|
+
this.#height = this[reactivity_u0.SIGNAL](_p0);
|
|
83
|
+
}
|
|
84
|
+
get height() {
|
|
85
|
+
return reactivity_u0.read(this.#height);
|
|
86
|
+
}
|
|
87
|
+
set height(_v0) {
|
|
88
|
+
reactivity_u0.write(this.#height, _v0);
|
|
89
|
+
}
|
|
90
|
+
get lift() {
|
|
91
|
+
return reactivity_u0.read(this.#lift);
|
|
92
|
+
}
|
|
93
|
+
set lift(_v1) {
|
|
94
|
+
reactivity_u0.write(this.#lift, _v1);
|
|
66
95
|
}
|
|
67
96
|
get open() {
|
|
68
97
|
return reactivity_u0.read(this.#open);
|
|
69
98
|
}
|
|
70
|
-
set open(
|
|
71
|
-
reactivity_u0.write(this.#open,
|
|
99
|
+
set open(_v2) {
|
|
100
|
+
reactivity_u0.write(this.#open, _v2);
|
|
72
101
|
}
|
|
73
102
|
get render() {
|
|
74
103
|
return reactivity_u0.read(this.#render);
|
|
75
104
|
}
|
|
76
|
-
set render(
|
|
77
|
-
reactivity_u0.write(this.#render,
|
|
105
|
+
set render(_v3) {
|
|
106
|
+
reactivity_u0.write(this.#render, _v3);
|
|
78
107
|
}
|
|
79
108
|
get settled() {
|
|
80
109
|
return reactivity_u0.read(this.#settled);
|
|
81
110
|
}
|
|
82
|
-
set settled(
|
|
83
|
-
reactivity_u0.write(this.#settled,
|
|
111
|
+
set settled(_v4) {
|
|
112
|
+
reactivity_u0.write(this.#settled, _v4);
|
|
113
|
+
}
|
|
114
|
+
get top() {
|
|
115
|
+
return reactivity_u0.read(this.#top);
|
|
116
|
+
}
|
|
117
|
+
set top(_v5) {
|
|
118
|
+
reactivity_u0.write(this.#top, _v5);
|
|
84
119
|
}
|
|
85
120
|
}
|
|
86
121
|
class ReactiveObject_0p4v5173 extends reactivity_u0.ReactiveObject {
|
|
87
|
-
#
|
|
88
|
-
#
|
|
89
|
-
|
|
122
|
+
#height;
|
|
123
|
+
#lift = this[reactivity_u0.SIGNAL](0);
|
|
124
|
+
#open = this[reactivity_u0.SIGNAL](false);
|
|
125
|
+
#render = this[reactivity_u0.SIGNAL](false);
|
|
126
|
+
#settled = this[reactivity_u0.SIGNAL](false);
|
|
127
|
+
#top = this[reactivity_u0.SIGNAL](0);
|
|
128
|
+
constructor(_p0) {
|
|
90
129
|
super(null);
|
|
130
|
+
this.#height = this[reactivity_u0.SIGNAL](_p0);
|
|
131
|
+
}
|
|
132
|
+
get height() {
|
|
133
|
+
return reactivity_u0.read(this.#height);
|
|
134
|
+
}
|
|
135
|
+
set height(_v0) {
|
|
136
|
+
reactivity_u0.write(this.#height, _v0);
|
|
137
|
+
}
|
|
138
|
+
get lift() {
|
|
139
|
+
return reactivity_u0.read(this.#lift);
|
|
140
|
+
}
|
|
141
|
+
set lift(_v1) {
|
|
142
|
+
reactivity_u0.write(this.#lift, _v1);
|
|
91
143
|
}
|
|
92
|
-
get
|
|
93
|
-
return reactivity_u0.read(this.#
|
|
144
|
+
get open() {
|
|
145
|
+
return reactivity_u0.read(this.#open);
|
|
94
146
|
}
|
|
95
|
-
set
|
|
96
|
-
reactivity_u0.write(this.#
|
|
147
|
+
set open(_v2) {
|
|
148
|
+
reactivity_u0.write(this.#open, _v2);
|
|
97
149
|
}
|
|
98
|
-
get
|
|
99
|
-
return reactivity_u0.read(this.#
|
|
150
|
+
get render() {
|
|
151
|
+
return reactivity_u0.read(this.#render);
|
|
100
152
|
}
|
|
101
|
-
set
|
|
102
|
-
reactivity_u0.write(this.#
|
|
153
|
+
set render(_v3) {
|
|
154
|
+
reactivity_u0.write(this.#render, _v3);
|
|
155
|
+
}
|
|
156
|
+
get settled() {
|
|
157
|
+
return reactivity_u0.read(this.#settled);
|
|
158
|
+
}
|
|
159
|
+
set settled(_v4) {
|
|
160
|
+
reactivity_u0.write(this.#settled, _v4);
|
|
161
|
+
}
|
|
162
|
+
get top() {
|
|
163
|
+
return reactivity_u0.read(this.#top);
|
|
164
|
+
}
|
|
165
|
+
set top(_v5) {
|
|
166
|
+
reactivity_u0.write(this.#top, _v5);
|
|
103
167
|
}
|
|
104
168
|
}
|
|
105
|
-
const MENU_TRIGGER = Symbol.for('@esportsplus/ui/tooltip.menu.trigger');
|
|
106
169
|
const MENU_ITEM = Symbol.for('@esportsplus/ui/tooltip.menu.item');
|
|
107
170
|
const MENU_PANEL = Symbol.for('@esportsplus/ui/tooltip.menu.panel');
|
|
108
|
-
const
|
|
171
|
+
const MENU_TRIGGER = Symbol.for('@esportsplus/ui/tooltip.menu.trigger');
|
|
109
172
|
let anchors = 0;
|
|
110
173
|
function covered(node) {
|
|
111
174
|
for (let i = 0, n = node.children.length; i < n; i++) {
|
|
@@ -115,33 +178,9 @@ function covered(node) {
|
|
|
115
178
|
}
|
|
116
179
|
return false;
|
|
117
180
|
}
|
|
118
|
-
function enabled(node) {
|
|
119
|
-
let nodes = [];
|
|
120
|
-
for (let i = 0, n = node.children.length; i < n; i++) {
|
|
121
|
-
let child = node.children[i];
|
|
122
|
-
if (child.button && !child.button.hidden && !child.item?.disabled) {
|
|
123
|
-
nodes.push(child);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
return nodes;
|
|
127
|
-
}
|
|
128
|
-
function tree(items, parent) {
|
|
129
|
-
let nodes = [];
|
|
130
|
-
for (let i = 0, n = items.length; i < n; i++) {
|
|
131
|
-
let node = {
|
|
132
|
-
children: [],
|
|
133
|
-
item: items[i],
|
|
134
|
-
parent,
|
|
135
|
-
state: new ReactiveObject_0p4v5170()
|
|
136
|
-
};
|
|
137
|
-
node.children = tree(items[i].items ?? [], node);
|
|
138
|
-
nodes.push(node);
|
|
139
|
-
}
|
|
140
|
-
return nodes;
|
|
141
|
-
}
|
|
142
181
|
function createMenu(context = false) {
|
|
143
|
-
return component(({ animate = true, controller, expand: expansion = false, highlight: highlighted = false, items, onselect, openOn = 'click', state = new
|
|
144
|
-
let
|
|
182
|
+
return component(({ align = 'start', animate = true, controller, expand: expansion = false, highlight: highlighted = false, items, onselect, openOn = 'click', state = new ReactiveObject_0p4v5170(), ...attributes }, content) => {
|
|
183
|
+
let hiding = 0, host, last = {}, layer, leaving, name = `--tooltip-menu-${++anchors}`, origin, pending, placement = new ReactiveObject_0p4v5171(undefined, undefined, undefined), root = { children: [], state: new ReactiveObject_0p4v5172(undefined) }, stack = [root], trigger;
|
|
145
184
|
root.children = tree(items, root);
|
|
146
185
|
onCleanup(() => {
|
|
147
186
|
clearTimeout(leaving);
|
|
@@ -158,22 +197,66 @@ function createMenu(context = false) {
|
|
|
158
197
|
open();
|
|
159
198
|
}
|
|
160
199
|
else if (position) {
|
|
161
|
-
|
|
200
|
+
at(position);
|
|
162
201
|
}
|
|
163
202
|
else if (host) {
|
|
164
203
|
let focused = document.activeElement;
|
|
165
|
-
|
|
204
|
+
at(anchor(focused && host.contains(focused) && !root.panel?.contains(focused) ? focused : host));
|
|
166
205
|
}
|
|
167
206
|
}
|
|
168
207
|
});
|
|
169
|
-
function stay() {
|
|
170
|
-
clearTimeout(leaving);
|
|
171
|
-
leaving = undefined;
|
|
172
|
-
}
|
|
173
208
|
function anchor(element) {
|
|
174
209
|
let bounds = element.getBoundingClientRect();
|
|
175
210
|
return { x: bounds.left, y: element === host ? bounds.top : bounds.bottom };
|
|
176
211
|
}
|
|
212
|
+
function arrange() {
|
|
213
|
+
let element = root.panel;
|
|
214
|
+
if (!element || !host || !layer) {
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
placement.height = undefined;
|
|
218
|
+
placement.x = undefined;
|
|
219
|
+
placement.y = undefined;
|
|
220
|
+
flush();
|
|
221
|
+
let bounds = host.getBoundingClientRect(), box = layer.getBoundingClientRect(), height = element.offsetHeight, space = margin(element), width = element.offsetWidth;
|
|
222
|
+
if (expansion) {
|
|
223
|
+
let grown = cover({ anchor: bounds, corner: last.corner, height, margin: space, width });
|
|
224
|
+
last.corner = grown.corner;
|
|
225
|
+
placement.direction = grown.corner[1] === 'e' ? 1 : -1;
|
|
226
|
+
placement.height = grown.maxHeight;
|
|
227
|
+
placement.x = grown.x - box.left;
|
|
228
|
+
placement.y = grown.y - box.top;
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
let { maxHeight, side, x, y } = place({
|
|
232
|
+
align,
|
|
233
|
+
anchor: context && origin ? new DOMRect(origin.x, origin.y, 0, 0) : bounds,
|
|
234
|
+
gap: context ? 0 : parseFloat(getComputedStyle(element).getPropertyValue('--offset')) || 0,
|
|
235
|
+
height,
|
|
236
|
+
margin: space,
|
|
237
|
+
side: last.side,
|
|
238
|
+
width
|
|
239
|
+
});
|
|
240
|
+
last.side = side;
|
|
241
|
+
placement.height = maxHeight;
|
|
242
|
+
placement.x = x - box.left;
|
|
243
|
+
placement.y = y - box.top;
|
|
244
|
+
}
|
|
245
|
+
function at(point) {
|
|
246
|
+
if (!host || !root.panel) {
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
249
|
+
let focused = document.activeElement;
|
|
250
|
+
if (!root.panel.contains(focused)) {
|
|
251
|
+
trigger = focused instanceof HTMLElement && focused !== document.body ? focused : host;
|
|
252
|
+
}
|
|
253
|
+
origin = point;
|
|
254
|
+
if (state.active || pending) {
|
|
255
|
+
reset();
|
|
256
|
+
arrange();
|
|
257
|
+
}
|
|
258
|
+
open();
|
|
259
|
+
}
|
|
177
260
|
function close(focus) {
|
|
178
261
|
stay();
|
|
179
262
|
pending?.();
|
|
@@ -192,6 +275,22 @@ function createMenu(context = false) {
|
|
|
192
275
|
trigger?.focus({ preventScroll: true });
|
|
193
276
|
}
|
|
194
277
|
}
|
|
278
|
+
function connect(element) {
|
|
279
|
+
host = element;
|
|
280
|
+
trigger = element;
|
|
281
|
+
}
|
|
282
|
+
function contextmenu(event) {
|
|
283
|
+
if (!host || !root.panel || root.panel.contains(event.target)) {
|
|
284
|
+
return;
|
|
285
|
+
}
|
|
286
|
+
event.preventDefault();
|
|
287
|
+
if (event.clientX === 0 && event.clientY === 0) {
|
|
288
|
+
at(anchor(event.target instanceof Element ? event.target : host));
|
|
289
|
+
}
|
|
290
|
+
else {
|
|
291
|
+
at({ x: event.clientX, y: event.clientY });
|
|
292
|
+
}
|
|
293
|
+
}
|
|
195
294
|
function drill(node) {
|
|
196
295
|
if (!node.children.length || node.item?.disabled) {
|
|
197
296
|
return;
|
|
@@ -204,11 +303,11 @@ function createMenu(context = false) {
|
|
|
204
303
|
node.state.render = true;
|
|
205
304
|
}
|
|
206
305
|
function entry(node) {
|
|
207
|
-
let branch = node.children.length > 0, { danger, disabled, hint, icon, items: _items, label, onselect: _onselect, ...itemAttributes } = node.item, contents = (() => {
|
|
306
|
+
let branch = node.children.length > 0, { danger, disabled, hint, icon: glyph, items: _items, label, onselect: _onselect, ...itemAttributes } = node.item, contents = (() => {
|
|
208
307
|
let root_0p4v5174 = template_0p4v5175(), element_0p4v5176 = root_0p4v5174.firstChild, element_0p4v5177 = element_0p4v5176.nextSibling, element_0p4v5178 = element_0p4v5177.nextSibling, element_0p4v5179 = element_0p4v5178.nextSibling;
|
|
209
|
-
template_u1.slot(element_0p4v5176,
|
|
308
|
+
template_u1.slot(element_0p4v5176, glyph && (() => {
|
|
210
309
|
let root_0p4v517a = template_0p4v517b();
|
|
211
|
-
template_u1.slot(root_0p4v517a,
|
|
310
|
+
template_u1.slot(root_0p4v517a, glyph(), 1);
|
|
212
311
|
return root_0p4v517a;
|
|
213
312
|
})());
|
|
214
313
|
template_u1.slot(element_0p4v5177, label, 1);
|
|
@@ -217,12 +316,12 @@ function createMenu(context = false) {
|
|
|
217
316
|
template_u1.slot(root_0p4v517c, hint, 1);
|
|
218
317
|
return root_0p4v517c;
|
|
219
318
|
})());
|
|
220
|
-
template_u1.slot(element_0p4v5179, branch &&
|
|
319
|
+
template_u1.slot(element_0p4v5179, branch && icon({ 'aria-hidden': 'true', class: 'tooltip-menu-chevron icon--rotate' }, chevron));
|
|
221
320
|
return root_0p4v5174;
|
|
222
321
|
})(), bindings = {
|
|
322
|
+
'aria-disabled': disabled === true && 'true',
|
|
223
323
|
'aria-expanded': branch && (() => String(node.state.open)),
|
|
224
324
|
'aria-haspopup': branch && 'menu',
|
|
225
|
-
'aria-disabled': disabled === true && 'true',
|
|
226
325
|
onclick: (event) => {
|
|
227
326
|
if (disabled) {
|
|
228
327
|
event.preventDefault();
|
|
@@ -241,45 +340,102 @@ function createMenu(context = false) {
|
|
|
241
340
|
}
|
|
242
341
|
};
|
|
243
342
|
{
|
|
244
|
-
let
|
|
245
|
-
|
|
246
|
-
let
|
|
247
|
-
template_u1.slot(
|
|
248
|
-
let
|
|
249
|
-
template_u1.setProperties(
|
|
250
|
-
template_u1.setProperties(
|
|
251
|
-
template_u1.setProperties(
|
|
252
|
-
template_u1.setClass(
|
|
253
|
-
template_u1.setStyle(
|
|
254
|
-
return
|
|
343
|
+
let root_0p4v517e = template_0p4v517f();
|
|
344
|
+
root_0p4v517e.appendChild(itemAttributes.href ? (() => {
|
|
345
|
+
let root_0p4v517g = template_0p4v517h();
|
|
346
|
+
template_u1.slot(root_0p4v517g, contents, 1);
|
|
347
|
+
let attributes_0p4v517i = attributes[MENU_ITEM];
|
|
348
|
+
template_u1.setProperties(root_0p4v517g, attributes_0p4v517i, true);
|
|
349
|
+
template_u1.setProperties(root_0p4v517g, itemAttributes);
|
|
350
|
+
template_u1.setProperties(root_0p4v517g, bindings);
|
|
351
|
+
template_u1.setClass(root_0p4v517g, ["tooltip-menu-item", danger && 'tooltip-menu-item--danger', attributes_0p4v517i?.class]);
|
|
352
|
+
template_u1.setStyle(root_0p4v517g, ["", attributes_0p4v517i?.style]);
|
|
353
|
+
return root_0p4v517g;
|
|
255
354
|
})() : (() => {
|
|
256
|
-
let
|
|
257
|
-
template_u1.slot(
|
|
258
|
-
let
|
|
259
|
-
template_u1.setProperties(
|
|
260
|
-
template_u1.setProperties(
|
|
261
|
-
template_u1.setProperties(
|
|
262
|
-
template_u1.setProperty(
|
|
263
|
-
template_u1.setClass(
|
|
264
|
-
template_u1.setStyle(
|
|
265
|
-
return
|
|
266
|
-
})()
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
return root_0p4v517f;
|
|
355
|
+
let root_0p4v517j = template_0p4v517k();
|
|
356
|
+
template_u1.slot(root_0p4v517j, contents, 1);
|
|
357
|
+
let attributes_0p4v517l = attributes[MENU_ITEM];
|
|
358
|
+
template_u1.setProperties(root_0p4v517j, attributes_0p4v517l, true);
|
|
359
|
+
template_u1.setProperties(root_0p4v517j, itemAttributes);
|
|
360
|
+
template_u1.setProperties(root_0p4v517j, bindings);
|
|
361
|
+
template_u1.setProperty(root_0p4v517j, 'disabled', disabled === true);
|
|
362
|
+
template_u1.setClass(root_0p4v517j, ["tooltip-menu-item", danger && 'tooltip-menu-item--danger', attributes_0p4v517l?.class]);
|
|
363
|
+
template_u1.setStyle(root_0p4v517j, ["", attributes_0p4v517l?.style]);
|
|
364
|
+
return root_0p4v517j;
|
|
365
|
+
})());
|
|
366
|
+
template_u1.setClass(root_0p4v517e, ["tooltip-menu-entry", disabled && '--disabled']);
|
|
367
|
+
return root_0p4v517e;
|
|
270
368
|
}
|
|
271
369
|
}
|
|
272
370
|
function expand(node) {
|
|
371
|
+
nest(node);
|
|
273
372
|
node.state.settled = node.state.open || instant();
|
|
274
373
|
node.state.open = true;
|
|
275
374
|
flush();
|
|
276
375
|
enabled(node)[0]?.button?.focus();
|
|
277
376
|
}
|
|
377
|
+
function inside(node) {
|
|
378
|
+
return !!node && (!!host?.contains(node) || !!layer?.contains(node));
|
|
379
|
+
}
|
|
278
380
|
function instant() {
|
|
279
381
|
return !root.panel
|
|
280
382
|
|| parseFloat(getComputedStyle(root.panel).getPropertyValue('--open-duration')) === 0
|
|
281
383
|
|| matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
282
384
|
}
|
|
385
|
+
function keydown(e) {
|
|
386
|
+
if (context && (e.key === 'ContextMenu' || (e.key === 'F10' && e.shiftKey))) {
|
|
387
|
+
e.preventDefault();
|
|
388
|
+
if (!root.panel?.contains(e.target)) {
|
|
389
|
+
at(anchor(e.target));
|
|
390
|
+
}
|
|
391
|
+
return;
|
|
392
|
+
}
|
|
393
|
+
if (!state.active) {
|
|
394
|
+
if (e.key === 'ArrowDown' && e.target === trigger) {
|
|
395
|
+
e.preventDefault();
|
|
396
|
+
open();
|
|
397
|
+
}
|
|
398
|
+
return;
|
|
399
|
+
}
|
|
400
|
+
let nodes = enabled(stack[stack.length - 1]), index = nodes.findIndex((node) => node.button === document.activeElement), n = nodes.length;
|
|
401
|
+
switch (e.key) {
|
|
402
|
+
case 'ArrowDown':
|
|
403
|
+
nodes[(index + 1) % n]?.button?.focus();
|
|
404
|
+
break;
|
|
405
|
+
case 'ArrowUp':
|
|
406
|
+
nodes[index < 1 ? n - 1 : index - 1]?.button?.focus();
|
|
407
|
+
break;
|
|
408
|
+
case 'ArrowLeft':
|
|
409
|
+
case 'Backspace':
|
|
410
|
+
pop();
|
|
411
|
+
break;
|
|
412
|
+
case 'ArrowRight':
|
|
413
|
+
if (index !== -1) {
|
|
414
|
+
drill(nodes[index]);
|
|
415
|
+
}
|
|
416
|
+
break;
|
|
417
|
+
case 'End':
|
|
418
|
+
nodes[n - 1]?.button?.focus();
|
|
419
|
+
break;
|
|
420
|
+
case 'Escape':
|
|
421
|
+
if (stack.length > 1) {
|
|
422
|
+
pop();
|
|
423
|
+
}
|
|
424
|
+
else {
|
|
425
|
+
close(true);
|
|
426
|
+
}
|
|
427
|
+
break;
|
|
428
|
+
case 'Home':
|
|
429
|
+
nodes[0]?.button?.focus();
|
|
430
|
+
break;
|
|
431
|
+
case 'Tab':
|
|
432
|
+
close(true);
|
|
433
|
+
break;
|
|
434
|
+
default:
|
|
435
|
+
return;
|
|
436
|
+
}
|
|
437
|
+
e.preventDefault();
|
|
438
|
+
}
|
|
283
439
|
function lower() {
|
|
284
440
|
let current = ++hiding;
|
|
285
441
|
if (!layer) {
|
|
@@ -291,6 +447,19 @@ function createMenu(context = false) {
|
|
|
291
447
|
}
|
|
292
448
|
});
|
|
293
449
|
}
|
|
450
|
+
function nest(node) {
|
|
451
|
+
let button = node.button, element = node.panel, parent = node.parent?.panel;
|
|
452
|
+
if (!button || !element || !parent) {
|
|
453
|
+
return;
|
|
454
|
+
}
|
|
455
|
+
node.state.height = undefined;
|
|
456
|
+
node.state.lift = 0;
|
|
457
|
+
flush();
|
|
458
|
+
let header = element.querySelector(':scope > .tooltip-menu-header'), row = button.getBoundingClientRect(), space = margin(element), bottom = viewport().height - space, top = row.top - (header?.offsetTop ?? 0), lift = Math.max(0, Math.min(top + element.offsetHeight - bottom, top - space));
|
|
459
|
+
node.state.height = bottom - top + lift;
|
|
460
|
+
node.state.lift = lift;
|
|
461
|
+
node.state.top = top - lift - parent.getBoundingClientRect().top - parent.clientTop;
|
|
462
|
+
}
|
|
294
463
|
function open(focus = true) {
|
|
295
464
|
stay();
|
|
296
465
|
if (state.active || pending) {
|
|
@@ -300,7 +469,7 @@ function createMenu(context = false) {
|
|
|
300
469
|
reset();
|
|
301
470
|
root.state.settled = !expansion || instant();
|
|
302
471
|
flush();
|
|
303
|
-
|
|
472
|
+
arrange();
|
|
304
473
|
function reveal() {
|
|
305
474
|
pending = undefined;
|
|
306
475
|
state.active = true;
|
|
@@ -316,52 +485,56 @@ function createMenu(context = false) {
|
|
|
316
485
|
reveal();
|
|
317
486
|
}
|
|
318
487
|
}
|
|
319
|
-
function contextmenu(event) {
|
|
320
|
-
if (!host || !root.panel || root.panel.contains(event.target)) {
|
|
321
|
-
return;
|
|
322
|
-
}
|
|
323
|
-
event.preventDefault();
|
|
324
|
-
if (event.clientX === 0 && event.clientY === 0) {
|
|
325
|
-
place(anchor(event.target instanceof Element ? event.target : host));
|
|
326
|
-
}
|
|
327
|
-
else {
|
|
328
|
-
place({ x: event.clientX, y: event.clientY });
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
488
|
function panel(node) {
|
|
332
489
|
let item = node.item;
|
|
333
490
|
{
|
|
334
|
-
let
|
|
335
|
-
template_u1.slot(
|
|
336
|
-
let
|
|
337
|
-
template_u1.slot(
|
|
338
|
-
let
|
|
339
|
-
template_u1.slot(
|
|
340
|
-
return
|
|
491
|
+
let root_0p4v517m = template_0p4v517n(), element_0p4v517o = root_0p4v517m.firstChild, element_0p4v517p = root_0p4v517m.firstElementChild, element_0p4v517q = element_0p4v517p.firstChild;
|
|
492
|
+
template_u1.slot(element_0p4v517o, item && (() => {
|
|
493
|
+
let root_0p4v517r = template_0p4v517s(), element_0p4v517t = root_0p4v517r.firstChild, element_0p4v517u = root_0p4v517r.firstElementChild.firstElementChild, element_0p4v517v = element_0p4v517u.nextElementSibling;
|
|
494
|
+
template_u1.slot(element_0p4v517t, item.icon && (() => {
|
|
495
|
+
let root_0p4v517w = template_0p4v517b();
|
|
496
|
+
template_u1.slot(root_0p4v517w, item.icon(), 1);
|
|
497
|
+
return root_0p4v517w;
|
|
341
498
|
})());
|
|
499
|
+
template_u1.slot(element_0p4v517u, item.label, 1);
|
|
342
500
|
template_u1.slot(element_0p4v517v, item.label, 1);
|
|
343
|
-
template_u1.slot(
|
|
344
|
-
template_u1.delegate(
|
|
345
|
-
return
|
|
501
|
+
template_u1.slot(root_0p4v517r, icon({ 'aria-hidden': 'true', class: 'tooltip-menu-chevron tooltip-menu-chevron--down icon--rotate' }, chevron), 1);
|
|
502
|
+
template_u1.delegate(root_0p4v517r, 'click', pop);
|
|
503
|
+
return root_0p4v517r;
|
|
346
504
|
})());
|
|
347
|
-
template_u1.slot(
|
|
348
|
-
template_u1.slot(
|
|
349
|
-
template_u1.
|
|
350
|
-
|
|
351
|
-
|
|
505
|
+
template_u1.slot(element_0p4v517q, node.children.map(entry));
|
|
506
|
+
template_u1.slot(element_0p4v517p, highlighted && highlight({ ...(highlighted === true ? {} : highlighted), target: '.tooltip-menu-entry' }), 1);
|
|
507
|
+
template_u1.slot(root_0p4v517m, node.children.map((child) => child.children.length > 0 && (() => {
|
|
508
|
+
let root_0p4v517x = template_0p4v517y(), element_0p4v517z = root_0p4v517x.firstChild;
|
|
509
|
+
new template_u1.EffectSlot(element_0p4v517z, () => child.state.render && panel(child));
|
|
510
|
+
return root_0p4v517x;
|
|
511
|
+
})()), 1);
|
|
512
|
+
let attributes_0p4v51710 = scrollbar({ fade: true });
|
|
513
|
+
template_u1.setProperties(element_0p4v517p, attributes_0p4v51710, true);
|
|
514
|
+
template_u1.setClass(element_0p4v517p, ["tooltip-menu-scroller", attributes_0p4v51710?.class]);
|
|
515
|
+
template_u1.setStyle(element_0p4v517p, ["", attributes_0p4v51710?.style]);
|
|
516
|
+
template_u1.setProperties(root_0p4v517m, node === root && attributes[MENU_PANEL]);
|
|
517
|
+
template_u1.setProperty(root_0p4v517m, 'inert', () => node === root ? !state.active : !node.state.open);
|
|
518
|
+
template_u1.delegate(root_0p4v517m, 'click', (event) => {
|
|
352
519
|
if (event.target === node.panel && node !== stack[stack.length - 1]) {
|
|
353
520
|
popTo(node);
|
|
354
521
|
}
|
|
355
522
|
});
|
|
356
|
-
template_u1.onconnect(
|
|
523
|
+
template_u1.onconnect(root_0p4v517m, (element) => {
|
|
357
524
|
node.panel = element;
|
|
358
525
|
});
|
|
359
|
-
template_u1.onfirstpaint(
|
|
526
|
+
template_u1.onfirstpaint(root_0p4v517m, () => {
|
|
360
527
|
if (node !== root && stack.includes(node)) {
|
|
361
528
|
expand(node);
|
|
362
529
|
}
|
|
363
530
|
});
|
|
364
|
-
template_u1.delegate(
|
|
531
|
+
template_u1.delegate(root_0p4v517m, 'mousedown', (event) => {
|
|
532
|
+
let target = event.target;
|
|
533
|
+
if (target === node.panel || target.closest('.tooltip-menu-header')) {
|
|
534
|
+
event.preventDefault();
|
|
535
|
+
}
|
|
536
|
+
});
|
|
537
|
+
template_u1.delegate(root_0p4v517m, 'transitionend', (e) => {
|
|
365
538
|
if (e.target !== node.panel) {
|
|
366
539
|
return;
|
|
367
540
|
}
|
|
@@ -377,33 +550,26 @@ function createMenu(context = false) {
|
|
|
377
550
|
node.state.settled = true;
|
|
378
551
|
}
|
|
379
552
|
});
|
|
380
|
-
template_u1.setClass(
|
|
553
|
+
template_u1.setClass(root_0p4v517m, ["tooltip-menu-panel", node === root && expansion && 'tooltip-menu-panel--expand', [
|
|
381
554
|
() => (node === root ? state.active : node.state.open) && '--active',
|
|
382
555
|
() => covered(node) && 'tooltip-menu-panel--covered',
|
|
383
556
|
() => node.state.settled && 'tooltip-menu-panel--settled'
|
|
384
557
|
]]);
|
|
385
|
-
template_u1.setStyle(
|
|
386
|
-
|
|
558
|
+
template_u1.setStyle(root_0p4v517m, ["", node === root
|
|
559
|
+
? [attributes[MENU_PANEL]?.style, () => ({
|
|
560
|
+
'--expand-direction': expansion ? placement.direction : undefined,
|
|
561
|
+
'--max-height': px(placement.height),
|
|
562
|
+
left: px(placement.x),
|
|
563
|
+
top: px(placement.y)
|
|
564
|
+
})].flat()
|
|
565
|
+
: () => ({
|
|
566
|
+
'--lift': `${node.state.lift}px`,
|
|
567
|
+
'--max-height': px(node.state.height),
|
|
568
|
+
top: `${node.state.top}px`
|
|
569
|
+
})]);
|
|
570
|
+
return root_0p4v517m;
|
|
387
571
|
}
|
|
388
572
|
}
|
|
389
|
-
function place({ x, y }) {
|
|
390
|
-
if (!host || !root.panel) {
|
|
391
|
-
return;
|
|
392
|
-
}
|
|
393
|
-
let focused = document.activeElement;
|
|
394
|
-
if (!root.panel.contains(focused)) {
|
|
395
|
-
trigger = focused instanceof HTMLElement && focused !== document.body ? focused : host;
|
|
396
|
-
}
|
|
397
|
-
raise();
|
|
398
|
-
reset();
|
|
399
|
-
placement.shift = 0;
|
|
400
|
-
flush();
|
|
401
|
-
let bounds = host.getBoundingClientRect(), scale = bounds.width / host.offsetWidth || 1, width = root.panel.offsetWidth * scale, height = root.panel.offsetHeight * scale, view = viewport();
|
|
402
|
-
x = flip(x, width, view.width, VIEWPORT_MARGIN);
|
|
403
|
-
y = flip(y, height, view.height, VIEWPORT_MARGIN);
|
|
404
|
-
placement.style = `left: ${(x - bounds.left) / scale - host.clientLeft + host.scrollLeft}px; top: ${(y - bounds.top) / scale - host.clientTop + host.scrollTop}px;`;
|
|
405
|
-
open();
|
|
406
|
-
}
|
|
407
573
|
function pop() {
|
|
408
574
|
if (stack.length < 2) {
|
|
409
575
|
return;
|
|
@@ -444,81 +610,9 @@ function createMenu(context = false) {
|
|
|
444
610
|
item.onselect?.(item, event);
|
|
445
611
|
onselect?.(item);
|
|
446
612
|
}
|
|
447
|
-
function
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
return;
|
|
451
|
-
}
|
|
452
|
-
flush();
|
|
453
|
-
let current = placement.shift, rect = element.getBoundingClientRect(), left = rect.left - current, right = rect.right - current, width = viewport().width, x = 0;
|
|
454
|
-
if (right > width - VIEWPORT_MARGIN) {
|
|
455
|
-
x = width - VIEWPORT_MARGIN - right;
|
|
456
|
-
}
|
|
457
|
-
if (left + x < VIEWPORT_MARGIN) {
|
|
458
|
-
x = VIEWPORT_MARGIN - left;
|
|
459
|
-
}
|
|
460
|
-
placement.shift = x;
|
|
461
|
-
}
|
|
462
|
-
function connect(element) {
|
|
463
|
-
host = element;
|
|
464
|
-
trigger = element;
|
|
465
|
-
}
|
|
466
|
-
function inside(node) {
|
|
467
|
-
return !!node && (!!host?.contains(node) || !!layer?.contains(node));
|
|
468
|
-
}
|
|
469
|
-
function keydown(e) {
|
|
470
|
-
if (context && (e.key === 'ContextMenu' || (e.key === 'F10' && e.shiftKey))) {
|
|
471
|
-
e.preventDefault();
|
|
472
|
-
if (!root.panel?.contains(e.target)) {
|
|
473
|
-
place(anchor(e.target));
|
|
474
|
-
}
|
|
475
|
-
return;
|
|
476
|
-
}
|
|
477
|
-
if (!state.active) {
|
|
478
|
-
if (e.key === 'ArrowDown' && e.target === trigger) {
|
|
479
|
-
e.preventDefault();
|
|
480
|
-
open();
|
|
481
|
-
}
|
|
482
|
-
return;
|
|
483
|
-
}
|
|
484
|
-
let nodes = enabled(stack[stack.length - 1]), index = nodes.findIndex((node) => node.button === document.activeElement), n = nodes.length;
|
|
485
|
-
switch (e.key) {
|
|
486
|
-
case 'ArrowDown':
|
|
487
|
-
nodes[(index + 1) % n]?.button?.focus();
|
|
488
|
-
break;
|
|
489
|
-
case 'ArrowUp':
|
|
490
|
-
nodes[index < 1 ? n - 1 : index - 1]?.button?.focus();
|
|
491
|
-
break;
|
|
492
|
-
case 'ArrowLeft':
|
|
493
|
-
case 'Backspace':
|
|
494
|
-
pop();
|
|
495
|
-
break;
|
|
496
|
-
case 'ArrowRight':
|
|
497
|
-
if (index !== -1) {
|
|
498
|
-
drill(nodes[index]);
|
|
499
|
-
}
|
|
500
|
-
break;
|
|
501
|
-
case 'End':
|
|
502
|
-
nodes[n - 1]?.button?.focus();
|
|
503
|
-
break;
|
|
504
|
-
case 'Escape':
|
|
505
|
-
if (stack.length > 1) {
|
|
506
|
-
pop();
|
|
507
|
-
}
|
|
508
|
-
else {
|
|
509
|
-
close(true);
|
|
510
|
-
}
|
|
511
|
-
break;
|
|
512
|
-
case 'Home':
|
|
513
|
-
nodes[0]?.button?.focus();
|
|
514
|
-
break;
|
|
515
|
-
case 'Tab':
|
|
516
|
-
close(true);
|
|
517
|
-
break;
|
|
518
|
-
default:
|
|
519
|
-
return;
|
|
520
|
-
}
|
|
521
|
-
e.preventDefault();
|
|
613
|
+
function stay() {
|
|
614
|
+
clearTimeout(leaving);
|
|
615
|
+
leaving = undefined;
|
|
522
616
|
}
|
|
523
617
|
let hover = !context && openOn === 'hover', popup = overlay.popup({
|
|
524
618
|
canDismiss: () => !!pending,
|
|
@@ -545,28 +639,28 @@ function createMenu(context = false) {
|
|
|
545
639
|
}) : undefined
|
|
546
640
|
};
|
|
547
641
|
{
|
|
548
|
-
let
|
|
549
|
-
|
|
550
|
-
let
|
|
551
|
-
template_u1.slot(root_0p4v51712, content, 1);
|
|
552
|
-
let attributes_0p4v51714 = attributes;
|
|
553
|
-
template_u1.setProperties(root_0p4v51712, attributes_0p4v51714, true);
|
|
554
|
-
template_u1.setProperties(root_0p4v51712, spanning);
|
|
555
|
-
template_u1.delegate(root_0p4v51712, 'contextmenu', contextmenu);
|
|
556
|
-
template_u1.onconnect(root_0p4v51712, connect);
|
|
557
|
-
template_u1.setClass(root_0p4v51712, ["tooltip-menu-trigger", attributes_0p4v51714?.class]);
|
|
558
|
-
template_u1.setStyle(root_0p4v51712, ["", "anchor-name: " + (name), attributes_0p4v51714?.style]);
|
|
559
|
-
return root_0p4v51712;
|
|
560
|
-
})() : (() => {
|
|
561
|
-
let root_0p4v51715 = template_0p4v51716();
|
|
642
|
+
let root_0p4v51711 = template_0p4v51712(), element_0p4v51713 = root_0p4v51711.firstChild, element_0p4v51714 = element_0p4v51713.nextSibling;
|
|
643
|
+
element_0p4v51713.parentNode.insertBefore(context ? (() => {
|
|
644
|
+
let root_0p4v51715 = template_0p4v517f();
|
|
562
645
|
template_u1.slot(root_0p4v51715, content, 1);
|
|
563
|
-
let
|
|
564
|
-
template_u1.setProperties(root_0p4v51715,
|
|
565
|
-
let attributes_0p4v51718 = attributes[MENU_TRIGGER];
|
|
566
|
-
template_u1.setProperties(root_0p4v51715, attributes_0p4v51718, true);
|
|
646
|
+
let attributes_0p4v51716 = attributes;
|
|
647
|
+
template_u1.setProperties(root_0p4v51715, attributes_0p4v51716, true);
|
|
567
648
|
template_u1.setProperties(root_0p4v51715, spanning);
|
|
568
|
-
template_u1.
|
|
569
|
-
template_u1.
|
|
649
|
+
template_u1.delegate(root_0p4v51715, 'contextmenu', contextmenu);
|
|
650
|
+
template_u1.onconnect(root_0p4v51715, connect);
|
|
651
|
+
template_u1.setClass(root_0p4v51715, ["tooltip-menu-trigger", attributes_0p4v51716?.class]);
|
|
652
|
+
template_u1.setStyle(root_0p4v51715, ["", "anchor-name: " + (name), attributes_0p4v51716?.style]);
|
|
653
|
+
return root_0p4v51715;
|
|
654
|
+
})() : (() => {
|
|
655
|
+
let root_0p4v51717 = template_0p4v51718();
|
|
656
|
+
template_u1.slot(root_0p4v51717, content, 1);
|
|
657
|
+
let attributes_0p4v51719 = attributes;
|
|
658
|
+
template_u1.setProperties(root_0p4v51717, attributes_0p4v51719, true);
|
|
659
|
+
let attributes_0p4v5171a = attributes[MENU_TRIGGER];
|
|
660
|
+
template_u1.setProperties(root_0p4v51717, attributes_0p4v5171a, true);
|
|
661
|
+
template_u1.setProperties(root_0p4v51717, spanning);
|
|
662
|
+
template_u1.setProperty(root_0p4v51717, 'aria-expanded', () => String(state.active));
|
|
663
|
+
template_u1.delegate(root_0p4v51717, 'click', () => {
|
|
570
664
|
if (state.active || pending) {
|
|
571
665
|
close(false);
|
|
572
666
|
}
|
|
@@ -574,26 +668,50 @@ function createMenu(context = false) {
|
|
|
574
668
|
open();
|
|
575
669
|
}
|
|
576
670
|
});
|
|
577
|
-
template_u1.onconnect(
|
|
578
|
-
template_u1.setClass(
|
|
579
|
-
template_u1.setStyle(
|
|
580
|
-
return
|
|
581
|
-
})(),
|
|
582
|
-
template_u1.slot(
|
|
583
|
-
template_u1.onconnect(
|
|
671
|
+
template_u1.onconnect(root_0p4v51717, connect);
|
|
672
|
+
template_u1.setClass(root_0p4v51717, ["tooltip-menu-trigger", attributes_0p4v51719?.class, attributes_0p4v5171a?.class]);
|
|
673
|
+
template_u1.setStyle(root_0p4v51717, ["", "anchor-name: " + (name), attributes_0p4v51719?.style, attributes_0p4v5171a?.style]);
|
|
674
|
+
return root_0p4v51717;
|
|
675
|
+
})(), element_0p4v51713);
|
|
676
|
+
template_u1.slot(element_0p4v51714, panel(root), 1);
|
|
677
|
+
template_u1.onconnect(element_0p4v51714, (element) => {
|
|
584
678
|
layer = element;
|
|
585
679
|
});
|
|
586
|
-
template_u1.onwindow(
|
|
587
|
-
let
|
|
588
|
-
template_u1.setProperties(
|
|
589
|
-
template_u1.setProperties(
|
|
590
|
-
template_u1.setClass(
|
|
591
|
-
template_u1.setStyle(
|
|
592
|
-
return
|
|
680
|
+
template_u1.onwindow(element_0p4v51714, 'resize', () => state.active && arrange());
|
|
681
|
+
let attributes_0p4v5171b = popup;
|
|
682
|
+
template_u1.setProperties(element_0p4v51714, attributes_0p4v5171b, true);
|
|
683
|
+
template_u1.setProperties(element_0p4v51714, spanning);
|
|
684
|
+
template_u1.setClass(element_0p4v51714, ["tooltip tooltip--menu tooltip-menu-layer", context && 'tooltip--context', !animate && 'tooltip--instant', attributes_0p4v5171b?.class]);
|
|
685
|
+
template_u1.setStyle(element_0p4v51714, ["", "position-anchor: " + (name), attributes_0p4v5171b?.style]);
|
|
686
|
+
return root_0p4v51711;
|
|
593
687
|
}
|
|
594
688
|
}, { item: MENU_ITEM, panel: MENU_PANEL, trigger: MENU_TRIGGER });
|
|
595
689
|
}
|
|
596
|
-
|
|
690
|
+
function enabled(node) {
|
|
691
|
+
let nodes = [];
|
|
692
|
+
for (let i = 0, n = node.children.length; i < n; i++) {
|
|
693
|
+
let child = node.children[i];
|
|
694
|
+
if (child.button && !child.button.hidden && !child.item?.disabled) {
|
|
695
|
+
nodes.push(child);
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
return nodes;
|
|
699
|
+
}
|
|
700
|
+
function tree(items, parent) {
|
|
701
|
+
let nodes = [];
|
|
702
|
+
for (let i = 0, n = items.length; i < n; i++) {
|
|
703
|
+
let node = {
|
|
704
|
+
children: [],
|
|
705
|
+
item: items[i],
|
|
706
|
+
parent,
|
|
707
|
+
state: new ReactiveObject_0p4v5173(undefined)
|
|
708
|
+
};
|
|
709
|
+
node.children = tree(items[i].items ?? [], node);
|
|
710
|
+
nodes.push(node);
|
|
711
|
+
}
|
|
712
|
+
return nodes;
|
|
713
|
+
}
|
|
597
714
|
const context = createMenu(true);
|
|
715
|
+
const menu = createMenu();
|
|
598
716
|
export default menu;
|
|
599
717
|
export { context };
|