@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,10 +1,13 @@
|
|
|
1
1
|
import { component, html, type Attributes } from '@esportsplus/template';
|
|
2
2
|
import { onCleanup, reactive } from '@esportsplus/reactivity';
|
|
3
3
|
import overlay from '~/components/overlay';
|
|
4
|
-
import { content as surface, morph, morphs } from './utilities';
|
|
4
|
+
import { content as surface, morph, morphs, position } from './utilities';
|
|
5
|
+
import type { Axis } from '~/shared/placement';
|
|
5
6
|
|
|
6
7
|
|
|
7
8
|
type A = Attributes & {
|
|
9
|
+
// Keeps the content beside the trigger ('x') or above and below it ('y'); left out, either.
|
|
10
|
+
axis?: Axis,
|
|
8
11
|
// Controlled triggers handle their own clicks while sharing the tooltip's visibility and dismissal.
|
|
9
12
|
manual?: boolean,
|
|
10
13
|
onanimationcancel?: never,
|
|
@@ -21,8 +24,9 @@ type A = Attributes & {
|
|
|
21
24
|
|
|
22
25
|
|
|
23
26
|
export default component<A>(
|
|
24
|
-
({ manual = false, state = reactive({ active: false }), toggle = false, ...attributes }, content) => {
|
|
27
|
+
({ axis, manual = false, state = reactive({ active: false }), toggle = false, ...attributes }, content) => {
|
|
25
28
|
let cancel: VoidFunction | undefined,
|
|
29
|
+
host: HTMLElement | undefined,
|
|
26
30
|
local = reactive({ morphing: false });
|
|
27
31
|
|
|
28
32
|
onCleanup(() => cancel?.());
|
|
@@ -33,8 +37,18 @@ export default component<A>(
|
|
|
33
37
|
cancel?.();
|
|
34
38
|
cancel = undefined;
|
|
35
39
|
},
|
|
40
|
+
// A controlled trigger opens through 'state' alone, so its content is placed as it shows.
|
|
41
|
+
onopen: () => {
|
|
42
|
+
if (manual && host) {
|
|
43
|
+
position(host, axis);
|
|
44
|
+
}
|
|
45
|
+
},
|
|
36
46
|
state,
|
|
37
|
-
target:
|
|
47
|
+
target: (element) => {
|
|
48
|
+
host = element;
|
|
49
|
+
|
|
50
|
+
return surface(element);
|
|
51
|
+
}
|
|
38
52
|
});
|
|
39
53
|
|
|
40
54
|
return html`
|
|
@@ -51,6 +65,7 @@ export default component<A>(
|
|
|
51
65
|
cancel = undefined;
|
|
52
66
|
|
|
53
67
|
if (active && !state.active) {
|
|
68
|
+
position(this, axis);
|
|
54
69
|
cancel = morph(this, () => {
|
|
55
70
|
cancel = undefined;
|
|
56
71
|
state.active = true;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { component, html, type Attributes } from '@esportsplus/template';
|
|
2
2
|
import { onCleanup, reactive } from '@esportsplus/reactivity';
|
|
3
3
|
import overlay from '~/components/overlay';
|
|
4
|
-
import { content, cool, morph, morphs, wait, warm, type Delay } from './utilities';
|
|
4
|
+
import { content, cool, morph, morphs, position, wait, warm, type Delay } from './utilities';
|
|
5
|
+
import type { Axis } from '~/shared/placement';
|
|
5
6
|
|
|
6
7
|
|
|
7
8
|
type A = Attributes & Options & {
|
|
@@ -20,6 +21,8 @@ type A = Attributes & Options & {
|
|
|
20
21
|
};
|
|
21
22
|
|
|
22
23
|
type Options = {
|
|
24
|
+
// Keeps the content beside the trigger ('x') or above and below it ('y'); left out, either.
|
|
25
|
+
axis?: Axis,
|
|
23
26
|
// Keyboard focus never waits for the open delay.
|
|
24
27
|
delay?: Delay,
|
|
25
28
|
state?: { active: boolean }
|
|
@@ -98,7 +101,7 @@ function safe(element: HTMLElement, x: number, y: number) {
|
|
|
98
101
|
|
|
99
102
|
// The hover behaviour without an element of its own: spread it on any '.tooltip' element that holds a
|
|
100
103
|
// '.tooltip-content' or '.tooltip-message'.
|
|
101
|
-
function trigger({ delay: { close: closing = 0, open: opening = 0 } = {}, state = reactive({ active: false }) }: Options = {}) {
|
|
104
|
+
function trigger({ axis, delay: { close: closing = 0, open: opening = 0 } = {}, state = reactive({ active: false }) }: Options = {}) {
|
|
102
105
|
let leaving: ReturnType<typeof setTimeout> | undefined,
|
|
103
106
|
local = reactive({ instant: false, morphing: false, safe: '' }),
|
|
104
107
|
morphed: VoidFunction | undefined,
|
|
@@ -123,6 +126,7 @@ function trigger({ delay: { close: closing = 0, open: opening = 0 } = {}, state
|
|
|
123
126
|
|
|
124
127
|
function open(element: HTMLElement) {
|
|
125
128
|
pending = undefined;
|
|
129
|
+
position(element, axis);
|
|
126
130
|
morphed = morph(element, () => {
|
|
127
131
|
morphed = undefined;
|
|
128
132
|
state.active = true;
|
|
@@ -177,6 +181,11 @@ function trigger({ delay: { close: closing = 0, open: opening = 0 } = {}, state
|
|
|
177
181
|
release();
|
|
178
182
|
}
|
|
179
183
|
},
|
|
184
|
+
onmouseout: (e: MouseEvent) => {
|
|
185
|
+
if (!(e.currentTarget as HTMLElement).contains(e.relatedTarget as Node | null)) {
|
|
186
|
+
release();
|
|
187
|
+
}
|
|
188
|
+
},
|
|
180
189
|
onmouseover: (e: MouseEvent) => {
|
|
181
190
|
let element = e.currentTarget as HTMLElement;
|
|
182
191
|
|
|
@@ -194,11 +203,6 @@ function trigger({ delay: { close: closing = 0, open: opening = 0 } = {}, state
|
|
|
194
203
|
local.instant = opening > 0 && warm();
|
|
195
204
|
pending = wait(opening, () => open(element));
|
|
196
205
|
},
|
|
197
|
-
onmouseout: (e: MouseEvent) => {
|
|
198
|
-
if (!(e.currentTarget as HTMLElement).contains(e.relatedTarget as Node | null)) {
|
|
199
|
-
release();
|
|
200
|
-
}
|
|
201
|
-
},
|
|
202
206
|
onpointermove: (e: PointerEvent) => {
|
|
203
207
|
let element = e.currentTarget as HTMLElement;
|
|
204
208
|
|
|
@@ -223,8 +227,8 @@ function trigger({ delay: { close: closing = 0, open: opening = 0 } = {}, state
|
|
|
223
227
|
|
|
224
228
|
|
|
225
229
|
export default component(
|
|
226
|
-
({ delay, state, ...attributes }: A, content) => html`
|
|
227
|
-
<div class='tooltip' ${attributes} ${trigger({ delay, state })}>
|
|
230
|
+
({ axis, delay, state, ...attributes }: A, content) => html`
|
|
231
|
+
<div class='tooltip' ${attributes} ${trigger({ axis, delay, state })}>
|
|
228
232
|
${content}
|
|
229
233
|
</div>
|
|
230
234
|
`,
|
|
@@ -2,47 +2,8 @@
|
|
|
2
2
|
@use 'css-utilities/layer';
|
|
3
3
|
@use 'css-utilities/reset';
|
|
4
4
|
@use 'css-utilities/text';
|
|
5
|
-
@use 'sass:map';
|
|
6
5
|
@use 'variables';
|
|
7
6
|
|
|
8
|
-
// Each side pushes the tooltip past the trigger's edge ('edge' names the tooltip side facing the trigger), centered on
|
|
9
|
-
// it along 'center' or aligned to one of its two corners; opening travels '--offset' further out.
|
|
10
|
-
$sides: (
|
|
11
|
-
e: (
|
|
12
|
-
center: bottom,
|
|
13
|
-
corner-open: var(--offset) 0,
|
|
14
|
-
corners: (en: top, es: bottom),
|
|
15
|
-
edge: left,
|
|
16
|
-
open: var(--offset) 50%,
|
|
17
|
-
rest: 0 50%
|
|
18
|
-
),
|
|
19
|
-
n: (
|
|
20
|
-
center: right,
|
|
21
|
-
corner-open: 0 calc(var(--offset) * -1),
|
|
22
|
-
corners: (ne: right, nw: left),
|
|
23
|
-
edge: bottom,
|
|
24
|
-
open: 50% calc(var(--offset) * -1),
|
|
25
|
-
rest: 50% 0
|
|
26
|
-
),
|
|
27
|
-
s: (
|
|
28
|
-
center: right,
|
|
29
|
-
corner-open: 0 var(--offset),
|
|
30
|
-
corners: (se: right, sw: left),
|
|
31
|
-
edge: top,
|
|
32
|
-
open: 50% var(--offset),
|
|
33
|
-
rest: 50% 0
|
|
34
|
-
),
|
|
35
|
-
w: (
|
|
36
|
-
center: bottom,
|
|
37
|
-
corner-open: calc(var(--offset) * -1) 0,
|
|
38
|
-
corners: (wn: top, ws: bottom),
|
|
39
|
-
edge: right,
|
|
40
|
-
open: calc(var(--offset) * -1) 50%,
|
|
41
|
-
rest: 0 50%
|
|
42
|
-
)
|
|
43
|
-
);
|
|
44
|
-
|
|
45
|
-
|
|
46
7
|
.tooltip {
|
|
47
8
|
cursor: pointer;
|
|
48
9
|
position: relative;
|
|
@@ -54,20 +15,25 @@ $sides: (
|
|
|
54
15
|
cursor: inherit;
|
|
55
16
|
}
|
|
56
17
|
|
|
57
|
-
// 'tooltip.menu''s layer
|
|
58
|
-
//
|
|
18
|
+
// 'tooltip.menu''s layer. Qualified by the layer as well, keeping the specificity the panels had under the old
|
|
19
|
+
// wrapper.
|
|
59
20
|
&--menu {
|
|
21
|
+
// Covers the trigger and grows out of it: 'morph()' seeds the trigger's box as the clip and the shape's insets,
|
|
22
|
+
// which spring out to the panel's own box.
|
|
60
23
|
&.tooltip-menu-layer > .tooltip-menu-panel.tooltip-menu-panel--expand {
|
|
61
24
|
background: transparent;
|
|
62
25
|
box-shadow: none;
|
|
63
26
|
clip-path: inset(var(--morph-top) var(--morph-right) var(--morph-bottom) var(--morph-left) round var(--morph-radius));
|
|
27
|
+
opacity: 0;
|
|
64
28
|
overflow: visible;
|
|
65
|
-
// 'transform', since the placement it composes as tooltip content owns 'translate'.
|
|
66
|
-
transform: translateX(var(--shift-x));
|
|
67
29
|
transition:
|
|
68
30
|
clip-path var(--expand-duration) var(--expand-timing-function),
|
|
69
31
|
opacity var(--expand-fade-duration) var(--expand-fade-timing-function) var(--expand-fade-delay);
|
|
32
|
+
z-index: 9;
|
|
33
|
+
|
|
70
34
|
|
|
35
|
+
// The shape's fill and shadow; its box resizes with the clip, rather than being clipped itself, so the
|
|
36
|
+
// shadow follows the shape instead of being cut off by it.
|
|
71
37
|
&::before {
|
|
72
38
|
background: var(--background);
|
|
73
39
|
border-radius: var(--morph-radius);
|
|
@@ -75,9 +41,9 @@ $sides: (
|
|
|
75
41
|
content: '';
|
|
76
42
|
inset: var(--morph-top) var(--morph-right) var(--morph-bottom) var(--morph-left);
|
|
77
43
|
position: absolute;
|
|
78
|
-
transition:
|
|
79
|
-
|
|
80
|
-
|
|
44
|
+
transition-duration: var(--expand-duration);
|
|
45
|
+
transition-property: border-radius, inset;
|
|
46
|
+
transition-timing-function: var(--expand-timing-function);
|
|
81
47
|
z-index: -1;
|
|
82
48
|
}
|
|
83
49
|
|
|
@@ -85,13 +51,15 @@ $sides: (
|
|
|
85
51
|
// never move, only fade, so a 'highlight' measures them where they land even mid-cascade; it places itself
|
|
86
52
|
// with 'translate', so it arrives with the panel instead. Closing fades them out together; the shrinking
|
|
87
53
|
// shape carries the motion.
|
|
88
|
-
> :not(.highlight) {
|
|
54
|
+
> .tooltip-menu-scroller > :not(.highlight) {
|
|
89
55
|
animation: tooltip-menu-expand-out var(--expand-content-duration) var(--expand-content-timing-function);
|
|
90
56
|
opacity: 0;
|
|
91
57
|
}
|
|
92
58
|
|
|
59
|
+
|
|
93
60
|
@include tokens.state(active) {
|
|
94
61
|
clip-path: inset(calc(var(--expand-bleed) * -1) round calc(var(--border-radius) + var(--expand-bleed)));
|
|
62
|
+
opacity: 1;
|
|
95
63
|
|
|
96
64
|
&::before {
|
|
97
65
|
border-radius: var(--border-radius);
|
|
@@ -103,7 +71,7 @@ $sides: (
|
|
|
103
71
|
clip-path: none;
|
|
104
72
|
}
|
|
105
73
|
|
|
106
|
-
> :not(.highlight) {
|
|
74
|
+
> .tooltip-menu-scroller > :not(.highlight) {
|
|
107
75
|
animation: tooltip-menu-expand-in var(--expand-content-duration) var(--expand-content-timing-function) calc(var(--expand-content-delay) + var(--index) * var(--expand-stagger)) backwards;
|
|
108
76
|
opacity: 1;
|
|
109
77
|
|
|
@@ -115,7 +83,7 @@ $sides: (
|
|
|
115
83
|
}
|
|
116
84
|
}
|
|
117
85
|
|
|
118
|
-
// Root panel
|
|
86
|
+
// Root panel, under the trigger until 'tooltip.menu' places it on the side with room.
|
|
119
87
|
&.tooltip-menu-layer > .tooltip-menu-panel:not(.tooltip-menu-panel--expand) {
|
|
120
88
|
left: 0;
|
|
121
89
|
opacity: 0;
|
|
@@ -123,10 +91,10 @@ $sides: (
|
|
|
123
91
|
transition:
|
|
124
92
|
opacity var(--close-duration) var(--close-timing-function),
|
|
125
93
|
visibility 0s linear var(--close-duration);
|
|
126
|
-
translate: var(--shift-x) 0;
|
|
127
94
|
visibility: hidden;
|
|
128
95
|
z-index: 9;
|
|
129
96
|
|
|
97
|
+
|
|
130
98
|
// Fades in as quickly as it fades out.
|
|
131
99
|
@include tokens.state(active) {
|
|
132
100
|
opacity: 1;
|
|
@@ -156,6 +124,7 @@ $sides: (
|
|
|
156
124
|
min-width: var(--min-width);
|
|
157
125
|
opacity: 0;
|
|
158
126
|
overflow: hidden;
|
|
127
|
+
position: absolute;
|
|
159
128
|
scale: var(--scale);
|
|
160
129
|
transition:
|
|
161
130
|
opacity var(--transition-duration) var(--transition-timing-function),
|
|
@@ -176,44 +145,17 @@ $sides: (
|
|
|
176
145
|
}
|
|
177
146
|
|
|
178
147
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
&--context {
|
|
188
|
-
position: absolute;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
@each $side, $placement in $sides {
|
|
192
|
-
$edge: map.get($placement, edge);
|
|
193
|
-
|
|
194
|
-
&--#{$side} {
|
|
195
|
-
#{map.get($placement, center)}: 50%;
|
|
196
|
-
#{$edge}: calc(100% + var(--spacer) - var(--offset));
|
|
197
|
-
position: absolute;
|
|
198
|
-
transform-origin: center $edge;
|
|
199
|
-
translate: map.get($placement, rest);
|
|
200
|
-
|
|
201
|
-
#{$active} {
|
|
202
|
-
translate: map.get($placement, open);
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
@each $corner, $align in map.get($placement, corners) {
|
|
207
|
-
&--#{$corner} {
|
|
208
|
-
#{$align}: 0;
|
|
209
|
-
#{$edge}: calc(100% + var(--spacer) - var(--offset));
|
|
210
|
-
position: absolute;
|
|
211
|
-
transform-origin: $align $edge;
|
|
148
|
+
// Covers the trigger and grows out of it toward the corner with room: 'morph()' seeds the trigger's box as the
|
|
149
|
+
// clip, which springs out to the content's own box as it fades in, and closes back onto the trigger.
|
|
150
|
+
&--expand {
|
|
151
|
+
clip-path: inset(var(--morph-top) var(--morph-right) var(--morph-bottom) var(--morph-left) round var(--morph-radius));
|
|
152
|
+
transition:
|
|
153
|
+
clip-path var(--expand-duration) var(--expand-timing-function),
|
|
154
|
+
opacity var(--expand-fade-duration) var(--expand-fade-timing-function) var(--expand-fade-delay);
|
|
212
155
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
}
|
|
156
|
+
// Open, the clip overhangs the box so the shadow isn't cut off.
|
|
157
|
+
#{$active} {
|
|
158
|
+
clip-path: inset(calc(var(--expand-bleed) * -1) round calc(var(--border-radius) + var(--expand-bleed)));
|
|
217
159
|
}
|
|
218
160
|
}
|
|
219
161
|
|
|
@@ -274,6 +216,33 @@ $sides: (
|
|
|
274
216
|
}
|
|
275
217
|
|
|
276
218
|
|
|
219
|
+
// Placed by 'tooltip.onclick' and 'tooltip.onhover' as it opens: beside the trigger on the side with room, or
|
|
220
|
+
// over it with '--expand', sized as measured and capped to the room it has. It travels out from the trigger
|
|
221
|
+
// and scales from it. Content they don't open places itself.
|
|
222
|
+
&.--placed {
|
|
223
|
+
left: var(--place-x);
|
|
224
|
+
max-height: var(--place-max-height);
|
|
225
|
+
max-width: min(var(--max-width), var(--place-max-width));
|
|
226
|
+
top: var(--place-y);
|
|
227
|
+
transform-origin: var(--place-origin);
|
|
228
|
+
translate:
|
|
229
|
+
calc(var(--offset) * var(--place-travel-x) * -1)
|
|
230
|
+
calc(var(--offset) * var(--place-travel-y) * -1);
|
|
231
|
+
// Its own width while it is measured.
|
|
232
|
+
width: var(--place-width, var(--width));
|
|
233
|
+
|
|
234
|
+
#{$active} {
|
|
235
|
+
translate: 0 0;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
// Scrolls past the room it was capped to. A morph keeps its overflow visible for the shape to reach back to the
|
|
240
|
+
// trigger.
|
|
241
|
+
&.--placed:not(.tooltip-content--morph, .tooltip-message--morph) {
|
|
242
|
+
overflow-y: auto;
|
|
243
|
+
overscroll-behavior: contain;
|
|
244
|
+
}
|
|
245
|
+
|
|
277
246
|
#{$active} {
|
|
278
247
|
opacity: 1;
|
|
279
248
|
scale: 1;
|
|
@@ -287,79 +256,16 @@ $sides: (
|
|
|
287
256
|
}
|
|
288
257
|
|
|
289
258
|
&-menu {
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
flex-shrink: 0;
|
|
295
|
-
height: var(--size);
|
|
296
|
-
margin-inline: var(--margin-horizontal);
|
|
259
|
+
// The path is a quarter of the box wide on either side of its centre, which it turns about, so the box's
|
|
260
|
+
// empty sides are taken back out of the row.
|
|
261
|
+
&-chevron.icon {
|
|
262
|
+
margin-inline: calc(var(--margin-horizontal) - var(--size) / 4);
|
|
297
263
|
opacity: var(--opacity);
|
|
298
|
-
rotate: var(--rotate);
|
|
299
|
-
transition: rotate var(--transition-duration) var(--transition-timing-function);
|
|
300
|
-
width: var(--size);
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
&-entry {
|
|
304
|
-
position: relative;
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
// Sub-panels start clipped to the row that opened them, so the row reads as the panel's header, then the
|
|
308
|
-
// clip grows downward.
|
|
309
|
-
> .tooltip-menu-panel {
|
|
310
|
-
clip-path: inset(
|
|
311
|
-
var(--padding-vertical)
|
|
312
|
-
var(--padding-horizontal)
|
|
313
|
-
calc(100% - var(--padding-vertical) - var(--item-height))
|
|
314
|
-
var(--padding-horizontal)
|
|
315
|
-
round var(--item-border-radius)
|
|
316
|
-
);
|
|
317
|
-
inset-inline: calc(var(--padding-horizontal) * -1);
|
|
318
|
-
pointer-events: none;
|
|
319
|
-
top: calc(var(--padding-vertical) * -1);
|
|
320
|
-
transition:
|
|
321
|
-
clip-path var(--close-duration) var(--close-timing-function),
|
|
322
|
-
visibility 0s linear var(--close-duration);
|
|
323
|
-
visibility: hidden;
|
|
324
|
-
width: auto;
|
|
325
|
-
z-index: 2;
|
|
326
|
-
|
|
327
|
-
// Sub-panels snap open and closed; the scrim and title fades keep their timing.
|
|
328
|
-
@media (prefers-reduced-motion: reduce) {
|
|
329
|
-
transition-duration: 0s;
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
@include tokens.state(active) {
|
|
333
|
-
clip-path: inset(calc(var(--bleed) * -1) round calc(var(--border-radius) + var(--bleed)));
|
|
334
|
-
pointer-events: auto;
|
|
335
|
-
transition: clip-path var(--open-duration) var(--open-timing-function);
|
|
336
|
-
visibility: visible;
|
|
337
|
-
|
|
338
|
-
@media (prefers-reduced-motion: reduce) {
|
|
339
|
-
transition-duration: 0s;
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
&.tooltip-menu-panel--settled {
|
|
343
|
-
clip-path: none;
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
// Above the parent's scrim, so the open child panel stays undimmed.
|
|
350
|
-
&--open {
|
|
351
|
-
z-index: 2;
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
// An item's 'hidden' takes its whole row out; the item's own 'display' would outrank the attribute.
|
|
356
|
-
&:has(> [hidden]) {
|
|
357
|
-
display: none;
|
|
358
|
-
}
|
|
359
264
|
}
|
|
360
265
|
|
|
361
|
-
|
|
362
|
-
|
|
266
|
+
// An item's 'hidden' takes its whole row out; the item's own 'display' would outrank the attribute.
|
|
267
|
+
&-entry:has(> [hidden]) {
|
|
268
|
+
display: none;
|
|
363
269
|
}
|
|
364
270
|
|
|
365
271
|
&-header,
|
|
@@ -372,6 +278,13 @@ $sides: (
|
|
|
372
278
|
padding-inline: var(--padding-horizontal);
|
|
373
279
|
}
|
|
374
280
|
|
|
281
|
+
// Clear of the panel's edges as the rows are, the scroller's padding insetting those.
|
|
282
|
+
&-header {
|
|
283
|
+
cursor: pointer;
|
|
284
|
+
flex-shrink: 0;
|
|
285
|
+
margin: var(--inset-vertical) var(--inset-horizontal) 0;
|
|
286
|
+
}
|
|
287
|
+
|
|
375
288
|
&-hint {
|
|
376
289
|
color: var(--color);
|
|
377
290
|
font-size: var(--font-size);
|
|
@@ -432,15 +345,17 @@ $sides: (
|
|
|
432
345
|
}
|
|
433
346
|
}
|
|
434
347
|
|
|
348
|
+
// Capped to the room 'tooltip.menu' finds for it, past which its rows scroll.
|
|
435
349
|
&-panel {
|
|
436
350
|
background: var(--background);
|
|
437
351
|
border-radius: var(--border-radius);
|
|
438
352
|
box-shadow: var(--box-shadow);
|
|
439
353
|
color: var(--color);
|
|
354
|
+
display: flex;
|
|
355
|
+
flex-direction: column;
|
|
440
356
|
font-size: var(--font-size);
|
|
441
357
|
isolation: isolate;
|
|
442
|
-
|
|
443
|
-
padding-inline: var(--padding-horizontal);
|
|
358
|
+
max-height: var(--max-height);
|
|
444
359
|
position: absolute;
|
|
445
360
|
width: var(--width);
|
|
446
361
|
|
|
@@ -455,10 +370,45 @@ $sides: (
|
|
|
455
370
|
z-index: 1;
|
|
456
371
|
}
|
|
457
372
|
|
|
458
|
-
//
|
|
459
|
-
//
|
|
460
|
-
|
|
461
|
-
|
|
373
|
+
// Sub-panels cover their parent, above its scrim, from the row that opened them ('tooltip.menu' writes
|
|
374
|
+
// '--lift' when it has to rise to stay on screen). They start clipped to that row, so the row reads as the
|
|
375
|
+
// panel's header, then the clip grows.
|
|
376
|
+
> .tooltip-menu-panel {
|
|
377
|
+
clip-path: inset(
|
|
378
|
+
calc(var(--inset-vertical) + var(--lift))
|
|
379
|
+
var(--inset-horizontal)
|
|
380
|
+
calc(100% - var(--inset-vertical) - var(--item-height) - var(--lift))
|
|
381
|
+
var(--inset-horizontal)
|
|
382
|
+
round var(--item-border-radius)
|
|
383
|
+
);
|
|
384
|
+
inset-inline: 0;
|
|
385
|
+
pointer-events: none;
|
|
386
|
+
transition:
|
|
387
|
+
clip-path var(--close-duration) var(--close-timing-function),
|
|
388
|
+
visibility 0s linear var(--close-duration);
|
|
389
|
+
visibility: hidden;
|
|
390
|
+
width: auto;
|
|
391
|
+
z-index: 2;
|
|
392
|
+
|
|
393
|
+
// Sub-panels snap open and closed; the scrim and title fades keep their timing.
|
|
394
|
+
@media (prefers-reduced-motion: reduce) {
|
|
395
|
+
transition-duration: 0s;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
@include tokens.state(active) {
|
|
399
|
+
clip-path: inset(calc(var(--bleed) * -1) round calc(var(--border-radius) + var(--bleed)));
|
|
400
|
+
pointer-events: auto;
|
|
401
|
+
transition: clip-path var(--open-duration) var(--open-timing-function);
|
|
402
|
+
visibility: visible;
|
|
403
|
+
|
|
404
|
+
@media (prefers-reduced-motion: reduce) {
|
|
405
|
+
transition-duration: 0s;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
&.tooltip-menu-panel--settled {
|
|
409
|
+
clip-path: none;
|
|
410
|
+
}
|
|
411
|
+
}
|
|
462
412
|
}
|
|
463
413
|
|
|
464
414
|
|
|
@@ -469,17 +419,32 @@ $sides: (
|
|
|
469
419
|
}
|
|
470
420
|
}
|
|
471
421
|
|
|
422
|
+
// Its padding is the panel's inset, so a row scrolled to by keyboard stops clear of the edge it scrolls under.
|
|
423
|
+
&-scroller {
|
|
424
|
+
min-height: 0;
|
|
425
|
+
overscroll-behavior: contain;
|
|
426
|
+
padding: var(--inset-vertical) var(--inset-horizontal);
|
|
427
|
+
position: relative;
|
|
428
|
+
scroll-padding-block: var(--inset-vertical);
|
|
429
|
+
|
|
430
|
+
// A branch panel's rows start right under its header.
|
|
431
|
+
.tooltip-menu-header + & {
|
|
432
|
+
padding-top: 0;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
// The highlight writes the row's own rounding to '--border-radius'; rows are measured whole, so the layer
|
|
436
|
+
// takes the items' rounding instead.
|
|
437
|
+
> .highlight {
|
|
438
|
+
border-radius: var(--item-border-radius);
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
|
|
472
442
|
// Regular and bold copies of the title are stacked; crossfading them morphs the weight without reflowing the
|
|
473
443
|
// label.
|
|
474
444
|
&-title {
|
|
475
445
|
display: grid;
|
|
476
446
|
|
|
477
447
|
|
|
478
|
-
&-bold {
|
|
479
|
-
font-weight: var(--font-weight);
|
|
480
|
-
opacity: var(--title-bold-opacity);
|
|
481
|
-
}
|
|
482
|
-
|
|
483
448
|
&-bold,
|
|
484
449
|
&-regular {
|
|
485
450
|
grid-area: 1 / 1;
|
|
@@ -488,6 +453,11 @@ $sides: (
|
|
|
488
453
|
transition: opacity var(--open-duration) var(--open-timing-function);
|
|
489
454
|
}
|
|
490
455
|
|
|
456
|
+
&-bold {
|
|
457
|
+
font-weight: var(--font-weight);
|
|
458
|
+
opacity: var(--title-bold-opacity);
|
|
459
|
+
}
|
|
460
|
+
|
|
491
461
|
&-regular {
|
|
492
462
|
opacity: var(--title-regular-opacity);
|
|
493
463
|
}
|
|
@@ -512,7 +482,7 @@ $sides: (
|
|
|
512
482
|
|
|
513
483
|
// A popover, so it sits in the top layer; the UA popover styles are undone here. The padding on the anchor side is
|
|
514
484
|
// the gap to the trigger, which also carries the pointer across to interactive content. 'tooltip.shared' sets the
|
|
515
|
-
// '--shared-*' size and position.
|
|
485
|
+
// '--shared-*' size and position, and the point its box scales from.
|
|
516
486
|
&-shared {
|
|
517
487
|
@extend %reset-popover;
|
|
518
488
|
box-sizing: content-box;
|
|
@@ -532,12 +502,12 @@ $sides: (
|
|
|
532
502
|
}
|
|
533
503
|
}
|
|
534
504
|
|
|
535
|
-
// Only while moving between triggers; a fresh open appears in place.
|
|
505
|
+
// Only while moving between triggers; a fresh open appears in place. Its size eases as well as its place: the
|
|
506
|
+
// box resizes to the next trigger's content, which a scale would distort.
|
|
536
507
|
&--gliding {
|
|
537
|
-
transition:
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
width var(--glide-duration) var(--glide-timing-function);
|
|
508
|
+
transition-duration: var(--glide-duration);
|
|
509
|
+
transition-property: height, translate, width;
|
|
510
|
+
transition-timing-function: var(--glide-timing-function);
|
|
541
511
|
}
|
|
542
512
|
|
|
543
513
|
&--interactive {
|
|
@@ -558,6 +528,7 @@ $sides: (
|
|
|
558
528
|
overflow: hidden;
|
|
559
529
|
position: relative;
|
|
560
530
|
scale: var(--scale);
|
|
531
|
+
transform-origin: var(--shared-origin);
|
|
561
532
|
transition:
|
|
562
533
|
filter var(--close-duration) var(--close-timing-function),
|
|
563
534
|
opacity var(--close-duration) var(--close-timing-function),
|
|
@@ -675,28 +646,24 @@ $sides: (
|
|
|
675
646
|
// every side, holds there, then settles into the trigger's exact box. The hold matters: without it, edges still
|
|
676
647
|
// arriving (the travel differs per direction) overlap with the final shrink, so it never reads as having landed.
|
|
677
648
|
@keyframes tooltip-morph-close {
|
|
649
|
+
$landed: inset(
|
|
650
|
+
calc(var(--morph-top) - var(--morph-land))
|
|
651
|
+
calc(var(--morph-right) - var(--morph-land))
|
|
652
|
+
calc(var(--morph-bottom) - var(--morph-land))
|
|
653
|
+
calc(var(--morph-left) - var(--morph-land))
|
|
654
|
+
round calc(var(--morph-radius) + var(--morph-land))
|
|
655
|
+
);
|
|
656
|
+
|
|
678
657
|
0% {
|
|
679
658
|
animation-timing-function: var(--morph-shrink-timing-function);
|
|
680
659
|
clip-path: inset(0 round var(--border-radius));
|
|
681
660
|
}
|
|
682
661
|
55% {
|
|
683
|
-
clip-path:
|
|
684
|
-
calc(var(--morph-top) - var(--morph-land))
|
|
685
|
-
calc(var(--morph-right) - var(--morph-land))
|
|
686
|
-
calc(var(--morph-bottom) - var(--morph-land))
|
|
687
|
-
calc(var(--morph-left) - var(--morph-land))
|
|
688
|
-
round calc(var(--morph-radius) + var(--morph-land))
|
|
689
|
-
);
|
|
662
|
+
clip-path: $landed;
|
|
690
663
|
}
|
|
691
664
|
80% {
|
|
692
665
|
animation-timing-function: var(--morph-settle-timing-function);
|
|
693
|
-
clip-path:
|
|
694
|
-
calc(var(--morph-top) - var(--morph-land))
|
|
695
|
-
calc(var(--morph-right) - var(--morph-land))
|
|
696
|
-
calc(var(--morph-bottom) - var(--morph-land))
|
|
697
|
-
calc(var(--morph-left) - var(--morph-land))
|
|
698
|
-
round calc(var(--morph-radius) + var(--morph-land))
|
|
699
|
-
);
|
|
666
|
+
clip-path: $landed;
|
|
700
667
|
}
|
|
701
668
|
100% {
|
|
702
669
|
clip-path: inset(var(--morph-top) var(--morph-right) var(--morph-bottom) var(--morph-left) round var(--morph-radius));
|