@spawn-llc/design-system 1.1.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-227VGN2D.js +617 -0
- package/dist/chunk-2UK4FHS3.js +31 -0
- package/dist/chunk-36NOAJFW.js +53 -0
- package/dist/chunk-3EZ5FFYG.js +154 -0
- package/dist/chunk-3PN2XMRA.js +80 -0
- package/dist/chunk-3SLZRFKQ.js +107 -0
- package/dist/chunk-4ABNKOPC.js +18 -0
- package/dist/chunk-4IKPZU4X.js +34 -0
- package/dist/chunk-5YRMB7KW.js +31 -0
- package/dist/chunk-66R4755B.js +37 -0
- package/dist/chunk-ATBQXQM7.js +165 -0
- package/dist/chunk-AUWFUYJI.js +79 -0
- package/dist/chunk-BTGJV2P6.js +237 -0
- package/dist/chunk-BYJWYU66.js +95 -0
- package/dist/chunk-D6UXXTC6.js +18 -0
- package/dist/chunk-DFVSGTAN.js +24 -0
- package/dist/chunk-DQ52UWO2.js +28 -0
- package/dist/chunk-DXXFNPYR.js +20 -0
- package/dist/chunk-GBPD3QPO.js +60 -0
- package/dist/chunk-GHSVAEXO.js +227 -0
- package/dist/chunk-GQIUVLXP.js +42 -0
- package/dist/chunk-HG4AEMA5.js +74 -0
- package/dist/chunk-HK6P54FZ.js +139 -0
- package/dist/chunk-HSP43BHH.js +97 -0
- package/dist/chunk-HYBBZTLY.js +1 -0
- package/dist/chunk-IS2ZVRUW.js +186 -0
- package/dist/chunk-JSULEEYQ.js +9 -0
- package/dist/chunk-K46NYJUT.js +15 -0
- package/dist/chunk-L5SMHZJL.js +162 -0
- package/dist/chunk-LPPLLYOR.js +185 -0
- package/dist/chunk-LYDG55X2.js +194 -0
- package/dist/chunk-MLC45YHE.js +122 -0
- package/dist/chunk-MZEY2L46.js +186 -0
- package/dist/chunk-N34HFTEJ.js +22 -0
- package/dist/chunk-PPW4C342.js +232 -0
- package/dist/chunk-PZCXY6QZ.js +208 -0
- package/dist/chunk-Q3HD7YQZ.js +261 -0
- package/dist/chunk-QF7LZKLC.js +98 -0
- package/dist/chunk-QNUAUOJW.js +15 -0
- package/dist/chunk-QZSQXEOU.js +28 -0
- package/dist/chunk-RBTFEYGV.js +77 -0
- package/dist/chunk-SJMEO63M.js +116 -0
- package/dist/chunk-T6DWCVR3.js +73 -0
- package/dist/chunk-T7GS4AXQ.js +245 -0
- package/dist/chunk-TP35WWVP.js +46 -0
- package/dist/chunk-TQ6CJZMT.js +42 -0
- package/dist/chunk-U7N2A7A3.js +9 -0
- package/dist/chunk-V3NRC7QE.js +142 -0
- package/dist/chunk-VOHNOSMH.js +22 -0
- package/dist/chunk-W3PHWPYP.js +43 -0
- package/dist/chunk-WJ6DNG2Z.js +75 -0
- package/dist/chunk-WMXCMDSQ.js +126 -0
- package/dist/chunk-WSNSTJAR.js +58 -0
- package/dist/chunk-XG3HHC3U.js +79 -0
- package/dist/chunk-XOLQ37I2.js +118 -0
- package/dist/chunk-YFPY5SLS.js +19 -0
- package/dist/chunk-YFVERFQA.js +76 -0
- package/dist/chunk-YL4VCJKF.js +75 -0
- package/dist/chunk-ZMHTPZVQ.js +61 -0
- package/dist/chunk-ZO74KVH3.js +38 -0
- package/dist/components/ui/accordion.d.ts +9 -0
- package/dist/components/ui/accordion.js +3 -0
- package/dist/components/ui/alert-dialog.d.ts +24 -0
- package/dist/components/ui/alert-dialog.js +5 -0
- package/dist/components/ui/alert.d.ts +13 -0
- package/dist/components/ui/alert.js +3 -0
- package/dist/components/ui/aspect-ratio.d.ts +7 -0
- package/dist/components/ui/aspect-ratio.js +3 -0
- package/dist/components/ui/avatar.d.ts +13 -0
- package/dist/components/ui/avatar.js +3 -0
- package/dist/components/ui/badge.d.ts +11 -0
- package/dist/components/ui/badge.js +3 -0
- package/dist/components/ui/breadcrumb.d.ts +12 -0
- package/dist/components/ui/breadcrumb.js +3 -0
- package/dist/components/ui/button-group.d.ts +15 -0
- package/dist/components/ui/button-group.js +4 -0
- package/dist/components/ui/button.d.ts +9 -0
- package/dist/components/ui/button.js +4 -0
- package/dist/components/ui/calendar.d.ts +16 -0
- package/dist/components/ui/calendar.js +5 -0
- package/dist/components/ui/card.d.ts +13 -0
- package/dist/components/ui/card.js +3 -0
- package/dist/components/ui/carousel.d.ts +34 -0
- package/dist/components/ui/carousel.js +5 -0
- package/dist/components/ui/chart.d.ts +46 -0
- package/dist/components/ui/chart.js +3 -0
- package/dist/components/ui/checkbox.d.ts +6 -0
- package/dist/components/ui/checkbox.js +3 -0
- package/dist/components/ui/collapsible.d.ts +8 -0
- package/dist/components/ui/collapsible.js +2 -0
- package/dist/components/ui/combobox.d.ts +26 -0
- package/dist/components/ui/combobox.js +8 -0
- package/dist/components/ui/command.d.ts +22 -0
- package/dist/components/ui/command.js +9 -0
- package/dist/components/ui/context-menu.d.ts +31 -0
- package/dist/components/ui/context-menu.js +3 -0
- package/dist/components/ui/dialog.d.ts +19 -0
- package/dist/components/ui/dialog.js +5 -0
- package/dist/components/ui/direction.d.ts +1 -0
- package/dist/components/ui/direction.js +2 -0
- package/dist/components/ui/drawer.d.ts +15 -0
- package/dist/components/ui/drawer.js +3 -0
- package/dist/components/ui/dropdown-menu.d.ts +31 -0
- package/dist/components/ui/dropdown-menu.js +3 -0
- package/dist/components/ui/empty.d.ts +15 -0
- package/dist/components/ui/empty.js +3 -0
- package/dist/components/ui/field.d.ts +28 -0
- package/dist/components/ui/field.js +5 -0
- package/dist/components/ui/hover-card.d.ts +8 -0
- package/dist/components/ui/hover-card.js +3 -0
- package/dist/components/ui/input-group.d.ts +23 -0
- package/dist/components/ui/input-group.js +7 -0
- package/dist/components/ui/input-otp.d.ts +13 -0
- package/dist/components/ui/input-otp.js +3 -0
- package/dist/components/ui/input.d.ts +5 -0
- package/dist/components/ui/input.js +3 -0
- package/dist/components/ui/item.d.ts +26 -0
- package/dist/components/ui/item.js +4 -0
- package/dist/components/ui/kbd.d.ts +6 -0
- package/dist/components/ui/kbd.js +3 -0
- package/dist/components/ui/label.d.ts +5 -0
- package/dist/components/ui/label.js +3 -0
- package/dist/components/ui/logo.d.ts +17 -0
- package/dist/components/ui/logo.js +3 -0
- package/dist/components/ui/menubar.d.ts +31 -0
- package/dist/components/ui/menubar.js +4 -0
- package/dist/components/ui/native-select.d.ts +10 -0
- package/dist/components/ui/native-select.js +3 -0
- package/dist/components/ui/navigation-menu.d.ts +15 -0
- package/dist/components/ui/navigation-menu.js +3 -0
- package/dist/components/ui/pagination.d.ts +23 -0
- package/dist/components/ui/pagination.js +5 -0
- package/dist/components/ui/popover.d.ts +11 -0
- package/dist/components/ui/popover.js +3 -0
- package/dist/components/ui/progress.d.ts +10 -0
- package/dist/components/ui/progress.js +3 -0
- package/dist/components/ui/radio-group.d.ts +8 -0
- package/dist/components/ui/radio-group.js +3 -0
- package/dist/components/ui/resizable.d.ts +10 -0
- package/dist/components/ui/resizable.js +3 -0
- package/dist/components/ui/scroll-area.d.ts +7 -0
- package/dist/components/ui/scroll-area.js +3 -0
- package/dist/components/ui/select.d.ts +17 -0
- package/dist/components/ui/select.js +3 -0
- package/dist/components/ui/separator.d.ts +6 -0
- package/dist/components/ui/separator.js +3 -0
- package/dist/components/ui/sheet.d.ts +16 -0
- package/dist/components/ui/sheet.js +5 -0
- package/dist/components/ui/sidebar.d.ts +70 -0
- package/dist/components/ui/sidebar.js +11 -0
- package/dist/components/ui/skeleton.d.ts +5 -0
- package/dist/components/ui/skeleton.js +3 -0
- package/dist/components/ui/slider.d.ts +6 -0
- package/dist/components/ui/slider.js +3 -0
- package/dist/components/ui/sonner.d.ts +6 -0
- package/dist/components/ui/sonner.js +2 -0
- package/dist/components/ui/spinner.d.ts +5 -0
- package/dist/components/ui/spinner.js +3 -0
- package/dist/components/ui/switch.d.ts +8 -0
- package/dist/components/ui/switch.js +3 -0
- package/dist/components/ui/table.d.ts +12 -0
- package/dist/components/ui/table.js +3 -0
- package/dist/components/ui/tabs.d.ts +14 -0
- package/dist/components/ui/tabs.js +3 -0
- package/dist/components/ui/textarea.d.ts +5 -0
- package/dist/components/ui/textarea.js +3 -0
- package/dist/components/ui/toggle-group.d.ts +14 -0
- package/dist/components/ui/toggle-group.js +4 -0
- package/dist/components/ui/toggle.d.ts +12 -0
- package/dist/components/ui/toggle.js +3 -0
- package/dist/components/ui/tooltip.d.ts +9 -0
- package/dist/components/ui/tooltip.js +3 -0
- package/dist/hooks/use-mobile.d.ts +3 -0
- package/dist/hooks/use-mobile.js +2 -0
- package/dist/index.d.ts +98 -640
- package/dist/index.js +60 -5573
- package/dist/lib/button-variants.d.ts +17 -0
- package/dist/lib/button-variants.js +1 -0
- package/dist/lib/contrast.d.ts +9 -0
- package/dist/lib/contrast.js +1 -0
- package/dist/lib/utils.d.ts +5 -0
- package/dist/lib/utils.js +1 -0
- package/dist/styles.css +1 -1
- package/dist/variants.d.ts +3 -0
- package/dist/variants.js +1 -0
- package/package.json +13 -5
- /package/dist/{tokens.d.ts → tokens.generated.d.ts} +0 -0
- /package/dist/{tokens.js → tokens.generated.js} +0 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { cn } from './chunk-U7N2A7A3.js';
|
|
2
|
+
import { Avatar as Avatar$1 } from '@base-ui/react/avatar';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
function Avatar({
|
|
6
|
+
className,
|
|
7
|
+
size = "default",
|
|
8
|
+
...props
|
|
9
|
+
}) {
|
|
10
|
+
return /* @__PURE__ */ jsx(
|
|
11
|
+
Avatar$1.Root,
|
|
12
|
+
{
|
|
13
|
+
"data-slot": "avatar",
|
|
14
|
+
"data-size": size,
|
|
15
|
+
className: cn(
|
|
16
|
+
"group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten",
|
|
17
|
+
className
|
|
18
|
+
),
|
|
19
|
+
...props
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
function AvatarImage({ className, ...props }) {
|
|
24
|
+
return /* @__PURE__ */ jsx(
|
|
25
|
+
Avatar$1.Image,
|
|
26
|
+
{
|
|
27
|
+
"data-slot": "avatar-image",
|
|
28
|
+
className: cn(
|
|
29
|
+
"aspect-square size-full rounded-full object-cover",
|
|
30
|
+
className
|
|
31
|
+
),
|
|
32
|
+
...props
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
function AvatarFallback({
|
|
37
|
+
className,
|
|
38
|
+
...props
|
|
39
|
+
}) {
|
|
40
|
+
return /* @__PURE__ */ jsx(
|
|
41
|
+
Avatar$1.Fallback,
|
|
42
|
+
{
|
|
43
|
+
"data-slot": "avatar-fallback",
|
|
44
|
+
className: cn(
|
|
45
|
+
"flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",
|
|
46
|
+
className
|
|
47
|
+
),
|
|
48
|
+
...props
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
function AvatarBadge({ className, ...props }) {
|
|
53
|
+
return /* @__PURE__ */ jsx(
|
|
54
|
+
"span",
|
|
55
|
+
{
|
|
56
|
+
"data-slot": "avatar-badge",
|
|
57
|
+
className: cn(
|
|
58
|
+
"absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground bg-blend-color ring-2 ring-background select-none",
|
|
59
|
+
"group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden",
|
|
60
|
+
"group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2",
|
|
61
|
+
"group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2",
|
|
62
|
+
className
|
|
63
|
+
),
|
|
64
|
+
...props
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
function AvatarGroup({ className, ...props }) {
|
|
69
|
+
return /* @__PURE__ */ jsx(
|
|
70
|
+
"div",
|
|
71
|
+
{
|
|
72
|
+
"data-slot": "avatar-group",
|
|
73
|
+
className: cn(
|
|
74
|
+
"group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background",
|
|
75
|
+
className
|
|
76
|
+
),
|
|
77
|
+
...props
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
function AvatarGroupCount({
|
|
82
|
+
className,
|
|
83
|
+
...props
|
|
84
|
+
}) {
|
|
85
|
+
return /* @__PURE__ */ jsx(
|
|
86
|
+
"div",
|
|
87
|
+
{
|
|
88
|
+
"data-slot": "avatar-group-count",
|
|
89
|
+
className: cn(
|
|
90
|
+
"relative flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-sm text-muted-foreground ring-2 ring-background group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3",
|
|
91
|
+
className
|
|
92
|
+
),
|
|
93
|
+
...props
|
|
94
|
+
}
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export { Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { cn } from './chunk-U7N2A7A3.js';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
function Skeleton({ className, ...props }) {
|
|
5
|
+
return /* @__PURE__ */ jsx(
|
|
6
|
+
"div",
|
|
7
|
+
{
|
|
8
|
+
"data-slot": "skeleton",
|
|
9
|
+
className: cn("animate-pulse rounded-md bg-muted", className),
|
|
10
|
+
...props
|
|
11
|
+
}
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export { Skeleton };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { cn } from './chunk-U7N2A7A3.js';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
function Kbd({ className, ...props }) {
|
|
5
|
+
return /* @__PURE__ */ jsx(
|
|
6
|
+
"kbd",
|
|
7
|
+
{
|
|
8
|
+
"data-slot": "kbd",
|
|
9
|
+
className: cn(
|
|
10
|
+
"pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 [&_svg:not([class*='size-'])]:size-3",
|
|
11
|
+
className
|
|
12
|
+
),
|
|
13
|
+
...props
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
function KbdGroup({ className, ...props }) {
|
|
18
|
+
return /* @__PURE__ */ jsx(
|
|
19
|
+
"kbd",
|
|
20
|
+
{
|
|
21
|
+
"data-slot": "kbd-group",
|
|
22
|
+
className: cn("inline-flex items-center gap-1", className),
|
|
23
|
+
...props
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export { Kbd, KbdGroup };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { cn } from './chunk-U7N2A7A3.js';
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
|
|
4
|
+
function LogoMark({
|
|
5
|
+
height,
|
|
6
|
+
a,
|
|
7
|
+
b
|
|
8
|
+
}) {
|
|
9
|
+
return /* @__PURE__ */ jsxs(
|
|
10
|
+
"svg",
|
|
11
|
+
{
|
|
12
|
+
viewBox: "0 0 99.9 81.1",
|
|
13
|
+
height,
|
|
14
|
+
width: height * (99.9 / 81.1),
|
|
15
|
+
"aria-hidden": "true",
|
|
16
|
+
focusable: "false",
|
|
17
|
+
style: { display: "block", flexShrink: 0 },
|
|
18
|
+
children: [
|
|
19
|
+
/* @__PURE__ */ jsx("rect", { x: "0", y: "28.1", width: "53", height: "53", fill: a }),
|
|
20
|
+
/* @__PURE__ */ jsx("rect", { x: "23.4", y: "14.1", width: "53", height: "53", fill: b }),
|
|
21
|
+
/* @__PURE__ */ jsx("rect", { x: "25.4", y: "16.1", width: "49", height: "49", fill: "none", stroke: a, strokeWidth: "4" }),
|
|
22
|
+
/* @__PURE__ */ jsx("rect", { x: "46.9", y: "0", width: "53", height: "53", fill: b }),
|
|
23
|
+
/* @__PURE__ */ jsx("rect", { x: "48.9", y: "2", width: "49", height: "49", fill: "none", stroke: "var(--clay)", strokeWidth: "4" })
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
function Logo({
|
|
29
|
+
variant = "lockup",
|
|
30
|
+
tone = "default",
|
|
31
|
+
height = 28,
|
|
32
|
+
className,
|
|
33
|
+
"aria-label": ariaLabel = "Spawn Partners",
|
|
34
|
+
...props
|
|
35
|
+
}) {
|
|
36
|
+
const onInk = tone === "on-ink";
|
|
37
|
+
const a = onInk ? "var(--background)" : "var(--foreground)";
|
|
38
|
+
const b = onInk ? "var(--foreground)" : "var(--background)";
|
|
39
|
+
const showMark = variant !== "wordmark";
|
|
40
|
+
const showWord = variant !== "mark";
|
|
41
|
+
const fontSize = Math.round(height * 0.54);
|
|
42
|
+
const gap = Math.round(height * 0.42);
|
|
43
|
+
return /* @__PURE__ */ jsxs(
|
|
44
|
+
"span",
|
|
45
|
+
{
|
|
46
|
+
"data-slot": "logo",
|
|
47
|
+
role: "img",
|
|
48
|
+
"aria-label": ariaLabel,
|
|
49
|
+
className: cn("inline-flex items-center", className),
|
|
50
|
+
style: { gap: showMark && showWord ? gap : void 0 },
|
|
51
|
+
...props,
|
|
52
|
+
children: [
|
|
53
|
+
showMark ? /* @__PURE__ */ jsx(LogoMark, { height, a, b }) : null,
|
|
54
|
+
showWord ? /* @__PURE__ */ jsxs(
|
|
55
|
+
"span",
|
|
56
|
+
{
|
|
57
|
+
"aria-hidden": showMark ? void 0 : "true",
|
|
58
|
+
className: cn(
|
|
59
|
+
"font-sans leading-none whitespace-nowrap",
|
|
60
|
+
onInk ? "text-background" : "text-foreground"
|
|
61
|
+
),
|
|
62
|
+
style: { fontSize, letterSpacing: "-0.01em" },
|
|
63
|
+
children: [
|
|
64
|
+
/* @__PURE__ */ jsx("span", { className: "font-semibold", children: "Spawn" }),
|
|
65
|
+
/* @__PURE__ */ jsxs("span", { className: cn("font-normal", onInk ? "text-stone" : "text-slate"), children: [
|
|
66
|
+
" ",
|
|
67
|
+
"Partners"
|
|
68
|
+
] })
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
) : null
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export { Logo };
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { cn } from './chunk-U7N2A7A3.js';
|
|
2
|
+
import { mergeProps } from '@base-ui/react/merge-props';
|
|
3
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
4
|
+
import { ChevronRightIcon, MoreHorizontalIcon } from 'lucide-react';
|
|
5
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
function Breadcrumb({ className, ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(
|
|
9
|
+
"nav",
|
|
10
|
+
{
|
|
11
|
+
"aria-label": "breadcrumb",
|
|
12
|
+
"data-slot": "breadcrumb",
|
|
13
|
+
className: cn(className),
|
|
14
|
+
...props
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
function BreadcrumbList({ className, ...props }) {
|
|
19
|
+
return /* @__PURE__ */ jsx(
|
|
20
|
+
"ol",
|
|
21
|
+
{
|
|
22
|
+
"data-slot": "breadcrumb-list",
|
|
23
|
+
className: cn(
|
|
24
|
+
"flex flex-wrap items-center gap-1.5 text-sm wrap-break-word text-muted-foreground",
|
|
25
|
+
className
|
|
26
|
+
),
|
|
27
|
+
...props
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
function BreadcrumbItem({ className, ...props }) {
|
|
32
|
+
return /* @__PURE__ */ jsx(
|
|
33
|
+
"li",
|
|
34
|
+
{
|
|
35
|
+
"data-slot": "breadcrumb-item",
|
|
36
|
+
className: cn("inline-flex items-center gap-1", className),
|
|
37
|
+
...props
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
function BreadcrumbLink({
|
|
42
|
+
className,
|
|
43
|
+
render,
|
|
44
|
+
...props
|
|
45
|
+
}) {
|
|
46
|
+
return useRender({
|
|
47
|
+
defaultTagName: "a",
|
|
48
|
+
props: mergeProps(
|
|
49
|
+
{
|
|
50
|
+
className: cn("transition-colors hover:text-foreground", className)
|
|
51
|
+
},
|
|
52
|
+
props
|
|
53
|
+
),
|
|
54
|
+
render,
|
|
55
|
+
state: {
|
|
56
|
+
slot: "breadcrumb-link"
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
function BreadcrumbPage({ className, ...props }) {
|
|
61
|
+
return /* @__PURE__ */ jsx(
|
|
62
|
+
"span",
|
|
63
|
+
{
|
|
64
|
+
"data-slot": "breadcrumb-page",
|
|
65
|
+
role: "link",
|
|
66
|
+
"aria-disabled": "true",
|
|
67
|
+
"aria-current": "page",
|
|
68
|
+
className: cn("font-normal text-foreground", className),
|
|
69
|
+
...props
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
function BreadcrumbSeparator({
|
|
74
|
+
children,
|
|
75
|
+
className,
|
|
76
|
+
...props
|
|
77
|
+
}) {
|
|
78
|
+
return /* @__PURE__ */ jsx(
|
|
79
|
+
"li",
|
|
80
|
+
{
|
|
81
|
+
"data-slot": "breadcrumb-separator",
|
|
82
|
+
role: "presentation",
|
|
83
|
+
"aria-hidden": "true",
|
|
84
|
+
className: cn("[&>svg]:size-3.5", className),
|
|
85
|
+
...props,
|
|
86
|
+
children: children ?? /* @__PURE__ */ jsx(ChevronRightIcon, {})
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
function BreadcrumbEllipsis({
|
|
91
|
+
className,
|
|
92
|
+
...props
|
|
93
|
+
}) {
|
|
94
|
+
return /* @__PURE__ */ jsxs(
|
|
95
|
+
"span",
|
|
96
|
+
{
|
|
97
|
+
"data-slot": "breadcrumb-ellipsis",
|
|
98
|
+
role: "presentation",
|
|
99
|
+
"aria-hidden": "true",
|
|
100
|
+
className: cn(
|
|
101
|
+
"flex size-5 items-center justify-center [&>svg]:size-4",
|
|
102
|
+
className
|
|
103
|
+
),
|
|
104
|
+
...props,
|
|
105
|
+
children: [
|
|
106
|
+
/* @__PURE__ */ jsx(
|
|
107
|
+
MoreHorizontalIcon,
|
|
108
|
+
{}
|
|
109
|
+
),
|
|
110
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "More" })
|
|
111
|
+
]
|
|
112
|
+
}
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { cn } from './chunk-U7N2A7A3.js';
|
|
2
|
+
import { Accordion as Accordion$1 } from '@base-ui/react/accordion';
|
|
3
|
+
import { ChevronDownIcon, ChevronUpIcon } from 'lucide-react';
|
|
4
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
function Accordion({ className, ...props }) {
|
|
7
|
+
return /* @__PURE__ */ jsx(
|
|
8
|
+
Accordion$1.Root,
|
|
9
|
+
{
|
|
10
|
+
"data-slot": "accordion",
|
|
11
|
+
className: cn("flex w-full flex-col", className),
|
|
12
|
+
...props
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
function AccordionItem({ className, ...props }) {
|
|
17
|
+
return /* @__PURE__ */ jsx(
|
|
18
|
+
Accordion$1.Item,
|
|
19
|
+
{
|
|
20
|
+
"data-slot": "accordion-item",
|
|
21
|
+
className: cn("not-last:border-b", className),
|
|
22
|
+
...props
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
function AccordionTrigger({
|
|
27
|
+
className,
|
|
28
|
+
children,
|
|
29
|
+
...props
|
|
30
|
+
}) {
|
|
31
|
+
return /* @__PURE__ */ jsx(Accordion$1.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
|
|
32
|
+
Accordion$1.Trigger,
|
|
33
|
+
{
|
|
34
|
+
"data-slot": "accordion-trigger",
|
|
35
|
+
className: cn(
|
|
36
|
+
"group/accordion-trigger relative flex flex-1 items-start justify-between rounded-lg border border-transparent py-2.5 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:after:border-ring aria-disabled:pointer-events-none aria-disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4 **:data-[slot=accordion-trigger-icon]:text-muted-foreground",
|
|
37
|
+
className
|
|
38
|
+
),
|
|
39
|
+
...props,
|
|
40
|
+
children: [
|
|
41
|
+
children,
|
|
42
|
+
/* @__PURE__ */ jsx(ChevronDownIcon, { "data-slot": "accordion-trigger-icon", className: "pointer-events-none shrink-0 group-aria-expanded/accordion-trigger:hidden" }),
|
|
43
|
+
/* @__PURE__ */ jsx(ChevronUpIcon, { "data-slot": "accordion-trigger-icon", className: "pointer-events-none hidden shrink-0 group-aria-expanded/accordion-trigger:inline" })
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
) });
|
|
47
|
+
}
|
|
48
|
+
function AccordionContent({
|
|
49
|
+
className,
|
|
50
|
+
children,
|
|
51
|
+
...props
|
|
52
|
+
}) {
|
|
53
|
+
return /* @__PURE__ */ jsx(
|
|
54
|
+
Accordion$1.Panel,
|
|
55
|
+
{
|
|
56
|
+
"data-slot": "accordion-content",
|
|
57
|
+
className: "overflow-hidden text-sm data-open:animate-accordion-down data-closed:animate-accordion-up",
|
|
58
|
+
...props,
|
|
59
|
+
children: /* @__PURE__ */ jsx(
|
|
60
|
+
"div",
|
|
61
|
+
{
|
|
62
|
+
className: cn(
|
|
63
|
+
"h-(--accordion-panel-height) pt-0 pb-2.5 data-ending-style:h-0 data-starting-style:h-0 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4",
|
|
64
|
+
className
|
|
65
|
+
),
|
|
66
|
+
children
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger };
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import { cn } from './chunk-U7N2A7A3.js';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import * as RechartsPrimitive from 'recharts';
|
|
4
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
|
+
|
|
6
|
+
var THEMES = { light: "", dark: ".dark" };
|
|
7
|
+
var INITIAL_DIMENSION = { width: 320, height: 200 };
|
|
8
|
+
var ChartContext = React.createContext(null);
|
|
9
|
+
function useChart() {
|
|
10
|
+
const context = React.useContext(ChartContext);
|
|
11
|
+
if (!context) {
|
|
12
|
+
throw new Error("useChart must be used within a <ChartContainer />");
|
|
13
|
+
}
|
|
14
|
+
return context;
|
|
15
|
+
}
|
|
16
|
+
function ChartContainer({
|
|
17
|
+
id,
|
|
18
|
+
className,
|
|
19
|
+
children,
|
|
20
|
+
config,
|
|
21
|
+
initialDimension = INITIAL_DIMENSION,
|
|
22
|
+
...props
|
|
23
|
+
}) {
|
|
24
|
+
const uniqueId = React.useId();
|
|
25
|
+
const chartId = `chart-${id ?? uniqueId.replace(/:/g, "")}`;
|
|
26
|
+
return /* @__PURE__ */ jsx(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxs(
|
|
27
|
+
"div",
|
|
28
|
+
{
|
|
29
|
+
"data-slot": "chart",
|
|
30
|
+
"data-chart": chartId,
|
|
31
|
+
className: cn(
|
|
32
|
+
"flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden",
|
|
33
|
+
className
|
|
34
|
+
),
|
|
35
|
+
...props,
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ jsx(ChartStyle, { id: chartId, config }),
|
|
38
|
+
/* @__PURE__ */ jsx(
|
|
39
|
+
RechartsPrimitive.ResponsiveContainer,
|
|
40
|
+
{
|
|
41
|
+
initialDimension,
|
|
42
|
+
children
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
) });
|
|
48
|
+
}
|
|
49
|
+
var ChartStyle = ({ id, config }) => {
|
|
50
|
+
const colorConfig = Object.entries(config).filter(
|
|
51
|
+
([, config2]) => config2.theme ?? config2.color
|
|
52
|
+
);
|
|
53
|
+
if (!colorConfig.length) {
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
return /* @__PURE__ */ jsx(
|
|
57
|
+
"style",
|
|
58
|
+
{
|
|
59
|
+
dangerouslySetInnerHTML: {
|
|
60
|
+
__html: Object.entries(THEMES).map(
|
|
61
|
+
([theme, prefix]) => `
|
|
62
|
+
${prefix} [data-chart=${id}] {
|
|
63
|
+
${colorConfig.map(([key, itemConfig]) => {
|
|
64
|
+
const color = itemConfig.theme?.[theme] ?? itemConfig.color;
|
|
65
|
+
return color ? ` --color-${key}: ${color};` : null;
|
|
66
|
+
}).join("\n")}
|
|
67
|
+
}
|
|
68
|
+
`
|
|
69
|
+
).join("\n")
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
};
|
|
74
|
+
var ChartTooltip = RechartsPrimitive.Tooltip;
|
|
75
|
+
function ChartTooltipContent({
|
|
76
|
+
active,
|
|
77
|
+
payload,
|
|
78
|
+
className,
|
|
79
|
+
indicator = "dot",
|
|
80
|
+
hideLabel = false,
|
|
81
|
+
hideIndicator = false,
|
|
82
|
+
label,
|
|
83
|
+
labelFormatter,
|
|
84
|
+
labelClassName,
|
|
85
|
+
formatter,
|
|
86
|
+
color,
|
|
87
|
+
nameKey,
|
|
88
|
+
labelKey
|
|
89
|
+
}) {
|
|
90
|
+
const { config } = useChart();
|
|
91
|
+
const tooltipLabel = React.useMemo(() => {
|
|
92
|
+
if (hideLabel || !payload?.length) {
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
95
|
+
const [item] = payload;
|
|
96
|
+
const key = `${labelKey ?? item?.dataKey ?? item?.name ?? "value"}`;
|
|
97
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
98
|
+
const value = !labelKey && typeof label === "string" ? config[label]?.label ?? label : itemConfig?.label;
|
|
99
|
+
if (labelFormatter) {
|
|
100
|
+
return /* @__PURE__ */ jsx("div", { className: cn("font-medium", labelClassName), children: labelFormatter(value, payload) });
|
|
101
|
+
}
|
|
102
|
+
if (!value) {
|
|
103
|
+
return null;
|
|
104
|
+
}
|
|
105
|
+
return /* @__PURE__ */ jsx("div", { className: cn("font-medium", labelClassName), children: value });
|
|
106
|
+
}, [
|
|
107
|
+
label,
|
|
108
|
+
labelFormatter,
|
|
109
|
+
payload,
|
|
110
|
+
hideLabel,
|
|
111
|
+
labelClassName,
|
|
112
|
+
config,
|
|
113
|
+
labelKey
|
|
114
|
+
]);
|
|
115
|
+
if (!active || !payload?.length) {
|
|
116
|
+
return null;
|
|
117
|
+
}
|
|
118
|
+
const nestLabel = payload.length === 1 && indicator !== "dot";
|
|
119
|
+
return /* @__PURE__ */ jsxs(
|
|
120
|
+
"div",
|
|
121
|
+
{
|
|
122
|
+
className: cn(
|
|
123
|
+
"grid min-w-32 items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",
|
|
124
|
+
className
|
|
125
|
+
),
|
|
126
|
+
children: [
|
|
127
|
+
!nestLabel ? tooltipLabel : null,
|
|
128
|
+
/* @__PURE__ */ jsx("div", { className: "grid gap-1.5", children: payload.filter((item) => item.type !== "none").map((item, index) => {
|
|
129
|
+
const key = `${nameKey ?? item.name ?? item.dataKey ?? "value"}`;
|
|
130
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
131
|
+
const indicatorColor = color ?? item.payload?.fill ?? item.color;
|
|
132
|
+
return /* @__PURE__ */ jsx(
|
|
133
|
+
"div",
|
|
134
|
+
{
|
|
135
|
+
className: cn(
|
|
136
|
+
"flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",
|
|
137
|
+
indicator === "dot" && "items-center"
|
|
138
|
+
),
|
|
139
|
+
children: formatter && item?.value !== void 0 && item.name ? formatter(item.value, item.name, item, index, item.payload) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
140
|
+
itemConfig?.icon ? /* @__PURE__ */ jsx(itemConfig.icon, {}) : !hideIndicator && /* @__PURE__ */ jsx(
|
|
141
|
+
"div",
|
|
142
|
+
{
|
|
143
|
+
className: cn(
|
|
144
|
+
"shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)",
|
|
145
|
+
{
|
|
146
|
+
"h-2.5 w-2.5": indicator === "dot",
|
|
147
|
+
"w-1": indicator === "line",
|
|
148
|
+
"w-0 border-[1.5px] border-dashed bg-transparent": indicator === "dashed",
|
|
149
|
+
"my-0.5": nestLabel && indicator === "dashed"
|
|
150
|
+
}
|
|
151
|
+
),
|
|
152
|
+
style: {
|
|
153
|
+
"--color-bg": indicatorColor,
|
|
154
|
+
"--color-border": indicatorColor
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
),
|
|
158
|
+
/* @__PURE__ */ jsxs(
|
|
159
|
+
"div",
|
|
160
|
+
{
|
|
161
|
+
className: cn(
|
|
162
|
+
"flex flex-1 justify-between leading-none",
|
|
163
|
+
nestLabel ? "items-end" : "items-center"
|
|
164
|
+
),
|
|
165
|
+
children: [
|
|
166
|
+
/* @__PURE__ */ jsxs("div", { className: "grid gap-1.5", children: [
|
|
167
|
+
nestLabel ? tooltipLabel : null,
|
|
168
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: itemConfig?.label ?? item.name })
|
|
169
|
+
] }),
|
|
170
|
+
item.value != null && /* @__PURE__ */ jsx("span", { className: "font-mono font-medium text-foreground tabular-nums", children: typeof item.value === "number" ? item.value.toLocaleString() : String(item.value) })
|
|
171
|
+
]
|
|
172
|
+
}
|
|
173
|
+
)
|
|
174
|
+
] })
|
|
175
|
+
},
|
|
176
|
+
index
|
|
177
|
+
);
|
|
178
|
+
}) })
|
|
179
|
+
]
|
|
180
|
+
}
|
|
181
|
+
);
|
|
182
|
+
}
|
|
183
|
+
var ChartLegend = RechartsPrimitive.Legend;
|
|
184
|
+
function ChartLegendContent({
|
|
185
|
+
className,
|
|
186
|
+
hideIcon = false,
|
|
187
|
+
payload,
|
|
188
|
+
verticalAlign = "bottom",
|
|
189
|
+
nameKey
|
|
190
|
+
}) {
|
|
191
|
+
const { config } = useChart();
|
|
192
|
+
if (!payload?.length) {
|
|
193
|
+
return null;
|
|
194
|
+
}
|
|
195
|
+
return /* @__PURE__ */ jsx(
|
|
196
|
+
"div",
|
|
197
|
+
{
|
|
198
|
+
className: cn(
|
|
199
|
+
"flex items-center justify-center gap-4",
|
|
200
|
+
verticalAlign === "top" ? "pb-3" : "pt-3",
|
|
201
|
+
className
|
|
202
|
+
),
|
|
203
|
+
children: payload.filter((item) => item.type !== "none").map((item, index) => {
|
|
204
|
+
const key = `${nameKey ?? item.dataKey ?? "value"}`;
|
|
205
|
+
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
206
|
+
return /* @__PURE__ */ jsxs(
|
|
207
|
+
"div",
|
|
208
|
+
{
|
|
209
|
+
className: cn(
|
|
210
|
+
"flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"
|
|
211
|
+
),
|
|
212
|
+
children: [
|
|
213
|
+
itemConfig?.icon && !hideIcon ? /* @__PURE__ */ jsx(itemConfig.icon, {}) : /* @__PURE__ */ jsx(
|
|
214
|
+
"div",
|
|
215
|
+
{
|
|
216
|
+
className: "h-2 w-2 shrink-0 rounded-[2px]",
|
|
217
|
+
style: {
|
|
218
|
+
backgroundColor: item.color
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
),
|
|
222
|
+
itemConfig?.label
|
|
223
|
+
]
|
|
224
|
+
},
|
|
225
|
+
index
|
|
226
|
+
);
|
|
227
|
+
})
|
|
228
|
+
}
|
|
229
|
+
);
|
|
230
|
+
}
|
|
231
|
+
function getPayloadConfigFromPayload(config, payload, key) {
|
|
232
|
+
if (typeof payload !== "object" || payload === null) {
|
|
233
|
+
return void 0;
|
|
234
|
+
}
|
|
235
|
+
const payloadPayload = "payload" in payload && typeof payload.payload === "object" && payload.payload !== null ? payload.payload : void 0;
|
|
236
|
+
let configLabelKey = key;
|
|
237
|
+
if (key in payload && typeof payload[key] === "string") {
|
|
238
|
+
configLabelKey = payload[key];
|
|
239
|
+
} else if (payloadPayload && key in payloadPayload && typeof payloadPayload[key] === "string") {
|
|
240
|
+
configLabelKey = payloadPayload[key];
|
|
241
|
+
}
|
|
242
|
+
return configLabelKey in config ? config[configLabelKey] : config[key];
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
export { ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent };
|