@febkosq8/arc 0.8.1 → 0.8.3
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/components/index.css +4 -0
- package/dist/arc.js +173 -116
- package/dist/components/avatar.d.ts +6 -2
- package/dist/components/index.d.ts +3 -3
- package/dist/components/pill-link.d.ts +2 -1
- package/dist/components/tag.d.ts +3 -1
- package/package.json +67 -67
package/components/index.css
CHANGED
|
@@ -122,6 +122,10 @@
|
|
|
122
122
|
border-color: var(--color-primary) !important;
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
+
.arc-avatar--ring-accent {
|
|
126
|
+
--tw-ring-color: color-mix(in srgb, var(--color-primary) 65%, var(--color-accent-foreground));
|
|
127
|
+
}
|
|
128
|
+
|
|
125
129
|
@layer base {
|
|
126
130
|
:root {
|
|
127
131
|
--background: 220 14% 94%;
|
package/dist/arc.js
CHANGED
|
@@ -14,7 +14,7 @@ import { Select as B } from "@base-ui/react/select";
|
|
|
14
14
|
import { rankItem as V } from "@tanstack/match-sorter-utils";
|
|
15
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
16
|
import { Switch as be } from "@base-ui/react/switch";
|
|
17
|
-
|
|
17
|
+
// components/button-group.tsx
|
|
18
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),
|
|
@@ -110,7 +110,7 @@ var xe = ({ className: e, orientation: r = "horizontal", selectedVariant: o, chi
|
|
|
110
110
|
});
|
|
111
111
|
return /* @__PURE__ */ p("span", {
|
|
112
112
|
"aria-label": g ? "Waiting for second click" : void 0,
|
|
113
|
-
className: "arc-double-click-button relative inline-flex",
|
|
113
|
+
className: "arc-double-click-button relative inline-flex w-fit",
|
|
114
114
|
"data-double-click-state": g ? "waiting" : void 0,
|
|
115
115
|
children: [E, /* @__PURE__ */ f("span", {
|
|
116
116
|
"aria-hidden": "true",
|
|
@@ -153,7 +153,7 @@ var xe = ({ className: e, orientation: r = "horizontal", selectedVariant: o, chi
|
|
|
153
153
|
})]
|
|
154
154
|
});
|
|
155
155
|
return /* @__PURE__ */ p("span", {
|
|
156
|
-
className: "arc-long-press-button relative inline-flex",
|
|
156
|
+
className: "arc-long-press-button relative inline-flex w-fit",
|
|
157
157
|
"data-long-press-state": y ? "pressing" : void 0,
|
|
158
158
|
children: [/* @__PURE__ */ f(H, {
|
|
159
159
|
...m,
|
|
@@ -190,42 +190,67 @@ var xe = ({ className: e, orientation: r = "horizontal", selectedVariant: o, chi
|
|
|
190
190
|
}
|
|
191
191
|
})]
|
|
192
192
|
});
|
|
193
|
-
}, Te = e("arc-avatar inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full bg-muted
|
|
194
|
-
variants: {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
193
|
+
}, Te = e("arc-avatar inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full bg-muted transition-all", {
|
|
194
|
+
variants: {
|
|
195
|
+
size: {
|
|
196
|
+
xs: "size-6 text-xs",
|
|
197
|
+
sm: "size-7 text-sm",
|
|
198
|
+
md: "size-8 text-base",
|
|
199
|
+
lg: "size-10 text-lg",
|
|
200
|
+
xl: "size-12 text-xl",
|
|
201
|
+
"2xl": "size-14 text-2xl",
|
|
202
|
+
"3xl": "size-16 text-3xl",
|
|
203
|
+
"4xl": "size-20 text-4xl",
|
|
204
|
+
"5xl": "size-24 text-5xl",
|
|
205
|
+
"6xl": "size-28 text-6xl",
|
|
206
|
+
"7xl": "size-32 text-7xl",
|
|
207
|
+
"8xl": "size-36 text-8xl"
|
|
208
|
+
},
|
|
209
|
+
variant: {
|
|
210
|
+
default: "ring-1 ring-border",
|
|
211
|
+
ring: "ring-2"
|
|
212
|
+
}
|
|
213
|
+
},
|
|
214
|
+
defaultVariants: {
|
|
215
|
+
size: "md",
|
|
216
|
+
variant: "default"
|
|
217
|
+
}
|
|
218
|
+
}), Ee = {
|
|
219
|
+
primary: "ring-primary",
|
|
220
|
+
secondary: "ring-secondary-foreground",
|
|
221
|
+
accent: "arc-avatar--ring-accent",
|
|
222
|
+
muted: "ring-muted-foreground",
|
|
223
|
+
destructive: "ring-destructive",
|
|
224
|
+
success: "ring-success",
|
|
225
|
+
warning: "ring-warning"
|
|
226
|
+
}, De = ({ name: e, image: n, size: r, variant: i, ringColor: a = "primary", className: s, ...l }) => {
|
|
227
|
+
let [d, p] = u(!1), m = n?.trim(), h = !!m && !d, g = c(() => e?.split(" ", 3)?.map((e) => e[0])?.filter((e) => /[A-Za-z]/.test(e))?.join("") || "U", [e]);
|
|
204
228
|
return o(() => {
|
|
205
|
-
|
|
206
|
-
}, [
|
|
229
|
+
p(!1);
|
|
230
|
+
}, [m]), /* @__PURE__ */ f("span", {
|
|
207
231
|
className: t(Te({
|
|
208
232
|
size: r,
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
233
|
+
variant: i,
|
|
234
|
+
className: s
|
|
235
|
+
}), i === "ring" && Ee[a]),
|
|
236
|
+
...l,
|
|
237
|
+
children: h ? /* @__PURE__ */ f("img", {
|
|
238
|
+
src: m,
|
|
214
239
|
alt: e ?? "User avatar",
|
|
215
240
|
title: e ?? "User",
|
|
216
241
|
className: "h-full w-full object-cover",
|
|
217
|
-
onError: () =>
|
|
242
|
+
onError: () => p(!0)
|
|
218
243
|
}) : /* @__PURE__ */ f("span", {
|
|
219
244
|
className: "font-medium leading-none text-foreground",
|
|
220
245
|
title: e ?? "User",
|
|
221
|
-
children:
|
|
246
|
+
children: g
|
|
222
247
|
})
|
|
223
248
|
});
|
|
224
|
-
},
|
|
249
|
+
}, Oe = ({ className: e, ...n }) => /* @__PURE__ */ f("div", {
|
|
225
250
|
role: "separator",
|
|
226
251
|
className: t("arc-divider w-full border-b border-border", e),
|
|
227
252
|
...n
|
|
228
|
-
}),
|
|
253
|
+
}), 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 }) => {
|
|
229
254
|
let d = e.find((e) => String(e.key) === String(n)) ?? null;
|
|
230
255
|
return /* @__PURE__ */ f(m.Root, {
|
|
231
256
|
items: e,
|
|
@@ -295,7 +320,7 @@ var xe = ({ className: e, orientation: r = "horizontal", selectedVariant: o, chi
|
|
|
295
320
|
...r,
|
|
296
321
|
children: i
|
|
297
322
|
});
|
|
298
|
-
},
|
|
323
|
+
}, Ae = /* @__PURE__ */ "*.+.×.÷.=.~.!.?.@.#.%.&.§.¶.※.◇.◆.○.●.△.▽.□.■.♠.♣.♦.♤.♧.♢.♪.♫.∴.∵".split(".");
|
|
299
324
|
function W(e, t, n) {
|
|
300
325
|
let r = Math.sin((e + 1) * 12.9898 + t * 78.233 + n * 37.719) * 43758.5453;
|
|
301
326
|
return r - Math.floor(r);
|
|
@@ -307,7 +332,7 @@ var G = [
|
|
|
307
332
|
"star",
|
|
308
333
|
"heart",
|
|
309
334
|
"hexagon"
|
|
310
|
-
],
|
|
335
|
+
], je = e("arc-grid-loader__cell grid aspect-square w-full place-items-center overflow-hidden text-center leading-none break-all", {
|
|
311
336
|
variants: { shape: {
|
|
312
337
|
circle: "rounded-full",
|
|
313
338
|
square: "rounded-md",
|
|
@@ -317,7 +342,7 @@ var G = [
|
|
|
317
342
|
hexagon: "arc-grid-loader__cell--hexagon"
|
|
318
343
|
} },
|
|
319
344
|
defaultVariants: { shape: "circle" }
|
|
320
|
-
}),
|
|
345
|
+
}), Me = ({ 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 = Ae, title: m, style: h, ...g }) => {
|
|
321
346
|
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
347
|
if (o(() => {
|
|
323
348
|
s === "mixed" && b(Array.from({ length: n * r }, () => C[Math.floor(Math.random() * C.length)]));
|
|
@@ -361,7 +386,7 @@ var G = [
|
|
|
361
386
|
gridTemplateRows: `repeat(${n}, minmax(0, 1fr))`
|
|
362
387
|
},
|
|
363
388
|
children: Array.from({ length: n * r }, (e, o) => /* @__PURE__ */ f("span", {
|
|
364
|
-
className: t(
|
|
389
|
+
className: t(je({ shape: s === "mixed" ? y[o] ?? C[Math.floor(W(o, n, r) * C.length)] : s })),
|
|
365
390
|
onAnimationIteration: () => {
|
|
366
391
|
s === "mixed" && b((e) => {
|
|
367
392
|
let t = [...e], i = t[o] ?? C[Math.floor(W(o, n, r) * C.length)], a = C.filter((e) => e !== i);
|
|
@@ -407,7 +432,7 @@ var G = [
|
|
|
407
432
|
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]
|
|
408
433
|
})
|
|
409
434
|
}) })]
|
|
410
|
-
}),
|
|
435
|
+
}), Ne = ({ id: e, label: n, help: r, errors: i, className: a, ...o }) => {
|
|
411
436
|
let s = Array.isArray(i) ? i.map((e) => e == null ? "" : String(e)) : typeof i == "string" ? i : null;
|
|
412
437
|
return /* @__PURE__ */ p("div", {
|
|
413
438
|
...o,
|
|
@@ -438,7 +463,7 @@ var G = [
|
|
|
438
463
|
s && (Array.isArray(s) ? s.length > 0 && /* @__PURE__ */ f(U, { data: s }) : /* @__PURE__ */ f(U, { data: s }))
|
|
439
464
|
]
|
|
440
465
|
});
|
|
441
|
-
},
|
|
466
|
+
}, 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", {
|
|
442
467
|
variants: {
|
|
443
468
|
variant: {
|
|
444
469
|
default: "border-border bg-background",
|
|
@@ -454,7 +479,7 @@ var G = [
|
|
|
454
479
|
as: "input"
|
|
455
480
|
}
|
|
456
481
|
}), q = ({ as: e = "input", className: n, variant: r, ...i }) => {
|
|
457
|
-
let a = t(
|
|
482
|
+
let a = t(Pe({
|
|
458
483
|
as: e,
|
|
459
484
|
variant: r
|
|
460
485
|
}), n);
|
|
@@ -463,7 +488,7 @@ var G = [
|
|
|
463
488
|
autoComplete: "off",
|
|
464
489
|
className: a
|
|
465
490
|
});
|
|
466
|
-
},
|
|
491
|
+
}, Fe = e("arc-card group relative rounded-lg border border-foreground/40 bg-card/90 p-3 shadow-xs", {
|
|
467
492
|
variants: { variant: {
|
|
468
493
|
primary: "border-primary bg-primary text-primary-foreground",
|
|
469
494
|
secondary: "border-secondary bg-secondary text-secondary-foreground",
|
|
@@ -478,7 +503,7 @@ var G = [
|
|
|
478
503
|
}), J = (e) => {
|
|
479
504
|
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;
|
|
480
505
|
return /* @__PURE__ */ f("div", {
|
|
481
|
-
className: t(
|
|
506
|
+
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),
|
|
482
507
|
onPointerMove: h ? (e) => {
|
|
483
508
|
if (u?.(e), !h) return;
|
|
484
509
|
let t = e.currentTarget.getBoundingClientRect();
|
|
@@ -506,9 +531,8 @@ J.Header = (e) => {
|
|
|
506
531
|
...r
|
|
507
532
|
});
|
|
508
533
|
};
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
var Fe = class e {
|
|
534
|
+
// utilities/date-handler.ts
|
|
535
|
+
var Ie = class e {
|
|
512
536
|
static toDateTime(e) {
|
|
513
537
|
if (e == null || e === "") return j.invalid("missing date");
|
|
514
538
|
if (e instanceof Date) return j.fromJSDate(e);
|
|
@@ -566,8 +590,8 @@ var Fe = class e {
|
|
|
566
590
|
let r = e.getDateTime(t), i = e.getRelativeTime(t);
|
|
567
591
|
return n.replace("$ISO$", r).replace("$RELATIVE$", i);
|
|
568
592
|
}
|
|
569
|
-
},
|
|
570
|
-
let r = c(() => e ?
|
|
593
|
+
}, Le = ({ value: e, format: t = "$ISO$ ($RELATIVE$)", ...n }) => {
|
|
594
|
+
let r = c(() => e ? Ie.getFormattedTime(e, t) : "", [e, t]);
|
|
571
595
|
return /* @__PURE__ */ f(q, {
|
|
572
596
|
type: "text",
|
|
573
597
|
disabled: !0,
|
|
@@ -576,12 +600,23 @@ var Fe = class e {
|
|
|
576
600
|
size: Math.max(r.length, 1),
|
|
577
601
|
...n
|
|
578
602
|
});
|
|
579
|
-
},
|
|
603
|
+
}, Re = 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", {
|
|
580
604
|
variants: {
|
|
581
605
|
variant: {
|
|
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",
|
|
606
|
+
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",
|
|
583
607
|
primary: "bg-primary text-primary-foreground! hover:bg-primary/90",
|
|
584
|
-
|
|
608
|
+
secondary: "bg-secondary text-secondary-foreground! hover:bg-secondary/80",
|
|
609
|
+
success: "bg-success text-success-foreground! hover:bg-success/90",
|
|
610
|
+
destructive: "bg-destructive text-destructive-foreground! hover:bg-destructive/90",
|
|
611
|
+
ghost: "text-foreground! hover:bg-accent hover:text-accent-foreground!",
|
|
612
|
+
warning: "bg-warning text-warning-foreground! hover:bg-warning/90",
|
|
613
|
+
outline: "border border-foreground/40 bg-transparent text-foreground! hover:bg-accent hover:text-accent-foreground!",
|
|
614
|
+
"outline-primary": "border border-primary bg-background text-primary! hover:bg-primary hover:text-primary-foreground!",
|
|
615
|
+
"outline-secondary": "border border-secondary-foreground bg-background text-secondary-foreground! hover:bg-secondary",
|
|
616
|
+
"outline-success": "border border-success bg-background text-success! hover:bg-success hover:text-success-foreground!",
|
|
617
|
+
"outline-destructive": "border border-destructive bg-background text-destructive! hover:bg-destructive hover:text-destructive-foreground!",
|
|
618
|
+
"outline-ghost": "border border-transparent bg-background text-foreground! hover:bg-accent hover:text-accent-foreground!",
|
|
619
|
+
"outline-warning": "border border-warning bg-background text-warning! hover:bg-warning hover:text-warning-foreground!"
|
|
585
620
|
},
|
|
586
621
|
size: {
|
|
587
622
|
sm: "h-9 px-3",
|
|
@@ -597,14 +632,25 @@ var Fe = class e {
|
|
|
597
632
|
variant: "pill",
|
|
598
633
|
size: "md"
|
|
599
634
|
}
|
|
600
|
-
}),
|
|
601
|
-
className: t(
|
|
635
|
+
}), ze = ({ active: e = !1, className: n, size: r = "md", variant: i = "pill", ...a }) => /* @__PURE__ */ f("a", {
|
|
636
|
+
className: t(Re({
|
|
602
637
|
variant: i,
|
|
603
638
|
size: r
|
|
604
639
|
}), e && {
|
|
605
640
|
pill: "text-primary!",
|
|
606
|
-
primary: "bg-primary/80 ring-2 ring-ring ring-offset-2",
|
|
607
|
-
|
|
641
|
+
primary: "bg-primary/80 text-primary-foreground! ring-2 ring-ring ring-offset-2",
|
|
642
|
+
secondary: "bg-secondary/90 ring-2 ring-ring ring-offset-2",
|
|
643
|
+
success: "bg-success/80 text-success-foreground! ring-2 ring-success ring-offset-2",
|
|
644
|
+
destructive: "bg-destructive/80 text-destructive-foreground! ring-2 ring-destructive ring-offset-2",
|
|
645
|
+
ghost: "bg-accent text-accent-foreground!",
|
|
646
|
+
warning: "bg-warning/80 text-warning-foreground! ring-2 ring-warning ring-offset-2",
|
|
647
|
+
outline: "border-primary bg-accent text-primary!",
|
|
648
|
+
"outline-primary": "bg-primary text-primary-foreground! ring-2 ring-primary ring-offset-2",
|
|
649
|
+
"outline-secondary": "bg-secondary text-secondary-foreground! ring-2 ring-secondary-foreground ring-offset-2",
|
|
650
|
+
"outline-success": "bg-success text-success-foreground! ring-2 ring-success ring-offset-2",
|
|
651
|
+
"outline-destructive": "bg-destructive text-destructive-foreground! ring-2 ring-destructive ring-offset-2",
|
|
652
|
+
"outline-ghost": "bg-accent text-accent-foreground! ring-2 ring-ring ring-offset-2",
|
|
653
|
+
"outline-warning": "bg-warning text-warning-foreground! ring-2 ring-warning ring-offset-2"
|
|
608
654
|
}[i], n),
|
|
609
655
|
"aria-current": e ? "page" : void 0,
|
|
610
656
|
...a
|
|
@@ -613,7 +659,7 @@ var Fe = class e {
|
|
|
613
659
|
className: t("arc-pill", "inline-flex h-10 pointer-coarse:h-11 w-full items-center justify-center whitespace-nowrap rounded-md border border-transparent px-3 py-2 text-base font-medium text-foreground transition hover:text-primary hover:outline-none hover:ring-0 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-opacity-75", e ? "text-primary!" : "text-muted-foreground", n),
|
|
614
660
|
"aria-pressed": e,
|
|
615
661
|
...r
|
|
616
|
-
}),
|
|
662
|
+
}), Be = ({ 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, {
|
|
617
663
|
loopFocus: !0,
|
|
618
664
|
children: [/* @__PURE__ */ p(M.Trigger, {
|
|
619
665
|
render: /* @__PURE__ */ f(Y, {
|
|
@@ -630,7 +676,7 @@ var Fe = class e {
|
|
|
630
676
|
collisionPadding: 8,
|
|
631
677
|
children: /* @__PURE__ */ f(M.Popup, {
|
|
632
678
|
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),
|
|
633
|
-
children: /* @__PURE__ */ f(
|
|
679
|
+
children: /* @__PURE__ */ f(Be, { children: o })
|
|
634
680
|
})
|
|
635
681
|
}) })]
|
|
636
682
|
}), {
|
|
@@ -671,12 +717,12 @@ var Fe = class e {
|
|
|
671
717
|
collisionPadding: 8,
|
|
672
718
|
children: /* @__PURE__ */ f(M.Popup, {
|
|
673
719
|
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",
|
|
674
|
-
children: /* @__PURE__ */ f(
|
|
720
|
+
children: /* @__PURE__ */ f(Be, { children: i })
|
|
675
721
|
})
|
|
676
722
|
}) })]
|
|
677
723
|
});
|
|
678
724
|
}
|
|
679
|
-
}),
|
|
725
|
+
}), Ve = ({ open: e = !1, setOpen: n, children: r, initialFocus: i, headerContent: a, footerContent: s, width: c, height: l, className: u, customKeyHandler: d }) => (o(() => {
|
|
680
726
|
if (!e) return;
|
|
681
727
|
let t = (e) => {
|
|
682
728
|
let t = e.key === "Escape" ? "esc" : (e.ctrlKey || e.metaKey) && e.key.toLowerCase() === "s" ? "ctrl+s" : null;
|
|
@@ -715,7 +761,7 @@ var Fe = class e {
|
|
|
715
761
|
]
|
|
716
762
|
})
|
|
717
763
|
})] })
|
|
718
|
-
})),
|
|
764
|
+
})), He = ({ 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 }) => {
|
|
719
765
|
let h = n.filter((e) => r?.includes(String(e.key)));
|
|
720
766
|
return /* @__PURE__ */ f(m.Root, {
|
|
721
767
|
multiple: !0,
|
|
@@ -847,33 +893,48 @@ var Fe = class e {
|
|
|
847
893
|
})
|
|
848
894
|
})
|
|
849
895
|
}) })]
|
|
850
|
-
}),
|
|
851
|
-
variants: {
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
896
|
+
}), Ue = e("arc-tag inline-flex w-fit items-center rounded-full border border-transparent font-bold", {
|
|
897
|
+
variants: {
|
|
898
|
+
variant: {
|
|
899
|
+
primary: "bg-primary text-primary-foreground",
|
|
900
|
+
secondary: "border-border bg-secondary text-secondary-foreground",
|
|
901
|
+
success: "bg-success text-success-foreground",
|
|
902
|
+
warning: "bg-warning text-warning-foreground",
|
|
903
|
+
destructive: "bg-destructive text-destructive-foreground",
|
|
904
|
+
outline: "border-border bg-transparent text-foreground"
|
|
905
|
+
},
|
|
906
|
+
size: {
|
|
907
|
+
xs: "px-1.5 py-0.5 text-xs",
|
|
908
|
+
sm: "px-2 py-0.5 text-sm",
|
|
909
|
+
md: "px-2.5 py-1 text-base",
|
|
910
|
+
lg: "px-3 py-1.5 text-lg",
|
|
911
|
+
xl: "px-3.5 py-2 text-xl",
|
|
912
|
+
"2xl": "px-4 py-2.5 text-2xl",
|
|
913
|
+
"3xl": "px-5 py-3 text-3xl"
|
|
914
|
+
}
|
|
915
|
+
},
|
|
916
|
+
defaultVariants: {
|
|
917
|
+
variant: "primary",
|
|
918
|
+
size: "xs"
|
|
919
|
+
}
|
|
920
|
+
}), We = ({ className: e, variant: n, size: r, ...i }) => /* @__PURE__ */ f("div", {
|
|
921
|
+
className: t(Ue({
|
|
862
922
|
variant: n,
|
|
923
|
+
size: r,
|
|
863
924
|
className: e
|
|
864
925
|
})),
|
|
865
|
-
...
|
|
866
|
-
}),
|
|
926
|
+
...i
|
|
927
|
+
}), Ge = (e, t, n, r) => {
|
|
867
928
|
let i = e.getValue(t), a = V(i, n);
|
|
868
929
|
return r({ itemRank: a }), a.passed;
|
|
869
930
|
}, Q = {
|
|
870
|
-
fuzzy:
|
|
931
|
+
fuzzy: Ge,
|
|
871
932
|
includesString: ce,
|
|
872
933
|
select: (e, t, n) => {
|
|
873
934
|
let r = e.getValue(t);
|
|
874
935
|
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);
|
|
875
936
|
}
|
|
876
|
-
},
|
|
937
|
+
}, Ke = ve({
|
|
877
938
|
columnMeta: {},
|
|
878
939
|
columnFilteringFeature: ee,
|
|
879
940
|
columnResizingFeature: te,
|
|
@@ -895,21 +956,21 @@ var Fe = class e {
|
|
|
895
956
|
},
|
|
896
957
|
filterFns: Q
|
|
897
958
|
});
|
|
898
|
-
function
|
|
959
|
+
function qe(e) {
|
|
899
960
|
return Object.prototype.hasOwnProperty.call(Q, e);
|
|
900
961
|
}
|
|
901
|
-
function
|
|
962
|
+
function Je(e, t) {
|
|
902
963
|
if (e !== !1) {
|
|
903
964
|
if (e === void 0) return t ? "select" : void 0;
|
|
904
|
-
if (typeof e == "function" || e === "auto" ||
|
|
965
|
+
if (typeof e == "function" || e === "auto" || qe(e)) return e;
|
|
905
966
|
throw Error(`Unsupported table filterFn "${e}". Use "auto" or one of: ${Object.keys(Q).join(", ")}.`);
|
|
906
967
|
}
|
|
907
968
|
}
|
|
908
|
-
var
|
|
969
|
+
var Ye = ie(), Xe = ({ data: e, columnDef: n, pageSize: r = 10, className: i, showHeader: a = !0, showFilters: o = !0, showSorting: l = !0 }) => {
|
|
909
970
|
let d = s(), [m, b] = u({
|
|
910
971
|
pageIndex: 0,
|
|
911
972
|
pageSize: r
|
|
912
|
-
}), [x, w] = u([]), [T, D] = u(""), [O, k] = u([]), [A, j] = u({}), M = x.length > 0 || T !== "", N = c(() => n?.map((e) =>
|
|
973
|
+
}), [x, w] = u([]), [T, D] = u(""), [O, k] = u([]), [A, j] = u({}), M = x.length > 0 || T !== "", N = c(() => n?.map((e) => Ye.accessor(e.accessorKey, {
|
|
913
974
|
id: e.id,
|
|
914
975
|
enableResizing: e.enableResizing,
|
|
915
976
|
enableColumnFilter: e.filterFn !== !1 && e.enableColumnFilter,
|
|
@@ -918,7 +979,7 @@ var Je = ie(), Ye = ({ data: e, columnDef: n, pageSize: r = 10, className: i, sh
|
|
|
918
979
|
size: e.size,
|
|
919
980
|
minSize: e.minSize ?? 50,
|
|
920
981
|
maxSize: e.maxSize ?? 1e3,
|
|
921
|
-
filterFn:
|
|
982
|
+
filterFn: Je(e.filterFn, e.filterSelectOptions),
|
|
922
983
|
meta: {
|
|
923
984
|
headerLabel: e.header,
|
|
924
985
|
filterSelectOptions: e.filterSelectOptions,
|
|
@@ -962,8 +1023,8 @@ var Je = ie(), Ye = ({ data: e, columnDef: n, pageSize: r = 10, className: i, sh
|
|
|
962
1023
|
onSortingChange: k,
|
|
963
1024
|
onColumnFiltersChange: w,
|
|
964
1025
|
onGlobalFilterChange: D,
|
|
965
|
-
globalFilterFn:
|
|
966
|
-
features:
|
|
1026
|
+
globalFilterFn: Ge,
|
|
1027
|
+
features: Ke,
|
|
967
1028
|
defaultColumn: {
|
|
968
1029
|
size: 200,
|
|
969
1030
|
minSize: 50,
|
|
@@ -988,7 +1049,7 @@ var Je = ie(), Ye = ({ data: e, columnDef: n, pageSize: r = 10, className: i, sh
|
|
|
988
1049
|
title: "Clear filters and sorting",
|
|
989
1050
|
type: "button",
|
|
990
1051
|
children: [/* @__PURE__ */ f(E, { className: "mr-1.5 h-3 w-3" }), "Clear filters and sorting"]
|
|
991
|
-
}), /* @__PURE__ */ f(
|
|
1052
|
+
}), /* @__PURE__ */ f($e, { table: P })]
|
|
992
1053
|
}),
|
|
993
1054
|
/* @__PURE__ */ p("nav", {
|
|
994
1055
|
"aria-label": "Table pagination",
|
|
@@ -1180,7 +1241,7 @@ var Je = ie(), Ye = ({ data: e, columnDef: n, pageSize: r = 10, className: i, sh
|
|
|
1180
1241
|
htmlFor: n,
|
|
1181
1242
|
className: "text-muted-foreground mb-1 block text-xs font-medium",
|
|
1182
1243
|
children: t
|
|
1183
|
-
}), /* @__PURE__ */ f(
|
|
1244
|
+
}), /* @__PURE__ */ f(Qe, {
|
|
1184
1245
|
column: e,
|
|
1185
1246
|
idPrefix: `${d}-`
|
|
1186
1247
|
})]
|
|
@@ -1250,7 +1311,7 @@ var Je = ie(), Ye = ({ data: e, columnDef: n, pageSize: r = 10, className: i, sh
|
|
|
1250
1311
|
]
|
|
1251
1312
|
});
|
|
1252
1313
|
};
|
|
1253
|
-
function
|
|
1314
|
+
function Ze({ value: e, onChange: t, debounce: n = 500, ...r }) {
|
|
1254
1315
|
let [i, a] = u(e);
|
|
1255
1316
|
return o(() => {
|
|
1256
1317
|
a(e);
|
|
@@ -1270,7 +1331,7 @@ function Xe({ value: e, onChange: t, debounce: n = 500, ...r }) {
|
|
|
1270
1331
|
autoComplete: "off"
|
|
1271
1332
|
});
|
|
1272
1333
|
}
|
|
1273
|
-
function
|
|
1334
|
+
function Qe({ column: e, idPrefix: t = "" }) {
|
|
1274
1335
|
let n = `${t}${e.id}-filter`, r = {
|
|
1275
1336
|
includesString: "Includes string",
|
|
1276
1337
|
equalsString: "Equals string",
|
|
@@ -1290,7 +1351,7 @@ function Ze({ column: e, idPrefix: t = "" }) {
|
|
|
1290
1351
|
key: e.value,
|
|
1291
1352
|
label: e.label
|
|
1292
1353
|
}))]
|
|
1293
|
-
}) : /* @__PURE__ */ f(
|
|
1354
|
+
}) : /* @__PURE__ */ f(Ze, {
|
|
1294
1355
|
id: n,
|
|
1295
1356
|
type: "text",
|
|
1296
1357
|
name: e.id,
|
|
@@ -1301,7 +1362,7 @@ function Ze({ column: e, idPrefix: t = "" }) {
|
|
|
1301
1362
|
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"
|
|
1302
1363
|
});
|
|
1303
1364
|
}
|
|
1304
|
-
function
|
|
1365
|
+
function $e({ table: e }) {
|
|
1305
1366
|
return /* @__PURE__ */ p(K, {
|
|
1306
1367
|
trigger: "click",
|
|
1307
1368
|
triggerRender: /* @__PURE__ */ f(H, {
|
|
@@ -1331,33 +1392,32 @@ function Qe({ table: e }) {
|
|
|
1331
1392
|
children: [/* @__PURE__ */ f(O, { className: "mr-1.5 h-3 w-3" }), "Columns"]
|
|
1332
1393
|
});
|
|
1333
1394
|
}
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
var $e = ({ className: e, href: n, text: r, target: i = "_blank", rel: a, ...o }) => /* @__PURE__ */ f("a", {
|
|
1395
|
+
// components/text-link.tsx
|
|
1396
|
+
var et = ({ className: e, href: n, text: r, target: i = "_blank", rel: a, ...o }) => /* @__PURE__ */ f("a", {
|
|
1337
1397
|
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),
|
|
1338
1398
|
href: n,
|
|
1339
1399
|
target: i,
|
|
1340
1400
|
rel: a ?? (i === "_blank" ? "noopener noreferrer" : void 0),
|
|
1341
1401
|
...o,
|
|
1342
1402
|
children: r
|
|
1343
|
-
}),
|
|
1403
|
+
}), tt = ({ checked: e = !1, onChange: n, disabled: r = !1, variant: i = "primary", children: a, ...o }) => /* @__PURE__ */ f(be.Root, {
|
|
1344
1404
|
checked: e,
|
|
1345
1405
|
disabled: r,
|
|
1346
1406
|
onCheckedChange: n,
|
|
1347
|
-
className: t("arc-switch",
|
|
1407
|
+
className: t("arc-switch", nt({
|
|
1348
1408
|
variant: i,
|
|
1349
1409
|
disabled: r
|
|
1350
1410
|
})),
|
|
1351
1411
|
...o,
|
|
1352
1412
|
children: a ? a(e) : /* @__PURE__ */ f(be.Thumb, {
|
|
1353
1413
|
"aria-hidden": "true",
|
|
1354
|
-
className:
|
|
1414
|
+
className: rt({
|
|
1355
1415
|
variant: i,
|
|
1356
1416
|
checked: e,
|
|
1357
1417
|
disabled: r
|
|
1358
1418
|
})
|
|
1359
1419
|
})
|
|
1360
|
-
}),
|
|
1420
|
+
}), nt = e("relative inline-flex h-7 w-12 items-center rounded-full border border-border bg-muted transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 hover:not-data-disabled:ring-2 hover:not-data-disabled:ring-ring/60 data-disabled:cursor-not-allowed data-disabled:opacity-60", { variants: {
|
|
1361
1421
|
variant: {
|
|
1362
1422
|
danger: "data-checked:bg-destructive",
|
|
1363
1423
|
success: "data-checked:bg-success",
|
|
@@ -1368,7 +1428,7 @@ var $e = ({ className: e, href: n, text: r, target: i = "_blank", rel: a, ...o }
|
|
|
1368
1428
|
true: "ring-2 ring-border",
|
|
1369
1429
|
false: ""
|
|
1370
1430
|
}
|
|
1371
|
-
} }),
|
|
1431
|
+
} }), rt = e("absolute top-1/2 inline-block h-5 w-5 -translate-y-1/2 transform rounded-full border shadow-sm transition-[left,background-color,border-color] duration-300 ease-out", {
|
|
1372
1432
|
variants: {
|
|
1373
1433
|
variant: {
|
|
1374
1434
|
primary: "",
|
|
@@ -1461,7 +1521,7 @@ var $e = ({ className: e, href: n, text: r, target: i = "_blank", rel: a, ...o }
|
|
|
1461
1521
|
className: "border-success bg-success/70"
|
|
1462
1522
|
}
|
|
1463
1523
|
]
|
|
1464
|
-
}),
|
|
1524
|
+
}), it = {
|
|
1465
1525
|
light: L,
|
|
1466
1526
|
dark: I,
|
|
1467
1527
|
system: F
|
|
@@ -1469,25 +1529,25 @@ var $e = ({ className: e, href: n, text: r, target: i = "_blank", rel: a, ...o }
|
|
|
1469
1529
|
light: "Light",
|
|
1470
1530
|
dark: "Dark",
|
|
1471
1531
|
system: "System"
|
|
1472
|
-
},
|
|
1532
|
+
}, at = "theme", ot = (e) => e === "dark" || e === "system" && typeof window < "u" && window.matchMedia("(prefers-color-scheme: dark)").matches, st = () => {
|
|
1473
1533
|
if (typeof window > "u") return "system";
|
|
1474
|
-
let e = window.localStorage.getItem(
|
|
1534
|
+
let e = window.localStorage.getItem(at);
|
|
1475
1535
|
return e === "light" || e === "dark" || e === "system" ? e : "system";
|
|
1476
|
-
},
|
|
1477
|
-
function
|
|
1478
|
-
let [r, i] = u(
|
|
1536
|
+
}, ct = (e) => e === "system" ? "light" : e === "light" ? "dark" : "system";
|
|
1537
|
+
function lt({ variant: e = "dropdown", showLabel: n = !1 }) {
|
|
1538
|
+
let [r, i] = u(st);
|
|
1479
1539
|
o(() => {
|
|
1480
|
-
typeof window < "u" && (document.documentElement.classList.toggle("dark",
|
|
1540
|
+
typeof window < "u" && (document.documentElement.classList.toggle("dark", ot(r)), window.localStorage.setItem(at, r));
|
|
1481
1541
|
}, [r]);
|
|
1482
1542
|
let a = () => {
|
|
1483
|
-
i(
|
|
1543
|
+
i(ct(r));
|
|
1484
1544
|
};
|
|
1485
1545
|
if (e === "toggle") {
|
|
1486
|
-
let e =
|
|
1546
|
+
let e = it[r], t = ct(r);
|
|
1487
1547
|
return /* @__PURE__ */ f("div", {
|
|
1488
1548
|
className: "arc-theme-switcher",
|
|
1489
1549
|
children: /* @__PURE__ */ p(Y, {
|
|
1490
|
-
active:
|
|
1550
|
+
active: ot(r),
|
|
1491
1551
|
"aria-label": `Switch to ${t} theme`,
|
|
1492
1552
|
title: `Switch to ${t} theme`,
|
|
1493
1553
|
onClick: a,
|
|
@@ -1496,7 +1556,7 @@ function ct({ variant: e = "dropdown", showLabel: n = !1 }) {
|
|
|
1496
1556
|
})
|
|
1497
1557
|
});
|
|
1498
1558
|
}
|
|
1499
|
-
let s =
|
|
1559
|
+
let s = it[r];
|
|
1500
1560
|
return /* @__PURE__ */ f("div", {
|
|
1501
1561
|
className: "arc-theme-switcher",
|
|
1502
1562
|
children: /* @__PURE__ */ p(X, {
|
|
@@ -1556,18 +1616,17 @@ function ct({ variant: e = "dropdown", showLabel: n = !1 }) {
|
|
|
1556
1616
|
})
|
|
1557
1617
|
});
|
|
1558
1618
|
}
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
function lt(e) {
|
|
1619
|
+
// components/typing-animation.tsx
|
|
1620
|
+
function ut(e) {
|
|
1562
1621
|
return e === "newline" ? "\n" : e === "comma" ? ", " : "";
|
|
1563
1622
|
}
|
|
1564
|
-
function
|
|
1623
|
+
function dt(e, t, n, r, i) {
|
|
1565
1624
|
if (r === "character") return Math.max(0, Math.min(e.length, t + n * i));
|
|
1566
1625
|
let a = [...e.matchAll(/\S+\s*/g)].map((e) => e.index + e[0].length), o = t;
|
|
1567
1626
|
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;
|
|
1568
1627
|
return o;
|
|
1569
1628
|
}
|
|
1570
|
-
function
|
|
1629
|
+
function ft({ strings: e, placeholder: t, perTick: n = {
|
|
1571
1630
|
amount: 1,
|
|
1572
1631
|
unit: "character"
|
|
1573
1632
|
}, msDelay: r = {
|
|
@@ -1612,9 +1671,9 @@ function dt({ strings: e, placeholder: t, perTick: n = {
|
|
|
1612
1671
|
T([]), C(""), N.current += 1, P.current = 0, t = setTimeout(r, _);
|
|
1613
1672
|
return;
|
|
1614
1673
|
}
|
|
1615
|
-
if (L.current) P.current =
|
|
1674
|
+
if (L.current) P.current = dt(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);
|
|
1616
1675
|
else {
|
|
1617
|
-
if (P.current =
|
|
1676
|
+
if (P.current = dt(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) {
|
|
1618
1677
|
k(!0);
|
|
1619
1678
|
return;
|
|
1620
1679
|
}
|
|
@@ -1647,7 +1706,7 @@ function dt({ strings: e, placeholder: t, perTick: n = {
|
|
|
1647
1706
|
O,
|
|
1648
1707
|
v
|
|
1649
1708
|
]);
|
|
1650
|
-
let R = A ? "." : "", z = d !== "clear", B =
|
|
1709
|
+
let R = A ? "." : "", z = d !== "clear", B = ut(d), V = w.reduce((e, t) => e + t.split("\n").length, 0);
|
|
1651
1710
|
return z ? /* @__PURE__ */ f("div", {
|
|
1652
1711
|
ref: (e) => {
|
|
1653
1712
|
M.current = e;
|
|
@@ -1677,9 +1736,8 @@ function dt({ strings: e, placeholder: t, perTick: n = {
|
|
|
1677
1736
|
})]
|
|
1678
1737
|
});
|
|
1679
1738
|
}
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
function ft({ intervalMs: e = 500, maxAttempts: t = 20, behavior: n = "smooth", block: r } = {}) {
|
|
1739
|
+
// utilities/hash-navigation.ts
|
|
1740
|
+
function pt({ intervalMs: e = 500, maxAttempts: t = 20, behavior: n = "smooth", block: r } = {}) {
|
|
1683
1741
|
if (typeof window > "u") return () => {};
|
|
1684
1742
|
let i = 0, a = setInterval(() => {
|
|
1685
1743
|
i += 1;
|
|
@@ -1697,10 +1755,10 @@ function ft({ intervalMs: e = 500, maxAttempts: t = 20, behavior: n = "smooth",
|
|
|
1697
1755
|
}, e);
|
|
1698
1756
|
return () => clearInterval(a);
|
|
1699
1757
|
}
|
|
1700
|
-
function
|
|
1701
|
-
o(() =>
|
|
1758
|
+
function mt(e) {
|
|
1759
|
+
o(() => pt(e), []);
|
|
1702
1760
|
}
|
|
1703
|
-
function
|
|
1761
|
+
function ht({ container: e, sectionIds: t, hashFirstSection: n = !0, onActiveChange: r }) {
|
|
1704
1762
|
let i = t.map((e) => document.getElementById(e)).filter((e) => e !== null), a = window.location.hash.toLowerCase().slice(1) || null, o = () => {
|
|
1705
1763
|
let t = e.getBoundingClientRect(), o = t.top + t.height / 2, s = i.find((e) => {
|
|
1706
1764
|
let t = e.getBoundingClientRect();
|
|
@@ -1712,5 +1770,4 @@ function mt({ container: e, sectionIds: t, hashFirstSection: n = !0, onActiveCha
|
|
|
1712
1770
|
};
|
|
1713
1771
|
return o(), e.addEventListener("scroll", o, { passive: !0 }), () => e.removeEventListener("scroll", o);
|
|
1714
1772
|
}
|
|
1715
|
-
|
|
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 };
|
|
1773
|
+
export { De as Avatar, H as Button, xe as ButtonGroup, J as Card, Ie as DateHandler, Oe as Divider, Ce as DoubleClickButton, ke as Dropdown, U as ErrorText, Me as GridLoader, q as Input, Le as InputTimestamp, Ne as LabelField, we as LongPressButton, X as Menu, Ve as Modal, He as MultiDropdown, Y as Pill, ze as PillLink, K as PreviewCard, Z as Select, tt as Switch, Xe as Table, We as Tag, et as TextLink, lt as ThemeSwitcher, ft as TypingAnimation, pt as navigateToHashOnLoad, ht as updateHashOnScroll, mt as useHashNavigationOnLoad };
|
|
@@ -6,13 +6,17 @@ type VariantClassProps = {
|
|
|
6
6
|
className: string | undefined;
|
|
7
7
|
};
|
|
8
8
|
type AvatarVariantOptions = VariantClassProps & {
|
|
9
|
-
size?: "xs" | "sm" | "md" | "lg" | "xl" | null;
|
|
9
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | null;
|
|
10
|
+
variant?: "default" | "ring" | null;
|
|
10
11
|
};
|
|
11
12
|
export type AvatarSize = NonNullable<AvatarVariantOptions["size"]>;
|
|
13
|
+
export type AvatarRingColor = "primary" | "secondary" | "accent" | "muted" | "destructive" | "success" | "warning";
|
|
12
14
|
export interface AvatarProps extends React.ComponentPropsWithoutRef<"span"> {
|
|
13
15
|
name?: string | null;
|
|
14
16
|
image?: string | null;
|
|
15
17
|
size?: AvatarSize;
|
|
18
|
+
variant?: NonNullable<AvatarVariantOptions["variant"]>;
|
|
19
|
+
ringColor?: AvatarRingColor;
|
|
16
20
|
}
|
|
17
|
-
declare const Avatar: ({ name, image: imageSource, size, className, ...props }: AvatarProps) => import('react').JSX.Element;
|
|
21
|
+
declare const Avatar: ({ name, image: imageSource, size, variant, ringColor, className, ...props }: AvatarProps) => import('react').JSX.Element;
|
|
18
22
|
export default Avatar;
|
|
@@ -5,7 +5,7 @@ export type { DoubleClickButtonFeedbackContent, DoubleClickButtonFeedbackContext
|
|
|
5
5
|
export { default as LongPressButton } from './button-long-press';
|
|
6
6
|
export type { LongPressButtonFeedbackContent, LongPressButtonFeedbackContext, LongPressButtonProps, } from './button-long-press';
|
|
7
7
|
export { default as Avatar } from './avatar';
|
|
8
|
-
export type { AvatarProps, AvatarSize } from './avatar';
|
|
8
|
+
export type { AvatarProps, AvatarRingColor, AvatarSize } from './avatar';
|
|
9
9
|
export { default as Divider } from './divider';
|
|
10
10
|
export { default as Dropdown } from './dropdown';
|
|
11
11
|
export type { DropdownItem, DropdownProps } from './dropdown';
|
|
@@ -20,7 +20,7 @@ export { default as Card } from './card';
|
|
|
20
20
|
export { default as InputTimestamp } from './input-timestamp';
|
|
21
21
|
export type { InputTimestampProps } from './input-timestamp';
|
|
22
22
|
export { default as PillLink } from './pill-link';
|
|
23
|
-
export type { PillLinkProps } from './pill-link';
|
|
23
|
+
export type { PillLinkProps, PillLinkVariant } from './pill-link';
|
|
24
24
|
export { default as Menu } from './menu';
|
|
25
25
|
export { default as Modal } from './modal';
|
|
26
26
|
export type { ModalProps } from './modal';
|
|
@@ -32,7 +32,7 @@ export type { PreviewCardProps } from './preview-card';
|
|
|
32
32
|
export { default as Select } from './select';
|
|
33
33
|
export type { SelectItem, SelectProps } from './select';
|
|
34
34
|
export { default as Tag } from './tag';
|
|
35
|
-
export type { TagProps, TagVariant } from './tag';
|
|
35
|
+
export type { TagProps, TagSize, TagVariant } from './tag';
|
|
36
36
|
export { default as Table } from './table';
|
|
37
37
|
export type { TableColumnDef, TableProps } from './table';
|
|
38
38
|
export { default as TextLink } from './text-link';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
export type PillLinkVariant = "pill" | "primary" | "secondary" | "success" | "destructive" | "ghost" | "warning" | "outline" | "outline-primary" | "outline-secondary" | "outline-success" | "outline-destructive" | "outline-ghost" | "outline-warning";
|
|
1
2
|
export interface PillLinkProps extends React.ComponentPropsWithoutRef<"a"> {
|
|
2
3
|
href: string;
|
|
3
4
|
active?: boolean;
|
|
4
|
-
variant?:
|
|
5
|
+
variant?: PillLinkVariant;
|
|
5
6
|
size?: "sm" | "md";
|
|
6
7
|
}
|
|
7
8
|
declare const PillLink: ({ active, className, size, variant, ...props }: PillLinkProps) => import('react').JSX.Element;
|
package/dist/components/tag.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export type TagVariant = "primary" | "secondary" | "success" | "warning" | "destructive" | "outline";
|
|
2
|
+
export type TagSize = "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl";
|
|
2
3
|
export interface TagProps extends React.ComponentPropsWithoutRef<"div"> {
|
|
3
4
|
variant?: TagVariant;
|
|
5
|
+
size?: TagSize;
|
|
4
6
|
}
|
|
5
|
-
declare const Tag: ({ className, variant, ...props }: TagProps) => import('react').JSX.Element;
|
|
7
|
+
declare const Tag: ({ className, variant, size, ...props }: TagProps) => import('react').JSX.Element;
|
|
6
8
|
export default Tag;
|
package/package.json
CHANGED
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@febkosq8/arc",
|
|
3
|
-
"description": "A React components library for febkosq8",
|
|
4
|
-
"private": false,
|
|
5
|
-
"version": "0.8.
|
|
6
|
-
"type": "module",
|
|
7
|
-
"main": "./dist/arc.js",
|
|
8
|
-
"types": "./dist/index.d.ts",
|
|
9
|
-
"exports": {
|
|
10
|
-
".": {
|
|
11
|
-
"types": "./dist/index.d.ts",
|
|
12
|
-
"import": "./dist/arc.js"
|
|
13
|
-
},
|
|
14
|
-
"./styles.css": "./components/index.css"
|
|
15
|
-
},
|
|
16
|
-
"files": [
|
|
17
|
-
"dist",
|
|
18
|
-
"components/index.css"
|
|
19
|
-
],
|
|
20
|
-
"homepage": "https://www.npmjs.com/package/@febkosq8/arc",
|
|
21
|
-
"repository": "https://github.com/febkosq8/arc",
|
|
22
|
-
"packageManager": "pnpm@12.
|
|
23
|
-
"scripts": {
|
|
24
|
-
"build": "vite build",
|
|
25
|
-
"storybook": "storybook dev -p 6006",
|
|
26
|
-
"build-storybook": "storybook build",
|
|
27
|
-
"prettier": "prettier --write .",
|
|
28
|
-
"push-npm": "npm publish --access public",
|
|
29
|
-
"prepublishOnly": "pnpm run build"
|
|
30
|
-
},
|
|
31
|
-
"peerDependencies": {
|
|
32
|
-
"react": "19.3.1",
|
|
33
|
-
"react-dom": "19.3.1"
|
|
34
|
-
},
|
|
35
|
-
"dependencies": {
|
|
36
|
-
"@base-ui/react": "1.9.0",
|
|
37
|
-
"@rinzai/zen": "0.14.0",
|
|
38
|
-
"@tanstack/match-sorter-utils": "9.2.6",
|
|
39
|
-
"@tanstack/react-table": "9.3.1",
|
|
40
|
-
"luxon": "3.7.2",
|
|
41
|
-
"react-icons": "5.7.0"
|
|
42
|
-
},
|
|
43
|
-
"devDependencies": {
|
|
44
|
-
"@storybook/addon-docs": "10.6.
|
|
45
|
-
"@storybook/react-vite": "10.6.
|
|
46
|
-
"@tailwindcss/postcss": "4.3.3",
|
|
47
|
-
"@types/luxon": "3.7.6",
|
|
48
|
-
"@types/node": "26.6.5",
|
|
49
|
-
"@types/react": "19.3.0",
|
|
50
|
-
"@types/react-dom": "19.3.0",
|
|
51
|
-
"@typescript/typescript6": "6.0.2",
|
|
52
|
-
"@vitejs/plugin-react": "6.1.2",
|
|
53
|
-
"eslint": "10.13.0",
|
|
54
|
-
"prettier": "3.9.10",
|
|
55
|
-
"prettier-plugin-css-order": "2.2.0",
|
|
56
|
-
"prettier-plugin-organize-attributes": "1.0.0",
|
|
57
|
-
"prettier-plugin-organize-imports": "4.3.0",
|
|
58
|
-
"prettier-plugin-tailwindcss": "0.8.1",
|
|
59
|
-
"react": "19.3.1",
|
|
60
|
-
"react-dom": "19.3.1",
|
|
61
|
-
"storybook": "10.6.
|
|
62
|
-
"tailwindcss": "4.3.3",
|
|
63
|
-
"typescript": "7.0.2",
|
|
64
|
-
"unplugin-dts": "1.1.2",
|
|
65
|
-
"vite": "8.3.
|
|
66
|
-
}
|
|
67
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@febkosq8/arc",
|
|
3
|
+
"description": "A React components library for febkosq8",
|
|
4
|
+
"private": false,
|
|
5
|
+
"version": "0.8.3",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/arc.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/arc.js"
|
|
13
|
+
},
|
|
14
|
+
"./styles.css": "./components/index.css"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"components/index.css"
|
|
19
|
+
],
|
|
20
|
+
"homepage": "https://www.npmjs.com/package/@febkosq8/arc",
|
|
21
|
+
"repository": "https://github.com/febkosq8/arc",
|
|
22
|
+
"packageManager": "pnpm@12.15.0",
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "vite build",
|
|
25
|
+
"storybook": "storybook dev -p 6006",
|
|
26
|
+
"build-storybook": "storybook build",
|
|
27
|
+
"prettier": "prettier --write .",
|
|
28
|
+
"push-npm": "npm publish --access public",
|
|
29
|
+
"prepublishOnly": "pnpm run build"
|
|
30
|
+
},
|
|
31
|
+
"peerDependencies": {
|
|
32
|
+
"react": "19.3.1",
|
|
33
|
+
"react-dom": "19.3.1"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@base-ui/react": "1.9.0",
|
|
37
|
+
"@rinzai/zen": "0.14.0",
|
|
38
|
+
"@tanstack/match-sorter-utils": "9.2.6",
|
|
39
|
+
"@tanstack/react-table": "9.3.1",
|
|
40
|
+
"luxon": "3.7.2",
|
|
41
|
+
"react-icons": "5.7.0"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@storybook/addon-docs": "10.6.3",
|
|
45
|
+
"@storybook/react-vite": "10.6.3",
|
|
46
|
+
"@tailwindcss/postcss": "4.3.3",
|
|
47
|
+
"@types/luxon": "3.7.6",
|
|
48
|
+
"@types/node": "26.6.5",
|
|
49
|
+
"@types/react": "19.3.0",
|
|
50
|
+
"@types/react-dom": "19.3.0",
|
|
51
|
+
"@typescript/typescript6": "6.0.2",
|
|
52
|
+
"@vitejs/plugin-react": "6.1.2",
|
|
53
|
+
"eslint": "10.13.0",
|
|
54
|
+
"prettier": "3.9.10",
|
|
55
|
+
"prettier-plugin-css-order": "2.2.0",
|
|
56
|
+
"prettier-plugin-organize-attributes": "1.0.0",
|
|
57
|
+
"prettier-plugin-organize-imports": "4.3.0",
|
|
58
|
+
"prettier-plugin-tailwindcss": "0.8.1",
|
|
59
|
+
"react": "19.3.1",
|
|
60
|
+
"react-dom": "19.3.1",
|
|
61
|
+
"storybook": "10.6.3",
|
|
62
|
+
"tailwindcss": "4.3.3",
|
|
63
|
+
"typescript": "7.0.2",
|
|
64
|
+
"unplugin-dts": "1.1.2",
|
|
65
|
+
"vite": "8.3.5"
|
|
66
|
+
}
|
|
67
|
+
}
|