@mkbabb/glass-ui 9.0.0 → 10.0.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 (170) hide show
  1. package/MIGRATION.md +4768 -0
  2. package/README.md +57 -13
  3. package/dist/DialogContent-CwIBvou_.js +157 -0
  4. package/dist/{DropdownMenuTrigger-8UZsBtZ8.js → DropdownMenuTrigger-CKRnhDSQ.js} +1 -1
  5. package/dist/{Surface-i1tWC-Ga.js → Surface-1nPoabc3.js} +1 -1
  6. package/dist/{accent-tone-solve-Cw7WkRD9.js → accent-tone-solve-5H6FY2QO.js} +1 -1
  7. package/dist/aurora.js +22 -13
  8. package/dist/{badge-owUOaaba.js → badge-BO6BC4G5.js} +1 -1
  9. package/dist/badge.js +1 -1
  10. package/dist/blob.js +2 -2
  11. package/dist/{button-yvGPb0Bx.js → button-BOFTUPyU.js} +1 -1
  12. package/dist/button.js +1 -1
  13. package/dist/{card-3HFFpC7_.js → card-ByyqRBvK.js} +2 -2
  14. package/dist/card.js +1 -1
  15. package/dist/carousel.js +3 -3
  16. package/dist/chip.js +8 -3
  17. package/dist/{class-names-q-UGOkHH.js → class-names-FlXcvRRT.js} +65 -18
  18. package/dist/{collapsible-B7O6m-Ch.js → collapsible-DFzK29Oh.js} +5 -2
  19. package/dist/collapsible.js +1 -1
  20. package/dist/color.js +11 -11
  21. package/dist/{command-tEzAaVY_.js → command-C-5xSEJ2.js} +8 -8
  22. package/dist/command.js +1 -1
  23. package/dist/component-styles.css +1 -0
  24. package/dist/components/_shared/class-names.d.ts +10 -1
  25. package/dist/components/_shared/menu/menu.css +1 -1
  26. package/dist/components/_shared/overlay/index.d.ts +1 -0
  27. package/dist/components/_shared/overlay/shortcuts.d.ts +12 -0
  28. package/dist/components/aurora/composables/atoms.d.ts +22 -6
  29. package/dist/components/aurora/composables/runtime.d.ts +6 -4
  30. package/dist/components/aurora/constants/presets.d.ts +19 -1
  31. package/dist/components/blob/Blob.vue.d.ts +3 -3
  32. package/dist/components/card/Card.vue.d.ts +8 -2
  33. package/dist/components/chip/Chip.vue.d.ts +1 -7
  34. package/dist/components/chip/chipVariants.d.ts +1 -0
  35. package/dist/components/collapsible/Collapsible.vue.d.ts +1 -0
  36. package/dist/components/command/CommandDialog.vue.d.ts +1 -1
  37. package/dist/components/configurator/styles.css +1 -1
  38. package/dist/components/dark-mode-toggle/dark-mode-toggle.css +1 -1
  39. package/dist/components/deck/styles/capture.css +1 -1
  40. package/dist/components/dialog/styles.css +1 -1
  41. package/dist/components/dock/composables/dockCrossfadeContext.d.ts +0 -2
  42. package/dist/components/dock/composables/index.d.ts +1 -1
  43. package/dist/components/dock/composables/useDockHold.d.ts +16 -12
  44. package/dist/components/dock/styles/layers.css +1 -1
  45. package/dist/components/fourier-field/FourierField.vue.d.ts +1 -1
  46. package/dist/components/fourier-field/constants.d.ts +8 -7
  47. package/dist/components/fourier-field/index.d.ts +2 -2
  48. package/dist/components/labeled-field/LabeledSwitch.vue.d.ts +3 -1
  49. package/dist/components/labeled-field/types.d.ts +1 -1
  50. package/dist/components/menu/DropdownMenu.vue.d.ts +1 -1
  51. package/dist/components/metric/coalesce-metric.d.ts +6 -1
  52. package/dist/components/metric/styles.css +1 -1
  53. package/dist/components/popover/Popover.vue.d.ts +1 -1
  54. package/dist/components/scroll-progress-rim/styles.css +1 -1
  55. package/dist/components/sheet/styles.css +1 -1
  56. package/dist/components/slider/styles.css +1 -1
  57. package/dist/components/tabs/SegmentedTabs.vue.d.ts +25 -112
  58. package/dist/components/tabs/composables/useTabDragMorph.d.ts +1 -1
  59. package/dist/components/tabs/composables/useTabResponsive.d.ts +11 -11
  60. package/dist/components/tabs/index.d.ts +1 -1
  61. package/dist/components/tabs/styles/drag.css +1 -1
  62. package/dist/components/tabs/styles/segmented.css +1 -1
  63. package/dist/components/tabs/types.d.ts +85 -0
  64. package/dist/components/timeline/index.d.ts +2 -0
  65. package/dist/components/toast/Toast.vue.d.ts +2 -2
  66. package/dist/composables/color/index.d.ts +0 -15
  67. package/dist/composables/dark/darkModeSyncScript.d.ts +24 -1
  68. package/dist/composables/dom/useResolveTokenColor.d.ts +1 -1
  69. package/dist/composables/glass/index.d.ts +2 -0
  70. package/dist/composables/keyboard/useKeyboardShortcuts.d.ts +47 -1
  71. package/dist/composables/sidebar/types.d.ts +5 -1
  72. package/dist/{configurator-BHJymdrF.js → configurator-DiwVN573.js} +16 -16
  73. package/dist/configurator.js +1 -1
  74. package/dist/constellation.js +3 -3
  75. package/dist/{content-CWO-XL7o.js → content-So3j6SOe.js} +1 -1
  76. package/dist/dark-mode-toggle.js +2 -2
  77. package/dist/{dark-CLlmo7dD.js → dark-pONY3x93.js} +2 -2
  78. package/dist/dark.js +1 -1
  79. package/dist/{data-table-_RrOEdiw.js → data-table-Ba_uTfPc.js} +3 -3
  80. package/dist/data-table.js +1 -1
  81. package/dist/{deck-Ci6YjB5e.js → deck-Cm_VmyNL.js} +1 -1
  82. package/dist/deck.js +1 -1
  83. package/dist/{dialog-CbRnTRtg.js → dialog-BZoFG0j8.js} +1 -1
  84. package/dist/dialog.js +2 -2
  85. package/dist/dock.js +9 -13
  86. package/dist/easing.js +4 -4
  87. package/dist/{expandable-container-BY1hQXi4.js → expandable-container-CZUj9BzY.js} +9 -9
  88. package/dist/expandable-container.js +1 -1
  89. package/dist/fourier-field.js +53 -58
  90. package/dist/glass-ui.css +1 -1
  91. package/dist/glass-ui.js +27 -27
  92. package/dist/handmark.js +1 -1
  93. package/dist/index.d.ts +1 -1
  94. package/dist/infinite-scroll.js +16 -17
  95. package/dist/{input-Bls2A4Tt.js → input-eLZ_AU7l.js} +1 -1
  96. package/dist/input.js +1 -1
  97. package/dist/keyboard.js +64 -21
  98. package/dist/{label-BQEZhnK_.js → label-CE03H1KL.js} +2 -2
  99. package/dist/label.js +1 -1
  100. package/dist/labeled-field.js +8 -5
  101. package/dist/{menu-TDMNtZjG.js → menu-BnmCOa3y.js} +92 -89
  102. package/dist/menu.js +2 -2
  103. package/dist/metric.js +12 -7
  104. package/dist/{motion-D4uYE0UM.js → motion-BvV1_24p.js} +1 -1
  105. package/dist/motion-core.js +1 -1
  106. package/dist/{number-field-NFAwQ0HK.js → number-field-RP89046a.js} +2 -2
  107. package/dist/number-field.js +1 -1
  108. package/dist/pager-dots.js +3 -3
  109. package/dist/popover-DA87hFBx.js +184 -0
  110. package/dist/popover.js +1 -1
  111. package/dist/{progress-DF8dWZIX.js → progress-eVa-mc7J.js} +1 -1
  112. package/dist/progress.js +1 -1
  113. package/dist/{radio-group-BNV7PN1O.js → radio-group-B58Bz16F.js} +1 -1
  114. package/dist/radio-group.js +1 -1
  115. package/dist/{select-COox45Kv.js → select-fy3vtArm.js} +13 -13
  116. package/dist/select.js +1 -1
  117. package/dist/{separator-CN11t406.js → separator-D4EZM10u.js} +2 -2
  118. package/dist/separator.js +1 -1
  119. package/dist/{sheet-BEFvnO_u.js → sheet-BQJyER59.js} +120 -115
  120. package/dist/sheet.js +2 -2
  121. package/dist/shortcuts-DGGWNRNe.js +13 -0
  122. package/dist/sidebar.js +4 -4
  123. package/dist/{status-dot-BpnqOP5N.js → status-dot-W4LFiJps.js} +2 -2
  124. package/dist/status-dot.js +1 -1
  125. package/dist/styles/accessibility.css +1 -1
  126. package/dist/styles/animations.css +1 -1
  127. package/dist/styles/components.css +1 -1
  128. package/dist/styles/glass/a11y-fallback.css +1 -1
  129. package/dist/styles/glass/dissolve.css +1 -1
  130. package/dist/styles/glass/focus-veil.css +1 -1
  131. package/dist/styles/glass/ladder.css +1 -1
  132. package/dist/styles/glass/overlay-plate.css +1 -1
  133. package/dist/styles/glass/reveal.css +1 -1
  134. package/dist/styles/glass-specular-track.css +1 -1
  135. package/dist/styles/paper.css +1 -1
  136. package/dist/styles/scroll-choreography.css +1 -1
  137. package/dist/styles/scroll-chrome.css +1 -1
  138. package/dist/styles/scroll-driven.css +1 -1
  139. package/dist/styles/theme/literals.css +1 -1
  140. package/dist/styles/tokens/color-radius.css +1 -1
  141. package/dist/styles/tokens/dark-arm-glass.css +1 -1
  142. package/dist/styles/tokens/light-dark.css +1 -1
  143. package/dist/styles/tokens/offsets.css +1 -1
  144. package/dist/styles/tokens/scheme-motion.css +1 -1
  145. package/dist/styles/tokens/sizing.css +1 -1
  146. package/dist/styles/typography/semantic.css +1 -1
  147. package/dist/styles/typography/utilities.css +1 -1
  148. package/dist/styles/utilities/a11y-overrides.css +1 -1
  149. package/dist/styles/utilities/responsive.css +1 -1
  150. package/dist/styles/view-transition.css +1 -1
  151. package/dist/styles/viz-reveal.css +1 -1
  152. package/dist/surface.js +1 -1
  153. package/dist/{switch-lLkbREB-.js → switch-BYUZ6g9G.js} +1 -1
  154. package/dist/switch.js +1 -1
  155. package/dist/{tabs-DSJMd1Et.js → tabs-rdRXKXxd.js} +4 -3
  156. package/dist/tabs.js +1 -1
  157. package/dist/textarea.js +1 -1
  158. package/dist/timeline.js +44 -42
  159. package/dist/{toast-9c6Kp58L.js → toast-DVOwo6GB.js} +1 -1
  160. package/dist/toast.js +1 -1
  161. package/dist/{toggle-group-DUcmKnDw.js → toggle-group-CC5b3o1R.js} +1 -1
  162. package/dist/toggle-group.js +1 -1
  163. package/dist/{tooltip-BKk2qVDn.js → tooltip-DhTHhtJN.js} +1 -1
  164. package/dist/tooltip.js +1 -1
  165. package/dist/typewriter.js +1 -1
  166. package/dist/{useAccentTone-DFAh1osB.js → useAccentTone-DitmKfGL.js} +1 -1
  167. package/dist/{usePointerVelocityField-DsIf7yyq.js → usePointerVelocityField-Lx26_Yap.js} +1 -1
  168. package/package.json +4 -2
  169. package/dist/DialogContent-4hzLiaCQ.js +0 -152
  170. package/dist/popover-C04Rrdcz.js +0 -181
package/dist/timeline.js CHANGED
@@ -4,18 +4,20 @@ import { t as n } from "./useLiquidPress-h1scrPtP.js";
4
4
  import { t as r } from "./useLiquidFlex-TJZmRqyY.js";
5
5
  import { t as i } from "./_plugin-vue_export-helper-B3ysoDQm.js";
6
6
  import { Fragment as a, computed as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, defineComponent as u, normalizeClass as d, normalizeStyle as f, openBlock as p, ref as m, renderList as h, renderSlot as ee, unref as g, watch as _ } from "vue";
7
- function v(e) {
7
+ //#region src/components/timeline/geometry.ts
8
+ var v = 2, y = 4, b = 13;
9
+ function x(e) {
8
10
  return Number.isFinite(e) ? e < 0 ? 0 : e > 1 ? 1 : e : 0;
9
11
  }
10
- function y(e) {
12
+ function S(e) {
11
13
  return typeof e.at == "number" && Number.isFinite(e.at);
12
14
  }
13
- function b(e) {
15
+ function C(e) {
14
16
  let t = e.length;
15
17
  if (t === 0) return [];
16
18
  let n = 0, r = e.map((e) => {
17
- if (!y(e)) return null;
18
- let t = v(e.at), r = t < n ? n : t;
19
+ if (!S(e)) return null;
20
+ let t = x(e.at), r = t < n ? n : t;
19
21
  return n = r, r;
20
22
  }), i = Array(t), a = 0, o = 0;
21
23
  for (; a < t;) {
@@ -39,28 +41,28 @@ function b(e) {
39
41
  };
40
42
  });
41
43
  }
42
- function x(e) {
43
- return typeof e.progress == "number" ? v(e.progress) : e.state === "completed" ? 1 : e.state === "active" ? null : 0;
44
+ function w(e) {
45
+ return typeof e.progress == "number" ? x(e.progress) : e.state === "completed" ? 1 : e.state === "active" ? null : 0;
44
46
  }
45
47
  function te(e) {
46
- let t = b(e), n = 0, r = 0;
48
+ let t = C(e), n = 0, r = 0;
47
49
  for (let i = 0; i < t.length; i += 1) {
48
50
  let a = t[i].width;
49
- n += a, r += a * (x(e[i]) ?? 0);
51
+ n += a, r += a * (w(e[i]) ?? 0);
50
52
  }
51
53
  return n > 0 ? r / n : 0;
52
54
  }
53
- function ne(e) {
55
+ function T(e) {
54
56
  return `var(--section-color-${(2 + 4 * e) % 13})`;
55
57
  }
56
58
  //#endregion
57
59
  //#region src/components/timeline/Timeline.vue?vue&type=script&setup=true&lang.ts
58
- var S = [
60
+ var E = [
59
61
  "aria-label",
60
62
  "aria-valuenow",
61
63
  "aria-valuetext",
62
64
  "data-advancing"
63
- ], C = ["data-state", "data-indeterminate"], w = {
65
+ ], ne = ["data-state", "data-indeterminate"], D = {
64
66
  class: "tl__marks",
65
67
  role: "list"
66
68
  }, re = [
@@ -82,7 +84,7 @@ var S = [
82
84
  viewBox: "0 0 24 24",
83
85
  fill: "none",
84
86
  "aria-hidden": "true"
85
- }, T = 1.08, E = /*#__PURE__*/ i(/* @__PURE__ */ u({
87
+ }, O = 1.08, k = /*#__PURE__*/ i(/* @__PURE__ */ u({
86
88
  __name: "Timeline",
87
89
  props: {
88
90
  segments: {},
@@ -91,12 +93,12 @@ var S = [
91
93
  },
92
94
  emits: ["select", "hover"],
93
95
  setup(i, { expose: u, emit: v }) {
94
- let y = i, E = v, D = o(() => y.segments ?? []), O = o(() => b(D.value)), k = o(() => te(D.value)), A = t("dock"), j = m();
96
+ let y = i, b = v, x = o(() => y.segments ?? []), S = o(() => C(x.value)), k = o(() => te(x.value)), A = t("dock"), j = m();
95
97
  function M() {
96
98
  let e = j.value;
97
- if (!e) return T;
99
+ if (!e) return O;
98
100
  let t = getComputedStyle(e).getPropertyValue("--scale-hover").trim();
99
- return Number(t) || T;
101
+ return Number(t) || O;
100
102
  }
101
103
  let N = r({
102
104
  from: 0,
@@ -104,14 +106,14 @@ var S = [
104
106
  axis: "width",
105
107
  squishLaw: "tanh",
106
108
  maxStretch: () => M()
107
- }), P = m(null), F = 0, I = o(() => O.value.reduce((e, t) => e + t.width, 0)), L = e(k, {
109
+ }), P = m(null), F = 0, I = o(() => S.value.reduce((e, t) => e + t.width, 0)), L = e(k, {
108
110
  response: A.response,
109
111
  dampingFraction: A.dampingFraction,
110
112
  onValue: (e) => {
111
113
  N.drive(e);
112
114
  let t = e * I.value;
113
- for (let e = 0; e < O.value.length; e += 1) {
114
- let n = O.value[e].at;
115
+ for (let e = 0; e < S.value.length; e += 1) {
116
+ let n = S.value[e].at;
115
117
  F < n && t >= n && (P.value = e);
116
118
  }
117
119
  F = t;
@@ -122,8 +124,8 @@ var S = [
122
124
  }, { immediate: !0 });
123
125
  let ae = o(() => !L.isSettled.value), oe = o(() => {
124
126
  let e = L.value.value * I.value;
125
- return O.value.map((t, n) => {
126
- let r = x(D.value[n]) ?? 0, i = t.width * r, a = e <= 0 ? 0 : Math.min(e, i);
127
+ return S.value.map((t, n) => {
128
+ let r = w(x.value[n]) ?? 0, i = t.width * r, a = e <= 0 ? 0 : Math.min(e, i);
127
129
  return e -= a, t.width > 0 ? a / t.width : 0;
128
130
  });
129
131
  });
@@ -131,13 +133,13 @@ var S = [
131
133
  return e.state ?? "pending";
132
134
  }
133
135
  function z(e) {
134
- return R(e) === "active" && x(e) === null;
136
+ return R(e) === "active" && w(e) === null;
135
137
  }
136
138
  function B(e, t) {
137
- return e.accent ?? ne(t);
139
+ return e.accent ?? T(t);
138
140
  }
139
- let se = o(() => O.value.map((e, t) => {
140
- let n = D.value[t];
141
+ let se = o(() => S.value.map((e, t) => {
142
+ let n = x.value[t];
141
143
  return {
142
144
  "--tl-l": String(e.left),
143
145
  "--tl-w": String(e.width),
@@ -145,27 +147,27 @@ var S = [
145
147
  "--tl-accent": B(n, t)
146
148
  };
147
149
  })), V = o(() => {
148
- let e = `${Math.round(k.value * 100)}%`, t = D.value.find((e) => z(e));
150
+ let e = `${Math.round(k.value * 100)}%`, t = x.value.find((e) => z(e));
149
151
  return t ? `${e} — ${t.label} underway` : e;
150
152
  }), H = m(0), U = m([]);
151
- _(() => [y.current, D.value.length], () => {
152
- let e = D.value.findIndex((e) => e.key === y.current);
153
- H.value = e >= 0 ? e : Math.min(H.value, Math.max(0, D.value.length - 1));
153
+ _(() => [y.current, x.value.length], () => {
154
+ let e = x.value.findIndex((e) => e.key === y.current);
155
+ H.value = e >= 0 ? e : Math.min(H.value, Math.max(0, x.value.length - 1));
154
156
  }, { immediate: !0 });
155
157
  function W(e) {
156
- let t = Math.max(0, Math.min(D.value.length - 1, e));
158
+ let t = Math.max(0, Math.min(x.value.length - 1, e));
157
159
  H.value = t, U.value[t]?.focus();
158
160
  }
159
161
  function ce(e, t) {
160
162
  if (e.key === "ArrowRight" || e.key === "ArrowDown") W(t + 1);
161
163
  else if (e.key === "ArrowLeft" || e.key === "ArrowUp") W(t - 1);
162
164
  else if (e.key === "Home") W(0);
163
- else if (e.key === "End") W(D.value.length - 1);
165
+ else if (e.key === "End") W(x.value.length - 1);
164
166
  else return;
165
167
  e.preventDefault();
166
168
  }
167
169
  function le(e) {
168
- E("select", {
170
+ b("select", {
169
171
  key: e.key,
170
172
  segment: e
171
173
  });
@@ -182,20 +184,20 @@ var S = [
182
184
  }
183
185
  let J = m(null), Y = o(() => {
184
186
  let e = J.value ?? y.current ?? null;
185
- return e == null ? null : D.value.find((t) => t.key === e) ?? null;
187
+ return e == null ? null : x.value.find((t) => t.key === e) ?? null;
186
188
  }), de = o(() => J.value == null ? y.current == null ? "idle" : "current" : "hovered"), X = m(1), Z = -1;
187
189
  _(Y, (e) => {
188
- let t = e ? D.value.findIndex((t) => t.key === e.key) : -1;
190
+ let t = e ? x.value.findIndex((t) => t.key === e.key) : -1;
189
191
  t >= 0 && Z >= 0 && (X.value = t >= Z ? 1 : -1), Z = t;
190
192
  });
191
193
  function Q(e) {
192
- J.value = e.key, E("hover", {
194
+ J.value = e.key, b("hover", {
193
195
  key: e.key,
194
196
  segment: e
195
197
  });
196
198
  }
197
199
  function $(e) {
198
- J.value === e.key && (J.value = null, E("hover", null));
200
+ J.value === e.key && (J.value = null, b("hover", null));
199
201
  }
200
202
  return u({ value: k }), (e, t) => (p(), c("div", {
201
203
  ref_key: "rootRef",
@@ -216,7 +218,7 @@ var S = [
216
218
  "aria-valuenow": k.value,
217
219
  "aria-valuetext": V.value,
218
220
  "data-advancing": ae.value || void 0
219
- }, [(p(!0), c(a, null, h(D.value, (e, t) => (p(), c("div", {
221
+ }, [(p(!0), c(a, null, h(x.value, (e, t) => (p(), c("div", {
220
222
  key: e.key,
221
223
  class: d(["tl__span", { "track-flow": z(e) }]),
222
224
  "aria-hidden": "true",
@@ -230,12 +232,12 @@ var S = [
230
232
  key: 0,
231
233
  class: "tl__cap",
232
234
  style: f(g(N).stretchStyle.value)
233
- }, null, 4)) : s("", !0)], 2))], 14, C))), 128))], 8, S),
234
- l("ul", w, [(p(!0), c(a, null, h(D.value, (e, n) => (p(), c("li", {
235
+ }, null, 4)) : s("", !0)], 2))], 14, ne))), 128))], 8, E),
236
+ l("ul", D, [(p(!0), c(a, null, h(x.value, (e, n) => (p(), c("li", {
235
237
  key: e.key,
236
238
  class: "tl__mark-seat",
237
239
  style: f({
238
- "--tl-at": String(O.value[n]?.at ?? 0),
240
+ "--tl-at": String(S.value[n]?.at ?? 0),
239
241
  "--tl-accent": B(e, n)
240
242
  })
241
243
  }, [l("button", {
@@ -282,6 +284,6 @@ var S = [
282
284
  }, void 0, !0)])) : s("", !0)
283
285
  ], 4));
284
286
  }
285
- }), [["__scopeId", "data-v-ba6961e5"]]);
287
+ }), [["__scopeId", "data-v-4c4ed383"]]);
286
288
  //#endregion
287
- export { E as Timeline };
289
+ export { v as HUE_OFFSET, b as HUE_STOPS, y as HUE_STRIDE, k as Timeline, T as accentFor };
@@ -1,4 +1,4 @@
1
- import { t as e } from "./class-names-q-UGOkHH.js";
1
+ import { t as e } from "./class-names-FlXcvRRT.js";
2
2
  import { t } from "./resolve-DdrNvBby.js";
3
3
  import { Fragment as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, mergeProps as d, normalizeClass as f, openBlock as p, ref as m, renderList as h, renderSlot as g, resolveDynamicComponent as _, toDisplayString as v, unref as y, useAttrs as b, withCtx as x } from "vue";
4
4
  import { ToastAction as S, ToastClose as C, ToastDescription as w, ToastPortal as T, ToastProvider as E, ToastRoot as D, ToastTitle as O, ToastViewport as k, useForwardPropsEmits as A } from "reka-ui";
package/dist/toast.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "./toast-9c6Kp58L.js";
1
+ import { a as e, c as t, i as n, n as r, o as i, r as a, s as o, t as s } from "./toast-DVOwo6GB.js";
2
2
  export { t as Toast, o as ToastAction, i as ToastClose, e as ToastDescription, n as ToastTitle, s as Toaster, r as toast, a as useToast };
@@ -1,4 +1,4 @@
1
- import { t as e } from "./class-names-q-UGOkHH.js";
1
+ import { t as e } from "./class-names-FlXcvRRT.js";
2
2
  import { t } from "./control-DJp15L4U.js";
3
3
  import { t as n } from "./createContext-BhkE9mLH.js";
4
4
  import { t as r } from "./useSelectionGroup-zsEwitF6.js";
@@ -1,2 +1,2 @@
1
- import { n as e, t } from "./toggle-group-DUcmKnDw.js";
1
+ import { n as e, t } from "./toggle-group-CC5b3o1R.js";
2
2
  export { e as ToggleGroup, t as ToggleGroupItem };
@@ -1,4 +1,4 @@
1
- import { t as e } from "./content-CWO-XL7o.js";
1
+ import { t as e } from "./content-So3j6SOe.js";
2
2
  import { t } from "./participation-Di4UHbzk.js";
3
3
  import { computed as n, createBlock as r, createVNode as i, defineComponent as a, mergeProps as o, openBlock as s, renderSlot as c, unref as l, useAttrs as u, withCtx as d } from "vue";
4
4
  import { TooltipContent as f, TooltipPortal as p, TooltipProvider as m, TooltipRoot as h, TooltipTrigger as g } from "reka-ui";
package/dist/tooltip.js CHANGED
@@ -1,2 +1,2 @@
1
- import { i as e, n as t, r as n, t as r } from "./tooltip-BKk2qVDn.js";
1
+ import { i as e, n as t, r as n, t as r } from "./tooltip-DhTHhtJN.js";
2
2
  export { e as Tooltip, n as TooltipContent, r as TooltipProvider, t as TooltipTrigger };
@@ -847,6 +847,6 @@ var X = { class: "tw-root" }, Z = { class: "sr-only tw-accessible" }, Q = {
847
847
  }, " | ", 2)) : i("", !0)]))])
848
848
  ]));
849
849
  }
850
- }), [["__scopeId", "data-v-5d7c7d10"]]);
850
+ }), [["__scopeId", "data-v-e8359620"]]);
851
851
  //#endregion
852
852
  export { y as DEFAULTS, B as DEFAULT_TYPO_CONFIG, j as PAUSE_PATTERNS, b as QWERTY_MAP, ee as TypewriterText, L as backspaceDelay, x as calculateKeyDelay, P as createCancellationToken, V as createTypoContext, O as getAdjacentKeys, N as getPauseDelay, H as nextTypoAction, R as pickNgramSize, k as pickTypoChar, z as randomInRange, F as sleep, I as stochasticDelay, Y as useTypewriter };
@@ -2,7 +2,7 @@ import { computed as e, ref as t, toValue as n } from "vue";
2
2
  //#region src/composables/color/useAccentTone.ts
3
3
  var r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a, o = (e, t) => `${e}|${t.surface ?? ""}|${t.inkContrast ?? ""}|${t.bandStrength ?? ""}`;
4
4
  function s() {
5
- return a ??= import("./accent-tone-solve-Cw7WkRD9.js").catch(() => null);
5
+ return a ??= import("./accent-tone-solve-5H6FY2QO.js").catch(() => null);
6
6
  }
7
7
  function c(e, t) {
8
8
  let n = i.get(e) ?? /* @__PURE__ */ new Set();
@@ -37,7 +37,7 @@ function o(o = {}) {
37
37
  };
38
38
  }
39
39
  let M = i(b, (e) => {
40
- e && j();
40
+ e && (j(), O.value = 0);
41
41
  }, { flush: "sync" });
42
42
  function N(e, t) {
43
43
  b.value || (S.value = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mkbabb/glass-ui",
3
- "version": "9.0.0",
3
+ "version": "10.0.0",
4
4
  "description": "Glassmorphic design system — Vue 3.5 components, reka-ui primitives, Tailwind CSS v4 tokens",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -468,7 +468,8 @@
468
468
  "./fonts/*": "./dist/fonts/*"
469
469
  },
470
470
  "files": [
471
- "dist"
471
+ "dist",
472
+ "MIGRATION.md"
472
473
  ],
473
474
  "scripts": {
474
475
  "build": "vite build",
@@ -530,6 +531,7 @@
530
531
  "happy-dom": "^20.9.0",
531
532
  "lightningcss": "^1.32.0",
532
533
  "postcss": "^8.5.19",
534
+ "playwright": "1.61.1",
533
535
  "reka-ui": "^2.9",
534
536
  "tailwindcss": "^4.3.1",
535
537
  "tw-animate-css": "^1.2.5",
@@ -1,152 +0,0 @@
1
- import { t as e } from "./class-names-q-UGOkHH.js";
2
- import { t } from "./resolve-DdrNvBby.js";
3
- import { t as n } from "./useSpringMount-OA-0mTNv.js";
4
- import { i as r, n as i } from "./motion-D4uYE0UM.js";
5
- import { t as a } from "./useMotionAxis-D-rtIhca.js";
6
- import { computed as o, createBlock as s, createCommentVNode as c, createElementVNode as l, createVNode as u, defineComponent as d, mergeProps as f, openBlock as p, ref as m, renderSlot as h, unref as g, watch as _, withCtx as v } from "vue";
7
- import { DialogClose as y, DialogContent as b, DialogPortal as x, DialogRoot as S, injectDialogRootContext as C, useForwardPropsEmits as w } from "reka-ui";
8
- //#endregion
9
- //#region src/components/dialog/Dialog.vue
10
- var T = /* @__PURE__ */ d({
11
- __name: "Dialog",
12
- props: {
13
- open: { type: Boolean },
14
- defaultOpen: { type: Boolean },
15
- modal: { type: Boolean },
16
- unmountOnHide: { type: Boolean },
17
- origin: {}
18
- },
19
- emits: ["update:open"],
20
- setup(e, { emit: t }) {
21
- let n = e, r = t, i = w(o(() => {
22
- let { origin: e, ...t } = n;
23
- return t;
24
- }), r);
25
- return (e, t) => (p(), s(g(S), f({ "data-slot": "dialog" }, g(i)), {
26
- default: v(() => [h(e.$slots, "default")]),
27
- _: 3
28
- }, 16));
29
- }
30
- }), E = /* @__PURE__ */ d({
31
- inheritAttrs: !1,
32
- __name: "DialogContent",
33
- props: {
34
- forceMount: { type: Boolean },
35
- disableOutsidePointerEvents: { type: Boolean },
36
- class: { type: [
37
- Boolean,
38
- null,
39
- String,
40
- Object,
41
- Array
42
- ] },
43
- surface: { default: "glass" },
44
- motion: {},
45
- scroll: {
46
- type: Boolean,
47
- default: !1
48
- },
49
- dismiss: { default: "free" }
50
- },
51
- emits: [
52
- "escapeKeyDown",
53
- "pointerDownOutside",
54
- "focusOutside",
55
- "interactOutside",
56
- "openAutoFocus",
57
- "closeAutoFocus"
58
- ],
59
- setup(d, { emit: S }) {
60
- let T = d, E = S, D = o(() => {
61
- let { class: e, surface: t, motion: n, scroll: r, dismiss: i, forceMount: a, ...o } = T;
62
- return o;
63
- }), O = a(() => T.motion), k = o(() => O.resolved.value !== "off"), A = C(), j = n({
64
- open: A.open,
65
- preset: "present"
66
- }), M = o(() => {
67
- if (!k.value) return;
68
- let e = j.position.value;
69
- return {
70
- transform: "none",
71
- scale: String(1 - .05 * e),
72
- opacity: String(1 - e),
73
- transition: "none"
74
- };
75
- }), N = o(() => k.value ? j.present.value || A.open.value : T.forceMount), P = o(() => k.value && !A.open.value ? "" : void 0), F = o(() => k.value ? i(j.position.value) : null), I = o(() => k.value ? j.present.value || A.open.value : void 0), L = m(null), R = () => L.value?.closest("[data-slot=\"dialog-content\"]") ?? null;
76
- _(() => A.open.value, (e) => {
77
- if (!k.value || e !== !1) return;
78
- let t = document.activeElement;
79
- t && R()?.contains(t) && A.triggerElement.value?.focus({ preventScroll: !0 });
80
- }, { flush: "sync" });
81
- let z = m(0), B = o(() => z.value === 0 ? void 0 : z.value % 2 == 1 ? "a" : "b"), V = o(() => T.dismiss === "free");
82
- function H(e) {
83
- T.dismiss === "locked" && (e.preventDefault(), z.value += 1);
84
- }
85
- let U = w(D, E), W = o(() => ({
86
- "--glass-veil-tier": "var(--glass-veil-dialog)",
87
- ...O.hostStyle.value ?? {},
88
- ...M.value ?? {}
89
- })), G = o(() => e("fixed left-1/2 top-1/2 z-modal", t("floating"), T.scroll ? "max-h-[calc(100dvh-2rem)] overflow-y-auto" : "", T.class));
90
- return (e, t) => (p(), s(g(x), { "force-mount": N.value }, {
91
- default: v(() => [u(r, {
92
- veil: "",
93
- opacity: F.value,
94
- "force-mount": I.value
95
- }, null, 8, ["opacity", "force-mount"]), u(g(b), f({
96
- ...g(U),
97
- ...e.$attrs,
98
- inert: P.value
99
- }, {
100
- "force-mount": N.value,
101
- class: G.value,
102
- style: W.value,
103
- "data-surface": T.surface,
104
- "data-slot": "dialog-content",
105
- "data-dismiss": T.dismiss,
106
- "data-rebuff": B.value,
107
- "data-scroll": T.scroll ? "" : void 0,
108
- "data-motion": g(O).dataMotion.value,
109
- onEscapeKeyDown: H,
110
- onPointerDownOutside: H
111
- }), {
112
- default: v(() => [
113
- l("span", {
114
- ref_key: "contentAnchorEl",
115
- ref: L,
116
- hidden: ""
117
- }, null, 512),
118
- V.value ? (p(), s(g(y), {
119
- key: 0,
120
- "data-slot": "dialog-close"
121
- }, {
122
- default: v(() => [...t[0] ||= [l("svg", {
123
- class: "w-4 h-4",
124
- viewBox: "0 0 24 24",
125
- fill: "none",
126
- stroke: "currentColor",
127
- "stroke-width": "2",
128
- "stroke-linecap": "round",
129
- "stroke-linejoin": "round",
130
- "aria-hidden": "true"
131
- }, [l("path", { d: "M18 6 6 18M6 6l12 12" })], -1), l("span", { class: "sr-only" }, "Close", -1)]]),
132
- _: 1
133
- })) : c("", !0),
134
- h(e.$slots, "default")
135
- ]),
136
- _: 3
137
- }, 16, [
138
- "force-mount",
139
- "class",
140
- "style",
141
- "data-surface",
142
- "data-dismiss",
143
- "data-rebuff",
144
- "data-scroll",
145
- "data-motion"
146
- ])]),
147
- _: 3
148
- }, 8, ["force-mount"]));
149
- }
150
- });
151
- //#endregion
152
- export { T as n, E as t };
@@ -1,181 +0,0 @@
1
- import { t as e } from "./content-CWO-XL7o.js";
2
- import { t } from "./createContext-BhkE9mLH.js";
3
- import { t as n } from "./participation-Di4UHbzk.js";
4
- import { computed as r, createBlock as i, defineComponent as a, mergeProps as o, openBlock as s, ref as c, renderSlot as l, resolveDynamicComponent as u, unref as d, useAttrs as f, watch as p, withCtx as m } from "vue";
5
- import { HoverCardContent as h, HoverCardPortal as g, HoverCardRoot as _, HoverCardTrigger as v, PopoverContent as y, PopoverPortal as b, PopoverRoot as x, PopoverTrigger as S } from "reka-ui";
6
- //#region src/components/popover/popoverContext.ts
7
- var C = t("glass-ui:popover-union"), w = C.provide, T = C.use, E = /* @__PURE__ */ a({
8
- name: "Popover",
9
- inheritAttrs: !1,
10
- __name: "Popover",
11
- props: {
12
- open: {
13
- type: Boolean,
14
- default: void 0
15
- },
16
- defaultOpen: {
17
- type: Boolean,
18
- default: !1
19
- },
20
- trigger: { default: "click" },
21
- openDelay: { default: 250 },
22
- closeDelay: { default: 150 },
23
- keepDockOpen: {
24
- type: Boolean,
25
- default: !1
26
- },
27
- modal: {
28
- type: Boolean,
29
- default: !1
30
- }
31
- },
32
- emits: ["update:open"],
33
- setup(e, { emit: t }) {
34
- let a = e, o = t, u = c(a.open ?? a.defaultOpen);
35
- p(() => a.open, (e) => {
36
- e !== void 0 && (u.value = e);
37
- });
38
- let f = r(() => a.open ?? u.value);
39
- function h(e) {
40
- a.open === void 0 && (u.value = e), o("update:open", e);
41
- }
42
- let g = typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(pointer: coarse)").matches, v = r(() => a.trigger === "hover" && !g);
43
- return w({
44
- usesHoverRoot: v,
45
- modal: r(() => a.modal)
46
- }), n({ hold: () => f.value && a.keepDockOpen }), (t, n) => v.value ? (s(), i(d(_), {
47
- key: 0,
48
- "data-slot": "popover",
49
- open: f.value,
50
- "open-delay": e.openDelay,
51
- "close-delay": e.closeDelay,
52
- "onUpdate:open": h
53
- }, {
54
- default: m(() => [l(t.$slots, "default")]),
55
- _: 3
56
- }, 8, [
57
- "open",
58
- "open-delay",
59
- "close-delay"
60
- ])) : (s(), i(d(x), {
61
- key: 1,
62
- "data-slot": "popover",
63
- open: f.value,
64
- modal: e.modal,
65
- "onUpdate:open": h
66
- }, {
67
- default: m(() => [l(t.$slots, "default")]),
68
- _: 3
69
- }, 8, ["open", "modal"]));
70
- }
71
- }), D = /* @__PURE__ */ a({
72
- name: "PopoverTrigger",
73
- inheritAttrs: !1,
74
- __name: "PopoverTrigger",
75
- props: {
76
- asChild: {
77
- type: Boolean,
78
- default: !1
79
- },
80
- class: { type: [
81
- Boolean,
82
- null,
83
- String,
84
- Object,
85
- Array
86
- ] }
87
- },
88
- setup(e) {
89
- let t = e, n = f(), a = r(() => {
90
- let { as: e, reference: r, ...i } = n;
91
- return t.asChild ? i : {
92
- ...i,
93
- type: "button"
94
- };
95
- }), c = T(), u = r(() => c?.usesHoverRoot.value ?? !1);
96
- return (n, r) => u.value ? (s(), i(d(v), o({ key: 0 }, a.value, {
97
- as: "button",
98
- "as-child": e.asChild,
99
- class: t.class
100
- }), {
101
- default: m(() => [l(n.$slots, "default")]),
102
- _: 3
103
- }, 16, ["as-child", "class"])) : (s(), i(d(S), o({ key: 1 }, a.value, {
104
- as: "button",
105
- "as-child": e.asChild,
106
- class: t.class
107
- }), {
108
- default: m(() => [l(n.$slots, "default")]),
109
- _: 3
110
- }, 16, ["as-child", "class"]));
111
- }
112
- }), O = /* @__PURE__ */ a({
113
- name: "PopoverContent",
114
- inheritAttrs: !1,
115
- __name: "PopoverContent",
116
- props: {
117
- class: { type: [
118
- Boolean,
119
- null,
120
- String,
121
- Object,
122
- Array
123
- ] },
124
- portal: {
125
- type: Boolean,
126
- default: !0
127
- },
128
- ariaLabel: {},
129
- side: { default: "bottom" },
130
- sideOffset: { default: 4 },
131
- align: { default: "center" },
132
- alignOffset: { default: 0 }
133
- },
134
- emits: [
135
- "escapeKeyDown",
136
- "pointerDownOutside",
137
- "focusOutside",
138
- "interactOutside",
139
- "openAutoFocus",
140
- "closeAutoFocus"
141
- ],
142
- setup(t, { emit: a }) {
143
- let c = t, p = a, _ = f(), v = r(() => ({
144
- side: c.side,
145
- sideOffset: c.sideOffset,
146
- align: c.align,
147
- alignOffset: c.alignOffset,
148
- avoidCollisions: !0
149
- })), x = (e, { slots: t }) => t.default?.(), S = T(), C = r(() => S?.usesHoverRoot.value ?? !1), w = r(() => c.portal ? C.value ? g : b : x), E = r(() => C.value ? h : y), D = r(() => (S?.modal.value ?? !1) && !C.value), O = r(() => ({
150
- "aria-label": c.ariaLabel,
151
- ...C.value ? { role: "group" } : {},
152
- ...D.value ? { "aria-modal": "true" } : {}
153
- })), k = n(), A = r(() => e({
154
- role: "panel",
155
- slot: "popover-content",
156
- dock: k.portalAttrs.value,
157
- class: ["z-popover", c.class]
158
- }));
159
- return (e, t) => (s(), i(u(w.value), null, {
160
- default: m(() => [(s(), i(u(E.value), o({
161
- ...v.value,
162
- ...d(_),
163
- ...O.value,
164
- ...A.value
165
- }, {
166
- onEscapeKeyDown: t[0] ||= (e) => p("escapeKeyDown", e),
167
- onPointerDownOutside: t[1] ||= (e) => p("pointerDownOutside", e),
168
- onFocusOutside: t[2] ||= (e) => p("focusOutside", e),
169
- onInteractOutside: t[3] ||= (e) => p("interactOutside", e),
170
- onOpenAutoFocus: t[4] ||= (e) => p("openAutoFocus", e),
171
- onCloseAutoFocus: t[5] ||= (e) => p("closeAutoFocus", e)
172
- }), {
173
- default: m(() => [l(e.$slots, "default")]),
174
- _: 3
175
- }, 16))]),
176
- _: 3
177
- }));
178
- }
179
- });
180
- //#endregion
181
- export { D as n, E as r, O as t };