@febkosq8/arc 0.8.6 → 0.8.7

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
@@ -11,6 +11,7 @@ import { FiChevronDown as N, FiChevronRight as P, FiMonitor as F, FiMoon as I, F
11
11
  import { Dialog as R } from "@base-ui/react/dialog";
12
12
  import { RxCross1 as z } from "react-icons/rx";
13
13
  import { Select as B } from "@base-ui/react/select";
14
+ import { Tabs as V } from "@base-ui/react/tabs";
14
15
  import { rankItem as ee } from "@tanstack/match-sorter-utils";
15
16
  import { columnFilteringFeature as te, columnResizingFeature as ne, columnSizingFeature as re, columnVisibilityFeature as ie, createFilteredRowModel as ae, createPaginatedRowModel as oe, createSortedRowModel as se, filterFn_includesString as ce, globalFilteringFeature as le, rowPaginationFeature as ue, rowSortingFeature as de, sortFn_alphanumeric as fe, sortFn_alphanumericCaseSensitive as pe, sortFn_basic as me, sortFn_datetime as he, sortFn_text as ge, sortFn_textCaseSensitive as _e, tableFeatures as ve, useTable as ye } from "@tanstack/react-table";
16
17
  import { Switch as be } from "@base-ui/react/switch";
@@ -53,7 +54,7 @@ var xe = ({ className: e, orientation: r = "horizontal", selectedVariant: o, chi
53
54
  variant: "primary",
54
55
  size: "md"
55
56
  }
56
- }), V = Object.assign(({ className: e, variant: n, size: r, ...i }) => /* @__PURE__ */ f("button", {
57
+ }), H = Object.assign(({ className: e, variant: n, size: r, ...i }) => /* @__PURE__ */ f("button", {
57
58
  className: t("arc-button", Se({
58
59
  variant: n,
59
60
  size: r,
@@ -88,7 +89,7 @@ var xe = ({ className: e, orientation: r = "horizontal", selectedVariant: o, chi
88
89
  "aria-hidden": !g,
89
90
  children: w
90
91
  })]
91
- }), E = /* @__PURE__ */ f(V, {
92
+ }), E = /* @__PURE__ */ f(H, {
92
93
  ...h,
93
94
  children: T,
94
95
  className: t(d),
@@ -155,7 +156,7 @@ var xe = ({ className: e, orientation: r = "horizontal", selectedVariant: o, chi
155
156
  return /* @__PURE__ */ p("span", {
156
157
  className: "arc-long-press-button relative inline-flex w-fit",
157
158
  "data-long-press-state": y ? "pressing" : void 0,
158
- children: [/* @__PURE__ */ f(V, {
159
+ children: [/* @__PURE__ */ f(H, {
159
160
  ...m,
160
161
  children: E,
161
162
  variant: c,
@@ -311,7 +312,7 @@ var xe = ({ className: e, orientation: r = "horizontal", selectedVariant: o, chi
311
312
  }) })]
312
313
  })
313
314
  });
314
- }, H = ({ data: e, className: n, ...r }) => {
315
+ }, U = ({ data: e, className: n, ...r }) => {
315
316
  let i = Array.isArray(e) ? e.join(", ") : typeof e == "string" ? e : null;
316
317
  return /* @__PURE__ */ f("em", {
317
318
  role: "alert",
@@ -321,7 +322,7 @@ var xe = ({ className: e, orientation: r = "horizontal", selectedVariant: o, chi
321
322
  children: i
322
323
  });
323
324
  }, Ae = /* @__PURE__ */ "*.+.×.÷.=.~.!.?.@.#.%.&.§.¶.※.◇.◆.○.●.△.▽.□.■.♠.♣.♦.♤.♧.♢.♪.♫.∴.∵".split(".");
324
- function U(e, t, n) {
325
+ function W(e, t, n) {
325
326
  let r = Math.sin((e + 1) * 12.9898 + t * 78.233 + n * 37.719) * 43758.5453;
326
327
  return r - Math.floor(r);
327
328
  }
@@ -386,10 +387,10 @@ var je = [
386
387
  gridTemplateRows: `repeat(${n}, minmax(0, 1fr))`
387
388
  },
388
389
  children: Array.from({ length: n * r }, (e, o) => /* @__PURE__ */ f("span", {
389
- className: t(Me({ shape: s === "mixed" ? y[o] ?? C[Math.floor(U(o, n, r) * C.length)] : s })),
390
+ className: t(Me({ shape: s === "mixed" ? y[o] ?? C[Math.floor(W(o, n, r) * C.length)] : s })),
390
391
  onAnimationIteration: () => {
391
392
  s === "mixed" && b((e) => {
392
- let t = [...e], i = t[o] ?? C[Math.floor(U(o, n, r) * C.length)], a = C.filter((e) => e !== i);
393
+ let t = [...e], i = t[o] ?? C[Math.floor(W(o, n, r) * C.length)], a = C.filter((e) => e !== i);
393
394
  return t[o] = a.length > 0 ? a[Math.floor(Math.random() * a.length)] : i, t;
394
395
  }), l.length > 1 && S((e) => {
395
396
  let t = [...e];
@@ -400,8 +401,8 @@ var je = [
400
401
  });
401
402
  },
402
403
  style: {
403
- animationDelay: l.length > 1 ? `${o / (n * r) * 1200}ms` : `${-U(o, n, r) * 1200}ms`,
404
- animationDuration: l.length > 1 ? "1200ms" : `${900 + U(o, n, r) * 600}ms`,
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`,
405
406
  backgroundColor: l.length > 0 ? l[(o + (x[o] ?? 0)) % l.length] : void 0,
406
407
  fontSize: `${Math.min(i / Math.max(n, r), a) * .4}px`,
407
408
  maxWidth: a,
@@ -414,7 +415,7 @@ var je = [
414
415
  }, o))
415
416
  })
416
417
  });
417
- }, W = ({ 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, {
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, {
418
419
  open: c,
419
420
  onOpenChange: l,
420
421
  children: [/* @__PURE__ */ f(A.Trigger, {
@@ -444,7 +445,7 @@ var je = [
444
445
  htmlFor: e,
445
446
  children: n
446
447
  }),
447
- r != null && r !== !1 && /* @__PURE__ */ f(W, {
448
+ r != null && r !== !1 && /* @__PURE__ */ f(G, {
448
449
  trigger: "hover",
449
450
  triggerRender: /* @__PURE__ */ f("button", {
450
451
  type: "button",
@@ -460,7 +461,7 @@ var je = [
460
461
  "aria-hidden": "true"
461
462
  })
462
463
  }),
463
- s && (Array.isArray(s) ? s.length > 0 && /* @__PURE__ */ f(H, { data: s }) : /* @__PURE__ */ f(H, { data: s }))
464
+ s && (Array.isArray(s) ? s.length > 0 && /* @__PURE__ */ f(U, { data: s }) : /* @__PURE__ */ f(U, { data: s }))
464
465
  ]
465
466
  });
466
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", {
@@ -478,7 +479,7 @@ var je = [
478
479
  variant: "default",
479
480
  as: "input"
480
481
  }
481
- }), G = ({ as: e = "input", className: n, variant: r, ...i }) => {
482
+ }), K = ({ as: e = "input", className: n, variant: r, ...i }) => {
482
483
  let a = t(Fe({
483
484
  as: e,
484
485
  variant: r
@@ -500,7 +501,7 @@ var je = [
500
501
  "outline-warning": "border-warning bg-background text-warning"
501
502
  } },
502
503
  defaultVariants: { variant: "outline-secondary" }
503
- }), K = (e) => {
504
+ }), q = (e) => {
504
505
  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;
505
506
  return /* @__PURE__ */ f("div", {
506
507
  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),
@@ -512,19 +513,19 @@ var je = [
512
513
  ...d
513
514
  });
514
515
  };
515
- K.Header = (e) => {
516
+ q.Header = (e) => {
516
517
  let { className: n, ...r } = e;
517
518
  return /* @__PURE__ */ f("h2", {
518
519
  className: t("arc-card-header flex w-full typography-heading-3 flex-col border-foreground/40 px-0 pb-1", n),
519
520
  ...r
520
521
  });
521
- }, K.Content = (e) => {
522
+ }, q.Content = (e) => {
522
523
  let { className: n, ...r } = e;
523
524
  return /* @__PURE__ */ f("div", {
524
525
  className: t("arc-card-content typography-paragraph mt-0! w-full justify-between px-0 py-1 whitespace-pre-wrap", n),
525
526
  ...r
526
527
  });
527
- }, K.Footer = (e) => {
528
+ }, q.Footer = (e) => {
528
529
  let { className: n, ...r } = e;
529
530
  return /* @__PURE__ */ f("div", {
530
531
  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),
@@ -557,6 +558,53 @@ var Le = class e {
557
558
  let r = e.toDateTime(t);
558
559
  return r.isValid ? r.toRelative(n) ?? "" : "";
559
560
  }
561
+ static formatDuration(e, { unit: t = "seconds" } = {}) {
562
+ if (!Number.isSafeInteger(e) || e < 0) throw RangeError("Duration must be a non-negative safe integer");
563
+ let n = [
564
+ [
565
+ "years",
566
+ "year",
567
+ 31536000000n
568
+ ],
569
+ [
570
+ "months",
571
+ "month",
572
+ 2592000000n
573
+ ],
574
+ [
575
+ "days",
576
+ "day",
577
+ 86400000n
578
+ ],
579
+ [
580
+ "hours",
581
+ "hour",
582
+ 3600000n
583
+ ],
584
+ [
585
+ "minutes",
586
+ "minute",
587
+ 60000n
588
+ ],
589
+ [
590
+ "seconds",
591
+ "second",
592
+ 1000n
593
+ ],
594
+ [
595
+ "milliseconds",
596
+ "millisecond",
597
+ 1n
598
+ ]
599
+ ], r = n.find(([e]) => e === t);
600
+ if (!r) throw RangeError(`Unsupported duration unit: ${t}`);
601
+ let i = BigInt(e) * r[2], a = [];
602
+ for (let [, e, t] of n) {
603
+ let n = i / t;
604
+ i %= t, n > 0n && a.push(`${n} ${e}${n === 1n ? "" : "s"}`);
605
+ }
606
+ return a.length ? a.join(", ") : `0 ${t}`;
607
+ }
560
608
  static getTimeDiff(t) {
561
609
  let n = e.toDateTime(t);
562
610
  if (!n.isValid) return null;
@@ -592,7 +640,7 @@ var Le = class e {
592
640
  }
593
641
  }, Re = ({ value: e, format: t = "$ISO$ ($RELATIVE$)", ...n }) => {
594
642
  let r = c(() => e ? Le.getFormattedTime(e, t) : "", [e, t]);
595
- return /* @__PURE__ */ f(G, {
643
+ return /* @__PURE__ */ f(K, {
596
644
  type: "text",
597
645
  disabled: !0,
598
646
  readOnly: !0,
@@ -654,15 +702,65 @@ var Le = class e {
654
702
  }[i], n),
655
703
  "aria-current": e ? "page" : void 0,
656
704
  ...a
657
- }), q = ({ active: e = !1, className: n, ...r }) => /* @__PURE__ */ f("button", {
705
+ }), Ve = e("inline-flex w-full items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60", {
706
+ variants: {
707
+ variant: {
708
+ pill: "arc-pill min-w-fit border border-transparent text-base text-muted-foreground transition hover:text-primary hover:outline-none hover:ring-0 focus:outline-none focus-visible:ring-opacity-75 focus-visible:ring-offset-0",
709
+ primary: "bg-primary text-primary-foreground hover:bg-primary/90",
710
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
711
+ success: "bg-success text-success-foreground hover:bg-success/90",
712
+ destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
713
+ ghost: "text-foreground hover:bg-accent hover:text-accent-foreground",
714
+ warning: "bg-warning text-warning-foreground hover:bg-warning/90",
715
+ outline: "border border-foreground/40 bg-transparent text-foreground hover:bg-accent hover:text-accent-foreground",
716
+ "outline-primary": "border border-primary bg-background text-primary hover:bg-primary hover:text-primary-foreground",
717
+ "outline-secondary": "border border-secondary-foreground bg-background text-secondary-foreground hover:bg-secondary",
718
+ "outline-success": "border border-success bg-background text-success hover:bg-success hover:text-success-foreground",
719
+ "outline-destructive": "border border-destructive bg-background text-destructive hover:bg-destructive hover:text-destructive-foreground",
720
+ "outline-ghost": "border border-transparent bg-background text-foreground hover:bg-accent hover:text-accent-foreground",
721
+ "outline-warning": "border border-warning bg-background text-warning hover:bg-warning hover:text-warning-foreground"
722
+ },
723
+ size: {
724
+ sm: "h-9 px-3",
725
+ md: "h-10 px-4 py-2"
726
+ }
727
+ },
728
+ compoundVariants: [{
729
+ variant: "pill",
730
+ size: "md",
731
+ class: "h-10 pointer-coarse:h-11 px-3 py-2"
732
+ }],
733
+ defaultVariants: {
734
+ variant: "pill",
735
+ size: "md"
736
+ }
737
+ }), He = {
738
+ pill: "text-primary!",
739
+ primary: "bg-primary/80 ring-2 ring-ring ring-offset-2",
740
+ secondary: "bg-secondary/90 ring-2 ring-ring ring-offset-2",
741
+ success: "bg-success/80 ring-2 ring-success ring-offset-2",
742
+ destructive: "bg-destructive/80 ring-2 ring-destructive ring-offset-2",
743
+ ghost: "bg-accent text-accent-foreground",
744
+ warning: "bg-warning/80 ring-2 ring-warning ring-offset-2",
745
+ outline: "border-primary bg-accent text-primary",
746
+ "outline-primary": "bg-primary text-primary-foreground ring-2 ring-primary ring-offset-2",
747
+ "outline-secondary": "bg-secondary ring-2 ring-secondary-foreground ring-offset-2",
748
+ "outline-success": "bg-success text-success-foreground ring-2 ring-success ring-offset-2",
749
+ "outline-destructive": "bg-destructive text-destructive-foreground ring-2 ring-destructive ring-offset-2",
750
+ "outline-ghost": "bg-accent text-accent-foreground ring-2 ring-ring ring-offset-2",
751
+ "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", {
658
753
  type: "button",
659
- className: t("arc-pill", "inline-flex h-10 pointer-coarse:h-11 w-full items-center justify-center whitespace-nowrap rounded-md border border-transparent px-3 py-2 text-base font-medium text-foreground transition hover:text-primary hover:outline-none hover:ring-0 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-opacity-75", e ? "text-primary!" : "text-muted-foreground", n),
754
+ className: t(Ve({
755
+ variant: i,
756
+ size: r
757
+ }), e && He[i], n),
660
758
  "aria-pressed": e,
661
- ...r
662
- }), Ve = ({ 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)), J = Object.assign(({ className: e, contentClassName: n, active: r, activeClassName: i, buttonText: a, children: o }) => /* @__PURE__ */ p(M.Root, {
759
+ ...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, {
663
761
  loopFocus: !0,
664
762
  children: [/* @__PURE__ */ p(M.Trigger, {
665
- render: /* @__PURE__ */ f(q, {
763
+ render: /* @__PURE__ */ f(J, {
666
764
  active: r,
667
765
  className: t("w-fit", r && i, e)
668
766
  }),
@@ -676,7 +774,7 @@ var Le = class e {
676
774
  collisionPadding: 8,
677
775
  children: /* @__PURE__ */ f(M.Popup, {
678
776
  className: t("arc-menu-content z-50 flex bg-popover w-fit min-w-40 max-w-[calc(100vw-1rem)] origin-top-right flex-col overflow-hidden rounded-md border border-border text-foreground shadow-lg ring-1 ring-foreground/10 focus:outline-none", n),
679
- children: /* @__PURE__ */ f(Ve, { children: o })
777
+ children: /* @__PURE__ */ f(Ue, { children: o })
680
778
  })
681
779
  }) })]
682
780
  }), {
@@ -717,12 +815,12 @@ var Le = class e {
717
815
  collisionPadding: 8,
718
816
  children: /* @__PURE__ */ f(M.Popup, {
719
817
  className: "arc-menu-content z-50 flex bg-popover w-fit min-w-40 max-w-[calc(100vw-1rem)] origin-top-right flex-col overflow-hidden rounded-md border border-border text-foreground shadow-lg ring-1 ring-foreground/10 focus:outline-none",
720
- children: /* @__PURE__ */ f(Ve, { children: i })
818
+ children: /* @__PURE__ */ f(Ue, { children: i })
721
819
  })
722
820
  }) })]
723
821
  });
724
822
  }
725
- }), He = ({ open: e = !1, setOpen: n, children: r, initialFocus: i, headerContent: a, footerContent: s, width: c, height: l, className: u, customKeyHandler: d }) => (o(() => {
823
+ }), We = ({ open: e = !1, setOpen: n, children: r, initialFocus: i, headerContent: a, footerContent: s, width: c, height: l, className: u, customKeyHandler: d }) => (o(() => {
726
824
  if (!e) return;
727
825
  let t = (e) => {
728
826
  let t = e.key === "Escape" ? "esc" : (e.ctrlKey || e.metaKey) && e.key.toLowerCase() === "s" ? "ctrl+s" : null;
@@ -761,7 +859,7 @@ var Le = class e {
761
859
  ]
762
860
  })
763
861
  })] })
764
- })), Ue = ({ id: e, items: n, value: r, onChange: i, className: a, placeholder: o = "Select options", disabled: s, name: c, preventEmpty: l = !1, "data-name": u, "data-required": d }) => {
862
+ })), Ge = ({ id: e, items: n, value: r, onChange: i, className: a, placeholder: o = "Select options", disabled: s, name: c, preventEmpty: l = !1, "data-name": u, "data-required": d }) => {
765
863
  let h = n.filter((e) => r?.includes(String(e.key)));
766
864
  return /* @__PURE__ */ f(m.Root, {
767
865
  multiple: !0,
@@ -841,7 +939,7 @@ var Le = class e {
841
939
  }) })]
842
940
  })
843
941
  });
844
- }, Y = ({ id: e, value: n, onChange: r, data: i, className: a, disabled: o, placeholder: s, ...c }) => /* @__PURE__ */ p(B.Root, {
942
+ }, X = ({ id: e, value: n, onChange: r, data: i, className: a, disabled: o, placeholder: s, ...c }) => /* @__PURE__ */ p(B.Root, {
845
943
  value: n,
846
944
  onValueChange: (e) => {
847
945
  e !== null && r(e);
@@ -893,7 +991,27 @@ var Le = class e {
893
991
  })
894
992
  })
895
993
  }) })]
896
- }), We = e("arc-tag inline-flex w-fit items-center rounded-full border border-transparent font-bold", {
994
+ }), Ke = ({ className: e, ...n }) => /* @__PURE__ */ f(V.Root, {
995
+ className: t("flex w-full min-w-0 flex-col gap-3 data-[orientation=vertical]:flex-row", e),
996
+ ...n
997
+ }), qe = ({ className: e, ...n }) => /* @__PURE__ */ f(V.List, {
998
+ className: t("-m-2 flex min-w-0 flex-nowrap items-center gap-3 overflow-x-auto p-2 data-[orientation=vertical]:flex-col data-[orientation=vertical]:items-stretch", e),
999
+ ...n
1000
+ }), Je = ({ className: e, ...n }) => /* @__PURE__ */ f(V.Panel, {
1001
+ className: t("min-w-0 rounded-md text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-opacity-75", e),
1002
+ ...n
1003
+ }), Ye = ({ className: e, variant: n = "outline", size: r, ...i }) => /* @__PURE__ */ f(V.Tab, {
1004
+ className: e,
1005
+ render: (e, i) => /* @__PURE__ */ f(J, {
1006
+ ...e,
1007
+ "aria-pressed": void 0,
1008
+ variant: n,
1009
+ size: r,
1010
+ active: i.active,
1011
+ className: t("w-fit shrink-0 data-disabled:cursor-not-allowed data-disabled:opacity-60", e.className)
1012
+ }),
1013
+ ...i
1014
+ }), Xe = e("arc-tag inline-flex w-fit items-center rounded-full border border-transparent font-bold", {
897
1015
  variants: {
898
1016
  variant: {
899
1017
  primary: "bg-primary text-primary-foreground",
@@ -917,24 +1035,24 @@ var Le = class e {
917
1035
  variant: "primary",
918
1036
  size: "xs"
919
1037
  }
920
- }), Ge = ({ className: e, variant: n, size: r, ...i }) => /* @__PURE__ */ f("div", {
921
- className: t(We({
1038
+ }), Ze = ({ className: e, variant: n, size: r, ...i }) => /* @__PURE__ */ f("div", {
1039
+ className: t(Xe({
922
1040
  variant: n,
923
1041
  size: r,
924
1042
  className: e
925
1043
  })),
926
1044
  ...i
927
- }), Ke = (e, t, n, r) => {
1045
+ }), Qe = (e, t, n, r) => {
928
1046
  let i = e.getValue(t), a = ee(i, n);
929
1047
  return r({ itemRank: a }), a.passed;
930
- }, X = {
931
- fuzzy: Ke,
1048
+ }, Z = {
1049
+ fuzzy: Qe,
932
1050
  includesString: ce,
933
1051
  select: (e, t, n) => {
934
1052
  let r = e.getValue(t);
935
1053
  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);
936
1054
  }
937
- }, qe = ve({
1055
+ }, Q = ve({
938
1056
  columnMeta: {},
939
1057
  columnFilteringFeature: te,
940
1058
  columnResizingFeature: ne,
@@ -954,19 +1072,23 @@ var Le = class e {
954
1072
  text: ge,
955
1073
  textCaseSensitive: _e
956
1074
  },
957
- filterFns: X
1075
+ filterFns: Z
958
1076
  });
959
- function Je(e) {
960
- return Object.prototype.hasOwnProperty.call(X, e);
1077
+ function $e(e) {
1078
+ return Object.prototype.hasOwnProperty.call(Z, e);
961
1079
  }
962
- function Ye(e, t) {
1080
+ function et(e, t) {
963
1081
  if (e !== !1) {
964
1082
  if (e === void 0) return t ? "select" : void 0;
965
- if (typeof e == "function" || e === "auto" || Je(e)) return e;
966
- throw Error(`Unsupported table filterFn "${e}". Use "auto" or one of: ${Object.keys(X).join(", ")}.`);
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(", ")}.`);
967
1085
  }
968
1086
  }
969
- var Xe = ({ data: e, columnDef: n, pageSize: r = 10, className: i, showHeader: a = !0, showFilters: o = !0, showSorting: l = !0 }) => {
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(", ")}.`);
1090
+ }
1091
+ var nt = ({ data: e, columnDef: n, pageSize: r = 10, className: i, showHeader: a = !0, showFilters: o = !0, showSorting: l = !0 }) => {
970
1092
  let d = s(), [m, b] = u({
971
1093
  pageIndex: 0,
972
1094
  pageSize: r
@@ -976,11 +1098,13 @@ var Xe = ({ data: e, columnDef: n, pageSize: r = 10, className: i, showHeader: a
976
1098
  enableResizing: e.enableResizing,
977
1099
  enableColumnFilter: e.filterFn !== !1 && e.enableColumnFilter,
978
1100
  enableSorting: e.enableSorting,
1101
+ sortFn: tt(e.sortingFn),
1102
+ ...e.sortUndefined === void 0 ? {} : { sortUndefined: e.sortUndefined },
979
1103
  enableHiding: e.enableHiding ?? !0,
980
1104
  size: e.size,
981
1105
  minSize: e.minSize ?? 50,
982
1106
  maxSize: e.maxSize ?? 1e3,
983
- filterFn: Ye(e.filterFn, e.filterSelectOptions),
1107
+ filterFn: et(e.filterFn, e.filterSelectOptions),
984
1108
  meta: {
985
1109
  headerLabel: e.header,
986
1110
  filterSelectOptions: e.filterSelectOptions,
@@ -1034,8 +1158,8 @@ var Xe = ({ data: e, columnDef: n, pageSize: r = 10, className: i, showHeader: a
1034
1158
  onSortingChange: k,
1035
1159
  onColumnFiltersChange: w,
1036
1160
  onGlobalFilterChange: D,
1037
- globalFilterFn: Ke,
1038
- features: qe,
1161
+ globalFilterFn: Qe,
1162
+ features: Q,
1039
1163
  defaultColumn: {
1040
1164
  size: 200,
1041
1165
  minSize: 50,
@@ -1050,7 +1174,7 @@ var Xe = ({ data: e, columnDef: n, pageSize: r = 10, className: i, showHeader: a
1050
1174
  children: [
1051
1175
  /* @__PURE__ */ p("div", {
1052
1176
  className: "flex items-center gap-2",
1053
- children: [/* @__PURE__ */ p(V, {
1177
+ children: [/* @__PURE__ */ p(H, {
1054
1178
  variant: "outline-secondary",
1055
1179
  size: "sm",
1056
1180
  disabled: !M && O.length === 0,
@@ -1060,7 +1184,7 @@ var Xe = ({ data: e, columnDef: n, pageSize: r = 10, className: i, showHeader: a
1060
1184
  title: "Clear filters and sorting",
1061
1185
  type: "button",
1062
1186
  children: [/* @__PURE__ */ f(E, { className: "mr-1.5 h-3 w-3" }), "Clear filters and sorting"]
1063
- }), /* @__PURE__ */ f($e, { table: P })]
1187
+ }), /* @__PURE__ */ f(at, { table: P })]
1064
1188
  }),
1065
1189
  /* @__PURE__ */ p("nav", {
1066
1190
  "aria-label": "Table pagination",
@@ -1068,7 +1192,7 @@ var Xe = ({ data: e, columnDef: n, pageSize: r = 10, className: i, showHeader: a
1068
1192
  children: [
1069
1193
  /* @__PURE__ */ p("div", {
1070
1194
  className: "flex items-center gap-1",
1071
- children: [/* @__PURE__ */ f(V, {
1195
+ children: [/* @__PURE__ */ f(H, {
1072
1196
  variant: "outline-secondary",
1073
1197
  size: "icon-md",
1074
1198
  className: "h-10 w-10 sm:h-8 sm:w-8",
@@ -1084,7 +1208,7 @@ var Xe = ({ data: e, columnDef: n, pageSize: r = 10, className: i, showHeader: a
1084
1208
  "aria-hidden": "true",
1085
1209
  className: "h-3.5 w-3.5"
1086
1210
  })
1087
- }), /* @__PURE__ */ f(V, {
1211
+ }), /* @__PURE__ */ f(H, {
1088
1212
  variant: "outline-secondary",
1089
1213
  size: "icon-md",
1090
1214
  className: "h-10 w-10 sm:h-8 sm:w-8",
@@ -1130,7 +1254,7 @@ var Xe = ({ data: e, columnDef: n, pageSize: r = 10, className: i, showHeader: a
1130
1254
  }),
1131
1255
  /* @__PURE__ */ p("div", {
1132
1256
  className: "flex items-center gap-1",
1133
- children: [/* @__PURE__ */ f(V, {
1257
+ children: [/* @__PURE__ */ f(H, {
1134
1258
  variant: "outline-secondary",
1135
1259
  size: "icon-md",
1136
1260
  className: "h-10 w-10 sm:h-8 sm:w-8",
@@ -1146,7 +1270,7 @@ var Xe = ({ data: e, columnDef: n, pageSize: r = 10, className: i, showHeader: a
1146
1270
  "aria-hidden": "true",
1147
1271
  className: "h-3.5 w-3.5"
1148
1272
  })
1149
- }), /* @__PURE__ */ f(V, {
1273
+ }), /* @__PURE__ */ f(H, {
1150
1274
  variant: "outline-secondary",
1151
1275
  size: "icon-md",
1152
1276
  className: "h-10 w-10 sm:h-8 sm:w-8",
@@ -1169,7 +1293,7 @@ var Xe = ({ data: e, columnDef: n, pageSize: r = 10, className: i, showHeader: a
1169
1293
  /* @__PURE__ */ p("label", {
1170
1294
  htmlFor: `${d}-page-size`,
1171
1295
  className: "text-muted-foreground flex w-full items-center justify-between gap-2 text-xs md:w-auto",
1172
- children: ["Rows per page", /* @__PURE__ */ f(Y, {
1296
+ children: ["Rows per page", /* @__PURE__ */ f(X, {
1173
1297
  id: `${d}-page-size`,
1174
1298
  value: P.state.pagination.pageSize.toString(),
1175
1299
  onChange: (e) => {
@@ -1208,7 +1332,7 @@ var Xe = ({ data: e, columnDef: n, pageSize: r = 10, className: i, showHeader: a
1208
1332
  htmlFor: `${d}-sort`,
1209
1333
  className: "text-muted-foreground mb-1 block text-xs font-medium",
1210
1334
  children: "Sort by"
1211
- }), /* @__PURE__ */ f(Y, {
1335
+ }), /* @__PURE__ */ f(X, {
1212
1336
  id: `${d}-sort`,
1213
1337
  value: O[0]?.id ?? "__none__",
1214
1338
  onChange: (e) => {
@@ -1225,7 +1349,7 @@ var Xe = ({ data: e, columnDef: n, pageSize: r = 10, className: i, showHeader: a
1225
1349
  label: e.columnDef.meta?.headerLabel ?? e.id
1226
1350
  }))]
1227
1351
  })]
1228
- }), /* @__PURE__ */ f(V, {
1352
+ }), /* @__PURE__ */ f(H, {
1229
1353
  variant: "outline-secondary",
1230
1354
  size: "icon-sm",
1231
1355
  disabled: O.length === 0,
@@ -1252,7 +1376,7 @@ var Xe = ({ data: e, columnDef: n, pageSize: r = 10, className: i, showHeader: a
1252
1376
  htmlFor: n,
1253
1377
  className: "text-muted-foreground mb-1 block text-xs font-medium",
1254
1378
  children: t
1255
- }), /* @__PURE__ */ f(Qe, {
1379
+ }), /* @__PURE__ */ f(it, {
1256
1380
  column: e,
1257
1381
  idPrefix: `${d}-`
1258
1382
  })]
@@ -1322,7 +1446,7 @@ var Xe = ({ data: e, columnDef: n, pageSize: r = 10, className: i, showHeader: a
1322
1446
  ]
1323
1447
  });
1324
1448
  };
1325
- function Ze({ value: e, onChange: t, debounce: n = 500, ...r }) {
1449
+ function rt({ value: e, onChange: t, debounce: n = 500, ...r }) {
1326
1450
  let [i, a] = u(e);
1327
1451
  return o(() => {
1328
1452
  a(e);
@@ -1335,14 +1459,14 @@ function Ze({ value: e, onChange: t, debounce: n = 500, ...r }) {
1335
1459
  i,
1336
1460
  n,
1337
1461
  t
1338
- ]), /* @__PURE__ */ f(G, {
1462
+ ]), /* @__PURE__ */ f(K, {
1339
1463
  ...r,
1340
1464
  value: i,
1341
1465
  onChange: (e) => a(e.target.value),
1342
1466
  autoComplete: "off"
1343
1467
  });
1344
1468
  }
1345
- function Qe({ column: e, idPrefix: t = "" }) {
1469
+ function it({ column: e, idPrefix: t = "" }) {
1346
1470
  let n = `${t}${e.id}-filter`, r = {
1347
1471
  includesString: "Includes string",
1348
1472
  equalsString: "Equals string",
@@ -1350,7 +1474,7 @@ function Qe({ column: e, idPrefix: t = "" }) {
1350
1474
  equals: "Equals",
1351
1475
  fuzzy: "Fuzzy"
1352
1476
  }, i = e.getFilterValue(), a = e.columnDef.meta?.filterSelectOptions;
1353
- return a ? /* @__PURE__ */ f(Y, {
1477
+ return a ? /* @__PURE__ */ f(X, {
1354
1478
  id: n,
1355
1479
  value: i ?? "__all__",
1356
1480
  onChange: (t) => e.setFilterValue(t === "__all__" ? void 0 : t),
@@ -1362,21 +1486,21 @@ function Qe({ column: e, idPrefix: t = "" }) {
1362
1486
  key: e.value,
1363
1487
  label: e.label
1364
1488
  }))]
1365
- }) : /* @__PURE__ */ f(Ze, {
1489
+ }) : /* @__PURE__ */ f(rt, {
1366
1490
  id: n,
1367
1491
  type: "text",
1368
1492
  name: e.id,
1369
1493
  value: i ?? "",
1370
1494
  onChange: (t) => e.setFilterValue(t),
1371
- title: `Search (${r[e.columnDef.filterFn]})`,
1495
+ title: r[e.columnDef.filterFn] ? `Search (${r[e.columnDef.filterFn]})` : "Search",
1372
1496
  placeholder: "Filter...",
1373
1497
  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"
1374
1498
  });
1375
1499
  }
1376
- function $e({ table: e }) {
1377
- return /* @__PURE__ */ p(W, {
1500
+ function at({ table: e }) {
1501
+ return /* @__PURE__ */ p(G, {
1378
1502
  trigger: "click",
1379
- triggerRender: /* @__PURE__ */ f(V, {
1503
+ triggerRender: /* @__PURE__ */ f(H, {
1380
1504
  variant: "outline-secondary",
1381
1505
  size: "sm",
1382
1506
  title: "Toggle columns",
@@ -1389,7 +1513,7 @@ function $e({ table: e }) {
1389
1513
  className: "flex flex-col",
1390
1514
  children: e.getAllLeafColumns().map((e) => {
1391
1515
  let n = e.columnDef.meta?.headerLabel ?? e.id, r = e.getCanHide(), i = e.getIsVisible();
1392
- return /* @__PURE__ */ p(V, {
1516
+ return /* @__PURE__ */ p(H, {
1393
1517
  variant: "ghost",
1394
1518
  size: "sm",
1395
1519
  disabled: !r,
@@ -1404,31 +1528,31 @@ function $e({ table: e }) {
1404
1528
  });
1405
1529
  }
1406
1530
  // components/text-link.tsx
1407
- var et = ({ className: e, href: n, text: r, target: i = "_blank", rel: a, ...o }) => /* @__PURE__ */ f("a", {
1531
+ var ot = ({ className: e, href: n, text: r, target: i = "_blank", rel: a, ...o }) => /* @__PURE__ */ f("a", {
1408
1532
  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),
1409
1533
  href: n,
1410
1534
  target: i,
1411
1535
  rel: a ?? (i === "_blank" ? "noopener noreferrer" : void 0),
1412
1536
  ...o,
1413
1537
  children: r
1414
- }), tt = ({ checked: e = !1, onChange: n, disabled: r = !1, variant: i = "primary", children: a, ...o }) => /* @__PURE__ */ f(be.Root, {
1538
+ }), st = ({ checked: e = !1, onChange: n, disabled: r = !1, variant: i = "primary", children: a, ...o }) => /* @__PURE__ */ f(be.Root, {
1415
1539
  checked: e,
1416
1540
  disabled: r,
1417
1541
  onCheckedChange: n,
1418
- className: t("arc-switch", nt({
1542
+ className: t("arc-switch", ct({
1419
1543
  variant: i,
1420
1544
  disabled: r
1421
1545
  })),
1422
1546
  ...o,
1423
1547
  children: a ? a(e) : /* @__PURE__ */ f(be.Thumb, {
1424
1548
  "aria-hidden": "true",
1425
- className: rt({
1549
+ className: lt({
1426
1550
  variant: i,
1427
1551
  checked: e,
1428
1552
  disabled: r
1429
1553
  })
1430
1554
  })
1431
- }), nt = 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: {
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: {
1432
1556
  variant: {
1433
1557
  danger: "data-checked:bg-destructive",
1434
1558
  success: "data-checked:bg-success",
@@ -1439,7 +1563,7 @@ var et = ({ className: e, href: n, text: r, target: i = "_blank", rel: a, ...o }
1439
1563
  true: "ring-2 ring-border",
1440
1564
  false: ""
1441
1565
  }
1442
- } }), rt = e("absolute top-1/2 inline-block h-5 w-5 -translate-y-1/2 transform rounded-full border shadow-sm transition-[left,background-color,border-color] duration-300 ease-out", {
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,background-color,border-color] duration-300 ease-out", {
1443
1567
  variants: {
1444
1568
  variant: {
1445
1569
  primary: "",
@@ -1532,53 +1656,53 @@ var et = ({ className: e, href: n, text: r, target: i = "_blank", rel: a, ...o }
1532
1656
  className: "border-success bg-success/70"
1533
1657
  }
1534
1658
  ]
1535
- }), Z = {
1659
+ }), ut = {
1536
1660
  light: L,
1537
1661
  dark: I,
1538
1662
  system: F
1539
- }, Q = {
1663
+ }, $ = {
1540
1664
  light: "Light",
1541
1665
  dark: "Dark",
1542
1666
  system: "System"
1543
- }, it = "theme", at = (e) => e === "dark" || e === "system" && typeof window < "u" && window.matchMedia("(prefers-color-scheme: dark)").matches, ot = () => {
1667
+ }, dt = "theme", ft = (e) => e === "dark" || e === "system" && typeof window < "u" && window.matchMedia("(prefers-color-scheme: dark)").matches, pt = () => {
1544
1668
  if (typeof window > "u") return "system";
1545
- let e = window.localStorage.getItem(it);
1669
+ let e = window.localStorage.getItem(dt);
1546
1670
  return e === "light" || e === "dark" || e === "system" ? e : "system";
1547
- }, st = (e) => e === "system" ? "light" : e === "light" ? "dark" : "system";
1548
- function ct({ variant: e = "dropdown", showLabel: n = !1 }) {
1549
- let [r, i] = u(ot);
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);
1550
1674
  o(() => {
1551
- typeof window < "u" && (document.documentElement.classList.toggle("dark", at(r)), window.localStorage.setItem(it, r));
1675
+ typeof window < "u" && (document.documentElement.classList.toggle("dark", ft(r)), window.localStorage.setItem(dt, r));
1552
1676
  }, [r]);
1553
1677
  let a = () => {
1554
- i(st(r));
1678
+ i(mt(r));
1555
1679
  };
1556
1680
  if (e === "toggle") {
1557
- let e = Z[r], t = st(r);
1681
+ let e = ut[r], t = mt(r);
1558
1682
  return /* @__PURE__ */ f("div", {
1559
1683
  className: "arc-theme-switcher",
1560
- children: /* @__PURE__ */ p(q, {
1561
- active: at(r),
1684
+ children: /* @__PURE__ */ p(J, {
1685
+ active: ft(r),
1562
1686
  "aria-label": `Switch to ${t} theme`,
1563
1687
  title: `Switch to ${t} theme`,
1564
1688
  onClick: a,
1565
1689
  className: "w-fit gap-3",
1566
- children: [/* @__PURE__ */ f(e, { "aria-hidden": "true" }), n && Q[r]]
1690
+ children: [/* @__PURE__ */ f(e, { "aria-hidden": "true" }), n && $[r]]
1567
1691
  })
1568
1692
  });
1569
1693
  }
1570
- let s = Z[r];
1694
+ let s = ut[r];
1571
1695
  return /* @__PURE__ */ f("div", {
1572
1696
  className: "arc-theme-switcher",
1573
- children: /* @__PURE__ */ p(J, {
1697
+ children: /* @__PURE__ */ p(Y, {
1574
1698
  className: "gap-3",
1575
1699
  contentClassName: "min-w-(--anchor-width)",
1576
- buttonText: /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(s, { "aria-hidden": "true" }), n && Q[r]] }),
1700
+ buttonText: /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(s, { "aria-hidden": "true" }), n && $[r]] }),
1577
1701
  children: [
1578
- /* @__PURE__ */ f(J.Item, {
1702
+ /* @__PURE__ */ f(Y.Item, {
1579
1703
  asChild: !0,
1580
1704
  className: t("border-0! focus-visible:outline-none", n ? "px-3!" : "justify-center! p-0!"),
1581
- children: /* @__PURE__ */ p(q, {
1705
+ children: /* @__PURE__ */ p(J, {
1582
1706
  active: r === "system",
1583
1707
  title: "System Theme",
1584
1708
  onClick: () => {
@@ -1588,13 +1712,13 @@ function ct({ variant: e = "dropdown", showLabel: n = !1 }) {
1588
1712
  children: [/* @__PURE__ */ f(F, {
1589
1713
  className: "size-4",
1590
1714
  "aria-hidden": "true"
1591
- }), n && Q.system]
1715
+ }), n && $.system]
1592
1716
  })
1593
1717
  }),
1594
- /* @__PURE__ */ f(J.Item, {
1718
+ /* @__PURE__ */ f(Y.Item, {
1595
1719
  asChild: !0,
1596
1720
  className: t("border-0! focus-visible:outline-none", n ? "px-3!" : "justify-center! p-0!"),
1597
- children: /* @__PURE__ */ p(q, {
1721
+ children: /* @__PURE__ */ p(J, {
1598
1722
  active: r === "light",
1599
1723
  title: "Light Theme",
1600
1724
  onClick: () => {
@@ -1604,13 +1728,13 @@ function ct({ variant: e = "dropdown", showLabel: n = !1 }) {
1604
1728
  children: [/* @__PURE__ */ f(L, {
1605
1729
  className: "size-4",
1606
1730
  "aria-hidden": "true"
1607
- }), n && Q.light]
1731
+ }), n && $.light]
1608
1732
  })
1609
1733
  }),
1610
- /* @__PURE__ */ f(J.Item, {
1734
+ /* @__PURE__ */ f(Y.Item, {
1611
1735
  asChild: !0,
1612
1736
  className: t("border-0! focus-visible:outline-none", n ? "px-3!" : "justify-center! p-0!"),
1613
- children: /* @__PURE__ */ p(q, {
1737
+ children: /* @__PURE__ */ p(J, {
1614
1738
  active: r === "dark",
1615
1739
  title: "Dark Theme",
1616
1740
  onClick: () => {
@@ -1620,7 +1744,7 @@ function ct({ variant: e = "dropdown", showLabel: n = !1 }) {
1620
1744
  children: [/* @__PURE__ */ f(I, {
1621
1745
  className: "size-4",
1622
1746
  "aria-hidden": "true"
1623
- }), n && Q.dark]
1747
+ }), n && $.dark]
1624
1748
  })
1625
1749
  })
1626
1750
  ]
@@ -1628,16 +1752,16 @@ function ct({ variant: e = "dropdown", showLabel: n = !1 }) {
1628
1752
  });
1629
1753
  }
1630
1754
  // components/typing-animation.tsx
1631
- function lt(e) {
1755
+ function gt(e) {
1632
1756
  return e === "newline" ? "\n" : e === "comma" ? ", " : "";
1633
1757
  }
1634
- function ut(e, t, n, r, i) {
1758
+ function _t(e, t, n, r, i) {
1635
1759
  if (r === "character") return Math.max(0, Math.min(e.length, t + n * i));
1636
1760
  let a = [...e.matchAll(/\S+\s*/g)].map((e) => e.index + e[0].length), o = t;
1637
1761
  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;
1638
1762
  return o;
1639
1763
  }
1640
- function dt({ strings: e, placeholder: t, perTick: n = {
1764
+ function vt({ strings: e, placeholder: t, perTick: n = {
1641
1765
  amount: 1,
1642
1766
  unit: "character"
1643
1767
  }, msDelay: r = {
@@ -1682,9 +1806,9 @@ function dt({ strings: e, placeholder: t, perTick: n = {
1682
1806
  T([]), C(""), N.current += 1, P.current = 0, t = setTimeout(r, _);
1683
1807
  return;
1684
1808
  }
1685
- if (L.current) P.current = ut(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);
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);
1686
1810
  else {
1687
- if (P.current = ut(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) {
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) {
1688
1812
  k(!0);
1689
1813
  return;
1690
1814
  }
@@ -1717,13 +1841,13 @@ function dt({ strings: e, placeholder: t, perTick: n = {
1717
1841
  O,
1718
1842
  v
1719
1843
  ]);
1720
- let R = A ? "." : "", z = d !== "clear", B = lt(d), ee = w.reduce((e, t) => e + t.split("\n").length, 0);
1844
+ let R = A ? "." : "", z = d !== "clear", B = gt(d), V = w.reduce((e, t) => e + t.split("\n").length, 0);
1721
1845
  return z ? /* @__PURE__ */ f("div", {
1722
1846
  ref: (e) => {
1723
1847
  M.current = e;
1724
1848
  },
1725
1849
  className: "arc-typing-animation overflow-hidden",
1726
- style: { "--typing-roll-offset": ee },
1850
+ style: { "--typing-roll-offset": V },
1727
1851
  children: /* @__PURE__ */ p("div", {
1728
1852
  className: "whitespace-pre-line",
1729
1853
  children: [
@@ -1748,7 +1872,7 @@ function dt({ strings: e, placeholder: t, perTick: n = {
1748
1872
  });
1749
1873
  }
1750
1874
  // utilities/hash-navigation.ts
1751
- function $({ intervalMs: e = 500, maxAttempts: t = 20, behavior: n = "smooth", block: r } = {}) {
1875
+ function yt({ intervalMs: e = 500, maxAttempts: t = 20, behavior: n = "smooth", block: r } = {}) {
1752
1876
  if (typeof window > "u") return () => {};
1753
1877
  let i = 0, a = setInterval(() => {
1754
1878
  i += 1;
@@ -1766,10 +1890,10 @@ function $({ intervalMs: e = 500, maxAttempts: t = 20, behavior: n = "smooth", b
1766
1890
  }, e);
1767
1891
  return () => clearInterval(a);
1768
1892
  }
1769
- function ft(e) {
1770
- o(() => $(e), []);
1893
+ function bt(e) {
1894
+ o(() => yt(e), []);
1771
1895
  }
1772
- function pt({ container: e, sectionIds: t, hashFirstSection: n = !0, onActiveChange: r }) {
1896
+ function xt({ container: e, sectionIds: t, hashFirstSection: n = !0, onActiveChange: r }) {
1773
1897
  let i = t.map((e) => document.getElementById(e)).filter((e) => e !== null), a = window.location.hash.toLowerCase().slice(1) || null, o = () => {
1774
1898
  let t = e.getBoundingClientRect(), o = t.top + t.height / 2, s = i.find((e) => {
1775
1899
  let t = e.getBoundingClientRect();
@@ -1781,4 +1905,4 @@ function pt({ container: e, sectionIds: t, hashFirstSection: n = !0, onActiveCha
1781
1905
  };
1782
1906
  return o(), e.addEventListener("scroll", o, { passive: !0 }), () => e.removeEventListener("scroll", o);
1783
1907
  }
1784
- export { De as Avatar, V as Button, xe as ButtonGroup, K as Card, Le as DateHandler, Oe as Divider, Ce as DoubleClickButton, ke as Dropdown, H as ErrorText, Ne as GridLoader, G as Input, Re as InputTimestamp, Pe as LabelField, we as LongPressButton, J as Menu, He as Modal, Ue as MultiDropdown, q as Pill, Be as PillLink, W as PreviewCard, Y as Select, tt as Switch, Xe as Table, Ge as Tag, et as TextLink, ct as ThemeSwitcher, dt as TypingAnimation, $ as navigateToHashOnLoad, pt as updateHashOnScroll, ft as useHashNavigationOnLoad };
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 };
@@ -27,10 +27,19 @@ export type { ModalProps } from './modal';
27
27
  export { default as MultiDropdown } from './dropdown-multi';
28
28
  export type { MultiDropdownProps } from './dropdown-multi';
29
29
  export { default as Pill } from './pill';
30
+ export type { PillProps, PillVariant } from './pill';
30
31
  export { default as PreviewCard } from './preview-card';
31
32
  export type { PreviewCardProps } from './preview-card';
32
33
  export { default as Select } from './select';
33
34
  export type { SelectItem, SelectProps } from './select';
35
+ export { default as Tabs } from './tabs';
36
+ export type { TabsProps } from './tabs';
37
+ export { default as TabsList } from './tabs-list';
38
+ export type { TabsListProps } from './tabs-list';
39
+ export { default as TabsPanel } from './tabs-panel';
40
+ export type { TabsPanelProps } from './tabs-panel';
41
+ export { default as TabsTab } from './tabs-tab';
42
+ export type { TabsTabProps } from './tabs-tab';
34
43
  export { default as Tag } from './tag';
35
44
  export type { TagProps, TagSize, TagVariant } from './tag';
36
45
  export { default as Table } from './table';
@@ -1,5 +1,8 @@
1
+ export type PillVariant = "pill" | "primary" | "secondary" | "success" | "destructive" | "ghost" | "warning" | "outline" | "outline-primary" | "outline-secondary" | "outline-success" | "outline-destructive" | "outline-ghost" | "outline-warning";
1
2
  export interface PillProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
2
3
  active?: boolean;
4
+ variant?: PillVariant;
5
+ size?: "sm" | "md";
3
6
  }
4
- declare const Pill: ({ active, className, ...props }: PillProps) => import('react').JSX.Element;
7
+ declare const Pill: ({ active, className, size, variant, ...props }: PillProps) => import('react').JSX.Element;
5
8
  export default Pill;
@@ -1,4 +1,4 @@
1
- import { DeepKeys, CellContext } from '@tanstack/react-table';
1
+ import { DeepKeys, SortFnOption, CellContext } from '@tanstack/react-table';
2
2
  import { ReactNode } from 'react';
3
3
  type TableColumnMeta = {
4
4
  headerLabel?: string;
@@ -19,6 +19,8 @@ export type TableColumnDef<TData extends object = Record<string, unknown>, TValu
19
19
  minSize?: number;
20
20
  maxSize?: number;
21
21
  filterFn?: string | false | ((...args: any[]) => boolean);
22
+ sortingFn?: SortFnOption<typeof features, TData>;
23
+ sortUndefined?: false | -1 | 1 | "first" | "last";
22
24
  filterSelectOptions?: {
23
25
  value: string;
24
26
  label: string;
@@ -0,0 +1,5 @@
1
+ import { Tabs as BaseTabs } from '@base-ui/react/tabs';
2
+ import { ComponentPropsWithoutRef } from 'react';
3
+ export type TabsListProps = ComponentPropsWithoutRef<typeof BaseTabs.List>;
4
+ declare const TabsList: ({ className, ...props }: TabsListProps) => import('react').JSX.Element;
5
+ export default TabsList;
@@ -0,0 +1,5 @@
1
+ import { Tabs as BaseTabs } from '@base-ui/react/tabs';
2
+ import { ComponentPropsWithoutRef } from 'react';
3
+ export type TabsPanelProps = ComponentPropsWithoutRef<typeof BaseTabs.Panel>;
4
+ declare const TabsPanel: ({ className, ...props }: TabsPanelProps) => import('react').JSX.Element;
5
+ export default TabsPanel;
@@ -0,0 +1,6 @@
1
+ import { Tabs as BaseTabs } from '@base-ui/react/tabs';
2
+ import { ComponentPropsWithoutRef } from 'react';
3
+ import { PillProps } from './pill';
4
+ export type TabsTabProps = ComponentPropsWithoutRef<typeof BaseTabs.Tab> & Pick<PillProps, "variant" | "size">;
5
+ declare const TabsTab: ({ className, variant, size, ...props }: TabsTabProps) => import('react').JSX.Element;
6
+ export default TabsTab;
@@ -0,0 +1,5 @@
1
+ import { Tabs as BaseTabs } from '@base-ui/react/tabs';
2
+ import { ComponentPropsWithoutRef } from 'react';
3
+ export type TabsProps = ComponentPropsWithoutRef<typeof BaseTabs.Root>;
4
+ declare const Tabs: ({ className, ...props }: TabsProps) => import('react').JSX.Element;
5
+ export default Tabs;
@@ -7,6 +7,10 @@ export declare class DateHandler {
7
7
  private static toDateTime;
8
8
  static getDateTime(date: unknown, format?: DateTimeFormat): string;
9
9
  static getRelativeTime(date: unknown, options?: ToRelativeOptions): string;
10
+ /** Format a whole-unit duration. Months are 30 days and years are 365 days. */
11
+ static formatDuration(value: number, { unit, }?: {
12
+ unit?: "milliseconds" | "seconds" | "minutes" | "hours" | "days" | "months" | "years";
13
+ }): string;
10
14
  static getTimeDiff(date: unknown): string | null;
11
15
  static generateOffsetDateTime({ offset, future, format, }: {
12
16
  offset: DurationLike;
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.6",
5
+ "version": "0.8.7",
6
6
  "type": "module",
7
7
  "main": "./dist/arc.js",
8
8
  "types": "./dist/index.d.ts",
@@ -55,7 +55,7 @@
55
55
  "devDependencies": {
56
56
  "@storybook/addon-docs": "10.6.6",
57
57
  "@storybook/react-vite": "10.6.6",
58
- "@tailwindcss/vite": "4.3.4",
58
+ "@tailwindcss/vite": "4.3.5",
59
59
  "@types/luxon": "3.7.6",
60
60
  "@types/node": "26.6.6",
61
61
  "@types/react": "19.3.0",
@@ -71,7 +71,7 @@
71
71
  "react": "19.3.1",
72
72
  "react-dom": "19.3.1",
73
73
  "storybook": "10.6.6",
74
- "tailwindcss": "4.3.4",
74
+ "tailwindcss": "4.3.5",
75
75
  "typescript": "7.0.2",
76
76
  "unplugin-dts": "1.1.2",
77
77
  "vite": "8.3.6"