@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.
Files changed (164) hide show
  1. package/README.md +1 -6
  2. package/dist/{CardAction-q2qHCJFG.js → CardAction-DuArVky-.js} +4 -4
  3. package/dist/{CommandShortcut-SzWRhROC.js → CommandShortcut-CefCj5mt.js} +7 -7
  4. package/dist/{ContextMenuSubContent-Do977Cbf.js → ContextMenuSubContent-Bhg4f5jX.js} +3 -3
  5. package/dist/{DataTable-CvlWXz65.js → DataTable-CUHMukiQ.js} +1 -1
  6. package/dist/{DialogContent-DjZWT3lK.js → DialogContent-BRkT1cjP.js} +1 -1
  7. package/dist/{NumberFieldContent-CLNVR1iY.js → NumberFieldContent-BbLOh8RU.js} +2 -2
  8. package/dist/{SelectScrollDownButton-C7TRe-ep.js → SelectScrollDownButton-T32cVFeM.js} +3 -3
  9. package/dist/{SelectSeparator-L8pPEn4L.js → SelectSeparator-C4Ql0gzV.js} +1 -1
  10. package/dist/{TabsList-qyHZ2lKY.js → TabsList-B8CVOQPC.js} +2 -2
  11. package/dist/{Toaster-CabYEEF_.js → Toaster-1rYWrmAm.js} +1 -1
  12. package/dist/{ToggleGroupItem-CkXUcBlt.js → ToggleGroupItem-Cev4pOVK.js} +4 -4
  13. package/dist/animated-digit.js +1 -1
  14. package/dist/api/index.d.ts +1 -1
  15. package/dist/api.js +1 -1
  16. package/dist/aurora.js +10 -10
  17. package/dist/{badge-DHQrc_GQ.js → badge-BvwvT50i.js} +4 -4
  18. package/dist/badge.js +1 -1
  19. package/dist/{button-CAywcrhO.js → button-DN39cGqL.js} +13 -12
  20. package/dist/button.js +1 -1
  21. package/dist/card.js +1 -1
  22. package/dist/carousel.js +1 -1
  23. package/dist/color.js +1 -1
  24. package/dist/command.js +1 -1
  25. package/dist/{compile-BBTRjvQS.js → compile-DAjIoEy2.js} +1 -1
  26. package/dist/components/custom/configurator/ConfiguratorLayer.vue.d.ts +1 -1
  27. package/dist/components/custom/dock/DockSeparator.vue.d.ts +3 -0
  28. package/dist/components/custom/dock/GlassDock.vue.d.ts +45 -63
  29. package/dist/components/custom/dock/composables/dockContext.d.ts +7 -0
  30. package/dist/components/custom/dock/index.d.ts +2 -1
  31. package/dist/components/custom/goo-blob/composables/useBlobMood.d.ts +19 -5
  32. package/dist/components/custom/tabs/SegmentedTabs.vue.d.ts +92 -0
  33. package/dist/components/custom/tabs/composables/useTabIndicator.d.ts +49 -0
  34. package/dist/components/custom/tabs/index.d.ts +2 -5
  35. package/dist/components/ui/button/index.d.ts +1 -1
  36. package/dist/components/ui/card/Card.vue.d.ts +5 -3
  37. package/dist/components/ui/carousel/CarouselNext.vue.d.ts +1 -1
  38. package/dist/components/ui/carousel/CarouselPrevious.vue.d.ts +1 -1
  39. package/dist/components/ui/carousel/GlassCarouselPager.vue.d.ts +3 -4
  40. package/dist/components/ui/slider/index.d.ts +14 -7
  41. package/dist/components/ui/tabs/TabsList.vue.d.ts +1 -1
  42. package/dist/composables/context/createContext.d.ts +1 -1
  43. package/dist/configurator.js +1 -1
  44. package/dist/confirm-dialog.js +1 -1
  45. package/dist/constellation.js +1 -1
  46. package/dist/context-menu.js +1 -1
  47. package/dist/controls.js +1 -1
  48. package/dist/dark.js +1 -1
  49. package/dist/data-table.js +1 -1
  50. package/dist/deck-progress.js +1 -1
  51. package/dist/dialog.js +1 -1
  52. package/dist/dock.js +256 -243
  53. package/dist/{dropdown-menu-B_4bWyyG.js → dropdown-menu-D77jX6Df.js} +3 -3
  54. package/dist/dropdown-menu.js +1 -1
  55. package/dist/expandable-container.js +1 -1
  56. package/dist/forms.js +5 -5
  57. package/dist/fourier-field.js +3 -3
  58. package/dist/glass-ui.css +1 -1
  59. package/dist/glass-ui.js +101 -104
  60. package/dist/goo-blob.js +36 -32
  61. package/dist/hover-popover.js +1 -1
  62. package/dist/icon-tooltip.js +1 -1
  63. package/dist/index.d.ts +0 -2
  64. package/dist/keyboard.js +1 -1
  65. package/dist/labeled-field.js +4 -4
  66. package/dist/{menuItemVariants-DKM85SNE.js → menuItemVariants-CCoBNkU5.js} +1 -1
  67. package/dist/motion-core.js +4 -4
  68. package/dist/motion.js +2 -2
  69. package/dist/number-field.js +1 -1
  70. package/dist/pulse.js +1 -1
  71. package/dist/reactive.js +1 -1
  72. package/dist/scrolling-text.js +1 -1
  73. package/dist/search.js +4 -4
  74. package/dist/select.js +2 -2
  75. package/dist/{slider-D9puf-Ko.js → slider-DC2mwuoe.js} +1 -1
  76. package/dist/slider.js +1 -1
  77. package/dist/sortable-list.js +1 -1
  78. package/dist/status-dot.js +17 -16
  79. package/dist/styles/animations.css +6 -2
  80. package/dist/styles/components.css +1 -1
  81. package/dist/styles/dock/density.css +230 -0
  82. package/dist/styles/dock/layer-group.css +263 -0
  83. package/dist/styles/dock/layers.css +355 -0
  84. package/dist/styles/dock/morph.css +244 -0
  85. package/dist/styles/dock/overflow.css +201 -0
  86. package/dist/styles/dock/shell.css +457 -0
  87. package/dist/styles/dock-controls.css +166 -32
  88. package/dist/styles/dock.css +42 -1349
  89. package/dist/styles/glass.css +396 -75
  90. package/dist/styles/index.css +12 -11
  91. package/dist/styles/theme.css +51 -0
  92. package/dist/styles/tokens.css +501 -55
  93. package/dist/styles/utilities.css +89 -39
  94. package/dist/tabs.js +182 -151
  95. package/dist/timeline.js +1 -1
  96. package/dist/toast.js +1 -1
  97. package/dist/toggle-group.js +1 -1
  98. package/dist/{useAnimatedNumber-C_3wZLx4.js → useAnimatedNumber-C5I3wWd8.js} +1 -1
  99. package/dist/{useConfiguratorState-CMff4GzH.js → useConfiguratorState-DxAqksK6.js} +21 -10
  100. package/dist/watercolor-dot.js +1 -1
  101. package/package.json +32 -33
  102. package/src/styles/animations.css +6 -2
  103. package/src/styles/dock/density.css +230 -0
  104. package/src/styles/dock/layer-group.css +263 -0
  105. package/src/styles/dock/layers.css +355 -0
  106. package/src/styles/dock/morph.css +244 -0
  107. package/src/styles/dock/overflow.css +201 -0
  108. package/src/styles/dock/shell.css +457 -0
  109. package/src/styles/dock-controls.css +166 -32
  110. package/src/styles/dock.css +42 -1349
  111. package/src/styles/glass.css +396 -75
  112. package/src/styles/index.css +12 -11
  113. package/src/styles/theme.css +51 -0
  114. package/src/styles/tokens.css +501 -55
  115. package/src/styles/utilities.css +89 -39
  116. package/dist/DiscoGlyph-CG0F410s.js +0 -132
  117. package/dist/GlyphFace-DRjDkB0s.js +0 -51
  118. package/dist/UnderlineTabs-Uxn-R3MT.js +0 -39
  119. package/dist/components/custom/aurora/constants/shaders/painterly.wgsl.d.ts +0 -7
  120. package/dist/components/custom/aurora/constants/shaders/wake.wgsl.d.ts +0 -4
  121. package/dist/components/custom/disco-glyph/DiscoGlyph.vue.d.ts +0 -58
  122. package/dist/components/custom/disco-glyph/index.d.ts +0 -1
  123. package/dist/components/custom/glass-carousel/GlassCarousel.vue.d.ts +0 -36
  124. package/dist/components/custom/glass-carousel/GlassCarouselItem.vue.d.ts +0 -28
  125. package/dist/components/custom/glass-carousel/index.d.ts +0 -4
  126. package/dist/components/custom/glass-carousel/useGlassCarousel.d.ts +0 -30
  127. package/dist/components/custom/glyph-face/GlyphFace.vue.d.ts +0 -64
  128. package/dist/components/custom/glyph-face/index.d.ts +0 -2
  129. package/dist/components/custom/glyph-face/keys.d.ts +0 -9
  130. package/dist/components/custom/responsive-tabs/ResponsiveTabs.vue.d.ts +0 -73
  131. package/dist/components/custom/responsive-tabs/index.d.ts +0 -2
  132. package/dist/components/custom/tabs/BouncyTabs.vue.d.ts +0 -27
  133. package/dist/components/custom/tabs/BouncyToggle.vue.d.ts +0 -60
  134. package/dist/components/custom/tabs/UnderlineTabs.vue.d.ts +0 -20
  135. package/dist/components/custom/tabs/composables/useBouncySlider.d.ts +0 -39
  136. package/dist/disco-glyph.d.ts +0 -1
  137. package/dist/disco-glyph.js +0 -2
  138. package/dist/glass-carousel.d.ts +0 -1
  139. package/dist/glass-carousel.js +0 -219
  140. package/dist/glyph-face.d.ts +0 -1
  141. package/dist/glyph-face.js +0 -3
  142. package/dist/keys-BsYjEFOW.js +0 -9
  143. package/dist/responsive-tabs.d.ts +0 -1
  144. package/dist/responsive-tabs.js +0 -95
  145. package/dist/styles/disco-glyph.css +0 -26
  146. package/dist/styles/glyph-face.css +0 -92
  147. package/src/styles/disco-glyph.css +0 -26
  148. package/src/styles/glyph-face.css +0 -92
  149. /package/dist/{DeckProgress-AVgbIULY.js → DeckProgress-Dmk4_AKN.js} +0 -0
  150. /package/dist/{HoverPopover-D56O6Ylp.js → HoverPopover-2LOIW34a.js} +0 -0
  151. /package/dist/{IconTooltip-D2T5nYOM.js → IconTooltip-yefK7cJc.js} +0 -0
  152. /package/dist/{Input-DVG_J0ne.js → Input-DWQQIOC4.js} +0 -0
  153. /package/dist/{ScrollingText-CVyqxvfv.js → ScrollingText-BPP84wKo.js} +0 -0
  154. /package/dist/{color-DMLTunJK.js → color-8jBjWiJ6.js} +0 -0
  155. /package/dist/{constants-BPOqYJAm.js → constants-CS75AWHG.js} +0 -0
  156. /package/dist/{presets-D1XPuTj-.js → presets-BKVyQfbt.js} +0 -0
  157. /package/dist/{prng-COGhh02-.js → prng-wHuHlNHE.js} +0 -0
  158. /package/dist/{useGlobalDark-D3EBWzXK.js → useGlobalDark-yhL4Wp-s.js} +0 -0
  159. /package/dist/{useIntersectionPause-Bj4sPkMh.js → useIntersectionPause-Cc-H9ees.js} +0 -0
  160. /package/dist/{useInterval-CcLfq2WU.js → useInterval-Dsmqwi03.js} +0 -0
  161. /package/dist/{useKeyboardShortcuts-BXWXOZ-9.js → useKeyboardShortcuts-Be3w_Rwk.js} +0 -0
  162. /package/dist/{useScrollProgress-C9ysDic5.js → useScrollProgress-CAH8Ofwt.js} +0 -0
  163. /package/dist/{useSortable-MGAbCGVJ.js → useSortable-C8ReQ50P.js} +0 -0
  164. /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) and the spring carries
195
- the return via `--spring-snappy` (the §L3 release-spring
196
- contract). I keep this as a single canonical rung — NOT a
197
- 3-rung ladder. The one outlier I leave alone is the button
198
- `0.97` (`--scale-press-btn`), which consumes its own slightly-
199
- softer token directly. The dock control now tracks the canonical
200
- `--scale-press` (0.96) too (AT.W7-dock-b press canon — the prior
201
- deeper `0.92` was retired to ONE source).
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: scale var(--duration-fast) var(--spring-snappy);
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(--ease-standard);
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 (`--scale-hover`) +
1009
- active-press (`--scale-press`) + disabled-opacity + focus-ring fade-in.
1010
- The Button primitive's variants emit the four states except `hover:scale-*`;
1011
- this is the canonical opt-in that adds the spring-hover lift. Consumed by
1012
- keyframes.js at 7 sites. */
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(--ease-standard),
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(--ease-standard),
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 restoration (AQ.W2 §5) ──────────────────────────────
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 (a WCAG 2.4.7 failure forced-colors exposes).
1075
- Restore a real `outline` keyed to the system `Highlight` color (outline
1076
- survives forced-colors; box-shadow does not). The box-shadow ring stays the
1077
- primary in normal mode (it carries the glass aesthetic) — these two are
1078
- mutually exclusive by media query, NOT a parallel path.
1079
-
1080
- `forced-color-adjust: none` is deliberately NOT used — glass-ui's
1081
- glassmorphic chrome is decorative and yields to the user's forced palette
1082
- (css forced-colors guidance). Baseline Widely Available; this IS the
1083
- fallback mechanism (it only activates under forced-colors), so no nested
1084
- guard. */
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
- glass pill edge / card plate) also vanish — restore a real border so
1097
- the silhouette survives. CanvasText is the system text/border color. */
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 + ResponsiveTabs triggers.
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
- .responsive-tabs__trigger {
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 { i as n, n as r, r as i, t as a } from "./TooltipProvider-CmZzCuaG.js";
4
- import { t as o } from "./UnderlineTabs-Uxn-R3MT.js";
5
- import { Fragment as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createTextVNode as p, createVNode as m, defineComponent as h, mergeModels as g, nextTick as _, normalizeClass as v, normalizeStyle as y, onMounted as b, onUnmounted as x, openBlock as S, ref as C, renderList as w, renderSlot as T, toDisplayString as E, unref as D, useModel as O, watch as k, withCtx as A } from "vue";
6
- //#region src/components/custom/tabs/composables/useBouncySlider.ts
7
- function j(e) {
8
- let { containerRef: t, buttonRefs: n, options: r, model: i, multiSelect: a, anchorSupported: o, jsSliderActive: s, activeValues: c } = e, l = C({
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 u() {
14
- if (a.value || o) return;
15
- let e = r.value.findIndex((e) => e.value === i.value);
16
- if (e < 0 || !n.value[e]) return;
17
- let t = n.value[e];
18
- l.value = {
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 d = C({});
25
- function f() {
26
- if (!a.value) return;
24
+ let f = k({});
25
+ function p() {
26
+ if (!o.value) return;
27
27
  let e = {};
28
- for (let t of c.value) {
29
- let i = r.value.findIndex((e) => e.value === t), a = n.value[i];
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
- d.value = e;
36
+ f.value = e;
37
37
  }
38
- function p() {
39
- a.value ? f() : u();
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
- k(() => i.value, () => {
42
- s.value && _(p);
43
- }, { deep: !0 }), k(() => r.value, () => {
44
- s.value && _(p);
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 m = null;
47
- return b(() => {
48
- s.value && (_(p), t.value && (m = new ResizeObserver(() => p()), m.observe(t.value)));
49
- }), x(() => {
50
- m?.disconnect();
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: l,
53
- multiSliderStyles: d
73
+ singleSliderStyle: u,
74
+ multiSliderStyles: f,
75
+ squishOnTravel: v
54
76
  };
55
77
  }
56
78
  //#endregion
57
- //#region src/components/custom/tabs/BouncyToggle.vue?vue&type=script&setup=true&lang.ts
58
- var M = [
59
- "aria-pressed",
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
- ], N = [
63
- "aria-pressed",
84
+ ], ie = [
85
+ "role",
64
86
  "disabled",
65
87
  "onClick"
66
- ], P = /* @__PURE__ */ t(/* @__PURE__ */ h({
67
- __name: "BouncyToggle",
68
- props: /* @__PURE__ */ g({
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 o(e, t) {
115
+ function y(e, t) {
90
116
  return typeof document > "u" ? t : getComputedStyle(document.documentElement).getPropertyValue(e).trim() || t;
91
117
  }
92
- let h = t, g = O(t, "modelValue"), x = C(null), k = C([]), P = typeof CSS < "u" && typeof CSS.supports == "function" && CSS.supports("position-anchor", "--x"), F = c(() => h.variant === "pill"), I = c(() => h.overflow === "scroll"), L = c(() => h.overflow === "auto"), R = c(() => {
93
- let e = g.value;
94
- return h.multiSelect && Array.isArray(e) ? e : e == null ? [] : [e];
95
- }), z = (e) => R.value.includes(e), B = c(() => !h.multiSelect && !P), V = c(() => h.multiSelect || !P), { singleSliderStyle: H, multiSliderStyles: U } = j({
96
- containerRef: x,
97
- buttonRefs: k,
98
- options: c(() => h.options),
99
- model: g,
100
- multiSelect: c(() => h.multiSelect),
101
- anchorSupported: P,
102
- jsSliderActive: V,
103
- activeValues: R
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 W(e) {
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 = o("--spring-bouncy", "ease"), n = o("--scale-press", "0.95"), r = o("--scale-hover", "1.08");
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: .25
114
- },
115
- {
116
- transform: `scale(${r})`,
117
- offset: .7
150
+ offset: .4
118
151
  },
119
152
  { transform: "scale(1)" }
120
153
  ], {
121
- duration: 200,
154
+ duration: 220,
122
155
  easing: t
123
156
  });
124
157
  }
125
- function G(e) {
126
- if (!I.value && !L.value) return;
127
- let t = k.value[e];
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 K(e, t) {
137
- if (h.options[t]?.disabled) return;
138
- let n = k.value[t];
139
- if (n && W(n), h.multiSelect) {
140
- let t = [...R.value], n = t.indexOf(e);
141
- n > -1 ? t.length > 1 && t.splice(n, 1) : t.push(e), g.value = t;
142
- } else g.value = e;
143
- G(t);
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 b(() => {
146
- _(() => {
147
- let e = h.options.findIndex((e) => z(e.value));
148
- e >= 0 && G(e);
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
- }), (o, c) => (S(), d("div", {
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: x,
153
- class: v(D(e)(F.value ? "bouncy-toggle bouncy-toggle--pill" : "bouncy-toggle", I.value && "bouncy-toggle--scroll scroll-fade-mask scrollbar-hidden", L.value && "bouncy-toggle--auto scrollbar-hidden", h.class))
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
- t.multiSelect ? u("", !0) : (S(), d("div", {
219
+ !z.value && !H.value ? (O(), h("div", {
156
220
  key: 0,
157
- class: v([F.value ? "bouncy-slider bouncy-slider--pill" : "bouncy-slider", B.value ? "bouncy-slider--js" : "bouncy-slider--anchor"]),
158
- style: y(B.value ? D(H) : void 0)
159
- }, null, 6)),
160
- t.multiSelect ? (S(!0), d(s, { key: 1 }, w(R.value, (e) => (S(), d("div", {
161
- key: "slider-" + e,
162
- class: v([F.value ? "bouncy-slider bouncy-slider--pill" : "bouncy-slider", "bouncy-slider--js"]),
163
- style: y(D(U)[e] ?? { opacity: "0" })
164
- }, null, 6))), 128)) : u("", !0),
165
- (S(!0), d(s, null, w(t.options, (e, t) => (S(), d(s, { key: e.value }, [e.tooltip ? (S(), l(D(a), {
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: A(() => [m(D(n), null, {
170
- default: A(() => [m(D(r), { "as-child": "" }, {
171
- default: A(() => [f("button", {
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 && (k.value[t] = e);
240
+ e && (L.value[t] = e);
175
241
  },
176
- class: v([F.value ? "bouncy-btn bouncy-btn--pill" : "bouncy-btn", e.disabled && "is-disabled"]),
177
- "aria-pressed": z(e.value) ? "true" : "false",
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
- onClick: (n) => K(e.value, t)
180
- }, [T(o.$slots, "option", {
246
+ class: e.disabled && "is-disabled",
247
+ onClick: (n) => $(e.value, t)
248
+ }), [j(f.$slots, "option", {
181
249
  option: e,
182
- active: z(e.value)
183
- }, () => [p(E(e.label), 1)], !0)], 10, M)]),
250
+ active: W(e.value)
251
+ }, () => [_(M(e.label), 1)], !0)], 16, re)]),
184
252
  _: 2
185
- }, 1024), m(D(i), {
253
+ }, 1024), v(N(l), {
186
254
  side: "bottom",
187
255
  "side-offset": 8
188
256
  }, {
189
- default: A(() => [p(E(e.tooltip), 1)]),
257
+ default: F(() => [_(M(e.tooltip), 1)]),
190
258
  _: 2
191
259
  }, 1024)]),
192
260
  _: 2
193
261
  }, 1024)]),
194
262
  _: 2
195
- }, 1024)) : (S(), d("button", {
263
+ }, 1024)) : (O(), h("button", x({
196
264
  key: 1,
197
265
  ref_for: !0,
198
266
  ref: (e) => {
199
- e && (k.value[t] = e);
267
+ e && (L.value[t] = e);
200
268
  },
201
- class: v([F.value ? "bouncy-btn bouncy-btn--pill" : "bouncy-btn", e.disabled && "is-disabled"]),
202
- "aria-pressed": z(e.value) ? "true" : "false",
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
- onClick: (n) => K(e.value, t)
205
- }, [T(o.$slots, "option", {
273
+ class: e.disabled && "is-disabled",
274
+ onClick: (n) => $(e.value, t)
275
+ }), [j(f.$slots, "option", {
206
276
  option: e,
207
- active: z(e.value)
208
- }, () => [p(E(e.label), 1)], !0)], 10, N))], 64))), 128))
209
- ], 2));
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 { F as BouncyTabs, P as BouncyToggle, o as UnderlineTabs };
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-D56O6Ylp.js";
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) {