@febkosq8/arc 0.8.2 → 0.8.4
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 +263 -190
- 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/table.d.ts +50 -8
- package/dist/components/tag.d.ts +3 -1
- package/package.json +25 -13
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
|
@@ -11,8 +11,8 @@ 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
|
|
15
|
-
import { columnFilteringFeature as
|
|
14
|
+
import { rankItem as ee } from "@tanstack/match-sorter-utils";
|
|
15
|
+
import { columnFilteringFeature as te, columnResizingFeature as ne, columnSizingFeature as re, columnVisibilityFeature as ie, createFilteredRowModel as ae, createPaginatedRowModel as oe, createSortedRowModel as se, filterFn_includesString as ce, globalFilteringFeature as le, rowPaginationFeature as ue, rowSortingFeature as de, sortFn_alphanumeric as fe, sortFn_alphanumericCaseSensitive as pe, sortFn_basic as me, sortFn_datetime as he, sortFn_text as ge, sortFn_textCaseSensitive as _e, tableFeatures as ve, useTable as ye } from "@tanstack/react-table";
|
|
16
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", {
|
|
@@ -53,7 +53,7 @@ var xe = ({ className: e, orientation: r = "horizontal", selectedVariant: o, chi
|
|
|
53
53
|
variant: "primary",
|
|
54
54
|
size: "md"
|
|
55
55
|
}
|
|
56
|
-
}),
|
|
56
|
+
}), V = Object.assign(({ className: e, variant: n, size: r, ...i }) => /* @__PURE__ */ f("button", {
|
|
57
57
|
className: t("arc-button", Se({
|
|
58
58
|
variant: n,
|
|
59
59
|
size: r,
|
|
@@ -88,7 +88,7 @@ var xe = ({ className: e, orientation: r = "horizontal", selectedVariant: o, chi
|
|
|
88
88
|
"aria-hidden": !g,
|
|
89
89
|
children: w
|
|
90
90
|
})]
|
|
91
|
-
}), E = /* @__PURE__ */ f(
|
|
91
|
+
}), E = /* @__PURE__ */ f(V, {
|
|
92
92
|
...h,
|
|
93
93
|
children: T,
|
|
94
94
|
className: t(d),
|
|
@@ -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,9 +153,9 @@ 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
|
-
children: [/* @__PURE__ */ f(
|
|
158
|
+
children: [/* @__PURE__ */ f(V, {
|
|
159
159
|
...m,
|
|
160
160
|
children: E,
|
|
161
161
|
variant: c,
|
|
@@ -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,
|
|
@@ -286,7 +311,7 @@ var xe = ({ className: e, orientation: r = "horizontal", selectedVariant: o, chi
|
|
|
286
311
|
}) })]
|
|
287
312
|
})
|
|
288
313
|
});
|
|
289
|
-
},
|
|
314
|
+
}, H = ({ data: e, className: n, ...r }) => {
|
|
290
315
|
let i = Array.isArray(e) ? e.join(", ") : typeof e == "string" ? e : null;
|
|
291
316
|
return /* @__PURE__ */ f("em", {
|
|
292
317
|
role: "alert",
|
|
@@ -295,19 +320,19 @@ var xe = ({ className: e, orientation: r = "horizontal", selectedVariant: o, chi
|
|
|
295
320
|
...r,
|
|
296
321
|
children: i
|
|
297
322
|
});
|
|
298
|
-
},
|
|
299
|
-
function
|
|
323
|
+
}, Ae = /* @__PURE__ */ "*.+.×.÷.=.~.!.?.@.#.%.&.§.¶.※.◇.◆.○.●.△.▽.□.■.♠.♣.♦.♤.♧.♢.♪.♫.∴.∵".split(".");
|
|
324
|
+
function U(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);
|
|
302
327
|
}
|
|
303
|
-
var
|
|
328
|
+
var je = [
|
|
304
329
|
"circle",
|
|
305
330
|
"square",
|
|
306
331
|
"diamond",
|
|
307
332
|
"star",
|
|
308
333
|
"heart",
|
|
309
334
|
"hexagon"
|
|
310
|
-
],
|
|
335
|
+
], Me = 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,8 +342,8 @@ var G = [
|
|
|
317
342
|
hexagon: "arc-grid-loader__cell--hexagon"
|
|
318
343
|
} },
|
|
319
344
|
defaultVariants: { shape: "circle" }
|
|
320
|
-
}),
|
|
321
|
-
let [_, v] = u([]), [y, b] = u([]), [x, S] = u([]), C = c.length > 0 ? c :
|
|
345
|
+
}), Ne = ({ className: e, rows: n = 3, columns: r = 3, size: i = 120, maxSize: a = 24, shape: s = "circle", shapes: c = je, colors: l = [], label: d = "Loading", symbols: p = Ae, title: m, style: h, ...g }) => {
|
|
346
|
+
let [_, v] = u([]), [y, b] = u([]), [x, S] = u([]), C = c.length > 0 ? c : je, [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)]));
|
|
324
349
|
}, [
|
|
@@ -361,10 +386,10 @@ 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(Me({ shape: s === "mixed" ? y[o] ?? C[Math.floor(U(o, n, r) * C.length)] : s })),
|
|
365
390
|
onAnimationIteration: () => {
|
|
366
391
|
s === "mixed" && b((e) => {
|
|
367
|
-
let t = [...e], i = t[o] ?? C[Math.floor(
|
|
392
|
+
let t = [...e], i = t[o] ?? C[Math.floor(U(o, n, r) * C.length)], a = C.filter((e) => e !== i);
|
|
368
393
|
return t[o] = a.length > 0 ? a[Math.floor(Math.random() * a.length)] : i, t;
|
|
369
394
|
}), l.length > 1 && S((e) => {
|
|
370
395
|
let t = [...e];
|
|
@@ -375,8 +400,8 @@ var G = [
|
|
|
375
400
|
});
|
|
376
401
|
},
|
|
377
402
|
style: {
|
|
378
|
-
animationDelay: l.length > 1 ? `${o / (n * r) * 1200}ms` : `${-
|
|
379
|
-
animationDuration: l.length > 1 ? "1200ms" : `${900 +
|
|
403
|
+
animationDelay: l.length > 1 ? `${o / (n * r) * 1200}ms` : `${-U(o, n, r) * 1200}ms`,
|
|
404
|
+
animationDuration: l.length > 1 ? "1200ms" : `${900 + U(o, n, r) * 600}ms`,
|
|
380
405
|
backgroundColor: l.length > 0 ? l[(o + (x[o] ?? 0)) % l.length] : void 0,
|
|
381
406
|
fontSize: `${Math.min(i / Math.max(n, r), a) * .4}px`,
|
|
382
407
|
maxWidth: a,
|
|
@@ -389,7 +414,7 @@ var G = [
|
|
|
389
414
|
}, o))
|
|
390
415
|
})
|
|
391
416
|
});
|
|
392
|
-
},
|
|
417
|
+
}, W = ({ cardContent: e, children: n, trigger: r = "hover", triggerRender: i, side: a = "bottom", align: o = "center", className: s, open: c, onOpenChange: l }) => /* @__PURE__ */ p(A.Root, {
|
|
393
418
|
open: c,
|
|
394
419
|
onOpenChange: l,
|
|
395
420
|
children: [/* @__PURE__ */ f(A.Trigger, {
|
|
@@ -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
|
+
}), Pe = ({ 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,
|
|
@@ -419,7 +444,7 @@ var G = [
|
|
|
419
444
|
htmlFor: e,
|
|
420
445
|
children: n
|
|
421
446
|
}),
|
|
422
|
-
r != null && r !== !1 && /* @__PURE__ */ f(
|
|
447
|
+
r != null && r !== !1 && /* @__PURE__ */ f(W, {
|
|
423
448
|
trigger: "hover",
|
|
424
449
|
triggerRender: /* @__PURE__ */ f("button", {
|
|
425
450
|
type: "button",
|
|
@@ -435,10 +460,10 @@ var G = [
|
|
|
435
460
|
"aria-hidden": "true"
|
|
436
461
|
})
|
|
437
462
|
}),
|
|
438
|
-
s && (Array.isArray(s) ? s.length > 0 && /* @__PURE__ */ f(
|
|
463
|
+
s && (Array.isArray(s) ? s.length > 0 && /* @__PURE__ */ f(H, { data: s }) : /* @__PURE__ */ f(H, { data: s }))
|
|
439
464
|
]
|
|
440
465
|
});
|
|
441
|
-
},
|
|
466
|
+
}, Fe = e("arc-input rounded border text-foreground placeholder:text-muted-foreground focus:border-transparent focus:outline-hidden focus:ring-2 focus:ring-ring disabled:cursor-not-allowed disabled:border-muted disabled:bg-muted", {
|
|
442
467
|
variants: {
|
|
443
468
|
variant: {
|
|
444
469
|
default: "border-border bg-background",
|
|
@@ -453,8 +478,8 @@ var G = [
|
|
|
453
478
|
variant: "default",
|
|
454
479
|
as: "input"
|
|
455
480
|
}
|
|
456
|
-
}),
|
|
457
|
-
let a = t(
|
|
481
|
+
}), G = ({ as: e = "input", className: n, variant: r, ...i }) => {
|
|
482
|
+
let a = t(Fe({
|
|
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
|
+
}, Ie = 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",
|
|
@@ -475,10 +500,10 @@ var G = [
|
|
|
475
500
|
"outline-warning": "border-warning bg-background text-warning"
|
|
476
501
|
} },
|
|
477
502
|
defaultVariants: { variant: "outline-secondary" }
|
|
478
|
-
}),
|
|
503
|
+
}), K = (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(Ie({ variant: r }), h && "arc-card-cursor-border", c && "[&_.arc-card-header]:border-b", !c && "[&_.arc-card-header]:border-b-0", l && "[&_.arc-card-footer]:border-t", !l && "[&_.arc-card-footer]:border-t-0", (p || m) && "transition-[border-color,transform] duration-300 ease-out", p && "hover:-translate-y-1", m && "hover:border-primary", n),
|
|
482
507
|
onPointerMove: h ? (e) => {
|
|
483
508
|
if (u?.(e), !h) return;
|
|
484
509
|
let t = e.currentTarget.getBoundingClientRect();
|
|
@@ -487,19 +512,19 @@ var G = [
|
|
|
487
512
|
...d
|
|
488
513
|
});
|
|
489
514
|
};
|
|
490
|
-
|
|
515
|
+
K.Header = (e) => {
|
|
491
516
|
let { className: n, ...r } = e;
|
|
492
517
|
return /* @__PURE__ */ f("h2", {
|
|
493
518
|
className: t("arc-card-header flex w-full typography-heading-3 flex-col border-foreground/40 px-0 pb-1", n),
|
|
494
519
|
...r
|
|
495
520
|
});
|
|
496
|
-
},
|
|
521
|
+
}, K.Content = (e) => {
|
|
497
522
|
let { className: n, ...r } = e;
|
|
498
523
|
return /* @__PURE__ */ f("div", {
|
|
499
524
|
className: t("arc-card-content typography-paragraph mt-0! w-full justify-between px-0 py-1 whitespace-pre-wrap", n),
|
|
500
525
|
...r
|
|
501
526
|
});
|
|
502
|
-
},
|
|
527
|
+
}, K.Footer = (e) => {
|
|
503
528
|
let { className: n, ...r } = e;
|
|
504
529
|
return /* @__PURE__ */ f("div", {
|
|
505
530
|
className: t("arc-card-footer typography-muted mt-auto mb-0 flex w-full items-end justify-start border-foreground/40 px-0 pt-1", n),
|
|
@@ -507,7 +532,7 @@ J.Header = (e) => {
|
|
|
507
532
|
});
|
|
508
533
|
};
|
|
509
534
|
// utilities/date-handler.ts
|
|
510
|
-
var
|
|
535
|
+
var Le = class e {
|
|
511
536
|
static toDateTime(e) {
|
|
512
537
|
if (e == null || e === "") return j.invalid("missing date");
|
|
513
538
|
if (e instanceof Date) return j.fromJSDate(e);
|
|
@@ -565,9 +590,9 @@ var Fe = class e {
|
|
|
565
590
|
let r = e.getDateTime(t), i = e.getRelativeTime(t);
|
|
566
591
|
return n.replace("$ISO$", r).replace("$RELATIVE$", i);
|
|
567
592
|
}
|
|
568
|
-
},
|
|
569
|
-
let r = c(() => e ?
|
|
570
|
-
return /* @__PURE__ */ f(
|
|
593
|
+
}, Re = ({ value: e, format: t = "$ISO$ ($RELATIVE$)", ...n }) => {
|
|
594
|
+
let r = c(() => e ? Le.getFormattedTime(e, t) : "", [e, t]);
|
|
595
|
+
return /* @__PURE__ */ f(G, {
|
|
571
596
|
type: "text",
|
|
572
597
|
disabled: !0,
|
|
573
598
|
readOnly: !0,
|
|
@@ -575,12 +600,23 @@ var Fe = class e {
|
|
|
575
600
|
size: Math.max(r.length, 1),
|
|
576
601
|
...n
|
|
577
602
|
});
|
|
578
|
-
},
|
|
603
|
+
}, ze = 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
604
|
variants: {
|
|
580
605
|
variant: {
|
|
581
|
-
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",
|
|
582
607
|
primary: "bg-primary text-primary-foreground! hover:bg-primary/90",
|
|
583
|
-
|
|
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!"
|
|
584
620
|
},
|
|
585
621
|
size: {
|
|
586
622
|
sm: "h-9 px-3",
|
|
@@ -596,26 +632,37 @@ var Fe = class e {
|
|
|
596
632
|
variant: "pill",
|
|
597
633
|
size: "md"
|
|
598
634
|
}
|
|
599
|
-
}),
|
|
600
|
-
className: t(
|
|
635
|
+
}), Be = ({ active: e = !1, className: n, size: r = "md", variant: i = "pill", ...a }) => /* @__PURE__ */ f("a", {
|
|
636
|
+
className: t(ze({
|
|
601
637
|
variant: i,
|
|
602
638
|
size: r
|
|
603
639
|
}), e && {
|
|
604
640
|
pill: "text-primary!",
|
|
605
|
-
primary: "bg-primary/80 ring-2 ring-ring ring-offset-2",
|
|
606
|
-
|
|
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"
|
|
607
654
|
}[i], n),
|
|
608
655
|
"aria-current": e ? "page" : void 0,
|
|
609
656
|
...a
|
|
610
|
-
}),
|
|
657
|
+
}), q = ({ active: e = !1, className: n, ...r }) => /* @__PURE__ */ f("button", {
|
|
611
658
|
type: "button",
|
|
612
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),
|
|
613
660
|
"aria-pressed": e,
|
|
614
661
|
...r
|
|
615
|
-
}),
|
|
662
|
+
}), Ve = ({ children: e }) => n.toArray(e).map((e, t) => /* @__PURE__ */ p(r, { children: [t > 0 && /* @__PURE__ */ f(M.Separator, { className: "mx-2 h-px bg-border" }), e] }, t)), J = Object.assign(({ className: e, contentClassName: n, active: r, activeClassName: i, buttonText: a, children: o }) => /* @__PURE__ */ p(M.Root, {
|
|
616
663
|
loopFocus: !0,
|
|
617
664
|
children: [/* @__PURE__ */ p(M.Trigger, {
|
|
618
|
-
render: /* @__PURE__ */ f(
|
|
665
|
+
render: /* @__PURE__ */ f(q, {
|
|
619
666
|
active: r,
|
|
620
667
|
className: t("w-fit", r && i, e)
|
|
621
668
|
}),
|
|
@@ -629,7 +676,7 @@ var Fe = class e {
|
|
|
629
676
|
collisionPadding: 8,
|
|
630
677
|
children: /* @__PURE__ */ f(M.Popup, {
|
|
631
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),
|
|
632
|
-
children: /* @__PURE__ */ f(
|
|
679
|
+
children: /* @__PURE__ */ f(Ve, { children: o })
|
|
633
680
|
})
|
|
634
681
|
}) })]
|
|
635
682
|
}), {
|
|
@@ -670,12 +717,12 @@ var Fe = class e {
|
|
|
670
717
|
collisionPadding: 8,
|
|
671
718
|
children: /* @__PURE__ */ f(M.Popup, {
|
|
672
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",
|
|
673
|
-
children: /* @__PURE__ */ f(
|
|
720
|
+
children: /* @__PURE__ */ f(Ve, { children: i })
|
|
674
721
|
})
|
|
675
722
|
}) })]
|
|
676
723
|
});
|
|
677
724
|
}
|
|
678
|
-
}),
|
|
725
|
+
}), He = ({ open: e = !1, setOpen: n, children: r, initialFocus: i, headerContent: a, footerContent: s, width: c, height: l, className: u, customKeyHandler: d }) => (o(() => {
|
|
679
726
|
if (!e) return;
|
|
680
727
|
let t = (e) => {
|
|
681
728
|
let t = e.key === "Escape" ? "esc" : (e.ctrlKey || e.metaKey) && e.key.toLowerCase() === "s" ? "ctrl+s" : null;
|
|
@@ -714,7 +761,7 @@ var Fe = class e {
|
|
|
714
761
|
]
|
|
715
762
|
})
|
|
716
763
|
})] })
|
|
717
|
-
})),
|
|
764
|
+
})), Ue = ({ id: e, items: n, value: r, onChange: i, className: a, placeholder: o = "Select options", disabled: s, name: c, preventEmpty: l = !1, "data-name": u, "data-required": d }) => {
|
|
718
765
|
let h = n.filter((e) => r?.includes(String(e.key)));
|
|
719
766
|
return /* @__PURE__ */ f(m.Root, {
|
|
720
767
|
multiple: !0,
|
|
@@ -794,7 +841,7 @@ var Fe = class e {
|
|
|
794
841
|
}) })]
|
|
795
842
|
})
|
|
796
843
|
});
|
|
797
|
-
},
|
|
844
|
+
}, Y = ({ id: e, value: n, onChange: r, data: i, className: a, disabled: o, placeholder: s, ...c }) => /* @__PURE__ */ p(B.Root, {
|
|
798
845
|
value: n,
|
|
799
846
|
onValueChange: (e) => {
|
|
800
847
|
e !== null && r(e);
|
|
@@ -846,38 +893,53 @@ var Fe = class e {
|
|
|
846
893
|
})
|
|
847
894
|
})
|
|
848
895
|
}) })]
|
|
849
|
-
}),
|
|
850
|
-
variants: {
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
896
|
+
}), We = 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
|
+
}), Ge = ({ className: e, variant: n, size: r, ...i }) => /* @__PURE__ */ f("div", {
|
|
921
|
+
className: t(We({
|
|
861
922
|
variant: n,
|
|
923
|
+
size: r,
|
|
862
924
|
className: e
|
|
863
925
|
})),
|
|
864
|
-
...
|
|
865
|
-
}),
|
|
866
|
-
let i = e.getValue(t), a =
|
|
926
|
+
...i
|
|
927
|
+
}), Ke = (e, t, n, r) => {
|
|
928
|
+
let i = e.getValue(t), a = ee(i, n);
|
|
867
929
|
return r({ itemRank: a }), a.passed;
|
|
868
|
-
},
|
|
869
|
-
fuzzy:
|
|
930
|
+
}, X = {
|
|
931
|
+
fuzzy: Ke,
|
|
870
932
|
includesString: ce,
|
|
871
933
|
select: (e, t, n) => {
|
|
872
934
|
let r = e.getValue(t);
|
|
873
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);
|
|
874
936
|
}
|
|
875
|
-
},
|
|
937
|
+
}, qe = ve({
|
|
876
938
|
columnMeta: {},
|
|
877
|
-
columnFilteringFeature:
|
|
878
|
-
columnResizingFeature:
|
|
879
|
-
columnSizingFeature:
|
|
880
|
-
columnVisibilityFeature:
|
|
939
|
+
columnFilteringFeature: te,
|
|
940
|
+
columnResizingFeature: ne,
|
|
941
|
+
columnSizingFeature: re,
|
|
942
|
+
columnVisibilityFeature: ie,
|
|
881
943
|
globalFilteringFeature: le,
|
|
882
944
|
rowPaginationFeature: ue,
|
|
883
945
|
rowSortingFeature: de,
|
|
@@ -892,60 +954,71 @@ var Fe = class e {
|
|
|
892
954
|
text: ge,
|
|
893
955
|
textCaseSensitive: _e
|
|
894
956
|
},
|
|
895
|
-
filterFns:
|
|
957
|
+
filterFns: X
|
|
896
958
|
});
|
|
897
|
-
function
|
|
898
|
-
return Object.prototype.hasOwnProperty.call(
|
|
959
|
+
function Je(e) {
|
|
960
|
+
return Object.prototype.hasOwnProperty.call(X, e);
|
|
899
961
|
}
|
|
900
|
-
function
|
|
962
|
+
function Ye(e, t) {
|
|
901
963
|
if (e !== !1) {
|
|
902
964
|
if (e === void 0) return t ? "select" : void 0;
|
|
903
|
-
if (typeof e == "function" || e === "auto" ||
|
|
904
|
-
throw Error(`Unsupported table filterFn "${e}". Use "auto" or one of: ${Object.keys(
|
|
965
|
+
if (typeof e == "function" || e === "auto" || Je(e)) return e;
|
|
966
|
+
throw Error(`Unsupported table filterFn "${e}". Use "auto" or one of: ${Object.keys(X).join(", ")}.`);
|
|
905
967
|
}
|
|
906
968
|
}
|
|
907
|
-
var
|
|
969
|
+
var Xe = ({ data: e, columnDef: n, pageSize: r = 10, className: i, showHeader: a = !0, showFilters: o = !0, showSorting: l = !0 }) => {
|
|
908
970
|
let d = s(), [m, b] = u({
|
|
909
971
|
pageIndex: 0,
|
|
910
972
|
pageSize: r
|
|
911
|
-
}), [x, w] = u([]), [T, D] = u(""), [O, k] = u([]), [A, j] = u({}), M = x.length > 0 || T !== "", N = c(() => n?.map((e) =>
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
973
|
+
}), [x, w] = u([]), [T, D] = u(""), [O, k] = u([]), [A, j] = u({}), M = x.length > 0 || T !== "", N = c(() => n?.map((e) => {
|
|
974
|
+
if (e.accessorFn !== void 0 && !e.id) throw Error("Table columns with accessorFn require a non-empty id.");
|
|
975
|
+
let n = {
|
|
976
|
+
enableResizing: e.enableResizing,
|
|
977
|
+
enableColumnFilter: e.filterFn !== !1 && e.enableColumnFilter,
|
|
978
|
+
enableSorting: e.enableSorting,
|
|
979
|
+
enableHiding: e.enableHiding ?? !0,
|
|
980
|
+
size: e.size,
|
|
981
|
+
minSize: e.minSize ?? 50,
|
|
982
|
+
maxSize: e.maxSize ?? 1e3,
|
|
983
|
+
filterFn: Ye(e.filterFn, e.filterSelectOptions),
|
|
984
|
+
meta: {
|
|
985
|
+
headerLabel: e.header,
|
|
986
|
+
filterSelectOptions: e.filterSelectOptions,
|
|
987
|
+
mobileFullWidth: e.mobileFullWidth
|
|
988
|
+
},
|
|
989
|
+
header: (n) => {
|
|
990
|
+
let r = n.column.getIsSorted(), i = n.column.getCanSort();
|
|
991
|
+
return /* @__PURE__ */ f("div", {
|
|
992
|
+
className: "flex flex-col gap-1.5",
|
|
993
|
+
children: /* @__PURE__ */ p("div", {
|
|
994
|
+
className: t("flex items-center gap-1.5", l && i && "cursor-pointer select-none"),
|
|
995
|
+
onClick: l && i ? n.column.getToggleSortingHandler() : void 0,
|
|
996
|
+
children: [/* @__PURE__ */ f("span", {
|
|
997
|
+
className: "min-w-0 truncate text-sm font-semibold tracking-wide",
|
|
998
|
+
children: e.header
|
|
999
|
+
}), l && i && /* @__PURE__ */ p("span", {
|
|
1000
|
+
className: "text-muted-foreground ml-auto shrink-0 text-xs",
|
|
1001
|
+
children: [
|
|
1002
|
+
r === "asc" && /* @__PURE__ */ f(v, { className: "text-primary h-3.5 w-3.5" }),
|
|
1003
|
+
r === "desc" && /* @__PURE__ */ f(_, { className: "text-primary h-3.5 w-3.5" }),
|
|
1004
|
+
r === !1 && /* @__PURE__ */ f(y, { className: "h-3 w-3 opacity-60" })
|
|
1005
|
+
]
|
|
1006
|
+
})]
|
|
1007
|
+
})
|
|
1008
|
+
});
|
|
1009
|
+
},
|
|
1010
|
+
cell: e.cell ?? ((e) => e.getValue())
|
|
1011
|
+
};
|
|
1012
|
+
return e.accessorFn === void 0 ? {
|
|
1013
|
+
...n,
|
|
1014
|
+
...e.id === void 0 ? {} : { id: e.id },
|
|
1015
|
+
accessorKey: e.accessorKey
|
|
1016
|
+
} : {
|
|
1017
|
+
...n,
|
|
1018
|
+
id: e.id,
|
|
1019
|
+
accessorFn: e.accessorFn
|
|
1020
|
+
};
|
|
1021
|
+
}), [n]), P = ye({
|
|
949
1022
|
data: e,
|
|
950
1023
|
columns: N,
|
|
951
1024
|
state: {
|
|
@@ -961,8 +1034,8 @@ var Je = ie(), Ye = ({ data: e, columnDef: n, pageSize: r = 10, className: i, sh
|
|
|
961
1034
|
onSortingChange: k,
|
|
962
1035
|
onColumnFiltersChange: w,
|
|
963
1036
|
onGlobalFilterChange: D,
|
|
964
|
-
globalFilterFn:
|
|
965
|
-
features:
|
|
1037
|
+
globalFilterFn: Ke,
|
|
1038
|
+
features: qe,
|
|
966
1039
|
defaultColumn: {
|
|
967
1040
|
size: 200,
|
|
968
1041
|
minSize: 50,
|
|
@@ -977,7 +1050,7 @@ var Je = ie(), Ye = ({ data: e, columnDef: n, pageSize: r = 10, className: i, sh
|
|
|
977
1050
|
children: [
|
|
978
1051
|
/* @__PURE__ */ p("div", {
|
|
979
1052
|
className: "flex items-center gap-2",
|
|
980
|
-
children: [/* @__PURE__ */ p(
|
|
1053
|
+
children: [/* @__PURE__ */ p(V, {
|
|
981
1054
|
variant: "outline-secondary",
|
|
982
1055
|
size: "sm",
|
|
983
1056
|
disabled: !M && O.length === 0,
|
|
@@ -987,7 +1060,7 @@ var Je = ie(), Ye = ({ data: e, columnDef: n, pageSize: r = 10, className: i, sh
|
|
|
987
1060
|
title: "Clear filters and sorting",
|
|
988
1061
|
type: "button",
|
|
989
1062
|
children: [/* @__PURE__ */ f(E, { className: "mr-1.5 h-3 w-3" }), "Clear filters and sorting"]
|
|
990
|
-
}), /* @__PURE__ */ f(
|
|
1063
|
+
}), /* @__PURE__ */ f($e, { table: P })]
|
|
991
1064
|
}),
|
|
992
1065
|
/* @__PURE__ */ p("nav", {
|
|
993
1066
|
"aria-label": "Table pagination",
|
|
@@ -995,7 +1068,7 @@ var Je = ie(), Ye = ({ data: e, columnDef: n, pageSize: r = 10, className: i, sh
|
|
|
995
1068
|
children: [
|
|
996
1069
|
/* @__PURE__ */ p("div", {
|
|
997
1070
|
className: "flex items-center gap-1",
|
|
998
|
-
children: [/* @__PURE__ */ f(
|
|
1071
|
+
children: [/* @__PURE__ */ f(V, {
|
|
999
1072
|
variant: "outline-secondary",
|
|
1000
1073
|
size: "icon-md",
|
|
1001
1074
|
className: "h-10 w-10 sm:h-8 sm:w-8",
|
|
@@ -1011,7 +1084,7 @@ var Je = ie(), Ye = ({ data: e, columnDef: n, pageSize: r = 10, className: i, sh
|
|
|
1011
1084
|
"aria-hidden": "true",
|
|
1012
1085
|
className: "h-3.5 w-3.5"
|
|
1013
1086
|
})
|
|
1014
|
-
}), /* @__PURE__ */ f(
|
|
1087
|
+
}), /* @__PURE__ */ f(V, {
|
|
1015
1088
|
variant: "outline-secondary",
|
|
1016
1089
|
size: "icon-md",
|
|
1017
1090
|
className: "h-10 w-10 sm:h-8 sm:w-8",
|
|
@@ -1057,7 +1130,7 @@ var Je = ie(), Ye = ({ data: e, columnDef: n, pageSize: r = 10, className: i, sh
|
|
|
1057
1130
|
}),
|
|
1058
1131
|
/* @__PURE__ */ p("div", {
|
|
1059
1132
|
className: "flex items-center gap-1",
|
|
1060
|
-
children: [/* @__PURE__ */ f(
|
|
1133
|
+
children: [/* @__PURE__ */ f(V, {
|
|
1061
1134
|
variant: "outline-secondary",
|
|
1062
1135
|
size: "icon-md",
|
|
1063
1136
|
className: "h-10 w-10 sm:h-8 sm:w-8",
|
|
@@ -1073,7 +1146,7 @@ var Je = ie(), Ye = ({ data: e, columnDef: n, pageSize: r = 10, className: i, sh
|
|
|
1073
1146
|
"aria-hidden": "true",
|
|
1074
1147
|
className: "h-3.5 w-3.5"
|
|
1075
1148
|
})
|
|
1076
|
-
}), /* @__PURE__ */ f(
|
|
1149
|
+
}), /* @__PURE__ */ f(V, {
|
|
1077
1150
|
variant: "outline-secondary",
|
|
1078
1151
|
size: "icon-md",
|
|
1079
1152
|
className: "h-10 w-10 sm:h-8 sm:w-8",
|
|
@@ -1096,7 +1169,7 @@ var Je = ie(), Ye = ({ data: e, columnDef: n, pageSize: r = 10, className: i, sh
|
|
|
1096
1169
|
/* @__PURE__ */ p("label", {
|
|
1097
1170
|
htmlFor: `${d}-page-size`,
|
|
1098
1171
|
className: "text-muted-foreground flex w-full items-center justify-between gap-2 text-xs md:w-auto",
|
|
1099
|
-
children: ["Rows per page", /* @__PURE__ */ f(
|
|
1172
|
+
children: ["Rows per page", /* @__PURE__ */ f(Y, {
|
|
1100
1173
|
id: `${d}-page-size`,
|
|
1101
1174
|
value: P.state.pagination.pageSize.toString(),
|
|
1102
1175
|
onChange: (e) => {
|
|
@@ -1135,7 +1208,7 @@ var Je = ie(), Ye = ({ data: e, columnDef: n, pageSize: r = 10, className: i, sh
|
|
|
1135
1208
|
htmlFor: `${d}-sort`,
|
|
1136
1209
|
className: "text-muted-foreground mb-1 block text-xs font-medium",
|
|
1137
1210
|
children: "Sort by"
|
|
1138
|
-
}), /* @__PURE__ */ f(
|
|
1211
|
+
}), /* @__PURE__ */ f(Y, {
|
|
1139
1212
|
id: `${d}-sort`,
|
|
1140
1213
|
value: O[0]?.id ?? "__none__",
|
|
1141
1214
|
onChange: (e) => {
|
|
@@ -1152,7 +1225,7 @@ var Je = ie(), Ye = ({ data: e, columnDef: n, pageSize: r = 10, className: i, sh
|
|
|
1152
1225
|
label: e.columnDef.meta?.headerLabel ?? e.id
|
|
1153
1226
|
}))]
|
|
1154
1227
|
})]
|
|
1155
|
-
}), /* @__PURE__ */ f(
|
|
1228
|
+
}), /* @__PURE__ */ f(V, {
|
|
1156
1229
|
variant: "outline-secondary",
|
|
1157
1230
|
size: "icon-sm",
|
|
1158
1231
|
disabled: O.length === 0,
|
|
@@ -1179,7 +1252,7 @@ var Je = ie(), Ye = ({ data: e, columnDef: n, pageSize: r = 10, className: i, sh
|
|
|
1179
1252
|
htmlFor: n,
|
|
1180
1253
|
className: "text-muted-foreground mb-1 block text-xs font-medium",
|
|
1181
1254
|
children: t
|
|
1182
|
-
}), /* @__PURE__ */ f(
|
|
1255
|
+
}), /* @__PURE__ */ f(Qe, {
|
|
1183
1256
|
column: e,
|
|
1184
1257
|
idPrefix: `${d}-`
|
|
1185
1258
|
})]
|
|
@@ -1249,7 +1322,7 @@ var Je = ie(), Ye = ({ data: e, columnDef: n, pageSize: r = 10, className: i, sh
|
|
|
1249
1322
|
]
|
|
1250
1323
|
});
|
|
1251
1324
|
};
|
|
1252
|
-
function
|
|
1325
|
+
function Ze({ value: e, onChange: t, debounce: n = 500, ...r }) {
|
|
1253
1326
|
let [i, a] = u(e);
|
|
1254
1327
|
return o(() => {
|
|
1255
1328
|
a(e);
|
|
@@ -1262,14 +1335,14 @@ function Xe({ value: e, onChange: t, debounce: n = 500, ...r }) {
|
|
|
1262
1335
|
i,
|
|
1263
1336
|
n,
|
|
1264
1337
|
t
|
|
1265
|
-
]), /* @__PURE__ */ f(
|
|
1338
|
+
]), /* @__PURE__ */ f(G, {
|
|
1266
1339
|
...r,
|
|
1267
1340
|
value: i,
|
|
1268
1341
|
onChange: (e) => a(e.target.value),
|
|
1269
1342
|
autoComplete: "off"
|
|
1270
1343
|
});
|
|
1271
1344
|
}
|
|
1272
|
-
function
|
|
1345
|
+
function Qe({ column: e, idPrefix: t = "" }) {
|
|
1273
1346
|
let n = `${t}${e.id}-filter`, r = {
|
|
1274
1347
|
includesString: "Includes string",
|
|
1275
1348
|
equalsString: "Equals string",
|
|
@@ -1277,7 +1350,7 @@ function Ze({ column: e, idPrefix: t = "" }) {
|
|
|
1277
1350
|
equals: "Equals",
|
|
1278
1351
|
fuzzy: "Fuzzy"
|
|
1279
1352
|
}, i = e.getFilterValue(), a = e.columnDef.meta?.filterSelectOptions;
|
|
1280
|
-
return a ? /* @__PURE__ */ f(
|
|
1353
|
+
return a ? /* @__PURE__ */ f(Y, {
|
|
1281
1354
|
id: n,
|
|
1282
1355
|
value: i ?? "__all__",
|
|
1283
1356
|
onChange: (t) => e.setFilterValue(t === "__all__" ? void 0 : t),
|
|
@@ -1289,7 +1362,7 @@ function Ze({ column: e, idPrefix: t = "" }) {
|
|
|
1289
1362
|
key: e.value,
|
|
1290
1363
|
label: e.label
|
|
1291
1364
|
}))]
|
|
1292
|
-
}) : /* @__PURE__ */ f(
|
|
1365
|
+
}) : /* @__PURE__ */ f(Ze, {
|
|
1293
1366
|
id: n,
|
|
1294
1367
|
type: "text",
|
|
1295
1368
|
name: e.id,
|
|
@@ -1300,10 +1373,10 @@ function Ze({ column: e, idPrefix: t = "" }) {
|
|
|
1300
1373
|
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"
|
|
1301
1374
|
});
|
|
1302
1375
|
}
|
|
1303
|
-
function
|
|
1304
|
-
return /* @__PURE__ */ p(
|
|
1376
|
+
function $e({ table: e }) {
|
|
1377
|
+
return /* @__PURE__ */ p(W, {
|
|
1305
1378
|
trigger: "click",
|
|
1306
|
-
triggerRender: /* @__PURE__ */ f(
|
|
1379
|
+
triggerRender: /* @__PURE__ */ f(V, {
|
|
1307
1380
|
variant: "outline-secondary",
|
|
1308
1381
|
size: "sm",
|
|
1309
1382
|
title: "Toggle columns",
|
|
@@ -1316,7 +1389,7 @@ function Qe({ table: e }) {
|
|
|
1316
1389
|
className: "flex flex-col",
|
|
1317
1390
|
children: e.getAllLeafColumns().map((e) => {
|
|
1318
1391
|
let n = e.columnDef.meta?.headerLabel ?? e.id, r = e.getCanHide(), i = e.getIsVisible();
|
|
1319
|
-
return /* @__PURE__ */ p(
|
|
1392
|
+
return /* @__PURE__ */ p(V, {
|
|
1320
1393
|
variant: "ghost",
|
|
1321
1394
|
size: "sm",
|
|
1322
1395
|
disabled: !r,
|
|
@@ -1331,31 +1404,31 @@ function Qe({ table: e }) {
|
|
|
1331
1404
|
});
|
|
1332
1405
|
}
|
|
1333
1406
|
// components/text-link.tsx
|
|
1334
|
-
var
|
|
1407
|
+
var et = ({ className: e, href: n, text: r, target: i = "_blank", rel: a, ...o }) => /* @__PURE__ */ f("a", {
|
|
1335
1408
|
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),
|
|
1336
1409
|
href: n,
|
|
1337
1410
|
target: i,
|
|
1338
1411
|
rel: a ?? (i === "_blank" ? "noopener noreferrer" : void 0),
|
|
1339
1412
|
...o,
|
|
1340
1413
|
children: r
|
|
1341
|
-
}),
|
|
1414
|
+
}), tt = ({ checked: e = !1, onChange: n, disabled: r = !1, variant: i = "primary", children: a, ...o }) => /* @__PURE__ */ f(be.Root, {
|
|
1342
1415
|
checked: e,
|
|
1343
1416
|
disabled: r,
|
|
1344
1417
|
onCheckedChange: n,
|
|
1345
|
-
className: t("arc-switch",
|
|
1418
|
+
className: t("arc-switch", nt({
|
|
1346
1419
|
variant: i,
|
|
1347
1420
|
disabled: r
|
|
1348
1421
|
})),
|
|
1349
1422
|
...o,
|
|
1350
1423
|
children: a ? a(e) : /* @__PURE__ */ f(be.Thumb, {
|
|
1351
1424
|
"aria-hidden": "true",
|
|
1352
|
-
className:
|
|
1425
|
+
className: rt({
|
|
1353
1426
|
variant: i,
|
|
1354
1427
|
checked: e,
|
|
1355
1428
|
disabled: r
|
|
1356
1429
|
})
|
|
1357
1430
|
})
|
|
1358
|
-
}),
|
|
1431
|
+
}), nt = e("relative inline-flex h-7 w-12 items-center rounded-full border border-border bg-muted transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 hover:not-data-disabled:ring-2 hover:not-data-disabled:ring-ring/60 data-disabled:cursor-not-allowed data-disabled:opacity-60", { variants: {
|
|
1359
1432
|
variant: {
|
|
1360
1433
|
danger: "data-checked:bg-destructive",
|
|
1361
1434
|
success: "data-checked:bg-success",
|
|
@@ -1366,7 +1439,7 @@ var $e = ({ className: e, href: n, text: r, target: i = "_blank", rel: a, ...o }
|
|
|
1366
1439
|
true: "ring-2 ring-border",
|
|
1367
1440
|
false: ""
|
|
1368
1441
|
}
|
|
1369
|
-
} }),
|
|
1442
|
+
} }), rt = e("absolute top-1/2 inline-block h-5 w-5 -translate-y-1/2 transform rounded-full border shadow-sm transition-[left,background-color,border-color] duration-300 ease-out", {
|
|
1370
1443
|
variants: {
|
|
1371
1444
|
variant: {
|
|
1372
1445
|
primary: "",
|
|
@@ -1459,11 +1532,11 @@ var $e = ({ className: e, href: n, text: r, target: i = "_blank", rel: a, ...o }
|
|
|
1459
1532
|
className: "border-success bg-success/70"
|
|
1460
1533
|
}
|
|
1461
1534
|
]
|
|
1462
|
-
}),
|
|
1535
|
+
}), Z = {
|
|
1463
1536
|
light: L,
|
|
1464
1537
|
dark: I,
|
|
1465
1538
|
system: F
|
|
1466
|
-
},
|
|
1539
|
+
}, Q = {
|
|
1467
1540
|
light: "Light",
|
|
1468
1541
|
dark: "Dark",
|
|
1469
1542
|
system: "System"
|
|
@@ -1481,31 +1554,31 @@ function ct({ variant: e = "dropdown", showLabel: n = !1 }) {
|
|
|
1481
1554
|
i(st(r));
|
|
1482
1555
|
};
|
|
1483
1556
|
if (e === "toggle") {
|
|
1484
|
-
let e =
|
|
1557
|
+
let e = Z[r], t = st(r);
|
|
1485
1558
|
return /* @__PURE__ */ f("div", {
|
|
1486
1559
|
className: "arc-theme-switcher",
|
|
1487
|
-
children: /* @__PURE__ */ p(
|
|
1560
|
+
children: /* @__PURE__ */ p(q, {
|
|
1488
1561
|
active: at(r),
|
|
1489
1562
|
"aria-label": `Switch to ${t} theme`,
|
|
1490
1563
|
title: `Switch to ${t} theme`,
|
|
1491
1564
|
onClick: a,
|
|
1492
1565
|
className: "w-fit gap-3",
|
|
1493
|
-
children: [/* @__PURE__ */ f(e, { "aria-hidden": "true" }), n &&
|
|
1566
|
+
children: [/* @__PURE__ */ f(e, { "aria-hidden": "true" }), n && Q[r]]
|
|
1494
1567
|
})
|
|
1495
1568
|
});
|
|
1496
1569
|
}
|
|
1497
|
-
let s =
|
|
1570
|
+
let s = Z[r];
|
|
1498
1571
|
return /* @__PURE__ */ f("div", {
|
|
1499
1572
|
className: "arc-theme-switcher",
|
|
1500
|
-
children: /* @__PURE__ */ p(
|
|
1573
|
+
children: /* @__PURE__ */ p(J, {
|
|
1501
1574
|
className: "gap-3",
|
|
1502
1575
|
contentClassName: "min-w-(--anchor-width)",
|
|
1503
|
-
buttonText: /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(s, { "aria-hidden": "true" }), n &&
|
|
1576
|
+
buttonText: /* @__PURE__ */ p(d, { children: [/* @__PURE__ */ f(s, { "aria-hidden": "true" }), n && Q[r]] }),
|
|
1504
1577
|
children: [
|
|
1505
|
-
/* @__PURE__ */ f(
|
|
1578
|
+
/* @__PURE__ */ f(J.Item, {
|
|
1506
1579
|
asChild: !0,
|
|
1507
1580
|
className: t("border-0! focus-visible:outline-none", n ? "px-3!" : "justify-center! p-0!"),
|
|
1508
|
-
children: /* @__PURE__ */ p(
|
|
1581
|
+
children: /* @__PURE__ */ p(q, {
|
|
1509
1582
|
active: r === "system",
|
|
1510
1583
|
title: "System Theme",
|
|
1511
1584
|
onClick: () => {
|
|
@@ -1515,13 +1588,13 @@ function ct({ variant: e = "dropdown", showLabel: n = !1 }) {
|
|
|
1515
1588
|
children: [/* @__PURE__ */ f(F, {
|
|
1516
1589
|
className: "size-4",
|
|
1517
1590
|
"aria-hidden": "true"
|
|
1518
|
-
}), n &&
|
|
1591
|
+
}), n && Q.system]
|
|
1519
1592
|
})
|
|
1520
1593
|
}),
|
|
1521
|
-
/* @__PURE__ */ f(
|
|
1594
|
+
/* @__PURE__ */ f(J.Item, {
|
|
1522
1595
|
asChild: !0,
|
|
1523
1596
|
className: t("border-0! focus-visible:outline-none", n ? "px-3!" : "justify-center! p-0!"),
|
|
1524
|
-
children: /* @__PURE__ */ p(
|
|
1597
|
+
children: /* @__PURE__ */ p(q, {
|
|
1525
1598
|
active: r === "light",
|
|
1526
1599
|
title: "Light Theme",
|
|
1527
1600
|
onClick: () => {
|
|
@@ -1531,13 +1604,13 @@ function ct({ variant: e = "dropdown", showLabel: n = !1 }) {
|
|
|
1531
1604
|
children: [/* @__PURE__ */ f(L, {
|
|
1532
1605
|
className: "size-4",
|
|
1533
1606
|
"aria-hidden": "true"
|
|
1534
|
-
}), n &&
|
|
1607
|
+
}), n && Q.light]
|
|
1535
1608
|
})
|
|
1536
1609
|
}),
|
|
1537
|
-
/* @__PURE__ */ f(
|
|
1610
|
+
/* @__PURE__ */ f(J.Item, {
|
|
1538
1611
|
asChild: !0,
|
|
1539
1612
|
className: t("border-0! focus-visible:outline-none", n ? "px-3!" : "justify-center! p-0!"),
|
|
1540
|
-
children: /* @__PURE__ */ p(
|
|
1613
|
+
children: /* @__PURE__ */ p(q, {
|
|
1541
1614
|
active: r === "dark",
|
|
1542
1615
|
title: "Dark Theme",
|
|
1543
1616
|
onClick: () => {
|
|
@@ -1547,7 +1620,7 @@ function ct({ variant: e = "dropdown", showLabel: n = !1 }) {
|
|
|
1547
1620
|
children: [/* @__PURE__ */ f(I, {
|
|
1548
1621
|
className: "size-4",
|
|
1549
1622
|
"aria-hidden": "true"
|
|
1550
|
-
}), n &&
|
|
1623
|
+
}), n && Q.dark]
|
|
1551
1624
|
})
|
|
1552
1625
|
})
|
|
1553
1626
|
]
|
|
@@ -1644,13 +1717,13 @@ function dt({ strings: e, placeholder: t, perTick: n = {
|
|
|
1644
1717
|
O,
|
|
1645
1718
|
v
|
|
1646
1719
|
]);
|
|
1647
|
-
let R = A ? "." : "", z = d !== "clear", B = lt(d),
|
|
1720
|
+
let R = A ? "." : "", z = d !== "clear", B = lt(d), ee = w.reduce((e, t) => e + t.split("\n").length, 0);
|
|
1648
1721
|
return z ? /* @__PURE__ */ f("div", {
|
|
1649
1722
|
ref: (e) => {
|
|
1650
1723
|
M.current = e;
|
|
1651
1724
|
},
|
|
1652
1725
|
className: "arc-typing-animation overflow-hidden",
|
|
1653
|
-
style: { "--typing-roll-offset":
|
|
1726
|
+
style: { "--typing-roll-offset": ee },
|
|
1654
1727
|
children: /* @__PURE__ */ p("div", {
|
|
1655
1728
|
className: "whitespace-pre-line",
|
|
1656
1729
|
children: [
|
|
@@ -1675,7 +1748,7 @@ function dt({ strings: e, placeholder: t, perTick: n = {
|
|
|
1675
1748
|
});
|
|
1676
1749
|
}
|
|
1677
1750
|
// utilities/hash-navigation.ts
|
|
1678
|
-
function
|
|
1751
|
+
function $({ intervalMs: e = 500, maxAttempts: t = 20, behavior: n = "smooth", block: r } = {}) {
|
|
1679
1752
|
if (typeof window > "u") return () => {};
|
|
1680
1753
|
let i = 0, a = setInterval(() => {
|
|
1681
1754
|
i += 1;
|
|
@@ -1693,10 +1766,10 @@ function ft({ intervalMs: e = 500, maxAttempts: t = 20, behavior: n = "smooth",
|
|
|
1693
1766
|
}, e);
|
|
1694
1767
|
return () => clearInterval(a);
|
|
1695
1768
|
}
|
|
1696
|
-
function
|
|
1697
|
-
o(() =>
|
|
1769
|
+
function ft(e) {
|
|
1770
|
+
o(() => $(e), []);
|
|
1698
1771
|
}
|
|
1699
|
-
function
|
|
1772
|
+
function pt({ container: e, sectionIds: t, hashFirstSection: n = !0, onActiveChange: r }) {
|
|
1700
1773
|
let i = t.map((e) => document.getElementById(e)).filter((e) => e !== null), a = window.location.hash.toLowerCase().slice(1) || null, o = () => {
|
|
1701
1774
|
let t = e.getBoundingClientRect(), o = t.top + t.height / 2, s = i.find((e) => {
|
|
1702
1775
|
let t = e.getBoundingClientRect();
|
|
@@ -1708,4 +1781,4 @@ function mt({ container: e, sectionIds: t, hashFirstSection: n = !0, onActiveCha
|
|
|
1708
1781
|
};
|
|
1709
1782
|
return o(), e.addEventListener("scroll", o, { passive: !0 }), () => e.removeEventListener("scroll", o);
|
|
1710
1783
|
}
|
|
1711
|
-
export {
|
|
1784
|
+
export { De as Avatar, V as Button, xe as ButtonGroup, K as Card, Le as DateHandler, Oe as Divider, Ce as DoubleClickButton, ke as Dropdown, H as ErrorText, Ne as GridLoader, G as Input, Re as InputTimestamp, Pe as LabelField, we as LongPressButton, J as Menu, He as Modal, Ue as MultiDropdown, q as Pill, Be as PillLink, W as PreviewCard, Y as Select, tt as Switch, Xe as Table, Ge as Tag, et as TextLink, ct as ThemeSwitcher, dt as TypingAnimation, $ as navigateToHashOnLoad, pt as updateHashOnScroll, ft as useHashNavigationOnLoad };
|
|
@@ -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;
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { DeepKeys, CellContext } from '@tanstack/react-table';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
type TableColumnMeta = {
|
|
4
|
+
headerLabel?: string;
|
|
5
|
+
filterSelectOptions?: {
|
|
6
|
+
value: string;
|
|
7
|
+
label: string;
|
|
8
|
+
}[];
|
|
9
|
+
mobileFullWidth?: boolean;
|
|
10
|
+
};
|
|
11
|
+
export type TableColumnDef<TData extends object = Record<string, unknown>, TValue = unknown> = {
|
|
3
12
|
header: string;
|
|
4
13
|
id?: string;
|
|
5
14
|
enableResizing?: boolean;
|
|
@@ -15,16 +24,49 @@ export type TableColumnDef = {
|
|
|
15
24
|
label: string;
|
|
16
25
|
}[];
|
|
17
26
|
mobileFullWidth?: boolean;
|
|
18
|
-
cell?:
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
27
|
+
cell?: (context: CellContext<typeof features, TData, TValue>) => ReactNode;
|
|
28
|
+
} & ({
|
|
29
|
+
accessorKey: DeepKeys<TData>;
|
|
30
|
+
accessorFn?: never;
|
|
31
|
+
} | {
|
|
32
|
+
accessorKey?: never;
|
|
33
|
+
accessorFn: (row: TData) => TValue;
|
|
34
|
+
id: string;
|
|
35
|
+
});
|
|
36
|
+
export type TableProps<TData extends object = Record<string, unknown>> = {
|
|
37
|
+
data: TData[];
|
|
38
|
+
columnDef: TableColumnDef<TData, any>[];
|
|
23
39
|
pageSize?: number;
|
|
24
40
|
className?: string;
|
|
25
41
|
showHeader?: boolean;
|
|
26
42
|
showFilters?: boolean;
|
|
27
43
|
showSorting?: boolean;
|
|
28
44
|
};
|
|
29
|
-
declare const
|
|
45
|
+
declare const features: {
|
|
46
|
+
columnMeta: TableColumnMeta;
|
|
47
|
+
columnFilteringFeature: import('@tanstack/react-table').TableFeature;
|
|
48
|
+
columnResizingFeature: import('@tanstack/react-table').TableFeature;
|
|
49
|
+
columnSizingFeature: import('@tanstack/react-table').TableFeature;
|
|
50
|
+
columnVisibilityFeature: import('@tanstack/react-table').TableFeature;
|
|
51
|
+
globalFilteringFeature: import('@tanstack/react-table').TableFeature;
|
|
52
|
+
rowPaginationFeature: import('@tanstack/react-table').TableFeature;
|
|
53
|
+
rowSortingFeature: import('@tanstack/react-table').TableFeature;
|
|
54
|
+
filteredRowModel: (table: import('@tanstack/react-table').Table<any, any>) => () => import('@tanstack/react-table').RowModel<any, any>;
|
|
55
|
+
paginatedRowModel: (table: import('@tanstack/react-table').Table<any, any>) => () => import('@tanstack/react-table').RowModel<any, any>;
|
|
56
|
+
sortedRowModel: (table: import('@tanstack/react-table').Table<any, any>) => () => import('@tanstack/react-table').RowModel<any, any>;
|
|
57
|
+
sortFns: {
|
|
58
|
+
alphanumeric: import('@tanstack/react-table').CreatedSortFn<any, any>;
|
|
59
|
+
alphanumericCaseSensitive: import('@tanstack/react-table').CreatedSortFn<any, any>;
|
|
60
|
+
basic: import('@tanstack/react-table').CreatedSortFn<any, any>;
|
|
61
|
+
datetime: import('@tanstack/react-table').CreatedSortFn<any, any>;
|
|
62
|
+
text: import('@tanstack/react-table').CreatedSortFn<any, any>;
|
|
63
|
+
textCaseSensitive: import('@tanstack/react-table').CreatedSortFn<any, any>;
|
|
64
|
+
};
|
|
65
|
+
filterFns: {
|
|
66
|
+
fuzzy: (row: any, columnId: any, value: any, addMeta: any) => boolean;
|
|
67
|
+
includesString: import('@tanstack/react-table').CreatedFilterFn<any, any>;
|
|
68
|
+
select: (row: any, columnId: any, filterValue: any) => boolean;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
declare const Table: <TData extends object = Record<string, unknown>>({ data, columnDef, pageSize, className, showHeader, showFilters, showSorting, }: TableProps<TData>) => import('react').JSX.Element;
|
|
30
72
|
export default Table;
|
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
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@febkosq8/arc",
|
|
3
3
|
"description": "A React components library for febkosq8",
|
|
4
4
|
"private": false,
|
|
5
|
-
"version": "0.8.
|
|
5
|
+
"version": "0.8.4",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/arc.js",
|
|
8
8
|
"types": "./dist/index.d.ts",
|
|
@@ -17,9 +17,21 @@
|
|
|
17
17
|
"dist",
|
|
18
18
|
"components/index.css"
|
|
19
19
|
],
|
|
20
|
+
"author": {
|
|
21
|
+
"name": "Febkosq8",
|
|
22
|
+
"email": "contact@febkosq8.me",
|
|
23
|
+
"url": "https://febkosq8.me"
|
|
24
|
+
},
|
|
25
|
+
"license": "CC-BY-NC-4.0",
|
|
26
|
+
"engines": {
|
|
27
|
+
"node": ">=24.22.1"
|
|
28
|
+
},
|
|
20
29
|
"homepage": "https://www.npmjs.com/package/@febkosq8/arc",
|
|
21
|
-
"repository":
|
|
22
|
-
|
|
30
|
+
"repository": {
|
|
31
|
+
"type": "git",
|
|
32
|
+
"url": "https://github.com/febkosq8/arc.git"
|
|
33
|
+
},
|
|
34
|
+
"packageManager": "pnpm@12.18.0",
|
|
23
35
|
"scripts": {
|
|
24
36
|
"build": "vite build",
|
|
25
37
|
"storybook": "storybook dev -p 6006",
|
|
@@ -34,23 +46,23 @@
|
|
|
34
46
|
},
|
|
35
47
|
"dependencies": {
|
|
36
48
|
"@base-ui/react": "1.9.0",
|
|
37
|
-
"@rinzai/zen": "0.
|
|
49
|
+
"@rinzai/zen": "0.17.0",
|
|
38
50
|
"@tanstack/match-sorter-utils": "9.2.6",
|
|
39
51
|
"@tanstack/react-table": "9.3.1",
|
|
40
52
|
"luxon": "3.7.2",
|
|
41
53
|
"react-icons": "5.7.0"
|
|
42
54
|
},
|
|
43
55
|
"devDependencies": {
|
|
44
|
-
"@storybook/addon-docs": "10.6.
|
|
45
|
-
"@storybook/react-vite": "10.6.
|
|
46
|
-
"@tailwindcss/
|
|
56
|
+
"@storybook/addon-docs": "10.6.6",
|
|
57
|
+
"@storybook/react-vite": "10.6.6",
|
|
58
|
+
"@tailwindcss/vite": "4.3.4",
|
|
47
59
|
"@types/luxon": "3.7.6",
|
|
48
|
-
"@types/node": "26.6.
|
|
60
|
+
"@types/node": "26.6.6",
|
|
49
61
|
"@types/react": "19.3.0",
|
|
50
62
|
"@types/react-dom": "19.3.0",
|
|
51
63
|
"@typescript/typescript6": "6.0.2",
|
|
52
|
-
"@vitejs/plugin-react": "6.1
|
|
53
|
-
"eslint": "10.
|
|
64
|
+
"@vitejs/plugin-react": "6.2.1",
|
|
65
|
+
"eslint": "10.14.0",
|
|
54
66
|
"prettier": "3.9.10",
|
|
55
67
|
"prettier-plugin-css-order": "2.2.0",
|
|
56
68
|
"prettier-plugin-organize-attributes": "1.0.0",
|
|
@@ -58,10 +70,10 @@
|
|
|
58
70
|
"prettier-plugin-tailwindcss": "0.8.1",
|
|
59
71
|
"react": "19.3.1",
|
|
60
72
|
"react-dom": "19.3.1",
|
|
61
|
-
"storybook": "10.6.
|
|
62
|
-
"tailwindcss": "4.3.
|
|
73
|
+
"storybook": "10.6.6",
|
|
74
|
+
"tailwindcss": "4.3.4",
|
|
63
75
|
"typescript": "7.0.2",
|
|
64
76
|
"unplugin-dts": "1.1.2",
|
|
65
|
-
"vite": "8.3.
|
|
77
|
+
"vite": "8.3.6"
|
|
66
78
|
}
|
|
67
79
|
}
|