@conscia-labs/design-system 0.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/LICENSE +21 -0
- package/README.md +488 -0
- package/dist/card-DqFHjLjm.d.ts +22 -0
- package/dist/chunk-5MGPU2JE.js +1764 -0
- package/dist/chunk-5MGPU2JE.js.map +1 -0
- package/dist/chunk-CU3OXBFI.js +664 -0
- package/dist/chunk-CU3OXBFI.js.map +1 -0
- package/dist/chunk-D5LYROOM.js +15 -0
- package/dist/chunk-D5LYROOM.js.map +1 -0
- package/dist/chunk-JU5DQXFC.js +11 -0
- package/dist/chunk-JU5DQXFC.js.map +1 -0
- package/dist/chunk-OX4SN5WX.js +1 -0
- package/dist/chunk-OX4SN5WX.js.map +1 -0
- package/dist/chunk-YHPZ5CQU.js +937 -0
- package/dist/chunk-YHPZ5CQU.js.map +1 -0
- package/dist/foundation/index.d.ts +7 -0
- package/dist/foundation/index.js +12 -0
- package/dist/foundation/index.js.map +1 -0
- package/dist/foundation.css +432 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +355 -0
- package/dist/index.js.map +1 -0
- package/dist/patterns/index.d.ts +317 -0
- package/dist/patterns/index.js +109 -0
- package/dist/patterns/index.js.map +1 -0
- package/dist/primitives/index.d.ts +239 -0
- package/dist/primitives/index.js +244 -0
- package/dist/primitives/index.js.map +1 -0
- package/dist/standalone.css +2 -0
- package/dist/styles.css +432 -0
- package/dist/tailwind.css +8 -0
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/index.js +7 -0
- package/dist/utils/index.js.map +1 -0
- package/package.json +150 -0
|
@@ -0,0 +1,937 @@
|
|
|
1
|
+
import {
|
|
2
|
+
cn
|
|
3
|
+
} from "./chunk-JU5DQXFC.js";
|
|
4
|
+
|
|
5
|
+
// src/primitives/button.tsx
|
|
6
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
7
|
+
import { cva } from "class-variance-authority";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
|
+
var buttonVariants = cva(
|
|
10
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
11
|
+
{
|
|
12
|
+
variants: {
|
|
13
|
+
variant: {
|
|
14
|
+
default: "bg-primary text-primary-foreground shadow-xs hover:bg-accent-hover active:bg-accent-active",
|
|
15
|
+
destructive: "bg-danger text-white shadow-xs hover:bg-danger/90 focus-visible:ring-danger/20 dark:focus-visible:ring-danger/40",
|
|
16
|
+
outline: "border border-border-default bg-background shadow-xs hover:bg-surface-muted hover:text-foreground",
|
|
17
|
+
secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
|
|
18
|
+
ghost: "hover:bg-surface-muted hover:text-foreground",
|
|
19
|
+
link: "text-text-link underline-offset-4 hover:underline"
|
|
20
|
+
},
|
|
21
|
+
size: {
|
|
22
|
+
default: "h-[var(--ds-control-height)] px-3 py-2 has-[>svg]:px-3",
|
|
23
|
+
sm: "h-[var(--ds-control-height-sm)] rounded-md gap-1.5 px-2.5 has-[>svg]:px-2",
|
|
24
|
+
lg: "h-[var(--ds-control-height-lg)] rounded-md px-4 has-[>svg]:px-3.5",
|
|
25
|
+
icon: "size-[var(--ds-control-height)]"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
defaultVariants: {
|
|
29
|
+
variant: "default",
|
|
30
|
+
size: "default"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
function Button({
|
|
35
|
+
className,
|
|
36
|
+
variant,
|
|
37
|
+
size,
|
|
38
|
+
asChild = false,
|
|
39
|
+
type,
|
|
40
|
+
...props
|
|
41
|
+
}) {
|
|
42
|
+
const Comp = asChild ? Slot : "button";
|
|
43
|
+
return /* @__PURE__ */ jsx(
|
|
44
|
+
Comp,
|
|
45
|
+
{
|
|
46
|
+
"data-slot": "button",
|
|
47
|
+
type: asChild ? void 0 : type ?? "button",
|
|
48
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
49
|
+
...props
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// src/primitives/checkbox.tsx
|
|
55
|
+
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
56
|
+
import { CheckIcon } from "lucide-react";
|
|
57
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
58
|
+
function Checkbox({
|
|
59
|
+
className,
|
|
60
|
+
...props
|
|
61
|
+
}) {
|
|
62
|
+
return /* @__PURE__ */ jsx2(
|
|
63
|
+
CheckboxPrimitive.Root,
|
|
64
|
+
{
|
|
65
|
+
"data-slot": "checkbox",
|
|
66
|
+
className: cn(
|
|
67
|
+
"peer size-4 shrink-0 rounded-[4px] border border-input shadow-xs transition-shadow outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-danger aria-invalid:ring-danger/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-input/30 dark:aria-invalid:ring-danger/40 dark:data-[state=checked]:bg-primary",
|
|
68
|
+
className
|
|
69
|
+
),
|
|
70
|
+
...props,
|
|
71
|
+
children: /* @__PURE__ */ jsx2(CheckboxPrimitive.Indicator, { "data-slot": "checkbox-indicator", className: "grid place-content-center text-current transition-none", children: /* @__PURE__ */ jsx2(CheckIcon, { className: "size-3.5" }) })
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// src/primitives/table.tsx
|
|
77
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
78
|
+
function Table({ className, ...props }) {
|
|
79
|
+
return /* @__PURE__ */ jsx3("div", { "data-slot": "table-container", className: "relative w-full overflow-x-auto", children: /* @__PURE__ */ jsx3("table", { "data-slot": "table", className: cn("w-full caption-bottom text-sm", className), ...props }) });
|
|
80
|
+
}
|
|
81
|
+
function TableHeader({ className, ...props }) {
|
|
82
|
+
return /* @__PURE__ */ jsx3("thead", { "data-slot": "table-header", className: cn("[&_tr]:border-b [&_tr]:border-border-subtle", className), ...props });
|
|
83
|
+
}
|
|
84
|
+
function TableBody({ className, ...props }) {
|
|
85
|
+
return /* @__PURE__ */ jsx3("tbody", { "data-slot": "table-body", className: cn("[&_tr:last-child]:border-0", className), ...props });
|
|
86
|
+
}
|
|
87
|
+
function TableRow({ className, ...props }) {
|
|
88
|
+
return /* @__PURE__ */ jsx3(
|
|
89
|
+
"tr",
|
|
90
|
+
{
|
|
91
|
+
"data-slot": "table-row",
|
|
92
|
+
className: cn("h-[var(--ds-row-height)] border-b border-border-subtle transition-colors hover:bg-surface-muted/70 data-[state=selected]:bg-accent-background", className),
|
|
93
|
+
...props
|
|
94
|
+
}
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
function TableHead({ className, ...props }) {
|
|
98
|
+
return /* @__PURE__ */ jsx3(
|
|
99
|
+
"th",
|
|
100
|
+
{
|
|
101
|
+
"data-slot": "table-head",
|
|
102
|
+
className: cn("h-[var(--ds-table-header-height)] whitespace-nowrap px-3 text-left align-middle text-[var(--ds-metadata)] font-semibold uppercase text-muted-foreground", className),
|
|
103
|
+
...props
|
|
104
|
+
}
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
function TableCell({ className, ...props }) {
|
|
108
|
+
return /* @__PURE__ */ jsx3("td", { "data-slot": "table-cell", className: cn("whitespace-nowrap px-3 py-2 align-middle text-sm", className), ...props });
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// src/primitives/select.tsx
|
|
112
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
113
|
+
import { CheckIcon as CheckIcon2, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
114
|
+
import { jsx as jsx4, jsxs } from "react/jsx-runtime";
|
|
115
|
+
function Select({ ...props }) {
|
|
116
|
+
return /* @__PURE__ */ jsx4(SelectPrimitive.Root, { "data-slot": "select", ...props });
|
|
117
|
+
}
|
|
118
|
+
function SelectGroup({ ...props }) {
|
|
119
|
+
return /* @__PURE__ */ jsx4(SelectPrimitive.Group, { "data-slot": "select-group", ...props });
|
|
120
|
+
}
|
|
121
|
+
function SelectValue({ ...props }) {
|
|
122
|
+
return /* @__PURE__ */ jsx4(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
|
|
123
|
+
}
|
|
124
|
+
function SelectTrigger({
|
|
125
|
+
className,
|
|
126
|
+
size = "default",
|
|
127
|
+
children,
|
|
128
|
+
...props
|
|
129
|
+
}) {
|
|
130
|
+
return /* @__PURE__ */ jsxs(
|
|
131
|
+
SelectPrimitive.Trigger,
|
|
132
|
+
{
|
|
133
|
+
"data-slot": "select-trigger",
|
|
134
|
+
"data-size": size,
|
|
135
|
+
className: cn(
|
|
136
|
+
"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-danger/20 aria-invalid:border-danger flex w-fit items-center justify-between gap-2 rounded-[var(--ds-field-control-radius)] border bg-card px-[var(--ds-field-control-padding-x)] py-2 text-sm whitespace-nowrap shadow-none transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[var(--ds-field-control-height)] data-[size=sm]:h-[var(--ds-control-height-sm)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 dark:aria-invalid:ring-danger/40",
|
|
137
|
+
className
|
|
138
|
+
),
|
|
139
|
+
...props,
|
|
140
|
+
children: [
|
|
141
|
+
children,
|
|
142
|
+
/* @__PURE__ */ jsx4(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx4(ChevronDownIcon, { className: "size-4 opacity-50" }) })
|
|
143
|
+
]
|
|
144
|
+
}
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
function SelectContent({
|
|
148
|
+
className,
|
|
149
|
+
children,
|
|
150
|
+
position = "popper",
|
|
151
|
+
...props
|
|
152
|
+
}) {
|
|
153
|
+
return /* @__PURE__ */ jsx4(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
|
|
154
|
+
SelectPrimitive.Content,
|
|
155
|
+
{
|
|
156
|
+
"data-slot": "select-content",
|
|
157
|
+
className: cn(
|
|
158
|
+
"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
|
|
159
|
+
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
160
|
+
className
|
|
161
|
+
),
|
|
162
|
+
position,
|
|
163
|
+
...props,
|
|
164
|
+
children: [
|
|
165
|
+
/* @__PURE__ */ jsx4(SelectScrollUpButton, {}),
|
|
166
|
+
/* @__PURE__ */ jsx4(
|
|
167
|
+
SelectPrimitive.Viewport,
|
|
168
|
+
{
|
|
169
|
+
className: cn(
|
|
170
|
+
"p-1",
|
|
171
|
+
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
|
|
172
|
+
),
|
|
173
|
+
children
|
|
174
|
+
}
|
|
175
|
+
),
|
|
176
|
+
/* @__PURE__ */ jsx4(SelectScrollDownButton, {})
|
|
177
|
+
]
|
|
178
|
+
}
|
|
179
|
+
) });
|
|
180
|
+
}
|
|
181
|
+
function SelectItem({
|
|
182
|
+
className,
|
|
183
|
+
children,
|
|
184
|
+
...props
|
|
185
|
+
}) {
|
|
186
|
+
return /* @__PURE__ */ jsxs(
|
|
187
|
+
SelectPrimitive.Item,
|
|
188
|
+
{
|
|
189
|
+
"data-slot": "select-item",
|
|
190
|
+
className: cn(
|
|
191
|
+
"focus:bg-surface-muted focus:text-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-[length:var(--ds-menu-item-size)] outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
192
|
+
className
|
|
193
|
+
),
|
|
194
|
+
...props,
|
|
195
|
+
children: [
|
|
196
|
+
/* @__PURE__ */ jsx4("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ jsx4(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx4(CheckIcon2, { className: "size-4" }) }) }),
|
|
197
|
+
/* @__PURE__ */ jsx4(SelectPrimitive.ItemText, { children })
|
|
198
|
+
]
|
|
199
|
+
}
|
|
200
|
+
);
|
|
201
|
+
}
|
|
202
|
+
function SelectLabel({
|
|
203
|
+
className,
|
|
204
|
+
...props
|
|
205
|
+
}) {
|
|
206
|
+
return /* @__PURE__ */ jsx4(
|
|
207
|
+
SelectPrimitive.Label,
|
|
208
|
+
{
|
|
209
|
+
"data-slot": "select-label",
|
|
210
|
+
className: cn("text-muted-foreground px-2 py-1.5 text-[length:var(--ds-menu-label-size)]", className),
|
|
211
|
+
...props
|
|
212
|
+
}
|
|
213
|
+
);
|
|
214
|
+
}
|
|
215
|
+
function SelectSeparator({
|
|
216
|
+
className,
|
|
217
|
+
...props
|
|
218
|
+
}) {
|
|
219
|
+
return /* @__PURE__ */ jsx4(
|
|
220
|
+
SelectPrimitive.Separator,
|
|
221
|
+
{
|
|
222
|
+
"data-slot": "select-separator",
|
|
223
|
+
className: cn("bg-border pointer-events-none -mx-1 my-1 h-px", className),
|
|
224
|
+
...props
|
|
225
|
+
}
|
|
226
|
+
);
|
|
227
|
+
}
|
|
228
|
+
function SelectScrollUpButton({ className, ...props }) {
|
|
229
|
+
return /* @__PURE__ */ jsx4(SelectPrimitive.ScrollUpButton, { "data-slot": "select-scroll-up-button", className: cn("flex cursor-default items-center justify-center py-1", className), ...props, children: /* @__PURE__ */ jsx4(ChevronUpIcon, { className: "size-4" }) });
|
|
230
|
+
}
|
|
231
|
+
function SelectScrollDownButton({ className, ...props }) {
|
|
232
|
+
return /* @__PURE__ */ jsx4(SelectPrimitive.ScrollDownButton, { "data-slot": "select-scroll-down-button", className: cn("flex cursor-default items-center justify-center py-1", className), ...props, children: /* @__PURE__ */ jsx4(ChevronDownIcon, { className: "size-4" }) });
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
// src/primitives/separator.tsx
|
|
236
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
237
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
238
|
+
function Separator2({
|
|
239
|
+
className,
|
|
240
|
+
orientation = "horizontal",
|
|
241
|
+
decorative = true,
|
|
242
|
+
...props
|
|
243
|
+
}) {
|
|
244
|
+
return /* @__PURE__ */ jsx5(
|
|
245
|
+
SeparatorPrimitive.Root,
|
|
246
|
+
{
|
|
247
|
+
"data-slot": "separator",
|
|
248
|
+
decorative,
|
|
249
|
+
orientation,
|
|
250
|
+
className: cn(
|
|
251
|
+
"shrink-0 bg-border-subtle data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
|
252
|
+
className
|
|
253
|
+
),
|
|
254
|
+
...props
|
|
255
|
+
}
|
|
256
|
+
);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
// src/primitives/sheet.tsx
|
|
260
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
261
|
+
import { XIcon } from "lucide-react";
|
|
262
|
+
import { jsx as jsx6, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
263
|
+
function Sheet({ ...props }) {
|
|
264
|
+
return /* @__PURE__ */ jsx6(DialogPrimitive.Root, { "data-slot": "sheet", ...props });
|
|
265
|
+
}
|
|
266
|
+
function SheetTrigger({
|
|
267
|
+
...props
|
|
268
|
+
}) {
|
|
269
|
+
return /* @__PURE__ */ jsx6(DialogPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
|
|
270
|
+
}
|
|
271
|
+
function SheetPortal({
|
|
272
|
+
...props
|
|
273
|
+
}) {
|
|
274
|
+
return /* @__PURE__ */ jsx6(DialogPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
|
|
275
|
+
}
|
|
276
|
+
function SheetClose({
|
|
277
|
+
...props
|
|
278
|
+
}) {
|
|
279
|
+
return /* @__PURE__ */ jsx6(DialogPrimitive.Close, { "data-slot": "sheet-close", ...props });
|
|
280
|
+
}
|
|
281
|
+
function SheetOverlay({
|
|
282
|
+
className,
|
|
283
|
+
...props
|
|
284
|
+
}) {
|
|
285
|
+
return /* @__PURE__ */ jsx6(
|
|
286
|
+
DialogPrimitive.Overlay,
|
|
287
|
+
{
|
|
288
|
+
"data-slot": "sheet-overlay",
|
|
289
|
+
className: cn("fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", className),
|
|
290
|
+
...props
|
|
291
|
+
}
|
|
292
|
+
);
|
|
293
|
+
}
|
|
294
|
+
var sheetSideClasses = {
|
|
295
|
+
top: "inset-x-0 top-0 h-auto border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",
|
|
296
|
+
right: "right-0 top-0 h-full max-w-md border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-lg",
|
|
297
|
+
bottom: "inset-x-0 bottom-0 h-auto border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",
|
|
298
|
+
left: "left-0 top-0 h-full max-w-md border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-lg"
|
|
299
|
+
};
|
|
300
|
+
function SheetContent({
|
|
301
|
+
className,
|
|
302
|
+
children,
|
|
303
|
+
side = "right",
|
|
304
|
+
closeLabel = "Close",
|
|
305
|
+
...props
|
|
306
|
+
}) {
|
|
307
|
+
return /* @__PURE__ */ jsxs2(SheetPortal, { children: [
|
|
308
|
+
/* @__PURE__ */ jsx6(SheetOverlay, {}),
|
|
309
|
+
/* @__PURE__ */ jsxs2(
|
|
310
|
+
DialogPrimitive.Content,
|
|
311
|
+
{
|
|
312
|
+
"data-slot": "sheet-content",
|
|
313
|
+
className: cn(
|
|
314
|
+
"fixed z-50 flex w-full flex-col gap-6 bg-background p-6 text-foreground shadow-lg outline-none data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
315
|
+
sheetSideClasses[side],
|
|
316
|
+
className
|
|
317
|
+
),
|
|
318
|
+
...props,
|
|
319
|
+
children: [
|
|
320
|
+
children,
|
|
321
|
+
/* @__PURE__ */ jsxs2(
|
|
322
|
+
DialogPrimitive.Close,
|
|
323
|
+
{
|
|
324
|
+
"data-slot": "sheet-close",
|
|
325
|
+
className: "absolute right-4 top-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-offset-background disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
326
|
+
children: [
|
|
327
|
+
/* @__PURE__ */ jsx6(XIcon, {}),
|
|
328
|
+
/* @__PURE__ */ jsx6("span", { className: "sr-only", children: closeLabel })
|
|
329
|
+
]
|
|
330
|
+
}
|
|
331
|
+
)
|
|
332
|
+
]
|
|
333
|
+
}
|
|
334
|
+
)
|
|
335
|
+
] });
|
|
336
|
+
}
|
|
337
|
+
function SheetHeader({ className, ...props }) {
|
|
338
|
+
return /* @__PURE__ */ jsx6("div", { "data-slot": "sheet-header", className: cn("grid gap-2 pr-8", className), ...props });
|
|
339
|
+
}
|
|
340
|
+
function SheetTitle({
|
|
341
|
+
className,
|
|
342
|
+
...props
|
|
343
|
+
}) {
|
|
344
|
+
return /* @__PURE__ */ jsx6(
|
|
345
|
+
DialogPrimitive.Title,
|
|
346
|
+
{
|
|
347
|
+
"data-slot": "sheet-title",
|
|
348
|
+
className: cn("text-lg font-semibold leading-tight", className),
|
|
349
|
+
...props
|
|
350
|
+
}
|
|
351
|
+
);
|
|
352
|
+
}
|
|
353
|
+
function SheetDescription({
|
|
354
|
+
className,
|
|
355
|
+
...props
|
|
356
|
+
}) {
|
|
357
|
+
return /* @__PURE__ */ jsx6(
|
|
358
|
+
DialogPrimitive.Description,
|
|
359
|
+
{
|
|
360
|
+
"data-slot": "sheet-description",
|
|
361
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
362
|
+
...props
|
|
363
|
+
}
|
|
364
|
+
);
|
|
365
|
+
}
|
|
366
|
+
function SheetBody({ className, ...props }) {
|
|
367
|
+
return /* @__PURE__ */ jsx6(
|
|
368
|
+
"div",
|
|
369
|
+
{
|
|
370
|
+
"data-slot": "sheet-body",
|
|
371
|
+
className: cn("flex min-h-0 flex-1 flex-col gap-[var(--ds-space-group)] overflow-y-auto pr-1", className),
|
|
372
|
+
...props
|
|
373
|
+
}
|
|
374
|
+
);
|
|
375
|
+
}
|
|
376
|
+
function SheetFooter({ className, ...props }) {
|
|
377
|
+
return /* @__PURE__ */ jsx6(
|
|
378
|
+
"div",
|
|
379
|
+
{
|
|
380
|
+
"data-slot": "sheet-footer",
|
|
381
|
+
className: cn("mt-auto flex flex-wrap items-center justify-between gap-2 border-t border-border-subtle pt-4", className),
|
|
382
|
+
...props
|
|
383
|
+
}
|
|
384
|
+
);
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
// src/primitives/tooltip.tsx
|
|
388
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
389
|
+
import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
390
|
+
function TooltipProvider({ delayDuration = 150, ...props }) {
|
|
391
|
+
return /* @__PURE__ */ jsx7(TooltipPrimitive.Provider, { "data-slot": "tooltip-provider", delayDuration, ...props });
|
|
392
|
+
}
|
|
393
|
+
function Tooltip({ ...props }) {
|
|
394
|
+
return /* @__PURE__ */ jsx7(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props });
|
|
395
|
+
}
|
|
396
|
+
function TooltipTrigger({ ...props }) {
|
|
397
|
+
return /* @__PURE__ */ jsx7(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
|
|
398
|
+
}
|
|
399
|
+
function TooltipContent({
|
|
400
|
+
className,
|
|
401
|
+
sideOffset = 6,
|
|
402
|
+
children,
|
|
403
|
+
...props
|
|
404
|
+
}) {
|
|
405
|
+
return /* @__PURE__ */ jsx7(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs3(
|
|
406
|
+
TooltipPrimitive.Content,
|
|
407
|
+
{
|
|
408
|
+
"data-slot": "tooltip-content",
|
|
409
|
+
sideOffset,
|
|
410
|
+
className: cn("z-50 w-fit rounded-md bg-foreground px-3 py-1.5 text-balance text-xs text-background shadow-[var(--ds-shadow-floating)]", className),
|
|
411
|
+
...props,
|
|
412
|
+
children: [
|
|
413
|
+
children,
|
|
414
|
+
/* @__PURE__ */ jsx7(TooltipPrimitive.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground" })
|
|
415
|
+
]
|
|
416
|
+
}
|
|
417
|
+
) });
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
// src/primitives/dialog.tsx
|
|
421
|
+
import * as DialogPrimitive2 from "@radix-ui/react-dialog";
|
|
422
|
+
import { XIcon as XIcon2 } from "lucide-react";
|
|
423
|
+
import { jsx as jsx8, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
424
|
+
function Dialog({ ...props }) {
|
|
425
|
+
return /* @__PURE__ */ jsx8(DialogPrimitive2.Root, { "data-slot": "dialog", ...props });
|
|
426
|
+
}
|
|
427
|
+
function DialogTrigger({ ...props }) {
|
|
428
|
+
return /* @__PURE__ */ jsx8(DialogPrimitive2.Trigger, { "data-slot": "dialog-trigger", ...props });
|
|
429
|
+
}
|
|
430
|
+
function DialogClose({ ...props }) {
|
|
431
|
+
return /* @__PURE__ */ jsx8(DialogPrimitive2.Close, { "data-slot": "dialog-close", ...props });
|
|
432
|
+
}
|
|
433
|
+
function DialogPortal({ ...props }) {
|
|
434
|
+
return /* @__PURE__ */ jsx8(DialogPrimitive2.Portal, { "data-slot": "dialog-portal", ...props });
|
|
435
|
+
}
|
|
436
|
+
function DialogOverlay({ className, ...props }) {
|
|
437
|
+
return /* @__PURE__ */ jsx8(DialogPrimitive2.Overlay, { "data-slot": "dialog-overlay", className: cn("fixed inset-0 z-50 bg-black/50", className), ...props });
|
|
438
|
+
}
|
|
439
|
+
function DialogContent({
|
|
440
|
+
className,
|
|
441
|
+
children,
|
|
442
|
+
showCloseButton = true,
|
|
443
|
+
size = "default",
|
|
444
|
+
closeLabel = "Close",
|
|
445
|
+
...props
|
|
446
|
+
}) {
|
|
447
|
+
return /* @__PURE__ */ jsxs4(DialogPortal, { children: [
|
|
448
|
+
/* @__PURE__ */ jsx8(DialogOverlay, {}),
|
|
449
|
+
/* @__PURE__ */ jsxs4(
|
|
450
|
+
DialogPrimitive2.Content,
|
|
451
|
+
{
|
|
452
|
+
"data-slot": "dialog-content",
|
|
453
|
+
"data-size": size,
|
|
454
|
+
className: cn(
|
|
455
|
+
"fixed left-1/2 top-1/2 z-50 grid max-h-[min(42rem,calc(100vh-2rem))] w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 grid-rows-[auto_minmax(0,1fr)_auto] gap-5 overflow-hidden rounded-lg border bg-background p-5 text-foreground shadow-lg sm:p-6",
|
|
456
|
+
"data-[size=small]:sm:max-w-sm data-[size=default]:sm:max-w-lg data-[size=large]:sm:max-w-3xl",
|
|
457
|
+
className
|
|
458
|
+
),
|
|
459
|
+
...props,
|
|
460
|
+
children: [
|
|
461
|
+
children,
|
|
462
|
+
showCloseButton ? /* @__PURE__ */ jsxs4(
|
|
463
|
+
DialogPrimitive2.Close,
|
|
464
|
+
{
|
|
465
|
+
"data-slot": "dialog-close",
|
|
466
|
+
className: "absolute right-4 top-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:ring-offset-background disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
467
|
+
children: [
|
|
468
|
+
/* @__PURE__ */ jsx8(XIcon2, { className: "size-4" }),
|
|
469
|
+
/* @__PURE__ */ jsx8("span", { className: "sr-only", children: closeLabel })
|
|
470
|
+
]
|
|
471
|
+
}
|
|
472
|
+
) : null
|
|
473
|
+
]
|
|
474
|
+
}
|
|
475
|
+
)
|
|
476
|
+
] });
|
|
477
|
+
}
|
|
478
|
+
function DialogHeader({ className, ...props }) {
|
|
479
|
+
return /* @__PURE__ */ jsx8("div", { "data-slot": "dialog-header", className: cn("flex flex-col gap-2 text-left", className), ...props });
|
|
480
|
+
}
|
|
481
|
+
function DialogTitle({ className, ...props }) {
|
|
482
|
+
return /* @__PURE__ */ jsx8(DialogPrimitive2.Title, { "data-slot": "dialog-title", className: cn("text-base font-semibold leading-none", className), ...props });
|
|
483
|
+
}
|
|
484
|
+
function DialogDescription({ className, ...props }) {
|
|
485
|
+
return /* @__PURE__ */ jsx8(DialogPrimitive2.Description, { "data-slot": "dialog-description", className: cn("text-sm text-muted-foreground", className), ...props });
|
|
486
|
+
}
|
|
487
|
+
function DialogBody({ className, ...props }) {
|
|
488
|
+
return /* @__PURE__ */ jsx8("div", { "data-slot": "dialog-body", className: cn("min-h-0 overflow-y-auto text-sm", className), ...props });
|
|
489
|
+
}
|
|
490
|
+
function DialogFooter({ className, ...props }) {
|
|
491
|
+
return /* @__PURE__ */ jsx8("div", { "data-slot": "dialog-footer", className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className), ...props });
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
// src/primitives/tabs.tsx
|
|
495
|
+
import * as React from "react";
|
|
496
|
+
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
497
|
+
import { Slot as Slot2 } from "@radix-ui/react-slot";
|
|
498
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
499
|
+
var defaultTabsVisualContext = {
|
|
500
|
+
variant: "underline",
|
|
501
|
+
size: "default"
|
|
502
|
+
};
|
|
503
|
+
var TabsRootVisualContext = React.createContext(defaultTabsVisualContext);
|
|
504
|
+
var TabsListVisualContext = React.createContext(defaultTabsVisualContext);
|
|
505
|
+
var tabRailClasses = "flex min-w-0 items-stretch overflow-x-auto overscroll-x-contain border-b border-border-subtle scroll-px-2 snap-x [scrollbar-width:none] [&::-webkit-scrollbar]:hidden";
|
|
506
|
+
var navigationTabClasses = "relative inline-flex h-full shrink-0 snap-start items-center justify-center gap-2 whitespace-nowrap rounded-t-[var(--ds-radius-control)] px-[var(--ds-tab-padding-x)] text-sm font-medium outline-none transition-[background-color,color,box-shadow] duration-150 after:absolute after:inset-x-0 after:bottom-0 after:h-0.5 after:bg-transparent after:transition-colors hover:bg-surface-muted focus-visible:z-10 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring/60 data-[active=false]:text-muted-foreground data-[active=false]:hover:text-foreground data-[active=true]:bg-selection-background data-[active=true]:font-semibold data-[active=true]:text-selection-foreground data-[active=true]:after:bg-selection-indicator";
|
|
507
|
+
function assignRef(ref, value) {
|
|
508
|
+
if (typeof ref === "function") {
|
|
509
|
+
ref(value);
|
|
510
|
+
} else if (ref) {
|
|
511
|
+
ref.current = value;
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
function useHorizontalScrollRail(externalRef) {
|
|
515
|
+
const internalRef = React.useRef(null);
|
|
516
|
+
const [scrollPosition, setScrollPosition] = React.useState("none");
|
|
517
|
+
const updateScrollPosition = React.useCallback(() => {
|
|
518
|
+
const element = internalRef.current;
|
|
519
|
+
if (!element) return;
|
|
520
|
+
const maximumScroll = element.scrollWidth - element.clientWidth;
|
|
521
|
+
const nextPosition = maximumScroll <= 1 ? "none" : element.scrollLeft <= 1 ? "start" : element.scrollLeft >= maximumScroll - 1 ? "end" : "middle";
|
|
522
|
+
setScrollPosition(
|
|
523
|
+
(current) => current === nextPosition ? current : nextPosition
|
|
524
|
+
);
|
|
525
|
+
}, []);
|
|
526
|
+
const ref = React.useCallback(
|
|
527
|
+
(node) => {
|
|
528
|
+
internalRef.current = node;
|
|
529
|
+
assignRef(externalRef, node);
|
|
530
|
+
},
|
|
531
|
+
[externalRef]
|
|
532
|
+
);
|
|
533
|
+
React.useEffect(() => {
|
|
534
|
+
updateScrollPosition();
|
|
535
|
+
const element = internalRef.current;
|
|
536
|
+
if (!element || typeof ResizeObserver === "undefined") return;
|
|
537
|
+
const observer = new ResizeObserver(updateScrollPosition);
|
|
538
|
+
observer.observe(element);
|
|
539
|
+
return () => observer.disconnect();
|
|
540
|
+
}, [updateScrollPosition]);
|
|
541
|
+
return [scrollPosition, ref, updateScrollPosition];
|
|
542
|
+
}
|
|
543
|
+
function Tabs({
|
|
544
|
+
className,
|
|
545
|
+
variant = "underline",
|
|
546
|
+
size = "default",
|
|
547
|
+
...props
|
|
548
|
+
}) {
|
|
549
|
+
return /* @__PURE__ */ jsx9(TabsRootVisualContext.Provider, { value: { variant, size }, children: /* @__PURE__ */ jsx9(
|
|
550
|
+
TabsPrimitive.Root,
|
|
551
|
+
{
|
|
552
|
+
"data-slot": "tabs",
|
|
553
|
+
"data-variant": variant,
|
|
554
|
+
"data-size": size,
|
|
555
|
+
className: cn("flex min-w-0 flex-col gap-2", className),
|
|
556
|
+
...props
|
|
557
|
+
}
|
|
558
|
+
) });
|
|
559
|
+
}
|
|
560
|
+
function TabsList({
|
|
561
|
+
className,
|
|
562
|
+
variant,
|
|
563
|
+
size,
|
|
564
|
+
children,
|
|
565
|
+
ref: externalRef,
|
|
566
|
+
onScroll,
|
|
567
|
+
...props
|
|
568
|
+
}) {
|
|
569
|
+
const rootVisuals = React.useContext(TabsRootVisualContext);
|
|
570
|
+
const resolvedVariant = variant ?? rootVisuals.variant;
|
|
571
|
+
const resolvedSize = size ?? rootVisuals.size;
|
|
572
|
+
const [scrollPosition, scrollRailRef, updateScrollPosition] = useHorizontalScrollRail(externalRef);
|
|
573
|
+
return /* @__PURE__ */ jsx9(
|
|
574
|
+
TabsPrimitive.List,
|
|
575
|
+
{
|
|
576
|
+
"data-slot": "tabs-list",
|
|
577
|
+
"data-variant": resolvedVariant,
|
|
578
|
+
"data-size": resolvedSize,
|
|
579
|
+
"data-scroll-position": resolvedVariant === "underline" ? scrollPosition : void 0,
|
|
580
|
+
ref: scrollRailRef,
|
|
581
|
+
onScroll: (event) => {
|
|
582
|
+
updateScrollPosition();
|
|
583
|
+
onScroll?.(event);
|
|
584
|
+
},
|
|
585
|
+
className: cn(
|
|
586
|
+
"text-muted-foreground",
|
|
587
|
+
resolvedVariant === "underline" && tabRailClasses,
|
|
588
|
+
resolvedVariant === "underline" && (resolvedSize === "compact" ? "h-[var(--ds-tab-rail-height-compact)]" : "h-[var(--ds-tab-rail-height)]"),
|
|
589
|
+
resolvedVariant === "segmented" && "inline-flex h-[var(--ds-control-height)] items-center gap-1 self-start rounded-md bg-surface-muted p-1",
|
|
590
|
+
className
|
|
591
|
+
),
|
|
592
|
+
...props,
|
|
593
|
+
children: /* @__PURE__ */ jsx9(
|
|
594
|
+
TabsListVisualContext.Provider,
|
|
595
|
+
{
|
|
596
|
+
value: { variant: resolvedVariant, size: resolvedSize },
|
|
597
|
+
children
|
|
598
|
+
}
|
|
599
|
+
)
|
|
600
|
+
}
|
|
601
|
+
);
|
|
602
|
+
}
|
|
603
|
+
function TabsTrigger({
|
|
604
|
+
className,
|
|
605
|
+
variant,
|
|
606
|
+
size,
|
|
607
|
+
...props
|
|
608
|
+
}) {
|
|
609
|
+
const listVisuals = React.useContext(TabsListVisualContext);
|
|
610
|
+
const resolvedVariant = variant ?? listVisuals.variant;
|
|
611
|
+
const resolvedSize = size ?? listVisuals.size;
|
|
612
|
+
return /* @__PURE__ */ jsx9(
|
|
613
|
+
TabsPrimitive.Trigger,
|
|
614
|
+
{
|
|
615
|
+
"data-slot": "tabs-trigger",
|
|
616
|
+
"data-variant": resolvedVariant,
|
|
617
|
+
"data-size": resolvedSize,
|
|
618
|
+
className: cn(
|
|
619
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
620
|
+
resolvedVariant === "underline" && cn(
|
|
621
|
+
navigationTabClasses,
|
|
622
|
+
"data-[state=active]:bg-selection-background data-[state=active]:font-semibold data-[state=active]:text-selection-foreground data-[state=active]:after:bg-selection-indicator"
|
|
623
|
+
),
|
|
624
|
+
resolvedVariant === "segmented" && "inline-flex h-full items-center justify-center gap-2 whitespace-nowrap rounded-[calc(var(--ds-radius-control)-2px)] px-3 text-sm font-medium text-muted-foreground outline-none transition-[background-color,color,box-shadow] hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring/60 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-xs",
|
|
625
|
+
className
|
|
626
|
+
),
|
|
627
|
+
...props
|
|
628
|
+
}
|
|
629
|
+
);
|
|
630
|
+
}
|
|
631
|
+
function TabsContent({
|
|
632
|
+
className,
|
|
633
|
+
...props
|
|
634
|
+
}) {
|
|
635
|
+
return /* @__PURE__ */ jsx9(
|
|
636
|
+
TabsPrimitive.Content,
|
|
637
|
+
{
|
|
638
|
+
"data-slot": "tabs-content",
|
|
639
|
+
className: cn(
|
|
640
|
+
"outline-none focus-visible:ring-2 focus-visible:ring-ring/50",
|
|
641
|
+
className
|
|
642
|
+
),
|
|
643
|
+
...props
|
|
644
|
+
}
|
|
645
|
+
);
|
|
646
|
+
}
|
|
647
|
+
function NavigationTabs({
|
|
648
|
+
className,
|
|
649
|
+
...props
|
|
650
|
+
}) {
|
|
651
|
+
return /* @__PURE__ */ jsx9(
|
|
652
|
+
"nav",
|
|
653
|
+
{
|
|
654
|
+
"data-slot": "navigation-tabs",
|
|
655
|
+
className: cn("min-w-0", className),
|
|
656
|
+
...props
|
|
657
|
+
}
|
|
658
|
+
);
|
|
659
|
+
}
|
|
660
|
+
function NavigationTabsList({
|
|
661
|
+
className,
|
|
662
|
+
ref: externalRef,
|
|
663
|
+
onScroll,
|
|
664
|
+
...props
|
|
665
|
+
}) {
|
|
666
|
+
const [scrollPosition, scrollRailRef, updateScrollPosition] = useHorizontalScrollRail(externalRef);
|
|
667
|
+
return /* @__PURE__ */ jsx9(
|
|
668
|
+
"div",
|
|
669
|
+
{
|
|
670
|
+
"data-slot": "navigation-tabs-list",
|
|
671
|
+
"data-scroll-position": scrollPosition,
|
|
672
|
+
ref: scrollRailRef,
|
|
673
|
+
onScroll: (event) => {
|
|
674
|
+
updateScrollPosition();
|
|
675
|
+
onScroll?.(event);
|
|
676
|
+
},
|
|
677
|
+
className: cn(
|
|
678
|
+
tabRailClasses,
|
|
679
|
+
"h-[var(--ds-tab-rail-height)]",
|
|
680
|
+
className
|
|
681
|
+
),
|
|
682
|
+
...props
|
|
683
|
+
}
|
|
684
|
+
);
|
|
685
|
+
}
|
|
686
|
+
function NavigationTab({
|
|
687
|
+
className,
|
|
688
|
+
active = false,
|
|
689
|
+
asChild = false,
|
|
690
|
+
ref: externalRef,
|
|
691
|
+
...props
|
|
692
|
+
}) {
|
|
693
|
+
const Comp = asChild ? Slot2 : "a";
|
|
694
|
+
const internalRef = React.useRef(null);
|
|
695
|
+
const ref = React.useCallback(
|
|
696
|
+
(node) => {
|
|
697
|
+
internalRef.current = node;
|
|
698
|
+
assignRef(externalRef, node);
|
|
699
|
+
},
|
|
700
|
+
[externalRef]
|
|
701
|
+
);
|
|
702
|
+
React.useEffect(() => {
|
|
703
|
+
if (!active) return;
|
|
704
|
+
internalRef.current?.scrollIntoView({
|
|
705
|
+
behavior: "auto",
|
|
706
|
+
block: "nearest",
|
|
707
|
+
inline: "nearest"
|
|
708
|
+
});
|
|
709
|
+
}, [active]);
|
|
710
|
+
return /* @__PURE__ */ jsx9(
|
|
711
|
+
Comp,
|
|
712
|
+
{
|
|
713
|
+
...props,
|
|
714
|
+
"data-slot": "navigation-tab",
|
|
715
|
+
"data-active": active ? "true" : "false",
|
|
716
|
+
"aria-current": active ? "page" : void 0,
|
|
717
|
+
ref,
|
|
718
|
+
className: cn(
|
|
719
|
+
navigationTabClasses,
|
|
720
|
+
className
|
|
721
|
+
)
|
|
722
|
+
}
|
|
723
|
+
);
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
// src/primitives/card.tsx
|
|
727
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
728
|
+
function Card({ className, ...props }) {
|
|
729
|
+
return /* @__PURE__ */ jsx10(
|
|
730
|
+
"div",
|
|
731
|
+
{
|
|
732
|
+
"data-slot": "card",
|
|
733
|
+
className: cn("flex flex-col gap-5 rounded-lg border border-border-default bg-card py-[var(--ds-surface-padding)] text-card-foreground shadow-sm", className),
|
|
734
|
+
...props
|
|
735
|
+
}
|
|
736
|
+
);
|
|
737
|
+
}
|
|
738
|
+
function CardHeader({ className, ...props }) {
|
|
739
|
+
return /* @__PURE__ */ jsx10("div", { "data-slot": "card-header", className: cn("grid auto-rows-min gap-1.5 px-[var(--ds-surface-padding)]", className), ...props });
|
|
740
|
+
}
|
|
741
|
+
function CardTitle({ className, ...props }) {
|
|
742
|
+
return /* @__PURE__ */ jsx10("div", { "data-slot": "card-title", className: cn("font-semibold leading-none", className), ...props });
|
|
743
|
+
}
|
|
744
|
+
function CardDescription({ className, ...props }) {
|
|
745
|
+
return /* @__PURE__ */ jsx10("div", { "data-slot": "card-description", className: cn("text-sm text-muted-foreground", className), ...props });
|
|
746
|
+
}
|
|
747
|
+
function CardContent({ className, ...props }) {
|
|
748
|
+
return /* @__PURE__ */ jsx10("div", { "data-slot": "card-content", className: cn("px-[var(--ds-surface-padding)]", className), ...props });
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
// src/primitives/skeleton.tsx
|
|
752
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
753
|
+
function Skeleton({ className, ...props }) {
|
|
754
|
+
return /* @__PURE__ */ jsx11(
|
|
755
|
+
"div",
|
|
756
|
+
{
|
|
757
|
+
"data-slot": "skeleton",
|
|
758
|
+
className: cn("animate-pulse rounded-md bg-surface-muted", className),
|
|
759
|
+
...props
|
|
760
|
+
}
|
|
761
|
+
);
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
// src/primitives/collapsible.tsx
|
|
765
|
+
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
766
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
767
|
+
function Collapsible({
|
|
768
|
+
...props
|
|
769
|
+
}) {
|
|
770
|
+
return /* @__PURE__ */ jsx12(CollapsiblePrimitive.Root, { "data-slot": "collapsible", ...props });
|
|
771
|
+
}
|
|
772
|
+
function CollapsibleTrigger({
|
|
773
|
+
...props
|
|
774
|
+
}) {
|
|
775
|
+
return /* @__PURE__ */ jsx12(
|
|
776
|
+
CollapsiblePrimitive.Trigger,
|
|
777
|
+
{
|
|
778
|
+
"data-slot": "collapsible-trigger",
|
|
779
|
+
...props
|
|
780
|
+
}
|
|
781
|
+
);
|
|
782
|
+
}
|
|
783
|
+
function CollapsibleContent({
|
|
784
|
+
...props
|
|
785
|
+
}) {
|
|
786
|
+
return /* @__PURE__ */ jsx12(
|
|
787
|
+
CollapsiblePrimitive.Content,
|
|
788
|
+
{
|
|
789
|
+
"data-slot": "collapsible-content",
|
|
790
|
+
...props
|
|
791
|
+
}
|
|
792
|
+
);
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
// src/primitives/dropdown-menu.tsx
|
|
796
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
797
|
+
import { ChevronRight } from "lucide-react";
|
|
798
|
+
import { jsx as jsx13, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
799
|
+
function DropdownMenu({ ...props }) {
|
|
800
|
+
return /* @__PURE__ */ jsx13(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
801
|
+
}
|
|
802
|
+
function DropdownMenuGroup({ ...props }) {
|
|
803
|
+
return /* @__PURE__ */ jsx13(DropdownMenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props });
|
|
804
|
+
}
|
|
805
|
+
function DropdownMenuSub({ ...props }) {
|
|
806
|
+
return /* @__PURE__ */ jsx13(DropdownMenuPrimitive.Sub, { "data-slot": "dropdown-menu-sub", ...props });
|
|
807
|
+
}
|
|
808
|
+
function DropdownMenuSubTrigger({ className, children, ...props }) {
|
|
809
|
+
return /* @__PURE__ */ jsxs5(DropdownMenuPrimitive.SubTrigger, { "data-slot": "dropdown-menu-sub-trigger", className: cn("focus:bg-surface-muted flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-[length:var(--ds-menu-item-size)] outline-hidden", className), ...props, children: [
|
|
810
|
+
children,
|
|
811
|
+
/* @__PURE__ */ jsx13(ChevronRight, { className: "ml-auto size-4 text-muted-foreground" })
|
|
812
|
+
] });
|
|
813
|
+
}
|
|
814
|
+
function DropdownMenuSubContent({ className, ...props }) {
|
|
815
|
+
return /* @__PURE__ */ jsx13(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx13(DropdownMenuPrimitive.SubContent, { "data-slot": "dropdown-menu-sub-content", className: cn("z-50 min-w-56 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-[var(--ds-shadow-floating)]", className), ...props }) });
|
|
816
|
+
}
|
|
817
|
+
function DropdownMenuTrigger({ ...props }) {
|
|
818
|
+
return /* @__PURE__ */ jsx13(DropdownMenuPrimitive.Trigger, { "data-slot": "dropdown-menu-trigger", ...props });
|
|
819
|
+
}
|
|
820
|
+
function DropdownMenuContent({
|
|
821
|
+
className,
|
|
822
|
+
sideOffset = 4,
|
|
823
|
+
...props
|
|
824
|
+
}) {
|
|
825
|
+
return /* @__PURE__ */ jsx13(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx13(
|
|
826
|
+
DropdownMenuPrimitive.Content,
|
|
827
|
+
{
|
|
828
|
+
"data-slot": "dropdown-menu-content",
|
|
829
|
+
sideOffset,
|
|
830
|
+
className: cn("z-50 min-w-40 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-[var(--ds-shadow-floating)]", className),
|
|
831
|
+
...props
|
|
832
|
+
}
|
|
833
|
+
) });
|
|
834
|
+
}
|
|
835
|
+
function DropdownMenuItem({
|
|
836
|
+
className,
|
|
837
|
+
inset,
|
|
838
|
+
variant = "default",
|
|
839
|
+
...props
|
|
840
|
+
}) {
|
|
841
|
+
return /* @__PURE__ */ jsx13(
|
|
842
|
+
DropdownMenuPrimitive.Item,
|
|
843
|
+
{
|
|
844
|
+
"data-slot": "dropdown-menu-item",
|
|
845
|
+
"data-inset": inset,
|
|
846
|
+
"data-variant": variant,
|
|
847
|
+
className: cn("focus:bg-surface-muted focus:text-foreground data-[variant=destructive]:text-danger-foreground data-[variant=destructive]:focus:bg-danger-background relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-[length:var(--ds-menu-item-size)] outline-hidden transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset=true]:pl-8", className),
|
|
848
|
+
...props
|
|
849
|
+
}
|
|
850
|
+
);
|
|
851
|
+
}
|
|
852
|
+
function DropdownMenuLabel({
|
|
853
|
+
className,
|
|
854
|
+
inset,
|
|
855
|
+
...props
|
|
856
|
+
}) {
|
|
857
|
+
return /* @__PURE__ */ jsx13(DropdownMenuPrimitive.Label, { "data-slot": "dropdown-menu-label", "data-inset": inset, className: cn("px-2 py-1.5 text-[length:var(--ds-menu-label-size)] font-medium data-[inset=true]:pl-8", className), ...props });
|
|
858
|
+
}
|
|
859
|
+
function DropdownMenuSeparator({ className, ...props }) {
|
|
860
|
+
return /* @__PURE__ */ jsx13(DropdownMenuPrimitive.Separator, { "data-slot": "dropdown-menu-separator", className: cn("-mx-1 my-1 h-px bg-border", className), ...props });
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
export {
|
|
864
|
+
buttonVariants,
|
|
865
|
+
Button,
|
|
866
|
+
Checkbox,
|
|
867
|
+
Table,
|
|
868
|
+
TableHeader,
|
|
869
|
+
TableBody,
|
|
870
|
+
TableRow,
|
|
871
|
+
TableHead,
|
|
872
|
+
TableCell,
|
|
873
|
+
Select,
|
|
874
|
+
SelectGroup,
|
|
875
|
+
SelectValue,
|
|
876
|
+
SelectTrigger,
|
|
877
|
+
SelectContent,
|
|
878
|
+
SelectItem,
|
|
879
|
+
SelectLabel,
|
|
880
|
+
SelectSeparator,
|
|
881
|
+
SelectScrollUpButton,
|
|
882
|
+
SelectScrollDownButton,
|
|
883
|
+
Separator2 as Separator,
|
|
884
|
+
Sheet,
|
|
885
|
+
SheetTrigger,
|
|
886
|
+
SheetPortal,
|
|
887
|
+
SheetClose,
|
|
888
|
+
SheetOverlay,
|
|
889
|
+
SheetContent,
|
|
890
|
+
SheetHeader,
|
|
891
|
+
SheetTitle,
|
|
892
|
+
SheetDescription,
|
|
893
|
+
SheetBody,
|
|
894
|
+
SheetFooter,
|
|
895
|
+
TooltipProvider,
|
|
896
|
+
Tooltip,
|
|
897
|
+
TooltipTrigger,
|
|
898
|
+
TooltipContent,
|
|
899
|
+
Dialog,
|
|
900
|
+
DialogTrigger,
|
|
901
|
+
DialogClose,
|
|
902
|
+
DialogPortal,
|
|
903
|
+
DialogOverlay,
|
|
904
|
+
DialogContent,
|
|
905
|
+
DialogHeader,
|
|
906
|
+
DialogTitle,
|
|
907
|
+
DialogDescription,
|
|
908
|
+
DialogBody,
|
|
909
|
+
DialogFooter,
|
|
910
|
+
Tabs,
|
|
911
|
+
TabsList,
|
|
912
|
+
TabsTrigger,
|
|
913
|
+
TabsContent,
|
|
914
|
+
NavigationTabs,
|
|
915
|
+
NavigationTabsList,
|
|
916
|
+
NavigationTab,
|
|
917
|
+
Card,
|
|
918
|
+
CardHeader,
|
|
919
|
+
CardTitle,
|
|
920
|
+
CardDescription,
|
|
921
|
+
CardContent,
|
|
922
|
+
Skeleton,
|
|
923
|
+
Collapsible,
|
|
924
|
+
CollapsibleTrigger,
|
|
925
|
+
CollapsibleContent,
|
|
926
|
+
DropdownMenu,
|
|
927
|
+
DropdownMenuGroup,
|
|
928
|
+
DropdownMenuSub,
|
|
929
|
+
DropdownMenuSubTrigger,
|
|
930
|
+
DropdownMenuSubContent,
|
|
931
|
+
DropdownMenuTrigger,
|
|
932
|
+
DropdownMenuContent,
|
|
933
|
+
DropdownMenuItem,
|
|
934
|
+
DropdownMenuLabel,
|
|
935
|
+
DropdownMenuSeparator
|
|
936
|
+
};
|
|
937
|
+
//# sourceMappingURL=chunk-YHPZ5CQU.js.map
|