@esportsplus/ui 0.63.0 → 0.64.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 -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/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
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
@layer components{.search-button:not(.button--tactile){--box-shadow-active:var(--surface-shadow-active);--box-shadow-default:var(--surface-shadow-default);--box-shadow-hover:var(--surface-shadow-hover);--box-shadow-pressed:var(--surface-shadow-pressed)}@keyframes text-gradient{to{background-position:var(--background-size) 0}}@keyframes text-line-shadow{0%{background-position:0 0}to{background-position:100% -100%}}@keyframes text-shiny{0%,90%,to{background-position:calc(-100% - var(--shine-width)) 0}30%,60%{background-position:calc(100% + var(--shine-width)) 0}}.search-button,.search-input{--color-active:var(--color-text-300);--color-default:var(--color-text-400);--color-hover:var(--color-text-300);--color-pressed:var(--color-text-500)}:where([data-theme=dark]) .search-button,:where([data-theme=dark]) .search-input{--color-active:var(--color-text-500);--color-default:var(--color-text-400);--color-hover:var(--color-text-500);--color-pressed:var(--color-text-300)}:where([data-theme=light]) .search-button,:where([data-theme=light]) .search-input{--color-active:var(--color-text-500);--color-default:var(--color-text-400);--color-hover:var(--color-text-300);--color-pressed:var(--color-text-500)}.search-input{--surface-background-active:light-dark(oklch(from var(--surface-background-default) calc(l + .02) c h),oklch(from var(--surface-background-default) calc(l + .03) c h));--surface-background-default:light-dark(oklch(from var(--color-surface) clamp(0, l + max(var(--surface-level), 0) * .01 + min(var(--surface-level), 0) * .016, 1) calc(c * (1 - clamp(0, l + max(var(--surface-level), 0) * .01 + min(var(--surface-level), 0) * .016, 1)) / max(1 - l, .01)) h),oklch(from var(--color-surface) clamp(0, l + var(--surface-level) * .016, l + .096) calc(c * clamp(0, l + var(--surface-level) * .016, l + .096) / max(l, .01)) h));--surface-background-hover:light-dark(oklch(from var(--surface-background-default) calc(l + .01) c h),oklch(from var(--surface-background-default) calc(l + .02) c h));--surface-background-pressed:light-dark(oklch(from var(--surface-background-default) calc(l - .02) c h),oklch(from var(--surface-background-default) calc(l - .03) c h));--surface-border-active:light-dark(oklch(from var(--surface-background-active) max(0, l - .046) c h),oklch(from var(--surface-background-active) min(1, l + .036) c h));--surface-border-default:light-dark(oklch(from var(--surface-background-default) max(0, l - .046) c h),oklch(from var(--surface-background-default) min(1, l + .036) c h));--surface-border-hover:light-dark(oklch(from var(--surface-background-hover) max(0, l - .046) c h),oklch(from var(--surface-background-hover) min(1, l + .036) c h));--surface-border-pressed:light-dark(oklch(from var(--surface-background-pressed) max(0, l - .046) c h),oklch(from var(--surface-background-pressed) min(1, l + .036) c h));--surface-primary-active:light-dark(oklch(from var(--surface-primary-default) calc(l + .02) c h),oklch(from var(--surface-primary-default) calc(l + .03) c h));--surface-primary-default:light-dark(oklch(from var(--color-surface) clamp(0, clamp(0, l + max(var(--surface-level), 0) * .01 + min(var(--surface-level), 0) * .016, 1) + (max(calc(var(--surface-level) + -3.2), 0) * .01 + min(calc(var(--surface-level) + -3.2), 0) * .016) - (max(var(--surface-level), 0) * .01 + min(var(--surface-level), 0) * .016), 1) calc(c * (1 - clamp(0, clamp(0, l + max(var(--surface-level), 0) * .01 + min(var(--surface-level), 0) * .016, 1) + (max(calc(var(--surface-level) + -3.2), 0) * .01 + min(calc(var(--surface-level) + -3.2), 0) * .016) - (max(var(--surface-level), 0) * .01 + min(var(--surface-level), 0) * .016), 1)) / max(1 - l, .01)) h),oklch(from var(--color-surface) clamp(0, clamp(0, l + var(--surface-level) * .016, l + .096) + (calc(var(--surface-level) + 1.6) * .016) - (var(--surface-level) * .016), 1) calc(c * clamp(0, clamp(0, l + var(--surface-level) * .016, l + .096) + (calc(var(--surface-level) + 1.6) * .016) - (var(--surface-level) * .016), 1) / max(l, .01)) h));--surface-primary-hover:light-dark(oklch(from var(--surface-primary-default) calc(l + .01) c h),oklch(from var(--surface-primary-default) calc(l + .02) c h));--surface-primary-pressed:light-dark(oklch(from var(--surface-primary-default) calc(l - .02) c h),oklch(from var(--surface-primary-default) calc(l - .03) c h));--surface-shadow-active:0 25px 50px -12px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .05),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .2)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-default:0 20px 25px -5px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 8px 10px -6px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08));--surface-shadow-hover:0 25px 50px -12px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .05),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .2)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-pressed:0 8.5px 12.75px -2.5px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02),transparent), 0 3.5px 5.5px -3.5px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02),transparent), 0 4.75px 7.125px -1.25px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 2.25px 4.25px -2.25px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08))}@container style(--surface-level:-3){.search-input{--surface-level:-2;--surface-shadow-active:0 1px 2px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .01),transparent), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),transparent), 0 1px 1.75px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04)), 0 0px 0px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-default:0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-hover:0 1px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .01),transparent), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),transparent), 0 1px .5px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04)), 0 0px 0px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-pressed:0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0))}}@container style(--surface-level:-2){.search-input{--surface-level:-1;--surface-shadow-active:0 1px 2px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .01),transparent), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),transparent), 0 1px 1.75px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04)), 0 0px 0px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-default:0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-hover:0 1px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .01),transparent), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),transparent), 0 1px .5px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04)), 0 0px 0px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-pressed:0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0))}}@container style(--surface-level:-1){.search-input{--surface-level:0;--surface-shadow-active:0 1px 2px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .01),transparent), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),transparent), 0 1px 1.75px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04)), 0 0px 0px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-default:0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-hover:0 1px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .01),transparent), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),transparent), 0 1px .5px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04)), 0 0px 0px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-pressed:0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0))}}@container style(--surface-level:0){.search-input{--surface-level:1;--surface-shadow-active:0 1px 3px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02),transparent), 0 1px 2px -1px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02),transparent), 0 1px 2.875px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .075)), 0 .875px 1.75px -.875px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .07));--surface-shadow-default:0 1px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .01),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-hover:0 1px 2px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .01),transparent), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),transparent), 0 1px 2.25px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .05)), 0 .25px .5px -.25px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02));--surface-shadow-pressed:0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0))}}@container style(--surface-level:1){.search-input{--surface-level:2;--surface-shadow-active:0 4px 6px -1px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02),transparent), 0 2px 4px -2px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02),transparent), 0 3.625px 5.625px -.875px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 1.875px 3.75px -1.875px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08));--surface-shadow-default:0 1px 2px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .01),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-hover:0 1px 3px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02),transparent), 0 1px 2px -1px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02),transparent), 0 1.75px 3.75px -.25px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 1.25px 2.5px -1.25px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08));--surface-shadow-pressed:0 .75px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .0075),transparent), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),transparent), 0 .125px 0px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .005)), 0 0px 0px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0))}}@container style(--surface-level:2){.search-input{--surface-level:3;--surface-shadow-active:0 10px 15px -3px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02),transparent), 0 4px 6px -4px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02),transparent), 0 9.25px 13.875px -2.75px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 3.75px 5.75px -3.75px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08));--surface-shadow-default:0 1px 3px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 1px 2px -1px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08));--surface-shadow-hover:0 4px 6px -1px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02),transparent), 0 2px 4px -2px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02),transparent), 0 5.5px 8.25px -1.5px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 2.5px 4.5px -2.5px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08));--surface-shadow-pressed:0 1px 1.5px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .01),transparent), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),transparent), 0 1px .25px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .04)), 0 0px 0px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0))}}@container style(--surface-level:3){.search-input{--surface-level:4;--surface-shadow-active:0 20px 25px -5px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02),transparent), 0 8px 10px -6px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02),transparent), 0 18.75px 23.75px -4.75px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 7.5px 9.5px -5.75px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08));--surface-shadow-default:0 4px 6px -1px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 2px 4px -2px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08));--surface-shadow-hover:0 10px 15px -3px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02),transparent), 0 4px 6px -4px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02),transparent), 0 12.5px 17.5px -3.5px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 5px 7px -4.5px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08));--surface-shadow-pressed:0 1px 2.75px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .0175),transparent), 0 .75px 1.5px -.75px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .015),transparent), 0 1px 2.125px 0px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .045)), 0 .125px .25px -.125px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .01))}}@container style(--surface-level:4){.search-input{--surface-level:5;--surface-shadow-active:0 25px 50px -12px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .05),transparent), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),transparent), 0 24.375px 46.875px -11.125px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .185)), 0 1px 1.25px -.75px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .01));--surface-shadow-default:0 10px 15px -3px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 4px 6px -4px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08));--surface-shadow-hover:0 20px 25px -5px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02),transparent), 0 8px 10px -6px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02),transparent), 0 21.25px 31.25px -6.75px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .11)), 0 6px 7.5px -4.5px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .06));--surface-shadow-pressed:0 3.25px 5.25px -.75px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02),transparent), 0 1.75px 3.5px -1.75px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02),transparent), 0 1.375px 3.375px -.125px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 1.125px 2.25px -1.125px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08))}}@container style(--surface-level:5){.search-input{--surface-level:6;--surface-shadow-active:0 25px 50px -12px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .05),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .2)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-default:0 20px 25px -5px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 8px 10px -6px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08));--surface-shadow-hover:0 25px 50px -12px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .05),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .2)), 0 0px 0px 0px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0),oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / 0));--surface-shadow-pressed:0 8.5px 12.75px -2.5px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02),transparent), 0 3.5px 5.5px -3.5px light-dark(oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .02),transparent), 0 4.75px 7.125px -1.25px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08)), 0 2.25px 4.25px -2.25px light-dark(transparent,oklch(from var(--surface-background-default) calc(l * .24) calc(c * .24) h / .08))}}.search-button{--font-size:var(--font-size-300);--line-height:24px;--padding-horizontal:var(--size-300);--padding-vertical:var(--size-100)}.search-button:not(.button--black,.button--primary,.button--surface,.button--surface-primary,.button--white){--background-default:var(--surface-background-default)}.search-button.button--tactile{--box-shadow-default:var(--surface-shadow-default);--box-shadow-hover:var(--surface-shadow-hover)}.search-input{--border-width-active:var(--border-width-500)}.search-input:not(.input--compact){--font-size:var(--font-size-300);--padding-vertical:var(--size-100);--size:24px}.search-input:not(.input--surface,.input--surface-primary){--background-default:var(--surface-background-default)}.search-keys{--gap-horizontal:calc(var(--size-100) / 2);--gap-vertical:0px}.search:has(>.input--compact)>.search-keys>.button{--padding-horizontal:calc(var(--size-100) * .75);--padding-vertical:calc(var(--size-100) / 2)}.search:has(>.button--tactile){--translate-pressed:0 1px}@media (prefers-reduced-motion:reduce){.search:has(>.button--tactile){--translate-pressed:none}}.search>.input::-webkit-search-cancel-button{appearance:none}.search-button{text-overflow:ellipsis;flex:auto;justify-content:flex-start;width:100%;min-width:0;overflow:hidden}.search-keys{align-items:center;gap:var(--gap-vertical) var(--gap-horizontal);pointer-events:none;display:flex}.search:has(>.search-button.button--tactile:is(:active,.--active,.--pressed)){translate:var(--translate-pressed)}.search>.search-button.button--tactile:is(:active,.--active,.--pressed){translate:none}}
|
|
2
|
+
/*$vite$:1*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as template_u1 from '@esportsplus/template';
|
|
2
|
-
import { component } from '@esportsplus/template';
|
|
3
1
|
import * as reactivity_u0 from '@esportsplus/reactivity';
|
|
4
2
|
import { flush, onCleanup } from '@esportsplus/reactivity';
|
|
3
|
+
import * as template_u1 from '@esportsplus/template';
|
|
4
|
+
import { component } from '@esportsplus/template';
|
|
5
5
|
import faces from '../button/faces.js';
|
|
6
6
|
import form from '../form/index.js';
|
|
7
7
|
import { morph, shape } from '../tooltip/utilities.js';
|
|
@@ -62,7 +62,7 @@ class ReactiveObject_1aocpcv1 extends reactivity_u0.ReactiveObject {
|
|
|
62
62
|
const EXPAND_OPTION = Symbol.for('@esportsplus/ui/select.expand.option');
|
|
63
63
|
const EXPAND_TRIGGER = Symbol.for('@esportsplus/ui/select.expand.trigger');
|
|
64
64
|
function template({ label, name, openOn = 'click', options, selected: initial, state = new ReactiveObject_1aocpcv0('', initial ?? options[0]?.value), ...attributes }) {
|
|
65
|
-
let elements = [], menu, opening, status = new ReactiveObject_1aocpcv1(null), trigger;
|
|
65
|
+
let elements = [], hover = openOn === 'hover', menu, opening, status = new ReactiveObject_1aocpcv1(null), trigger;
|
|
66
66
|
function close(focus = false) {
|
|
67
67
|
opening?.();
|
|
68
68
|
opening = undefined;
|
|
@@ -120,7 +120,6 @@ function template({ label, name, openOn = 'click', options, selected: initial, s
|
|
|
120
120
|
onCleanup(() => {
|
|
121
121
|
opening?.();
|
|
122
122
|
});
|
|
123
|
-
let hover = openOn === 'hover';
|
|
124
123
|
{
|
|
125
124
|
let root_1aocpcv2 = template_1aocpcv3(), element_1aocpcv4 = root_1aocpcv2.firstElementChild, element_1aocpcv5 = element_1aocpcv4.nextElementSibling;
|
|
126
125
|
template_u1.slot(element_1aocpcv4, faces(() => options[selected()]?.value ?? '', options.map((option) => ({
|
|
@@ -155,7 +154,7 @@ function template({ label, name, openOn = 'click', options, selected: initial, s
|
|
|
155
154
|
template_u1.onconnect(element_1aocpcv5, (element) => {
|
|
156
155
|
menu = element;
|
|
157
156
|
});
|
|
158
|
-
template_u1.setClass(element_1aocpcv5, ["select-expand-menu tooltip-content tooltip-content--
|
|
157
|
+
template_u1.setClass(element_1aocpcv5, ["select-expand-menu tooltip-content tooltip-content--morph"]);
|
|
159
158
|
let attributes_1aocpcvb = attributes[EXPAND_TRIGGER];
|
|
160
159
|
template_u1.setProperties(element_1aocpcv4, attributes_1aocpcvb, true);
|
|
161
160
|
template_u1.setProperty(element_1aocpcv4, 'aria-expanded', () => status.active ? 'true' : 'false');
|
|
@@ -13,15 +13,14 @@ type A = Attributes & {
|
|
|
13
13
|
ontransitionrun?: never;
|
|
14
14
|
[SELECT_ARROW]?: Attributes;
|
|
15
15
|
[SELECT_OPTION]?: Attributes;
|
|
16
|
-
[
|
|
17
|
-
direction?: string;
|
|
18
|
-
};
|
|
16
|
+
[SELECT_PANEL]?: Attributes;
|
|
19
17
|
[SELECT_TRIGGER]?: Attributes;
|
|
20
18
|
label?: string;
|
|
21
19
|
name?: string;
|
|
22
20
|
options: Option[] | Record<number | string, Renderable<unknown> | {
|
|
23
21
|
content: Renderable<unknown>;
|
|
24
|
-
|
|
22
|
+
icon?: string;
|
|
23
|
+
selected?: Renderable<unknown>;
|
|
25
24
|
}>;
|
|
26
25
|
} & ({
|
|
27
26
|
selected?: number | string;
|
|
@@ -33,6 +32,7 @@ type A = Attributes & {
|
|
|
33
32
|
type Option = {
|
|
34
33
|
content?: Renderable<unknown>;
|
|
35
34
|
detail?: string;
|
|
35
|
+
icon?: string;
|
|
36
36
|
label: Renderable<unknown>;
|
|
37
37
|
selected?: Renderable<unknown>;
|
|
38
38
|
text?: string;
|
|
@@ -46,17 +46,17 @@ type State = {
|
|
|
46
46
|
};
|
|
47
47
|
declare const SELECT_ARROW: unique symbol;
|
|
48
48
|
declare const SELECT_OPTION: unique symbol;
|
|
49
|
-
declare const
|
|
49
|
+
declare const SELECT_PANEL: unique symbol;
|
|
50
50
|
declare const SELECT_TRIGGER: unique symbol;
|
|
51
51
|
declare const plain: template_u1.Factory<A, (state: State) => Renderable<unknown>, Renderable<any>, {
|
|
52
52
|
readonly arrow: typeof SELECT_ARROW;
|
|
53
53
|
readonly option: typeof SELECT_OPTION;
|
|
54
|
-
readonly
|
|
54
|
+
readonly panel: typeof SELECT_PANEL;
|
|
55
55
|
readonly trigger: typeof SELECT_TRIGGER;
|
|
56
56
|
}> & {
|
|
57
57
|
readonly arrow: typeof SELECT_ARROW;
|
|
58
58
|
readonly option: typeof SELECT_OPTION;
|
|
59
|
-
readonly
|
|
59
|
+
readonly panel: typeof SELECT_PANEL;
|
|
60
60
|
readonly trigger: typeof SELECT_TRIGGER;
|
|
61
61
|
};
|
|
62
62
|
declare const select: typeof plain & {
|
|
@@ -1,22 +1,24 @@
|
|
|
1
|
-
import * as template_u1 from '@esportsplus/template';
|
|
2
|
-
import { component } from '@esportsplus/template';
|
|
3
1
|
import * as reactivity_u0 from '@esportsplus/reactivity';
|
|
4
2
|
import { effect, onCleanup, signal, write } from '@esportsplus/reactivity';
|
|
5
|
-
import
|
|
3
|
+
import * as template_u1 from '@esportsplus/template';
|
|
4
|
+
import { component } from '@esportsplus/template';
|
|
5
|
+
import check from '@esportsplus/ui/svg/check.svg';
|
|
6
|
+
import chevron from '@esportsplus/ui/svg/chevron.svg';
|
|
7
|
+
import chevrons from '@esportsplus/ui/svg/chevrons-up-down.svg';
|
|
6
8
|
import form from '../form/index.js';
|
|
9
|
+
import highlight from '../highlight/index.js';
|
|
7
10
|
import icon from '../icon/index.js';
|
|
8
11
|
import overlay from '../overlay/index.js';
|
|
12
|
+
import scrollbar from '../../modifiers/scrollbar/index.js';
|
|
13
|
+
import { clamp } from '../../shared/clamp.js';
|
|
9
14
|
import expand from './expand.js';
|
|
10
15
|
import place, { ROWS } from './placement.js';
|
|
11
|
-
import check from '@esportsplus/ui/svg/check.svg';
|
|
12
|
-
import chevronDown from '@esportsplus/ui/svg/chevron-down.svg';
|
|
13
|
-
import chevronUp from '@esportsplus/ui/svg/chevron-up.svg';
|
|
14
|
-
import chevrons from '@esportsplus/ui/svg/chevrons-up-down.svg';
|
|
15
16
|
import './scss/index.scss';
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
17
|
+
const template_167mg1f2 = template_u1.template(`<span aria-hidden='true' class='icon select-menu-icon'>`, true);
|
|
18
|
+
const template_167mg1f4 = template_u1.template(`<div><span class='select-menu-label'></span><button aria-haspopup='listbox' role='combobox' type='button'><!--$--><span></span></button><input type='hidden' /><div popover='manual'><div><div><!--$--><div role='listbox'></div></div><div aria-hidden='true'></div><div aria-hidden='true'>`, true);
|
|
19
|
+
const template_167mg1fi = template_u1.template(`<div role='option'>`, true);
|
|
20
|
+
const template_167mg1fk = template_u1.template(`<!--$--><!--$--><span></span><!--$-->`);
|
|
21
|
+
const template_167mg1fq = template_u1.template(`<span class='select-menu-option-detail'>`, true);
|
|
20
22
|
class ReactiveObject_167mg1f0 extends reactivity_u0.ReactiveObject {
|
|
21
23
|
#active;
|
|
22
24
|
#error;
|
|
@@ -97,7 +99,7 @@ class ReactiveObject_167mg1f1 extends reactivity_u0.ReactiveObject {
|
|
|
97
99
|
const SCROLL_SPEED = 280;
|
|
98
100
|
const SELECT_ARROW = Symbol.for('@esportsplus/ui/select.arrow');
|
|
99
101
|
const SELECT_OPTION = Symbol.for('@esportsplus/ui/select.option');
|
|
100
|
-
const
|
|
102
|
+
const SELECT_PANEL = Symbol.for('@esportsplus/ui/select.panel');
|
|
101
103
|
const SELECT_TRIGGER = Symbol.for('@esportsplus/ui/select.trigger');
|
|
102
104
|
const TYPEAHEAD_RESET = 500;
|
|
103
105
|
let uid = 0;
|
|
@@ -108,10 +110,10 @@ function edges(menu, scroller) {
|
|
|
108
110
|
function template({ label, name, options: choices, selected: initial, state = new ReactiveObject_167mg1f0(false, '', false, initial ?? (Array.isArray(choices) ? choices[0]?.value : Object.keys(choices)[0])), ...attributes }, content) {
|
|
109
111
|
let defaults = this?.attributes, ariaLabel = attributes['aria-label'] ?? defaults?.['aria-label'], options = Array.isArray(choices) ? choices : Object.entries(choices).map(([value, choice]) => {
|
|
110
112
|
if (choice !== null && typeof choice === 'object' && 'content' in choice) {
|
|
111
|
-
return { value, label: choice.content, selected: choice.selected, text: typeof choice.content === 'string' ? choice.content : value };
|
|
113
|
+
return { value, icon: choice.icon, label: choice.content, selected: choice.selected, text: typeof choice.content === 'string' ? choice.content : value };
|
|
112
114
|
}
|
|
113
115
|
return { value, label: choice, text: typeof choice === 'string' ? choice : value };
|
|
114
|
-
}),
|
|
116
|
+
}), iconic = options.some((option) => option.icon), chosen = signal(''), frame = 0, highlighted = signal(0), id = `select-menu-${++uid}`, last = { x: -1, y: -1 }, menu = new ReactiveObject_167mg1f1(), parts = {}, query = '', texts, timer;
|
|
115
117
|
function choose(index) {
|
|
116
118
|
if (!options[index]) {
|
|
117
119
|
return;
|
|
@@ -120,10 +122,18 @@ function template({ label, name, options: choices, selected: initial, state = ne
|
|
|
120
122
|
close();
|
|
121
123
|
}
|
|
122
124
|
function close() {
|
|
123
|
-
cancelAnimationFrame(frame);
|
|
124
125
|
state.active = false;
|
|
125
126
|
}
|
|
126
|
-
function
|
|
127
|
+
function glyph(option) {
|
|
128
|
+
if (!iconic) {
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
if (option?.icon) {
|
|
132
|
+
return icon({ 'aria-hidden': 'true', class: 'select-menu-icon' }, option.icon);
|
|
133
|
+
}
|
|
134
|
+
return template_167mg1f2();
|
|
135
|
+
}
|
|
136
|
+
function move(index) {
|
|
127
137
|
if (!options.length) {
|
|
128
138
|
return;
|
|
129
139
|
}
|
|
@@ -165,7 +175,7 @@ function template({ label, name, options: choices, selected: initial, state = ne
|
|
|
165
175
|
}
|
|
166
176
|
if (e.key in moves) {
|
|
167
177
|
e.preventDefault();
|
|
168
|
-
|
|
178
|
+
move(moves[e.key]);
|
|
169
179
|
return;
|
|
170
180
|
}
|
|
171
181
|
if (e.key === 'Enter' || (e.key === ' ' && !typing)) {
|
|
@@ -208,7 +218,7 @@ function template({ label, name, options: choices, selected: initial, state = ne
|
|
|
208
218
|
return;
|
|
209
219
|
}
|
|
210
220
|
let previous = performance.now();
|
|
211
|
-
|
|
221
|
+
stop();
|
|
212
222
|
function tick(now) {
|
|
213
223
|
if (!parts.scroller) {
|
|
214
224
|
return;
|
|
@@ -239,7 +249,7 @@ function template({ label, name, options: choices, selected: initial, state = ne
|
|
|
239
249
|
continue;
|
|
240
250
|
}
|
|
241
251
|
if (state.active) {
|
|
242
|
-
|
|
252
|
+
move(index);
|
|
243
253
|
}
|
|
244
254
|
else {
|
|
245
255
|
state.selected = options[index].value;
|
|
@@ -277,8 +287,8 @@ function template({ label, name, options: choices, selected: initial, state = ne
|
|
|
277
287
|
scroller.scrollTop += e.deltaY * unit;
|
|
278
288
|
}
|
|
279
289
|
onCleanup(() => {
|
|
280
|
-
cancelAnimationFrame(frame);
|
|
281
290
|
clearTimeout(timer);
|
|
291
|
+
stop();
|
|
282
292
|
});
|
|
283
293
|
effect(() => state.active, (active) => {
|
|
284
294
|
if (!active) {
|
|
@@ -292,51 +302,54 @@ function template({ label, name, options: choices, selected: initial, state = ne
|
|
|
292
302
|
write(chosen, value);
|
|
293
303
|
});
|
|
294
304
|
{
|
|
295
|
-
let
|
|
296
|
-
template_u1.slot(
|
|
297
|
-
|
|
305
|
+
let root_167mg1f3 = template_167mg1f4(), element_167mg1f5 = root_167mg1f3.firstElementChild, element_167mg1f6 = element_167mg1f5.nextElementSibling, element_167mg1f7 = element_167mg1f6.firstChild, element_167mg1f8 = element_167mg1f6.firstElementChild, element_167mg1f9 = element_167mg1f6.nextElementSibling, element_167mg1fa = element_167mg1f9.nextElementSibling, element_167mg1fb = element_167mg1fa.firstElementChild, element_167mg1fc = element_167mg1fb.firstElementChild, element_167mg1fd = element_167mg1fc.firstChild, element_167mg1fe = element_167mg1fc.firstElementChild, element_167mg1ff = element_167mg1fc.nextElementSibling, element_167mg1fg = element_167mg1ff.nextElementSibling;
|
|
306
|
+
template_u1.slot(element_167mg1f5, label ?? defaults?.label ?? String(ariaLabel ?? 'Select option'), 1);
|
|
307
|
+
template_u1.slot(element_167mg1f7, !content && (() => glyph(options[selected()])));
|
|
308
|
+
new template_u1.EffectSlot(element_167mg1f8, content ? (() => content(state)) : (() => {
|
|
298
309
|
let option = options[selected()];
|
|
299
310
|
return option?.selected ?? option?.label ?? '';
|
|
300
311
|
}), 1);
|
|
301
|
-
template_u1.slot(
|
|
302
|
-
...
|
|
312
|
+
template_u1.slot(element_167mg1f6, icon({
|
|
313
|
+
...defaults?.[SELECT_ARROW],
|
|
303
314
|
...attributes[SELECT_ARROW],
|
|
304
315
|
'aria-hidden': 'true',
|
|
305
|
-
class: ['select-menu-chevron',
|
|
316
|
+
class: ['select-menu-chevron', defaults?.[SELECT_ARROW]?.class ?? [], attributes[SELECT_ARROW]?.class ?? []].flat()
|
|
306
317
|
}, chevrons), 1);
|
|
307
|
-
template_u1.slot(
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
template_u1.slot(
|
|
313
|
-
template_u1.slot(
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
318
|
+
template_u1.slot(element_167mg1fd, highlight({ class: 'highlight--surface-primary', hover: false, target: '.select-menu-option' }));
|
|
319
|
+
template_u1.slot(element_167mg1fe, options.map((option, index) => {
|
|
320
|
+
let root_167mg1fh = template_167mg1fi();
|
|
321
|
+
template_u1.slot(root_167mg1fh, option.content ?? (() => {
|
|
322
|
+
let root_167mg1fj = template_167mg1fk(), element_167mg1fl = root_167mg1fj.firstChild, element_167mg1fm = element_167mg1fl.nextSibling, element_167mg1fn = element_167mg1fm.nextSibling, element_167mg1fo = element_167mg1fn.nextSibling;
|
|
323
|
+
template_u1.slot(element_167mg1fl, icon({ 'aria-hidden': 'true', class: 'select-menu-check' }, check));
|
|
324
|
+
template_u1.slot(element_167mg1fm, glyph(option));
|
|
325
|
+
template_u1.slot(element_167mg1fn, option.label, 1);
|
|
326
|
+
template_u1.slot(element_167mg1fo, option.detail && (() => {
|
|
327
|
+
let root_167mg1fp = template_167mg1fq();
|
|
328
|
+
template_u1.slot(root_167mg1fp, option.detail, 1);
|
|
329
|
+
return root_167mg1fp;
|
|
317
330
|
})());
|
|
318
|
-
template_u1.setProperties(
|
|
331
|
+
template_u1.setProperties(element_167mg1fn, index === 0 && {
|
|
319
332
|
onconnect: (element) => {
|
|
320
333
|
parts.label = element;
|
|
321
334
|
}
|
|
322
335
|
});
|
|
323
|
-
template_u1.setClass(
|
|
324
|
-
return
|
|
336
|
+
template_u1.setClass(element_167mg1fn, ["select-menu-option-label"]);
|
|
337
|
+
return root_167mg1fj;
|
|
325
338
|
})(), 1);
|
|
326
|
-
template_u1.setProperty(
|
|
327
|
-
let
|
|
328
|
-
template_u1.setProperties(
|
|
329
|
-
let
|
|
330
|
-
template_u1.setProperties(
|
|
331
|
-
template_u1.setProperties(
|
|
339
|
+
template_u1.setProperty(root_167mg1fh, 'id', "" + (id) + "-option-" + (index));
|
|
340
|
+
let attributes_167mg1fr = defaults?.[SELECT_OPTION];
|
|
341
|
+
template_u1.setProperties(root_167mg1fh, attributes_167mg1fr, true);
|
|
342
|
+
let attributes_167mg1fs = attributes[SELECT_OPTION];
|
|
343
|
+
template_u1.setProperties(root_167mg1fh, attributes_167mg1fs, true);
|
|
344
|
+
template_u1.setProperties(root_167mg1fh, index === 0 && {
|
|
332
345
|
onconnect: (element) => {
|
|
333
346
|
parts.label ??= element;
|
|
334
347
|
parts.option = element;
|
|
335
348
|
}
|
|
336
349
|
});
|
|
337
|
-
template_u1.setProperty(
|
|
338
|
-
template_u1.delegate(
|
|
339
|
-
template_u1.delegate(
|
|
350
|
+
template_u1.setProperty(root_167mg1fh, 'aria-selected', () => signal.selector(chosen, option.value) ? 'true' : 'false');
|
|
351
|
+
template_u1.delegate(root_167mg1fh, 'click', () => choose(index));
|
|
352
|
+
template_u1.delegate(root_167mg1fh, 'pointermove', (e) => {
|
|
340
353
|
if (e.pointerType === 'touch' || (last.x === e.clientX && last.y === e.clientY)) {
|
|
341
354
|
return;
|
|
342
355
|
}
|
|
@@ -345,79 +358,76 @@ function template({ label, name, options: choices, selected: initial, state = ne
|
|
|
345
358
|
menu.highlight = index;
|
|
346
359
|
}
|
|
347
360
|
});
|
|
348
|
-
template_u1.setClass(
|
|
349
|
-
template_u1.setStyle(
|
|
350
|
-
return
|
|
361
|
+
template_u1.setClass(root_167mg1fh, ["select-menu-option", attributes_167mg1fr?.class, attributes_167mg1fs?.class, () => signal.selector(highlighted, index) && '--hover']);
|
|
362
|
+
template_u1.setStyle(root_167mg1fh, ["", attributes_167mg1fr?.style, attributes_167mg1fs?.style]);
|
|
363
|
+
return root_167mg1fh;
|
|
351
364
|
}), 1);
|
|
352
|
-
template_u1.slot(
|
|
353
|
-
template_u1.slot(
|
|
354
|
-
template_u1.direct(
|
|
355
|
-
template_u1.direct(
|
|
356
|
-
template_u1.setClass(
|
|
357
|
-
template_u1.direct(
|
|
358
|
-
template_u1.direct(
|
|
359
|
-
template_u1.setClass(
|
|
360
|
-
template_u1.setProperty(
|
|
361
|
-
template_u1.setProperty(
|
|
362
|
-
|
|
365
|
+
template_u1.slot(element_167mg1ff, icon({ class: 'select-menu-scroll-icon icon--up' }, chevron), 1);
|
|
366
|
+
template_u1.slot(element_167mg1fg, icon({ class: 'select-menu-scroll-icon icon--down' }, chevron), 1);
|
|
367
|
+
template_u1.direct(element_167mg1fg, 'pointerenter', (e) => scroll(1, e));
|
|
368
|
+
template_u1.direct(element_167mg1fg, 'pointerleave', stop);
|
|
369
|
+
template_u1.setClass(element_167mg1fg, ["select-menu-scroll select-menu-scroll--down", () => menu.hover && menu.down && '--active']);
|
|
370
|
+
template_u1.direct(element_167mg1ff, 'pointerenter', (e) => scroll(-1, e));
|
|
371
|
+
template_u1.direct(element_167mg1ff, 'pointerleave', stop);
|
|
372
|
+
template_u1.setClass(element_167mg1ff, ["select-menu-scroll select-menu-scroll--up", () => menu.hover && menu.up && '--active']);
|
|
373
|
+
template_u1.setProperty(element_167mg1fe, 'aria-labelledby', "" + (id) + "-label");
|
|
374
|
+
template_u1.setProperty(element_167mg1fe, 'id', "" + (id) + "-list");
|
|
375
|
+
let attributes_167mg1ft = scrollbar({ fade: true });
|
|
376
|
+
template_u1.setProperties(element_167mg1fc, attributes_167mg1ft, true);
|
|
377
|
+
template_u1.onconnect(element_167mg1fc, (element, on) => {
|
|
378
|
+
on(element, 'scroll', () => edges(menu, element), { direct: true, passive: true });
|
|
363
379
|
parts.scroller = element;
|
|
364
380
|
});
|
|
365
|
-
template_u1.
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
template_u1.
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
template_u1.setProperties(element_167mg1f9, attributes_167mg1fp, true);
|
|
374
|
-
let attributes_167mg1fq = panelAttributes;
|
|
375
|
-
template_u1.setProperties(element_167mg1f9, attributes_167mg1fq, true);
|
|
376
|
-
template_u1.setProperty(element_167mg1f9, 'inert', () => !state.active);
|
|
377
|
-
template_u1.onconnect(element_167mg1f9, (element, on) => {
|
|
381
|
+
template_u1.setClass(element_167mg1fc, ["select-menu-scroller", attributes_167mg1ft?.class]);
|
|
382
|
+
template_u1.setStyle(element_167mg1fc, ["", attributes_167mg1ft?.style]);
|
|
383
|
+
let attributes_167mg1fu = defaults?.[SELECT_PANEL];
|
|
384
|
+
template_u1.setProperties(element_167mg1fb, attributes_167mg1fu, true);
|
|
385
|
+
let attributes_167mg1fv = attributes[SELECT_PANEL];
|
|
386
|
+
template_u1.setProperties(element_167mg1fb, attributes_167mg1fv, true);
|
|
387
|
+
template_u1.setProperty(element_167mg1fb, 'inert', () => !state.active);
|
|
388
|
+
template_u1.onconnect(element_167mg1fb, (element, on) => {
|
|
378
389
|
on(element, 'wheel', wheel, { direct: true, passive: false });
|
|
379
390
|
parts.panel = element;
|
|
380
391
|
});
|
|
381
|
-
template_u1.delegate(
|
|
392
|
+
template_u1.delegate(element_167mg1fb, 'mousedown', (e) => {
|
|
382
393
|
e.preventDefault();
|
|
383
394
|
});
|
|
384
|
-
template_u1.direct(
|
|
395
|
+
template_u1.direct(element_167mg1fb, 'pointerenter', (e) => {
|
|
385
396
|
if (e.pointerType !== 'touch') {
|
|
386
397
|
menu.hover = true;
|
|
387
398
|
}
|
|
388
399
|
});
|
|
389
|
-
template_u1.direct(
|
|
400
|
+
template_u1.direct(element_167mg1fb, 'pointerleave', () => {
|
|
390
401
|
menu.hover = false;
|
|
391
402
|
stop();
|
|
392
403
|
});
|
|
393
|
-
template_u1.setClass(
|
|
394
|
-
template_u1.setStyle(
|
|
395
|
-
template_u1.onconnect(
|
|
404
|
+
template_u1.setClass(element_167mg1fb, ["select-menu-panel", attributes_167mg1fu?.class, attributes_167mg1fv?.class, () => state.active && '--active']);
|
|
405
|
+
template_u1.setStyle(element_167mg1fb, ["", attributes_167mg1fu?.style, attributes_167mg1fv?.style, () => menu.placement]);
|
|
406
|
+
template_u1.onconnect(element_167mg1fa, (element) => {
|
|
396
407
|
parts.layer = element;
|
|
397
408
|
});
|
|
398
|
-
template_u1.setClass(
|
|
399
|
-
template_u1.setStyle(
|
|
400
|
-
template_u1.setProperty(
|
|
401
|
-
template_u1.onconnect(
|
|
402
|
-
template_u1.setProperty(
|
|
403
|
-
template_u1.
|
|
404
|
-
template_u1.
|
|
405
|
-
template_u1.onconnect(element_167mg1f6, (element) => {
|
|
409
|
+
template_u1.setClass(element_167mg1fa, ["select-menu-layer"]);
|
|
410
|
+
template_u1.setStyle(element_167mg1fa, ["", "position-anchor: --" + (id)]);
|
|
411
|
+
template_u1.setProperty(element_167mg1f9, 'name', name ?? defaults?.name);
|
|
412
|
+
template_u1.onconnect(element_167mg1f9, form.input.onconnect(state));
|
|
413
|
+
template_u1.setProperty(element_167mg1f9, 'value', () => state.selected);
|
|
414
|
+
template_u1.setProperty(element_167mg1f8, 'id', "" + (id) + "-value");
|
|
415
|
+
template_u1.onconnect(element_167mg1f8, (element) => {
|
|
406
416
|
parts.value = element;
|
|
407
417
|
});
|
|
408
|
-
template_u1.setClass(
|
|
409
|
-
template_u1.setProperty(
|
|
410
|
-
template_u1.setProperty(
|
|
411
|
-
template_u1.setProperty(
|
|
412
|
-
template_u1.setProperty(
|
|
413
|
-
let
|
|
414
|
-
template_u1.setProperties(
|
|
415
|
-
let
|
|
416
|
-
template_u1.setProperties(
|
|
417
|
-
template_u1.setProperty(
|
|
418
|
-
template_u1.setProperty(
|
|
419
|
-
template_u1.direct(
|
|
420
|
-
template_u1.delegate(
|
|
418
|
+
template_u1.setClass(element_167mg1f8, ["select-menu-value"]);
|
|
419
|
+
template_u1.setProperty(element_167mg1f6, 'aria-controls', "" + (id) + "-list");
|
|
420
|
+
template_u1.setProperty(element_167mg1f6, 'aria-labelledby', "" + (id) + "-label " + (id) + "-value");
|
|
421
|
+
template_u1.setProperty(element_167mg1f6, 'disabled', attributes.disabled === true || defaults?.disabled === true);
|
|
422
|
+
template_u1.setProperty(element_167mg1f6, 'aria-label', ariaLabel === undefined ? undefined : String(ariaLabel));
|
|
423
|
+
let attributes_167mg1fw = defaults?.[SELECT_TRIGGER];
|
|
424
|
+
template_u1.setProperties(element_167mg1f6, attributes_167mg1fw, true);
|
|
425
|
+
let attributes_167mg1fx = attributes[SELECT_TRIGGER];
|
|
426
|
+
template_u1.setProperties(element_167mg1f6, attributes_167mg1fx, true);
|
|
427
|
+
template_u1.setProperty(element_167mg1f6, 'aria-activedescendant', () => state.active && `${id}-option-${menu.highlight}`);
|
|
428
|
+
template_u1.setProperty(element_167mg1f6, 'aria-expanded', () => state.active ? 'true' : 'false');
|
|
429
|
+
template_u1.direct(element_167mg1f6, 'blur', close);
|
|
430
|
+
template_u1.delegate(element_167mg1f6, 'click', () => {
|
|
421
431
|
if (state.active) {
|
|
422
432
|
close();
|
|
423
433
|
}
|
|
@@ -425,24 +435,24 @@ function template({ label, name, options: choices, selected: initial, state = ne
|
|
|
425
435
|
open();
|
|
426
436
|
}
|
|
427
437
|
});
|
|
428
|
-
template_u1.onconnect(
|
|
438
|
+
template_u1.onconnect(element_167mg1f6, (element) => {
|
|
429
439
|
parts.trigger = element;
|
|
430
440
|
});
|
|
431
|
-
template_u1.delegate(
|
|
432
|
-
template_u1.setClass(
|
|
433
|
-
template_u1.setStyle(
|
|
434
|
-
template_u1.setProperty(
|
|
435
|
-
let
|
|
436
|
-
template_u1.setProperties(
|
|
437
|
-
let
|
|
438
|
-
template_u1.setProperties(
|
|
439
|
-
let
|
|
440
|
-
template_u1.setProperties(
|
|
441
|
-
template_u1.setClass(
|
|
442
|
-
template_u1.setStyle(
|
|
443
|
-
return
|
|
441
|
+
template_u1.delegate(element_167mg1f6, 'keydown', onkeydown);
|
|
442
|
+
template_u1.setClass(element_167mg1f6, ["select-menu-trigger", attributes_167mg1fw?.class, attributes_167mg1fx?.class]);
|
|
443
|
+
template_u1.setStyle(element_167mg1f6, ["", attributes_167mg1fw?.style, attributes_167mg1fx?.style]);
|
|
444
|
+
template_u1.setProperty(element_167mg1f5, 'id', "" + (id) + "-label");
|
|
445
|
+
let attributes_167mg1fy = defaults;
|
|
446
|
+
template_u1.setProperties(root_167mg1f3, attributes_167mg1fy, true);
|
|
447
|
+
let attributes_167mg1fz = attributes;
|
|
448
|
+
template_u1.setProperties(root_167mg1f3, attributes_167mg1fz, true);
|
|
449
|
+
let attributes_167mg1f10 = overlay.popup({ popover: true, state, target: () => parts.layer });
|
|
450
|
+
template_u1.setProperties(root_167mg1f3, attributes_167mg1f10, true);
|
|
451
|
+
template_u1.setClass(root_167mg1f3, ["select select-menu", attributes_167mg1fy?.class, attributes_167mg1fz?.class, attributes_167mg1f10?.class]);
|
|
452
|
+
template_u1.setStyle(root_167mg1f3, ["", "anchor-name: --" + (id), attributes_167mg1fy?.style, attributes_167mg1fz?.style, attributes_167mg1f10?.style]);
|
|
453
|
+
return root_167mg1f3;
|
|
444
454
|
}
|
|
445
455
|
}
|
|
446
|
-
const plain = component(template, { arrow: SELECT_ARROW, option: SELECT_OPTION,
|
|
456
|
+
const plain = component(template, { arrow: SELECT_ARROW, option: SELECT_OPTION, panel: SELECT_PANEL, trigger: SELECT_TRIGGER });
|
|
447
457
|
const select = Object.assign(plain, { expand });
|
|
448
458
|
export default select;
|
|
@@ -2,6 +2,13 @@ import { clamp } from '../../shared/clamp.js';
|
|
|
2
2
|
import { viewport } from '../../shared/viewport.js';
|
|
3
3
|
const MARGIN = 8;
|
|
4
4
|
const ROWS = 8;
|
|
5
|
+
function natural(panel) {
|
|
6
|
+
let previous = panel.style.width;
|
|
7
|
+
panel.style.width = 'max-content';
|
|
8
|
+
let width = panel.offsetWidth;
|
|
9
|
+
panel.style.width = previous;
|
|
10
|
+
return width;
|
|
11
|
+
}
|
|
5
12
|
function place({ label, option, panel, scroller, trigger, value }, count, selected) {
|
|
6
13
|
let box = trigger.getBoundingClientRect();
|
|
7
14
|
let scale = box.height / trigger.offsetHeight || 1, item = option.offsetHeight, pad = parseFloat(getComputedStyle(scroller).paddingTop) || 0, rows = Math.min(count, parseInt(getComputedStyle(panel).getPropertyValue('--rows'), 10) || ROWS), height = rows * item + pad * 2, maxScroll = (count - rows) * item, scroll = clamp((selected - Math.floor(rows / 2)) * item, 0, maxScroll), shift = label.offsetLeft - (value.offsetLeft - trigger.offsetLeft), top = trigger.offsetTop + (trigger.offsetHeight - item) / 2 - (pad + selected * item - scroll);
|
|
@@ -16,7 +23,7 @@ function place({ label, option, panel, scroller, trigger, value }, count, select
|
|
|
16
23
|
top -= d;
|
|
17
24
|
scroll -= Math.min(d, scroll);
|
|
18
25
|
}
|
|
19
|
-
let width = trigger.offsetWidth + shift, left = Math.max(trigger.offsetLeft + (MARGIN - box.left) / scale, Math.min(trigger.offsetLeft - shift, trigger.offsetLeft + (view.width - MARGIN - box.left) / scale - width));
|
|
26
|
+
let width = Math.max(trigger.offsetWidth + shift, natural(panel)), left = Math.max(trigger.offsetLeft + (MARGIN - box.left) / scale, Math.min(trigger.offsetLeft - shift, trigger.offsetLeft + (view.width - MARGIN - box.left) / scale - width));
|
|
20
27
|
return {
|
|
21
28
|
scroll,
|
|
22
29
|
style: `
|