@febkosq8/arc 0.7.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.
Files changed (34) hide show
  1. package/README.md +1 -0
  2. package/dist/arc.js +206 -248
  3. package/dist/{grid-loader.d.ts → components/grid-loader.d.ts} +3 -1
  4. package/dist/components/index.d.ts +44 -0
  5. package/dist/index.d.ts +2 -47
  6. package/dist/utilities/index.d.ts +3 -0
  7. package/package.json +1 -1
  8. /package/dist/{avatar.d.ts → components/avatar.d.ts} +0 -0
  9. /package/dist/{button-double-click.d.ts → components/button-double-click.d.ts} +0 -0
  10. /package/dist/{button-group.d.ts → components/button-group.d.ts} +0 -0
  11. /package/dist/{button-long-press.d.ts → components/button-long-press.d.ts} +0 -0
  12. /package/dist/{button.d.ts → components/button.d.ts} +0 -0
  13. /package/dist/{card.d.ts → components/card.d.ts} +0 -0
  14. /package/dist/{divider.d.ts → components/divider.d.ts} +0 -0
  15. /package/dist/{dropdown-multi.d.ts → components/dropdown-multi.d.ts} +0 -0
  16. /package/dist/{dropdown.d.ts → components/dropdown.d.ts} +0 -0
  17. /package/dist/{error-text.d.ts → components/error-text.d.ts} +0 -0
  18. /package/dist/{input-timestamp.d.ts → components/input-timestamp.d.ts} +0 -0
  19. /package/dist/{input.d.ts → components/input.d.ts} +0 -0
  20. /package/dist/{label-field.d.ts → components/label-field.d.ts} +0 -0
  21. /package/dist/{menu.d.ts → components/menu.d.ts} +0 -0
  22. /package/dist/{modal.d.ts → components/modal.d.ts} +0 -0
  23. /package/dist/{pill-link.d.ts → components/pill-link.d.ts} +0 -0
  24. /package/dist/{pill.d.ts → components/pill.d.ts} +0 -0
  25. /package/dist/{preview-card.d.ts → components/preview-card.d.ts} +0 -0
  26. /package/dist/{select.d.ts → components/select.d.ts} +0 -0
  27. /package/dist/{switch.d.ts → components/switch.d.ts} +0 -0
  28. /package/dist/{table.d.ts → components/table.d.ts} +0 -0
  29. /package/dist/{tag.d.ts → components/tag.d.ts} +0 -0
  30. /package/dist/{text-link.d.ts → components/text-link.d.ts} +0 -0
  31. /package/dist/{theme-switcher.d.ts → components/theme-switcher.d.ts} +0 -0
  32. /package/dist/{typing-animation.d.ts → components/typing-animation.d.ts} +0 -0
  33. /package/dist/{date-handler.d.ts → utilities/date-handler.d.ts} +0 -0
  34. /package/dist/{hash-navigation.d.ts → utilities/hash-navigation.d.ts} +0 -0
package/README.md CHANGED
@@ -64,6 +64,7 @@ export function Example() {
64
64
  - [npm package](https://www.npmjs.com/package/@febkosq8/arc)
65
65
  - [GitHub repository](https://github.com/febkosq8/arc)
66
66
  - [Component source](./components/)
67
+ - [Utility source](./utilities/)
67
68
  - [Storybook stories](./stories/)
68
69
 
69
70
  Arc is primarily built to meet my own projects' needs. It's shared publicly for anyone who might find the code useful, but it isn't intended as a polished, general-purpose replacement for a larger UI framework.
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,45 +190,7 @@ var Se = ({ className: e, orientation: r = "horizontal", selectedVariant: o, chi
190
190
  }
191
191
  })]
192
192
  });
193
- };
194
- //#endregion
195
- //#region components/hash-navigation.ts
196
- function Ee({ intervalMs: e = 500, maxAttempts: t = 20, behavior: n = "smooth", block: r } = {}) {
197
- if (typeof window > "u") return () => {};
198
- let i = 0, a = setInterval(() => {
199
- i += 1;
200
- let { hash: e } = window.location;
201
- if (!e || i > t) clearInterval(a);
202
- else try {
203
- let t = document.querySelector(e);
204
- t && (t.scrollIntoView({
205
- behavior: n,
206
- block: r
207
- }), clearInterval(a));
208
- } catch (t) {
209
- console.error(`Invalid hash in URL: ${e}`, t), clearInterval(a);
210
- }
211
- }, e);
212
- return () => clearInterval(a);
213
- }
214
- function De(e) {
215
- o(() => Ee(e), []);
216
- }
217
- function Oe({ container: e, sectionIds: t, hashFirstSection: n = !0, onActiveChange: r }) {
218
- let i = t.map((e) => document.getElementById(e)).filter((e) => e !== null), a = window.location.hash.toLowerCase().slice(1) || null, o = () => {
219
- let t = e.getBoundingClientRect(), o = t.top + t.height / 2, s = i.find((e) => {
220
- let t = e.getBoundingClientRect();
221
- return t.top <= o && t.bottom > o;
222
- }), c = s ? i.indexOf(s) : -1;
223
- if (r?.(c, i), !s || (a === s.id.toLowerCase() && (a = null), c === 0 && a)) return;
224
- let l = c === 0 && !n ? "" : `#${s.id}`;
225
- window.location.hash !== l && (window.history.replaceState(window.history.state, "", `${window.location.pathname}${window.location.search}${l}`), window.dispatchEvent(new HashChangeEvent("hashchange")));
226
- };
227
- return o(), e.addEventListener("scroll", o, { passive: !0 }), () => e.removeEventListener("scroll", o);
228
- }
229
- //#endregion
230
- //#region components/avatar.tsx
231
- var ke = 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", {
232
194
  variants: { size: {
233
195
  xs: "size-6 text-xs",
234
196
  sm: "size-7 text-sm",
@@ -237,12 +199,12 @@ var ke = e("arc-avatar inline-flex shrink-0 items-center justify-center overflow
237
199
  xl: "size-12 text-xl"
238
200
  } },
239
201
  defaultVariants: { size: "md" }
240
- }), Ae = ({ name: e, image: n, size: r, className: i, ...a }) => {
202
+ }), Ee = ({ name: e, image: n, size: r, className: i, ...a }) => {
241
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]);
242
204
  return o(() => {
243
205
  l(!1);
244
206
  }, [d]), /* @__PURE__ */ f("span", {
245
- className: t(ke({
207
+ className: t(Te({
246
208
  size: r,
247
209
  className: i
248
210
  })),
@@ -259,11 +221,11 @@ var ke = e("arc-avatar inline-flex shrink-0 items-center justify-center overflow
259
221
  children: m
260
222
  })
261
223
  });
262
- }, je = ({ className: e, ...n }) => /* @__PURE__ */ f("div", {
224
+ }, De = ({ className: e, ...n }) => /* @__PURE__ */ f("div", {
263
225
  role: "separator",
264
226
  className: t("arc-divider w-full border-b border-border", e),
265
227
  ...n
266
- }), Me = ({ 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 }) => {
267
229
  let d = e.find((e) => String(e.key) === String(n)) ?? null;
268
230
  return /* @__PURE__ */ f(m.Root, {
269
231
  items: e,
@@ -324,7 +286,7 @@ var ke = e("arc-avatar inline-flex shrink-0 items-center justify-center overflow
324
286
  }) })]
325
287
  })
326
288
  });
327
- }, H = ({ data: e, className: n, ...r }) => {
289
+ }, U = ({ data: e, className: n, ...r }) => {
328
290
  let i = Array.isArray(e) ? e.join(", ") : typeof e == "string" ? e : null;
329
291
  return /* @__PURE__ */ f("em", {
330
292
  role: "alert",
@@ -333,45 +295,19 @@ var ke = e("arc-avatar inline-flex shrink-0 items-center justify-center overflow
333
295
  ...r,
334
296
  children: i
335
297
  });
336
- }, Ne = [
337
- "(,,> ᴗ <,,)",
338
- "≽^•⩊•^≼",
339
- "(╥﹏╥)",
340
- "(˶ᵔ ᵕ ᵔ˶)",
341
- "•⩊•",
342
- "˚₊‧꒰ა ₍ᐢ. ̫.ᐢ₎ ໒꒱ ‧₊˚",
343
- "٩(ˊᗜˋ )و",
344
- "(≧◡≦)",
345
- "⸜(。˃ ᵕ ˂ )⸝♡",
346
- "(˶˃⤙˂˶)",
347
- "(˶′◡‵˶)",
348
- "(^▽^)",
349
- "˚₊‧꒰ა. .໒꒱ ‧₊˚",
350
- "( ˶ˆᗜˆ˵ )",
351
- "⊹ ₊ ⁺‧₊˚ ♡ ପ(๑•ᴗ•๑)ଓ ♡˚₊‧⁺ ₊ ⊹",
352
- "(つ﹏⊂)",
353
- "ʕ•̫͡•ʕ•̫͡•ʔ•̫͡•ʔ•̫͡•ʕ•̫͡•ʔ•̫͡ʕ•̫͡•ʕ•̫͡•ʔ•̫͡ʔ•̫͡•",
354
- "(´・` )♡",
355
- "(╥_╥)",
356
- "(♡ˊ͈ ꒳ ˋ͈)",
357
- "(⸝⸝๑ ̫ ๑⸝⸝⸝)",
358
- "(˶º⤙º˶)",
359
- "૮₍。´ᴖ ˔ ᴖ`。₎ა",
360
- "(•̀ᴗ•́)و ̑̑",
361
- "(─‿‿─)"
362
- ];
363
- function U(e, t, n) {
298
+ }, ke = /* @__PURE__ */ "*.+.×.÷.=.~.!.?.@.#.%.&.§.¶.※.◇.◆.○.●.△.▽.□.■.♠.♣.♦.♤.♧.♢.♪.♫.∴.∵".split(".");
299
+ function W(e, t, n) {
364
300
  let r = Math.sin((e + 1) * 12.9898 + t * 78.233 + n * 37.719) * 43758.5453;
365
301
  return r - Math.floor(r);
366
302
  }
367
- var W = [
303
+ var G = [
368
304
  "circle",
369
305
  "square",
370
306
  "diamond",
371
307
  "star",
372
308
  "heart",
373
309
  "hexagon"
374
- ], Pe = 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", {
375
311
  variants: { shape: {
376
312
  circle: "rounded-full",
377
313
  square: "rounded-md",
@@ -381,59 +317,40 @@ var W = [
381
317
  hexagon: "arc-grid-loader__cell--hexagon"
382
318
  } },
383
319
  defaultVariants: { shape: "circle" }
384
- }), Fe = ({ className: e, rows: n = 3, columns: r = 3, size: i = 120, maxSize: a = 24, shape: s = "circle", colors: c = [], label: l = "Loading", symbols: d = Ne, style: p, ...m }) => {
385
- let [h, g] = u([]), [_, v] = u([]), [y, b] = u([]), [x, S] = 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);
386
322
  if (o(() => {
387
- s === "mixed" && v(Array.from({ length: n * r }, () => W[Math.floor(Math.random() * W.length)]));
388
- }, [
389
- r,
390
- n,
391
- s
392
- ]), o(() => {
393
- s === "mixed" && c.length !== 0 && b(Array.from({ length: n * r }, () => Math.floor(Math.random() * c.length)));
323
+ s === "mixed" && b(Array.from({ length: n * r }, () => C[Math.floor(Math.random() * C.length)]));
394
324
  }, [
325
+ C,
395
326
  r,
396
- c.length,
397
327
  n,
398
328
  s
399
329
  ]), o(() => {
400
- let e = window.matchMedia("(prefers-reduced-motion: reduce)"), t = () => S(e.matches);
330
+ let e = window.matchMedia("(prefers-reduced-motion: reduce)"), t = () => T(e.matches);
401
331
  return t(), e.addEventListener("change", t), () => e.removeEventListener("change", t);
402
332
  }, []), o(() => {
403
- if (x) return;
404
- let e = () => {
405
- let e = Array.from({ length: d.length }, (e, t) => t);
406
- for (let t = e.length - 1; t > 0; --t) {
407
- let n = Math.floor(Math.random() * (t + 1));
408
- [e[t], e[n]] = [e[n], e[t]];
409
- }
410
- g(Array.from({ length: n * r }, (t, n) => e[n % e.length]));
411
- };
412
- if (e(), d.length < 2) return;
413
- let t = window.setInterval(() => {
414
- e();
415
- }, 900);
416
- return () => window.clearInterval(t);
333
+ w || p.length === 0 || v(Array.from({ length: n * r }, () => Math.floor(Math.random() * p.length)));
417
334
  }, [
418
335
  r,
419
- x,
336
+ w,
420
337
  n,
421
- d
338
+ p
422
339
  ]), !Number.isInteger(n) || n < 1) throw RangeError("GridLoader rows must be a positive integer.");
423
340
  if (!Number.isInteger(r) || r < 1) throw RangeError("GridLoader columns must be a positive integer.");
424
341
  if (!Number.isFinite(i) || i <= 0) throw RangeError("GridLoader size must be a positive number.");
425
342
  if (!Number.isFinite(a) || a <= 0) throw RangeError("GridLoader maxSize must be a positive number.");
426
- if (d.length === 0) throw RangeError("GridLoader symbols must contain at least one item.");
427
343
  return /* @__PURE__ */ f("span", {
428
- ...m,
344
+ ...g,
429
345
  role: "status",
430
346
  "aria-live": "polite",
431
- "aria-label": l,
347
+ "aria-label": d,
348
+ title: m ?? d,
432
349
  className: t("arc-grid-loader inline-flex shrink-0 items-center justify-center align-middle", e),
433
350
  style: {
434
351
  width: i,
435
352
  height: i,
436
- ...p
353
+ ...h
437
354
  },
438
355
  children: /* @__PURE__ */ f("span", {
439
356
  "aria-hidden": "true",
@@ -444,29 +361,35 @@ var W = [
444
361
  gridTemplateRows: `repeat(${n}, minmax(0, 1fr))`
445
362
  },
446
363
  children: Array.from({ length: n * r }, (e, o) => /* @__PURE__ */ f("span", {
447
- className: t(Pe({ shape: s === "mixed" ? _[o] ?? W[Math.floor(U(o, n, r) * W.length)] : s })),
364
+ className: t(Ae({ shape: s === "mixed" ? y[o] ?? C[Math.floor(W(o, n, r) * C.length)] : s })),
448
365
  onAnimationIteration: () => {
449
- s === "mixed" && (v((e) => {
450
- let t = [...e], i = t[o] ?? W[Math.floor(U(o, n, r) * W.length)], a = W.filter((e) => e !== i);
451
- return t[o] = a[Math.floor(Math.random() * a.length)], t;
452
- }), c.length > 1 && b((e) => {
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);
368
+ return t[o] = a.length > 0 ? a[Math.floor(Math.random() * a.length)] : i, t;
369
+ }), l.length > 1 && S((e) => {
370
+ let t = [...e];
371
+ return t[o] = (t[o] ?? 0) + 1, t;
372
+ }), p.length > 1 && v((e) => {
453
373
  let t = [...e];
454
- return t[o] = ((t[o] ?? o % c.length) + (1 + Math.floor(Math.random() * (c.length - 1)))) % c.length, t;
455
- }));
374
+ return t[o] = ((t[o] ?? o % p.length) + (1 + Math.floor(Math.random() * (p.length - 1)))) % p.length, t;
375
+ });
456
376
  },
457
377
  style: {
458
- animationDelay: `${-U(o, n, r) * 1200}ms`,
459
- animationDuration: `${900 + U(o, n, r) * 600}ms`,
460
- backgroundColor: c.length > 0 ? c[s === "mixed" ? y[o] ?? o % c.length : o % c.length] : void 0,
461
- fontSize: `${Math.min(i / Math.max(n, r), a) * .3}px`,
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,
381
+ fontSize: `${Math.min(i / Math.max(n, r), a) * .4}px`,
462
382
  maxWidth: a,
463
383
  maxHeight: a
464
384
  },
465
- children: d[h[o] ?? o % d.length]
385
+ children: p.length > 0 && /* @__PURE__ */ f("span", {
386
+ className: "grid h-full w-full place-items-center text-center leading-none",
387
+ children: p[_[o] ?? o % p.length]
388
+ })
466
389
  }, o))
467
390
  })
468
391
  });
469
- }, 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, {
470
393
  open: c,
471
394
  onOpenChange: l,
472
395
  children: [/* @__PURE__ */ f(A.Trigger, {
@@ -484,7 +407,7 @@ var W = [
484
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]
485
408
  })
486
409
  }) })]
487
- }), Ie = ({ id: e, label: n, help: r, errors: i, className: a, ...o }) => {
410
+ }), Me = ({ id: e, label: n, help: r, errors: i, className: a, ...o }) => {
488
411
  let s = Array.isArray(i) ? i.map((e) => e == null ? "" : String(e)) : typeof i == "string" ? i : null;
489
412
  return /* @__PURE__ */ p("div", {
490
413
  ...o,
@@ -496,7 +419,7 @@ var W = [
496
419
  htmlFor: e,
497
420
  children: n
498
421
  }),
499
- r != null && r !== !1 && /* @__PURE__ */ f(G, {
422
+ r != null && r !== !1 && /* @__PURE__ */ f(K, {
500
423
  trigger: "hover",
501
424
  triggerRender: /* @__PURE__ */ f("button", {
502
425
  type: "button",
@@ -512,10 +435,10 @@ var W = [
512
435
  "aria-hidden": "true"
513
436
  })
514
437
  }),
515
- 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 }))
516
439
  ]
517
440
  });
518
- }, Le = 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", {
519
442
  variants: {
520
443
  variant: {
521
444
  default: "border-border bg-background",
@@ -530,8 +453,8 @@ var W = [
530
453
  variant: "default",
531
454
  as: "input"
532
455
  }
533
- }), K = ({ as: e = "input", className: n, variant: r, ...i }) => {
534
- let a = t(Le({
456
+ }), q = ({ as: e = "input", className: n, variant: r, ...i }) => {
457
+ let a = t(Ne({
535
458
  as: e,
536
459
  variant: r
537
460
  }), n);
@@ -540,7 +463,7 @@ var W = [
540
463
  autoComplete: "off",
541
464
  className: a
542
465
  });
543
- }, Re = 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", {
544
467
  variants: { variant: {
545
468
  primary: "border-primary bg-primary text-primary-foreground",
546
469
  secondary: "border-secondary bg-secondary text-secondary-foreground",
@@ -552,10 +475,10 @@ var W = [
552
475
  "outline-warning": "border-warning bg-background text-warning"
553
476
  } },
554
477
  defaultVariants: { variant: "outline-secondary" }
555
- }), q = (e) => {
478
+ }), J = (e) => {
556
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;
557
480
  return /* @__PURE__ */ f("div", {
558
- className: t(Re({ 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),
559
482
  onPointerMove: h ? (e) => {
560
483
  if (u?.(e), !h) return;
561
484
  let t = e.currentTarget.getBoundingClientRect();
@@ -564,19 +487,19 @@ var W = [
564
487
  ...d
565
488
  });
566
489
  };
567
- q.Header = (e) => {
490
+ J.Header = (e) => {
568
491
  let { className: n, ...r } = e;
569
492
  return /* @__PURE__ */ f("h2", {
570
493
  className: t("arc-card-header flex w-full typography-heading-3 flex-col border-foreground/40 px-0 pb-1", n),
571
494
  ...r
572
495
  });
573
- }, q.Content = (e) => {
496
+ }, J.Content = (e) => {
574
497
  let { className: n, ...r } = e;
575
498
  return /* @__PURE__ */ f("div", {
576
499
  className: t("arc-card-content typography-paragraph mt-0! w-full justify-between px-0 py-1 whitespace-pre-wrap", n),
577
500
  ...r
578
501
  });
579
- }, q.Footer = (e) => {
502
+ }, J.Footer = (e) => {
580
503
  let { className: n, ...r } = e;
581
504
  return /* @__PURE__ */ f("div", {
582
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),
@@ -584,8 +507,8 @@ q.Header = (e) => {
584
507
  });
585
508
  };
586
509
  //#endregion
587
- //#region components/date-handler.ts
588
- var ze = class e {
510
+ //#region utilities/date-handler.ts
511
+ var Fe = class e {
589
512
  static toDateTime(e) {
590
513
  if (e == null || e === "") return j.invalid("missing date");
591
514
  if (e instanceof Date) return j.fromJSDate(e);
@@ -602,7 +525,7 @@ var ze = class e {
602
525
  }
603
526
  return j.fromJSDate(new Date(String(e)));
604
527
  }
605
- static getDateTime(t, n = "dd/MM/yyyy hh:mm:ss a") {
528
+ static getDateTime(t, n = "dd/MMM/yyyy hh:mm:ss a") {
606
529
  let r = e.toDateTime(t);
607
530
  return r.isValid ? r.toFormat(n) : "";
608
531
  }
@@ -643,9 +566,9 @@ var ze = class e {
643
566
  let r = e.getDateTime(t), i = e.getRelativeTime(t);
644
567
  return n.replace("$ISO$", r).replace("$RELATIVE$", i);
645
568
  }
646
- }, Be = ({ value: e, format: t = "$ISO$ ($RELATIVE$)", ...n }) => {
647
- let r = c(() => e ? ze.getFormattedTime(e, t) : "", [e, t]);
648
- return /* @__PURE__ */ f(K, {
569
+ }, Ie = ({ value: e, format: t = "$ISO$ ($RELATIVE$)", ...n }) => {
570
+ let r = c(() => e ? Fe.getFormattedTime(e, t) : "", [e, t]);
571
+ return /* @__PURE__ */ f(q, {
649
572
  type: "text",
650
573
  disabled: !0,
651
574
  readOnly: !0,
@@ -653,7 +576,7 @@ var ze = class e {
653
576
  size: Math.max(r.length, 1),
654
577
  ...n
655
578
  });
656
- }, Ve = e("inline-flex 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", {
579
+ }, Le = e("inline-flex 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", {
657
580
  variants: {
658
581
  variant: {
659
582
  pill: "arc-pill-link 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",
@@ -674,8 +597,8 @@ var ze = class e {
674
597
  variant: "pill",
675
598
  size: "md"
676
599
  }
677
- }), He = ({ active: e = !1, className: n, size: r = "md", variant: i = "pill", ...a }) => /* @__PURE__ */ f("a", {
678
- className: t(Ve({
600
+ }), Re = ({ active: e = !1, className: n, size: r = "md", variant: i = "pill", ...a }) => /* @__PURE__ */ f("a", {
601
+ className: t(Le({
679
602
  variant: i,
680
603
  size: r
681
604
  }), e && {
@@ -685,15 +608,15 @@ var ze = class e {
685
608
  }[i], n),
686
609
  "aria-current": e ? "page" : void 0,
687
610
  ...a
688
- }), J = ({ active: e = !1, className: n, ...r }) => /* @__PURE__ */ f("button", {
611
+ }), Y = ({ active: e = !1, className: n, ...r }) => /* @__PURE__ */ f("button", {
689
612
  type: "button",
690
613
  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),
691
614
  "aria-pressed": e,
692
615
  ...r
693
- }), 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, {
616
+ }), ze = ({ 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)), X = Object.assign(({ className: e, contentClassName: n, active: r, activeClassName: i, buttonText: a, children: o }) => /* @__PURE__ */ p(M.Root, {
694
617
  loopFocus: !0,
695
618
  children: [/* @__PURE__ */ p(M.Trigger, {
696
- render: /* @__PURE__ */ f(J, {
619
+ render: /* @__PURE__ */ f(Y, {
697
620
  active: r,
698
621
  className: t("w-fit", r && i, e)
699
622
  }),
@@ -707,7 +630,7 @@ var ze = class e {
707
630
  collisionPadding: 8,
708
631
  children: /* @__PURE__ */ f(M.Popup, {
709
632
  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),
710
- children: /* @__PURE__ */ f(Ue, { children: o })
633
+ children: /* @__PURE__ */ f(ze, { children: o })
711
634
  })
712
635
  }) })]
713
636
  }), {
@@ -748,12 +671,12 @@ var ze = class e {
748
671
  collisionPadding: 8,
749
672
  children: /* @__PURE__ */ f(M.Popup, {
750
673
  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",
751
- children: /* @__PURE__ */ f(Ue, { children: i })
674
+ children: /* @__PURE__ */ f(ze, { children: i })
752
675
  })
753
676
  }) })]
754
677
  });
755
678
  }
756
- }), We = ({ open: e = !1, setOpen: n, children: r, initialFocus: i, headerContent: a, footerContent: s, width: c, height: l, className: u, customKeyHandler: d }) => (o(() => {
679
+ }), Be = ({ open: e = !1, setOpen: n, children: r, initialFocus: i, headerContent: a, footerContent: s, width: c, height: l, className: u, customKeyHandler: d }) => (o(() => {
757
680
  if (!e) return;
758
681
  let t = (e) => {
759
682
  let t = e.key === "Escape" ? "esc" : (e.ctrlKey || e.metaKey) && e.key.toLowerCase() === "s" ? "ctrl+s" : null;
@@ -792,7 +715,7 @@ var ze = class e {
792
715
  ]
793
716
  })
794
717
  })] })
795
- })), 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 }) => {
718
+ })), Ve = ({ 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 }) => {
796
719
  let h = n.filter((e) => r?.includes(String(e.key)));
797
720
  return /* @__PURE__ */ f(m.Root, {
798
721
  multiple: !0,
@@ -872,7 +795,7 @@ var ze = class e {
872
795
  }) })]
873
796
  })
874
797
  });
875
- }, X = ({ id: e, value: n, onChange: r, data: i, className: a, disabled: o, placeholder: s, ...c }) => /* @__PURE__ */ p(B.Root, {
798
+ }, Z = ({ id: e, value: n, onChange: r, data: i, className: a, disabled: o, placeholder: s, ...c }) => /* @__PURE__ */ p(B.Root, {
876
799
  value: n,
877
800
  onValueChange: (e) => {
878
801
  e !== null && r(e);
@@ -924,7 +847,7 @@ var ze = class e {
924
847
  })
925
848
  })
926
849
  }) })]
927
- }), Ke = e("arc-tag inline-flex w-fit items-center rounded-full border border-transparent px-1.5 py-0.5 text-xs font-bold", {
850
+ }), He = e("arc-tag inline-flex w-fit items-center rounded-full border border-transparent px-1.5 py-0.5 text-xs font-bold", {
928
851
  variants: { variant: {
929
852
  primary: "bg-primary text-primary-foreground",
930
853
  secondary: "border-border bg-secondary text-secondary-foreground",
@@ -934,59 +857,59 @@ var ze = class e {
934
857
  outline: "border-border bg-transparent text-foreground"
935
858
  } },
936
859
  defaultVariants: { variant: "primary" }
937
- }), qe = ({ className: e, variant: n, ...r }) => /* @__PURE__ */ f("div", {
938
- className: t(Ke({
860
+ }), Ue = ({ className: e, variant: n, ...r }) => /* @__PURE__ */ f("div", {
861
+ className: t(He({
939
862
  variant: n,
940
863
  className: e
941
864
  })),
942
865
  ...r
943
- }), Je = (e, t, n, r) => {
944
- let i = e.getValue(t), a = ee(i, n);
866
+ }), We = (e, t, n, r) => {
867
+ let i = e.getValue(t), a = V(i, n);
945
868
  return r({ itemRank: a }), a.passed;
946
- }, Z = {
947
- fuzzy: Je,
948
- includesString: le,
869
+ }, Q = {
870
+ fuzzy: We,
871
+ includesString: ce,
949
872
  select: (e, t, n) => {
950
873
  let r = e.getValue(t);
951
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);
952
875
  }
953
- }, Ye = ye({
876
+ }, Ge = ve({
954
877
  columnMeta: {},
955
- columnFilteringFeature: te,
956
- columnResizingFeature: ne,
957
- columnSizingFeature: re,
958
- columnVisibilityFeature: ie,
959
- globalFilteringFeature: ue,
960
- rowPaginationFeature: de,
961
- rowSortingFeature: fe,
962
- filteredRowModel: oe(),
963
- paginatedRowModel: se(),
964
- 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(),
965
888
  sortFns: {
966
- alphanumeric: pe,
967
- alphanumericCaseSensitive: me,
968
- basic: he,
969
- datetime: ge,
970
- text: _e,
971
- textCaseSensitive: ve
889
+ alphanumeric: fe,
890
+ alphanumericCaseSensitive: pe,
891
+ basic: me,
892
+ datetime: he,
893
+ text: ge,
894
+ textCaseSensitive: _e
972
895
  },
973
- filterFns: Z
896
+ filterFns: Q
974
897
  });
975
- function Xe(e) {
976
- return Object.prototype.hasOwnProperty.call(Z, e);
898
+ function Ke(e) {
899
+ return Object.prototype.hasOwnProperty.call(Q, e);
977
900
  }
978
- function Ze(e, t) {
901
+ function qe(e, t) {
979
902
  if (e !== !1) {
980
903
  if (e === void 0) return t ? "select" : void 0;
981
- if (typeof e == "function" || e === "auto" || Xe(e)) return e;
982
- throw Error(`Unsupported table filterFn "${e}". Use "auto" or one of: ${Object.keys(Z).join(", ")}.`);
904
+ if (typeof e == "function" || e === "auto" || Ke(e)) return e;
905
+ throw Error(`Unsupported table filterFn "${e}". Use "auto" or one of: ${Object.keys(Q).join(", ")}.`);
983
906
  }
984
907
  }
985
- var Qe = ae(), $e = ({ 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 }) => {
986
909
  let d = s(), [m, b] = u({
987
910
  pageIndex: 0,
988
911
  pageSize: r
989
- }), [x, w] = u([]), [T, D] = u(""), [O, k] = u([]), [A, j] = u({}), M = x.length > 0 || T !== "", N = c(() => n?.map((e) => Qe.accessor(e.accessorKey, {
912
+ }), [x, w] = u([]), [T, D] = u(""), [O, k] = u([]), [A, j] = u({}), M = x.length > 0 || T !== "", N = c(() => n?.map((e) => Je.accessor(e.accessorKey, {
990
913
  id: e.id,
991
914
  enableResizing: e.enableResizing,
992
915
  enableColumnFilter: e.filterFn !== !1 && e.enableColumnFilter,
@@ -995,7 +918,7 @@ var Qe = ae(), $e = ({ data: e, columnDef: n, pageSize: r = 10, className: i, sh
995
918
  size: e.size,
996
919
  minSize: e.minSize ?? 50,
997
920
  maxSize: e.maxSize ?? 1e3,
998
- filterFn: Ze(e.filterFn, e.filterSelectOptions),
921
+ filterFn: qe(e.filterFn, e.filterSelectOptions),
999
922
  meta: {
1000
923
  headerLabel: e.header,
1001
924
  filterSelectOptions: e.filterSelectOptions,
@@ -1023,7 +946,7 @@ var Qe = ae(), $e = ({ data: e, columnDef: n, pageSize: r = 10, className: i, sh
1023
946
  });
1024
947
  },
1025
948
  cell: e.cell ?? ((e) => e.getValue())
1026
- })), [n]), P = be({
949
+ })), [n]), P = ye({
1027
950
  data: e,
1028
951
  columns: N,
1029
952
  state: {
@@ -1039,8 +962,8 @@ var Qe = ae(), $e = ({ data: e, columnDef: n, pageSize: r = 10, className: i, sh
1039
962
  onSortingChange: k,
1040
963
  onColumnFiltersChange: w,
1041
964
  onGlobalFilterChange: D,
1042
- globalFilterFn: Je,
1043
- features: Ye,
965
+ globalFilterFn: We,
966
+ features: Ge,
1044
967
  defaultColumn: {
1045
968
  size: 200,
1046
969
  minSize: 50,
@@ -1055,7 +978,7 @@ var Qe = ae(), $e = ({ data: e, columnDef: n, pageSize: r = 10, className: i, sh
1055
978
  children: [
1056
979
  /* @__PURE__ */ p("div", {
1057
980
  className: "flex items-center gap-2",
1058
- children: [/* @__PURE__ */ p(V, {
981
+ children: [/* @__PURE__ */ p(H, {
1059
982
  variant: "outline-secondary",
1060
983
  size: "sm",
1061
984
  disabled: !M && O.length === 0,
@@ -1065,7 +988,7 @@ var Qe = ae(), $e = ({ data: e, columnDef: n, pageSize: r = 10, className: i, sh
1065
988
  title: "Clear filters and sorting",
1066
989
  type: "button",
1067
990
  children: [/* @__PURE__ */ f(E, { className: "mr-1.5 h-3 w-3" }), "Clear filters and sorting"]
1068
- }), /* @__PURE__ */ f(nt, { table: P })]
991
+ }), /* @__PURE__ */ f(Qe, { table: P })]
1069
992
  }),
1070
993
  /* @__PURE__ */ p("nav", {
1071
994
  "aria-label": "Table pagination",
@@ -1073,7 +996,7 @@ var Qe = ae(), $e = ({ data: e, columnDef: n, pageSize: r = 10, className: i, sh
1073
996
  children: [
1074
997
  /* @__PURE__ */ p("div", {
1075
998
  className: "flex items-center gap-1",
1076
- children: [/* @__PURE__ */ f(V, {
999
+ children: [/* @__PURE__ */ f(H, {
1077
1000
  variant: "outline-secondary",
1078
1001
  size: "icon-md",
1079
1002
  className: "h-10 w-10 sm:h-8 sm:w-8",
@@ -1089,7 +1012,7 @@ var Qe = ae(), $e = ({ data: e, columnDef: n, pageSize: r = 10, className: i, sh
1089
1012
  "aria-hidden": "true",
1090
1013
  className: "h-3.5 w-3.5"
1091
1014
  })
1092
- }), /* @__PURE__ */ f(V, {
1015
+ }), /* @__PURE__ */ f(H, {
1093
1016
  variant: "outline-secondary",
1094
1017
  size: "icon-md",
1095
1018
  className: "h-10 w-10 sm:h-8 sm:w-8",
@@ -1135,7 +1058,7 @@ var Qe = ae(), $e = ({ data: e, columnDef: n, pageSize: r = 10, className: i, sh
1135
1058
  }),
1136
1059
  /* @__PURE__ */ p("div", {
1137
1060
  className: "flex items-center gap-1",
1138
- children: [/* @__PURE__ */ f(V, {
1061
+ children: [/* @__PURE__ */ f(H, {
1139
1062
  variant: "outline-secondary",
1140
1063
  size: "icon-md",
1141
1064
  className: "h-10 w-10 sm:h-8 sm:w-8",
@@ -1151,7 +1074,7 @@ var Qe = ae(), $e = ({ data: e, columnDef: n, pageSize: r = 10, className: i, sh
1151
1074
  "aria-hidden": "true",
1152
1075
  className: "h-3.5 w-3.5"
1153
1076
  })
1154
- }), /* @__PURE__ */ f(V, {
1077
+ }), /* @__PURE__ */ f(H, {
1155
1078
  variant: "outline-secondary",
1156
1079
  size: "icon-md",
1157
1080
  className: "h-10 w-10 sm:h-8 sm:w-8",
@@ -1174,7 +1097,7 @@ var Qe = ae(), $e = ({ data: e, columnDef: n, pageSize: r = 10, className: i, sh
1174
1097
  /* @__PURE__ */ p("label", {
1175
1098
  htmlFor: `${d}-page-size`,
1176
1099
  className: "text-muted-foreground flex w-full items-center justify-between gap-2 text-xs md:w-auto",
1177
- children: ["Rows per page", /* @__PURE__ */ f(X, {
1100
+ children: ["Rows per page", /* @__PURE__ */ f(Z, {
1178
1101
  id: `${d}-page-size`,
1179
1102
  value: P.state.pagination.pageSize.toString(),
1180
1103
  onChange: (e) => {
@@ -1213,7 +1136,7 @@ var Qe = ae(), $e = ({ data: e, columnDef: n, pageSize: r = 10, className: i, sh
1213
1136
  htmlFor: `${d}-sort`,
1214
1137
  className: "text-muted-foreground mb-1 block text-xs font-medium",
1215
1138
  children: "Sort by"
1216
- }), /* @__PURE__ */ f(X, {
1139
+ }), /* @__PURE__ */ f(Z, {
1217
1140
  id: `${d}-sort`,
1218
1141
  value: O[0]?.id ?? "__none__",
1219
1142
  onChange: (e) => {
@@ -1230,7 +1153,7 @@ var Qe = ae(), $e = ({ data: e, columnDef: n, pageSize: r = 10, className: i, sh
1230
1153
  label: e.columnDef.meta?.headerLabel ?? e.id
1231
1154
  }))]
1232
1155
  })]
1233
- }), /* @__PURE__ */ f(V, {
1156
+ }), /* @__PURE__ */ f(H, {
1234
1157
  variant: "outline-secondary",
1235
1158
  size: "icon-sm",
1236
1159
  disabled: O.length === 0,
@@ -1257,7 +1180,7 @@ var Qe = ae(), $e = ({ data: e, columnDef: n, pageSize: r = 10, className: i, sh
1257
1180
  htmlFor: n,
1258
1181
  className: "text-muted-foreground mb-1 block text-xs font-medium",
1259
1182
  children: t
1260
- }), /* @__PURE__ */ f(tt, {
1183
+ }), /* @__PURE__ */ f(Ze, {
1261
1184
  column: e,
1262
1185
  idPrefix: `${d}-`
1263
1186
  })]
@@ -1327,7 +1250,7 @@ var Qe = ae(), $e = ({ data: e, columnDef: n, pageSize: r = 10, className: i, sh
1327
1250
  ]
1328
1251
  });
1329
1252
  };
1330
- function et({ value: e, onChange: t, debounce: n = 500, ...r }) {
1253
+ function Xe({ value: e, onChange: t, debounce: n = 500, ...r }) {
1331
1254
  let [i, a] = u(e);
1332
1255
  return o(() => {
1333
1256
  a(e);
@@ -1340,14 +1263,14 @@ function et({ value: e, onChange: t, debounce: n = 500, ...r }) {
1340
1263
  i,
1341
1264
  n,
1342
1265
  t
1343
- ]), /* @__PURE__ */ f(K, {
1266
+ ]), /* @__PURE__ */ f(q, {
1344
1267
  ...r,
1345
1268
  value: i,
1346
1269
  onChange: (e) => a(e.target.value),
1347
1270
  autoComplete: "off"
1348
1271
  });
1349
1272
  }
1350
- function tt({ column: e, idPrefix: t = "" }) {
1273
+ function Ze({ column: e, idPrefix: t = "" }) {
1351
1274
  let n = `${t}${e.id}-filter`, r = {
1352
1275
  includesString: "Includes string",
1353
1276
  equalsString: "Equals string",
@@ -1355,7 +1278,7 @@ function tt({ column: e, idPrefix: t = "" }) {
1355
1278
  equals: "Equals",
1356
1279
  fuzzy: "Fuzzy"
1357
1280
  }, i = e.getFilterValue(), a = e.columnDef.meta?.filterSelectOptions;
1358
- return a ? /* @__PURE__ */ f(X, {
1281
+ return a ? /* @__PURE__ */ f(Z, {
1359
1282
  id: n,
1360
1283
  value: i ?? "__all__",
1361
1284
  onChange: (t) => e.setFilterValue(t === "__all__" ? void 0 : t),
@@ -1367,7 +1290,7 @@ function tt({ column: e, idPrefix: t = "" }) {
1367
1290
  key: e.value,
1368
1291
  label: e.label
1369
1292
  }))]
1370
- }) : /* @__PURE__ */ f(et, {
1293
+ }) : /* @__PURE__ */ f(Xe, {
1371
1294
  id: n,
1372
1295
  type: "text",
1373
1296
  name: e.id,
@@ -1378,10 +1301,10 @@ function tt({ column: e, idPrefix: t = "" }) {
1378
1301
  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"
1379
1302
  });
1380
1303
  }
1381
- function nt({ table: e }) {
1382
- return /* @__PURE__ */ p(G, {
1304
+ function Qe({ table: e }) {
1305
+ return /* @__PURE__ */ p(K, {
1383
1306
  trigger: "click",
1384
- triggerRender: /* @__PURE__ */ f(V, {
1307
+ triggerRender: /* @__PURE__ */ f(H, {
1385
1308
  variant: "outline-secondary",
1386
1309
  size: "sm",
1387
1310
  title: "Toggle columns",
@@ -1394,7 +1317,7 @@ function nt({ table: e }) {
1394
1317
  className: "flex flex-col",
1395
1318
  children: e.getAllLeafColumns().map((e) => {
1396
1319
  let n = e.columnDef.meta?.headerLabel ?? e.id, r = e.getCanHide(), i = e.getIsVisible();
1397
- return /* @__PURE__ */ p(V, {
1320
+ return /* @__PURE__ */ p(H, {
1398
1321
  variant: "ghost",
1399
1322
  size: "sm",
1400
1323
  disabled: !r,
@@ -1410,31 +1333,31 @@ function nt({ table: e }) {
1410
1333
  }
1411
1334
  //#endregion
1412
1335
  //#region components/text-link.tsx
1413
- var rt = ({ className: e, href: n, text: r, target: i = "_blank", rel: a, ...o }) => /* @__PURE__ */ f("a", {
1336
+ var $e = ({ className: e, href: n, text: r, target: i = "_blank", rel: a, ...o }) => /* @__PURE__ */ f("a", {
1414
1337
  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),
1415
1338
  href: n,
1416
1339
  target: i,
1417
1340
  rel: a ?? (i === "_blank" ? "noopener noreferrer" : void 0),
1418
1341
  ...o,
1419
1342
  children: r
1420
- }), it = ({ 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, {
1421
1344
  checked: e,
1422
1345
  disabled: r,
1423
1346
  onCheckedChange: n,
1424
- className: t("arc-switch", at({
1347
+ className: t("arc-switch", tt({
1425
1348
  variant: i,
1426
1349
  disabled: r
1427
1350
  })),
1428
1351
  ...o,
1429
- children: a ? a(e) : /* @__PURE__ */ f(xe.Thumb, {
1352
+ children: a ? a(e) : /* @__PURE__ */ f(be.Thumb, {
1430
1353
  "aria-hidden": "true",
1431
- className: ot({
1354
+ className: nt({
1432
1355
  variant: i,
1433
1356
  checked: e,
1434
1357
  disabled: r
1435
1358
  })
1436
1359
  })
1437
- }), at = 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: {
1360
+ }), tt = 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: {
1438
1361
  variant: {
1439
1362
  danger: "data-checked:bg-destructive",
1440
1363
  success: "data-checked:bg-success",
@@ -1445,7 +1368,7 @@ var rt = ({ className: e, href: n, text: r, target: i = "_blank", rel: a, ...o }
1445
1368
  true: "ring-2 ring-border",
1446
1369
  false: ""
1447
1370
  }
1448
- } }), ot = 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", {
1371
+ } }), nt = 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", {
1449
1372
  variants: {
1450
1373
  variant: {
1451
1374
  primary: "",
@@ -1538,7 +1461,7 @@ var rt = ({ className: e, href: n, text: r, target: i = "_blank", rel: a, ...o }
1538
1461
  className: "border-success bg-success/70"
1539
1462
  }
1540
1463
  ]
1541
- }), Q = {
1464
+ }), rt = {
1542
1465
  light: L,
1543
1466
  dark: I,
1544
1467
  system: F
@@ -1546,25 +1469,25 @@ var rt = ({ className: e, href: n, text: r, target: i = "_blank", rel: a, ...o }
1546
1469
  light: "Light",
1547
1470
  dark: "Dark",
1548
1471
  system: "System"
1549
- }, st = "theme", ct = (e) => e === "dark" || e === "system" && typeof window < "u" && window.matchMedia("(prefers-color-scheme: dark)").matches, lt = () => {
1472
+ }, it = "theme", at = (e) => e === "dark" || e === "system" && typeof window < "u" && window.matchMedia("(prefers-color-scheme: dark)").matches, ot = () => {
1550
1473
  if (typeof window > "u") return "system";
1551
- let e = window.localStorage.getItem(st);
1474
+ let e = window.localStorage.getItem(it);
1552
1475
  return e === "light" || e === "dark" || e === "system" ? e : "system";
1553
- }, ut = (e) => e === "system" ? "light" : e === "light" ? "dark" : "system";
1554
- function dt({ variant: e = "dropdown", showLabel: n = !1 }) {
1555
- let [r, i] = u(lt);
1476
+ }, st = (e) => e === "system" ? "light" : e === "light" ? "dark" : "system";
1477
+ function ct({ variant: e = "dropdown", showLabel: n = !1 }) {
1478
+ let [r, i] = u(ot);
1556
1479
  o(() => {
1557
- typeof window < "u" && (document.documentElement.classList.toggle("dark", ct(r)), window.localStorage.setItem(st, r));
1480
+ typeof window < "u" && (document.documentElement.classList.toggle("dark", at(r)), window.localStorage.setItem(it, r));
1558
1481
  }, [r]);
1559
1482
  let a = () => {
1560
- i(ut(r));
1483
+ i(st(r));
1561
1484
  };
1562
1485
  if (e === "toggle") {
1563
- let e = Q[r], t = ut(r);
1486
+ let e = rt[r], t = st(r);
1564
1487
  return /* @__PURE__ */ f("div", {
1565
1488
  className: "arc-theme-switcher",
1566
- children: /* @__PURE__ */ p(J, {
1567
- active: ct(r),
1489
+ children: /* @__PURE__ */ p(Y, {
1490
+ active: at(r),
1568
1491
  "aria-label": `Switch to ${t} theme`,
1569
1492
  title: `Switch to ${t} theme`,
1570
1493
  onClick: a,
@@ -1573,18 +1496,18 @@ function dt({ variant: e = "dropdown", showLabel: n = !1 }) {
1573
1496
  })
1574
1497
  });
1575
1498
  }
1576
- let s = Q[r];
1499
+ let s = rt[r];
1577
1500
  return /* @__PURE__ */ f("div", {
1578
1501
  className: "arc-theme-switcher",
1579
- children: /* @__PURE__ */ p(Y, {
1502
+ children: /* @__PURE__ */ p(X, {
1580
1503
  className: "gap-3",
1581
1504
  contentClassName: "min-w-(--anchor-width)",
1582
1505
  buttonText: /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(s, { "aria-hidden": "true" }), n && $[r]] }),
1583
1506
  children: [
1584
- /* @__PURE__ */ f(Y.Item, {
1507
+ /* @__PURE__ */ f(X.Item, {
1585
1508
  asChild: !0,
1586
1509
  className: t("border-0! focus-visible:outline-none", n ? "px-3!" : "justify-center! p-0!"),
1587
- children: /* @__PURE__ */ p(J, {
1510
+ children: /* @__PURE__ */ p(Y, {
1588
1511
  active: r === "system",
1589
1512
  title: "System Theme",
1590
1513
  onClick: () => {
@@ -1597,10 +1520,10 @@ function dt({ variant: e = "dropdown", showLabel: n = !1 }) {
1597
1520
  }), n && $.system]
1598
1521
  })
1599
1522
  }),
1600
- /* @__PURE__ */ f(Y.Item, {
1523
+ /* @__PURE__ */ f(X.Item, {
1601
1524
  asChild: !0,
1602
1525
  className: t("border-0! focus-visible:outline-none", n ? "px-3!" : "justify-center! p-0!"),
1603
- children: /* @__PURE__ */ p(J, {
1526
+ children: /* @__PURE__ */ p(Y, {
1604
1527
  active: r === "light",
1605
1528
  title: "Light Theme",
1606
1529
  onClick: () => {
@@ -1613,10 +1536,10 @@ function dt({ variant: e = "dropdown", showLabel: n = !1 }) {
1613
1536
  }), n && $.light]
1614
1537
  })
1615
1538
  }),
1616
- /* @__PURE__ */ f(Y.Item, {
1539
+ /* @__PURE__ */ f(X.Item, {
1617
1540
  asChild: !0,
1618
1541
  className: t("border-0! focus-visible:outline-none", n ? "px-3!" : "justify-center! p-0!"),
1619
- children: /* @__PURE__ */ p(J, {
1542
+ children: /* @__PURE__ */ p(Y, {
1620
1543
  active: r === "dark",
1621
1544
  title: "Dark Theme",
1622
1545
  onClick: () => {
@@ -1635,16 +1558,16 @@ function dt({ variant: e = "dropdown", showLabel: n = !1 }) {
1635
1558
  }
1636
1559
  //#endregion
1637
1560
  //#region components/typing-animation.tsx
1638
- function ft(e) {
1561
+ function lt(e) {
1639
1562
  return e === "newline" ? "\n" : e === "comma" ? ", " : "";
1640
1563
  }
1641
- function pt(e, t, n, r, i) {
1564
+ function ut(e, t, n, r, i) {
1642
1565
  if (r === "character") return Math.max(0, Math.min(e.length, t + n * i));
1643
1566
  let a = [...e.matchAll(/\S+\s*/g)].map((e) => e.index + e[0].length), o = t;
1644
1567
  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;
1645
1568
  return o;
1646
1569
  }
1647
- function mt({ strings: e, placeholder: t, perTick: n = {
1570
+ function dt({ strings: e, placeholder: t, perTick: n = {
1648
1571
  amount: 1,
1649
1572
  unit: "character"
1650
1573
  }, msDelay: r = {
@@ -1689,9 +1612,9 @@ function mt({ strings: e, placeholder: t, perTick: n = {
1689
1612
  T([]), C(""), N.current += 1, P.current = 0, t = setTimeout(r, _);
1690
1613
  return;
1691
1614
  }
1692
- if (L.current) P.current = pt(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);
1615
+ 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);
1693
1616
  else {
1694
- if (P.current = pt(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) {
1617
+ 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) {
1695
1618
  k(!0);
1696
1619
  return;
1697
1620
  }
@@ -1724,13 +1647,13 @@ function mt({ strings: e, placeholder: t, perTick: n = {
1724
1647
  O,
1725
1648
  v
1726
1649
  ]);
1727
- let R = A ? "." : "", z = d !== "clear", B = ft(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);
1728
1651
  return z ? /* @__PURE__ */ f("div", {
1729
1652
  ref: (e) => {
1730
1653
  M.current = e;
1731
1654
  },
1732
1655
  className: "arc-typing-animation overflow-hidden",
1733
- style: { "--typing-roll-offset": ee },
1656
+ style: { "--typing-roll-offset": V },
1734
1657
  children: /* @__PURE__ */ p("div", {
1735
1658
  className: "whitespace-pre-line",
1736
1659
  children: [
@@ -1755,4 +1678,39 @@ function mt({ strings: e, placeholder: t, perTick: n = {
1755
1678
  });
1756
1679
  }
1757
1680
  //#endregion
1758
- export { Ae as Avatar, V as Button, Se as ButtonGroup, q as Card, ze as DateHandler, je as Divider, we as DoubleClickButton, Me as Dropdown, H as ErrorText, Fe as GridLoader, K as Input, Be as InputTimestamp, Ie as LabelField, Te as LongPressButton, Y as Menu, We as Modal, Ge as MultiDropdown, J as Pill, He as PillLink, G as PreviewCard, X as Select, it as Switch, $e as Table, qe as Tag, rt as TextLink, dt as ThemeSwitcher, mt as TypingAnimation, Ee as navigateToHashOnLoad, Oe as updateHashOnScroll, De as useHashNavigationOnLoad };
1681
+ //#region utilities/hash-navigation.ts
1682
+ function ft({ intervalMs: e = 500, maxAttempts: t = 20, behavior: n = "smooth", block: r } = {}) {
1683
+ if (typeof window > "u") return () => {};
1684
+ let i = 0, a = setInterval(() => {
1685
+ i += 1;
1686
+ let { hash: e } = window.location;
1687
+ if (!e || i > t) clearInterval(a);
1688
+ else try {
1689
+ let t = document.querySelector(e);
1690
+ t && (t.scrollIntoView({
1691
+ behavior: n,
1692
+ block: r
1693
+ }), clearInterval(a));
1694
+ } catch (t) {
1695
+ console.error(`Invalid hash in URL: ${e}`, t), clearInterval(a);
1696
+ }
1697
+ }, e);
1698
+ return () => clearInterval(a);
1699
+ }
1700
+ function pt(e) {
1701
+ o(() => ft(e), []);
1702
+ }
1703
+ function mt({ container: e, sectionIds: t, hashFirstSection: n = !0, onActiveChange: r }) {
1704
+ let i = t.map((e) => document.getElementById(e)).filter((e) => e !== null), a = window.location.hash.toLowerCase().slice(1) || null, o = () => {
1705
+ let t = e.getBoundingClientRect(), o = t.top + t.height / 2, s = i.find((e) => {
1706
+ let t = e.getBoundingClientRect();
1707
+ return t.top <= o && t.bottom > o;
1708
+ }), c = s ? i.indexOf(s) : -1;
1709
+ if (r?.(c, i), !s || (a === s.id.toLowerCase() && (a = null), c === 0 && a)) return;
1710
+ let l = c === 0 && !n ? "" : `#${s.id}`;
1711
+ window.location.hash !== l && (window.history.replaceState(window.history.state, "", `${window.location.pathname}${window.location.search}${l}`), window.dispatchEvent(new HashChangeEvent("hashchange")));
1712
+ };
1713
+ return o(), e.addEventListener("scroll", o, { passive: !0 }), () => e.removeEventListener("scroll", o);
1714
+ }
1715
+ //#endregion
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 };
@@ -1,14 +1,16 @@
1
1
  declare const gridLoaderShapes: readonly ["circle", "square", "diamond", "star", "heart", "hexagon"];
2
2
  export type GridLoaderShape = (typeof gridLoaderShapes)[number] | "mixed";
3
+ export type GridLoaderCellShape = Exclude<GridLoaderShape, "mixed">;
3
4
  export interface GridLoaderProps extends React.ComponentPropsWithoutRef<"span"> {
4
5
  rows?: number;
5
6
  columns?: number;
6
7
  size?: number;
7
8
  maxSize?: number;
8
9
  shape?: GridLoaderShape;
10
+ shapes?: readonly GridLoaderCellShape[];
9
11
  colors?: string[];
10
12
  label?: string;
11
13
  symbols?: string[];
12
14
  }
13
- declare const GridLoader: ({ className, rows, columns, size, maxSize, shape, 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;
14
16
  export default GridLoader;
@@ -0,0 +1,44 @@
1
+ export { default as Button } from './button';
2
+ export { default as ButtonGroup } from './button-group';
3
+ export { default as DoubleClickButton } from './button-double-click';
4
+ export type { DoubleClickButtonFeedbackContent, DoubleClickButtonFeedbackContext, DoubleClickButtonProps, } from './button-double-click';
5
+ export { default as LongPressButton } from './button-long-press';
6
+ export type { LongPressButtonFeedbackContent, LongPressButtonFeedbackContext, LongPressButtonProps, } from './button-long-press';
7
+ export { default as Avatar } from './avatar';
8
+ export type { AvatarProps, AvatarSize } from './avatar';
9
+ export { default as Divider } from './divider';
10
+ export { default as Dropdown } from './dropdown';
11
+ export type { DropdownItem, DropdownProps } from './dropdown';
12
+ export { default as ErrorText } from './error-text';
13
+ export type { ErrorTextProps } from './error-text';
14
+ export { default as GridLoader } from './grid-loader';
15
+ export type { GridLoaderCellShape, GridLoaderProps, GridLoaderShape } from './grid-loader';
16
+ export { default as LabelField } from './label-field';
17
+ export type { LabelFieldProps } from './label-field';
18
+ export { default as Input } from './input';
19
+ export { default as Card } from './card';
20
+ export { default as InputTimestamp } from './input-timestamp';
21
+ export type { InputTimestampProps } from './input-timestamp';
22
+ export { default as PillLink } from './pill-link';
23
+ export type { PillLinkProps } from './pill-link';
24
+ export { default as Menu } from './menu';
25
+ export { default as Modal } from './modal';
26
+ export type { ModalProps } from './modal';
27
+ export { default as MultiDropdown } from './dropdown-multi';
28
+ export type { MultiDropdownProps } from './dropdown-multi';
29
+ export { default as Pill } from './pill';
30
+ export { default as PreviewCard } from './preview-card';
31
+ export type { PreviewCardProps } from './preview-card';
32
+ export { default as Select } from './select';
33
+ export type { SelectItem, SelectProps } from './select';
34
+ export { default as Tag } from './tag';
35
+ export type { TagProps, TagVariant } from './tag';
36
+ export { default as Table } from './table';
37
+ export type { TableColumnDef, TableProps } from './table';
38
+ export { default as TextLink } from './text-link';
39
+ export type { TextLinkProps } from './text-link';
40
+ export { default as Switch } from './switch';
41
+ export { default as ThemeSwitcher } from './theme-switcher';
42
+ export type { ThemeSwitcherProps } from './theme-switcher';
43
+ export { default as TypingAnimation } from './typing-animation';
44
+ export type { TypingAnimationPerTickUnit, TypingAnimationAfterString, TypingAnimationProps } from './typing-animation';
package/dist/index.d.ts CHANGED
@@ -1,47 +1,2 @@
1
- export { default as Button } from './button';
2
- export { default as ButtonGroup } from './button-group';
3
- export { default as DoubleClickButton } from './button-double-click';
4
- export type { DoubleClickButtonFeedbackContent, DoubleClickButtonFeedbackContext, DoubleClickButtonProps, } from './button-double-click';
5
- export { default as LongPressButton } from './button-long-press';
6
- export type { LongPressButtonFeedbackContent, LongPressButtonFeedbackContext, LongPressButtonProps, } from './button-long-press';
7
- export { navigateToHashOnLoad, updateHashOnScroll, useHashNavigationOnLoad } from './hash-navigation';
8
- export type { HashNavigationOptions, UpdateHashOnScrollOptions } from './hash-navigation';
9
- export { default as Avatar } from './avatar';
10
- export type { AvatarProps, AvatarSize } from './avatar';
11
- export { default as Divider } from './divider';
12
- export { default as Dropdown } from './dropdown';
13
- export type { DropdownItem, DropdownProps } from './dropdown';
14
- export { default as ErrorText } from './error-text';
15
- export type { ErrorTextProps } from './error-text';
16
- export { default as GridLoader } from './grid-loader';
17
- export type { GridLoaderProps, GridLoaderShape } from './grid-loader';
18
- export { default as LabelField } from './label-field';
19
- export type { LabelFieldProps } from './label-field';
20
- export { default as Input } from './input';
21
- export { default as Card } from './card';
22
- export { DateHandler } from './date-handler';
23
- export { default as InputTimestamp } from './input-timestamp';
24
- export type { InputTimestampProps } from './input-timestamp';
25
- export { default as PillLink } from './pill-link';
26
- export type { PillLinkProps } from './pill-link';
27
- export { default as Menu } from './menu';
28
- export { default as Modal } from './modal';
29
- export type { ModalProps } from './modal';
30
- export { default as MultiDropdown } from './dropdown-multi';
31
- export type { MultiDropdownProps } from './dropdown-multi';
32
- export { default as Pill } from './pill';
33
- export { default as PreviewCard } from './preview-card';
34
- export type { PreviewCardProps } from './preview-card';
35
- export { default as Select } from './select';
36
- export type { SelectItem, SelectProps } from './select';
37
- export { default as Tag } from './tag';
38
- export type { TagProps, TagVariant } from './tag';
39
- export { default as Table } from './table';
40
- export type { TableColumnDef, TableProps } from './table';
41
- export { default as TextLink } from './text-link';
42
- export type { TextLinkProps } from './text-link';
43
- export { default as Switch } from './switch';
44
- export { default as ThemeSwitcher } from './theme-switcher';
45
- export type { ThemeSwitcherProps } from './theme-switcher';
46
- export { default as TypingAnimation } from './typing-animation';
47
- export type { TypingAnimationPerTickUnit, TypingAnimationAfterString, TypingAnimationProps } from './typing-animation';
1
+ export * from './components';
2
+ export * from './utilities';
@@ -0,0 +1,3 @@
1
+ export { DateHandler } from './date-handler';
2
+ export { navigateToHashOnLoad, updateHashOnScroll, useHashNavigationOnLoad } from './hash-navigation';
3
+ export type { HashNavigationOptions, UpdateHashOnScrollOptions } from './hash-navigation';
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.7.0",
5
+ "version": "0.8.1",
6
6
  "type": "module",
7
7
  "main": "./dist/arc.js",
8
8
  "types": "./dist/index.d.ts",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes