@locusgraph/components 0.1.1 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/action/button-group.js +148 -17
- package/dist/action/button.js +91 -27
- package/dist/action/toggle-group.js +176 -12
- package/dist/action/toggle.js +71 -18
- package/dist/display/avatar.js +118 -7
- package/dist/display/badge.d.ts +1 -1
- package/dist/display/badge.js +74 -17
- package/dist/display/chart/chart-container.js +205 -45
- package/dist/display/chart/chart-legend.js +79 -14
- package/dist/display/chart/chart-tooltip.js +211 -40
- package/dist/display/chat/attachment/attachment-parts.js +222 -13
- package/dist/display/chat/attachment/attachment.js +210 -28
- package/dist/display/chat/bubble.js +225 -37
- package/dist/display/chat/marker.js +143 -15
- package/dist/display/chat/message-scroller.js +277 -15
- package/dist/display/chat/message.js +238 -13
- package/dist/display/content/item.js +448 -47
- package/dist/display/content/kbd.js +78 -5
- package/dist/display/media/aspect-ratio.js +27 -3
- package/dist/display/media/carousel-controls.js +163 -12
- package/dist/display/media/carousel.js +325 -65
- package/dist/display/rule-grid/rule-grid.d.ts +3 -1
- package/dist/display/rule-grid/rule-grid.js +311 -25
- package/dist/display/separator.js +56 -3
- package/dist/display/skeletons/layouts/skeleton-rule-grid.d.ts +8 -0
- package/dist/display/skeletons/layouts/skeleton-rule-grid.js +83 -0
- package/dist/display/skeletons/layouts/skeleton-table.d.ts +8 -0
- package/dist/display/skeletons/layouts/skeleton-table.js +174 -0
- package/dist/display/skeletons/shapes/skeleton-avatar.d.ts +10 -0
- package/dist/display/skeletons/shapes/skeleton-avatar.js +102 -0
- package/dist/display/skeletons/shapes/skeleton-button.d.ts +10 -0
- package/dist/display/skeletons/shapes/skeleton-button.js +102 -0
- package/dist/display/skeletons/shapes/skeleton-text.d.ts +7 -0
- package/dist/display/skeletons/shapes/skeleton-text.js +84 -0
- package/dist/display/skeletons/skeleton-parts.d.ts +11 -0
- package/dist/display/skeletons/skeleton-parts.js +68 -0
- package/dist/display/status/alert.d.ts +1 -1
- package/dist/display/status/alert.js +137 -17
- package/dist/display/status/empty.js +250 -22
- package/dist/display/status/progress.d.ts +5 -1
- package/dist/display/status/progress.js +120 -3
- package/dist/display/status/skeleton.js +40 -3
- package/dist/display/status/spinner.js +42 -4
- package/dist/display/table.js +310 -17
- package/dist/feedback/toaster.d.ts +1 -1
- package/dist/feedback/toaster.js +100 -25
- package/dist/form/advanced/calendar-day-button.js +89 -12
- package/dist/form/advanced/calendar.js +349 -56
- package/dist/form/advanced/combobox/combobox-chips.js +152 -9
- package/dist/form/advanced/combobox/combobox-items.js +240 -15
- package/dist/form/advanced/combobox/combobox.js +387 -14
- package/dist/form/advanced/input-otp.js +202 -12
- package/dist/form/choice/checkbox.js +59 -4
- package/dist/form/choice/radio-group.js +95 -6
- package/dist/form/choice/select.js +479 -25
- package/dist/form/choice/slider.js +118 -4
- package/dist/form/choice/switch.js +53 -3
- package/dist/form/field/field-error.js +117 -14
- package/dist/form/field/field-separator.js +70 -3
- package/dist/form/field/field-set.js +85 -5
- package/dist/form/field/field-text.js +116 -7
- package/dist/form/field/field.js +138 -26
- package/dist/form/hook-form/form.js +338 -40
- package/dist/form/input-group.js +297 -47
- package/dist/form/input.js +47 -3
- package/dist/form/label.js +42 -3
- package/dist/form/native-select.js +148 -8
- package/dist/form/textarea.js +41 -3
- package/dist/index.d.ts +6 -0
- package/dist/index.js +6 -0
- package/dist/layout/accordion.js +166 -9
- package/dist/layout/collapsible.js +75 -7
- package/dist/layout/resizable.js +123 -8
- package/dist/layout/scroll/direction.js +25 -3
- package/dist/layout/scroll/scroll-area.d.ts +1 -1
- package/dist/layout/scroll/scroll-area.js +138 -5
- package/dist/layout/sidebar/sidebar-context.js +184 -51
- package/dist/layout/sidebar/sidebar-menu-sub.js +219 -14
- package/dist/layout/sidebar/sidebar-menu.js +319 -38
- package/dist/layout/sidebar/sidebar-sections.js +369 -22
- package/dist/layout/sidebar/sidebar.js +385 -29
- package/dist/layout/tabs.js +183 -18
- package/dist/layout/use-mobile.js +23 -10
- package/dist/navigation/breadcrumb.js +302 -18
- package/dist/navigation/menubar/menubar-items.js +323 -17
- package/dist/navigation/menubar/menubar-sub.js +126 -8
- package/dist/navigation/menubar/menubar.js +213 -13
- package/dist/navigation/navigation-menu.js +367 -19
- package/dist/navigation/pagination.js +329 -20
- package/dist/overlay/alert-dialog.js +485 -26
- package/dist/overlay/context-menu/context-menu-items.js +323 -17
- package/dist/overlay/context-menu/context-menu-sub.js +126 -8
- package/dist/overlay/context-menu/context-menu.js +140 -11
- package/dist/overlay/dialog.js +406 -25
- package/dist/overlay/floating/command.js +424 -21
- package/dist/overlay/floating/drawer.js +354 -22
- package/dist/overlay/floating/hover-card.js +107 -7
- package/dist/overlay/menu/dropdown-menu-choice.js +150 -8
- package/dist/overlay/menu/dropdown-menu-item.js +174 -9
- package/dist/overlay/menu/dropdown-menu-sub.js +125 -8
- package/dist/overlay/menu/dropdown-menu.js +147 -12
- package/dist/overlay/popover.js +106 -7
- package/dist/overlay/sheet.js +380 -27
- package/dist/overlay/tooltip.js +145 -9
- package/dist/shell/app-header.js +81 -5
- package/dist/shell/app-shell.js +58 -3
- package/dist/shell/breadcrumbs.js +102 -12
- package/dist/shell/docs/docs-header.js +211 -11
- package/dist/shell/docs/docs-shell.js +100 -3
- package/dist/shell/docs/docs-sidebar.js +88 -7
- package/dist/shell/docs/on-this-page.js +78 -7
- package/dist/shell/docs/use-active-section.js +88 -42
- package/dist/shell/navigation/app-sidebar.js +188 -6
- package/dist/shell/navigation/nav-group.js +161 -10
- package/dist/shell/theme-toggle.js +52 -5
- package/package.json +5 -5
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import { SkeletonBar, SkeletonLoadingLabel, skeletonRootProps } from "../skeleton-parts.js";
|
|
5
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
const skeletonAvatarVariants = cva("rounded-full", {
|
|
7
|
+
variants: {
|
|
8
|
+
size: {
|
|
9
|
+
sm: "size-6",
|
|
10
|
+
md: "size-8",
|
|
11
|
+
lg: "size-10"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
defaultVariants: {
|
|
15
|
+
size: "md"
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
function SkeletonAvatar(t0) {
|
|
19
|
+
const $ = _c(19);
|
|
20
|
+
let className;
|
|
21
|
+
let label;
|
|
22
|
+
let props;
|
|
23
|
+
let t1;
|
|
24
|
+
if ($[0] !== t0) {
|
|
25
|
+
({
|
|
26
|
+
size: t1,
|
|
27
|
+
label,
|
|
28
|
+
className,
|
|
29
|
+
...props
|
|
30
|
+
} = t0);
|
|
31
|
+
$[0] = t0;
|
|
32
|
+
$[1] = className;
|
|
33
|
+
$[2] = label;
|
|
34
|
+
$[3] = props;
|
|
35
|
+
$[4] = t1;
|
|
36
|
+
} else {
|
|
37
|
+
className = $[1];
|
|
38
|
+
label = $[2];
|
|
39
|
+
props = $[3];
|
|
40
|
+
t1 = $[4];
|
|
41
|
+
}
|
|
42
|
+
const size = t1 === undefined ? "md" : t1;
|
|
43
|
+
let t2;
|
|
44
|
+
if ($[5] !== className) {
|
|
45
|
+
t2 = cn("inline-flex shrink-0", className);
|
|
46
|
+
$[5] = className;
|
|
47
|
+
$[6] = t2;
|
|
48
|
+
} else {
|
|
49
|
+
t2 = $[6];
|
|
50
|
+
}
|
|
51
|
+
let t3;
|
|
52
|
+
if ($[7] !== size) {
|
|
53
|
+
t3 = skeletonAvatarVariants({
|
|
54
|
+
size
|
|
55
|
+
});
|
|
56
|
+
$[7] = size;
|
|
57
|
+
$[8] = t3;
|
|
58
|
+
} else {
|
|
59
|
+
t3 = $[8];
|
|
60
|
+
}
|
|
61
|
+
let t4;
|
|
62
|
+
if ($[9] !== t3) {
|
|
63
|
+
t4 = /*#__PURE__*/_jsx(SkeletonBar, {
|
|
64
|
+
className: t3
|
|
65
|
+
});
|
|
66
|
+
$[9] = t3;
|
|
67
|
+
$[10] = t4;
|
|
68
|
+
} else {
|
|
69
|
+
t4 = $[10];
|
|
70
|
+
}
|
|
71
|
+
let t5;
|
|
72
|
+
if ($[11] !== label) {
|
|
73
|
+
t5 = /*#__PURE__*/_jsx(SkeletonLoadingLabel, {
|
|
74
|
+
children: label
|
|
75
|
+
});
|
|
76
|
+
$[11] = label;
|
|
77
|
+
$[12] = t5;
|
|
78
|
+
} else {
|
|
79
|
+
t5 = $[12];
|
|
80
|
+
}
|
|
81
|
+
let t6;
|
|
82
|
+
if ($[13] !== props || $[14] !== size || $[15] !== t2 || $[16] !== t4 || $[17] !== t5) {
|
|
83
|
+
t6 = /*#__PURE__*/_jsxs("div", {
|
|
84
|
+
"data-slot": "skeleton-avatar",
|
|
85
|
+
"data-size": size,
|
|
86
|
+
...skeletonRootProps,
|
|
87
|
+
className: t2,
|
|
88
|
+
...props,
|
|
89
|
+
children: [t4, t5]
|
|
90
|
+
});
|
|
91
|
+
$[13] = props;
|
|
92
|
+
$[14] = size;
|
|
93
|
+
$[15] = t2;
|
|
94
|
+
$[16] = t4;
|
|
95
|
+
$[17] = t5;
|
|
96
|
+
$[18] = t6;
|
|
97
|
+
} else {
|
|
98
|
+
t6 = $[18];
|
|
99
|
+
}
|
|
100
|
+
return t6;
|
|
101
|
+
}
|
|
102
|
+
export { SkeletonAvatar, skeletonAvatarVariants };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
import type * as React from "react";
|
|
3
|
+
declare const skeletonButtonVariants: (props?: ({
|
|
4
|
+
size?: "default" | "lg" | "sm" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
type SkeletonButtonProps = React.ComponentProps<"div"> & VariantProps<typeof skeletonButtonVariants> & {
|
|
7
|
+
label?: string;
|
|
8
|
+
};
|
|
9
|
+
declare function SkeletonButton({ size, label, className, ...props }: SkeletonButtonProps): React.JSX.Element;
|
|
10
|
+
export { SkeletonButton, skeletonButtonVariants };
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import { cn } from "cn";
|
|
4
|
+
import { SkeletonBar, SkeletonLoadingLabel, skeletonRootProps } from "../skeleton-parts.js";
|
|
5
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
const skeletonButtonVariants = cva("rounded-full", {
|
|
7
|
+
variants: {
|
|
8
|
+
size: {
|
|
9
|
+
sm: "h-8 w-20",
|
|
10
|
+
default: "h-9 w-24",
|
|
11
|
+
lg: "h-10 w-28"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
defaultVariants: {
|
|
15
|
+
size: "default"
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
function SkeletonButton(t0) {
|
|
19
|
+
const $ = _c(19);
|
|
20
|
+
let className;
|
|
21
|
+
let label;
|
|
22
|
+
let props;
|
|
23
|
+
let t1;
|
|
24
|
+
if ($[0] !== t0) {
|
|
25
|
+
({
|
|
26
|
+
size: t1,
|
|
27
|
+
label,
|
|
28
|
+
className,
|
|
29
|
+
...props
|
|
30
|
+
} = t0);
|
|
31
|
+
$[0] = t0;
|
|
32
|
+
$[1] = className;
|
|
33
|
+
$[2] = label;
|
|
34
|
+
$[3] = props;
|
|
35
|
+
$[4] = t1;
|
|
36
|
+
} else {
|
|
37
|
+
className = $[1];
|
|
38
|
+
label = $[2];
|
|
39
|
+
props = $[3];
|
|
40
|
+
t1 = $[4];
|
|
41
|
+
}
|
|
42
|
+
const size = t1 === undefined ? "default" : t1;
|
|
43
|
+
let t2;
|
|
44
|
+
if ($[5] !== className) {
|
|
45
|
+
t2 = cn("inline-flex shrink-0", className);
|
|
46
|
+
$[5] = className;
|
|
47
|
+
$[6] = t2;
|
|
48
|
+
} else {
|
|
49
|
+
t2 = $[6];
|
|
50
|
+
}
|
|
51
|
+
let t3;
|
|
52
|
+
if ($[7] !== size) {
|
|
53
|
+
t3 = skeletonButtonVariants({
|
|
54
|
+
size
|
|
55
|
+
});
|
|
56
|
+
$[7] = size;
|
|
57
|
+
$[8] = t3;
|
|
58
|
+
} else {
|
|
59
|
+
t3 = $[8];
|
|
60
|
+
}
|
|
61
|
+
let t4;
|
|
62
|
+
if ($[9] !== t3) {
|
|
63
|
+
t4 = /*#__PURE__*/_jsx(SkeletonBar, {
|
|
64
|
+
className: t3
|
|
65
|
+
});
|
|
66
|
+
$[9] = t3;
|
|
67
|
+
$[10] = t4;
|
|
68
|
+
} else {
|
|
69
|
+
t4 = $[10];
|
|
70
|
+
}
|
|
71
|
+
let t5;
|
|
72
|
+
if ($[11] !== label) {
|
|
73
|
+
t5 = /*#__PURE__*/_jsx(SkeletonLoadingLabel, {
|
|
74
|
+
children: label
|
|
75
|
+
});
|
|
76
|
+
$[11] = label;
|
|
77
|
+
$[12] = t5;
|
|
78
|
+
} else {
|
|
79
|
+
t5 = $[12];
|
|
80
|
+
}
|
|
81
|
+
let t6;
|
|
82
|
+
if ($[13] !== props || $[14] !== size || $[15] !== t2 || $[16] !== t4 || $[17] !== t5) {
|
|
83
|
+
t6 = /*#__PURE__*/_jsxs("div", {
|
|
84
|
+
"data-slot": "skeleton-button",
|
|
85
|
+
"data-size": size,
|
|
86
|
+
...skeletonRootProps,
|
|
87
|
+
className: t2,
|
|
88
|
+
...props,
|
|
89
|
+
children: [t4, t5]
|
|
90
|
+
});
|
|
91
|
+
$[13] = props;
|
|
92
|
+
$[14] = size;
|
|
93
|
+
$[15] = t2;
|
|
94
|
+
$[16] = t4;
|
|
95
|
+
$[17] = t5;
|
|
96
|
+
$[18] = t6;
|
|
97
|
+
} else {
|
|
98
|
+
t6 = $[18];
|
|
99
|
+
}
|
|
100
|
+
return t6;
|
|
101
|
+
}
|
|
102
|
+
export { SkeletonButton, skeletonButtonVariants };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
type SkeletonTextProps = React.ComponentProps<"div"> & {
|
|
3
|
+
lines?: number;
|
|
4
|
+
label?: string;
|
|
5
|
+
};
|
|
6
|
+
declare function SkeletonText({ lines, label, className, ...props }: SkeletonTextProps): React.JSX.Element;
|
|
7
|
+
export { SkeletonText };
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { cn } from "cn";
|
|
3
|
+
import { SkeletonBar, SkeletonLoadingLabel, skeletonRootProps } from "../skeleton-parts.js";
|
|
4
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
+
function lineWidth(index, lines) {
|
|
6
|
+
return lines > 1 && index === lines - 1 ? "w-3/5" : "w-full";
|
|
7
|
+
}
|
|
8
|
+
function SkeletonText(t0) {
|
|
9
|
+
const $ = _c(16);
|
|
10
|
+
let className;
|
|
11
|
+
let label;
|
|
12
|
+
let props;
|
|
13
|
+
let t1;
|
|
14
|
+
if ($[0] !== t0) {
|
|
15
|
+
({
|
|
16
|
+
lines: t1,
|
|
17
|
+
label,
|
|
18
|
+
className,
|
|
19
|
+
...props
|
|
20
|
+
} = t0);
|
|
21
|
+
$[0] = t0;
|
|
22
|
+
$[1] = className;
|
|
23
|
+
$[2] = label;
|
|
24
|
+
$[3] = props;
|
|
25
|
+
$[4] = t1;
|
|
26
|
+
} else {
|
|
27
|
+
className = $[1];
|
|
28
|
+
label = $[2];
|
|
29
|
+
props = $[3];
|
|
30
|
+
t1 = $[4];
|
|
31
|
+
}
|
|
32
|
+
const lines = t1 === undefined ? 3 : t1;
|
|
33
|
+
const count = Math.max(1, Math.floor(lines));
|
|
34
|
+
let t2;
|
|
35
|
+
if ($[5] !== className) {
|
|
36
|
+
t2 = cn("flex w-full flex-col gap-2", className);
|
|
37
|
+
$[5] = className;
|
|
38
|
+
$[6] = t2;
|
|
39
|
+
} else {
|
|
40
|
+
t2 = $[6];
|
|
41
|
+
}
|
|
42
|
+
let t3;
|
|
43
|
+
if ($[7] !== count) {
|
|
44
|
+
t3 = Array.from({
|
|
45
|
+
length: count
|
|
46
|
+
}, (_, index) => /*#__PURE__*/_jsx(SkeletonBar, {
|
|
47
|
+
"data-slot": "skeleton-text-line",
|
|
48
|
+
className: cn("h-4", lineWidth(index, count))
|
|
49
|
+
}, index));
|
|
50
|
+
$[7] = count;
|
|
51
|
+
$[8] = t3;
|
|
52
|
+
} else {
|
|
53
|
+
t3 = $[8];
|
|
54
|
+
}
|
|
55
|
+
let t4;
|
|
56
|
+
if ($[9] !== label) {
|
|
57
|
+
t4 = /*#__PURE__*/_jsx(SkeletonLoadingLabel, {
|
|
58
|
+
children: label
|
|
59
|
+
});
|
|
60
|
+
$[9] = label;
|
|
61
|
+
$[10] = t4;
|
|
62
|
+
} else {
|
|
63
|
+
t4 = $[10];
|
|
64
|
+
}
|
|
65
|
+
let t5;
|
|
66
|
+
if ($[11] !== props || $[12] !== t2 || $[13] !== t3 || $[14] !== t4) {
|
|
67
|
+
t5 = /*#__PURE__*/_jsxs("div", {
|
|
68
|
+
"data-slot": "skeleton-text",
|
|
69
|
+
...skeletonRootProps,
|
|
70
|
+
className: t2,
|
|
71
|
+
...props,
|
|
72
|
+
children: [t3, t4]
|
|
73
|
+
});
|
|
74
|
+
$[11] = props;
|
|
75
|
+
$[12] = t2;
|
|
76
|
+
$[13] = t3;
|
|
77
|
+
$[14] = t4;
|
|
78
|
+
$[15] = t5;
|
|
79
|
+
} else {
|
|
80
|
+
t5 = $[15];
|
|
81
|
+
}
|
|
82
|
+
return t5;
|
|
83
|
+
}
|
|
84
|
+
export { SkeletonText };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
import { Skeleton } from "../status/skeleton.js";
|
|
3
|
+
declare function SkeletonBar({ className, ...props }: React.ComponentProps<typeof Skeleton>): React.JSX.Element;
|
|
4
|
+
declare function SkeletonLoadingLabel({ children }: {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
}): React.JSX.Element;
|
|
7
|
+
declare const skeletonRootProps: {
|
|
8
|
+
readonly role: "status";
|
|
9
|
+
readonly "aria-busy": true;
|
|
10
|
+
};
|
|
11
|
+
export { SkeletonBar, SkeletonLoadingLabel, skeletonRootProps };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { cn } from "cn";
|
|
3
|
+
import { Skeleton } from "../status/skeleton.js";
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
function SkeletonBar(t0) {
|
|
6
|
+
const $ = _c(8);
|
|
7
|
+
let className;
|
|
8
|
+
let props;
|
|
9
|
+
if ($[0] !== t0) {
|
|
10
|
+
({
|
|
11
|
+
className,
|
|
12
|
+
...props
|
|
13
|
+
} = t0);
|
|
14
|
+
$[0] = t0;
|
|
15
|
+
$[1] = className;
|
|
16
|
+
$[2] = props;
|
|
17
|
+
} else {
|
|
18
|
+
className = $[1];
|
|
19
|
+
props = $[2];
|
|
20
|
+
}
|
|
21
|
+
let t1;
|
|
22
|
+
if ($[3] !== className) {
|
|
23
|
+
t1 = cn("rounded-none bg-skeleton motion-reduce:animate-none", className);
|
|
24
|
+
$[3] = className;
|
|
25
|
+
$[4] = t1;
|
|
26
|
+
} else {
|
|
27
|
+
t1 = $[4];
|
|
28
|
+
}
|
|
29
|
+
let t2;
|
|
30
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
31
|
+
t2 = /*#__PURE__*/_jsx(Skeleton, {
|
|
32
|
+
"aria-hidden": "true",
|
|
33
|
+
className: t1,
|
|
34
|
+
...props
|
|
35
|
+
});
|
|
36
|
+
$[5] = props;
|
|
37
|
+
$[6] = t1;
|
|
38
|
+
$[7] = t2;
|
|
39
|
+
} else {
|
|
40
|
+
t2 = $[7];
|
|
41
|
+
}
|
|
42
|
+
return t2;
|
|
43
|
+
}
|
|
44
|
+
function SkeletonLoadingLabel(t0) {
|
|
45
|
+
const $ = _c(2);
|
|
46
|
+
const {
|
|
47
|
+
children: t1
|
|
48
|
+
} = t0;
|
|
49
|
+
const children = t1 === undefined ? "Loading\u2026" : t1;
|
|
50
|
+
let t2;
|
|
51
|
+
if ($[0] !== children) {
|
|
52
|
+
t2 = /*#__PURE__*/_jsx("span", {
|
|
53
|
+
"data-slot": "skeleton-loading-label",
|
|
54
|
+
className: "sr-only",
|
|
55
|
+
children: children
|
|
56
|
+
});
|
|
57
|
+
$[0] = children;
|
|
58
|
+
$[1] = t2;
|
|
59
|
+
} else {
|
|
60
|
+
t2 = $[1];
|
|
61
|
+
}
|
|
62
|
+
return t2;
|
|
63
|
+
}
|
|
64
|
+
const skeletonRootProps = {
|
|
65
|
+
role: "status",
|
|
66
|
+
"aria-busy": true
|
|
67
|
+
};
|
|
68
|
+
export { SkeletonBar, SkeletonLoadingLabel, skeletonRootProps };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type VariantProps } from "class-variance-authority";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const alertVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "destructive" | null | undefined;
|
|
4
|
+
variant?: "default" | "destructive" | "success" | "warning" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
6
|
declare function Alert({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>): React.JSX.Element;
|
|
7
7
|
declare function AlertTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
@@ -1,24 +1,144 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
2
|
import { cva } from "class-variance-authority";
|
|
3
3
|
import { cn } from "cn";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
const alertVariants = cva("relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5", {
|
|
7
|
+
variants: {
|
|
8
|
+
variant: {
|
|
9
|
+
default: "bg-card text-card-foreground",
|
|
10
|
+
success: "border-good/30 bg-good/5 text-card-foreground [&>svg]:text-good",
|
|
11
|
+
warning: "border-warn/30 bg-warn/5 text-card-foreground [&>svg]:text-warn",
|
|
12
|
+
destructive: "border-destructive/30 bg-destructive/5 text-card-foreground [&>svg]:text-destructive *:data-[slot=alert-title]:text-destructive"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: {
|
|
16
|
+
variant: "default"
|
|
17
|
+
}
|
|
14
18
|
});
|
|
15
|
-
function Alert(
|
|
16
|
-
|
|
19
|
+
function Alert(t0) {
|
|
20
|
+
const $ = _c(10);
|
|
21
|
+
let className;
|
|
22
|
+
let props;
|
|
23
|
+
let variant;
|
|
24
|
+
if ($[0] !== t0) {
|
|
25
|
+
({
|
|
26
|
+
className,
|
|
27
|
+
variant,
|
|
28
|
+
...props
|
|
29
|
+
} = t0);
|
|
30
|
+
$[0] = t0;
|
|
31
|
+
$[1] = className;
|
|
32
|
+
$[2] = props;
|
|
33
|
+
$[3] = variant;
|
|
34
|
+
} else {
|
|
35
|
+
className = $[1];
|
|
36
|
+
props = $[2];
|
|
37
|
+
variant = $[3];
|
|
38
|
+
}
|
|
39
|
+
let t1;
|
|
40
|
+
if ($[4] !== className || $[5] !== variant) {
|
|
41
|
+
t1 = cn(alertVariants({
|
|
42
|
+
variant
|
|
43
|
+
}), className);
|
|
44
|
+
$[4] = className;
|
|
45
|
+
$[5] = variant;
|
|
46
|
+
$[6] = t1;
|
|
47
|
+
} else {
|
|
48
|
+
t1 = $[6];
|
|
49
|
+
}
|
|
50
|
+
let t2;
|
|
51
|
+
if ($[7] !== props || $[8] !== t1) {
|
|
52
|
+
t2 = /*#__PURE__*/_jsx("div", {
|
|
53
|
+
"data-slot": "alert",
|
|
54
|
+
role: "alert",
|
|
55
|
+
className: t1,
|
|
56
|
+
...props
|
|
57
|
+
});
|
|
58
|
+
$[7] = props;
|
|
59
|
+
$[8] = t1;
|
|
60
|
+
$[9] = t2;
|
|
61
|
+
} else {
|
|
62
|
+
t2 = $[9];
|
|
63
|
+
}
|
|
64
|
+
return t2;
|
|
17
65
|
}
|
|
18
|
-
function AlertTitle(
|
|
19
|
-
|
|
66
|
+
function AlertTitle(t0) {
|
|
67
|
+
const $ = _c(8);
|
|
68
|
+
let className;
|
|
69
|
+
let props;
|
|
70
|
+
if ($[0] !== t0) {
|
|
71
|
+
({
|
|
72
|
+
className,
|
|
73
|
+
...props
|
|
74
|
+
} = t0);
|
|
75
|
+
$[0] = t0;
|
|
76
|
+
$[1] = className;
|
|
77
|
+
$[2] = props;
|
|
78
|
+
} else {
|
|
79
|
+
className = $[1];
|
|
80
|
+
props = $[2];
|
|
81
|
+
}
|
|
82
|
+
let t1;
|
|
83
|
+
if ($[3] !== className) {
|
|
84
|
+
t1 = cn("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight", className);
|
|
85
|
+
$[3] = className;
|
|
86
|
+
$[4] = t1;
|
|
87
|
+
} else {
|
|
88
|
+
t1 = $[4];
|
|
89
|
+
}
|
|
90
|
+
let t2;
|
|
91
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
92
|
+
t2 = /*#__PURE__*/_jsx("div", {
|
|
93
|
+
"data-slot": "alert-title",
|
|
94
|
+
className: t1,
|
|
95
|
+
...props
|
|
96
|
+
});
|
|
97
|
+
$[5] = props;
|
|
98
|
+
$[6] = t1;
|
|
99
|
+
$[7] = t2;
|
|
100
|
+
} else {
|
|
101
|
+
t2 = $[7];
|
|
102
|
+
}
|
|
103
|
+
return t2;
|
|
20
104
|
}
|
|
21
|
-
function AlertDescription(
|
|
22
|
-
|
|
105
|
+
function AlertDescription(t0) {
|
|
106
|
+
const $ = _c(8);
|
|
107
|
+
let className;
|
|
108
|
+
let props;
|
|
109
|
+
if ($[0] !== t0) {
|
|
110
|
+
({
|
|
111
|
+
className,
|
|
112
|
+
...props
|
|
113
|
+
} = t0);
|
|
114
|
+
$[0] = t0;
|
|
115
|
+
$[1] = className;
|
|
116
|
+
$[2] = props;
|
|
117
|
+
} else {
|
|
118
|
+
className = $[1];
|
|
119
|
+
props = $[2];
|
|
120
|
+
}
|
|
121
|
+
let t1;
|
|
122
|
+
if ($[3] !== className) {
|
|
123
|
+
t1 = cn("col-start-2 grid justify-items-start gap-1 text-sm text-muted-foreground [&_p]:leading-relaxed", className);
|
|
124
|
+
$[3] = className;
|
|
125
|
+
$[4] = t1;
|
|
126
|
+
} else {
|
|
127
|
+
t1 = $[4];
|
|
128
|
+
}
|
|
129
|
+
let t2;
|
|
130
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
131
|
+
t2 = /*#__PURE__*/_jsx("div", {
|
|
132
|
+
"data-slot": "alert-description",
|
|
133
|
+
className: t1,
|
|
134
|
+
...props
|
|
135
|
+
});
|
|
136
|
+
$[5] = props;
|
|
137
|
+
$[6] = t1;
|
|
138
|
+
$[7] = t2;
|
|
139
|
+
} else {
|
|
140
|
+
t2 = $[7];
|
|
141
|
+
}
|
|
142
|
+
return t2;
|
|
23
143
|
}
|
|
24
144
|
export { Alert, AlertDescription, AlertTitle };
|