@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
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { component, html, type Attributes, type Renderable } from '@esportsplus/template';
|
|
2
1
|
import { effect, onCleanup, reactive, signal, write } from '@esportsplus/reactivity';
|
|
3
|
-
import {
|
|
2
|
+
import { component, html, type Attributes, type Renderable } from '@esportsplus/template';
|
|
3
|
+
import check from '@esportsplus/ui/svg/check.svg';
|
|
4
|
+
import chevron from '@esportsplus/ui/svg/chevron.svg';
|
|
5
|
+
import chevrons from '@esportsplus/ui/svg/chevrons-up-down.svg';
|
|
4
6
|
import form from '~/components/form';
|
|
7
|
+
import highlight from '~/components/highlight';
|
|
5
8
|
import icon from '~/components/icon';
|
|
6
9
|
import overlay from '~/components/overlay';
|
|
10
|
+
import scrollbar from '~/modifiers/scrollbar';
|
|
11
|
+
import { clamp } from '~/shared/clamp';
|
|
7
12
|
import expand from './expand';
|
|
8
13
|
import place, { ROWS } from './placement';
|
|
9
|
-
import check from '@esportsplus/ui/svg/check.svg';
|
|
10
|
-
import chevronDown from '@esportsplus/ui/svg/chevron-down.svg';
|
|
11
|
-
import chevronUp from '@esportsplus/ui/svg/chevron-up.svg';
|
|
12
|
-
import chevrons from '@esportsplus/ui/svg/chevrons-up-down.svg';
|
|
13
14
|
import './scss/index.scss';
|
|
14
15
|
|
|
15
16
|
|
|
@@ -24,18 +25,20 @@ type A = Attributes & {
|
|
|
24
25
|
ontransitionrun?: never;
|
|
25
26
|
[SELECT_ARROW]?: Attributes;
|
|
26
27
|
[SELECT_OPTION]?: Attributes;
|
|
27
|
-
[
|
|
28
|
+
[SELECT_PANEL]?: Attributes;
|
|
28
29
|
[SELECT_TRIGGER]?: Attributes;
|
|
29
30
|
label?: string;
|
|
30
31
|
name?: string;
|
|
31
|
-
options: Option[] | Record<number | string, Renderable<unknown> | { content: Renderable<unknown>, selected
|
|
32
|
+
options: Option[] | Record<number | string, Renderable<unknown> | { content: Renderable<unknown>, icon?: string, selected?: Renderable<unknown> }>;
|
|
32
33
|
} & ({ selected?: number | string; state?: never } | { selected?: never; state: State });
|
|
33
34
|
|
|
34
35
|
type Option = {
|
|
35
|
-
// Replaces the whole row (check, label and detail); a '.select-menu-option-label' inside it keeps the open
|
|
36
|
-
// text aligned with the trigger's, and a '.select-menu-check' still shows on the chosen row.
|
|
36
|
+
// Replaces the whole row (check, icon, label and detail); a '.select-menu-option-label' inside it keeps the open
|
|
37
|
+
// panel's text aligned with the trigger's, and a '.select-menu-check' still shows on the chosen row.
|
|
37
38
|
content?: Renderable<unknown>;
|
|
38
39
|
detail?: string;
|
|
40
|
+
// A sprite href, as 'icon' takes, shown before the label in its row and in the trigger while chosen.
|
|
41
|
+
icon?: string;
|
|
39
42
|
label: Renderable<unknown>;
|
|
40
43
|
selected?: Renderable<unknown>;
|
|
41
44
|
text?: string;
|
|
@@ -68,7 +71,7 @@ const SELECT_ARROW = Symbol.for('@esportsplus/ui/select.arrow');
|
|
|
68
71
|
|
|
69
72
|
const SELECT_OPTION = Symbol.for('@esportsplus/ui/select.option');
|
|
70
73
|
|
|
71
|
-
const
|
|
74
|
+
const SELECT_PANEL = Symbol.for('@esportsplus/ui/select.panel');
|
|
72
75
|
|
|
73
76
|
const SELECT_TRIGGER = Symbol.for('@esportsplus/ui/select.trigger');
|
|
74
77
|
|
|
@@ -100,13 +103,13 @@ function template(
|
|
|
100
103
|
ariaLabel = attributes['aria-label'] ?? defaults?.['aria-label'],
|
|
101
104
|
options: Option[] = Array.isArray(choices) ? choices : Object.entries(choices).map(([value, choice]) => {
|
|
102
105
|
if (choice !== null && typeof choice === 'object' && 'content' in choice) {
|
|
103
|
-
return { value, label: choice.content, selected: choice.selected, text: typeof choice.content === 'string' ? choice.content : value };
|
|
106
|
+
return { value, icon: choice.icon, label: choice.content, selected: choice.selected, text: typeof choice.content === 'string' ? choice.content : value };
|
|
104
107
|
}
|
|
105
108
|
|
|
106
109
|
return { value, label: choice, text: typeof choice === 'string' ? choice : value };
|
|
107
110
|
}),
|
|
108
|
-
|
|
109
|
-
|
|
111
|
+
// Once any option has an icon every row and the trigger hold its slot, so the text lines up across them.
|
|
112
|
+
iconic = options.some((option) => option.icon),
|
|
110
113
|
// Private mirrors the options select on, so a move or a pick restyles two options rather than every one.
|
|
111
114
|
chosen = signal(''),
|
|
112
115
|
frame = 0,
|
|
@@ -129,12 +132,25 @@ function template(
|
|
|
129
132
|
}
|
|
130
133
|
|
|
131
134
|
function close() {
|
|
132
|
-
cancelAnimationFrame(frame);
|
|
133
135
|
state.active = false;
|
|
134
136
|
}
|
|
135
137
|
|
|
138
|
+
// Placed before the text in both the rows and the trigger, which share one gap, so lining up their text, as the
|
|
139
|
+
// panel's placement does, lines up the icons too. An option without one keeps an empty box of the same size.
|
|
140
|
+
function glyph(option?: Option) {
|
|
141
|
+
if (!iconic) {
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
if (option?.icon) {
|
|
146
|
+
return icon({ 'aria-hidden': 'true', class: 'select-menu-icon' }, option.icon);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
return html`<span aria-hidden='true' class='icon select-menu-icon'></span>`;
|
|
150
|
+
}
|
|
151
|
+
|
|
136
152
|
// Keyboard moves keep the highlight in view; pointer moves never scroll.
|
|
137
|
-
function
|
|
153
|
+
function move(index: number) {
|
|
138
154
|
if (!options.length) {
|
|
139
155
|
return;
|
|
140
156
|
}
|
|
@@ -190,7 +206,7 @@ function template(
|
|
|
190
206
|
|
|
191
207
|
if (e.key in moves) {
|
|
192
208
|
e.preventDefault();
|
|
193
|
-
|
|
209
|
+
move(moves[e.key]);
|
|
194
210
|
return;
|
|
195
211
|
}
|
|
196
212
|
|
|
@@ -250,7 +266,7 @@ function template(
|
|
|
250
266
|
|
|
251
267
|
let previous = performance.now();
|
|
252
268
|
|
|
253
|
-
|
|
269
|
+
stop();
|
|
254
270
|
|
|
255
271
|
function tick(now: number) {
|
|
256
272
|
if (!parts.scroller) {
|
|
@@ -297,7 +313,7 @@ function template(
|
|
|
297
313
|
|
|
298
314
|
// Closed, it changes the value directly, like a native select.
|
|
299
315
|
if (state.active) {
|
|
300
|
-
|
|
316
|
+
move(index);
|
|
301
317
|
}
|
|
302
318
|
else {
|
|
303
319
|
state.selected = options[index].value;
|
|
@@ -337,8 +353,8 @@ function template(
|
|
|
337
353
|
return;
|
|
338
354
|
}
|
|
339
355
|
|
|
340
|
-
// The arrows overlay the list as siblings, so their wheel events cannot
|
|
341
|
-
//
|
|
356
|
+
// The arrows overlay the list as siblings, so their wheel events cannot reach its native scroll container. Forward
|
|
357
|
+
// only those surface events.
|
|
342
358
|
let unit = e.deltaMode === WheelEvent.DOM_DELTA_PAGE
|
|
343
359
|
? scroller.clientHeight
|
|
344
360
|
: e.deltaMode === WheelEvent.DOM_DELTA_LINE
|
|
@@ -350,8 +366,8 @@ function template(
|
|
|
350
366
|
}
|
|
351
367
|
|
|
352
368
|
onCleanup(() => {
|
|
353
|
-
cancelAnimationFrame(frame);
|
|
354
369
|
clearTimeout(timer);
|
|
370
|
+
stop();
|
|
355
371
|
});
|
|
356
372
|
|
|
357
373
|
effect(() => state.active, (active) => {
|
|
@@ -386,7 +402,7 @@ function template(
|
|
|
386
402
|
type='button'
|
|
387
403
|
disabled='${attributes.disabled === true || defaults?.disabled === true}'
|
|
388
404
|
aria-label='${ariaLabel === undefined ? undefined : String(ariaLabel)}'
|
|
389
|
-
${
|
|
405
|
+
${defaults?.[SELECT_TRIGGER]}
|
|
390
406
|
${attributes[SELECT_TRIGGER]}
|
|
391
407
|
${{
|
|
392
408
|
'aria-activedescendant': () => state.active && `${id}-option-${menu.highlight}`,
|
|
@@ -407,6 +423,7 @@ function template(
|
|
|
407
423
|
onkeydown
|
|
408
424
|
}}
|
|
409
425
|
>
|
|
426
|
+
${!content && (() => glyph(options[selected()]))}
|
|
410
427
|
<span
|
|
411
428
|
class='select-menu-value'
|
|
412
429
|
id='${id}-value'
|
|
@@ -424,16 +441,15 @@ function template(
|
|
|
424
441
|
</span>
|
|
425
442
|
${icon(
|
|
426
443
|
{
|
|
427
|
-
...
|
|
444
|
+
...defaults?.[SELECT_ARROW],
|
|
428
445
|
...attributes[SELECT_ARROW],
|
|
429
446
|
'aria-hidden': 'true',
|
|
430
|
-
class: ['select-menu-chevron',
|
|
447
|
+
class: ['select-menu-chevron', defaults?.[SELECT_ARROW]?.class ?? [], attributes[SELECT_ARROW]?.class ?? []].flat()
|
|
431
448
|
},
|
|
432
449
|
chevrons
|
|
433
450
|
)}
|
|
434
451
|
</button>
|
|
435
452
|
<input
|
|
436
|
-
class='select-menu-tag'
|
|
437
453
|
type='hidden'
|
|
438
454
|
${{
|
|
439
455
|
name: name ?? defaults?.name,
|
|
@@ -453,8 +469,8 @@ function template(
|
|
|
453
469
|
>
|
|
454
470
|
<div
|
|
455
471
|
class='select-menu-panel'
|
|
456
|
-
${
|
|
457
|
-
${
|
|
472
|
+
${defaults?.[SELECT_PANEL]}
|
|
473
|
+
${attributes[SELECT_PANEL]}
|
|
458
474
|
${{
|
|
459
475
|
class: () => state.active && '--active',
|
|
460
476
|
inert: () => !state.active,
|
|
@@ -480,26 +496,23 @@ function template(
|
|
|
480
496
|
>
|
|
481
497
|
<div
|
|
482
498
|
class='select-menu-scroller'
|
|
499
|
+
${scrollbar({ fade: true })}
|
|
483
500
|
${{
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
() => menu
|
|
487
|
-
],
|
|
488
|
-
onconnect: (element: HTMLElement) => {
|
|
501
|
+
// Bound rather than an 'onscroll' key, which would replace the fade's own fallback listener.
|
|
502
|
+
onconnect: (element: HTMLElement, on) => {
|
|
503
|
+
on(element, 'scroll', () => edges(menu, element), { direct: true, passive: true });
|
|
489
504
|
parts.scroller = element;
|
|
490
|
-
},
|
|
491
|
-
onscroll: function(this: HTMLElement) {
|
|
492
|
-
edges(menu, this);
|
|
493
505
|
}
|
|
494
506
|
}}
|
|
495
507
|
>
|
|
508
|
+
${highlight({ class: 'highlight--surface-primary', hover: false, target: '.select-menu-option' })}
|
|
496
509
|
<div aria-labelledby='${id}-label' id='${id}-list' role='listbox'>
|
|
497
510
|
${options.map((option, index) => html`
|
|
498
511
|
<div
|
|
499
512
|
class='select-menu-option'
|
|
500
513
|
id='${id}-option-${index}'
|
|
501
514
|
role='option'
|
|
502
|
-
${
|
|
515
|
+
${defaults?.[SELECT_OPTION]}
|
|
503
516
|
${attributes[SELECT_OPTION]}
|
|
504
517
|
${index === 0 && {
|
|
505
518
|
// The first option, and its label once connected ahead of it, stand in for every
|
|
@@ -511,7 +524,7 @@ function template(
|
|
|
511
524
|
}}
|
|
512
525
|
${{
|
|
513
526
|
'aria-selected': () => signal.selector(chosen, option.value) ? 'true' : 'false',
|
|
514
|
-
class: () => signal.selector(highlighted, index) && '
|
|
527
|
+
class: () => signal.selector(highlighted, index) && '--hover',
|
|
515
528
|
onclick: () => choose(index),
|
|
516
529
|
onpointermove: (e: PointerEvent) => {
|
|
517
530
|
// Scrolling under a still cursor can fire synthetic moves; only real movement
|
|
@@ -530,6 +543,7 @@ function template(
|
|
|
530
543
|
>
|
|
531
544
|
${option.content ?? html`
|
|
532
545
|
${icon({ 'aria-hidden': 'true', class: 'select-menu-check' }, check)}
|
|
546
|
+
${glyph(option)}
|
|
533
547
|
<span
|
|
534
548
|
class='select-menu-option-label'
|
|
535
549
|
${index === 0 && {
|
|
@@ -555,7 +569,7 @@ function template(
|
|
|
555
569
|
onpointerleave: stop
|
|
556
570
|
}}
|
|
557
571
|
>
|
|
558
|
-
${icon({ class: 'select-menu-scroll-icon' },
|
|
572
|
+
${icon({ class: 'select-menu-scroll-icon icon--up' }, chevron)}
|
|
559
573
|
</div>
|
|
560
574
|
<div
|
|
561
575
|
aria-hidden='true'
|
|
@@ -566,7 +580,7 @@ function template(
|
|
|
566
580
|
onpointerleave: stop
|
|
567
581
|
}}
|
|
568
582
|
>
|
|
569
|
-
${icon({ class: 'select-menu-scroll-icon' },
|
|
583
|
+
${icon({ class: 'select-menu-scroll-icon icon--down' }, chevron)}
|
|
570
584
|
</div>
|
|
571
585
|
</div>
|
|
572
586
|
</div>
|
|
@@ -575,7 +589,7 @@ function template(
|
|
|
575
589
|
}
|
|
576
590
|
|
|
577
591
|
|
|
578
|
-
const plain = component(template, { arrow: SELECT_ARROW, option: SELECT_OPTION,
|
|
592
|
+
const plain = component(template, { arrow: SELECT_ARROW, option: SELECT_OPTION, panel: SELECT_PANEL, trigger: SELECT_TRIGGER });
|
|
579
593
|
|
|
580
594
|
const select: typeof plain & { expand: typeof expand } = Object.assign(plain, { expand });
|
|
581
595
|
|
|
@@ -17,6 +17,21 @@ const MARGIN = 8;
|
|
|
17
17
|
const ROWS = 8;
|
|
18
18
|
|
|
19
19
|
|
|
20
|
+
// The panel's width with every option at its natural size, up to its max width. The last placement's inline width is
|
|
21
|
+
// set aside for the read, since CSS can't size a box to both its content and the trigger's width: raw DOM, measuring
|
|
22
|
+
// only.
|
|
23
|
+
function natural(panel: HTMLElement) {
|
|
24
|
+
let previous = panel.style.width;
|
|
25
|
+
|
|
26
|
+
panel.style.width = 'max-content';
|
|
27
|
+
|
|
28
|
+
let width = panel.offsetWidth;
|
|
29
|
+
|
|
30
|
+
panel.style.width = previous;
|
|
31
|
+
|
|
32
|
+
return width;
|
|
33
|
+
}
|
|
34
|
+
|
|
20
35
|
// Puts the selected option exactly over the trigger, the way macOS does, then trades list position for scroll
|
|
21
36
|
// position if that runs off screen.
|
|
22
37
|
function place({ label, option, panel, scroller, trigger, value }: Parts, count: number, selected: number) {
|
|
@@ -52,7 +67,8 @@ function place({ label, option, panel, scroller, trigger, value }: Parts, count:
|
|
|
52
67
|
scroll -= Math.min(d, scroll);
|
|
53
68
|
}
|
|
54
69
|
|
|
55
|
-
|
|
70
|
+
// At least the trigger's width, and wider when an option needs it, rather than cutting the option short.
|
|
71
|
+
let width = Math.max(trigger.offsetWidth + shift, natural(panel)),
|
|
56
72
|
left = Math.max(
|
|
57
73
|
trigger.offsetLeft + (MARGIN - box.left) / scale,
|
|
58
74
|
Math.min(trigger.offsetLeft - shift, trigger.offsetLeft + (view.width - MARGIN - box.left) / scale - width)
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@use '/tokens';
|
|
2
|
+
@use 'css-utilities/disabled';
|
|
2
3
|
@use 'css-utilities/hidden';
|
|
3
4
|
@use 'css-utilities/icon';
|
|
4
5
|
@use 'css-utilities/reset';
|
|
@@ -13,23 +14,37 @@
|
|
|
13
14
|
z-index: var(--z-index);
|
|
14
15
|
|
|
15
16
|
|
|
17
|
+
// Its padding gives the border back, as an input's does, so the value stays put.
|
|
18
|
+
&--border > #{&}-menu-trigger {
|
|
19
|
+
border: var(--border-width) var(--border-style) var(--border-color);
|
|
20
|
+
outline: var(--outline-width) solid var(--border-color);
|
|
21
|
+
outline-offset: calc((var(--border-width) + var(--outline-width)) * -1);
|
|
22
|
+
padding-inline: calc(var(--padding-start) - var(--border-width)) calc(var(--padding-end) - var(--border-width));
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
|
|
16
26
|
&-expand {
|
|
17
27
|
display: inline-flex;
|
|
18
28
|
|
|
19
|
-
|
|
20
|
-
//
|
|
21
|
-
//
|
|
29
|
+
|
|
30
|
+
// The tooltip morph grows the row out of the trigger and closes it back onto it. Centred on the trigger, then
|
|
31
|
+
// moved along the row so the current option sits where the trigger's content was. Raised over the trigger,
|
|
32
|
+
// unlike a morph tooltip, since it covers it rather than leaving it.
|
|
22
33
|
&-menu.tooltip-content {
|
|
23
34
|
border: var(--border-width) solid var(--surface-border-default);
|
|
35
|
+
bottom: 50%;
|
|
24
36
|
display: flex;
|
|
25
37
|
gap: var(--gap-vertical) var(--gap-horizontal);
|
|
26
38
|
padding-block: var(--padding-vertical);
|
|
27
39
|
padding-inline: var(--padding-horizontal);
|
|
40
|
+
right: 50%;
|
|
41
|
+
transform-origin: center center;
|
|
28
42
|
translate:
|
|
29
43
|
calc(50% + ((var(--count) - 1) / 2 - var(--index)) * (var(--option-size) + var(--gap-horizontal)))
|
|
30
44
|
50%;
|
|
31
45
|
z-index: var(--z-index);
|
|
32
46
|
|
|
47
|
+
|
|
33
48
|
// Closing on a pick, the row slides the option onto the trigger as the clip lands around it.
|
|
34
49
|
.select-expand--landing:not(.--active) > & {
|
|
35
50
|
transition:
|
|
@@ -48,9 +63,10 @@
|
|
|
48
63
|
flex: 0 0 var(--option-size);
|
|
49
64
|
height: var(--option-size);
|
|
50
65
|
justify-content: center;
|
|
51
|
-
transition:
|
|
52
|
-
|
|
53
|
-
|
|
66
|
+
transition-duration: var(--transition-duration);
|
|
67
|
+
transition-property: background-color, color;
|
|
68
|
+
transition-timing-function: var(--transition-timing-function);
|
|
69
|
+
|
|
54
70
|
|
|
55
71
|
&:focus-visible {
|
|
56
72
|
outline: var(--focus-width) solid var(--focus-color);
|
|
@@ -64,6 +80,7 @@
|
|
|
64
80
|
height: var(--trigger-size);
|
|
65
81
|
width: var(--trigger-size);
|
|
66
82
|
|
|
83
|
+
|
|
67
84
|
// TEMP: the content swaps instantly instead of the faces' blur/fade, while the morph is tuned.
|
|
68
85
|
.button-face {
|
|
69
86
|
transition: none;
|
|
@@ -76,6 +93,7 @@
|
|
|
76
93
|
@extend %icon-stroke, %icon-swap;
|
|
77
94
|
stroke-width: var(--stroke-width);
|
|
78
95
|
|
|
96
|
+
|
|
79
97
|
@media (prefers-reduced-motion: reduce) {
|
|
80
98
|
filter: none;
|
|
81
99
|
scale: 1;
|
|
@@ -94,15 +112,10 @@
|
|
|
94
112
|
left: anchor(left);
|
|
95
113
|
top: anchor(top);
|
|
96
114
|
width: anchor-size(width);
|
|
97
|
-
|
|
98
|
-
> .select-menu-panel {
|
|
99
|
-
pointer-events: auto;
|
|
100
|
-
}
|
|
101
115
|
}
|
|
102
116
|
|
|
103
117
|
&-option {
|
|
104
118
|
align-items: center;
|
|
105
|
-
background: var(--background);
|
|
106
119
|
border-radius: var(--border-radius);
|
|
107
120
|
cursor: default;
|
|
108
121
|
display: flex;
|
|
@@ -112,6 +125,7 @@
|
|
|
112
125
|
padding-inline: var(--padding-horizontal);
|
|
113
126
|
user-select: none;
|
|
114
127
|
|
|
128
|
+
|
|
115
129
|
&-detail {
|
|
116
130
|
color: var(--color);
|
|
117
131
|
flex: 0 0 auto;
|
|
@@ -125,31 +139,38 @@
|
|
|
125
139
|
min-width: 0;
|
|
126
140
|
}
|
|
127
141
|
|
|
142
|
+
|
|
128
143
|
&[aria-selected='true'] .select-menu-check {
|
|
129
144
|
@extend %icon-swap-active;
|
|
130
145
|
}
|
|
131
146
|
}
|
|
132
147
|
|
|
133
|
-
// Closed, it is inert, so it takes no pointer or focus while it fades out.
|
|
148
|
+
// Closed, it is inert, so it takes no pointer or focus while it fades out. Its cover grows the box out past where
|
|
149
|
+
// it is placed while its content stays put: padding pushes the content in by as much as the margin pulls the box
|
|
150
|
+
// out, and the content box keeps the placed width.
|
|
134
151
|
&-panel {
|
|
135
152
|
background: var(--background);
|
|
136
153
|
border-radius: var(--border-radius);
|
|
137
154
|
box-shadow: var(--box-shadow);
|
|
155
|
+
box-sizing: content-box;
|
|
156
|
+
color: var(--color);
|
|
138
157
|
left: 0;
|
|
158
|
+
margin: calc(var(--cover) * -1);
|
|
139
159
|
max-width: var(--max-width);
|
|
140
|
-
min-width: auto;
|
|
141
160
|
opacity: 0;
|
|
142
161
|
overflow: hidden;
|
|
162
|
+
padding: var(--cover);
|
|
163
|
+
pointer-events: auto;
|
|
143
164
|
position: absolute;
|
|
144
165
|
scale: var(--scale);
|
|
145
166
|
top: 0;
|
|
146
|
-
transition:
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
translate var(--transition-duration) var(--transition-timing-function);
|
|
167
|
+
transition-duration: var(--transition-duration);
|
|
168
|
+
transition-property: opacity, scale, translate;
|
|
169
|
+
transition-timing-function: var(--transition-timing-function);
|
|
150
170
|
width: var(--width);
|
|
151
171
|
z-index: var(--z-index);
|
|
152
172
|
|
|
173
|
+
|
|
153
174
|
@include tokens.state(active) {
|
|
154
175
|
opacity: 1;
|
|
155
176
|
scale: 1;
|
|
@@ -169,10 +190,6 @@
|
|
|
169
190
|
position: absolute;
|
|
170
191
|
transition: opacity var(--transition-duration) var(--transition-timing-function);
|
|
171
192
|
|
|
172
|
-
@include tokens.state(active) {
|
|
173
|
-
opacity: 1;
|
|
174
|
-
pointer-events: auto;
|
|
175
|
-
}
|
|
176
193
|
|
|
177
194
|
&--down {
|
|
178
195
|
bottom: 0;
|
|
@@ -181,21 +198,20 @@
|
|
|
181
198
|
&--up {
|
|
182
199
|
top: 0;
|
|
183
200
|
}
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
@include tokens.state(active) {
|
|
204
|
+
opacity: 1;
|
|
205
|
+
pointer-events: auto;
|
|
206
|
+
}
|
|
184
207
|
}
|
|
185
208
|
|
|
186
209
|
&-scroller {
|
|
187
|
-
mask-image: linear-gradient(to bottom, transparent, black var(--fade-top), black calc(100% - var(--fade-bottom)), transparent);
|
|
188
210
|
max-height: calc(var(--rows) * var(--row-height) + var(--padding-vertical) * 2);
|
|
189
|
-
overflow-y: auto;
|
|
190
|
-
overscroll-behavior: contain;
|
|
191
211
|
padding-block: var(--padding-vertical);
|
|
192
212
|
padding-inline: var(--padding-horizontal);
|
|
193
213
|
}
|
|
194
214
|
|
|
195
|
-
&-tag {
|
|
196
|
-
display: none;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
215
|
&-trigger {
|
|
200
216
|
@extend %reset-button;
|
|
201
217
|
align-items: center;
|
|
@@ -205,15 +221,22 @@
|
|
|
205
221
|
color: var(--color);
|
|
206
222
|
display: flex;
|
|
207
223
|
gap: var(--gap-vertical) var(--gap-horizontal);
|
|
208
|
-
height: var(--height);
|
|
209
224
|
margin: 0;
|
|
225
|
+
min-height: var(--height);
|
|
210
226
|
outline: none;
|
|
227
|
+
// An input's, so the two stand the same height side by side.
|
|
228
|
+
padding-block: max(0px, calc(var(--padding-vertical) - var(--border-width)));
|
|
211
229
|
padding-inline: var(--padding-start) var(--padding-end);
|
|
212
230
|
text-align: start;
|
|
213
231
|
touch-action: manipulation;
|
|
214
232
|
user-select: none;
|
|
215
233
|
width: 100%;
|
|
216
234
|
|
|
235
|
+
|
|
236
|
+
&:disabled {
|
|
237
|
+
cursor: not-allowed;
|
|
238
|
+
}
|
|
239
|
+
|
|
217
240
|
&:focus-visible {
|
|
218
241
|
outline: var(--focus-width) solid var(--color);
|
|
219
242
|
outline-offset: var(--focus-offset);
|
|
@@ -226,4 +249,9 @@
|
|
|
226
249
|
min-width: 0;
|
|
227
250
|
}
|
|
228
251
|
}
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
&:has(> #{&}-menu-trigger:disabled) {
|
|
255
|
+
@extend %disabled;
|
|
256
|
+
}
|
|
229
257
|
}
|