@ucdjs-internal/shared-ui 0.1.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/LICENSE +21 -0
- package/README.md +27 -0
- package/dist/components/shiki-code.d.mts +50 -0
- package/dist/components/shiki-code.mjs +76 -0
- package/dist/components/theme-toggle.d.mts +6 -0
- package/dist/components/theme-toggle.mjs +75 -0
- package/dist/hooks/index.d.mts +3 -0
- package/dist/hooks/index.mjs +4 -0
- package/dist/hooks/use-mobile.d.mts +4 -0
- package/dist/hooks/use-mobile.mjs +41 -0
- package/dist/hooks/use-theme.d.mts +11 -0
- package/dist/hooks/use-theme.mjs +105 -0
- package/dist/index.d.mts +3 -0
- package/dist/index.mjs +4 -0
- package/dist/lib/theme-script.d.mts +5 -0
- package/dist/lib/theme-script.mjs +26 -0
- package/dist/lib/utils.d.mts +6 -0
- package/dist/lib/utils.mjs +10 -0
- package/dist/styles/globals.css +219 -0
- package/dist/styles/shadcn-vendored.css +95 -0
- package/dist/ui/alert-dialog.d.mts +58 -0
- package/dist/ui/alert-dialog.mjs +387 -0
- package/dist/ui/avatar.d.mts +34 -0
- package/dist/ui/avatar.mjs +208 -0
- package/dist/ui/badge.d.mts +17 -0
- package/dist/ui/badge.mjs +76 -0
- package/dist/ui/breadcrumb.d.mts +37 -0
- package/dist/ui/breadcrumb.mjs +281 -0
- package/dist/ui/button.d.mts +18 -0
- package/dist/ui/button.mjs +82 -0
- package/dist/ui/card.d.mts +37 -0
- package/dist/ui/card.mjs +239 -0
- package/dist/ui/checkbox.d.mts +10 -0
- package/dist/ui/checkbox.mjs +52 -0
- package/dist/ui/collapsible.d.mts +15 -0
- package/dist/ui/collapsible.mjs +65 -0
- package/dist/ui/combobox.d.mts +81 -0
- package/dist/ui/combobox.mjs +641 -0
- package/dist/ui/command.d.mts +55 -0
- package/dist/ui/command.mjs +378 -0
- package/dist/ui/context-menu.d.mts +86 -0
- package/dist/ui/context-menu.mjs +520 -0
- package/dist/ui/dialog.d.mts +51 -0
- package/dist/ui/dialog.mjs +331 -0
- package/dist/ui/dropdown-menu.d.mts +84 -0
- package/dist/ui/dropdown-menu.mjs +534 -0
- package/dist/ui/field.d.mts +64 -0
- package/dist/ui/field.mjs +425 -0
- package/dist/ui/input-group.d.mts +45 -0
- package/dist/ui/input-group.mjs +254 -0
- package/dist/ui/input.d.mts +11 -0
- package/dist/ui/input.mjs +47 -0
- package/dist/ui/label.d.mts +10 -0
- package/dist/ui/label.mjs +41 -0
- package/dist/ui/scroll-area.d.mts +16 -0
- package/dist/ui/scroll-area.mjs +120 -0
- package/dist/ui/select.d.mts +55 -0
- package/dist/ui/select.mjs +414 -0
- package/dist/ui/separator.d.mts +11 -0
- package/dist/ui/separator.mjs +47 -0
- package/dist/ui/sheet.d.mts +42 -0
- package/dist/ui/sheet.mjs +318 -0
- package/dist/ui/sidebar.d.mts +160 -0
- package/dist/ui/sidebar.mjs +1258 -0
- package/dist/ui/skeleton.d.mts +9 -0
- package/dist/ui/skeleton.mjs +40 -0
- package/dist/ui/table.d.mts +38 -0
- package/dist/ui/table.mjs +269 -0
- package/dist/ui/textarea.d.mts +10 -0
- package/dist/ui/textarea.mjs +41 -0
- package/dist/ui/tooltip.d.mts +25 -0
- package/dist/ui/tooltip.mjs +149 -0
- package/package.json +111 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
4
|
+
|
|
5
|
+
//#region src/ui/breadcrumb.d.ts
|
|
6
|
+
declare function Breadcrumb({
|
|
7
|
+
className,
|
|
8
|
+
...props
|
|
9
|
+
}: React.ComponentProps<"nav">): react_jsx_runtime0.JSX.Element;
|
|
10
|
+
declare function BreadcrumbList({
|
|
11
|
+
className,
|
|
12
|
+
...props
|
|
13
|
+
}: React.ComponentProps<"ol">): react_jsx_runtime0.JSX.Element;
|
|
14
|
+
declare function BreadcrumbItem({
|
|
15
|
+
className,
|
|
16
|
+
...props
|
|
17
|
+
}: React.ComponentProps<"li">): react_jsx_runtime0.JSX.Element;
|
|
18
|
+
declare function BreadcrumbLink({
|
|
19
|
+
className,
|
|
20
|
+
render,
|
|
21
|
+
...props
|
|
22
|
+
}: useRender.ComponentProps<"a">): React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
23
|
+
declare function BreadcrumbPage({
|
|
24
|
+
className,
|
|
25
|
+
...props
|
|
26
|
+
}: React.ComponentProps<"span">): react_jsx_runtime0.JSX.Element;
|
|
27
|
+
declare function BreadcrumbSeparator({
|
|
28
|
+
children,
|
|
29
|
+
className,
|
|
30
|
+
...props
|
|
31
|
+
}: React.ComponentProps<"li">): react_jsx_runtime0.JSX.Element;
|
|
32
|
+
declare function BreadcrumbEllipsis({
|
|
33
|
+
className,
|
|
34
|
+
...props
|
|
35
|
+
}: React.ComponentProps<"span">): react_jsx_runtime0.JSX.Element;
|
|
36
|
+
//#endregion
|
|
37
|
+
export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator };
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
import { cn } from "../lib/utils.mjs";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
5
|
+
import { ChevronRight, MoreHorizontal } from "lucide-react";
|
|
6
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
7
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
8
|
+
|
|
9
|
+
//#region src/ui/breadcrumb.tsx
|
|
10
|
+
function Breadcrumb(t0) {
|
|
11
|
+
const $ = c(8);
|
|
12
|
+
let className;
|
|
13
|
+
let props;
|
|
14
|
+
if ($[0] !== t0) {
|
|
15
|
+
({className, ...props} = t0);
|
|
16
|
+
$[0] = t0;
|
|
17
|
+
$[1] = className;
|
|
18
|
+
$[2] = props;
|
|
19
|
+
} else {
|
|
20
|
+
className = $[1];
|
|
21
|
+
props = $[2];
|
|
22
|
+
}
|
|
23
|
+
let t1;
|
|
24
|
+
if ($[3] !== className) {
|
|
25
|
+
t1 = cn(className);
|
|
26
|
+
$[3] = className;
|
|
27
|
+
$[4] = t1;
|
|
28
|
+
} else t1 = $[4];
|
|
29
|
+
let t2;
|
|
30
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
31
|
+
t2 = /* @__PURE__ */ jsx("nav", {
|
|
32
|
+
"aria-label": "breadcrumb",
|
|
33
|
+
"data-slot": "breadcrumb",
|
|
34
|
+
className: t1,
|
|
35
|
+
...props
|
|
36
|
+
});
|
|
37
|
+
$[5] = props;
|
|
38
|
+
$[6] = t1;
|
|
39
|
+
$[7] = t2;
|
|
40
|
+
} else t2 = $[7];
|
|
41
|
+
return t2;
|
|
42
|
+
}
|
|
43
|
+
function BreadcrumbList(t0) {
|
|
44
|
+
const $ = c(8);
|
|
45
|
+
let className;
|
|
46
|
+
let props;
|
|
47
|
+
if ($[0] !== t0) {
|
|
48
|
+
({className, ...props} = t0);
|
|
49
|
+
$[0] = t0;
|
|
50
|
+
$[1] = className;
|
|
51
|
+
$[2] = props;
|
|
52
|
+
} else {
|
|
53
|
+
className = $[1];
|
|
54
|
+
props = $[2];
|
|
55
|
+
}
|
|
56
|
+
let t1;
|
|
57
|
+
if ($[3] !== className) {
|
|
58
|
+
t1 = cn("text-muted-foreground gap-1.5 text-sm flex flex-wrap items-center wrap-break-word", className);
|
|
59
|
+
$[3] = className;
|
|
60
|
+
$[4] = t1;
|
|
61
|
+
} else t1 = $[4];
|
|
62
|
+
let t2;
|
|
63
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
64
|
+
t2 = /* @__PURE__ */ jsx("ol", {
|
|
65
|
+
"data-slot": "breadcrumb-list",
|
|
66
|
+
className: t1,
|
|
67
|
+
...props
|
|
68
|
+
});
|
|
69
|
+
$[5] = props;
|
|
70
|
+
$[6] = t1;
|
|
71
|
+
$[7] = t2;
|
|
72
|
+
} else t2 = $[7];
|
|
73
|
+
return t2;
|
|
74
|
+
}
|
|
75
|
+
function BreadcrumbItem(t0) {
|
|
76
|
+
const $ = c(8);
|
|
77
|
+
let className;
|
|
78
|
+
let props;
|
|
79
|
+
if ($[0] !== t0) {
|
|
80
|
+
({className, ...props} = t0);
|
|
81
|
+
$[0] = t0;
|
|
82
|
+
$[1] = className;
|
|
83
|
+
$[2] = props;
|
|
84
|
+
} else {
|
|
85
|
+
className = $[1];
|
|
86
|
+
props = $[2];
|
|
87
|
+
}
|
|
88
|
+
let t1;
|
|
89
|
+
if ($[3] !== className) {
|
|
90
|
+
t1 = cn("gap-1 inline-flex items-center", className);
|
|
91
|
+
$[3] = className;
|
|
92
|
+
$[4] = t1;
|
|
93
|
+
} else t1 = $[4];
|
|
94
|
+
let t2;
|
|
95
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
96
|
+
t2 = /* @__PURE__ */ jsx("li", {
|
|
97
|
+
"data-slot": "breadcrumb-item",
|
|
98
|
+
className: t1,
|
|
99
|
+
...props
|
|
100
|
+
});
|
|
101
|
+
$[5] = props;
|
|
102
|
+
$[6] = t1;
|
|
103
|
+
$[7] = t2;
|
|
104
|
+
} else t2 = $[7];
|
|
105
|
+
return t2;
|
|
106
|
+
}
|
|
107
|
+
function BreadcrumbLink(t0) {
|
|
108
|
+
const $ = c(10);
|
|
109
|
+
let render;
|
|
110
|
+
let t1;
|
|
111
|
+
let t2;
|
|
112
|
+
let t3;
|
|
113
|
+
if ($[0] !== t0) {
|
|
114
|
+
const { className, render: t4, ...props } = t0;
|
|
115
|
+
render = t4;
|
|
116
|
+
t3 = useRender;
|
|
117
|
+
t1 = "a";
|
|
118
|
+
t2 = mergeProps({ className: cn("hover:text-foreground transition-colors", className) }, props);
|
|
119
|
+
$[0] = t0;
|
|
120
|
+
$[1] = render;
|
|
121
|
+
$[2] = t1;
|
|
122
|
+
$[3] = t2;
|
|
123
|
+
$[4] = t3;
|
|
124
|
+
} else {
|
|
125
|
+
render = $[1];
|
|
126
|
+
t1 = $[2];
|
|
127
|
+
t2 = $[3];
|
|
128
|
+
t3 = $[4];
|
|
129
|
+
}
|
|
130
|
+
let t4;
|
|
131
|
+
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
132
|
+
t4 = { slot: "breadcrumb-link" };
|
|
133
|
+
$[5] = t4;
|
|
134
|
+
} else t4 = $[5];
|
|
135
|
+
let t5;
|
|
136
|
+
if ($[6] !== render || $[7] !== t1 || $[8] !== t2) {
|
|
137
|
+
t5 = {
|
|
138
|
+
defaultTagName: t1,
|
|
139
|
+
props: t2,
|
|
140
|
+
render,
|
|
141
|
+
state: t4
|
|
142
|
+
};
|
|
143
|
+
$[6] = render;
|
|
144
|
+
$[7] = t1;
|
|
145
|
+
$[8] = t2;
|
|
146
|
+
$[9] = t5;
|
|
147
|
+
} else t5 = $[9];
|
|
148
|
+
return t3(t5);
|
|
149
|
+
}
|
|
150
|
+
function BreadcrumbPage(t0) {
|
|
151
|
+
const $ = c(8);
|
|
152
|
+
let className;
|
|
153
|
+
let props;
|
|
154
|
+
if ($[0] !== t0) {
|
|
155
|
+
({className, ...props} = t0);
|
|
156
|
+
$[0] = t0;
|
|
157
|
+
$[1] = className;
|
|
158
|
+
$[2] = props;
|
|
159
|
+
} else {
|
|
160
|
+
className = $[1];
|
|
161
|
+
props = $[2];
|
|
162
|
+
}
|
|
163
|
+
let t1;
|
|
164
|
+
if ($[3] !== className) {
|
|
165
|
+
t1 = cn("text-foreground font-normal", className);
|
|
166
|
+
$[3] = className;
|
|
167
|
+
$[4] = t1;
|
|
168
|
+
} else t1 = $[4];
|
|
169
|
+
let t2;
|
|
170
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
171
|
+
t2 = /* @__PURE__ */ jsx("span", {
|
|
172
|
+
"data-slot": "breadcrumb-page",
|
|
173
|
+
role: "link",
|
|
174
|
+
"aria-disabled": "true",
|
|
175
|
+
"aria-current": "page",
|
|
176
|
+
className: t1,
|
|
177
|
+
...props
|
|
178
|
+
});
|
|
179
|
+
$[5] = props;
|
|
180
|
+
$[6] = t1;
|
|
181
|
+
$[7] = t2;
|
|
182
|
+
} else t2 = $[7];
|
|
183
|
+
return t2;
|
|
184
|
+
}
|
|
185
|
+
function BreadcrumbSeparator(t0) {
|
|
186
|
+
const $ = c(12);
|
|
187
|
+
let children;
|
|
188
|
+
let className;
|
|
189
|
+
let props;
|
|
190
|
+
if ($[0] !== t0) {
|
|
191
|
+
({children, className, ...props} = t0);
|
|
192
|
+
$[0] = t0;
|
|
193
|
+
$[1] = children;
|
|
194
|
+
$[2] = className;
|
|
195
|
+
$[3] = props;
|
|
196
|
+
} else {
|
|
197
|
+
children = $[1];
|
|
198
|
+
className = $[2];
|
|
199
|
+
props = $[3];
|
|
200
|
+
}
|
|
201
|
+
let t1;
|
|
202
|
+
if ($[4] !== className) {
|
|
203
|
+
t1 = cn("[&>svg]:size-3.5", className);
|
|
204
|
+
$[4] = className;
|
|
205
|
+
$[5] = t1;
|
|
206
|
+
} else t1 = $[5];
|
|
207
|
+
let t2;
|
|
208
|
+
if ($[6] !== children) {
|
|
209
|
+
t2 = children ?? /* @__PURE__ */ jsx(ChevronRight, { className: "[&>svg]:size-3.5" });
|
|
210
|
+
$[6] = children;
|
|
211
|
+
$[7] = t2;
|
|
212
|
+
} else t2 = $[7];
|
|
213
|
+
let t3;
|
|
214
|
+
if ($[8] !== props || $[9] !== t1 || $[10] !== t2) {
|
|
215
|
+
t3 = /* @__PURE__ */ jsx("li", {
|
|
216
|
+
"data-slot": "breadcrumb-separator",
|
|
217
|
+
role: "presentation",
|
|
218
|
+
"aria-hidden": "true",
|
|
219
|
+
className: t1,
|
|
220
|
+
...props,
|
|
221
|
+
children: t2
|
|
222
|
+
});
|
|
223
|
+
$[8] = props;
|
|
224
|
+
$[9] = t1;
|
|
225
|
+
$[10] = t2;
|
|
226
|
+
$[11] = t3;
|
|
227
|
+
} else t3 = $[11];
|
|
228
|
+
return t3;
|
|
229
|
+
}
|
|
230
|
+
function BreadcrumbEllipsis(t0) {
|
|
231
|
+
const $ = c(10);
|
|
232
|
+
let className;
|
|
233
|
+
let props;
|
|
234
|
+
if ($[0] !== t0) {
|
|
235
|
+
({className, ...props} = t0);
|
|
236
|
+
$[0] = t0;
|
|
237
|
+
$[1] = className;
|
|
238
|
+
$[2] = props;
|
|
239
|
+
} else {
|
|
240
|
+
className = $[1];
|
|
241
|
+
props = $[2];
|
|
242
|
+
}
|
|
243
|
+
let t1;
|
|
244
|
+
if ($[3] !== className) {
|
|
245
|
+
t1 = cn("size-5 [&>svg]:size-4 flex items-center justify-center", className);
|
|
246
|
+
$[3] = className;
|
|
247
|
+
$[4] = t1;
|
|
248
|
+
} else t1 = $[4];
|
|
249
|
+
let t2;
|
|
250
|
+
let t3;
|
|
251
|
+
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
252
|
+
t2 = /* @__PURE__ */ jsx(MoreHorizontal, {});
|
|
253
|
+
t3 = /* @__PURE__ */ jsx("span", {
|
|
254
|
+
className: "sr-only",
|
|
255
|
+
children: "More"
|
|
256
|
+
});
|
|
257
|
+
$[5] = t2;
|
|
258
|
+
$[6] = t3;
|
|
259
|
+
} else {
|
|
260
|
+
t2 = $[5];
|
|
261
|
+
t3 = $[6];
|
|
262
|
+
}
|
|
263
|
+
let t4;
|
|
264
|
+
if ($[7] !== props || $[8] !== t1) {
|
|
265
|
+
t4 = /* @__PURE__ */ jsxs("span", {
|
|
266
|
+
"data-slot": "breadcrumb-ellipsis",
|
|
267
|
+
role: "presentation",
|
|
268
|
+
"aria-hidden": "true",
|
|
269
|
+
className: t1,
|
|
270
|
+
...props,
|
|
271
|
+
children: [t2, t3]
|
|
272
|
+
});
|
|
273
|
+
$[7] = props;
|
|
274
|
+
$[8] = t1;
|
|
275
|
+
$[9] = t4;
|
|
276
|
+
} else t4 = $[9];
|
|
277
|
+
return t4;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
//#endregion
|
|
281
|
+
export { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
import { Button as Button$1 } from "@base-ui/react/button";
|
|
3
|
+
import { VariantProps } from "class-variance-authority";
|
|
4
|
+
import * as class_variance_authority_types0 from "class-variance-authority/types";
|
|
5
|
+
|
|
6
|
+
//#region src/ui/button.d.ts
|
|
7
|
+
declare const buttonVariants: (props?: ({
|
|
8
|
+
variant?: "link" | "default" | "outline" | "secondary" | "ghost" | "destructive" | null | undefined;
|
|
9
|
+
size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
10
|
+
} & class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
11
|
+
declare function Button({
|
|
12
|
+
className,
|
|
13
|
+
variant,
|
|
14
|
+
size,
|
|
15
|
+
...props
|
|
16
|
+
}: Button$1.Props & VariantProps<typeof buttonVariants>): react_jsx_runtime0.JSX.Element;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { cn } from "../lib/utils.mjs";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
4
|
+
import { Button as Button$1 } from "@base-ui/react/button";
|
|
5
|
+
import { cva } from "class-variance-authority";
|
|
6
|
+
|
|
7
|
+
//#region src/ui/button.tsx
|
|
8
|
+
const buttonVariants = cva("focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-lg border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-[3px] aria-invalid:ring-[3px] [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none", {
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
|
|
12
|
+
outline: "border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground",
|
|
13
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
14
|
+
ghost: "hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground",
|
|
15
|
+
destructive: "bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30",
|
|
16
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
17
|
+
},
|
|
18
|
+
size: {
|
|
19
|
+
"default": "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
20
|
+
"xs": "h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",
|
|
21
|
+
"sm": "h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
|
|
22
|
+
"lg": "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",
|
|
23
|
+
"icon": "size-8",
|
|
24
|
+
"icon-xs": "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
|
|
25
|
+
"icon-sm": "size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
|
|
26
|
+
"icon-lg": "size-9"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
defaultVariants: {
|
|
30
|
+
variant: "default",
|
|
31
|
+
size: "default"
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
function Button(t0) {
|
|
35
|
+
const $ = c(12);
|
|
36
|
+
let className;
|
|
37
|
+
let props;
|
|
38
|
+
let t1;
|
|
39
|
+
let t2;
|
|
40
|
+
if ($[0] !== t0) {
|
|
41
|
+
({className, variant: t1, size: t2, ...props} = t0);
|
|
42
|
+
$[0] = t0;
|
|
43
|
+
$[1] = className;
|
|
44
|
+
$[2] = props;
|
|
45
|
+
$[3] = t1;
|
|
46
|
+
$[4] = t2;
|
|
47
|
+
} else {
|
|
48
|
+
className = $[1];
|
|
49
|
+
props = $[2];
|
|
50
|
+
t1 = $[3];
|
|
51
|
+
t2 = $[4];
|
|
52
|
+
}
|
|
53
|
+
const variant = t1 === void 0 ? "default" : t1;
|
|
54
|
+
const size = t2 === void 0 ? "default" : t2;
|
|
55
|
+
let t3;
|
|
56
|
+
if ($[5] !== className || $[6] !== size || $[7] !== variant) {
|
|
57
|
+
t3 = cn(buttonVariants({
|
|
58
|
+
variant,
|
|
59
|
+
size,
|
|
60
|
+
className
|
|
61
|
+
}));
|
|
62
|
+
$[5] = className;
|
|
63
|
+
$[6] = size;
|
|
64
|
+
$[7] = variant;
|
|
65
|
+
$[8] = t3;
|
|
66
|
+
} else t3 = $[8];
|
|
67
|
+
let t4;
|
|
68
|
+
if ($[9] !== props || $[10] !== t3) {
|
|
69
|
+
t4 = /* @__PURE__ */ jsx(Button$1, {
|
|
70
|
+
"data-slot": "button",
|
|
71
|
+
className: t3,
|
|
72
|
+
...props
|
|
73
|
+
});
|
|
74
|
+
$[9] = props;
|
|
75
|
+
$[10] = t3;
|
|
76
|
+
$[11] = t4;
|
|
77
|
+
} else t4 = $[11];
|
|
78
|
+
return t4;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
//#endregion
|
|
82
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/ui/card.d.ts
|
|
5
|
+
declare function Card({
|
|
6
|
+
className,
|
|
7
|
+
size,
|
|
8
|
+
...props
|
|
9
|
+
}: React.ComponentProps<"div"> & {
|
|
10
|
+
size?: "default" | "sm";
|
|
11
|
+
}): react_jsx_runtime0.JSX.Element;
|
|
12
|
+
declare function CardHeader({
|
|
13
|
+
className,
|
|
14
|
+
...props
|
|
15
|
+
}: React.ComponentProps<"div">): react_jsx_runtime0.JSX.Element;
|
|
16
|
+
declare function CardTitle({
|
|
17
|
+
className,
|
|
18
|
+
...props
|
|
19
|
+
}: React.ComponentProps<"div">): react_jsx_runtime0.JSX.Element;
|
|
20
|
+
declare function CardDescription({
|
|
21
|
+
className,
|
|
22
|
+
...props
|
|
23
|
+
}: React.ComponentProps<"div">): react_jsx_runtime0.JSX.Element;
|
|
24
|
+
declare function CardAction({
|
|
25
|
+
className,
|
|
26
|
+
...props
|
|
27
|
+
}: React.ComponentProps<"div">): react_jsx_runtime0.JSX.Element;
|
|
28
|
+
declare function CardContent({
|
|
29
|
+
className,
|
|
30
|
+
...props
|
|
31
|
+
}: React.ComponentProps<"div">): react_jsx_runtime0.JSX.Element;
|
|
32
|
+
declare function CardFooter({
|
|
33
|
+
className,
|
|
34
|
+
...props
|
|
35
|
+
}: React.ComponentProps<"div">): react_jsx_runtime0.JSX.Element;
|
|
36
|
+
//#endregion
|
|
37
|
+
export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
|
package/dist/ui/card.mjs
ADDED
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import { cn } from "../lib/utils.mjs";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { c } from "react/compiler-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/ui/card.tsx
|
|
7
|
+
function Card(t0) {
|
|
8
|
+
const $ = c(10);
|
|
9
|
+
let className;
|
|
10
|
+
let props;
|
|
11
|
+
let t1;
|
|
12
|
+
if ($[0] !== t0) {
|
|
13
|
+
({className, size: t1, ...props} = t0);
|
|
14
|
+
$[0] = t0;
|
|
15
|
+
$[1] = className;
|
|
16
|
+
$[2] = props;
|
|
17
|
+
$[3] = t1;
|
|
18
|
+
} else {
|
|
19
|
+
className = $[1];
|
|
20
|
+
props = $[2];
|
|
21
|
+
t1 = $[3];
|
|
22
|
+
}
|
|
23
|
+
const size = t1 === void 0 ? "default" : t1;
|
|
24
|
+
let t2;
|
|
25
|
+
if ($[4] !== className) {
|
|
26
|
+
t2 = cn("ring-foreground/10 bg-card text-card-foreground gap-4 overflow-hidden rounded-xl py-4 text-sm ring-1 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl group/card flex flex-col", className);
|
|
27
|
+
$[4] = className;
|
|
28
|
+
$[5] = t2;
|
|
29
|
+
} else t2 = $[5];
|
|
30
|
+
let t3;
|
|
31
|
+
if ($[6] !== props || $[7] !== size || $[8] !== t2) {
|
|
32
|
+
t3 = /* @__PURE__ */ jsx("div", {
|
|
33
|
+
"data-slot": "card",
|
|
34
|
+
"data-size": size,
|
|
35
|
+
className: t2,
|
|
36
|
+
...props
|
|
37
|
+
});
|
|
38
|
+
$[6] = props;
|
|
39
|
+
$[7] = size;
|
|
40
|
+
$[8] = t2;
|
|
41
|
+
$[9] = t3;
|
|
42
|
+
} else t3 = $[9];
|
|
43
|
+
return t3;
|
|
44
|
+
}
|
|
45
|
+
function CardHeader(t0) {
|
|
46
|
+
const $ = c(8);
|
|
47
|
+
let className;
|
|
48
|
+
let props;
|
|
49
|
+
if ($[0] !== t0) {
|
|
50
|
+
({className, ...props} = t0);
|
|
51
|
+
$[0] = t0;
|
|
52
|
+
$[1] = className;
|
|
53
|
+
$[2] = props;
|
|
54
|
+
} else {
|
|
55
|
+
className = $[1];
|
|
56
|
+
props = $[2];
|
|
57
|
+
}
|
|
58
|
+
let t1;
|
|
59
|
+
if ($[3] !== className) {
|
|
60
|
+
t1 = cn("gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3 group/card-header @container/card-header grid auto-rows-min items-start has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto]", className);
|
|
61
|
+
$[3] = className;
|
|
62
|
+
$[4] = t1;
|
|
63
|
+
} else t1 = $[4];
|
|
64
|
+
let t2;
|
|
65
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
66
|
+
t2 = /* @__PURE__ */ jsx("div", {
|
|
67
|
+
"data-slot": "card-header",
|
|
68
|
+
className: t1,
|
|
69
|
+
...props
|
|
70
|
+
});
|
|
71
|
+
$[5] = props;
|
|
72
|
+
$[6] = t1;
|
|
73
|
+
$[7] = t2;
|
|
74
|
+
} else t2 = $[7];
|
|
75
|
+
return t2;
|
|
76
|
+
}
|
|
77
|
+
function CardTitle(t0) {
|
|
78
|
+
const $ = c(8);
|
|
79
|
+
let className;
|
|
80
|
+
let props;
|
|
81
|
+
if ($[0] !== t0) {
|
|
82
|
+
({className, ...props} = t0);
|
|
83
|
+
$[0] = t0;
|
|
84
|
+
$[1] = className;
|
|
85
|
+
$[2] = props;
|
|
86
|
+
} else {
|
|
87
|
+
className = $[1];
|
|
88
|
+
props = $[2];
|
|
89
|
+
}
|
|
90
|
+
let t1;
|
|
91
|
+
if ($[3] !== className) {
|
|
92
|
+
t1 = cn("text-base leading-snug font-medium group-data-[size=sm]/card:text-sm", className);
|
|
93
|
+
$[3] = className;
|
|
94
|
+
$[4] = t1;
|
|
95
|
+
} else t1 = $[4];
|
|
96
|
+
let t2;
|
|
97
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
98
|
+
t2 = /* @__PURE__ */ jsx("div", {
|
|
99
|
+
"data-slot": "card-title",
|
|
100
|
+
className: t1,
|
|
101
|
+
...props
|
|
102
|
+
});
|
|
103
|
+
$[5] = props;
|
|
104
|
+
$[6] = t1;
|
|
105
|
+
$[7] = t2;
|
|
106
|
+
} else t2 = $[7];
|
|
107
|
+
return t2;
|
|
108
|
+
}
|
|
109
|
+
function CardDescription(t0) {
|
|
110
|
+
const $ = c(8);
|
|
111
|
+
let className;
|
|
112
|
+
let props;
|
|
113
|
+
if ($[0] !== t0) {
|
|
114
|
+
({className, ...props} = t0);
|
|
115
|
+
$[0] = t0;
|
|
116
|
+
$[1] = className;
|
|
117
|
+
$[2] = props;
|
|
118
|
+
} else {
|
|
119
|
+
className = $[1];
|
|
120
|
+
props = $[2];
|
|
121
|
+
}
|
|
122
|
+
let t1;
|
|
123
|
+
if ($[3] !== className) {
|
|
124
|
+
t1 = cn("text-muted-foreground text-sm", className);
|
|
125
|
+
$[3] = className;
|
|
126
|
+
$[4] = t1;
|
|
127
|
+
} else t1 = $[4];
|
|
128
|
+
let t2;
|
|
129
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
130
|
+
t2 = /* @__PURE__ */ jsx("div", {
|
|
131
|
+
"data-slot": "card-description",
|
|
132
|
+
className: t1,
|
|
133
|
+
...props
|
|
134
|
+
});
|
|
135
|
+
$[5] = props;
|
|
136
|
+
$[6] = t1;
|
|
137
|
+
$[7] = t2;
|
|
138
|
+
} else t2 = $[7];
|
|
139
|
+
return t2;
|
|
140
|
+
}
|
|
141
|
+
function CardAction(t0) {
|
|
142
|
+
const $ = c(8);
|
|
143
|
+
let className;
|
|
144
|
+
let props;
|
|
145
|
+
if ($[0] !== t0) {
|
|
146
|
+
({className, ...props} = t0);
|
|
147
|
+
$[0] = t0;
|
|
148
|
+
$[1] = className;
|
|
149
|
+
$[2] = props;
|
|
150
|
+
} else {
|
|
151
|
+
className = $[1];
|
|
152
|
+
props = $[2];
|
|
153
|
+
}
|
|
154
|
+
let t1;
|
|
155
|
+
if ($[3] !== className) {
|
|
156
|
+
t1 = cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className);
|
|
157
|
+
$[3] = className;
|
|
158
|
+
$[4] = t1;
|
|
159
|
+
} else t1 = $[4];
|
|
160
|
+
let t2;
|
|
161
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
162
|
+
t2 = /* @__PURE__ */ jsx("div", {
|
|
163
|
+
"data-slot": "card-action",
|
|
164
|
+
className: t1,
|
|
165
|
+
...props
|
|
166
|
+
});
|
|
167
|
+
$[5] = props;
|
|
168
|
+
$[6] = t1;
|
|
169
|
+
$[7] = t2;
|
|
170
|
+
} else t2 = $[7];
|
|
171
|
+
return t2;
|
|
172
|
+
}
|
|
173
|
+
function CardContent(t0) {
|
|
174
|
+
const $ = c(8);
|
|
175
|
+
let className;
|
|
176
|
+
let props;
|
|
177
|
+
if ($[0] !== t0) {
|
|
178
|
+
({className, ...props} = t0);
|
|
179
|
+
$[0] = t0;
|
|
180
|
+
$[1] = className;
|
|
181
|
+
$[2] = props;
|
|
182
|
+
} else {
|
|
183
|
+
className = $[1];
|
|
184
|
+
props = $[2];
|
|
185
|
+
}
|
|
186
|
+
let t1;
|
|
187
|
+
if ($[3] !== className) {
|
|
188
|
+
t1 = cn("px-4 group-data-[size=sm]/card:px-3", className);
|
|
189
|
+
$[3] = className;
|
|
190
|
+
$[4] = t1;
|
|
191
|
+
} else t1 = $[4];
|
|
192
|
+
let t2;
|
|
193
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
194
|
+
t2 = /* @__PURE__ */ jsx("div", {
|
|
195
|
+
"data-slot": "card-content",
|
|
196
|
+
className: t1,
|
|
197
|
+
...props
|
|
198
|
+
});
|
|
199
|
+
$[5] = props;
|
|
200
|
+
$[6] = t1;
|
|
201
|
+
$[7] = t2;
|
|
202
|
+
} else t2 = $[7];
|
|
203
|
+
return t2;
|
|
204
|
+
}
|
|
205
|
+
function CardFooter(t0) {
|
|
206
|
+
const $ = c(8);
|
|
207
|
+
let className;
|
|
208
|
+
let props;
|
|
209
|
+
if ($[0] !== t0) {
|
|
210
|
+
({className, ...props} = t0);
|
|
211
|
+
$[0] = t0;
|
|
212
|
+
$[1] = className;
|
|
213
|
+
$[2] = props;
|
|
214
|
+
} else {
|
|
215
|
+
className = $[1];
|
|
216
|
+
props = $[2];
|
|
217
|
+
}
|
|
218
|
+
let t1;
|
|
219
|
+
if ($[3] !== className) {
|
|
220
|
+
t1 = cn("bg-muted/50 rounded-b-xl border-t p-4 group-data-[size=sm]/card:p-3 flex items-center", className);
|
|
221
|
+
$[3] = className;
|
|
222
|
+
$[4] = t1;
|
|
223
|
+
} else t1 = $[4];
|
|
224
|
+
let t2;
|
|
225
|
+
if ($[5] !== props || $[6] !== t1) {
|
|
226
|
+
t2 = /* @__PURE__ */ jsx("div", {
|
|
227
|
+
"data-slot": "card-footer",
|
|
228
|
+
className: t1,
|
|
229
|
+
...props
|
|
230
|
+
});
|
|
231
|
+
$[5] = props;
|
|
232
|
+
$[6] = t1;
|
|
233
|
+
$[7] = t2;
|
|
234
|
+
} else t2 = $[7];
|
|
235
|
+
return t2;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
//#endregion
|
|
239
|
+
export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
|
+
import { Checkbox as Checkbox$1 } from "@base-ui/react/checkbox";
|
|
3
|
+
|
|
4
|
+
//#region src/ui/checkbox.d.ts
|
|
5
|
+
declare function Checkbox({
|
|
6
|
+
className,
|
|
7
|
+
...props
|
|
8
|
+
}: Checkbox$1.Root.Props): react_jsx_runtime0.JSX.Element;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { Checkbox };
|