@febkosq8/arc 0.8.9 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/arc.js CHANGED
@@ -251,17 +251,24 @@ var xe = ({ className: e, orientation: r = "horizontal", selectedVariant: o, chi
251
251
  role: "separator",
252
252
  className: t("arc-divider w-full border-b border-border", e),
253
253
  ...n
254
- }), ke = ({ items: e, value: n, onChange: r, className: i, placeholder: a = "Select an option", disabled: o, name: s, preventEmpty: c = !1, "data-name": l, "data-required": u }) => {
255
- let d = e.find((e) => String(e.key) === String(n)) ?? null;
254
+ }), U = (e) => e == null || typeof e == "boolean" ? "" : typeof e == "string" || typeof e == "number" || typeof e == "bigint" ? String(e) : Array.isArray(e) ? e.map(U).join("") : a(e) ? U(e.props.children) : "", W = (e) => {
255
+ let t = e.labelTextValue;
256
+ return t === void 0 ? typeof e.label == "string" || typeof e.label == "number" ? String(e.label) : U(e.label) || String(e.key) : t;
257
+ }, ke = ({ items: e, value: n, onChange: r, className: i, placeholder: a = "Select an option", disabled: o, name: s, preventEmpty: c = !1, id: u, inputValue: d, onInputValueChange: h, onKeyDown: g, open: _, onOpenChange: v, renderItem: y, renderValue: S, selectedValueFillsSpace: C = !1, loading: w = !1, loadingLabel: T = "Loading options…", "aria-label": E, "data-name": D, "data-required": O }) => {
258
+ let k = e.find((e) => String(e.key) === String(n)) ?? null, A = k !== null && typeof k.label != "string" && typeof k.label != "number" && k.label !== null && typeof k.label != "boolean", j = k ? S ? S(k) : A ? k.label : null : null, M = j != null && j !== !1, N = C || A && !S, P = l(null);
256
259
  return /* @__PURE__ */ f(m.Root, {
257
260
  items: e,
258
- value: d,
261
+ value: k,
259
262
  onValueChange: (e) => {
260
263
  if (c && e === null) return;
261
- let t = e !== null && d !== null && String(e.key) === String(d.key);
264
+ let t = e !== null && k !== null && String(e.key) === String(k.key);
262
265
  r?.(!c && t ? null : e);
263
266
  },
264
- itemToStringLabel: (e) => e?.label ?? "",
267
+ open: _,
268
+ onOpenChange: (e) => v?.(e),
269
+ inputValue: d,
270
+ onInputValueChange: (e) => h?.(e),
271
+ itemToStringLabel: (e) => e ? W(e) : "",
265
272
  itemToStringValue: (e) => String(e?.key ?? ""),
266
273
  isItemEqualToValue: (e, t) => String(e.key) === String(t.key),
267
274
  name: s,
@@ -269,50 +276,72 @@ var xe = ({ className: e, orientation: r = "horizontal", selectedVariant: o, chi
269
276
  children: /* @__PURE__ */ p("div", {
270
277
  className: t("arc-dropdown relative", i),
271
278
  children: [/* @__PURE__ */ p(m.InputGroup, {
272
- className: t("relative flex h-8 w-full items-center justify-between gap-5 rounded border border-border bg-background pr-2 text-foreground shadow-xs pointer-coarse:h-9", "focus-within:border-transparent focus-within:outline-hidden focus-within:ring-2 focus-within:ring-ring", "data-disabled:cursor-not-allowed data-disabled:bg-muted data-disabled:text-muted-foreground"),
273
- children: [/* @__PURE__ */ f(m.Input, {
274
- className: "h-full grow border-none bg-transparent py-2 pl-3 outline-hidden placeholder:text-muted-foreground focus:ring-0 focus:outline-hidden disabled:cursor-not-allowed",
275
- placeholder: a,
276
- "data-name": l,
277
- "data-required": u,
278
- "data-disabled": o
279
- }), /* @__PURE__ */ f(m.Trigger, {
280
- className: "shrink-0 self-center rounded-md focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",
281
- "aria-label": "Toggle options",
282
- children: /* @__PURE__ */ f(x, {
283
- className: "h-5 w-5 text-foreground",
284
- "aria-hidden": "true"
279
+ className: t("relative flex h-8 w-full items-center justify-between gap-5 overflow-hidden rounded border border-border bg-background pr-2 text-foreground shadow-xs pointer-coarse:h-9", M && (N ? "gap-0" : "gap-2"), "focus-within:border-transparent focus-within:outline-hidden focus-within:ring-2 focus-within:ring-ring", "data-disabled:cursor-not-allowed data-disabled:bg-muted data-disabled:text-muted-foreground"),
280
+ children: [
281
+ M && /* @__PURE__ */ f("span", {
282
+ className: t("ml-3", N ? "mr-2 min-w-0 flex-1 truncate" : "flex shrink-0 items-center"),
283
+ onMouseDown: N ? (e) => {
284
+ e.preventDefault(), P.current?.focus();
285
+ } : void 0,
286
+ children: j
287
+ }),
288
+ /* @__PURE__ */ f(m.Input, {
289
+ ref: P,
290
+ id: u,
291
+ className: t("h-full min-w-0 border-none bg-transparent outline-hidden placeholder:text-muted-foreground focus:ring-0 focus:outline-hidden disabled:cursor-not-allowed", M ? N ? "w-0 flex-none p-0" : "grow py-2 pl-0" : "grow py-2 pl-3"),
292
+ placeholder: a,
293
+ onKeyDown: g,
294
+ "aria-label": E,
295
+ "data-name": D,
296
+ "data-required": O,
297
+ "data-disabled": o
298
+ }),
299
+ /* @__PURE__ */ f(m.Trigger, {
300
+ className: "shrink-0 self-center rounded-md focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",
301
+ "aria-label": "Toggle options",
302
+ children: /* @__PURE__ */ f(x, {
303
+ className: "h-5 w-5 text-foreground",
304
+ "aria-hidden": "true"
305
+ })
285
306
  })
286
- })]
307
+ ]
287
308
  }), /* @__PURE__ */ f(m.Portal, { children: /* @__PURE__ */ f(m.Positioner, {
288
309
  className: "z-50",
289
310
  sideOffset: 8,
290
311
  children: /* @__PURE__ */ p(m.Popup, {
291
312
  className: "max-h-60 min-w-(--anchor-width) overflow-auto rounded-md border border-border bg-popover text-foreground shadow-lg outline-0",
292
- children: [/* @__PURE__ */ f(m.Empty, {
293
- className: "relative cursor-default select-none px-4 py-2 text-muted-foreground empty:hidden",
294
- children: "No values to show."
295
- }), /* @__PURE__ */ f(m.List, { children: (e) => /* @__PURE__ */ p(m.Item, {
296
- value: e,
297
- disabled: e.disabled,
298
- className: t("relative flex h-8 w-full cursor-default select-none items-center gap-2 border-b border-border px-4 py-1 last:border-b-0", "data-selected:font-medium data-selected:text-primary", "data-highlighted:bg-accent data-highlighted:text-primary", "data-disabled:cursor-not-allowed data-disabled:opacity-50"),
299
- children: [/* @__PURE__ */ f(m.ItemIndicator, {
300
- className: "flex items-center",
301
- children: /* @__PURE__ */ f(b, {
302
- className: "h-3 w-3",
303
- "aria-hidden": "true"
304
- })
305
- }), /* @__PURE__ */ f("span", {
306
- title: e.label,
307
- className: "block truncate",
308
- children: e.label
309
- })]
310
- }, e.key) })]
313
+ children: [
314
+ w && /* @__PURE__ */ f("div", {
315
+ role: "status",
316
+ className: "px-4 py-2 text-sm text-muted-foreground",
317
+ children: T
318
+ }),
319
+ /* @__PURE__ */ f(m.Empty, {
320
+ className: t("relative cursor-default select-none px-4 py-2 text-muted-foreground empty:hidden", w && "hidden"),
321
+ children: "No values to show."
322
+ }),
323
+ /* @__PURE__ */ f(m.List, { children: (e) => /* @__PURE__ */ p(m.Item, {
324
+ value: e,
325
+ disabled: e.disabled,
326
+ className: t("relative flex h-8 w-full cursor-default select-none items-center gap-2 border-b border-border px-4 py-1 last:border-b-0", "data-selected:font-medium data-selected:text-primary", "data-highlighted:bg-accent data-highlighted:text-primary", "data-disabled:cursor-not-allowed data-disabled:opacity-50"),
327
+ children: [/* @__PURE__ */ f(m.ItemIndicator, {
328
+ className: "flex items-center",
329
+ children: /* @__PURE__ */ f(b, {
330
+ className: "h-3 w-3",
331
+ "aria-hidden": "true"
332
+ })
333
+ }), y ? y(e) : /* @__PURE__ */ f("div", {
334
+ title: W(e),
335
+ className: "min-w-0 flex-1 truncate",
336
+ children: e.label
337
+ })]
338
+ }, e.key) })
339
+ ]
311
340
  })
312
341
  }) })]
313
342
  })
314
343
  });
315
- }, U = ({ data: e, className: n, ...r }) => {
344
+ }, G = ({ data: e, className: n, ...r }) => {
316
345
  let i = Array.isArray(e) ? e.join(", ") : typeof e == "string" ? e : null;
317
346
  return /* @__PURE__ */ f("em", {
318
347
  role: "alert",
@@ -322,7 +351,7 @@ var xe = ({ className: e, orientation: r = "horizontal", selectedVariant: o, chi
322
351
  children: i
323
352
  });
324
353
  }, Ae = /* @__PURE__ */ "*.+.×.÷.=.~.!.?.@.#.%.&.§.¶.※.◇.◆.○.●.△.▽.□.■.♠.♣.♦.♤.♧.♢.♪.♫.∴.∵".split(".");
325
- function W(e, t, n) {
354
+ function K(e, t, n) {
326
355
  let r = Math.sin((e + 1) * 12.9898 + t * 78.233 + n * 37.719) * 43758.5453;
327
356
  return r - Math.floor(r);
328
357
  }
@@ -387,10 +416,10 @@ var je = [
387
416
  gridTemplateRows: `repeat(${n}, minmax(0, 1fr))`
388
417
  },
389
418
  children: Array.from({ length: n * r }, (e, o) => /* @__PURE__ */ f("span", {
390
- className: t(Me({ shape: s === "mixed" ? y[o] ?? C[Math.floor(W(o, n, r) * C.length)] : s })),
419
+ className: t(Me({ shape: s === "mixed" ? y[o] ?? C[Math.floor(K(o, n, r) * C.length)] : s })),
391
420
  onAnimationIteration: () => {
392
421
  s === "mixed" && b((e) => {
393
- let t = [...e], i = t[o] ?? C[Math.floor(W(o, n, r) * C.length)], a = C.filter((e) => e !== i);
422
+ let t = [...e], i = t[o] ?? C[Math.floor(K(o, n, r) * C.length)], a = C.filter((e) => e !== i);
394
423
  return t[o] = a.length > 0 ? a[Math.floor(Math.random() * a.length)] : i, t;
395
424
  }), l.length > 1 && S((e) => {
396
425
  let t = [...e];
@@ -401,8 +430,8 @@ var je = [
401
430
  });
402
431
  },
403
432
  style: {
404
- animationDelay: l.length > 1 ? `${o / (n * r) * 1200}ms` : `${-W(o, n, r) * 1200}ms`,
405
- animationDuration: l.length > 1 ? "1200ms" : `${900 + W(o, n, r) * 600}ms`,
433
+ animationDelay: l.length > 1 ? `${o / (n * r) * 1200}ms` : `${-K(o, n, r) * 1200}ms`,
434
+ animationDuration: l.length > 1 ? "1200ms" : `${900 + K(o, n, r) * 600}ms`,
406
435
  backgroundColor: l.length > 0 ? l[(o + (x[o] ?? 0)) % l.length] : void 0,
407
436
  fontSize: `${Math.min(i / Math.max(n, r), a) * .4}px`,
408
437
  maxWidth: a,
@@ -415,7 +444,7 @@ var je = [
415
444
  }, o))
416
445
  })
417
446
  });
418
- }, G = ({ cardContent: e, children: n, trigger: r = "hover", triggerRender: i, side: a = "bottom", align: o = "center", className: s, open: c, onOpenChange: l }) => /* @__PURE__ */ p(A.Root, {
447
+ }, q = ({ cardContent: e, children: n, trigger: r = "hover", triggerRender: i, side: a = "bottom", align: o = "center", className: s, open: c, onOpenChange: l }) => /* @__PURE__ */ p(A.Root, {
419
448
  open: c,
420
449
  onOpenChange: l,
421
450
  children: [/* @__PURE__ */ f(A.Trigger, {
@@ -445,7 +474,7 @@ var je = [
445
474
  htmlFor: e,
446
475
  children: n
447
476
  }),
448
- r != null && r !== !1 && /* @__PURE__ */ f(G, {
477
+ r != null && r !== !1 && /* @__PURE__ */ f(q, {
449
478
  trigger: "hover",
450
479
  triggerRender: /* @__PURE__ */ f("button", {
451
480
  type: "button",
@@ -461,10 +490,10 @@ var je = [
461
490
  "aria-hidden": "true"
462
491
  })
463
492
  }),
464
- s && (Array.isArray(s) ? s.length > 0 && /* @__PURE__ */ f(U, { data: s }) : /* @__PURE__ */ f(U, { data: s }))
493
+ s && (Array.isArray(s) ? s.length > 0 && /* @__PURE__ */ f(G, { data: s }) : /* @__PURE__ */ f(G, { data: s }))
465
494
  ]
466
495
  });
467
- }, Fe = e("arc-input rounded border text-foreground placeholder:text-muted-foreground focus:border-transparent focus:outline-hidden focus:ring-2 focus:ring-ring disabled:cursor-not-allowed disabled:border-muted disabled:bg-muted", {
496
+ }, Fe = e("arc-input overflow-hidden rounded border text-foreground placeholder:text-muted-foreground focus:border-transparent focus:outline-hidden focus:ring-2 focus:ring-ring disabled:cursor-not-allowed disabled:border-muted disabled:bg-muted", {
468
497
  variants: {
469
498
  variant: {
470
499
  default: "border-border bg-background",
@@ -472,14 +501,14 @@ var je = [
472
501
  },
473
502
  as: {
474
503
  input: "h-8 pointer-coarse:h-9 p-1 pl-2",
475
- textarea: "min-h-50 max-h-250 resize-y overflow-auto! p-2 whitespace-pre-wrap"
504
+ textarea: "min-h-50 max-h-250 resize-y p-2 whitespace-pre-wrap"
476
505
  }
477
506
  },
478
507
  defaultVariants: {
479
508
  variant: "default",
480
509
  as: "input"
481
510
  }
482
- }), K = ({ as: e = "input", className: n, variant: r, ...i }) => {
511
+ }), J = ({ as: e = "input", className: n, variant: r, ...i }) => {
483
512
  let a = t(Fe({
484
513
  as: e,
485
514
  variant: r
@@ -501,7 +530,7 @@ var je = [
501
530
  "outline-warning": "border-warning bg-background text-warning"
502
531
  } },
503
532
  defaultVariants: { variant: "outline-secondary" }
504
- }), q = (e) => {
533
+ }), Y = (e) => {
505
534
  let { className: n, variant: r, hoverable: i = !0, hoverLift: a = !0, hoverBorder: o = !0, hoverGradient: s = !0, postHeaderBorder: c = !0, preFooterBorder: l = !0, onPointerMove: u, ...d } = e, p = i && a, m = i && o, h = i && s;
506
535
  return /* @__PURE__ */ f("div", {
507
536
  className: t(Ie({ variant: r }), h && "arc-card-cursor-border", c && "[&_.arc-card-header]:border-b", !c && "[&_.arc-card-header]:border-b-0", l && "[&_.arc-card-footer]:border-t", !l && "[&_.arc-card-footer]:border-t-0", (p || m) && "transition-[border-color,transform] duration-300 ease-out", p && "hover:-translate-y-1", m && "hover:border-primary", n),
@@ -513,19 +542,19 @@ var je = [
513
542
  ...d
514
543
  });
515
544
  };
516
- q.Header = (e) => {
545
+ Y.Header = (e) => {
517
546
  let { className: n, ...r } = e;
518
547
  return /* @__PURE__ */ f("h2", {
519
548
  className: t("arc-card-header flex w-full typography-heading-3 flex-col border-foreground/40 px-0 pb-1", n),
520
549
  ...r
521
550
  });
522
- }, q.Content = (e) => {
551
+ }, Y.Content = (e) => {
523
552
  let { className: n, ...r } = e;
524
553
  return /* @__PURE__ */ f("div", {
525
554
  className: t("arc-card-content typography-paragraph mt-0! w-full justify-between px-0 py-1 whitespace-pre-wrap", n),
526
555
  ...r
527
556
  });
528
- }, q.Footer = (e) => {
557
+ }, Y.Footer = (e) => {
529
558
  let { className: n, ...r } = e;
530
559
  return /* @__PURE__ */ f("div", {
531
560
  className: t("arc-card-footer typography-muted mt-auto mb-0 flex w-full items-end justify-start border-foreground/40 px-0 pt-1", n),
@@ -640,7 +669,7 @@ var Le = class e {
640
669
  }
641
670
  }, Re = ({ value: e, format: t = "$ISO$ ($RELATIVE$)", ...n }) => {
642
671
  let r = c(() => e ? Le.getFormattedTime(e, t) : "", [e, t]);
643
- return /* @__PURE__ */ f(K, {
672
+ return /* @__PURE__ */ f(J, {
644
673
  type: "text",
645
674
  disabled: !0,
646
675
  readOnly: !0,
@@ -749,7 +778,7 @@ var Le = class e {
749
778
  "outline-destructive": "bg-destructive text-destructive-foreground ring-2 ring-destructive ring-offset-2",
750
779
  "outline-ghost": "bg-accent text-accent-foreground ring-2 ring-ring ring-offset-2",
751
780
  "outline-warning": "bg-warning text-warning-foreground ring-2 ring-warning ring-offset-2"
752
- }, J = ({ active: e = !1, className: n, size: r = "md", variant: i = "pill", ...a }) => /* @__PURE__ */ f("button", {
781
+ }, X = ({ active: e = !1, className: n, size: r = "md", variant: i = "pill", ...a }) => /* @__PURE__ */ f("button", {
753
782
  type: "button",
754
783
  className: t(Ve({
755
784
  variant: i,
@@ -757,12 +786,12 @@ var Le = class e {
757
786
  }), e && He[i], n),
758
787
  "aria-pressed": e,
759
788
  ...a
760
- }), Ue = ({ children: e }) => n.toArray(e).map((e, t) => /* @__PURE__ */ p(r, { children: [t > 0 && /* @__PURE__ */ f(M.Separator, { className: "mx-2 h-px bg-border" }), e] }, t)), Y = Object.assign(({ className: e, contentClassName: n, active: r, activeClassName: i, buttonText: a, children: o }) => /* @__PURE__ */ p(M.Root, {
789
+ }), Ue = ({ children: e }) => n.toArray(e).map((e, t) => /* @__PURE__ */ p(r, { children: [t > 0 && /* @__PURE__ */ f(M.Separator, { className: "mx-2 h-px bg-border" }), e] }, t)), Z = Object.assign(({ className: e, contentClassName: n, active: r, activeClassName: i, buttonText: a, children: o }) => /* @__PURE__ */ p(M.Root, {
761
790
  loopFocus: !0,
762
791
  children: [/* @__PURE__ */ p(M.Trigger, {
763
- render: /* @__PURE__ */ f(J, {
792
+ render: /* @__PURE__ */ f(X, {
764
793
  active: r,
765
- className: t("w-fit", r && i, e)
794
+ className: t("w-fit", !r && "text-foreground!", r && i, e)
766
795
  }),
767
796
  children: [a, /* @__PURE__ */ f(N, {
768
797
  className: "-mr-1 ml-2 h-4 w-4",
@@ -779,20 +808,21 @@ var Le = class e {
779
808
  }) })]
780
809
  }), {
781
810
  Item: ({ active: e, asChild: r = !1, className: i, nativeButton: o, children: s, ...c }) => {
782
- let l = t("flex min-h-10 pointer-coarse:min-h-11 w-full cursor-default items-center justify-start rounded-md border border-transparent px-3 py-2 text-base font-medium text-foreground outline-none select-none", "data-highlighted:bg-accent data-highlighted:text-primary", "focus-visible:ring-0", e && "text-primary!", i);
811
+ let l;
783
812
  if (r) {
784
813
  let e = n.only(s);
785
814
  if (!a(e)) throw Error("Menu.Item with asChild requires a single React element child.");
786
- return /* @__PURE__ */ f(M.Item, {
787
- ...c,
788
- className: l,
789
- nativeButton: o ?? !0,
790
- render: e
791
- });
815
+ l = e;
792
816
  }
793
- return /* @__PURE__ */ f(M.Item, {
817
+ let u = l !== void 0 && a(l) && l.props.active === !0, d = t("flex min-h-10 pointer-coarse:min-h-11 w-full cursor-default items-center justify-start rounded-md border border-transparent px-3 py-2 text-base font-medium text-foreground! outline-none select-none", "data-highlighted:bg-accent data-highlighted:text-primary", "focus-visible:ring-0", !!(e || u) && "text-primary!", i);
818
+ return l ? /* @__PURE__ */ f(M.Item, {
794
819
  ...c,
795
- className: l,
820
+ className: d,
821
+ nativeButton: o ?? !0,
822
+ render: l
823
+ }) : /* @__PURE__ */ f(M.Item, {
824
+ ...c,
825
+ className: d,
796
826
  nativeButton: o,
797
827
  children: s
798
828
  });
@@ -868,7 +898,7 @@ var Le = class e {
868
898
  onValueChange: (e) => {
869
899
  l && e.length === 0 || i?.(e);
870
900
  },
871
- itemToStringLabel: (e) => e?.label ?? "",
901
+ itemToStringLabel: (e) => e ? W(e) : "",
872
902
  itemToStringValue: (e) => String(e?.key ?? ""),
873
903
  isItemEqualToValue: (e, t) => String(e.key) === String(t.key),
874
904
  name: c,
@@ -876,7 +906,7 @@ var Le = class e {
876
906
  children: /* @__PURE__ */ p("div", {
877
907
  className: t("arc-dropdown-multi relative", a),
878
908
  children: [/* @__PURE__ */ p(m.InputGroup, {
879
- className: t("relative flex min-h-8 w-full items-center justify-between gap-1.5 rounded border border-border bg-background py-1 pr-2 pl-2 text-foreground shadow-xs pointer-coarse:min-h-9", "focus-within:border-transparent focus-within:outline-hidden focus-within:ring-2 focus-within:ring-ring", "data-disabled:cursor-not-allowed data-disabled:bg-muted data-disabled:text-muted-foreground"),
909
+ className: t("relative flex min-h-8 w-full items-center justify-between gap-1.5 overflow-hidden rounded border border-border bg-background py-1 pr-2 pl-2 text-foreground shadow-xs pointer-coarse:min-h-9", "focus-within:border-transparent focus-within:outline-hidden focus-within:ring-2 focus-within:ring-ring", "data-disabled:cursor-not-allowed data-disabled:bg-muted data-disabled:text-muted-foreground"),
880
910
  children: [/* @__PURE__ */ f(m.Value, { children: (n) => /* @__PURE__ */ p("div", {
881
911
  className: "flex min-w-0 grow flex-wrap items-center gap-1.5",
882
912
  children: [/* @__PURE__ */ f(m.Chips, {
@@ -884,11 +914,12 @@ var Le = class e {
884
914
  children: n.map((e) => /* @__PURE__ */ p(m.Chip, {
885
915
  className: "inline-flex items-center gap-1 rounded-md border border-border bg-muted px-2 py-0.5 text-sm text-foreground",
886
916
  children: [/* @__PURE__ */ f("span", {
917
+ title: W(e),
887
918
  className: "max-w-32 truncate",
888
919
  children: e.label
889
920
  }), !s && (!l || n.length > 1) && /* @__PURE__ */ f(m.ChipRemove, {
890
921
  className: "ml-0.5 cursor-pointer rounded-md hover:text-destructive focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",
891
- "aria-label": `Remove ${e.label}`,
922
+ "aria-label": `Remove ${W(e)}`,
892
923
  children: /* @__PURE__ */ f(z, {
893
924
  className: "h-3 w-3",
894
925
  "aria-hidden": "true"
@@ -929,9 +960,9 @@ var Le = class e {
929
960
  className: "h-3 w-3",
930
961
  "aria-hidden": "true"
931
962
  })
932
- }), /* @__PURE__ */ f("span", {
933
- title: e.label,
934
- className: "block truncate",
963
+ }), /* @__PURE__ */ f("div", {
964
+ title: W(e),
965
+ className: "min-w-0 flex-1 truncate",
935
966
  children: e.label
936
967
  })]
937
968
  }, e.key) })]
@@ -939,23 +970,27 @@ var Le = class e {
939
970
  }) })]
940
971
  })
941
972
  });
942
- }, X = ({ id: e, value: n, onChange: r, data: i, className: a, disabled: o, placeholder: s, ...c }) => /* @__PURE__ */ p(B.Root, {
973
+ }, Q = ({ id: e, value: n, onChange: r, data: i, className: a, disabled: o, placeholder: s, ...c }) => /* @__PURE__ */ p(B.Root, {
943
974
  value: n,
944
975
  onValueChange: (e) => {
945
976
  e !== null && r(e);
946
977
  },
947
978
  disabled: o,
948
- items: i.map((e) => ({
949
- value: e.key,
950
- label: typeof e.label == "string" ? e.label : e.key
951
- })),
979
+ items: i.map((e) => {
980
+ let t = e.labelTextValue ?? (typeof e.label == "string" || typeof e.label == "number" ? String(e.label) : U(e.label) || e.key);
981
+ return {
982
+ value: e.key,
983
+ label: t
984
+ };
985
+ }),
952
986
  ...c,
953
987
  children: [/* @__PURE__ */ p(B.Trigger, {
954
988
  id: e,
955
989
  className: t("arc-select flex h-8 w-full items-center gap-2 overflow-hidden rounded border border-border bg-background px-2 py-1 text-foreground shadow-xs focus:outline-none focus-visible:ring-2 focus-visible:ring-ring pointer-coarse:h-9", "disabled:cursor-not-allowed disabled:bg-muted disabled:text-muted-foreground", a),
956
990
  children: [/* @__PURE__ */ f(B.Value, {
957
991
  placeholder: s,
958
- className: "min-w-0 flex-1 truncate text-left"
992
+ className: "min-w-0 flex-1 truncate text-left",
993
+ children: (e) => i.find((t) => t.key === e)?.label ?? s
959
994
  }), /* @__PURE__ */ f(B.Icon, {
960
995
  className: "shrink-0",
961
996
  children: /* @__PURE__ */ f(x, {
@@ -1002,7 +1037,7 @@ var Le = class e {
1002
1037
  ...n
1003
1038
  }), Ye = ({ className: e, variant: n = "outline", size: r, ...i }) => /* @__PURE__ */ f(V.Tab, {
1004
1039
  className: e,
1005
- render: (e, i) => /* @__PURE__ */ f(J, {
1040
+ render: (e, i) => /* @__PURE__ */ f(X, {
1006
1041
  ...e,
1007
1042
  "aria-pressed": void 0,
1008
1043
  variant: n,
@@ -1045,14 +1080,14 @@ var Le = class e {
1045
1080
  }), Qe = (e, t, n, r) => {
1046
1081
  let i = e.getValue(t), a = ee(i, n);
1047
1082
  return r({ itemRank: a }), a.passed;
1048
- }, Z = {
1083
+ }, $e = {
1049
1084
  fuzzy: Qe,
1050
1085
  includesString: ce,
1051
1086
  select: (e, t, n) => {
1052
1087
  let r = e.getValue(t);
1053
1088
  return Array.isArray(r) ? r.some((e) => String(e) === String(n)) : typeof r == "string" && r.includes(",") ? r.split(",").map((e) => e.trim()).includes(String(n)) : String(r) === String(n);
1054
1089
  }
1055
- }, Q = ve({
1090
+ }, et = ve({
1056
1091
  columnMeta: {},
1057
1092
  columnFilteringFeature: te,
1058
1093
  columnResizingFeature: ne,
@@ -1072,23 +1107,23 @@ var Le = class e {
1072
1107
  text: ge,
1073
1108
  textCaseSensitive: _e
1074
1109
  },
1075
- filterFns: Z
1110
+ filterFns: $e
1076
1111
  });
1077
- function $e(e) {
1078
- return Object.prototype.hasOwnProperty.call(Z, e);
1112
+ function tt(e) {
1113
+ return Object.prototype.hasOwnProperty.call($e, e);
1079
1114
  }
1080
- function et(e, t) {
1115
+ function nt(e, t) {
1081
1116
  if (e !== !1) {
1082
1117
  if (e === void 0) return t ? "select" : void 0;
1083
- if (typeof e == "function" || e === "auto" || $e(e)) return e;
1084
- throw Error(`Unsupported table filterFn "${e}". Use "auto" or one of: ${Object.keys(Z).join(", ")}.`);
1118
+ if (typeof e == "function" || e === "auto" || tt(e)) return e;
1119
+ throw Error(`Unsupported table filterFn "${e}". Use "auto" or one of: ${Object.keys($e).join(", ")}.`);
1085
1120
  }
1086
1121
  }
1087
- function tt(e) {
1088
- if (e === void 0 || e === "auto" || typeof e == "function" || Object.prototype.hasOwnProperty.call(Q.sortFns, e)) return e;
1089
- throw Error(`Unsupported table sortingFn "${e}". Use "auto" or one of: ${Object.keys(Q.sortFns).join(", ")}.`);
1122
+ function rt(e) {
1123
+ if (e === void 0 || e === "auto" || typeof e == "function" || Object.prototype.hasOwnProperty.call(et.sortFns, e)) return e;
1124
+ throw Error(`Unsupported table sortingFn "${e}". Use "auto" or one of: ${Object.keys(et.sortFns).join(", ")}.`);
1090
1125
  }
1091
- var nt = ({ data: e, columnDef: n, pageSize: r = 10, className: i, showHeader: a = !0, showFilters: o = !0, showSorting: l = !0 }) => {
1126
+ var it = ({ data: e, columnDef: n, pageSize: r = 10, className: i, showHeader: a = !0, showFilters: o = !0, showSorting: l = !0 }) => {
1092
1127
  let d = s(), [m, b] = u({
1093
1128
  pageIndex: 0,
1094
1129
  pageSize: r
@@ -1098,13 +1133,13 @@ var nt = ({ data: e, columnDef: n, pageSize: r = 10, className: i, showHeader: a
1098
1133
  enableResizing: e.enableResizing,
1099
1134
  enableColumnFilter: e.filterFn !== !1 && e.enableColumnFilter,
1100
1135
  enableSorting: e.enableSorting,
1101
- sortFn: tt(e.sortingFn),
1136
+ sortFn: rt(e.sortingFn),
1102
1137
  ...e.sortUndefined === void 0 ? {} : { sortUndefined: e.sortUndefined },
1103
1138
  enableHiding: e.enableHiding ?? !0,
1104
1139
  size: e.size,
1105
1140
  minSize: e.minSize ?? 50,
1106
1141
  maxSize: e.maxSize ?? 1e3,
1107
- filterFn: et(e.filterFn, e.filterSelectOptions),
1142
+ filterFn: nt(e.filterFn, e.filterSelectOptions),
1108
1143
  meta: {
1109
1144
  headerLabel: e.header,
1110
1145
  filterSelectOptions: e.filterSelectOptions,
@@ -1159,7 +1194,7 @@ var nt = ({ data: e, columnDef: n, pageSize: r = 10, className: i, showHeader: a
1159
1194
  onColumnFiltersChange: w,
1160
1195
  onGlobalFilterChange: D,
1161
1196
  globalFilterFn: Qe,
1162
- features: Q,
1197
+ features: et,
1163
1198
  defaultColumn: {
1164
1199
  size: 200,
1165
1200
  minSize: 50,
@@ -1184,7 +1219,7 @@ var nt = ({ data: e, columnDef: n, pageSize: r = 10, className: i, showHeader: a
1184
1219
  title: "Clear filters and sorting",
1185
1220
  type: "button",
1186
1221
  children: [/* @__PURE__ */ f(E, { className: "mr-1.5 h-3 w-3" }), "Clear filters and sorting"]
1187
- }), /* @__PURE__ */ f(at, { table: P })]
1222
+ }), /* @__PURE__ */ f(st, { table: P })]
1188
1223
  }),
1189
1224
  /* @__PURE__ */ p("nav", {
1190
1225
  "aria-label": "Table pagination",
@@ -1293,7 +1328,7 @@ var nt = ({ data: e, columnDef: n, pageSize: r = 10, className: i, showHeader: a
1293
1328
  /* @__PURE__ */ p("label", {
1294
1329
  htmlFor: `${d}-page-size`,
1295
1330
  className: "text-muted-foreground flex w-full items-center justify-between gap-2 text-xs md:w-auto",
1296
- children: ["Rows per page", /* @__PURE__ */ f(X, {
1331
+ children: ["Rows per page", /* @__PURE__ */ f(Q, {
1297
1332
  id: `${d}-page-size`,
1298
1333
  value: P.state.pagination.pageSize.toString(),
1299
1334
  onChange: (e) => {
@@ -1332,7 +1367,7 @@ var nt = ({ data: e, columnDef: n, pageSize: r = 10, className: i, showHeader: a
1332
1367
  htmlFor: `${d}-sort`,
1333
1368
  className: "text-muted-foreground mb-1 block text-xs font-medium",
1334
1369
  children: "Sort by"
1335
- }), /* @__PURE__ */ f(X, {
1370
+ }), /* @__PURE__ */ f(Q, {
1336
1371
  id: `${d}-sort`,
1337
1372
  value: O[0]?.id ?? "__none__",
1338
1373
  onChange: (e) => {
@@ -1376,7 +1411,7 @@ var nt = ({ data: e, columnDef: n, pageSize: r = 10, className: i, showHeader: a
1376
1411
  htmlFor: n,
1377
1412
  className: "text-muted-foreground mb-1 block text-xs font-medium",
1378
1413
  children: t
1379
- }), /* @__PURE__ */ f(it, {
1414
+ }), /* @__PURE__ */ f(ot, {
1380
1415
  column: e,
1381
1416
  idPrefix: `${d}-`
1382
1417
  })]
@@ -1446,7 +1481,7 @@ var nt = ({ data: e, columnDef: n, pageSize: r = 10, className: i, showHeader: a
1446
1481
  ]
1447
1482
  });
1448
1483
  };
1449
- function rt({ value: e, onChange: t, debounce: n = 500, ...r }) {
1484
+ function at({ value: e, onChange: t, debounce: n = 500, ...r }) {
1450
1485
  let [i, a] = u(e);
1451
1486
  return o(() => {
1452
1487
  a(e);
@@ -1459,14 +1494,14 @@ function rt({ value: e, onChange: t, debounce: n = 500, ...r }) {
1459
1494
  i,
1460
1495
  n,
1461
1496
  t
1462
- ]), /* @__PURE__ */ f(K, {
1497
+ ]), /* @__PURE__ */ f(J, {
1463
1498
  ...r,
1464
1499
  value: i,
1465
1500
  onChange: (e) => a(e.target.value),
1466
1501
  autoComplete: "off"
1467
1502
  });
1468
1503
  }
1469
- function it({ column: e, idPrefix: t = "" }) {
1504
+ function ot({ column: e, idPrefix: t = "" }) {
1470
1505
  let n = `${t}${e.id}-filter`, r = {
1471
1506
  includesString: "Includes string",
1472
1507
  equalsString: "Equals string",
@@ -1474,7 +1509,7 @@ function it({ column: e, idPrefix: t = "" }) {
1474
1509
  equals: "Equals",
1475
1510
  fuzzy: "Fuzzy"
1476
1511
  }, i = e.getFilterValue(), a = e.columnDef.meta?.filterSelectOptions;
1477
- return a ? /* @__PURE__ */ f(X, {
1512
+ return a ? /* @__PURE__ */ f(Q, {
1478
1513
  id: n,
1479
1514
  value: i ?? "__all__",
1480
1515
  onChange: (t) => e.setFilterValue(t === "__all__" ? void 0 : t),
@@ -1486,7 +1521,7 @@ function it({ column: e, idPrefix: t = "" }) {
1486
1521
  key: e.value,
1487
1522
  label: e.label
1488
1523
  }))]
1489
- }) : /* @__PURE__ */ f(rt, {
1524
+ }) : /* @__PURE__ */ f(at, {
1490
1525
  id: n,
1491
1526
  type: "text",
1492
1527
  name: e.id,
@@ -1497,8 +1532,8 @@ function it({ column: e, idPrefix: t = "" }) {
1497
1532
  className: "border-border text-foreground placeholder:text-muted-foreground focus:ring-ring w-full rounded border bg-transparent px-2 py-1 text-xs shadow-sm focus:border-transparent focus:ring-1 focus:outline-hidden"
1498
1533
  });
1499
1534
  }
1500
- function at({ table: e }) {
1501
- return /* @__PURE__ */ p(G, {
1535
+ function st({ table: e }) {
1536
+ return /* @__PURE__ */ p(q, {
1502
1537
  trigger: "click",
1503
1538
  triggerRender: /* @__PURE__ */ f(H, {
1504
1539
  variant: "outline-secondary",
@@ -1528,31 +1563,31 @@ function at({ table: e }) {
1528
1563
  });
1529
1564
  }
1530
1565
  // components/text-link.tsx
1531
- var ot = ({ className: e, href: n, text: r, target: i = "_blank", rel: a, ...o }) => /* @__PURE__ */ f("a", {
1566
+ var ct = ({ className: e, href: n, text: r, target: i = "_blank", rel: a, ...o }) => /* @__PURE__ */ f("a", {
1532
1567
  className: t("arc-text-link rounded-md text-primary underline transition hover:text-primary/80 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-opacity-75", e),
1533
1568
  href: n,
1534
1569
  target: i,
1535
1570
  rel: a ?? (i === "_blank" ? "noopener noreferrer" : void 0),
1536
1571
  ...o,
1537
1572
  children: r
1538
- }), st = ({ checked: e = !1, onChange: n, disabled: r = !1, variant: i = "primary", children: a, ...o }) => /* @__PURE__ */ f(be.Root, {
1573
+ }), lt = ({ checked: e = !1, onChange: n, disabled: r = !1, variant: i = "primary", children: a, ...o }) => /* @__PURE__ */ f(be.Root, {
1539
1574
  checked: e,
1540
1575
  disabled: r,
1541
1576
  onCheckedChange: n,
1542
- className: t("arc-switch", ct({
1577
+ className: t("arc-switch", ut({
1543
1578
  variant: i,
1544
1579
  disabled: r
1545
1580
  })),
1546
1581
  ...o,
1547
1582
  children: a ? a(e) : /* @__PURE__ */ f(be.Thumb, {
1548
1583
  "aria-hidden": "true",
1549
- className: lt({
1584
+ className: dt({
1550
1585
  variant: i,
1551
1586
  checked: e,
1552
1587
  disabled: r
1553
1588
  })
1554
1589
  })
1555
- }), ct = e("relative inline-flex h-7 w-12 items-center rounded-full border border-border bg-muted transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 hover:not-data-disabled:ring-2 hover:not-data-disabled:ring-ring/60 data-disabled:cursor-not-allowed data-disabled:opacity-60", { variants: {
1590
+ }), ut = e("relative inline-flex h-7 w-12 items-center rounded-full border border-border bg-muted transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 hover:not-data-disabled:ring-2 hover:not-data-disabled:ring-ring/60 data-disabled:cursor-not-allowed data-disabled:opacity-60", { variants: {
1556
1591
  variant: {
1557
1592
  danger: "data-checked:bg-destructive",
1558
1593
  success: "data-checked:bg-success",
@@ -1563,7 +1598,7 @@ var ot = ({ className: e, href: n, text: r, target: i = "_blank", rel: a, ...o }
1563
1598
  true: "ring-2 ring-border",
1564
1599
  false: ""
1565
1600
  }
1566
- } }), lt = e("absolute top-1/2 inline-block h-5 w-5 -translate-y-1/2 transform rounded-full border shadow-sm transition-[left,translate,background-color,border-color] duration-300 ease-out", {
1601
+ } }), dt = e("absolute top-1/2 inline-block h-5 w-5 -translate-y-1/2 transform rounded-full border shadow-sm transition-[left,translate,background-color,border-color] duration-300 ease-out", {
1567
1602
  variants: {
1568
1603
  variant: {
1569
1604
  primary: "",
@@ -1656,7 +1691,7 @@ var ot = ({ className: e, href: n, text: r, target: i = "_blank", rel: a, ...o }
1656
1691
  className: "border-success bg-success/70"
1657
1692
  }
1658
1693
  ]
1659
- }), ut = {
1694
+ }), ft = {
1660
1695
  light: L,
1661
1696
  dark: I,
1662
1697
  system: F
@@ -1664,25 +1699,25 @@ var ot = ({ className: e, href: n, text: r, target: i = "_blank", rel: a, ...o }
1664
1699
  light: "Light",
1665
1700
  dark: "Dark",
1666
1701
  system: "System"
1667
- }, dt = "theme", ft = (e) => e === "dark" || e === "system" && typeof window < "u" && window.matchMedia("(prefers-color-scheme: dark)").matches, pt = () => {
1702
+ }, pt = "theme", mt = (e) => e === "dark" || e === "system" && typeof window < "u" && window.matchMedia("(prefers-color-scheme: dark)").matches, ht = () => {
1668
1703
  if (typeof window > "u") return "system";
1669
- let e = window.localStorage.getItem(dt);
1704
+ let e = window.localStorage.getItem(pt);
1670
1705
  return e === "light" || e === "dark" || e === "system" ? e : "system";
1671
- }, mt = (e) => e === "system" ? "light" : e === "light" ? "dark" : "system";
1672
- function ht({ variant: e = "dropdown", showLabel: n = !1 }) {
1673
- let [r, i] = u(pt);
1706
+ }, gt = (e) => e === "system" ? "light" : e === "light" ? "dark" : "system";
1707
+ function _t({ variant: e = "dropdown", showLabel: n = !1 }) {
1708
+ let [r, i] = u(ht);
1674
1709
  o(() => {
1675
- typeof window < "u" && (document.documentElement.classList.toggle("dark", ft(r)), window.localStorage.setItem(dt, r));
1710
+ typeof window < "u" && (document.documentElement.classList.toggle("dark", mt(r)), window.localStorage.setItem(pt, r));
1676
1711
  }, [r]);
1677
1712
  let a = () => {
1678
- i(mt(r));
1713
+ i(gt(r));
1679
1714
  };
1680
1715
  if (e === "toggle") {
1681
- let e = ut[r], t = mt(r);
1716
+ let e = ft[r], t = gt(r);
1682
1717
  return /* @__PURE__ */ f("div", {
1683
1718
  className: "arc-theme-switcher",
1684
- children: /* @__PURE__ */ p(J, {
1685
- active: ft(r),
1719
+ children: /* @__PURE__ */ p(X, {
1720
+ active: mt(r),
1686
1721
  "aria-label": `Switch to ${t} theme`,
1687
1722
  title: `Switch to ${t} theme`,
1688
1723
  onClick: a,
@@ -1691,18 +1726,18 @@ function ht({ variant: e = "dropdown", showLabel: n = !1 }) {
1691
1726
  })
1692
1727
  });
1693
1728
  }
1694
- let s = ut[r];
1729
+ let s = ft[r];
1695
1730
  return /* @__PURE__ */ f("div", {
1696
1731
  className: "arc-theme-switcher",
1697
- children: /* @__PURE__ */ p(Y, {
1732
+ children: /* @__PURE__ */ p(Z, {
1698
1733
  className: "gap-3",
1699
1734
  contentClassName: "min-w-(--anchor-width)",
1700
1735
  buttonText: /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(s, { "aria-hidden": "true" }), n && $[r]] }),
1701
1736
  children: [
1702
- /* @__PURE__ */ f(Y.Item, {
1737
+ /* @__PURE__ */ f(Z.Item, {
1703
1738
  asChild: !0,
1704
1739
  className: t("border-0! focus-visible:outline-none", n ? "px-3!" : "justify-center! p-0!"),
1705
- children: /* @__PURE__ */ p(J, {
1740
+ children: /* @__PURE__ */ p(X, {
1706
1741
  active: r === "system",
1707
1742
  title: "System Theme",
1708
1743
  onClick: () => {
@@ -1715,10 +1750,10 @@ function ht({ variant: e = "dropdown", showLabel: n = !1 }) {
1715
1750
  }), n && $.system]
1716
1751
  })
1717
1752
  }),
1718
- /* @__PURE__ */ f(Y.Item, {
1753
+ /* @__PURE__ */ f(Z.Item, {
1719
1754
  asChild: !0,
1720
1755
  className: t("border-0! focus-visible:outline-none", n ? "px-3!" : "justify-center! p-0!"),
1721
- children: /* @__PURE__ */ p(J, {
1756
+ children: /* @__PURE__ */ p(X, {
1722
1757
  active: r === "light",
1723
1758
  title: "Light Theme",
1724
1759
  onClick: () => {
@@ -1731,10 +1766,10 @@ function ht({ variant: e = "dropdown", showLabel: n = !1 }) {
1731
1766
  }), n && $.light]
1732
1767
  })
1733
1768
  }),
1734
- /* @__PURE__ */ f(Y.Item, {
1769
+ /* @__PURE__ */ f(Z.Item, {
1735
1770
  asChild: !0,
1736
1771
  className: t("border-0! focus-visible:outline-none", n ? "px-3!" : "justify-center! p-0!"),
1737
- children: /* @__PURE__ */ p(J, {
1772
+ children: /* @__PURE__ */ p(X, {
1738
1773
  active: r === "dark",
1739
1774
  title: "Dark Theme",
1740
1775
  onClick: () => {
@@ -1752,16 +1787,16 @@ function ht({ variant: e = "dropdown", showLabel: n = !1 }) {
1752
1787
  });
1753
1788
  }
1754
1789
  // components/typing-animation.tsx
1755
- function gt(e) {
1790
+ function vt(e) {
1756
1791
  return e === "newline" ? "\n" : e === "comma" ? ", " : "";
1757
1792
  }
1758
- function _t(e, t, n, r, i) {
1793
+ function yt(e, t, n, r, i) {
1759
1794
  if (r === "character") return Math.max(0, Math.min(e.length, t + n * i));
1760
1795
  let a = [...e.matchAll(/\S+\s*/g)].map((e) => e.index + e[0].length), o = t;
1761
1796
  for (let t = 0; t < n; t += 1) o = i === 1 ? a.find((e) => e > o) ?? e.length : [...a].reverse().find((e) => e < o) ?? 0;
1762
1797
  return o;
1763
1798
  }
1764
- function vt({ strings: e, placeholder: t, perTick: n = {
1799
+ function bt({ strings: e, placeholder: t, perTick: n = {
1765
1800
  amount: 1,
1766
1801
  unit: "character"
1767
1802
  }, msDelay: r = {
@@ -1806,9 +1841,9 @@ function vt({ strings: e, placeholder: t, perTick: n = {
1806
1841
  T([]), C(""), N.current += 1, P.current = 0, t = setTimeout(r, _);
1807
1842
  return;
1808
1843
  }
1809
- if (L.current) P.current = _t(i, P.current, b, x, -1), C(i.slice(0, P.current)), P.current === 0 && (L.current = !1, N.current = (N.current + 1) % e.length);
1844
+ if (L.current) P.current = yt(i, P.current, b, x, -1), C(i.slice(0, P.current)), P.current === 0 && (L.current = !1, N.current = (N.current + 1) % e.length);
1810
1845
  else {
1811
- if (P.current = _t(i, P.current, b, x, 1), C(i.slice(0, P.current)), L.current = !n && P.current === i.length && (s || N.current < e.length - 1), !n && P.current === i.length && !L.current && !s) {
1846
+ if (P.current = yt(i, P.current, b, x, 1), C(i.slice(0, P.current)), L.current = !n && P.current === i.length && (s || N.current < e.length - 1), !n && P.current === i.length && !L.current && !s) {
1812
1847
  k(!0);
1813
1848
  return;
1814
1849
  }
@@ -1841,7 +1876,7 @@ function vt({ strings: e, placeholder: t, perTick: n = {
1841
1876
  O,
1842
1877
  v
1843
1878
  ]);
1844
- let R = A ? "." : "", z = d !== "clear", B = gt(d), V = w.reduce((e, t) => e + t.split("\n").length, 0);
1879
+ let R = A ? "." : "", z = d !== "clear", B = vt(d), V = w.reduce((e, t) => e + t.split("\n").length, 0);
1845
1880
  return z ? /* @__PURE__ */ f("div", {
1846
1881
  ref: (e) => {
1847
1882
  M.current = e;
@@ -1872,7 +1907,7 @@ function vt({ strings: e, placeholder: t, perTick: n = {
1872
1907
  });
1873
1908
  }
1874
1909
  // utilities/hash-navigation.ts
1875
- function yt({ intervalMs: e = 500, maxAttempts: t = 20, behavior: n = "smooth", block: r } = {}) {
1910
+ function xt({ intervalMs: e = 500, maxAttempts: t = 20, behavior: n = "smooth", block: r } = {}) {
1876
1911
  if (typeof window > "u") return () => {};
1877
1912
  let i = 0, a = setInterval(() => {
1878
1913
  i += 1;
@@ -1890,10 +1925,10 @@ function yt({ intervalMs: e = 500, maxAttempts: t = 20, behavior: n = "smooth",
1890
1925
  }, e);
1891
1926
  return () => clearInterval(a);
1892
1927
  }
1893
- function bt(e) {
1894
- o(() => yt(e), []);
1928
+ function St(e) {
1929
+ o(() => xt(e), []);
1895
1930
  }
1896
- function xt({ container: e, sectionIds: t, hashFirstSection: n = !0, onActiveChange: r }) {
1931
+ function Ct({ container: e, sectionIds: t, hashFirstSection: n = !0, onActiveChange: r }) {
1897
1932
  let i = t.map((e) => document.getElementById(e)).filter((e) => e !== null), a = window.location.hash.toLowerCase().slice(1) || null, o = () => {
1898
1933
  let t = e.getBoundingClientRect(), o = t.top + t.height / 2, s = i.find((e) => {
1899
1934
  let t = e.getBoundingClientRect();
@@ -1905,4 +1940,4 @@ function xt({ container: e, sectionIds: t, hashFirstSection: n = !0, onActiveCha
1905
1940
  };
1906
1941
  return o(), e.addEventListener("scroll", o, { passive: !0 }), () => e.removeEventListener("scroll", o);
1907
1942
  }
1908
- export { De as Avatar, H as Button, xe as ButtonGroup, q as Card, Le as DateHandler, Oe as Divider, Ce as DoubleClickButton, ke as Dropdown, U as ErrorText, Ne as GridLoader, K as Input, Re as InputTimestamp, Pe as LabelField, we as LongPressButton, Y as Menu, We as Modal, Ge as MultiDropdown, J as Pill, Be as PillLink, G as PreviewCard, X as Select, st as Switch, nt as Table, Ke as Tabs, qe as TabsList, Je as TabsPanel, Ye as TabsTab, Ze as Tag, ot as TextLink, ht as ThemeSwitcher, vt as TypingAnimation, yt as navigateToHashOnLoad, xt as updateHashOnScroll, bt as useHashNavigationOnLoad };
1943
+ export { De as Avatar, H as Button, xe as ButtonGroup, Y as Card, Le as DateHandler, Oe as Divider, Ce as DoubleClickButton, ke as Dropdown, G as ErrorText, Ne as GridLoader, J as Input, Re as InputTimestamp, Pe as LabelField, we as LongPressButton, Z as Menu, We as Modal, Ge as MultiDropdown, X as Pill, Be as PillLink, q as PreviewCard, Q as Select, lt as Switch, it as Table, Ke as Tabs, qe as TabsList, Je as TabsPanel, Ye as TabsTab, Ze as Tag, ct as TextLink, _t as ThemeSwitcher, bt as TypingAnimation, xt as navigateToHashOnLoad, Ct as updateHashOnScroll, St as useHashNavigationOnLoad };
@@ -1,8 +1,12 @@
1
+ import { KeyboardEventHandler, ReactNode } from 'react';
1
2
  export type DropdownItem = {
2
3
  key: string | number;
3
- label: string;
4
+ label: ReactNode;
5
+ labelTextValue?: string;
4
6
  disabled?: boolean;
5
7
  };
8
+ export declare const getReactNodeText: (node: ReactNode) => string;
9
+ export declare const getDropdownItemText: (item: DropdownItem) => string;
6
10
  export interface DropdownProps {
7
11
  items: DropdownItem[];
8
12
  value: number | string;
@@ -12,8 +16,20 @@ export interface DropdownProps {
12
16
  disabled?: boolean;
13
17
  name?: string;
14
18
  preventEmpty?: boolean;
19
+ id?: string;
20
+ inputValue?: string;
21
+ onInputValueChange?: (inputValue: string) => void;
22
+ onKeyDown?: KeyboardEventHandler<HTMLInputElement>;
23
+ open?: boolean;
24
+ onOpenChange?: (open: boolean) => void;
25
+ renderItem?: (item: DropdownItem) => ReactNode;
26
+ renderValue?: (item: DropdownItem) => ReactNode;
27
+ selectedValueFillsSpace?: boolean;
28
+ loading?: boolean;
29
+ loadingLabel?: string;
30
+ "aria-label"?: string;
15
31
  "data-name"?: string;
16
32
  "data-required"?: boolean;
17
33
  }
18
- declare const Dropdown: ({ items, value, onChange, className, placeholder, disabled, name, preventEmpty, "data-name": dataName, "data-required": dataRequired, }: DropdownProps) => import('react').JSX.Element;
34
+ declare const Dropdown: ({ items, value, onChange, className, placeholder, disabled, name, preventEmpty, id, inputValue, onInputValueChange, onKeyDown, open, onOpenChange, renderItem, renderValue, selectedValueFillsSpace, loading, loadingLabel, "aria-label": ariaLabel, "data-name": dataName, "data-required": dataRequired, }: DropdownProps) => import('react').JSX.Element;
19
35
  export default Dropdown;
@@ -2,6 +2,7 @@ import { ReactNode } from 'react';
2
2
  export type SelectItem = {
3
3
  key: string;
4
4
  label: ReactNode;
5
+ labelTextValue?: string;
5
6
  disabled?: boolean;
6
7
  };
7
8
  export interface SelectProps {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@febkosq8/arc",
3
3
  "description": "A React components library for febkosq8",
4
4
  "private": false,
5
- "version": "0.8.9",
5
+ "version": "0.9.0",
6
6
  "type": "module",
7
7
  "main": "./dist/arc.js",
8
8
  "types": "./dist/index.d.ts",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "license": "CC-BY-NC-4.0",
26
26
  "engines": {
27
- "node": ">=26.13.0"
27
+ "node": ">=26.13.1"
28
28
  },
29
29
  "homepage": "https://www.npmjs.com/package/@febkosq8/arc",
30
30
  "repository": {
@@ -63,7 +63,7 @@
63
63
  "@typescript/typescript6": "6.0.2",
64
64
  "@vitejs/plugin-react": "6.3.0",
65
65
  "eslint": "10.14.0",
66
- "prettier": "3.9.10",
66
+ "prettier": "3.10.1",
67
67
  "prettier-plugin-css-order": "2.2.0",
68
68
  "prettier-plugin-organize-attributes": "1.0.0",
69
69
  "prettier-plugin-organize-imports": "4.3.0",
@@ -74,6 +74,6 @@
74
74
  "tailwindcss": "4.3.5",
75
75
  "typescript": "7.0.2",
76
76
  "unplugin-dts": "1.1.2",
77
- "vite": "8.3.7"
77
+ "vite": "8.3.8"
78
78
  }
79
79
  }