@vibecms/core 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/dist/engine/index.d.mts +4 -0
- package/dist/engine/index.d.ts +4 -0
- package/dist/engine/index.js +1226 -0
- package/dist/engine/index.js.map +1 -0
- package/dist/engine/index.mjs +1184 -0
- package/dist/engine/index.mjs.map +1 -0
- package/dist/hooks/index.d.mts +27 -0
- package/dist/hooks/index.d.ts +27 -0
- package/dist/hooks/index.js +75 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/index.mjs +47 -0
- package/dist/hooks/index.mjs.map +1 -0
- package/dist/index-C3P1J_of.d.ts +339 -0
- package/dist/index-CO4uwTdH.d.mts +339 -0
- package/dist/index.css +2326 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.mts +412 -0
- package/dist/index.d.ts +412 -0
- package/dist/index.js +3715 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +3587 -0
- package/dist/index.mjs.map +1 -0
- package/dist/storage/index.d.mts +32 -0
- package/dist/storage/index.d.ts +32 -0
- package/dist/storage/index.js +103 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/storage/index.mjs +75 -0
- package/dist/storage/index.mjs.map +1 -0
- package/dist/types-BkDsDmQJ.d.mts +83 -0
- package/dist/types-BkDsDmQJ.d.ts +83 -0
- package/dist/ui/index.d.mts +127 -0
- package/dist/ui/index.d.ts +127 -0
- package/dist/ui/index.js +1119 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/index.mjs +1030 -0
- package/dist/ui/index.mjs.map +1 -0
- package/dist/vite-plugin.d.mts +8 -0
- package/dist/vite-plugin.d.ts +8 -0
- package/dist/vite-plugin.js +193 -0
- package/dist/vite-plugin.js.map +1 -0
- package/dist/vite-plugin.mjs +165 -0
- package/dist/vite-plugin.mjs.map +1 -0
- package/package.json +89 -0
|
@@ -0,0 +1,1030 @@
|
|
|
1
|
+
// src/ui/button.tsx
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { Button as ButtonPrimitive } from "@base-ui/react/button";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
|
|
6
|
+
// src/lib/utils.ts
|
|
7
|
+
import { clsx } from "clsx";
|
|
8
|
+
import { twMerge } from "tailwind-merge";
|
|
9
|
+
function cn(...inputs) {
|
|
10
|
+
return twMerge(clsx(inputs));
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
// src/ui/button.tsx
|
|
14
|
+
import { jsx } from "react/jsx-runtime";
|
|
15
|
+
var buttonVariants = cva(
|
|
16
|
+
"group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
17
|
+
{
|
|
18
|
+
variants: {
|
|
19
|
+
variant: {
|
|
20
|
+
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
|
|
21
|
+
outline: "border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
|
|
22
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
23
|
+
ghost: "hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",
|
|
24
|
+
destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
|
|
25
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
26
|
+
},
|
|
27
|
+
size: {
|
|
28
|
+
default: "h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
|
|
29
|
+
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",
|
|
30
|
+
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",
|
|
31
|
+
lg: "h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",
|
|
32
|
+
icon: "size-8",
|
|
33
|
+
"icon-xs": "size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3",
|
|
34
|
+
"icon-sm": "size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg",
|
|
35
|
+
"icon-lg": "size-9"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
defaultVariants: {
|
|
39
|
+
variant: "default",
|
|
40
|
+
size: "default"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
var Button = React.forwardRef(({ className, variant, size, ...props }, ref) => {
|
|
45
|
+
return /* @__PURE__ */ jsx(
|
|
46
|
+
ButtonPrimitive,
|
|
47
|
+
{
|
|
48
|
+
ref,
|
|
49
|
+
"data-slot": "button",
|
|
50
|
+
className: cn(buttonVariants({ variant, size, className })),
|
|
51
|
+
...props
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
});
|
|
55
|
+
Button.displayName = "Button";
|
|
56
|
+
|
|
57
|
+
// src/ui/command.tsx
|
|
58
|
+
import { Command as CommandPrimitive } from "cmdk";
|
|
59
|
+
|
|
60
|
+
// src/ui/dialog.tsx
|
|
61
|
+
import * as React2 from "react";
|
|
62
|
+
import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
|
|
63
|
+
import { XIcon } from "lucide-react";
|
|
64
|
+
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
65
|
+
function Dialog({ ...props }) {
|
|
66
|
+
return /* @__PURE__ */ jsx2(DialogPrimitive.Root, { "data-slot": "dialog", ...props });
|
|
67
|
+
}
|
|
68
|
+
var DialogTrigger = React2.forwardRef(({ ...props }, ref) => {
|
|
69
|
+
return /* @__PURE__ */ jsx2(
|
|
70
|
+
DialogPrimitive.Trigger,
|
|
71
|
+
{
|
|
72
|
+
ref,
|
|
73
|
+
"data-slot": "dialog-trigger",
|
|
74
|
+
...props
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
});
|
|
78
|
+
DialogTrigger.displayName = "DialogTrigger";
|
|
79
|
+
function DialogPortal({ ...props }) {
|
|
80
|
+
return /* @__PURE__ */ jsx2(DialogPrimitive.Portal, { "data-slot": "dialog-portal", ...props });
|
|
81
|
+
}
|
|
82
|
+
var DialogClose = React2.forwardRef(({ ...props }, ref) => {
|
|
83
|
+
return /* @__PURE__ */ jsx2(
|
|
84
|
+
DialogPrimitive.Close,
|
|
85
|
+
{
|
|
86
|
+
ref,
|
|
87
|
+
"data-slot": "dialog-close",
|
|
88
|
+
...props
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
});
|
|
92
|
+
DialogClose.displayName = "DialogClose";
|
|
93
|
+
var DialogOverlay = React2.forwardRef(({ className, ...props }, ref) => {
|
|
94
|
+
return /* @__PURE__ */ jsx2(
|
|
95
|
+
DialogPrimitive.Backdrop,
|
|
96
|
+
{
|
|
97
|
+
ref,
|
|
98
|
+
"data-slot": "dialog-overlay",
|
|
99
|
+
className: cn(
|
|
100
|
+
"fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
|
|
101
|
+
className
|
|
102
|
+
),
|
|
103
|
+
...props
|
|
104
|
+
}
|
|
105
|
+
);
|
|
106
|
+
});
|
|
107
|
+
DialogOverlay.displayName = "DialogOverlay";
|
|
108
|
+
function DialogContent({
|
|
109
|
+
className,
|
|
110
|
+
children,
|
|
111
|
+
showCloseButton = true,
|
|
112
|
+
...props
|
|
113
|
+
}) {
|
|
114
|
+
return /* @__PURE__ */ jsxs(DialogPortal, { children: [
|
|
115
|
+
/* @__PURE__ */ jsx2(DialogOverlay, {}),
|
|
116
|
+
/* @__PURE__ */ jsxs(
|
|
117
|
+
DialogPrimitive.Popup,
|
|
118
|
+
{
|
|
119
|
+
"data-slot": "dialog-content",
|
|
120
|
+
className: cn(
|
|
121
|
+
"fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-white p-4 text-sm text-neutral-900 ring-1 ring-neutral-200 shadow-xl duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
122
|
+
className
|
|
123
|
+
),
|
|
124
|
+
...props,
|
|
125
|
+
children: [
|
|
126
|
+
children,
|
|
127
|
+
showCloseButton && /* @__PURE__ */ jsxs(
|
|
128
|
+
DialogPrimitive.Close,
|
|
129
|
+
{
|
|
130
|
+
"data-slot": "dialog-close",
|
|
131
|
+
render: /* @__PURE__ */ jsx2(
|
|
132
|
+
Button,
|
|
133
|
+
{
|
|
134
|
+
variant: "ghost",
|
|
135
|
+
className: "absolute top-2 right-2",
|
|
136
|
+
size: "icon-sm"
|
|
137
|
+
}
|
|
138
|
+
),
|
|
139
|
+
children: [
|
|
140
|
+
/* @__PURE__ */ jsx2(
|
|
141
|
+
XIcon,
|
|
142
|
+
{}
|
|
143
|
+
),
|
|
144
|
+
/* @__PURE__ */ jsx2("span", { className: "sr-only", children: "Close" })
|
|
145
|
+
]
|
|
146
|
+
}
|
|
147
|
+
)
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
)
|
|
151
|
+
] });
|
|
152
|
+
}
|
|
153
|
+
function DialogHeader({ className, ...props }) {
|
|
154
|
+
return /* @__PURE__ */ jsx2(
|
|
155
|
+
"div",
|
|
156
|
+
{
|
|
157
|
+
"data-slot": "dialog-header",
|
|
158
|
+
className: cn("flex flex-col gap-2", className),
|
|
159
|
+
...props
|
|
160
|
+
}
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
function DialogFooter({
|
|
164
|
+
className,
|
|
165
|
+
showCloseButton = false,
|
|
166
|
+
children,
|
|
167
|
+
...props
|
|
168
|
+
}) {
|
|
169
|
+
return /* @__PURE__ */ jsxs(
|
|
170
|
+
"div",
|
|
171
|
+
{
|
|
172
|
+
"data-slot": "dialog-footer",
|
|
173
|
+
className: cn(
|
|
174
|
+
"-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end",
|
|
175
|
+
className
|
|
176
|
+
),
|
|
177
|
+
...props,
|
|
178
|
+
children: [
|
|
179
|
+
children,
|
|
180
|
+
showCloseButton && /* @__PURE__ */ jsx2(DialogPrimitive.Close, { render: /* @__PURE__ */ jsx2(Button, { variant: "outline" }), children: "Close" })
|
|
181
|
+
]
|
|
182
|
+
}
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
function DialogTitle({ className, ...props }) {
|
|
186
|
+
return /* @__PURE__ */ jsx2(
|
|
187
|
+
DialogPrimitive.Title,
|
|
188
|
+
{
|
|
189
|
+
"data-slot": "dialog-title",
|
|
190
|
+
className: cn(
|
|
191
|
+
"font-heading text-base leading-none font-medium",
|
|
192
|
+
className
|
|
193
|
+
),
|
|
194
|
+
...props
|
|
195
|
+
}
|
|
196
|
+
);
|
|
197
|
+
}
|
|
198
|
+
function DialogDescription({
|
|
199
|
+
className,
|
|
200
|
+
...props
|
|
201
|
+
}) {
|
|
202
|
+
return /* @__PURE__ */ jsx2(
|
|
203
|
+
DialogPrimitive.Description,
|
|
204
|
+
{
|
|
205
|
+
"data-slot": "dialog-description",
|
|
206
|
+
className: cn(
|
|
207
|
+
"text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",
|
|
208
|
+
className
|
|
209
|
+
),
|
|
210
|
+
...props
|
|
211
|
+
}
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
// src/ui/input-group.tsx
|
|
216
|
+
import * as React5 from "react";
|
|
217
|
+
import { cva as cva2 } from "class-variance-authority";
|
|
218
|
+
|
|
219
|
+
// src/ui/input.tsx
|
|
220
|
+
import * as React3 from "react";
|
|
221
|
+
import { Input as InputPrimitive } from "@base-ui/react/input";
|
|
222
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
223
|
+
var Input = React3.forwardRef(
|
|
224
|
+
({ className, type, ...props }, ref) => {
|
|
225
|
+
return /* @__PURE__ */ jsx3(
|
|
226
|
+
InputPrimitive,
|
|
227
|
+
{
|
|
228
|
+
ref,
|
|
229
|
+
type,
|
|
230
|
+
"data-slot": "input",
|
|
231
|
+
className: cn(
|
|
232
|
+
"h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
|
|
233
|
+
className
|
|
234
|
+
),
|
|
235
|
+
...props
|
|
236
|
+
}
|
|
237
|
+
);
|
|
238
|
+
}
|
|
239
|
+
);
|
|
240
|
+
Input.displayName = "Input";
|
|
241
|
+
|
|
242
|
+
// src/ui/textarea.tsx
|
|
243
|
+
import * as React4 from "react";
|
|
244
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
245
|
+
var Textarea = React4.forwardRef(({ className, ...props }, ref) => {
|
|
246
|
+
return /* @__PURE__ */ jsx4(
|
|
247
|
+
"textarea",
|
|
248
|
+
{
|
|
249
|
+
ref,
|
|
250
|
+
"data-slot": "textarea",
|
|
251
|
+
className: cn(
|
|
252
|
+
"flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
|
|
253
|
+
className
|
|
254
|
+
),
|
|
255
|
+
...props
|
|
256
|
+
}
|
|
257
|
+
);
|
|
258
|
+
});
|
|
259
|
+
Textarea.displayName = "Textarea";
|
|
260
|
+
|
|
261
|
+
// src/ui/input-group.tsx
|
|
262
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
263
|
+
var InputGroup = React5.forwardRef(
|
|
264
|
+
({ className, ...props }, ref) => {
|
|
265
|
+
return /* @__PURE__ */ jsx5(
|
|
266
|
+
"div",
|
|
267
|
+
{
|
|
268
|
+
ref,
|
|
269
|
+
"data-slot": "input-group",
|
|
270
|
+
role: "group",
|
|
271
|
+
className: cn(
|
|
272
|
+
"group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",
|
|
273
|
+
className
|
|
274
|
+
),
|
|
275
|
+
...props
|
|
276
|
+
}
|
|
277
|
+
);
|
|
278
|
+
}
|
|
279
|
+
);
|
|
280
|
+
InputGroup.displayName = "InputGroup";
|
|
281
|
+
var inputGroupAddonVariants = cva2(
|
|
282
|
+
"flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",
|
|
283
|
+
{
|
|
284
|
+
variants: {
|
|
285
|
+
align: {
|
|
286
|
+
"inline-start": "order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]",
|
|
287
|
+
"inline-end": "order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]",
|
|
288
|
+
"block-start": "order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2",
|
|
289
|
+
"block-end": "order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
defaultVariants: {
|
|
293
|
+
align: "inline-start"
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
);
|
|
297
|
+
var InputGroupAddon = React5.forwardRef(({ className, align = "inline-start", ...props }, ref) => {
|
|
298
|
+
return /* @__PURE__ */ jsx5(
|
|
299
|
+
"div",
|
|
300
|
+
{
|
|
301
|
+
ref,
|
|
302
|
+
role: "group",
|
|
303
|
+
"data-slot": "input-group-addon",
|
|
304
|
+
"data-align": align,
|
|
305
|
+
className: cn(inputGroupAddonVariants({ align }), className),
|
|
306
|
+
onClick: (e) => {
|
|
307
|
+
if (e.target.closest("button")) {
|
|
308
|
+
return;
|
|
309
|
+
}
|
|
310
|
+
e.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
311
|
+
},
|
|
312
|
+
...props
|
|
313
|
+
}
|
|
314
|
+
);
|
|
315
|
+
});
|
|
316
|
+
InputGroupAddon.displayName = "InputGroupAddon";
|
|
317
|
+
var inputGroupButtonVariants = cva2(
|
|
318
|
+
"flex items-center gap-2 text-sm shadow-none",
|
|
319
|
+
{
|
|
320
|
+
variants: {
|
|
321
|
+
size: {
|
|
322
|
+
xs: "h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
|
|
323
|
+
sm: "",
|
|
324
|
+
"icon-xs": "size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0",
|
|
325
|
+
"icon-sm": "size-8 p-0 has-[>svg]:p-0"
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
defaultVariants: {
|
|
329
|
+
size: "xs"
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
);
|
|
333
|
+
function InputGroupButton({
|
|
334
|
+
className,
|
|
335
|
+
type = "button",
|
|
336
|
+
variant = "ghost",
|
|
337
|
+
size = "xs",
|
|
338
|
+
...props
|
|
339
|
+
}) {
|
|
340
|
+
return /* @__PURE__ */ jsx5(
|
|
341
|
+
Button,
|
|
342
|
+
{
|
|
343
|
+
type,
|
|
344
|
+
"data-size": size,
|
|
345
|
+
variant,
|
|
346
|
+
className: cn(inputGroupButtonVariants({ size }), className),
|
|
347
|
+
...props
|
|
348
|
+
}
|
|
349
|
+
);
|
|
350
|
+
}
|
|
351
|
+
function InputGroupText({ className, ...props }) {
|
|
352
|
+
return /* @__PURE__ */ jsx5(
|
|
353
|
+
"span",
|
|
354
|
+
{
|
|
355
|
+
className: cn(
|
|
356
|
+
"flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
|
357
|
+
className
|
|
358
|
+
),
|
|
359
|
+
...props
|
|
360
|
+
}
|
|
361
|
+
);
|
|
362
|
+
}
|
|
363
|
+
function InputGroupInput({
|
|
364
|
+
className,
|
|
365
|
+
...props
|
|
366
|
+
}) {
|
|
367
|
+
return /* @__PURE__ */ jsx5(
|
|
368
|
+
Input,
|
|
369
|
+
{
|
|
370
|
+
"data-slot": "input-group-control",
|
|
371
|
+
className: cn(
|
|
372
|
+
"flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent",
|
|
373
|
+
className
|
|
374
|
+
),
|
|
375
|
+
...props
|
|
376
|
+
}
|
|
377
|
+
);
|
|
378
|
+
}
|
|
379
|
+
function InputGroupTextarea({
|
|
380
|
+
className,
|
|
381
|
+
...props
|
|
382
|
+
}) {
|
|
383
|
+
return /* @__PURE__ */ jsx5(
|
|
384
|
+
Textarea,
|
|
385
|
+
{
|
|
386
|
+
"data-slot": "input-group-control",
|
|
387
|
+
className: cn(
|
|
388
|
+
"flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent",
|
|
389
|
+
className
|
|
390
|
+
),
|
|
391
|
+
...props
|
|
392
|
+
}
|
|
393
|
+
);
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
// src/ui/command.tsx
|
|
397
|
+
import { SearchIcon, CheckIcon } from "lucide-react";
|
|
398
|
+
import { jsx as jsx6, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
399
|
+
function Command({
|
|
400
|
+
className,
|
|
401
|
+
...props
|
|
402
|
+
}) {
|
|
403
|
+
return /* @__PURE__ */ jsx6(
|
|
404
|
+
CommandPrimitive,
|
|
405
|
+
{
|
|
406
|
+
"data-slot": "command",
|
|
407
|
+
className: cn(
|
|
408
|
+
"flex size-full flex-col overflow-hidden rounded-xl! bg-white p-1 text-neutral-900",
|
|
409
|
+
className
|
|
410
|
+
),
|
|
411
|
+
...props
|
|
412
|
+
}
|
|
413
|
+
);
|
|
414
|
+
}
|
|
415
|
+
function CommandDialog({
|
|
416
|
+
title = "Command Palette",
|
|
417
|
+
description = "Search for a command to run...",
|
|
418
|
+
children,
|
|
419
|
+
className,
|
|
420
|
+
showCloseButton = false,
|
|
421
|
+
...props
|
|
422
|
+
}) {
|
|
423
|
+
return /* @__PURE__ */ jsxs2(Dialog, { ...props, children: [
|
|
424
|
+
/* @__PURE__ */ jsxs2(DialogHeader, { className: "sr-only", children: [
|
|
425
|
+
/* @__PURE__ */ jsx6(DialogTitle, { children: title }),
|
|
426
|
+
/* @__PURE__ */ jsx6(DialogDescription, { children: description })
|
|
427
|
+
] }),
|
|
428
|
+
/* @__PURE__ */ jsx6(
|
|
429
|
+
DialogContent,
|
|
430
|
+
{
|
|
431
|
+
className: cn(
|
|
432
|
+
"top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0 shadow-2xl border border-neutral-200 bg-white",
|
|
433
|
+
className
|
|
434
|
+
),
|
|
435
|
+
showCloseButton,
|
|
436
|
+
children: /* @__PURE__ */ jsx6(Command, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 border-none", children })
|
|
437
|
+
}
|
|
438
|
+
)
|
|
439
|
+
] });
|
|
440
|
+
}
|
|
441
|
+
function CommandInput({
|
|
442
|
+
className,
|
|
443
|
+
...props
|
|
444
|
+
}) {
|
|
445
|
+
return /* @__PURE__ */ jsx6("div", { "data-slot": "command-input-wrapper", className: "p-1 pb-0", children: /* @__PURE__ */ jsxs2(InputGroup, { className: "h-8! rounded-lg! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!", children: [
|
|
446
|
+
/* @__PURE__ */ jsx6(
|
|
447
|
+
CommandPrimitive.Input,
|
|
448
|
+
{
|
|
449
|
+
"data-slot": "command-input",
|
|
450
|
+
className: cn(
|
|
451
|
+
"w-full text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",
|
|
452
|
+
className
|
|
453
|
+
),
|
|
454
|
+
...props
|
|
455
|
+
}
|
|
456
|
+
),
|
|
457
|
+
/* @__PURE__ */ jsx6(InputGroupAddon, { children: /* @__PURE__ */ jsx6(SearchIcon, { className: "size-4 shrink-0 opacity-50" }) })
|
|
458
|
+
] }) });
|
|
459
|
+
}
|
|
460
|
+
function CommandList({
|
|
461
|
+
className,
|
|
462
|
+
...props
|
|
463
|
+
}) {
|
|
464
|
+
return /* @__PURE__ */ jsx6(
|
|
465
|
+
CommandPrimitive.List,
|
|
466
|
+
{
|
|
467
|
+
"data-slot": "command-list",
|
|
468
|
+
className: cn(
|
|
469
|
+
"no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",
|
|
470
|
+
className
|
|
471
|
+
),
|
|
472
|
+
...props
|
|
473
|
+
}
|
|
474
|
+
);
|
|
475
|
+
}
|
|
476
|
+
function CommandEmpty({
|
|
477
|
+
className,
|
|
478
|
+
...props
|
|
479
|
+
}) {
|
|
480
|
+
return /* @__PURE__ */ jsx6(
|
|
481
|
+
CommandPrimitive.Empty,
|
|
482
|
+
{
|
|
483
|
+
"data-slot": "command-empty",
|
|
484
|
+
className: cn("py-6 text-center text-sm", className),
|
|
485
|
+
...props
|
|
486
|
+
}
|
|
487
|
+
);
|
|
488
|
+
}
|
|
489
|
+
function CommandGroup({
|
|
490
|
+
className,
|
|
491
|
+
...props
|
|
492
|
+
}) {
|
|
493
|
+
return /* @__PURE__ */ jsx6(
|
|
494
|
+
CommandPrimitive.Group,
|
|
495
|
+
{
|
|
496
|
+
"data-slot": "command-group",
|
|
497
|
+
className: cn(
|
|
498
|
+
"overflow-hidden p-1 text-neutral-900 **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-neutral-500",
|
|
499
|
+
className
|
|
500
|
+
),
|
|
501
|
+
...props
|
|
502
|
+
}
|
|
503
|
+
);
|
|
504
|
+
}
|
|
505
|
+
function CommandSeparator({
|
|
506
|
+
className,
|
|
507
|
+
...props
|
|
508
|
+
}) {
|
|
509
|
+
return /* @__PURE__ */ jsx6(
|
|
510
|
+
CommandPrimitive.Separator,
|
|
511
|
+
{
|
|
512
|
+
"data-slot": "command-separator",
|
|
513
|
+
className: cn("-mx-1 h-px bg-border", className),
|
|
514
|
+
...props
|
|
515
|
+
}
|
|
516
|
+
);
|
|
517
|
+
}
|
|
518
|
+
function CommandItem({
|
|
519
|
+
className,
|
|
520
|
+
children,
|
|
521
|
+
...props
|
|
522
|
+
}) {
|
|
523
|
+
return /* @__PURE__ */ jsxs2(
|
|
524
|
+
CommandPrimitive.Item,
|
|
525
|
+
{
|
|
526
|
+
"data-slot": "command-item",
|
|
527
|
+
className: cn(
|
|
528
|
+
"group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-neutral-100 data-selected:text-neutral-900 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-neutral-900",
|
|
529
|
+
className
|
|
530
|
+
),
|
|
531
|
+
...props,
|
|
532
|
+
children: [
|
|
533
|
+
children,
|
|
534
|
+
/* @__PURE__ */ jsx6(CheckIcon, { className: "ml-auto opacity-0 group-has-data-[slot=command-shortcut]/command-item:hidden group-data-[checked=true]/command-item:opacity-100" })
|
|
535
|
+
]
|
|
536
|
+
}
|
|
537
|
+
);
|
|
538
|
+
}
|
|
539
|
+
function CommandShortcut({
|
|
540
|
+
className,
|
|
541
|
+
...props
|
|
542
|
+
}) {
|
|
543
|
+
return /* @__PURE__ */ jsx6(
|
|
544
|
+
"span",
|
|
545
|
+
{
|
|
546
|
+
"data-slot": "command-shortcut",
|
|
547
|
+
className: cn(
|
|
548
|
+
"ml-auto text-xs tracking-widest text-muted-foreground group-data-selected/command-item:text-foreground",
|
|
549
|
+
className
|
|
550
|
+
),
|
|
551
|
+
...props
|
|
552
|
+
}
|
|
553
|
+
);
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
// src/ui/label.tsx
|
|
557
|
+
import * as React6 from "react";
|
|
558
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
559
|
+
var Label = React6.forwardRef(
|
|
560
|
+
({ className, ...props }, ref) => {
|
|
561
|
+
return /* @__PURE__ */ jsx7(
|
|
562
|
+
"label",
|
|
563
|
+
{
|
|
564
|
+
ref,
|
|
565
|
+
"data-slot": "label",
|
|
566
|
+
className: cn(
|
|
567
|
+
"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
568
|
+
className
|
|
569
|
+
),
|
|
570
|
+
...props
|
|
571
|
+
}
|
|
572
|
+
);
|
|
573
|
+
}
|
|
574
|
+
);
|
|
575
|
+
Label.displayName = "Label";
|
|
576
|
+
|
|
577
|
+
// src/ui/popover.tsx
|
|
578
|
+
import * as React7 from "react";
|
|
579
|
+
import { Popover as PopoverPrimitive } from "@base-ui/react/popover";
|
|
580
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
581
|
+
function Popover({ ...props }) {
|
|
582
|
+
return /* @__PURE__ */ jsx8(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
583
|
+
}
|
|
584
|
+
var PopoverTrigger = React7.forwardRef(({ ...props }, ref) => {
|
|
585
|
+
return /* @__PURE__ */ jsx8(
|
|
586
|
+
PopoverPrimitive.Trigger,
|
|
587
|
+
{
|
|
588
|
+
ref,
|
|
589
|
+
"data-slot": "popover-trigger",
|
|
590
|
+
...props
|
|
591
|
+
}
|
|
592
|
+
);
|
|
593
|
+
});
|
|
594
|
+
PopoverTrigger.displayName = "PopoverTrigger";
|
|
595
|
+
var PopoverContent = React7.forwardRef(
|
|
596
|
+
({
|
|
597
|
+
className,
|
|
598
|
+
align = "center",
|
|
599
|
+
alignOffset = 0,
|
|
600
|
+
side = "bottom",
|
|
601
|
+
sideOffset = 4,
|
|
602
|
+
...props
|
|
603
|
+
}, ref) => {
|
|
604
|
+
return /* @__PURE__ */ jsx8(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx8(
|
|
605
|
+
PopoverPrimitive.Positioner,
|
|
606
|
+
{
|
|
607
|
+
align,
|
|
608
|
+
alignOffset,
|
|
609
|
+
side,
|
|
610
|
+
sideOffset,
|
|
611
|
+
className: "isolate z-50",
|
|
612
|
+
children: /* @__PURE__ */ jsx8(
|
|
613
|
+
PopoverPrimitive.Popup,
|
|
614
|
+
{
|
|
615
|
+
ref,
|
|
616
|
+
"data-slot": "popover-content",
|
|
617
|
+
className: cn(
|
|
618
|
+
"z-[9999] flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-white border border-neutral-200 p-2.5 text-sm text-neutral-900 shadow-xl ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
619
|
+
className
|
|
620
|
+
),
|
|
621
|
+
...props
|
|
622
|
+
}
|
|
623
|
+
)
|
|
624
|
+
}
|
|
625
|
+
) });
|
|
626
|
+
}
|
|
627
|
+
);
|
|
628
|
+
PopoverContent.displayName = "PopoverContent";
|
|
629
|
+
var PopoverHeader = React7.forwardRef(({ className, ...props }, ref) => {
|
|
630
|
+
return /* @__PURE__ */ jsx8(
|
|
631
|
+
"div",
|
|
632
|
+
{
|
|
633
|
+
ref,
|
|
634
|
+
"data-slot": "popover-header",
|
|
635
|
+
className: cn("flex flex-col gap-0.5 text-sm", className),
|
|
636
|
+
...props
|
|
637
|
+
}
|
|
638
|
+
);
|
|
639
|
+
});
|
|
640
|
+
PopoverHeader.displayName = "PopoverHeader";
|
|
641
|
+
var PopoverTitle = React7.forwardRef(({ className, ...props }, ref) => {
|
|
642
|
+
return /* @__PURE__ */ jsx8(
|
|
643
|
+
PopoverPrimitive.Title,
|
|
644
|
+
{
|
|
645
|
+
ref,
|
|
646
|
+
"data-slot": "popover-title",
|
|
647
|
+
className: cn("font-heading font-medium", className),
|
|
648
|
+
...props
|
|
649
|
+
}
|
|
650
|
+
);
|
|
651
|
+
});
|
|
652
|
+
PopoverTitle.displayName = "PopoverTitle";
|
|
653
|
+
var PopoverDescription = React7.forwardRef(({ className, ...props }, ref) => {
|
|
654
|
+
return /* @__PURE__ */ jsx8(
|
|
655
|
+
PopoverPrimitive.Description,
|
|
656
|
+
{
|
|
657
|
+
ref,
|
|
658
|
+
"data-slot": "popover-description",
|
|
659
|
+
className: cn("text-muted-foreground", className),
|
|
660
|
+
...props
|
|
661
|
+
}
|
|
662
|
+
);
|
|
663
|
+
});
|
|
664
|
+
PopoverDescription.displayName = "PopoverDescription";
|
|
665
|
+
|
|
666
|
+
// src/ui/scroll-area.tsx
|
|
667
|
+
import * as React8 from "react";
|
|
668
|
+
import { ScrollArea as ScrollAreaPrimitive } from "@base-ui/react/scroll-area";
|
|
669
|
+
import { jsx as jsx9, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
670
|
+
var ScrollArea = React8.forwardRef(({ className, children, ...props }, ref) => {
|
|
671
|
+
return /* @__PURE__ */ jsxs3(
|
|
672
|
+
ScrollAreaPrimitive.Root,
|
|
673
|
+
{
|
|
674
|
+
ref,
|
|
675
|
+
"data-slot": "scroll-area",
|
|
676
|
+
className: cn("relative", className),
|
|
677
|
+
...props,
|
|
678
|
+
children: [
|
|
679
|
+
/* @__PURE__ */ jsx9(
|
|
680
|
+
ScrollAreaPrimitive.Viewport,
|
|
681
|
+
{
|
|
682
|
+
"data-slot": "scroll-area-viewport",
|
|
683
|
+
className: "size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",
|
|
684
|
+
children
|
|
685
|
+
}
|
|
686
|
+
),
|
|
687
|
+
/* @__PURE__ */ jsx9(ScrollBar, {}),
|
|
688
|
+
/* @__PURE__ */ jsx9(ScrollAreaPrimitive.Corner, {})
|
|
689
|
+
]
|
|
690
|
+
}
|
|
691
|
+
);
|
|
692
|
+
});
|
|
693
|
+
ScrollArea.displayName = "ScrollArea";
|
|
694
|
+
var ScrollBar = React8.forwardRef(({ className, orientation = "vertical", ...props }, ref) => {
|
|
695
|
+
return /* @__PURE__ */ jsx9(
|
|
696
|
+
ScrollAreaPrimitive.Scrollbar,
|
|
697
|
+
{
|
|
698
|
+
ref,
|
|
699
|
+
"data-slot": "scroll-area-scrollbar",
|
|
700
|
+
"data-orientation": orientation,
|
|
701
|
+
orientation,
|
|
702
|
+
className: cn(
|
|
703
|
+
"flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent",
|
|
704
|
+
className
|
|
705
|
+
),
|
|
706
|
+
...props,
|
|
707
|
+
children: /* @__PURE__ */ jsx9(
|
|
708
|
+
ScrollAreaPrimitive.Thumb,
|
|
709
|
+
{
|
|
710
|
+
"data-slot": "scroll-area-thumb",
|
|
711
|
+
className: "relative flex-1 rounded-full bg-border"
|
|
712
|
+
}
|
|
713
|
+
)
|
|
714
|
+
}
|
|
715
|
+
);
|
|
716
|
+
});
|
|
717
|
+
ScrollBar.displayName = "ScrollBar";
|
|
718
|
+
|
|
719
|
+
// src/ui/sheet.tsx
|
|
720
|
+
import * as React9 from "react";
|
|
721
|
+
import { Dialog as SheetPrimitive } from "@base-ui/react/dialog";
|
|
722
|
+
import { XIcon as XIcon2 } from "lucide-react";
|
|
723
|
+
import { jsx as jsx10, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
724
|
+
function Sheet({ ...props }) {
|
|
725
|
+
return /* @__PURE__ */ jsx10(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
|
|
726
|
+
}
|
|
727
|
+
var SheetTrigger = React9.forwardRef(({ ...props }, ref) => {
|
|
728
|
+
return /* @__PURE__ */ jsx10(
|
|
729
|
+
SheetPrimitive.Trigger,
|
|
730
|
+
{
|
|
731
|
+
ref,
|
|
732
|
+
"data-slot": "sheet-trigger",
|
|
733
|
+
...props
|
|
734
|
+
}
|
|
735
|
+
);
|
|
736
|
+
});
|
|
737
|
+
SheetTrigger.displayName = "SheetTrigger";
|
|
738
|
+
var SheetClose = React9.forwardRef(({ ...props }, ref) => {
|
|
739
|
+
return /* @__PURE__ */ jsx10(
|
|
740
|
+
SheetPrimitive.Close,
|
|
741
|
+
{
|
|
742
|
+
ref,
|
|
743
|
+
"data-slot": "sheet-close",
|
|
744
|
+
...props
|
|
745
|
+
}
|
|
746
|
+
);
|
|
747
|
+
});
|
|
748
|
+
SheetClose.displayName = "SheetClose";
|
|
749
|
+
function SheetPortal({ ...props }) {
|
|
750
|
+
return /* @__PURE__ */ jsx10(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
|
|
751
|
+
}
|
|
752
|
+
var SheetOverlay = React9.forwardRef(({ className, ...props }, ref) => {
|
|
753
|
+
return /* @__PURE__ */ jsx10(
|
|
754
|
+
SheetPrimitive.Backdrop,
|
|
755
|
+
{
|
|
756
|
+
ref,
|
|
757
|
+
"data-slot": "sheet-overlay",
|
|
758
|
+
className: cn(
|
|
759
|
+
"fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",
|
|
760
|
+
className
|
|
761
|
+
),
|
|
762
|
+
...props
|
|
763
|
+
}
|
|
764
|
+
);
|
|
765
|
+
});
|
|
766
|
+
SheetOverlay.displayName = "SheetOverlay";
|
|
767
|
+
function SheetContent({
|
|
768
|
+
className,
|
|
769
|
+
children,
|
|
770
|
+
side = "right",
|
|
771
|
+
showCloseButton = true,
|
|
772
|
+
...props
|
|
773
|
+
}) {
|
|
774
|
+
return /* @__PURE__ */ jsxs4(SheetPortal, { children: [
|
|
775
|
+
/* @__PURE__ */ jsx10(SheetOverlay, {}),
|
|
776
|
+
/* @__PURE__ */ jsxs4(
|
|
777
|
+
SheetPrimitive.Popup,
|
|
778
|
+
{
|
|
779
|
+
"data-slot": "sheet-content",
|
|
780
|
+
"data-side": side,
|
|
781
|
+
className: cn(
|
|
782
|
+
"fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",
|
|
783
|
+
className
|
|
784
|
+
),
|
|
785
|
+
...props,
|
|
786
|
+
children: [
|
|
787
|
+
children,
|
|
788
|
+
showCloseButton && /* @__PURE__ */ jsxs4(
|
|
789
|
+
SheetPrimitive.Close,
|
|
790
|
+
{
|
|
791
|
+
"data-slot": "sheet-close",
|
|
792
|
+
render: /* @__PURE__ */ jsx10(
|
|
793
|
+
Button,
|
|
794
|
+
{
|
|
795
|
+
variant: "ghost",
|
|
796
|
+
className: "absolute top-3 right-3",
|
|
797
|
+
size: "icon-sm"
|
|
798
|
+
}
|
|
799
|
+
),
|
|
800
|
+
children: [
|
|
801
|
+
/* @__PURE__ */ jsx10(
|
|
802
|
+
XIcon2,
|
|
803
|
+
{}
|
|
804
|
+
),
|
|
805
|
+
/* @__PURE__ */ jsx10("span", { className: "sr-only", children: "Close" })
|
|
806
|
+
]
|
|
807
|
+
}
|
|
808
|
+
)
|
|
809
|
+
]
|
|
810
|
+
}
|
|
811
|
+
)
|
|
812
|
+
] });
|
|
813
|
+
}
|
|
814
|
+
function SheetHeader({ className, ...props }) {
|
|
815
|
+
return /* @__PURE__ */ jsx10(
|
|
816
|
+
"div",
|
|
817
|
+
{
|
|
818
|
+
"data-slot": "sheet-header",
|
|
819
|
+
className: cn("flex flex-col gap-0.5 p-4", className),
|
|
820
|
+
...props
|
|
821
|
+
}
|
|
822
|
+
);
|
|
823
|
+
}
|
|
824
|
+
function SheetFooter({ className, ...props }) {
|
|
825
|
+
return /* @__PURE__ */ jsx10(
|
|
826
|
+
"div",
|
|
827
|
+
{
|
|
828
|
+
"data-slot": "sheet-footer",
|
|
829
|
+
className: cn("mt-auto flex flex-col gap-2 p-4", className),
|
|
830
|
+
...props
|
|
831
|
+
}
|
|
832
|
+
);
|
|
833
|
+
}
|
|
834
|
+
function SheetTitle({ className, ...props }) {
|
|
835
|
+
return /* @__PURE__ */ jsx10(
|
|
836
|
+
SheetPrimitive.Title,
|
|
837
|
+
{
|
|
838
|
+
"data-slot": "sheet-title",
|
|
839
|
+
className: cn(
|
|
840
|
+
"font-heading text-base font-medium text-foreground",
|
|
841
|
+
className
|
|
842
|
+
),
|
|
843
|
+
...props
|
|
844
|
+
}
|
|
845
|
+
);
|
|
846
|
+
}
|
|
847
|
+
function SheetDescription({
|
|
848
|
+
className,
|
|
849
|
+
...props
|
|
850
|
+
}) {
|
|
851
|
+
return /* @__PURE__ */ jsx10(
|
|
852
|
+
SheetPrimitive.Description,
|
|
853
|
+
{
|
|
854
|
+
"data-slot": "sheet-description",
|
|
855
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
856
|
+
...props
|
|
857
|
+
}
|
|
858
|
+
);
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
// src/ui/switch.tsx
|
|
862
|
+
import * as React10 from "react";
|
|
863
|
+
import { Switch as SwitchPrimitive } from "@base-ui/react/switch";
|
|
864
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
865
|
+
var Switch = React10.forwardRef(({ className, size = "default", ...props }, ref) => {
|
|
866
|
+
return /* @__PURE__ */ jsx11(
|
|
867
|
+
SwitchPrimitive.Root,
|
|
868
|
+
{
|
|
869
|
+
ref,
|
|
870
|
+
"data-slot": "switch",
|
|
871
|
+
"data-size": size,
|
|
872
|
+
className: cn(
|
|
873
|
+
"peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50",
|
|
874
|
+
className
|
|
875
|
+
),
|
|
876
|
+
...props,
|
|
877
|
+
children: /* @__PURE__ */ jsx11(
|
|
878
|
+
SwitchPrimitive.Thumb,
|
|
879
|
+
{
|
|
880
|
+
"data-slot": "switch-thumb",
|
|
881
|
+
className: "pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"
|
|
882
|
+
}
|
|
883
|
+
)
|
|
884
|
+
}
|
|
885
|
+
);
|
|
886
|
+
});
|
|
887
|
+
Switch.displayName = "Switch";
|
|
888
|
+
|
|
889
|
+
// src/ui/tooltip.tsx
|
|
890
|
+
import * as React11 from "react";
|
|
891
|
+
import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip";
|
|
892
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
893
|
+
function TooltipProvider({ ...props }) {
|
|
894
|
+
return /* @__PURE__ */ jsx12(TooltipPrimitive.Provider, { ...props });
|
|
895
|
+
}
|
|
896
|
+
function Tooltip({ ...props }) {
|
|
897
|
+
return /* @__PURE__ */ jsx12(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props });
|
|
898
|
+
}
|
|
899
|
+
var TooltipTrigger = React11.forwardRef(({ ...props }, ref) => {
|
|
900
|
+
return /* @__PURE__ */ jsx12(
|
|
901
|
+
TooltipPrimitive.Trigger,
|
|
902
|
+
{
|
|
903
|
+
ref,
|
|
904
|
+
"data-slot": "tooltip-trigger",
|
|
905
|
+
render: (triggerProps) => /* @__PURE__ */ jsx12("span", { ...triggerProps, className: "contents" }),
|
|
906
|
+
...props
|
|
907
|
+
}
|
|
908
|
+
);
|
|
909
|
+
});
|
|
910
|
+
TooltipTrigger.displayName = "TooltipTrigger";
|
|
911
|
+
function TooltipContent({
|
|
912
|
+
className,
|
|
913
|
+
sideOffset = 4,
|
|
914
|
+
side = "top",
|
|
915
|
+
align = "center",
|
|
916
|
+
alignOffset = 0,
|
|
917
|
+
...props
|
|
918
|
+
}) {
|
|
919
|
+
return /* @__PURE__ */ jsx12(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx12(
|
|
920
|
+
TooltipPrimitive.Positioner,
|
|
921
|
+
{
|
|
922
|
+
sideOffset,
|
|
923
|
+
side,
|
|
924
|
+
align,
|
|
925
|
+
alignOffset,
|
|
926
|
+
children: /* @__PURE__ */ jsx12(
|
|
927
|
+
TooltipPrimitive.Popup,
|
|
928
|
+
{
|
|
929
|
+
"data-slot": "tooltip-content",
|
|
930
|
+
className: cn(
|
|
931
|
+
"z-[9999] overflow-hidden rounded-md bg-zinc-900 border border-white/10 px-3 py-1.5 text-xs text-white animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 shadow-xl",
|
|
932
|
+
className
|
|
933
|
+
),
|
|
934
|
+
...props
|
|
935
|
+
}
|
|
936
|
+
)
|
|
937
|
+
}
|
|
938
|
+
) });
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
// src/ui/SeoHead.tsx
|
|
942
|
+
import { Fragment, jsx as jsx13, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
943
|
+
function SeoHead({ data, fallbackSiteName }) {
|
|
944
|
+
if (!data) return null;
|
|
945
|
+
const title = data.seoTitle || fallbackSiteName || "VibeCMS Site";
|
|
946
|
+
return /* @__PURE__ */ jsxs5(Fragment, { children: [
|
|
947
|
+
/* @__PURE__ */ jsx13("title", { children: title }),
|
|
948
|
+
data.seoDescription && /* @__PURE__ */ jsx13("meta", { name: "description", content: data.seoDescription }),
|
|
949
|
+
data.keywords && /* @__PURE__ */ jsx13("meta", { name: "keywords", content: data.keywords }),
|
|
950
|
+
data.ogImage && /* @__PURE__ */ jsx13("meta", { property: "og:image", content: data.ogImage }),
|
|
951
|
+
/* @__PURE__ */ jsx13("meta", { property: "og:title", content: title }),
|
|
952
|
+
data.seoDescription && /* @__PURE__ */ jsx13("meta", { property: "og:description", content: data.seoDescription })
|
|
953
|
+
] });
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
// src/ui/AuthorCard.tsx
|
|
957
|
+
import { jsx as jsx14, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
958
|
+
function AuthorCard({ author }) {
|
|
959
|
+
if (!author) return null;
|
|
960
|
+
return /* @__PURE__ */ jsxs6("div", { className: "flex items-center gap-4 p-4 border rounded-lg bg-neutral-50 border-neutral-200", children: [
|
|
961
|
+
author.headshot && /* @__PURE__ */ jsx14(
|
|
962
|
+
"img",
|
|
963
|
+
{
|
|
964
|
+
src: author.headshot,
|
|
965
|
+
alt: author.name,
|
|
966
|
+
className: "w-16 h-16 rounded-full object-cover"
|
|
967
|
+
}
|
|
968
|
+
),
|
|
969
|
+
/* @__PURE__ */ jsxs6("div", { children: [
|
|
970
|
+
/* @__PURE__ */ jsx14("h4", { className: "font-semibold text-lg text-neutral-900", children: author.name }),
|
|
971
|
+
/* @__PURE__ */ jsx14("p", { className: "text-sm text-neutral-500 font-medium", children: author.role })
|
|
972
|
+
] })
|
|
973
|
+
] });
|
|
974
|
+
}
|
|
975
|
+
export {
|
|
976
|
+
AuthorCard,
|
|
977
|
+
Button,
|
|
978
|
+
Command,
|
|
979
|
+
CommandDialog,
|
|
980
|
+
CommandEmpty,
|
|
981
|
+
CommandGroup,
|
|
982
|
+
CommandInput,
|
|
983
|
+
CommandItem,
|
|
984
|
+
CommandList,
|
|
985
|
+
CommandSeparator,
|
|
986
|
+
CommandShortcut,
|
|
987
|
+
Dialog,
|
|
988
|
+
DialogClose,
|
|
989
|
+
DialogContent,
|
|
990
|
+
DialogDescription,
|
|
991
|
+
DialogFooter,
|
|
992
|
+
DialogHeader,
|
|
993
|
+
DialogOverlay,
|
|
994
|
+
DialogPortal,
|
|
995
|
+
DialogTitle,
|
|
996
|
+
DialogTrigger,
|
|
997
|
+
Input,
|
|
998
|
+
InputGroup,
|
|
999
|
+
InputGroupAddon,
|
|
1000
|
+
InputGroupButton,
|
|
1001
|
+
InputGroupInput,
|
|
1002
|
+
InputGroupText,
|
|
1003
|
+
InputGroupTextarea,
|
|
1004
|
+
Label,
|
|
1005
|
+
Popover,
|
|
1006
|
+
PopoverContent,
|
|
1007
|
+
PopoverDescription,
|
|
1008
|
+
PopoverHeader,
|
|
1009
|
+
PopoverTitle,
|
|
1010
|
+
PopoverTrigger,
|
|
1011
|
+
ScrollArea,
|
|
1012
|
+
ScrollBar,
|
|
1013
|
+
SeoHead,
|
|
1014
|
+
Sheet,
|
|
1015
|
+
SheetClose,
|
|
1016
|
+
SheetContent,
|
|
1017
|
+
SheetDescription,
|
|
1018
|
+
SheetFooter,
|
|
1019
|
+
SheetHeader,
|
|
1020
|
+
SheetTitle,
|
|
1021
|
+
SheetTrigger,
|
|
1022
|
+
Switch,
|
|
1023
|
+
Textarea,
|
|
1024
|
+
Tooltip,
|
|
1025
|
+
TooltipContent,
|
|
1026
|
+
TooltipProvider,
|
|
1027
|
+
TooltipTrigger,
|
|
1028
|
+
buttonVariants
|
|
1029
|
+
};
|
|
1030
|
+
//# sourceMappingURL=index.mjs.map
|