@mkbabb/glass-ui 3.8.0 → 3.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -6
- package/dist/{CardAction-q2qHCJFG.js → CardAction-DuArVky-.js} +4 -4
- package/dist/{CommandShortcut-SzWRhROC.js → CommandShortcut-CefCj5mt.js} +7 -7
- package/dist/{ContextMenuSubContent-Do977Cbf.js → ContextMenuSubContent-Bhg4f5jX.js} +3 -3
- package/dist/{DataTable-CvlWXz65.js → DataTable-CUHMukiQ.js} +1 -1
- package/dist/{DialogContent-DjZWT3lK.js → DialogContent-BRkT1cjP.js} +1 -1
- package/dist/{NumberFieldContent-CLNVR1iY.js → NumberFieldContent-BbLOh8RU.js} +2 -2
- package/dist/{SelectScrollDownButton-C7TRe-ep.js → SelectScrollDownButton-T32cVFeM.js} +3 -3
- package/dist/{SelectSeparator-L8pPEn4L.js → SelectSeparator-C4Ql0gzV.js} +1 -1
- package/dist/{TabsList-qyHZ2lKY.js → TabsList-B8CVOQPC.js} +2 -2
- package/dist/{Toaster-CabYEEF_.js → Toaster-1rYWrmAm.js} +1 -1
- package/dist/{ToggleGroupItem-CkXUcBlt.js → ToggleGroupItem-Cev4pOVK.js} +4 -4
- package/dist/animated-digit.js +1 -1
- package/dist/api/index.d.ts +1 -1
- package/dist/api.js +1 -1
- package/dist/aurora.js +10 -10
- package/dist/{badge-DHQrc_GQ.js → badge-BvwvT50i.js} +4 -4
- package/dist/badge.js +1 -1
- package/dist/{button-CAywcrhO.js → button-DN39cGqL.js} +13 -12
- package/dist/button.js +1 -1
- package/dist/card.js +1 -1
- package/dist/carousel.js +1 -1
- package/dist/color.js +1 -1
- package/dist/command.js +1 -1
- package/dist/{compile-BBTRjvQS.js → compile-DAjIoEy2.js} +1 -1
- package/dist/components/custom/configurator/ConfiguratorLayer.vue.d.ts +1 -1
- package/dist/components/custom/dock/DockSeparator.vue.d.ts +3 -0
- package/dist/components/custom/dock/GlassDock.vue.d.ts +45 -63
- package/dist/components/custom/dock/composables/dockContext.d.ts +7 -0
- package/dist/components/custom/dock/index.d.ts +2 -1
- package/dist/components/custom/goo-blob/composables/useBlobMood.d.ts +19 -5
- package/dist/components/custom/tabs/SegmentedTabs.vue.d.ts +92 -0
- package/dist/components/custom/tabs/composables/useTabIndicator.d.ts +49 -0
- package/dist/components/custom/tabs/index.d.ts +2 -5
- package/dist/components/ui/button/index.d.ts +1 -1
- package/dist/components/ui/card/Card.vue.d.ts +5 -3
- package/dist/components/ui/carousel/CarouselNext.vue.d.ts +1 -1
- package/dist/components/ui/carousel/CarouselPrevious.vue.d.ts +1 -1
- package/dist/components/ui/carousel/GlassCarouselPager.vue.d.ts +3 -4
- package/dist/components/ui/slider/index.d.ts +14 -7
- package/dist/components/ui/tabs/TabsList.vue.d.ts +1 -1
- package/dist/composables/context/createContext.d.ts +1 -1
- package/dist/configurator.js +1 -1
- package/dist/confirm-dialog.js +1 -1
- package/dist/constellation.js +1 -1
- package/dist/context-menu.js +1 -1
- package/dist/controls.js +1 -1
- package/dist/dark.js +1 -1
- package/dist/data-table.js +1 -1
- package/dist/deck-progress.js +1 -1
- package/dist/dialog.js +1 -1
- package/dist/dock.js +256 -243
- package/dist/{dropdown-menu-B_4bWyyG.js → dropdown-menu-D77jX6Df.js} +3 -3
- package/dist/dropdown-menu.js +1 -1
- package/dist/expandable-container.js +1 -1
- package/dist/forms.js +5 -5
- package/dist/fourier-field.js +3 -3
- package/dist/glass-ui.css +1 -1
- package/dist/glass-ui.js +101 -104
- package/dist/goo-blob.js +36 -32
- package/dist/hover-popover.js +1 -1
- package/dist/icon-tooltip.js +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/keyboard.js +1 -1
- package/dist/labeled-field.js +4 -4
- package/dist/{menuItemVariants-DKM85SNE.js → menuItemVariants-CCoBNkU5.js} +1 -1
- package/dist/motion-core.js +4 -4
- package/dist/motion.js +2 -2
- package/dist/number-field.js +1 -1
- package/dist/pulse.js +1 -1
- package/dist/reactive.js +1 -1
- package/dist/scrolling-text.js +1 -1
- package/dist/search.js +4 -4
- package/dist/select.js +2 -2
- package/dist/{slider-D9puf-Ko.js → slider-DC2mwuoe.js} +1 -1
- package/dist/slider.js +1 -1
- package/dist/sortable-list.js +1 -1
- package/dist/status-dot.js +17 -16
- package/dist/styles/animations.css +6 -2
- package/dist/styles/components.css +1 -1
- package/dist/styles/dock/density.css +230 -0
- package/dist/styles/dock/layer-group.css +263 -0
- package/dist/styles/dock/layers.css +355 -0
- package/dist/styles/dock/morph.css +244 -0
- package/dist/styles/dock/overflow.css +201 -0
- package/dist/styles/dock/shell.css +457 -0
- package/dist/styles/dock-controls.css +166 -32
- package/dist/styles/dock.css +42 -1349
- package/dist/styles/glass.css +396 -75
- package/dist/styles/index.css +12 -11
- package/dist/styles/theme.css +51 -0
- package/dist/styles/tokens.css +501 -55
- package/dist/styles/utilities.css +89 -39
- package/dist/tabs.js +182 -151
- package/dist/timeline.js +1 -1
- package/dist/toast.js +1 -1
- package/dist/toggle-group.js +1 -1
- package/dist/{useAnimatedNumber-C_3wZLx4.js → useAnimatedNumber-C5I3wWd8.js} +1 -1
- package/dist/{useConfiguratorState-CMff4GzH.js → useConfiguratorState-DxAqksK6.js} +21 -10
- package/dist/watercolor-dot.js +1 -1
- package/package.json +32 -33
- package/src/styles/animations.css +6 -2
- package/src/styles/dock/density.css +230 -0
- package/src/styles/dock/layer-group.css +263 -0
- package/src/styles/dock/layers.css +355 -0
- package/src/styles/dock/morph.css +244 -0
- package/src/styles/dock/overflow.css +201 -0
- package/src/styles/dock/shell.css +457 -0
- package/src/styles/dock-controls.css +166 -32
- package/src/styles/dock.css +42 -1349
- package/src/styles/glass.css +396 -75
- package/src/styles/index.css +12 -11
- package/src/styles/theme.css +51 -0
- package/src/styles/tokens.css +501 -55
- package/src/styles/utilities.css +89 -39
- package/dist/DiscoGlyph-CG0F410s.js +0 -132
- package/dist/GlyphFace-DRjDkB0s.js +0 -51
- package/dist/UnderlineTabs-Uxn-R3MT.js +0 -39
- package/dist/components/custom/aurora/constants/shaders/painterly.wgsl.d.ts +0 -7
- package/dist/components/custom/aurora/constants/shaders/wake.wgsl.d.ts +0 -4
- package/dist/components/custom/disco-glyph/DiscoGlyph.vue.d.ts +0 -58
- package/dist/components/custom/disco-glyph/index.d.ts +0 -1
- package/dist/components/custom/glass-carousel/GlassCarousel.vue.d.ts +0 -36
- package/dist/components/custom/glass-carousel/GlassCarouselItem.vue.d.ts +0 -28
- package/dist/components/custom/glass-carousel/index.d.ts +0 -4
- package/dist/components/custom/glass-carousel/useGlassCarousel.d.ts +0 -30
- package/dist/components/custom/glyph-face/GlyphFace.vue.d.ts +0 -64
- package/dist/components/custom/glyph-face/index.d.ts +0 -2
- package/dist/components/custom/glyph-face/keys.d.ts +0 -9
- package/dist/components/custom/responsive-tabs/ResponsiveTabs.vue.d.ts +0 -73
- package/dist/components/custom/responsive-tabs/index.d.ts +0 -2
- package/dist/components/custom/tabs/BouncyTabs.vue.d.ts +0 -27
- package/dist/components/custom/tabs/BouncyToggle.vue.d.ts +0 -60
- package/dist/components/custom/tabs/UnderlineTabs.vue.d.ts +0 -20
- package/dist/components/custom/tabs/composables/useBouncySlider.d.ts +0 -39
- package/dist/disco-glyph.d.ts +0 -1
- package/dist/disco-glyph.js +0 -2
- package/dist/glass-carousel.d.ts +0 -1
- package/dist/glass-carousel.js +0 -219
- package/dist/glyph-face.d.ts +0 -1
- package/dist/glyph-face.js +0 -3
- package/dist/keys-BsYjEFOW.js +0 -9
- package/dist/responsive-tabs.d.ts +0 -1
- package/dist/responsive-tabs.js +0 -95
- package/dist/styles/disco-glyph.css +0 -26
- package/dist/styles/glyph-face.css +0 -92
- package/src/styles/disco-glyph.css +0 -26
- package/src/styles/glyph-face.css +0 -92
- /package/dist/{DeckProgress-AVgbIULY.js → DeckProgress-Dmk4_AKN.js} +0 -0
- /package/dist/{HoverPopover-D56O6Ylp.js → HoverPopover-2LOIW34a.js} +0 -0
- /package/dist/{IconTooltip-D2T5nYOM.js → IconTooltip-yefK7cJc.js} +0 -0
- /package/dist/{Input-DVG_J0ne.js → Input-DWQQIOC4.js} +0 -0
- /package/dist/{ScrollingText-CVyqxvfv.js → ScrollingText-BPP84wKo.js} +0 -0
- /package/dist/{color-DMLTunJK.js → color-8jBjWiJ6.js} +0 -0
- /package/dist/{constants-BPOqYJAm.js → constants-CS75AWHG.js} +0 -0
- /package/dist/{presets-D1XPuTj-.js → presets-BKVyQfbt.js} +0 -0
- /package/dist/{prng-COGhh02-.js → prng-wHuHlNHE.js} +0 -0
- /package/dist/{useGlobalDark-D3EBWzXK.js → useGlobalDark-yhL4Wp-s.js} +0 -0
- /package/dist/{useIntersectionPause-Bj4sPkMh.js → useIntersectionPause-Cc-H9ees.js} +0 -0
- /package/dist/{useInterval-CcLfq2WU.js → useInterval-Dsmqwi03.js} +0 -0
- /package/dist/{useKeyboardShortcuts-BXWXOZ-9.js → useKeyboardShortcuts-Be3w_Rwk.js} +0 -0
- /package/dist/{useScrollProgress-C9ysDic5.js → useScrollProgress-CAH8Ofwt.js} +0 -0
- /package/dist/{useSortable-MGAbCGVJ.js → useSortable-C8ReQ50P.js} +0 -0
- /package/dist/{useTextHighlight-9nMW23Qb.js → useTextHighlight-DON84L8w.js} +0 -0
|
@@ -191,14 +191,32 @@
|
|
|
191
191
|
AL-W10 SLIM (X6 §M-1 + Y7 §3 + DESIGN.md §L3). I compose this
|
|
192
192
|
class onto every interactive surface that wants the iOS tap-
|
|
193
193
|
squish idiom; the press scales to `--scale-press` (0.96, the
|
|
194
|
-
canonical iOS `.regular` control rung)
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
194
|
+
canonical iOS `.regular` control rung). I keep this as a single
|
|
195
|
+
canonical rung — NOT a 3-rung ladder. The one outlier I leave
|
|
196
|
+
alone is the button `0.97` (`--scale-press-btn`), which consumes
|
|
197
|
+
its own slightly-softer token directly. The dock control now
|
|
198
|
+
tracks the canonical `--scale-press` (0.96) too (AT.W7-dock-b
|
|
199
|
+
press canon — the prior deeper `0.92` was retired to ONE source).
|
|
200
|
+
|
|
201
|
+
AX.W52 §6 doctrine — the `scale` register is reconciled onto
|
|
202
|
+
`--spring-smooth` (was `--spring-snappy`), the ONE button/interactive
|
|
203
|
+
scale register the §6 easing doctrine records and the gate asserts
|
|
204
|
+
across `.btn-pill`/`.tap-squish`/`.glass-btn`/`btn-interactive`. At
|
|
205
|
+
ζ=0.86 `--spring-smooth` settles a press crisply with a sub-perceptual
|
|
206
|
+
(~0.5%) peak — no visible bounce — so press still reads alive while
|
|
207
|
+
hover reads as a smooth glide on the SAME spring.
|
|
208
|
+
|
|
209
|
+
The transition lists the SURFACE legs (bg/border/box-shadow/color/
|
|
210
|
+
opacity) on the bezier `--ease-standard` alongside the spring `scale`
|
|
211
|
+
leg — the SAME coherent set `.btn-pill` carries. This is load-bearing:
|
|
212
|
+
`.tap-squish` and `.btn-pill` are co-composed on the button base and
|
|
213
|
+
this `transition` shorthand would otherwise CLOBBER `.btn-pill`'s
|
|
214
|
+
surface legs down to a scale-only animation (the cascade bug that left
|
|
215
|
+
every button transitioning ONLY `scale` — the live-readback RED). With
|
|
216
|
+
both classes carrying the full set, whichever wins the surface cross-
|
|
217
|
+
fade survives. On a non-button press surface the extra legs are inert
|
|
218
|
+
unless that prop changes, in which case a smooth cross-fade is the
|
|
219
|
+
desired interactive read anyway.
|
|
202
220
|
|
|
203
221
|
Under PRM I retire the press transform entirely and lean on the
|
|
204
222
|
consumer's own hover/active bg-tint cascade to acknowledge the
|
|
@@ -206,7 +224,13 @@
|
|
|
206
224
|
.tap-squish {
|
|
207
225
|
/* AQ.W3 §W3.2 identity base */
|
|
208
226
|
scale: 1;
|
|
209
|
-
transition:
|
|
227
|
+
transition:
|
|
228
|
+
background-color var(--duration-fast) var(--ease-standard),
|
|
229
|
+
border-color var(--duration-fast) var(--ease-standard),
|
|
230
|
+
box-shadow var(--duration-fast) var(--ease-standard),
|
|
231
|
+
color var(--duration-fast) var(--ease-standard),
|
|
232
|
+
opacity var(--duration-fast) var(--ease-standard),
|
|
233
|
+
scale var(--duration-fast) var(--spring-smooth);
|
|
210
234
|
transform-origin: center center;
|
|
211
235
|
}
|
|
212
236
|
.tap-squish:active {
|
|
@@ -683,9 +707,12 @@
|
|
|
683
707
|
`--duration-fast` + `--ease-standard` tokens. */
|
|
684
708
|
@utility scale-on-hover {
|
|
685
709
|
/* Individual-transform identity base (AQ.W3 §W3.2). Transition the `scale`
|
|
686
|
-
longhand (not `transform`) so the migrated hover scale animates.
|
|
710
|
+
longhand (not `transform`) so the migrated hover scale animates.
|
|
711
|
+
AX.W52 §6 doctrine — the `scale` transform leg rides `--spring-smooth`
|
|
712
|
+
(the settle register), NOT the bezier `--ease-standard` (a transform on a
|
|
713
|
+
bezier reads mechanical; springs read alive on transform). */
|
|
687
714
|
scale: 1;
|
|
688
|
-
transition: scale var(--duration-fast) var(--
|
|
715
|
+
transition: scale var(--duration-fast) var(--spring-smooth);
|
|
689
716
|
|
|
690
717
|
&:hover {
|
|
691
718
|
scale: var(--scale-hover);
|
|
@@ -1005,22 +1032,28 @@
|
|
|
1005
1032
|
|
|
1006
1033
|
/* ── Interactive-button four-state recipe ────────────────────────────────
|
|
1007
1034
|
`.btn-interactive` carries the canonical "Button-with-spring-hover"
|
|
1008
|
-
four-state contract — transition + hover-scale
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1035
|
+
four-state contract — transition + hover-scale + active-press + disabled-
|
|
1036
|
+
opacity + focus-ring fade-in. The Button primitive's variants emit the four
|
|
1037
|
+
states except `hover:scale-*`; this is the canonical opt-in that adds the
|
|
1038
|
+
spring-hover lift. Consumed by keyframes.js at 7 sites.
|
|
1039
|
+
|
|
1040
|
+
AX.W52 §6 — the hover lift is the restrained `--scale-hover-btn` (1.035, NOT
|
|
1041
|
+
the emphatic 1.08 `--scale-hover`) routed through `--spring-smooth` — the ONE
|
|
1042
|
+
button scale register the §6 doctrine records and the gate asserts across
|
|
1043
|
+
`.btn-pill`/`.tap-squish`/`.glass-btn`/`btn-interactive`. The surface legs
|
|
1044
|
+
stay on the bezier `--ease-standard` (a colour cross-fade reads as a wobble
|
|
1045
|
+
on a spring); only the `scale` transform leg springs. */
|
|
1013
1046
|
@utility btn-interactive {
|
|
1014
1047
|
/* AQ.W3 §W3.2 identity base */
|
|
1015
1048
|
scale: 1;
|
|
1016
1049
|
transition:
|
|
1017
1050
|
background-color var(--duration-fast) var(--ease-standard),
|
|
1018
1051
|
color var(--duration-fast) var(--ease-standard),
|
|
1019
|
-
scale var(--duration-fast) var(--
|
|
1052
|
+
scale var(--duration-fast) var(--spring-smooth),
|
|
1020
1053
|
opacity var(--duration-fast) var(--ease-standard);
|
|
1021
1054
|
|
|
1022
1055
|
&:hover {
|
|
1023
|
-
scale: var(--scale-hover);
|
|
1056
|
+
scale: var(--scale-hover-btn);
|
|
1024
1057
|
}
|
|
1025
1058
|
|
|
1026
1059
|
&:active {
|
|
@@ -1036,11 +1069,11 @@
|
|
|
1036
1069
|
box-shadow: var(--focus-ring-shadow);
|
|
1037
1070
|
outline: none;
|
|
1038
1071
|
/* Fade in; base state has no box-shadow transition → instant
|
|
1039
|
-
removal */
|
|
1072
|
+
removal. The `scale` leg keeps the `--spring-smooth` register. */
|
|
1040
1073
|
transition:
|
|
1041
1074
|
background-color var(--duration-fast) var(--ease-standard),
|
|
1042
1075
|
color var(--duration-fast) var(--ease-standard),
|
|
1043
|
-
scale var(--duration-fast) var(--
|
|
1076
|
+
scale var(--duration-fast) var(--spring-smooth),
|
|
1044
1077
|
opacity var(--duration-fast) var(--ease-standard),
|
|
1045
1078
|
box-shadow var(--duration-fast) var(--ease-standard);
|
|
1046
1079
|
}
|
|
@@ -1068,36 +1101,52 @@ html.no-transition *::after {
|
|
|
1068
1101
|
transition-duration: 0s !important;
|
|
1069
1102
|
}
|
|
1070
1103
|
|
|
1071
|
-
/* ── Forced-colors
|
|
1104
|
+
/* ── Forced-colors focus + silhouette rung (AQ.W2 §5 · generalized AX.W36) ────
|
|
1072
1105
|
Windows High Contrast / forced-colors mode STRIPS `box-shadow` — so the
|
|
1073
1106
|
glass focus rings (box-shadow + `outline: none`) vanish, leaving keyboard
|
|
1074
|
-
users with no visible focus
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1107
|
+
users with no visible focus. Restore a real `outline` keyed to the system
|
|
1108
|
+
`Highlight` color (outline survives forced-colors; box-shadow does not). The
|
|
1109
|
+
box-shadow ring stays the primary in normal mode (it carries the glass
|
|
1110
|
+
aesthetic) — these two are mutually exclusive by media query, NOT a parallel
|
|
1111
|
+
path.
|
|
1112
|
+
|
|
1113
|
+
AX.W36 — the focus-survival selector set is GENERALIZED to the broader
|
|
1114
|
+
interactive surface: the dock CONTROLS (`.dock-icon-button` / `.dock-tab-button`
|
|
1115
|
+
/ `.dock-select-trigger` / `.dock-dropdown-trigger`) + the pill button base
|
|
1116
|
+
(`.btn-pill`) all carry a box-shadow focus ring (dock.css / utilities.css) that
|
|
1117
|
+
vanishes under WHC just like the original five. This is the SAME `Highlight`
|
|
1118
|
+
outline rung extended to cover them — ONE block, ONE path (the glass-language
|
|
1119
|
+
structure-survival skin for the tier panes / StatusDot / floating surfaces lives
|
|
1120
|
+
co-located with the ladder it skins, in glass.css).
|
|
1121
|
+
|
|
1122
|
+
`forced-color-adjust: none` is deliberately NOT used — glass-ui's glassmorphic
|
|
1123
|
+
chrome is decorative and yields to the user's forced palette (css forced-colors
|
|
1124
|
+
guidance). Baseline Widely Available; this IS the fallback mechanism (it only
|
|
1125
|
+
activates under forced-colors), so no nested guard. */
|
|
1085
1126
|
@media (forced-colors: active) {
|
|
1086
1127
|
.focus-ring:focus-visible,
|
|
1087
1128
|
.glass-btn:focus-visible,
|
|
1088
1129
|
.interactive-item:focus-visible,
|
|
1130
|
+
.btn-pill:focus-visible,
|
|
1131
|
+
.dock-icon-button:focus-visible,
|
|
1132
|
+
.dock-tab-button:focus-visible,
|
|
1133
|
+
.dock-select-trigger:focus-visible,
|
|
1134
|
+
.dock-dropdown-trigger:focus-visible,
|
|
1089
1135
|
.input-pill:focus,
|
|
1090
1136
|
.input-pill:focus-visible {
|
|
1091
1137
|
outline: 2px solid Highlight;
|
|
1092
1138
|
outline-offset: 2px;
|
|
1093
1139
|
}
|
|
1094
1140
|
|
|
1095
|
-
/* Structural edges borne ONLY by box-shadow (the hairline catch-light
|
|
1096
|
-
|
|
1097
|
-
|
|
1141
|
+
/* Structural edges borne ONLY by box-shadow (the hairline catch-light + the
|
|
1142
|
+
dock SHELL pill edge) also vanish — restore a real border so the silhouette
|
|
1143
|
+
survives. CanvasText is the system text/border color. The `.glass-dock`
|
|
1144
|
+
shell is OUT of the glass-material group BY DESIGN (it hand-rolls a parallel
|
|
1145
|
+
surface — see glass.css), so it keeps its WHC edge HERE; the five-rung ladder
|
|
1146
|
+
+ `.glass-card` get their WHC border from the co-located glass-language skin
|
|
1147
|
+
in glass.css (one source per surface family, no double-declaration). */
|
|
1098
1148
|
.hairline-accent,
|
|
1099
|
-
.glass-dock
|
|
1100
|
-
.glass-card {
|
|
1149
|
+
.glass-dock {
|
|
1101
1150
|
border: 1px solid CanvasText;
|
|
1102
1151
|
}
|
|
1103
1152
|
}
|
|
@@ -1108,12 +1157,13 @@ html.no-transition *::after {
|
|
|
1108
1157
|
to the WCAG 2.5.5 (44px) minimum — ONE amendment retiring the per-consumer
|
|
1109
1158
|
`min-h-[44px]` one-liners. Token-driven (`--touch-target`); fine-pointer
|
|
1110
1159
|
byte-identical. Targets `Button size="icon"` (via the `data-size="icon"`
|
|
1111
|
-
attr Button.vue reflects), ExpandableContainer +
|
|
1160
|
+
attr Button.vue reflects), ExpandableContainer + SegmentedTabs (responsive
|
|
1161
|
+
mobile Select) triggers.
|
|
1112
1162
|
`min-block/inline-size` only RAISES — a larger explicit size is never lost. */
|
|
1113
1163
|
@media (pointer: coarse) {
|
|
1114
1164
|
[data-size="icon"],
|
|
1115
1165
|
.expandable-container__trigger,
|
|
1116
|
-
.
|
|
1166
|
+
.segmented-tabs__trigger {
|
|
1117
1167
|
min-block-size: var(--touch-target, 2.75rem);
|
|
1118
1168
|
min-inline-size: var(--touch-target, 2.75rem);
|
|
1119
1169
|
}
|
package/dist/tabs.js
CHANGED
|
@@ -1,78 +1,104 @@
|
|
|
1
1
|
import { t as e } from "./cn-DJXf4yaB.js";
|
|
2
2
|
import { t } from "./_plugin-vue_export-helper-ok8pgSl5.js";
|
|
3
|
-
import {
|
|
4
|
-
import { t as
|
|
5
|
-
import { Fragment as
|
|
6
|
-
//#region src/components/custom/tabs/composables/
|
|
7
|
-
function
|
|
8
|
-
let { containerRef: t,
|
|
3
|
+
import { a as n, i as r, o as i, r as a, s as o } from "./SelectScrollDownButton-T32cVFeM.js";
|
|
4
|
+
import { i as s, n as c, r as l, t as u } from "./TooltipProvider-CmZzCuaG.js";
|
|
5
|
+
import { Fragment as d, computed as f, createBlock as p, createCommentVNode as m, createElementBlock as h, createElementVNode as g, createTextVNode as _, createVNode as v, defineComponent as y, mergeModels as b, mergeProps as x, nextTick as S, normalizeClass as C, normalizeStyle as w, onBeforeUnmount as T, onMounted as E, onUnmounted as D, openBlock as O, ref as k, renderList as A, renderSlot as j, toDisplayString as M, unref as N, useModel as ee, watch as P, withCtx as F } from "vue";
|
|
6
|
+
//#region src/components/custom/tabs/composables/useTabIndicator.ts
|
|
7
|
+
function te(e) {
|
|
8
|
+
let { containerRef: t, indicatorRef: n, buttonRefs: r, options: i, model: a, multiSelect: o, anchorSupported: s, jsSliderActive: c, activeValues: l } = e, u = k({
|
|
9
9
|
width: "0px",
|
|
10
10
|
transform: "translateX(0px)",
|
|
11
11
|
opacity: "0"
|
|
12
12
|
});
|
|
13
|
-
function
|
|
14
|
-
if (
|
|
15
|
-
let e =
|
|
16
|
-
if (e < 0 || !
|
|
17
|
-
let t =
|
|
18
|
-
|
|
13
|
+
function d() {
|
|
14
|
+
if (o.value || s) return;
|
|
15
|
+
let e = i.value.findIndex((e) => e.value === a.value);
|
|
16
|
+
if (e < 0 || !r.value[e]) return;
|
|
17
|
+
let t = r.value[e];
|
|
18
|
+
u.value = {
|
|
19
19
|
width: `${t.offsetWidth}px`,
|
|
20
20
|
transform: `translateX(${t.offsetLeft}px)`,
|
|
21
21
|
opacity: "1"
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
let
|
|
25
|
-
function
|
|
26
|
-
if (!
|
|
24
|
+
let f = k({});
|
|
25
|
+
function p() {
|
|
26
|
+
if (!o.value) return;
|
|
27
27
|
let e = {};
|
|
28
|
-
for (let t of
|
|
29
|
-
let
|
|
28
|
+
for (let t of l.value) {
|
|
29
|
+
let n = i.value.findIndex((e) => e.value === t), a = r.value[n];
|
|
30
30
|
a && (e[t] = {
|
|
31
31
|
width: `${a.offsetWidth}px`,
|
|
32
32
|
transform: `translateX(${a.offsetLeft}px)`,
|
|
33
33
|
opacity: "1"
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
|
-
|
|
36
|
+
f.value = e;
|
|
37
37
|
}
|
|
38
|
-
function
|
|
39
|
-
|
|
38
|
+
function m() {
|
|
39
|
+
o.value ? p() : d();
|
|
40
|
+
}
|
|
41
|
+
let h = -1, g = null;
|
|
42
|
+
function _() {
|
|
43
|
+
return typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
44
|
+
}
|
|
45
|
+
function v(e) {
|
|
46
|
+
let i = n.value;
|
|
47
|
+
if (o.value || !i) {
|
|
48
|
+
h = e;
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
if (_()) {
|
|
52
|
+
h = e;
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
let a = r.value[h], s = r.value[e];
|
|
56
|
+
if (h = e, !a || !s) return;
|
|
57
|
+
let c = t.value?.offsetWidth || s.offsetParent?.offsetWidth || 1, l = Math.abs(s.offsetLeft - a.offsetLeft), u = c > 0 ? Math.min(l / c, 1) : 0, d = getComputedStyle(i).getPropertyValue("--tab-indicator-max-stretch").trim(), f = 1 + u * ((Number(d) || 1.08) - 1);
|
|
58
|
+
g && clearTimeout(g), i.style.setProperty("--stretch", String(f)), g = setTimeout(() => {
|
|
59
|
+
i.style.setProperty("--stretch", "1"), g = null;
|
|
60
|
+
}, 60);
|
|
40
61
|
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}, { deep: !0 }),
|
|
44
|
-
|
|
62
|
+
P(() => a.value, () => {
|
|
63
|
+
c.value && S(m);
|
|
64
|
+
}, { deep: !0 }), P(() => i.value, () => {
|
|
65
|
+
c.value && S(m);
|
|
45
66
|
}, { deep: !0 });
|
|
46
|
-
let
|
|
47
|
-
return
|
|
48
|
-
|
|
49
|
-
}),
|
|
50
|
-
|
|
67
|
+
let y = null;
|
|
68
|
+
return E(() => {
|
|
69
|
+
h = i.value.findIndex((e) => l.value.includes(e.value)), c.value && (S(m), t.value && (y = new ResizeObserver(() => m()), y.observe(t.value)));
|
|
70
|
+
}), D(() => {
|
|
71
|
+
y?.disconnect(), g && clearTimeout(g);
|
|
51
72
|
}), {
|
|
52
|
-
singleSliderStyle:
|
|
53
|
-
multiSliderStyles:
|
|
73
|
+
singleSliderStyle: u,
|
|
74
|
+
multiSliderStyles: f,
|
|
75
|
+
squishOnTravel: v
|
|
54
76
|
};
|
|
55
77
|
}
|
|
56
78
|
//#endregion
|
|
57
|
-
//#region src/components/custom/tabs/
|
|
58
|
-
var
|
|
59
|
-
"
|
|
79
|
+
//#region src/components/custom/tabs/SegmentedTabs.vue?vue&type=script&setup=true&lang.ts
|
|
80
|
+
var ne = ["role"], re = [
|
|
81
|
+
"role",
|
|
60
82
|
"disabled",
|
|
61
83
|
"onClick"
|
|
62
|
-
],
|
|
63
|
-
"
|
|
84
|
+
], ie = [
|
|
85
|
+
"role",
|
|
64
86
|
"disabled",
|
|
65
87
|
"onClick"
|
|
66
|
-
],
|
|
67
|
-
__name: "
|
|
68
|
-
props: /* @__PURE__ */
|
|
88
|
+
], I = /* @__PURE__ */ t(/* @__PURE__ */ y({
|
|
89
|
+
__name: "SegmentedTabs",
|
|
90
|
+
props: /* @__PURE__ */ b({
|
|
69
91
|
options: {},
|
|
92
|
+
variant: { default: "segmented" },
|
|
70
93
|
multiSelect: {
|
|
71
94
|
type: Boolean,
|
|
72
95
|
default: !1
|
|
73
96
|
},
|
|
74
|
-
variant: { default: "default" },
|
|
75
97
|
overflow: { default: "none" },
|
|
98
|
+
responsive: {
|
|
99
|
+
type: [Boolean, Object],
|
|
100
|
+
default: !1
|
|
101
|
+
},
|
|
76
102
|
class: { type: [
|
|
77
103
|
Boolean,
|
|
78
104
|
null,
|
|
@@ -86,45 +112,52 @@ var M = [
|
|
|
86
112
|
}),
|
|
87
113
|
emits: ["update:modelValue"],
|
|
88
114
|
setup(t) {
|
|
89
|
-
function
|
|
115
|
+
function y(e, t) {
|
|
90
116
|
return typeof document > "u" ? t : getComputedStyle(document.documentElement).getPropertyValue(e).trim() || t;
|
|
91
117
|
}
|
|
92
|
-
let
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
118
|
+
let b = t, D = ee(t, "modelValue"), P = k(null), I = k(null), L = k([]), R = typeof CSS < "u" && typeof CSS.supports == "function" && CSS.supports("position-anchor", "--x"), z = f(() => b.variant === "underline");
|
|
119
|
+
f(() => b.variant === "pill"), f(() => b.variant === "segmented");
|
|
120
|
+
let B = f(() => b.overflow === "scroll"), V = f(() => b.overflow === "auto"), H = f(() => b.multiSelect && !z.value), U = f(() => {
|
|
121
|
+
let e = D.value;
|
|
122
|
+
return H.value && Array.isArray(e) ? e : e == null ? [] : [e];
|
|
123
|
+
}), W = (e) => U.value.includes(e), ae = f(() => (H.value || !R) && !z.value), G = f(() => !H.value && !R && !z.value), K = f(() => b.responsive === !1 ? null : b.responsive === !0 ? {} : b.responsive), oe = f(() => K.value?.breakpoint ?? "640px"), q = f(() => K.value?.desktopOptions ?? b.options), J = k(!0), Y = null;
|
|
124
|
+
function X(e) {
|
|
125
|
+
J.value = e.matches;
|
|
126
|
+
}
|
|
127
|
+
let se = f(() => {
|
|
128
|
+
if (!K.value) return D.value;
|
|
129
|
+
let e = q.value;
|
|
130
|
+
return e.some((e) => e.value === D.value) ? D.value : e[0]?.value ?? D.value;
|
|
131
|
+
}), Z = f(() => K.value ? q.value : b.options), ce = f(() => K.value?.ariaLabel ?? b.options.find((e) => e.value === D.value)?.label ?? "Select"), le = f(() => !!K.value && !J.value), { singleSliderStyle: ue, multiSliderStyles: de, squishOnTravel: fe } = te({
|
|
132
|
+
containerRef: P,
|
|
133
|
+
indicatorRef: I,
|
|
134
|
+
buttonRefs: L,
|
|
135
|
+
options: Z,
|
|
136
|
+
model: f(() => se.value),
|
|
137
|
+
multiSelect: H,
|
|
138
|
+
anchorSupported: R,
|
|
139
|
+
jsSliderActive: ae,
|
|
140
|
+
activeValues: U
|
|
104
141
|
});
|
|
105
|
-
function
|
|
142
|
+
function pe(e) {
|
|
106
143
|
if (typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;
|
|
107
144
|
e.getAnimations().forEach((e) => e.cancel());
|
|
108
|
-
let t =
|
|
145
|
+
let t = y("--spring-snappy", "ease"), n = y("--scale-press-btn", "0.97");
|
|
109
146
|
e.animate([
|
|
110
147
|
{ transform: "scale(1)" },
|
|
111
148
|
{
|
|
112
149
|
transform: `scale(${n})`,
|
|
113
|
-
offset: .
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
transform: `scale(${r})`,
|
|
117
|
-
offset: .7
|
|
150
|
+
offset: .4
|
|
118
151
|
},
|
|
119
152
|
{ transform: "scale(1)" }
|
|
120
153
|
], {
|
|
121
|
-
duration:
|
|
154
|
+
duration: 220,
|
|
122
155
|
easing: t
|
|
123
156
|
});
|
|
124
157
|
}
|
|
125
|
-
function
|
|
126
|
-
if (!
|
|
127
|
-
let t =
|
|
158
|
+
function Q(e) {
|
|
159
|
+
if (!B.value && !V.value) return;
|
|
160
|
+
let t = L.value[e];
|
|
128
161
|
if (!t) return;
|
|
129
162
|
let n = typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
130
163
|
t.scrollIntoView({
|
|
@@ -133,120 +166,118 @@ var M = [
|
|
|
133
166
|
behavior: n ? "auto" : "smooth"
|
|
134
167
|
});
|
|
135
168
|
}
|
|
136
|
-
function
|
|
137
|
-
if (
|
|
138
|
-
let n =
|
|
139
|
-
if (n &&
|
|
140
|
-
let t = [...
|
|
141
|
-
n > -1 ? t.length > 1 && t.splice(n, 1) : t.push(e),
|
|
142
|
-
} else
|
|
143
|
-
|
|
169
|
+
function $(e, t) {
|
|
170
|
+
if (Z.value[t]?.disabled) return;
|
|
171
|
+
let n = L.value[t];
|
|
172
|
+
if (n && pe(n), fe(t), H.value) {
|
|
173
|
+
let t = [...U.value], n = t.indexOf(e);
|
|
174
|
+
n > -1 ? t.length > 1 && t.splice(n, 1) : t.push(e), D.value = t;
|
|
175
|
+
} else D.value = e;
|
|
176
|
+
Q(t);
|
|
177
|
+
}
|
|
178
|
+
function me(e) {
|
|
179
|
+
typeof e == "string" && (D.value = e);
|
|
144
180
|
}
|
|
145
|
-
return
|
|
146
|
-
|
|
147
|
-
let e =
|
|
148
|
-
e >= 0 &&
|
|
181
|
+
return E(() => {
|
|
182
|
+
K.value && typeof window < "u" && window.matchMedia && (Y = window.matchMedia(`(min-width: ${oe.value})`), J.value = Y.matches, Y.addEventListener("change", X)), S(() => {
|
|
183
|
+
let e = Z.value.findIndex((e) => W(e.value));
|
|
184
|
+
e >= 0 && Q(e);
|
|
149
185
|
});
|
|
150
|
-
}), (
|
|
186
|
+
}), T(() => {
|
|
187
|
+
Y?.removeEventListener("change", X), Y = null;
|
|
188
|
+
}), (f, y) => le.value ? (O(), h("div", {
|
|
189
|
+
key: 0,
|
|
190
|
+
class: C(N(e)("segmented-tabs__mobile w-fit", b.class))
|
|
191
|
+
}, [v(N(o), {
|
|
192
|
+
"model-value": D.value,
|
|
193
|
+
"onUpdate:modelValue": me
|
|
194
|
+
}, {
|
|
195
|
+
default: F(() => [v(N(n), {
|
|
196
|
+
"aria-label": ce.value,
|
|
197
|
+
class: C(N(e)("segmented-tabs__trigger text-small w-auto min-w-input-sm", K.value?.triggerClass))
|
|
198
|
+
}, {
|
|
199
|
+
default: F(() => [v(N(i))]),
|
|
200
|
+
_: 1
|
|
201
|
+
}, 8, ["aria-label", "class"]), v(N(r), null, {
|
|
202
|
+
default: F(() => [(O(!0), h(d, null, A(t.options, (e) => (O(), p(N(a), {
|
|
203
|
+
key: e.value,
|
|
204
|
+
value: e.value
|
|
205
|
+
}, {
|
|
206
|
+
default: F(() => [_(M(e.label), 1)]),
|
|
207
|
+
_: 2
|
|
208
|
+
}, 1032, ["value"]))), 128))]),
|
|
209
|
+
_: 1
|
|
210
|
+
})]),
|
|
211
|
+
_: 1
|
|
212
|
+
}, 8, ["model-value"])], 2)) : (O(), h("div", {
|
|
213
|
+
key: 1,
|
|
151
214
|
ref_key: "containerRef",
|
|
152
|
-
ref:
|
|
153
|
-
|
|
215
|
+
ref: P,
|
|
216
|
+
role: z.value ? "tablist" : "group",
|
|
217
|
+
class: C(N(e)("segmented-tabs", `segmented-tabs--${t.variant}`, B.value && "segmented-tabs--scroll scroll-fade-mask scrollbar-hidden", V.value && "segmented-tabs--auto scrollbar-hidden", b.class))
|
|
154
218
|
}, [
|
|
155
|
-
|
|
219
|
+
!z.value && !H.value ? (O(), h("div", {
|
|
156
220
|
key: 0,
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
221
|
+
ref_key: "indicatorRef",
|
|
222
|
+
ref: I,
|
|
223
|
+
class: C(["segmented-indicator", G.value ? "segmented-indicator--js" : "segmented-indicator--anchor"]),
|
|
224
|
+
style: w(G.value ? N(ue) : void 0)
|
|
225
|
+
}, null, 6)) : m("", !0),
|
|
226
|
+
!z.value && H.value ? (O(!0), h(d, { key: 1 }, A(U.value, (e) => (O(), h("div", {
|
|
227
|
+
key: "indicator-" + e,
|
|
228
|
+
class: "segmented-indicator segmented-indicator--js",
|
|
229
|
+
style: w(N(de)[e] ?? { opacity: "0" })
|
|
230
|
+
}, null, 4))), 128)) : m("", !0),
|
|
231
|
+
(O(!0), h(d, null, A(Z.value, (e, t) => (O(), h(d, { key: e.value }, [e.tooltip ? (O(), p(N(u), {
|
|
166
232
|
key: 0,
|
|
167
233
|
"delay-duration": 200
|
|
168
234
|
}, {
|
|
169
|
-
default:
|
|
170
|
-
default:
|
|
171
|
-
default:
|
|
235
|
+
default: F(() => [v(N(s), null, {
|
|
236
|
+
default: F(() => [v(N(c), { "as-child": "" }, {
|
|
237
|
+
default: F(() => [g("button", x({
|
|
172
238
|
ref_for: !0,
|
|
173
239
|
ref: (e) => {
|
|
174
|
-
e && (
|
|
240
|
+
e && (L.value[t] = e);
|
|
175
241
|
},
|
|
176
|
-
class:
|
|
177
|
-
|
|
242
|
+
class: "segmented-tab",
|
|
243
|
+
role: z.value ? "tab" : void 0
|
|
244
|
+
}, { ref_for: !0 }, z.value ? { "aria-selected": W(e.value) ? "true" : "false" } : { "aria-pressed": W(e.value) ? "true" : "false" }, {
|
|
178
245
|
disabled: e.disabled,
|
|
179
|
-
|
|
180
|
-
|
|
246
|
+
class: e.disabled && "is-disabled",
|
|
247
|
+
onClick: (n) => $(e.value, t)
|
|
248
|
+
}), [j(f.$slots, "option", {
|
|
181
249
|
option: e,
|
|
182
|
-
active:
|
|
183
|
-
}, () => [
|
|
250
|
+
active: W(e.value)
|
|
251
|
+
}, () => [_(M(e.label), 1)], !0)], 16, re)]),
|
|
184
252
|
_: 2
|
|
185
|
-
}, 1024),
|
|
253
|
+
}, 1024), v(N(l), {
|
|
186
254
|
side: "bottom",
|
|
187
255
|
"side-offset": 8
|
|
188
256
|
}, {
|
|
189
|
-
default:
|
|
257
|
+
default: F(() => [_(M(e.tooltip), 1)]),
|
|
190
258
|
_: 2
|
|
191
259
|
}, 1024)]),
|
|
192
260
|
_: 2
|
|
193
261
|
}, 1024)]),
|
|
194
262
|
_: 2
|
|
195
|
-
}, 1024)) : (
|
|
263
|
+
}, 1024)) : (O(), h("button", x({
|
|
196
264
|
key: 1,
|
|
197
265
|
ref_for: !0,
|
|
198
266
|
ref: (e) => {
|
|
199
|
-
e && (
|
|
267
|
+
e && (L.value[t] = e);
|
|
200
268
|
},
|
|
201
|
-
class:
|
|
202
|
-
|
|
269
|
+
class: "segmented-tab",
|
|
270
|
+
role: z.value ? "tab" : void 0
|
|
271
|
+
}, { ref_for: !0 }, z.value ? { "aria-selected": W(e.value) ? "true" : "false" } : { "aria-pressed": W(e.value) ? "true" : "false" }, {
|
|
203
272
|
disabled: e.disabled,
|
|
204
|
-
|
|
205
|
-
|
|
273
|
+
class: e.disabled && "is-disabled",
|
|
274
|
+
onClick: (n) => $(e.value, t)
|
|
275
|
+
}), [j(f.$slots, "option", {
|
|
206
276
|
option: e,
|
|
207
|
-
active:
|
|
208
|
-
}, () => [
|
|
209
|
-
],
|
|
210
|
-
}
|
|
211
|
-
}), [["__scopeId", "data-v-795d5fdc"]]), F = /* @__PURE__ */ h({
|
|
212
|
-
__name: "BouncyTabs",
|
|
213
|
-
props: /* @__PURE__ */ g({
|
|
214
|
-
options: {},
|
|
215
|
-
variant: { default: "default" },
|
|
216
|
-
overflow: { default: "none" },
|
|
217
|
-
class: { type: [
|
|
218
|
-
Boolean,
|
|
219
|
-
null,
|
|
220
|
-
String,
|
|
221
|
-
Object,
|
|
222
|
-
Array
|
|
223
|
-
] }
|
|
224
|
-
}, {
|
|
225
|
-
modelValue: { required: !0 },
|
|
226
|
-
modelModifiers: {}
|
|
227
|
-
}),
|
|
228
|
-
emits: ["update:modelValue"],
|
|
229
|
-
setup(e) {
|
|
230
|
-
let t = e, n = O(e, "modelValue");
|
|
231
|
-
function r(e) {
|
|
232
|
-
n.value = e;
|
|
233
|
-
}
|
|
234
|
-
return (i, a) => (S(), l(P, {
|
|
235
|
-
options: e.options,
|
|
236
|
-
"model-value": n.value,
|
|
237
|
-
variant: e.variant,
|
|
238
|
-
overflow: e.overflow,
|
|
239
|
-
class: v(t.class),
|
|
240
|
-
"multi-select": !1,
|
|
241
|
-
"onUpdate:modelValue": r
|
|
242
|
-
}, null, 8, [
|
|
243
|
-
"options",
|
|
244
|
-
"model-value",
|
|
245
|
-
"variant",
|
|
246
|
-
"overflow",
|
|
247
|
-
"class"
|
|
248
|
-
]));
|
|
277
|
+
active: W(e.value)
|
|
278
|
+
}, () => [_(M(e.label), 1)], !0)], 16, ie))], 64))), 128))
|
|
279
|
+
], 10, ne));
|
|
249
280
|
}
|
|
250
|
-
});
|
|
281
|
+
}), [["__scopeId", "data-v-dd84d37c"]]);
|
|
251
282
|
//#endregion
|
|
252
|
-
export {
|
|
283
|
+
export { I as SegmentedTabs };
|
package/dist/timeline.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "./_plugin-vue_export-helper-ok8pgSl5.js";
|
|
2
|
-
import { t } from "./HoverPopover-
|
|
2
|
+
import { t } from "./HoverPopover-2LOIW34a.js";
|
|
3
3
|
import { Fragment as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createSlots as c, createVNode as l, defineComponent as u, guardReactiveProps as d, normalizeClass as f, normalizeProps as p, normalizeStyle as m, openBlock as h, ref as g, renderList as _, renderSlot as v, toDisplayString as y, unref as b, withCtx as x } from "vue";
|
|
4
4
|
//#region src/components/custom/timeline/geometry.ts
|
|
5
5
|
function S(e) {
|