@goliapkg/gds 0.9.3 → 0.9.5

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 (126) hide show
  1. package/dist/avatar-By0U5Vts.js +74 -0
  2. package/dist/avatar-By0U5Vts.js.map +1 -0
  3. package/dist/badge-DTJq6AXr.js +59 -0
  4. package/dist/badge-DTJq6AXr.js.map +1 -0
  5. package/dist/button-avu-rQU4.js +99 -0
  6. package/dist/button-avu-rQU4.js.map +1 -0
  7. package/dist/dom-17XgfxMq.js +20 -0
  8. package/dist/dom-17XgfxMq.js.map +1 -0
  9. package/dist/gesture-BCGijGek.js +104 -0
  10. package/dist/gesture-BCGijGek.js.map +1 -0
  11. package/dist/gesture-system-v-bjvnCe.js +56 -0
  12. package/dist/gesture-system-v-bjvnCe.js.map +1 -0
  13. package/dist/glass-CQTlX7IO.js +1702 -0
  14. package/dist/glass-CQTlX7IO.js.map +1 -0
  15. package/dist/highlight-BAGZc-4h.js +28 -0
  16. package/dist/highlight-BAGZc-4h.js.map +1 -0
  17. package/dist/hooks-BE-_EmDI.js +87 -0
  18. package/dist/hooks-BE-_EmDI.js.map +1 -0
  19. package/dist/icon-button-YatlVZnz.js +44 -0
  20. package/dist/icon-button-YatlVZnz.js.map +1 -0
  21. package/dist/index.d.ts +8 -2
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +32 -18594
  24. package/dist/l0-tokens/deps.d.ts +5 -0
  25. package/dist/l0-tokens/deps.d.ts.map +1 -1
  26. package/dist/l0-tokens/index.js +4 -0
  27. package/dist/l0-tokens-DZkyVlac.js +296 -0
  28. package/dist/l0-tokens-DZkyVlac.js.map +1 -0
  29. package/dist/l1-systems/index.js +2 -0
  30. package/dist/l2-primitives/index.js +11 -0
  31. package/dist/l2-primitives/screen-overlay.d.ts.map +1 -1
  32. package/dist/l2-primitives/truncate.d.ts +2 -1
  33. package/dist/l2-primitives/truncate.d.ts.map +1 -1
  34. package/dist/l2-primitives-CqrezrJ4.js +482 -0
  35. package/dist/l2-primitives-CqrezrJ4.js.map +1 -0
  36. package/dist/l3-atoms/index.d.ts +0 -14
  37. package/dist/l3-atoms/index.d.ts.map +1 -1
  38. package/dist/l3-atoms/index.js +6 -0
  39. package/dist/l3-atoms/keyboard-shortcut.d.ts +1 -1
  40. package/dist/l3-atoms/keyboard-shortcut.d.ts.map +1 -1
  41. package/dist/l3-atoms/sparkle.d.ts +1 -1
  42. package/dist/l3-atoms/sparkle.d.ts.map +1 -1
  43. package/dist/l3-atoms-CsN9IA9J.js +1794 -0
  44. package/dist/l3-atoms-CsN9IA9J.js.map +1 -0
  45. package/dist/l4-molecules/dialog.d.ts.map +1 -1
  46. package/dist/l4-molecules/editable.d.ts.map +1 -0
  47. package/dist/l4-molecules/index.d.ts +12 -4
  48. package/dist/l4-molecules/index.d.ts.map +1 -1
  49. package/dist/l4-molecules/index.js +4 -0
  50. package/dist/l4-molecules/overflow-menu.d.ts.map +1 -0
  51. package/dist/l4-molecules/pin-input.d.ts.map +1 -0
  52. package/dist/l4-molecules/popover.d.ts.map +1 -0
  53. package/dist/l4-molecules/split-button.d.ts.map +1 -0
  54. package/dist/l4-molecules/tag-input.d.ts.map +1 -0
  55. package/dist/l4-molecules-DCc074MJ.js +4048 -0
  56. package/dist/l4-molecules-DCc074MJ.js.map +1 -0
  57. package/dist/l5-organisms/command-palette.d.ts.map +1 -1
  58. package/dist/l5-organisms/confetti.d.ts.map +1 -1
  59. package/dist/l5-organisms/cookie-banner.d.ts.map +1 -1
  60. package/dist/l5-organisms/image-preview.d.ts.map +1 -1
  61. package/dist/l5-organisms/index.d.ts +2 -0
  62. package/dist/l5-organisms/index.d.ts.map +1 -1
  63. package/dist/l5-organisms/index.js +2 -0
  64. package/dist/l5-organisms/notification-toast.d.ts.map +1 -1
  65. package/dist/{l4-molecules → l5-organisms}/sortable-table.d.ts.map +1 -1
  66. package/dist/l5-organisms-8KB_8a-H.js +3798 -0
  67. package/dist/l5-organisms-8KB_8a-H.js.map +1 -0
  68. package/dist/l6-charts/candlestick-chart.d.ts.map +1 -1
  69. package/dist/l6-charts/index.js +2 -0
  70. package/dist/l6-charts-DYnr5B9X.js +1743 -0
  71. package/dist/l6-charts-DYnr5B9X.js.map +1 -0
  72. package/dist/l7-patterns/index.js +2 -0
  73. package/dist/l7-patterns-DZXveS4Y.js +1826 -0
  74. package/dist/l7-patterns-DZXveS4Y.js.map +1 -0
  75. package/dist/loading-dots-fB4X_Zh0.js +24 -0
  76. package/dist/loading-dots-fB4X_Zh0.js.map +1 -0
  77. package/dist/motion-DUPegem-.js +22 -0
  78. package/dist/motion-DUPegem-.js.map +1 -0
  79. package/dist/portal-Bbl6F_Wj.js +9 -0
  80. package/dist/portal-Bbl6F_Wj.js.map +1 -0
  81. package/dist/progress-wAKN3Czz.js +44 -0
  82. package/dist/progress-wAKN3Czz.js.map +1 -0
  83. package/dist/resize-handle-CktEYqwi.js +77 -0
  84. package/dist/resize-handle-CktEYqwi.js.map +1 -0
  85. package/dist/scales-C80FTPsL.js +1299 -0
  86. package/dist/scales-C80FTPsL.js.map +1 -0
  87. package/dist/separator-Dqs23A9D.js +65 -0
  88. package/dist/separator-Dqs23A9D.js.map +1 -0
  89. package/dist/skeleton-C9FFZSYN.js +43 -0
  90. package/dist/skeleton-C9FFZSYN.js.map +1 -0
  91. package/dist/spinner-D8Ti-TFe.js +101 -0
  92. package/dist/spinner-D8Ti-TFe.js.map +1 -0
  93. package/dist/stepper-DhpGORX8.js +140 -0
  94. package/dist/stepper-DhpGORX8.js.map +1 -0
  95. package/dist/switch-DC85Os9r.js +130 -0
  96. package/dist/switch-DC85Os9r.js.map +1 -0
  97. package/dist/textarea-BJCl_aH2.js +40 -0
  98. package/dist/textarea-BJCl_aH2.js.map +1 -0
  99. package/dist/toast-DN5xANLM.js +442 -0
  100. package/dist/toast-DN5xANLM.js.map +1 -0
  101. package/dist/use-theme-C0aWVw70.js +203 -0
  102. package/dist/use-theme-C0aWVw70.js.map +1 -0
  103. package/dist/utils/index.d.ts +1 -0
  104. package/dist/utils/index.d.ts.map +1 -1
  105. package/dist/utils/index.js +7 -0
  106. package/dist/utils/portal.d.ts +3 -0
  107. package/dist/utils/portal.d.ts.map +1 -0
  108. package/package.json +37 -1
  109. package/dist/index.js.map +0 -1
  110. package/dist/l3-atoms/editable.d.ts.map +0 -1
  111. package/dist/l3-atoms/overflow-menu.d.ts.map +0 -1
  112. package/dist/l3-atoms/pin-input.d.ts.map +0 -1
  113. package/dist/l3-atoms/popover.d.ts.map +0 -1
  114. package/dist/l3-atoms/split-button.d.ts.map +0 -1
  115. package/dist/l3-atoms/tag-input.d.ts.map +0 -1
  116. package/dist/l3-atoms/time-since.d.ts +0 -9
  117. package/dist/l3-atoms/time-since.d.ts.map +0 -1
  118. package/dist/l4-molecules/otp-input.d.ts +0 -11
  119. package/dist/l4-molecules/otp-input.d.ts.map +0 -1
  120. /package/dist/{l3-atoms → l4-molecules}/editable.d.ts +0 -0
  121. /package/dist/{l3-atoms → l4-molecules}/overflow-menu.d.ts +0 -0
  122. /package/dist/{l3-atoms → l4-molecules}/pin-input.d.ts +0 -0
  123. /package/dist/{l3-atoms → l4-molecules}/popover.d.ts +0 -0
  124. /package/dist/{l3-atoms → l4-molecules}/split-button.d.ts +0 -0
  125. /package/dist/{l3-atoms → l4-molecules}/tag-input.d.ts +0 -0
  126. /package/dist/{l4-molecules → l5-organisms}/sortable-table.d.ts +0 -0
@@ -0,0 +1,1794 @@
1
+ import { r as e, t } from "./glass-CQTlX7IO.js";
2
+ import { r as n, t as r } from "./button-avu-rQU4.js";
3
+ import { r as i } from "./motion-DUPegem-.js";
4
+ import { t as a } from "./badge-DTJq6AXr.js";
5
+ import { r as o, t as s } from "./textarea-BJCl_aH2.js";
6
+ import { t as c } from "./skeleton-C9FFZSYN.js";
7
+ import { t as l } from "./avatar-By0U5Vts.js";
8
+ import { n as u } from "./resize-handle-CktEYqwi.js";
9
+ import { t as d } from "./switch-DC85Os9r.js";
10
+ import { r as f } from "./dom-17XgfxMq.js";
11
+ import { forwardRef as p, useCallback as m, useEffect as h, useMemo as g, useRef as _, useState as v } from "react";
12
+ import { jsx as y, jsxs as b } from "react/jsx-runtime";
13
+ //#region src/l3-atoms/animated-counter.tsx
14
+ var x = (e) => Number.isInteger(e) ? e.toLocaleString() : e.toLocaleString(void 0, { maximumFractionDigits: 2 }), S = p(function({ className: t, duration: n = 500, format: r = x, prefix: i, suffix: a, value: o, ...s }, c) {
15
+ let [l, u] = v(o), d = _(o), f = _(0);
16
+ return h(() => {
17
+ let e = d.current, t = o;
18
+ if (d.current = t, e === t) return;
19
+ let r = performance.now(), i = t - e, a = (o) => {
20
+ let s = o - r, c = Math.min(1, s / n);
21
+ u(e + i * (1 - (1 - c) ** 3)), c < 1 ? f.current = requestAnimationFrame(a) : u(t);
22
+ };
23
+ return f.current = requestAnimationFrame(a), () => cancelAnimationFrame(f.current);
24
+ }, [o, n]), /* @__PURE__ */ b("span", {
25
+ className: e("tabular-nums select-none", t),
26
+ "data-component": "animated-counter",
27
+ ref: c,
28
+ ...s,
29
+ children: [
30
+ i !== void 0 && /* @__PURE__ */ y("span", { children: i }),
31
+ r(l),
32
+ a !== void 0 && /* @__PURE__ */ y("span", { children: a })
33
+ ]
34
+ });
35
+ });
36
+ //#endregion
37
+ //#region src/l3-atoms/animated-number.tsx
38
+ function ee(e) {
39
+ return e.toLocaleString();
40
+ }
41
+ function C(e) {
42
+ return 1 - (1 - e) ** 3;
43
+ }
44
+ var w = p(function({ value: t, duration: n = 500, format: r = ee, className: i }, a) {
45
+ let [o, s] = v(t), c = _(t);
46
+ return h(() => {
47
+ let e = c.current;
48
+ if (c.current = t, n <= 0) {
49
+ s(t);
50
+ return;
51
+ }
52
+ let r = performance.now(), i;
53
+ function a(o) {
54
+ let c = o - r, l = Math.min(c / n, 1);
55
+ s(e + (t - e) * C(l)), l < 1 && (i = requestAnimationFrame(a));
56
+ }
57
+ return i = requestAnimationFrame(a), () => cancelAnimationFrame(i);
58
+ }, [t, n]), /* @__PURE__ */ y("span", {
59
+ ref: a,
60
+ className: e("tabular-nums", i),
61
+ "data-component": "animated-number",
62
+ children: r(o)
63
+ });
64
+ }), T = p(function({ count: t, maxCount: n = 99, className: r, ...i }, o) {
65
+ let s = t !== void 0 && t > 0;
66
+ return /* @__PURE__ */ b("span", {
67
+ className: e("relative inline-flex", r),
68
+ "data-component": "avatar-badge",
69
+ ref: o,
70
+ children: [/* @__PURE__ */ y(l, { ...i }), s && /* @__PURE__ */ y(a, {
71
+ className: "absolute -top-1 -right-1 z-10",
72
+ count: t,
73
+ countMax: n
74
+ })]
75
+ });
76
+ });
77
+ //#endregion
78
+ //#region src/l3-atoms/barcode.tsx
79
+ function te(e) {
80
+ let t = [];
81
+ t.push(3, 1, 1, 1, 3, 1);
82
+ for (let n = 0; n < e.length; n++) {
83
+ let r = e.charCodeAt(n);
84
+ t.push(r & 1 ? 2 : 1, r & 2 ? 2 : 1, r & 4 ? 2 : 1, r & 8 ? 2 : 1, r & 16 ? 2 : 1, 1);
85
+ }
86
+ return t.push(3, 1, 1, 1, 3), t;
87
+ }
88
+ var ne = p(function({ value: t, width: n = 200, height: r = 60, showValue: i = !0, color: a = "currentColor", className: o }, s) {
89
+ let c = g(() => te(t), [t]), l = c.reduce((e, t) => e + t, 0), u = i ? r - 16 : r, d = n / l, f = 0, p = [];
90
+ for (let e = 0; e < c.length; e++) {
91
+ let t = c[e] * d;
92
+ e % 2 == 0 && p.push({
93
+ x: f,
94
+ w: t
95
+ }), f += t;
96
+ }
97
+ return /* @__PURE__ */ b("svg", {
98
+ ref: s,
99
+ width: n,
100
+ height: r,
101
+ viewBox: `0 0 ${n} ${r}`,
102
+ className: e("shrink-0", o),
103
+ "data-component": "barcode",
104
+ "data-testid": "barcode-svg",
105
+ role: "img",
106
+ "aria-label": `Barcode: ${t}`,
107
+ children: [p.map((e, t) => /* @__PURE__ */ y("rect", {
108
+ x: e.x,
109
+ y: 0,
110
+ width: e.w,
111
+ height: u,
112
+ fill: a
113
+ }, t)), i && /* @__PURE__ */ y("text", {
114
+ x: n / 2,
115
+ y: r - 2,
116
+ textAnchor: "middle",
117
+ fontSize: 11,
118
+ fill: a,
119
+ fontFamily: "monospace",
120
+ "data-testid": "barcode-text",
121
+ children: t
122
+ })]
123
+ });
124
+ }), re = {
125
+ default: "animate-pulse",
126
+ fast: "animate-pulse [animation-duration:0.5s]",
127
+ slow: "animate-pulse [animation-duration:3s]"
128
+ }, ie = p(function({ active: t = !0, children: n, className: r, speed: i = "default", ...a }, o) {
129
+ return /* @__PURE__ */ y("span", {
130
+ className: e(t && re[i], r),
131
+ "data-component": "blinking",
132
+ ref: o,
133
+ ...a,
134
+ children: n
135
+ });
136
+ }), ae = {
137
+ default: "h-2 w-2",
138
+ lg: "h-3 w-3",
139
+ sm: "h-1.5 w-1.5"
140
+ }, oe = p(function({ className: t, color: n, count: r = 3, size: i = "default", ...a }, o) {
141
+ let s = Array.from({ length: r }, (e, t) => t);
142
+ return /* @__PURE__ */ y("div", {
143
+ className: e("inline-flex items-center gap-1", t),
144
+ "data-component": "bounce-dot",
145
+ ref: o,
146
+ role: "status",
147
+ ...a,
148
+ children: s.map((t) => /* @__PURE__ */ y("span", {
149
+ className: e("animate-[bounce-dot_1.4s_ease-in-out_infinite] rounded-full bg-fg-muted", ae[i]),
150
+ style: {
151
+ animationDelay: `${t * 160}ms`,
152
+ ...n === void 0 ? {} : { backgroundColor: n }
153
+ }
154
+ }, t))
155
+ });
156
+ }), se = p(function({ className: t, disabled: n = !1, onChange: r, options: i, selectAll: a = !1, value: o, ...s }, c) {
157
+ let l = i.length > 0 && i.every((e) => o.includes(e.value)), d = (e, t) => {
158
+ r(t ? [...o, e] : o.filter((t) => t !== e));
159
+ }, f = (e) => {
160
+ r(e ? i.map((e) => e.value) : []);
161
+ };
162
+ return /* @__PURE__ */ b("div", {
163
+ ref: c,
164
+ className: e("flex flex-col gds-gap", t),
165
+ "data-component": "checkbox-group",
166
+ role: "group",
167
+ ...s,
168
+ children: [a && /* @__PURE__ */ y(u, {
169
+ checked: l,
170
+ disabled: n,
171
+ label: "Select all",
172
+ onChange: f
173
+ }), i.map((e) => /* @__PURE__ */ y(u, {
174
+ checked: o.includes(e.value),
175
+ disabled: n,
176
+ label: e.label,
177
+ onChange: (t) => d(e.value, t)
178
+ }, e.value))]
179
+ });
180
+ }), E = n("rounded-md", {
181
+ defaultVariants: { size: "default" },
182
+ variants: { size: {
183
+ default: "h-10 w-10",
184
+ lg: "h-14 w-14",
185
+ sm: "h-7 w-7"
186
+ } }
187
+ }), ce = p(function({ className: t, color: n, copyable: r = !1, label: a, size: o, ...s }, c) {
188
+ let [l, u] = v(!1), d = _(null), f = m(async () => {
189
+ r && (await navigator.clipboard.writeText(n), u(!0), d.current !== null && clearTimeout(d.current), d.current = setTimeout(() => {
190
+ u(!1), d.current = null;
191
+ }, 2e3));
192
+ }, [n, r]), p = /* @__PURE__ */ y("span", {
193
+ className: e(E({ size: o }), "block"),
194
+ style: { backgroundColor: n }
195
+ });
196
+ return /* @__PURE__ */ b("span", {
197
+ className: e("inline-flex flex-col items-center gap-1", t),
198
+ "data-component": "color-swatch",
199
+ ref: c,
200
+ ...s,
201
+ children: [
202
+ r ? /* @__PURE__ */ y("button", {
203
+ "aria-label": `Copy ${n}`,
204
+ className: e("rounded-md select-none", i),
205
+ onClick: f,
206
+ type: "button",
207
+ children: p
208
+ }) : p,
209
+ /* @__PURE__ */ y("span", {
210
+ className: "font-mono text-[10px] text-fg-muted",
211
+ children: l ? "Copied!" : n
212
+ }),
213
+ a !== void 0 && /* @__PURE__ */ y("span", {
214
+ className: "text-[10px] text-fg-muted/60",
215
+ children: a
216
+ })
217
+ ]
218
+ });
219
+ }), le = p(function({ text: t, label: n = "Copy", copiedLabel: i = "Copied!", variant: a = "default", size: o = "default", className: s }, c) {
220
+ let [l, u] = v(!1), d = _(null);
221
+ h(() => () => {
222
+ d.current !== null && clearTimeout(d.current);
223
+ }, []);
224
+ let f = m(() => {
225
+ navigator.clipboard.writeText(t).catch(() => {}), u(!0), d.current !== null && clearTimeout(d.current), d.current = setTimeout(() => u(!1), 1500);
226
+ }, [t]);
227
+ return /* @__PURE__ */ y(r, {
228
+ ref: c,
229
+ variant: a === "ghost" ? "ghost" : "secondary",
230
+ size: o,
231
+ className: e(s),
232
+ onClick: f,
233
+ "data-component": "copy-button",
234
+ icon: l ? /* @__PURE__ */ y("svg", {
235
+ width: "14",
236
+ height: "14",
237
+ viewBox: "0 0 14 14",
238
+ fill: "none",
239
+ stroke: "currentColor",
240
+ strokeWidth: "2",
241
+ children: /* @__PURE__ */ y("path", { d: "M2 7l3 3 7-7" })
242
+ }) : /* @__PURE__ */ b("svg", {
243
+ width: "14",
244
+ height: "14",
245
+ viewBox: "0 0 14 14",
246
+ fill: "none",
247
+ stroke: "currentColor",
248
+ strokeWidth: "1.5",
249
+ children: [/* @__PURE__ */ y("rect", {
250
+ x: "4",
251
+ y: "4",
252
+ width: "8",
253
+ height: "8",
254
+ rx: "1.5"
255
+ }), /* @__PURE__ */ y("path", { d: "M10 4V2.5A1.5 1.5 0 008.5 1h-6A1.5 1.5 0 001 2.5v6A1.5 1.5 0 002.5 10H4" })]
256
+ }),
257
+ children: l ? i : n
258
+ });
259
+ }), ue = {
260
+ accent: "bg-accent text-accent-fg",
261
+ danger: "bg-danger text-white",
262
+ success: "bg-success text-white"
263
+ }, de = p(function({ className: t, count: n, max: r = 99, variant: i = "danger", ...a }, o) {
264
+ let s = n > r ? `${r}+` : String(n);
265
+ return /* @__PURE__ */ y("span", {
266
+ className: e("inline-flex min-w-5 select-none items-center justify-center rounded-full px-1.5 py-0.5 text-[10px] font-bold leading-none", ue[i], t),
267
+ "data-component": "count-badge",
268
+ "data-variant": i,
269
+ ref: o,
270
+ ...a,
271
+ children: s
272
+ });
273
+ });
274
+ //#endregion
275
+ //#region src/l3-atoms/count-up.tsx
276
+ function fe(e, t, n) {
277
+ let r = e.toFixed(t);
278
+ if (n === "") return r;
279
+ let [i, a] = r.split("."), o = i.replace(/\B(?=(\d{3})+(?!\d))/g, n);
280
+ return a === void 0 ? o : `${o}.${a}`;
281
+ }
282
+ function pe(e) {
283
+ let t = e - 1;
284
+ return t * t * t + 1;
285
+ }
286
+ var D = p(function({ value: t, duration: n = 1500, decimals: r = 0, prefix: i, suffix: a, separator: o = ",", className: s }, c) {
287
+ let [l, u] = v(0);
288
+ return h(() => {
289
+ if (n <= 0) {
290
+ u(t);
291
+ return;
292
+ }
293
+ let e = performance.now(), r;
294
+ function i(a) {
295
+ let o = a - e, s = Math.min(o / n, 1);
296
+ u(pe(s) * t), s < 1 && (r = requestAnimationFrame(i));
297
+ }
298
+ return r = requestAnimationFrame(i), () => cancelAnimationFrame(r);
299
+ }, [t, n]), /* @__PURE__ */ b("span", {
300
+ ref: c,
301
+ className: e("tabular-nums", s),
302
+ "data-component": "count-up",
303
+ children: [
304
+ i ?? "",
305
+ fe(l, r, o),
306
+ a ?? ""
307
+ ]
308
+ });
309
+ });
310
+ //#endregion
311
+ //#region src/l3-atoms/countdown.tsx
312
+ function O(e) {
313
+ let t = Math.max(0, e - Date.now()), n = Math.floor(t / 1e3 % 60), r = Math.floor(t / 1e3 / 60 % 60), i = Math.floor(t / 1e3 / 60 / 60 % 24);
314
+ return {
315
+ days: Math.floor(t / 1e3 / 60 / 60 / 24),
316
+ hours: i,
317
+ minutes: r,
318
+ seconds: n,
319
+ total: t
320
+ };
321
+ }
322
+ function k(e) {
323
+ return e.toString().padStart(2, "0");
324
+ }
325
+ var A = p(function({ targetDate: t, onComplete: n, showDays: r = !0, showSeconds: i = !0, className: a }, o) {
326
+ let s = new Date(t).getTime(), [c, l] = v(() => O(s));
327
+ h(() => {
328
+ if (c.total <= 0) return;
329
+ let e = setInterval(() => {
330
+ let t = O(s);
331
+ l(t), t.total <= 0 && (clearInterval(e), n !== void 0 && n());
332
+ }, 1e3);
333
+ return () => clearInterval(e);
334
+ }, [
335
+ s,
336
+ n,
337
+ c.total
338
+ ]);
339
+ let u = [];
340
+ return r && u.push({
341
+ label: "D",
342
+ value: k(c.days)
343
+ }), u.push({
344
+ label: "H",
345
+ value: k(c.hours)
346
+ }), u.push({
347
+ label: "M",
348
+ value: k(c.minutes)
349
+ }), i && u.push({
350
+ label: "S",
351
+ value: k(c.seconds)
352
+ }), /* @__PURE__ */ y("div", {
353
+ ref: o,
354
+ className: e("inline-flex items-center gap-1", a),
355
+ "data-component": "countdown",
356
+ children: u.map((e, t) => /* @__PURE__ */ b("div", {
357
+ className: "flex items-center gap-1",
358
+ children: [t > 0 && /* @__PURE__ */ y("span", {
359
+ className: "text-fg-muted gds-text-body",
360
+ "data-testid": "separator",
361
+ children: ":"
362
+ }), /* @__PURE__ */ y("span", {
363
+ className: "inline-flex items-center justify-center rounded bg-bg-tertiary px-1.5 py-0.5 tabular-nums gds-radius-button gds-text-body text-fg",
364
+ "data-testid": `segment-${e.label}`,
365
+ children: e.value
366
+ })]
367
+ }, e.label))
368
+ });
369
+ }), j = n("inline-flex select-none items-center justify-center rounded-full text-[10px] font-bold text-accent-fg min-w-[18px] h-[18px] px-1", {
370
+ defaultVariants: { variant: "default" },
371
+ variants: { variant: {
372
+ danger: "bg-danger animate-pulse",
373
+ default: "bg-accent"
374
+ } }
375
+ }), M = p(function({ className: t, count: n, max: r = 99, variant: i, ...a }, o) {
376
+ if (n <= 0) return null;
377
+ let s = n > r ? `${r}+` : String(n);
378
+ return /* @__PURE__ */ y("span", {
379
+ className: e(j({ variant: i }), t),
380
+ "data-component": "countdown-badge",
381
+ ref: o,
382
+ ...a,
383
+ children: s
384
+ });
385
+ }), N = p(function({ children: t, className: n, offset: r, smooth: i = !0, ...a }, o) {
386
+ let s = _(null), [c, l] = v({
387
+ x: 0,
388
+ y: 0
389
+ }), u = r?.x ?? 0, d = r?.y ?? 0, p = m((e) => {
390
+ let t = s.current?.getBoundingClientRect();
391
+ t !== void 0 && l({
392
+ x: e.clientX - t.left + u,
393
+ y: e.clientY - t.top + d
394
+ });
395
+ }, [u, d]);
396
+ return /* @__PURE__ */ y("div", {
397
+ className: e("relative", n),
398
+ "data-component": "cursor-follow",
399
+ onMouseMove: p,
400
+ ref: f(s, o),
401
+ ...a,
402
+ children: /* @__PURE__ */ y("div", {
403
+ className: "pointer-events-none absolute",
404
+ style: {
405
+ transform: `translate(${c.x}px, ${c.y}px)`,
406
+ transition: i ? "transform 80ms ease-out" : void 0
407
+ },
408
+ children: t
409
+ })
410
+ });
411
+ }), P = p(function({ className: t, inverted: n = !1, unit: r, value: i, ...a }, o) {
412
+ let s = i > 0, c = i < 0, l = (n ? c : s) ? "text-success" : (n ? s : c) ? "text-danger" : "text-fg-muted", u = `${s ? "↑" : c ? "↓" : ""}${s ? "+" : ""}${i}${r === void 0 ? "" : r}`;
413
+ return /* @__PURE__ */ y("span", {
414
+ className: e("inline-flex items-center gap-0.5 text-sm font-medium tabular-nums", l, t),
415
+ "data-component": "diff-indicator",
416
+ "data-direction": s ? "up" : c ? "down" : "neutral",
417
+ ref: o,
418
+ ...a,
419
+ children: u
420
+ });
421
+ }), F = {
422
+ accent: "bg-accent shadow-[0_0_6px_var(--color-accent)]",
423
+ success: "bg-success shadow-[0_0_6px_var(--color-success)]",
424
+ warning: "bg-warning shadow-[0_0_6px_var(--color-warning)]",
425
+ danger: "bg-danger shadow-[0_0_6px_var(--color-danger)]"
426
+ }, I = {
427
+ sm: "h-1.5 w-1.5",
428
+ default: "h-2.5 w-2.5",
429
+ lg: "h-3.5 w-3.5"
430
+ }, L = p(function({ color: t = "accent", size: n = "default", className: r, ...i }, a) {
431
+ return /* @__PURE__ */ y("span", {
432
+ ref: a,
433
+ className: e("inline-block rounded-full", F[t], I[n], r),
434
+ "data-component": "glow-dot",
435
+ "data-variant": t,
436
+ ...i
437
+ });
438
+ }), R = p(function({ children: t, className: n, from: r = "#6366f1", to: i = "#ec4899", ...a }, o) {
439
+ return /* @__PURE__ */ y("span", {
440
+ className: e("inline-block bg-clip-text text-transparent", n),
441
+ "data-component": "gradient-text",
442
+ ref: o,
443
+ style: { backgroundImage: `linear-gradient(to right, ${r}, ${i})` },
444
+ ...a,
445
+ children: t
446
+ });
447
+ }), z = p(function({ className: t, color: n = "var(--color-accent)", max: r = 100, showValue: i = !1, size: a = 32, value: o, ...s }, c) {
448
+ let l = r > 0 ? Math.min(Math.max(o / r, 0), 1) : 0;
449
+ return /* @__PURE__ */ y("div", {
450
+ className: e("inline-flex items-center justify-center rounded text-[10px] font-medium", t),
451
+ "data-component": "heat-cell",
452
+ ref: c,
453
+ style: {
454
+ backgroundColor: n,
455
+ height: a,
456
+ opacity: .1 + l * .9,
457
+ width: a
458
+ },
459
+ ...s,
460
+ children: i && /* @__PURE__ */ y("span", {
461
+ className: "text-white mix-blend-difference",
462
+ children: o
463
+ })
464
+ });
465
+ }), B = p(function({ className: t, keys: n, ...r }, i) {
466
+ return /* @__PURE__ */ y("span", {
467
+ className: e("inline-flex items-center gap-1", t),
468
+ "data-component": "hotkey",
469
+ ref: i,
470
+ ...r,
471
+ children: n.map((e, t) => /* @__PURE__ */ b("span", {
472
+ className: "contents",
473
+ children: [t > 0 && /* @__PURE__ */ y("span", {
474
+ className: "text-[10px] text-fg-muted",
475
+ children: "+"
476
+ }), /* @__PURE__ */ y(o, { children: e })]
477
+ }, t))
478
+ });
479
+ }), me = {
480
+ bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
481
+ left: "right-full top-1/2 -translate-y-1/2 mr-2",
482
+ right: "left-full top-1/2 -translate-y-1/2 ml-2",
483
+ top: "bottom-full left-1/2 -translate-x-1/2 mb-2"
484
+ }, he = {
485
+ bottom: "bottom-full left-1/2 -translate-x-1/2 border-b-bg-tertiary border-x-transparent border-t-transparent border-4",
486
+ left: "left-full top-1/2 -translate-y-1/2 border-l-bg-tertiary border-y-transparent border-r-transparent border-4",
487
+ right: "right-full top-1/2 -translate-y-1/2 border-r-bg-tertiary border-y-transparent border-l-transparent border-4",
488
+ top: "top-full left-1/2 -translate-x-1/2 border-t-bg-tertiary border-x-transparent border-b-transparent border-4"
489
+ }, V = p(function({ children: n, className: r, content: i, delay: a = 300, glass: o, interactive: s = !1, maxWidth: c, placement: l = "top", ...u }, d) {
490
+ let [f, p] = v(!1), h = _(void 0), g = _(void 0), x = m(() => {
491
+ clearTimeout(g.current), h.current = setTimeout(() => p(!0), a);
492
+ }, [a]), S = m(() => {
493
+ clearTimeout(h.current), s ? g.current = setTimeout(() => p(!1), 150) : p(!1);
494
+ }, [s]);
495
+ return /* @__PURE__ */ b("div", {
496
+ className: e("relative inline-flex", r),
497
+ "data-component": "tooltip",
498
+ "data-state": f ? "open" : "closed",
499
+ onMouseEnter: x,
500
+ onMouseLeave: S,
501
+ ref: d,
502
+ ...u,
503
+ children: [n, f && /* @__PURE__ */ b("div", {
504
+ className: e("pointer-events-none absolute z-50 animate-popup whitespace-nowrap gds-radius-tooltip gds-pad-x-sm gds-pad-y-sm gds-text-label text-fg", s && "pointer-events-auto", o === !0 ? t(o) : "bg-bg-tertiary", o === !0 && "border border-white/10"),
505
+ onMouseEnter: s ? x : void 0,
506
+ onMouseLeave: s ? S : void 0,
507
+ style: c === void 0 ? void 0 : {
508
+ maxWidth: c,
509
+ whiteSpace: "normal"
510
+ },
511
+ children: [/* @__PURE__ */ y("span", { className: e("absolute", he[l]) }), /* @__PURE__ */ y("span", {
512
+ className: (me[l], ""),
513
+ children: i
514
+ })]
515
+ })]
516
+ });
517
+ }), ge = {
518
+ default: "h-4 w-4",
519
+ sm: "h-3.5 w-3.5"
520
+ }, _e = p(function({ className: t, content: n, size: r = "default", ...i }, a) {
521
+ return /* @__PURE__ */ y(V, {
522
+ content: n,
523
+ ref: a,
524
+ ...i,
525
+ children: /* @__PURE__ */ y("span", {
526
+ className: e("inline-flex cursor-help items-center text-fg-muted/60 hover:text-fg-muted", t),
527
+ "data-component": "info-tip",
528
+ children: /* @__PURE__ */ b("svg", {
529
+ className: ge[r],
530
+ fill: "none",
531
+ stroke: "currentColor",
532
+ strokeWidth: "2",
533
+ viewBox: "0 0 24 24",
534
+ children: [/* @__PURE__ */ y("circle", {
535
+ cx: "12",
536
+ cy: "12",
537
+ r: "10"
538
+ }), /* @__PURE__ */ y("path", { d: "M12 16v-4M12 8h.01" })]
539
+ })
540
+ })
541
+ });
542
+ }), ve = p(function({ label: t, value: n, mono: r = !1, className: i, ...a }, o) {
543
+ return /* @__PURE__ */ b("div", {
544
+ ref: o,
545
+ className: e("inline-flex items-baseline gap-1.5 gds-text-body", i),
546
+ "data-component": "key-value",
547
+ ...a,
548
+ children: [/* @__PURE__ */ y("span", {
549
+ className: "shrink-0 text-fg-muted gds-text-caption",
550
+ children: t
551
+ }), /* @__PURE__ */ y("span", {
552
+ className: e("text-fg", r && "font-mono"),
553
+ children: n
554
+ })]
555
+ });
556
+ });
557
+ //#endregion
558
+ //#region src/l3-atoms/keyboard-shortcut.tsx
559
+ function ye(e) {
560
+ let t = e.toLowerCase().split("+"), n = {
561
+ ctrl: !1,
562
+ meta: !1,
563
+ shift: !1,
564
+ alt: !1
565
+ }, r = "";
566
+ for (let e of t) e === "ctrl" ? n.ctrl = !0 : e === "meta" || e === "cmd" ? n.meta = !0 : e === "shift" ? n.shift = !0 : e === "alt" ? n.alt = !0 : r = e;
567
+ return {
568
+ modifiers: n,
569
+ mainKey: r
570
+ };
571
+ }
572
+ function be(e) {
573
+ return {
574
+ ctrl: "Ctrl",
575
+ meta: "⌘",
576
+ cmd: "⌘",
577
+ shift: "⇧",
578
+ alt: "Alt"
579
+ }[e.toLowerCase()] ?? e.toUpperCase();
580
+ }
581
+ var xe = p(function({ keys: t, onTrigger: n, showBadge: r = !1, disabled: i = !1, className: a }, s) {
582
+ let { modifiers: c, mainKey: l } = ye(t), u = m((e) => {
583
+ i || e.ctrlKey === c.ctrl && e.metaKey === c.meta && e.shiftKey === c.shift && e.altKey === c.alt && e.key.toLowerCase() === l && (e.preventDefault(), n());
584
+ }, [
585
+ i,
586
+ c.ctrl,
587
+ c.meta,
588
+ c.shift,
589
+ c.alt,
590
+ l,
591
+ n
592
+ ]);
593
+ if (h(() => (window.addEventListener("keydown", u), () => window.removeEventListener("keydown", u)), [u]), !r) return null;
594
+ let d = t.split("+").map((e, t) => /* @__PURE__ */ y(o, { children: be(e) }, t));
595
+ return /* @__PURE__ */ y("span", {
596
+ ref: s,
597
+ className: e("inline-flex items-center gap-1", a),
598
+ "data-component": "keyboard-shortcut",
599
+ children: d
600
+ });
601
+ }), Se = p(function({ className: t, label: n = "LIVE", ...r }, i) {
602
+ return /* @__PURE__ */ b("span", {
603
+ className: e("inline-flex items-center gap-1.5", t),
604
+ "data-component": "live-dot",
605
+ ref: i,
606
+ ...r,
607
+ children: [/* @__PURE__ */ b("span", {
608
+ className: "relative flex h-2 w-2",
609
+ children: [/* @__PURE__ */ y("span", { className: "absolute inline-flex h-full w-full animate-ping rounded-full bg-danger opacity-75" }), /* @__PURE__ */ y("span", { className: "relative inline-flex h-2 w-2 rounded-full bg-danger" })]
610
+ }), /* @__PURE__ */ y("span", {
611
+ className: "text-xs font-bold uppercase tracking-wide text-danger",
612
+ children: n
613
+ })]
614
+ });
615
+ }), Ce = p(function({ children: t, strength: n = .3, radius: r = 100, className: i }, a) {
616
+ let o = _(null), [s, c] = v({
617
+ x: 0,
618
+ y: 0
619
+ }), l = m((e) => {
620
+ let t = o.current;
621
+ if (t === null) return;
622
+ let i = t.getBoundingClientRect(), a = i.left + i.width / 2, s = i.top + i.height / 2, l = e.clientX - a, u = e.clientY - s;
623
+ if (Math.sqrt(l * l + u * u) > r) {
624
+ c({
625
+ x: 0,
626
+ y: 0
627
+ });
628
+ return;
629
+ }
630
+ c({
631
+ x: l * n,
632
+ y: u * n
633
+ });
634
+ }, [n, r]), u = m(() => {
635
+ c({
636
+ x: 0,
637
+ y: 0
638
+ });
639
+ }, []);
640
+ return /* @__PURE__ */ y("div", {
641
+ ref: f(o, a),
642
+ "data-component": "magnetic-button",
643
+ className: e("inline-block", i),
644
+ style: {
645
+ transform: `translate(${s.x}px, ${s.y}px)`,
646
+ transition: "transform 200ms ease-out"
647
+ },
648
+ onMouseMove: l,
649
+ onMouseLeave: u,
650
+ children: t
651
+ });
652
+ }), we = p(function({ children: t, speed: n = 30, direction: r = "left", pauseOnHover: i = !0, className: a }, o) {
653
+ let s = _(null), [c, l] = v(10);
654
+ h(() => {
655
+ if (s.current === null) return;
656
+ let e = s.current.scrollWidth / 2;
657
+ e > 0 && l(e / n);
658
+ }, [n, t]);
659
+ let u = r === "left" ? "0%" : "-50%", d = r === "left" ? "-50%" : "0%";
660
+ return /* @__PURE__ */ y("div", {
661
+ ref: o,
662
+ className: e("overflow-hidden", a),
663
+ "data-component": "marquee",
664
+ children: /* @__PURE__ */ b("div", {
665
+ ref: s,
666
+ className: e("inline-flex will-change-transform", i && "hover:[animation-play-state:paused]"),
667
+ style: {
668
+ animation: `marquee-scroll ${c}s linear infinite`,
669
+ "--marquee-from": u,
670
+ "--marquee-to": d
671
+ },
672
+ children: [/* @__PURE__ */ y("div", {
673
+ className: "flex shrink-0",
674
+ children: t
675
+ }), /* @__PURE__ */ y("div", {
676
+ className: "flex shrink-0",
677
+ "aria-hidden": !0,
678
+ children: t
679
+ })]
680
+ })
681
+ });
682
+ }), H = n("overflow-hidden gds-radius-badge bg-bg-tertiary", {
683
+ defaultVariants: { size: "default" },
684
+ variants: { size: {
685
+ default: "h-2.5",
686
+ lg: "h-4",
687
+ sm: "h-1.5"
688
+ } }
689
+ }), Te = {
690
+ danger: "bg-danger",
691
+ default: "bg-accent",
692
+ success: "bg-success",
693
+ warning: "bg-warning"
694
+ };
695
+ function Ee(e) {
696
+ return e >= .8 ? "bg-danger" : e >= .6 ? "bg-warning" : e >= .4 ? "bg-accent" : "bg-success";
697
+ }
698
+ var De = p(function({ className: t, label: n, max: r = 100, min: i = 0, showValue: a = !0, size: o, value: s, variant: c = "auto", ...l }, u) {
699
+ let d = r - i, f = d > 0 ? Math.max(0, Math.min(1, (s - i) / d)) : 0, p = c === "auto" ? Ee(f) : Te[c] ?? "bg-accent";
700
+ return /* @__PURE__ */ b("div", {
701
+ className: e("w-full", t),
702
+ "data-component": "meter",
703
+ ref: u,
704
+ ...l,
705
+ children: [(n !== void 0 || a) && /* @__PURE__ */ b("div", {
706
+ className: "mb-1 flex items-center justify-between",
707
+ children: [n !== void 0 && /* @__PURE__ */ y("span", {
708
+ className: "gds-text-body font-medium text-fg",
709
+ children: n
710
+ }), a && /* @__PURE__ */ b("span", {
711
+ className: "font-mono gds-text-label text-fg-muted tabular-nums",
712
+ children: [Math.round(f * 100), "%"]
713
+ })]
714
+ }), /* @__PURE__ */ y("div", {
715
+ "aria-label": n,
716
+ "aria-valuemax": r,
717
+ "aria-valuemin": i,
718
+ "aria-valuenow": s,
719
+ className: H({ size: o }),
720
+ role: "meter",
721
+ children: /* @__PURE__ */ y("div", {
722
+ className: e("h-full gds-radius-badge transition-all duration-500", p),
723
+ style: { width: `${f * 100}%` }
724
+ })
725
+ })]
726
+ });
727
+ }), Oe = p(function({ className: t, label: n, online: r, ...i }, a) {
728
+ let o = r ? "bg-success" : "bg-fg-muted/40", s = n ?? (r ? "Online" : "Offline");
729
+ return /* @__PURE__ */ b("span", {
730
+ className: e("inline-flex items-center gds-gap-sm", t),
731
+ "data-component": "online-indicator",
732
+ ref: a,
733
+ ...i,
734
+ children: [/* @__PURE__ */ y("span", { className: e("h-2 w-2 shrink-0 rounded-full", o) }), /* @__PURE__ */ y("span", {
735
+ className: "gds-text-label text-fg-muted",
736
+ children: s
737
+ })]
738
+ });
739
+ }), ke = p(function({ className: t, precision: n = 1, showSign: r = !1, value: i, ...a }, o) {
740
+ let s = i > 0, c = s ? "text-success" : i < 0 ? "text-danger" : "text-fg-muted", l = `${r && s ? "+" : ""}${i.toFixed(n)}%`;
741
+ return /* @__PURE__ */ y("span", {
742
+ className: e("inline-flex tabular-nums text-sm font-medium", c, t),
743
+ "data-component": "percentage",
744
+ ref: o,
745
+ ...a,
746
+ children: l
747
+ });
748
+ }), Ae = {
749
+ default: "h-16 w-16 text-lg",
750
+ lg: "h-20 w-20 text-xl",
751
+ sm: "h-12 w-12 text-sm"
752
+ }, U = {
753
+ default: 3,
754
+ lg: 3.5,
755
+ sm: 2.5
756
+ }, je = p(function({ className: t, size: n = "default", value: r, ...i }, a) {
757
+ let o = Math.max(0, Math.min(100, r)), s = g(() => o >= 80 ? "text-success" : o >= 50 ? "text-warning" : "text-danger", [o]), c = 2 * Math.PI * 18, l = c - o / 100 * c;
758
+ return /* @__PURE__ */ b("div", {
759
+ className: e("relative inline-flex items-center justify-center select-none", Ae[n], t),
760
+ "data-component": "percentage-circle",
761
+ ref: a,
762
+ ...i,
763
+ children: [/* @__PURE__ */ b("svg", {
764
+ className: "absolute inset-0 h-full w-full -rotate-90",
765
+ viewBox: "0 0 40 40",
766
+ children: [/* @__PURE__ */ y("circle", {
767
+ className: "text-fg-muted/10",
768
+ cx: "20",
769
+ cy: "20",
770
+ fill: "none",
771
+ r: 18,
772
+ stroke: "currentColor",
773
+ strokeWidth: U[n]
774
+ }), /* @__PURE__ */ y("circle", {
775
+ className: e("transition-all duration-500", s),
776
+ cx: "20",
777
+ cy: "20",
778
+ fill: "none",
779
+ r: 18,
780
+ stroke: "currentColor",
781
+ strokeDasharray: c,
782
+ strokeDashoffset: l,
783
+ strokeLinecap: "round",
784
+ strokeWidth: U[n]
785
+ })]
786
+ }), /* @__PURE__ */ b("span", {
787
+ className: e("font-mono font-bold", s),
788
+ children: [o, "%"]
789
+ })]
790
+ });
791
+ }), Me = p(function({ className: t, currency: n = "¥", showSign: r = !1, value: i, ...a }, o) {
792
+ let s = i < 0, c = i > 0, l = s ? "text-danger" : c ? "text-success" : "text-fg", u = r && c ? "+" : "", d = Math.abs(i).toLocaleString();
793
+ return /* @__PURE__ */ b("span", {
794
+ className: e("tabular-nums", l, t),
795
+ "data-component": "price",
796
+ ref: o,
797
+ ...a,
798
+ children: [
799
+ s ? "-" : u,
800
+ n,
801
+ d
802
+ ]
803
+ });
804
+ }), Ne = {
805
+ accent: "stroke-accent",
806
+ danger: "stroke-danger",
807
+ success: "stroke-success",
808
+ warning: "stroke-warning"
809
+ }, Pe = p(function({ value: t, size: n = 64, strokeWidth: r = 4, showValue: i = !0, variant: a = "accent", className: o }, s) {
810
+ let c = (n - r) / 2, l = 2 * Math.PI * c, u = Math.max(0, Math.min(100, t)), d = l * (1 - u / 100), f = n / 2, p = Ne[a] ?? "stroke-accent";
811
+ return /* @__PURE__ */ b("svg", {
812
+ ref: s,
813
+ className: e("shrink-0", o),
814
+ "data-component": "progress-circle",
815
+ height: n,
816
+ viewBox: `0 0 ${n} ${n}`,
817
+ width: n,
818
+ children: [
819
+ /* @__PURE__ */ y("circle", {
820
+ className: "stroke-border/30",
821
+ cx: f,
822
+ cy: f,
823
+ fill: "none",
824
+ r: c,
825
+ strokeWidth: r
826
+ }),
827
+ /* @__PURE__ */ y("circle", {
828
+ className: e("transition-all duration-500", p),
829
+ cx: f,
830
+ cy: f,
831
+ fill: "none",
832
+ r: c,
833
+ strokeDasharray: l,
834
+ strokeDashoffset: d,
835
+ strokeLinecap: "round",
836
+ strokeWidth: r,
837
+ style: {
838
+ transform: "rotate(-90deg)",
839
+ transformOrigin: "center"
840
+ }
841
+ }),
842
+ i && /* @__PURE__ */ b("text", {
843
+ className: "fill-fg font-medium",
844
+ dominantBaseline: "central",
845
+ fontSize: n * .22,
846
+ textAnchor: "middle",
847
+ x: f,
848
+ y: f,
849
+ children: [Math.round(u), "%"]
850
+ })
851
+ ]
852
+ });
853
+ }), Fe = p(function({ className: t, size: n = 48, strokeWidth: r = 4, value: i, ...a }, o) {
854
+ let s = Math.max(0, Math.min(100, i)), c = (n - r) / 2, l = 2 * Math.PI * c, u = l * (1 - s / 100), d = n / 2;
855
+ return /* @__PURE__ */ b("div", {
856
+ "aria-valuemax": 100,
857
+ "aria-valuemin": 0,
858
+ "aria-valuenow": s,
859
+ className: e("inline-flex items-center justify-center select-none", t),
860
+ "data-component": "progress-ring",
861
+ ref: o,
862
+ role: "progressbar",
863
+ ...a,
864
+ children: [/* @__PURE__ */ b("svg", {
865
+ className: "rotate-[-90deg]",
866
+ height: n,
867
+ viewBox: `0 0 ${n} ${n}`,
868
+ width: n,
869
+ children: [/* @__PURE__ */ y("circle", {
870
+ className: "stroke-bg-tertiary",
871
+ cx: d,
872
+ cy: d,
873
+ fill: "none",
874
+ r: c,
875
+ strokeWidth: r
876
+ }), /* @__PURE__ */ y("circle", {
877
+ className: "stroke-accent transition-all duration-500",
878
+ cx: d,
879
+ cy: d,
880
+ fill: "none",
881
+ r: c,
882
+ strokeDasharray: l,
883
+ strokeDashoffset: u,
884
+ strokeLinecap: "round",
885
+ strokeWidth: r
886
+ })]
887
+ }), /* @__PURE__ */ b("span", {
888
+ className: "absolute font-mono text-xs font-bold text-fg",
889
+ style: { fontSize: n * .22 },
890
+ children: [s, "%"]
891
+ })]
892
+ });
893
+ }), W = {
894
+ accent: "bg-accent",
895
+ danger: "bg-danger",
896
+ success: "bg-success",
897
+ warning: "bg-warning"
898
+ }, Ie = {
899
+ default: "h-2.5 w-2.5",
900
+ lg: "h-3.5 w-3.5",
901
+ sm: "h-2 w-2"
902
+ }, Le = p(function({ className: t, color: n = "success", label: r, size: i = "default", ...a }, o) {
903
+ return /* @__PURE__ */ b("span", {
904
+ className: e("inline-flex items-center", r !== void 0 && "gds-gap-sm", t),
905
+ "data-component": "pulse-indicator",
906
+ ref: o,
907
+ ...a,
908
+ children: [/* @__PURE__ */ b("span", {
909
+ className: "relative inline-flex",
910
+ children: [/* @__PURE__ */ y("span", { className: e("rounded-full", W[n], Ie[i]) }), /* @__PURE__ */ y("span", { className: e("absolute inset-0 animate-ping rounded-full opacity-50", W[n]) })]
911
+ }), r !== void 0 && /* @__PURE__ */ y("span", {
912
+ className: "gds-text-label text-fg-muted",
913
+ children: r
914
+ })]
915
+ });
916
+ }), Re = p(function({ active: t = !0, className: n, color: r, count: i = 3, size: a = 80, ...o }, s) {
917
+ if (!t) return /* @__PURE__ */ y("div", {
918
+ className: e("relative inline-flex", n),
919
+ "data-component": "pulse-ring",
920
+ ref: s,
921
+ ...o
922
+ });
923
+ let c = Array.from({ length: i }, (e, t) => t);
924
+ return /* @__PURE__ */ b("div", {
925
+ className: e("relative inline-flex items-center justify-center", n),
926
+ "data-component": "pulse-ring",
927
+ ref: s,
928
+ style: {
929
+ height: a,
930
+ width: a
931
+ },
932
+ ...o,
933
+ children: [c.map((e) => /* @__PURE__ */ y("span", {
934
+ className: "absolute inset-0 rounded-full border-2 opacity-0",
935
+ style: {
936
+ animation: `gds-pulse-ring ${1.5 + i * .2}s ease-out ${1.5 / i * e}s infinite`,
937
+ borderColor: r ?? "var(--color-accent)"
938
+ }
939
+ }, e)), /* @__PURE__ */ y("style", { children: "\n @keyframes gds-pulse-ring {\n 0% { transform: scale(0.3); opacity: 0.8; }\n 100% { transform: scale(1); opacity: 0; }\n }\n " })]
940
+ });
941
+ });
942
+ //#endregion
943
+ //#region src/l3-atoms/qr-code.tsx
944
+ function ze(e) {
945
+ let t = 5381;
946
+ for (let n = 0; n < e.length; n++) t = (t << 5) + t + e.charCodeAt(n) | 0;
947
+ return Math.abs(t);
948
+ }
949
+ function Be(e) {
950
+ let t = e;
951
+ return () => (t = t * 1103515245 + 12345 & 2147483647, t / 2147483647);
952
+ }
953
+ var G = 21, K = 1;
954
+ function q(e, t) {
955
+ let n = [];
956
+ for (let r = 0; r < 7; r++) for (let i = 0; i < 7; i++) (r === 0 || r === 6 || i === 0 || i === 6 || r >= 2 && r <= 4 && i >= 2 && i <= 4) && n.push({
957
+ x: e + i,
958
+ y: t + r
959
+ });
960
+ return n;
961
+ }
962
+ var Ve = p(function({ value: t, size: n = 128, color: r = "currentColor", bgColor: i = "transparent", className: a }, o) {
963
+ let s = g(() => {
964
+ let e = [];
965
+ e.push(...q(0, 0)), e.push(...q(G - 7, 0)), e.push(...q(0, G - 7));
966
+ let n = Be(ze(t));
967
+ for (let t = 0; t < G; t++) for (let r = 0; r < G; r++) t < 8 && r < 8 || t < 8 && r >= G - 8 || t >= G - 8 && r < 8 || n() > .55 && e.push({
968
+ x: r,
969
+ y: t
970
+ });
971
+ return e;
972
+ }, [t]);
973
+ return /* @__PURE__ */ b("svg", {
974
+ ref: o,
975
+ width: n,
976
+ height: n,
977
+ viewBox: `0 0 ${G} ${G}`,
978
+ className: e("shrink-0", a),
979
+ "data-component": "qr-code",
980
+ "data-testid": "qr-code-svg",
981
+ role: "img",
982
+ "aria-label": `QR code for: ${t}`,
983
+ children: [/* @__PURE__ */ y("rect", {
984
+ width: G,
985
+ height: G,
986
+ fill: i
987
+ }), s.map((e, t) => /* @__PURE__ */ y("rect", {
988
+ x: e.x,
989
+ y: e.y,
990
+ width: K,
991
+ height: K,
992
+ fill: r
993
+ }, t))]
994
+ });
995
+ }), J = n("inline-flex shrink-0 select-none items-center justify-center rounded-full transition-transform active:scale-95 hover:scale-105", {
996
+ defaultVariants: {
997
+ size: "default",
998
+ variant: "primary"
999
+ },
1000
+ variants: {
1001
+ variant: {
1002
+ primary: "bg-accent text-accent-fg gds-shadow-lg",
1003
+ secondary: "border border-border bg-surface text-fg gds-shadow-md"
1004
+ },
1005
+ size: {
1006
+ default: "h-11 w-11",
1007
+ lg: "h-14 w-14",
1008
+ sm: "h-9 w-9"
1009
+ }
1010
+ }
1011
+ }), He = p(function({ className: t, disabled: n, icon: r, label: a, onClick: o, size: s, variant: c, ...l }, u) {
1012
+ return /* @__PURE__ */ b("div", {
1013
+ className: "inline-flex flex-col items-center gap-1",
1014
+ children: [/* @__PURE__ */ y("button", {
1015
+ className: e(J({
1016
+ size: s,
1017
+ variant: c
1018
+ }), i, n === !0 && "pointer-events-none opacity-40", t),
1019
+ "data-component": "quick-action",
1020
+ "data-variant": c ?? "primary",
1021
+ disabled: n,
1022
+ onClick: o,
1023
+ ref: u,
1024
+ type: "button",
1025
+ ...l,
1026
+ children: /* @__PURE__ */ y("span", {
1027
+ className: "gds-icon-child",
1028
+ children: r
1029
+ })
1030
+ }), a !== void 0 && /* @__PURE__ */ y("span", {
1031
+ className: "select-none text-[10px] text-fg-muted",
1032
+ children: a
1033
+ })]
1034
+ });
1035
+ }), Ue = p(function({ className: t, direction: n = "vertical", disabled: r = !1, onChange: a, options: o, value: s, ...c }, l) {
1036
+ return /* @__PURE__ */ y("div", {
1037
+ className: e("flex gds-gap", n === "vertical" ? "flex-col" : "flex-row flex-wrap", t),
1038
+ "data-component": "radio-group",
1039
+ ref: l,
1040
+ role: "radiogroup",
1041
+ ...c,
1042
+ children: o.map((t) => {
1043
+ let n = t.value === s, o = r || t.disabled === !0;
1044
+ return /* @__PURE__ */ b("button", {
1045
+ "aria-checked": n,
1046
+ className: e("inline-flex select-none items-center gds-gap-sm gds-text-body", i, o && "cursor-not-allowed opacity-50"),
1047
+ disabled: o,
1048
+ onClick: () => a?.(t.value),
1049
+ role: "radio",
1050
+ type: "button",
1051
+ children: [/* @__PURE__ */ y("span", {
1052
+ className: e("inline-flex gds-icon shrink-0 items-center justify-center gds-radius-badge border transition-colors", n ? "border-accent" : "border-border hover:border-accent/50"),
1053
+ children: n && /* @__PURE__ */ y("span", { className: "h-2 w-2 gds-radius-badge bg-accent" })
1054
+ }), /* @__PURE__ */ y("span", {
1055
+ className: "text-fg",
1056
+ children: t.label
1057
+ })]
1058
+ }, t.value);
1059
+ })
1060
+ });
1061
+ }), Y = {
1062
+ default: "gds-sq-xs",
1063
+ lg: "gds-sq-sm",
1064
+ sm: "gds-icon"
1065
+ };
1066
+ function X({ filled: t }) {
1067
+ return /* @__PURE__ */ y("svg", {
1068
+ className: e(Y.default, t ? "fill-warning text-warning" : "text-fg-muted/20"),
1069
+ fill: t ? "currentColor" : "none",
1070
+ stroke: "currentColor",
1071
+ strokeWidth: 1.5,
1072
+ viewBox: "0 0 24 24",
1073
+ children: /* @__PURE__ */ y("path", {
1074
+ d: "M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z",
1075
+ strokeLinecap: "round",
1076
+ strokeLinejoin: "round"
1077
+ })
1078
+ });
1079
+ }
1080
+ var We = p(function({ className: t, max: n = 5, onChange: r, readonly: a = !1, renderStar: o, size: s = "default", value: c, ...l }, u) {
1081
+ let [d, f] = v(null), p = m(() => f(null), []);
1082
+ return /* @__PURE__ */ y("div", {
1083
+ className: e("inline-flex gds-gap-xs", t),
1084
+ "data-component": "rating",
1085
+ onMouseLeave: a ? void 0 : p,
1086
+ ref: u,
1087
+ role: "group",
1088
+ ...l,
1089
+ children: Array.from({ length: n }, (t, n) => {
1090
+ let l = n + 1, u = d === null ? l <= c : l <= d;
1091
+ return a ? /* @__PURE__ */ y("span", {
1092
+ className: Y[s],
1093
+ children: o === void 0 ? /* @__PURE__ */ y(X, { filled: u }) : o(u, n)
1094
+ }, n) : /* @__PURE__ */ y("button", {
1095
+ className: e("transition-transform hover:scale-110", i),
1096
+ onClick: () => r?.(l),
1097
+ onMouseEnter: () => f(l),
1098
+ type: "button",
1099
+ children: /* @__PURE__ */ y("span", {
1100
+ className: Y[s],
1101
+ children: o === void 0 ? /* @__PURE__ */ y(X, { filled: u }) : o(u, n)
1102
+ })
1103
+ }, n);
1104
+ })
1105
+ });
1106
+ });
1107
+ //#endregion
1108
+ //#region src/l3-atoms/relative-time.tsx
1109
+ function Z(e) {
1110
+ let t = e instanceof Date ? e : new Date(e), n = Date.now() - t.getTime(), r = Math.floor(n / 1e3);
1111
+ if (r < 60) return "just now";
1112
+ let i = Math.floor(r / 60);
1113
+ if (i < 60) return `${i}m ago`;
1114
+ let a = Math.floor(i / 60);
1115
+ if (a < 24) return `${a}h ago`;
1116
+ let o = Math.floor(a / 24);
1117
+ if (o === 1) return "yesterday";
1118
+ if (o < 30) return `${o}d ago`;
1119
+ let s = Math.floor(o / 30);
1120
+ return s < 12 ? `${s}mo ago` : `${Math.floor(s / 12)}y ago`;
1121
+ }
1122
+ function Ge(e) {
1123
+ return e.toLocaleString();
1124
+ }
1125
+ var Ke = p(function({ className: t, date: n, prefix: r, ...i }, a) {
1126
+ let [o, s] = v(() => Z(n)), c = _(null);
1127
+ h(() => (s(Z(n)), c.current = setInterval(() => {
1128
+ s(Z(n));
1129
+ }, 3e4), () => {
1130
+ c.current !== null && clearInterval(c.current);
1131
+ }), [n]);
1132
+ let l = n instanceof Date ? n : new Date(n), u = Ge(l);
1133
+ return /* @__PURE__ */ y("time", {
1134
+ className: e("font-mono text-fg-muted", t),
1135
+ "data-component": "relative-time",
1136
+ dateTime: l.toISOString(),
1137
+ ref: a,
1138
+ title: u,
1139
+ ...i,
1140
+ children: r === void 0 ? o : `${r} ${o}`
1141
+ });
1142
+ }), qe = {
1143
+ accent: "bg-accent text-accent-fg",
1144
+ danger: "bg-danger text-white",
1145
+ success: "bg-success text-white",
1146
+ warning: "bg-warning text-white"
1147
+ }, Je = p(function({ children: t, label: n, variant: r = "accent", position: i = "top-right", className: a, ...o }, s) {
1148
+ let c = i === "top-right";
1149
+ return /* @__PURE__ */ b("div", {
1150
+ ref: s,
1151
+ className: e("relative overflow-hidden", a),
1152
+ "data-component": "ribbon",
1153
+ ...o,
1154
+ children: [/* @__PURE__ */ y("div", {
1155
+ className: e("pointer-events-none absolute top-3 z-10 px-6 py-0.5 text-[10px] font-bold uppercase tracking-wider shadow-sm", qe[r], c ? "-right-6 rotate-45" : "-left-6 -rotate-45"),
1156
+ children: n
1157
+ }), t]
1158
+ });
1159
+ }), Ye = p(function({ className: t, color: n, position: r = "top-right", text: i, ...a }, o) {
1160
+ let s = r === "top-right";
1161
+ return /* @__PURE__ */ y("div", {
1162
+ className: e("absolute top-0 z-10 overflow-hidden", s ? "right-0" : "left-0", t),
1163
+ "data-component": "ribbon-banner",
1164
+ ref: o,
1165
+ style: {
1166
+ height: 80,
1167
+ width: 80
1168
+ },
1169
+ ...a,
1170
+ children: /* @__PURE__ */ y("div", {
1171
+ className: "flex items-center justify-center text-xs font-bold text-accent-fg select-none",
1172
+ style: {
1173
+ backgroundColor: n ?? "var(--color-accent)",
1174
+ left: s ? void 0 : -20,
1175
+ position: "absolute",
1176
+ right: s ? -20 : void 0,
1177
+ top: 16,
1178
+ transform: s ? "rotate(45deg)" : "rotate(-45deg)",
1179
+ width: 120
1180
+ },
1181
+ children: i
1182
+ })
1183
+ });
1184
+ }), Xe = 0, Ze = p(function({ children: t, color: n = "currentColor", disabled: r = !1, className: i }, a) {
1185
+ let [o, s] = v([]), c = m((e) => {
1186
+ if (r) return;
1187
+ let t = e.currentTarget.getBoundingClientRect(), n = e.clientX - t.left, i = e.clientY - t.top, a = Math.max(t.width, t.height) * 2;
1188
+ s((e) => [...e, {
1189
+ id: Xe++,
1190
+ x: n,
1191
+ y: i,
1192
+ size: a
1193
+ }]);
1194
+ }, [r]), l = m((e) => {
1195
+ s((t) => t.filter((t) => t.id !== e));
1196
+ }, []);
1197
+ return /* @__PURE__ */ b("div", {
1198
+ ref: a,
1199
+ "data-component": "ripple-effect",
1200
+ className: e("relative overflow-hidden", i),
1201
+ onPointerDown: c,
1202
+ children: [t, o.map((e) => /* @__PURE__ */ y("span", {
1203
+ className: "pointer-events-none absolute animate-ripple rounded-full",
1204
+ style: {
1205
+ left: e.x - e.size / 2,
1206
+ top: e.y - e.size / 2,
1207
+ width: e.size,
1208
+ height: e.size,
1209
+ backgroundColor: n
1210
+ },
1211
+ onAnimationEnd: () => l(e.id)
1212
+ }, e.id))]
1213
+ });
1214
+ }), Qe = p(function({ className: t, color: n, height: r = 3, ...i }, a) {
1215
+ let [o, s] = v(0), c = m(() => {
1216
+ let e = document.documentElement.scrollTop, t = document.documentElement.scrollHeight - document.documentElement.clientHeight;
1217
+ t > 0 && s(e / t * 100);
1218
+ }, []);
1219
+ return h(() => (window.addEventListener("scroll", c, { passive: !0 }), () => window.removeEventListener("scroll", c)), [c]), /* @__PURE__ */ y("div", {
1220
+ className: e("fixed top-0 right-0 left-0 z-50", t),
1221
+ "data-component": "scroll-progress",
1222
+ ref: a,
1223
+ style: { height: `${r}px` },
1224
+ ...i,
1225
+ children: /* @__PURE__ */ y("div", {
1226
+ className: "h-full bg-accent transition-[width] duration-100 ease-out",
1227
+ style: {
1228
+ width: `${o}%`,
1229
+ ...n === void 0 ? {} : { backgroundColor: n }
1230
+ }
1231
+ })
1232
+ });
1233
+ }), $e = p(function({ threshold: t = 300, smooth: n = !0, className: r }, a) {
1234
+ let [o, s] = v(() => typeof window > "u" ? !1 : window.scrollY >= t);
1235
+ return h(() => {
1236
+ let e = () => s(window.scrollY >= t);
1237
+ return window.addEventListener("scroll", e, { passive: !0 }), () => window.removeEventListener("scroll", e);
1238
+ }, [t]), o ? /* @__PURE__ */ y("button", {
1239
+ ref: a,
1240
+ type: "button",
1241
+ "aria-label": "Scroll to top",
1242
+ onClick: () => window.scrollTo({
1243
+ top: 0,
1244
+ behavior: n ? "smooth" : "auto"
1245
+ }),
1246
+ className: e("fixed bottom-6 right-6 z-40 flex h-10 w-10 items-center justify-center rounded-full bg-accent text-accent-fg shadow-lg transition-opacity hover:bg-accent/90", i, r),
1247
+ "data-component": "scroll-to-top",
1248
+ children: /* @__PURE__ */ y("svg", {
1249
+ width: "16",
1250
+ height: "16",
1251
+ viewBox: "0 0 16 16",
1252
+ fill: "none",
1253
+ stroke: "currentColor",
1254
+ strokeWidth: "2",
1255
+ strokeLinecap: "round",
1256
+ strokeLinejoin: "round",
1257
+ children: /* @__PURE__ */ y("path", { d: "M8 12V4M4 7l4-3 4 3" })
1258
+ })
1259
+ }) : null;
1260
+ }), et = {
1261
+ default: "px-3 py-1.5 text-xs",
1262
+ sm: "px-2 py-1 text-[11px]"
1263
+ }, tt = p(function({ options: n, value: r, onChange: a, size: o = "default", disabled: s, glass: c, className: l, ...u }, d) {
1264
+ return /* @__PURE__ */ y("div", {
1265
+ ref: d,
1266
+ className: e("inline-flex select-none gds-radius-button bg-bg-tertiary p-0.5", c === !0 && t(c), s === !0 && "pointer-events-none opacity-50", l),
1267
+ "data-component": "segmented-control",
1268
+ "data-state": s === !0 ? "disabled" : "enabled",
1269
+ role: "radiogroup",
1270
+ ...u,
1271
+ children: n.map((t) => {
1272
+ let n = t.value === r;
1273
+ return /* @__PURE__ */ y("button", {
1274
+ type: "button",
1275
+ role: "radio",
1276
+ "aria-checked": n,
1277
+ disabled: s,
1278
+ onClick: () => {
1279
+ n || a(t.value);
1280
+ },
1281
+ className: e("gds-radius-button transition-all", et[o ?? "default"], i, n ? "bg-bg font-medium text-fg gds-shadow-sm" : "text-fg-muted hover:text-fg"),
1282
+ children: t.label
1283
+ }, t.value);
1284
+ })
1285
+ });
1286
+ }), nt = p(function({ className: t, description: n, keys: r, ...i }, a) {
1287
+ return /* @__PURE__ */ b("span", {
1288
+ className: e("inline-flex items-center gap-2", t),
1289
+ "data-component": "shortcut-display",
1290
+ ref: a,
1291
+ ...i,
1292
+ children: [/* @__PURE__ */ y("span", {
1293
+ className: "inline-flex items-center gap-0.5",
1294
+ children: r.map((e, t) => /* @__PURE__ */ y(o, { children: e }, t))
1295
+ }), n !== void 0 && /* @__PURE__ */ y("span", {
1296
+ className: "text-xs text-fg-muted",
1297
+ children: n
1298
+ })]
1299
+ });
1300
+ }), rt = {
1301
+ "avatar-text": () => /* @__PURE__ */ b("div", {
1302
+ className: "flex items-center gap-3",
1303
+ children: [/* @__PURE__ */ y(c, { variant: "circle" }), /* @__PURE__ */ b("div", {
1304
+ className: "flex flex-1 flex-col gap-2",
1305
+ children: [/* @__PURE__ */ y(c, {
1306
+ variant: "text",
1307
+ width: "60%"
1308
+ }), /* @__PURE__ */ y(c, {
1309
+ variant: "text",
1310
+ width: "40%"
1311
+ })]
1312
+ })]
1313
+ }),
1314
+ card: () => /* @__PURE__ */ b("div", {
1315
+ className: "flex flex-col gap-3",
1316
+ children: [
1317
+ /* @__PURE__ */ y(c, { variant: "rect" }),
1318
+ /* @__PURE__ */ y(c, { variant: "text" }),
1319
+ /* @__PURE__ */ y(c, {
1320
+ variant: "text",
1321
+ width: "80%"
1322
+ }),
1323
+ /* @__PURE__ */ y(c, {
1324
+ variant: "text",
1325
+ width: "50%"
1326
+ })
1327
+ ]
1328
+ }),
1329
+ "form-field": () => /* @__PURE__ */ b("div", {
1330
+ className: "flex flex-col gap-2",
1331
+ children: [/* @__PURE__ */ y(c, {
1332
+ variant: "text",
1333
+ width: "30%"
1334
+ }), /* @__PURE__ */ y(c, {
1335
+ variant: "rect",
1336
+ height: 36
1337
+ })]
1338
+ })
1339
+ }, it = p(function({ className: t, count: n = 1, variant: r = "avatar-text" }, i) {
1340
+ let a = rt[r];
1341
+ return /* @__PURE__ */ y("div", {
1342
+ ref: i,
1343
+ className: e("flex flex-col gap-4", t),
1344
+ "data-component": "skeleton-group",
1345
+ "data-variant": r,
1346
+ children: Array.from({ length: n }, (e, t) => /* @__PURE__ */ y("div", { children: a() }, t))
1347
+ });
1348
+ }), at = "M12 0l3 9 9 3-9 3-3 9-3-9-9-3 9-3z";
1349
+ function ot(e, t) {
1350
+ let n = 360 / t * e * Math.PI / 180, r = 70 + e % 3 * 15;
1351
+ return {
1352
+ position: "absolute",
1353
+ top: "50%",
1354
+ left: "50%",
1355
+ width: 10,
1356
+ height: 10,
1357
+ transform: `translate(${Math.cos(n) * r}%, ${Math.sin(n) * r}%)`,
1358
+ animation: `gds-sparkle 1.4s ease-in-out ${e * .2}s infinite`,
1359
+ opacity: 0
1360
+ };
1361
+ }
1362
+ var st = p(function({ children: t, active: n = !0, count: r = 3, color: i = "var(--gds-accent)", className: a }, o) {
1363
+ let s = Array.from({ length: r }, (e, t) => t);
1364
+ return /* @__PURE__ */ b("span", {
1365
+ ref: o,
1366
+ className: e("relative inline-block", a),
1367
+ "data-component": "sparkle",
1368
+ children: [
1369
+ t,
1370
+ n && s.map((e) => /* @__PURE__ */ y("svg", {
1371
+ viewBox: "0 0 24 24",
1372
+ fill: i,
1373
+ style: ot(e, r),
1374
+ "aria-hidden": "true",
1375
+ children: /* @__PURE__ */ y("path", { d: at })
1376
+ }, e)),
1377
+ n && /* @__PURE__ */ y("style", { children: "\n @keyframes gds-sparkle {\n 0%, 100% { opacity: 0; transform: scale(0) rotate(0deg); }\n 50% { opacity: 1; transform: scale(1) rotate(180deg); }\n }\n " })
1378
+ ]
1379
+ });
1380
+ }), ct = {
1381
+ sm: 14,
1382
+ default: 18,
1383
+ lg: 24
1384
+ }, Q = "M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z";
1385
+ function lt({ fill: e, s: t, color: n }) {
1386
+ let r = `half-${Math.random().toString(36).slice(2, 8)}`;
1387
+ return e === "full" ? /* @__PURE__ */ y("svg", {
1388
+ width: t,
1389
+ height: t,
1390
+ viewBox: "0 0 24 24",
1391
+ fill: n,
1392
+ stroke: n,
1393
+ strokeWidth: 1,
1394
+ children: /* @__PURE__ */ y("path", { d: Q })
1395
+ }) : e === "half" ? /* @__PURE__ */ b("svg", {
1396
+ width: t,
1397
+ height: t,
1398
+ viewBox: "0 0 24 24",
1399
+ stroke: n,
1400
+ strokeWidth: 1,
1401
+ children: [
1402
+ /* @__PURE__ */ y("defs", { children: /* @__PURE__ */ y("clipPath", {
1403
+ id: r,
1404
+ children: /* @__PURE__ */ y("rect", {
1405
+ x: "0",
1406
+ y: "0",
1407
+ width: "12",
1408
+ height: "24"
1409
+ })
1410
+ }) }),
1411
+ /* @__PURE__ */ y("path", {
1412
+ d: Q,
1413
+ fill: "none"
1414
+ }),
1415
+ /* @__PURE__ */ y("path", {
1416
+ d: Q,
1417
+ fill: n,
1418
+ clipPath: `url(#${r})`
1419
+ })
1420
+ ]
1421
+ }) : /* @__PURE__ */ y("svg", {
1422
+ width: t,
1423
+ height: t,
1424
+ viewBox: "0 0 24 24",
1425
+ fill: "none",
1426
+ stroke: "currentColor",
1427
+ strokeWidth: 1,
1428
+ className: "text-fg-muted/30",
1429
+ children: /* @__PURE__ */ y("path", { d: Q })
1430
+ });
1431
+ }
1432
+ var ut = p(function({ value: t, max: n = 5, size: r = "default", color: i = "currentColor", className: a }, o) {
1433
+ let s = ct[r], c = i === "currentColor" ? "var(--color-warning)" : i;
1434
+ return /* @__PURE__ */ y("div", {
1435
+ ref: o,
1436
+ className: e("inline-flex items-center gap-0.5", a),
1437
+ "data-component": "star-rating",
1438
+ role: "img",
1439
+ "aria-label": `${t} out of ${n} stars`,
1440
+ children: Array.from({ length: n }, (e, n) => {
1441
+ let r = t - n;
1442
+ return /* @__PURE__ */ y(lt, {
1443
+ fill: r >= 1 ? "full" : r >= .5 ? "half" : "empty",
1444
+ s,
1445
+ color: c
1446
+ }, n);
1447
+ })
1448
+ });
1449
+ }), dt = {
1450
+ active: "bg-success/10 text-success",
1451
+ draft: "bg-fg-muted/10 text-fg-muted",
1452
+ error: "bg-danger/10 text-danger",
1453
+ inactive: "bg-fg-muted/10 text-fg-muted",
1454
+ pending: "bg-warning/10 text-warning",
1455
+ warning: "bg-warning/10 text-warning"
1456
+ }, ft = p(function({ className: n, glass: r, icon: i, label: a, size: o = "default", status: s, ...c }, l) {
1457
+ let u = a ?? s;
1458
+ return /* @__PURE__ */ b("span", {
1459
+ className: e("inline-flex select-none items-center gds-gap-xs gds-radius-badge font-medium", o === "sm" ? "gds-pad-x-sm py-px gds-text-caption" : "gds-pad-x-sm gds-pad-y-sm gds-text-body", dt[s], t(r), r === !0 && "border border-white/10 bg-white/5", n),
1460
+ "data-component": "status-badge",
1461
+ "data-state": s,
1462
+ ref: l,
1463
+ ...c,
1464
+ children: [i !== void 0 && /* @__PURE__ */ y("span", {
1465
+ className: "gds-icon-child-sm",
1466
+ children: i
1467
+ }), u]
1468
+ });
1469
+ }), pt = {
1470
+ connected: "bg-success",
1471
+ connecting: "bg-warning animate-pulse",
1472
+ disconnected: "bg-danger"
1473
+ }, mt = p(function({ className: t, label: n, status: r, ...i }, a) {
1474
+ return /* @__PURE__ */ b("span", {
1475
+ className: e("inline-flex items-center gds-gap-sm", t),
1476
+ "data-component": "status-dot",
1477
+ "data-state": r,
1478
+ ref: a,
1479
+ ...i,
1480
+ children: [/* @__PURE__ */ y("span", { className: e("h-2 w-2 shrink-0 rounded-full", pt[r]) }), n !== void 0 && /* @__PURE__ */ y("span", {
1481
+ className: "gds-text-label text-fg-muted",
1482
+ children: n
1483
+ })]
1484
+ });
1485
+ }), ht = p(function({ className: t, disabled: n = !1, items: r, onChange: i }, a) {
1486
+ return /* @__PURE__ */ y("div", {
1487
+ ref: a,
1488
+ className: e("flex flex-col gap-3", t),
1489
+ "data-component": "switch-group",
1490
+ role: "group",
1491
+ children: r.map((e) => /* @__PURE__ */ b("div", {
1492
+ className: "flex items-center justify-between gap-4 gds-pad-x gds-pad-y-sm",
1493
+ children: [/* @__PURE__ */ b("div", {
1494
+ className: "min-w-0 flex-1",
1495
+ children: [/* @__PURE__ */ y("div", {
1496
+ className: "gds-text-body font-medium text-fg",
1497
+ children: e.label
1498
+ }), e.description !== void 0 && /* @__PURE__ */ y("div", {
1499
+ className: "mt-0.5 gds-text-caption text-fg-muted",
1500
+ children: e.description
1501
+ })]
1502
+ }), /* @__PURE__ */ y(d, {
1503
+ checked: e.checked,
1504
+ disabled: n,
1505
+ onChange: (t) => i(e.id, t)
1506
+ })]
1507
+ }, e.id))
1508
+ });
1509
+ }), gt = {
1510
+ accent: "bg-accent/15 text-accent",
1511
+ danger: "bg-danger/15 text-danger",
1512
+ muted: "bg-fg-muted/10 text-fg-muted",
1513
+ success: "bg-success/15 text-success",
1514
+ warning: "bg-warning/15 text-warning"
1515
+ }, _t = {
1516
+ default: "px-1.5 py-0.5 text-[10px]",
1517
+ sm: "px-1 py-px text-[9px]"
1518
+ }, vt = p(function({ className: t, label: n, size: r = "default", variant: i = "accent", ...a }, o) {
1519
+ return /* @__PURE__ */ y("span", {
1520
+ className: e("inline-flex select-none items-center rounded-full font-bold uppercase leading-none tracking-wider", gt[i], _t[r], t),
1521
+ "data-component": "text-badge",
1522
+ "data-variant": i,
1523
+ ref: o,
1524
+ ...a,
1525
+ children: n
1526
+ });
1527
+ }), yt = p(function({ children: t, className: n, effect: r, gradientFrom: i, gradientTo: a, style: o, ...s }, c) {
1528
+ let l = i ?? "var(--gds-accent)", u = a ?? "var(--gds-success)";
1529
+ return r === "gradient" ? /* @__PURE__ */ y("span", {
1530
+ className: e("bg-clip-text text-transparent", n),
1531
+ "data-component": "text-effect",
1532
+ "data-variant": r,
1533
+ ref: c,
1534
+ style: {
1535
+ backgroundImage: `linear-gradient(135deg, ${l}, ${u})`,
1536
+ ...o
1537
+ },
1538
+ ...s,
1539
+ children: t
1540
+ }) : r === "highlight" ? /* @__PURE__ */ y("span", {
1541
+ className: e("box-decoration-clone bg-accent/20 px-1", n),
1542
+ "data-component": "text-effect",
1543
+ "data-variant": r,
1544
+ ref: c,
1545
+ style: o,
1546
+ ...s,
1547
+ children: t
1548
+ }) : /* @__PURE__ */ y("span", {
1549
+ className: e(n),
1550
+ "data-component": "text-effect",
1551
+ "data-variant": r,
1552
+ ref: c,
1553
+ style: {
1554
+ textShadow: "0 0 8px var(--gds-accent), 0 0 16px var(--gds-accent)",
1555
+ ...o
1556
+ },
1557
+ ...s,
1558
+ children: t
1559
+ });
1560
+ }), $ = p(function({ className: t, error: n, maxLength: r, onChange: i, value: a, ...o }, c) {
1561
+ let l = a.length, u = r !== void 0 && l >= r * .9;
1562
+ return /* @__PURE__ */ b("div", {
1563
+ className: e("flex flex-col", t),
1564
+ "data-component": "textarea-counter",
1565
+ children: [/* @__PURE__ */ y(s, {
1566
+ error: n ?? u,
1567
+ maxLength: r,
1568
+ onChange: (e) => i(e.target.value),
1569
+ ref: c,
1570
+ value: a,
1571
+ ...o
1572
+ }), /* @__PURE__ */ y("div", {
1573
+ className: e("mt-1 text-right text-[11px]", u ? "text-danger" : "text-fg-muted"),
1574
+ children: r === void 0 ? l : `${l} / ${r}`
1575
+ })]
1576
+ });
1577
+ }), bt = {
1578
+ default: "h-8 w-8",
1579
+ sm: "h-6 w-6"
1580
+ }, xt = {
1581
+ default: 16,
1582
+ sm: 14
1583
+ }, St = p(function({ mode: t, onChange: n, size: r = "default", className: a }, o) {
1584
+ let s = t === "dark", c = xt[r];
1585
+ return /* @__PURE__ */ y("button", {
1586
+ ref: o,
1587
+ type: "button",
1588
+ "aria-label": s ? "Switch to light mode" : "Switch to dark mode",
1589
+ onClick: () => n(s ? "light" : "dark"),
1590
+ className: e("inline-flex items-center justify-center rounded-full text-fg-muted transition-colors hover:text-fg select-none", bt[r], i, a),
1591
+ "data-component": "theme-toggle",
1592
+ "data-state": t,
1593
+ children: s ? /* @__PURE__ */ b("svg", {
1594
+ width: c,
1595
+ height: c,
1596
+ viewBox: "0 0 16 16",
1597
+ fill: "none",
1598
+ stroke: "currentColor",
1599
+ strokeWidth: "1.5",
1600
+ strokeLinecap: "round",
1601
+ className: "transition-transform duration-200",
1602
+ children: [/* @__PURE__ */ y("circle", {
1603
+ cx: "8",
1604
+ cy: "8",
1605
+ r: "3"
1606
+ }), /* @__PURE__ */ y("path", { d: "M8 1v2M8 13v2M1 8h2M13 8h2M3.05 3.05l1.41 1.41M11.54 11.54l1.41 1.41M3.05 12.95l1.41-1.41M11.54 4.46l1.41-1.41" })]
1607
+ }) : /* @__PURE__ */ y("svg", {
1608
+ width: c,
1609
+ height: c,
1610
+ viewBox: "0 0 16 16",
1611
+ fill: "none",
1612
+ stroke: "currentColor",
1613
+ strokeWidth: "1.5",
1614
+ strokeLinecap: "round",
1615
+ className: "transition-transform duration-200",
1616
+ children: /* @__PURE__ */ y("path", { d: "M13.5 8.5a5.5 5.5 0 01-7-7A5.5 5.5 0 108 14a5.48 5.48 0 005.5-5.5z" })
1617
+ })
1618
+ });
1619
+ }), Ct = {
1620
+ default: "px-3 py-1.5 text-xs",
1621
+ sm: "px-2 py-1 text-[11px]"
1622
+ }, wt = p(function({ items: t, value: n, onChange: r, exclusive: a, size: o = "default", disabled: s, className: c, ...l }, u) {
1623
+ function d(e) {
1624
+ if (a === !0) {
1625
+ n.includes(e) || r([e]);
1626
+ return;
1627
+ }
1628
+ n.includes(e) ? r(n.filter((t) => t !== e)) : r([...n, e]);
1629
+ }
1630
+ return /* @__PURE__ */ y("div", {
1631
+ ref: u,
1632
+ className: e("inline-flex select-none overflow-hidden gds-radius-button border border-border bg-bg", s === !0 && "pointer-events-none opacity-50", c),
1633
+ "data-component": "toggle-group",
1634
+ "data-state": s === !0 ? "disabled" : "enabled",
1635
+ role: "group",
1636
+ ...l,
1637
+ children: t.map((r, a) => {
1638
+ let c = n.includes(r.value), l = a === t.length - 1;
1639
+ return /* @__PURE__ */ y("button", {
1640
+ "aria-pressed": c,
1641
+ className: e("transition-colors", Ct[o ?? "default"], !l && "border-r border-border", i, c ? "bg-accent/10 text-accent" : "text-fg-muted hover:bg-bg-tertiary"),
1642
+ disabled: s,
1643
+ onClick: () => d(r.value),
1644
+ type: "button",
1645
+ children: r.label
1646
+ }, r.value);
1647
+ })
1648
+ });
1649
+ }), Tt = {
1650
+ sm: 12,
1651
+ default: 16
1652
+ }, Et = p(function({ className: t, direction: n, size: r = "default", ...i }, a) {
1653
+ let o = Tt[r];
1654
+ return /* @__PURE__ */ y("span", {
1655
+ className: e("inline-flex", n === "up" ? "text-success" : n === "down" ? "text-danger" : "text-fg-muted", t),
1656
+ "data-component": "trend-arrow",
1657
+ "data-direction": n,
1658
+ ref: a,
1659
+ ...i,
1660
+ children: /* @__PURE__ */ b("svg", {
1661
+ fill: "none",
1662
+ height: o,
1663
+ stroke: "currentColor",
1664
+ strokeLinecap: "round",
1665
+ strokeLinejoin: "round",
1666
+ strokeWidth: 2,
1667
+ viewBox: "0 0 24 24",
1668
+ width: o,
1669
+ children: [
1670
+ n === "up" && /* @__PURE__ */ y("path", { d: "M12 19V5M5 12l7-7 7 7" }),
1671
+ n === "down" && /* @__PURE__ */ y("path", { d: "M12 5v14M19 12l-7 7-7-7" }),
1672
+ n === "flat" && /* @__PURE__ */ y("path", { d: "M5 12h14" })
1673
+ ]
1674
+ })
1675
+ });
1676
+ }), Dt = p(function({ className: t, items: n, max: r = 3, moreLabel: i, ...a }, o) {
1677
+ let s = n.slice(0, r), c = n.length - r;
1678
+ return /* @__PURE__ */ b("div", {
1679
+ className: e("inline-flex flex-wrap items-center gds-gap-sm", t),
1680
+ "data-component": "truncated-list",
1681
+ ref: o,
1682
+ ...a,
1683
+ children: [s.map((e, t) => /* @__PURE__ */ y("span", { children: e }, t)), c > 0 && /* @__PURE__ */ y("span", {
1684
+ className: "gds-text-label text-fg-muted",
1685
+ children: i === void 0 ? `+${c} more` : i(c)
1686
+ })]
1687
+ });
1688
+ }), Ot = p(function({ text: t, speed: n = 50, delay: r = 0, cursor: i = !0, onComplete: a, className: o }, s) {
1689
+ let [c, l] = v(0), [u, d] = v(r <= 0);
1690
+ return h(() => {
1691
+ if (r <= 0) return;
1692
+ let e = setTimeout(() => d(!0), r);
1693
+ return () => clearTimeout(e);
1694
+ }, [r]), h(() => {
1695
+ if (!u) return;
1696
+ if (c >= t.length) {
1697
+ a !== void 0 && a();
1698
+ return;
1699
+ }
1700
+ let e = setTimeout(() => l((e) => e + 1), n);
1701
+ return () => clearTimeout(e);
1702
+ }, [
1703
+ c,
1704
+ t.length,
1705
+ n,
1706
+ u,
1707
+ a
1708
+ ]), h(() => {
1709
+ l(0), r <= 0 && d(!0);
1710
+ }, [t, r]), /* @__PURE__ */ b("span", {
1711
+ ref: s,
1712
+ className: e(o),
1713
+ "data-component": "typewriter",
1714
+ children: [t.slice(0, c), i && /* @__PURE__ */ y("span", {
1715
+ className: "inline-block animate-pulse",
1716
+ "data-testid": "cursor",
1717
+ "aria-hidden": !0,
1718
+ children: "|"
1719
+ })]
1720
+ });
1721
+ }), kt = {
1722
+ default: "text-accent",
1723
+ gold: "text-warning",
1724
+ official: "text-success"
1725
+ }, At = {
1726
+ default: 16,
1727
+ sm: 12
1728
+ }, jt = p(function({ className: t, size: n = "default", variant: r = "default", ...i }, a) {
1729
+ let o = At[n];
1730
+ return /* @__PURE__ */ y("span", {
1731
+ className: e("inline-flex shrink-0 items-center", kt[r], t),
1732
+ "data-component": "verified-badge",
1733
+ "data-variant": r,
1734
+ ref: a,
1735
+ ...i,
1736
+ children: /* @__PURE__ */ y("svg", {
1737
+ fill: "currentColor",
1738
+ height: o,
1739
+ viewBox: "0 0 24 24",
1740
+ width: o,
1741
+ children: /* @__PURE__ */ y("path", { d: "M12 1l3.09 2.26L19 3.27l.01 3.91L22 10.18 19.82 13l.18 3.91-3.91 1.01L13.09 21 12 23l-3.09-2.26L5 21.73l-.01-3.91L2 14.82 4.18 12l-.18-3.91 3.91-1.01L10.91 4 12 1zm-1.5 12.5l5-5-1.41-1.41L10.5 10.67 8.41 8.59 7 10l3.5 3.5z" })
1742
+ })
1743
+ });
1744
+ }), Mt = p(function({ value: t, onChange: n, min: r, max: a, step: o = 1, disabled: s = !1, className: c, ...l }, u) {
1745
+ let d = r !== void 0 && t <= r, f = a !== void 0 && t >= a;
1746
+ return /* @__PURE__ */ b("div", {
1747
+ ref: u,
1748
+ className: e("inline-flex items-center gap-1 select-none", c),
1749
+ "data-component": "visual-counter",
1750
+ ...l,
1751
+ children: [
1752
+ /* @__PURE__ */ y("button", {
1753
+ type: "button",
1754
+ className: e("flex h-7 w-7 items-center justify-center rounded-md border border-border text-fg-muted transition-colors hover:bg-bg-tertiary disabled:opacity-40", i),
1755
+ disabled: s || d,
1756
+ onClick: () => n(Math.max(r ?? -Infinity, t - o)),
1757
+ children: "−"
1758
+ }),
1759
+ /* @__PURE__ */ y("span", {
1760
+ className: "min-w-[2rem] text-center tabular-nums gds-text text-fg",
1761
+ children: t
1762
+ }),
1763
+ /* @__PURE__ */ y("button", {
1764
+ type: "button",
1765
+ className: e("flex h-7 w-7 items-center justify-center rounded-md border border-border text-fg-muted transition-colors hover:bg-bg-tertiary disabled:opacity-40", i),
1766
+ disabled: s || f,
1767
+ onClick: () => n(Math.min(a ?? Infinity, t + o)),
1768
+ children: "+"
1769
+ })
1770
+ ]
1771
+ });
1772
+ }), Nt = p(function({ children: t, className: n, duration: r = 300, scale: i = 1.1, ...a }, o) {
1773
+ return /* @__PURE__ */ y("div", {
1774
+ className: e("overflow-hidden", n),
1775
+ "data-component": "zoom-on-hover",
1776
+ ref: o,
1777
+ ...a,
1778
+ children: /* @__PURE__ */ y("div", {
1779
+ className: "transition-transform ease-out",
1780
+ style: { transitionDuration: `${r}ms` },
1781
+ onMouseEnter: (e) => {
1782
+ e.currentTarget.style.transform = `scale(${i})`;
1783
+ },
1784
+ onMouseLeave: (e) => {
1785
+ e.currentTarget.style.transform = "scale(1)";
1786
+ },
1787
+ children: t
1788
+ })
1789
+ });
1790
+ });
1791
+ //#endregion
1792
+ export { N as $, Ve as A, H as B, Ye as C, Ue as D, We as E, Me as F, ve as G, Ce as H, je as I, B as J, _e as K, ke as L, Le as M, Fe as N, He as O, Pe as P, P as Q, Oe as R, Ze as S, Ke as T, Se as U, we as V, xe as W, R as X, z as Y, L as Z, it as _, Dt as a, le as at, $e as b, St as c, se as ct, vt as d, ne as dt, M as et, ht as f, T as ft, st as g, ut as h, Ot as i, de as it, Re as j, J as k, $ as l, oe as lt, ft as m, S as mt, Mt as n, A as nt, Et as o, ce as ot, mt as p, w as pt, V as q, jt as r, D as rt, wt as s, E as st, Nt as t, j as tt, yt as u, ie as ut, nt as v, Je as w, Qe as x, tt as y, De as z };
1793
+
1794
+ //# sourceMappingURL=l3-atoms-CsN9IA9J.js.map