@febkosq8/arc 0.8.2 → 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 +168 -106
- 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 +1 -1
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
|
@@ -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();
|
|
@@ -507,7 +532,7 @@ J.Header = (e) => {
|
|
|
507
532
|
});
|
|
508
533
|
};
|
|
509
534
|
// utilities/date-handler.ts
|
|
510
|
-
var
|
|
535
|
+
var Ie = 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,8 +590,8 @@ 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 ?
|
|
593
|
+
}, Le = ({ value: e, format: t = "$ISO$ ($RELATIVE$)", ...n }) => {
|
|
594
|
+
let r = c(() => e ? Ie.getFormattedTime(e, t) : "", [e, t]);
|
|
570
595
|
return /* @__PURE__ */ f(q, {
|
|
571
596
|
type: "text",
|
|
572
597
|
disabled: !0,
|
|
@@ -575,12 +600,23 @@ var Fe = class e {
|
|
|
575
600
|
size: Math.max(r.length, 1),
|
|
576
601
|
...n
|
|
577
602
|
});
|
|
578
|
-
},
|
|
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", {
|
|
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,14 +632,25 @@ var Fe = class e {
|
|
|
596
632
|
variant: "pill",
|
|
597
633
|
size: "md"
|
|
598
634
|
}
|
|
599
|
-
}),
|
|
600
|
-
className: t(
|
|
635
|
+
}), ze = ({ active: e = !1, className: n, size: r = "md", variant: i = "pill", ...a }) => /* @__PURE__ */ f("a", {
|
|
636
|
+
className: t(Re({
|
|
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
|
|
@@ -612,7 +659,7 @@ var Fe = class e {
|
|
|
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
|
+
}), 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, {
|
|
616
663
|
loopFocus: !0,
|
|
617
664
|
children: [/* @__PURE__ */ p(M.Trigger, {
|
|
618
665
|
render: /* @__PURE__ */ f(Y, {
|
|
@@ -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(Be, { 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(Be, { children: i })
|
|
674
721
|
})
|
|
675
722
|
}) })]
|
|
676
723
|
});
|
|
677
724
|
}
|
|
678
|
-
}),
|
|
725
|
+
}), Ve = ({ 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
|
+
})), 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 }) => {
|
|
718
765
|
let h = n.filter((e) => r?.includes(String(e.key)));
|
|
719
766
|
return /* @__PURE__ */ f(m.Root, {
|
|
720
767
|
multiple: !0,
|
|
@@ -846,33 +893,48 @@ var Fe = class e {
|
|
|
846
893
|
})
|
|
847
894
|
})
|
|
848
895
|
}) })]
|
|
849
|
-
}),
|
|
850
|
-
variants: {
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
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({
|
|
861
922
|
variant: n,
|
|
923
|
+
size: r,
|
|
862
924
|
className: e
|
|
863
925
|
})),
|
|
864
|
-
...
|
|
865
|
-
}),
|
|
926
|
+
...i
|
|
927
|
+
}), Ge = (e, t, n, r) => {
|
|
866
928
|
let i = e.getValue(t), a = V(i, n);
|
|
867
929
|
return r({ itemRank: a }), a.passed;
|
|
868
930
|
}, Q = {
|
|
869
|
-
fuzzy:
|
|
931
|
+
fuzzy: Ge,
|
|
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
|
+
}, Ke = ve({
|
|
876
938
|
columnMeta: {},
|
|
877
939
|
columnFilteringFeature: ee,
|
|
878
940
|
columnResizingFeature: te,
|
|
@@ -894,21 +956,21 @@ var Fe = class e {
|
|
|
894
956
|
},
|
|
895
957
|
filterFns: Q
|
|
896
958
|
});
|
|
897
|
-
function
|
|
959
|
+
function qe(e) {
|
|
898
960
|
return Object.prototype.hasOwnProperty.call(Q, e);
|
|
899
961
|
}
|
|
900
|
-
function
|
|
962
|
+
function Je(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" ||
|
|
965
|
+
if (typeof e == "function" || e === "auto" || qe(e)) return e;
|
|
904
966
|
throw Error(`Unsupported table filterFn "${e}". Use "auto" or one of: ${Object.keys(Q).join(", ")}.`);
|
|
905
967
|
}
|
|
906
968
|
}
|
|
907
|
-
var
|
|
969
|
+
var Ye = ie(), 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) =>
|
|
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, {
|
|
912
974
|
id: e.id,
|
|
913
975
|
enableResizing: e.enableResizing,
|
|
914
976
|
enableColumnFilter: e.filterFn !== !1 && e.enableColumnFilter,
|
|
@@ -917,7 +979,7 @@ var Je = ie(), Ye = ({ data: e, columnDef: n, pageSize: r = 10, className: i, sh
|
|
|
917
979
|
size: e.size,
|
|
918
980
|
minSize: e.minSize ?? 50,
|
|
919
981
|
maxSize: e.maxSize ?? 1e3,
|
|
920
|
-
filterFn:
|
|
982
|
+
filterFn: Je(e.filterFn, e.filterSelectOptions),
|
|
921
983
|
meta: {
|
|
922
984
|
headerLabel: e.header,
|
|
923
985
|
filterSelectOptions: e.filterSelectOptions,
|
|
@@ -961,8 +1023,8 @@ var Je = ie(), Ye = ({ data: e, columnDef: n, pageSize: r = 10, className: i, sh
|
|
|
961
1023
|
onSortingChange: k,
|
|
962
1024
|
onColumnFiltersChange: w,
|
|
963
1025
|
onGlobalFilterChange: D,
|
|
964
|
-
globalFilterFn:
|
|
965
|
-
features:
|
|
1026
|
+
globalFilterFn: Ge,
|
|
1027
|
+
features: Ke,
|
|
966
1028
|
defaultColumn: {
|
|
967
1029
|
size: 200,
|
|
968
1030
|
minSize: 50,
|
|
@@ -987,7 +1049,7 @@ var Je = ie(), Ye = ({ data: e, columnDef: n, pageSize: r = 10, className: i, sh
|
|
|
987
1049
|
title: "Clear filters and sorting",
|
|
988
1050
|
type: "button",
|
|
989
1051
|
children: [/* @__PURE__ */ f(E, { className: "mr-1.5 h-3 w-3" }), "Clear filters and sorting"]
|
|
990
|
-
}), /* @__PURE__ */ f(
|
|
1052
|
+
}), /* @__PURE__ */ f($e, { table: P })]
|
|
991
1053
|
}),
|
|
992
1054
|
/* @__PURE__ */ p("nav", {
|
|
993
1055
|
"aria-label": "Table pagination",
|
|
@@ -1179,7 +1241,7 @@ var Je = ie(), Ye = ({ data: e, columnDef: n, pageSize: r = 10, className: i, sh
|
|
|
1179
1241
|
htmlFor: n,
|
|
1180
1242
|
className: "text-muted-foreground mb-1 block text-xs font-medium",
|
|
1181
1243
|
children: t
|
|
1182
|
-
}), /* @__PURE__ */ f(
|
|
1244
|
+
}), /* @__PURE__ */ f(Qe, {
|
|
1183
1245
|
column: e,
|
|
1184
1246
|
idPrefix: `${d}-`
|
|
1185
1247
|
})]
|
|
@@ -1249,7 +1311,7 @@ var Je = ie(), Ye = ({ data: e, columnDef: n, pageSize: r = 10, className: i, sh
|
|
|
1249
1311
|
]
|
|
1250
1312
|
});
|
|
1251
1313
|
};
|
|
1252
|
-
function
|
|
1314
|
+
function Ze({ value: e, onChange: t, debounce: n = 500, ...r }) {
|
|
1253
1315
|
let [i, a] = u(e);
|
|
1254
1316
|
return o(() => {
|
|
1255
1317
|
a(e);
|
|
@@ -1269,7 +1331,7 @@ function Xe({ value: e, onChange: t, debounce: n = 500, ...r }) {
|
|
|
1269
1331
|
autoComplete: "off"
|
|
1270
1332
|
});
|
|
1271
1333
|
}
|
|
1272
|
-
function
|
|
1334
|
+
function Qe({ column: e, idPrefix: t = "" }) {
|
|
1273
1335
|
let n = `${t}${e.id}-filter`, r = {
|
|
1274
1336
|
includesString: "Includes string",
|
|
1275
1337
|
equalsString: "Equals string",
|
|
@@ -1289,7 +1351,7 @@ function Ze({ column: e, idPrefix: t = "" }) {
|
|
|
1289
1351
|
key: e.value,
|
|
1290
1352
|
label: e.label
|
|
1291
1353
|
}))]
|
|
1292
|
-
}) : /* @__PURE__ */ f(
|
|
1354
|
+
}) : /* @__PURE__ */ f(Ze, {
|
|
1293
1355
|
id: n,
|
|
1294
1356
|
type: "text",
|
|
1295
1357
|
name: e.id,
|
|
@@ -1300,7 +1362,7 @@ function Ze({ column: e, idPrefix: t = "" }) {
|
|
|
1300
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"
|
|
1301
1363
|
});
|
|
1302
1364
|
}
|
|
1303
|
-
function
|
|
1365
|
+
function $e({ table: e }) {
|
|
1304
1366
|
return /* @__PURE__ */ p(K, {
|
|
1305
1367
|
trigger: "click",
|
|
1306
1368
|
triggerRender: /* @__PURE__ */ f(H, {
|
|
@@ -1331,31 +1393,31 @@ function Qe({ table: e }) {
|
|
|
1331
1393
|
});
|
|
1332
1394
|
}
|
|
1333
1395
|
// components/text-link.tsx
|
|
1334
|
-
var
|
|
1396
|
+
var et = ({ className: e, href: n, text: r, target: i = "_blank", rel: a, ...o }) => /* @__PURE__ */ f("a", {
|
|
1335
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),
|
|
1336
1398
|
href: n,
|
|
1337
1399
|
target: i,
|
|
1338
1400
|
rel: a ?? (i === "_blank" ? "noopener noreferrer" : void 0),
|
|
1339
1401
|
...o,
|
|
1340
1402
|
children: r
|
|
1341
|
-
}),
|
|
1403
|
+
}), tt = ({ checked: e = !1, onChange: n, disabled: r = !1, variant: i = "primary", children: a, ...o }) => /* @__PURE__ */ f(be.Root, {
|
|
1342
1404
|
checked: e,
|
|
1343
1405
|
disabled: r,
|
|
1344
1406
|
onCheckedChange: n,
|
|
1345
|
-
className: t("arc-switch",
|
|
1407
|
+
className: t("arc-switch", nt({
|
|
1346
1408
|
variant: i,
|
|
1347
1409
|
disabled: r
|
|
1348
1410
|
})),
|
|
1349
1411
|
...o,
|
|
1350
1412
|
children: a ? a(e) : /* @__PURE__ */ f(be.Thumb, {
|
|
1351
1413
|
"aria-hidden": "true",
|
|
1352
|
-
className:
|
|
1414
|
+
className: rt({
|
|
1353
1415
|
variant: i,
|
|
1354
1416
|
checked: e,
|
|
1355
1417
|
disabled: r
|
|
1356
1418
|
})
|
|
1357
1419
|
})
|
|
1358
|
-
}),
|
|
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: {
|
|
1359
1421
|
variant: {
|
|
1360
1422
|
danger: "data-checked:bg-destructive",
|
|
1361
1423
|
success: "data-checked:bg-success",
|
|
@@ -1366,7 +1428,7 @@ var $e = ({ className: e, href: n, text: r, target: i = "_blank", rel: a, ...o }
|
|
|
1366
1428
|
true: "ring-2 ring-border",
|
|
1367
1429
|
false: ""
|
|
1368
1430
|
}
|
|
1369
|
-
} }),
|
|
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", {
|
|
1370
1432
|
variants: {
|
|
1371
1433
|
variant: {
|
|
1372
1434
|
primary: "",
|
|
@@ -1459,7 +1521,7 @@ var $e = ({ className: e, href: n, text: r, target: i = "_blank", rel: a, ...o }
|
|
|
1459
1521
|
className: "border-success bg-success/70"
|
|
1460
1522
|
}
|
|
1461
1523
|
]
|
|
1462
|
-
}),
|
|
1524
|
+
}), it = {
|
|
1463
1525
|
light: L,
|
|
1464
1526
|
dark: I,
|
|
1465
1527
|
system: F
|
|
@@ -1467,25 +1529,25 @@ var $e = ({ className: e, href: n, text: r, target: i = "_blank", rel: a, ...o }
|
|
|
1467
1529
|
light: "Light",
|
|
1468
1530
|
dark: "Dark",
|
|
1469
1531
|
system: "System"
|
|
1470
|
-
},
|
|
1532
|
+
}, at = "theme", ot = (e) => e === "dark" || e === "system" && typeof window < "u" && window.matchMedia("(prefers-color-scheme: dark)").matches, st = () => {
|
|
1471
1533
|
if (typeof window > "u") return "system";
|
|
1472
|
-
let e = window.localStorage.getItem(
|
|
1534
|
+
let e = window.localStorage.getItem(at);
|
|
1473
1535
|
return e === "light" || e === "dark" || e === "system" ? e : "system";
|
|
1474
|
-
},
|
|
1475
|
-
function
|
|
1476
|
-
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);
|
|
1477
1539
|
o(() => {
|
|
1478
|
-
typeof window < "u" && (document.documentElement.classList.toggle("dark",
|
|
1540
|
+
typeof window < "u" && (document.documentElement.classList.toggle("dark", ot(r)), window.localStorage.setItem(at, r));
|
|
1479
1541
|
}, [r]);
|
|
1480
1542
|
let a = () => {
|
|
1481
|
-
i(
|
|
1543
|
+
i(ct(r));
|
|
1482
1544
|
};
|
|
1483
1545
|
if (e === "toggle") {
|
|
1484
|
-
let e =
|
|
1546
|
+
let e = it[r], t = ct(r);
|
|
1485
1547
|
return /* @__PURE__ */ f("div", {
|
|
1486
1548
|
className: "arc-theme-switcher",
|
|
1487
1549
|
children: /* @__PURE__ */ p(Y, {
|
|
1488
|
-
active:
|
|
1550
|
+
active: ot(r),
|
|
1489
1551
|
"aria-label": `Switch to ${t} theme`,
|
|
1490
1552
|
title: `Switch to ${t} theme`,
|
|
1491
1553
|
onClick: a,
|
|
@@ -1494,7 +1556,7 @@ function ct({ variant: e = "dropdown", showLabel: n = !1 }) {
|
|
|
1494
1556
|
})
|
|
1495
1557
|
});
|
|
1496
1558
|
}
|
|
1497
|
-
let s =
|
|
1559
|
+
let s = it[r];
|
|
1498
1560
|
return /* @__PURE__ */ f("div", {
|
|
1499
1561
|
className: "arc-theme-switcher",
|
|
1500
1562
|
children: /* @__PURE__ */ p(X, {
|
|
@@ -1555,16 +1617,16 @@ function ct({ variant: e = "dropdown", showLabel: n = !1 }) {
|
|
|
1555
1617
|
});
|
|
1556
1618
|
}
|
|
1557
1619
|
// components/typing-animation.tsx
|
|
1558
|
-
function
|
|
1620
|
+
function ut(e) {
|
|
1559
1621
|
return e === "newline" ? "\n" : e === "comma" ? ", " : "";
|
|
1560
1622
|
}
|
|
1561
|
-
function
|
|
1623
|
+
function dt(e, t, n, r, i) {
|
|
1562
1624
|
if (r === "character") return Math.max(0, Math.min(e.length, t + n * i));
|
|
1563
1625
|
let a = [...e.matchAll(/\S+\s*/g)].map((e) => e.index + e[0].length), o = t;
|
|
1564
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;
|
|
1565
1627
|
return o;
|
|
1566
1628
|
}
|
|
1567
|
-
function
|
|
1629
|
+
function ft({ strings: e, placeholder: t, perTick: n = {
|
|
1568
1630
|
amount: 1,
|
|
1569
1631
|
unit: "character"
|
|
1570
1632
|
}, msDelay: r = {
|
|
@@ -1609,9 +1671,9 @@ function dt({ strings: e, placeholder: t, perTick: n = {
|
|
|
1609
1671
|
T([]), C(""), N.current += 1, P.current = 0, t = setTimeout(r, _);
|
|
1610
1672
|
return;
|
|
1611
1673
|
}
|
|
1612
|
-
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);
|
|
1613
1675
|
else {
|
|
1614
|
-
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) {
|
|
1615
1677
|
k(!0);
|
|
1616
1678
|
return;
|
|
1617
1679
|
}
|
|
@@ -1644,7 +1706,7 @@ function dt({ strings: e, placeholder: t, perTick: n = {
|
|
|
1644
1706
|
O,
|
|
1645
1707
|
v
|
|
1646
1708
|
]);
|
|
1647
|
-
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);
|
|
1648
1710
|
return z ? /* @__PURE__ */ f("div", {
|
|
1649
1711
|
ref: (e) => {
|
|
1650
1712
|
M.current = e;
|
|
@@ -1675,7 +1737,7 @@ function dt({ strings: e, placeholder: t, perTick: n = {
|
|
|
1675
1737
|
});
|
|
1676
1738
|
}
|
|
1677
1739
|
// utilities/hash-navigation.ts
|
|
1678
|
-
function
|
|
1740
|
+
function pt({ intervalMs: e = 500, maxAttempts: t = 20, behavior: n = "smooth", block: r } = {}) {
|
|
1679
1741
|
if (typeof window > "u") return () => {};
|
|
1680
1742
|
let i = 0, a = setInterval(() => {
|
|
1681
1743
|
i += 1;
|
|
@@ -1693,10 +1755,10 @@ function ft({ intervalMs: e = 500, maxAttempts: t = 20, behavior: n = "smooth",
|
|
|
1693
1755
|
}, e);
|
|
1694
1756
|
return () => clearInterval(a);
|
|
1695
1757
|
}
|
|
1696
|
-
function
|
|
1697
|
-
o(() =>
|
|
1758
|
+
function mt(e) {
|
|
1759
|
+
o(() => pt(e), []);
|
|
1698
1760
|
}
|
|
1699
|
-
function
|
|
1761
|
+
function ht({ container: e, sectionIds: t, hashFirstSection: n = !0, onActiveChange: r }) {
|
|
1700
1762
|
let i = t.map((e) => document.getElementById(e)).filter((e) => e !== null), a = window.location.hash.toLowerCase().slice(1) || null, o = () => {
|
|
1701
1763
|
let t = e.getBoundingClientRect(), o = t.top + t.height / 2, s = i.find((e) => {
|
|
1702
1764
|
let t = e.getBoundingClientRect();
|
|
@@ -1708,4 +1770,4 @@ function mt({ container: e, sectionIds: t, hashFirstSection: n = !0, onActiveCha
|
|
|
1708
1770
|
};
|
|
1709
1771
|
return o(), e.addEventListener("scroll", o, { passive: !0 }), () => e.removeEventListener("scroll", o);
|
|
1710
1772
|
}
|
|
1711
|
-
export {
|
|
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;
|