@eschoolbase/client-ui 0.0.0-stage → 0.1.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 (44) hide show
  1. package/README.md +193 -2
  2. package/dist/components/AccountPanel/AccountPanel.d.ts +8 -0
  3. package/dist/components/AccountPanel/AccountPanel.types.d.ts +65 -0
  4. package/dist/components/AccountPanel/index.d.ts +2 -0
  5. package/dist/components/Avatar/Avatar.d.ts +4 -0
  6. package/dist/components/Avatar/Avatar.types.d.ts +14 -0
  7. package/dist/components/Avatar/index.d.ts +2 -0
  8. package/dist/components/Button/Button.d.ts +2 -0
  9. package/dist/components/Button/Button.types.d.ts +14 -0
  10. package/dist/components/Button/index.d.ts +2 -0
  11. package/dist/components/FormField/FormField.d.ts +2 -0
  12. package/dist/components/FormField/FormField.types.d.ts +43 -0
  13. package/dist/components/FormField/FormFieldContext.d.ts +8 -0
  14. package/dist/components/FormField/index.d.ts +3 -0
  15. package/dist/components/FormSection/FormSection.d.ts +6 -0
  16. package/dist/components/FormSection/FormSection.types.d.ts +15 -0
  17. package/dist/components/FormSection/index.d.ts +2 -0
  18. package/dist/components/Input/Input.d.ts +2 -0
  19. package/dist/components/Input/Input.types.d.ts +15 -0
  20. package/dist/components/Input/index.d.ts +2 -0
  21. package/dist/components/Select/Select.d.ts +7 -0
  22. package/dist/components/Select/Select.types.d.ts +57 -0
  23. package/dist/components/Select/SelectControl.d.ts +2 -0
  24. package/dist/components/Select/index.d.ts +2 -0
  25. package/dist/components/Typography/Typography.d.ts +3 -0
  26. package/dist/components/Typography/Typography.types.d.ts +22 -0
  27. package/dist/components/Typography/index.d.ts +2 -0
  28. package/dist/index.cjs +2 -0
  29. package/dist/index.cjs.map +1 -0
  30. package/dist/index.d.ts +23 -0
  31. package/dist/index.js +984 -0
  32. package/dist/index.js.map +1 -0
  33. package/dist/license/UnlicensedNotice.d.ts +2 -0
  34. package/dist/license/hash.d.ts +1 -0
  35. package/dist/license/index.d.ts +2 -0
  36. package/dist/license/keys.d.ts +6 -0
  37. package/dist/license/license.d.ts +7 -0
  38. package/dist/styles.css +2 -0
  39. package/dist/theme/ThemeProvider.d.ts +4 -0
  40. package/dist/theme/ThemeProvider.types.d.ts +19 -0
  41. package/dist/theme/index.d.ts +2 -0
  42. package/dist/types/index.d.ts +2 -0
  43. package/dist/utils/cn.d.ts +3 -0
  44. package/package.json +75 -4
package/dist/index.js ADDED
@@ -0,0 +1,984 @@
1
+ "use client";
2
+ import { createContext as e, createElement as t, forwardRef as n, useCallback as r, useContext as i, useEffect as a, useId as o, useMemo as s, useRef as c, useState as l, useSyncExternalStore as u } from "react";
3
+ import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
4
+ import { createPortal as m } from "react-dom";
5
+ //#region src/utils/cn.ts
6
+ function h(...e) {
7
+ return e.filter(Boolean).join(" ");
8
+ }
9
+ //#endregion
10
+ //#region src/license/hash.ts
11
+ var g = "client-ui:";
12
+ function _(e) {
13
+ let t = g + e.trim(), n = 3735928559, r = 1103547991;
14
+ for (let e = 0; e < t.length; e++) {
15
+ let i = t.charCodeAt(e);
16
+ n = Math.imul(n ^ i, 2654435761), r = Math.imul(r ^ i, 1597334677);
17
+ }
18
+ return n = Math.imul(n ^ n >>> 16, 2246822507), n ^= Math.imul(r ^ r >>> 13, 3266489909), r = Math.imul(r ^ r >>> 16, 2246822507), r ^= Math.imul(n ^ n >>> 13, 3266489909), (4294967296 * (2097151 & r) + (n >>> 0)).toString(16).padStart(14, "0");
19
+ }
20
+ //#endregion
21
+ //#region src/license/keys.ts
22
+ var v = ["1cd9d9bd20471f"], y = "", b = /* @__PURE__ */ new Set(), x = !1, S = e(null);
23
+ function C(e) {
24
+ y = e, x = !1, b.forEach((e) => e());
25
+ }
26
+ function w(e) {
27
+ return !e || !e.trim() ? !1 : v.includes(_(e));
28
+ }
29
+ var ee = (e) => (b.add(e), () => {
30
+ b.delete(e);
31
+ }), T = () => y;
32
+ function E() {
33
+ let e = i(S), t = u(ee, T, T), n = w(e ?? t);
34
+ return a(() => {
35
+ n || x || (x = !0, console.error("[client-ui] Missing or invalid license key. Components are disabled. Pass licenseKey to <ThemeProvider> or call setLicenseKey() once at app start."));
36
+ }, [n]), n;
37
+ }
38
+ var te = { root: "cui-UnlicensedNotice-module__root--FdnRG" };
39
+ //#endregion
40
+ //#region src/license/UnlicensedNotice.tsx
41
+ function D() {
42
+ return /* @__PURE__ */ f("span", {
43
+ role: "alert",
44
+ className: te.root,
45
+ children: "client-ui: missing or invalid license key"
46
+ });
47
+ }
48
+ var O = {
49
+ button: "cui-Button-module__button--2ZuB7",
50
+ sm: "cui-Button-module__sm--NhG0g",
51
+ md: "cui-Button-module__md--hH4h3",
52
+ lg: "cui-Button-module__lg--2plQf",
53
+ fullWidth: "cui-Button-module__fullWidth--36oJT",
54
+ primary: "cui-Button-module__primary--s1sM6",
55
+ secondary: "cui-Button-module__secondary--R0waJ",
56
+ outline: "cui-Button-module__outline--F5jq-",
57
+ ghost: "cui-Button-module__ghost--1KINV",
58
+ danger: "cui-Button-module__danger--V4fX8",
59
+ link: "cui-Button-module__link--Zt5hw",
60
+ spinner: "cui-Button-module__spinner--ZExvW",
61
+ spin: "cui-Button-module__spin--JvkZu"
62
+ }, ne = n(function({ variant: e = "primary", size: t = "md", loading: n = !1, fullWidth: r = !1, type: i = "button", disabled: a, className: o, children: s, ...c }, l) {
63
+ return E() ? /* @__PURE__ */ p("button", {
64
+ ...c,
65
+ ref: l,
66
+ type: i,
67
+ disabled: a || n,
68
+ "aria-busy": n || void 0,
69
+ "data-variant": e,
70
+ "data-size": t,
71
+ className: h(O.button, O[e], O[t], r && O.fullWidth, o),
72
+ children: [n ? /* @__PURE__ */ f("span", {
73
+ className: O.spinner,
74
+ "aria-hidden": "true"
75
+ }) : null, s]
76
+ }) : /* @__PURE__ */ f(D, {});
77
+ }), k = e(null);
78
+ function A(e) {
79
+ let t = i(k), n = o(), r = t?.id ?? e.id ?? n, a = !!(e.required ?? t?.required), s = !!(e.disabled ?? t?.disabled), c = !!e.error || !!t?.invalid, l = [e["aria-describedby"], t?.describedById].filter(Boolean).join(" ") || void 0;
80
+ return {
81
+ id: r,
82
+ required: a,
83
+ disabled: s,
84
+ invalid: c,
85
+ labelId: t?.labelId,
86
+ "aria-invalid": c ? !0 : void 0,
87
+ "aria-describedby": l
88
+ };
89
+ }
90
+ var j = {
91
+ root: "cui-FormField-module__root--QkVj-",
92
+ label: "cui-FormField-module__label--98wVM",
93
+ labelDisabled: "cui-FormField-module__labelDisabled--I5V6c",
94
+ required: "cui-FormField-module__required--Erm4t",
95
+ message: "cui-FormField-module__message--FUq3k",
96
+ helper: "cui-FormField-module__helper--JuBZ6",
97
+ error: "cui-FormField-module__error--4SHKr"
98
+ };
99
+ //#endregion
100
+ //#region src/components/FormField/FormField.tsx
101
+ function M({ children: e, label: t, required: n = !1, helperText: r, error: i, disabled: a = !1, id: c, className: l, ...u }) {
102
+ let d = o(), m = c ?? d, g = !!i, _ = g ? `${m}-error` : r ? `${m}-helper` : void 0, v = s(() => ({
103
+ id: m,
104
+ describedById: _,
105
+ labelId: t ? `${m}-label` : void 0,
106
+ required: n,
107
+ disabled: a,
108
+ invalid: g
109
+ }), [
110
+ m,
111
+ _,
112
+ t,
113
+ n,
114
+ a,
115
+ g
116
+ ]);
117
+ return E() ? /* @__PURE__ */ f(k.Provider, {
118
+ value: v,
119
+ children: /* @__PURE__ */ p("div", {
120
+ ...u,
121
+ className: h(j.root, l),
122
+ children: [
123
+ t ? /* @__PURE__ */ p("label", {
124
+ id: `${m}-label`,
125
+ htmlFor: m,
126
+ className: h(j.label, a && j.labelDisabled),
127
+ children: [t, n ? /* @__PURE__ */ f("span", {
128
+ className: j.required,
129
+ "aria-hidden": "true",
130
+ children: "*"
131
+ }) : null]
132
+ }) : null,
133
+ e,
134
+ g ? /* @__PURE__ */ f("p", {
135
+ id: _,
136
+ className: h(j.message, j.error),
137
+ role: "alert",
138
+ children: i
139
+ }) : r ? /* @__PURE__ */ f("p", {
140
+ id: _,
141
+ className: h(j.message, j.helper),
142
+ children: r
143
+ }) : null
144
+ ]
145
+ })
146
+ }) : /* @__PURE__ */ f(D, {});
147
+ }
148
+ var N = {
149
+ control: "cui-Input-module__control--e3jPo",
150
+ disabled: "cui-Input-module__disabled--nzcnQ",
151
+ invalid: "cui-Input-module__invalid--VyrnA",
152
+ sm: "cui-Input-module__sm--SCPkT",
153
+ md: "cui-Input-module__md--weRbk",
154
+ lg: "cui-Input-module__lg--ic8a4",
155
+ input: "cui-Input-module__input--WjT81",
156
+ affix: "cui-Input-module__affix--zz0Xe",
157
+ readOnly: "cui-Input-module__readOnly--0ag-W"
158
+ }, P = n(function({ id: e, required: t, disabled: n, error: r, "aria-describedby": i, prefix: a, suffix: o, size: s = "md", readOnly: c, className: l, ...u }, d) {
159
+ let m = A({
160
+ id: e,
161
+ required: t,
162
+ disabled: n,
163
+ error: r,
164
+ "aria-describedby": i
165
+ });
166
+ return /* @__PURE__ */ p("div", {
167
+ className: h(N.control, N[s], m.invalid && N.invalid, m.disabled && N.disabled, c && N.readOnly, l),
168
+ children: [
169
+ a ? /* @__PURE__ */ f("span", {
170
+ className: N.affix,
171
+ children: a
172
+ }) : null,
173
+ /* @__PURE__ */ f("input", {
174
+ ...u,
175
+ ref: d,
176
+ id: m.id,
177
+ required: m.required,
178
+ disabled: m.disabled,
179
+ readOnly: c,
180
+ "aria-invalid": m["aria-invalid"],
181
+ "aria-describedby": m["aria-describedby"],
182
+ className: N.input
183
+ }),
184
+ o ? /* @__PURE__ */ f("span", {
185
+ className: N.affix,
186
+ children: o
187
+ }) : null
188
+ ]
189
+ });
190
+ }), F = n(function({ label: e, helperText: t, ...n }, r) {
191
+ return E() ? !e && !t && !n.error ? /* @__PURE__ */ f(P, {
192
+ ...n,
193
+ ref: r
194
+ }) : /* @__PURE__ */ f(M, {
195
+ id: n.id,
196
+ label: e,
197
+ helperText: t,
198
+ error: n.error,
199
+ required: n.required,
200
+ disabled: n.disabled,
201
+ children: /* @__PURE__ */ f(P, {
202
+ ...n,
203
+ ref: r
204
+ })
205
+ }) : /* @__PURE__ */ f(D, {});
206
+ }), I = {
207
+ control: "cui-Select-module__control--OqOfI",
208
+ trigger: "cui-Select-module__trigger--ECKfC",
209
+ open: "cui-Select-module__open--PADOK",
210
+ value: "cui-Select-module__value--7CDNo",
211
+ placeholder: "cui-Select-module__placeholder--yUgBU",
212
+ sm: "cui-Select-module__sm--TPJwf",
213
+ md: "cui-Select-module__md--nOV6u",
214
+ lg: "cui-Select-module__lg--NGPOa",
215
+ chevron: "cui-Select-module__chevron--PLUsh",
216
+ clear: "cui-Select-module__clear--2OgzI",
217
+ invalid: "cui-Select-module__invalid--opDrx",
218
+ disabled: "cui-Select-module__disabled--8YgjS",
219
+ popover: "cui-Select-module__popover--VnWAu",
220
+ "cui-select-in": "cui-Select-module__cui-select-in--VGYFd",
221
+ top: "cui-Select-module__top--v5FSw",
222
+ "cui-select-in-top": "cui-Select-module__cui-select-in-top--fwYA4",
223
+ searchWrap: "cui-Select-module__searchWrap--YBOFZ",
224
+ search: "cui-Select-module__search--FrUXx",
225
+ list: "cui-Select-module__list--CI08p",
226
+ option: "cui-Select-module__option--Hvo8n",
227
+ optionLabel: "cui-Select-module__optionLabel--FGiUZ",
228
+ selected: "cui-Select-module__selected--8A13A",
229
+ highlighted: "cui-Select-module__highlighted--YIVPT",
230
+ optionDisabled: "cui-Select-module__optionDisabled--FhDw-",
231
+ check: "cui-Select-module__check--RxZrV",
232
+ empty: "cui-Select-module__empty--KmYrm",
233
+ spinner: "cui-Select-module__spinner--OxCAP",
234
+ "cui-select-spin": "cui-Select-module__cui-select-spin--MQqaM"
235
+ }, re = 4, ie = 280, ae = 500, oe = (e) => Array.isArray(e) ? e : e ? [e] : [], L = n(function({ options: e, placeholder: t = "Select an option", size: n = "md", multiple: i = !1, clearable: u = !0, onSearch: d, loading: g = !1, emptyMessage: _ = "No options found.", listClassName: v, name: y, value: b, defaultValue: x, onChange: S, id: C, required: w, disabled: ee, error: T, "aria-describedby": E, className: te, onKeyDown: D, onClick: O, ...ne }, k) {
236
+ let j = A({
237
+ id: C,
238
+ required: w,
239
+ disabled: ee,
240
+ error: T,
241
+ "aria-describedby": E
242
+ }), M = o(), N = `${M}-list`, P = `${M}-value`, F = (e) => `${M}-option-${e}`, L = c(null), R = c(null), z = c(null), B = c(null), V = c(null), [H, U] = l(!1), [W, se] = l(null), [G, K] = l(""), [q, J] = l(!1), [Y, X] = l(0), ce = b !== void 0, [le, ue] = l(() => oe(x)), Z = ce ? oe(b) : le, de = r((e) => {
243
+ R.current = e, typeof k == "function" ? k(e) : k && (k.current = e);
244
+ }, [k]), Q = s(() => {
245
+ if (d || !G) return e;
246
+ let t = G.toLowerCase();
247
+ return e.filter((e) => e.label.toLowerCase().includes(t));
248
+ }, [
249
+ e,
250
+ G,
251
+ d
252
+ ]), fe = (e) => {
253
+ ce || ue(e), S?.(i ? e : e[0] ?? "");
254
+ }, pe = (e) => {
255
+ let t = e.findIndex((e) => !e.disabled);
256
+ return t === -1 ? 0 : t;
257
+ }, $ = r(() => {
258
+ let e = L.current;
259
+ if (!e) return;
260
+ let t = e.getBoundingClientRect(), n = window.innerHeight - t.bottom, r = n < ie && t.top > n ? "top" : "bottom", i = {
261
+ left: t.left,
262
+ width: t.width
263
+ };
264
+ r === "bottom" ? i.top = t.bottom + re : i.bottom = window.innerHeight - t.top + re, se({
265
+ style: i,
266
+ placement: r
267
+ });
268
+ }, []), me = () => {
269
+ if (j.disabled) return;
270
+ $(), K(""), J(!1);
271
+ let t = e.findIndex((e) => Z.includes(e.value));
272
+ X(t === -1 ? pe(e) : t), U(!0);
273
+ }, he = (e = !0) => {
274
+ U(!1), e && R.current?.focus({ preventScroll: !0 });
275
+ }, ge = (e) => {
276
+ e.disabled || (i ? fe(Z.includes(e.value) ? Z.filter((t) => t !== e.value) : [...Z, e.value]) : (fe([e.value]), he()), K(""), J(!1));
277
+ }, _e = (e) => {
278
+ if (!Q.length) return;
279
+ let t = Y;
280
+ for (let n = 0; n < Q.length && (t = (t + e + Q.length) % Q.length, Q[t]?.disabled); n++);
281
+ X(t);
282
+ };
283
+ a(() => {
284
+ H && B.current?.focus({ preventScroll: !0 });
285
+ }, [H]), a(() => {
286
+ q && V.current?.focus({ preventScroll: !0 });
287
+ }, [q]);
288
+ let ve = c(d);
289
+ a(() => {
290
+ ve.current = d;
291
+ }, [d]), a(() => {
292
+ if (!H || !ve.current) return;
293
+ let e = setTimeout(() => ve.current?.(G), ae);
294
+ return () => clearTimeout(e);
295
+ }, [G, H]), a(() => {
296
+ if (!H) return;
297
+ let e = () => requestAnimationFrame($);
298
+ return window.addEventListener("scroll", e, !0), window.addEventListener("resize", e), () => {
299
+ window.removeEventListener("scroll", e, !0), window.removeEventListener("resize", e);
300
+ };
301
+ }, [H, $]), a(() => {
302
+ if (!H) return;
303
+ let e = (e) => {
304
+ let t = e.target;
305
+ !L.current?.contains(t) && !z.current?.contains(t) && U(!1);
306
+ };
307
+ return document.addEventListener("mousedown", e, !0), () => document.removeEventListener("mousedown", e, !0);
308
+ }, [H]), a(() => {
309
+ if (!H) return;
310
+ let e = B.current, t = e?.children[Y];
311
+ e && t && (t.offsetTop < e.scrollTop ? e.scrollTop = t.offsetTop : t.offsetTop + t.offsetHeight > e.scrollTop + e.clientHeight && (e.scrollTop = t.offsetTop + t.offsetHeight - e.clientHeight));
312
+ }, [Y, H]);
313
+ let ye = (e) => {
314
+ D?.(e), !e.defaultPrevented && !H && (e.key === "ArrowDown" || e.key === "ArrowUp") && (e.preventDefault(), me());
315
+ }, be = (e) => {
316
+ switch (e.key) {
317
+ case "Escape":
318
+ e.preventDefault(), e.stopPropagation(), he();
319
+ return;
320
+ case "ArrowDown":
321
+ e.preventDefault(), _e(1);
322
+ return;
323
+ case "ArrowUp":
324
+ e.preventDefault(), _e(-1);
325
+ return;
326
+ case "Home":
327
+ if (q) return;
328
+ e.preventDefault(), X(pe(Q));
329
+ return;
330
+ case "End":
331
+ if (q) return;
332
+ e.preventDefault(), X(Math.max(Q.length - 1, 0));
333
+ return;
334
+ case "Enter":
335
+ e.preventDefault(), e.stopPropagation(), Q[Y] && ge(Q[Y]);
336
+ return;
337
+ case "Tab":
338
+ U(!1), R.current?.focus({ preventScroll: !0 });
339
+ return;
340
+ case " ":
341
+ if (q) return;
342
+ e.preventDefault(), Q[Y] && ge(Q[Y]);
343
+ return;
344
+ }
345
+ let t = e.key.length === 1 && !e.ctrlKey && !e.metaKey && !e.altKey;
346
+ !q && t && (e.preventDefault(), K(e.key), X(0), J(!0));
347
+ }, xe = e.filter((e) => Z.includes(e.value)), Se = Z.length > 0, Ce = Z.length > 1 ? `${Z.length} selected` : xe[0]?.label ?? t, we = u && Se && !j.disabled, Te = H ? L.current?.closest("[data-theme]")?.getAttribute("data-theme") : void 0, Ee = H && Q[Y] ? F(Y) : void 0, De = j.labelId ? `${j.labelId} ${P}` : void 0;
348
+ return /* @__PURE__ */ p("div", {
349
+ ref: L,
350
+ className: h(I.control, I[n], j.invalid && I.invalid, j.disabled && I.disabled, H && I.open, te),
351
+ children: [
352
+ /* @__PURE__ */ f("button", {
353
+ ...ne,
354
+ ref: de,
355
+ id: j.id,
356
+ type: "button",
357
+ role: "combobox",
358
+ "aria-haspopup": "listbox",
359
+ "aria-expanded": H,
360
+ "aria-controls": H ? N : void 0,
361
+ "aria-labelledby": De,
362
+ "aria-invalid": j["aria-invalid"],
363
+ "aria-describedby": j["aria-describedby"],
364
+ "aria-required": j.required || void 0,
365
+ disabled: j.disabled,
366
+ className: h(I.trigger, !xe.length && I.placeholder),
367
+ onClick: (e) => {
368
+ O?.(e), !e.defaultPrevented && (H ? he(!1) : me());
369
+ },
370
+ onKeyDown: ye,
371
+ children: /* @__PURE__ */ f("span", {
372
+ id: P,
373
+ className: I.value,
374
+ children: Ce
375
+ })
376
+ }),
377
+ we ? /* @__PURE__ */ f("button", {
378
+ type: "button",
379
+ className: I.clear,
380
+ "aria-label": "Clear selection",
381
+ onClick: () => {
382
+ fe([]), R.current?.focus({ preventScroll: !0 });
383
+ },
384
+ children: /* @__PURE__ */ f("svg", {
385
+ viewBox: "0 0 20 20",
386
+ "aria-hidden": "true",
387
+ focusable: "false",
388
+ children: /* @__PURE__ */ f("path", {
389
+ d: "M6 6l8 8M14 6l-8 8",
390
+ fill: "none",
391
+ stroke: "currentColor",
392
+ strokeWidth: "2",
393
+ strokeLinecap: "round"
394
+ })
395
+ })
396
+ }) : null,
397
+ /* @__PURE__ */ f("svg", {
398
+ className: I.chevron,
399
+ viewBox: "0 0 20 20",
400
+ "aria-hidden": "true",
401
+ focusable: "false",
402
+ children: /* @__PURE__ */ f("path", {
403
+ d: "M5 7.5l5 5 5-5",
404
+ fill: "none",
405
+ stroke: "currentColor",
406
+ strokeWidth: "2",
407
+ strokeLinecap: "round",
408
+ strokeLinejoin: "round"
409
+ })
410
+ }),
411
+ y ? Z.length > 0 ? Z.map((e) => /* @__PURE__ */ f("input", {
412
+ type: "hidden",
413
+ name: y,
414
+ value: e
415
+ }, e)) : !i && /* @__PURE__ */ f("input", {
416
+ type: "hidden",
417
+ name: y,
418
+ value: ""
419
+ }) : null,
420
+ H && W ? m(/* @__PURE__ */ p("div", {
421
+ ref: z,
422
+ className: h(I.popover, I[W.placement]),
423
+ style: W.style,
424
+ "data-theme": Te ?? void 0,
425
+ onKeyDown: be,
426
+ children: [q ? /* @__PURE__ */ f("div", {
427
+ className: I.searchWrap,
428
+ children: /* @__PURE__ */ f("input", {
429
+ ref: V,
430
+ type: "text",
431
+ className: I.search,
432
+ placeholder: "Search options...",
433
+ "aria-label": "Search options",
434
+ "aria-controls": N,
435
+ "aria-activedescendant": Ee,
436
+ autoComplete: "off",
437
+ value: G,
438
+ onChange: (e) => {
439
+ let t = e.target.value;
440
+ K(t), X(0), t === "" && (J(!1), B.current?.focus({ preventScroll: !0 }));
441
+ }
442
+ })
443
+ }) : null, /* @__PURE__ */ f("ul", {
444
+ ref: B,
445
+ id: N,
446
+ role: "listbox",
447
+ tabIndex: -1,
448
+ "aria-labelledby": De,
449
+ "aria-multiselectable": i || void 0,
450
+ "aria-activedescendant": q ? void 0 : Ee,
451
+ className: h(I.list, v),
452
+ children: Q.length > 0 ? Q.map((e, t) => {
453
+ let n = Z.includes(e.value);
454
+ return /* @__PURE__ */ p("li", {
455
+ id: F(t),
456
+ role: "option",
457
+ "aria-selected": n,
458
+ "aria-disabled": e.disabled || void 0,
459
+ className: h(I.option, n && I.selected, t === Y && I.highlighted, e.disabled && I.optionDisabled),
460
+ onMouseEnter: () => !e.disabled && X(t),
461
+ onClick: () => ge(e),
462
+ children: [/* @__PURE__ */ f("span", {
463
+ className: I.optionLabel,
464
+ children: e.label
465
+ }), n ? /* @__PURE__ */ f("svg", {
466
+ className: I.check,
467
+ viewBox: "0 0 20 20",
468
+ "aria-hidden": "true",
469
+ focusable: "false",
470
+ children: /* @__PURE__ */ f("path", {
471
+ d: "M4.5 10.5l3.5 3.5 7.5-8",
472
+ fill: "none",
473
+ stroke: "currentColor",
474
+ strokeWidth: "2",
475
+ strokeLinecap: "round",
476
+ strokeLinejoin: "round"
477
+ })
478
+ }) : null]
479
+ }, e.value);
480
+ }) : /* @__PURE__ */ f("li", {
481
+ className: I.empty,
482
+ role: "presentation",
483
+ children: g ? /* @__PURE__ */ f("span", {
484
+ className: I.spinner,
485
+ role: "status",
486
+ "aria-label": "Loading"
487
+ }) : _
488
+ })
489
+ })]
490
+ }), document.body) : null
491
+ ]
492
+ });
493
+ }), R = n(function({ label: e, helperText: t, ...n }, r) {
494
+ if (!E()) return /* @__PURE__ */ f(D, {});
495
+ let i = n;
496
+ return !e && !t && !n.error ? /* @__PURE__ */ f(L, {
497
+ ...i,
498
+ ref: r
499
+ }) : /* @__PURE__ */ f(M, {
500
+ id: n.id,
501
+ label: e,
502
+ helperText: t,
503
+ error: n.error,
504
+ required: n.required,
505
+ disabled: n.disabled,
506
+ children: /* @__PURE__ */ f(L, {
507
+ ...i,
508
+ ref: r
509
+ })
510
+ });
511
+ }), z = {
512
+ root: "cui-FormSection-module__root--M70AE",
513
+ header: "cui-FormSection-module__header--xTDAF",
514
+ heading: "cui-FormSection-module__heading--QU0-u",
515
+ title: "cui-FormSection-module__title--cw5qX",
516
+ subtitle: "cui-FormSection-module__subtitle--cIB53",
517
+ divider: "cui-FormSection-module__divider--954nY",
518
+ fields: "cui-FormSection-module__fields--ALVzc",
519
+ columns2: "cui-FormSection-module__columns2--IgG6n",
520
+ columns3: "cui-FormSection-module__columns3--q-4XF"
521
+ };
522
+ //#endregion
523
+ //#region src/components/FormSection/FormSection.tsx
524
+ function B({ title: e, subtitle: n, children: r, columns: i = 1, headingLevel: a = 3, className: s, ...c }) {
525
+ let l = o(), u = !!(e || n);
526
+ return E() ? /* @__PURE__ */ p("section", {
527
+ ...c,
528
+ "aria-labelledby": e ? l : c["aria-labelledby"],
529
+ className: h(z.root, s),
530
+ children: [u ? /* @__PURE__ */ p("div", {
531
+ className: z.header,
532
+ children: [/* @__PURE__ */ p("div", {
533
+ className: z.heading,
534
+ children: [e ? t(`h${a}`, {
535
+ id: l,
536
+ className: z.title
537
+ }, e) : null, n ? /* @__PURE__ */ f("p", {
538
+ className: z.subtitle,
539
+ children: n
540
+ }) : null]
541
+ }), /* @__PURE__ */ f("span", {
542
+ className: z.divider,
543
+ "aria-hidden": "true"
544
+ })]
545
+ }) : null, /* @__PURE__ */ f("div", {
546
+ className: h(z.fields, z[`columns${i}`]),
547
+ children: r
548
+ })]
549
+ }) : /* @__PURE__ */ f(D, {});
550
+ }
551
+ var V = {
552
+ root: "cui-Avatar-module__root--fXu-J",
553
+ xs: "cui-Avatar-module__xs--oSaLL",
554
+ sm: "cui-Avatar-module__sm--sZ2bk",
555
+ md: "cui-Avatar-module__md--Fdkbz",
556
+ lg: "cui-Avatar-module__lg--pTTUA",
557
+ xl: "cui-Avatar-module__xl--mW58F",
558
+ image: "cui-Avatar-module__image--ieqGp",
559
+ fallback: "cui-Avatar-module__fallback--BWBXY",
560
+ tone0: "cui-Avatar-module__tone0--NoD23",
561
+ tone1: "cui-Avatar-module__tone1--xFqRb",
562
+ tone2: "cui-Avatar-module__tone2--nxsRe",
563
+ tone3: "cui-Avatar-module__tone3--goa6z",
564
+ tone4: "cui-Avatar-module__tone4--g6kRy",
565
+ primary: "cui-Avatar-module__primary--HKPgn"
566
+ }, H = [
567
+ V.tone0,
568
+ V.tone1,
569
+ V.tone2,
570
+ V.tone3,
571
+ V.tone4
572
+ ];
573
+ function U(e) {
574
+ let t = (e ?? "").trim().split(/\s+/).filter(Boolean);
575
+ return t.length === 0 ? "" : ((t[0]?.[0] ?? "") + (t.length > 1 ? t[t.length - 1]?.[0] ?? "" : "")).toUpperCase();
576
+ }
577
+ function W(e) {
578
+ let t = e ?? "", n = 0;
579
+ for (let e = 0; e < t.length; e++) n = n * 31 + t.charCodeAt(e) >>> 0;
580
+ return H[n % H.length];
581
+ }
582
+ function se({ name: e, src: t, size: n = "md", tone: r = "auto", className: i, ...a }) {
583
+ let [o, s] = l(null), c = !!t && t !== o, u = U(e);
584
+ return E() ? /* @__PURE__ */ f("span", {
585
+ role: a["aria-hidden"] ? void 0 : "img",
586
+ "aria-label": a["aria-hidden"] || !e ? void 0 : e,
587
+ ...a,
588
+ className: h(V.root, V[n], !c && (r === "primary" ? V.primary : W(e)), i),
589
+ children: c ? /* @__PURE__ */ f("img", {
590
+ className: V.image,
591
+ src: t ?? void 0,
592
+ alt: "",
593
+ onError: () => s(t ?? null)
594
+ }) : u ? /* @__PURE__ */ f("span", {
595
+ "aria-hidden": "true",
596
+ children: u
597
+ }) : /* @__PURE__ */ p("svg", {
598
+ className: V.fallback,
599
+ viewBox: "0 0 24 24",
600
+ "aria-hidden": "true",
601
+ focusable: "false",
602
+ children: [/* @__PURE__ */ f("circle", {
603
+ cx: "12",
604
+ cy: "8",
605
+ r: "4",
606
+ fill: "currentColor"
607
+ }), /* @__PURE__ */ f("path", {
608
+ d: "M4 21c0-4.4 3.6-7 8-7s8 2.6 8 7z",
609
+ fill: "currentColor"
610
+ })]
611
+ })
612
+ }) : /* @__PURE__ */ f(D, {});
613
+ }
614
+ var G = {
615
+ root: "cui-AccountPanel-module__root--Twbp0",
616
+ rootSidebar: "cui-AccountPanel-module__rootSidebar--OMB7L",
617
+ contents: "cui-AccountPanel-module__contents--OFL-r",
618
+ triggerHeader: "cui-AccountPanel-module__triggerHeader--ib8Bi",
619
+ triggerOpen: "cui-AccountPanel-module__triggerOpen--NbT3m",
620
+ triggerSidebar: "cui-AccountPanel-module__triggerSidebar--FeaXc",
621
+ collapsed: "cui-AccountPanel-module__collapsed--c8z-m",
622
+ identityText: "cui-AccountPanel-module__identityText--eziAT",
623
+ triggerName: "cui-AccountPanel-module__triggerName--f56mY",
624
+ triggerRole: "cui-AccountPanel-module__triggerRole--KpeeO",
625
+ panel: "cui-AccountPanel-module__panel--PinlA",
626
+ "cui-account-in": "cui-AccountPanel-module__cui-account-in--QVNEb",
627
+ panelSidebar: "cui-AccountPanel-module__panelSidebar--EuGZh",
628
+ identity: "cui-AccountPanel-module__identity--lZRA7",
629
+ email: "cui-AccountPanel-module__email--Ze3OW",
630
+ avatarRing: "cui-AccountPanel-module__avatarRing--FQrz4",
631
+ avatarInner: "cui-AccountPanel-module__avatarInner--5ZfEz",
632
+ greeting: "cui-AccountPanel-module__greeting--am-j3",
633
+ role: "cui-AccountPanel-module__role--E9lrf",
634
+ pills: "cui-AccountPanel-module__pills--5gSce",
635
+ pill: "cui-AccountPanel-module__pill--vK7aC",
636
+ actionIcon: "cui-AccountPanel-module__actionIcon--oReIE",
637
+ externalIcon: "cui-AccountPanel-module__externalIcon--dJc16",
638
+ details: "cui-AccountPanel-module__details--MGxxd",
639
+ detailRow: "cui-AccountPanel-module__detailRow--VzvVD",
640
+ apps: "cui-AccountPanel-module__apps--KRMBA",
641
+ appsTitle: "cui-AccountPanel-module__appsTitle--mcvnH",
642
+ grid: "cui-AccountPanel-module__grid--KYmem",
643
+ app: "cui-AccountPanel-module__app--Dj--X",
644
+ tile: "cui-AccountPanel-module__tile--YKNda",
645
+ tonePrimary: "cui-AccountPanel-module__tonePrimary--lAexZ",
646
+ toneInfo: "cui-AccountPanel-module__toneInfo--yb-xj",
647
+ toneSuccess: "cui-AccountPanel-module__toneSuccess--XIJic",
648
+ toneWarning: "cui-AccountPanel-module__toneWarning--oz2d6",
649
+ toneDanger: "cui-AccountPanel-module__toneDanger--MP2rJ",
650
+ toneNeutral: "cui-AccountPanel-module__toneNeutral--diEHz",
651
+ appName: "cui-AccountPanel-module__appName--MJc25",
652
+ danger: "cui-AccountPanel-module__danger--t0t-L",
653
+ dangerAction: "cui-AccountPanel-module__dangerAction--jvJ7-"
654
+ }, K = 8, q = 12, J = 352, Y = "a[href], button:not([disabled])", X = ({ href: e, className: t, title: n, onClick: r, children: i }) => /* @__PURE__ */ f("a", {
655
+ href: e,
656
+ className: t,
657
+ title: n,
658
+ onClick: r,
659
+ children: i
660
+ }), ce = {
661
+ primary: G.tonePrimary,
662
+ info: G.toneInfo,
663
+ success: G.toneSuccess,
664
+ warning: G.toneWarning,
665
+ danger: G.toneDanger,
666
+ neutral: G.toneNeutral
667
+ };
668
+ function le() {
669
+ return /* @__PURE__ */ f("svg", {
670
+ className: G.externalIcon,
671
+ viewBox: "0 0 20 20",
672
+ "aria-hidden": "true",
673
+ focusable: "false",
674
+ children: /* @__PURE__ */ f("path", {
675
+ d: "M8 5H5v10h10v-3M11 5h4v4M15 5l-7 7",
676
+ fill: "none",
677
+ stroke: "currentColor",
678
+ strokeWidth: "1.8",
679
+ strokeLinecap: "round",
680
+ strokeLinejoin: "round"
681
+ })
682
+ });
683
+ }
684
+ function ue({ user: e, apps: t = [], actions: n = [], placement: r = "header", collapsed: i = !1, appsTitle: s = "All Apps", greeting: u = "Hi", renderLink: g = X, className: _ }) {
685
+ let v = r === "sidebar", y = o(), b = c(null), x = c(null), S = c(null), [C, w] = l(!1), [ee, T] = l(null), [te, O] = l(), ne = () => {
686
+ let e = x.current;
687
+ if (!e) return;
688
+ let t = e.getBoundingClientRect();
689
+ if (v) {
690
+ let e = Math.min(J, window.innerWidth - 24);
691
+ T({
692
+ left: Math.max(q, Math.min(t.right + K, window.innerWidth - e - q)),
693
+ bottom: Math.max(q, window.innerHeight - t.bottom)
694
+ });
695
+ } else T({
696
+ top: t.bottom + K,
697
+ right: Math.max(q, window.innerWidth - t.right)
698
+ });
699
+ }, k = () => {
700
+ ne(), O(b.current?.closest("[data-theme]")?.getAttribute("data-theme") ?? void 0), w(!0);
701
+ }, A = () => w(!1);
702
+ a(() => {
703
+ C && S.current?.focus({ preventScroll: !0 });
704
+ }, [C]), a(() => {
705
+ if (!C) return;
706
+ let e = () => requestAnimationFrame(ne), t = (e) => {
707
+ let t = e.target;
708
+ !b.current?.contains(t) && !S.current?.contains(t) && A();
709
+ };
710
+ return window.addEventListener("scroll", e, !0), window.addEventListener("resize", e), document.addEventListener("mousedown", t, !0), () => {
711
+ window.removeEventListener("scroll", e, !0), window.removeEventListener("resize", e), document.removeEventListener("mousedown", t, !0);
712
+ };
713
+ }, [C, v]);
714
+ let j = (e) => {
715
+ if (e.key === "Escape") {
716
+ e.preventDefault(), e.stopPropagation(), A(), x.current?.focus({ preventScroll: !0 });
717
+ return;
718
+ }
719
+ if (e.key !== "Tab") return;
720
+ let t = Array.from(S.current?.querySelectorAll(Y) ?? []), n = t[0], r = t[t.length - 1];
721
+ n && r && (e.shiftKey && (document.activeElement === n || document.activeElement === S.current) ? (e.preventDefault(), r.focus()) : !e.shiftKey && document.activeElement === r && (e.preventDefault(), n.focus()));
722
+ };
723
+ if (!E()) return /* @__PURE__ */ f(D, {});
724
+ let M = e.name.trim().split(/\s+/)[0] ?? e.name, N = n.filter((e) => e.tone !== "danger"), P = n.filter((e) => e.tone === "danger"), F = (e) => {
725
+ e.onClick?.(), A();
726
+ }, I = /* @__PURE__ */ p("div", {
727
+ ref: S,
728
+ id: y,
729
+ role: "dialog",
730
+ "aria-label": "Account",
731
+ tabIndex: -1,
732
+ className: h(G.panel, v && G.panelSidebar),
733
+ style: ee ?? void 0,
734
+ "data-theme": te,
735
+ onKeyDown: j,
736
+ children: [
737
+ /* @__PURE__ */ p("div", {
738
+ className: G.identity,
739
+ children: [
740
+ e.email ? /* @__PURE__ */ f("p", {
741
+ className: G.email,
742
+ children: e.email
743
+ }) : null,
744
+ /* @__PURE__ */ f("span", {
745
+ className: G.avatarRing,
746
+ children: /* @__PURE__ */ f("span", {
747
+ className: G.avatarInner,
748
+ children: /* @__PURE__ */ f(se, {
749
+ name: e.name,
750
+ src: e.avatarUrl,
751
+ size: "xl",
752
+ tone: "primary",
753
+ "aria-hidden": "true"
754
+ })
755
+ })
756
+ }),
757
+ /* @__PURE__ */ p("p", {
758
+ className: G.greeting,
759
+ children: [
760
+ u,
761
+ ", ",
762
+ M,
763
+ "!"
764
+ ]
765
+ }),
766
+ e.role ? /* @__PURE__ */ f("span", {
767
+ className: G.role,
768
+ children: e.role
769
+ }) : null,
770
+ N.length > 0 ? /* @__PURE__ */ f("div", {
771
+ className: G.pills,
772
+ children: N.map((e) => {
773
+ let t = /* @__PURE__ */ p(d, { children: [
774
+ e.icon ? /* @__PURE__ */ f("span", {
775
+ className: G.actionIcon,
776
+ "aria-hidden": "true",
777
+ children: e.icon
778
+ }) : null,
779
+ /* @__PURE__ */ f("span", { children: e.label }),
780
+ e.external ? /* @__PURE__ */ f(le, {}) : null
781
+ ] });
782
+ return e.href && !e.disabled ? e.external ? /* @__PURE__ */ f("a", {
783
+ href: e.href,
784
+ target: "_blank",
785
+ rel: "noreferrer",
786
+ title: e.title,
787
+ className: G.pill,
788
+ onClick: () => A(),
789
+ children: t
790
+ }, e.id) : /* @__PURE__ */ f("span", {
791
+ className: G.contents,
792
+ children: g({
793
+ href: e.href,
794
+ className: G.pill ?? "",
795
+ title: e.title,
796
+ onClick: () => A(),
797
+ children: t
798
+ })
799
+ }, e.id) : /* @__PURE__ */ f("button", {
800
+ type: "button",
801
+ disabled: e.disabled,
802
+ title: e.title,
803
+ className: G.pill,
804
+ onClick: () => F(e),
805
+ children: t
806
+ }, e.id);
807
+ })
808
+ }) : null
809
+ ]
810
+ }),
811
+ e.details?.length ? /* @__PURE__ */ f("dl", {
812
+ className: G.details,
813
+ children: e.details.map((e) => /* @__PURE__ */ p("div", {
814
+ className: G.detailRow,
815
+ children: [/* @__PURE__ */ f("dt", { children: e.label }), /* @__PURE__ */ f("dd", { children: e.value })]
816
+ }, e.label))
817
+ }) : null,
818
+ t.length > 0 ? /* @__PURE__ */ p("section", {
819
+ className: G.apps,
820
+ "aria-label": s,
821
+ children: [/* @__PURE__ */ f("p", {
822
+ className: G.appsTitle,
823
+ children: s
824
+ }), /* @__PURE__ */ f("div", {
825
+ className: G.grid,
826
+ children: t.map((e) => {
827
+ let t = /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("span", {
828
+ className: h(G.tile, ce[e.tone ?? "primary"]),
829
+ "aria-hidden": "true",
830
+ children: e.icon
831
+ }), /* @__PURE__ */ f("span", {
832
+ className: G.appName,
833
+ children: e.name
834
+ })] });
835
+ return e.current ? /* @__PURE__ */ f("span", {
836
+ className: G.contents,
837
+ children: g({
838
+ href: e.url,
839
+ className: G.app ?? "",
840
+ title: e.description,
841
+ onClick: () => A(),
842
+ children: t
843
+ })
844
+ }, e.id) : /* @__PURE__ */ f("a", {
845
+ href: e.url,
846
+ target: "_blank",
847
+ rel: "noreferrer",
848
+ title: e.description,
849
+ className: G.app,
850
+ children: t
851
+ }, e.id);
852
+ })
853
+ })]
854
+ }) : null,
855
+ P.length > 0 ? /* @__PURE__ */ f("div", {
856
+ className: G.danger,
857
+ children: P.map((e) => /* @__PURE__ */ p("button", {
858
+ type: "button",
859
+ disabled: e.disabled,
860
+ title: e.title,
861
+ className: G.dangerAction,
862
+ onClick: () => F(e),
863
+ children: [e.icon ? /* @__PURE__ */ f("span", {
864
+ className: G.actionIcon,
865
+ "aria-hidden": "true",
866
+ children: e.icon
867
+ }) : null, e.label]
868
+ }, e.id))
869
+ }) : null
870
+ ]
871
+ });
872
+ return /* @__PURE__ */ p("div", {
873
+ ref: b,
874
+ className: h(G.root, v && G.rootSidebar, _),
875
+ children: [/* @__PURE__ */ p("button", {
876
+ ref: x,
877
+ type: "button",
878
+ "aria-label": `Account: ${e.name}`,
879
+ "aria-haspopup": "dialog",
880
+ "aria-expanded": C,
881
+ "aria-controls": C ? y : void 0,
882
+ className: h(v ? G.triggerSidebar : G.triggerHeader, v && i && G.collapsed, C && G.triggerOpen),
883
+ onClick: () => C ? A() : k(),
884
+ children: [/* @__PURE__ */ f(se, {
885
+ name: e.name,
886
+ src: e.avatarUrl,
887
+ size: "sm",
888
+ tone: "primary",
889
+ "aria-hidden": "true"
890
+ }), v && !i ? /* @__PURE__ */ p("span", {
891
+ className: G.identityText,
892
+ children: [/* @__PURE__ */ f("span", {
893
+ className: G.triggerName,
894
+ children: e.name
895
+ }), e.role ? /* @__PURE__ */ f("span", {
896
+ className: G.triggerRole,
897
+ children: e.role
898
+ }) : null]
899
+ }) : null]
900
+ }), C && ee ? m(I, document.body) : null]
901
+ });
902
+ }
903
+ var Z = {
904
+ root: "cui-Typography-module__root--PebSf",
905
+ h1: "cui-Typography-module__h1--pJqnF",
906
+ h2: "cui-Typography-module__h2--8YqGv",
907
+ h3: "cui-Typography-module__h3--DT-DL",
908
+ h4: "cui-Typography-module__h4--UsocF",
909
+ body: "cui-Typography-module__body--s-YlR",
910
+ bodySm: "cui-Typography-module__bodySm--RPpZ5",
911
+ caption: "cui-Typography-module__caption--K-n4O",
912
+ label: "cui-Typography-module__label---CGg4",
913
+ "color-default": "cui-Typography-module__color-default--U4Xg0",
914
+ "color-secondary": "cui-Typography-module__color-secondary--5wnuV",
915
+ "color-muted": "cui-Typography-module__color-muted--GLLRl",
916
+ "color-disabled": "cui-Typography-module__color-disabled--bBBVc",
917
+ "color-primary": "cui-Typography-module__color-primary--B-bVH",
918
+ "color-success": "cui-Typography-module__color-success--hXHcS",
919
+ "color-warning": "cui-Typography-module__color-warning---oLwA",
920
+ "color-danger": "cui-Typography-module__color-danger--sStkk",
921
+ "color-info": "cui-Typography-module__color-info--4uSt5",
922
+ "weight-normal": "cui-Typography-module__weight-normal--fFcMp",
923
+ "weight-medium": "cui-Typography-module__weight-medium--5RtTe",
924
+ "weight-semibold": "cui-Typography-module__weight-semibold--TDOgV",
925
+ "weight-bold": "cui-Typography-module__weight-bold--YahG3",
926
+ "align-start": "cui-Typography-module__align-start--mX51I",
927
+ "align-center": "cui-Typography-module__align-center--2Ng2u",
928
+ "align-end": "cui-Typography-module__align-end--6LwA3",
929
+ truncate: "cui-Typography-module__truncate--3B0O4"
930
+ }, de = {
931
+ h1: "h1",
932
+ h2: "h2",
933
+ h3: "h3",
934
+ h4: "h4",
935
+ body: "p",
936
+ "body-sm": "p",
937
+ caption: "span",
938
+ label: "span"
939
+ }, Q = {
940
+ h1: Z.h1,
941
+ h2: Z.h2,
942
+ h3: Z.h3,
943
+ h4: Z.h4,
944
+ body: Z.body,
945
+ "body-sm": Z.bodySm,
946
+ caption: Z.caption,
947
+ label: Z.label
948
+ };
949
+ function fe({ variant: e = "body", as: n, color: r = "default", weight: i, align: a, truncate: o = !1, className: s, ...c }) {
950
+ return E() ? t(n ?? de[e], {
951
+ ...c,
952
+ className: h(Z.root, Q[e], Z[`color-${r}`], i && Z[`weight-${i}`], a && Z[`align-${a}`], o && Z.truncate, s)
953
+ }) : /* @__PURE__ */ f(D, {});
954
+ }
955
+ var pe = { root: "cui-ThemeProvider-module__root--2DEGi" }, $ = e(null);
956
+ function me({ children: e, theme: t, defaultTheme: n = "light", onThemeChange: a, licenseKey: o, className: c, ...u }) {
957
+ let [d, p] = l(n), m = t ?? d, g = r((e) => {
958
+ t === void 0 && p(e), a?.(e);
959
+ }, [t, a]), _ = s(() => ({
960
+ theme: m,
961
+ setTheme: g
962
+ }), [m, g]), v = i(S);
963
+ return /* @__PURE__ */ f($.Provider, {
964
+ value: _,
965
+ children: /* @__PURE__ */ f(S.Provider, {
966
+ value: o ?? v,
967
+ children: /* @__PURE__ */ f("div", {
968
+ ...u,
969
+ "data-theme": m,
970
+ className: h(pe.root, c),
971
+ children: e
972
+ })
973
+ })
974
+ });
975
+ }
976
+ function he() {
977
+ let e = i($);
978
+ if (!e) throw Error("useTheme must be used within a <ThemeProvider>.");
979
+ return e;
980
+ }
981
+ //#endregion
982
+ export { ue as AccountPanel, se as Avatar, ne as Button, M as FormField, B as FormSection, F as Input, R as Select, me as ThemeProvider, fe as Typography, h as cn, U as getInitials, C as setLicenseKey, A as useFormFieldControl, he as useTheme };
983
+
984
+ //# sourceMappingURL=index.js.map