@febkosq8/arc 0.8.0 → 0.8.1

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,16 +11,16 @@ 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 { rankItem as ee } from "@tanstack/match-sorter-utils";
15
- import { columnFilteringFeature as te, columnResizingFeature as ne, columnSizingFeature as re, columnVisibilityFeature as ie, createColumnHelper as ae, createFilteredRowModel as oe, createPaginatedRowModel as se, createSortedRowModel as ce, filterFn_includesString as le, globalFilteringFeature as ue, rowPaginationFeature as de, rowSortingFeature as fe, sortFn_alphanumeric as pe, sortFn_alphanumericCaseSensitive as me, sortFn_basic as he, sortFn_datetime as ge, sortFn_text as _e, sortFn_textCaseSensitive as ve, tableFeatures as ye, useTable as be } from "@tanstack/react-table";
16
- import { Switch as xe } from "@base-ui/react/switch";
14
+ import { rankItem as V } from "@tanstack/match-sorter-utils";
15
+ import { columnFilteringFeature as ee, columnResizingFeature as te, columnSizingFeature as ne, columnVisibilityFeature as re, createColumnHelper 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
+ import { Switch as be } from "@base-ui/react/switch";
17
17
  //#region components/button-group.tsx
18
- var Se = ({ className: e, orientation: r = "horizontal", selectedVariant: o, children: s, ...c }) => /* @__PURE__ */ f("div", {
18
+ var xe = ({ className: e, orientation: r = "horizontal", selectedVariant: o, children: s, ...c }) => /* @__PURE__ */ f("div", {
19
19
  role: "group",
20
20
  className: t("arc-button-group inline-flex w-fit gap-0 overflow-hidden rounded-md border border-border", "[&>.arc-button]:rounded-none! [&>.arc-button:not(:first-child)]:border-l [&>.arc-button:not(:first-child)]:border-border", "[&>.arc-double-click-button]:z-1 [&>.arc-double-click-button]:m-0 [&>.arc-double-click-button]:rounded-none! [&>.arc-double-click-button]:p-0", "[&>.arc-double-click-button>.arc-button]:rounded-none! [&>.arc-double-click-button>.arc-double-click-progress-ring]:inset-0 [&>.arc-double-click-button>.arc-double-click-progress-ring]:z-2 [&>.arc-double-click-button>.arc-double-click-progress-ring]:rounded-[inherit]", "[&>.arc-long-press-button]:z-1 [&>.arc-long-press-button]:m-0 [&>.arc-long-press-button]:rounded-none! [&>.arc-long-press-button]:p-0", "[&>.arc-long-press-button>.arc-button]:rounded-none! [&>.arc-long-press-button>.arc-double-click-progress-ring]:inset-0 [&>.arc-long-press-button>.arc-double-click-progress-ring]:z-2 [&>.arc-long-press-button>.arc-double-click-progress-ring]:rounded-[inherit]", r === "vertical" && "flex-col items-stretch [&>.arc-button]:w-full [&>.arc-double-click-button]:w-full [&>.arc-long-press-button]:w-full [&>.arc-button:not(:first-child)]:border-t [&>.arc-button:not(:first-child)]:border-l-0 [&>.arc-double-click-button:not(:first-child)]:border-t [&>.arc-double-click-button:not(:first-child)]:border-l-0 [&>.arc-long-press-button:not(:first-child)]:border-t [&>.arc-long-press-button:not(:first-child)]:border-l-0 [&>.arc-double-click-button:first-child]:rounded-t-md [&>.arc-double-click-button:last-child]:rounded-b-md [&>.arc-long-press-button:first-child]:rounded-t-md [&>.arc-long-press-button:last-child]:rounded-b-md", r === "horizontal" && "[&>.arc-double-click-button:not(:first-child)]:border-l [&>.arc-double-click-button:not(:first-child)]:border-border [&>.arc-long-press-button:not(:first-child)]:border-l [&>.arc-long-press-button:not(:first-child)]:border-border [&>.arc-double-click-button:first-child]:rounded-l-md [&>.arc-double-click-button:last-child]:rounded-r-md [&>.arc-long-press-button:first-child]:rounded-l-md [&>.arc-long-press-button:last-child]:rounded-r-md", e),
21
21
  ...c,
22
22
  children: n.map(s, (e) => !o || !a(e) ? e : e.props["aria-pressed"] === !0 ? i(e, { variant: o }) : e)
23
- }), Ce = e("inline-flex items-center justify-center 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:pointer-events-none disabled:opacity-50 truncate", {
23
+ }), Se = e("inline-flex items-center justify-center 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:pointer-events-none disabled:opacity-50 truncate", {
24
24
  variants: {
25
25
  variant: {
26
26
  primary: "bg-primary text-primary-foreground hover:bg-primary/90",
@@ -53,14 +53,14 @@ var Se = ({ className: e, orientation: r = "horizontal", selectedVariant: o, chi
53
53
  variant: "primary",
54
54
  size: "md"
55
55
  }
56
- }), V = Object.assign(({ className: e, variant: n, size: r, ...i }) => /* @__PURE__ */ f("button", {
57
- className: t("arc-button", Ce({
56
+ }), H = Object.assign(({ className: e, variant: n, size: r, ...i }) => /* @__PURE__ */ f("button", {
57
+ className: t("arc-button", Se({
58
58
  variant: n,
59
59
  size: r,
60
60
  className: e
61
61
  })),
62
62
  ...i
63
- }), { Group: Se }), we = ({ doubleClickMsDuration: e = 2e3, feedbackVariant: n = "warning", feedbackContent: r, variant: i = "primary", children: a, onClick: s, onDoubleClick: c, className: d, style: m, ...h }) => {
63
+ }), { Group: xe }), Ce = ({ doubleClickMsDuration: e = 2e3, feedbackVariant: n = "warning", feedbackContent: r, variant: i = "primary", children: a, onClick: s, onDoubleClick: c, className: d, style: m, ...h }) => {
64
64
  let [g, _] = u(!1), [v, y] = u(0), b = l(void 0), x = l(void 0), S = l(0), C = {
65
65
  primary: "var(--color-primary)",
66
66
  secondary: "var(--color-secondary-foreground)",
@@ -88,7 +88,7 @@ var Se = ({ className: e, orientation: r = "horizontal", selectedVariant: o, chi
88
88
  "aria-hidden": !g,
89
89
  children: w
90
90
  })]
91
- }), E = /* @__PURE__ */ f(V, {
91
+ }), E = /* @__PURE__ */ f(H, {
92
92
  ...h,
93
93
  children: T,
94
94
  className: t(d),
@@ -123,7 +123,7 @@ var Se = ({ className: e, orientation: r = "horizontal", selectedVariant: o, chi
123
123
  }
124
124
  })]
125
125
  });
126
- }, Te = ({ longPressMsDuration: e = 2500, onLongPress: n, onClick: r, preventClick: i = !0, feedbackVariant: a = "warning", feedbackContent: s, variant: c = "primary", children: d, ...m }) => {
126
+ }, we = ({ longPressMsDuration: e = 2500, onLongPress: n, onClick: r, preventClick: i = !0, feedbackVariant: a = "warning", feedbackContent: s, variant: c = "primary", children: d, ...m }) => {
127
127
  let h = l(void 0), g = l(void 0), _ = l(0), v = l(!1), [y, b] = u(!1), [x, S] = u(0), C = () => {
128
128
  h.current && clearTimeout(h.current), g.current && clearInterval(g.current), h.current = void 0, g.current = void 0;
129
129
  };
@@ -155,7 +155,7 @@ var Se = ({ className: e, orientation: r = "horizontal", selectedVariant: o, chi
155
155
  return /* @__PURE__ */ p("span", {
156
156
  className: "arc-long-press-button relative inline-flex",
157
157
  "data-long-press-state": y ? "pressing" : void 0,
158
- children: [/* @__PURE__ */ f(V, {
158
+ children: [/* @__PURE__ */ f(H, {
159
159
  ...m,
160
160
  children: E,
161
161
  variant: c,
@@ -190,7 +190,7 @@ var Se = ({ className: e, orientation: r = "horizontal", selectedVariant: o, chi
190
190
  }
191
191
  })]
192
192
  });
193
- }, Ee = e("arc-avatar inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full bg-muted ring-1 ring-border transition-all", {
193
+ }, Te = e("arc-avatar inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full bg-muted ring-1 ring-border transition-all", {
194
194
  variants: { size: {
195
195
  xs: "size-6 text-xs",
196
196
  sm: "size-7 text-sm",
@@ -199,12 +199,12 @@ var Se = ({ className: e, orientation: r = "horizontal", selectedVariant: o, chi
199
199
  xl: "size-12 text-xl"
200
200
  } },
201
201
  defaultVariants: { size: "md" }
202
- }), De = ({ name: e, image: n, size: r, className: i, ...a }) => {
202
+ }), Ee = ({ name: e, image: n, size: r, className: i, ...a }) => {
203
203
  let [s, l] = u(!1), d = n?.trim(), p = !!d && !s, m = c(() => e?.split(" ", 3)?.map((e) => e[0])?.filter((e) => /[A-Za-z]/.test(e))?.join("") || "U", [e]);
204
204
  return o(() => {
205
205
  l(!1);
206
206
  }, [d]), /* @__PURE__ */ f("span", {
207
- className: t(Ee({
207
+ className: t(Te({
208
208
  size: r,
209
209
  className: i
210
210
  })),
@@ -221,11 +221,11 @@ var Se = ({ className: e, orientation: r = "horizontal", selectedVariant: o, chi
221
221
  children: m
222
222
  })
223
223
  });
224
- }, Oe = ({ className: e, ...n }) => /* @__PURE__ */ f("div", {
224
+ }, De = ({ className: e, ...n }) => /* @__PURE__ */ f("div", {
225
225
  role: "separator",
226
226
  className: t("arc-divider w-full border-b border-border", e),
227
227
  ...n
228
- }), 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 }) => {
228
+ }), Oe = ({ 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 }) => {
229
229
  let d = e.find((e) => String(e.key) === String(n)) ?? null;
230
230
  return /* @__PURE__ */ f(m.Root, {
231
231
  items: e,
@@ -286,7 +286,7 @@ var Se = ({ className: e, orientation: r = "horizontal", selectedVariant: o, chi
286
286
  }) })]
287
287
  })
288
288
  });
289
- }, H = ({ data: e, className: n, ...r }) => {
289
+ }, U = ({ data: e, className: n, ...r }) => {
290
290
  let i = Array.isArray(e) ? e.join(", ") : typeof e == "string" ? e : null;
291
291
  return /* @__PURE__ */ f("em", {
292
292
  role: "alert",
@@ -295,19 +295,19 @@ var Se = ({ className: e, orientation: r = "horizontal", selectedVariant: o, chi
295
295
  ...r,
296
296
  children: i
297
297
  });
298
- }, Ae = /* @__PURE__ */ "*.+.×.÷.=.~.!.?.@.#.%.&.§.¶.※.◇.◆.○.●.△.▽.□.■.♠.♣.♦.♤.♧.♢.♪.♫.∴.∵".split(".");
299
- function U(e, t, n) {
298
+ }, ke = /* @__PURE__ */ "*.+.×.÷.=.~.!.?.@.#.%.&.§.¶.※.◇.◆.○.●.△.▽.□.■.♠.♣.♦.♤.♧.♢.♪.♫.∴.∵".split(".");
299
+ function W(e, t, n) {
300
300
  let r = Math.sin((e + 1) * 12.9898 + t * 78.233 + n * 37.719) * 43758.5453;
301
301
  return r - Math.floor(r);
302
302
  }
303
- var W = [
303
+ var G = [
304
304
  "circle",
305
305
  "square",
306
306
  "diamond",
307
307
  "star",
308
308
  "heart",
309
309
  "hexagon"
310
- ], je = e("arc-grid-loader__cell grid aspect-square w-full place-items-center overflow-hidden text-center leading-none break-all", {
310
+ ], Ae = e("arc-grid-loader__cell grid aspect-square w-full place-items-center overflow-hidden text-center leading-none break-all", {
311
311
  variants: { shape: {
312
312
  circle: "rounded-full",
313
313
  square: "rounded-md",
@@ -317,23 +317,23 @@ var W = [
317
317
  hexagon: "arc-grid-loader__cell--hexagon"
318
318
  } },
319
319
  defaultVariants: { shape: "circle" }
320
- }), Me = ({ className: e, rows: n = 3, columns: r = 3, size: i = 120, maxSize: a = 24, shape: s = "circle", shapes: c = W, colors: l = [], label: d = "Loading", symbols: p = Ae, style: m, ...h }) => {
321
- let [g, _] = u([]), [v, y] = u([]), [b, x] = u([]), S = c.length > 0 ? c : W, [C, w] = u(() => typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches);
320
+ }), je = ({ className: e, rows: n = 3, columns: r = 3, size: i = 120, maxSize: a = 24, shape: s = "circle", shapes: c = G, colors: l = [], label: d = "Loading", symbols: p = ke, title: m, style: h, ...g }) => {
321
+ let [_, v] = u([]), [y, b] = u([]), [x, S] = u([]), C = c.length > 0 ? c : G, [w, T] = u(() => typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches);
322
322
  if (o(() => {
323
- s === "mixed" && y(Array.from({ length: n * r }, () => S[Math.floor(Math.random() * S.length)]));
323
+ s === "mixed" && b(Array.from({ length: n * r }, () => C[Math.floor(Math.random() * C.length)]));
324
324
  }, [
325
- S,
325
+ C,
326
326
  r,
327
327
  n,
328
328
  s
329
329
  ]), o(() => {
330
- let e = window.matchMedia("(prefers-reduced-motion: reduce)"), t = () => w(e.matches);
330
+ let e = window.matchMedia("(prefers-reduced-motion: reduce)"), t = () => T(e.matches);
331
331
  return t(), e.addEventListener("change", t), () => e.removeEventListener("change", t);
332
332
  }, []), o(() => {
333
- C || p.length === 0 || _(Array.from({ length: n * r }, () => Math.floor(Math.random() * p.length)));
333
+ w || p.length === 0 || v(Array.from({ length: n * r }, () => Math.floor(Math.random() * p.length)));
334
334
  }, [
335
335
  r,
336
- C,
336
+ w,
337
337
  n,
338
338
  p
339
339
  ]), !Number.isInteger(n) || n < 1) throw RangeError("GridLoader rows must be a positive integer.");
@@ -341,15 +341,16 @@ var W = [
341
341
  if (!Number.isFinite(i) || i <= 0) throw RangeError("GridLoader size must be a positive number.");
342
342
  if (!Number.isFinite(a) || a <= 0) throw RangeError("GridLoader maxSize must be a positive number.");
343
343
  return /* @__PURE__ */ f("span", {
344
- ...h,
344
+ ...g,
345
345
  role: "status",
346
346
  "aria-live": "polite",
347
347
  "aria-label": d,
348
+ title: m ?? d,
348
349
  className: t("arc-grid-loader inline-flex shrink-0 items-center justify-center align-middle", e),
349
350
  style: {
350
351
  width: i,
351
352
  height: i,
352
- ...m
353
+ ...h
353
354
  },
354
355
  children: /* @__PURE__ */ f("span", {
355
356
  "aria-hidden": "true",
@@ -360,35 +361,35 @@ var W = [
360
361
  gridTemplateRows: `repeat(${n}, minmax(0, 1fr))`
361
362
  },
362
363
  children: Array.from({ length: n * r }, (e, o) => /* @__PURE__ */ f("span", {
363
- className: t(je({ shape: s === "mixed" ? v[o] ?? S[Math.floor(U(o, n, r) * S.length)] : s })),
364
+ className: t(Ae({ shape: s === "mixed" ? y[o] ?? C[Math.floor(W(o, n, r) * C.length)] : s })),
364
365
  onAnimationIteration: () => {
365
- s === "mixed" && y((e) => {
366
- let t = [...e], i = t[o] ?? S[Math.floor(U(o, n, r) * S.length)], a = S.filter((e) => e !== i);
366
+ s === "mixed" && b((e) => {
367
+ let t = [...e], i = t[o] ?? C[Math.floor(W(o, n, r) * C.length)], a = C.filter((e) => e !== i);
367
368
  return t[o] = a.length > 0 ? a[Math.floor(Math.random() * a.length)] : i, t;
368
- }), l.length > 1 && x((e) => {
369
+ }), l.length > 1 && S((e) => {
369
370
  let t = [...e];
370
371
  return t[o] = (t[o] ?? 0) + 1, t;
371
- }), p.length > 1 && _((e) => {
372
+ }), p.length > 1 && v((e) => {
372
373
  let t = [...e];
373
374
  return t[o] = ((t[o] ?? o % p.length) + (1 + Math.floor(Math.random() * (p.length - 1)))) % p.length, t;
374
375
  });
375
376
  },
376
377
  style: {
377
- animationDelay: l.length > 1 ? `${o / (n * r) * 1200}ms` : `${-U(o, n, r) * 1200}ms`,
378
- animationDuration: l.length > 1 ? "1200ms" : `${900 + U(o, n, r) * 600}ms`,
379
- backgroundColor: l.length > 0 ? l[(o + (b[o] ?? 0)) % l.length] : void 0,
378
+ animationDelay: l.length > 1 ? `${o / (n * r) * 1200}ms` : `${-W(o, n, r) * 1200}ms`,
379
+ animationDuration: l.length > 1 ? "1200ms" : `${900 + W(o, n, r) * 600}ms`,
380
+ backgroundColor: l.length > 0 ? l[(o + (x[o] ?? 0)) % l.length] : void 0,
380
381
  fontSize: `${Math.min(i / Math.max(n, r), a) * .4}px`,
381
382
  maxWidth: a,
382
383
  maxHeight: a
383
384
  },
384
385
  children: p.length > 0 && /* @__PURE__ */ f("span", {
385
386
  className: "grid h-full w-full place-items-center text-center leading-none",
386
- children: p[g[o] ?? o % p.length]
387
+ children: p[_[o] ?? o % p.length]
387
388
  })
388
389
  }, o))
389
390
  })
390
391
  });
391
- }, 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, {
392
+ }, K = ({ 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, {
392
393
  open: c,
393
394
  onOpenChange: l,
394
395
  children: [/* @__PURE__ */ f(A.Trigger, {
@@ -406,7 +407,7 @@ var W = [
406
407
  children: [/* @__PURE__ */ f(A.Arrow, { className: t("border-border bg-popover h-3 w-3 rotate-45", "data-[side=bottom]:-top-1.5 data-[side=bottom]:border-t data-[side=bottom]:border-l", "data-[side=top]:-bottom-1.5 data-[side=top]:border-r data-[side=top]:border-b", "data-[side=left]:-right-1.5 data-[side=left]:border-t data-[side=left]:border-r", "data-[side=right]:-left-1.5 data-[side=right]:border-b data-[side=right]:border-l") }), e]
407
408
  })
408
409
  }) })]
409
- }), Ne = ({ id: e, label: n, help: r, errors: i, className: a, ...o }) => {
410
+ }), Me = ({ id: e, label: n, help: r, errors: i, className: a, ...o }) => {
410
411
  let s = Array.isArray(i) ? i.map((e) => e == null ? "" : String(e)) : typeof i == "string" ? i : null;
411
412
  return /* @__PURE__ */ p("div", {
412
413
  ...o,
@@ -418,7 +419,7 @@ var W = [
418
419
  htmlFor: e,
419
420
  children: n
420
421
  }),
421
- r != null && r !== !1 && /* @__PURE__ */ f(G, {
422
+ r != null && r !== !1 && /* @__PURE__ */ f(K, {
422
423
  trigger: "hover",
423
424
  triggerRender: /* @__PURE__ */ f("button", {
424
425
  type: "button",
@@ -434,10 +435,10 @@ var W = [
434
435
  "aria-hidden": "true"
435
436
  })
436
437
  }),
437
- s && (Array.isArray(s) ? s.length > 0 && /* @__PURE__ */ f(H, { data: s }) : /* @__PURE__ */ f(H, { data: s }))
438
+ s && (Array.isArray(s) ? s.length > 0 && /* @__PURE__ */ f(U, { data: s }) : /* @__PURE__ */ f(U, { data: s }))
438
439
  ]
439
440
  });
440
- }, Pe = 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", {
441
+ }, Ne = 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", {
441
442
  variants: {
442
443
  variant: {
443
444
  default: "border-border bg-background",
@@ -452,8 +453,8 @@ var W = [
452
453
  variant: "default",
453
454
  as: "input"
454
455
  }
455
- }), K = ({ as: e = "input", className: n, variant: r, ...i }) => {
456
- let a = t(Pe({
456
+ }), q = ({ as: e = "input", className: n, variant: r, ...i }) => {
457
+ let a = t(Ne({
457
458
  as: e,
458
459
  variant: r
459
460
  }), n);
@@ -462,7 +463,7 @@ var W = [
462
463
  autoComplete: "off",
463
464
  className: a
464
465
  });
465
- }, Fe = e("arc-card group relative rounded-lg border border-foreground/40 bg-card/90 p-3 shadow-xs", {
466
+ }, Pe = e("arc-card group relative rounded-lg border border-foreground/40 bg-card/90 p-3 shadow-xs", {
466
467
  variants: { variant: {
467
468
  primary: "border-primary bg-primary text-primary-foreground",
468
469
  secondary: "border-secondary bg-secondary text-secondary-foreground",
@@ -474,10 +475,10 @@ var W = [
474
475
  "outline-warning": "border-warning bg-background text-warning"
475
476
  } },
476
477
  defaultVariants: { variant: "outline-secondary" }
477
- }), q = (e) => {
478
+ }), J = (e) => {
478
479
  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;
479
480
  return /* @__PURE__ */ f("div", {
480
- className: t(Fe({ 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),
481
+ className: t(Pe({ 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),
481
482
  onPointerMove: h ? (e) => {
482
483
  if (u?.(e), !h) return;
483
484
  let t = e.currentTarget.getBoundingClientRect();
@@ -486,19 +487,19 @@ var W = [
486
487
  ...d
487
488
  });
488
489
  };
489
- q.Header = (e) => {
490
+ J.Header = (e) => {
490
491
  let { className: n, ...r } = e;
491
492
  return /* @__PURE__ */ f("h2", {
492
493
  className: t("arc-card-header flex w-full typography-heading-3 flex-col border-foreground/40 px-0 pb-1", n),
493
494
  ...r
494
495
  });
495
- }, q.Content = (e) => {
496
+ }, J.Content = (e) => {
496
497
  let { className: n, ...r } = e;
497
498
  return /* @__PURE__ */ f("div", {
498
499
  className: t("arc-card-content typography-paragraph mt-0! w-full justify-between px-0 py-1 whitespace-pre-wrap", n),
499
500
  ...r
500
501
  });
501
- }, q.Footer = (e) => {
502
+ }, J.Footer = (e) => {
502
503
  let { className: n, ...r } = e;
503
504
  return /* @__PURE__ */ f("div", {
504
505
  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),
@@ -507,7 +508,7 @@ q.Header = (e) => {
507
508
  };
508
509
  //#endregion
509
510
  //#region utilities/date-handler.ts
510
- var J = class e {
511
+ var Fe = class e {
511
512
  static toDateTime(e) {
512
513
  if (e == null || e === "") return j.invalid("missing date");
513
514
  if (e instanceof Date) return j.fromJSDate(e);
@@ -566,8 +567,8 @@ var J = class e {
566
567
  return n.replace("$ISO$", r).replace("$RELATIVE$", i);
567
568
  }
568
569
  }, Ie = ({ value: e, format: t = "$ISO$ ($RELATIVE$)", ...n }) => {
569
- let r = c(() => e ? J.getFormattedTime(e, t) : "", [e, t]);
570
- return /* @__PURE__ */ f(K, {
570
+ let r = c(() => e ? Fe.getFormattedTime(e, t) : "", [e, t]);
571
+ return /* @__PURE__ */ f(q, {
571
572
  type: "text",
572
573
  disabled: !0,
573
574
  readOnly: !0,
@@ -863,34 +864,34 @@ var J = class e {
863
864
  })),
864
865
  ...r
865
866
  }), We = (e, t, n, r) => {
866
- let i = e.getValue(t), a = ee(i, n);
867
+ let i = e.getValue(t), a = V(i, n);
867
868
  return r({ itemRank: a }), a.passed;
868
869
  }, Q = {
869
870
  fuzzy: We,
870
- includesString: le,
871
+ includesString: ce,
871
872
  select: (e, t, n) => {
872
873
  let r = e.getValue(t);
873
874
  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);
874
875
  }
875
- }, Ge = ye({
876
+ }, Ge = ve({
876
877
  columnMeta: {},
877
- columnFilteringFeature: te,
878
- columnResizingFeature: ne,
879
- columnSizingFeature: re,
880
- columnVisibilityFeature: ie,
881
- globalFilteringFeature: ue,
882
- rowPaginationFeature: de,
883
- rowSortingFeature: fe,
884
- filteredRowModel: oe(),
885
- paginatedRowModel: se(),
886
- sortedRowModel: ce(),
878
+ columnFilteringFeature: ee,
879
+ columnResizingFeature: te,
880
+ columnSizingFeature: ne,
881
+ columnVisibilityFeature: re,
882
+ globalFilteringFeature: le,
883
+ rowPaginationFeature: ue,
884
+ rowSortingFeature: de,
885
+ filteredRowModel: ae(),
886
+ paginatedRowModel: oe(),
887
+ sortedRowModel: se(),
887
888
  sortFns: {
888
- alphanumeric: pe,
889
- alphanumericCaseSensitive: me,
890
- basic: he,
891
- datetime: ge,
892
- text: _e,
893
- textCaseSensitive: ve
889
+ alphanumeric: fe,
890
+ alphanumericCaseSensitive: pe,
891
+ basic: me,
892
+ datetime: he,
893
+ text: ge,
894
+ textCaseSensitive: _e
894
895
  },
895
896
  filterFns: Q
896
897
  });
@@ -904,7 +905,7 @@ function qe(e, t) {
904
905
  throw Error(`Unsupported table filterFn "${e}". Use "auto" or one of: ${Object.keys(Q).join(", ")}.`);
905
906
  }
906
907
  }
907
- var Je = ae(), Ye = ({ data: e, columnDef: n, pageSize: r = 10, className: i, showHeader: a = !0, showFilters: o = !0, showSorting: l = !0 }) => {
908
+ var Je = ie(), Ye = ({ data: e, columnDef: n, pageSize: r = 10, className: i, showHeader: a = !0, showFilters: o = !0, showSorting: l = !0 }) => {
908
909
  let d = s(), [m, b] = u({
909
910
  pageIndex: 0,
910
911
  pageSize: r
@@ -945,7 +946,7 @@ var Je = ae(), Ye = ({ data: e, columnDef: n, pageSize: r = 10, className: i, sh
945
946
  });
946
947
  },
947
948
  cell: e.cell ?? ((e) => e.getValue())
948
- })), [n]), P = be({
949
+ })), [n]), P = ye({
949
950
  data: e,
950
951
  columns: N,
951
952
  state: {
@@ -977,7 +978,7 @@ var Je = ae(), Ye = ({ data: e, columnDef: n, pageSize: r = 10, className: i, sh
977
978
  children: [
978
979
  /* @__PURE__ */ p("div", {
979
980
  className: "flex items-center gap-2",
980
- children: [/* @__PURE__ */ p(V, {
981
+ children: [/* @__PURE__ */ p(H, {
981
982
  variant: "outline-secondary",
982
983
  size: "sm",
983
984
  disabled: !M && O.length === 0,
@@ -995,7 +996,7 @@ var Je = ae(), Ye = ({ data: e, columnDef: n, pageSize: r = 10, className: i, sh
995
996
  children: [
996
997
  /* @__PURE__ */ p("div", {
997
998
  className: "flex items-center gap-1",
998
- children: [/* @__PURE__ */ f(V, {
999
+ children: [/* @__PURE__ */ f(H, {
999
1000
  variant: "outline-secondary",
1000
1001
  size: "icon-md",
1001
1002
  className: "h-10 w-10 sm:h-8 sm:w-8",
@@ -1011,7 +1012,7 @@ var Je = ae(), Ye = ({ data: e, columnDef: n, pageSize: r = 10, className: i, sh
1011
1012
  "aria-hidden": "true",
1012
1013
  className: "h-3.5 w-3.5"
1013
1014
  })
1014
- }), /* @__PURE__ */ f(V, {
1015
+ }), /* @__PURE__ */ f(H, {
1015
1016
  variant: "outline-secondary",
1016
1017
  size: "icon-md",
1017
1018
  className: "h-10 w-10 sm:h-8 sm:w-8",
@@ -1057,7 +1058,7 @@ var Je = ae(), Ye = ({ data: e, columnDef: n, pageSize: r = 10, className: i, sh
1057
1058
  }),
1058
1059
  /* @__PURE__ */ p("div", {
1059
1060
  className: "flex items-center gap-1",
1060
- children: [/* @__PURE__ */ f(V, {
1061
+ children: [/* @__PURE__ */ f(H, {
1061
1062
  variant: "outline-secondary",
1062
1063
  size: "icon-md",
1063
1064
  className: "h-10 w-10 sm:h-8 sm:w-8",
@@ -1073,7 +1074,7 @@ var Je = ae(), Ye = ({ data: e, columnDef: n, pageSize: r = 10, className: i, sh
1073
1074
  "aria-hidden": "true",
1074
1075
  className: "h-3.5 w-3.5"
1075
1076
  })
1076
- }), /* @__PURE__ */ f(V, {
1077
+ }), /* @__PURE__ */ f(H, {
1077
1078
  variant: "outline-secondary",
1078
1079
  size: "icon-md",
1079
1080
  className: "h-10 w-10 sm:h-8 sm:w-8",
@@ -1152,7 +1153,7 @@ var Je = ae(), Ye = ({ data: e, columnDef: n, pageSize: r = 10, className: i, sh
1152
1153
  label: e.columnDef.meta?.headerLabel ?? e.id
1153
1154
  }))]
1154
1155
  })]
1155
- }), /* @__PURE__ */ f(V, {
1156
+ }), /* @__PURE__ */ f(H, {
1156
1157
  variant: "outline-secondary",
1157
1158
  size: "icon-sm",
1158
1159
  disabled: O.length === 0,
@@ -1262,7 +1263,7 @@ function Xe({ value: e, onChange: t, debounce: n = 500, ...r }) {
1262
1263
  i,
1263
1264
  n,
1264
1265
  t
1265
- ]), /* @__PURE__ */ f(K, {
1266
+ ]), /* @__PURE__ */ f(q, {
1266
1267
  ...r,
1267
1268
  value: i,
1268
1269
  onChange: (e) => a(e.target.value),
@@ -1301,9 +1302,9 @@ function Ze({ column: e, idPrefix: t = "" }) {
1301
1302
  });
1302
1303
  }
1303
1304
  function Qe({ table: e }) {
1304
- return /* @__PURE__ */ p(G, {
1305
+ return /* @__PURE__ */ p(K, {
1305
1306
  trigger: "click",
1306
- triggerRender: /* @__PURE__ */ f(V, {
1307
+ triggerRender: /* @__PURE__ */ f(H, {
1307
1308
  variant: "outline-secondary",
1308
1309
  size: "sm",
1309
1310
  title: "Toggle columns",
@@ -1316,7 +1317,7 @@ function Qe({ table: e }) {
1316
1317
  className: "flex flex-col",
1317
1318
  children: e.getAllLeafColumns().map((e) => {
1318
1319
  let n = e.columnDef.meta?.headerLabel ?? e.id, r = e.getCanHide(), i = e.getIsVisible();
1319
- return /* @__PURE__ */ p(V, {
1320
+ return /* @__PURE__ */ p(H, {
1320
1321
  variant: "ghost",
1321
1322
  size: "sm",
1322
1323
  disabled: !r,
@@ -1339,7 +1340,7 @@ var $e = ({ className: e, href: n, text: r, target: i = "_blank", rel: a, ...o }
1339
1340
  rel: a ?? (i === "_blank" ? "noopener noreferrer" : void 0),
1340
1341
  ...o,
1341
1342
  children: r
1342
- }), et = ({ checked: e = !1, onChange: n, disabled: r = !1, variant: i = "primary", children: a, ...o }) => /* @__PURE__ */ f(xe.Root, {
1343
+ }), et = ({ checked: e = !1, onChange: n, disabled: r = !1, variant: i = "primary", children: a, ...o }) => /* @__PURE__ */ f(be.Root, {
1343
1344
  checked: e,
1344
1345
  disabled: r,
1345
1346
  onCheckedChange: n,
@@ -1348,7 +1349,7 @@ var $e = ({ className: e, href: n, text: r, target: i = "_blank", rel: a, ...o }
1348
1349
  disabled: r
1349
1350
  })),
1350
1351
  ...o,
1351
- children: a ? a(e) : /* @__PURE__ */ f(xe.Thumb, {
1352
+ children: a ? a(e) : /* @__PURE__ */ f(be.Thumb, {
1352
1353
  "aria-hidden": "true",
1353
1354
  className: nt({
1354
1355
  variant: i,
@@ -1646,13 +1647,13 @@ function dt({ strings: e, placeholder: t, perTick: n = {
1646
1647
  O,
1647
1648
  v
1648
1649
  ]);
1649
- let R = A ? "." : "", z = d !== "clear", B = lt(d), ee = w.reduce((e, t) => e + t.split("\n").length, 0);
1650
+ let R = A ? "." : "", z = d !== "clear", B = lt(d), V = w.reduce((e, t) => e + t.split("\n").length, 0);
1650
1651
  return z ? /* @__PURE__ */ f("div", {
1651
1652
  ref: (e) => {
1652
1653
  M.current = e;
1653
1654
  },
1654
1655
  className: "arc-typing-animation overflow-hidden",
1655
- style: { "--typing-roll-offset": ee },
1656
+ style: { "--typing-roll-offset": V },
1656
1657
  children: /* @__PURE__ */ p("div", {
1657
1658
  className: "whitespace-pre-line",
1658
1659
  children: [
@@ -1712,4 +1713,4 @@ function mt({ container: e, sectionIds: t, hashFirstSection: n = !0, onActiveCha
1712
1713
  return o(), e.addEventListener("scroll", o, { passive: !0 }), () => e.removeEventListener("scroll", o);
1713
1714
  }
1714
1715
  //#endregion
1715
- export { De as Avatar, V as Button, Se as ButtonGroup, q as Card, J as DateHandler, Oe as Divider, we as DoubleClickButton, ke as Dropdown, H as ErrorText, Me as GridLoader, K as Input, Ie as InputTimestamp, Ne as LabelField, Te as LongPressButton, X as Menu, Be as Modal, Ve as MultiDropdown, Y as Pill, Re as PillLink, G as PreviewCard, Z as Select, et as Switch, Ye as Table, Ue as Tag, $e as TextLink, ct as ThemeSwitcher, dt as TypingAnimation, ft as navigateToHashOnLoad, mt as updateHashOnScroll, pt as useHashNavigationOnLoad };
1716
+ export { Ee as Avatar, H as Button, xe as ButtonGroup, J as Card, Fe as DateHandler, De as Divider, Ce as DoubleClickButton, Oe as Dropdown, U as ErrorText, je as GridLoader, q as Input, Ie as InputTimestamp, Me as LabelField, we as LongPressButton, X as Menu, Be as Modal, Ve as MultiDropdown, Y as Pill, Re as PillLink, K as PreviewCard, Z as Select, et as Switch, Ye as Table, Ue as Tag, $e as TextLink, ct as ThemeSwitcher, dt as TypingAnimation, ft as navigateToHashOnLoad, mt as updateHashOnScroll, pt as useHashNavigationOnLoad };
@@ -12,5 +12,5 @@ export interface GridLoaderProps extends React.ComponentPropsWithoutRef<"span">
12
12
  label?: string;
13
13
  symbols?: string[];
14
14
  }
15
- declare const GridLoader: ({ className, rows, columns, size, maxSize, shape, shapes, colors, label, symbols, style, ...props }: GridLoaderProps) => import('react').JSX.Element;
15
+ declare const GridLoader: ({ className, rows, columns, size, maxSize, shape, shapes, colors, label, symbols, title, style, ...props }: GridLoaderProps) => import('react').JSX.Element;
16
16
  export default GridLoader;
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.0",
5
+ "version": "0.8.1",
6
6
  "type": "module",
7
7
  "main": "./dist/arc.js",
8
8
  "types": "./dist/index.d.ts",