@akira-io/ui 1.3.1 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/blocks.d.ts +100 -10
- package/dist/blocks.js +547 -270
- package/dist/blocks.js.map +1 -1
- package/dist/{chunk-3Z2VGVPI.js → chunk-53V4J7MC.js} +17 -7
- package/dist/chunk-53V4J7MC.js.map +1 -0
- package/dist/chunk-BH3B26DK.js +394 -0
- package/dist/chunk-BH3B26DK.js.map +1 -0
- package/dist/chunk-BP2YDMMI.js +29 -0
- package/dist/chunk-BP2YDMMI.js.map +1 -0
- package/dist/chunk-BR3JI3KN.js +458 -0
- package/dist/chunk-BR3JI3KN.js.map +1 -0
- package/dist/{chunk-YBXRJSR3.js → chunk-CAUTXZ4U.js} +15 -7
- package/dist/chunk-CAUTXZ4U.js.map +1 -0
- package/dist/{chunk-I6VVCFZ2.js → chunk-DPLCEU34.js} +342 -238
- package/dist/chunk-DPLCEU34.js.map +1 -0
- package/dist/chunk-IQMRJXEO.js +5 -4
- package/dist/chunk-IQMRJXEO.js.map +1 -1
- package/dist/chunk-L2H5GIF7.js +5 -4
- package/dist/chunk-L2H5GIF7.js.map +1 -1
- package/dist/{chunk-2V6HUWST.js → chunk-NKPFIA32.js} +19 -6
- package/dist/chunk-NKPFIA32.js.map +1 -0
- package/dist/{chunk-QNF4LJVT.js → chunk-OS7YY5R4.js} +8 -6
- package/dist/chunk-OS7YY5R4.js.map +1 -0
- package/dist/{chunk-IDNOI4OK.js → chunk-PCYYU332.js} +15 -8
- package/dist/chunk-PCYYU332.js.map +1 -0
- package/dist/{chunk-KHOA4TEI.js → chunk-PPWJK5T3.js} +60 -25
- package/dist/chunk-PPWJK5T3.js.map +1 -0
- package/dist/{chunk-N2KIFFI7.js → chunk-QZRSQVCN.js} +30 -34
- package/dist/chunk-QZRSQVCN.js.map +1 -0
- package/dist/{chunk-SZUXATOF.js → chunk-XLAOE5MV.js} +170 -76
- package/dist/chunk-XLAOE5MV.js.map +1 -0
- package/dist/{chunk-B3L6PRLX.js → chunk-ZQXZ4UGE.js} +208 -100
- package/dist/chunk-ZQXZ4UGE.js.map +1 -0
- package/dist/code.d.ts +2 -2
- package/dist/code.js +96 -52
- package/dist/code.js.map +1 -1
- package/dist/{context-OwSoVEri.d.ts → context-2wTOwxCk.d.ts} +13 -5
- package/dist/editor.d.ts +1 -1
- package/dist/editor.js +135 -52
- package/dist/editor.js.map +1 -1
- package/dist/{field-DWm5NXeV.d.ts → field-C1TdmC2t.d.ts} +1 -1
- package/dist/index.d.ts +15 -12
- package/dist/index.js +1105 -633
- package/dist/index.js.map +1 -1
- package/dist/inertia.d.ts +11 -3
- package/dist/inertia.js +66 -12
- package/dist/inertia.js.map +1 -1
- package/dist/{input-Dxnsxi-f.d.ts → input-B4uEClxB.d.ts} +1 -1
- package/dist/{json-viewer-BARA2RCW.d.ts → json-viewer-Bssv9mTD.d.ts} +1 -1
- package/dist/locales/fr.d.ts +44 -0
- package/dist/locales/fr.js +248 -0
- package/dist/locales/fr.js.map +1 -0
- package/dist/locales/pt.d.ts +10 -9
- package/dist/locales/pt.js +40 -3
- package/dist/locales/pt.js.map +1 -1
- package/dist/shells.d.ts +46 -5
- package/dist/shells.js +211 -71
- package/dist/shells.js.map +1 -1
- package/dist/{sidebar-Bp6Q46j-.d.ts → sidebar-BLL2tgTt.d.ts} +2 -2
- package/dist/types-1LUmNJf_.d.ts +41 -0
- package/dist/{types-cmBL8zOc.d.ts → types-CMZRvMV5.d.ts} +1 -1
- package/dist/{types-B-eGPoFD.d.ts → types-CfAUvz--.d.ts} +1 -1
- package/package.json +8 -2
- package/theme.css +11 -0
- package/dist/chunk-2V6HUWST.js.map +0 -1
- package/dist/chunk-3Z2VGVPI.js.map +0 -1
- package/dist/chunk-B3L6PRLX.js.map +0 -1
- package/dist/chunk-I6VVCFZ2.js.map +0 -1
- package/dist/chunk-IDNOI4OK.js.map +0 -1
- package/dist/chunk-KHOA4TEI.js.map +0 -1
- package/dist/chunk-N2KIFFI7.js.map +0 -1
- package/dist/chunk-NGMG2UWX.js +0 -172
- package/dist/chunk-NGMG2UWX.js.map +0 -1
- package/dist/chunk-QNF4LJVT.js.map +0 -1
- package/dist/chunk-SZUXATOF.js.map +0 -1
- package/dist/chunk-YBXRJSR3.js.map +0 -1
- package/dist/types-u1qfmJQi.d.ts +0 -28
|
@@ -1,22 +1,45 @@
|
|
|
1
|
-
|
|
2
|
-
import { useUiLabels } from './chunk-QNF4LJVT.js';
|
|
3
|
-
import { Input } from './chunk-3Z2VGVPI.js';
|
|
4
|
-
import { elevatedSurface, cn, panelSurface, glassControl, controlFill, focusRing, nestedSurfaceReset, fieldSurface, fieldFocus, Button, buttonVariants, modalSurface, menuSurface } from './chunk-KHOA4TEI.js';
|
|
5
|
-
import { Minus, AlertCircle, ChevronRight, ChevronLeftIcon, ChevronRightIcon, ChevronDownIcon, SearchIcon, SearchXIcon, CheckIcon, ChevronUpIcon, ArrowLeftIcon, XIcon } from 'lucide-react';
|
|
6
|
-
import * as React6 from 'react';
|
|
7
|
-
import { useId, useState, useEffect } from 'react';
|
|
8
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
9
|
-
import { cva } from 'class-variance-authority';
|
|
10
|
-
import { getDefaultClassNames, DayPicker } from 'react-day-picker';
|
|
11
|
-
import { Command as Command$1 } from 'cmdk';
|
|
12
|
-
import { Popover as Popover$1 } from 'radix-ui';
|
|
13
|
-
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
14
|
-
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
15
|
-
import { createPortal } from 'react-dom';
|
|
16
|
-
import { OTPInput, OTPInputContext } from 'input-otp';
|
|
17
|
-
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
18
|
-
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
1
|
+
'use client';
|
|
19
2
|
|
|
3
|
+
import {
|
|
4
|
+
Dialog,
|
|
5
|
+
DialogContent,
|
|
6
|
+
DialogDescription,
|
|
7
|
+
DialogFooter,
|
|
8
|
+
DialogHeader,
|
|
9
|
+
DialogTitle
|
|
10
|
+
} from "./chunk-QZRSQVCN.js";
|
|
11
|
+
import {
|
|
12
|
+
useUiLabels
|
|
13
|
+
} from "./chunk-OS7YY5R4.js";
|
|
14
|
+
import {
|
|
15
|
+
Label
|
|
16
|
+
} from "./chunk-BP2YDMMI.js";
|
|
17
|
+
import {
|
|
18
|
+
Input
|
|
19
|
+
} from "./chunk-53V4J7MC.js";
|
|
20
|
+
import {
|
|
21
|
+
Button,
|
|
22
|
+
buttonVariants,
|
|
23
|
+
cn,
|
|
24
|
+
controlFill,
|
|
25
|
+
elevatedSurface,
|
|
26
|
+
fieldFocus,
|
|
27
|
+
fieldSurface,
|
|
28
|
+
focusRing,
|
|
29
|
+
glassControl,
|
|
30
|
+
menuSurface,
|
|
31
|
+
modalSurface,
|
|
32
|
+
nestedSurfaceReset,
|
|
33
|
+
panelSurface,
|
|
34
|
+
scrollEdgeTransition,
|
|
35
|
+
scrollShadowFromBottom,
|
|
36
|
+
scrollShadowFromTop
|
|
37
|
+
} from "./chunk-PPWJK5T3.js";
|
|
38
|
+
|
|
39
|
+
// src/components/ui/confirm-dialog.tsx
|
|
40
|
+
import { AlertCircle, ChevronRight } from "lucide-react";
|
|
41
|
+
import { useEffect, useId, useState } from "react";
|
|
42
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
20
43
|
var confirmDialogDefaultLabels = {
|
|
21
44
|
title: "Confirm Action",
|
|
22
45
|
description: "Are you sure you want to continue? This action cannot be undone.",
|
|
@@ -131,84 +154,19 @@ function ConfirmDialog({
|
|
|
131
154
|
] }) })
|
|
132
155
|
] }) });
|
|
133
156
|
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
);
|
|
150
|
-
var alertDefaultLabels = {
|
|
151
|
-
warningLabel: "Warning",
|
|
152
|
-
infoLabel: "Information"
|
|
153
|
-
};
|
|
154
|
-
var SEVERITY_LABELS = {
|
|
155
|
-
warning: "warningLabel",
|
|
156
|
-
info: "infoLabel"
|
|
157
|
-
};
|
|
158
|
-
function Alert({
|
|
159
|
-
className,
|
|
160
|
-
variant,
|
|
161
|
-
labels,
|
|
162
|
-
slotName = "alert",
|
|
163
|
-
...props
|
|
164
|
-
}) {
|
|
165
|
-
const resolved = useUiLabels("alert", alertDefaultLabels, labels);
|
|
166
|
-
const severity = variant ? SEVERITY_LABELS[variant] : void 0;
|
|
167
|
-
return /* @__PURE__ */ jsx(
|
|
168
|
-
"div",
|
|
169
|
-
{
|
|
170
|
-
role: "alert",
|
|
171
|
-
"aria-label": severity ? resolved[severity] : void 0,
|
|
172
|
-
className: cn(alertVariants({ variant }), className),
|
|
173
|
-
...props,
|
|
174
|
-
"data-slot": slotName
|
|
175
|
-
}
|
|
176
|
-
);
|
|
177
|
-
}
|
|
178
|
-
function AlertTitle({
|
|
179
|
-
className,
|
|
180
|
-
slotName = "alert-title",
|
|
181
|
-
...props
|
|
182
|
-
}) {
|
|
183
|
-
return /* @__PURE__ */ jsx(
|
|
184
|
-
"div",
|
|
185
|
-
{
|
|
186
|
-
className: cn(
|
|
187
|
-
"min-h-4 font-medium tracking-tight col-start-2 line-clamp-1",
|
|
188
|
-
className
|
|
189
|
-
),
|
|
190
|
-
...props,
|
|
191
|
-
"data-slot": slotName
|
|
192
|
-
}
|
|
193
|
-
);
|
|
194
|
-
}
|
|
195
|
-
function AlertDescription({
|
|
196
|
-
className,
|
|
197
|
-
slotName = "alert-description",
|
|
198
|
-
...props
|
|
199
|
-
}) {
|
|
200
|
-
return /* @__PURE__ */ jsx(
|
|
201
|
-
"div",
|
|
202
|
-
{
|
|
203
|
-
className: cn(
|
|
204
|
-
"gap-1 text-sm [&_p]:leading-relaxed col-start-2 grid justify-items-start text-muted-foreground",
|
|
205
|
-
className
|
|
206
|
-
),
|
|
207
|
-
...props,
|
|
208
|
-
"data-slot": slotName
|
|
209
|
-
}
|
|
210
|
-
);
|
|
211
|
-
}
|
|
157
|
+
|
|
158
|
+
// src/components/ui/calendar.tsx
|
|
159
|
+
import {
|
|
160
|
+
ChevronDownIcon,
|
|
161
|
+
ChevronLeftIcon,
|
|
162
|
+
ChevronRightIcon
|
|
163
|
+
} from "lucide-react";
|
|
164
|
+
import * as React from "react";
|
|
165
|
+
import {
|
|
166
|
+
DayPicker,
|
|
167
|
+
getDefaultClassNames
|
|
168
|
+
} from "react-day-picker";
|
|
169
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
212
170
|
function Calendar({
|
|
213
171
|
className,
|
|
214
172
|
classNames,
|
|
@@ -221,7 +179,7 @@ function Calendar({
|
|
|
221
179
|
...props
|
|
222
180
|
}) {
|
|
223
181
|
const defaultClassNames = getDefaultClassNames();
|
|
224
|
-
return /* @__PURE__ */
|
|
182
|
+
return /* @__PURE__ */ jsx2(
|
|
225
183
|
DayPicker,
|
|
226
184
|
{
|
|
227
185
|
showOutsideDays,
|
|
@@ -335,7 +293,7 @@ function Calendar({
|
|
|
335
293
|
},
|
|
336
294
|
components: {
|
|
337
295
|
Root: ({ className: className2, rootRef, ...props2 }) => {
|
|
338
|
-
return /* @__PURE__ */
|
|
296
|
+
return /* @__PURE__ */ jsx2(
|
|
339
297
|
"div",
|
|
340
298
|
{
|
|
341
299
|
ref: rootRef,
|
|
@@ -347,7 +305,7 @@ function Calendar({
|
|
|
347
305
|
},
|
|
348
306
|
Chevron: ({ className: className2, orientation, ...props2 }) => {
|
|
349
307
|
if (orientation === "left") {
|
|
350
|
-
return /* @__PURE__ */
|
|
308
|
+
return /* @__PURE__ */ jsx2(
|
|
351
309
|
ChevronLeftIcon,
|
|
352
310
|
{
|
|
353
311
|
className: cn("size-4", className2),
|
|
@@ -356,7 +314,7 @@ function Calendar({
|
|
|
356
314
|
);
|
|
357
315
|
}
|
|
358
316
|
if (orientation === "right") {
|
|
359
|
-
return /* @__PURE__ */
|
|
317
|
+
return /* @__PURE__ */ jsx2(
|
|
360
318
|
ChevronRightIcon,
|
|
361
319
|
{
|
|
362
320
|
className: cn("size-4", className2),
|
|
@@ -364,7 +322,7 @@ function Calendar({
|
|
|
364
322
|
}
|
|
365
323
|
);
|
|
366
324
|
}
|
|
367
|
-
return /* @__PURE__ */
|
|
325
|
+
return /* @__PURE__ */ jsx2(
|
|
368
326
|
ChevronDownIcon,
|
|
369
327
|
{
|
|
370
328
|
className: cn("size-4", className2),
|
|
@@ -374,7 +332,7 @@ function Calendar({
|
|
|
374
332
|
},
|
|
375
333
|
DayButton: CalendarDayButton,
|
|
376
334
|
WeekNumber: ({ children, ...props2 }) => {
|
|
377
|
-
return /* @__PURE__ */
|
|
335
|
+
return /* @__PURE__ */ jsx2("td", { ...props2, children: /* @__PURE__ */ jsx2("div", { className: "flex size-(--cell-size) items-center justify-center text-center", children }) });
|
|
378
336
|
},
|
|
379
337
|
...components
|
|
380
338
|
},
|
|
@@ -389,11 +347,11 @@ function CalendarDayButton({
|
|
|
389
347
|
...props
|
|
390
348
|
}) {
|
|
391
349
|
const defaultClassNames = getDefaultClassNames();
|
|
392
|
-
const ref =
|
|
393
|
-
|
|
350
|
+
const ref = React.useRef(null);
|
|
351
|
+
React.useEffect(() => {
|
|
394
352
|
if (modifiers.focused) ref.current?.focus();
|
|
395
353
|
}, [modifiers.focused]);
|
|
396
|
-
return /* @__PURE__ */
|
|
354
|
+
return /* @__PURE__ */ jsx2(
|
|
397
355
|
Button,
|
|
398
356
|
{
|
|
399
357
|
ref,
|
|
@@ -413,13 +371,18 @@ function CalendarDayButton({
|
|
|
413
371
|
}
|
|
414
372
|
);
|
|
415
373
|
}
|
|
374
|
+
|
|
375
|
+
// src/components/ui/command.tsx
|
|
376
|
+
import { Command as CommandPrimitive } from "cmdk";
|
|
377
|
+
import { SearchIcon, SearchXIcon } from "lucide-react";
|
|
378
|
+
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
416
379
|
function Command({
|
|
417
380
|
className,
|
|
418
381
|
slotName = "command",
|
|
419
382
|
...props
|
|
420
383
|
}) {
|
|
421
|
-
return /* @__PURE__ */
|
|
422
|
-
|
|
384
|
+
return /* @__PURE__ */ jsx3(
|
|
385
|
+
CommandPrimitive,
|
|
423
386
|
{
|
|
424
387
|
className: cn(
|
|
425
388
|
elevatedSurface,
|
|
@@ -440,12 +403,12 @@ function CommandDialog({
|
|
|
440
403
|
hideCloseButton = true,
|
|
441
404
|
...props
|
|
442
405
|
}) {
|
|
443
|
-
return /* @__PURE__ */
|
|
444
|
-
/* @__PURE__ */
|
|
445
|
-
/* @__PURE__ */
|
|
446
|
-
/* @__PURE__ */
|
|
406
|
+
return /* @__PURE__ */ jsxs2(Dialog, { ...props, children: [
|
|
407
|
+
/* @__PURE__ */ jsxs2(DialogHeader, { className: "sr-only", children: [
|
|
408
|
+
/* @__PURE__ */ jsx3(DialogTitle, { children: title }),
|
|
409
|
+
/* @__PURE__ */ jsx3(DialogDescription, { children: description })
|
|
447
410
|
] }),
|
|
448
|
-
/* @__PURE__ */
|
|
411
|
+
/* @__PURE__ */ jsx3(
|
|
449
412
|
DialogContent,
|
|
450
413
|
{
|
|
451
414
|
className: cn(
|
|
@@ -453,7 +416,7 @@ function CommandDialog({
|
|
|
453
416
|
className
|
|
454
417
|
),
|
|
455
418
|
hideCloseButton,
|
|
456
|
-
children: /* @__PURE__ */
|
|
419
|
+
children: /* @__PURE__ */ jsx3(Command, { className: "[&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-item]]:py-2.5 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children })
|
|
457
420
|
}
|
|
458
421
|
)
|
|
459
422
|
] });
|
|
@@ -463,7 +426,7 @@ function CommandInput({
|
|
|
463
426
|
slotName = "command-input",
|
|
464
427
|
...props
|
|
465
428
|
}) {
|
|
466
|
-
return /* @__PURE__ */
|
|
429
|
+
return /* @__PURE__ */ jsx3("div", { className: "shrink-0 border-b border-border", children: /* @__PURE__ */ jsxs2(
|
|
467
430
|
"div",
|
|
468
431
|
{
|
|
469
432
|
"data-slot": "command-input-wrapper",
|
|
@@ -472,9 +435,9 @@ function CommandInput({
|
|
|
472
435
|
"h-11 gap-3 px-4 m-3 flex items-center"
|
|
473
436
|
),
|
|
474
437
|
children: [
|
|
475
|
-
/* @__PURE__ */
|
|
476
|
-
/* @__PURE__ */
|
|
477
|
-
|
|
438
|
+
/* @__PURE__ */ jsx3(SearchIcon, { className: "size-4 shrink-0 opacity-50" }),
|
|
439
|
+
/* @__PURE__ */ jsx3(
|
|
440
|
+
CommandPrimitive.Input,
|
|
478
441
|
{
|
|
479
442
|
className: cn(
|
|
480
443
|
"h-11 text-base sm:text-sm font-medium flex w-full bg-transparent outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
@@ -493,8 +456,8 @@ function CommandList({
|
|
|
493
456
|
slotName = "command-list",
|
|
494
457
|
...props
|
|
495
458
|
}) {
|
|
496
|
-
return /* @__PURE__ */
|
|
497
|
-
|
|
459
|
+
return /* @__PURE__ */ jsx3(
|
|
460
|
+
CommandPrimitive.List,
|
|
498
461
|
{
|
|
499
462
|
className: cn(
|
|
500
463
|
"scroll-py-1 max-h-[300px] overflow-x-hidden overflow-y-auto",
|
|
@@ -511,8 +474,8 @@ function CommandEmpty({
|
|
|
511
474
|
slotName = "command-empty",
|
|
512
475
|
...props
|
|
513
476
|
}) {
|
|
514
|
-
return /* @__PURE__ */
|
|
515
|
-
|
|
477
|
+
return /* @__PURE__ */ jsxs2(
|
|
478
|
+
CommandPrimitive.Empty,
|
|
516
479
|
{
|
|
517
480
|
className: cn(
|
|
518
481
|
"gap-3 px-6 py-10 flex flex-col items-center justify-center text-center",
|
|
@@ -521,8 +484,8 @@ function CommandEmpty({
|
|
|
521
484
|
...props,
|
|
522
485
|
"data-slot": slotName,
|
|
523
486
|
children: [
|
|
524
|
-
/* @__PURE__ */
|
|
525
|
-
/* @__PURE__ */
|
|
487
|
+
/* @__PURE__ */ jsx3("span", { className: "size-10 flex items-center justify-center rounded-full bg-surface-recessed text-muted-foreground", children: /* @__PURE__ */ jsx3(SearchXIcon, { className: "size-5" }) }),
|
|
488
|
+
/* @__PURE__ */ jsx3("span", { className: "text-sm text-muted-foreground", children })
|
|
526
489
|
]
|
|
527
490
|
}
|
|
528
491
|
);
|
|
@@ -532,8 +495,8 @@ function CommandGroup({
|
|
|
532
495
|
slotName = "command-group",
|
|
533
496
|
...props
|
|
534
497
|
}) {
|
|
535
|
-
return /* @__PURE__ */
|
|
536
|
-
|
|
498
|
+
return /* @__PURE__ */ jsx3(
|
|
499
|
+
CommandPrimitive.Group,
|
|
537
500
|
{
|
|
538
501
|
className: cn(
|
|
539
502
|
"p-3 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium overflow-hidden text-foreground [&_[cmdk-group-heading]]:text-muted-foreground",
|
|
@@ -549,8 +512,8 @@ function CommandSeparator({
|
|
|
549
512
|
slotName = "command-separator",
|
|
550
513
|
...props
|
|
551
514
|
}) {
|
|
552
|
-
return /* @__PURE__ */
|
|
553
|
-
|
|
515
|
+
return /* @__PURE__ */ jsx3(
|
|
516
|
+
CommandPrimitive.Separator,
|
|
554
517
|
{
|
|
555
518
|
className: cn("mx-3 h-px bg-border", className),
|
|
556
519
|
...props,
|
|
@@ -563,8 +526,8 @@ function CommandItem({
|
|
|
563
526
|
slotName = "command-item",
|
|
564
527
|
...props
|
|
565
528
|
}) {
|
|
566
|
-
return /* @__PURE__ */
|
|
567
|
-
|
|
529
|
+
return /* @__PURE__ */ jsx3(
|
|
530
|
+
CommandPrimitive.Item,
|
|
568
531
|
{
|
|
569
532
|
className: cn(
|
|
570
533
|
"gap-2 px-2 py-1.5 text-sm [&_svg:not([class*='size-'])]:size-4 rounded-xl relative flex cursor-default items-center outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
@@ -580,7 +543,7 @@ function CommandShortcut({
|
|
|
580
543
|
slotName = "command-shortcut",
|
|
581
544
|
...props
|
|
582
545
|
}) {
|
|
583
|
-
return /* @__PURE__ */
|
|
546
|
+
return /* @__PURE__ */ jsx3(
|
|
584
547
|
"span",
|
|
585
548
|
{
|
|
586
549
|
className: cn(
|
|
@@ -592,18 +555,23 @@ function CommandShortcut({
|
|
|
592
555
|
}
|
|
593
556
|
);
|
|
594
557
|
}
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
558
|
+
|
|
559
|
+
// src/components/ui/popover.tsx
|
|
560
|
+
import { Popover as PopoverPrimitive } from "radix-ui";
|
|
561
|
+
import * as React2 from "react";
|
|
562
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
563
|
+
var Popover = PopoverPrimitive.Root;
|
|
564
|
+
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
565
|
+
var PopoverAnchor = PopoverPrimitive.Anchor;
|
|
566
|
+
var PopoverContent = React2.forwardRef(
|
|
599
567
|
({
|
|
600
568
|
className,
|
|
601
569
|
align = "center",
|
|
602
570
|
sideOffset = 4,
|
|
603
571
|
slotName = "popover-content",
|
|
604
572
|
...props
|
|
605
|
-
}, ref) => /* @__PURE__ */
|
|
606
|
-
|
|
573
|
+
}, ref) => /* @__PURE__ */ jsx4(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx4(
|
|
574
|
+
PopoverPrimitive.Content,
|
|
607
575
|
{
|
|
608
576
|
ref,
|
|
609
577
|
align,
|
|
@@ -617,24 +585,29 @@ var PopoverContent = React6.forwardRef(
|
|
|
617
585
|
}
|
|
618
586
|
) })
|
|
619
587
|
);
|
|
620
|
-
PopoverContent.displayName =
|
|
588
|
+
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
589
|
+
|
|
590
|
+
// src/components/ui/select.tsx
|
|
591
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
592
|
+
import { CheckIcon, ChevronDownIcon as ChevronDownIcon2, ChevronUpIcon } from "lucide-react";
|
|
593
|
+
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
621
594
|
function Select({
|
|
622
595
|
slotName = "select",
|
|
623
596
|
...props
|
|
624
597
|
}) {
|
|
625
|
-
return /* @__PURE__ */
|
|
598
|
+
return /* @__PURE__ */ jsx5(SelectPrimitive.Root, { ...props, "data-slot": slotName });
|
|
626
599
|
}
|
|
627
600
|
function SelectGroup({
|
|
628
601
|
slotName = "select-group",
|
|
629
602
|
...props
|
|
630
603
|
}) {
|
|
631
|
-
return /* @__PURE__ */
|
|
604
|
+
return /* @__PURE__ */ jsx5(SelectPrimitive.Group, { ...props, "data-slot": slotName });
|
|
632
605
|
}
|
|
633
606
|
function SelectValue({
|
|
634
607
|
slotName = "select-value",
|
|
635
608
|
...props
|
|
636
609
|
}) {
|
|
637
|
-
return /* @__PURE__ */
|
|
610
|
+
return /* @__PURE__ */ jsx5(SelectPrimitive.Value, { ...props, "data-slot": slotName });
|
|
638
611
|
}
|
|
639
612
|
function SelectTrigger({
|
|
640
613
|
className,
|
|
@@ -642,7 +615,7 @@ function SelectTrigger({
|
|
|
642
615
|
slotName = "select-trigger",
|
|
643
616
|
...props
|
|
644
617
|
}) {
|
|
645
|
-
return /* @__PURE__ */
|
|
618
|
+
return /* @__PURE__ */ jsxs3(
|
|
646
619
|
SelectPrimitive.Trigger,
|
|
647
620
|
{
|
|
648
621
|
className: cn(
|
|
@@ -653,7 +626,7 @@ function SelectTrigger({
|
|
|
653
626
|
"data-slot": slotName,
|
|
654
627
|
children: [
|
|
655
628
|
children,
|
|
656
|
-
/* @__PURE__ */
|
|
629
|
+
/* @__PURE__ */ jsx5(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx5(ChevronDownIcon2, { className: "size-4 opacity-50" }) })
|
|
657
630
|
]
|
|
658
631
|
}
|
|
659
632
|
);
|
|
@@ -665,7 +638,7 @@ function SelectContent({
|
|
|
665
638
|
slotName = "select-content",
|
|
666
639
|
...props
|
|
667
640
|
}) {
|
|
668
|
-
return /* @__PURE__ */
|
|
641
|
+
return /* @__PURE__ */ jsx5(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs3(
|
|
669
642
|
SelectPrimitive.Content,
|
|
670
643
|
{
|
|
671
644
|
className: cn(
|
|
@@ -677,8 +650,8 @@ function SelectContent({
|
|
|
677
650
|
...props,
|
|
678
651
|
"data-slot": slotName,
|
|
679
652
|
children: [
|
|
680
|
-
/* @__PURE__ */
|
|
681
|
-
/* @__PURE__ */
|
|
653
|
+
/* @__PURE__ */ jsx5(SelectScrollUpButton, {}),
|
|
654
|
+
/* @__PURE__ */ jsx5(
|
|
682
655
|
SelectPrimitive.Viewport,
|
|
683
656
|
{
|
|
684
657
|
className: cn(
|
|
@@ -688,7 +661,7 @@ function SelectContent({
|
|
|
688
661
|
children
|
|
689
662
|
}
|
|
690
663
|
),
|
|
691
|
-
/* @__PURE__ */
|
|
664
|
+
/* @__PURE__ */ jsx5(SelectScrollDownButton, {})
|
|
692
665
|
]
|
|
693
666
|
}
|
|
694
667
|
) });
|
|
@@ -698,7 +671,7 @@ function SelectLabel({
|
|
|
698
671
|
slotName = "select-label",
|
|
699
672
|
...props
|
|
700
673
|
}) {
|
|
701
|
-
return /* @__PURE__ */
|
|
674
|
+
return /* @__PURE__ */ jsx5(
|
|
702
675
|
SelectPrimitive.Label,
|
|
703
676
|
{
|
|
704
677
|
className: cn(
|
|
@@ -716,7 +689,7 @@ function SelectItem({
|
|
|
716
689
|
slotName = "select-item",
|
|
717
690
|
...props
|
|
718
691
|
}) {
|
|
719
|
-
return /* @__PURE__ */
|
|
692
|
+
return /* @__PURE__ */ jsxs3(
|
|
720
693
|
SelectPrimitive.Item,
|
|
721
694
|
{
|
|
722
695
|
className: cn(
|
|
@@ -726,8 +699,8 @@ function SelectItem({
|
|
|
726
699
|
...props,
|
|
727
700
|
"data-slot": slotName,
|
|
728
701
|
children: [
|
|
729
|
-
/* @__PURE__ */
|
|
730
|
-
/* @__PURE__ */
|
|
702
|
+
/* @__PURE__ */ jsx5("span", { className: "right-2 size-3.5 absolute flex items-center justify-center", children: /* @__PURE__ */ jsx5(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx5(CheckIcon, { className: "size-4" }) }) }),
|
|
703
|
+
/* @__PURE__ */ jsx5(SelectPrimitive.ItemText, { children })
|
|
731
704
|
]
|
|
732
705
|
}
|
|
733
706
|
);
|
|
@@ -737,7 +710,7 @@ function SelectSeparator({
|
|
|
737
710
|
slotName = "select-separator",
|
|
738
711
|
...props
|
|
739
712
|
}) {
|
|
740
|
-
return /* @__PURE__ */
|
|
713
|
+
return /* @__PURE__ */ jsx5(
|
|
741
714
|
SelectPrimitive.Separator,
|
|
742
715
|
{
|
|
743
716
|
className: cn(
|
|
@@ -754,7 +727,7 @@ function SelectScrollUpButton({
|
|
|
754
727
|
slotName = "select-scroll-up-button",
|
|
755
728
|
...props
|
|
756
729
|
}) {
|
|
757
|
-
return /* @__PURE__ */
|
|
730
|
+
return /* @__PURE__ */ jsx5(
|
|
758
731
|
SelectPrimitive.ScrollUpButton,
|
|
759
732
|
{
|
|
760
733
|
className: cn(
|
|
@@ -763,7 +736,7 @@ function SelectScrollUpButton({
|
|
|
763
736
|
),
|
|
764
737
|
...props,
|
|
765
738
|
"data-slot": slotName,
|
|
766
|
-
children: /* @__PURE__ */
|
|
739
|
+
children: /* @__PURE__ */ jsx5(ChevronUpIcon, { className: "size-4" })
|
|
767
740
|
}
|
|
768
741
|
);
|
|
769
742
|
}
|
|
@@ -772,7 +745,7 @@ function SelectScrollDownButton({
|
|
|
772
745
|
slotName = "select-scroll-down-button",
|
|
773
746
|
...props
|
|
774
747
|
}) {
|
|
775
|
-
return /* @__PURE__ */
|
|
748
|
+
return /* @__PURE__ */ jsx5(
|
|
776
749
|
SelectPrimitive.ScrollDownButton,
|
|
777
750
|
{
|
|
778
751
|
className: cn(
|
|
@@ -781,53 +754,21 @@ function SelectScrollDownButton({
|
|
|
781
754
|
),
|
|
782
755
|
...props,
|
|
783
756
|
"data-slot": slotName,
|
|
784
|
-
children: /* @__PURE__ */
|
|
785
|
-
}
|
|
786
|
-
);
|
|
787
|
-
}
|
|
788
|
-
var FieldContext = React6.createContext(null);
|
|
789
|
-
function useOptionalField() {
|
|
790
|
-
return React6.useContext(FieldContext);
|
|
791
|
-
}
|
|
792
|
-
function useField() {
|
|
793
|
-
const field = useOptionalField();
|
|
794
|
-
if (!field) {
|
|
795
|
-
throw new Error("Field parts must be rendered inside a Field.");
|
|
796
|
-
}
|
|
797
|
-
return field;
|
|
798
|
-
}
|
|
799
|
-
function FieldError({
|
|
800
|
-
message,
|
|
801
|
-
className,
|
|
802
|
-
slotName = "field-error",
|
|
803
|
-
...props
|
|
804
|
-
}) {
|
|
805
|
-
const field = useOptionalField();
|
|
806
|
-
if (!message) {
|
|
807
|
-
return null;
|
|
808
|
-
}
|
|
809
|
-
return /* @__PURE__ */ jsx(
|
|
810
|
-
"p",
|
|
811
|
-
{
|
|
812
|
-
id: field?.errorId,
|
|
813
|
-
className: cn(
|
|
814
|
-
"ml-1 text-xs font-medium text-destructive group-data-[orientation=horizontal]/field:col-span-2 group-data-[orientation=horizontal]/field:row-start-3",
|
|
815
|
-
className
|
|
816
|
-
),
|
|
817
|
-
...props,
|
|
818
|
-
"data-slot": slotName,
|
|
819
|
-
children: message
|
|
757
|
+
children: /* @__PURE__ */ jsx5(ChevronDownIcon2, { className: "size-4" })
|
|
820
758
|
}
|
|
821
759
|
);
|
|
822
760
|
}
|
|
761
|
+
|
|
762
|
+
// src/components/ui/floating-sheet-context.ts
|
|
763
|
+
import * as React3 from "react";
|
|
823
764
|
var floatingSheetDefaultLabels = {
|
|
824
765
|
backLabel: "Back",
|
|
825
766
|
closeLabel: "Close"
|
|
826
767
|
};
|
|
827
768
|
var FLOATING_SHEET_OFFSET_LIMIT = 3;
|
|
828
|
-
var FloatingSheetStackContext =
|
|
769
|
+
var FloatingSheetStackContext = React3.createContext(null);
|
|
829
770
|
function useFloatingSheetStack() {
|
|
830
|
-
const context =
|
|
771
|
+
const context = React3.useContext(FloatingSheetStackContext);
|
|
831
772
|
if (!context) {
|
|
832
773
|
throw new Error(
|
|
833
774
|
"FloatingSheet must be rendered inside a FloatingSheetStack."
|
|
@@ -835,6 +776,17 @@ function useFloatingSheetStack() {
|
|
|
835
776
|
}
|
|
836
777
|
return context;
|
|
837
778
|
}
|
|
779
|
+
var floatingSheetDefaultEdges = {
|
|
780
|
+
top: true,
|
|
781
|
+
bottom: true
|
|
782
|
+
};
|
|
783
|
+
var FloatingSheetEdgesContext = React3.createContext(floatingSheetDefaultEdges);
|
|
784
|
+
var FloatingSheetReportEdgesContext = React3.createContext(null);
|
|
785
|
+
|
|
786
|
+
// src/components/ui/floating-sheet-stack.tsx
|
|
787
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
788
|
+
import * as React4 from "react";
|
|
789
|
+
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
838
790
|
function FloatingSheetStack({
|
|
839
791
|
children,
|
|
840
792
|
labels,
|
|
@@ -845,22 +797,22 @@ function FloatingSheetStack({
|
|
|
845
797
|
floatingSheetDefaultLabels,
|
|
846
798
|
labels
|
|
847
799
|
);
|
|
848
|
-
const [entries, setEntries] =
|
|
849
|
-
const [container, setContainer] =
|
|
850
|
-
const register =
|
|
800
|
+
const [entries, setEntries] = React4.useState([]);
|
|
801
|
+
const [container, setContainer] = React4.useState(null);
|
|
802
|
+
const register = React4.useCallback((entry) => {
|
|
851
803
|
setEntries(
|
|
852
804
|
(current) => current.some((item) => item.id === entry.id) ? current.map((item) => item.id === entry.id ? entry : item) : [...current, entry]
|
|
853
805
|
);
|
|
854
806
|
}, []);
|
|
855
|
-
const unregister =
|
|
807
|
+
const unregister = React4.useCallback((id) => {
|
|
856
808
|
setEntries((current) => current.filter((item) => item.id !== id));
|
|
857
809
|
}, []);
|
|
858
|
-
const closeAll =
|
|
810
|
+
const closeAll = React4.useCallback(() => {
|
|
859
811
|
for (const entry of [...entries].reverse()) {
|
|
860
812
|
entry.close();
|
|
861
813
|
}
|
|
862
814
|
}, [entries]);
|
|
863
|
-
const value =
|
|
815
|
+
const value = React4.useMemo(
|
|
864
816
|
() => ({
|
|
865
817
|
labels: { backLabel, closeLabel },
|
|
866
818
|
container,
|
|
@@ -880,9 +832,9 @@ function FloatingSheetStack({
|
|
|
880
832
|
]
|
|
881
833
|
);
|
|
882
834
|
const top = entries.at(-1);
|
|
883
|
-
return /* @__PURE__ */
|
|
835
|
+
return /* @__PURE__ */ jsxs4(FloatingSheetStackContext.Provider, { value, children: [
|
|
884
836
|
children,
|
|
885
|
-
/* @__PURE__ */
|
|
837
|
+
/* @__PURE__ */ jsx6(
|
|
886
838
|
DialogPrimitive.Root,
|
|
887
839
|
{
|
|
888
840
|
open: entries.length > 0,
|
|
@@ -891,15 +843,15 @@ function FloatingSheetStack({
|
|
|
891
843
|
closeAll();
|
|
892
844
|
}
|
|
893
845
|
},
|
|
894
|
-
children: /* @__PURE__ */
|
|
895
|
-
/* @__PURE__ */
|
|
846
|
+
children: /* @__PURE__ */ jsxs4(DialogPrimitive.Portal, { children: [
|
|
847
|
+
/* @__PURE__ */ jsx6(
|
|
896
848
|
DialogPrimitive.Overlay,
|
|
897
849
|
{
|
|
898
850
|
"data-slot": "floating-sheet-overlay",
|
|
899
851
|
className: "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 inset-0 bg-black/60 backdrop-blur-sm fixed z-50"
|
|
900
852
|
}
|
|
901
853
|
),
|
|
902
|
-
/* @__PURE__ */
|
|
854
|
+
/* @__PURE__ */ jsxs4(
|
|
903
855
|
DialogPrimitive.Content,
|
|
904
856
|
{
|
|
905
857
|
"aria-describedby": void 0,
|
|
@@ -919,8 +871,8 @@ function FloatingSheetStack({
|
|
|
919
871
|
className: "inset-2 sm:inset-y-4 sm:right-4 sm:left-auto sm:w-[calc(100vw-2rem)] sm:max-w-lg sm:p-0 fixed z-50 p-[env(safe-area-inset-top)_env(safe-area-inset-right)_env(safe-area-inset-bottom)_env(safe-area-inset-left)] outline-none",
|
|
920
872
|
"data-slot": slotName,
|
|
921
873
|
children: [
|
|
922
|
-
/* @__PURE__ */
|
|
923
|
-
/* @__PURE__ */
|
|
874
|
+
/* @__PURE__ */ jsx6(DialogPrimitive.Title, { className: "sr-only", children: top?.title }),
|
|
875
|
+
/* @__PURE__ */ jsx6(
|
|
924
876
|
"div",
|
|
925
877
|
{
|
|
926
878
|
ref: setContainer,
|
|
@@ -936,6 +888,53 @@ function FloatingSheetStack({
|
|
|
936
888
|
)
|
|
937
889
|
] });
|
|
938
890
|
}
|
|
891
|
+
|
|
892
|
+
// src/components/ui/floating-sheet.tsx
|
|
893
|
+
import { ArrowLeftIcon, XIcon } from "lucide-react";
|
|
894
|
+
import * as React6 from "react";
|
|
895
|
+
import { createPortal } from "react-dom";
|
|
896
|
+
|
|
897
|
+
// src/hooks/use-floating-sheet-body-edges.ts
|
|
898
|
+
import * as React5 from "react";
|
|
899
|
+
function useFloatingSheetBodyEdges(containerRef, topSentinelRef, bottomSentinelRef, reportEdges) {
|
|
900
|
+
React5.useEffect(() => {
|
|
901
|
+
const container = containerRef.current;
|
|
902
|
+
const topSentinel = topSentinelRef.current;
|
|
903
|
+
const bottomSentinel = bottomSentinelRef.current;
|
|
904
|
+
if (!reportEdges || !container || !topSentinel || !bottomSentinel || typeof IntersectionObserver === "undefined") {
|
|
905
|
+
return;
|
|
906
|
+
}
|
|
907
|
+
let edges = floatingSheetDefaultEdges;
|
|
908
|
+
const edgeKeyByTarget = /* @__PURE__ */ new Map([
|
|
909
|
+
[topSentinel, "top"],
|
|
910
|
+
[bottomSentinel, "bottom"]
|
|
911
|
+
]);
|
|
912
|
+
const observer = new IntersectionObserver(
|
|
913
|
+
(entries) => {
|
|
914
|
+
const next = { ...edges };
|
|
915
|
+
for (const entry of entries) {
|
|
916
|
+
const key = edgeKeyByTarget.get(entry.target);
|
|
917
|
+
if (!key) {
|
|
918
|
+
continue;
|
|
919
|
+
}
|
|
920
|
+
next[key] = entry.isIntersecting;
|
|
921
|
+
}
|
|
922
|
+
edges = next;
|
|
923
|
+
reportEdges(next);
|
|
924
|
+
},
|
|
925
|
+
{ root: container, threshold: 0 }
|
|
926
|
+
);
|
|
927
|
+
observer.observe(topSentinel);
|
|
928
|
+
observer.observe(bottomSentinel);
|
|
929
|
+
return () => {
|
|
930
|
+
observer.disconnect();
|
|
931
|
+
reportEdges(floatingSheetDefaultEdges);
|
|
932
|
+
};
|
|
933
|
+
}, [containerRef, topSentinelRef, bottomSentinelRef, reportEdges]);
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
// src/components/ui/floating-sheet.tsx
|
|
937
|
+
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
939
938
|
function FloatingSheet({
|
|
940
939
|
open,
|
|
941
940
|
onOpenChange,
|
|
@@ -957,6 +956,9 @@ function FloatingSheet({
|
|
|
957
956
|
const openerRef = React6.useRef(null);
|
|
958
957
|
const panelRef = React6.useRef(null);
|
|
959
958
|
const focusedRef = React6.useRef(false);
|
|
959
|
+
const [edges, setEdges] = React6.useState(
|
|
960
|
+
floatingSheetDefaultEdges
|
|
961
|
+
);
|
|
960
962
|
React6.useEffect(() => {
|
|
961
963
|
closeRef.current = close;
|
|
962
964
|
titleRef.current = title;
|
|
@@ -1009,7 +1011,7 @@ function FloatingSheet({
|
|
|
1009
1011
|
}
|
|
1010
1012
|
const offset = Math.min(depth, FLOATING_SHEET_OFFSET_LIMIT);
|
|
1011
1013
|
return createPortal(
|
|
1012
|
-
/* @__PURE__ */
|
|
1014
|
+
/* @__PURE__ */ jsxs5(
|
|
1013
1015
|
"section",
|
|
1014
1016
|
{
|
|
1015
1017
|
ref: panelRef,
|
|
@@ -1032,13 +1034,17 @@ function FloatingSheet({
|
|
|
1032
1034
|
...props,
|
|
1033
1035
|
"data-slot": slotName,
|
|
1034
1036
|
children: [
|
|
1035
|
-
/* @__PURE__ */
|
|
1037
|
+
/* @__PURE__ */ jsxs5(
|
|
1036
1038
|
"header",
|
|
1037
1039
|
{
|
|
1038
1040
|
"data-slot": "floating-sheet-header",
|
|
1039
|
-
className:
|
|
1041
|
+
className: cn(
|
|
1042
|
+
"gap-1 p-5 relative z-10 flex flex-col",
|
|
1043
|
+
scrollEdgeTransition,
|
|
1044
|
+
!edges.top && scrollShadowFromTop
|
|
1045
|
+
),
|
|
1040
1046
|
children: [
|
|
1041
|
-
index > 0 ? /* @__PURE__ */
|
|
1047
|
+
index > 0 ? /* @__PURE__ */ jsxs5(
|
|
1042
1048
|
"button",
|
|
1043
1049
|
{
|
|
1044
1050
|
type: "button",
|
|
@@ -1049,12 +1055,12 @@ function FloatingSheet({
|
|
|
1049
1055
|
focusRing
|
|
1050
1056
|
),
|
|
1051
1057
|
children: [
|
|
1052
|
-
/* @__PURE__ */
|
|
1058
|
+
/* @__PURE__ */ jsx7(ArrowLeftIcon, { className: "size-4" }),
|
|
1053
1059
|
labels.backLabel
|
|
1054
1060
|
]
|
|
1055
1061
|
}
|
|
1056
1062
|
) : null,
|
|
1057
|
-
/* @__PURE__ */
|
|
1063
|
+
/* @__PURE__ */ jsx7(
|
|
1058
1064
|
"h2",
|
|
1059
1065
|
{
|
|
1060
1066
|
id: titleId,
|
|
@@ -1063,7 +1069,7 @@ function FloatingSheet({
|
|
|
1063
1069
|
children: title
|
|
1064
1070
|
}
|
|
1065
1071
|
),
|
|
1066
|
-
description ? /* @__PURE__ */
|
|
1072
|
+
description ? /* @__PURE__ */ jsx7(
|
|
1067
1073
|
"p",
|
|
1068
1074
|
{
|
|
1069
1075
|
id: descriptionId,
|
|
@@ -1075,8 +1081,8 @@ function FloatingSheet({
|
|
|
1075
1081
|
]
|
|
1076
1082
|
}
|
|
1077
1083
|
),
|
|
1078
|
-
children,
|
|
1079
|
-
/* @__PURE__ */
|
|
1084
|
+
/* @__PURE__ */ jsx7(FloatingSheetReportEdgesContext.Provider, { value: setEdges, children: /* @__PURE__ */ jsx7(FloatingSheetEdgesContext.Provider, { value: edges, children }) }),
|
|
1085
|
+
/* @__PURE__ */ jsx7(
|
|
1080
1086
|
"button",
|
|
1081
1087
|
{
|
|
1082
1088
|
type: "button",
|
|
@@ -1084,10 +1090,10 @@ function FloatingSheet({
|
|
|
1084
1090
|
"aria-label": labels.closeLabel,
|
|
1085
1091
|
onClick: closeAll,
|
|
1086
1092
|
className: cn(
|
|
1087
|
-
"top-4 right-4 size-9 shadow-xs absolute flex items-center justify-center rounded-full border border-border bg-muted text-muted-foreground transition-colors hover:bg-accent hover:text-foreground disabled:pointer-events-none",
|
|
1093
|
+
"top-4 right-4 size-9 shadow-xs absolute z-20 flex items-center justify-center rounded-full border border-border bg-muted text-muted-foreground transition-colors hover:bg-accent hover:text-foreground disabled:pointer-events-none",
|
|
1088
1094
|
focusRing
|
|
1089
1095
|
),
|
|
1090
|
-
children: /* @__PURE__ */
|
|
1096
|
+
children: /* @__PURE__ */ jsx7(XIcon, { className: "size-4" })
|
|
1091
1097
|
}
|
|
1092
1098
|
)
|
|
1093
1099
|
]
|
|
@@ -1099,14 +1105,47 @@ function FloatingSheet({
|
|
|
1099
1105
|
function FloatingSheetBody({
|
|
1100
1106
|
className,
|
|
1101
1107
|
slotName = "floating-sheet-body",
|
|
1108
|
+
children,
|
|
1102
1109
|
...props
|
|
1103
1110
|
}) {
|
|
1104
|
-
|
|
1111
|
+
const reportEdges = React6.useContext(FloatingSheetReportEdgesContext);
|
|
1112
|
+
const containerRef = React6.useRef(null);
|
|
1113
|
+
const topSentinelRef = React6.useRef(null);
|
|
1114
|
+
const bottomSentinelRef = React6.useRef(null);
|
|
1115
|
+
useFloatingSheetBodyEdges(
|
|
1116
|
+
containerRef,
|
|
1117
|
+
topSentinelRef,
|
|
1118
|
+
bottomSentinelRef,
|
|
1119
|
+
reportEdges
|
|
1120
|
+
);
|
|
1121
|
+
return /* @__PURE__ */ jsxs5(
|
|
1105
1122
|
"div",
|
|
1106
1123
|
{
|
|
1124
|
+
ref: containerRef,
|
|
1107
1125
|
className: cn("p-5 flex-1 overflow-y-auto", className),
|
|
1108
1126
|
...props,
|
|
1109
|
-
"data-slot": slotName
|
|
1127
|
+
"data-slot": slotName,
|
|
1128
|
+
children: [
|
|
1129
|
+
/* @__PURE__ */ jsx7(
|
|
1130
|
+
"div",
|
|
1131
|
+
{
|
|
1132
|
+
ref: topSentinelRef,
|
|
1133
|
+
"aria-hidden": "true",
|
|
1134
|
+
"data-slot": "floating-sheet-top-sentinel",
|
|
1135
|
+
className: "h-0"
|
|
1136
|
+
}
|
|
1137
|
+
),
|
|
1138
|
+
children,
|
|
1139
|
+
/* @__PURE__ */ jsx7(
|
|
1140
|
+
"div",
|
|
1141
|
+
{
|
|
1142
|
+
ref: bottomSentinelRef,
|
|
1143
|
+
"aria-hidden": "true",
|
|
1144
|
+
"data-slot": "floating-sheet-bottom-sentinel",
|
|
1145
|
+
className: "h-0"
|
|
1146
|
+
}
|
|
1147
|
+
)
|
|
1148
|
+
]
|
|
1110
1149
|
}
|
|
1111
1150
|
);
|
|
1112
1151
|
}
|
|
@@ -1115,11 +1154,14 @@ function FloatingSheetFooter({
|
|
|
1115
1154
|
slotName = "floating-sheet-footer",
|
|
1116
1155
|
...props
|
|
1117
1156
|
}) {
|
|
1118
|
-
|
|
1157
|
+
const edges = React6.useContext(FloatingSheetEdgesContext);
|
|
1158
|
+
return /* @__PURE__ */ jsx7(
|
|
1119
1159
|
"div",
|
|
1120
1160
|
{
|
|
1121
1161
|
className: cn(
|
|
1122
|
-
"gap-2 p-5 mt-auto flex items-center justify-end",
|
|
1162
|
+
"gap-2 p-5 relative z-10 mt-auto flex items-center justify-end",
|
|
1163
|
+
scrollEdgeTransition,
|
|
1164
|
+
!edges.bottom && scrollShadowFromBottom,
|
|
1123
1165
|
className
|
|
1124
1166
|
),
|
|
1125
1167
|
...props,
|
|
@@ -1127,7 +1169,13 @@ function FloatingSheetFooter({
|
|
|
1127
1169
|
}
|
|
1128
1170
|
);
|
|
1129
1171
|
}
|
|
1130
|
-
|
|
1172
|
+
|
|
1173
|
+
// src/components/ui/input-otp.tsx
|
|
1174
|
+
import { OTPInput, OTPInputContext } from "input-otp";
|
|
1175
|
+
import { Minus } from "lucide-react";
|
|
1176
|
+
import * as React7 from "react";
|
|
1177
|
+
import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1178
|
+
var InputOTP = React7.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsx8(
|
|
1131
1179
|
OTPInput,
|
|
1132
1180
|
{
|
|
1133
1181
|
ref,
|
|
@@ -1140,12 +1188,12 @@ var InputOTP = React6.forwardRef(({ className, containerClassName, ...props }, r
|
|
|
1140
1188
|
}
|
|
1141
1189
|
));
|
|
1142
1190
|
InputOTP.displayName = "InputOTP";
|
|
1143
|
-
var InputOTPGroup =
|
|
1191
|
+
var InputOTPGroup = React7.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx8("div", { ref, className: cn("flex items-center", className), ...props }));
|
|
1144
1192
|
InputOTPGroup.displayName = "InputOTPGroup";
|
|
1145
|
-
var InputOTPSlot =
|
|
1146
|
-
const inputOTPContext =
|
|
1193
|
+
var InputOTPSlot = React7.forwardRef(({ index, className, slotName = "input-otp-slot", ...props }, ref) => {
|
|
1194
|
+
const inputOTPContext = React7.useContext(OTPInputContext);
|
|
1147
1195
|
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
|
|
1148
|
-
return /* @__PURE__ */
|
|
1196
|
+
return /* @__PURE__ */ jsxs6(
|
|
1149
1197
|
"div",
|
|
1150
1198
|
{
|
|
1151
1199
|
ref,
|
|
@@ -1160,15 +1208,20 @@ var InputOTPSlot = React6.forwardRef(({ index, className, slotName = "input-otp-
|
|
|
1160
1208
|
"data-slot": slotName,
|
|
1161
1209
|
children: [
|
|
1162
1210
|
char,
|
|
1163
|
-
hasFakeCaret && /* @__PURE__ */
|
|
1211
|
+
hasFakeCaret && /* @__PURE__ */ jsx8("div", { className: "inset-0 pointer-events-none absolute flex items-center justify-center", children: /* @__PURE__ */ jsx8("div", { className: "h-4 animate-caret-blink w-px bg-foreground duration-1000" }) })
|
|
1164
1212
|
]
|
|
1165
1213
|
}
|
|
1166
1214
|
);
|
|
1167
1215
|
});
|
|
1168
1216
|
InputOTPSlot.displayName = "InputOTPSlot";
|
|
1169
|
-
var InputOTPSeparator =
|
|
1217
|
+
var InputOTPSeparator = React7.forwardRef(({ ...props }, ref) => /* @__PURE__ */ jsx8("div", { ref, role: "separator", ...props, children: /* @__PURE__ */ jsx8(Minus, {}) }));
|
|
1170
1218
|
InputOTPSeparator.displayName = "InputOTPSeparator";
|
|
1171
|
-
|
|
1219
|
+
|
|
1220
|
+
// src/components/ui/switch.tsx
|
|
1221
|
+
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
1222
|
+
import * as React8 from "react";
|
|
1223
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
1224
|
+
var Switch = React8.forwardRef(({ className, slotName = "switch", ...props }, ref) => /* @__PURE__ */ jsx9(
|
|
1172
1225
|
SwitchPrimitives.Root,
|
|
1173
1226
|
{
|
|
1174
1227
|
className: cn(
|
|
@@ -1178,7 +1231,7 @@ var Switch = React6.forwardRef(({ className, slotName = "switch", ...props }, re
|
|
|
1178
1231
|
...props,
|
|
1179
1232
|
ref,
|
|
1180
1233
|
"data-slot": slotName,
|
|
1181
|
-
children: /* @__PURE__ */
|
|
1234
|
+
children: /* @__PURE__ */ jsx9(
|
|
1182
1235
|
SwitchPrimitives.Thumb,
|
|
1183
1236
|
{
|
|
1184
1237
|
"data-slot": "switch-thumb",
|
|
@@ -1190,9 +1243,14 @@ var Switch = React6.forwardRef(({ className, slotName = "switch", ...props }, re
|
|
|
1190
1243
|
}
|
|
1191
1244
|
));
|
|
1192
1245
|
Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
1193
|
-
|
|
1246
|
+
|
|
1247
|
+
// src/components/ui/tabs.tsx
|
|
1248
|
+
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
1249
|
+
import * as React9 from "react";
|
|
1250
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
1251
|
+
var Tabs = React9.forwardRef(({ slotName = "tabs", ...props }, ref) => /* @__PURE__ */ jsx10(TabsPrimitive.Root, { ref, ...props, "data-slot": slotName }));
|
|
1194
1252
|
Tabs.displayName = TabsPrimitive.Root.displayName;
|
|
1195
|
-
var TabsList =
|
|
1253
|
+
var TabsList = React9.forwardRef(({ className, slotName = "tabs-list", ...props }, ref) => /* @__PURE__ */ jsx10(
|
|
1196
1254
|
TabsPrimitive.List,
|
|
1197
1255
|
{
|
|
1198
1256
|
ref,
|
|
@@ -1205,7 +1263,7 @@ var TabsList = React6.forwardRef(({ className, slotName = "tabs-list", ...props
|
|
|
1205
1263
|
}
|
|
1206
1264
|
));
|
|
1207
1265
|
TabsList.displayName = TabsPrimitive.List.displayName;
|
|
1208
|
-
var TabsTrigger =
|
|
1266
|
+
var TabsTrigger = React9.forwardRef(({ className, slotName = "tabs-trigger", ...props }, ref) => /* @__PURE__ */ jsx10(
|
|
1209
1267
|
TabsPrimitive.Trigger,
|
|
1210
1268
|
{
|
|
1211
1269
|
ref,
|
|
@@ -1218,7 +1276,7 @@ var TabsTrigger = React6.forwardRef(({ className, slotName = "tabs-trigger", ...
|
|
|
1218
1276
|
}
|
|
1219
1277
|
));
|
|
1220
1278
|
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
1221
|
-
var TabsContent =
|
|
1279
|
+
var TabsContent = React9.forwardRef(({ className, slotName = "tabs-content", ...props }, ref) => /* @__PURE__ */ jsx10(
|
|
1222
1280
|
TabsPrimitive.Content,
|
|
1223
1281
|
{
|
|
1224
1282
|
ref,
|
|
@@ -1233,8 +1291,12 @@ var TabsContent = React6.forwardRef(({ className, slotName = "tabs-content", ...
|
|
|
1233
1291
|
}
|
|
1234
1292
|
));
|
|
1235
1293
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
1236
|
-
|
|
1237
|
-
|
|
1294
|
+
|
|
1295
|
+
// src/components/ui/textarea.tsx
|
|
1296
|
+
import * as React10 from "react";
|
|
1297
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
1298
|
+
var Textarea = React10.forwardRef(({ className, slotName = "textarea", ...props }, ref) => {
|
|
1299
|
+
return /* @__PURE__ */ jsx11(
|
|
1238
1300
|
"textarea",
|
|
1239
1301
|
{
|
|
1240
1302
|
className: cn(
|
|
@@ -1252,6 +1314,48 @@ var Textarea = React6.forwardRef(({ className, slotName = "textarea", ...props }
|
|
|
1252
1314
|
});
|
|
1253
1315
|
Textarea.displayName = "Textarea";
|
|
1254
1316
|
|
|
1255
|
-
export {
|
|
1256
|
-
|
|
1257
|
-
|
|
1317
|
+
export {
|
|
1318
|
+
confirmDialogDefaultLabels,
|
|
1319
|
+
ConfirmDialog,
|
|
1320
|
+
Calendar,
|
|
1321
|
+
CalendarDayButton,
|
|
1322
|
+
Command,
|
|
1323
|
+
CommandDialog,
|
|
1324
|
+
CommandInput,
|
|
1325
|
+
CommandList,
|
|
1326
|
+
CommandEmpty,
|
|
1327
|
+
CommandGroup,
|
|
1328
|
+
CommandSeparator,
|
|
1329
|
+
CommandItem,
|
|
1330
|
+
CommandShortcut,
|
|
1331
|
+
Popover,
|
|
1332
|
+
PopoverTrigger,
|
|
1333
|
+
PopoverAnchor,
|
|
1334
|
+
PopoverContent,
|
|
1335
|
+
Select,
|
|
1336
|
+
SelectGroup,
|
|
1337
|
+
SelectValue,
|
|
1338
|
+
SelectTrigger,
|
|
1339
|
+
SelectContent,
|
|
1340
|
+
SelectLabel,
|
|
1341
|
+
SelectItem,
|
|
1342
|
+
SelectSeparator,
|
|
1343
|
+
SelectScrollUpButton,
|
|
1344
|
+
SelectScrollDownButton,
|
|
1345
|
+
floatingSheetDefaultLabels,
|
|
1346
|
+
FloatingSheetStack,
|
|
1347
|
+
FloatingSheet,
|
|
1348
|
+
FloatingSheetBody,
|
|
1349
|
+
FloatingSheetFooter,
|
|
1350
|
+
InputOTP,
|
|
1351
|
+
InputOTPGroup,
|
|
1352
|
+
InputOTPSlot,
|
|
1353
|
+
InputOTPSeparator,
|
|
1354
|
+
Switch,
|
|
1355
|
+
Tabs,
|
|
1356
|
+
TabsList,
|
|
1357
|
+
TabsTrigger,
|
|
1358
|
+
TabsContent,
|
|
1359
|
+
Textarea
|
|
1360
|
+
};
|
|
1361
|
+
//# sourceMappingURL=chunk-DPLCEU34.js.map
|