@aircall/ds 0.10.0 → 0.13.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/AGENTS.consumer.md +57 -0
- package/README.md +59 -51
- package/dist/globals.css +1 -1
- package/dist/index.d.ts +1707 -1195
- package/dist/index.js +1978 -692
- package/package.json +7 -2
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { createContext, useContext } from "react";
|
|
1
3
|
import { Accordion as Accordion$1 } from "@base-ui/react/accordion";
|
|
2
4
|
import { clsx } from "clsx";
|
|
3
5
|
import { extendTailwindMerge } from "tailwind-merge";
|
|
4
|
-
import { ArrowDownToLine, ArrowLeft, ArrowRight, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CircleAlert, CircleAlertIcon, CircleCheck, FLAGS, FlagUs, Info, Loader2Icon, MinusIcon, MoreHorizontalIcon, PanelLeftIcon, Search, Smile, TriangleAlertIcon, XIcon } from "@aircall/react-icons";
|
|
6
|
+
import { ArrowDownToLine, ArrowLeft, ArrowRight, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ChevronsUpDownIcon, CircleAlert, CircleAlertIcon, CircleCheck, FLAGS, FlagUs, Info, Loader2Icon, MinusIcon, MoreHorizontalIcon, PanelLeftIcon, Search, Smile, TriangleAlertIcon, XIcon } from "@aircall/react-icons";
|
|
5
7
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import * as React$1 from "react";
|
|
7
|
-
import React, { createContext, useContext, useMemo } from "react";
|
|
8
|
-
import { AlertDialog as AlertDialog$1 } from "@base-ui/react/alert-dialog";
|
|
9
8
|
import { Button as Button$1 } from "@base-ui/react/button";
|
|
10
9
|
import { cva } from "class-variance-authority";
|
|
10
|
+
import { AlertDialog as AlertDialog$1 } from "@base-ui/react/alert-dialog";
|
|
11
11
|
import { Avatar as Avatar$1 } from "@base-ui/react/avatar";
|
|
12
12
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
13
13
|
import { useRender } from "@base-ui/react/use-render";
|
|
@@ -21,6 +21,9 @@ import { Combobox as Combobox$1 } from "@base-ui/react";
|
|
|
21
21
|
import { Command as Command$1 } from "cmdk";
|
|
22
22
|
import { Dialog as Dialog$1 } from "@base-ui/react/dialog";
|
|
23
23
|
import { flexRender, getCoreRowModel, useReactTable } from "@tanstack/react-table";
|
|
24
|
+
import { checkboxesFeature, hotkeysCoreFeature, selectionFeature, syncDataLoaderFeature } from "@headless-tree/core";
|
|
25
|
+
import { useTree } from "@headless-tree/react";
|
|
26
|
+
import { useControllableState } from "@aircall/hooks";
|
|
24
27
|
import { Drawer as DrawerPrimitive } from "@base-ui/react/drawer";
|
|
25
28
|
import { Radio } from "@base-ui/react/radio";
|
|
26
29
|
import { RadioGroup as RadioGroup$1 } from "@base-ui/react/radio-group";
|
|
@@ -102,24 +105,32 @@ function cn(...inputs) {
|
|
|
102
105
|
|
|
103
106
|
//#endregion
|
|
104
107
|
//#region src/components/accordion.tsx
|
|
105
|
-
|
|
108
|
+
const Accordion = React.forwardRef((componentProps, forwardRef) => {
|
|
109
|
+
const { className, ...props } = componentProps;
|
|
106
110
|
return /* @__PURE__ */ jsx(Accordion$1.Root, {
|
|
111
|
+
ref: forwardRef,
|
|
107
112
|
"data-slot": "accordion",
|
|
108
113
|
className: cn("flex w-full flex-col", className),
|
|
109
114
|
...props
|
|
110
115
|
});
|
|
111
|
-
}
|
|
112
|
-
|
|
116
|
+
});
|
|
117
|
+
Accordion.displayName = "Accordion";
|
|
118
|
+
const AccordionItem = React.forwardRef((componentProps, forwardRef) => {
|
|
119
|
+
const { className, ...props } = componentProps;
|
|
113
120
|
return /* @__PURE__ */ jsx(Accordion$1.Item, {
|
|
121
|
+
ref: forwardRef,
|
|
114
122
|
"data-slot": "accordion-item",
|
|
115
123
|
className: cn("not-last:border-b", className),
|
|
116
124
|
...props
|
|
117
125
|
});
|
|
118
|
-
}
|
|
119
|
-
|
|
126
|
+
});
|
|
127
|
+
AccordionItem.displayName = "AccordionItem";
|
|
128
|
+
const AccordionTrigger = React.forwardRef((componentProps, forwardRef) => {
|
|
129
|
+
const { className, children, ...props } = componentProps;
|
|
120
130
|
return /* @__PURE__ */ jsx(Accordion$1.Header, {
|
|
121
131
|
className: "flex",
|
|
122
132
|
children: /* @__PURE__ */ jsxs(Accordion$1.Trigger, {
|
|
133
|
+
ref: forwardRef,
|
|
123
134
|
"data-slot": "accordion-trigger",
|
|
124
135
|
className: cn("group/accordion-trigger relative flex flex-1 items-start justify-between rounded-md border border-transparent py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:after:border-ring aria-disabled:pointer-events-none aria-disabled:opacity-50 **:data-[slot=accordion-trigger-icon]:ml-auto **:data-[slot=accordion-trigger-icon]:size-4 **:data-[slot=accordion-trigger-icon]:text-muted-foreground", className),
|
|
125
136
|
...props,
|
|
@@ -136,9 +147,12 @@ function AccordionTrigger({ className, children, ...props }) {
|
|
|
136
147
|
]
|
|
137
148
|
})
|
|
138
149
|
});
|
|
139
|
-
}
|
|
140
|
-
|
|
150
|
+
});
|
|
151
|
+
AccordionTrigger.displayName = "AccordionTrigger";
|
|
152
|
+
const AccordionContent = React.forwardRef((componentProps, forwardRef) => {
|
|
153
|
+
const { className, children, ...props } = componentProps;
|
|
141
154
|
return /* @__PURE__ */ jsx(Accordion$1.Panel, {
|
|
155
|
+
ref: forwardRef,
|
|
142
156
|
"data-slot": "accordion-content",
|
|
143
157
|
className: "overflow-hidden text-sm data-open:animate-accordion-down data-closed:animate-accordion-up",
|
|
144
158
|
...props,
|
|
@@ -147,7 +161,8 @@ function AccordionContent({ className, children, ...props }) {
|
|
|
147
161
|
children
|
|
148
162
|
})
|
|
149
163
|
});
|
|
150
|
-
}
|
|
164
|
+
});
|
|
165
|
+
AccordionContent.displayName = "AccordionContent";
|
|
151
166
|
|
|
152
167
|
//#endregion
|
|
153
168
|
//#region src/components/button.tsx
|
|
@@ -157,7 +172,7 @@ const buttonVariants = cva("group/button inline-flex shrink-0 cursor-pointer ite
|
|
|
157
172
|
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
158
173
|
outline: "border-border bg-background hover:bg-muted hover:text-accent-foreground aria-expanded:bg-muted aria-expanded:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",
|
|
159
174
|
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",
|
|
160
|
-
ghost: "hover:bg-muted hover:text-accent-foreground aria-expanded:bg-muted aria-expanded:text-accent-foreground dark:hover:bg-
|
|
175
|
+
ghost: "hover:bg-muted hover:text-accent-foreground aria-expanded:bg-muted aria-expanded:text-accent-foreground dark:hover:bg-input/50",
|
|
161
176
|
destructive: "bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",
|
|
162
177
|
link: "text-primary underline underline-offset-4"
|
|
163
178
|
},
|
|
@@ -177,7 +192,7 @@ const buttonVariants = cva("group/button inline-flex shrink-0 cursor-pointer ite
|
|
|
177
192
|
block: false
|
|
178
193
|
}
|
|
179
194
|
});
|
|
180
|
-
const Button = React
|
|
195
|
+
const Button = React.forwardRef((componentProps, forwardRef) => {
|
|
181
196
|
const { className, variant = "default", size = "default", block = false, ...props } = componentProps;
|
|
182
197
|
return /* @__PURE__ */ jsx(Button$1, {
|
|
183
198
|
ref: forwardRef,
|
|
@@ -194,85 +209,172 @@ const Button = React$1.forwardRef((componentProps, forwardRef) => {
|
|
|
194
209
|
});
|
|
195
210
|
Button.displayName = "Button";
|
|
196
211
|
|
|
212
|
+
//#endregion
|
|
213
|
+
//#region src/components/action-bar.tsx
|
|
214
|
+
/** Fixed height of the ActionBar (px). Single source of truth — the bar uses it
|
|
215
|
+
* for its own height and consumers (e.g. DataTable) reserve space with it. */
|
|
216
|
+
const ActionBarHeight = 48;
|
|
217
|
+
/**
|
|
218
|
+
* Lets a parent (e.g. `DataTable`) supply the selected `count` and an `onClear`
|
|
219
|
+
* handler so an `<ActionBar>` rendered inside it doesn't have to be passed them.
|
|
220
|
+
* Explicit `count`/`onClear` props on `ActionBar` always take precedence, so the
|
|
221
|
+
* component still works standalone. Mirrors React Spectrum's `ActionBarContext`.
|
|
222
|
+
*/
|
|
223
|
+
const ActionBarContext = React.createContext(null);
|
|
224
|
+
const ActionBarButton = React.forwardRef((componentProps, forwardRef) => {
|
|
225
|
+
const { size = "default", ...props } = componentProps;
|
|
226
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
227
|
+
ref: forwardRef,
|
|
228
|
+
variant: "ghost",
|
|
229
|
+
size,
|
|
230
|
+
...props
|
|
231
|
+
});
|
|
232
|
+
});
|
|
233
|
+
ActionBarButton.displayName = "ActionBarButton";
|
|
234
|
+
const ActionBar = React.forwardRef((componentProps, forwardRef) => {
|
|
235
|
+
const { className, count, onClear, children, label, clearLabel = "Clear selection", style, ...props } = componentProps;
|
|
236
|
+
const ctx = React.useContext(ActionBarContext);
|
|
237
|
+
const resolvedCount = count ?? ctx?.count ?? 0;
|
|
238
|
+
const resolvedOnClear = onClear ?? ctx?.onClear;
|
|
239
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
240
|
+
ref: forwardRef,
|
|
241
|
+
role: "toolbar",
|
|
242
|
+
"aria-label": "Selection actions",
|
|
243
|
+
"data-slot": "action-bar",
|
|
244
|
+
className: cn("relative flex w-full items-center gap-2 rounded-md border border-border bg-popover px-2 text-popover-foreground shadow-lg", className),
|
|
245
|
+
style: {
|
|
246
|
+
...style,
|
|
247
|
+
height: ActionBarHeight
|
|
248
|
+
},
|
|
249
|
+
...props,
|
|
250
|
+
children: [
|
|
251
|
+
resolvedOnClear ? /* @__PURE__ */ jsx(ActionBarButton, {
|
|
252
|
+
size: "icon",
|
|
253
|
+
onClick: resolvedOnClear,
|
|
254
|
+
"aria-label": clearLabel,
|
|
255
|
+
children: /* @__PURE__ */ jsx(XIcon, {})
|
|
256
|
+
}) : null,
|
|
257
|
+
/* @__PURE__ */ jsx("span", {
|
|
258
|
+
className: "flex-1 truncate text-sm",
|
|
259
|
+
children: label ? label(resolvedCount) : `${resolvedCount} items selected.`
|
|
260
|
+
}),
|
|
261
|
+
children ? /* @__PURE__ */ jsx("div", {
|
|
262
|
+
className: "flex shrink-0 items-center gap-2",
|
|
263
|
+
children
|
|
264
|
+
}) : null
|
|
265
|
+
]
|
|
266
|
+
});
|
|
267
|
+
});
|
|
268
|
+
ActionBar.displayName = "ActionBar";
|
|
269
|
+
|
|
197
270
|
//#endregion
|
|
198
271
|
//#region src/components/alert-dialog.tsx
|
|
199
|
-
function AlertDialog(
|
|
272
|
+
function AlertDialog(componentProps) {
|
|
200
273
|
return /* @__PURE__ */ jsx(AlertDialog$1.Root, {
|
|
201
274
|
"data-slot": "alert-dialog",
|
|
202
|
-
...
|
|
275
|
+
...componentProps
|
|
203
276
|
});
|
|
204
277
|
}
|
|
205
|
-
|
|
278
|
+
const AlertDialogTrigger = React.forwardRef((componentProps, forwardRef) => {
|
|
279
|
+
const { ...props } = componentProps;
|
|
206
280
|
return /* @__PURE__ */ jsx(AlertDialog$1.Trigger, {
|
|
281
|
+
ref: forwardRef,
|
|
207
282
|
"data-slot": "alert-dialog-trigger",
|
|
208
283
|
...props
|
|
209
284
|
});
|
|
210
|
-
}
|
|
211
|
-
|
|
285
|
+
});
|
|
286
|
+
AlertDialogTrigger.displayName = "AlertDialogTrigger";
|
|
287
|
+
function AlertDialogPortal(componentProps) {
|
|
212
288
|
return /* @__PURE__ */ jsx(AlertDialog$1.Portal, {
|
|
213
289
|
"data-slot": "alert-dialog-portal",
|
|
214
|
-
...
|
|
290
|
+
...componentProps
|
|
215
291
|
});
|
|
216
292
|
}
|
|
217
|
-
|
|
293
|
+
const AlertDialogOverlay = React.forwardRef((componentProps, forwardRef) => {
|
|
294
|
+
const { className, ...props } = componentProps;
|
|
218
295
|
return /* @__PURE__ */ jsx(AlertDialog$1.Backdrop, {
|
|
296
|
+
ref: forwardRef,
|
|
219
297
|
"data-slot": "alert-dialog-overlay",
|
|
220
298
|
className: cn("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", className),
|
|
221
299
|
...props
|
|
222
300
|
});
|
|
223
|
-
}
|
|
224
|
-
|
|
301
|
+
});
|
|
302
|
+
AlertDialogOverlay.displayName = "AlertDialogOverlay";
|
|
303
|
+
const AlertDialogContent = React.forwardRef((componentProps, forwardRef) => {
|
|
304
|
+
const { className, size = "default", ...props } = componentProps;
|
|
225
305
|
return /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [/* @__PURE__ */ jsx(AlertDialogOverlay, {}), /* @__PURE__ */ jsx(AlertDialog$1.Popup, {
|
|
306
|
+
ref: forwardRef,
|
|
226
307
|
"data-slot": "alert-dialog-content",
|
|
227
308
|
"data-size": size,
|
|
228
309
|
className: cn("group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]: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", className),
|
|
229
310
|
...props
|
|
230
311
|
})] });
|
|
231
|
-
}
|
|
232
|
-
|
|
312
|
+
});
|
|
313
|
+
AlertDialogContent.displayName = "AlertDialogContent";
|
|
314
|
+
const AlertDialogHeader = React.forwardRef((componentProps, forwardRef) => {
|
|
315
|
+
const { className, ...props } = componentProps;
|
|
233
316
|
return /* @__PURE__ */ jsx("div", {
|
|
317
|
+
ref: forwardRef,
|
|
234
318
|
"data-slot": "alert-dialog-header",
|
|
235
319
|
className: cn("grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]", className),
|
|
236
320
|
...props
|
|
237
321
|
});
|
|
238
|
-
}
|
|
239
|
-
|
|
322
|
+
});
|
|
323
|
+
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
324
|
+
const AlertDialogFooter = React.forwardRef((componentProps, forwardRef) => {
|
|
325
|
+
const { className, ...props } = componentProps;
|
|
240
326
|
return /* @__PURE__ */ jsx("div", {
|
|
327
|
+
ref: forwardRef,
|
|
241
328
|
"data-slot": "alert-dialog-footer",
|
|
242
329
|
className: cn("-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end", className),
|
|
243
330
|
...props
|
|
244
331
|
});
|
|
245
|
-
}
|
|
246
|
-
|
|
332
|
+
});
|
|
333
|
+
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
334
|
+
const AlertDialogMedia = React.forwardRef((componentProps, forwardRef) => {
|
|
335
|
+
const { className, ...props } = componentProps;
|
|
247
336
|
return /* @__PURE__ */ jsx("div", {
|
|
337
|
+
ref: forwardRef,
|
|
248
338
|
"data-slot": "alert-dialog-media",
|
|
249
339
|
className: cn("mb-2 inline-flex size-10 items-center justify-center rounded-md bg-muted sm:group-data-[size=default]/alert-dialog-content:row-span-2 *:[svg:not([class*='size-'])]:size-6", className),
|
|
250
340
|
...props
|
|
251
341
|
});
|
|
252
|
-
}
|
|
253
|
-
|
|
342
|
+
});
|
|
343
|
+
AlertDialogMedia.displayName = "AlertDialogMedia";
|
|
344
|
+
const AlertDialogTitle = React.forwardRef((componentProps, forwardRef) => {
|
|
345
|
+
const { className, ...props } = componentProps;
|
|
254
346
|
return /* @__PURE__ */ jsx(AlertDialog$1.Title, {
|
|
347
|
+
ref: forwardRef,
|
|
255
348
|
"data-slot": "alert-dialog-title",
|
|
256
349
|
className: cn("text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2", className),
|
|
257
350
|
...props
|
|
258
351
|
});
|
|
259
|
-
}
|
|
260
|
-
|
|
352
|
+
});
|
|
353
|
+
AlertDialogTitle.displayName = "AlertDialogTitle";
|
|
354
|
+
const AlertDialogDescription = React.forwardRef((componentProps, forwardRef) => {
|
|
355
|
+
const { className, ...props } = componentProps;
|
|
261
356
|
return /* @__PURE__ */ jsx(AlertDialog$1.Description, {
|
|
357
|
+
ref: forwardRef,
|
|
262
358
|
"data-slot": "alert-dialog-description",
|
|
263
359
|
className: cn("text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className),
|
|
264
360
|
...props
|
|
265
361
|
});
|
|
266
|
-
}
|
|
267
|
-
|
|
362
|
+
});
|
|
363
|
+
AlertDialogDescription.displayName = "AlertDialogDescription";
|
|
364
|
+
const AlertDialogAction = React.forwardRef((componentProps, forwardRef) => {
|
|
365
|
+
const { className, ...props } = componentProps;
|
|
268
366
|
return /* @__PURE__ */ jsx(Button, {
|
|
367
|
+
ref: forwardRef,
|
|
269
368
|
"data-slot": "alert-dialog-action",
|
|
270
369
|
className: cn(className),
|
|
271
370
|
...props
|
|
272
371
|
});
|
|
273
|
-
}
|
|
274
|
-
|
|
372
|
+
});
|
|
373
|
+
AlertDialogAction.displayName = "AlertDialogAction";
|
|
374
|
+
const AlertDialogCancel = React.forwardRef((componentProps, forwardRef) => {
|
|
375
|
+
const { className, variant = "outline", size = "default", ...props } = componentProps;
|
|
275
376
|
return /* @__PURE__ */ jsx(AlertDialog$1.Close, {
|
|
377
|
+
ref: forwardRef,
|
|
276
378
|
"data-slot": "alert-dialog-cancel",
|
|
277
379
|
className: cn(className),
|
|
278
380
|
render: /* @__PURE__ */ jsx(Button, {
|
|
@@ -281,7 +383,8 @@ function AlertDialogCancel({ className, variant = "outline", size = "default", .
|
|
|
281
383
|
}),
|
|
282
384
|
...props
|
|
283
385
|
});
|
|
284
|
-
}
|
|
386
|
+
});
|
|
387
|
+
AlertDialogCancel.displayName = "AlertDialogCancel";
|
|
285
388
|
|
|
286
389
|
//#endregion
|
|
287
390
|
//#region src/components/alert.tsx
|
|
@@ -295,41 +398,54 @@ const alertVariants = cva("relative grid w-full items-start gap-x-2 gap-y-0.5 ro
|
|
|
295
398
|
warning: "bg-warning-background border-warning/35 [&>svg]:text-warning"
|
|
296
399
|
} }
|
|
297
400
|
});
|
|
298
|
-
|
|
401
|
+
const Alert = React.forwardRef((componentProps, forwardRef) => {
|
|
402
|
+
const { className, variant, ...props } = componentProps;
|
|
299
403
|
return /* @__PURE__ */ jsx("div", {
|
|
404
|
+
ref: forwardRef,
|
|
300
405
|
className: cn(alertVariants({ variant }), className),
|
|
301
406
|
"data-slot": "alert",
|
|
302
407
|
role: "alert",
|
|
303
408
|
...props
|
|
304
409
|
});
|
|
305
|
-
}
|
|
306
|
-
|
|
410
|
+
});
|
|
411
|
+
Alert.displayName = "Alert";
|
|
412
|
+
const AlertTitle = React.forwardRef((componentProps, forwardRef) => {
|
|
413
|
+
const { className, ...props } = componentProps;
|
|
307
414
|
return /* @__PURE__ */ jsx("div", {
|
|
415
|
+
ref: forwardRef,
|
|
308
416
|
className: cn("font-medium leading-6 [svg~&]:col-start-2", className),
|
|
309
417
|
"data-slot": "alert-title",
|
|
310
418
|
...props
|
|
311
419
|
});
|
|
312
|
-
}
|
|
313
|
-
|
|
420
|
+
});
|
|
421
|
+
AlertTitle.displayName = "AlertTitle";
|
|
422
|
+
const AlertDescription = React.forwardRef((componentProps, forwardRef) => {
|
|
423
|
+
const { className, ...props } = componentProps;
|
|
314
424
|
return /* @__PURE__ */ jsx("div", {
|
|
425
|
+
ref: forwardRef,
|
|
315
426
|
className: cn("flex flex-col gap-2.5 text-muted-foreground [svg~&]:col-start-2", className),
|
|
316
427
|
"data-slot": "alert-description",
|
|
317
428
|
...props
|
|
318
429
|
});
|
|
319
|
-
}
|
|
320
|
-
|
|
430
|
+
});
|
|
431
|
+
AlertDescription.displayName = "AlertDescription";
|
|
432
|
+
const AlertAction = React.forwardRef((componentProps, forwardRef) => {
|
|
433
|
+
const { className, ...props } = componentProps;
|
|
321
434
|
return /* @__PURE__ */ jsx("div", {
|
|
435
|
+
ref: forwardRef,
|
|
322
436
|
className: cn("flex gap-1 max-sm:col-start-2 max-sm:mt-2 sm:row-start-1 sm:row-end-3 sm:self-center sm:[[data-slot=alert-description]~&]:col-start-2 sm:[[data-slot=alert-title]~&]:col-start-2 sm:[svg~&]:col-start-2 sm:[svg~[data-slot=alert-description]~&]:col-start-3 sm:[svg~[data-slot=alert-title]~&]:col-start-3", className),
|
|
323
437
|
"data-slot": "alert-action",
|
|
324
438
|
...props
|
|
325
439
|
});
|
|
326
|
-
}
|
|
440
|
+
});
|
|
441
|
+
AlertAction.displayName = "AlertAction";
|
|
327
442
|
|
|
328
443
|
//#endregion
|
|
329
444
|
//#region src/components/avatar.tsx
|
|
330
|
-
const Avatar = React
|
|
445
|
+
const Avatar = React.forwardRef((componentProps, forwardRef) => {
|
|
446
|
+
const { className, size = "default", ...props } = componentProps;
|
|
331
447
|
return /* @__PURE__ */ jsx(Avatar$1.Root, {
|
|
332
|
-
ref,
|
|
448
|
+
ref: forwardRef,
|
|
333
449
|
"data-slot": "avatar",
|
|
334
450
|
"data-size": size,
|
|
335
451
|
className: cn("group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=xs]:size-5 data-[size=sm]:size-6 data-[size=lg]:size-10 data-[size=xl]:size-12 dark:after:mix-blend-lighten", className),
|
|
@@ -337,41 +453,56 @@ const Avatar = React$1.forwardRef(({ className, size = "default", ...props }, re
|
|
|
337
453
|
});
|
|
338
454
|
});
|
|
339
455
|
Avatar.displayName = "Avatar";
|
|
340
|
-
|
|
456
|
+
const AvatarImage = React.forwardRef((componentProps, forwardRef) => {
|
|
457
|
+
const { className, ...props } = componentProps;
|
|
341
458
|
return /* @__PURE__ */ jsx(Avatar$1.Image, {
|
|
459
|
+
ref: forwardRef,
|
|
342
460
|
"data-slot": "avatar-image",
|
|
343
461
|
className: cn("aspect-square size-full rounded-full object-cover", className),
|
|
344
462
|
...props
|
|
345
463
|
});
|
|
346
|
-
}
|
|
347
|
-
|
|
464
|
+
});
|
|
465
|
+
AvatarImage.displayName = "AvatarImage";
|
|
466
|
+
const AvatarFallback = React.forwardRef((componentProps, forwardRef) => {
|
|
467
|
+
const { className, ...props } = componentProps;
|
|
348
468
|
return /* @__PURE__ */ jsx(Avatar$1.Fallback, {
|
|
469
|
+
ref: forwardRef,
|
|
349
470
|
"data-slot": "avatar-fallback",
|
|
350
471
|
className: cn("flex size-full items-center justify-center rounded-full bg-background text-sm text-foreground group-data-[size=xs]/avatar:text-xs group-data-[size=sm]/avatar:text-xs group-data-[size=xl]/avatar:text-base", className),
|
|
351
472
|
...props
|
|
352
473
|
});
|
|
353
|
-
}
|
|
354
|
-
|
|
474
|
+
});
|
|
475
|
+
AvatarFallback.displayName = "AvatarFallback";
|
|
476
|
+
const AvatarBadge = React.forwardRef((componentProps, forwardRef) => {
|
|
477
|
+
const { className, ...props } = componentProps;
|
|
355
478
|
return /* @__PURE__ */ jsx("span", {
|
|
479
|
+
ref: forwardRef,
|
|
356
480
|
"data-slot": "avatar-badge",
|
|
357
481
|
className: cn("absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-blend-color ring-2 ring-background select-none", "group-data-[size=xs]/avatar:size-2 group-data-[size=xs]/avatar:[&>svg]:hidden", "group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden", "group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2", "group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2", "group-data-[size=xl]/avatar:size-3 group-data-[size=xl]/avatar:[&>svg]:size-2", className),
|
|
358
482
|
...props
|
|
359
483
|
});
|
|
360
|
-
}
|
|
361
|
-
|
|
484
|
+
});
|
|
485
|
+
AvatarBadge.displayName = "AvatarBadge";
|
|
486
|
+
const AvatarGroup = React.forwardRef((componentProps, forwardRef) => {
|
|
487
|
+
const { className, ...props } = componentProps;
|
|
362
488
|
return /* @__PURE__ */ jsx("div", {
|
|
489
|
+
ref: forwardRef,
|
|
363
490
|
"data-slot": "avatar-group",
|
|
364
491
|
className: cn("group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background", className),
|
|
365
492
|
...props
|
|
366
493
|
});
|
|
367
|
-
}
|
|
368
|
-
|
|
494
|
+
});
|
|
495
|
+
AvatarGroup.displayName = "AvatarGroup";
|
|
496
|
+
const AvatarGroupCount = React.forwardRef((componentProps, forwardRef) => {
|
|
497
|
+
const { className, ...props } = componentProps;
|
|
369
498
|
return /* @__PURE__ */ jsx("div", {
|
|
499
|
+
ref: forwardRef,
|
|
370
500
|
"data-slot": "avatar-group-count",
|
|
371
501
|
className: cn("relative flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-sm text-muted-foreground ring-2 ring-background group-has-data-[size=xs]/avatar-group:size-5 group-has-data-[size=sm]/avatar-group:size-6 group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=xl]/avatar-group:size-12 [&>svg]:size-4 group-has-data-[size=xs]/avatar-group:[&>svg]:size-3 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=xl]/avatar-group:[&>svg]:size-6", className),
|
|
372
502
|
...props
|
|
373
503
|
});
|
|
374
|
-
}
|
|
504
|
+
});
|
|
505
|
+
AvatarGroupCount.displayName = "AvatarGroupCount";
|
|
375
506
|
|
|
376
507
|
//#endregion
|
|
377
508
|
//#region src/components/counter-badge.tsx
|
|
@@ -383,12 +514,13 @@ const counterBadgeVariants = cva("group/counter-badge inline-flex h-5 min-w-5 sh
|
|
|
383
514
|
} },
|
|
384
515
|
defaultVariants: { variant: "default" }
|
|
385
516
|
});
|
|
386
|
-
const CounterBadge = React
|
|
517
|
+
const CounterBadge = React.forwardRef((componentProps, forwardRef) => {
|
|
518
|
+
const { className, variant = "default", render, ...props } = componentProps;
|
|
387
519
|
return useRender({
|
|
388
520
|
defaultTagName: "span",
|
|
389
521
|
props: mergeProps({
|
|
390
522
|
className: cn(counterBadgeVariants({ variant }), className),
|
|
391
|
-
ref
|
|
523
|
+
ref: forwardRef
|
|
392
524
|
}, props),
|
|
393
525
|
render,
|
|
394
526
|
state: {
|
|
@@ -581,13 +713,13 @@ const badgeVariants = cva("group/badge inline-flex w-fit max-w-36 shrink-0 items
|
|
|
581
713
|
* `charcoal` / `light` — or pass a stored hex via `legacyColor`. Icons are
|
|
582
714
|
* composed as children (auto-sized per `size`).
|
|
583
715
|
*/
|
|
584
|
-
const Badge = React
|
|
716
|
+
const Badge = React.forwardRef((componentProps, forwardRef) => {
|
|
585
717
|
const { className, size = "default", color, tone, legacyColor, render, children, ...props } = componentProps;
|
|
586
718
|
const resolved = legacyColor ? resolveTagColor(legacyColor) : {
|
|
587
719
|
color,
|
|
588
720
|
tone
|
|
589
721
|
};
|
|
590
|
-
const content = React
|
|
722
|
+
const content = React.Children.map(children, (child) => typeof child === "string" || typeof child === "number" ? /* @__PURE__ */ jsx("span", {
|
|
591
723
|
className: "min-w-0 truncate",
|
|
592
724
|
children: child
|
|
593
725
|
}) : child);
|
|
@@ -610,7 +742,7 @@ const Badge = React$1.forwardRef((componentProps, forwardRef) => {
|
|
|
610
742
|
});
|
|
611
743
|
});
|
|
612
744
|
Badge.displayName = "Badge";
|
|
613
|
-
const BadgeGroup = React
|
|
745
|
+
const BadgeGroup = React.forwardRef((componentProps, forwardRef) => {
|
|
614
746
|
const { className, ...props } = componentProps;
|
|
615
747
|
return /* @__PURE__ */ jsx("div", {
|
|
616
748
|
ref: forwardRef,
|
|
@@ -627,7 +759,7 @@ const badgeGroupCountVariants = cva("rounded-md", {
|
|
|
627
759
|
} },
|
|
628
760
|
defaultVariants: { size: "default" }
|
|
629
761
|
});
|
|
630
|
-
const BadgeGroupCount = React
|
|
762
|
+
const BadgeGroupCount = React.forwardRef((componentProps, forwardRef) => {
|
|
631
763
|
const { className, size = "default", ...props } = componentProps;
|
|
632
764
|
return /* @__PURE__ */ jsx(CounterBadge, {
|
|
633
765
|
ref: forwardRef,
|
|
@@ -720,8 +852,10 @@ const bannerVariants = cva("relative grid w-full items-start gap-x-2 gap-y-0.5 p
|
|
|
720
852
|
}
|
|
721
853
|
}
|
|
722
854
|
});
|
|
723
|
-
|
|
855
|
+
const Banner = React.forwardRef((componentProps, forwardRef) => {
|
|
856
|
+
const { className, variant, borderDirection, ...props } = componentProps;
|
|
724
857
|
return /* @__PURE__ */ jsx("div", {
|
|
858
|
+
ref: forwardRef,
|
|
725
859
|
className: cn(bannerVariants({
|
|
726
860
|
variant,
|
|
727
861
|
borderDirection
|
|
@@ -730,7 +864,8 @@ function Banner({ className, variant, borderDirection, ...props }) {
|
|
|
730
864
|
role: "alert",
|
|
731
865
|
...props
|
|
732
866
|
});
|
|
733
|
-
}
|
|
867
|
+
});
|
|
868
|
+
Banner.displayName = "Banner";
|
|
734
869
|
|
|
735
870
|
//#endregion
|
|
736
871
|
//#region src/components/notification-queue.tsx
|
|
@@ -741,9 +876,9 @@ const PRIORITY_WEIGHT = {
|
|
|
741
876
|
info: 10,
|
|
742
877
|
promotional: 1
|
|
743
878
|
};
|
|
744
|
-
const NotificationQueueContext = React
|
|
879
|
+
const NotificationQueueContext = React.createContext(null);
|
|
745
880
|
function useNotificationQueueContext() {
|
|
746
|
-
const ctx = React
|
|
881
|
+
const ctx = React.useContext(NotificationQueueContext);
|
|
747
882
|
if (!ctx) throw new Error("useNotification* hooks must be used inside <NotificationQueueProvider>");
|
|
748
883
|
return ctx;
|
|
749
884
|
}
|
|
@@ -796,12 +931,13 @@ function getSlotQueue(state, slot) {
|
|
|
796
931
|
return diff !== 0 ? diff : b.registeredAt - a.registeredAt;
|
|
797
932
|
});
|
|
798
933
|
}
|
|
799
|
-
function NotificationQueueProvider(
|
|
800
|
-
const
|
|
934
|
+
function NotificationQueueProvider(componentProps) {
|
|
935
|
+
const { children } = componentProps;
|
|
936
|
+
const [state, dispatch] = React.useReducer(reducer, {
|
|
801
937
|
entries: [],
|
|
802
938
|
dismissed: /* @__PURE__ */ new Set()
|
|
803
939
|
});
|
|
804
|
-
const value = React
|
|
940
|
+
const value = React.useMemo(() => ({
|
|
805
941
|
state,
|
|
806
942
|
dispatch
|
|
807
943
|
}), [state]);
|
|
@@ -813,7 +949,7 @@ function NotificationQueueProvider({ children }) {
|
|
|
813
949
|
function useNotificationQueue() {
|
|
814
950
|
const { dispatch } = useNotificationQueueContext();
|
|
815
951
|
return {
|
|
816
|
-
push: React
|
|
952
|
+
push: React.useCallback(({ id, slot, priority, render }) => {
|
|
817
953
|
const dismiss = () => dispatch({
|
|
818
954
|
type: "DISMISS",
|
|
819
955
|
id,
|
|
@@ -831,7 +967,7 @@ function useNotificationQueue() {
|
|
|
831
967
|
});
|
|
832
968
|
return { dismiss };
|
|
833
969
|
}, [dispatch]),
|
|
834
|
-
dismiss: React
|
|
970
|
+
dismiss: React.useCallback((id, slot) => dispatch({
|
|
835
971
|
type: "DISMISS",
|
|
836
972
|
id,
|
|
837
973
|
slot
|
|
@@ -840,7 +976,7 @@ function useNotificationQueue() {
|
|
|
840
976
|
}
|
|
841
977
|
function useNotification({ id, slot, priority, render }) {
|
|
842
978
|
const { dispatch } = useNotificationQueueContext();
|
|
843
|
-
const dismiss = React
|
|
979
|
+
const dismiss = React.useCallback(() => dispatch({
|
|
844
980
|
type: "DISMISS",
|
|
845
981
|
id,
|
|
846
982
|
slot
|
|
@@ -849,11 +985,11 @@ function useNotification({ id, slot, priority, render }) {
|
|
|
849
985
|
slot,
|
|
850
986
|
dispatch
|
|
851
987
|
]);
|
|
852
|
-
const renderRef = React
|
|
988
|
+
const renderRef = React.useRef(render);
|
|
853
989
|
renderRef.current = render;
|
|
854
|
-
const contentRef = React
|
|
990
|
+
const contentRef = React.useRef(null);
|
|
855
991
|
contentRef.current = renderRef.current({ dismiss });
|
|
856
|
-
React
|
|
992
|
+
React.useEffect(() => {
|
|
857
993
|
dispatch({
|
|
858
994
|
type: "REGISTER",
|
|
859
995
|
entry: {
|
|
@@ -877,28 +1013,34 @@ function useNotification({ id, slot, priority, render }) {
|
|
|
877
1013
|
]);
|
|
878
1014
|
return { dismiss };
|
|
879
1015
|
}
|
|
880
|
-
|
|
1016
|
+
const NotificationSlot = React.forwardRef((componentProps, forwardRef) => {
|
|
1017
|
+
const { slot, className } = componentProps;
|
|
881
1018
|
const { state } = useNotificationQueueContext();
|
|
882
1019
|
const active = getSlotQueue(state, slot)[0];
|
|
883
1020
|
if (!active) return null;
|
|
884
1021
|
return /* @__PURE__ */ jsx("div", {
|
|
1022
|
+
ref: forwardRef,
|
|
885
1023
|
"data-slot": "notification-slot",
|
|
886
1024
|
className: cn(className),
|
|
887
1025
|
children: active.contentRef.current
|
|
888
1026
|
});
|
|
889
|
-
}
|
|
1027
|
+
});
|
|
1028
|
+
NotificationSlot.displayName = "NotificationSlot";
|
|
890
1029
|
|
|
891
1030
|
//#endregion
|
|
892
1031
|
//#region src/components/separator.tsx
|
|
893
|
-
|
|
1032
|
+
const Separator = React.forwardRef((componentProps, forwardRef) => {
|
|
1033
|
+
const { className, orientation = "horizontal", ...props } = componentProps;
|
|
894
1034
|
return /* @__PURE__ */ jsx(Separator$1, {
|
|
1035
|
+
ref: forwardRef,
|
|
895
1036
|
"data-slot": "separator",
|
|
896
1037
|
"data-orientation": orientation,
|
|
897
1038
|
orientation,
|
|
898
1039
|
className: cn("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:w-px data-[orientation=vertical]:self-stretch", className),
|
|
899
1040
|
...props
|
|
900
1041
|
});
|
|
901
|
-
}
|
|
1042
|
+
});
|
|
1043
|
+
Separator.displayName = "Separator";
|
|
902
1044
|
|
|
903
1045
|
//#endregion
|
|
904
1046
|
//#region src/components/button-group.tsx
|
|
@@ -909,31 +1051,42 @@ const buttonGroupVariants = cva("flex w-fit items-stretch *:focus-visible:relati
|
|
|
909
1051
|
} },
|
|
910
1052
|
defaultVariants: { orientation: "horizontal" }
|
|
911
1053
|
});
|
|
912
|
-
|
|
1054
|
+
const ButtonGroup = React.forwardRef((componentProps, forwardRef) => {
|
|
1055
|
+
const { className, orientation, ...props } = componentProps;
|
|
913
1056
|
return /* @__PURE__ */ jsx("div", {
|
|
1057
|
+
ref: forwardRef,
|
|
914
1058
|
role: "group",
|
|
915
1059
|
"data-slot": "button-group",
|
|
916
1060
|
"data-orientation": orientation,
|
|
917
1061
|
className: cn(buttonGroupVariants({ orientation }), className),
|
|
918
1062
|
...props
|
|
919
1063
|
});
|
|
920
|
-
}
|
|
921
|
-
|
|
1064
|
+
});
|
|
1065
|
+
ButtonGroup.displayName = "ButtonGroup";
|
|
1066
|
+
const ButtonGroupText = React.forwardRef((componentProps, forwardRef) => {
|
|
1067
|
+
const { className, render, ...props } = componentProps;
|
|
922
1068
|
return useRender({
|
|
923
1069
|
defaultTagName: "div",
|
|
924
|
-
props: mergeProps({
|
|
1070
|
+
props: mergeProps({
|
|
1071
|
+
className: cn("flex items-center gap-2 rounded-md border bg-muted px-2.5 text-sm font-medium [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className),
|
|
1072
|
+
ref: forwardRef
|
|
1073
|
+
}, props),
|
|
925
1074
|
render,
|
|
926
1075
|
state: { slot: "button-group-text" }
|
|
927
1076
|
});
|
|
928
|
-
}
|
|
929
|
-
|
|
1077
|
+
});
|
|
1078
|
+
ButtonGroupText.displayName = "ButtonGroupText";
|
|
1079
|
+
const ButtonGroupSeparator = React.forwardRef((componentProps, forwardRef) => {
|
|
1080
|
+
const { className, orientation = "vertical", ...props } = componentProps;
|
|
930
1081
|
return /* @__PURE__ */ jsx(Separator, {
|
|
1082
|
+
ref: forwardRef,
|
|
931
1083
|
"data-slot": "button-group-separator",
|
|
932
1084
|
orientation,
|
|
933
1085
|
className: cn("relative self-stretch bg-input data-[orientation=horizontal]:mx-px data-[orientation=horizontal]:w-auto data-[orientation=vertical]:my-px data-[orientation=vertical]:h-auto", className),
|
|
934
1086
|
...props
|
|
935
1087
|
});
|
|
936
|
-
}
|
|
1088
|
+
});
|
|
1089
|
+
ButtonGroupSeparator.displayName = "ButtonGroupSeparator";
|
|
937
1090
|
|
|
938
1091
|
//#endregion
|
|
939
1092
|
//#region src/components/calendar.tsx
|
|
@@ -1019,8 +1172,8 @@ function Calendar({ className, classNames, showOutsideDays = true, captionLayout
|
|
|
1019
1172
|
}
|
|
1020
1173
|
function CalendarDayButton({ className: dayClassName, day, modifiers, locale, ...props }) {
|
|
1021
1174
|
const defaultClassNames = getDefaultClassNames();
|
|
1022
|
-
const ref = React
|
|
1023
|
-
React
|
|
1175
|
+
const ref = React.useRef(null);
|
|
1176
|
+
React.useEffect(() => {
|
|
1024
1177
|
if (modifiers.focused) ref.current?.focus();
|
|
1025
1178
|
}, [modifiers.focused]);
|
|
1026
1179
|
return /* @__PURE__ */ jsx(Button, {
|
|
@@ -1039,83 +1192,106 @@ function CalendarDayButton({ className: dayClassName, day, modifiers, locale, ..
|
|
|
1039
1192
|
|
|
1040
1193
|
//#endregion
|
|
1041
1194
|
//#region src/components/card.tsx
|
|
1042
|
-
|
|
1195
|
+
const Card = React.forwardRef((componentProps, forwardRef) => {
|
|
1196
|
+
const { className, size = "default", ...props } = componentProps;
|
|
1043
1197
|
return /* @__PURE__ */ jsx("div", {
|
|
1198
|
+
ref: forwardRef,
|
|
1044
1199
|
"data-slot": "card",
|
|
1045
|
-
|
|
1200
|
+
"data-size": size,
|
|
1201
|
+
className: cn("group/card flex flex-col gap-4 overflow-hidden rounded-xl border bg-card py-4 text-sm text-card-foreground 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", className),
|
|
1046
1202
|
...props
|
|
1047
1203
|
});
|
|
1048
|
-
}
|
|
1049
|
-
|
|
1204
|
+
});
|
|
1205
|
+
Card.displayName = "Card";
|
|
1206
|
+
const CardHeader = React.forwardRef((componentProps, forwardRef) => {
|
|
1207
|
+
const { className, ...props } = componentProps;
|
|
1050
1208
|
return /* @__PURE__ */ jsx("div", {
|
|
1209
|
+
ref: forwardRef,
|
|
1051
1210
|
"data-slot": "card-header",
|
|
1052
|
-
className: cn("@container/card-header grid auto-rows-min
|
|
1211
|
+
className: cn("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-4 group-data-[size=sm]/card:px-3 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-4 group-data-[size=sm]/card:[.border-b]:pb-3", className),
|
|
1053
1212
|
...props
|
|
1054
1213
|
});
|
|
1055
|
-
}
|
|
1056
|
-
|
|
1214
|
+
});
|
|
1215
|
+
CardHeader.displayName = "CardHeader";
|
|
1216
|
+
const CardTitle = React.forwardRef((componentProps, forwardRef) => {
|
|
1217
|
+
const { className, ...props } = componentProps;
|
|
1057
1218
|
return /* @__PURE__ */ jsx("div", {
|
|
1219
|
+
ref: forwardRef,
|
|
1058
1220
|
"data-slot": "card-title",
|
|
1059
|
-
className: cn("leading-
|
|
1221
|
+
className: cn("text-base leading-snug font-medium group-data-[size=sm]/card:text-sm", className),
|
|
1060
1222
|
...props
|
|
1061
1223
|
});
|
|
1062
|
-
}
|
|
1063
|
-
|
|
1224
|
+
});
|
|
1225
|
+
CardTitle.displayName = "CardTitle";
|
|
1226
|
+
const CardDescription = React.forwardRef((componentProps, forwardRef) => {
|
|
1227
|
+
const { className, ...props } = componentProps;
|
|
1064
1228
|
return /* @__PURE__ */ jsx("div", {
|
|
1229
|
+
ref: forwardRef,
|
|
1065
1230
|
"data-slot": "card-description",
|
|
1066
|
-
className: cn("text-muted-foreground
|
|
1231
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
1067
1232
|
...props
|
|
1068
1233
|
});
|
|
1069
|
-
}
|
|
1070
|
-
|
|
1234
|
+
});
|
|
1235
|
+
CardDescription.displayName = "CardDescription";
|
|
1236
|
+
const CardAction = React.forwardRef((componentProps, forwardRef) => {
|
|
1237
|
+
const { className, ...props } = componentProps;
|
|
1071
1238
|
return /* @__PURE__ */ jsx("div", {
|
|
1239
|
+
ref: forwardRef,
|
|
1072
1240
|
"data-slot": "card-action",
|
|
1073
1241
|
className: cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className),
|
|
1074
1242
|
...props
|
|
1075
1243
|
});
|
|
1076
|
-
}
|
|
1077
|
-
|
|
1244
|
+
});
|
|
1245
|
+
CardAction.displayName = "CardAction";
|
|
1246
|
+
const CardContent = React.forwardRef((componentProps, forwardRef) => {
|
|
1247
|
+
const { className, ...props } = componentProps;
|
|
1078
1248
|
return /* @__PURE__ */ jsx("div", {
|
|
1249
|
+
ref: forwardRef,
|
|
1079
1250
|
"data-slot": "card-content",
|
|
1080
|
-
className: cn("px-
|
|
1251
|
+
className: cn("px-4 group-data-[size=sm]/card:px-3", className),
|
|
1081
1252
|
...props
|
|
1082
1253
|
});
|
|
1083
|
-
}
|
|
1084
|
-
|
|
1254
|
+
});
|
|
1255
|
+
CardContent.displayName = "CardContent";
|
|
1256
|
+
const CardFooter = React.forwardRef((componentProps, forwardRef) => {
|
|
1257
|
+
const { className, ...props } = componentProps;
|
|
1085
1258
|
return /* @__PURE__ */ jsx("div", {
|
|
1259
|
+
ref: forwardRef,
|
|
1086
1260
|
"data-slot": "card-footer",
|
|
1087
|
-
className: cn("flex items-center
|
|
1261
|
+
className: cn("flex items-center rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/card:p-3", className),
|
|
1088
1262
|
...props
|
|
1089
1263
|
});
|
|
1090
|
-
}
|
|
1264
|
+
});
|
|
1265
|
+
CardFooter.displayName = "CardFooter";
|
|
1091
1266
|
|
|
1092
1267
|
//#endregion
|
|
1093
1268
|
//#region src/components/carousel.tsx
|
|
1094
|
-
const CarouselContext = React
|
|
1269
|
+
const CarouselContext = React.createContext(null);
|
|
1095
1270
|
function useCarousel() {
|
|
1096
|
-
const context = React
|
|
1271
|
+
const context = React.useContext(CarouselContext);
|
|
1097
1272
|
if (!context) throw new Error("useCarousel must be used within a <Carousel />");
|
|
1098
1273
|
return context;
|
|
1099
1274
|
}
|
|
1100
|
-
|
|
1275
|
+
const Carousel = React.forwardRef((componentProps, forwardRef) => {
|
|
1276
|
+
const { orientation = "horizontal", opts, setApi, plugins, className, children, ...props } = componentProps;
|
|
1101
1277
|
const [carouselRef, api] = useEmblaCarousel({
|
|
1102
1278
|
...opts,
|
|
1103
1279
|
axis: orientation === "horizontal" ? "x" : "y"
|
|
1104
1280
|
}, plugins);
|
|
1105
|
-
const [canScrollPrev, setCanScrollPrev] = React
|
|
1106
|
-
const [canScrollNext, setCanScrollNext] = React
|
|
1107
|
-
const onSelect = React
|
|
1281
|
+
const [canScrollPrev, setCanScrollPrev] = React.useState(false);
|
|
1282
|
+
const [canScrollNext, setCanScrollNext] = React.useState(false);
|
|
1283
|
+
const onSelect = React.useCallback((api$1) => {
|
|
1108
1284
|
if (!api$1) return;
|
|
1109
1285
|
setCanScrollPrev(api$1.canScrollPrev());
|
|
1110
1286
|
setCanScrollNext(api$1.canScrollNext());
|
|
1111
1287
|
}, []);
|
|
1112
|
-
const scrollPrev = React
|
|
1288
|
+
const scrollPrev = React.useCallback(() => {
|
|
1113
1289
|
api?.scrollPrev();
|
|
1114
1290
|
}, [api]);
|
|
1115
|
-
const scrollNext = React
|
|
1291
|
+
const scrollNext = React.useCallback(() => {
|
|
1116
1292
|
api?.scrollNext();
|
|
1117
1293
|
}, [api]);
|
|
1118
|
-
const handleKeyDown = React
|
|
1294
|
+
const handleKeyDown = React.useCallback((event) => {
|
|
1119
1295
|
if (event.key === "ArrowLeft") {
|
|
1120
1296
|
event.preventDefault();
|
|
1121
1297
|
scrollPrev();
|
|
@@ -1124,11 +1300,11 @@ function Carousel({ orientation = "horizontal", opts, setApi, plugins, className
|
|
|
1124
1300
|
scrollNext();
|
|
1125
1301
|
}
|
|
1126
1302
|
}, [scrollPrev, scrollNext]);
|
|
1127
|
-
React
|
|
1303
|
+
React.useEffect(() => {
|
|
1128
1304
|
if (!api || !setApi) return;
|
|
1129
1305
|
setApi(api);
|
|
1130
1306
|
}, [api, setApi]);
|
|
1131
|
-
React
|
|
1307
|
+
React.useEffect(() => {
|
|
1132
1308
|
if (!api) return;
|
|
1133
1309
|
onSelect(api);
|
|
1134
1310
|
api.on("reInit", onSelect);
|
|
@@ -1149,6 +1325,7 @@ function Carousel({ orientation = "horizontal", opts, setApi, plugins, className
|
|
|
1149
1325
|
canScrollNext
|
|
1150
1326
|
},
|
|
1151
1327
|
children: /* @__PURE__ */ jsx("div", {
|
|
1328
|
+
ref: forwardRef,
|
|
1152
1329
|
onKeyDownCapture: handleKeyDown,
|
|
1153
1330
|
className: cn("relative", className),
|
|
1154
1331
|
role: "region",
|
|
@@ -1158,36 +1335,45 @@ function Carousel({ orientation = "horizontal", opts, setApi, plugins, className
|
|
|
1158
1335
|
children
|
|
1159
1336
|
})
|
|
1160
1337
|
});
|
|
1161
|
-
}
|
|
1162
|
-
|
|
1338
|
+
});
|
|
1339
|
+
Carousel.displayName = "Carousel";
|
|
1340
|
+
const CarouselContent = React.forwardRef((componentProps, forwardRef) => {
|
|
1341
|
+
const { className, ...props } = componentProps;
|
|
1163
1342
|
const { carouselRef, orientation } = useCarousel();
|
|
1164
1343
|
return /* @__PURE__ */ jsx("div", {
|
|
1165
1344
|
ref: carouselRef,
|
|
1166
1345
|
className: "overflow-hidden",
|
|
1167
1346
|
"data-slot": "carousel-content",
|
|
1168
1347
|
children: /* @__PURE__ */ jsx("div", {
|
|
1348
|
+
ref: forwardRef,
|
|
1169
1349
|
className: cn("flex", orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col", className),
|
|
1170
1350
|
...props
|
|
1171
1351
|
})
|
|
1172
1352
|
});
|
|
1173
|
-
}
|
|
1174
|
-
|
|
1353
|
+
});
|
|
1354
|
+
CarouselContent.displayName = "CarouselContent";
|
|
1355
|
+
const CarouselItem = React.forwardRef((componentProps, forwardRef) => {
|
|
1356
|
+
const { className, ...props } = componentProps;
|
|
1175
1357
|
const { orientation } = useCarousel();
|
|
1176
1358
|
return /* @__PURE__ */ jsx("div", {
|
|
1359
|
+
ref: forwardRef,
|
|
1177
1360
|
role: "group",
|
|
1178
1361
|
"aria-roledescription": "slide",
|
|
1179
1362
|
"data-slot": "carousel-item",
|
|
1180
1363
|
className: cn("min-w-0 shrink-0 grow-0 basis-full", orientation === "horizontal" ? "pl-4" : "pt-4", className),
|
|
1181
1364
|
...props
|
|
1182
1365
|
});
|
|
1183
|
-
}
|
|
1184
|
-
|
|
1366
|
+
});
|
|
1367
|
+
CarouselItem.displayName = "CarouselItem";
|
|
1368
|
+
const CarouselPrevious = React.forwardRef((componentProps, forwardRef) => {
|
|
1369
|
+
const { className, variant = "outline", size = "sm", ...props } = componentProps;
|
|
1185
1370
|
const { orientation, scrollPrev, canScrollPrev } = useCarousel();
|
|
1186
1371
|
return /* @__PURE__ */ jsxs(Button, {
|
|
1372
|
+
ref: forwardRef,
|
|
1187
1373
|
"data-slot": "carousel-previous",
|
|
1188
1374
|
variant,
|
|
1189
1375
|
size,
|
|
1190
|
-
className: cn("absolute size-8 rounded-full", orientation === "horizontal" ? "top-1/2 -left-12 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90", className),
|
|
1376
|
+
className: cn("absolute size-8 touch-manipulation rounded-full", orientation === "horizontal" ? "top-1/2 -left-12 -translate-y-1/2" : "-top-12 left-1/2 -translate-x-1/2 rotate-90", className),
|
|
1191
1377
|
disabled: !canScrollPrev,
|
|
1192
1378
|
onClick: scrollPrev,
|
|
1193
1379
|
...props,
|
|
@@ -1196,14 +1382,17 @@ function CarouselPrevious({ className, variant = "outline", size = "sm", ...prop
|
|
|
1196
1382
|
children: "Previous slide"
|
|
1197
1383
|
})]
|
|
1198
1384
|
});
|
|
1199
|
-
}
|
|
1200
|
-
|
|
1385
|
+
});
|
|
1386
|
+
CarouselPrevious.displayName = "CarouselPrevious";
|
|
1387
|
+
const CarouselNext = React.forwardRef((componentProps, forwardRef) => {
|
|
1388
|
+
const { className, variant = "outline", size = "sm", ...props } = componentProps;
|
|
1201
1389
|
const { orientation, scrollNext, canScrollNext } = useCarousel();
|
|
1202
1390
|
return /* @__PURE__ */ jsxs(Button, {
|
|
1391
|
+
ref: forwardRef,
|
|
1203
1392
|
"data-slot": "carousel-next",
|
|
1204
1393
|
variant,
|
|
1205
1394
|
size,
|
|
1206
|
-
className: cn("absolute size-8 rounded-full", orientation === "horizontal" ? "top-1/2 -right-12 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90", className),
|
|
1395
|
+
className: cn("absolute size-8 touch-manipulation rounded-full", orientation === "horizontal" ? "top-1/2 -right-12 -translate-y-1/2" : "-bottom-12 left-1/2 -translate-x-1/2 rotate-90", className),
|
|
1207
1396
|
disabled: !canScrollNext,
|
|
1208
1397
|
onClick: scrollNext,
|
|
1209
1398
|
...props,
|
|
@@ -1212,13 +1401,15 @@ function CarouselNext({ className, variant = "outline", size = "sm", ...props })
|
|
|
1212
1401
|
children: "Next slide"
|
|
1213
1402
|
})]
|
|
1214
1403
|
});
|
|
1215
|
-
}
|
|
1404
|
+
});
|
|
1405
|
+
CarouselNext.displayName = "CarouselNext";
|
|
1216
1406
|
|
|
1217
1407
|
//#endregion
|
|
1218
1408
|
//#region src/components/checkbox.tsx
|
|
1219
|
-
const Checkbox = React
|
|
1409
|
+
const Checkbox = React.forwardRef((componentProps, forwardRef) => {
|
|
1410
|
+
const { className, ...props } = componentProps;
|
|
1220
1411
|
return /* @__PURE__ */ jsx(Checkbox$1.Root, {
|
|
1221
|
-
ref,
|
|
1412
|
+
ref: forwardRef,
|
|
1222
1413
|
"data-slot": "checkbox",
|
|
1223
1414
|
className: cn("peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-[color,box-shadow,opacity] outline-none active:opacity-60 group-has-disabled/field:opacity-50 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 dark:disabled:bg-input/80 aria-invalid:border-destructive focus-visible:aria-invalid:ring-3 focus-visible:aria-invalid:ring-destructive/20 hover:aria-invalid:data-unchecked:bg-destructive-background focus-visible:aria-invalid:data-unchecked:bg-destructive-background dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:focus-visible:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground data-indeterminate:border-primary data-indeterminate:bg-primary data-indeterminate:text-primary-foreground aria-invalid:data-checked:border-destructive aria-invalid:data-checked:bg-destructive aria-invalid:data-indeterminate:border-destructive aria-invalid:data-indeterminate:bg-destructive dark:data-checked:bg-primary dark:data-indeterminate:bg-primary", className),
|
|
1224
1415
|
...props,
|
|
@@ -1297,7 +1488,7 @@ const chipGlowVariants = cva("", {
|
|
|
1297
1488
|
* inherits the chip's text color and brightens on hover. Exported so the
|
|
1298
1489
|
* combobox can reuse the exact treatment for its Base-UI-bound chips.
|
|
1299
1490
|
*/
|
|
1300
|
-
const ChipRemove = React
|
|
1491
|
+
const ChipRemove = React.forwardRef((componentProps, forwardRef) => {
|
|
1301
1492
|
const { className, children, ...props } = componentProps;
|
|
1302
1493
|
return /* @__PURE__ */ jsx(Button, {
|
|
1303
1494
|
ref: forwardRef,
|
|
@@ -1317,7 +1508,7 @@ ChipRemove.displayName = "ChipRemove";
|
|
|
1317
1508
|
* non-interactive — only the X reacts to hover. For combobox-bound chips that
|
|
1318
1509
|
* must drive Base UI's selection state, see `ComboboxChip`.
|
|
1319
1510
|
*/
|
|
1320
|
-
const Chip = React
|
|
1511
|
+
const Chip = React.forwardRef((componentProps, forwardRef) => {
|
|
1321
1512
|
const { className, children, color, tone, legacyColor, glow, ...props } = componentProps;
|
|
1322
1513
|
const glowColor = legacyColor ? resolveTagColor(legacyColor).color : color;
|
|
1323
1514
|
return /* @__PURE__ */ jsx(Badge, {
|
|
@@ -1339,8 +1530,10 @@ Chip.displayName = "Chip";
|
|
|
1339
1530
|
|
|
1340
1531
|
//#endregion
|
|
1341
1532
|
//#region src/components/scroll-area.tsx
|
|
1342
|
-
|
|
1533
|
+
const ScrollArea = React.forwardRef((componentProps, forwardRef) => {
|
|
1534
|
+
const { className, children, scrollFade = false, scrollbarGutter = false, ...props } = componentProps;
|
|
1343
1535
|
return /* @__PURE__ */ jsxs(ScrollAreaPrimitive.Root, {
|
|
1536
|
+
ref: forwardRef,
|
|
1344
1537
|
className: cn("size-full min-h-0", className),
|
|
1345
1538
|
...props,
|
|
1346
1539
|
children: [
|
|
@@ -1354,9 +1547,12 @@ function ScrollArea({ className, children, scrollFade = false, scrollbarGutter =
|
|
|
1354
1547
|
/* @__PURE__ */ jsx(ScrollAreaPrimitive.Corner, { "data-slot": "scroll-area-corner" })
|
|
1355
1548
|
]
|
|
1356
1549
|
});
|
|
1357
|
-
}
|
|
1358
|
-
|
|
1550
|
+
});
|
|
1551
|
+
ScrollArea.displayName = "ScrollArea";
|
|
1552
|
+
const ScrollBar = React.forwardRef((componentProps, forwardRef) => {
|
|
1553
|
+
const { className, orientation = "vertical", ...props } = componentProps;
|
|
1359
1554
|
return /* @__PURE__ */ jsx(ScrollAreaPrimitive.Scrollbar, {
|
|
1555
|
+
ref: forwardRef,
|
|
1360
1556
|
className: cn("m-1 flex opacity-0 transition-opacity delay-300 data-[orientation=horizontal]:h-1.5 data-[orientation=vertical]:w-1.5 data-[orientation=horizontal]:flex-col data-hovering:opacity-100 data-scrolling:opacity-100 data-hovering:delay-0 data-scrolling:delay-0 data-hovering:duration-100 data-scrolling:duration-100", className),
|
|
1361
1557
|
"data-slot": "scroll-area-scrollbar",
|
|
1362
1558
|
orientation,
|
|
@@ -1366,7 +1562,8 @@ function ScrollBar({ className, orientation = "vertical", ...props }) {
|
|
|
1366
1562
|
"data-slot": "scroll-area-thumb"
|
|
1367
1563
|
})
|
|
1368
1564
|
});
|
|
1369
|
-
}
|
|
1565
|
+
});
|
|
1566
|
+
ScrollBar.displayName = "ScrollBar";
|
|
1370
1567
|
|
|
1371
1568
|
//#endregion
|
|
1372
1569
|
//#region src/components/filter.tsx
|
|
@@ -1378,7 +1575,7 @@ function ScrollBar({ className, orientation = "vertical", ...props }) {
|
|
|
1378
1575
|
* `max-w-36` (144px). Compose inside a `FilterGroup` with a trailing
|
|
1379
1576
|
* `FilterClearAllButton` (see the FilterBar story).
|
|
1380
1577
|
*/
|
|
1381
|
-
const Filter = React
|
|
1578
|
+
const Filter = React.forwardRef((componentProps, forwardRef) => {
|
|
1382
1579
|
const { className, children, onRemove, removeLabel = "Remove filter" } = componentProps;
|
|
1383
1580
|
return /* @__PURE__ */ jsxs(Chip, {
|
|
1384
1581
|
ref: forwardRef,
|
|
@@ -1398,7 +1595,7 @@ Filter.displayName = "Filter";
|
|
|
1398
1595
|
* horizontal `ScrollArea` (inset scroll + edge fade) — it does not wrap onto
|
|
1399
1596
|
* multiple lines.
|
|
1400
1597
|
*/
|
|
1401
|
-
const FilterGroup = React
|
|
1598
|
+
const FilterGroup = React.forwardRef((componentProps, forwardRef) => {
|
|
1402
1599
|
const { className, children, ...props } = componentProps;
|
|
1403
1600
|
return /* @__PURE__ */ jsx("div", {
|
|
1404
1601
|
"data-slot": "filter-group",
|
|
@@ -1422,7 +1619,7 @@ FilterGroup.displayName = "FilterGroup";
|
|
|
1422
1619
|
* small `Button` with the styling pinned. Provide `onClick`; the label
|
|
1423
1620
|
* defaults to "Clear all filters" (pass translated `children` to override).
|
|
1424
1621
|
*/
|
|
1425
|
-
const FilterClearAllButton = React
|
|
1622
|
+
const FilterClearAllButton = React.forwardRef((componentProps, forwardRef) => {
|
|
1426
1623
|
const { className, children = "Clear all filters", ...props } = componentProps;
|
|
1427
1624
|
return /* @__PURE__ */ jsx(Button, {
|
|
1428
1625
|
ref: forwardRef,
|
|
@@ -1439,29 +1636,36 @@ FilterClearAllButton.displayName = "FilterClearAllButton";
|
|
|
1439
1636
|
|
|
1440
1637
|
//#endregion
|
|
1441
1638
|
//#region src/components/collapsible.tsx
|
|
1442
|
-
|
|
1639
|
+
const Collapsible = React.forwardRef((componentProps, forwardRef) => {
|
|
1443
1640
|
return /* @__PURE__ */ jsx(Collapsible$1.Root, {
|
|
1641
|
+
ref: forwardRef,
|
|
1444
1642
|
"data-slot": "collapsible",
|
|
1445
|
-
...
|
|
1643
|
+
...componentProps
|
|
1446
1644
|
});
|
|
1447
|
-
}
|
|
1448
|
-
|
|
1645
|
+
});
|
|
1646
|
+
Collapsible.displayName = "Collapsible";
|
|
1647
|
+
const CollapsibleTrigger = React.forwardRef((componentProps, forwardRef) => {
|
|
1449
1648
|
return /* @__PURE__ */ jsx(Collapsible$1.Trigger, {
|
|
1649
|
+
ref: forwardRef,
|
|
1450
1650
|
"data-slot": "collapsible-trigger",
|
|
1451
|
-
...
|
|
1651
|
+
...componentProps
|
|
1452
1652
|
});
|
|
1453
|
-
}
|
|
1454
|
-
|
|
1653
|
+
});
|
|
1654
|
+
CollapsibleTrigger.displayName = "CollapsibleTrigger";
|
|
1655
|
+
const CollapsibleContent = React.forwardRef((componentProps, forwardRef) => {
|
|
1455
1656
|
return /* @__PURE__ */ jsx(Collapsible$1.Panel, {
|
|
1657
|
+
ref: forwardRef,
|
|
1456
1658
|
"data-slot": "collapsible-content",
|
|
1457
|
-
...
|
|
1659
|
+
...componentProps
|
|
1458
1660
|
});
|
|
1459
|
-
}
|
|
1661
|
+
});
|
|
1662
|
+
CollapsibleContent.displayName = "CollapsibleContent";
|
|
1460
1663
|
|
|
1461
1664
|
//#endregion
|
|
1462
1665
|
//#region src/components/input.tsx
|
|
1463
1666
|
const inputVariants = cva("text-foreground file:text-foreground placeholder:text-muted-foreground dark:bg-input/30 border-input flex h-10 w-full min-w-0 rounded-md border bg-transparent px-3 py-2 text-base transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium hover:border-ring hover:aria-invalid:border-destructive disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 dark:disabled:bg-input/80 md:text-sm focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3 aria-invalid:border-destructive focus-visible:aria-invalid:ring-destructive/20 focus-visible:aria-invalid:ring-3 dark:focus-visible:aria-invalid:ring-destructive/40", { variants: { block: { true: "w-full" } } });
|
|
1464
|
-
const Input = React
|
|
1667
|
+
const Input = React.forwardRef((componentProps, forwardRef) => {
|
|
1668
|
+
const { className, type, block, ...props } = componentProps;
|
|
1465
1669
|
return /* @__PURE__ */ jsx("input", {
|
|
1466
1670
|
type,
|
|
1467
1671
|
"data-slot": "input",
|
|
@@ -1470,29 +1674,36 @@ const Input = React$1.forwardRef(({ className, type, block, ...props }, forwarde
|
|
|
1470
1674
|
className
|
|
1471
1675
|
})),
|
|
1472
1676
|
...props,
|
|
1473
|
-
ref:
|
|
1677
|
+
ref: forwardRef
|
|
1474
1678
|
});
|
|
1475
1679
|
});
|
|
1680
|
+
Input.displayName = "Input";
|
|
1476
1681
|
|
|
1477
1682
|
//#endregion
|
|
1478
1683
|
//#region src/components/textarea.tsx
|
|
1479
|
-
|
|
1684
|
+
const Textarea = React.forwardRef((componentProps, forwardRef) => {
|
|
1685
|
+
const { className, ...props } = componentProps;
|
|
1480
1686
|
return /* @__PURE__ */ jsx("textarea", {
|
|
1687
|
+
ref: forwardRef,
|
|
1481
1688
|
"data-slot": "textarea",
|
|
1482
1689
|
className: cn("border-input placeholder:text-muted-foreground hover:border-ring hover:aria-invalid:border-destructive focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3 aria-invalid:border-destructive focus-visible:aria-invalid:ring-destructive/20 focus-visible:aria-invalid:ring-3 dark:focus-visible:aria-invalid:ring-destructive/40 dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 dark:disabled:bg-input/80 md:text-sm", className),
|
|
1483
1690
|
...props
|
|
1484
1691
|
});
|
|
1485
|
-
}
|
|
1692
|
+
});
|
|
1693
|
+
Textarea.displayName = "Textarea";
|
|
1486
1694
|
|
|
1487
1695
|
//#endregion
|
|
1488
1696
|
//#region src/components/input-group.tsx
|
|
1489
|
-
const InputGroup = React
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1697
|
+
const InputGroup = React.forwardRef((componentProps, forwardRef) => {
|
|
1698
|
+
const { className, ...props } = componentProps;
|
|
1699
|
+
return /* @__PURE__ */ jsx("div", {
|
|
1700
|
+
ref: forwardRef,
|
|
1701
|
+
"data-slot": "input-group",
|
|
1702
|
+
role: "group",
|
|
1703
|
+
className: cn("group/input-group border-input dark:bg-input/30 relative flex h-10 w-full items-center rounded-md border transition-[color,box-shadow] outline-none has-[>textarea]:h-auto", "not-has-[input:disabled]:not-has-[textarea:disabled]:not-has-[[data-slot][aria-invalid=true]]:hover:border-ring", "has-[input:disabled]:bg-input/50 has-[textarea:disabled]:bg-input/50 has-[input:disabled]:opacity-50 has-[textarea:disabled]:opacity-50 dark:has-[input:disabled]:bg-input/80 dark:has-[textarea:disabled]:bg-input/80", "has-[>[data-align=inline-start]]:[&>input]:pl-2", "has-[>[data-align=inline-end]]:[&>input]:pr-2", "has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>input]:pb-3", "has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>input]:pt-3", "has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot=input-group-control]:focus-visible]:ring-3", "has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]:focus-visible]:ring-destructive/20 dark:has-[[data-slot][aria-invalid=true]:focus-visible]:ring-destructive/40", className),
|
|
1704
|
+
...props
|
|
1705
|
+
});
|
|
1706
|
+
});
|
|
1496
1707
|
InputGroup.displayName = "InputGroup";
|
|
1497
1708
|
const inputGroupAddonVariants = cva("text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none [&>svg:not([class*='size-'])]:size-4 [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[disabled=true]/input-group:opacity-50", {
|
|
1498
1709
|
variants: { align: {
|
|
@@ -1503,8 +1714,10 @@ const inputGroupAddonVariants = cva("text-muted-foreground flex h-auto cursor-te
|
|
|
1503
1714
|
} },
|
|
1504
1715
|
defaultVariants: { align: "inline-start" }
|
|
1505
1716
|
});
|
|
1506
|
-
|
|
1717
|
+
const InputGroupAddon = React.forwardRef((componentProps, forwardRef) => {
|
|
1718
|
+
const { className, align = "inline-start", ...props } = componentProps;
|
|
1507
1719
|
return /* @__PURE__ */ jsx("div", {
|
|
1720
|
+
ref: forwardRef,
|
|
1508
1721
|
role: "group",
|
|
1509
1722
|
"data-slot": "input-group-addon",
|
|
1510
1723
|
"data-align": align,
|
|
@@ -1515,10 +1728,12 @@ function InputGroupAddon({ className, align = "inline-start", ...props }) {
|
|
|
1515
1728
|
},
|
|
1516
1729
|
...props
|
|
1517
1730
|
});
|
|
1518
|
-
}
|
|
1519
|
-
|
|
1731
|
+
});
|
|
1732
|
+
InputGroupAddon.displayName = "InputGroupAddon";
|
|
1733
|
+
const InputGroupButton = React.forwardRef((componentProps, forwardRef) => {
|
|
1734
|
+
const { className, type = "button", variant = "ghost", size = "sm", ...props } = componentProps;
|
|
1520
1735
|
return /* @__PURE__ */ jsx(Button, {
|
|
1521
|
-
ref,
|
|
1736
|
+
ref: forwardRef,
|
|
1522
1737
|
type,
|
|
1523
1738
|
variant,
|
|
1524
1739
|
size,
|
|
@@ -1527,27 +1742,35 @@ const InputGroupButton = React$1.forwardRef(({ className, type = "button", varia
|
|
|
1527
1742
|
});
|
|
1528
1743
|
});
|
|
1529
1744
|
InputGroupButton.displayName = "InputGroupButton";
|
|
1530
|
-
|
|
1745
|
+
const InputGroupText = React.forwardRef((componentProps, forwardRef) => {
|
|
1746
|
+
const { className, ...props } = componentProps;
|
|
1531
1747
|
return /* @__PURE__ */ jsx("span", {
|
|
1748
|
+
ref: forwardRef,
|
|
1532
1749
|
className: cn("text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", className),
|
|
1533
1750
|
...props
|
|
1534
1751
|
});
|
|
1535
|
-
}
|
|
1536
|
-
|
|
1752
|
+
});
|
|
1753
|
+
InputGroupText.displayName = "InputGroupText";
|
|
1754
|
+
const InputGroupInput = React.forwardRef((componentProps, forwardRef) => {
|
|
1755
|
+
const { className, ...props } = componentProps;
|
|
1537
1756
|
return /* @__PURE__ */ jsx(Input, {
|
|
1538
1757
|
"data-slot": "input-group-control",
|
|
1539
1758
|
className: cn("flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 aria-invalid:ring-0 focus-visible:aria-invalid:!ring-0 disabled:bg-transparent disabled:opacity-100 dark:bg-transparent dark:disabled:bg-transparent", className),
|
|
1540
1759
|
...props,
|
|
1541
|
-
ref:
|
|
1760
|
+
ref: forwardRef
|
|
1542
1761
|
});
|
|
1543
1762
|
});
|
|
1544
|
-
|
|
1763
|
+
InputGroupInput.displayName = "InputGroupInput";
|
|
1764
|
+
const InputGroupTextarea = React.forwardRef((componentProps, forwardRef) => {
|
|
1765
|
+
const { className, ...props } = componentProps;
|
|
1545
1766
|
return /* @__PURE__ */ jsx(Textarea, {
|
|
1767
|
+
ref: forwardRef,
|
|
1546
1768
|
"data-slot": "input-group-control",
|
|
1547
1769
|
className: cn("flex-1 resize-none rounded-none border-0 bg-transparent py-3 shadow-none focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent", className),
|
|
1548
1770
|
...props
|
|
1549
1771
|
});
|
|
1550
|
-
}
|
|
1772
|
+
});
|
|
1773
|
+
InputGroupTextarea.displayName = "InputGroupTextarea";
|
|
1551
1774
|
|
|
1552
1775
|
//#endregion
|
|
1553
1776
|
//#region src/components/combobox.tsx
|
|
@@ -1558,7 +1781,7 @@ function ComboboxValue(componentProps) {
|
|
|
1558
1781
|
...componentProps
|
|
1559
1782
|
});
|
|
1560
1783
|
}
|
|
1561
|
-
const ComboboxTrigger = React
|
|
1784
|
+
const ComboboxTrigger = React.forwardRef((componentProps, forwardRef) => {
|
|
1562
1785
|
const { className, children, ...props } = componentProps;
|
|
1563
1786
|
return /* @__PURE__ */ jsxs(Combobox$1.Trigger, {
|
|
1564
1787
|
ref: forwardRef,
|
|
@@ -1569,7 +1792,7 @@ const ComboboxTrigger = React$1.forwardRef((componentProps, forwardRef) => {
|
|
|
1569
1792
|
});
|
|
1570
1793
|
});
|
|
1571
1794
|
ComboboxTrigger.displayName = "ComboboxTrigger";
|
|
1572
|
-
const ComboboxClear = React
|
|
1795
|
+
const ComboboxClear = React.forwardRef((componentProps, forwardRef) => {
|
|
1573
1796
|
const { className, ...props } = componentProps;
|
|
1574
1797
|
return /* @__PURE__ */ jsx(Combobox$1.Clear, {
|
|
1575
1798
|
ref: forwardRef,
|
|
@@ -1584,7 +1807,7 @@ const ComboboxClear = React$1.forwardRef((componentProps, forwardRef) => {
|
|
|
1584
1807
|
});
|
|
1585
1808
|
});
|
|
1586
1809
|
ComboboxClear.displayName = "ComboboxClear";
|
|
1587
|
-
const ComboboxInput = React
|
|
1810
|
+
const ComboboxInput = React.forwardRef((componentProps, forwardRef) => {
|
|
1588
1811
|
const { className, children, disabled = false, showTrigger = true, showClear = false, ...props } = componentProps;
|
|
1589
1812
|
return /* @__PURE__ */ jsxs(InputGroup, {
|
|
1590
1813
|
ref: forwardRef,
|
|
@@ -1610,7 +1833,7 @@ const ComboboxInput = React$1.forwardRef((componentProps, forwardRef) => {
|
|
|
1610
1833
|
});
|
|
1611
1834
|
});
|
|
1612
1835
|
ComboboxInput.displayName = "ComboboxInput";
|
|
1613
|
-
const ComboboxContent = React
|
|
1836
|
+
const ComboboxContent = React.forwardRef((componentProps, forwardRef) => {
|
|
1614
1837
|
const { className, side = "bottom", sideOffset = 6, align = "start", alignOffset = 0, anchor, ...props } = componentProps;
|
|
1615
1838
|
return /* @__PURE__ */ jsx(Combobox$1.Portal, { children: /* @__PURE__ */ jsx(Combobox$1.Positioner, {
|
|
1616
1839
|
side,
|
|
@@ -1629,7 +1852,7 @@ const ComboboxContent = React$1.forwardRef((componentProps, forwardRef) => {
|
|
|
1629
1852
|
}) });
|
|
1630
1853
|
});
|
|
1631
1854
|
ComboboxContent.displayName = "ComboboxContent";
|
|
1632
|
-
const ComboboxList = React
|
|
1855
|
+
const ComboboxList = React.forwardRef((componentProps, forwardRef) => {
|
|
1633
1856
|
const { className, ...props } = componentProps;
|
|
1634
1857
|
return /* @__PURE__ */ jsx(Combobox$1.List, {
|
|
1635
1858
|
ref: forwardRef,
|
|
@@ -1639,7 +1862,7 @@ const ComboboxList = React$1.forwardRef((componentProps, forwardRef) => {
|
|
|
1639
1862
|
});
|
|
1640
1863
|
});
|
|
1641
1864
|
ComboboxList.displayName = "ComboboxList";
|
|
1642
|
-
const ComboboxItem = React
|
|
1865
|
+
const ComboboxItem = React.forwardRef((componentProps, forwardRef) => {
|
|
1643
1866
|
const { className, children, ...props } = componentProps;
|
|
1644
1867
|
return /* @__PURE__ */ jsxs(Combobox$1.Item, {
|
|
1645
1868
|
ref: forwardRef,
|
|
@@ -1654,7 +1877,7 @@ const ComboboxItem = React$1.forwardRef((componentProps, forwardRef) => {
|
|
|
1654
1877
|
});
|
|
1655
1878
|
});
|
|
1656
1879
|
ComboboxItem.displayName = "ComboboxItem";
|
|
1657
|
-
const ComboboxGroup = React
|
|
1880
|
+
const ComboboxGroup = React.forwardRef((componentProps, forwardRef) => {
|
|
1658
1881
|
const { className, ...props } = componentProps;
|
|
1659
1882
|
return /* @__PURE__ */ jsx(Combobox$1.Group, {
|
|
1660
1883
|
ref: forwardRef,
|
|
@@ -1664,7 +1887,7 @@ const ComboboxGroup = React$1.forwardRef((componentProps, forwardRef) => {
|
|
|
1664
1887
|
});
|
|
1665
1888
|
});
|
|
1666
1889
|
ComboboxGroup.displayName = "ComboboxGroup";
|
|
1667
|
-
const ComboboxLabel = React
|
|
1890
|
+
const ComboboxLabel = React.forwardRef((componentProps, forwardRef) => {
|
|
1668
1891
|
const { className, ...props } = componentProps;
|
|
1669
1892
|
return /* @__PURE__ */ jsx(Combobox$1.GroupLabel, {
|
|
1670
1893
|
ref: forwardRef,
|
|
@@ -1680,7 +1903,7 @@ function ComboboxCollection(componentProps) {
|
|
|
1680
1903
|
...componentProps
|
|
1681
1904
|
});
|
|
1682
1905
|
}
|
|
1683
|
-
const ComboboxEmpty = React
|
|
1906
|
+
const ComboboxEmpty = React.forwardRef((componentProps, forwardRef) => {
|
|
1684
1907
|
const { className, ...props } = componentProps;
|
|
1685
1908
|
return /* @__PURE__ */ jsx(Combobox$1.Empty, {
|
|
1686
1909
|
ref: forwardRef,
|
|
@@ -1690,7 +1913,7 @@ const ComboboxEmpty = React$1.forwardRef((componentProps, forwardRef) => {
|
|
|
1690
1913
|
});
|
|
1691
1914
|
});
|
|
1692
1915
|
ComboboxEmpty.displayName = "ComboboxEmpty";
|
|
1693
|
-
const ComboboxSeparator = React
|
|
1916
|
+
const ComboboxSeparator = React.forwardRef((componentProps, forwardRef) => {
|
|
1694
1917
|
const { className, ...props } = componentProps;
|
|
1695
1918
|
return /* @__PURE__ */ jsx(Combobox$1.Separator, {
|
|
1696
1919
|
ref: forwardRef,
|
|
@@ -1700,7 +1923,7 @@ const ComboboxSeparator = React$1.forwardRef((componentProps, forwardRef) => {
|
|
|
1700
1923
|
});
|
|
1701
1924
|
});
|
|
1702
1925
|
ComboboxSeparator.displayName = "ComboboxSeparator";
|
|
1703
|
-
const ComboboxChips = React
|
|
1926
|
+
const ComboboxChips = React.forwardRef((componentProps, forwardRef) => {
|
|
1704
1927
|
const { className, ...props } = componentProps;
|
|
1705
1928
|
return /* @__PURE__ */ jsx(Combobox$1.Chips, {
|
|
1706
1929
|
ref: forwardRef,
|
|
@@ -1710,7 +1933,7 @@ const ComboboxChips = React$1.forwardRef((componentProps, forwardRef) => {
|
|
|
1710
1933
|
});
|
|
1711
1934
|
});
|
|
1712
1935
|
ComboboxChips.displayName = "ComboboxChips";
|
|
1713
|
-
const ComboboxChip = React
|
|
1936
|
+
const ComboboxChip = React.forwardRef(function ComboboxChip(componentProps, forwardRef) {
|
|
1714
1937
|
const { className, children, showRemove = true, color, tone, legacyColor, ...props } = componentProps;
|
|
1715
1938
|
return /* @__PURE__ */ jsxs(Combobox$1.Chip, {
|
|
1716
1939
|
ref: forwardRef,
|
|
@@ -1724,7 +1947,7 @@ const ComboboxChip = React$1.forwardRef(function ComboboxChip(componentProps, fo
|
|
|
1724
1947
|
children: [children, showRemove && /* @__PURE__ */ jsx(Combobox$1.ChipRemove, { render: /* @__PURE__ */ jsx(ChipRemove, {}) })]
|
|
1725
1948
|
});
|
|
1726
1949
|
});
|
|
1727
|
-
const ComboboxChipsInput = React
|
|
1950
|
+
const ComboboxChipsInput = React.forwardRef(function ComboboxChipsInput(componentProps, forwardRef) {
|
|
1728
1951
|
const { className, ...props } = componentProps;
|
|
1729
1952
|
return /* @__PURE__ */ jsx(Combobox$1.Input, {
|
|
1730
1953
|
ref: forwardRef,
|
|
@@ -1735,44 +1958,55 @@ const ComboboxChipsInput = React$1.forwardRef(function ComboboxChipsInput(compon
|
|
|
1735
1958
|
});
|
|
1736
1959
|
ComboboxChipsInput.displayName = "ComboboxChipsInput";
|
|
1737
1960
|
function useComboboxAnchor() {
|
|
1738
|
-
return React
|
|
1961
|
+
return React.useRef(null);
|
|
1739
1962
|
}
|
|
1740
1963
|
|
|
1741
1964
|
//#endregion
|
|
1742
1965
|
//#region src/components/dialog.tsx
|
|
1743
|
-
function Dialog(
|
|
1966
|
+
function Dialog(componentProps) {
|
|
1744
1967
|
return /* @__PURE__ */ jsx(Dialog$1.Root, {
|
|
1745
1968
|
"data-slot": "dialog",
|
|
1746
|
-
...
|
|
1969
|
+
...componentProps
|
|
1747
1970
|
});
|
|
1748
1971
|
}
|
|
1749
|
-
|
|
1972
|
+
const DialogTrigger = React.forwardRef((componentProps, forwardRef) => {
|
|
1973
|
+
const { ...props } = componentProps;
|
|
1750
1974
|
return /* @__PURE__ */ jsx(Dialog$1.Trigger, {
|
|
1975
|
+
ref: forwardRef,
|
|
1751
1976
|
"data-slot": "dialog-trigger",
|
|
1752
1977
|
...props
|
|
1753
1978
|
});
|
|
1754
|
-
}
|
|
1755
|
-
|
|
1979
|
+
});
|
|
1980
|
+
DialogTrigger.displayName = "DialogTrigger";
|
|
1981
|
+
function DialogPortal(componentProps) {
|
|
1756
1982
|
return /* @__PURE__ */ jsx(Dialog$1.Portal, {
|
|
1757
1983
|
"data-slot": "dialog-portal",
|
|
1758
|
-
...
|
|
1984
|
+
...componentProps
|
|
1759
1985
|
});
|
|
1760
1986
|
}
|
|
1761
|
-
|
|
1987
|
+
const DialogClose = React.forwardRef((componentProps, forwardRef) => {
|
|
1988
|
+
const { ...props } = componentProps;
|
|
1762
1989
|
return /* @__PURE__ */ jsx(Dialog$1.Close, {
|
|
1990
|
+
ref: forwardRef,
|
|
1763
1991
|
"data-slot": "dialog-close",
|
|
1764
1992
|
...props
|
|
1765
1993
|
});
|
|
1766
|
-
}
|
|
1767
|
-
|
|
1994
|
+
});
|
|
1995
|
+
DialogClose.displayName = "DialogClose";
|
|
1996
|
+
const DialogOverlay = React.forwardRef((componentProps, forwardRef) => {
|
|
1997
|
+
const { className, ...props } = componentProps;
|
|
1768
1998
|
return /* @__PURE__ */ jsx(Dialog$1.Backdrop, {
|
|
1999
|
+
ref: forwardRef,
|
|
1769
2000
|
"data-slot": "dialog-overlay",
|
|
1770
2001
|
className: cn("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", className),
|
|
1771
2002
|
...props
|
|
1772
2003
|
});
|
|
1773
|
-
}
|
|
1774
|
-
|
|
2004
|
+
});
|
|
2005
|
+
DialogOverlay.displayName = "DialogOverlay";
|
|
2006
|
+
const DialogContent = React.forwardRef((componentProps, forwardRef) => {
|
|
2007
|
+
const { className, children, showCloseButton = true, ...props } = componentProps;
|
|
1775
2008
|
return /* @__PURE__ */ jsxs(DialogPortal, { children: [/* @__PURE__ */ jsx(DialogOverlay, {}), /* @__PURE__ */ jsxs(Dialog$1.Popup, {
|
|
2009
|
+
ref: forwardRef,
|
|
1776
2010
|
"data-slot": "dialog-content",
|
|
1777
2011
|
className: cn("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 ring-1 ring-foreground/10 bg-background px-6 py-4 text-sm duration-100 outline-none sm:max-w-md 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", className),
|
|
1778
2012
|
...props,
|
|
@@ -1789,16 +2023,22 @@ function DialogContent({ className, children, showCloseButton = true, ...props }
|
|
|
1789
2023
|
})]
|
|
1790
2024
|
})]
|
|
1791
2025
|
})] });
|
|
1792
|
-
}
|
|
1793
|
-
|
|
2026
|
+
});
|
|
2027
|
+
DialogContent.displayName = "DialogContent";
|
|
2028
|
+
const DialogHeader = React.forwardRef((componentProps, forwardRef) => {
|
|
2029
|
+
const { className, ...props } = componentProps;
|
|
1794
2030
|
return /* @__PURE__ */ jsx("div", {
|
|
2031
|
+
ref: forwardRef,
|
|
1795
2032
|
"data-slot": "dialog-header",
|
|
1796
2033
|
className: cn("flex flex-col gap-2", className),
|
|
1797
2034
|
...props
|
|
1798
2035
|
});
|
|
1799
|
-
}
|
|
1800
|
-
|
|
2036
|
+
});
|
|
2037
|
+
DialogHeader.displayName = "DialogHeader";
|
|
2038
|
+
const DialogFooter = React.forwardRef((componentProps, forwardRef) => {
|
|
2039
|
+
const { className, showCloseButton = false, children, ...props } = componentProps;
|
|
1801
2040
|
return /* @__PURE__ */ jsxs("div", {
|
|
2041
|
+
ref: forwardRef,
|
|
1802
2042
|
"data-slot": "dialog-footer",
|
|
1803
2043
|
className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
|
|
1804
2044
|
...props,
|
|
@@ -1807,32 +2047,43 @@ function DialogFooter({ className, showCloseButton = false, children, ...props }
|
|
|
1807
2047
|
children: "Close"
|
|
1808
2048
|
})]
|
|
1809
2049
|
});
|
|
1810
|
-
}
|
|
1811
|
-
|
|
2050
|
+
});
|
|
2051
|
+
DialogFooter.displayName = "DialogFooter";
|
|
2052
|
+
const DialogTitle = React.forwardRef((componentProps, forwardRef) => {
|
|
2053
|
+
const { className, ...props } = componentProps;
|
|
1812
2054
|
return /* @__PURE__ */ jsx(Dialog$1.Title, {
|
|
2055
|
+
ref: forwardRef,
|
|
1813
2056
|
"data-slot": "dialog-title",
|
|
1814
2057
|
className: cn("text-lg font-bold leading-normal", className),
|
|
1815
2058
|
...props
|
|
1816
2059
|
});
|
|
1817
|
-
}
|
|
1818
|
-
|
|
2060
|
+
});
|
|
2061
|
+
DialogTitle.displayName = "DialogTitle";
|
|
2062
|
+
const DialogDescription = React.forwardRef((componentProps, forwardRef) => {
|
|
2063
|
+
const { className, ...props } = componentProps;
|
|
1819
2064
|
return /* @__PURE__ */ jsx(Dialog$1.Description, {
|
|
2065
|
+
ref: forwardRef,
|
|
1820
2066
|
"data-slot": "dialog-description",
|
|
1821
2067
|
className: cn("text-sm leading-normal text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground", className),
|
|
1822
2068
|
...props
|
|
1823
2069
|
});
|
|
1824
|
-
}
|
|
2070
|
+
});
|
|
2071
|
+
DialogDescription.displayName = "DialogDescription";
|
|
1825
2072
|
|
|
1826
2073
|
//#endregion
|
|
1827
2074
|
//#region src/components/command.tsx
|
|
1828
|
-
|
|
2075
|
+
const Command = React.forwardRef((componentProps, forwardRef) => {
|
|
2076
|
+
const { className, ...props } = componentProps;
|
|
1829
2077
|
return /* @__PURE__ */ jsx(Command$1, {
|
|
2078
|
+
ref: forwardRef,
|
|
1830
2079
|
"data-slot": "command",
|
|
1831
2080
|
className: cn("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md", className),
|
|
1832
2081
|
...props
|
|
1833
2082
|
});
|
|
1834
|
-
}
|
|
1835
|
-
|
|
2083
|
+
});
|
|
2084
|
+
Command.displayName = "Command";
|
|
2085
|
+
function CommandDialog(componentProps) {
|
|
2086
|
+
const { title = "Command Palette", description = "Search for a command to run...", children, ...props } = componentProps;
|
|
1836
2087
|
return /* @__PURE__ */ jsxs(Dialog, {
|
|
1837
2088
|
...props,
|
|
1838
2089
|
children: [/* @__PURE__ */ jsxs(DialogHeader, {
|
|
@@ -1847,59 +2098,80 @@ function CommandDialog({ title = "Command Palette", description = "Search for a
|
|
|
1847
2098
|
})]
|
|
1848
2099
|
});
|
|
1849
2100
|
}
|
|
1850
|
-
|
|
2101
|
+
const CommandInput = React.forwardRef((componentProps, forwardRef) => {
|
|
2102
|
+
const { className, ...props } = componentProps;
|
|
1851
2103
|
return /* @__PURE__ */ jsxs("div", {
|
|
1852
2104
|
"data-slot": "command-input-wrapper",
|
|
1853
2105
|
className: "flex h-9 items-center gap-2 border-b px-3",
|
|
1854
2106
|
children: [/* @__PURE__ */ jsx(Search, { className: "size-4 shrink-0 opacity-50" }), /* @__PURE__ */ jsx(Command$1.Input, {
|
|
2107
|
+
ref: forwardRef,
|
|
1855
2108
|
"data-slot": "command-input",
|
|
1856
2109
|
className: cn("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50", className),
|
|
1857
2110
|
...props
|
|
1858
2111
|
})]
|
|
1859
2112
|
});
|
|
1860
|
-
}
|
|
1861
|
-
|
|
2113
|
+
});
|
|
2114
|
+
CommandInput.displayName = "CommandInput";
|
|
2115
|
+
const CommandList = React.forwardRef((componentProps, forwardRef) => {
|
|
2116
|
+
const { className, ...props } = componentProps;
|
|
1862
2117
|
return /* @__PURE__ */ jsx(Command$1.List, {
|
|
2118
|
+
ref: forwardRef,
|
|
1863
2119
|
"data-slot": "command-list",
|
|
1864
2120
|
className: cn("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto", className),
|
|
1865
2121
|
...props
|
|
1866
2122
|
});
|
|
1867
|
-
}
|
|
1868
|
-
|
|
2123
|
+
});
|
|
2124
|
+
CommandList.displayName = "CommandList";
|
|
2125
|
+
const CommandEmpty = React.forwardRef((componentProps, forwardRef) => {
|
|
2126
|
+
const { ...props } = componentProps;
|
|
1869
2127
|
return /* @__PURE__ */ jsx(Command$1.Empty, {
|
|
2128
|
+
ref: forwardRef,
|
|
1870
2129
|
"data-slot": "command-empty",
|
|
1871
2130
|
className: "py-6 text-center text-sm",
|
|
1872
2131
|
...props
|
|
1873
2132
|
});
|
|
1874
|
-
}
|
|
1875
|
-
|
|
2133
|
+
});
|
|
2134
|
+
CommandEmpty.displayName = "CommandEmpty";
|
|
2135
|
+
const CommandGroup = React.forwardRef((componentProps, forwardRef) => {
|
|
2136
|
+
const { className, ...props } = componentProps;
|
|
1876
2137
|
return /* @__PURE__ */ jsx(Command$1.Group, {
|
|
2138
|
+
ref: forwardRef,
|
|
1877
2139
|
"data-slot": "command-group",
|
|
1878
2140
|
className: cn("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium", className),
|
|
1879
2141
|
...props
|
|
1880
2142
|
});
|
|
1881
|
-
}
|
|
1882
|
-
|
|
2143
|
+
});
|
|
2144
|
+
CommandGroup.displayName = "CommandGroup";
|
|
2145
|
+
const CommandSeparator = React.forwardRef((componentProps, forwardRef) => {
|
|
2146
|
+
const { className, ...props } = componentProps;
|
|
1883
2147
|
return /* @__PURE__ */ jsx(Command$1.Separator, {
|
|
2148
|
+
ref: forwardRef,
|
|
1884
2149
|
"data-slot": "command-separator",
|
|
1885
2150
|
className: cn("bg-border -mx-1 h-px", className),
|
|
1886
2151
|
...props
|
|
1887
2152
|
});
|
|
1888
|
-
}
|
|
1889
|
-
|
|
2153
|
+
});
|
|
2154
|
+
CommandSeparator.displayName = "CommandSeparator";
|
|
2155
|
+
const CommandItem = React.forwardRef((componentProps, forwardRef) => {
|
|
2156
|
+
const { className, ...props } = componentProps;
|
|
1890
2157
|
return /* @__PURE__ */ jsx(Command$1.Item, {
|
|
2158
|
+
ref: forwardRef,
|
|
1891
2159
|
"data-slot": "command-item",
|
|
1892
2160
|
className: cn("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
1893
2161
|
...props
|
|
1894
2162
|
});
|
|
1895
|
-
}
|
|
1896
|
-
|
|
2163
|
+
});
|
|
2164
|
+
CommandItem.displayName = "CommandItem";
|
|
2165
|
+
const CommandShortcut = React.forwardRef((componentProps, forwardRef) => {
|
|
2166
|
+
const { className, ...props } = componentProps;
|
|
1897
2167
|
return /* @__PURE__ */ jsx("span", {
|
|
2168
|
+
ref: forwardRef,
|
|
1898
2169
|
"data-slot": "command-shortcut",
|
|
1899
2170
|
className: cn("text-muted-foreground ml-auto text-xs tracking-widest", className),
|
|
1900
2171
|
...props
|
|
1901
2172
|
});
|
|
1902
|
-
}
|
|
2173
|
+
});
|
|
2174
|
+
CommandShortcut.displayName = "CommandShortcut";
|
|
1903
2175
|
|
|
1904
2176
|
//#endregion
|
|
1905
2177
|
//#region src/components/country-flag.tsx
|
|
@@ -1909,93 +2181,626 @@ const sizeMap = {
|
|
|
1909
2181
|
lg: "size-5",
|
|
1910
2182
|
xl: "size-6"
|
|
1911
2183
|
};
|
|
1912
|
-
const CountryFlag = (
|
|
2184
|
+
const CountryFlag = React.forwardRef((componentProps, forwardRef) => {
|
|
2185
|
+
const { countryIsoCode, size = "xl", className, ...otherProps } = componentProps;
|
|
1913
2186
|
return /* @__PURE__ */ jsx(FLAGS[countryIsoCode.toLowerCase()] ?? FlagUs, {
|
|
2187
|
+
ref: forwardRef,
|
|
1914
2188
|
className: cn("flex-none", sizeMap[size], className),
|
|
1915
2189
|
...otherProps
|
|
1916
2190
|
});
|
|
1917
|
-
};
|
|
2191
|
+
});
|
|
2192
|
+
CountryFlag.displayName = "CountryFlag";
|
|
1918
2193
|
|
|
1919
2194
|
//#endregion
|
|
1920
|
-
//#region src/components/
|
|
1921
|
-
const
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
"
|
|
1927
|
-
|
|
2195
|
+
//#region src/components/skeleton.tsx
|
|
2196
|
+
const Skeleton = React.forwardRef((componentProps, forwardRef) => {
|
|
2197
|
+
const { className, ...props } = componentProps;
|
|
2198
|
+
return /* @__PURE__ */ jsx("div", {
|
|
2199
|
+
ref: forwardRef,
|
|
2200
|
+
"data-slot": "skeleton",
|
|
2201
|
+
className: cn("animate-pulse rounded-md bg-muted", className),
|
|
2202
|
+
...props
|
|
2203
|
+
});
|
|
2204
|
+
});
|
|
2205
|
+
Skeleton.displayName = "Skeleton";
|
|
2206
|
+
|
|
2207
|
+
//#endregion
|
|
2208
|
+
//#region src/components/spinner.tsx
|
|
2209
|
+
const spinnerVariants = cva("animate-spin text-current", {
|
|
2210
|
+
variants: { size: {
|
|
2211
|
+
default: "size-4",
|
|
2212
|
+
sm: "size-3",
|
|
2213
|
+
lg: "size-5",
|
|
2214
|
+
xl: "size-6"
|
|
2215
|
+
} },
|
|
2216
|
+
defaultVariants: { size: "default" }
|
|
2217
|
+
});
|
|
2218
|
+
const Spinner = React.forwardRef((componentProps, forwardRef) => {
|
|
2219
|
+
const { className, size, ...props } = componentProps;
|
|
2220
|
+
return /* @__PURE__ */ jsx(Loader2Icon, {
|
|
2221
|
+
ref: forwardRef,
|
|
2222
|
+
"data-slot": "spinner",
|
|
2223
|
+
role: "status",
|
|
2224
|
+
"aria-label": "Loading",
|
|
2225
|
+
className: cn(spinnerVariants({ size }), className),
|
|
1928
2226
|
...props
|
|
1929
|
-
})
|
|
1930
|
-
})
|
|
2227
|
+
});
|
|
2228
|
+
});
|
|
2229
|
+
Spinner.displayName = "Spinner";
|
|
2230
|
+
|
|
2231
|
+
//#endregion
|
|
2232
|
+
//#region src/components/table.tsx
|
|
2233
|
+
const Table = React.forwardRef((componentProps, forwardRef) => {
|
|
2234
|
+
const { className, containerClassName, containerStyle, ...props } = componentProps;
|
|
2235
|
+
return /* @__PURE__ */ jsx("div", {
|
|
2236
|
+
"data-slot": "table-container",
|
|
2237
|
+
style: containerStyle,
|
|
2238
|
+
className: cn("relative w-full overflow-x-auto rounded-lg border border-border", containerClassName),
|
|
2239
|
+
children: /* @__PURE__ */ jsx("table", {
|
|
2240
|
+
ref: forwardRef,
|
|
2241
|
+
"data-slot": "table",
|
|
2242
|
+
className: cn("w-full caption-bottom text-sm [&_tbody_tr:last-child]:border-b-0", className),
|
|
2243
|
+
...props
|
|
2244
|
+
})
|
|
2245
|
+
});
|
|
2246
|
+
});
|
|
1931
2247
|
Table.displayName = "Table";
|
|
1932
|
-
const TableHeader = React
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
2248
|
+
const TableHeader = React.forwardRef((componentProps, forwardRef) => {
|
|
2249
|
+
const { className, ...props } = componentProps;
|
|
2250
|
+
return /* @__PURE__ */ jsx("thead", {
|
|
2251
|
+
ref: forwardRef,
|
|
2252
|
+
"data-slot": "table-header",
|
|
2253
|
+
className: cn("[&_tr]:border-b [&_tr]:hover:bg-transparent", className),
|
|
2254
|
+
...props
|
|
2255
|
+
});
|
|
2256
|
+
});
|
|
1938
2257
|
TableHeader.displayName = "TableHeader";
|
|
1939
|
-
const TableBody = React
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
2258
|
+
const TableBody = React.forwardRef((componentProps, forwardRef) => {
|
|
2259
|
+
const { className, ...props } = componentProps;
|
|
2260
|
+
return /* @__PURE__ */ jsx("tbody", {
|
|
2261
|
+
ref: forwardRef,
|
|
2262
|
+
"data-slot": "table-body",
|
|
2263
|
+
className: cn("[&_tr:last-child]:border-0", className),
|
|
2264
|
+
...props
|
|
2265
|
+
});
|
|
2266
|
+
});
|
|
1945
2267
|
TableBody.displayName = "TableBody";
|
|
1946
|
-
const TableFooter = React
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
2268
|
+
const TableFooter = React.forwardRef((componentProps, forwardRef) => {
|
|
2269
|
+
const { className, ...props } = componentProps;
|
|
2270
|
+
return /* @__PURE__ */ jsx("tfoot", {
|
|
2271
|
+
ref: forwardRef,
|
|
2272
|
+
"data-slot": "table-footer",
|
|
2273
|
+
className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0 [&>tr]:hover:bg-transparent", className),
|
|
2274
|
+
...props
|
|
2275
|
+
});
|
|
2276
|
+
});
|
|
1952
2277
|
TableFooter.displayName = "TableFooter";
|
|
1953
|
-
const TableRow = React
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
2278
|
+
const TableRow = React.forwardRef((componentProps, forwardRef) => {
|
|
2279
|
+
const { className, ...props } = componentProps;
|
|
2280
|
+
return /* @__PURE__ */ jsx("tr", {
|
|
2281
|
+
ref: forwardRef,
|
|
2282
|
+
"data-slot": "table-row",
|
|
2283
|
+
className: cn("border-b transition-colors hover:bg-accent/30 data-[state=selected]:bg-accent/50", className),
|
|
2284
|
+
...props
|
|
2285
|
+
});
|
|
2286
|
+
});
|
|
1959
2287
|
TableRow.displayName = "TableRow";
|
|
1960
|
-
const TableHead = React
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
2288
|
+
const TableHead = React.forwardRef((componentProps, forwardRef) => {
|
|
2289
|
+
const { className, ...props } = componentProps;
|
|
2290
|
+
return /* @__PURE__ */ jsx("th", {
|
|
2291
|
+
ref: forwardRef,
|
|
2292
|
+
"data-slot": "table-head",
|
|
2293
|
+
className: cn("h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0", className),
|
|
2294
|
+
...props
|
|
2295
|
+
});
|
|
2296
|
+
});
|
|
1966
2297
|
TableHead.displayName = "TableHead";
|
|
1967
|
-
const TableCell = React
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
2298
|
+
const TableCell = React.forwardRef((componentProps, forwardRef) => {
|
|
2299
|
+
const { className, ...props } = componentProps;
|
|
2300
|
+
return /* @__PURE__ */ jsx("td", {
|
|
2301
|
+
ref: forwardRef,
|
|
2302
|
+
"data-slot": "table-cell",
|
|
2303
|
+
className: cn("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0", className),
|
|
2304
|
+
...props
|
|
2305
|
+
});
|
|
2306
|
+
});
|
|
1973
2307
|
TableCell.displayName = "TableCell";
|
|
1974
|
-
const TableCaption = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("caption", {
|
|
1975
|
-
ref,
|
|
1976
|
-
"data-slot": "table-caption",
|
|
1977
|
-
className: cn("mt-4 text-sm text-muted-foreground", className),
|
|
1978
|
-
...props
|
|
1979
|
-
}));
|
|
1980
|
-
TableCaption.displayName = "TableCaption";
|
|
1981
2308
|
|
|
1982
2309
|
//#endregion
|
|
1983
2310
|
//#region src/components/data-table.tsx
|
|
1984
|
-
|
|
2311
|
+
const SELECT_COLUMN_ID = "__select";
|
|
2312
|
+
const DEFAULT_SKELETON_COUNT = 5;
|
|
2313
|
+
function DataTable(componentProps) {
|
|
2314
|
+
const { columns, data, getRowId, loadingState = "idle", skeletonCount = DEFAULT_SKELETON_COUNT, emptyState, sorting, onSortingChange, enableRowSelection, rowSelection, onRowSelectionChange, actionBar, onFetchMore, hasMore = false, enableColumnResizing = false, fillHeight = false, onRowClick, className } = componentProps;
|
|
2315
|
+
const sortingEnabled = !!onSortingChange;
|
|
2316
|
+
const selectionEnabled = !!enableRowSelection;
|
|
2317
|
+
const finalColumns = React.useMemo(() => {
|
|
2318
|
+
if (!selectionEnabled) return columns;
|
|
2319
|
+
return [makeSelectColumn(), ...columns];
|
|
2320
|
+
}, [columns, selectionEnabled]);
|
|
1985
2321
|
const table = useReactTable({
|
|
1986
2322
|
data,
|
|
1987
|
-
columns,
|
|
2323
|
+
columns: finalColumns,
|
|
1988
2324
|
getCoreRowModel: getCoreRowModel(),
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
2325
|
+
getRowId,
|
|
2326
|
+
enableSorting: sortingEnabled,
|
|
2327
|
+
manualSorting: sortingEnabled,
|
|
2328
|
+
enableRowSelection,
|
|
2329
|
+
enableColumnResizing,
|
|
2330
|
+
columnResizeMode: "onChange",
|
|
2331
|
+
onSortingChange,
|
|
2332
|
+
onRowSelectionChange,
|
|
2333
|
+
state: {
|
|
2334
|
+
...sorting !== void 0 && { sorting },
|
|
2335
|
+
...rowSelection !== void 0 && { rowSelection }
|
|
2336
|
+
}
|
|
2337
|
+
});
|
|
2338
|
+
const rows = table.getRowModel().rows;
|
|
2339
|
+
const selectedCount = table.getSelectedRowModel().rows.length;
|
|
2340
|
+
const hasSelection = selectedCount > 0;
|
|
2341
|
+
const hasFooter = finalColumns.some((col) => col.footer != null);
|
|
2342
|
+
const isInitialLoading = loadingState === "loading";
|
|
2343
|
+
const isRefreshing = loadingState === "sorting" || loadingState === "filtering";
|
|
2344
|
+
const isLoadingMore = loadingState === "loadingMore";
|
|
2345
|
+
const showEmptyState = !isInitialLoading && rows.length === 0 && !!emptyState;
|
|
2346
|
+
const anySelected = hasSelection;
|
|
2347
|
+
const rowClickable = selectionEnabled || !!onRowClick;
|
|
2348
|
+
const handleRowActivate = (row) => {
|
|
2349
|
+
if (selectionEnabled && (anySelected || !onRowClick)) {
|
|
2350
|
+
if (row.getCanSelect()) row.toggleSelected();
|
|
2351
|
+
} else if (onRowClick) onRowClick(row.original);
|
|
2352
|
+
};
|
|
2353
|
+
const colWidth = (size) => enableColumnResizing ? { width: size } : void 0;
|
|
2354
|
+
const showActionBar = !!actionBar && hasSelection;
|
|
2355
|
+
const reservedBottom = showActionBar ? ActionBarHeight + 16 : void 0;
|
|
2356
|
+
const sentinelRef = useFetchMoreSentinel(onFetchMore, fillHeight, data.length);
|
|
2357
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
2358
|
+
className: cn("relative w-full", fillHeight && "flex min-h-0 flex-1 flex-col", className),
|
|
2359
|
+
"aria-busy": isInitialLoading || isRefreshing || void 0,
|
|
2360
|
+
children: [
|
|
2361
|
+
/* @__PURE__ */ jsxs(Table, {
|
|
2362
|
+
className: cn(enableColumnResizing && "table-fixed", fillHeight && "[&_[data-slot=table-head]]:sticky [&_[data-slot=table-head]]:top-0 [&_[data-slot=table-head]]:z-10 [&_[data-slot=table-head]]:bg-background", fillHeight && showEmptyState && "h-full"),
|
|
2363
|
+
containerClassName: fillHeight ? "min-h-0 flex-1 overflow-y-auto" : void 0,
|
|
2364
|
+
containerStyle: reservedBottom ? {
|
|
2365
|
+
paddingBottom: reservedBottom,
|
|
2366
|
+
scrollPaddingBottom: reservedBottom
|
|
2367
|
+
} : void 0,
|
|
2368
|
+
style: enableColumnResizing ? { width: `max(100%, ${table.getTotalSize()}px)` } : void 0,
|
|
2369
|
+
children: [
|
|
2370
|
+
/* @__PURE__ */ jsx(TableHeader, { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx(TableRow, {
|
|
2371
|
+
className: enableColumnResizing ? "group/header-row" : void 0,
|
|
2372
|
+
children: headerGroup.headers.map((header) => /* @__PURE__ */ jsxs(TableHead, {
|
|
2373
|
+
style: colWidth(header.getSize()),
|
|
2374
|
+
className: enableColumnResizing ? "relative" : void 0,
|
|
2375
|
+
children: [header.isPlaceholder ? null : header.column.getCanSort() ? /* @__PURE__ */ jsx(SortableHeader, { header }) : flexRender(header.column.columnDef.header, header.getContext()), enableColumnResizing && header.column.getCanResize() ? /* @__PURE__ */ jsx(ResizeHandle, { header }) : null]
|
|
2376
|
+
}, header.id))
|
|
2377
|
+
}, headerGroup.id)) }),
|
|
2378
|
+
/* @__PURE__ */ jsx(TableBody, { children: isInitialLoading ? /* @__PURE__ */ jsx(SkeletonRows, {
|
|
2379
|
+
columns: finalColumns,
|
|
2380
|
+
count: skeletonCount
|
|
2381
|
+
}) : rows.length ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2382
|
+
rows.map((row) => /* @__PURE__ */ jsx(TableRow, {
|
|
2383
|
+
"data-state": row.getIsSelected() ? "selected" : void 0,
|
|
2384
|
+
onClick: rowClickable ? () => handleRowActivate(row) : void 0,
|
|
2385
|
+
className: rowClickable ? "cursor-pointer" : void 0,
|
|
2386
|
+
children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx(TableCell, {
|
|
2387
|
+
style: colWidth(cell.column.getSize()),
|
|
2388
|
+
children: flexRender(cell.column.columnDef.cell, cell.getContext())
|
|
2389
|
+
}, cell.id))
|
|
2390
|
+
}, row.id)),
|
|
2391
|
+
isLoadingMore ? /* @__PURE__ */ jsx(TableRow, {
|
|
2392
|
+
className: "hover:bg-transparent",
|
|
2393
|
+
children: /* @__PURE__ */ jsx(TableCell, {
|
|
2394
|
+
colSpan: finalColumns.length,
|
|
2395
|
+
className: "py-3",
|
|
2396
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
2397
|
+
className: "flex items-center justify-center text-muted-foreground",
|
|
2398
|
+
children: /* @__PURE__ */ jsx(Spinner, {})
|
|
2399
|
+
})
|
|
2400
|
+
})
|
|
2401
|
+
}) : null,
|
|
2402
|
+
onFetchMore && hasMore && !isLoadingMore ? /* @__PURE__ */ jsx("tr", {
|
|
2403
|
+
"aria-hidden": true,
|
|
2404
|
+
ref: sentinelRef,
|
|
2405
|
+
children: /* @__PURE__ */ jsx("td", {
|
|
2406
|
+
colSpan: finalColumns.length,
|
|
2407
|
+
className: "h-px"
|
|
2408
|
+
})
|
|
2409
|
+
}) : null
|
|
2410
|
+
] }) : emptyState ? /* @__PURE__ */ jsx(TableRow, {
|
|
2411
|
+
className: "hover:bg-transparent",
|
|
2412
|
+
children: /* @__PURE__ */ jsx(TableCell, {
|
|
2413
|
+
colSpan: finalColumns.length,
|
|
2414
|
+
className: "h-full p-0",
|
|
2415
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
2416
|
+
className: cn("flex h-full items-center justify-center", !fillHeight && "min-h-60"),
|
|
2417
|
+
children: emptyState
|
|
2418
|
+
})
|
|
2419
|
+
})
|
|
2420
|
+
}) : null }),
|
|
2421
|
+
hasFooter && !isInitialLoading ? /* @__PURE__ */ jsx(TableFooter, { children: table.getFooterGroups().map((footerGroup) => /* @__PURE__ */ jsx(TableRow, { children: footerGroup.headers.map((header) => /* @__PURE__ */ jsx(TableCell, {
|
|
2422
|
+
style: colWidth(header.getSize()),
|
|
2423
|
+
children: header.isPlaceholder ? null : flexRender(header.column.columnDef.footer, header.getContext())
|
|
2424
|
+
}, header.id)) }, footerGroup.id)) }) : null
|
|
2425
|
+
]
|
|
2426
|
+
}),
|
|
2427
|
+
isRefreshing ? /* @__PURE__ */ jsx("div", {
|
|
2428
|
+
"data-slot": "table-loading-overlay",
|
|
2429
|
+
className: "bg-background/60 absolute inset-0 z-10 flex items-center justify-center",
|
|
2430
|
+
children: /* @__PURE__ */ jsx(Spinner, {
|
|
2431
|
+
size: "lg",
|
|
2432
|
+
className: "text-muted-foreground"
|
|
2433
|
+
})
|
|
2434
|
+
}) : null,
|
|
2435
|
+
showActionBar ? /* @__PURE__ */ jsx("div", {
|
|
2436
|
+
className: "pointer-events-none absolute inset-x-0 bottom-0 z-20 flex justify-center p-2",
|
|
2437
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
2438
|
+
className: "animate-in fade-in slide-in-from-bottom-4 pointer-events-auto w-full duration-200 ease-out",
|
|
2439
|
+
children: /* @__PURE__ */ jsx(ActionBarContext.Provider, {
|
|
2440
|
+
value: {
|
|
2441
|
+
count: selectedCount,
|
|
2442
|
+
onClear: () => table.resetRowSelection()
|
|
2443
|
+
},
|
|
2444
|
+
children: actionBar
|
|
2445
|
+
})
|
|
2446
|
+
})
|
|
2447
|
+
}) : null
|
|
2448
|
+
]
|
|
2449
|
+
});
|
|
2450
|
+
}
|
|
2451
|
+
function makeSelectColumn() {
|
|
2452
|
+
return {
|
|
2453
|
+
id: SELECT_COLUMN_ID,
|
|
2454
|
+
header: ({ table }) => {
|
|
2455
|
+
const allSelected = table.getIsAllRowsSelected();
|
|
2456
|
+
const someSelected = table.getIsSomeRowsSelected();
|
|
2457
|
+
return /* @__PURE__ */ jsx(Checkbox, {
|
|
2458
|
+
checked: allSelected,
|
|
2459
|
+
indeterminate: !allSelected && someSelected,
|
|
2460
|
+
onCheckedChange: (value) => table.toggleAllRowsSelected(value === true),
|
|
2461
|
+
"aria-label": "Select all rows"
|
|
2462
|
+
});
|
|
2463
|
+
},
|
|
2464
|
+
cell: ({ row }) => /* @__PURE__ */ jsx("span", {
|
|
2465
|
+
className: "contents",
|
|
2466
|
+
onClick: (e) => e.stopPropagation(),
|
|
2467
|
+
children: /* @__PURE__ */ jsx(Checkbox, {
|
|
2468
|
+
checked: row.getIsSelected(),
|
|
2469
|
+
disabled: !row.getCanSelect(),
|
|
2470
|
+
onCheckedChange: (value) => row.toggleSelected(value === true),
|
|
2471
|
+
"aria-label": "Select row"
|
|
2472
|
+
})
|
|
2473
|
+
}),
|
|
2474
|
+
enableSorting: false,
|
|
2475
|
+
enableHiding: false,
|
|
2476
|
+
enableResizing: false,
|
|
2477
|
+
size: 40
|
|
2478
|
+
};
|
|
2479
|
+
}
|
|
2480
|
+
function ResizeHandle({ header }) {
|
|
2481
|
+
const isResizing = header.column.getIsResizing();
|
|
2482
|
+
return /* @__PURE__ */ jsx("span", {
|
|
2483
|
+
"aria-hidden": true,
|
|
2484
|
+
onMouseDown: header.getResizeHandler(),
|
|
2485
|
+
onTouchStart: header.getResizeHandler(),
|
|
2486
|
+
onClick: (e) => e.stopPropagation(),
|
|
2487
|
+
className: cn("absolute top-0 right-0 z-10 h-full w-1 cursor-col-resize touch-none select-none bg-border opacity-0 transition-opacity group-hover/header-row:opacity-100 hover:opacity-100", isResizing && "bg-primary opacity-100")
|
|
2488
|
+
});
|
|
2489
|
+
}
|
|
2490
|
+
function SortableHeader({ header }) {
|
|
2491
|
+
const direction = header.column.getIsSorted();
|
|
2492
|
+
const Icon = direction === "asc" ? ChevronUpIcon : direction === "desc" ? ChevronDownIcon : ChevronsUpDownIcon;
|
|
2493
|
+
return /* @__PURE__ */ jsxs(Button, {
|
|
2494
|
+
variant: "ghost",
|
|
2495
|
+
size: "sm",
|
|
2496
|
+
className: "-ml-2 h-7 data-[icon=inline-end]:pr-2",
|
|
2497
|
+
onClick: header.column.getToggleSortingHandler(),
|
|
2498
|
+
children: [flexRender(header.column.columnDef.header, header.getContext()), /* @__PURE__ */ jsx(Icon, {
|
|
2499
|
+
"data-icon": "inline-end",
|
|
2500
|
+
className: cn("size-3.5", direction === false && "opacity-50")
|
|
2501
|
+
})]
|
|
2502
|
+
});
|
|
2503
|
+
}
|
|
2504
|
+
function SkeletonRows({ columns, count }) {
|
|
2505
|
+
return /* @__PURE__ */ jsx(Fragment, { children: Array.from({ length: count }, (_, i) => /* @__PURE__ */ jsx(TableRow, { children: columns.map((col, ci) => /* @__PURE__ */ jsx(TableCell, {
|
|
2506
|
+
"data-test": "loading-cell",
|
|
2507
|
+
children: /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-full max-w-full" })
|
|
2508
|
+
}, col.id ?? `col-${ci}`)) }, `skeleton-${i}`)) });
|
|
2509
|
+
}
|
|
2510
|
+
/**
|
|
2511
|
+
* Returns a callback ref for the scroll sentinel. The observer is (re)attached
|
|
2512
|
+
* whenever the sentinel node mounts — so it works even if the sentinel only
|
|
2513
|
+
* appears after the first page loads (the sentinel's presence is the gate). It
|
|
2514
|
+
* fires `onFetchMore` once per mount and disconnects immediately, so a single
|
|
2515
|
+
* page never triggers duplicate fetches; the sentinel remounts for the next page.
|
|
2516
|
+
*/
|
|
2517
|
+
function useFetchMoreSentinel(onFetchMore, fillHeight, resetKey) {
|
|
2518
|
+
const onFetchMoreRef = React.useRef(onFetchMore);
|
|
2519
|
+
onFetchMoreRef.current = onFetchMore;
|
|
2520
|
+
const observerRef = React.useRef(null);
|
|
2521
|
+
const nodeRef = React.useRef(null);
|
|
2522
|
+
const armedRef = React.useRef(true);
|
|
2523
|
+
const observe = React.useCallback(() => {
|
|
2524
|
+
observerRef.current?.disconnect();
|
|
2525
|
+
observerRef.current = null;
|
|
2526
|
+
const node = nodeRef.current;
|
|
2527
|
+
if (!node) return;
|
|
2528
|
+
const root = fillHeight ? node.closest("[data-slot=\"table-container\"]") : null;
|
|
2529
|
+
const observer = new IntersectionObserver((entries) => {
|
|
2530
|
+
if (entries[entries.length - 1]?.isIntersecting) {
|
|
2531
|
+
if (armedRef.current) {
|
|
2532
|
+
armedRef.current = false;
|
|
2533
|
+
onFetchMoreRef.current?.();
|
|
2534
|
+
}
|
|
2535
|
+
} else armedRef.current = true;
|
|
2536
|
+
}, {
|
|
2537
|
+
root,
|
|
2538
|
+
rootMargin: "200px"
|
|
2539
|
+
});
|
|
2540
|
+
observer.observe(node);
|
|
2541
|
+
observerRef.current = observer;
|
|
2542
|
+
}, [fillHeight]);
|
|
2543
|
+
React.useEffect(() => {
|
|
2544
|
+
armedRef.current = true;
|
|
2545
|
+
observe();
|
|
2546
|
+
}, [resetKey, observe]);
|
|
2547
|
+
return React.useCallback((node) => {
|
|
2548
|
+
nodeRef.current = node;
|
|
2549
|
+
observe();
|
|
2550
|
+
}, [observe]);
|
|
2551
|
+
}
|
|
2552
|
+
|
|
2553
|
+
//#endregion
|
|
2554
|
+
//#region src/components/tree.tsx
|
|
2555
|
+
const TreeContext = React.createContext({
|
|
2556
|
+
currentItem: void 0,
|
|
2557
|
+
indent: 20,
|
|
2558
|
+
tree: void 0
|
|
2559
|
+
});
|
|
2560
|
+
function useTreeContext() {
|
|
2561
|
+
return React.useContext(TreeContext);
|
|
2562
|
+
}
|
|
2563
|
+
function Tree({ indent = 20, tree, className, ...props }) {
|
|
2564
|
+
const containerProps = tree && typeof tree.getContainerProps === "function" ? tree.getContainerProps() : {};
|
|
2565
|
+
const { style: propStyle, ...otherProps } = {
|
|
2566
|
+
...props,
|
|
2567
|
+
...containerProps
|
|
2568
|
+
};
|
|
2569
|
+
const mergedStyle = {
|
|
2570
|
+
...propStyle,
|
|
2571
|
+
"--tree-indent": `${indent}px`
|
|
2572
|
+
};
|
|
2573
|
+
return /* @__PURE__ */ jsx(TreeContext.Provider, {
|
|
2574
|
+
value: {
|
|
2575
|
+
indent,
|
|
2576
|
+
tree
|
|
2577
|
+
},
|
|
2578
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
2579
|
+
className: cn("flex flex-col", className),
|
|
2580
|
+
"data-slot": "tree",
|
|
2581
|
+
style: mergedStyle,
|
|
2582
|
+
...otherProps
|
|
2583
|
+
})
|
|
2584
|
+
});
|
|
2585
|
+
}
|
|
2586
|
+
const ACTIVATION_KEYS = new Set([
|
|
2587
|
+
"Enter",
|
|
2588
|
+
" ",
|
|
2589
|
+
"Spacebar"
|
|
2590
|
+
]);
|
|
2591
|
+
function TreeItem({ item, className, children, onActivate, onClick: userOnClick, onKeyDown: userOnKeyDown, style: userStyle, ...props }) {
|
|
2592
|
+
const { indent } = useTreeContext();
|
|
2593
|
+
const { style: itemStyle, onClick: _headlessOnClick, ...restItemProps } = typeof item.getProps === "function" ? item.getProps() : {};
|
|
2594
|
+
const activate = () => {
|
|
2595
|
+
if (typeof item.setFocused === "function") item.setFocused();
|
|
2596
|
+
if (onActivate) onActivate(item);
|
|
2597
|
+
else {
|
|
2598
|
+
if (typeof item.primaryAction === "function") item.primaryAction();
|
|
2599
|
+
if (typeof item.isFolder === "function" && item.isFolder()) item.isExpanded() ? item.collapse() : item.expand();
|
|
2600
|
+
}
|
|
2601
|
+
};
|
|
2602
|
+
const handleClick = (event) => {
|
|
2603
|
+
userOnClick?.(event);
|
|
2604
|
+
if (event.defaultPrevented) return;
|
|
2605
|
+
if (event.target.closest("button, [role=\"checkbox\"], input, a")) return;
|
|
2606
|
+
activate();
|
|
2607
|
+
};
|
|
2608
|
+
const handleKeyDown = (event) => {
|
|
2609
|
+
userOnKeyDown?.(event);
|
|
2610
|
+
if (event.defaultPrevented) return;
|
|
2611
|
+
if (event.target !== event.currentTarget) return;
|
|
2612
|
+
if (ACTIVATION_KEYS.has(event.key)) {
|
|
2613
|
+
event.preventDefault();
|
|
2614
|
+
activate();
|
|
2615
|
+
}
|
|
2616
|
+
};
|
|
2617
|
+
const mergedStyle = {
|
|
2618
|
+
...userStyle,
|
|
2619
|
+
...itemStyle,
|
|
2620
|
+
"--tree-padding": `${item.getItemMeta().level * indent}px`
|
|
2621
|
+
};
|
|
2622
|
+
return /* @__PURE__ */ jsx(TreeContext.Provider, {
|
|
2623
|
+
value: {
|
|
2624
|
+
currentItem: item,
|
|
2625
|
+
indent
|
|
2626
|
+
},
|
|
2627
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
2628
|
+
role: "treeitem",
|
|
2629
|
+
className: cn("relative z-10 flex w-full cursor-pointer items-center gap-1.5 rounded-sm px-2 py-1.5 text-start text-sm transition-colors not-last:mb-0.5 outline-hidden select-none hover:bg-accent/50 focus:z-20 focus-visible:ring-[3px] focus-visible:ring-ring/50 data-[drag-target=true]:bg-accent data-[search-match=true]:bg-blue-400/20! data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0", className),
|
|
2630
|
+
"data-drag-target": typeof item.isDragTarget === "function" ? item.isDragTarget() || false : void 0,
|
|
2631
|
+
"data-focus": typeof item.isFocused === "function" ? item.isFocused() || false : void 0,
|
|
2632
|
+
"data-folder": typeof item.isFolder === "function" ? item.isFolder() || false : void 0,
|
|
2633
|
+
"data-search-match": typeof item.isMatchingSearch === "function" ? item.isMatchingSearch() || false : void 0,
|
|
2634
|
+
"data-selected": typeof item.isSelected === "function" ? item.isSelected() || false : void 0,
|
|
2635
|
+
"data-slot": "tree-item",
|
|
2636
|
+
style: mergedStyle,
|
|
2637
|
+
...restItemProps,
|
|
2638
|
+
onClick: handleClick,
|
|
2639
|
+
onKeyDown: handleKeyDown,
|
|
2640
|
+
...props,
|
|
2641
|
+
children
|
|
2642
|
+
})
|
|
2643
|
+
});
|
|
2644
|
+
}
|
|
2645
|
+
function TreeItemLabel({ item: propItem, children, className, ...props }) {
|
|
2646
|
+
const { currentItem } = useTreeContext();
|
|
2647
|
+
const item = propItem || currentItem;
|
|
2648
|
+
if (!item) {
|
|
2649
|
+
console.warn("TreeItemLabel: No item provided via props or context");
|
|
2650
|
+
return null;
|
|
2651
|
+
}
|
|
2652
|
+
const isFolder = typeof item.isFolder === "function" && item.isFolder();
|
|
2653
|
+
const isExpanded = typeof item.isExpanded === "function" && item.isExpanded();
|
|
2654
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
2655
|
+
className: cn("flex flex-1 items-center gap-1 ps-(--tree-padding) text-start", className),
|
|
2656
|
+
"data-slot": "tree-item-label",
|
|
2657
|
+
...props,
|
|
2658
|
+
children: [isFolder ? /* @__PURE__ */ jsx(Button, {
|
|
2659
|
+
"aria-label": isExpanded ? "Collapse" : "Expand",
|
|
2660
|
+
className: "shrink-0 text-muted-foreground",
|
|
2661
|
+
onClick: (event) => {
|
|
2662
|
+
event.stopPropagation();
|
|
2663
|
+
if (isExpanded) item.collapse();
|
|
2664
|
+
else item.expand();
|
|
2665
|
+
},
|
|
2666
|
+
size: "icon-sm",
|
|
2667
|
+
tabIndex: -1,
|
|
2668
|
+
variant: "ghost",
|
|
2669
|
+
children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: cn("size-4", !isExpanded && "-rotate-90") })
|
|
2670
|
+
}) : /* @__PURE__ */ jsx("span", {
|
|
2671
|
+
"aria-hidden": "true",
|
|
2672
|
+
className: "size-6 shrink-0"
|
|
2673
|
+
}), children || (typeof item.getItemName === "function" ? item.getItemName() : null)]
|
|
2674
|
+
});
|
|
2675
|
+
}
|
|
2676
|
+
function TreeDragLine({ className, ...props }) {
|
|
2677
|
+
const { tree } = useTreeContext();
|
|
2678
|
+
if (!tree || typeof tree.getDragLineStyle !== "function") {
|
|
2679
|
+
console.warn("TreeDragLine: No tree provided via context or tree does not have getDragLineStyle method");
|
|
2680
|
+
return null;
|
|
2681
|
+
}
|
|
2682
|
+
const dragLine = tree.getDragLineStyle();
|
|
2683
|
+
return /* @__PURE__ */ jsx("div", {
|
|
2684
|
+
className: cn("-mt-px absolute z-30 h-0.5 w-[unset] bg-primary before:absolute before:-top-[3px] before:left-0 before:size-2 before:rounded-full before:border-2 before:border-primary before:bg-background", className),
|
|
2685
|
+
style: dragLine,
|
|
2686
|
+
...props
|
|
2687
|
+
});
|
|
2688
|
+
}
|
|
2689
|
+
|
|
2690
|
+
//#endregion
|
|
2691
|
+
//#region src/components/data-tree.tsx
|
|
2692
|
+
const ROOT_ID = "__data_tree_root__";
|
|
2693
|
+
/** Bridges headless-tree's `SetStateFn` (value-or-updater) onto a plain setter. */
|
|
2694
|
+
function applyUpdater(updaterOrValue, prev) {
|
|
2695
|
+
return typeof updaterOrValue === "function" ? updaterOrValue(prev) : updaterOrValue;
|
|
2696
|
+
}
|
|
2697
|
+
function buildIndex(items, getKey, getChildren) {
|
|
2698
|
+
const data = /* @__PURE__ */ new Map();
|
|
2699
|
+
const children = /* @__PURE__ */ new Map();
|
|
2700
|
+
const walk = (nodes) => {
|
|
2701
|
+
const ids = [];
|
|
2702
|
+
for (const node of nodes) {
|
|
2703
|
+
const key = getKey(node);
|
|
2704
|
+
data.set(key, node);
|
|
2705
|
+
ids.push(key);
|
|
2706
|
+
const kids = getChildren?.(node);
|
|
2707
|
+
if (kids && kids.length > 0) children.set(key, walk(kids));
|
|
2708
|
+
}
|
|
2709
|
+
return ids;
|
|
2710
|
+
};
|
|
2711
|
+
return {
|
|
2712
|
+
data,
|
|
2713
|
+
children,
|
|
2714
|
+
roots: walk(items)
|
|
2715
|
+
};
|
|
2716
|
+
}
|
|
2717
|
+
function DataTree(componentProps) {
|
|
2718
|
+
const { items, getKey, getLabel, getChildren, getIcon, getTextValue, selectionMode = "none", selectedKeys, defaultSelectedKeys = [], onSelectionChange, expandedKeys, defaultExpandedKeys = [], onExpandedChange, indent = 20, className, "aria-label": ariaLabel } = componentProps;
|
|
2719
|
+
const selectable = selectionMode !== "none";
|
|
2720
|
+
const multiple = selectionMode === "multiple";
|
|
2721
|
+
const index = React.useMemo(() => buildIndex(items, getKey, getChildren), [
|
|
2722
|
+
items,
|
|
2723
|
+
getKey,
|
|
2724
|
+
getChildren
|
|
2725
|
+
]);
|
|
2726
|
+
const [expandedItems = [], setExpandedState] = useControllableState({
|
|
2727
|
+
prop: expandedKeys,
|
|
2728
|
+
defaultProp: defaultExpandedKeys,
|
|
2729
|
+
onChange: onExpandedChange
|
|
2730
|
+
});
|
|
2731
|
+
const [selectedItems = [], setSelectedState] = useControllableState({
|
|
2732
|
+
prop: selectedKeys,
|
|
2733
|
+
defaultProp: defaultSelectedKeys,
|
|
2734
|
+
onChange: onSelectionChange
|
|
2735
|
+
});
|
|
2736
|
+
const setExpandedItems = (next) => setExpandedState((prev) => applyUpdater(next, prev ?? []));
|
|
2737
|
+
const setSelectedItems = (next) => setSelectedState((prev) => applyUpdater(next, prev ?? []));
|
|
2738
|
+
const tree = useTree({
|
|
2739
|
+
rootItemId: ROOT_ID,
|
|
2740
|
+
getItemName: (item) => {
|
|
2741
|
+
const id = item.getId();
|
|
2742
|
+
if (id === ROOT_ID) return "";
|
|
2743
|
+
const node = index.data.get(id);
|
|
2744
|
+
if (!node) return id;
|
|
2745
|
+
if (getTextValue) return getTextValue(node);
|
|
2746
|
+
const label = getLabel(node);
|
|
2747
|
+
return typeof label === "string" ? label : id;
|
|
2748
|
+
},
|
|
2749
|
+
isItemFolder: (item) => (index.children.get(item.getId())?.length ?? 0) > 0,
|
|
2750
|
+
dataLoader: {
|
|
2751
|
+
getItem: (id) => id === ROOT_ID ? void 0 : index.data.get(id),
|
|
2752
|
+
getChildren: (id) => id === ROOT_ID ? index.roots : index.children.get(id) ?? []
|
|
2753
|
+
},
|
|
2754
|
+
indent,
|
|
2755
|
+
state: {
|
|
2756
|
+
expandedItems,
|
|
2757
|
+
...multiple ? { checkedItems: selectedItems } : selectable ? { selectedItems } : {}
|
|
2758
|
+
},
|
|
2759
|
+
setExpandedItems,
|
|
2760
|
+
...multiple ? { setCheckedItems: setSelectedItems } : selectable ? { setSelectedItems } : {},
|
|
2761
|
+
features: [
|
|
2762
|
+
syncDataLoaderFeature,
|
|
2763
|
+
...selectable ? [selectionFeature] : [],
|
|
2764
|
+
...multiple ? [checkboxesFeature] : [],
|
|
2765
|
+
hotkeysCoreFeature
|
|
2766
|
+
]
|
|
2767
|
+
});
|
|
2768
|
+
const renderLabel = (item) => {
|
|
2769
|
+
const node = index.data.get(item.getId());
|
|
2770
|
+
if (!node) return /* @__PURE__ */ jsx(TreeItemLabel, {});
|
|
2771
|
+
const label = getLabel(node);
|
|
2772
|
+
if (!getIcon) return /* @__PURE__ */ jsx(TreeItemLabel, { children: label });
|
|
2773
|
+
return /* @__PURE__ */ jsx(TreeItemLabel, { children: /* @__PURE__ */ jsxs("span", {
|
|
2774
|
+
className: "flex items-center gap-2",
|
|
2775
|
+
children: [getIcon(node, {
|
|
2776
|
+
isFolder: item.isFolder(),
|
|
2777
|
+
isExpanded: item.isExpanded()
|
|
2778
|
+
}) ?? /* @__PURE__ */ jsx("span", {
|
|
2779
|
+
"aria-hidden": "true",
|
|
2780
|
+
className: "size-4 shrink-0"
|
|
2781
|
+
}), label]
|
|
2782
|
+
}) });
|
|
2783
|
+
};
|
|
2784
|
+
return /* @__PURE__ */ jsx(Tree, {
|
|
2785
|
+
"aria-label": ariaLabel,
|
|
2786
|
+
className,
|
|
2787
|
+
indent,
|
|
2788
|
+
tree,
|
|
2789
|
+
children: tree.getItems().map((item) => {
|
|
2790
|
+
const checkedState = multiple ? item.getCheckedState() : void 0;
|
|
2791
|
+
return /* @__PURE__ */ jsxs(TreeItem, {
|
|
2792
|
+
item,
|
|
2793
|
+
onActivate: multiple ? () => item.toggleCheckedState() : selectable ? () => item.select() : void 0,
|
|
2794
|
+
children: [multiple ? /* @__PURE__ */ jsx(Checkbox, {
|
|
2795
|
+
"aria-label": item.getItemName(),
|
|
2796
|
+
checked: checkedState === "checked",
|
|
2797
|
+
indeterminate: checkedState === "indeterminate",
|
|
2798
|
+
onClick: (event) => event.stopPropagation(),
|
|
2799
|
+
onCheckedChange: (checked) => item.getCheckboxProps().onChange?.({ target: { checked } })
|
|
2800
|
+
}) : null, renderLabel(item)]
|
|
2801
|
+
}, item.getId());
|
|
2802
|
+
})
|
|
2803
|
+
});
|
|
1999
2804
|
}
|
|
2000
2805
|
|
|
2001
2806
|
//#endregion
|
|
@@ -2018,42 +2823,56 @@ function Drawer({ swipeDirection, position = "bottom", ...props }) {
|
|
|
2018
2823
|
});
|
|
2019
2824
|
}
|
|
2020
2825
|
const DrawerPortal = DrawerPrimitive.Portal;
|
|
2021
|
-
|
|
2826
|
+
const DrawerTrigger = React.forwardRef((componentProps, forwardRef) => {
|
|
2022
2827
|
return /* @__PURE__ */ jsx(DrawerPrimitive.Trigger, {
|
|
2828
|
+
ref: forwardRef,
|
|
2023
2829
|
"data-slot": "drawer-trigger",
|
|
2024
|
-
...
|
|
2830
|
+
...componentProps
|
|
2025
2831
|
});
|
|
2026
|
-
}
|
|
2027
|
-
|
|
2832
|
+
});
|
|
2833
|
+
DrawerTrigger.displayName = "DrawerTrigger";
|
|
2834
|
+
const DrawerClose = React.forwardRef((componentProps, forwardRef) => {
|
|
2028
2835
|
return /* @__PURE__ */ jsx(DrawerPrimitive.Close, {
|
|
2836
|
+
ref: forwardRef,
|
|
2029
2837
|
"data-slot": "drawer-close",
|
|
2030
|
-
...
|
|
2838
|
+
...componentProps
|
|
2031
2839
|
});
|
|
2032
|
-
}
|
|
2033
|
-
|
|
2840
|
+
});
|
|
2841
|
+
DrawerClose.displayName = "DrawerClose";
|
|
2842
|
+
const DrawerSwipeArea = React.forwardRef((componentProps, forwardRef) => {
|
|
2843
|
+
const { className, position: positionProp, ...props } = componentProps;
|
|
2034
2844
|
const { position: contextPosition } = useContext(DrawerContext);
|
|
2035
2845
|
const position = positionProp ?? contextPosition;
|
|
2036
2846
|
return /* @__PURE__ */ jsx(DrawerPrimitive.SwipeArea, {
|
|
2847
|
+
ref: forwardRef,
|
|
2037
2848
|
className: cn("fixed z-50 touch-none", position === "bottom" && "inset-x-0 bottom-0 h-8", position === "top" && "inset-x-0 top-0 h-8", position === "left" && "inset-y-0 left-0 w-8", position === "right" && "inset-y-0 right-0 w-8", className),
|
|
2038
2849
|
"data-slot": "drawer-swipe-area",
|
|
2039
2850
|
...props
|
|
2040
2851
|
});
|
|
2041
|
-
}
|
|
2042
|
-
|
|
2852
|
+
});
|
|
2853
|
+
DrawerSwipeArea.displayName = "DrawerSwipeArea";
|
|
2854
|
+
const DrawerBackdrop = React.forwardRef((componentProps, forwardRef) => {
|
|
2855
|
+
const { className, inContainer, ...props } = componentProps;
|
|
2043
2856
|
return /* @__PURE__ */ jsx(DrawerPrimitive.Backdrop, {
|
|
2857
|
+
ref: forwardRef,
|
|
2044
2858
|
className: cn("inset-0 z-50 bg-black/10 opacity-[calc(1-var(--drawer-swipe-progress))] backdrop-blur-sm transition-opacity duration-450 ease-[cubic-bezier(0.32,0.72,0,1)] data-ending-style:opacity-0 data-starting-style:opacity-0 data-ending-style:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-swiping:duration-0 supports-[-webkit-touch-callout:none]:absolute", inContainer ? "absolute" : "fixed", className),
|
|
2045
2859
|
"data-slot": "drawer-backdrop",
|
|
2046
2860
|
...props
|
|
2047
2861
|
});
|
|
2048
|
-
}
|
|
2049
|
-
|
|
2862
|
+
});
|
|
2863
|
+
DrawerBackdrop.displayName = "DrawerBackdrop";
|
|
2864
|
+
const DrawerViewport = React.forwardRef((componentProps, forwardRef) => {
|
|
2865
|
+
const { className, position, variant = "default", inContainer, ...props } = componentProps;
|
|
2050
2866
|
return /* @__PURE__ */ jsx(DrawerPrimitive.Viewport, {
|
|
2867
|
+
ref: forwardRef,
|
|
2051
2868
|
className: cn("inset-0 z-50 [--bleed:--spacing(12)] [--inset:--spacing(0)]", inContainer ? "absolute" : "fixed", "touch-none", position === "bottom" && "grid grid-rows-[1fr_auto] pt-12", position === "top" && "grid grid-rows-[auto_1fr] pb-12", position === "left" && "flex justify-start", position === "right" && "flex justify-end", variant === "inset" && "px-(--inset) sm:[--inset:--spacing(4)]", variant === "inset" && position !== "bottom" && "pt-(--inset)", variant === "inset" && position !== "top" && "pb-(--inset)", className),
|
|
2052
2869
|
"data-slot": "drawer-viewport",
|
|
2053
2870
|
...props
|
|
2054
2871
|
});
|
|
2055
|
-
}
|
|
2056
|
-
|
|
2872
|
+
});
|
|
2873
|
+
DrawerViewport.displayName = "DrawerViewport";
|
|
2874
|
+
const DrawerPopup = React.forwardRef((componentProps, forwardRef) => {
|
|
2875
|
+
const { className, children, showCloseButton = false, position: positionProp, variant = "default", showBar = false, container, ...props } = componentProps;
|
|
2057
2876
|
const { position: contextPosition } = useContext(DrawerContext);
|
|
2058
2877
|
const position = positionProp ?? contextPosition;
|
|
2059
2878
|
const inContainer = !!container;
|
|
@@ -2064,6 +2883,7 @@ function DrawerPopup({ className, children, showCloseButton = false, position: p
|
|
|
2064
2883
|
variant,
|
|
2065
2884
|
inContainer,
|
|
2066
2885
|
children: /* @__PURE__ */ jsxs(DrawerPrimitive.Popup, {
|
|
2886
|
+
ref: forwardRef,
|
|
2067
2887
|
className: cn("relative flex max-h-full min-h-0 w-full min-w-0 flex-col bg-popover not-dark:bg-clip-padding text-popover-foreground shadow-lg/5 outline-none transition-[transform,box-shadow,height,background-color] duration-450 ease-[cubic-bezier(0.32,0.72,0,1)] will-change-transform [--peek:calc(--spacing(6)-1px)] [--scale-base:calc(max(0,1-(var(--nested-drawers)*var(--stack-step))))] [--scale:clamp(0,calc(var(--scale-base)+(var(--stack-step)*var(--stack-progress))),1)] [--shrink:calc(1-var(--scale))] [--stack-peek-offset:max(0px,calc((var(--nested-drawers)-var(--stack-progress))*var(--peek)))] [--stack-progress:clamp(0,var(--drawer-swipe-progress),1)] [--stack-step:0.05] before:pointer-events-none before:absolute before:inset-0 before:shadow-[0_1px_--theme(--color-black/4%)] after:pointer-events-none after:absolute after:bg-popover data-swiping:select-none data-nested-drawer-open:overflow-hidden data-nested-drawer-open:bg-[color-mix(in_srgb,var(--popover),var(--color-black)_calc(2%*(var(--nested-drawers)-var(--stack-progress))))] data-ending-style:shadow-transparent data-starting-style:shadow-transparent data-ending-style:duration-[calc(var(--drawer-swipe-strength)*400ms)] dark:data-nested-drawer-open:bg-[color-mix(in_srgb,var(--popover),var(--color-black)_calc(6%*(var(--nested-drawers)-var(--stack-progress))))] dark:before:shadow-[0_-1px_--theme(--color-white/6%)]", "touch-none", position === "bottom" && "transform-[translateY(calc(var(--drawer-snap-point-offset)+var(--drawer-swipe-movement-y)))] data-ending-style:transform-[translateY(calc(100%+env(safe-area-inset-bottom,0px)+var(--inset)))] data-starting-style:transform-[translateY(calc(100%+env(safe-area-inset-bottom,0px)+var(--inset)))] row-start-2 -mb-[max(0px,calc(var(--drawer-snap-point-offset,0px)+clamp(0,1,var(--drawer-snap-point-offset,0px)/1px)*var(--drawer-swipe-movement-y,0px)))] border-t pb-[max(0px,calc(env(safe-area-inset-bottom,0px)+var(--drawer-snap-point-offset,0px)+clamp(0,1,var(--drawer-snap-point-offset,0px)/1px)*var(--drawer-swipe-movement-y,0px)))] not-data-starting-style:not-data-ending-style:transition-[transform,box-shadow,height,background-color,margin,padding] after:inset-x-0 after:top-full after:h-(--bleed) has-data-[slot=drawer-bar]:pt-2 data-ending-style:mb-0 data-starting-style:mb-0 data-ending-style:pb-0 data-starting-style:pb-0", position === "top" && "data-starting-style:transform-[translateY(calc(-100%-var(--inset)))] data-ending-style:transform-[translateY(calc(-100%-var(--inset)))] transform-[translateY(var(--drawer-swipe-movement-y))] border-b after:inset-x-0 after:bottom-full after:h-(--bleed) has-data-[slot=drawer-bar]:pb-2", position === "left" && "data-starting-style:transform-[translateX(calc(-100%-var(--inset)))] data-ending-style:transform-[translateX(calc(-100%-var(--inset)))] transform-[translateX(var(--drawer-swipe-movement-x))] w-[calc(100%-(--spacing(12)))] max-w-md border-e after:inset-y-0 after:end-full after:w-(--bleed) has-data-[slot=drawer-bar]:pe-2", position === "right" && "transform-[translateX(var(--drawer-swipe-movement-x))] data-ending-style:transform-[translateX(calc(100%+var(--inset)))] data-starting-style:transform-[translateX(calc(100%+var(--inset)))] col-start-2 w-[calc(100%-(--spacing(12)))] max-w-md border-s after:inset-y-0 after:start-full after:w-(--bleed) has-data-[slot=drawer-bar]:ps-2", variant !== "straight" && cn(position === "bottom" && "rounded-t-2xl", position === "top" && "rounded-b-2xl **:data-[slot=drawer-footer]:rounded-b-[calc(var(--radius-2xl)-1px)]", position === "left" && "rounded-e-2xl **:data-[slot=drawer-footer]:rounded-ee-[calc(var(--radius-2xl)-1px)]", position === "right" && "rounded-s-2xl **:data-[slot=drawer-footer]:rounded-es-[calc(var(--radius-2xl)-1px)]"), variant === "default" && cn(position === "bottom" && "before:rounded-t-[calc(var(--radius-2xl)-1px)]", position === "top" && "before:rounded-b-[calc(var(--radius-2xl)-1px)]", position === "left" && "before:rounded-e-[calc(var(--radius-2xl)-1px)]", position === "right" && "before:rounded-s-[calc(var(--radius-2xl)-1px)]"), variant === "inset" && "before:hidden sm:rounded-2xl sm:border sm:after:bg-transparent sm:before:rounded-[calc(var(--radius-2xl)-1px)] sm:**:data-[slot=drawer-footer]:rounded-b-[calc(var(--radius-2xl)-1px)]", variant === "straight" && "[--stack-step:0]", (position === "bottom" || position === "top") && "h-(--drawer-height,auto) [--height:max(0px,calc(var(--drawer-frontmost-height,var(--drawer-height))))] data-nested-drawer-open:h-(--height)", position === "bottom" && "data-nested-drawer-open:transform-[translateY(calc(var(--drawer-swipe-movement-y)-var(--stack-peek-offset)-(var(--shrink)*var(--height))))_scale(var(--scale))] origin-[50%_calc(100%-var(--inset))]", position === "top" && "data-nested-drawer-open:transform-[translateY(calc(var(--drawer-swipe-movement-y)+var(--stack-peek-offset)+(var(--shrink)*var(--height))))_scale(var(--scale))] origin-[50%_var(--inset)]", position === "left" && "data-nested-drawer-open:transform-[translateX(calc(var(--drawer-swipe-movement-x)+var(--stack-peek-offset)))_scale(var(--scale))] origin-right", position === "right" && "data-nested-drawer-open:transform-[translateX(calc(var(--drawer-swipe-movement-x)-var(--stack-peek-offset)))_scale(var(--scale))] origin-left", className),
|
|
2068
2888
|
"data-slot": "drawer-popup",
|
|
2069
2889
|
...props,
|
|
@@ -2083,46 +2903,61 @@ function DrawerPopup({ className, children, showCloseButton = false, position: p
|
|
|
2083
2903
|
})
|
|
2084
2904
|
})]
|
|
2085
2905
|
});
|
|
2086
|
-
}
|
|
2087
|
-
|
|
2906
|
+
});
|
|
2907
|
+
DrawerPopup.displayName = "DrawerPopup";
|
|
2908
|
+
const DrawerHeader = React.forwardRef((componentProps, forwardRef) => {
|
|
2909
|
+
const { className, allowSelection = false, render, ...props } = componentProps;
|
|
2088
2910
|
return useRender({
|
|
2089
2911
|
defaultTagName: "div",
|
|
2090
2912
|
props: mergeProps({
|
|
2091
2913
|
className: cn("flex flex-col gap-2 p-6 in-[[data-slot=drawer-popup]:has([data-slot=drawer-panel])]:pb-3 max-sm:pb-4", !allowSelection && "cursor-default", className),
|
|
2914
|
+
ref: forwardRef,
|
|
2092
2915
|
"data-slot": "drawer-header"
|
|
2093
2916
|
}, props),
|
|
2094
2917
|
render: allowSelection ? /* @__PURE__ */ jsx(DrawerContent, { render }) : render
|
|
2095
2918
|
});
|
|
2096
|
-
}
|
|
2097
|
-
|
|
2919
|
+
});
|
|
2920
|
+
DrawerHeader.displayName = "DrawerHeader";
|
|
2921
|
+
const DrawerFooter = React.forwardRef((componentProps, forwardRef) => {
|
|
2922
|
+
const { className, variant = "default", allowSelection = true, render, ...props } = componentProps;
|
|
2098
2923
|
return useRender({
|
|
2099
2924
|
defaultTagName: "div",
|
|
2100
2925
|
props: mergeProps({
|
|
2101
2926
|
className: cn("flex flex-col-reverse gap-2 px-6 pb-(--safe-area-inset-bottom,0px) sm:flex-row sm:justify-end", !allowSelection && "cursor-default", variant === "default" && "border-t bg-muted/72 pt-4 pb-[calc(env(safe-area-inset-bottom,0px)+--spacing(4))]", variant === "bare" && "in-[[data-slot=drawer-popup]:has([data-slot=drawer-panel])]:pt-3 pt-4 pb-[calc(env(safe-area-inset-bottom,0px)+--spacing(6))]", className),
|
|
2927
|
+
ref: forwardRef,
|
|
2102
2928
|
"data-slot": "drawer-footer"
|
|
2103
2929
|
}, props),
|
|
2104
2930
|
render: allowSelection ? /* @__PURE__ */ jsx(DrawerContent, { render }) : render
|
|
2105
2931
|
});
|
|
2106
|
-
}
|
|
2107
|
-
|
|
2932
|
+
});
|
|
2933
|
+
DrawerFooter.displayName = "DrawerFooter";
|
|
2934
|
+
const DrawerTitle = React.forwardRef((componentProps, forwardRef) => {
|
|
2935
|
+
const { className, ...props } = componentProps;
|
|
2108
2936
|
return /* @__PURE__ */ jsx(DrawerPrimitive.Title, {
|
|
2937
|
+
ref: forwardRef,
|
|
2109
2938
|
className: cn("font-heading font-semibold text-xl leading-none", className),
|
|
2110
2939
|
"data-slot": "drawer-title",
|
|
2111
2940
|
...props
|
|
2112
2941
|
});
|
|
2113
|
-
}
|
|
2114
|
-
|
|
2942
|
+
});
|
|
2943
|
+
DrawerTitle.displayName = "DrawerTitle";
|
|
2944
|
+
const DrawerDescription = React.forwardRef((componentProps, forwardRef) => {
|
|
2945
|
+
const { className, ...props } = componentProps;
|
|
2115
2946
|
return /* @__PURE__ */ jsx(DrawerPrimitive.Description, {
|
|
2947
|
+
ref: forwardRef,
|
|
2116
2948
|
className: cn("text-muted-foreground text-sm", className),
|
|
2117
2949
|
"data-slot": "drawer-description",
|
|
2118
2950
|
...props
|
|
2119
2951
|
});
|
|
2120
|
-
}
|
|
2121
|
-
|
|
2952
|
+
});
|
|
2953
|
+
DrawerDescription.displayName = "DrawerDescription";
|
|
2954
|
+
const DrawerPanel = React.forwardRef((componentProps, forwardRef) => {
|
|
2955
|
+
const { className, scrollFade = true, scrollable = true, allowSelection = true, render, ...props } = componentProps;
|
|
2122
2956
|
const content = useRender({
|
|
2123
2957
|
defaultTagName: "div",
|
|
2124
2958
|
props: mergeProps({
|
|
2125
2959
|
className: cn("p-6 in-[[data-slot=drawer-popup]:has([data-slot=drawer-header])]:pt-1 in-[[data-slot=drawer-popup]:has([data-slot=drawer-footer]:not(.border-t))]:pb-1", !allowSelection && "cursor-default", className),
|
|
2960
|
+
ref: forwardRef,
|
|
2126
2961
|
"data-slot": "drawer-panel"
|
|
2127
2962
|
}, props),
|
|
2128
2963
|
render: allowSelection ? /* @__PURE__ */ jsx(DrawerContent, { render }) : render
|
|
@@ -2133,8 +2968,10 @@ function DrawerPanel({ className, scrollFade = true, scrollable = true, allowSel
|
|
|
2133
2968
|
children: content
|
|
2134
2969
|
});
|
|
2135
2970
|
return content;
|
|
2136
|
-
}
|
|
2137
|
-
|
|
2971
|
+
});
|
|
2972
|
+
DrawerPanel.displayName = "DrawerPanel";
|
|
2973
|
+
const DrawerBar = React.forwardRef((componentProps, forwardRef) => {
|
|
2974
|
+
const { className, position: positionProp, render, ...props } = componentProps;
|
|
2138
2975
|
const { position: contextPosition } = useContext(DrawerContext);
|
|
2139
2976
|
const position = positionProp ?? contextPosition;
|
|
2140
2977
|
const horizontal = position === "left" || position === "right";
|
|
@@ -2143,27 +2980,34 @@ function DrawerBar({ className, position: positionProp, render, ...props }) {
|
|
|
2143
2980
|
props: mergeProps({
|
|
2144
2981
|
"aria-hidden": true,
|
|
2145
2982
|
className: cn("absolute flex touch-none items-center justify-center p-3 before:rounded-full before:bg-input", horizontal ? "inset-y-0 before:h-12 before:w-1" : "inset-x-0 before:h-1 before:w-12", position === "top" && "bottom-0", position === "bottom" && "top-0", position === "left" && "right-0", position === "right" && "left-0", className),
|
|
2983
|
+
ref: forwardRef,
|
|
2146
2984
|
"data-slot": "drawer-bar"
|
|
2147
2985
|
}, props),
|
|
2148
2986
|
render
|
|
2149
2987
|
});
|
|
2150
|
-
}
|
|
2988
|
+
});
|
|
2989
|
+
DrawerBar.displayName = "DrawerBar";
|
|
2151
2990
|
const DrawerContent = DrawerPrimitive.Content;
|
|
2152
|
-
|
|
2991
|
+
const DrawerMenu = React.forwardRef((componentProps, forwardRef) => {
|
|
2992
|
+
const { className, render, ...props } = componentProps;
|
|
2153
2993
|
return useRender({
|
|
2154
2994
|
defaultTagName: "nav",
|
|
2155
2995
|
props: mergeProps({
|
|
2156
2996
|
className: cn("-m-2 flex flex-col", className),
|
|
2997
|
+
ref: forwardRef,
|
|
2157
2998
|
"data-slot": "drawer-menu"
|
|
2158
2999
|
}, props),
|
|
2159
3000
|
render
|
|
2160
3001
|
});
|
|
2161
|
-
}
|
|
2162
|
-
|
|
3002
|
+
});
|
|
3003
|
+
DrawerMenu.displayName = "DrawerMenu";
|
|
3004
|
+
const DrawerMenuItem = React.forwardRef((componentProps, forwardRef) => {
|
|
3005
|
+
const { className, variant = "default", render, disabled, ...props } = componentProps;
|
|
2163
3006
|
return useRender({
|
|
2164
3007
|
defaultTagName: "button",
|
|
2165
3008
|
props: mergeProps({
|
|
2166
3009
|
className: cn("flex min-h-9 w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-1 text-base text-foreground outline-none hover:bg-accent hover:text-accent-foreground disabled:pointer-events-none disabled:opacity-64 data-[variant=destructive]:text-destructive-foreground sm:min-h-8 sm:text-sm [&>svg:not([class*='opacity-'])]:opacity-80 [&>svg:not([class*='size-'])]:size-4.5 sm:[&>svg:not([class*='size-'])]:size-4 [&>svg]:pointer-events-none [&>svg]:-mx-0.5 [&>svg]:shrink-0", className),
|
|
3010
|
+
ref: forwardRef,
|
|
2167
3011
|
"data-slot": "drawer-menu-item",
|
|
2168
3012
|
"data-variant": variant,
|
|
2169
3013
|
disabled,
|
|
@@ -2171,47 +3015,62 @@ function DrawerMenuItem({ className, variant = "default", render, disabled, ...p
|
|
|
2171
3015
|
}, props),
|
|
2172
3016
|
render
|
|
2173
3017
|
});
|
|
2174
|
-
}
|
|
2175
|
-
|
|
3018
|
+
});
|
|
3019
|
+
DrawerMenuItem.displayName = "DrawerMenuItem";
|
|
3020
|
+
const DrawerMenuSeparator = React.forwardRef((componentProps, forwardRef) => {
|
|
3021
|
+
const { className, render, ...props } = componentProps;
|
|
2176
3022
|
return useRender({
|
|
2177
3023
|
defaultTagName: "div",
|
|
2178
3024
|
props: mergeProps({
|
|
2179
3025
|
className: cn("mx-2 my-1 h-px bg-border", className),
|
|
3026
|
+
ref: forwardRef,
|
|
2180
3027
|
"data-slot": "drawer-menu-separator"
|
|
2181
3028
|
}, props),
|
|
2182
3029
|
render
|
|
2183
3030
|
});
|
|
2184
|
-
}
|
|
2185
|
-
|
|
3031
|
+
});
|
|
3032
|
+
DrawerMenuSeparator.displayName = "DrawerMenuSeparator";
|
|
3033
|
+
const DrawerMenuGroup = React.forwardRef((componentProps, forwardRef) => {
|
|
3034
|
+
const { className, render, ...props } = componentProps;
|
|
2186
3035
|
return useRender({
|
|
2187
3036
|
defaultTagName: "div",
|
|
2188
3037
|
props: mergeProps({
|
|
2189
3038
|
className: cn("flex flex-col", className),
|
|
3039
|
+
ref: forwardRef,
|
|
2190
3040
|
"data-slot": "drawer-menu-group"
|
|
2191
3041
|
}, props),
|
|
2192
3042
|
render
|
|
2193
3043
|
});
|
|
2194
|
-
}
|
|
2195
|
-
|
|
3044
|
+
});
|
|
3045
|
+
DrawerMenuGroup.displayName = "DrawerMenuGroup";
|
|
3046
|
+
const DrawerMenuGroupLabel = React.forwardRef((componentProps, forwardRef) => {
|
|
3047
|
+
const { className, render, ...props } = componentProps;
|
|
2196
3048
|
return useRender({
|
|
2197
3049
|
defaultTagName: "div",
|
|
2198
3050
|
props: mergeProps({
|
|
2199
3051
|
className: cn("px-2 py-1.5 font-medium text-muted-foreground text-xs", className),
|
|
3052
|
+
ref: forwardRef,
|
|
2200
3053
|
"data-slot": "drawer-menu-group-label"
|
|
2201
3054
|
}, props),
|
|
2202
3055
|
render
|
|
2203
3056
|
});
|
|
2204
|
-
}
|
|
2205
|
-
|
|
3057
|
+
});
|
|
3058
|
+
DrawerMenuGroupLabel.displayName = "DrawerMenuGroupLabel";
|
|
3059
|
+
const DrawerMenuTrigger = React.forwardRef((componentProps, forwardRef) => {
|
|
3060
|
+
const { className, children, ...props } = componentProps;
|
|
2206
3061
|
return /* @__PURE__ */ jsxs(DrawerTrigger, {
|
|
3062
|
+
ref: forwardRef,
|
|
2207
3063
|
className: cn("flex min-h-9 w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-1 text-base text-foreground outline-none hover:bg-accent hover:text-accent-foreground sm:min-h-8 sm:text-sm [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0", className),
|
|
2208
3064
|
"data-slot": "drawer-menu-trigger",
|
|
2209
3065
|
...props,
|
|
2210
3066
|
children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ms-auto -me-0.5 opacity-80" })]
|
|
2211
3067
|
});
|
|
2212
|
-
}
|
|
2213
|
-
|
|
3068
|
+
});
|
|
3069
|
+
DrawerMenuTrigger.displayName = "DrawerMenuTrigger";
|
|
3070
|
+
const DrawerMenuCheckboxItem = React.forwardRef((componentProps, forwardRef) => {
|
|
3071
|
+
const { className, children, checked, defaultChecked, onCheckedChange, variant = "default", disabled, render, ...props } = componentProps;
|
|
2214
3072
|
return /* @__PURE__ */ jsx(Checkbox$1.Root, {
|
|
3073
|
+
ref: forwardRef,
|
|
2215
3074
|
checked,
|
|
2216
3075
|
className: cn("grid min-h-9 w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-1 text-base text-foreground outline-none hover:bg-accent hover:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-64 sm:min-h-8 sm:text-sm [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:-mx-0.5 [&_svg]:shrink-0", variant === "switch" ? "grid-cols-[1fr_auto] gap-4 pe-1.5" : "grid-cols-[1rem_1fr] pe-4", className),
|
|
2217
3076
|
"data-slot": "drawer-menu-checkbox-item",
|
|
@@ -2246,16 +3105,22 @@ function DrawerMenuCheckboxItem({ className, children, checked, defaultChecked,
|
|
|
2246
3105
|
children
|
|
2247
3106
|
})] })
|
|
2248
3107
|
});
|
|
2249
|
-
}
|
|
2250
|
-
|
|
3108
|
+
});
|
|
3109
|
+
DrawerMenuCheckboxItem.displayName = "DrawerMenuCheckboxItem";
|
|
3110
|
+
const DrawerMenuRadioGroup = React.forwardRef((componentProps, forwardRef) => {
|
|
3111
|
+
const { className, ...props } = componentProps;
|
|
2251
3112
|
return /* @__PURE__ */ jsx(RadioGroup$1, {
|
|
3113
|
+
ref: forwardRef,
|
|
2252
3114
|
className: cn("flex flex-col", className),
|
|
2253
3115
|
"data-slot": "drawer-menu-radio-group",
|
|
2254
3116
|
...props
|
|
2255
3117
|
});
|
|
2256
|
-
}
|
|
2257
|
-
|
|
3118
|
+
});
|
|
3119
|
+
DrawerMenuRadioGroup.displayName = "DrawerMenuRadioGroup";
|
|
3120
|
+
const DrawerMenuRadioItem = React.forwardRef((componentProps, forwardRef) => {
|
|
3121
|
+
const { className, children, value, disabled, render, ...props } = componentProps;
|
|
2258
3122
|
return /* @__PURE__ */ jsxs(Radio.Root, {
|
|
3123
|
+
ref: forwardRef,
|
|
2259
3124
|
className: cn("grid min-h-9 w-full cursor-default select-none items-center gap-2 rounded-sm px-2 py-1 text-base text-foreground outline-none hover:bg-accent hover:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-64 sm:min-h-8 sm:text-sm [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:-mx-0.5 [&_svg]:shrink-0", "grid-cols-[1rem_1fr] items-center pe-4", className),
|
|
2260
3125
|
"data-slot": "drawer-menu-radio-item",
|
|
2261
3126
|
disabled,
|
|
@@ -2281,29 +3146,34 @@ function DrawerMenuRadioItem({ className, children, value, disabled, render, ...
|
|
|
2281
3146
|
children
|
|
2282
3147
|
})]
|
|
2283
3148
|
});
|
|
2284
|
-
}
|
|
3149
|
+
});
|
|
3150
|
+
DrawerMenuRadioItem.displayName = "DrawerMenuRadioItem";
|
|
2285
3151
|
|
|
2286
3152
|
//#endregion
|
|
2287
3153
|
//#region src/components/dropdown-menu.tsx
|
|
2288
|
-
function DropdownMenu(
|
|
3154
|
+
function DropdownMenu(componentProps) {
|
|
2289
3155
|
return /* @__PURE__ */ jsx(Menu.Root, {
|
|
2290
3156
|
"data-slot": "dropdown-menu",
|
|
2291
|
-
...
|
|
3157
|
+
...componentProps
|
|
2292
3158
|
});
|
|
2293
3159
|
}
|
|
2294
|
-
function DropdownMenuPortal(
|
|
3160
|
+
function DropdownMenuPortal(componentProps) {
|
|
2295
3161
|
return /* @__PURE__ */ jsx(Menu.Portal, {
|
|
2296
3162
|
"data-slot": "dropdown-menu-portal",
|
|
2297
|
-
...
|
|
3163
|
+
...componentProps
|
|
2298
3164
|
});
|
|
2299
3165
|
}
|
|
2300
|
-
|
|
3166
|
+
const DropdownMenuTrigger = React.forwardRef((componentProps, forwardRef) => {
|
|
3167
|
+
const { ...props } = componentProps;
|
|
2301
3168
|
return /* @__PURE__ */ jsx(Menu.Trigger, {
|
|
3169
|
+
ref: forwardRef,
|
|
2302
3170
|
"data-slot": "dropdown-menu-trigger",
|
|
2303
3171
|
...props
|
|
2304
3172
|
});
|
|
2305
|
-
}
|
|
2306
|
-
|
|
3173
|
+
});
|
|
3174
|
+
DropdownMenuTrigger.displayName = "DropdownMenuTrigger";
|
|
3175
|
+
const DropdownMenuContent = React.forwardRef((componentProps, forwardRef) => {
|
|
3176
|
+
const { align = "start", alignOffset = 0, side = "bottom", sideOffset = 4, className, container, ...props } = componentProps;
|
|
2307
3177
|
return /* @__PURE__ */ jsx(Menu.Portal, {
|
|
2308
3178
|
container,
|
|
2309
3179
|
children: /* @__PURE__ */ jsx(Menu.Positioner, {
|
|
@@ -2313,53 +3183,69 @@ function DropdownMenuContent({ align = "start", alignOffset = 0, side = "bottom"
|
|
|
2313
3183
|
side,
|
|
2314
3184
|
sideOffset,
|
|
2315
3185
|
children: /* @__PURE__ */ jsx(Menu.Popup, {
|
|
3186
|
+
ref: forwardRef,
|
|
2316
3187
|
"data-slot": "dropdown-menu-content",
|
|
2317
3188
|
className: cn("z-50 max-h-(--available-height) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none 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:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95", className),
|
|
2318
3189
|
...props
|
|
2319
3190
|
})
|
|
2320
3191
|
})
|
|
2321
3192
|
});
|
|
2322
|
-
}
|
|
2323
|
-
|
|
3193
|
+
});
|
|
3194
|
+
DropdownMenuContent.displayName = "DropdownMenuContent";
|
|
3195
|
+
const DropdownMenuGroup = React.forwardRef((componentProps, forwardRef) => {
|
|
3196
|
+
const { ...props } = componentProps;
|
|
2324
3197
|
return /* @__PURE__ */ jsx(Menu.Group, {
|
|
3198
|
+
ref: forwardRef,
|
|
2325
3199
|
"data-slot": "dropdown-menu-group",
|
|
2326
3200
|
...props
|
|
2327
3201
|
});
|
|
2328
|
-
}
|
|
2329
|
-
|
|
3202
|
+
});
|
|
3203
|
+
DropdownMenuGroup.displayName = "DropdownMenuGroup";
|
|
3204
|
+
const DropdownMenuLabel = React.forwardRef((componentProps, forwardRef) => {
|
|
3205
|
+
const { className, inset, ...props } = componentProps;
|
|
2330
3206
|
return /* @__PURE__ */ jsx(Menu.GroupLabel, {
|
|
3207
|
+
ref: forwardRef,
|
|
2331
3208
|
"data-slot": "dropdown-menu-label",
|
|
2332
3209
|
"data-inset": inset,
|
|
2333
3210
|
className: cn("px-2 py-1.5 text-xs font-medium text-muted-foreground data-inset:pl-8", className),
|
|
2334
3211
|
...props
|
|
2335
3212
|
});
|
|
2336
|
-
}
|
|
2337
|
-
|
|
3213
|
+
});
|
|
3214
|
+
DropdownMenuLabel.displayName = "DropdownMenuLabel";
|
|
3215
|
+
const DropdownMenuItem = React.forwardRef((componentProps, forwardRef) => {
|
|
3216
|
+
const { className, inset, variant = "default", ...props } = componentProps;
|
|
2338
3217
|
return /* @__PURE__ */ jsx(Menu.Item, {
|
|
3218
|
+
ref: forwardRef,
|
|
2339
3219
|
"data-slot": "dropdown-menu-item",
|
|
2340
3220
|
"data-inset": inset,
|
|
2341
3221
|
"data-variant": variant,
|
|
2342
3222
|
className: cn("group/dropdown-menu-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive", className),
|
|
2343
3223
|
...props
|
|
2344
3224
|
});
|
|
2345
|
-
}
|
|
2346
|
-
|
|
3225
|
+
});
|
|
3226
|
+
DropdownMenuItem.displayName = "DropdownMenuItem";
|
|
3227
|
+
function DropdownMenuSub(componentProps) {
|
|
2347
3228
|
return /* @__PURE__ */ jsx(Menu.SubmenuRoot, {
|
|
2348
3229
|
"data-slot": "dropdown-menu-sub",
|
|
2349
|
-
...
|
|
3230
|
+
...componentProps
|
|
2350
3231
|
});
|
|
2351
3232
|
}
|
|
2352
|
-
|
|
3233
|
+
const DropdownMenuSubTrigger = React.forwardRef((componentProps, forwardRef) => {
|
|
3234
|
+
const { className, inset, children, ...props } = componentProps;
|
|
2353
3235
|
return /* @__PURE__ */ jsxs(Menu.SubmenuTrigger, {
|
|
3236
|
+
ref: forwardRef,
|
|
2354
3237
|
"data-slot": "dropdown-menu-sub-trigger",
|
|
2355
3238
|
"data-inset": inset,
|
|
2356
3239
|
className: cn("flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-8 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
2357
3240
|
...props,
|
|
2358
3241
|
children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto" })]
|
|
2359
3242
|
});
|
|
2360
|
-
}
|
|
2361
|
-
|
|
3243
|
+
});
|
|
3244
|
+
DropdownMenuSubTrigger.displayName = "DropdownMenuSubTrigger";
|
|
3245
|
+
const DropdownMenuSubContent = React.forwardRef((componentProps, forwardRef) => {
|
|
3246
|
+
const { align = "start", alignOffset = -3, side = "right", sideOffset = 0, className, ...props } = componentProps;
|
|
2362
3247
|
return /* @__PURE__ */ jsx(DropdownMenuContent, {
|
|
3248
|
+
ref: forwardRef,
|
|
2363
3249
|
"data-slot": "dropdown-menu-sub-content",
|
|
2364
3250
|
className: cn("w-auto min-w-[96px] rounded-md bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 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 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", className),
|
|
2365
3251
|
align,
|
|
@@ -2368,9 +3254,12 @@ function DropdownMenuSubContent({ align = "start", alignOffset = -3, side = "rig
|
|
|
2368
3254
|
sideOffset,
|
|
2369
3255
|
...props
|
|
2370
3256
|
});
|
|
2371
|
-
}
|
|
2372
|
-
|
|
3257
|
+
});
|
|
3258
|
+
DropdownMenuSubContent.displayName = "DropdownMenuSubContent";
|
|
3259
|
+
const DropdownMenuCheckboxItem = React.forwardRef((componentProps, forwardRef) => {
|
|
3260
|
+
const { className, children, checked, inset, ...props } = componentProps;
|
|
2373
3261
|
return /* @__PURE__ */ jsxs(Menu.CheckboxItem, {
|
|
3262
|
+
ref: forwardRef,
|
|
2374
3263
|
"data-slot": "dropdown-menu-checkbox-item",
|
|
2375
3264
|
"data-inset": inset,
|
|
2376
3265
|
className: cn("relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-8 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
@@ -2382,15 +3271,21 @@ function DropdownMenuCheckboxItem({ className, children, checked, inset, ...prop
|
|
|
2382
3271
|
children: /* @__PURE__ */ jsx(Menu.CheckboxItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) })
|
|
2383
3272
|
}), children]
|
|
2384
3273
|
});
|
|
2385
|
-
}
|
|
2386
|
-
|
|
3274
|
+
});
|
|
3275
|
+
DropdownMenuCheckboxItem.displayName = "DropdownMenuCheckboxItem";
|
|
3276
|
+
const DropdownMenuRadioGroup = React.forwardRef((componentProps, forwardRef) => {
|
|
3277
|
+
const { ...props } = componentProps;
|
|
2387
3278
|
return /* @__PURE__ */ jsx(Menu.RadioGroup, {
|
|
3279
|
+
ref: forwardRef,
|
|
2388
3280
|
"data-slot": "dropdown-menu-radio-group",
|
|
2389
3281
|
...props
|
|
2390
3282
|
});
|
|
2391
|
-
}
|
|
2392
|
-
|
|
3283
|
+
});
|
|
3284
|
+
DropdownMenuRadioGroup.displayName = "DropdownMenuRadioGroup";
|
|
3285
|
+
const DropdownMenuRadioItem = React.forwardRef((componentProps, forwardRef) => {
|
|
3286
|
+
const { className, children, inset, ...props } = componentProps;
|
|
2393
3287
|
return /* @__PURE__ */ jsxs(Menu.RadioItem, {
|
|
3288
|
+
ref: forwardRef,
|
|
2394
3289
|
"data-slot": "dropdown-menu-radio-item",
|
|
2395
3290
|
"data-inset": inset,
|
|
2396
3291
|
className: cn("relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-8 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
@@ -2401,45 +3296,61 @@ function DropdownMenuRadioItem({ className, children, inset, ...props }) {
|
|
|
2401
3296
|
children: /* @__PURE__ */ jsx(Menu.RadioItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) })
|
|
2402
3297
|
}), children]
|
|
2403
3298
|
});
|
|
2404
|
-
}
|
|
2405
|
-
|
|
3299
|
+
});
|
|
3300
|
+
DropdownMenuRadioItem.displayName = "DropdownMenuRadioItem";
|
|
3301
|
+
const DropdownMenuSeparator = React.forwardRef((componentProps, forwardRef) => {
|
|
3302
|
+
const { className, ...props } = componentProps;
|
|
2406
3303
|
return /* @__PURE__ */ jsx(Menu.Separator, {
|
|
3304
|
+
ref: forwardRef,
|
|
2407
3305
|
"data-slot": "dropdown-menu-separator",
|
|
2408
3306
|
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
2409
3307
|
...props
|
|
2410
3308
|
});
|
|
2411
|
-
}
|
|
2412
|
-
|
|
3309
|
+
});
|
|
3310
|
+
DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
|
|
3311
|
+
const DropdownMenuShortcut = React.forwardRef((componentProps, forwardRef) => {
|
|
3312
|
+
const { className, ...props } = componentProps;
|
|
2413
3313
|
return /* @__PURE__ */ jsx("span", {
|
|
3314
|
+
ref: forwardRef,
|
|
2414
3315
|
"data-slot": "dropdown-menu-shortcut",
|
|
2415
3316
|
className: cn("ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground", className),
|
|
2416
3317
|
...props
|
|
2417
3318
|
});
|
|
2418
|
-
}
|
|
2419
|
-
|
|
3319
|
+
});
|
|
3320
|
+
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
3321
|
+
const DropdownMenuAddon = React.forwardRef((componentProps, forwardRef) => {
|
|
3322
|
+
const { className, ...props } = componentProps;
|
|
2420
3323
|
return /* @__PURE__ */ jsx("span", {
|
|
3324
|
+
ref: forwardRef,
|
|
2421
3325
|
"data-slot": "dropdown-menu-addon",
|
|
2422
3326
|
className: cn("ml-auto shrink-0 inline-flex items-center", className),
|
|
2423
3327
|
...props
|
|
2424
3328
|
});
|
|
2425
|
-
}
|
|
3329
|
+
});
|
|
3330
|
+
DropdownMenuAddon.displayName = "DropdownMenuAddon";
|
|
2426
3331
|
|
|
2427
3332
|
//#endregion
|
|
2428
3333
|
//#region src/components/empty.tsx
|
|
2429
|
-
|
|
3334
|
+
const Empty = React.forwardRef((componentProps, forwardRef) => {
|
|
3335
|
+
const { className, ...props } = componentProps;
|
|
2430
3336
|
return /* @__PURE__ */ jsx("div", {
|
|
3337
|
+
ref: forwardRef,
|
|
2431
3338
|
"data-slot": "empty",
|
|
2432
3339
|
className: cn("flex min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-lg p-6 text-center text-balance md:p-12", className),
|
|
2433
3340
|
...props
|
|
2434
3341
|
});
|
|
2435
|
-
}
|
|
2436
|
-
|
|
3342
|
+
});
|
|
3343
|
+
Empty.displayName = "Empty";
|
|
3344
|
+
const EmptyHeader = React.forwardRef((componentProps, forwardRef) => {
|
|
3345
|
+
const { className, ...props } = componentProps;
|
|
2437
3346
|
return /* @__PURE__ */ jsx("div", {
|
|
3347
|
+
ref: forwardRef,
|
|
2438
3348
|
"data-slot": "empty-header",
|
|
2439
3349
|
className: cn("flex max-w-sm flex-col items-center gap-2 text-center", className),
|
|
2440
3350
|
...props
|
|
2441
3351
|
});
|
|
2442
|
-
}
|
|
3352
|
+
});
|
|
3353
|
+
EmptyHeader.displayName = "EmptyHeader";
|
|
2443
3354
|
const emptyMediaVariants = cva("flex shrink-0 items-center justify-center mb-2 [&_svg]:pointer-events-none [&_svg]:shrink-0", {
|
|
2444
3355
|
variants: { variant: {
|
|
2445
3356
|
default: "bg-transparent",
|
|
@@ -2447,8 +3358,10 @@ const emptyMediaVariants = cva("flex shrink-0 items-center justify-center mb-2 [
|
|
|
2447
3358
|
} },
|
|
2448
3359
|
defaultVariants: { variant: "default" }
|
|
2449
3360
|
});
|
|
2450
|
-
|
|
3361
|
+
const EmptyMedia = React.forwardRef((componentProps, forwardRef) => {
|
|
3362
|
+
const { className, variant = "default", ...props } = componentProps;
|
|
2451
3363
|
return /* @__PURE__ */ jsx("div", {
|
|
3364
|
+
ref: forwardRef,
|
|
2452
3365
|
"data-slot": "empty-icon",
|
|
2453
3366
|
"data-variant": variant,
|
|
2454
3367
|
className: cn(emptyMediaVariants({
|
|
@@ -2457,34 +3370,44 @@ function EmptyMedia({ className, variant = "default", ...props }) {
|
|
|
2457
3370
|
})),
|
|
2458
3371
|
...props
|
|
2459
3372
|
});
|
|
2460
|
-
}
|
|
2461
|
-
|
|
3373
|
+
});
|
|
3374
|
+
EmptyMedia.displayName = "EmptyMedia";
|
|
3375
|
+
const EmptyTitle = React.forwardRef((componentProps, forwardRef) => {
|
|
3376
|
+
const { className, ...props } = componentProps;
|
|
2462
3377
|
return /* @__PURE__ */ jsx("div", {
|
|
3378
|
+
ref: forwardRef,
|
|
2463
3379
|
"data-slot": "empty-title",
|
|
2464
3380
|
className: cn("text-sm font-medium tracking-tight", className),
|
|
2465
3381
|
...props
|
|
2466
3382
|
});
|
|
2467
|
-
}
|
|
2468
|
-
|
|
3383
|
+
});
|
|
3384
|
+
EmptyTitle.displayName = "EmptyTitle";
|
|
3385
|
+
const EmptyDescription = React.forwardRef((componentProps, forwardRef) => {
|
|
3386
|
+
const { className, ...props } = componentProps;
|
|
2469
3387
|
return /* @__PURE__ */ jsx("div", {
|
|
3388
|
+
ref: forwardRef,
|
|
2470
3389
|
"data-slot": "empty-description",
|
|
2471
3390
|
className: cn("text-muted-foreground [&>a:hover]:text-primary text-sm [&>a]:underline [&>a]:underline-offset-4", className),
|
|
2472
3391
|
...props
|
|
2473
3392
|
});
|
|
2474
|
-
}
|
|
2475
|
-
|
|
3393
|
+
});
|
|
3394
|
+
EmptyDescription.displayName = "EmptyDescription";
|
|
3395
|
+
const EmptyContent = React.forwardRef((componentProps, forwardRef) => {
|
|
3396
|
+
const { className, ...props } = componentProps;
|
|
2476
3397
|
return /* @__PURE__ */ jsx("div", {
|
|
3398
|
+
ref: forwardRef,
|
|
2477
3399
|
"data-slot": "empty-content",
|
|
2478
3400
|
className: cn("flex w-full max-w-sm min-w-0 flex-col items-center gap-4 text-sm text-balance", className),
|
|
2479
3401
|
...props
|
|
2480
3402
|
});
|
|
2481
|
-
}
|
|
3403
|
+
});
|
|
3404
|
+
EmptyContent.displayName = "EmptyContent";
|
|
2482
3405
|
|
|
2483
3406
|
//#endregion
|
|
2484
3407
|
//#region src/components/dropzone.tsx
|
|
2485
|
-
const DropzoneContext = React
|
|
3408
|
+
const DropzoneContext = React.createContext(null);
|
|
2486
3409
|
function useDropzoneContext() {
|
|
2487
|
-
const ctx = React
|
|
3410
|
+
const ctx = React.useContext(DropzoneContext);
|
|
2488
3411
|
if (!ctx) throw new Error("Dropzone subcomponents must be rendered inside <Dropzone>.");
|
|
2489
3412
|
return ctx;
|
|
2490
3413
|
}
|
|
@@ -2562,17 +3485,18 @@ function validateFiles(files, options) {
|
|
|
2562
3485
|
* standard dashed-border look, or compose around any other control (textarea,
|
|
2563
3486
|
* etc.) for file-drop on an arbitrary surface.
|
|
2564
3487
|
*/
|
|
2565
|
-
const Dropzone = React
|
|
2566
|
-
const
|
|
2567
|
-
const
|
|
2568
|
-
const [
|
|
2569
|
-
const
|
|
2570
|
-
const
|
|
2571
|
-
const
|
|
3488
|
+
const Dropzone = React.forwardRef((componentProps, forwardRef) => {
|
|
3489
|
+
const { className, children, onFiles, onError, accept, multiple = false, maxFiles, maxSize, minSize, disabled = false, hoverMessage = "Drop your file here to upload", dragRejectMessage, onDragEnter, onDragLeave, onDragOver, ...props } = componentProps;
|
|
3490
|
+
const inputRef = React.useRef(null);
|
|
3491
|
+
const [isDragging, setIsDragging] = React.useState(false);
|
|
3492
|
+
const [isDragReject, setIsDragReject] = React.useState(false);
|
|
3493
|
+
const dragCounterRef = React.useRef(0);
|
|
3494
|
+
const acceptPatterns = React.useMemo(() => parseAccept(accept), [accept]);
|
|
3495
|
+
const open = React.useCallback(() => {
|
|
2572
3496
|
if (disabled) return;
|
|
2573
3497
|
inputRef.current?.click();
|
|
2574
3498
|
}, [disabled]);
|
|
2575
|
-
const ctx = React
|
|
3499
|
+
const ctx = React.useMemo(() => ({
|
|
2576
3500
|
inputRef,
|
|
2577
3501
|
disabled,
|
|
2578
3502
|
open
|
|
@@ -2633,7 +3557,7 @@ const Dropzone = React$1.forwardRef(({ className, children, onFiles, onError, ac
|
|
|
2633
3557
|
return /* @__PURE__ */ jsx(DropzoneContext.Provider, {
|
|
2634
3558
|
value: ctx,
|
|
2635
3559
|
children: /* @__PURE__ */ jsxs("div", {
|
|
2636
|
-
ref,
|
|
3560
|
+
ref: forwardRef,
|
|
2637
3561
|
"data-slot": "dropzone",
|
|
2638
3562
|
"data-state": overlayState,
|
|
2639
3563
|
"data-disabled": disabled || void 0,
|
|
@@ -2678,10 +3602,11 @@ Dropzone.displayName = "Dropzone";
|
|
|
2678
3602
|
* Space / Enter open the picker. Omit it (and use `<DropzoneTrigger>`)
|
|
2679
3603
|
* when you want file-drop on an existing surface instead.
|
|
2680
3604
|
*/
|
|
2681
|
-
const DropzoneContent = React
|
|
3605
|
+
const DropzoneContent = React.forwardRef((componentProps, forwardRef) => {
|
|
3606
|
+
const { className, error = false, onClick, onKeyDown, ...props } = componentProps;
|
|
2682
3607
|
const { open, disabled } = useDropzoneContext();
|
|
2683
3608
|
return /* @__PURE__ */ jsx("div", {
|
|
2684
|
-
ref,
|
|
3609
|
+
ref: forwardRef,
|
|
2685
3610
|
role: "button",
|
|
2686
3611
|
tabIndex: disabled ? -1 : 0,
|
|
2687
3612
|
"aria-disabled": disabled || void 0,
|
|
@@ -2706,45 +3631,57 @@ const DropzoneContent = React$1.forwardRef(({ className, error = false, onClick,
|
|
|
2706
3631
|
});
|
|
2707
3632
|
DropzoneContent.displayName = "DropzoneContent";
|
|
2708
3633
|
/** `<EmptyMedia>` with `variant="icon"` baked in. */
|
|
2709
|
-
|
|
3634
|
+
const DropzoneIcon = React.forwardRef((componentProps, forwardRef) => {
|
|
3635
|
+
const { variant = "icon", ...props } = componentProps;
|
|
2710
3636
|
return /* @__PURE__ */ jsx(EmptyMedia, {
|
|
3637
|
+
ref: forwardRef,
|
|
2711
3638
|
"data-slot": "dropzone-icon",
|
|
2712
3639
|
variant,
|
|
2713
3640
|
...props
|
|
2714
3641
|
});
|
|
2715
|
-
}
|
|
2716
|
-
|
|
3642
|
+
});
|
|
3643
|
+
DropzoneIcon.displayName = "DropzoneIcon";
|
|
3644
|
+
const DropzoneTitle = React.forwardRef((componentProps, forwardRef) => {
|
|
3645
|
+
const { className, ...props } = componentProps;
|
|
2717
3646
|
return /* @__PURE__ */ jsx(EmptyTitle, {
|
|
3647
|
+
ref: forwardRef,
|
|
2718
3648
|
"data-slot": "dropzone-title",
|
|
2719
3649
|
className: cn("text-foreground", className),
|
|
2720
3650
|
...props
|
|
2721
3651
|
});
|
|
2722
|
-
}
|
|
2723
|
-
|
|
3652
|
+
});
|
|
3653
|
+
DropzoneTitle.displayName = "DropzoneTitle";
|
|
3654
|
+
const DropzoneDescription = React.forwardRef((componentProps, forwardRef) => {
|
|
2724
3655
|
return /* @__PURE__ */ jsx(EmptyDescription, {
|
|
3656
|
+
ref: forwardRef,
|
|
2725
3657
|
"data-slot": "dropzone-description",
|
|
2726
|
-
...
|
|
3658
|
+
...componentProps
|
|
2727
3659
|
});
|
|
2728
|
-
}
|
|
2729
|
-
|
|
3660
|
+
});
|
|
3661
|
+
DropzoneDescription.displayName = "DropzoneDescription";
|
|
3662
|
+
const DropzoneActions = React.forwardRef((componentProps, forwardRef) => {
|
|
3663
|
+
const { className, ...props } = componentProps;
|
|
2730
3664
|
return /* @__PURE__ */ jsx("div", {
|
|
3665
|
+
ref: forwardRef,
|
|
2731
3666
|
"data-slot": "dropzone-actions",
|
|
2732
3667
|
className: cn("mt-2 flex items-center gap-2", className),
|
|
2733
3668
|
onClick: (event) => event.stopPropagation(),
|
|
2734
3669
|
onKeyDown: (event) => event.stopPropagation(),
|
|
2735
3670
|
...props
|
|
2736
3671
|
});
|
|
2737
|
-
}
|
|
3672
|
+
});
|
|
3673
|
+
DropzoneActions.displayName = "DropzoneActions";
|
|
2738
3674
|
/**
|
|
2739
3675
|
* Opens the file picker on click. Default-renders a DS `<Button>`; pass
|
|
2740
3676
|
* `render` (Base UI convention) to substitute another element.
|
|
2741
3677
|
*/
|
|
2742
|
-
const DropzoneTrigger = React
|
|
3678
|
+
const DropzoneTrigger = React.forwardRef((componentProps, forwardRef) => {
|
|
3679
|
+
const { render, onClick, ...props } = componentProps;
|
|
2743
3680
|
const { open, disabled } = useDropzoneContext();
|
|
2744
3681
|
return useRender({
|
|
2745
3682
|
defaultTagName: "button",
|
|
2746
3683
|
props: mergeProps({
|
|
2747
|
-
ref,
|
|
3684
|
+
ref: forwardRef,
|
|
2748
3685
|
type: "button",
|
|
2749
3686
|
"data-slot": "dropzone-trigger",
|
|
2750
3687
|
disabled,
|
|
@@ -2761,21 +3698,23 @@ DropzoneTrigger.displayName = "DropzoneTrigger";
|
|
|
2761
3698
|
|
|
2762
3699
|
//#endregion
|
|
2763
3700
|
//#region src/components/popover.tsx
|
|
2764
|
-
function Popover(
|
|
3701
|
+
function Popover(componentProps) {
|
|
3702
|
+
const { ...props } = componentProps;
|
|
2765
3703
|
return /* @__PURE__ */ jsx(Popover$1.Root, {
|
|
2766
3704
|
"data-slot": "popover",
|
|
2767
3705
|
...props
|
|
2768
3706
|
});
|
|
2769
3707
|
}
|
|
2770
|
-
const PopoverTrigger = React
|
|
3708
|
+
const PopoverTrigger = React.forwardRef((componentProps, forwardRef) => {
|
|
2771
3709
|
return /* @__PURE__ */ jsx(Popover$1.Trigger, {
|
|
2772
3710
|
"data-slot": "popover-trigger",
|
|
2773
|
-
ref,
|
|
2774
|
-
...
|
|
3711
|
+
ref: forwardRef,
|
|
3712
|
+
...componentProps
|
|
2775
3713
|
});
|
|
2776
3714
|
});
|
|
2777
3715
|
PopoverTrigger.displayName = "PopoverTrigger";
|
|
2778
|
-
|
|
3716
|
+
const PopoverContent = React.forwardRef((componentProps, forwardRef) => {
|
|
3717
|
+
const { className, align = "center", alignOffset = 0, side = "bottom", sideOffset = 4, ...props } = componentProps;
|
|
2779
3718
|
return /* @__PURE__ */ jsx(Popover$1.Portal, { children: /* @__PURE__ */ jsx(Popover$1.Positioner, {
|
|
2780
3719
|
align,
|
|
2781
3720
|
alignOffset,
|
|
@@ -2783,37 +3722,49 @@ function PopoverContent({ className, align = "center", alignOffset = 0, side = "
|
|
|
2783
3722
|
sideOffset,
|
|
2784
3723
|
className: "isolate z-50",
|
|
2785
3724
|
children: /* @__PURE__ */ jsx(Popover$1.Popup, {
|
|
3725
|
+
ref: forwardRef,
|
|
2786
3726
|
"data-slot": "popover-content",
|
|
2787
3727
|
className: cn("z-50 flex w-72 origin-(--transform-origin) flex-col gap-4 rounded-md bg-popover p-4 text-sm text-popover-foreground shadow-md 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", className),
|
|
2788
3728
|
...props
|
|
2789
3729
|
})
|
|
2790
3730
|
}) });
|
|
2791
|
-
}
|
|
2792
|
-
|
|
3731
|
+
});
|
|
3732
|
+
PopoverContent.displayName = "PopoverContent";
|
|
3733
|
+
const PopoverHeader = React.forwardRef((componentProps, forwardRef) => {
|
|
3734
|
+
const { className, ...props } = componentProps;
|
|
2793
3735
|
return /* @__PURE__ */ jsx("div", {
|
|
3736
|
+
ref: forwardRef,
|
|
2794
3737
|
"data-slot": "popover-header",
|
|
2795
3738
|
className: cn("flex flex-col gap-0.5 text-sm", className),
|
|
2796
3739
|
...props
|
|
2797
3740
|
});
|
|
2798
|
-
}
|
|
2799
|
-
|
|
3741
|
+
});
|
|
3742
|
+
PopoverHeader.displayName = "PopoverHeader";
|
|
3743
|
+
const PopoverTitle = React.forwardRef((componentProps, forwardRef) => {
|
|
3744
|
+
const { className, ...props } = componentProps;
|
|
2800
3745
|
return /* @__PURE__ */ jsx(Popover$1.Title, {
|
|
3746
|
+
ref: forwardRef,
|
|
2801
3747
|
"data-slot": "popover-title",
|
|
2802
3748
|
className: cn("font-bold", className),
|
|
2803
3749
|
...props
|
|
2804
3750
|
});
|
|
2805
|
-
}
|
|
2806
|
-
|
|
3751
|
+
});
|
|
3752
|
+
PopoverTitle.displayName = "PopoverTitle";
|
|
3753
|
+
const PopoverDescription = React.forwardRef((componentProps, forwardRef) => {
|
|
3754
|
+
const { className, ...props } = componentProps;
|
|
2807
3755
|
return /* @__PURE__ */ jsx(Popover$1.Description, {
|
|
3756
|
+
ref: forwardRef,
|
|
2808
3757
|
"data-slot": "popover-description",
|
|
2809
3758
|
className: cn("text-muted-foreground", className),
|
|
2810
3759
|
...props
|
|
2811
3760
|
});
|
|
2812
|
-
}
|
|
3761
|
+
});
|
|
3762
|
+
PopoverDescription.displayName = "PopoverDescription";
|
|
2813
3763
|
|
|
2814
3764
|
//#endregion
|
|
2815
3765
|
//#region src/components/theme-provider.tsx
|
|
2816
|
-
function ThemeProvider(
|
|
3766
|
+
function ThemeProvider(componentProps) {
|
|
3767
|
+
const { children, ...props } = componentProps;
|
|
2817
3768
|
return /* @__PURE__ */ jsx(ThemeProvider$1, {
|
|
2818
3769
|
attribute: "data-theme",
|
|
2819
3770
|
defaultTheme: "system",
|
|
@@ -2837,19 +3788,19 @@ const EmojiPickerCategories = {
|
|
|
2837
3788
|
SYMBOLS: Categories.SYMBOLS,
|
|
2838
3789
|
FLAGS: Categories.FLAGS
|
|
2839
3790
|
};
|
|
2840
|
-
const EmojiPickerContext = React
|
|
3791
|
+
const EmojiPickerContext = React.createContext(null);
|
|
2841
3792
|
function useEmojiPickerContext() {
|
|
2842
|
-
const context = React
|
|
3793
|
+
const context = React.useContext(EmojiPickerContext);
|
|
2843
3794
|
if (!context) throw new Error("EmojiPicker compound components must be used inside <EmojiPicker>");
|
|
2844
3795
|
return context;
|
|
2845
3796
|
}
|
|
2846
3797
|
function EmojiPicker({ onEmojiSelect, children }) {
|
|
2847
|
-
const [open, setOpen] = React
|
|
2848
|
-
const onSelect = React
|
|
3798
|
+
const [open, setOpen] = React.useState(false);
|
|
3799
|
+
const onSelect = React.useCallback((emoji) => {
|
|
2849
3800
|
onEmojiSelect?.(emoji);
|
|
2850
3801
|
setOpen(false);
|
|
2851
3802
|
}, [onEmojiSelect]);
|
|
2852
|
-
const contextValue = React
|
|
3803
|
+
const contextValue = React.useMemo(() => ({ onSelect }), [onSelect]);
|
|
2853
3804
|
return /* @__PURE__ */ jsx(EmojiPickerContext.Provider, {
|
|
2854
3805
|
value: contextValue,
|
|
2855
3806
|
children: /* @__PURE__ */ jsx(Popover, {
|
|
@@ -2859,22 +3810,25 @@ function EmojiPicker({ onEmojiSelect, children }) {
|
|
|
2859
3810
|
})
|
|
2860
3811
|
});
|
|
2861
3812
|
}
|
|
2862
|
-
const EmojiPickerTrigger = React
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
3813
|
+
const EmojiPickerTrigger = React.forwardRef((componentProps, forwardRef) => {
|
|
3814
|
+
const { render, children, ...props } = componentProps;
|
|
3815
|
+
return /* @__PURE__ */ jsx(PopoverTrigger, {
|
|
3816
|
+
ref: forwardRef,
|
|
3817
|
+
"aria-label": "Emoji",
|
|
3818
|
+
render: render ?? /* @__PURE__ */ jsx(Button, {
|
|
3819
|
+
variant: "outline",
|
|
3820
|
+
size: "icon"
|
|
3821
|
+
}),
|
|
3822
|
+
...props,
|
|
3823
|
+
children: children ?? /* @__PURE__ */ jsx(Smile, { "aria-hidden": "true" })
|
|
3824
|
+
});
|
|
3825
|
+
});
|
|
2872
3826
|
EmojiPickerTrigger.displayName = "EmojiPickerTrigger";
|
|
2873
3827
|
function EmojiPickerContent({ className, align = "start", searchPlaceholder, categories, width = 300, suggestedEmojisMode = SuggestionMode.RECENT, ...props }) {
|
|
2874
3828
|
const { onSelect } = useEmojiPickerContext();
|
|
2875
3829
|
const { resolvedTheme } = useTheme();
|
|
2876
3830
|
const pickerTheme = resolvedTheme === "dark" ? Theme.DARK : Theme.LIGHT;
|
|
2877
|
-
const handleClick = React
|
|
3831
|
+
const handleClick = React.useCallback((emojiData) => onSelect(emojiData.emoji), [onSelect]);
|
|
2878
3832
|
return /* @__PURE__ */ jsx(PopoverContent, {
|
|
2879
3833
|
"aria-label": "Choose an emoji",
|
|
2880
3834
|
className: cn("p-0 w-auto overflow-hidden ring-foreground/5", className),
|
|
@@ -2915,9 +3869,10 @@ const fabVariants = cva("group/fab inline-flex shrink-0 items-center justify-cen
|
|
|
2915
3869
|
size: "icon-lg"
|
|
2916
3870
|
}
|
|
2917
3871
|
});
|
|
2918
|
-
const FAB = React
|
|
3872
|
+
const FAB = React.forwardRef((componentProps, forwardRef) => {
|
|
3873
|
+
const { className, variant, size, ...props } = componentProps;
|
|
2919
3874
|
return /* @__PURE__ */ jsx(Button$1, {
|
|
2920
|
-
ref,
|
|
3875
|
+
ref: forwardRef,
|
|
2921
3876
|
"data-slot": "fab",
|
|
2922
3877
|
className: cn(fabVariants({
|
|
2923
3878
|
variant,
|
|
@@ -2931,38 +3886,50 @@ FAB.displayName = "FAB";
|
|
|
2931
3886
|
|
|
2932
3887
|
//#endregion
|
|
2933
3888
|
//#region src/components/label.tsx
|
|
2934
|
-
|
|
3889
|
+
const Label = React.forwardRef((componentProps, forwardRef) => {
|
|
3890
|
+
const { className, ...props } = componentProps;
|
|
2935
3891
|
return /* @__PURE__ */ jsx("label", {
|
|
3892
|
+
ref: forwardRef,
|
|
2936
3893
|
"data-slot": "label",
|
|
2937
3894
|
className: cn("flex items-center gap-2 text-sm leading-normal 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 peer-data-disabled:opacity-50", className),
|
|
2938
3895
|
...props
|
|
2939
3896
|
});
|
|
2940
|
-
}
|
|
3897
|
+
});
|
|
3898
|
+
Label.displayName = "Label";
|
|
2941
3899
|
|
|
2942
3900
|
//#endregion
|
|
2943
3901
|
//#region src/components/field.tsx
|
|
2944
|
-
|
|
3902
|
+
const FieldSet = React.forwardRef((componentProps, forwardRef) => {
|
|
3903
|
+
const { className, ...props } = componentProps;
|
|
2945
3904
|
return /* @__PURE__ */ jsx("fieldset", {
|
|
3905
|
+
ref: forwardRef,
|
|
2946
3906
|
"data-slot": "field-set",
|
|
2947
3907
|
className: cn("flex flex-col gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3", className),
|
|
2948
3908
|
...props
|
|
2949
3909
|
});
|
|
2950
|
-
}
|
|
2951
|
-
|
|
3910
|
+
});
|
|
3911
|
+
FieldSet.displayName = "FieldSet";
|
|
3912
|
+
const FieldLegend = React.forwardRef((componentProps, forwardRef) => {
|
|
3913
|
+
const { className, variant = "legend", ...props } = componentProps;
|
|
2952
3914
|
return /* @__PURE__ */ jsx("legend", {
|
|
3915
|
+
ref: forwardRef,
|
|
2953
3916
|
"data-slot": "field-legend",
|
|
2954
3917
|
"data-variant": variant,
|
|
2955
3918
|
className: cn("mb-1.5 font-medium leading-normal data-[variant=label]:text-sm data-[variant=legend]:text-base", className),
|
|
2956
3919
|
...props
|
|
2957
3920
|
});
|
|
2958
|
-
}
|
|
2959
|
-
|
|
3921
|
+
});
|
|
3922
|
+
FieldLegend.displayName = "FieldLegend";
|
|
3923
|
+
const FieldGroup = React.forwardRef((componentProps, forwardRef) => {
|
|
3924
|
+
const { className, ...props } = componentProps;
|
|
2960
3925
|
return /* @__PURE__ */ jsx("div", {
|
|
3926
|
+
ref: forwardRef,
|
|
2961
3927
|
"data-slot": "field-group",
|
|
2962
3928
|
className: cn("group/field-group @container/field-group flex w-full flex-col gap-6 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4", className),
|
|
2963
3929
|
...props
|
|
2964
3930
|
});
|
|
2965
|
-
}
|
|
3931
|
+
});
|
|
3932
|
+
FieldGroup.displayName = "FieldGroup";
|
|
2966
3933
|
const fieldVariants = cva("group/field flex w-full gap-2 data-[invalid=true]:text-destructive", {
|
|
2967
3934
|
variants: { orientation: {
|
|
2968
3935
|
vertical: "flex-col *:w-full [&>.sr-only]:w-auto",
|
|
@@ -2971,45 +3938,62 @@ const fieldVariants = cva("group/field flex w-full gap-2 data-[invalid=true]:tex
|
|
|
2971
3938
|
} },
|
|
2972
3939
|
defaultVariants: { orientation: "vertical" }
|
|
2973
3940
|
});
|
|
2974
|
-
|
|
3941
|
+
const Field = React.forwardRef((componentProps, forwardRef) => {
|
|
3942
|
+
const { className, orientation = "vertical", ...props } = componentProps;
|
|
2975
3943
|
return /* @__PURE__ */ jsx("div", {
|
|
3944
|
+
ref: forwardRef,
|
|
2976
3945
|
role: "group",
|
|
2977
3946
|
"data-slot": "field",
|
|
2978
3947
|
"data-orientation": orientation,
|
|
2979
3948
|
className: cn(fieldVariants({ orientation }), className),
|
|
2980
3949
|
...props
|
|
2981
3950
|
});
|
|
2982
|
-
}
|
|
2983
|
-
|
|
3951
|
+
});
|
|
3952
|
+
Field.displayName = "Field";
|
|
3953
|
+
const FieldContent = React.forwardRef((componentProps, forwardRef) => {
|
|
3954
|
+
const { className, ...props } = componentProps;
|
|
2984
3955
|
return /* @__PURE__ */ jsx("div", {
|
|
3956
|
+
ref: forwardRef,
|
|
2985
3957
|
"data-slot": "field-content",
|
|
2986
3958
|
className: cn("group/field-content flex flex-1 flex-col gap-2 leading-normal", className),
|
|
2987
3959
|
...props
|
|
2988
3960
|
});
|
|
2989
|
-
}
|
|
2990
|
-
|
|
3961
|
+
});
|
|
3962
|
+
FieldContent.displayName = "FieldContent";
|
|
3963
|
+
const FieldLabel = React.forwardRef((componentProps, forwardRef) => {
|
|
3964
|
+
const { className, ...props } = componentProps;
|
|
2991
3965
|
return /* @__PURE__ */ jsx(Label, {
|
|
3966
|
+
ref: forwardRef,
|
|
2992
3967
|
"data-slot": "field-label",
|
|
2993
3968
|
className: cn("group/field-label peer/field-label flex w-fit gap-2 leading-normal group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border *:data-[slot=field]:p-4 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10", "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col", className),
|
|
2994
3969
|
...props
|
|
2995
3970
|
});
|
|
2996
|
-
}
|
|
2997
|
-
|
|
3971
|
+
});
|
|
3972
|
+
FieldLabel.displayName = "FieldLabel";
|
|
3973
|
+
const FieldTitle = React.forwardRef((componentProps, forwardRef) => {
|
|
3974
|
+
const { className, ...props } = componentProps;
|
|
2998
3975
|
return /* @__PURE__ */ jsx("div", {
|
|
3976
|
+
ref: forwardRef,
|
|
2999
3977
|
"data-slot": "field-label",
|
|
3000
3978
|
className: cn("flex w-fit items-center gap-2 text-sm leading-normal font-medium group-data-[disabled=true]/field:opacity-50", className),
|
|
3001
3979
|
...props
|
|
3002
3980
|
});
|
|
3003
|
-
}
|
|
3004
|
-
|
|
3981
|
+
});
|
|
3982
|
+
FieldTitle.displayName = "FieldTitle";
|
|
3983
|
+
const FieldDescription = React.forwardRef((componentProps, forwardRef) => {
|
|
3984
|
+
const { className, ...props } = componentProps;
|
|
3005
3985
|
return /* @__PURE__ */ jsx("p", {
|
|
3986
|
+
ref: forwardRef,
|
|
3006
3987
|
"data-slot": "field-description",
|
|
3007
3988
|
className: cn("text-left text-sm leading-normal font-normal text-muted-foreground group-has-[[data-orientation=horizontal]]/field:text-balance [[data-variant=legend]+&]:-mt-1.5", "last:mt-0 nth-last-2:-mt-1", "[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className),
|
|
3008
3989
|
...props
|
|
3009
3990
|
});
|
|
3010
|
-
}
|
|
3011
|
-
|
|
3991
|
+
});
|
|
3992
|
+
FieldDescription.displayName = "FieldDescription";
|
|
3993
|
+
const FieldSeparator = React.forwardRef((componentProps, forwardRef) => {
|
|
3994
|
+
const { children, className, ...props } = componentProps;
|
|
3012
3995
|
return /* @__PURE__ */ jsxs("div", {
|
|
3996
|
+
ref: forwardRef,
|
|
3013
3997
|
"data-slot": "field-separator",
|
|
3014
3998
|
"data-content": !!children,
|
|
3015
3999
|
className: cn("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2", className),
|
|
@@ -3020,9 +4004,11 @@ function FieldSeparator({ children, className, ...props }) {
|
|
|
3020
4004
|
children
|
|
3021
4005
|
})]
|
|
3022
4006
|
});
|
|
3023
|
-
}
|
|
3024
|
-
|
|
3025
|
-
|
|
4007
|
+
});
|
|
4008
|
+
FieldSeparator.displayName = "FieldSeparator";
|
|
4009
|
+
const FieldError = React.forwardRef((componentProps, forwardRef) => {
|
|
4010
|
+
const { className, children, errors, ...props } = componentProps;
|
|
4011
|
+
const content = React.useMemo(() => {
|
|
3026
4012
|
if (children) return children;
|
|
3027
4013
|
if (!errors?.length) return null;
|
|
3028
4014
|
const uniqueErrors = [...new Map(errors.map((error) => [error?.message, error])).values()];
|
|
@@ -3034,13 +4020,15 @@ function FieldError({ className, children, errors, ...props }) {
|
|
|
3034
4020
|
}, [children, errors]);
|
|
3035
4021
|
if (!content) return null;
|
|
3036
4022
|
return /* @__PURE__ */ jsx("div", {
|
|
4023
|
+
ref: forwardRef,
|
|
3037
4024
|
role: "alert",
|
|
3038
4025
|
"data-slot": "field-error",
|
|
3039
4026
|
className: cn("text-sm leading-normal font-normal text-destructive", className),
|
|
3040
4027
|
...props,
|
|
3041
4028
|
children: content
|
|
3042
4029
|
});
|
|
3043
|
-
}
|
|
4030
|
+
});
|
|
4031
|
+
FieldError.displayName = "FieldError";
|
|
3044
4032
|
|
|
3045
4033
|
//#endregion
|
|
3046
4034
|
//#region src/components/gauge.tsx
|
|
@@ -3053,9 +4041,11 @@ function getSegmentState(index, value) {
|
|
|
3053
4041
|
if (distanceFromHead === 1) return "trailing";
|
|
3054
4042
|
return "filled";
|
|
3055
4043
|
}
|
|
3056
|
-
|
|
4044
|
+
const Gauge = React.forwardRef((componentProps, forwardRef) => {
|
|
4045
|
+
const { className, value, ...props } = componentProps;
|
|
3057
4046
|
const clampedValue = Math.max(0, Math.min(value, GAUGES));
|
|
3058
4047
|
return /* @__PURE__ */ jsx("div", {
|
|
4048
|
+
ref: forwardRef,
|
|
3059
4049
|
role: "meter",
|
|
3060
4050
|
"aria-valuenow": clampedValue,
|
|
3061
4051
|
"aria-valuemin": 0,
|
|
@@ -3077,28 +4067,37 @@ function Gauge({ className, value, ...props }) {
|
|
|
3077
4067
|
}, index);
|
|
3078
4068
|
})
|
|
3079
4069
|
});
|
|
3080
|
-
}
|
|
4070
|
+
});
|
|
4071
|
+
Gauge.displayName = "Gauge";
|
|
3081
4072
|
|
|
3082
4073
|
//#endregion
|
|
3083
4074
|
//#region src/components/input-otp.tsx
|
|
3084
|
-
|
|
4075
|
+
const InputOTP = React.forwardRef((componentProps, forwardRef) => {
|
|
4076
|
+
const { className, containerClassName, ...props } = componentProps;
|
|
3085
4077
|
return /* @__PURE__ */ jsx(OTPInput, {
|
|
4078
|
+
ref: forwardRef,
|
|
3086
4079
|
"data-slot": "input-otp",
|
|
3087
4080
|
containerClassName: cn("flex items-center gap-2 has-disabled:opacity-50 **:data-[slot=input-otp-slot]:h-12 **:data-[slot=input-otp-slot]:w-12 has-[input[aria-invalid=true]]:**:data-[slot=input-otp-slot]:border-destructive has-[input[aria-invalid=true]]:**:data-[slot=input-otp-slot]:data-[active=true]:ring-destructive/20 dark:has-[input[aria-invalid=true]]:**:data-[slot=input-otp-slot]:data-[active=true]:ring-destructive/40", containerClassName),
|
|
3088
4081
|
className: cn("disabled:cursor-not-allowed", className),
|
|
3089
4082
|
...props
|
|
3090
4083
|
});
|
|
3091
|
-
}
|
|
3092
|
-
|
|
4084
|
+
});
|
|
4085
|
+
InputOTP.displayName = "InputOTP";
|
|
4086
|
+
const InputOTPGroup = React.forwardRef((componentProps, forwardRef) => {
|
|
4087
|
+
const { className, ...props } = componentProps;
|
|
3093
4088
|
return /* @__PURE__ */ jsx("div", {
|
|
4089
|
+
ref: forwardRef,
|
|
3094
4090
|
"data-slot": "input-otp-group",
|
|
3095
4091
|
className: cn("flex items-center", className),
|
|
3096
4092
|
...props
|
|
3097
4093
|
});
|
|
3098
|
-
}
|
|
3099
|
-
|
|
3100
|
-
|
|
4094
|
+
});
|
|
4095
|
+
InputOTPGroup.displayName = "InputOTPGroup";
|
|
4096
|
+
const InputOTPSlot = React.forwardRef((componentProps, forwardRef) => {
|
|
4097
|
+
const { index, className, ...props } = componentProps;
|
|
4098
|
+
const { char, hasFakeCaret, isActive } = React.useContext(OTPInputContext)?.slots[index] ?? {};
|
|
3101
4099
|
return /* @__PURE__ */ jsxs("div", {
|
|
4100
|
+
ref: forwardRef,
|
|
3102
4101
|
"data-slot": "input-otp-slot",
|
|
3103
4102
|
"data-active": isActive,
|
|
3104
4103
|
className: cn("data-[active=true]:border-ring data-[active=true]:ring-ring/50 dark:bg-input/30 border-input relative flex items-center justify-center border-y border-r text-sm transition-all outline-none first:rounded-l-md first:border-l last:rounded-r-md data-[active=true]:z-10 data-[active=true]:ring-3", className),
|
|
@@ -3108,21 +4107,26 @@ function InputOTPSlot({ index, className, ...props }) {
|
|
|
3108
4107
|
children: /* @__PURE__ */ jsx("div", { className: "animate-caret-blink bg-foreground h-4 w-px duration-1000" })
|
|
3109
4108
|
})]
|
|
3110
4109
|
});
|
|
3111
|
-
}
|
|
3112
|
-
|
|
4110
|
+
});
|
|
4111
|
+
InputOTPSlot.displayName = "InputOTPSlot";
|
|
4112
|
+
const InputOTPSeparator = React.forwardRef((componentProps, forwardRef) => {
|
|
4113
|
+
const { ...props } = componentProps;
|
|
3113
4114
|
return /* @__PURE__ */ jsx("div", {
|
|
4115
|
+
ref: forwardRef,
|
|
3114
4116
|
"data-slot": "input-otp-separator",
|
|
3115
4117
|
role: "separator",
|
|
3116
4118
|
...props,
|
|
3117
4119
|
children: /* @__PURE__ */ jsx(MinusIcon, {})
|
|
3118
4120
|
});
|
|
3119
|
-
}
|
|
4121
|
+
});
|
|
4122
|
+
InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
3120
4123
|
|
|
3121
4124
|
//#endregion
|
|
3122
4125
|
//#region src/components/item.tsx
|
|
3123
|
-
const ItemGroup = React
|
|
4126
|
+
const ItemGroup = React.forwardRef((componentProps, forwardRef) => {
|
|
4127
|
+
const { className, stackedItems = false, ...props } = componentProps;
|
|
3124
4128
|
return /* @__PURE__ */ jsx("div", {
|
|
3125
|
-
ref,
|
|
4129
|
+
ref: forwardRef,
|
|
3126
4130
|
role: "list",
|
|
3127
4131
|
"data-slot": "item-group",
|
|
3128
4132
|
"data-stacked": stackedItems ? "" : void 0,
|
|
@@ -3131,14 +4135,17 @@ const ItemGroup = React$1.forwardRef(({ className, stackedItems = false, ...prop
|
|
|
3131
4135
|
});
|
|
3132
4136
|
});
|
|
3133
4137
|
ItemGroup.displayName = "ItemGroup";
|
|
3134
|
-
|
|
4138
|
+
const ItemSeparator = React.forwardRef((componentProps, forwardRef) => {
|
|
4139
|
+
const { className, ...props } = componentProps;
|
|
3135
4140
|
return /* @__PURE__ */ jsx(Separator, {
|
|
4141
|
+
ref: forwardRef,
|
|
3136
4142
|
"data-slot": "item-separator",
|
|
3137
4143
|
orientation: "horizontal",
|
|
3138
4144
|
className: cn("my-2", className),
|
|
3139
4145
|
...props
|
|
3140
4146
|
});
|
|
3141
|
-
}
|
|
4147
|
+
});
|
|
4148
|
+
ItemSeparator.displayName = "ItemSeparator";
|
|
3142
4149
|
const itemVariants = cva("group/item flex w-full flex-wrap items-center rounded-md border text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-muted", {
|
|
3143
4150
|
variants: {
|
|
3144
4151
|
variant: {
|
|
@@ -3157,7 +4164,8 @@ const itemVariants = cva("group/item flex w-full flex-wrap items-center rounded-
|
|
|
3157
4164
|
size: "default"
|
|
3158
4165
|
}
|
|
3159
4166
|
});
|
|
3160
|
-
const Item = React
|
|
4167
|
+
const Item = React.forwardRef((componentProps, forwardRef) => {
|
|
4168
|
+
const { className, variant = "default", size = "default", render, ...props } = componentProps;
|
|
3161
4169
|
return useRender({
|
|
3162
4170
|
defaultTagName: "div",
|
|
3163
4171
|
props: mergeProps({
|
|
@@ -3166,7 +4174,7 @@ const Item = React$1.forwardRef(({ className, variant = "default", size = "defau
|
|
|
3166
4174
|
size,
|
|
3167
4175
|
className
|
|
3168
4176
|
})),
|
|
3169
|
-
ref
|
|
4177
|
+
ref: forwardRef
|
|
3170
4178
|
}, props),
|
|
3171
4179
|
render,
|
|
3172
4180
|
state: {
|
|
@@ -3185,9 +4193,10 @@ const itemMediaVariants = cva("flex shrink-0 items-center justify-center gap-2 g
|
|
|
3185
4193
|
} },
|
|
3186
4194
|
defaultVariants: { variant: "default" }
|
|
3187
4195
|
});
|
|
3188
|
-
const ItemMedia = React
|
|
4196
|
+
const ItemMedia = React.forwardRef((componentProps, forwardRef) => {
|
|
4197
|
+
const { className, variant = "default", ...props } = componentProps;
|
|
3189
4198
|
return /* @__PURE__ */ jsx("div", {
|
|
3190
|
-
ref,
|
|
4199
|
+
ref: forwardRef,
|
|
3191
4200
|
"data-slot": "item-media",
|
|
3192
4201
|
"data-variant": variant,
|
|
3193
4202
|
className: cn(itemMediaVariants({
|
|
@@ -3198,54 +4207,60 @@ const ItemMedia = React$1.forwardRef(({ className, variant = "default", ...props
|
|
|
3198
4207
|
});
|
|
3199
4208
|
});
|
|
3200
4209
|
ItemMedia.displayName = "ItemMedia";
|
|
3201
|
-
const ItemContent = React
|
|
4210
|
+
const ItemContent = React.forwardRef((componentProps, forwardRef) => {
|
|
4211
|
+
const { className, ...props } = componentProps;
|
|
3202
4212
|
return /* @__PURE__ */ jsx("div", {
|
|
3203
|
-
ref,
|
|
4213
|
+
ref: forwardRef,
|
|
3204
4214
|
"data-slot": "item-content",
|
|
3205
4215
|
className: cn("flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none", className),
|
|
3206
4216
|
...props
|
|
3207
4217
|
});
|
|
3208
4218
|
});
|
|
3209
4219
|
ItemContent.displayName = "ItemContent";
|
|
3210
|
-
const ItemTitle = React
|
|
4220
|
+
const ItemTitle = React.forwardRef((componentProps, forwardRef) => {
|
|
4221
|
+
const { className, ...props } = componentProps;
|
|
3211
4222
|
return /* @__PURE__ */ jsx("div", {
|
|
3212
|
-
ref,
|
|
4223
|
+
ref: forwardRef,
|
|
3213
4224
|
"data-slot": "item-title",
|
|
3214
4225
|
className: cn("line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4", className),
|
|
3215
4226
|
...props
|
|
3216
4227
|
});
|
|
3217
4228
|
});
|
|
3218
4229
|
ItemTitle.displayName = "ItemTitle";
|
|
3219
|
-
const ItemDescription = React
|
|
4230
|
+
const ItemDescription = React.forwardRef((componentProps, forwardRef) => {
|
|
4231
|
+
const { className, ...props } = componentProps;
|
|
3220
4232
|
return /* @__PURE__ */ jsx("p", {
|
|
3221
|
-
ref,
|
|
4233
|
+
ref: forwardRef,
|
|
3222
4234
|
"data-slot": "item-description",
|
|
3223
4235
|
className: cn("line-clamp-2 text-left text-sm leading-normal font-normal text-muted-foreground group-data-[size=xs]/item:text-xs [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className),
|
|
3224
4236
|
...props
|
|
3225
4237
|
});
|
|
3226
4238
|
});
|
|
3227
4239
|
ItemDescription.displayName = "ItemDescription";
|
|
3228
|
-
const ItemActions = React
|
|
4240
|
+
const ItemActions = React.forwardRef((componentProps, forwardRef) => {
|
|
4241
|
+
const { className, ...props } = componentProps;
|
|
3229
4242
|
return /* @__PURE__ */ jsx("div", {
|
|
3230
|
-
ref,
|
|
4243
|
+
ref: forwardRef,
|
|
3231
4244
|
"data-slot": "item-actions",
|
|
3232
4245
|
className: cn("flex items-center gap-2", className),
|
|
3233
4246
|
...props
|
|
3234
4247
|
});
|
|
3235
4248
|
});
|
|
3236
4249
|
ItemActions.displayName = "ItemActions";
|
|
3237
|
-
const ItemHeader = React
|
|
4250
|
+
const ItemHeader = React.forwardRef((componentProps, forwardRef) => {
|
|
4251
|
+
const { className, ...props } = componentProps;
|
|
3238
4252
|
return /* @__PURE__ */ jsx("div", {
|
|
3239
|
-
ref,
|
|
4253
|
+
ref: forwardRef,
|
|
3240
4254
|
"data-slot": "item-header",
|
|
3241
4255
|
className: cn("flex basis-full items-center justify-between gap-2", className),
|
|
3242
4256
|
...props
|
|
3243
4257
|
});
|
|
3244
4258
|
});
|
|
3245
4259
|
ItemHeader.displayName = "ItemHeader";
|
|
3246
|
-
const ItemFooter = React
|
|
4260
|
+
const ItemFooter = React.forwardRef((componentProps, forwardRef) => {
|
|
4261
|
+
const { className, ...props } = componentProps;
|
|
3247
4262
|
return /* @__PURE__ */ jsx("div", {
|
|
3248
|
-
ref,
|
|
4263
|
+
ref: forwardRef,
|
|
3249
4264
|
"data-slot": "item-footer",
|
|
3250
4265
|
className: cn("flex basis-full items-center justify-between gap-2", className),
|
|
3251
4266
|
...props
|
|
@@ -3255,55 +4270,74 @@ ItemFooter.displayName = "ItemFooter";
|
|
|
3255
4270
|
|
|
3256
4271
|
//#endregion
|
|
3257
4272
|
//#region src/components/list.tsx
|
|
3258
|
-
const List = (
|
|
4273
|
+
const List = React.forwardRef((componentProps, forwardRef) => {
|
|
4274
|
+
const { children, className, ...props } = componentProps;
|
|
3259
4275
|
return /* @__PURE__ */ jsx("div", {
|
|
4276
|
+
ref: forwardRef,
|
|
3260
4277
|
className: cn("flex flex-col", className),
|
|
3261
4278
|
...props,
|
|
3262
4279
|
children
|
|
3263
4280
|
});
|
|
3264
|
-
};
|
|
3265
|
-
|
|
4281
|
+
});
|
|
4282
|
+
List.displayName = "List";
|
|
4283
|
+
const ListRow = React.forwardRef((componentProps, forwardRef) => {
|
|
4284
|
+
const { children, className, ...props } = componentProps;
|
|
3266
4285
|
return /* @__PURE__ */ jsx("div", {
|
|
3267
|
-
ref,
|
|
4286
|
+
ref: forwardRef,
|
|
3268
4287
|
className: cn("grid grid-flow-col gap-x-2.5 gap-y-2 p-3 relative rounded-lg", "grid-cols-[minmax(0,auto)_1fr]", className),
|
|
3269
4288
|
...props,
|
|
3270
4289
|
children
|
|
3271
4290
|
});
|
|
3272
4291
|
});
|
|
3273
|
-
|
|
4292
|
+
ListRow.displayName = "ListRow";
|
|
4293
|
+
const ListCol = React.forwardRef((componentProps, forwardRef) => {
|
|
4294
|
+
const { grow, wrap, children, className, ...props } = componentProps;
|
|
3274
4295
|
return /* @__PURE__ */ jsx("div", {
|
|
4296
|
+
ref: forwardRef,
|
|
3275
4297
|
className: cn(!wrap && "row-start-1", className),
|
|
3276
4298
|
...props,
|
|
3277
4299
|
children
|
|
3278
4300
|
});
|
|
3279
|
-
};
|
|
4301
|
+
});
|
|
4302
|
+
ListCol.displayName = "ListCol";
|
|
3280
4303
|
|
|
3281
4304
|
//#endregion
|
|
3282
4305
|
//#region src/components/pagination.tsx
|
|
3283
|
-
|
|
4306
|
+
const Pagination = React.forwardRef((componentProps, forwardRef) => {
|
|
4307
|
+
const { className, ...props } = componentProps;
|
|
3284
4308
|
return /* @__PURE__ */ jsx("nav", {
|
|
4309
|
+
ref: forwardRef,
|
|
3285
4310
|
role: "navigation",
|
|
3286
4311
|
"aria-label": "pagination",
|
|
3287
4312
|
"data-slot": "pagination",
|
|
3288
4313
|
className: cn("mx-auto flex w-full justify-center", className),
|
|
3289
4314
|
...props
|
|
3290
4315
|
});
|
|
3291
|
-
}
|
|
3292
|
-
|
|
4316
|
+
});
|
|
4317
|
+
Pagination.displayName = "Pagination";
|
|
4318
|
+
const PaginationContent = React.forwardRef((componentProps, forwardRef) => {
|
|
4319
|
+
const { className, ...props } = componentProps;
|
|
3293
4320
|
return /* @__PURE__ */ jsx("ul", {
|
|
4321
|
+
ref: forwardRef,
|
|
3294
4322
|
"data-slot": "pagination-content",
|
|
3295
4323
|
className: cn("flex items-center gap-1", className),
|
|
3296
4324
|
...props
|
|
3297
4325
|
});
|
|
3298
|
-
}
|
|
3299
|
-
|
|
4326
|
+
});
|
|
4327
|
+
PaginationContent.displayName = "PaginationContent";
|
|
4328
|
+
const PaginationItem = React.forwardRef((componentProps, forwardRef) => {
|
|
4329
|
+
const { ...props } = componentProps;
|
|
3300
4330
|
return /* @__PURE__ */ jsx("li", {
|
|
4331
|
+
ref: forwardRef,
|
|
3301
4332
|
"data-slot": "pagination-item",
|
|
3302
4333
|
...props
|
|
3303
4334
|
});
|
|
3304
|
-
}
|
|
3305
|
-
|
|
4335
|
+
});
|
|
4336
|
+
PaginationItem.displayName = "PaginationItem";
|
|
4337
|
+
const PaginationLink = React.forwardRef((componentProps, forwardRef) => {
|
|
4338
|
+
const { className, isActive, size = "icon", ...props } = componentProps;
|
|
3306
4339
|
return /* @__PURE__ */ jsx(Button, {
|
|
4340
|
+
ref: forwardRef,
|
|
3307
4341
|
variant: isActive ? "outline" : "ghost",
|
|
3308
4342
|
size,
|
|
3309
4343
|
className: cn(className),
|
|
@@ -3315,9 +4349,12 @@ function PaginationLink({ className, isActive, size = "icon", ...props }) {
|
|
|
3315
4349
|
...props
|
|
3316
4350
|
})
|
|
3317
4351
|
});
|
|
3318
|
-
}
|
|
3319
|
-
|
|
4352
|
+
});
|
|
4353
|
+
PaginationLink.displayName = "PaginationLink";
|
|
4354
|
+
const PaginationPrevious = React.forwardRef((componentProps, forwardRef) => {
|
|
4355
|
+
const { className, text = "Previous", ...props } = componentProps;
|
|
3320
4356
|
return /* @__PURE__ */ jsxs(PaginationLink, {
|
|
4357
|
+
ref: forwardRef,
|
|
3321
4358
|
"aria-label": "Go to previous page",
|
|
3322
4359
|
size: "default",
|
|
3323
4360
|
className: cn("pl-2!", className),
|
|
@@ -3327,9 +4364,12 @@ function PaginationPrevious({ className, text = "Previous", ...props }) {
|
|
|
3327
4364
|
children: text
|
|
3328
4365
|
})]
|
|
3329
4366
|
});
|
|
3330
|
-
}
|
|
3331
|
-
|
|
4367
|
+
});
|
|
4368
|
+
PaginationPrevious.displayName = "PaginationPrevious";
|
|
4369
|
+
const PaginationNext = React.forwardRef((componentProps, forwardRef) => {
|
|
4370
|
+
const { className, text = "Next", ...props } = componentProps;
|
|
3332
4371
|
return /* @__PURE__ */ jsxs(PaginationLink, {
|
|
4372
|
+
ref: forwardRef,
|
|
3333
4373
|
"aria-label": "Go to next page",
|
|
3334
4374
|
size: "default",
|
|
3335
4375
|
className: cn("pr-2!", className),
|
|
@@ -3339,9 +4379,12 @@ function PaginationNext({ className, text = "Next", ...props }) {
|
|
|
3339
4379
|
children: text
|
|
3340
4380
|
}), /* @__PURE__ */ jsx(ChevronRightIcon, { "data-icon": "inline-end" })]
|
|
3341
4381
|
});
|
|
3342
|
-
}
|
|
3343
|
-
|
|
4382
|
+
});
|
|
4383
|
+
PaginationNext.displayName = "PaginationNext";
|
|
4384
|
+
const PaginationEllipsis = React.forwardRef((componentProps, forwardRef) => {
|
|
4385
|
+
const { className, ...props } = componentProps;
|
|
3344
4386
|
return /* @__PURE__ */ jsxs("span", {
|
|
4387
|
+
ref: forwardRef,
|
|
3345
4388
|
"aria-hidden": true,
|
|
3346
4389
|
"data-slot": "pagination-ellipsis",
|
|
3347
4390
|
className: cn("flex size-9 items-center justify-center [&_svg:not([class*='size-'])]:size-4", className),
|
|
@@ -3351,59 +4394,80 @@ function PaginationEllipsis({ className, ...props }) {
|
|
|
3351
4394
|
children: "More pages"
|
|
3352
4395
|
})]
|
|
3353
4396
|
});
|
|
3354
|
-
}
|
|
4397
|
+
});
|
|
4398
|
+
PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
3355
4399
|
|
|
3356
4400
|
//#endregion
|
|
3357
4401
|
//#region src/components/progress.tsx
|
|
3358
|
-
|
|
4402
|
+
const Progress = React.forwardRef((componentProps, forwardRef) => {
|
|
4403
|
+
const { className, children, value, ...props } = componentProps;
|
|
3359
4404
|
return /* @__PURE__ */ jsxs(Progress$1.Root, {
|
|
4405
|
+
ref: forwardRef,
|
|
3360
4406
|
value,
|
|
3361
4407
|
"data-slot": "progress",
|
|
3362
4408
|
className: cn("flex flex-wrap gap-3", className),
|
|
3363
4409
|
...props,
|
|
3364
4410
|
children: [children, /* @__PURE__ */ jsx(ProgressTrack, { children: /* @__PURE__ */ jsx(ProgressIndicator, {}) })]
|
|
3365
4411
|
});
|
|
3366
|
-
}
|
|
3367
|
-
|
|
4412
|
+
});
|
|
4413
|
+
Progress.displayName = "Progress";
|
|
4414
|
+
const ProgressTrack = React.forwardRef((componentProps, forwardRef) => {
|
|
4415
|
+
const { className, ...props } = componentProps;
|
|
3368
4416
|
return /* @__PURE__ */ jsx(Progress$1.Track, {
|
|
4417
|
+
ref: forwardRef,
|
|
3369
4418
|
className: cn("relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted", className),
|
|
3370
4419
|
"data-slot": "progress-track",
|
|
3371
4420
|
...props
|
|
3372
4421
|
});
|
|
3373
|
-
}
|
|
3374
|
-
|
|
4422
|
+
});
|
|
4423
|
+
ProgressTrack.displayName = "ProgressTrack";
|
|
4424
|
+
const ProgressIndicator = React.forwardRef((componentProps, forwardRef) => {
|
|
4425
|
+
const { className, ...props } = componentProps;
|
|
3375
4426
|
return /* @__PURE__ */ jsx(Progress$1.Indicator, {
|
|
4427
|
+
ref: forwardRef,
|
|
3376
4428
|
"data-slot": "progress-indicator",
|
|
3377
4429
|
className: cn("h-full bg-primary transition-all", className),
|
|
3378
4430
|
...props
|
|
3379
4431
|
});
|
|
3380
|
-
}
|
|
3381
|
-
|
|
4432
|
+
});
|
|
4433
|
+
ProgressIndicator.displayName = "ProgressIndicator";
|
|
4434
|
+
const ProgressLabel = React.forwardRef((componentProps, forwardRef) => {
|
|
4435
|
+
const { className, ...props } = componentProps;
|
|
3382
4436
|
return /* @__PURE__ */ jsx(Progress$1.Label, {
|
|
4437
|
+
ref: forwardRef,
|
|
3383
4438
|
className: cn("text-sm font-medium", className),
|
|
3384
4439
|
"data-slot": "progress-label",
|
|
3385
4440
|
...props
|
|
3386
4441
|
});
|
|
3387
|
-
}
|
|
3388
|
-
|
|
4442
|
+
});
|
|
4443
|
+
ProgressLabel.displayName = "ProgressLabel";
|
|
4444
|
+
const ProgressValue = React.forwardRef((componentProps, forwardRef) => {
|
|
4445
|
+
const { className, ...props } = componentProps;
|
|
3389
4446
|
return /* @__PURE__ */ jsx(Progress$1.Value, {
|
|
4447
|
+
ref: forwardRef,
|
|
3390
4448
|
className: cn("ml-auto text-sm text-muted-foreground tabular-nums", className),
|
|
3391
4449
|
"data-slot": "progress-value",
|
|
3392
4450
|
...props
|
|
3393
4451
|
});
|
|
3394
|
-
}
|
|
4452
|
+
});
|
|
4453
|
+
ProgressValue.displayName = "ProgressValue";
|
|
3395
4454
|
|
|
3396
4455
|
//#endregion
|
|
3397
4456
|
//#region src/components/radio-group.tsx
|
|
3398
|
-
|
|
4457
|
+
const RadioGroup = React.forwardRef((componentProps, forwardRef) => {
|
|
4458
|
+
const { className, ...props } = componentProps;
|
|
3399
4459
|
return /* @__PURE__ */ jsx(RadioGroup$1, {
|
|
4460
|
+
ref: forwardRef,
|
|
3400
4461
|
"data-slot": "radio-group",
|
|
3401
4462
|
className: cn("grid w-full gap-3", className),
|
|
3402
4463
|
...props
|
|
3403
4464
|
});
|
|
3404
|
-
}
|
|
3405
|
-
|
|
4465
|
+
});
|
|
4466
|
+
RadioGroup.displayName = "RadioGroup";
|
|
4467
|
+
const RadioGroupItem = React.forwardRef((componentProps, forwardRef) => {
|
|
4468
|
+
const { className, ...props } = componentProps;
|
|
3406
4469
|
return /* @__PURE__ */ jsx(Radio.Root, {
|
|
4470
|
+
ref: forwardRef,
|
|
3407
4471
|
"data-slot": "radio-group-item",
|
|
3408
4472
|
className: cn("group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none transition-[color,box-shadow,opacity] active:opacity-60 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:opacity-50 aria-invalid:border-destructive focus-visible:aria-invalid:ring-3 focus-visible:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:focus-visible:aria-invalid:ring-destructive/40 data-checked:border-primary aria-invalid:data-checked:border-destructive", className),
|
|
3409
4473
|
...props,
|
|
@@ -3413,7 +4477,8 @@ function RadioGroupItem({ className, ...props }) {
|
|
|
3413
4477
|
children: /* @__PURE__ */ jsx("span", { className: "size-2 rounded-full bg-primary group-aria-invalid/radio-group-item:bg-destructive" })
|
|
3414
4478
|
})
|
|
3415
4479
|
});
|
|
3416
|
-
}
|
|
4480
|
+
});
|
|
4481
|
+
RadioGroupItem.displayName = "RadioGroupItem";
|
|
3417
4482
|
|
|
3418
4483
|
//#endregion
|
|
3419
4484
|
//#region src/components/select.tsx
|
|
@@ -3425,30 +4490,38 @@ const selectTriggerVariants = cva("flex w-fit items-center justify-between round
|
|
|
3425
4490
|
defaultVariants: { size: "default" }
|
|
3426
4491
|
});
|
|
3427
4492
|
const Select = Select$1.Root;
|
|
3428
|
-
|
|
4493
|
+
const SelectGroup = React.forwardRef((componentProps, forwardRef) => {
|
|
4494
|
+
const { className, ...props } = componentProps;
|
|
3429
4495
|
return /* @__PURE__ */ jsx(Select$1.Group, {
|
|
4496
|
+
ref: forwardRef,
|
|
3430
4497
|
"data-slot": "select-group",
|
|
3431
4498
|
className: cn("scroll-my-1", className),
|
|
3432
4499
|
...props
|
|
3433
4500
|
});
|
|
3434
|
-
}
|
|
3435
|
-
|
|
4501
|
+
});
|
|
4502
|
+
SelectGroup.displayName = "SelectGroup";
|
|
4503
|
+
function SelectValue(componentProps) {
|
|
4504
|
+
const { className, ...props } = componentProps;
|
|
3436
4505
|
return /* @__PURE__ */ jsx(Select$1.Value, {
|
|
3437
4506
|
"data-slot": "select-value",
|
|
3438
4507
|
className: cn("flex flex-1 text-left", className),
|
|
3439
4508
|
...props
|
|
3440
4509
|
});
|
|
3441
4510
|
}
|
|
3442
|
-
|
|
4511
|
+
const SelectTrigger = React.forwardRef((componentProps, forwardRef) => {
|
|
4512
|
+
const { className, size = "default", children, ...props } = componentProps;
|
|
3443
4513
|
return /* @__PURE__ */ jsxs(Select$1.Trigger, {
|
|
4514
|
+
ref: forwardRef,
|
|
3444
4515
|
"data-slot": "select-trigger",
|
|
3445
4516
|
"data-size": size,
|
|
3446
4517
|
className: cn(selectTriggerVariants({ size }), className),
|
|
3447
4518
|
...props,
|
|
3448
4519
|
children: [children, /* @__PURE__ */ jsx(Select$1.Icon, { render: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "pointer-events-none size-4 text-muted-foreground" }) })]
|
|
3449
4520
|
});
|
|
3450
|
-
}
|
|
3451
|
-
|
|
4521
|
+
});
|
|
4522
|
+
SelectTrigger.displayName = "SelectTrigger";
|
|
4523
|
+
const SelectContent = React.forwardRef((componentProps, forwardRef) => {
|
|
4524
|
+
const { className, children, side = "bottom", sideOffset = 4, align = "start", alignOffset = 0, alignItemWithTrigger = false, ...props } = componentProps;
|
|
3452
4525
|
return /* @__PURE__ */ jsx(Select$1.Portal, { children: /* @__PURE__ */ jsx(Select$1.Positioner, {
|
|
3453
4526
|
side,
|
|
3454
4527
|
sideOffset,
|
|
@@ -3457,9 +4530,10 @@ function SelectContent({ className, children, side = "bottom", sideOffset = 4, a
|
|
|
3457
4530
|
alignItemWithTrigger,
|
|
3458
4531
|
className: "isolate z-50",
|
|
3459
4532
|
children: /* @__PURE__ */ jsxs(Select$1.Popup, {
|
|
4533
|
+
ref: forwardRef,
|
|
3460
4534
|
"data-slot": "select-content",
|
|
3461
4535
|
"data-align-trigger": alignItemWithTrigger,
|
|
3462
|
-
className: cn("relative isolate z-50 max-h-(--available-height) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md p-1 bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none 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", className),
|
|
4536
|
+
className: cn("relative isolate z-50 max-h-(--available-height) min-w-36 min-w-(--anchor-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md p-1 bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none 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", className),
|
|
3463
4537
|
...props,
|
|
3464
4538
|
children: [
|
|
3465
4539
|
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
@@ -3468,16 +4542,22 @@ function SelectContent({ className, children, side = "bottom", sideOffset = 4, a
|
|
|
3468
4542
|
]
|
|
3469
4543
|
})
|
|
3470
4544
|
}) });
|
|
3471
|
-
}
|
|
3472
|
-
|
|
4545
|
+
});
|
|
4546
|
+
SelectContent.displayName = "SelectContent";
|
|
4547
|
+
const SelectLabel = React.forwardRef((componentProps, forwardRef) => {
|
|
4548
|
+
const { className, ...props } = componentProps;
|
|
3473
4549
|
return /* @__PURE__ */ jsx(Select$1.GroupLabel, {
|
|
4550
|
+
ref: forwardRef,
|
|
3474
4551
|
"data-slot": "select-label",
|
|
3475
4552
|
className: cn("p-2 text-xs text-muted-foreground", className),
|
|
3476
4553
|
...props
|
|
3477
4554
|
});
|
|
3478
|
-
}
|
|
3479
|
-
|
|
4555
|
+
});
|
|
4556
|
+
SelectLabel.displayName = "SelectLabel";
|
|
4557
|
+
const SelectItem = React.forwardRef((componentProps, forwardRef) => {
|
|
4558
|
+
const { className, children, ...props } = componentProps;
|
|
3480
4559
|
return /* @__PURE__ */ jsxs(Select$1.Item, {
|
|
4560
|
+
ref: forwardRef,
|
|
3481
4561
|
"data-slot": "select-item",
|
|
3482
4562
|
className: cn("relative flex w-full cursor-default items-center gap-2 rounded-md p-2 pr-8 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:cursor-not-allowed data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className),
|
|
3483
4563
|
...props,
|
|
@@ -3490,70 +4570,89 @@ function SelectItem({ className, children, ...props }) {
|
|
|
3490
4570
|
children: /* @__PURE__ */ jsx(CheckIcon, { className: "pointer-events-none" })
|
|
3491
4571
|
})]
|
|
3492
4572
|
});
|
|
3493
|
-
}
|
|
3494
|
-
|
|
4573
|
+
});
|
|
4574
|
+
SelectItem.displayName = "SelectItem";
|
|
4575
|
+
const SelectSeparator = React.forwardRef((componentProps, forwardRef) => {
|
|
4576
|
+
const { className, ...props } = componentProps;
|
|
3495
4577
|
return /* @__PURE__ */ jsx(Select$1.Separator, {
|
|
4578
|
+
ref: forwardRef,
|
|
3496
4579
|
"data-slot": "select-separator",
|
|
3497
4580
|
className: cn("pointer-events-none -mx-1 my-1 h-px bg-border", className),
|
|
3498
4581
|
...props
|
|
3499
4582
|
});
|
|
3500
|
-
}
|
|
3501
|
-
|
|
4583
|
+
});
|
|
4584
|
+
SelectSeparator.displayName = "SelectSeparator";
|
|
4585
|
+
const SelectScrollUpButton = React.forwardRef((componentProps, forwardRef) => {
|
|
4586
|
+
const { className, ...props } = componentProps;
|
|
3502
4587
|
return /* @__PURE__ */ jsx(Select$1.ScrollUpArrow, {
|
|
4588
|
+
ref: forwardRef,
|
|
3503
4589
|
"data-slot": "select-scroll-up-button",
|
|
3504
4590
|
className: cn("top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", className),
|
|
3505
4591
|
...props,
|
|
3506
4592
|
children: /* @__PURE__ */ jsx(ChevronUpIcon, {})
|
|
3507
4593
|
});
|
|
3508
|
-
}
|
|
3509
|
-
|
|
4594
|
+
});
|
|
4595
|
+
SelectScrollUpButton.displayName = "SelectScrollUpButton";
|
|
4596
|
+
const SelectScrollDownButton = React.forwardRef((componentProps, forwardRef) => {
|
|
4597
|
+
const { className, ...props } = componentProps;
|
|
3510
4598
|
return /* @__PURE__ */ jsx(Select$1.ScrollDownArrow, {
|
|
4599
|
+
ref: forwardRef,
|
|
3511
4600
|
"data-slot": "select-scroll-down-button",
|
|
3512
4601
|
className: cn("bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", className),
|
|
3513
4602
|
...props,
|
|
3514
4603
|
children: /* @__PURE__ */ jsx(ChevronDownIcon, {})
|
|
3515
4604
|
});
|
|
3516
|
-
}
|
|
4605
|
+
});
|
|
4606
|
+
SelectScrollDownButton.displayName = "SelectScrollDownButton";
|
|
3517
4607
|
|
|
3518
4608
|
//#endregion
|
|
3519
4609
|
//#region src/components/sheet.tsx
|
|
3520
|
-
function Sheet(
|
|
4610
|
+
function Sheet(componentProps) {
|
|
3521
4611
|
return /* @__PURE__ */ jsx(Dialog$1.Root, {
|
|
3522
4612
|
"data-slot": "sheet",
|
|
3523
|
-
...
|
|
4613
|
+
...componentProps
|
|
3524
4614
|
});
|
|
3525
4615
|
}
|
|
3526
|
-
|
|
4616
|
+
const SheetTrigger = React.forwardRef((componentProps, forwardRef) => {
|
|
4617
|
+
const { ...props } = componentProps;
|
|
3527
4618
|
return /* @__PURE__ */ jsx(Dialog$1.Trigger, {
|
|
4619
|
+
ref: forwardRef,
|
|
3528
4620
|
"data-slot": "sheet-trigger",
|
|
3529
4621
|
...props
|
|
3530
4622
|
});
|
|
3531
|
-
}
|
|
3532
|
-
|
|
4623
|
+
});
|
|
4624
|
+
SheetTrigger.displayName = "SheetTrigger";
|
|
4625
|
+
const SheetClose = React.forwardRef((componentProps, forwardRef) => {
|
|
4626
|
+
const { ...props } = componentProps;
|
|
3533
4627
|
return /* @__PURE__ */ jsx(Dialog$1.Close, {
|
|
4628
|
+
ref: forwardRef,
|
|
3534
4629
|
"data-slot": "sheet-close",
|
|
3535
4630
|
...props
|
|
3536
4631
|
});
|
|
3537
|
-
}
|
|
3538
|
-
|
|
4632
|
+
});
|
|
4633
|
+
SheetClose.displayName = "SheetClose";
|
|
4634
|
+
function SheetPortal(componentProps) {
|
|
3539
4635
|
return /* @__PURE__ */ jsx(Dialog$1.Portal, {
|
|
3540
4636
|
"data-slot": "sheet-portal",
|
|
3541
|
-
...
|
|
4637
|
+
...componentProps
|
|
3542
4638
|
});
|
|
3543
4639
|
}
|
|
3544
|
-
const SheetOverlay = React
|
|
4640
|
+
const SheetOverlay = React.forwardRef((componentProps, forwardRef) => {
|
|
4641
|
+
const { className, ...props } = componentProps;
|
|
3545
4642
|
return /* @__PURE__ */ jsx(Dialog$1.Backdrop, {
|
|
3546
4643
|
"data-slot": "sheet-overlay",
|
|
3547
4644
|
className: cn("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", className),
|
|
3548
4645
|
...props,
|
|
3549
|
-
ref
|
|
4646
|
+
ref: forwardRef
|
|
3550
4647
|
});
|
|
3551
4648
|
});
|
|
3552
4649
|
SheetOverlay.displayName = "SheetOverlay";
|
|
3553
|
-
|
|
4650
|
+
const SheetContent = React.forwardRef((componentProps, forwardRef) => {
|
|
4651
|
+
const { className, children, side = "right", showCloseButton = true, container, ...props } = componentProps;
|
|
3554
4652
|
return /* @__PURE__ */ jsxs(SheetPortal, {
|
|
3555
4653
|
container,
|
|
3556
4654
|
children: [/* @__PURE__ */ jsx(SheetOverlay, {}), /* @__PURE__ */ jsxs(Dialog$1.Popup, {
|
|
4655
|
+
ref: forwardRef,
|
|
3557
4656
|
"data-slot": "sheet-content",
|
|
3558
4657
|
"data-side": side,
|
|
3559
4658
|
className: cn("fixed z-50 flex flex-col gap-4 bg-background bg-clip-padding text-sm 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", className),
|
|
@@ -3572,68 +4671,77 @@ function SheetContent({ className, children, side = "right", showCloseButton = t
|
|
|
3572
4671
|
})]
|
|
3573
4672
|
})]
|
|
3574
4673
|
});
|
|
3575
|
-
}
|
|
3576
|
-
|
|
4674
|
+
});
|
|
4675
|
+
SheetContent.displayName = "SheetContent";
|
|
4676
|
+
const SheetHeader = React.forwardRef((componentProps, forwardRef) => {
|
|
4677
|
+
const { className, ...props } = componentProps;
|
|
3577
4678
|
return /* @__PURE__ */ jsx("div", {
|
|
4679
|
+
ref: forwardRef,
|
|
3578
4680
|
"data-slot": "sheet-header",
|
|
3579
4681
|
className: cn("flex flex-col gap-1.5 p-4", className),
|
|
3580
4682
|
...props
|
|
3581
4683
|
});
|
|
3582
|
-
}
|
|
3583
|
-
|
|
4684
|
+
});
|
|
4685
|
+
SheetHeader.displayName = "SheetHeader";
|
|
4686
|
+
const SheetFooter = React.forwardRef((componentProps, forwardRef) => {
|
|
4687
|
+
const { className, ...props } = componentProps;
|
|
3584
4688
|
return /* @__PURE__ */ jsx("div", {
|
|
4689
|
+
ref: forwardRef,
|
|
3585
4690
|
"data-slot": "sheet-footer",
|
|
3586
4691
|
className: cn("mt-auto flex flex-col gap-2 p-4", className),
|
|
3587
4692
|
...props
|
|
3588
4693
|
});
|
|
3589
|
-
}
|
|
3590
|
-
|
|
4694
|
+
});
|
|
4695
|
+
SheetFooter.displayName = "SheetFooter";
|
|
4696
|
+
const SheetTitle = React.forwardRef((componentProps, forwardRef) => {
|
|
4697
|
+
const { className, ...props } = componentProps;
|
|
3591
4698
|
return /* @__PURE__ */ jsx(Dialog$1.Title, {
|
|
4699
|
+
ref: forwardRef,
|
|
3592
4700
|
"data-slot": "sheet-title",
|
|
3593
4701
|
className: cn("font-medium text-foreground", className),
|
|
3594
4702
|
...props
|
|
3595
4703
|
});
|
|
3596
|
-
}
|
|
3597
|
-
|
|
4704
|
+
});
|
|
4705
|
+
SheetTitle.displayName = "SheetTitle";
|
|
4706
|
+
const SheetDescription = React.forwardRef((componentProps, forwardRef) => {
|
|
4707
|
+
const { className, ...props } = componentProps;
|
|
3598
4708
|
return /* @__PURE__ */ jsx(Dialog$1.Description, {
|
|
4709
|
+
ref: forwardRef,
|
|
3599
4710
|
"data-slot": "sheet-description",
|
|
3600
4711
|
className: cn("text-sm text-muted-foreground", className),
|
|
3601
4712
|
...props
|
|
3602
4713
|
});
|
|
3603
|
-
}
|
|
3604
|
-
|
|
3605
|
-
//#endregion
|
|
3606
|
-
//#region src/components/skeleton.tsx
|
|
3607
|
-
function Skeleton({ className, ...props }) {
|
|
3608
|
-
return /* @__PURE__ */ jsx("div", {
|
|
3609
|
-
"data-slot": "skeleton",
|
|
3610
|
-
className: cn("animate-pulse rounded-md bg-muted", className),
|
|
3611
|
-
...props
|
|
3612
|
-
});
|
|
3613
|
-
}
|
|
4714
|
+
});
|
|
4715
|
+
SheetDescription.displayName = "SheetDescription";
|
|
3614
4716
|
|
|
3615
4717
|
//#endregion
|
|
3616
4718
|
//#region src/components/tooltip.tsx
|
|
3617
|
-
function TooltipProvider(
|
|
4719
|
+
function TooltipProvider(componentProps) {
|
|
4720
|
+
const { delay = 0, ...props } = componentProps;
|
|
3618
4721
|
return /* @__PURE__ */ jsx(Tooltip$1.Provider, {
|
|
3619
4722
|
"data-slot": "tooltip-provider",
|
|
3620
4723
|
delay,
|
|
3621
4724
|
...props
|
|
3622
4725
|
});
|
|
3623
4726
|
}
|
|
3624
|
-
function Tooltip(
|
|
4727
|
+
function Tooltip(componentProps) {
|
|
4728
|
+
const { ...props } = componentProps;
|
|
3625
4729
|
return /* @__PURE__ */ jsx(Tooltip$1.Root, {
|
|
3626
4730
|
"data-slot": "tooltip",
|
|
3627
4731
|
...props
|
|
3628
4732
|
});
|
|
3629
4733
|
}
|
|
3630
|
-
|
|
4734
|
+
const TooltipTrigger = React.forwardRef((componentProps, forwardRef) => {
|
|
4735
|
+
const { ...props } = componentProps;
|
|
3631
4736
|
return /* @__PURE__ */ jsx(Tooltip$1.Trigger, {
|
|
4737
|
+
ref: forwardRef,
|
|
3632
4738
|
"data-slot": "tooltip-trigger",
|
|
3633
4739
|
...props
|
|
3634
4740
|
});
|
|
3635
|
-
}
|
|
3636
|
-
|
|
4741
|
+
});
|
|
4742
|
+
TooltipTrigger.displayName = "TooltipTrigger";
|
|
4743
|
+
const TooltipContent = React.forwardRef((componentProps, forwardRef) => {
|
|
4744
|
+
const { className, side = "top", sideOffset = 4, align = "center", alignOffset = 0, children, ...props } = componentProps;
|
|
3637
4745
|
return /* @__PURE__ */ jsx(Tooltip$1.Portal, { children: /* @__PURE__ */ jsx(Tooltip$1.Positioner, {
|
|
3638
4746
|
align,
|
|
3639
4747
|
alignOffset,
|
|
@@ -3641,7 +4749,7 @@ const TooltipContent = React$1.forwardRef(({ className, side = "top", sideOffset
|
|
|
3641
4749
|
sideOffset,
|
|
3642
4750
|
className: "isolate z-50",
|
|
3643
4751
|
children: /* @__PURE__ */ jsxs(Tooltip$1.Popup, {
|
|
3644
|
-
ref,
|
|
4752
|
+
ref: forwardRef,
|
|
3645
4753
|
"data-slot": "tooltip-content",
|
|
3646
4754
|
className: cn("z-50 inline-flex w-fit max-w-sm origin-(--transform-origin) items-center gap-2 rounded-md bg-accent-foreground p-2 text-sm font-medium text-primary-foreground has-data-[slot=kbd]:pr-1.5 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-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 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", className),
|
|
3647
4755
|
...props,
|
|
@@ -3655,8 +4763,8 @@ TooltipContent.displayName = "TooltipContent";
|
|
|
3655
4763
|
//#region src/hooks/use-mobile.ts
|
|
3656
4764
|
const MOBILE_BREAKPOINT = 768;
|
|
3657
4765
|
function useIsMobile() {
|
|
3658
|
-
const [isMobile, setIsMobile] = React
|
|
3659
|
-
React
|
|
4766
|
+
const [isMobile, setIsMobile] = React.useState(void 0);
|
|
4767
|
+
React.useEffect(() => {
|
|
3660
4768
|
const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`);
|
|
3661
4769
|
const onChange = () => {
|
|
3662
4770
|
setIsMobile(window.innerWidth < MOBILE_BREAKPOINT);
|
|
@@ -3676,31 +4784,32 @@ const SIDEBAR_WIDTH = "16rem";
|
|
|
3676
4784
|
const SIDEBAR_WIDTH_MOBILE = "18rem";
|
|
3677
4785
|
const SIDEBAR_WIDTH_ICON = "3rem";
|
|
3678
4786
|
const SIDEBAR_KEYBOARD_SHORTCUT = "b";
|
|
3679
|
-
const SidebarContext = React
|
|
4787
|
+
const SidebarContext = React.createContext(null);
|
|
3680
4788
|
function useSidebar() {
|
|
3681
|
-
const context = React
|
|
4789
|
+
const context = React.useContext(SidebarContext);
|
|
3682
4790
|
if (!context) throw new Error("useSidebar must be used within a SidebarProvider.");
|
|
3683
4791
|
return context;
|
|
3684
4792
|
}
|
|
3685
|
-
|
|
4793
|
+
const SidebarProvider = React.forwardRef((componentProps, forwardRef) => {
|
|
4794
|
+
const { defaultOpen = true, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props } = componentProps;
|
|
3686
4795
|
const isMobile = useIsMobile();
|
|
3687
|
-
const [openMobile, setOpenMobile] = React
|
|
3688
|
-
const [_open, _setOpen] = React
|
|
4796
|
+
const [openMobile, setOpenMobile] = React.useState(false);
|
|
4797
|
+
const [_open, _setOpen] = React.useState(defaultOpen);
|
|
3689
4798
|
const open = openProp ?? _open;
|
|
3690
|
-
const setOpen = React
|
|
4799
|
+
const setOpen = React.useCallback((value) => {
|
|
3691
4800
|
const openState = typeof value === "function" ? value(open) : value;
|
|
3692
4801
|
if (setOpenProp) setOpenProp(openState);
|
|
3693
4802
|
else _setOpen(openState);
|
|
3694
4803
|
document.cookie = `${SIDEBAR_COOKIE_NAME}=${openState}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`;
|
|
3695
4804
|
}, [setOpenProp, open]);
|
|
3696
|
-
const toggleSidebar = React
|
|
4805
|
+
const toggleSidebar = React.useCallback(() => {
|
|
3697
4806
|
return isMobile ? setOpenMobile((open$1) => !open$1) : setOpen((open$1) => !open$1);
|
|
3698
4807
|
}, [
|
|
3699
4808
|
isMobile,
|
|
3700
4809
|
setOpen,
|
|
3701
4810
|
setOpenMobile
|
|
3702
4811
|
]);
|
|
3703
|
-
React
|
|
4812
|
+
React.useEffect(() => {
|
|
3704
4813
|
const handleKeyDown = (event) => {
|
|
3705
4814
|
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
3706
4815
|
event.preventDefault();
|
|
@@ -3711,7 +4820,7 @@ function SidebarProvider({ defaultOpen = true, open: openProp, onOpenChange: set
|
|
|
3711
4820
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
3712
4821
|
}, [toggleSidebar]);
|
|
3713
4822
|
const state = open ? "expanded" : "collapsed";
|
|
3714
|
-
const contextValue = React
|
|
4823
|
+
const contextValue = React.useMemo(() => ({
|
|
3715
4824
|
state,
|
|
3716
4825
|
open,
|
|
3717
4826
|
setOpen,
|
|
@@ -3731,6 +4840,7 @@ function SidebarProvider({ defaultOpen = true, open: openProp, onOpenChange: set
|
|
|
3731
4840
|
return /* @__PURE__ */ jsx(SidebarContext.Provider, {
|
|
3732
4841
|
value: contextValue,
|
|
3733
4842
|
children: /* @__PURE__ */ jsx("div", {
|
|
4843
|
+
ref: forwardRef,
|
|
3734
4844
|
"data-slot": "sidebar-wrapper",
|
|
3735
4845
|
style: {
|
|
3736
4846
|
"--sidebar-width": SIDEBAR_WIDTH,
|
|
@@ -3742,10 +4852,13 @@ function SidebarProvider({ defaultOpen = true, open: openProp, onOpenChange: set
|
|
|
3742
4852
|
children
|
|
3743
4853
|
})
|
|
3744
4854
|
});
|
|
3745
|
-
}
|
|
3746
|
-
|
|
4855
|
+
});
|
|
4856
|
+
SidebarProvider.displayName = "SidebarProvider";
|
|
4857
|
+
const Sidebar = React.forwardRef((componentProps, forwardRef) => {
|
|
4858
|
+
const { side = "left", variant = "sidebar", collapsible = "offcanvas", className, children, dir, ...props } = componentProps;
|
|
3747
4859
|
const { isMobile, state, openMobile, setOpenMobile } = useSidebar();
|
|
3748
4860
|
if (collapsible === "none") return /* @__PURE__ */ jsx("div", {
|
|
4861
|
+
ref: forwardRef,
|
|
3749
4862
|
"data-slot": "sidebar",
|
|
3750
4863
|
className: cn("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground", className),
|
|
3751
4864
|
...props,
|
|
@@ -3783,6 +4896,7 @@ function Sidebar({ side = "left", variant = "sidebar", collapsible = "offcanvas"
|
|
|
3783
4896
|
"data-slot": "sidebar-gap",
|
|
3784
4897
|
className: cn("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear", "group-data-[collapsible=offcanvas]:w-0", "group-data-[side=right]:rotate-180", variant === "floating" || variant === "inset" ? "group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon)")
|
|
3785
4898
|
}), /* @__PURE__ */ jsx("div", {
|
|
4899
|
+
ref: forwardRef,
|
|
3786
4900
|
"data-slot": "sidebar-container",
|
|
3787
4901
|
"data-side": side,
|
|
3788
4902
|
className: cn("fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex", variant === "floating" || variant === "inset" ? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]" : "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l", className),
|
|
@@ -3795,10 +4909,13 @@ function Sidebar({ side = "left", variant = "sidebar", collapsible = "offcanvas"
|
|
|
3795
4909
|
})
|
|
3796
4910
|
})]
|
|
3797
4911
|
});
|
|
3798
|
-
}
|
|
3799
|
-
|
|
4912
|
+
});
|
|
4913
|
+
Sidebar.displayName = "Sidebar";
|
|
4914
|
+
const SidebarTrigger = React.forwardRef((componentProps, forwardRef) => {
|
|
4915
|
+
const { className, onClick, ...props } = componentProps;
|
|
3800
4916
|
const { toggleSidebar } = useSidebar();
|
|
3801
4917
|
return /* @__PURE__ */ jsxs(Button, {
|
|
4918
|
+
ref: forwardRef,
|
|
3802
4919
|
"data-sidebar": "trigger",
|
|
3803
4920
|
"data-slot": "sidebar-trigger",
|
|
3804
4921
|
variant: "ghost",
|
|
@@ -3814,10 +4931,13 @@ function SidebarTrigger({ className, onClick, ...props }) {
|
|
|
3814
4931
|
children: "Toggle Sidebar"
|
|
3815
4932
|
})]
|
|
3816
4933
|
});
|
|
3817
|
-
}
|
|
3818
|
-
|
|
4934
|
+
});
|
|
4935
|
+
SidebarTrigger.displayName = "SidebarTrigger";
|
|
4936
|
+
const SidebarRail = React.forwardRef((componentProps, forwardRef) => {
|
|
4937
|
+
const { className, ...props } = componentProps;
|
|
3819
4938
|
const { toggleSidebar } = useSidebar();
|
|
3820
4939
|
return /* @__PURE__ */ jsx("button", {
|
|
4940
|
+
ref: forwardRef,
|
|
3821
4941
|
"data-sidebar": "rail",
|
|
3822
4942
|
"data-slot": "sidebar-rail",
|
|
3823
4943
|
"aria-label": "Toggle Sidebar",
|
|
@@ -3827,108 +4947,149 @@ function SidebarRail({ className, ...props }) {
|
|
|
3827
4947
|
className: cn("absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] hover:after:bg-sidebar-border sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2", "in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize", "[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize", "group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full hover:group-data-[collapsible=offcanvas]:bg-sidebar", "[[data-side=left][data-collapsible=offcanvas]_&]:-right-2", "[[data-side=right][data-collapsible=offcanvas]_&]:-left-2", className),
|
|
3828
4948
|
...props
|
|
3829
4949
|
});
|
|
3830
|
-
}
|
|
3831
|
-
|
|
4950
|
+
});
|
|
4951
|
+
SidebarRail.displayName = "SidebarRail";
|
|
4952
|
+
const SidebarInset = React.forwardRef((componentProps, forwardRef) => {
|
|
4953
|
+
const { className, ...props } = componentProps;
|
|
3832
4954
|
return /* @__PURE__ */ jsx("main", {
|
|
4955
|
+
ref: forwardRef,
|
|
3833
4956
|
"data-slot": "sidebar-inset",
|
|
3834
4957
|
className: cn("relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2", className),
|
|
3835
4958
|
...props
|
|
3836
4959
|
});
|
|
3837
|
-
}
|
|
3838
|
-
|
|
4960
|
+
});
|
|
4961
|
+
SidebarInset.displayName = "SidebarInset";
|
|
4962
|
+
const SidebarInput = React.forwardRef((componentProps, forwardRef) => {
|
|
4963
|
+
const { className, ...props } = componentProps;
|
|
3839
4964
|
return /* @__PURE__ */ jsx(Input, {
|
|
4965
|
+
ref: forwardRef,
|
|
3840
4966
|
"data-slot": "sidebar-input",
|
|
3841
4967
|
"data-sidebar": "input",
|
|
3842
4968
|
className: cn("h-8 w-full bg-background shadow-none", className),
|
|
3843
4969
|
...props
|
|
3844
4970
|
});
|
|
3845
|
-
}
|
|
3846
|
-
|
|
4971
|
+
});
|
|
4972
|
+
SidebarInput.displayName = "SidebarInput";
|
|
4973
|
+
const SidebarHeader = React.forwardRef((componentProps, forwardRef) => {
|
|
4974
|
+
const { className, ...props } = componentProps;
|
|
3847
4975
|
return /* @__PURE__ */ jsx("div", {
|
|
4976
|
+
ref: forwardRef,
|
|
3848
4977
|
"data-slot": "sidebar-header",
|
|
3849
4978
|
"data-sidebar": "header",
|
|
3850
4979
|
className: cn("flex flex-col gap-2 p-2", className),
|
|
3851
4980
|
...props
|
|
3852
4981
|
});
|
|
3853
|
-
}
|
|
3854
|
-
|
|
4982
|
+
});
|
|
4983
|
+
SidebarHeader.displayName = "SidebarHeader";
|
|
4984
|
+
const SidebarFooter = React.forwardRef((componentProps, forwardRef) => {
|
|
4985
|
+
const { className, ...props } = componentProps;
|
|
3855
4986
|
return /* @__PURE__ */ jsx("div", {
|
|
4987
|
+
ref: forwardRef,
|
|
3856
4988
|
"data-slot": "sidebar-footer",
|
|
3857
4989
|
"data-sidebar": "footer",
|
|
3858
4990
|
className: cn("flex flex-col gap-2 p-2", className),
|
|
3859
4991
|
...props
|
|
3860
4992
|
});
|
|
3861
|
-
}
|
|
3862
|
-
|
|
4993
|
+
});
|
|
4994
|
+
SidebarFooter.displayName = "SidebarFooter";
|
|
4995
|
+
const SidebarSeparator = React.forwardRef((componentProps, forwardRef) => {
|
|
4996
|
+
const { className, ...props } = componentProps;
|
|
3863
4997
|
return /* @__PURE__ */ jsx(Separator, {
|
|
4998
|
+
ref: forwardRef,
|
|
3864
4999
|
"data-slot": "sidebar-separator",
|
|
3865
5000
|
"data-sidebar": "separator",
|
|
3866
5001
|
className: cn("mx-2 w-auto bg-sidebar-border", className),
|
|
3867
5002
|
...props
|
|
3868
5003
|
});
|
|
3869
|
-
}
|
|
3870
|
-
|
|
5004
|
+
});
|
|
5005
|
+
SidebarSeparator.displayName = "SidebarSeparator";
|
|
5006
|
+
const SidebarContent = React.forwardRef((componentProps, forwardRef) => {
|
|
5007
|
+
const { className, ...props } = componentProps;
|
|
3871
5008
|
return /* @__PURE__ */ jsx("div", {
|
|
5009
|
+
ref: forwardRef,
|
|
3872
5010
|
"data-slot": "sidebar-content",
|
|
3873
5011
|
"data-sidebar": "content",
|
|
3874
5012
|
className: cn("no-scrollbar flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden", className),
|
|
3875
5013
|
...props
|
|
3876
5014
|
});
|
|
3877
|
-
}
|
|
3878
|
-
|
|
5015
|
+
});
|
|
5016
|
+
SidebarContent.displayName = "SidebarContent";
|
|
5017
|
+
const SidebarGroup = React.forwardRef((componentProps, forwardRef) => {
|
|
5018
|
+
const { className, ...props } = componentProps;
|
|
3879
5019
|
return /* @__PURE__ */ jsx("div", {
|
|
5020
|
+
ref: forwardRef,
|
|
3880
5021
|
"data-slot": "sidebar-group",
|
|
3881
5022
|
"data-sidebar": "group",
|
|
3882
5023
|
className: cn("relative flex w-full min-w-0 flex-col p-2", className),
|
|
3883
5024
|
...props
|
|
3884
5025
|
});
|
|
3885
|
-
}
|
|
3886
|
-
|
|
5026
|
+
});
|
|
5027
|
+
SidebarGroup.displayName = "SidebarGroup";
|
|
5028
|
+
const SidebarGroupLabel = React.forwardRef((componentProps, forwardRef) => {
|
|
5029
|
+
const { className, render, ...props } = componentProps;
|
|
3887
5030
|
return useRender({
|
|
3888
5031
|
defaultTagName: "div",
|
|
3889
|
-
props: mergeProps({
|
|
5032
|
+
props: mergeProps({
|
|
5033
|
+
className: cn("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0", className),
|
|
5034
|
+
ref: forwardRef
|
|
5035
|
+
}, props),
|
|
3890
5036
|
render,
|
|
3891
5037
|
state: {
|
|
3892
5038
|
slot: "sidebar-group-label",
|
|
3893
5039
|
sidebar: "group-label"
|
|
3894
5040
|
}
|
|
3895
5041
|
});
|
|
3896
|
-
}
|
|
3897
|
-
|
|
5042
|
+
});
|
|
5043
|
+
SidebarGroupLabel.displayName = "SidebarGroupLabel";
|
|
5044
|
+
const SidebarGroupAction = React.forwardRef((componentProps, forwardRef) => {
|
|
5045
|
+
const { className, render, ...props } = componentProps;
|
|
3898
5046
|
return useRender({
|
|
3899
5047
|
defaultTagName: "button",
|
|
3900
|
-
props: mergeProps({
|
|
5048
|
+
props: mergeProps({
|
|
5049
|
+
className: cn("absolute top-3.5 right-3 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0", className),
|
|
5050
|
+
ref: forwardRef
|
|
5051
|
+
}, props),
|
|
3901
5052
|
render,
|
|
3902
5053
|
state: {
|
|
3903
5054
|
slot: "sidebar-group-action",
|
|
3904
5055
|
sidebar: "group-action"
|
|
3905
5056
|
}
|
|
3906
5057
|
});
|
|
3907
|
-
}
|
|
3908
|
-
|
|
5058
|
+
});
|
|
5059
|
+
SidebarGroupAction.displayName = "SidebarGroupAction";
|
|
5060
|
+
const SidebarGroupContent = React.forwardRef((componentProps, forwardRef) => {
|
|
5061
|
+
const { className, ...props } = componentProps;
|
|
3909
5062
|
return /* @__PURE__ */ jsx("div", {
|
|
5063
|
+
ref: forwardRef,
|
|
3910
5064
|
"data-slot": "sidebar-group-content",
|
|
3911
5065
|
"data-sidebar": "group-content",
|
|
3912
5066
|
className: cn("w-full text-sm", className),
|
|
3913
5067
|
...props
|
|
3914
5068
|
});
|
|
3915
|
-
}
|
|
3916
|
-
|
|
5069
|
+
});
|
|
5070
|
+
SidebarGroupContent.displayName = "SidebarGroupContent";
|
|
5071
|
+
const SidebarMenu = React.forwardRef((componentProps, forwardRef) => {
|
|
5072
|
+
const { className, ...props } = componentProps;
|
|
3917
5073
|
return /* @__PURE__ */ jsx("ul", {
|
|
5074
|
+
ref: forwardRef,
|
|
3918
5075
|
"data-slot": "sidebar-menu",
|
|
3919
5076
|
"data-sidebar": "menu",
|
|
3920
5077
|
className: cn("flex w-full min-w-0 flex-col gap-1", className),
|
|
3921
5078
|
...props
|
|
3922
5079
|
});
|
|
3923
|
-
}
|
|
3924
|
-
|
|
5080
|
+
});
|
|
5081
|
+
SidebarMenu.displayName = "SidebarMenu";
|
|
5082
|
+
const SidebarMenuItem = React.forwardRef((componentProps, forwardRef) => {
|
|
5083
|
+
const { className, ...props } = componentProps;
|
|
3925
5084
|
return /* @__PURE__ */ jsx("li", {
|
|
5085
|
+
ref: forwardRef,
|
|
3926
5086
|
"data-slot": "sidebar-menu-item",
|
|
3927
5087
|
"data-sidebar": "menu-item",
|
|
3928
5088
|
className: cn("group/menu-item relative", className),
|
|
3929
5089
|
...props
|
|
3930
5090
|
});
|
|
3931
|
-
}
|
|
5091
|
+
});
|
|
5092
|
+
SidebarMenuItem.displayName = "SidebarMenuItem";
|
|
3932
5093
|
const sidebarMenuButtonVariants = cva("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate", {
|
|
3933
5094
|
variants: {
|
|
3934
5095
|
variant: {
|
|
@@ -3946,7 +5107,9 @@ const sidebarMenuButtonVariants = cva("peer/menu-button group/menu-button flex w
|
|
|
3946
5107
|
size: "default"
|
|
3947
5108
|
}
|
|
3948
5109
|
});
|
|
3949
|
-
const SidebarMenuButton = React
|
|
5110
|
+
const SidebarMenuButton = React.forwardRef((componentProps, forwardRef) => {
|
|
5111
|
+
const { render, isActive = false, variant = "default", size = "default", tooltip: tooltipProp, className, ...props } = componentProps;
|
|
5112
|
+
let tooltip = tooltipProp;
|
|
3950
5113
|
const { isMobile, state } = useSidebar();
|
|
3951
5114
|
const comp = useRender({
|
|
3952
5115
|
defaultTagName: "button",
|
|
@@ -3955,7 +5118,7 @@ const SidebarMenuButton = React$1.forwardRef(({ render, isActive = false, varian
|
|
|
3955
5118
|
variant,
|
|
3956
5119
|
size
|
|
3957
5120
|
}), className),
|
|
3958
|
-
ref
|
|
5121
|
+
ref: forwardRef
|
|
3959
5122
|
}, props),
|
|
3960
5123
|
render: !tooltip ? render : /* @__PURE__ */ jsx(TooltipTrigger, { render }),
|
|
3961
5124
|
state: {
|
|
@@ -3975,12 +5138,13 @@ const SidebarMenuButton = React$1.forwardRef(({ render, isActive = false, varian
|
|
|
3975
5138
|
})] });
|
|
3976
5139
|
});
|
|
3977
5140
|
SidebarMenuButton.displayName = "SidebarMenuButton";
|
|
3978
|
-
const SidebarMenuAction = React
|
|
5141
|
+
const SidebarMenuAction = React.forwardRef((componentProps, forwardRef) => {
|
|
5142
|
+
const { className, render, showOnHover = false, ...props } = componentProps;
|
|
3979
5143
|
return useRender({
|
|
3980
5144
|
defaultTagName: "button",
|
|
3981
5145
|
props: mergeProps({
|
|
3982
5146
|
className: cn("absolute top-1.5 right-1 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground ring-sidebar-ring outline-hidden transition-transform group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 after:absolute after:-inset-2 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 md:after:hidden [&>svg]:size-4 [&>svg]:shrink-0", showOnHover && "group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 peer-data-active/menu-button:text-sidebar-accent-foreground aria-expanded:opacity-100 md:opacity-0", className),
|
|
3983
|
-
ref
|
|
5147
|
+
ref: forwardRef
|
|
3984
5148
|
}, props),
|
|
3985
5149
|
render,
|
|
3986
5150
|
state: {
|
|
@@ -3990,20 +5154,25 @@ const SidebarMenuAction = React$1.forwardRef(({ className, render, showOnHover =
|
|
|
3990
5154
|
});
|
|
3991
5155
|
});
|
|
3992
5156
|
SidebarMenuAction.displayName = "SidebarMenuAction";
|
|
3993
|
-
|
|
5157
|
+
const SidebarMenuBadge = React.forwardRef((componentProps, forwardRef) => {
|
|
5158
|
+
const { className, ...props } = componentProps;
|
|
3994
5159
|
return /* @__PURE__ */ jsx("div", {
|
|
5160
|
+
ref: forwardRef,
|
|
3995
5161
|
"data-slot": "sidebar-menu-badge",
|
|
3996
5162
|
"data-sidebar": "menu-badge",
|
|
3997
5163
|
className: cn("pointer-events-none absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium text-sidebar-foreground tabular-nums select-none group-data-[collapsible=icon]:hidden peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[size=default]/menu-button:top-1.5 peer-data-[size=lg]/menu-button:top-2.5 peer-data-[size=sm]/menu-button:top-1 peer-data-active/menu-button:text-sidebar-accent-foreground", className),
|
|
3998
5164
|
...props
|
|
3999
5165
|
});
|
|
4000
|
-
}
|
|
4001
|
-
|
|
4002
|
-
|
|
5166
|
+
});
|
|
5167
|
+
SidebarMenuBadge.displayName = "SidebarMenuBadge";
|
|
5168
|
+
const SidebarMenuSkeleton = React.forwardRef((componentProps, forwardRef) => {
|
|
5169
|
+
const { className, showIcon = false, width: widthProp, ...props } = componentProps;
|
|
5170
|
+
const [fallbackWidth] = React.useState(() => {
|
|
4003
5171
|
return `${Math.floor(Math.random() * 40) + 50}%`;
|
|
4004
5172
|
});
|
|
4005
5173
|
const width = widthProp ?? fallbackWidth;
|
|
4006
5174
|
return /* @__PURE__ */ jsxs("div", {
|
|
5175
|
+
ref: forwardRef,
|
|
4007
5176
|
"data-slot": "sidebar-menu-skeleton",
|
|
4008
5177
|
"data-sidebar": "menu-skeleton",
|
|
4009
5178
|
className: cn("flex h-8 items-center gap-2 rounded-md px-2", className),
|
|
@@ -4017,27 +5186,38 @@ function SidebarMenuSkeleton({ className, showIcon = false, width: widthProp, ..
|
|
|
4017
5186
|
style: { "--skeleton-width": width }
|
|
4018
5187
|
})]
|
|
4019
5188
|
});
|
|
4020
|
-
}
|
|
4021
|
-
|
|
5189
|
+
});
|
|
5190
|
+
SidebarMenuSkeleton.displayName = "SidebarMenuSkeleton";
|
|
5191
|
+
const SidebarMenuSub = React.forwardRef((componentProps, forwardRef) => {
|
|
5192
|
+
const { className, ...props } = componentProps;
|
|
4022
5193
|
return /* @__PURE__ */ jsx("ul", {
|
|
5194
|
+
ref: forwardRef,
|
|
4023
5195
|
"data-slot": "sidebar-menu-sub",
|
|
4024
5196
|
"data-sidebar": "menu-sub",
|
|
4025
5197
|
className: cn("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5 group-data-[collapsible=icon]:hidden", className),
|
|
4026
5198
|
...props
|
|
4027
5199
|
});
|
|
4028
|
-
}
|
|
4029
|
-
|
|
5200
|
+
});
|
|
5201
|
+
SidebarMenuSub.displayName = "SidebarMenuSub";
|
|
5202
|
+
const SidebarMenuSubItem = React.forwardRef((componentProps, forwardRef) => {
|
|
5203
|
+
const { className, ...props } = componentProps;
|
|
4030
5204
|
return /* @__PURE__ */ jsx("li", {
|
|
5205
|
+
ref: forwardRef,
|
|
4031
5206
|
"data-slot": "sidebar-menu-sub-item",
|
|
4032
5207
|
"data-sidebar": "menu-sub-item",
|
|
4033
5208
|
className: cn("group/menu-sub-item relative", className),
|
|
4034
5209
|
...props
|
|
4035
5210
|
});
|
|
4036
|
-
}
|
|
4037
|
-
|
|
5211
|
+
});
|
|
5212
|
+
SidebarMenuSubItem.displayName = "SidebarMenuSubItem";
|
|
5213
|
+
const SidebarMenuSubButton = React.forwardRef((componentProps, forwardRef) => {
|
|
5214
|
+
const { render, size = "md", isActive = false, className, ...props } = componentProps;
|
|
4038
5215
|
return useRender({
|
|
4039
5216
|
defaultTagName: "a",
|
|
4040
|
-
props: mergeProps({
|
|
5217
|
+
props: mergeProps({
|
|
5218
|
+
className: cn("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-sm data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground", className),
|
|
5219
|
+
ref: forwardRef
|
|
5220
|
+
}, props),
|
|
4041
5221
|
render,
|
|
4042
5222
|
state: {
|
|
4043
5223
|
slot: "sidebar-menu-sub-button",
|
|
@@ -4046,18 +5226,21 @@ function SidebarMenuSubButton({ render, size = "md", isActive = false, className
|
|
|
4046
5226
|
active: isActive
|
|
4047
5227
|
}
|
|
4048
5228
|
});
|
|
4049
|
-
}
|
|
5229
|
+
});
|
|
5230
|
+
SidebarMenuSubButton.displayName = "SidebarMenuSubButton";
|
|
4050
5231
|
|
|
4051
5232
|
//#endregion
|
|
4052
5233
|
//#region src/components/slider.tsx
|
|
4053
|
-
|
|
4054
|
-
const
|
|
5234
|
+
const Slider = React.forwardRef((componentProps, forwardRef) => {
|
|
5235
|
+
const { className, defaultValue, value, min = 0, max = 100, orientation = "horizontal", ...props } = componentProps;
|
|
5236
|
+
const _values = React.useMemo(() => Array.isArray(value) ? value : Array.isArray(defaultValue) ? defaultValue : [min, max], [
|
|
4055
5237
|
value,
|
|
4056
5238
|
defaultValue,
|
|
4057
5239
|
min,
|
|
4058
5240
|
max
|
|
4059
5241
|
]);
|
|
4060
5242
|
return /* @__PURE__ */ jsx(Slider$1.Root, {
|
|
5243
|
+
ref: forwardRef,
|
|
4061
5244
|
className: cn("data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full", className),
|
|
4062
5245
|
"data-slot": "slider",
|
|
4063
5246
|
"data-orientation": orientation,
|
|
@@ -4086,11 +5269,13 @@ function Slider({ className, defaultValue, value, min = 0, max = 100, orientatio
|
|
|
4086
5269
|
}, index))]
|
|
4087
5270
|
})
|
|
4088
5271
|
});
|
|
4089
|
-
}
|
|
5272
|
+
});
|
|
5273
|
+
Slider.displayName = "Slider";
|
|
4090
5274
|
|
|
4091
5275
|
//#endregion
|
|
4092
5276
|
//#region src/components/sonner.tsx
|
|
4093
|
-
const Toaster = (
|
|
5277
|
+
const Toaster = (componentProps) => {
|
|
5278
|
+
const { ...props } = componentProps;
|
|
4094
5279
|
const { theme = "system" } = useTheme$1();
|
|
4095
5280
|
return /* @__PURE__ */ jsx(Toaster$1, {
|
|
4096
5281
|
theme,
|
|
@@ -4122,43 +5307,122 @@ const Toaster = ({ ...props }) => {
|
|
|
4122
5307
|
};
|
|
4123
5308
|
|
|
4124
5309
|
//#endregion
|
|
4125
|
-
//#region src/components/
|
|
4126
|
-
const
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
5310
|
+
//#region src/components/stepper.tsx
|
|
5311
|
+
const StepperContext = React.createContext(void 0);
|
|
5312
|
+
function useStepper() {
|
|
5313
|
+
const ctx = React.useContext(StepperContext);
|
|
5314
|
+
if (!ctx) throw new Error("useStepper must be used within a Stepper");
|
|
5315
|
+
return ctx;
|
|
5316
|
+
}
|
|
5317
|
+
const Stepper = React.forwardRef((componentProps, forwardRef) => {
|
|
5318
|
+
const { steps, defaultValue, className, children, value, onValueChange, ...props } = componentProps;
|
|
5319
|
+
const [activeId = "", setActiveId] = useControllableState({
|
|
5320
|
+
prop: value,
|
|
5321
|
+
defaultProp: defaultValue ?? steps[0]?.id,
|
|
5322
|
+
onChange: onValueChange
|
|
5323
|
+
});
|
|
5324
|
+
const goTo = React.useCallback((id) => setActiveId(id), [setActiveId]);
|
|
5325
|
+
const getIndex = React.useCallback((id) => steps.findIndex((s) => s.id === id), [steps]);
|
|
5326
|
+
const contextValue = React.useMemo(() => ({
|
|
5327
|
+
activeId,
|
|
5328
|
+
goTo,
|
|
5329
|
+
getIndex,
|
|
5330
|
+
steps
|
|
5331
|
+
}), [
|
|
5332
|
+
activeId,
|
|
5333
|
+
goTo,
|
|
5334
|
+
getIndex,
|
|
5335
|
+
steps
|
|
5336
|
+
]);
|
|
5337
|
+
return /* @__PURE__ */ jsx(StepperContext.Provider, {
|
|
5338
|
+
value: contextValue,
|
|
5339
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
5340
|
+
ref: forwardRef,
|
|
5341
|
+
"data-slot": "stepper",
|
|
5342
|
+
className: cn("w-full", className),
|
|
5343
|
+
...props,
|
|
5344
|
+
children
|
|
5345
|
+
})
|
|
5346
|
+
});
|
|
4134
5347
|
});
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
5348
|
+
Stepper.displayName = "Stepper";
|
|
5349
|
+
const StepperProgress = React.forwardRef((componentProps, forwardRef) => {
|
|
5350
|
+
const { steps: stepIds, className, ...props } = componentProps;
|
|
5351
|
+
const { activeId, getIndex, steps } = useStepper();
|
|
5352
|
+
const ids = stepIds ?? steps.map((s) => s.id);
|
|
5353
|
+
const currentIndex = getIndex(activeId);
|
|
5354
|
+
return /* @__PURE__ */ jsx("div", {
|
|
5355
|
+
ref: forwardRef,
|
|
5356
|
+
"data-slot": "stepper-progress",
|
|
5357
|
+
"aria-hidden": "true",
|
|
5358
|
+
className: cn("flex w-full items-center gap-1.5", className),
|
|
4142
5359
|
...props,
|
|
4143
|
-
children:
|
|
4144
|
-
|
|
4145
|
-
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
fill: "currentColor",
|
|
4153
|
-
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
4154
|
-
})]
|
|
5360
|
+
children: ids.map((id) => {
|
|
5361
|
+
const idx = getIndex(id);
|
|
5362
|
+
const state = idx < currentIndex ? "completed" : idx === currentIndex ? "active" : "inactive";
|
|
5363
|
+
return /* @__PURE__ */ jsx("span", {
|
|
5364
|
+
"data-slot": "stepper-progress-segment",
|
|
5365
|
+
"data-state": state,
|
|
5366
|
+
className: "bg-muted h-1.5 flex-1 rounded-full transition-colors duration-300 data-[state=active]:bg-primary data-[state=completed]:bg-primary"
|
|
5367
|
+
}, id);
|
|
5368
|
+
})
|
|
4155
5369
|
});
|
|
4156
|
-
}
|
|
5370
|
+
});
|
|
5371
|
+
StepperProgress.displayName = "StepperProgress";
|
|
5372
|
+
const StepperCounter = React.forwardRef((componentProps, forwardRef) => {
|
|
5373
|
+
const { steps: stepIds, className, children, ...props } = componentProps;
|
|
5374
|
+
const { activeId, steps } = useStepper();
|
|
5375
|
+
const ids = stepIds ?? steps.map((s) => s.id);
|
|
5376
|
+
const pos = Math.max(0, ids.indexOf(activeId));
|
|
5377
|
+
return /* @__PURE__ */ jsxs("p", {
|
|
5378
|
+
ref: forwardRef,
|
|
5379
|
+
"data-slot": "stepper-counter",
|
|
5380
|
+
className: cn("text-muted-foreground text-xs", "[[data-slot=stepper-progress]+&]:pt-1", className),
|
|
5381
|
+
...props,
|
|
5382
|
+
children: [
|
|
5383
|
+
"Step ",
|
|
5384
|
+
pos + 1,
|
|
5385
|
+
" of ",
|
|
5386
|
+
ids.length,
|
|
5387
|
+
children
|
|
5388
|
+
]
|
|
5389
|
+
});
|
|
5390
|
+
});
|
|
5391
|
+
StepperCounter.displayName = "StepperCounter";
|
|
5392
|
+
const StepperPanel = React.forwardRef((componentProps, forwardRef) => {
|
|
5393
|
+
const { className, ...props } = componentProps;
|
|
5394
|
+
const { activeId } = useStepper();
|
|
5395
|
+
return /* @__PURE__ */ jsx("div", {
|
|
5396
|
+
ref: forwardRef,
|
|
5397
|
+
"data-slot": "stepper-panel",
|
|
5398
|
+
"data-state": activeId,
|
|
5399
|
+
className: cn("w-full", className),
|
|
5400
|
+
...props
|
|
5401
|
+
});
|
|
5402
|
+
});
|
|
5403
|
+
StepperPanel.displayName = "StepperPanel";
|
|
5404
|
+
const StepperContent = React.forwardRef((componentProps, forwardRef) => {
|
|
5405
|
+
const { value, forceMount, className, ...props } = componentProps;
|
|
5406
|
+
const { activeId } = useStepper();
|
|
5407
|
+
const isActive = value === activeId;
|
|
5408
|
+
if (!forceMount && !isActive) return null;
|
|
5409
|
+
return /* @__PURE__ */ jsx("div", {
|
|
5410
|
+
ref: forwardRef,
|
|
5411
|
+
"data-slot": "stepper-content",
|
|
5412
|
+
"data-state": activeId,
|
|
5413
|
+
className: cn("w-full", className, !isActive && forceMount && "hidden"),
|
|
5414
|
+
hidden: !isActive && forceMount,
|
|
5415
|
+
...props
|
|
5416
|
+
});
|
|
5417
|
+
});
|
|
5418
|
+
StepperContent.displayName = "StepperContent";
|
|
4157
5419
|
|
|
4158
5420
|
//#endregion
|
|
4159
5421
|
//#region src/components/switch.tsx
|
|
4160
|
-
|
|
5422
|
+
const Switch = React.forwardRef((componentProps, forwardRef) => {
|
|
5423
|
+
const { className, ...props } = componentProps;
|
|
4161
5424
|
return /* @__PURE__ */ jsx(Switch$1.Root, {
|
|
5425
|
+
ref: forwardRef,
|
|
4162
5426
|
"data-slot": "switch",
|
|
4163
5427
|
className: cn("peer relative inline-flex h-6 w-10 shrink-0 items-center rounded-full border border-transparent p-1 transition-all outline-none active:opacity-60 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 focus-visible:aria-invalid:ring-3 focus-visible:aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:focus-visible:aria-invalid:ring-destructive/40 data-checked:bg-primary aria-invalid:data-checked:bg-destructive data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50", className),
|
|
4164
5428
|
...props,
|
|
@@ -4167,39 +5431,52 @@ function Switch({ className, ...props }) {
|
|
|
4167
5431
|
className: "pointer-events-none block size-4 rounded-full bg-background ring-0 transition-transform data-unchecked:translate-x-0 data-checked:translate-x-4 dark:data-checked:bg-primary-foreground dark:data-unchecked:bg-foreground"
|
|
4168
5432
|
})
|
|
4169
5433
|
});
|
|
4170
|
-
}
|
|
5434
|
+
});
|
|
5435
|
+
Switch.displayName = "Switch";
|
|
4171
5436
|
|
|
4172
5437
|
//#endregion
|
|
4173
5438
|
//#region src/components/tabs.tsx
|
|
4174
|
-
|
|
5439
|
+
const Tabs = React.forwardRef((componentProps, forwardRef) => {
|
|
5440
|
+
const { className, orientation = "horizontal", ...props } = componentProps;
|
|
4175
5441
|
return /* @__PURE__ */ jsx(Tabs$1.Root, {
|
|
5442
|
+
ref: forwardRef,
|
|
4176
5443
|
"data-slot": "tabs",
|
|
4177
5444
|
"data-orientation": orientation,
|
|
4178
5445
|
className: cn("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col", className),
|
|
4179
5446
|
...props
|
|
4180
5447
|
});
|
|
4181
|
-
}
|
|
4182
|
-
|
|
5448
|
+
});
|
|
5449
|
+
Tabs.displayName = "Tabs";
|
|
5450
|
+
const TabsList = React.forwardRef((componentProps, forwardRef) => {
|
|
5451
|
+
const { className, ...props } = componentProps;
|
|
4183
5452
|
return /* @__PURE__ */ jsx(Tabs$1.List, {
|
|
5453
|
+
ref: forwardRef,
|
|
4184
5454
|
"data-slot": "tabs-list",
|
|
4185
5455
|
className: cn("group/tabs-list inline-flex w-fit items-center justify-center gap-4 text-muted-foreground group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col", className),
|
|
4186
5456
|
...props
|
|
4187
5457
|
});
|
|
4188
|
-
}
|
|
4189
|
-
|
|
5458
|
+
});
|
|
5459
|
+
TabsList.displayName = "TabsList";
|
|
5460
|
+
const TabsTrigger = React.forwardRef((componentProps, forwardRef) => {
|
|
5461
|
+
const { className, ...props } = componentProps;
|
|
4190
5462
|
return /* @__PURE__ */ jsx(Tabs$1.Tab, {
|
|
5463
|
+
ref: forwardRef,
|
|
4191
5464
|
"data-slot": "tabs-trigger",
|
|
4192
5465
|
className: cn("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground data-active:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", "after:absolute after:rounded-full after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-1.5 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0.5 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 data-active:after:opacity-100", className),
|
|
4193
5466
|
...props
|
|
4194
5467
|
});
|
|
4195
|
-
}
|
|
4196
|
-
|
|
5468
|
+
});
|
|
5469
|
+
TabsTrigger.displayName = "TabsTrigger";
|
|
5470
|
+
const TabsContent = React.forwardRef((componentProps, forwardRef) => {
|
|
5471
|
+
const { className, ...props } = componentProps;
|
|
4197
5472
|
return /* @__PURE__ */ jsx(Tabs$1.Panel, {
|
|
5473
|
+
ref: forwardRef,
|
|
4198
5474
|
"data-slot": "tabs-content",
|
|
4199
5475
|
className: cn("flex-1 text-sm outline-none", className),
|
|
4200
5476
|
...props
|
|
4201
5477
|
});
|
|
4202
|
-
}
|
|
5478
|
+
});
|
|
5479
|
+
TabsContent.displayName = "TabsContent";
|
|
4203
5480
|
|
|
4204
5481
|
//#endregion
|
|
4205
5482
|
//#region src/components/toggle.tsx
|
|
@@ -4220,8 +5497,10 @@ const toggleVariants = cva("group/toggle inline-flex items-center justify-center
|
|
|
4220
5497
|
size: "default"
|
|
4221
5498
|
}
|
|
4222
5499
|
});
|
|
4223
|
-
|
|
5500
|
+
const Toggle = React.forwardRef((componentProps, forwardRef) => {
|
|
5501
|
+
const { className, variant = "default", size = "default", ...props } = componentProps;
|
|
4224
5502
|
return /* @__PURE__ */ jsx(Toggle$1, {
|
|
5503
|
+
ref: forwardRef,
|
|
4225
5504
|
"data-slot": "toggle",
|
|
4226
5505
|
className: cn(toggleVariants({
|
|
4227
5506
|
variant,
|
|
@@ -4230,19 +5509,22 @@ function Toggle({ className, variant = "default", size = "default", ...props })
|
|
|
4230
5509
|
})),
|
|
4231
5510
|
...props
|
|
4232
5511
|
});
|
|
4233
|
-
}
|
|
5512
|
+
});
|
|
5513
|
+
Toggle.displayName = "Toggle";
|
|
4234
5514
|
|
|
4235
5515
|
//#endregion
|
|
4236
5516
|
//#region src/components/toggle-group.tsx
|
|
4237
|
-
const ToggleGroupContext = React
|
|
5517
|
+
const ToggleGroupContext = React.createContext({
|
|
4238
5518
|
size: "default",
|
|
4239
5519
|
variant: "default",
|
|
4240
5520
|
spacing: 0,
|
|
4241
5521
|
orientation: "horizontal",
|
|
4242
5522
|
block: false
|
|
4243
5523
|
});
|
|
4244
|
-
|
|
5524
|
+
const ToggleGroup = React.forwardRef((componentProps, forwardRef) => {
|
|
5525
|
+
const { className, variant, size, spacing = 0, orientation = "horizontal", block = false, children, ...props } = componentProps;
|
|
4245
5526
|
return /* @__PURE__ */ jsx(ToggleGroup$1, {
|
|
5527
|
+
ref: forwardRef,
|
|
4246
5528
|
"data-slot": "toggle-group",
|
|
4247
5529
|
"data-variant": variant,
|
|
4248
5530
|
"data-size": size,
|
|
@@ -4263,10 +5545,13 @@ function ToggleGroup({ className, variant, size, spacing = 0, orientation = "hor
|
|
|
4263
5545
|
children
|
|
4264
5546
|
})
|
|
4265
5547
|
});
|
|
4266
|
-
}
|
|
4267
|
-
|
|
4268
|
-
|
|
5548
|
+
});
|
|
5549
|
+
ToggleGroup.displayName = "ToggleGroup";
|
|
5550
|
+
const ToggleGroupItem = React.forwardRef((componentProps, forwardRef) => {
|
|
5551
|
+
const { className, children, variant = "default", size = "default", ...props } = componentProps;
|
|
5552
|
+
const context = React.useContext(ToggleGroupContext);
|
|
4269
5553
|
return /* @__PURE__ */ jsx(Toggle$1, {
|
|
5554
|
+
ref: forwardRef,
|
|
4270
5555
|
"data-slot": "toggle-group-item",
|
|
4271
5556
|
"data-variant": context.variant || variant,
|
|
4272
5557
|
"data-size": context.size || size,
|
|
@@ -4278,7 +5563,8 @@ function ToggleGroupItem({ className, children, variant = "default", size = "def
|
|
|
4278
5563
|
...props,
|
|
4279
5564
|
children
|
|
4280
5565
|
});
|
|
4281
|
-
}
|
|
5566
|
+
});
|
|
5567
|
+
ToggleGroupItem.displayName = "ToggleGroupItem";
|
|
4282
5568
|
|
|
4283
5569
|
//#endregion
|
|
4284
5570
|
//#region src/hooks/use-audio-gauge.ts
|
|
@@ -4302,11 +5588,11 @@ function ToggleGroupItem({ className, children, variant = "default", size = "def
|
|
|
4302
5588
|
*/
|
|
4303
5589
|
function useAudioGauge(options = {}) {
|
|
4304
5590
|
const { intervalMs = 16, fftSize = 32, smoothing = .3, gain = 2 } = options;
|
|
4305
|
-
const [value, setValue] = React
|
|
4306
|
-
const [error, setError] = React
|
|
4307
|
-
const gainRef = React
|
|
5591
|
+
const [value, setValue] = React.useState(0);
|
|
5592
|
+
const [error, setError] = React.useState(null);
|
|
5593
|
+
const gainRef = React.useRef(gain);
|
|
4308
5594
|
gainRef.current = gain;
|
|
4309
|
-
React
|
|
5595
|
+
React.useEffect(() => {
|
|
4310
5596
|
let cancelled = false;
|
|
4311
5597
|
let stream;
|
|
4312
5598
|
let ctx;
|
|
@@ -4355,4 +5641,4 @@ function useAudioGauge(options = {}) {
|
|
|
4355
5641
|
}
|
|
4356
5642
|
|
|
4357
5643
|
//#endregion
|
|
4358
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertAction, AlertAction as BannerAction, AlertDescription, AlertDescription as BannerDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AlertTitle as BannerTitle, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, BadgeGroup, BadgeGroupCount, Banner, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, CalendarDayButton, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Chip, ChipRemove, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CounterBadge, CountryFlag, DataTable, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBackdrop, DrawerBar, DrawerClose, DrawerContent, DrawerCreateHandle, DrawerDescription, DrawerFooter, DrawerHeader, DrawerMenu, DrawerMenuCheckboxItem, DrawerMenuGroup, DrawerMenuGroupLabel, DrawerMenuItem, DrawerMenuRadioGroup, DrawerMenuRadioItem, DrawerMenuSeparator, DrawerMenuTrigger, DrawerPanel, DrawerPopup, DrawerPortal, DrawerPrimitive, DrawerSwipeArea, DrawerTitle, DrawerTrigger, DrawerViewport, DropdownMenu, DropdownMenuAddon, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Dropzone, DropzoneActions, DropzoneContent, DropzoneDescription, DropzoneIcon, DropzoneTitle, DropzoneTrigger, EmojiPicker, EmojiPickerCategories, EmojiPickerContent, EmojiPickerTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, FAB, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Filter, FilterClearAllButton, FilterGroup, Gauge, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Label, List, ListCol, ListRow, NotificationQueueProvider, NotificationSlot, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, RadioGroup, RadioGroupItem, ScrollArea, ScrollAreaPrimitive, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Spinner, Switch, Table, TableBody,
|
|
5644
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActionBar, ActionBarButton, ActionBarContext, ActionBarHeight, Alert, AlertAction, AlertAction as BannerAction, AlertDescription, AlertDescription as BannerDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, AlertTitle as BannerTitle, Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage, Badge, BadgeGroup, BadgeGroupCount, Banner, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, CalendarDayButton, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselNext, CarouselPrevious, Checkbox, Chip, ChipRemove, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxChip, ComboboxChips, ComboboxChipsInput, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxGroup, ComboboxInput, ComboboxItem, ComboboxLabel, ComboboxList, ComboboxSeparator, ComboboxTrigger, ComboboxValue, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CounterBadge, CountryFlag, DataTable, DataTree, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerBackdrop, DrawerBar, DrawerClose, DrawerContent, DrawerCreateHandle, DrawerDescription, DrawerFooter, DrawerHeader, DrawerMenu, DrawerMenuCheckboxItem, DrawerMenuGroup, DrawerMenuGroupLabel, DrawerMenuItem, DrawerMenuRadioGroup, DrawerMenuRadioItem, DrawerMenuSeparator, DrawerMenuTrigger, DrawerPanel, DrawerPopup, DrawerPortal, DrawerPrimitive, DrawerSwipeArea, DrawerTitle, DrawerTrigger, DrawerViewport, DropdownMenu, DropdownMenuAddon, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Dropzone, DropzoneActions, DropzoneContent, DropzoneDescription, DropzoneIcon, DropzoneTitle, DropzoneTrigger, EmojiPicker, EmojiPickerCategories, EmojiPickerContent, EmojiPickerTrigger, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle, FAB, Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle, Filter, FilterClearAllButton, FilterGroup, Gauge, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Label, List, ListCol, ListRow, NotificationQueueProvider, NotificationSlot, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue, RadioGroup, RadioGroupItem, ScrollArea, ScrollAreaPrimitive, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Slider, Spinner, Stepper, StepperContent, StepperCounter, StepperPanel, StepperProgress, Switch, Table, TableBody, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, ThemeProvider, Toaster, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, Tree, TreeDragLine, TreeItem, TreeItemLabel, alertVariants, bannerVariants, buttonGroupVariants, buttonVariants, cn, counterBadgeVariants, fabVariants, selectTriggerVariants, spinnerVariants, toast, toggleVariants, useAudioGauge, useComboboxAnchor, useNotification, useNotificationQueue, useSidebar, useStepper, useTheme };
|