@eschoolbase/client-ui 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -0
- package/dist/components/Badge/Badge.d.ts +3 -0
- package/dist/components/Badge/Badge.types.d.ts +8 -0
- package/dist/components/Badge/index.d.ts +2 -0
- package/dist/components/Checkbox/Checkbox.d.ts +3 -0
- package/dist/components/Checkbox/Checkbox.types.d.ts +10 -0
- package/dist/components/Checkbox/index.d.ts +2 -0
- package/dist/components/Skeleton/Skeleton.d.ts +3 -0
- package/dist/components/Skeleton/Skeleton.types.d.ts +10 -0
- package/dist/components/Skeleton/index.d.ts +2 -0
- package/dist/components/Switch/Switch.d.ts +3 -0
- package/dist/components/Switch/Switch.types.d.ts +8 -0
- package/dist/components/Switch/index.d.ts +2 -0
- package/dist/components/Tabs/Tabs.d.ts +6 -0
- package/dist/components/Tabs/Tabs.types.d.ts +20 -0
- package/dist/components/Tabs/index.d.ts +2 -0
- package/dist/components/Textarea/Textarea.d.ts +3 -0
- package/dist/components/Textarea/Textarea.types.d.ts +12 -0
- package/dist/components/Textarea/index.d.ts +2 -0
- package/dist/components/ThemeToggle/ThemeToggle.d.ts +6 -0
- package/dist/components/ThemeToggle/ThemeToggle.types.d.ts +13 -0
- package/dist/components/ThemeToggle/index.d.ts +2 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +14 -0
- package/dist/index.js +650 -229
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/theme/ThemeProvider.d.ts +1 -1
- package/dist/theme/ThemeProvider.types.d.ts +13 -2
- package/dist/theme/themeStore.d.ts +5 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -26,11 +26,11 @@ function C(e) {
|
|
|
26
26
|
function w(e) {
|
|
27
27
|
return !e || !e.trim() ? !1 : v.includes(_(e));
|
|
28
28
|
}
|
|
29
|
-
var
|
|
29
|
+
var T = (e) => (b.add(e), () => {
|
|
30
30
|
b.delete(e);
|
|
31
|
-
}),
|
|
31
|
+
}), ee = () => y;
|
|
32
32
|
function E() {
|
|
33
|
-
let e = i(S), t = u(
|
|
33
|
+
let e = i(S), t = u(T, ee, ee), n = w(e ?? t);
|
|
34
34
|
return a(() => {
|
|
35
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
36
|
}, [n]), n;
|
|
@@ -187,7 +187,7 @@ var N = {
|
|
|
187
187
|
}) : null
|
|
188
188
|
]
|
|
189
189
|
});
|
|
190
|
-
}),
|
|
190
|
+
}), re = n(function({ label: e, helperText: t, ...n }, r) {
|
|
191
191
|
return E() ? !e && !t && !n.error ? /* @__PURE__ */ f(P, {
|
|
192
192
|
...n,
|
|
193
193
|
ref: r
|
|
@@ -203,7 +203,7 @@ var N = {
|
|
|
203
203
|
ref: r
|
|
204
204
|
})
|
|
205
205
|
}) : /* @__PURE__ */ f(D, {});
|
|
206
|
-
}),
|
|
206
|
+
}), F = {
|
|
207
207
|
control: "cui-Select-module__control--OqOfI",
|
|
208
208
|
trigger: "cui-Select-module__trigger--ECKfC",
|
|
209
209
|
open: "cui-Select-module__open--PADOK",
|
|
@@ -232,154 +232,154 @@ var N = {
|
|
|
232
232
|
empty: "cui-Select-module__empty--KmYrm",
|
|
233
233
|
spinner: "cui-Select-module__spinner--OxCAP",
|
|
234
234
|
"cui-select-spin": "cui-Select-module__cui-select-spin--MQqaM"
|
|
235
|
-
},
|
|
235
|
+
}, ie = 4, ae = 280, oe = 500, se = (e) => Array.isArray(e) ? e : e ? [e] : [], I = 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: T, error: ee, "aria-describedby": E, className: te, onKeyDown: D, onClick: O, ...ne }, k) {
|
|
236
236
|
let j = A({
|
|
237
237
|
id: C,
|
|
238
238
|
required: w,
|
|
239
|
-
disabled:
|
|
240
|
-
error:
|
|
239
|
+
disabled: T,
|
|
240
|
+
error: ee,
|
|
241
241
|
"aria-describedby": E
|
|
242
|
-
}), M = o(), N = `${M}-list`, P = `${M}-value`,
|
|
243
|
-
|
|
244
|
-
}, [k]),
|
|
245
|
-
if (d || !
|
|
246
|
-
let t =
|
|
242
|
+
}), M = o(), N = `${M}-list`, P = `${M}-value`, re = (e) => `${M}-option-${e}`, I = c(null), ce = c(null), L = c(null), R = c(null), le = c(null), [z, ue] = l(!1), [B, de] = l(null), [V, fe] = l(""), [H, pe] = l(!1), [U, W] = l(0), G = b !== void 0, [me, K] = l(() => se(x)), q = G ? se(b) : me, he = r((e) => {
|
|
243
|
+
ce.current = e, typeof k == "function" ? k(e) : k && (k.current = e);
|
|
244
|
+
}, [k]), J = s(() => {
|
|
245
|
+
if (d || !V) return e;
|
|
246
|
+
let t = V.toLowerCase();
|
|
247
247
|
return e.filter((e) => e.label.toLowerCase().includes(t));
|
|
248
248
|
}, [
|
|
249
249
|
e,
|
|
250
|
-
|
|
250
|
+
V,
|
|
251
251
|
d
|
|
252
|
-
]),
|
|
253
|
-
|
|
254
|
-
},
|
|
252
|
+
]), Y = (e) => {
|
|
253
|
+
G || K(e), S?.(i ? e : e[0] ?? "");
|
|
254
|
+
}, X = (e) => {
|
|
255
255
|
let t = e.findIndex((e) => !e.disabled);
|
|
256
256
|
return t === -1 ? 0 : t;
|
|
257
|
-
},
|
|
258
|
-
let e =
|
|
257
|
+
}, ge = r(() => {
|
|
258
|
+
let e = I.current;
|
|
259
259
|
if (!e) return;
|
|
260
|
-
let t = e.getBoundingClientRect(), n = window.innerHeight - t.bottom, r = n <
|
|
260
|
+
let t = e.getBoundingClientRect(), n = window.innerHeight - t.bottom, r = n < ae && t.top > n ? "top" : "bottom", i = {
|
|
261
261
|
left: t.left,
|
|
262
262
|
width: t.width
|
|
263
263
|
};
|
|
264
|
-
r === "bottom" ? i.top = t.bottom +
|
|
264
|
+
r === "bottom" ? i.top = t.bottom + ie : i.bottom = window.innerHeight - t.top + ie, de({
|
|
265
265
|
style: i,
|
|
266
266
|
placement: r
|
|
267
267
|
});
|
|
268
|
-
}, []),
|
|
268
|
+
}, []), Z = () => {
|
|
269
269
|
if (j.disabled) return;
|
|
270
|
-
|
|
271
|
-
let t = e.findIndex((e) =>
|
|
272
|
-
|
|
273
|
-
},
|
|
274
|
-
|
|
275
|
-
},
|
|
276
|
-
e.disabled || (i ?
|
|
277
|
-
},
|
|
278
|
-
if (!
|
|
279
|
-
let t =
|
|
280
|
-
for (let n = 0; n <
|
|
281
|
-
|
|
270
|
+
ge(), fe(""), pe(!1);
|
|
271
|
+
let t = e.findIndex((e) => q.includes(e.value));
|
|
272
|
+
W(t === -1 ? X(e) : t), ue(!0);
|
|
273
|
+
}, _e = (e = !0) => {
|
|
274
|
+
ue(!1), e && ce.current?.focus({ preventScroll: !0 });
|
|
275
|
+
}, ve = (e) => {
|
|
276
|
+
e.disabled || (i ? Y(q.includes(e.value) ? q.filter((t) => t !== e.value) : [...q, e.value]) : (Y([e.value]), _e()), fe(""), pe(!1));
|
|
277
|
+
}, ye = (e) => {
|
|
278
|
+
if (!J.length) return;
|
|
279
|
+
let t = U;
|
|
280
|
+
for (let n = 0; n < J.length && (t = (t + e + J.length) % J.length, J[t]?.disabled); n++);
|
|
281
|
+
W(t);
|
|
282
282
|
};
|
|
283
283
|
a(() => {
|
|
284
|
-
|
|
285
|
-
}, [
|
|
286
|
-
|
|
287
|
-
}, [
|
|
288
|
-
let
|
|
284
|
+
z && R.current?.focus({ preventScroll: !0 });
|
|
285
|
+
}, [z]), a(() => {
|
|
286
|
+
H && le.current?.focus({ preventScroll: !0 });
|
|
287
|
+
}, [H]);
|
|
288
|
+
let be = c(d);
|
|
289
289
|
a(() => {
|
|
290
|
-
|
|
290
|
+
be.current = d;
|
|
291
291
|
}, [d]), a(() => {
|
|
292
|
-
if (!
|
|
293
|
-
let e = setTimeout(() =>
|
|
292
|
+
if (!z || !be.current) return;
|
|
293
|
+
let e = setTimeout(() => be.current?.(V), oe);
|
|
294
294
|
return () => clearTimeout(e);
|
|
295
|
-
}, [
|
|
296
|
-
if (!
|
|
297
|
-
let e = () => requestAnimationFrame(
|
|
295
|
+
}, [V, z]), a(() => {
|
|
296
|
+
if (!z) return;
|
|
297
|
+
let e = () => requestAnimationFrame(ge);
|
|
298
298
|
return window.addEventListener("scroll", e, !0), window.addEventListener("resize", e), () => {
|
|
299
299
|
window.removeEventListener("scroll", e, !0), window.removeEventListener("resize", e);
|
|
300
300
|
};
|
|
301
|
-
}, [
|
|
302
|
-
if (!
|
|
301
|
+
}, [z, ge]), a(() => {
|
|
302
|
+
if (!z) return;
|
|
303
303
|
let e = (e) => {
|
|
304
304
|
let t = e.target;
|
|
305
|
-
!
|
|
305
|
+
!I.current?.contains(t) && !L.current?.contains(t) && ue(!1);
|
|
306
306
|
};
|
|
307
307
|
return document.addEventListener("mousedown", e, !0), () => document.removeEventListener("mousedown", e, !0);
|
|
308
|
-
}, [
|
|
309
|
-
if (!
|
|
310
|
-
let e =
|
|
308
|
+
}, [z]), a(() => {
|
|
309
|
+
if (!z) return;
|
|
310
|
+
let e = R.current, t = e?.children[U];
|
|
311
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
|
-
}, [
|
|
313
|
-
let
|
|
314
|
-
D?.(e), !e.defaultPrevented && !
|
|
315
|
-
},
|
|
312
|
+
}, [U, z]);
|
|
313
|
+
let xe = (e) => {
|
|
314
|
+
D?.(e), !e.defaultPrevented && !z && (e.key === "ArrowDown" || e.key === "ArrowUp") && (e.preventDefault(), Z());
|
|
315
|
+
}, Se = (e) => {
|
|
316
316
|
switch (e.key) {
|
|
317
317
|
case "Escape":
|
|
318
|
-
e.preventDefault(), e.stopPropagation(),
|
|
318
|
+
e.preventDefault(), e.stopPropagation(), _e();
|
|
319
319
|
return;
|
|
320
320
|
case "ArrowDown":
|
|
321
|
-
e.preventDefault(),
|
|
321
|
+
e.preventDefault(), ye(1);
|
|
322
322
|
return;
|
|
323
323
|
case "ArrowUp":
|
|
324
|
-
e.preventDefault(),
|
|
324
|
+
e.preventDefault(), ye(-1);
|
|
325
325
|
return;
|
|
326
326
|
case "Home":
|
|
327
|
-
if (
|
|
328
|
-
e.preventDefault(), X(
|
|
327
|
+
if (H) return;
|
|
328
|
+
e.preventDefault(), W(X(J));
|
|
329
329
|
return;
|
|
330
330
|
case "End":
|
|
331
|
-
if (
|
|
332
|
-
e.preventDefault(),
|
|
331
|
+
if (H) return;
|
|
332
|
+
e.preventDefault(), W(Math.max(J.length - 1, 0));
|
|
333
333
|
return;
|
|
334
334
|
case "Enter":
|
|
335
|
-
e.preventDefault(), e.stopPropagation(),
|
|
335
|
+
e.preventDefault(), e.stopPropagation(), J[U] && ve(J[U]);
|
|
336
336
|
return;
|
|
337
337
|
case "Tab":
|
|
338
|
-
|
|
338
|
+
ue(!1), ce.current?.focus({ preventScroll: !0 });
|
|
339
339
|
return;
|
|
340
340
|
case " ":
|
|
341
|
-
if (
|
|
342
|
-
e.preventDefault(),
|
|
341
|
+
if (H) return;
|
|
342
|
+
e.preventDefault(), J[U] && ve(J[U]);
|
|
343
343
|
return;
|
|
344
344
|
}
|
|
345
345
|
let t = e.key.length === 1 && !e.ctrlKey && !e.metaKey && !e.altKey;
|
|
346
|
-
!
|
|
347
|
-
},
|
|
346
|
+
!H && t && (e.preventDefault(), fe(e.key), W(0), pe(!0));
|
|
347
|
+
}, Q = e.filter((e) => q.includes(e.value)), Ce = q.length > 0, we = q.length > 1 ? `${q.length} selected` : Q[0]?.label ?? t, Te = u && Ce && !j.disabled, Ee = z ? I.current?.closest("[data-theme]")?.getAttribute("data-theme") : void 0, De = z && J[U] ? re(U) : void 0, $ = j.labelId ? `${j.labelId} ${P}` : void 0;
|
|
348
348
|
return /* @__PURE__ */ p("div", {
|
|
349
|
-
ref:
|
|
350
|
-
className: h(
|
|
349
|
+
ref: I,
|
|
350
|
+
className: h(F.control, F[n], j.invalid && F.invalid, j.disabled && F.disabled, z && F.open, te),
|
|
351
351
|
children: [
|
|
352
352
|
/* @__PURE__ */ f("button", {
|
|
353
353
|
...ne,
|
|
354
|
-
ref:
|
|
354
|
+
ref: he,
|
|
355
355
|
id: j.id,
|
|
356
356
|
type: "button",
|
|
357
357
|
role: "combobox",
|
|
358
358
|
"aria-haspopup": "listbox",
|
|
359
|
-
"aria-expanded":
|
|
360
|
-
"aria-controls":
|
|
361
|
-
"aria-labelledby":
|
|
359
|
+
"aria-expanded": z,
|
|
360
|
+
"aria-controls": z ? N : void 0,
|
|
361
|
+
"aria-labelledby": $,
|
|
362
362
|
"aria-invalid": j["aria-invalid"],
|
|
363
363
|
"aria-describedby": j["aria-describedby"],
|
|
364
364
|
"aria-required": j.required || void 0,
|
|
365
365
|
disabled: j.disabled,
|
|
366
|
-
className: h(
|
|
366
|
+
className: h(F.trigger, !Q.length && F.placeholder),
|
|
367
367
|
onClick: (e) => {
|
|
368
|
-
O?.(e), !e.defaultPrevented && (
|
|
368
|
+
O?.(e), !e.defaultPrevented && (z ? _e(!1) : Z());
|
|
369
369
|
},
|
|
370
|
-
onKeyDown:
|
|
370
|
+
onKeyDown: xe,
|
|
371
371
|
children: /* @__PURE__ */ f("span", {
|
|
372
372
|
id: P,
|
|
373
|
-
className:
|
|
374
|
-
children:
|
|
373
|
+
className: F.value,
|
|
374
|
+
children: we
|
|
375
375
|
})
|
|
376
376
|
}),
|
|
377
|
-
|
|
377
|
+
Te ? /* @__PURE__ */ f("button", {
|
|
378
378
|
type: "button",
|
|
379
|
-
className:
|
|
379
|
+
className: F.clear,
|
|
380
380
|
"aria-label": "Clear selection",
|
|
381
381
|
onClick: () => {
|
|
382
|
-
|
|
382
|
+
Y([]), ce.current?.focus({ preventScroll: !0 });
|
|
383
383
|
},
|
|
384
384
|
children: /* @__PURE__ */ f("svg", {
|
|
385
385
|
viewBox: "0 0 20 20",
|
|
@@ -395,7 +395,7 @@ var N = {
|
|
|
395
395
|
})
|
|
396
396
|
}) : null,
|
|
397
397
|
/* @__PURE__ */ f("svg", {
|
|
398
|
-
className:
|
|
398
|
+
className: F.chevron,
|
|
399
399
|
viewBox: "0 0 20 20",
|
|
400
400
|
"aria-hidden": "true",
|
|
401
401
|
focusable: "false",
|
|
@@ -408,7 +408,7 @@ var N = {
|
|
|
408
408
|
strokeLinejoin: "round"
|
|
409
409
|
})
|
|
410
410
|
}),
|
|
411
|
-
y ?
|
|
411
|
+
y ? q.length > 0 ? q.map((e) => /* @__PURE__ */ f("input", {
|
|
412
412
|
type: "hidden",
|
|
413
413
|
name: y,
|
|
414
414
|
value: e
|
|
@@ -417,53 +417,53 @@ var N = {
|
|
|
417
417
|
name: y,
|
|
418
418
|
value: ""
|
|
419
419
|
}) : null,
|
|
420
|
-
|
|
421
|
-
ref:
|
|
422
|
-
className: h(
|
|
423
|
-
style:
|
|
424
|
-
"data-theme":
|
|
425
|
-
onKeyDown:
|
|
426
|
-
children: [
|
|
427
|
-
className:
|
|
420
|
+
z && B ? m(/* @__PURE__ */ p("div", {
|
|
421
|
+
ref: L,
|
|
422
|
+
className: h(F.popover, F[B.placement]),
|
|
423
|
+
style: B.style,
|
|
424
|
+
"data-theme": Ee ?? void 0,
|
|
425
|
+
onKeyDown: Se,
|
|
426
|
+
children: [H ? /* @__PURE__ */ f("div", {
|
|
427
|
+
className: F.searchWrap,
|
|
428
428
|
children: /* @__PURE__ */ f("input", {
|
|
429
|
-
ref:
|
|
429
|
+
ref: le,
|
|
430
430
|
type: "text",
|
|
431
|
-
className:
|
|
431
|
+
className: F.search,
|
|
432
432
|
placeholder: "Search options...",
|
|
433
433
|
"aria-label": "Search options",
|
|
434
434
|
"aria-controls": N,
|
|
435
|
-
"aria-activedescendant":
|
|
435
|
+
"aria-activedescendant": De,
|
|
436
436
|
autoComplete: "off",
|
|
437
|
-
value:
|
|
437
|
+
value: V,
|
|
438
438
|
onChange: (e) => {
|
|
439
439
|
let t = e.target.value;
|
|
440
|
-
|
|
440
|
+
fe(t), W(0), t === "" && (pe(!1), R.current?.focus({ preventScroll: !0 }));
|
|
441
441
|
}
|
|
442
442
|
})
|
|
443
443
|
}) : null, /* @__PURE__ */ f("ul", {
|
|
444
|
-
ref:
|
|
444
|
+
ref: R,
|
|
445
445
|
id: N,
|
|
446
446
|
role: "listbox",
|
|
447
447
|
tabIndex: -1,
|
|
448
|
-
"aria-labelledby":
|
|
448
|
+
"aria-labelledby": $,
|
|
449
449
|
"aria-multiselectable": i || void 0,
|
|
450
|
-
"aria-activedescendant":
|
|
451
|
-
className: h(
|
|
452
|
-
children:
|
|
453
|
-
let n =
|
|
450
|
+
"aria-activedescendant": H ? void 0 : De,
|
|
451
|
+
className: h(F.list, v),
|
|
452
|
+
children: J.length > 0 ? J.map((e, t) => {
|
|
453
|
+
let n = q.includes(e.value);
|
|
454
454
|
return /* @__PURE__ */ p("li", {
|
|
455
|
-
id:
|
|
455
|
+
id: re(t),
|
|
456
456
|
role: "option",
|
|
457
457
|
"aria-selected": n,
|
|
458
458
|
"aria-disabled": e.disabled || void 0,
|
|
459
|
-
className: h(
|
|
460
|
-
onMouseEnter: () => !e.disabled &&
|
|
461
|
-
onClick: () =>
|
|
459
|
+
className: h(F.option, n && F.selected, t === U && F.highlighted, e.disabled && F.optionDisabled),
|
|
460
|
+
onMouseEnter: () => !e.disabled && W(t),
|
|
461
|
+
onClick: () => ve(e),
|
|
462
462
|
children: [/* @__PURE__ */ f("span", {
|
|
463
|
-
className:
|
|
463
|
+
className: F.optionLabel,
|
|
464
464
|
children: e.label
|
|
465
465
|
}), n ? /* @__PURE__ */ f("svg", {
|
|
466
|
-
className:
|
|
466
|
+
className: F.check,
|
|
467
467
|
viewBox: "0 0 20 20",
|
|
468
468
|
"aria-hidden": "true",
|
|
469
469
|
focusable: "false",
|
|
@@ -478,10 +478,10 @@ var N = {
|
|
|
478
478
|
}) : null]
|
|
479
479
|
}, e.value);
|
|
480
480
|
}) : /* @__PURE__ */ f("li", {
|
|
481
|
-
className:
|
|
481
|
+
className: F.empty,
|
|
482
482
|
role: "presentation",
|
|
483
483
|
children: g ? /* @__PURE__ */ f("span", {
|
|
484
|
-
className:
|
|
484
|
+
className: F.spinner,
|
|
485
485
|
role: "status",
|
|
486
486
|
"aria-label": "Loading"
|
|
487
487
|
}) : _
|
|
@@ -490,10 +490,10 @@ var N = {
|
|
|
490
490
|
}), document.body) : null
|
|
491
491
|
]
|
|
492
492
|
});
|
|
493
|
-
}),
|
|
493
|
+
}), ce = n(function({ label: e, helperText: t, ...n }, r) {
|
|
494
494
|
if (!E()) return /* @__PURE__ */ f(D, {});
|
|
495
495
|
let i = n;
|
|
496
|
-
return !e && !t && !n.error ? /* @__PURE__ */ f(
|
|
496
|
+
return !e && !t && !n.error ? /* @__PURE__ */ f(I, {
|
|
497
497
|
...i,
|
|
498
498
|
ref: r
|
|
499
499
|
}) : /* @__PURE__ */ f(M, {
|
|
@@ -503,12 +503,327 @@ var N = {
|
|
|
503
503
|
error: n.error,
|
|
504
504
|
required: n.required,
|
|
505
505
|
disabled: n.disabled,
|
|
506
|
-
children: /* @__PURE__ */ f(
|
|
506
|
+
children: /* @__PURE__ */ f(I, {
|
|
507
507
|
...i,
|
|
508
508
|
ref: r
|
|
509
509
|
})
|
|
510
510
|
});
|
|
511
|
+
}), L = {
|
|
512
|
+
textarea: "cui-Textarea-module__textarea--Z-y6g",
|
|
513
|
+
invalid: "cui-Textarea-module__invalid--E88X-",
|
|
514
|
+
"resize-none": "cui-Textarea-module__resize-none---T499",
|
|
515
|
+
"resize-vertical": "cui-Textarea-module__resize-vertical--P4hRY",
|
|
516
|
+
"resize-horizontal": "cui-Textarea-module__resize-horizontal--htj2f",
|
|
517
|
+
"resize-both": "cui-Textarea-module__resize-both--wR4os",
|
|
518
|
+
readOnly: "cui-Textarea-module__readOnly--mI513"
|
|
519
|
+
}, R = n(function({ id: e, required: t, disabled: n, error: r, "aria-describedby": i, rows: a = 3, resize: o = "vertical", readOnly: s, className: c, ...l }, u) {
|
|
520
|
+
let d = A({
|
|
521
|
+
id: e,
|
|
522
|
+
required: t,
|
|
523
|
+
disabled: n,
|
|
524
|
+
error: r,
|
|
525
|
+
"aria-describedby": i
|
|
526
|
+
});
|
|
527
|
+
return /* @__PURE__ */ f("textarea", {
|
|
528
|
+
...l,
|
|
529
|
+
ref: u,
|
|
530
|
+
id: d.id,
|
|
531
|
+
rows: a,
|
|
532
|
+
required: d.required,
|
|
533
|
+
disabled: d.disabled,
|
|
534
|
+
readOnly: s,
|
|
535
|
+
"aria-invalid": d["aria-invalid"],
|
|
536
|
+
"aria-describedby": d["aria-describedby"],
|
|
537
|
+
className: h(L.textarea, L[`resize-${o}`], d.invalid && L.invalid, s && L.readOnly, c)
|
|
538
|
+
});
|
|
539
|
+
}), le = n(function({ label: e, helperText: t, ...n }, r) {
|
|
540
|
+
return E() ? !e && !t && !n.error ? /* @__PURE__ */ f(R, {
|
|
541
|
+
...n,
|
|
542
|
+
ref: r
|
|
543
|
+
}) : /* @__PURE__ */ f(M, {
|
|
544
|
+
id: n.id,
|
|
545
|
+
label: e,
|
|
546
|
+
helperText: t,
|
|
547
|
+
error: n.error,
|
|
548
|
+
required: n.required,
|
|
549
|
+
disabled: n.disabled,
|
|
550
|
+
children: /* @__PURE__ */ f(R, {
|
|
551
|
+
...n,
|
|
552
|
+
ref: r
|
|
553
|
+
})
|
|
554
|
+
}) : /* @__PURE__ */ f(D, {});
|
|
511
555
|
}), z = {
|
|
556
|
+
root: "cui-Checkbox-module__root--mY3qk",
|
|
557
|
+
label: "cui-Checkbox-module__label--cwRtI",
|
|
558
|
+
disabled: "cui-Checkbox-module__disabled--x7-eg",
|
|
559
|
+
input: "cui-Checkbox-module__input--2kt-h",
|
|
560
|
+
box: "cui-Checkbox-module__box--OCPee",
|
|
561
|
+
check: "cui-Checkbox-module__check--4HYWn",
|
|
562
|
+
dash: "cui-Checkbox-module__dash--5Dkdl",
|
|
563
|
+
invalid: "cui-Checkbox-module__invalid---Cs7q",
|
|
564
|
+
text: "cui-Checkbox-module__text--EmtRj",
|
|
565
|
+
required: "cui-Checkbox-module__required--t9DLN",
|
|
566
|
+
message: "cui-Checkbox-module__message--ZPKsV",
|
|
567
|
+
helper: "cui-Checkbox-module__helper--16DrX",
|
|
568
|
+
error: "cui-Checkbox-module__error--E-bmD"
|
|
569
|
+
}, ue = n(function({ label: e, helperText: t, error: n, indeterminate: i = !1, id: o, required: s, disabled: l, "aria-describedby": u, className: d, ...m }, g) {
|
|
570
|
+
let _ = c(null), v = r((e) => {
|
|
571
|
+
_.current = e, typeof g == "function" ? g(e) : g && (g.current = e);
|
|
572
|
+
}, [g]);
|
|
573
|
+
a(() => {
|
|
574
|
+
_.current && (_.current.indeterminate = i);
|
|
575
|
+
}, [i]);
|
|
576
|
+
let y = A({
|
|
577
|
+
id: o,
|
|
578
|
+
required: s,
|
|
579
|
+
disabled: l,
|
|
580
|
+
error: n,
|
|
581
|
+
"aria-describedby": u
|
|
582
|
+
});
|
|
583
|
+
if (!E()) return /* @__PURE__ */ f(D, {});
|
|
584
|
+
let b = `${y.id}-message`, x = !!(n || t), S = [y["aria-describedby"], x ? b : void 0].filter(Boolean).join(" ") || void 0;
|
|
585
|
+
return /* @__PURE__ */ p("div", {
|
|
586
|
+
className: h(z.root, d),
|
|
587
|
+
children: [/* @__PURE__ */ p("label", {
|
|
588
|
+
className: h(z.label, y.disabled && z.disabled),
|
|
589
|
+
children: [
|
|
590
|
+
/* @__PURE__ */ f("input", {
|
|
591
|
+
...m,
|
|
592
|
+
ref: v,
|
|
593
|
+
id: y.id,
|
|
594
|
+
type: "checkbox",
|
|
595
|
+
required: y.required,
|
|
596
|
+
disabled: y.disabled,
|
|
597
|
+
"aria-invalid": y["aria-invalid"],
|
|
598
|
+
"aria-describedby": S,
|
|
599
|
+
className: h(z.input, y.invalid && z.invalid)
|
|
600
|
+
}),
|
|
601
|
+
/* @__PURE__ */ p("span", {
|
|
602
|
+
className: z.box,
|
|
603
|
+
"aria-hidden": "true",
|
|
604
|
+
children: [/* @__PURE__ */ f("svg", {
|
|
605
|
+
className: z.check,
|
|
606
|
+
viewBox: "0 0 20 20",
|
|
607
|
+
focusable: "false",
|
|
608
|
+
children: /* @__PURE__ */ f("path", {
|
|
609
|
+
d: "M4.5 10.5l3.5 3.5 7.5-8",
|
|
610
|
+
fill: "none",
|
|
611
|
+
stroke: "currentColor",
|
|
612
|
+
strokeWidth: "2.5",
|
|
613
|
+
strokeLinecap: "round",
|
|
614
|
+
strokeLinejoin: "round"
|
|
615
|
+
})
|
|
616
|
+
}), /* @__PURE__ */ f("svg", {
|
|
617
|
+
className: z.dash,
|
|
618
|
+
viewBox: "0 0 20 20",
|
|
619
|
+
focusable: "false",
|
|
620
|
+
children: /* @__PURE__ */ f("path", {
|
|
621
|
+
d: "M5 10h10",
|
|
622
|
+
fill: "none",
|
|
623
|
+
stroke: "currentColor",
|
|
624
|
+
strokeWidth: "2.5",
|
|
625
|
+
strokeLinecap: "round"
|
|
626
|
+
})
|
|
627
|
+
})]
|
|
628
|
+
}),
|
|
629
|
+
e ? /* @__PURE__ */ p("span", {
|
|
630
|
+
className: z.text,
|
|
631
|
+
children: [e, y.required ? /* @__PURE__ */ f("span", {
|
|
632
|
+
className: z.required,
|
|
633
|
+
"aria-hidden": "true",
|
|
634
|
+
children: "*"
|
|
635
|
+
}) : null]
|
|
636
|
+
}) : null
|
|
637
|
+
]
|
|
638
|
+
}), x ? /* @__PURE__ */ f("p", {
|
|
639
|
+
id: b,
|
|
640
|
+
className: h(z.message, n ? z.error : z.helper),
|
|
641
|
+
role: n ? "alert" : void 0,
|
|
642
|
+
children: n || t
|
|
643
|
+
}) : null]
|
|
644
|
+
});
|
|
645
|
+
}), B = {
|
|
646
|
+
root: "cui-Switch-module__root--Y5Ydi",
|
|
647
|
+
label: "cui-Switch-module__label--LrH7V",
|
|
648
|
+
disabled: "cui-Switch-module__disabled--2aZ0V",
|
|
649
|
+
input: "cui-Switch-module__input--5BPNu",
|
|
650
|
+
track: "cui-Switch-module__track--7ObdZ",
|
|
651
|
+
thumb: "cui-Switch-module__thumb---FTeK",
|
|
652
|
+
invalid: "cui-Switch-module__invalid--4QBSq",
|
|
653
|
+
required: "cui-Switch-module__required--cVb-Z",
|
|
654
|
+
message: "cui-Switch-module__message--fA-a5",
|
|
655
|
+
helper: "cui-Switch-module__helper--gZCYS",
|
|
656
|
+
error: "cui-Switch-module__error--OSPrU"
|
|
657
|
+
}, de = n(function({ label: e, helperText: t, error: n, id: r, required: i, disabled: a, "aria-describedby": o, className: s, ...c }, l) {
|
|
658
|
+
let u = A({
|
|
659
|
+
id: r,
|
|
660
|
+
required: i,
|
|
661
|
+
disabled: a,
|
|
662
|
+
error: n,
|
|
663
|
+
"aria-describedby": o
|
|
664
|
+
});
|
|
665
|
+
if (!E()) return /* @__PURE__ */ f(D, {});
|
|
666
|
+
let d = `${u.id}-message`, m = !!(n || t), g = [u["aria-describedby"], m ? d : void 0].filter(Boolean).join(" ") || void 0;
|
|
667
|
+
return /* @__PURE__ */ p("div", {
|
|
668
|
+
className: h(B.root, s),
|
|
669
|
+
children: [/* @__PURE__ */ p("label", {
|
|
670
|
+
className: h(B.label, u.disabled && B.disabled),
|
|
671
|
+
children: [
|
|
672
|
+
/* @__PURE__ */ f("input", {
|
|
673
|
+
...c,
|
|
674
|
+
ref: l,
|
|
675
|
+
id: u.id,
|
|
676
|
+
type: "checkbox",
|
|
677
|
+
role: "switch",
|
|
678
|
+
required: u.required,
|
|
679
|
+
disabled: u.disabled,
|
|
680
|
+
"aria-invalid": u["aria-invalid"],
|
|
681
|
+
"aria-describedby": g,
|
|
682
|
+
className: h(B.input, u.invalid && B.invalid)
|
|
683
|
+
}),
|
|
684
|
+
/* @__PURE__ */ f("span", {
|
|
685
|
+
className: B.track,
|
|
686
|
+
"aria-hidden": "true",
|
|
687
|
+
children: /* @__PURE__ */ f("span", { className: B.thumb })
|
|
688
|
+
}),
|
|
689
|
+
e ? /* @__PURE__ */ p("span", {
|
|
690
|
+
className: B.text,
|
|
691
|
+
children: [e, u.required ? /* @__PURE__ */ f("span", {
|
|
692
|
+
className: B.required,
|
|
693
|
+
"aria-hidden": "true",
|
|
694
|
+
children: "*"
|
|
695
|
+
}) : null]
|
|
696
|
+
}) : null
|
|
697
|
+
]
|
|
698
|
+
}), m ? /* @__PURE__ */ f("p", {
|
|
699
|
+
id: d,
|
|
700
|
+
className: h(B.message, n ? B.error : B.helper),
|
|
701
|
+
role: n ? "alert" : void 0,
|
|
702
|
+
children: n || t
|
|
703
|
+
}) : null]
|
|
704
|
+
});
|
|
705
|
+
}), V = {
|
|
706
|
+
root: "cui-Badge-module__root--5osNT",
|
|
707
|
+
dot: "cui-Badge-module__dot--i0c-G",
|
|
708
|
+
neutral: "cui-Badge-module__neutral--lulSm",
|
|
709
|
+
primary: "cui-Badge-module__primary--S0WCS",
|
|
710
|
+
success: "cui-Badge-module__success--u9JiS",
|
|
711
|
+
warning: "cui-Badge-module__warning--nsGp-",
|
|
712
|
+
danger: "cui-Badge-module__danger--PD2hz",
|
|
713
|
+
info: "cui-Badge-module__info--na6DQ"
|
|
714
|
+
};
|
|
715
|
+
//#endregion
|
|
716
|
+
//#region src/components/Badge/Badge.tsx
|
|
717
|
+
function fe({ color: e = "neutral", dot: t = !1, className: n, children: r, ...i }) {
|
|
718
|
+
return E() ? /* @__PURE__ */ p("span", {
|
|
719
|
+
...i,
|
|
720
|
+
className: h(V.root, V[e], n),
|
|
721
|
+
children: [t ? /* @__PURE__ */ f("span", {
|
|
722
|
+
className: V.dot,
|
|
723
|
+
"aria-hidden": "true"
|
|
724
|
+
}) : null, r]
|
|
725
|
+
}) : /* @__PURE__ */ f(D, {});
|
|
726
|
+
}
|
|
727
|
+
var H = {
|
|
728
|
+
root: "cui-Skeleton-module__root--qaX19",
|
|
729
|
+
"cui-skeleton-pulse": "cui-Skeleton-module__cui-skeleton-pulse--HzSoY",
|
|
730
|
+
rect: "cui-Skeleton-module__rect--do1uR",
|
|
731
|
+
text: "cui-Skeleton-module__text---A8IF",
|
|
732
|
+
circle: "cui-Skeleton-module__circle--DYcl8"
|
|
733
|
+
};
|
|
734
|
+
//#endregion
|
|
735
|
+
//#region src/components/Skeleton/Skeleton.tsx
|
|
736
|
+
function pe({ variant: e = "rect", width: t, height: n, className: r, style: i, ...a }) {
|
|
737
|
+
if (!E()) return /* @__PURE__ */ f(D, {});
|
|
738
|
+
let o = {
|
|
739
|
+
width: t,
|
|
740
|
+
height: n ?? (e === "circle" ? t : void 0)
|
|
741
|
+
};
|
|
742
|
+
return /* @__PURE__ */ f("span", {
|
|
743
|
+
"aria-hidden": "true",
|
|
744
|
+
...a,
|
|
745
|
+
className: h(H.root, H[e], r),
|
|
746
|
+
style: {
|
|
747
|
+
...o,
|
|
748
|
+
...i
|
|
749
|
+
}
|
|
750
|
+
});
|
|
751
|
+
}
|
|
752
|
+
var U = {
|
|
753
|
+
root: "cui-Tabs-module__root---VKVI",
|
|
754
|
+
list: "cui-Tabs-module__list--qRVME",
|
|
755
|
+
tab: "cui-Tabs-module__tab--IdDYc",
|
|
756
|
+
selected: "cui-Tabs-module__selected--TxfYv",
|
|
757
|
+
icon: "cui-Tabs-module__icon--LYFix",
|
|
758
|
+
panel: "cui-Tabs-module__panel--08i9c"
|
|
759
|
+
};
|
|
760
|
+
//#endregion
|
|
761
|
+
//#region src/components/Tabs/Tabs.tsx
|
|
762
|
+
function W({ items: e, value: t, defaultValue: n, onValueChange: r, className: i, "aria-label": a, ...s }) {
|
|
763
|
+
let u = o(), d = c([]), m = e.find((e) => !e.disabled)?.value, [g, _] = l(n ?? m);
|
|
764
|
+
if (!E()) return /* @__PURE__ */ f(D, {});
|
|
765
|
+
let v = t ?? g, y = e.findIndex((e) => e.value === v), b = e[y], x = (e) => {
|
|
766
|
+
t === void 0 && _(e), r?.(e);
|
|
767
|
+
}, S = (t, n) => {
|
|
768
|
+
let r = e.length, i = n === "first" ? -1 : n === "last" ? r : t, a = n === "first" ? 1 : n === "last" ? -1 : n;
|
|
769
|
+
for (let t = 0; t < r; t++) {
|
|
770
|
+
i = (i + a + r) % r;
|
|
771
|
+
let t = e[i];
|
|
772
|
+
if (t && !t.disabled) {
|
|
773
|
+
x(t.value), d.current[i]?.focus();
|
|
774
|
+
return;
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
}, C = (e, t) => {
|
|
778
|
+
let n = getComputedStyle(e.currentTarget).direction === "rtl", r = n ? "ArrowLeft" : "ArrowRight", i = n ? "ArrowRight" : "ArrowLeft";
|
|
779
|
+
if (e.key === r) S(t, 1);
|
|
780
|
+
else if (e.key === i) S(t, -1);
|
|
781
|
+
else if (e.key === "Home") S(t, "first");
|
|
782
|
+
else if (e.key === "End") S(t, "last");
|
|
783
|
+
else return;
|
|
784
|
+
e.preventDefault();
|
|
785
|
+
}, w = (e) => `${u}-tab-${e}`, T = (e) => `${u}-panel-${e}`;
|
|
786
|
+
return /* @__PURE__ */ p("div", {
|
|
787
|
+
...s,
|
|
788
|
+
className: h(U.root, i),
|
|
789
|
+
children: [/* @__PURE__ */ f("div", {
|
|
790
|
+
role: "tablist",
|
|
791
|
+
"aria-label": a,
|
|
792
|
+
className: U.list,
|
|
793
|
+
children: e.map((e, t) => {
|
|
794
|
+
let n = t === y;
|
|
795
|
+
return /* @__PURE__ */ p("button", {
|
|
796
|
+
ref: (e) => {
|
|
797
|
+
d.current[t] = e;
|
|
798
|
+
},
|
|
799
|
+
id: w(t),
|
|
800
|
+
type: "button",
|
|
801
|
+
role: "tab",
|
|
802
|
+
"aria-selected": n,
|
|
803
|
+
"aria-controls": n && e.content !== void 0 ? T(t) : void 0,
|
|
804
|
+
tabIndex: n ? 0 : -1,
|
|
805
|
+
disabled: e.disabled,
|
|
806
|
+
className: h(U.tab, n && U.selected),
|
|
807
|
+
onClick: () => x(e.value),
|
|
808
|
+
onKeyDown: (e) => C(e, t),
|
|
809
|
+
children: [e.icon ? /* @__PURE__ */ f("span", {
|
|
810
|
+
className: U.icon,
|
|
811
|
+
"aria-hidden": "true",
|
|
812
|
+
children: e.icon
|
|
813
|
+
}) : null, e.label]
|
|
814
|
+
}, e.value);
|
|
815
|
+
})
|
|
816
|
+
}), b && b.content !== void 0 ? /* @__PURE__ */ f("div", {
|
|
817
|
+
role: "tabpanel",
|
|
818
|
+
id: T(y),
|
|
819
|
+
"aria-labelledby": w(y),
|
|
820
|
+
tabIndex: 0,
|
|
821
|
+
className: U.panel,
|
|
822
|
+
children: b.content
|
|
823
|
+
}) : null]
|
|
824
|
+
});
|
|
825
|
+
}
|
|
826
|
+
var G = {
|
|
512
827
|
root: "cui-FormSection-module__root--M70AE",
|
|
513
828
|
header: "cui-FormSection-module__header--xTDAF",
|
|
514
829
|
heading: "cui-FormSection-module__heading--QU0-u",
|
|
@@ -521,34 +836,34 @@ var N = {
|
|
|
521
836
|
};
|
|
522
837
|
//#endregion
|
|
523
838
|
//#region src/components/FormSection/FormSection.tsx
|
|
524
|
-
function
|
|
839
|
+
function me({ title: e, subtitle: n, children: r, columns: i = 1, headingLevel: a = 3, className: s, ...c }) {
|
|
525
840
|
let l = o(), u = !!(e || n);
|
|
526
841
|
return E() ? /* @__PURE__ */ p("section", {
|
|
527
842
|
...c,
|
|
528
843
|
"aria-labelledby": e ? l : c["aria-labelledby"],
|
|
529
|
-
className: h(
|
|
844
|
+
className: h(G.root, s),
|
|
530
845
|
children: [u ? /* @__PURE__ */ p("div", {
|
|
531
|
-
className:
|
|
846
|
+
className: G.header,
|
|
532
847
|
children: [/* @__PURE__ */ p("div", {
|
|
533
|
-
className:
|
|
848
|
+
className: G.heading,
|
|
534
849
|
children: [e ? t(`h${a}`, {
|
|
535
850
|
id: l,
|
|
536
|
-
className:
|
|
851
|
+
className: G.title
|
|
537
852
|
}, e) : null, n ? /* @__PURE__ */ f("p", {
|
|
538
|
-
className:
|
|
853
|
+
className: G.subtitle,
|
|
539
854
|
children: n
|
|
540
855
|
}) : null]
|
|
541
856
|
}), /* @__PURE__ */ f("span", {
|
|
542
|
-
className:
|
|
857
|
+
className: G.divider,
|
|
543
858
|
"aria-hidden": "true"
|
|
544
859
|
})]
|
|
545
860
|
}) : null, /* @__PURE__ */ f("div", {
|
|
546
|
-
className: h(
|
|
861
|
+
className: h(G.fields, G[`columns${i}`]),
|
|
547
862
|
children: r
|
|
548
863
|
})]
|
|
549
864
|
}) : /* @__PURE__ */ f(D, {});
|
|
550
865
|
}
|
|
551
|
-
var
|
|
866
|
+
var K = {
|
|
552
867
|
root: "cui-Avatar-module__root--fXu-J",
|
|
553
868
|
xs: "cui-Avatar-module__xs--oSaLL",
|
|
554
869
|
sm: "cui-Avatar-module__sm--sZ2bk",
|
|
@@ -563,31 +878,31 @@ var V = {
|
|
|
563
878
|
tone3: "cui-Avatar-module__tone3--goa6z",
|
|
564
879
|
tone4: "cui-Avatar-module__tone4--g6kRy",
|
|
565
880
|
primary: "cui-Avatar-module__primary--HKPgn"
|
|
566
|
-
},
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
881
|
+
}, q = [
|
|
882
|
+
K.tone0,
|
|
883
|
+
K.tone1,
|
|
884
|
+
K.tone2,
|
|
885
|
+
K.tone3,
|
|
886
|
+
K.tone4
|
|
572
887
|
];
|
|
573
|
-
function
|
|
888
|
+
function he(e) {
|
|
574
889
|
let t = (e ?? "").trim().split(/\s+/).filter(Boolean);
|
|
575
890
|
return t.length === 0 ? "" : ((t[0]?.[0] ?? "") + (t.length > 1 ? t[t.length - 1]?.[0] ?? "" : "")).toUpperCase();
|
|
576
891
|
}
|
|
577
|
-
function
|
|
892
|
+
function J(e) {
|
|
578
893
|
let t = e ?? "", n = 0;
|
|
579
894
|
for (let e = 0; e < t.length; e++) n = n * 31 + t.charCodeAt(e) >>> 0;
|
|
580
|
-
return
|
|
895
|
+
return q[n % q.length];
|
|
581
896
|
}
|
|
582
|
-
function
|
|
583
|
-
let [o, s] = l(null), c = !!t && t !== o, u =
|
|
897
|
+
function Y({ name: e, src: t, size: n = "md", tone: r = "auto", className: i, ...a }) {
|
|
898
|
+
let [o, s] = l(null), c = !!t && t !== o, u = he(e);
|
|
584
899
|
return E() ? /* @__PURE__ */ f("span", {
|
|
585
900
|
role: a["aria-hidden"] ? void 0 : "img",
|
|
586
901
|
"aria-label": a["aria-hidden"] || !e ? void 0 : e,
|
|
587
902
|
...a,
|
|
588
|
-
className: h(
|
|
903
|
+
className: h(K.root, K[n], !c && (r === "primary" ? K.primary : J(e)), i),
|
|
589
904
|
children: c ? /* @__PURE__ */ f("img", {
|
|
590
|
-
className:
|
|
905
|
+
className: K.image,
|
|
591
906
|
src: t ?? void 0,
|
|
592
907
|
alt: "",
|
|
593
908
|
onError: () => s(t ?? null)
|
|
@@ -595,7 +910,7 @@ function se({ name: e, src: t, size: n = "md", tone: r = "auto", className: i, .
|
|
|
595
910
|
"aria-hidden": "true",
|
|
596
911
|
children: u
|
|
597
912
|
}) : /* @__PURE__ */ p("svg", {
|
|
598
|
-
className:
|
|
913
|
+
className: K.fallback,
|
|
599
914
|
viewBox: "0 0 24 24",
|
|
600
915
|
"aria-hidden": "true",
|
|
601
916
|
focusable: "false",
|
|
@@ -611,7 +926,7 @@ function se({ name: e, src: t, size: n = "md", tone: r = "auto", className: i, .
|
|
|
611
926
|
})
|
|
612
927
|
}) : /* @__PURE__ */ f(D, {});
|
|
613
928
|
}
|
|
614
|
-
var
|
|
929
|
+
var X = {
|
|
615
930
|
root: "cui-AccountPanel-module__root--Twbp0",
|
|
616
931
|
rootSidebar: "cui-AccountPanel-module__rootSidebar--OMB7L",
|
|
617
932
|
contents: "cui-AccountPanel-module__contents--OFL-r",
|
|
@@ -651,23 +966,23 @@ var G = {
|
|
|
651
966
|
appName: "cui-AccountPanel-module__appName--MJc25",
|
|
652
967
|
danger: "cui-AccountPanel-module__danger--t0t-L",
|
|
653
968
|
dangerAction: "cui-AccountPanel-module__dangerAction--jvJ7-"
|
|
654
|
-
},
|
|
969
|
+
}, ge = 8, Z = 12, _e = 352, ve = "a[href], button:not([disabled])", ye = ({ href: e, className: t, title: n, onClick: r, children: i }) => /* @__PURE__ */ f("a", {
|
|
655
970
|
href: e,
|
|
656
971
|
className: t,
|
|
657
972
|
title: n,
|
|
658
973
|
onClick: r,
|
|
659
974
|
children: i
|
|
660
|
-
}),
|
|
661
|
-
primary:
|
|
662
|
-
info:
|
|
663
|
-
success:
|
|
664
|
-
warning:
|
|
665
|
-
danger:
|
|
666
|
-
neutral:
|
|
975
|
+
}), be = {
|
|
976
|
+
primary: X.tonePrimary,
|
|
977
|
+
info: X.toneInfo,
|
|
978
|
+
success: X.toneSuccess,
|
|
979
|
+
warning: X.toneWarning,
|
|
980
|
+
danger: X.toneDanger,
|
|
981
|
+
neutral: X.toneNeutral
|
|
667
982
|
};
|
|
668
|
-
function
|
|
983
|
+
function xe() {
|
|
669
984
|
return /* @__PURE__ */ f("svg", {
|
|
670
|
-
className:
|
|
985
|
+
className: X.externalIcon,
|
|
671
986
|
viewBox: "0 0 20 20",
|
|
672
987
|
"aria-hidden": "true",
|
|
673
988
|
focusable: "false",
|
|
@@ -681,20 +996,20 @@ function le() {
|
|
|
681
996
|
})
|
|
682
997
|
});
|
|
683
998
|
}
|
|
684
|
-
function
|
|
685
|
-
let v = r === "sidebar", y = o(), b = c(null), x = c(null), S = c(null), [C, w] = l(!1), [
|
|
999
|
+
function Se({ user: e, apps: t = [], actions: n = [], placement: r = "header", collapsed: i = !1, appsTitle: s = "All Apps", greeting: u = "Hi", renderLink: g = ye, className: _ }) {
|
|
1000
|
+
let v = r === "sidebar", y = o(), b = c(null), x = c(null), S = c(null), [C, w] = l(!1), [T, ee] = l(null), [te, O] = l(), ne = () => {
|
|
686
1001
|
let e = x.current;
|
|
687
1002
|
if (!e) return;
|
|
688
1003
|
let t = e.getBoundingClientRect();
|
|
689
1004
|
if (v) {
|
|
690
|
-
let e = Math.min(
|
|
691
|
-
|
|
692
|
-
left: Math.max(
|
|
693
|
-
bottom: Math.max(
|
|
1005
|
+
let e = Math.min(_e, window.innerWidth - 24);
|
|
1006
|
+
ee({
|
|
1007
|
+
left: Math.max(Z, Math.min(t.right + ge, window.innerWidth - e - Z)),
|
|
1008
|
+
bottom: Math.max(Z, window.innerHeight - t.bottom)
|
|
694
1009
|
});
|
|
695
|
-
} else
|
|
696
|
-
top: t.bottom +
|
|
697
|
-
right: Math.max(
|
|
1010
|
+
} else ee({
|
|
1011
|
+
top: t.bottom + ge,
|
|
1012
|
+
right: Math.max(Z, window.innerWidth - t.right)
|
|
698
1013
|
});
|
|
699
1014
|
}, k = () => {
|
|
700
1015
|
ne(), O(b.current?.closest("[data-theme]")?.getAttribute("data-theme") ?? void 0), w(!0);
|
|
@@ -717,35 +1032,35 @@ function ue({ user: e, apps: t = [], actions: n = [], placement: r = "header", c
|
|
|
717
1032
|
return;
|
|
718
1033
|
}
|
|
719
1034
|
if (e.key !== "Tab") return;
|
|
720
|
-
let t = Array.from(S.current?.querySelectorAll(
|
|
1035
|
+
let t = Array.from(S.current?.querySelectorAll(ve) ?? []), n = t[0], r = t[t.length - 1];
|
|
721
1036
|
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
1037
|
};
|
|
723
1038
|
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"),
|
|
1039
|
+
let M = e.name.trim().split(/\s+/)[0] ?? e.name, N = n.filter((e) => e.tone !== "danger"), P = n.filter((e) => e.tone === "danger"), re = (e) => {
|
|
725
1040
|
e.onClick?.(), A();
|
|
726
|
-
},
|
|
1041
|
+
}, F = /* @__PURE__ */ p("div", {
|
|
727
1042
|
ref: S,
|
|
728
1043
|
id: y,
|
|
729
1044
|
role: "dialog",
|
|
730
1045
|
"aria-label": "Account",
|
|
731
1046
|
tabIndex: -1,
|
|
732
|
-
className: h(
|
|
733
|
-
style:
|
|
1047
|
+
className: h(X.panel, v && X.panelSidebar),
|
|
1048
|
+
style: T ?? void 0,
|
|
734
1049
|
"data-theme": te,
|
|
735
1050
|
onKeyDown: j,
|
|
736
1051
|
children: [
|
|
737
1052
|
/* @__PURE__ */ p("div", {
|
|
738
|
-
className:
|
|
1053
|
+
className: X.identity,
|
|
739
1054
|
children: [
|
|
740
1055
|
e.email ? /* @__PURE__ */ f("p", {
|
|
741
|
-
className:
|
|
1056
|
+
className: X.email,
|
|
742
1057
|
children: e.email
|
|
743
1058
|
}) : null,
|
|
744
1059
|
/* @__PURE__ */ f("span", {
|
|
745
|
-
className:
|
|
1060
|
+
className: X.avatarRing,
|
|
746
1061
|
children: /* @__PURE__ */ f("span", {
|
|
747
|
-
className:
|
|
748
|
-
children: /* @__PURE__ */ f(
|
|
1062
|
+
className: X.avatarInner,
|
|
1063
|
+
children: /* @__PURE__ */ f(Y, {
|
|
749
1064
|
name: e.name,
|
|
750
1065
|
src: e.avatarUrl,
|
|
751
1066
|
size: "xl",
|
|
@@ -755,7 +1070,7 @@ function ue({ user: e, apps: t = [], actions: n = [], placement: r = "header", c
|
|
|
755
1070
|
})
|
|
756
1071
|
}),
|
|
757
1072
|
/* @__PURE__ */ p("p", {
|
|
758
|
-
className:
|
|
1073
|
+
className: X.greeting,
|
|
759
1074
|
children: [
|
|
760
1075
|
u,
|
|
761
1076
|
", ",
|
|
@@ -764,34 +1079,34 @@ function ue({ user: e, apps: t = [], actions: n = [], placement: r = "header", c
|
|
|
764
1079
|
]
|
|
765
1080
|
}),
|
|
766
1081
|
e.role ? /* @__PURE__ */ f("span", {
|
|
767
|
-
className:
|
|
1082
|
+
className: X.role,
|
|
768
1083
|
children: e.role
|
|
769
1084
|
}) : null,
|
|
770
1085
|
N.length > 0 ? /* @__PURE__ */ f("div", {
|
|
771
|
-
className:
|
|
1086
|
+
className: X.pills,
|
|
772
1087
|
children: N.map((e) => {
|
|
773
1088
|
let t = /* @__PURE__ */ p(d, { children: [
|
|
774
1089
|
e.icon ? /* @__PURE__ */ f("span", {
|
|
775
|
-
className:
|
|
1090
|
+
className: X.actionIcon,
|
|
776
1091
|
"aria-hidden": "true",
|
|
777
1092
|
children: e.icon
|
|
778
1093
|
}) : null,
|
|
779
1094
|
/* @__PURE__ */ f("span", { children: e.label }),
|
|
780
|
-
e.external ? /* @__PURE__ */ f(
|
|
1095
|
+
e.external ? /* @__PURE__ */ f(xe, {}) : null
|
|
781
1096
|
] });
|
|
782
1097
|
return e.href && !e.disabled ? e.external ? /* @__PURE__ */ f("a", {
|
|
783
1098
|
href: e.href,
|
|
784
1099
|
target: "_blank",
|
|
785
1100
|
rel: "noreferrer",
|
|
786
1101
|
title: e.title,
|
|
787
|
-
className:
|
|
1102
|
+
className: X.pill,
|
|
788
1103
|
onClick: () => A(),
|
|
789
1104
|
children: t
|
|
790
1105
|
}, e.id) : /* @__PURE__ */ f("span", {
|
|
791
|
-
className:
|
|
1106
|
+
className: X.contents,
|
|
792
1107
|
children: g({
|
|
793
1108
|
href: e.href,
|
|
794
|
-
className:
|
|
1109
|
+
className: X.pill ?? "",
|
|
795
1110
|
title: e.title,
|
|
796
1111
|
onClick: () => A(),
|
|
797
1112
|
children: t
|
|
@@ -800,8 +1115,8 @@ function ue({ user: e, apps: t = [], actions: n = [], placement: r = "header", c
|
|
|
800
1115
|
type: "button",
|
|
801
1116
|
disabled: e.disabled,
|
|
802
1117
|
title: e.title,
|
|
803
|
-
className:
|
|
804
|
-
onClick: () =>
|
|
1118
|
+
className: X.pill,
|
|
1119
|
+
onClick: () => re(e),
|
|
805
1120
|
children: t
|
|
806
1121
|
}, e.id);
|
|
807
1122
|
})
|
|
@@ -809,34 +1124,34 @@ function ue({ user: e, apps: t = [], actions: n = [], placement: r = "header", c
|
|
|
809
1124
|
]
|
|
810
1125
|
}),
|
|
811
1126
|
e.details?.length ? /* @__PURE__ */ f("dl", {
|
|
812
|
-
className:
|
|
1127
|
+
className: X.details,
|
|
813
1128
|
children: e.details.map((e) => /* @__PURE__ */ p("div", {
|
|
814
|
-
className:
|
|
1129
|
+
className: X.detailRow,
|
|
815
1130
|
children: [/* @__PURE__ */ f("dt", { children: e.label }), /* @__PURE__ */ f("dd", { children: e.value })]
|
|
816
1131
|
}, e.label))
|
|
817
1132
|
}) : null,
|
|
818
1133
|
t.length > 0 ? /* @__PURE__ */ p("section", {
|
|
819
|
-
className:
|
|
1134
|
+
className: X.apps,
|
|
820
1135
|
"aria-label": s,
|
|
821
1136
|
children: [/* @__PURE__ */ f("p", {
|
|
822
|
-
className:
|
|
1137
|
+
className: X.appsTitle,
|
|
823
1138
|
children: s
|
|
824
1139
|
}), /* @__PURE__ */ f("div", {
|
|
825
|
-
className:
|
|
1140
|
+
className: X.grid,
|
|
826
1141
|
children: t.map((e) => {
|
|
827
1142
|
let t = /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("span", {
|
|
828
|
-
className: h(
|
|
1143
|
+
className: h(X.tile, be[e.tone ?? "primary"]),
|
|
829
1144
|
"aria-hidden": "true",
|
|
830
1145
|
children: e.icon
|
|
831
1146
|
}), /* @__PURE__ */ f("span", {
|
|
832
|
-
className:
|
|
1147
|
+
className: X.appName,
|
|
833
1148
|
children: e.name
|
|
834
1149
|
})] });
|
|
835
1150
|
return e.current ? /* @__PURE__ */ f("span", {
|
|
836
|
-
className:
|
|
1151
|
+
className: X.contents,
|
|
837
1152
|
children: g({
|
|
838
1153
|
href: e.url,
|
|
839
|
-
className:
|
|
1154
|
+
className: X.app ?? "",
|
|
840
1155
|
title: e.description,
|
|
841
1156
|
onClick: () => A(),
|
|
842
1157
|
children: t
|
|
@@ -846,22 +1161,22 @@ function ue({ user: e, apps: t = [], actions: n = [], placement: r = "header", c
|
|
|
846
1161
|
target: "_blank",
|
|
847
1162
|
rel: "noreferrer",
|
|
848
1163
|
title: e.description,
|
|
849
|
-
className:
|
|
1164
|
+
className: X.app,
|
|
850
1165
|
children: t
|
|
851
1166
|
}, e.id);
|
|
852
1167
|
})
|
|
853
1168
|
})]
|
|
854
1169
|
}) : null,
|
|
855
1170
|
P.length > 0 ? /* @__PURE__ */ f("div", {
|
|
856
|
-
className:
|
|
1171
|
+
className: X.danger,
|
|
857
1172
|
children: P.map((e) => /* @__PURE__ */ p("button", {
|
|
858
1173
|
type: "button",
|
|
859
1174
|
disabled: e.disabled,
|
|
860
1175
|
title: e.title,
|
|
861
|
-
className:
|
|
862
|
-
onClick: () =>
|
|
1176
|
+
className: X.dangerAction,
|
|
1177
|
+
onClick: () => re(e),
|
|
863
1178
|
children: [e.icon ? /* @__PURE__ */ f("span", {
|
|
864
|
-
className:
|
|
1179
|
+
className: X.actionIcon,
|
|
865
1180
|
"aria-hidden": "true",
|
|
866
1181
|
children: e.icon
|
|
867
1182
|
}) : null, e.label]
|
|
@@ -871,7 +1186,7 @@ function ue({ user: e, apps: t = [], actions: n = [], placement: r = "header", c
|
|
|
871
1186
|
});
|
|
872
1187
|
return /* @__PURE__ */ p("div", {
|
|
873
1188
|
ref: b,
|
|
874
|
-
className: h(
|
|
1189
|
+
className: h(X.root, v && X.rootSidebar, _),
|
|
875
1190
|
children: [/* @__PURE__ */ p("button", {
|
|
876
1191
|
ref: x,
|
|
877
1192
|
type: "button",
|
|
@@ -879,28 +1194,28 @@ function ue({ user: e, apps: t = [], actions: n = [], placement: r = "header", c
|
|
|
879
1194
|
"aria-haspopup": "dialog",
|
|
880
1195
|
"aria-expanded": C,
|
|
881
1196
|
"aria-controls": C ? y : void 0,
|
|
882
|
-
className: h(v ?
|
|
1197
|
+
className: h(v ? X.triggerSidebar : X.triggerHeader, v && i && X.collapsed, C && X.triggerOpen),
|
|
883
1198
|
onClick: () => C ? A() : k(),
|
|
884
|
-
children: [/* @__PURE__ */ f(
|
|
1199
|
+
children: [/* @__PURE__ */ f(Y, {
|
|
885
1200
|
name: e.name,
|
|
886
1201
|
src: e.avatarUrl,
|
|
887
1202
|
size: "sm",
|
|
888
1203
|
tone: "primary",
|
|
889
1204
|
"aria-hidden": "true"
|
|
890
1205
|
}), v && !i ? /* @__PURE__ */ p("span", {
|
|
891
|
-
className:
|
|
1206
|
+
className: X.identityText,
|
|
892
1207
|
children: [/* @__PURE__ */ f("span", {
|
|
893
|
-
className:
|
|
1208
|
+
className: X.triggerName,
|
|
894
1209
|
children: e.name
|
|
895
1210
|
}), e.role ? /* @__PURE__ */ f("span", {
|
|
896
|
-
className:
|
|
1211
|
+
className: X.triggerRole,
|
|
897
1212
|
children: e.role
|
|
898
1213
|
}) : null]
|
|
899
1214
|
}) : null]
|
|
900
|
-
}), C &&
|
|
1215
|
+
}), C && T ? m(F, document.body) : null]
|
|
901
1216
|
});
|
|
902
1217
|
}
|
|
903
|
-
var
|
|
1218
|
+
var Q = {
|
|
904
1219
|
root: "cui-Typography-module__root--PebSf",
|
|
905
1220
|
h1: "cui-Typography-module__h1--pJqnF",
|
|
906
1221
|
h2: "cui-Typography-module__h2--8YqGv",
|
|
@@ -927,7 +1242,7 @@ var Z = {
|
|
|
927
1242
|
"align-center": "cui-Typography-module__align-center--2Ng2u",
|
|
928
1243
|
"align-end": "cui-Typography-module__align-end--6LwA3",
|
|
929
1244
|
truncate: "cui-Typography-module__truncate--3B0O4"
|
|
930
|
-
},
|
|
1245
|
+
}, Ce = {
|
|
931
1246
|
h1: "h1",
|
|
932
1247
|
h2: "h2",
|
|
933
1248
|
h3: "h3",
|
|
@@ -936,49 +1251,155 @@ var Z = {
|
|
|
936
1251
|
"body-sm": "p",
|
|
937
1252
|
caption: "span",
|
|
938
1253
|
label: "span"
|
|
939
|
-
},
|
|
940
|
-
h1:
|
|
941
|
-
h2:
|
|
942
|
-
h3:
|
|
943
|
-
h4:
|
|
944
|
-
body:
|
|
945
|
-
"body-sm":
|
|
946
|
-
caption:
|
|
947
|
-
label:
|
|
1254
|
+
}, we = {
|
|
1255
|
+
h1: Q.h1,
|
|
1256
|
+
h2: Q.h2,
|
|
1257
|
+
h3: Q.h3,
|
|
1258
|
+
h4: Q.h4,
|
|
1259
|
+
body: Q.body,
|
|
1260
|
+
"body-sm": Q.bodySm,
|
|
1261
|
+
caption: Q.caption,
|
|
1262
|
+
label: Q.label
|
|
948
1263
|
};
|
|
949
|
-
function
|
|
950
|
-
return E() ? t(n ??
|
|
1264
|
+
function Te({ variant: e = "body", as: n, color: r = "default", weight: i, align: a, truncate: o = !1, className: s, ...c }) {
|
|
1265
|
+
return E() ? t(n ?? Ce[e], {
|
|
951
1266
|
...c,
|
|
952
|
-
className: h(
|
|
1267
|
+
className: h(Q.root, we[e], Q[`color-${r}`], i && Q[`weight-${i}`], a && Q[`align-${a}`], o && Q.truncate, s)
|
|
953
1268
|
}) : /* @__PURE__ */ f(D, {});
|
|
954
1269
|
}
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
1270
|
+
//#endregion
|
|
1271
|
+
//#region src/theme/themeStore.ts
|
|
1272
|
+
var Ee = "(prefers-color-scheme: dark)";
|
|
1273
|
+
function De() {
|
|
1274
|
+
return u((e) => {
|
|
1275
|
+
if (typeof window > "u" || typeof window.matchMedia != "function") return () => {};
|
|
1276
|
+
let t = window.matchMedia(Ee);
|
|
1277
|
+
return t.addEventListener("change", e), () => t.removeEventListener("change", e);
|
|
1278
|
+
}, () => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia(Ee).matches, () => !1);
|
|
1279
|
+
}
|
|
1280
|
+
var $ = /* @__PURE__ */ new Set();
|
|
1281
|
+
function Oe(e) {
|
|
1282
|
+
try {
|
|
1283
|
+
return window.localStorage.getItem(e);
|
|
1284
|
+
} catch {
|
|
1285
|
+
return null;
|
|
1286
|
+
}
|
|
1287
|
+
}
|
|
1288
|
+
function ke(e, t) {
|
|
1289
|
+
try {
|
|
1290
|
+
window.localStorage.setItem(e, t);
|
|
1291
|
+
} catch {}
|
|
1292
|
+
$.forEach((e) => e());
|
|
1293
|
+
}
|
|
1294
|
+
function Ae(e) {
|
|
1295
|
+
return u((e) => ($.add(e), window.addEventListener("storage", e), () => {
|
|
1296
|
+
$.delete(e), window.removeEventListener("storage", e);
|
|
1297
|
+
}), () => e ? Oe(e) : null, () => null);
|
|
1298
|
+
}
|
|
1299
|
+
var je = { root: "cui-ThemeProvider-module__root--2DEGi" }, Me = e(null);
|
|
1300
|
+
function Ne({ children: e, theme: t, defaultTheme: n = "light", onThemeChange: a, storageKey: o, licenseKey: c, className: u, ...d }) {
|
|
1301
|
+
let [p, m] = l(n), g = Ae(t === void 0 ? o : void 0), _ = De(), v = t ?? g ?? p, y = v === "system" ? _ ? "dark" : "light" : v, b = r((e) => {
|
|
1302
|
+
t === void 0 && (m(e), o && ke(o, e)), a?.(e);
|
|
1303
|
+
}, [
|
|
1304
|
+
t,
|
|
1305
|
+
a,
|
|
1306
|
+
o
|
|
1307
|
+
]), x = s(() => ({
|
|
1308
|
+
theme: v,
|
|
1309
|
+
resolvedTheme: y,
|
|
1310
|
+
setTheme: b
|
|
1311
|
+
}), [
|
|
1312
|
+
v,
|
|
1313
|
+
y,
|
|
1314
|
+
b
|
|
1315
|
+
]), C = i(S);
|
|
1316
|
+
return /* @__PURE__ */ f(Me.Provider, {
|
|
1317
|
+
value: x,
|
|
965
1318
|
children: /* @__PURE__ */ f(S.Provider, {
|
|
966
|
-
value:
|
|
1319
|
+
value: c ?? C,
|
|
967
1320
|
children: /* @__PURE__ */ f("div", {
|
|
968
|
-
...
|
|
969
|
-
"data-theme":
|
|
970
|
-
className: h(
|
|
1321
|
+
...d,
|
|
1322
|
+
"data-theme": y,
|
|
1323
|
+
className: h(je.root, u),
|
|
971
1324
|
children: e
|
|
972
1325
|
})
|
|
973
1326
|
})
|
|
974
1327
|
});
|
|
975
1328
|
}
|
|
976
|
-
function
|
|
977
|
-
let e = i(
|
|
1329
|
+
function Pe() {
|
|
1330
|
+
let e = i(Me);
|
|
978
1331
|
if (!e) throw Error("useTheme must be used within a <ThemeProvider>.");
|
|
979
1332
|
return e;
|
|
980
1333
|
}
|
|
1334
|
+
var Fe = {
|
|
1335
|
+
root: "cui-ThemeToggle-module__root--k2-Go",
|
|
1336
|
+
option: "cui-ThemeToggle-module__option--CngnC",
|
|
1337
|
+
input: "cui-ThemeToggle-module__input--0nC-Q",
|
|
1338
|
+
face: "cui-ThemeToggle-module__face--jX0TD",
|
|
1339
|
+
icon: "cui-ThemeToggle-module__icon--N0Uj1"
|
|
1340
|
+
}, Ie = {
|
|
1341
|
+
light: /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("circle", {
|
|
1342
|
+
cx: "12",
|
|
1343
|
+
cy: "12",
|
|
1344
|
+
r: "4"
|
|
1345
|
+
}), /* @__PURE__ */ f("path", { d: "M12 3v2M12 19v2M3 12h2M19 12h2M5.6 5.6l1.4 1.4M17 17l1.4 1.4M5.6 18.4L7 17M17 7l1.4-1.4" })] }),
|
|
1346
|
+
dark: /* @__PURE__ */ f("path", { d: "M20 14.5A8 8 0 019.5 4a8 8 0 1010.5 10.5z" }),
|
|
1347
|
+
system: /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f("rect", {
|
|
1348
|
+
x: "3",
|
|
1349
|
+
y: "4",
|
|
1350
|
+
width: "18",
|
|
1351
|
+
height: "12",
|
|
1352
|
+
rx: "2"
|
|
1353
|
+
}), /* @__PURE__ */ f("path", { d: "M8 20h8M12 16v4" })] })
|
|
1354
|
+
}, Le = {
|
|
1355
|
+
light: "Light",
|
|
1356
|
+
dark: "Dark",
|
|
1357
|
+
system: "System"
|
|
1358
|
+
};
|
|
1359
|
+
function Re({ modes: e = [
|
|
1360
|
+
"light",
|
|
1361
|
+
"dark",
|
|
1362
|
+
"system"
|
|
1363
|
+
], compact: t = !1, className: n, "aria-label": r = "Theme", ...i }) {
|
|
1364
|
+
let { theme: a, setTheme: s } = Pe(), c = o();
|
|
1365
|
+
return E() ? /* @__PURE__ */ f("div", {
|
|
1366
|
+
...i,
|
|
1367
|
+
role: "radiogroup",
|
|
1368
|
+
"aria-label": r,
|
|
1369
|
+
className: h(Fe.root, n),
|
|
1370
|
+
children: e.map((e) => {
|
|
1371
|
+
let n = Le[e] ?? e;
|
|
1372
|
+
return /* @__PURE__ */ p("label", {
|
|
1373
|
+
className: Fe.option,
|
|
1374
|
+
title: t ? n : void 0,
|
|
1375
|
+
children: [/* @__PURE__ */ f("input", {
|
|
1376
|
+
type: "radio",
|
|
1377
|
+
name: c,
|
|
1378
|
+
value: e,
|
|
1379
|
+
checked: a === e,
|
|
1380
|
+
onChange: () => s(e),
|
|
1381
|
+
className: Fe.input,
|
|
1382
|
+
"aria-label": t ? n : void 0
|
|
1383
|
+
}), /* @__PURE__ */ p("span", {
|
|
1384
|
+
className: Fe.face,
|
|
1385
|
+
children: [Ie[e] ? /* @__PURE__ */ f("svg", {
|
|
1386
|
+
className: Fe.icon,
|
|
1387
|
+
viewBox: "0 0 24 24",
|
|
1388
|
+
fill: "none",
|
|
1389
|
+
stroke: "currentColor",
|
|
1390
|
+
strokeWidth: "1.8",
|
|
1391
|
+
strokeLinecap: "round",
|
|
1392
|
+
strokeLinejoin: "round",
|
|
1393
|
+
"aria-hidden": "true",
|
|
1394
|
+
focusable: "false",
|
|
1395
|
+
children: Ie[e]
|
|
1396
|
+
}) : null, t ? null : n]
|
|
1397
|
+
})]
|
|
1398
|
+
}, e);
|
|
1399
|
+
})
|
|
1400
|
+
}) : /* @__PURE__ */ f(D, {});
|
|
1401
|
+
}
|
|
981
1402
|
//#endregion
|
|
982
|
-
export {
|
|
1403
|
+
export { Se as AccountPanel, Y as Avatar, fe as Badge, ne as Button, ue as Checkbox, M as FormField, me as FormSection, re as Input, ce as Select, pe as Skeleton, de as Switch, W as Tabs, le as Textarea, Ne as ThemeProvider, Re as ThemeToggle, Te as Typography, h as cn, he as getInitials, C as setLicenseKey, A as useFormFieldControl, Pe as useTheme };
|
|
983
1404
|
|
|
984
1405
|
//# sourceMappingURL=index.js.map
|