@rock.star/ui 1.1.4 → 1.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/icon/index.js +5 -9
- package/dist/icon/index.js.map +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.js +629 -352
- package/dist/index.js.map +1 -1
- package/dist/lib/index.d.ts +14 -5
- package/dist/lib/index.js +41 -48
- package/dist/lib/index.js.map +1 -1
- package/dist/ui/index.js +355 -323
- package/dist/ui/index.js.map +1 -1
- package/package.json +4 -5
- package/dist/utils-Cbsgs0XP.d.ts +0 -5
package/dist/ui/index.js
CHANGED
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
// src/ui/accordion.tsx
|
|
2
2
|
import { Accordion as AccordionPrimitive } from "@base-ui/react/accordion";
|
|
3
|
-
|
|
4
|
-
// src/lib/utils.ts
|
|
5
|
-
import { clsx } from "clsx";
|
|
6
|
-
import { twMerge } from "tailwind-merge";
|
|
7
|
-
function cn(...inputs) {
|
|
8
|
-
return twMerge(clsx(inputs));
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
// src/ui/accordion.tsx
|
|
3
|
+
import { cn } from "cn";
|
|
12
4
|
import { ChevronDown, ChevronUp } from "@gravity-ui/icons";
|
|
13
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
6
|
function Accordion({ className, ...props }) {
|
|
@@ -100,6 +92,7 @@ import { AlertDialog as AlertDialogPrimitive } from "@base-ui/react/alert-dialog
|
|
|
100
92
|
// src/ui/button.tsx
|
|
101
93
|
import { Button as ButtonPrimitive } from "@base-ui/react/button";
|
|
102
94
|
import { cva } from "class-variance-authority";
|
|
95
|
+
import { cn as cn2 } from "cn";
|
|
103
96
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
104
97
|
var buttonVariants = cva(
|
|
105
98
|
"group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-[background-color,border-color,color,box-shadow,opacity,transform] duration-150 ease-[var(--ease-out)] outline-none select-none motion-reduce:transition-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:opacity-70 [&_svg:not([class*='size-'])]:size-4",
|
|
@@ -141,13 +134,14 @@ function Button({
|
|
|
141
134
|
ButtonPrimitive,
|
|
142
135
|
{
|
|
143
136
|
"data-slot": "button",
|
|
144
|
-
className:
|
|
137
|
+
className: cn2(buttonVariants({ variant, size, className })),
|
|
145
138
|
...props
|
|
146
139
|
}
|
|
147
140
|
);
|
|
148
141
|
}
|
|
149
142
|
|
|
150
143
|
// src/ui/alert-dialog.tsx
|
|
144
|
+
import { cn as cn3 } from "cn";
|
|
151
145
|
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
152
146
|
function AlertDialog({ ...props }) {
|
|
153
147
|
return /* @__PURE__ */ jsx3(AlertDialogPrimitive.Root, { "data-slot": "alert-dialog", ...props });
|
|
@@ -166,7 +160,7 @@ function AlertDialogOverlay({
|
|
|
166
160
|
AlertDialogPrimitive.Backdrop,
|
|
167
161
|
{
|
|
168
162
|
"data-slot": "alert-dialog-overlay",
|
|
169
|
-
className:
|
|
163
|
+
className: cn3(
|
|
170
164
|
"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",
|
|
171
165
|
className
|
|
172
166
|
),
|
|
@@ -186,7 +180,7 @@ function AlertDialogContent({
|
|
|
186
180
|
{
|
|
187
181
|
"data-slot": "alert-dialog-content",
|
|
188
182
|
"data-size": size,
|
|
189
|
-
className:
|
|
183
|
+
className: cn3(
|
|
190
184
|
"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-background 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",
|
|
191
185
|
className
|
|
192
186
|
),
|
|
@@ -203,7 +197,7 @@ function AlertDialogHeader({
|
|
|
203
197
|
"div",
|
|
204
198
|
{
|
|
205
199
|
"data-slot": "alert-dialog-header",
|
|
206
|
-
className:
|
|
200
|
+
className: cn3(
|
|
207
201
|
"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]",
|
|
208
202
|
className
|
|
209
203
|
),
|
|
@@ -219,7 +213,7 @@ function AlertDialogFooter({
|
|
|
219
213
|
"div",
|
|
220
214
|
{
|
|
221
215
|
"data-slot": "alert-dialog-footer",
|
|
222
|
-
className:
|
|
216
|
+
className: cn3(
|
|
223
217
|
"-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",
|
|
224
218
|
className
|
|
225
219
|
),
|
|
@@ -235,7 +229,7 @@ function AlertDialogMedia({
|
|
|
235
229
|
"div",
|
|
236
230
|
{
|
|
237
231
|
"data-slot": "alert-dialog-media",
|
|
238
|
-
className:
|
|
232
|
+
className: cn3(
|
|
239
233
|
"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",
|
|
240
234
|
className
|
|
241
235
|
),
|
|
@@ -251,7 +245,7 @@ function AlertDialogTitle({
|
|
|
251
245
|
AlertDialogPrimitive.Title,
|
|
252
246
|
{
|
|
253
247
|
"data-slot": "alert-dialog-title",
|
|
254
|
-
className:
|
|
248
|
+
className: cn3(
|
|
255
249
|
"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",
|
|
256
250
|
className
|
|
257
251
|
),
|
|
@@ -267,7 +261,7 @@ function AlertDialogDescription({
|
|
|
267
261
|
AlertDialogPrimitive.Description,
|
|
268
262
|
{
|
|
269
263
|
"data-slot": "alert-dialog-description",
|
|
270
|
-
className:
|
|
264
|
+
className: cn3(
|
|
271
265
|
"text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",
|
|
272
266
|
className
|
|
273
267
|
),
|
|
@@ -283,7 +277,7 @@ function AlertDialogAction({
|
|
|
283
277
|
Button,
|
|
284
278
|
{
|
|
285
279
|
"data-slot": "alert-dialog-action",
|
|
286
|
-
className:
|
|
280
|
+
className: cn3(className),
|
|
287
281
|
...props
|
|
288
282
|
}
|
|
289
283
|
);
|
|
@@ -298,7 +292,7 @@ function AlertDialogCancel({
|
|
|
298
292
|
AlertDialogPrimitive.Close,
|
|
299
293
|
{
|
|
300
294
|
"data-slot": "alert-dialog-cancel",
|
|
301
|
-
className:
|
|
295
|
+
className: cn3(className),
|
|
302
296
|
render: /* @__PURE__ */ jsx3(Button, { variant, size }),
|
|
303
297
|
...props
|
|
304
298
|
}
|
|
@@ -310,6 +304,7 @@ import { AnimatePresence } from "motion/react";
|
|
|
310
304
|
import { useState } from "react";
|
|
311
305
|
|
|
312
306
|
// src/ui/apple/english.tsx
|
|
307
|
+
import { cn as cn4 } from "cn";
|
|
313
308
|
import { motion } from "motion/react";
|
|
314
309
|
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
315
310
|
var initialProps = {
|
|
@@ -330,7 +325,7 @@ function AppleHelloEffectEnglish({
|
|
|
330
325
|
return /* @__PURE__ */ jsxs3(
|
|
331
326
|
motion.svg,
|
|
332
327
|
{
|
|
333
|
-
className:
|
|
328
|
+
className: cn4("h-20", className),
|
|
334
329
|
xmlns: "http://www.w3.org/2000/svg",
|
|
335
330
|
viewBox: "0 0 638 200",
|
|
336
331
|
fill: "none",
|
|
@@ -378,6 +373,7 @@ function AppleHelloEffectEnglish({
|
|
|
378
373
|
|
|
379
374
|
// src/ui/apple/hindi.tsx
|
|
380
375
|
import { motion as motion2 } from "motion/react";
|
|
376
|
+
import { cn as cn5 } from "cn";
|
|
381
377
|
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
382
378
|
var initialProps2 = {
|
|
383
379
|
pathLength: 0,
|
|
@@ -397,7 +393,7 @@ function AppleHelloEffectHindi({
|
|
|
397
393
|
return /* @__PURE__ */ jsxs4(
|
|
398
394
|
motion2.svg,
|
|
399
395
|
{
|
|
400
|
-
className:
|
|
396
|
+
className: cn5("h-20", className),
|
|
401
397
|
xmlns: "http://www.w3.org/2000/svg",
|
|
402
398
|
viewBox: "0 0 605 273",
|
|
403
399
|
fill: "none",
|
|
@@ -557,6 +553,7 @@ function AppleHelloEffectHindi({
|
|
|
557
553
|
|
|
558
554
|
// src/ui/apple/spanish.tsx
|
|
559
555
|
import { motion as motion3 } from "motion/react";
|
|
556
|
+
import { cn as cn6 } from "cn";
|
|
560
557
|
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
561
558
|
var initialProps3 = {
|
|
562
559
|
pathLength: 0,
|
|
@@ -576,7 +573,7 @@ function AppleHelloEffectSpanish({
|
|
|
576
573
|
return /* @__PURE__ */ jsxs5(
|
|
577
574
|
motion3.svg,
|
|
578
575
|
{
|
|
579
|
-
className:
|
|
576
|
+
className: cn6("h-20", className),
|
|
580
577
|
xmlns: "http://www.w3.org/2000/svg",
|
|
581
578
|
viewBox: "0 0 562 200",
|
|
582
579
|
fill: "none",
|
|
@@ -702,11 +699,13 @@ function Apple() {
|
|
|
702
699
|
import * as Ariakit from "@ariakit/react";
|
|
703
700
|
|
|
704
701
|
// src/ui/autocomplete.tsx
|
|
702
|
+
import { cn as cn9 } from "cn";
|
|
705
703
|
import { Autocomplete as AutocompletePrimitive } from "@base-ui/react/autocomplete";
|
|
706
704
|
import { ChevronsExpandVertical, Xmark } from "@gravity-ui/icons";
|
|
707
705
|
|
|
708
706
|
// src/ui/input.tsx
|
|
709
707
|
import { Input as InputPrimitive } from "@base-ui/react/input";
|
|
708
|
+
import { cn as cn7 } from "cn";
|
|
710
709
|
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
711
710
|
function Input({
|
|
712
711
|
className,
|
|
@@ -726,7 +725,7 @@ function Input({
|
|
|
726
725
|
event.currentTarget.blur();
|
|
727
726
|
onWheel?.(event);
|
|
728
727
|
} : onWheel,
|
|
729
|
-
className:
|
|
728
|
+
className: cn7(
|
|
730
729
|
"h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
|
|
731
730
|
isNumberInput && "[appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",
|
|
732
731
|
className
|
|
@@ -738,6 +737,7 @@ function Input({
|
|
|
738
737
|
|
|
739
738
|
// src/ui/scroll-area.tsx
|
|
740
739
|
import { ScrollArea as ScrollAreaPrimitive } from "@base-ui/react/scroll-area";
|
|
740
|
+
import { cn as cn8 } from "cn";
|
|
741
741
|
import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
742
742
|
function ScrollArea({
|
|
743
743
|
className,
|
|
@@ -748,7 +748,7 @@ function ScrollArea({
|
|
|
748
748
|
ScrollAreaPrimitive.Root,
|
|
749
749
|
{
|
|
750
750
|
"data-slot": "scroll-area",
|
|
751
|
-
className:
|
|
751
|
+
className: cn8("relative", className),
|
|
752
752
|
...props,
|
|
753
753
|
children: [
|
|
754
754
|
/* @__PURE__ */ jsx9(
|
|
@@ -776,7 +776,7 @@ function ScrollBar({
|
|
|
776
776
|
"data-slot": "scroll-area-scrollbar",
|
|
777
777
|
"data-orientation": orientation,
|
|
778
778
|
orientation,
|
|
779
|
-
className:
|
|
779
|
+
className: cn8(
|
|
780
780
|
"flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent",
|
|
781
781
|
className
|
|
782
782
|
),
|
|
@@ -824,7 +824,7 @@ function AutocompleteInput({
|
|
|
824
824
|
/* @__PURE__ */ jsx10(
|
|
825
825
|
AutocompletePrimitive.Input,
|
|
826
826
|
{
|
|
827
|
-
className:
|
|
827
|
+
className: cn9(
|
|
828
828
|
startAddon && "*:data-[slot=autocomplete-input]:ps-[calc(--spacing(8.5)-1px)] data-[size=sm]:*:data-[slot=autocomplete-input]:ps-[calc(--spacing(7.5)-1px)] sm:*:data-[slot=autocomplete-input]:ps-[calc(--spacing(8)-1px)] sm:data-[size=sm]:*:data-[slot=autocomplete-input]:ps-[calc(--spacing(7)-1px)]",
|
|
829
829
|
sizeValue === "sm" ? "has-[+[data-slot=autocomplete-trigger],+[data-slot=autocomplete-clear]]:*:data-[slot=autocomplete-input]:pe-6.5" : "has-[+[data-slot=autocomplete-trigger],+[data-slot=autocomplete-clear]]:*:data-[slot=autocomplete-input]:pe-7",
|
|
830
830
|
className
|
|
@@ -837,7 +837,7 @@ function AutocompleteInput({
|
|
|
837
837
|
showTrigger && /* @__PURE__ */ jsx10(
|
|
838
838
|
AutocompleteTrigger,
|
|
839
839
|
{
|
|
840
|
-
className:
|
|
840
|
+
className: cn9(
|
|
841
841
|
"absolute top-1/2 inline-flex size-8 shrink-0 -translate-y-1/2 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-80 transition-colors outline-none hover:opacity-100 has-[+[data-slot=autocomplete-clear]]:hidden sm:size-7 pointer-coarse:after:absolute pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4",
|
|
842
842
|
sizeValue === "sm" ? "inset-e-0" : "inset-e-0.5"
|
|
843
843
|
),
|
|
@@ -848,7 +848,7 @@ function AutocompleteInput({
|
|
|
848
848
|
showClear && /* @__PURE__ */ jsx10(
|
|
849
849
|
AutocompleteClear,
|
|
850
850
|
{
|
|
851
|
-
className:
|
|
851
|
+
className: cn9(
|
|
852
852
|
"absolute top-1/2 inline-flex size-8 shrink-0 -translate-y-1/2 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-80 transition-colors outline-none hover:opacity-100 has-[+[data-slot=autocomplete-clear]]:hidden sm:size-7 pointer-coarse:after:absolute pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4",
|
|
853
853
|
sizeValue === "sm" ? "inset-e-0" : "inset-e-0.5"
|
|
854
854
|
),
|
|
@@ -884,7 +884,7 @@ function AutocompletePopup({
|
|
|
884
884
|
children: /* @__PURE__ */ jsx10(
|
|
885
885
|
"span",
|
|
886
886
|
{
|
|
887
|
-
className:
|
|
887
|
+
className: cn9(
|
|
888
888
|
"relative flex max-h-full max-w-(--available-width) min-w-(--anchor-width) origin-(--transform-origin) rounded-lg border bg-background shadow-lg/5 transition-[scale,opacity] not-dark:bg-clip-padding before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] dark:before:shadow-[0_-1px_--theme(--color-white/6%)]",
|
|
889
889
|
className
|
|
890
890
|
),
|
|
@@ -910,7 +910,7 @@ function AutocompleteItem({
|
|
|
910
910
|
return /* @__PURE__ */ jsx10(
|
|
911
911
|
AutocompletePrimitive.Item,
|
|
912
912
|
{
|
|
913
|
-
className:
|
|
913
|
+
className: cn9(
|
|
914
914
|
"flex min-h-8 cursor-default items-center rounded-sm px-2 py-1 text-base outline-none select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground sm:min-h-7 sm:text-sm data-disabled:pointer-events-none data-disabled:opacity-64",
|
|
915
915
|
className
|
|
916
916
|
),
|
|
@@ -927,7 +927,7 @@ function AutocompleteSeparator({
|
|
|
927
927
|
return /* @__PURE__ */ jsx10(
|
|
928
928
|
AutocompletePrimitive.Separator,
|
|
929
929
|
{
|
|
930
|
-
className:
|
|
930
|
+
className: cn9("mx-2 my-1 h-px bg-border last:hidden", className),
|
|
931
931
|
"data-slot": "autocomplete-separator",
|
|
932
932
|
...props
|
|
933
933
|
}
|
|
@@ -940,7 +940,7 @@ function AutocompleteGroup({
|
|
|
940
940
|
return /* @__PURE__ */ jsx10(
|
|
941
941
|
AutocompletePrimitive.Group,
|
|
942
942
|
{
|
|
943
|
-
className:
|
|
943
|
+
className: cn9("[[role=group]+&]:mt-1.5", className),
|
|
944
944
|
"data-slot": "autocomplete-group",
|
|
945
945
|
...props
|
|
946
946
|
}
|
|
@@ -953,7 +953,7 @@ function AutocompleteGroupLabel({
|
|
|
953
953
|
return /* @__PURE__ */ jsx10(
|
|
954
954
|
AutocompletePrimitive.GroupLabel,
|
|
955
955
|
{
|
|
956
|
-
className:
|
|
956
|
+
className: cn9(
|
|
957
957
|
"px-2 py-1.5 text-xs font-medium text-muted-foreground",
|
|
958
958
|
className
|
|
959
959
|
),
|
|
@@ -969,7 +969,7 @@ function AutocompleteEmpty({
|
|
|
969
969
|
return /* @__PURE__ */ jsx10(
|
|
970
970
|
AutocompletePrimitive.Empty,
|
|
971
971
|
{
|
|
972
|
-
className:
|
|
972
|
+
className: cn9(
|
|
973
973
|
"text-center text-base text-muted-foreground not-empty:p-2 sm:text-sm",
|
|
974
974
|
className
|
|
975
975
|
),
|
|
@@ -999,7 +999,7 @@ function AutocompleteList({
|
|
|
999
999
|
return /* @__PURE__ */ jsx10(ScrollArea, { children: /* @__PURE__ */ jsx10(
|
|
1000
1000
|
AutocompletePrimitive.List,
|
|
1001
1001
|
{
|
|
1002
|
-
className:
|
|
1002
|
+
className: cn9(
|
|
1003
1003
|
"not-empty:scroll-py-1 not-empty:p-1 in-data-has-overflow-y:pe-3",
|
|
1004
1004
|
className
|
|
1005
1005
|
),
|
|
@@ -1015,7 +1015,7 @@ function AutocompleteClear({
|
|
|
1015
1015
|
return /* @__PURE__ */ jsx10(
|
|
1016
1016
|
AutocompletePrimitive.Clear,
|
|
1017
1017
|
{
|
|
1018
|
-
className:
|
|
1018
|
+
className: cn9(
|
|
1019
1019
|
"absolute inset-e-0.5 top-1/2 inline-flex size-8 shrink-0 -translate-y-1/2 cursor-pointer items-center justify-center rounded-md border border-transparent opacity-80 transition-[color,background-color,box-shadow,opacity] outline-none hover:opacity-100 sm:size-7 pointer-coarse:after:absolute pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4",
|
|
1020
1020
|
className
|
|
1021
1021
|
),
|
|
@@ -1032,7 +1032,7 @@ function AutocompleteStatus({
|
|
|
1032
1032
|
return /* @__PURE__ */ jsx10(
|
|
1033
1033
|
AutocompletePrimitive.Status,
|
|
1034
1034
|
{
|
|
1035
|
-
className:
|
|
1035
|
+
className: cn9(
|
|
1036
1036
|
"px-3 py-2 text-xs font-medium text-muted-foreground empty:m-0 empty:p-0",
|
|
1037
1037
|
className
|
|
1038
1038
|
),
|
|
@@ -1061,6 +1061,7 @@ var useAutocompleteFilter = AutocompletePrimitive.useFilter;
|
|
|
1061
1061
|
|
|
1062
1062
|
// src/ui/avatar.tsx
|
|
1063
1063
|
import { Avatar as AvatarPrimitive } from "@base-ui/react/avatar";
|
|
1064
|
+
import { cn as cn10 } from "cn";
|
|
1064
1065
|
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
1065
1066
|
function Avatar({
|
|
1066
1067
|
className,
|
|
@@ -1072,7 +1073,7 @@ function Avatar({
|
|
|
1072
1073
|
{
|
|
1073
1074
|
"data-slot": "avatar",
|
|
1074
1075
|
"data-size": size,
|
|
1075
|
-
className:
|
|
1076
|
+
className: cn10(
|
|
1076
1077
|
"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=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten",
|
|
1077
1078
|
className
|
|
1078
1079
|
),
|
|
@@ -1085,7 +1086,7 @@ function AvatarImage({ className, ...props }) {
|
|
|
1085
1086
|
AvatarPrimitive.Image,
|
|
1086
1087
|
{
|
|
1087
1088
|
"data-slot": "avatar-image",
|
|
1088
|
-
className:
|
|
1089
|
+
className: cn10(
|
|
1089
1090
|
"aspect-square size-full rounded-full object-cover",
|
|
1090
1091
|
className
|
|
1091
1092
|
),
|
|
@@ -1101,7 +1102,7 @@ function AvatarFallback({
|
|
|
1101
1102
|
AvatarPrimitive.Fallback,
|
|
1102
1103
|
{
|
|
1103
1104
|
"data-slot": "avatar-fallback",
|
|
1104
|
-
className:
|
|
1105
|
+
className: cn10(
|
|
1105
1106
|
"flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs",
|
|
1106
1107
|
className
|
|
1107
1108
|
),
|
|
@@ -1114,7 +1115,7 @@ function AvatarBadge({ className, ...props }) {
|
|
|
1114
1115
|
"span",
|
|
1115
1116
|
{
|
|
1116
1117
|
"data-slot": "avatar-badge",
|
|
1117
|
-
className:
|
|
1118
|
+
className: cn10(
|
|
1118
1119
|
"absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground bg-blend-color ring-2 ring-background select-none",
|
|
1119
1120
|
"group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden",
|
|
1120
1121
|
"group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2",
|
|
@@ -1130,7 +1131,7 @@ function AvatarGroup({ className, ...props }) {
|
|
|
1130
1131
|
"div",
|
|
1131
1132
|
{
|
|
1132
1133
|
"data-slot": "avatar-group",
|
|
1133
|
-
className:
|
|
1134
|
+
className: cn10(
|
|
1134
1135
|
"group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2 *:data-[slot=avatar]:ring-background",
|
|
1135
1136
|
className
|
|
1136
1137
|
),
|
|
@@ -1146,7 +1147,7 @@ function AvatarGroupCount({
|
|
|
1146
1147
|
"div",
|
|
1147
1148
|
{
|
|
1148
1149
|
"data-slot": "avatar-group-count",
|
|
1149
|
-
className:
|
|
1150
|
+
className: cn10(
|
|
1150
1151
|
"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=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3",
|
|
1151
1152
|
className
|
|
1152
1153
|
),
|
|
@@ -1159,6 +1160,7 @@ function AvatarGroupCount({
|
|
|
1159
1160
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
1160
1161
|
import { useRender } from "@base-ui/react/use-render";
|
|
1161
1162
|
import { cva as cva2 } from "class-variance-authority";
|
|
1163
|
+
import { cn as cn11 } from "cn";
|
|
1162
1164
|
var badgeVariants = cva2(
|
|
1163
1165
|
"group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[background-color,border-color,color,box-shadow,opacity] duration-150 ease-[var(--ease-out)] motion-reduce:transition-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",
|
|
1164
1166
|
{
|
|
@@ -1187,7 +1189,7 @@ function Badge({
|
|
|
1187
1189
|
defaultTagName: "span",
|
|
1188
1190
|
props: mergeProps(
|
|
1189
1191
|
{
|
|
1190
|
-
className:
|
|
1192
|
+
className: cn11(badgeVariants({ variant }), className)
|
|
1191
1193
|
},
|
|
1192
1194
|
props
|
|
1193
1195
|
),
|
|
@@ -1201,7 +1203,7 @@ function Badge({
|
|
|
1201
1203
|
|
|
1202
1204
|
// src/ui/bridge.tsx
|
|
1203
1205
|
import { useRouter } from "next/navigation";
|
|
1204
|
-
import * as
|
|
1206
|
+
import * as React2 from "react";
|
|
1205
1207
|
|
|
1206
1208
|
// src/lib/capacitor.ts
|
|
1207
1209
|
function isNativeApp() {
|
|
@@ -1225,6 +1227,44 @@ function getNativeThemePlugin() {
|
|
|
1225
1227
|
return window.Capacitor?.Plugins?.NativeTheme ?? null;
|
|
1226
1228
|
}
|
|
1227
1229
|
|
|
1230
|
+
// src/lib/compose-refs.ts
|
|
1231
|
+
import * as React from "react";
|
|
1232
|
+
function setRef(ref, value) {
|
|
1233
|
+
if (typeof ref === "function") {
|
|
1234
|
+
return ref(value);
|
|
1235
|
+
}
|
|
1236
|
+
if (ref !== null && ref !== void 0) {
|
|
1237
|
+
ref.current = value;
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1240
|
+
function composeRefs(...refs) {
|
|
1241
|
+
return (node) => {
|
|
1242
|
+
let hasCleanup = false;
|
|
1243
|
+
const cleanups = refs.map((ref) => {
|
|
1244
|
+
const cleanup = setRef(ref, node);
|
|
1245
|
+
if (!hasCleanup && typeof cleanup === "function") {
|
|
1246
|
+
hasCleanup = true;
|
|
1247
|
+
}
|
|
1248
|
+
return cleanup;
|
|
1249
|
+
});
|
|
1250
|
+
if (hasCleanup) {
|
|
1251
|
+
return () => {
|
|
1252
|
+
for (let i = 0; i < cleanups.length; i++) {
|
|
1253
|
+
const cleanup = cleanups[i];
|
|
1254
|
+
if (typeof cleanup === "function") {
|
|
1255
|
+
cleanup();
|
|
1256
|
+
} else {
|
|
1257
|
+
setRef(refs[i], null);
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
};
|
|
1261
|
+
}
|
|
1262
|
+
};
|
|
1263
|
+
}
|
|
1264
|
+
function useComposedRefs(...refs) {
|
|
1265
|
+
return React.useCallback(composeRefs(...refs), refs);
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1228
1268
|
// src/ui/bridge.tsx
|
|
1229
1269
|
function getAppPath(value) {
|
|
1230
1270
|
try {
|
|
@@ -1271,7 +1311,7 @@ function syncNativeAppearance() {
|
|
|
1271
1311
|
}
|
|
1272
1312
|
function NativeAppBridge() {
|
|
1273
1313
|
const router = useRouter();
|
|
1274
|
-
|
|
1314
|
+
React2.useEffect(() => {
|
|
1275
1315
|
if (!isNativeApp()) return;
|
|
1276
1316
|
const root = document.documentElement;
|
|
1277
1317
|
const platform = getNativePlatform();
|
|
@@ -1325,13 +1365,14 @@ function NativeAppBridge() {
|
|
|
1325
1365
|
import { mergeProps as mergeProps2 } from "@base-ui/react/merge-props";
|
|
1326
1366
|
import { useRender as useRender2 } from "@base-ui/react/use-render";
|
|
1327
1367
|
import { cva as cva3 } from "class-variance-authority";
|
|
1368
|
+
import { cn as cn12 } from "cn";
|
|
1328
1369
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
1329
1370
|
function BubbleGroup({ className, ...props }) {
|
|
1330
1371
|
return /* @__PURE__ */ jsx12(
|
|
1331
1372
|
"div",
|
|
1332
1373
|
{
|
|
1333
1374
|
"data-slot": "bubble-group",
|
|
1334
|
-
className:
|
|
1375
|
+
className: cn12("flex min-w-0 flex-col gap-2", className),
|
|
1335
1376
|
...props
|
|
1336
1377
|
}
|
|
1337
1378
|
);
|
|
@@ -1367,7 +1408,7 @@ function Bubble({
|
|
|
1367
1408
|
"data-slot": "bubble",
|
|
1368
1409
|
"data-variant": variant,
|
|
1369
1410
|
"data-align": align,
|
|
1370
|
-
className:
|
|
1411
|
+
className: cn12(bubbleVariants({ variant }), className),
|
|
1371
1412
|
...props
|
|
1372
1413
|
}
|
|
1373
1414
|
);
|
|
@@ -1381,7 +1422,7 @@ function BubbleContent({
|
|
|
1381
1422
|
defaultTagName: "div",
|
|
1382
1423
|
props: mergeProps2(
|
|
1383
1424
|
{
|
|
1384
|
-
className:
|
|
1425
|
+
className: cn12(
|
|
1385
1426
|
"w-fit max-w-full min-w-0 overflow-hidden rounded-xl border border-transparent px-3 py-2 text-sm leading-relaxed wrap-break-word group-data-[align=end]/bubble:self-end [button]:text-left [button,a]:transition-colors [button,a]:outline-none [button,a]:focus-visible:border-ring [button,a]:focus-visible:ring-3 [button,a]:focus-visible:ring-ring/50",
|
|
1386
1427
|
className
|
|
1387
1428
|
)
|
|
@@ -1425,7 +1466,7 @@ function BubbleReactions({
|
|
|
1425
1466
|
"data-slot": "bubble-reactions",
|
|
1426
1467
|
"data-align": align,
|
|
1427
1468
|
"data-side": side,
|
|
1428
|
-
className:
|
|
1469
|
+
className: cn12(bubbleReactionsVariants({ side, align }), className),
|
|
1429
1470
|
...props
|
|
1430
1471
|
}
|
|
1431
1472
|
);
|
|
@@ -1435,9 +1476,11 @@ function BubbleReactions({
|
|
|
1435
1476
|
import { mergeProps as mergeProps3 } from "@base-ui/react/merge-props";
|
|
1436
1477
|
import { useRender as useRender3 } from "@base-ui/react/use-render";
|
|
1437
1478
|
import { cva as cva4 } from "class-variance-authority";
|
|
1479
|
+
import { cn as cn14 } from "cn";
|
|
1438
1480
|
|
|
1439
1481
|
// src/ui/separator.tsx
|
|
1440
1482
|
import { Separator as SeparatorPrimitive } from "@base-ui/react/separator";
|
|
1483
|
+
import { cn as cn13 } from "cn";
|
|
1441
1484
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
1442
1485
|
function Separator({
|
|
1443
1486
|
className,
|
|
@@ -1449,7 +1492,7 @@ function Separator({
|
|
|
1449
1492
|
{
|
|
1450
1493
|
"data-slot": "separator",
|
|
1451
1494
|
orientation,
|
|
1452
|
-
className:
|
|
1495
|
+
className: cn13(
|
|
1453
1496
|
"shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",
|
|
1454
1497
|
className
|
|
1455
1498
|
),
|
|
@@ -1485,7 +1528,7 @@ function ButtonGroup({
|
|
|
1485
1528
|
role: "group",
|
|
1486
1529
|
"data-slot": "button-group",
|
|
1487
1530
|
"data-orientation": orientation,
|
|
1488
|
-
className:
|
|
1531
|
+
className: cn14(buttonGroupVariants({ orientation }), className),
|
|
1489
1532
|
...props
|
|
1490
1533
|
}
|
|
1491
1534
|
);
|
|
@@ -1499,7 +1542,7 @@ function ButtonGroupText({
|
|
|
1499
1542
|
defaultTagName: "div",
|
|
1500
1543
|
props: mergeProps3(
|
|
1501
1544
|
{
|
|
1502
|
-
className:
|
|
1545
|
+
className: cn14(
|
|
1503
1546
|
"flex items-center gap-2 rounded-lg border bg-muted px-2.5 text-sm font-medium [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
|
1504
1547
|
className
|
|
1505
1548
|
)
|
|
@@ -1522,7 +1565,7 @@ function ButtonGroupSeparator({
|
|
|
1522
1565
|
{
|
|
1523
1566
|
"data-slot": "button-group-separator",
|
|
1524
1567
|
orientation,
|
|
1525
|
-
className:
|
|
1568
|
+
className: cn14(
|
|
1526
1569
|
"relative self-stretch bg-input data-horizontal:mx-px data-horizontal:w-auto data-vertical:my-px data-vertical:h-auto",
|
|
1527
1570
|
className
|
|
1528
1571
|
),
|
|
@@ -1532,16 +1575,17 @@ function ButtonGroupSeparator({
|
|
|
1532
1575
|
}
|
|
1533
1576
|
|
|
1534
1577
|
// src/ui/card.tsx
|
|
1535
|
-
import * as
|
|
1578
|
+
import * as React3 from "react";
|
|
1579
|
+
import { cn as cn15 } from "cn";
|
|
1536
1580
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
1537
|
-
var Card =
|
|
1581
|
+
var Card = React3.forwardRef(function Card2({ className, size = "default", ...props }, ref) {
|
|
1538
1582
|
return /* @__PURE__ */ jsx15(
|
|
1539
1583
|
"div",
|
|
1540
1584
|
{
|
|
1541
1585
|
ref,
|
|
1542
1586
|
"data-slot": "card",
|
|
1543
1587
|
"data-size": size,
|
|
1544
|
-
className:
|
|
1588
|
+
className: cn15(
|
|
1545
1589
|
"group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",
|
|
1546
1590
|
className
|
|
1547
1591
|
),
|
|
@@ -1554,7 +1598,7 @@ function CardHeader({ className, ...props }) {
|
|
|
1554
1598
|
"div",
|
|
1555
1599
|
{
|
|
1556
1600
|
"data-slot": "card-header",
|
|
1557
|
-
className:
|
|
1601
|
+
className: cn15(
|
|
1558
1602
|
"group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",
|
|
1559
1603
|
className
|
|
1560
1604
|
),
|
|
@@ -1567,7 +1611,7 @@ function CardTitle({ className, ...props }) {
|
|
|
1567
1611
|
"div",
|
|
1568
1612
|
{
|
|
1569
1613
|
"data-slot": "card-title",
|
|
1570
|
-
className:
|
|
1614
|
+
className: cn15(
|
|
1571
1615
|
"text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",
|
|
1572
1616
|
className
|
|
1573
1617
|
),
|
|
@@ -1580,7 +1624,7 @@ function CardDescription({ className, ...props }) {
|
|
|
1580
1624
|
"div",
|
|
1581
1625
|
{
|
|
1582
1626
|
"data-slot": "card-description",
|
|
1583
|
-
className:
|
|
1627
|
+
className: cn15("text-sm text-muted-foreground", className),
|
|
1584
1628
|
...props
|
|
1585
1629
|
}
|
|
1586
1630
|
);
|
|
@@ -1590,7 +1634,7 @@ function CardAction({ className, ...props }) {
|
|
|
1590
1634
|
"div",
|
|
1591
1635
|
{
|
|
1592
1636
|
"data-slot": "card-action",
|
|
1593
|
-
className:
|
|
1637
|
+
className: cn15(
|
|
1594
1638
|
"col-start-2 row-span-2 row-start-1 self-start justify-self-end",
|
|
1595
1639
|
className
|
|
1596
1640
|
),
|
|
@@ -1603,7 +1647,7 @@ function CardContent({ className, ...props }) {
|
|
|
1603
1647
|
"div",
|
|
1604
1648
|
{
|
|
1605
1649
|
"data-slot": "card-content",
|
|
1606
|
-
className:
|
|
1650
|
+
className: cn15("px-(--card-spacing)", className),
|
|
1607
1651
|
...props
|
|
1608
1652
|
}
|
|
1609
1653
|
);
|
|
@@ -1613,7 +1657,7 @@ function CardFooter({ className, ...props }) {
|
|
|
1613
1657
|
"div",
|
|
1614
1658
|
{
|
|
1615
1659
|
"data-slot": "card-footer",
|
|
1616
|
-
className:
|
|
1660
|
+
className: cn15(
|
|
1617
1661
|
"flex items-center rounded-b-xl border-t bg-muted/50 p-(--card-spacing)",
|
|
1618
1662
|
className
|
|
1619
1663
|
),
|
|
@@ -1625,11 +1669,12 @@ function CardFooter({ className, ...props }) {
|
|
|
1625
1669
|
// src/ui/carousel.tsx
|
|
1626
1670
|
import useEmblaCarousel from "embla-carousel-react";
|
|
1627
1671
|
import { ChevronLeft, ChevronRight } from "lucide-react";
|
|
1628
|
-
import * as
|
|
1672
|
+
import * as React4 from "react";
|
|
1673
|
+
import { cn as cn16 } from "cn";
|
|
1629
1674
|
import { jsx as jsx16, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1630
|
-
var CarouselContext =
|
|
1675
|
+
var CarouselContext = React4.createContext(null);
|
|
1631
1676
|
function useCarousel() {
|
|
1632
|
-
const context =
|
|
1677
|
+
const context = React4.useContext(CarouselContext);
|
|
1633
1678
|
if (!context) {
|
|
1634
1679
|
throw new Error("useCarousel must be used within a <Carousel />");
|
|
1635
1680
|
}
|
|
@@ -1651,20 +1696,20 @@ function Carousel({
|
|
|
1651
1696
|
},
|
|
1652
1697
|
plugins
|
|
1653
1698
|
);
|
|
1654
|
-
const [canScrollPrev, setCanScrollPrev] =
|
|
1655
|
-
const [canScrollNext, setCanScrollNext] =
|
|
1656
|
-
const onSelect =
|
|
1699
|
+
const [canScrollPrev, setCanScrollPrev] = React4.useState(false);
|
|
1700
|
+
const [canScrollNext, setCanScrollNext] = React4.useState(false);
|
|
1701
|
+
const onSelect = React4.useCallback((api2) => {
|
|
1657
1702
|
if (!api2) return;
|
|
1658
1703
|
setCanScrollPrev(api2.canScrollPrev());
|
|
1659
1704
|
setCanScrollNext(api2.canScrollNext());
|
|
1660
1705
|
}, []);
|
|
1661
|
-
const scrollPrev =
|
|
1706
|
+
const scrollPrev = React4.useCallback(() => {
|
|
1662
1707
|
api?.scrollPrev();
|
|
1663
1708
|
}, [api]);
|
|
1664
|
-
const scrollNext =
|
|
1709
|
+
const scrollNext = React4.useCallback(() => {
|
|
1665
1710
|
api?.scrollNext();
|
|
1666
1711
|
}, [api]);
|
|
1667
|
-
const handleKeyDown =
|
|
1712
|
+
const handleKeyDown = React4.useCallback(
|
|
1668
1713
|
(event) => {
|
|
1669
1714
|
if (event.key === "ArrowLeft") {
|
|
1670
1715
|
event.preventDefault();
|
|
@@ -1676,11 +1721,11 @@ function Carousel({
|
|
|
1676
1721
|
},
|
|
1677
1722
|
[scrollPrev, scrollNext]
|
|
1678
1723
|
);
|
|
1679
|
-
|
|
1724
|
+
React4.useEffect(() => {
|
|
1680
1725
|
if (!api || !setApi) return;
|
|
1681
1726
|
setApi(api);
|
|
1682
1727
|
}, [api, setApi]);
|
|
1683
|
-
|
|
1728
|
+
React4.useEffect(() => {
|
|
1684
1729
|
if (!api) return;
|
|
1685
1730
|
api.on("reInit", onSelect);
|
|
1686
1731
|
api.on("select", onSelect);
|
|
@@ -1707,7 +1752,7 @@ function Carousel({
|
|
|
1707
1752
|
"div",
|
|
1708
1753
|
{
|
|
1709
1754
|
onKeyDownCapture: handleKeyDown,
|
|
1710
|
-
className:
|
|
1755
|
+
className: cn16("relative", className),
|
|
1711
1756
|
role: "region",
|
|
1712
1757
|
"aria-roledescription": "carousel",
|
|
1713
1758
|
"data-slot": "carousel",
|
|
@@ -1729,7 +1774,7 @@ function CarouselContent({ className, ...props }) {
|
|
|
1729
1774
|
children: /* @__PURE__ */ jsx16(
|
|
1730
1775
|
"div",
|
|
1731
1776
|
{
|
|
1732
|
-
className:
|
|
1777
|
+
className: cn16(
|
|
1733
1778
|
"flex",
|
|
1734
1779
|
orientation === "horizontal" ? "-ml-4" : "-mt-4 flex-col",
|
|
1735
1780
|
className
|
|
@@ -1748,7 +1793,7 @@ function CarouselItem({ className, ...props }) {
|
|
|
1748
1793
|
role: "group",
|
|
1749
1794
|
"aria-roledescription": "slide",
|
|
1750
1795
|
"data-slot": "carousel-item",
|
|
1751
|
-
className:
|
|
1796
|
+
className: cn16(
|
|
1752
1797
|
"min-w-0 shrink-0 grow-0 basis-full",
|
|
1753
1798
|
orientation === "horizontal" ? "pl-4" : "pt-4",
|
|
1754
1799
|
className
|
|
@@ -1770,7 +1815,7 @@ function CarouselPrevious({
|
|
|
1770
1815
|
"data-slot": "carousel-previous",
|
|
1771
1816
|
variant,
|
|
1772
1817
|
size,
|
|
1773
|
-
className:
|
|
1818
|
+
className: cn16(
|
|
1774
1819
|
"absolute touch-manipulation rounded-full",
|
|
1775
1820
|
orientation === "horizontal" ? "top-1/2 left-2 z-10 -translate-y-1/2 sm:left-3" : "top-2 left-1/2 -translate-x-1/2 rotate-90",
|
|
1776
1821
|
className
|
|
@@ -1798,7 +1843,7 @@ function CarouselNext({
|
|
|
1798
1843
|
"data-slot": "carousel-next",
|
|
1799
1844
|
variant,
|
|
1800
1845
|
size,
|
|
1801
|
-
className:
|
|
1846
|
+
className: cn16(
|
|
1802
1847
|
"absolute touch-manipulation rounded-full",
|
|
1803
1848
|
orientation === "horizontal" ? "top-1/2 right-2 z-10 -translate-y-1/2 sm:right-3" : "bottom-2 left-1/2 -translate-x-1/2 rotate-90",
|
|
1804
1849
|
className
|
|
@@ -1815,14 +1860,15 @@ function CarouselNext({
|
|
|
1815
1860
|
}
|
|
1816
1861
|
|
|
1817
1862
|
// src/ui/chart.tsx
|
|
1818
|
-
import * as
|
|
1863
|
+
import * as React5 from "react";
|
|
1819
1864
|
import * as RechartsPrimitive from "recharts";
|
|
1865
|
+
import { cn as cn17 } from "cn";
|
|
1820
1866
|
import { Fragment, jsx as jsx17, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1821
1867
|
var THEMES = { light: "", dark: ".dark" };
|
|
1822
1868
|
var INITIAL_DIMENSION = { width: 320, height: 200 };
|
|
1823
|
-
var ChartContext =
|
|
1869
|
+
var ChartContext = React5.createContext(null);
|
|
1824
1870
|
function useChart() {
|
|
1825
|
-
const context =
|
|
1871
|
+
const context = React5.useContext(ChartContext);
|
|
1826
1872
|
if (!context) {
|
|
1827
1873
|
throw new Error("useChart must be used within a <ChartContainer />");
|
|
1828
1874
|
}
|
|
@@ -1836,14 +1882,14 @@ function ChartContainer({
|
|
|
1836
1882
|
initialDimension = INITIAL_DIMENSION,
|
|
1837
1883
|
...props
|
|
1838
1884
|
}) {
|
|
1839
|
-
const uniqueId =
|
|
1885
|
+
const uniqueId = React5.useId();
|
|
1840
1886
|
const chartId = `chart-${id ?? uniqueId.replace(/:/g, "")}`;
|
|
1841
1887
|
return /* @__PURE__ */ jsx17(ChartContext.Provider, { value: { config }, children: /* @__PURE__ */ jsxs9(
|
|
1842
1888
|
"div",
|
|
1843
1889
|
{
|
|
1844
1890
|
"data-slot": "chart",
|
|
1845
1891
|
"data-chart": chartId,
|
|
1846
|
-
className:
|
|
1892
|
+
className: cn17(
|
|
1847
1893
|
"flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden",
|
|
1848
1894
|
className
|
|
1849
1895
|
),
|
|
@@ -1903,7 +1949,7 @@ function ChartTooltipContent({
|
|
|
1903
1949
|
labelKey
|
|
1904
1950
|
}) {
|
|
1905
1951
|
const { config } = useChart();
|
|
1906
|
-
const tooltipLabel =
|
|
1952
|
+
const tooltipLabel = React5.useMemo(() => {
|
|
1907
1953
|
if (hideLabel || !payload?.length) {
|
|
1908
1954
|
return null;
|
|
1909
1955
|
}
|
|
@@ -1912,12 +1958,12 @@ function ChartTooltipContent({
|
|
|
1912
1958
|
const itemConfig = getPayloadConfigFromPayload(config, item, key);
|
|
1913
1959
|
const value = !labelKey && typeof label === "string" ? config[label]?.label ?? label : itemConfig?.label;
|
|
1914
1960
|
if (labelFormatter) {
|
|
1915
|
-
return /* @__PURE__ */ jsx17("div", { className:
|
|
1961
|
+
return /* @__PURE__ */ jsx17("div", { className: cn17("font-medium", labelClassName), children: labelFormatter(value, payload) });
|
|
1916
1962
|
}
|
|
1917
1963
|
if (!value) {
|
|
1918
1964
|
return null;
|
|
1919
1965
|
}
|
|
1920
|
-
return /* @__PURE__ */ jsx17("div", { className:
|
|
1966
|
+
return /* @__PURE__ */ jsx17("div", { className: cn17("font-medium", labelClassName), children: value });
|
|
1921
1967
|
}, [
|
|
1922
1968
|
label,
|
|
1923
1969
|
labelFormatter,
|
|
@@ -1934,7 +1980,7 @@ function ChartTooltipContent({
|
|
|
1934
1980
|
return /* @__PURE__ */ jsxs9(
|
|
1935
1981
|
"div",
|
|
1936
1982
|
{
|
|
1937
|
-
className:
|
|
1983
|
+
className: cn17(
|
|
1938
1984
|
"grid min-w-32 items-start gap-1.5 rounded-lg border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",
|
|
1939
1985
|
className
|
|
1940
1986
|
),
|
|
@@ -1947,7 +1993,7 @@ function ChartTooltipContent({
|
|
|
1947
1993
|
return /* @__PURE__ */ jsx17(
|
|
1948
1994
|
"div",
|
|
1949
1995
|
{
|
|
1950
|
-
className:
|
|
1996
|
+
className: cn17(
|
|
1951
1997
|
"flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",
|
|
1952
1998
|
indicator === "dot" && "items-center"
|
|
1953
1999
|
),
|
|
@@ -1955,7 +2001,7 @@ function ChartTooltipContent({
|
|
|
1955
2001
|
itemConfig?.icon ? /* @__PURE__ */ jsx17(itemConfig.icon, {}) : !hideIndicator && /* @__PURE__ */ jsx17(
|
|
1956
2002
|
"div",
|
|
1957
2003
|
{
|
|
1958
|
-
className:
|
|
2004
|
+
className: cn17(
|
|
1959
2005
|
"shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)",
|
|
1960
2006
|
{
|
|
1961
2007
|
"h-2.5 w-2.5": indicator === "dot",
|
|
@@ -1973,7 +2019,7 @@ function ChartTooltipContent({
|
|
|
1973
2019
|
/* @__PURE__ */ jsxs9(
|
|
1974
2020
|
"div",
|
|
1975
2021
|
{
|
|
1976
|
-
className:
|
|
2022
|
+
className: cn17(
|
|
1977
2023
|
"flex flex-1 justify-between leading-none",
|
|
1978
2024
|
nestLabel ? "items-end" : "items-center"
|
|
1979
2025
|
),
|
|
@@ -2010,7 +2056,7 @@ function ChartLegendContent({
|
|
|
2010
2056
|
return /* @__PURE__ */ jsx17(
|
|
2011
2057
|
"div",
|
|
2012
2058
|
{
|
|
2013
|
-
className:
|
|
2059
|
+
className: cn17(
|
|
2014
2060
|
"flex items-center justify-center gap-4",
|
|
2015
2061
|
verticalAlign === "top" ? "pb-3" : "pt-3",
|
|
2016
2062
|
className
|
|
@@ -2021,7 +2067,7 @@ function ChartLegendContent({
|
|
|
2021
2067
|
return /* @__PURE__ */ jsxs9(
|
|
2022
2068
|
"div",
|
|
2023
2069
|
{
|
|
2024
|
-
className:
|
|
2070
|
+
className: cn17(
|
|
2025
2071
|
"flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"
|
|
2026
2072
|
),
|
|
2027
2073
|
children: [
|
|
@@ -2059,13 +2105,14 @@ function getPayloadConfigFromPayload(config, payload, key) {
|
|
|
2059
2105
|
|
|
2060
2106
|
// src/ui/checkbox.tsx
|
|
2061
2107
|
import { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox";
|
|
2108
|
+
import { cn as cn18 } from "cn";
|
|
2062
2109
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
2063
2110
|
function Checkbox({ className, children, ...props }) {
|
|
2064
2111
|
return /* @__PURE__ */ jsx18(
|
|
2065
2112
|
CheckboxPrimitive.Root,
|
|
2066
2113
|
{
|
|
2067
2114
|
"data-slot": "checkbox",
|
|
2068
|
-
className:
|
|
2115
|
+
className: cn18(
|
|
2069
2116
|
"peer inline-flex size-5 shrink-0 items-center justify-center rounded border border-border bg-background text-primary outline-none transition-[background-color,border-color,box-shadow,opacity] duration-150 ease-out focus-visible:ring-2 focus-visible:ring-ring/50 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground data-disabled:cursor-not-allowed data-disabled:opacity-50 motion-reduce:transition-none",
|
|
2070
2117
|
className
|
|
2071
2118
|
),
|
|
@@ -2084,20 +2131,23 @@ function Checkbox({ className, children, ...props }) {
|
|
|
2084
2131
|
|
|
2085
2132
|
// src/ui/combobox.tsx
|
|
2086
2133
|
import { Combobox as ComboboxPrimitive } from "@base-ui/react";
|
|
2087
|
-
import * as
|
|
2134
|
+
import * as React6 from "react";
|
|
2135
|
+
import { cn as cn21 } from "cn";
|
|
2088
2136
|
import { Check, ChevronDown as ChevronDown2, Xmark as Xmark2 } from "@gravity-ui/icons";
|
|
2089
2137
|
|
|
2090
2138
|
// src/ui/input-group.tsx
|
|
2091
2139
|
import { cva as cva5 } from "class-variance-authority";
|
|
2140
|
+
import { cn as cn20 } from "cn";
|
|
2092
2141
|
|
|
2093
2142
|
// src/ui/textarea.tsx
|
|
2143
|
+
import { cn as cn19 } from "cn";
|
|
2094
2144
|
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
2095
2145
|
function Textarea({ className, ...props }) {
|
|
2096
2146
|
return /* @__PURE__ */ jsx19(
|
|
2097
2147
|
"textarea",
|
|
2098
2148
|
{
|
|
2099
2149
|
"data-slot": "textarea",
|
|
2100
|
-
className:
|
|
2150
|
+
className: cn19(
|
|
2101
2151
|
"flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
|
|
2102
2152
|
className
|
|
2103
2153
|
),
|
|
@@ -2114,7 +2164,7 @@ function InputGroup({ className, ...props }) {
|
|
|
2114
2164
|
{
|
|
2115
2165
|
"data-slot": "input-group",
|
|
2116
2166
|
role: "group",
|
|
2117
|
-
className:
|
|
2167
|
+
className: cn20(
|
|
2118
2168
|
"group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-2 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-2 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",
|
|
2119
2169
|
className
|
|
2120
2170
|
),
|
|
@@ -2150,7 +2200,7 @@ function InputGroupAddon({
|
|
|
2150
2200
|
role: "group",
|
|
2151
2201
|
"data-slot": "input-group-addon",
|
|
2152
2202
|
"data-align": align,
|
|
2153
|
-
className:
|
|
2203
|
+
className: cn20(inputGroupAddonVariants({ align }), className),
|
|
2154
2204
|
onClick: (e) => {
|
|
2155
2205
|
if (e.target.closest("button")) {
|
|
2156
2206
|
return;
|
|
@@ -2194,7 +2244,7 @@ function InputGroupButton({
|
|
|
2194
2244
|
type,
|
|
2195
2245
|
"data-size": size,
|
|
2196
2246
|
variant,
|
|
2197
|
-
className:
|
|
2247
|
+
className: cn20(inputGroupButtonVariants({ size }), className),
|
|
2198
2248
|
...props
|
|
2199
2249
|
}
|
|
2200
2250
|
);
|
|
@@ -2203,7 +2253,7 @@ function InputGroupText({ className, ...props }) {
|
|
|
2203
2253
|
return /* @__PURE__ */ jsx20(
|
|
2204
2254
|
"span",
|
|
2205
2255
|
{
|
|
2206
|
-
className:
|
|
2256
|
+
className: cn20(
|
|
2207
2257
|
"flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
|
2208
2258
|
className
|
|
2209
2259
|
),
|
|
@@ -2219,7 +2269,7 @@ function InputGroupInput({
|
|
|
2219
2269
|
Input,
|
|
2220
2270
|
{
|
|
2221
2271
|
"data-slot": "input-group-control",
|
|
2222
|
-
className:
|
|
2272
|
+
className: cn20(
|
|
2223
2273
|
"flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent",
|
|
2224
2274
|
className
|
|
2225
2275
|
),
|
|
@@ -2235,7 +2285,7 @@ function InputGroupTextarea({
|
|
|
2235
2285
|
Textarea,
|
|
2236
2286
|
{
|
|
2237
2287
|
"data-slot": "input-group-control",
|
|
2238
|
-
className:
|
|
2288
|
+
className: cn20(
|
|
2239
2289
|
"flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent",
|
|
2240
2290
|
className
|
|
2241
2291
|
),
|
|
@@ -2259,7 +2309,7 @@ function ComboboxTrigger({
|
|
|
2259
2309
|
ComboboxPrimitive.Trigger,
|
|
2260
2310
|
{
|
|
2261
2311
|
"data-slot": "combobox-trigger",
|
|
2262
|
-
className:
|
|
2312
|
+
className: cn21("[&_svg:not([class*='size-'])]:size-4", className),
|
|
2263
2313
|
...props,
|
|
2264
2314
|
children: [
|
|
2265
2315
|
children,
|
|
@@ -2274,7 +2324,7 @@ function ComboboxClear({ className, ...props }) {
|
|
|
2274
2324
|
{
|
|
2275
2325
|
"data-slot": "combobox-clear",
|
|
2276
2326
|
render: /* @__PURE__ */ jsx21(InputGroupButton, { variant: "ghost", size: "icon-xs" }),
|
|
2277
|
-
className:
|
|
2327
|
+
className: cn21(className),
|
|
2278
2328
|
...props,
|
|
2279
2329
|
children: /* @__PURE__ */ jsx21(Xmark2, { className: "pointer-events-none" })
|
|
2280
2330
|
}
|
|
@@ -2290,7 +2340,7 @@ function ComboboxInput({
|
|
|
2290
2340
|
endContent,
|
|
2291
2341
|
...props
|
|
2292
2342
|
}) {
|
|
2293
|
-
return /* @__PURE__ */ jsxs10(InputGroup, { className:
|
|
2343
|
+
return /* @__PURE__ */ jsxs10(InputGroup, { className: cn21("w-auto", className), children: [
|
|
2294
2344
|
/* @__PURE__ */ jsx21(
|
|
2295
2345
|
ComboboxPrimitive.Input,
|
|
2296
2346
|
{
|
|
@@ -2340,7 +2390,7 @@ function ComboboxContent({
|
|
|
2340
2390
|
{
|
|
2341
2391
|
"data-slot": "combobox-content",
|
|
2342
2392
|
"data-chips": !!anchor,
|
|
2343
|
-
className:
|
|
2393
|
+
className: cn21(
|
|
2344
2394
|
"group/combobox-content relative max-h-(--available-height) w-(--anchor-width) max-w-(--available-width) min-w-[calc(var(--anchor-width)+(--spacing(7)))] origin-(--transform-origin) overflow-hidden rounded-lg bg-background text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[chips=true]:min-w-(--anchor-width) 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=input-group]:m-1 *:data-[slot=input-group]:mb-0 *:data-[slot=input-group]:h-8 *:data-[slot=input-group]:border-input/30 *:data-[slot=input-group]:bg-input/30 *:data-[slot=input-group]:shadow-none 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",
|
|
2345
2395
|
className
|
|
2346
2396
|
),
|
|
@@ -2355,7 +2405,7 @@ function ComboboxList({ className, ...props }) {
|
|
|
2355
2405
|
ComboboxPrimitive.List,
|
|
2356
2406
|
{
|
|
2357
2407
|
"data-slot": "combobox-list",
|
|
2358
|
-
className:
|
|
2408
|
+
className: cn21(
|
|
2359
2409
|
"no-scrollbar max-h-[min(calc(--spacing(72)-(--spacing(9))),calc(var(--available-height)-(--spacing(9))))] scroll-py-1 overflow-y-auto overscroll-contain p-1 data-empty:p-0",
|
|
2360
2410
|
className
|
|
2361
2411
|
),
|
|
@@ -2372,7 +2422,7 @@ function ComboboxItem({
|
|
|
2372
2422
|
ComboboxPrimitive.Item,
|
|
2373
2423
|
{
|
|
2374
2424
|
"data-slot": "combobox-item",
|
|
2375
|
-
className:
|
|
2425
|
+
className: cn21(
|
|
2376
2426
|
"relative flex w-full cursor-default items-center gap-2 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
2377
2427
|
className
|
|
2378
2428
|
),
|
|
@@ -2395,7 +2445,7 @@ function ComboboxGroup({ className, ...props }) {
|
|
|
2395
2445
|
ComboboxPrimitive.Group,
|
|
2396
2446
|
{
|
|
2397
2447
|
"data-slot": "combobox-group",
|
|
2398
|
-
className:
|
|
2448
|
+
className: cn21(className),
|
|
2399
2449
|
...props
|
|
2400
2450
|
}
|
|
2401
2451
|
);
|
|
@@ -2408,7 +2458,7 @@ function ComboboxLabel({
|
|
|
2408
2458
|
ComboboxPrimitive.GroupLabel,
|
|
2409
2459
|
{
|
|
2410
2460
|
"data-slot": "combobox-label",
|
|
2411
|
-
className:
|
|
2461
|
+
className: cn21("px-2 py-1.5 text-xs text-muted-foreground", className),
|
|
2412
2462
|
...props
|
|
2413
2463
|
}
|
|
2414
2464
|
);
|
|
@@ -2421,7 +2471,7 @@ function ComboboxEmpty({ className, ...props }) {
|
|
|
2421
2471
|
ComboboxPrimitive.Empty,
|
|
2422
2472
|
{
|
|
2423
2473
|
"data-slot": "combobox-empty",
|
|
2424
|
-
className:
|
|
2474
|
+
className: cn21(
|
|
2425
2475
|
"hidden w-full justify-center py-2 text-center text-sm text-muted-foreground group-data-empty/combobox-content:flex",
|
|
2426
2476
|
className
|
|
2427
2477
|
),
|
|
@@ -2437,7 +2487,7 @@ function ComboboxSeparator({
|
|
|
2437
2487
|
ComboboxPrimitive.Separator,
|
|
2438
2488
|
{
|
|
2439
2489
|
"data-slot": "combobox-separator",
|
|
2440
|
-
className:
|
|
2490
|
+
className: cn21("-mx-1 my-1 h-px bg-border", className),
|
|
2441
2491
|
...props
|
|
2442
2492
|
}
|
|
2443
2493
|
);
|
|
@@ -2450,7 +2500,7 @@ function ComboboxChips({
|
|
|
2450
2500
|
ComboboxPrimitive.Chips,
|
|
2451
2501
|
{
|
|
2452
2502
|
"data-slot": "combobox-chips",
|
|
2453
|
-
className:
|
|
2503
|
+
className: cn21(
|
|
2454
2504
|
"flex min-h-8 flex-wrap items-center gap-1 rounded-lg border border-input bg-transparent bg-clip-padding px-2.5 py-1 text-sm transition-colors focus-within:border-ring focus-within:ring-2 focus-within:ring-ring/50 has-aria-invalid:border-destructive has-aria-invalid:ring-2 has-aria-invalid:ring-destructive/20 has-data-[slot=combobox-chip]:px-1 dark:bg-input/30 dark:has-aria-invalid:border-destructive/50 dark:has-aria-invalid:ring-destructive/40",
|
|
2455
2505
|
className
|
|
2456
2506
|
),
|
|
@@ -2468,7 +2518,7 @@ function ComboboxChip({
|
|
|
2468
2518
|
ComboboxPrimitive.Chip,
|
|
2469
2519
|
{
|
|
2470
2520
|
"data-slot": "combobox-chip",
|
|
2471
|
-
className:
|
|
2521
|
+
className: cn21(
|
|
2472
2522
|
"flex h-[calc(--spacing(5.25))] w-fit items-center justify-center gap-1 rounded-sm bg-muted px-1.5 text-xs font-medium whitespace-nowrap text-foreground has-disabled:pointer-events-none has-disabled:cursor-not-allowed has-disabled:opacity-50 has-data-[slot=combobox-chip-remove]:pr-0",
|
|
2473
2523
|
className
|
|
2474
2524
|
),
|
|
@@ -2496,21 +2546,23 @@ function ComboboxChipsInput({
|
|
|
2496
2546
|
ComboboxPrimitive.Input,
|
|
2497
2547
|
{
|
|
2498
2548
|
"data-slot": "combobox-chip-input",
|
|
2499
|
-
className:
|
|
2549
|
+
className: cn21("min-w-16 flex-1 outline-none", className),
|
|
2500
2550
|
...props
|
|
2501
2551
|
}
|
|
2502
2552
|
);
|
|
2503
2553
|
}
|
|
2504
2554
|
function useComboboxAnchor() {
|
|
2505
|
-
return
|
|
2555
|
+
return React6.useRef(null);
|
|
2506
2556
|
}
|
|
2507
2557
|
|
|
2508
2558
|
// src/ui/command.tsx
|
|
2509
2559
|
import { Command as CommandPrimitive } from "cmdk";
|
|
2560
|
+
import { cn as cn23 } from "cn";
|
|
2510
2561
|
import { Magnifier } from "@gravity-ui/icons";
|
|
2511
2562
|
|
|
2512
2563
|
// src/ui/dialog.tsx
|
|
2513
2564
|
import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
|
|
2565
|
+
import { cn as cn22 } from "cn";
|
|
2514
2566
|
import { Xmark as Xmark3 } from "@gravity-ui/icons";
|
|
2515
2567
|
import { jsx as jsx22, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2516
2568
|
function Dialog({ ...props }) {
|
|
@@ -2533,7 +2585,7 @@ function DialogOverlay({
|
|
|
2533
2585
|
DialogPrimitive.Backdrop,
|
|
2534
2586
|
{
|
|
2535
2587
|
"data-slot": "dialog-overlay",
|
|
2536
|
-
className:
|
|
2588
|
+
className: cn22(
|
|
2537
2589
|
"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",
|
|
2538
2590
|
className
|
|
2539
2591
|
),
|
|
@@ -2553,7 +2605,7 @@ function DialogContent({
|
|
|
2553
2605
|
DialogPrimitive.Popup,
|
|
2554
2606
|
{
|
|
2555
2607
|
"data-slot": "dialog-content",
|
|
2556
|
-
className:
|
|
2608
|
+
className: cn22(
|
|
2557
2609
|
"fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-card p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
2558
2610
|
className
|
|
2559
2611
|
),
|
|
@@ -2588,7 +2640,7 @@ function DialogHeader({ className, ...props }) {
|
|
|
2588
2640
|
"div",
|
|
2589
2641
|
{
|
|
2590
2642
|
"data-slot": "dialog-header",
|
|
2591
|
-
className:
|
|
2643
|
+
className: cn22("flex flex-col gap-2", className),
|
|
2592
2644
|
...props
|
|
2593
2645
|
}
|
|
2594
2646
|
);
|
|
@@ -2603,7 +2655,7 @@ function DialogFooter({
|
|
|
2603
2655
|
"div",
|
|
2604
2656
|
{
|
|
2605
2657
|
"data-slot": "dialog-footer",
|
|
2606
|
-
className:
|
|
2658
|
+
className: cn22(
|
|
2607
2659
|
"flex shrink-0 flex-col-reverse items-center justify-center gap-2 p-4 pt-0 sm:flex-row",
|
|
2608
2660
|
className
|
|
2609
2661
|
),
|
|
@@ -2620,7 +2672,7 @@ function DialogTitle({ className, ...props }) {
|
|
|
2620
2672
|
DialogPrimitive.Title,
|
|
2621
2673
|
{
|
|
2622
2674
|
"data-slot": "dialog-title",
|
|
2623
|
-
className:
|
|
2675
|
+
className: cn22("text-base leading-none font-medium", className),
|
|
2624
2676
|
...props
|
|
2625
2677
|
}
|
|
2626
2678
|
);
|
|
@@ -2633,7 +2685,7 @@ function DialogDescription({
|
|
|
2633
2685
|
DialogPrimitive.Description,
|
|
2634
2686
|
{
|
|
2635
2687
|
"data-slot": "dialog-description",
|
|
2636
|
-
className:
|
|
2688
|
+
className: cn22(
|
|
2637
2689
|
"text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground",
|
|
2638
2690
|
className
|
|
2639
2691
|
),
|
|
@@ -2652,7 +2704,7 @@ function Command({
|
|
|
2652
2704
|
CommandPrimitive,
|
|
2653
2705
|
{
|
|
2654
2706
|
"data-slot": "command",
|
|
2655
|
-
className:
|
|
2707
|
+
className: cn23(
|
|
2656
2708
|
"flex size-full flex-col overflow-hidden rounded-xl! bg-background text-popover-foreground outline-none",
|
|
2657
2709
|
className
|
|
2658
2710
|
),
|
|
@@ -2676,7 +2728,7 @@ function CommandDialog({
|
|
|
2676
2728
|
/* @__PURE__ */ jsx23(
|
|
2677
2729
|
DialogContent,
|
|
2678
2730
|
{
|
|
2679
|
-
className:
|
|
2731
|
+
className: cn23(
|
|
2680
2732
|
"top-1/3 translate-y-0 overflow-hidden rounded-xl! p-0",
|
|
2681
2733
|
className
|
|
2682
2734
|
),
|
|
@@ -2697,7 +2749,7 @@ function CommandInput({
|
|
|
2697
2749
|
InputGroup,
|
|
2698
2750
|
{
|
|
2699
2751
|
"data-slot": "command-input-wrapper",
|
|
2700
|
-
className:
|
|
2752
|
+
className: cn23(
|
|
2701
2753
|
"h-8! border-input/30 bg-input/30 shadow-none! *:data-[slot=input-group-addon]:pl-2!",
|
|
2702
2754
|
className
|
|
2703
2755
|
),
|
|
@@ -2726,7 +2778,7 @@ function CommandList({
|
|
|
2726
2778
|
CommandPrimitive.List,
|
|
2727
2779
|
{
|
|
2728
2780
|
"data-slot": "command-list",
|
|
2729
|
-
className:
|
|
2781
|
+
className: cn23(
|
|
2730
2782
|
"no-scrollbar max-h-72 scroll-py-1 overflow-x-hidden overflow-y-auto outline-none",
|
|
2731
2783
|
className
|
|
2732
2784
|
),
|
|
@@ -2742,7 +2794,7 @@ function CommandEmpty({
|
|
|
2742
2794
|
CommandPrimitive.Empty,
|
|
2743
2795
|
{
|
|
2744
2796
|
"data-slot": "command-empty",
|
|
2745
|
-
className:
|
|
2797
|
+
className: cn23("py-6 text-center text-sm", className),
|
|
2746
2798
|
...props
|
|
2747
2799
|
}
|
|
2748
2800
|
);
|
|
@@ -2755,7 +2807,7 @@ function CommandGroup({
|
|
|
2755
2807
|
CommandPrimitive.Group,
|
|
2756
2808
|
{
|
|
2757
2809
|
"data-slot": "command-group",
|
|
2758
|
-
className:
|
|
2810
|
+
className: cn23(
|
|
2759
2811
|
"overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground",
|
|
2760
2812
|
className
|
|
2761
2813
|
),
|
|
@@ -2771,7 +2823,7 @@ function CommandSeparator({
|
|
|
2771
2823
|
CommandPrimitive.Separator,
|
|
2772
2824
|
{
|
|
2773
2825
|
"data-slot": "command-separator",
|
|
2774
|
-
className:
|
|
2826
|
+
className: cn23("-mx-1 h-px bg-border", className),
|
|
2775
2827
|
...props
|
|
2776
2828
|
}
|
|
2777
2829
|
);
|
|
@@ -2785,7 +2837,7 @@ function CommandItem({
|
|
|
2785
2837
|
CommandPrimitive.Item,
|
|
2786
2838
|
{
|
|
2787
2839
|
"data-slot": "command-item",
|
|
2788
|
-
className:
|
|
2840
|
+
className: cn23(
|
|
2789
2841
|
"group/command-item relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none in-data-[slot=dialog-content]:rounded-lg! data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 data-selected:bg-muted data-selected:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-selected:*:[svg]:text-foreground",
|
|
2790
2842
|
className
|
|
2791
2843
|
),
|
|
@@ -2802,7 +2854,7 @@ function CommandShortcut({
|
|
|
2802
2854
|
"span",
|
|
2803
2855
|
{
|
|
2804
2856
|
"data-slot": "command-shortcut",
|
|
2805
|
-
className:
|
|
2857
|
+
className: cn23(
|
|
2806
2858
|
"ml-auto text-xs tracking-widest text-muted-foreground group-data-selected/command-item:text-foreground",
|
|
2807
2859
|
className
|
|
2808
2860
|
),
|
|
@@ -2812,7 +2864,8 @@ function CommandShortcut({
|
|
|
2812
2864
|
}
|
|
2813
2865
|
|
|
2814
2866
|
// src/ui/dashed.tsx
|
|
2815
|
-
import * as
|
|
2867
|
+
import * as React7 from "react";
|
|
2868
|
+
import { cn as cn24 } from "cn";
|
|
2816
2869
|
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
2817
2870
|
function DashedSeparator({
|
|
2818
2871
|
className,
|
|
@@ -2820,9 +2873,9 @@ function DashedSeparator({
|
|
|
2820
2873
|
minimumGap = 8,
|
|
2821
2874
|
thickness = 1
|
|
2822
2875
|
}) {
|
|
2823
|
-
const containerRef =
|
|
2824
|
-
const [dashCount, setDashCount] =
|
|
2825
|
-
|
|
2876
|
+
const containerRef = React7.useRef(null);
|
|
2877
|
+
const [dashCount, setDashCount] = React7.useState(0);
|
|
2878
|
+
React7.useEffect(() => {
|
|
2826
2879
|
const element = containerRef.current;
|
|
2827
2880
|
if (!element) return;
|
|
2828
2881
|
const updateDashCount = () => {
|
|
@@ -2843,7 +2896,7 @@ function DashedSeparator({
|
|
|
2843
2896
|
{
|
|
2844
2897
|
ref: containerRef,
|
|
2845
2898
|
"aria-hidden": "true",
|
|
2846
|
-
className:
|
|
2899
|
+
className: cn24(
|
|
2847
2900
|
"flex w-full items-center justify-between overflow-hidden text-border",
|
|
2848
2901
|
className
|
|
2849
2902
|
),
|
|
@@ -2864,8 +2917,9 @@ function DashedSeparator({
|
|
|
2864
2917
|
}
|
|
2865
2918
|
|
|
2866
2919
|
// src/ui/dock.tsx
|
|
2920
|
+
import { cn as cn25 } from "cn";
|
|
2867
2921
|
import { motion as motion4 } from "motion/react";
|
|
2868
|
-
import * as
|
|
2922
|
+
import * as React8 from "react";
|
|
2869
2923
|
import { jsx as jsx25, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2870
2924
|
var floatingAnimation = {
|
|
2871
2925
|
initial: { y: 0 },
|
|
@@ -2878,7 +2932,7 @@ var floatingAnimation = {
|
|
|
2878
2932
|
}
|
|
2879
2933
|
}
|
|
2880
2934
|
};
|
|
2881
|
-
var DockIconButton =
|
|
2935
|
+
var DockIconButton = React8.forwardRef(
|
|
2882
2936
|
({ icon: Icon, label, onClick, className }, ref) => {
|
|
2883
2937
|
return /* @__PURE__ */ jsxs13(
|
|
2884
2938
|
motion4.button,
|
|
@@ -2887,7 +2941,7 @@ var DockIconButton = React7.forwardRef(
|
|
|
2887
2941
|
whileHover: { scale: 1.1, y: -2 },
|
|
2888
2942
|
whileTap: { scale: 0.95 },
|
|
2889
2943
|
onClick,
|
|
2890
|
-
className:
|
|
2944
|
+
className: cn25(
|
|
2891
2945
|
"group relative rounded-lg p-3",
|
|
2892
2946
|
"transition-colors hover:bg-secondary",
|
|
2893
2947
|
className
|
|
@@ -2897,7 +2951,7 @@ var DockIconButton = React7.forwardRef(
|
|
|
2897
2951
|
/* @__PURE__ */ jsx25(
|
|
2898
2952
|
"span",
|
|
2899
2953
|
{
|
|
2900
|
-
className:
|
|
2954
|
+
className: cn25(
|
|
2901
2955
|
"absolute -top-8 left-1/2 -translate-x-1/2",
|
|
2902
2956
|
"rounded px-2 py-1 text-xs",
|
|
2903
2957
|
"bg-background text-popover-foreground",
|
|
@@ -2913,13 +2967,13 @@ var DockIconButton = React7.forwardRef(
|
|
|
2913
2967
|
}
|
|
2914
2968
|
);
|
|
2915
2969
|
DockIconButton.displayName = "DockIconButton";
|
|
2916
|
-
var Dock =
|
|
2970
|
+
var Dock = React8.forwardRef(
|
|
2917
2971
|
({ items, className }, ref) => {
|
|
2918
2972
|
return /* @__PURE__ */ jsx25(
|
|
2919
2973
|
"div",
|
|
2920
2974
|
{
|
|
2921
2975
|
ref,
|
|
2922
|
-
className:
|
|
2976
|
+
className: cn25(
|
|
2923
2977
|
"flex h-64 w-full items-center justify-center p-2",
|
|
2924
2978
|
className
|
|
2925
2979
|
),
|
|
@@ -2929,7 +2983,7 @@ var Dock = React7.forwardRef(
|
|
|
2929
2983
|
initial: "initial",
|
|
2930
2984
|
animate: "animate",
|
|
2931
2985
|
variants: floatingAnimation,
|
|
2932
|
-
className:
|
|
2986
|
+
className: cn25(
|
|
2933
2987
|
"flex items-center gap-1 rounded-2xl p-2",
|
|
2934
2988
|
"border shadow-lg backdrop-blur-lg",
|
|
2935
2989
|
"border-border bg-background/90",
|
|
@@ -2946,11 +3000,12 @@ Dock.displayName = "Dock";
|
|
|
2946
3000
|
|
|
2947
3001
|
// src/ui/drawer.tsx
|
|
2948
3002
|
import { Drawer as DrawerPrimitive } from "@base-ui/react/drawer";
|
|
2949
|
-
import * as
|
|
3003
|
+
import * as React9 from "react";
|
|
3004
|
+
import { cn as cn26 } from "cn";
|
|
2950
3005
|
import { jsx as jsx26, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2951
|
-
var DrawerContext =
|
|
3006
|
+
var DrawerContext = React9.createContext(null);
|
|
2952
3007
|
function useDrawer() {
|
|
2953
|
-
const context =
|
|
3008
|
+
const context = React9.useContext(DrawerContext);
|
|
2954
3009
|
if (!context) {
|
|
2955
3010
|
throw new Error("useDrawer must be used within a Drawer.");
|
|
2956
3011
|
}
|
|
@@ -2965,7 +3020,7 @@ function Drawer({
|
|
|
2965
3020
|
}) {
|
|
2966
3021
|
const hasSnapPoints = snapPoints != null && snapPoints.length > 0;
|
|
2967
3022
|
const resolvedShowSwipeHandle = showSwipeHandle ?? (swipeDirection === "down" || swipeDirection === "up");
|
|
2968
|
-
const contextValue =
|
|
3023
|
+
const contextValue = React9.useMemo(
|
|
2969
3024
|
() => ({
|
|
2970
3025
|
hasSnapPoints,
|
|
2971
3026
|
modal,
|
|
@@ -3002,7 +3057,7 @@ function DrawerOverlay({
|
|
|
3002
3057
|
DrawerPrimitive.Backdrop,
|
|
3003
3058
|
{
|
|
3004
3059
|
"data-slot": "drawer-overlay",
|
|
3005
|
-
className:
|
|
3060
|
+
className: cn26(
|
|
3006
3061
|
"ease-out-fluid fixed inset-0 z-50 min-h-dvh bg-black/10 opacity-[max(var(--drawer-overlay-min-opacity,0),calc(1-var(--drawer-swipe-progress)))] transition-opacity duration-450 select-none data-ending-style:pointer-events-none data-ending-style:opacity-0 data-ending-style:duration-[calc(var(--drawer-swipe-strength)*400ms)] data-snap-points:[--drawer-overlay-min-opacity:0.5] data-starting-style:opacity-0 data-swiping:duration-0 supports-backdrop-filter:backdrop-blur-xs supports-[-webkit-touch-callout:none]:absolute",
|
|
3007
3062
|
className
|
|
3008
3063
|
),
|
|
@@ -3019,7 +3074,7 @@ function DrawerSwipeHandle({
|
|
|
3019
3074
|
{
|
|
3020
3075
|
"data-slot": "drawer-swipe-handle",
|
|
3021
3076
|
"aria-hidden": "true",
|
|
3022
|
-
className:
|
|
3077
|
+
className: cn26(
|
|
3023
3078
|
"flex shrink-0 cursor-grab transition-opacity duration-200 group-data-nested-drawer-open/drawer-popup:opacity-0 group-data-nested-drawer-swiping/drawer-popup:opacity-100 group-data-[swipe-axis=x]/drawer-popup:h-full group-data-[swipe-axis=x]/drawer-popup:w-3 group-data-[swipe-axis=x]/drawer-popup:items-center group-data-[swipe-axis=y]/drawer-popup:h-3 group-data-[swipe-axis=y]/drawer-popup:w-full group-data-[swipe-axis=y]/drawer-popup:justify-center group-data-[swipe-direction=down]/drawer-popup:items-end group-data-[swipe-direction=left]/drawer-popup:order-last group-data-[swipe-direction=left]/drawer-popup:justify-start group-data-[swipe-direction=right]/drawer-popup:justify-end group-data-[swipe-direction=up]/drawer-popup:order-last group-data-[swipe-direction=up]/drawer-popup:items-start after:block after:shrink-0 after:rounded-full after:bg-muted group-data-[swipe-axis=x]/drawer-popup:after:h-24 group-data-[swipe-axis=x]/drawer-popup:after:w-1 group-data-[swipe-axis=y]/drawer-popup:after:h-1 group-data-[swipe-axis=y]/drawer-popup:after:w-20 active:cursor-grabbing",
|
|
3024
3079
|
className
|
|
3025
3080
|
),
|
|
@@ -3048,7 +3103,7 @@ function DrawerContent({
|
|
|
3048
3103
|
"data-slot": "drawer-popup",
|
|
3049
3104
|
"data-swipe-axis": swipeAxis,
|
|
3050
3105
|
"data-snap-points": hasSnapPoints ? "" : void 0,
|
|
3051
|
-
className:
|
|
3106
|
+
className: cn26(
|
|
3052
3107
|
// Base.
|
|
3053
3108
|
"group/drawer-popup pointer-events-auto fixed z-50 m-(--drawer-inset,0px) flex h-(--drawer-content-height) max-h-(--drawer-content-max-height,none) min-h-0 w-(--drawer-content-width,auto) transform-[translate3d(var(--translate-x,0px),var(--translate-y,0px),0)_scale(var(--stack-scale))] flex-col rounded-4xl border bg-card text-sm text-popover-foreground transition-[transform,height,opacity,filter] duration-450 ease-[cubic-bezier(0.22,1,0.36,1)] will-change-transform outline-none select-none [--drawer-bleed-background:transparent] [--drawer-inset:--spacing(2)] [interpolate-size:allow-keywords] max-md:pb-(--app-safe-bottom) md:pb-0 dark:border-border",
|
|
3054
3109
|
// Nested.
|
|
@@ -3082,7 +3137,7 @@ function DrawerContent({
|
|
|
3082
3137
|
DrawerPrimitive.Content,
|
|
3083
3138
|
{
|
|
3084
3139
|
"data-slot": "drawer-content",
|
|
3085
|
-
className:
|
|
3140
|
+
className: cn26(
|
|
3086
3141
|
"flex min-h-0 flex-1 flex-col overflow-hidden overscroll-contain rounded-[inherit] transition-opacity duration-300 ease-[cubic-bezier(0.45,1.005,0,1.005)] select-text group-data-nested-drawer-open/drawer-popup:opacity-0 group-data-nested-drawer-swiping/drawer-popup:opacity-100 group-data-swiping/drawer-popup:select-none"
|
|
3087
3142
|
),
|
|
3088
3143
|
children
|
|
@@ -3100,7 +3155,7 @@ function DrawerHeader({ className, ...props }) {
|
|
|
3100
3155
|
"div",
|
|
3101
3156
|
{
|
|
3102
3157
|
"data-slot": "drawer-header",
|
|
3103
|
-
className:
|
|
3158
|
+
className: cn26(
|
|
3104
3159
|
"flex shrink-0 flex-col gap-0.5 p-4 pb-0 group-data-[swipe-axis=y]/drawer-popup:text-center md:gap-1.5 md:text-left",
|
|
3105
3160
|
className
|
|
3106
3161
|
),
|
|
@@ -3113,7 +3168,7 @@ function DrawerFooter({ className, ...props }) {
|
|
|
3113
3168
|
"div",
|
|
3114
3169
|
{
|
|
3115
3170
|
"data-slot": "drawer-footer",
|
|
3116
|
-
className:
|
|
3171
|
+
className: cn26("mt-auto flex shrink-0 flex-col gap-2 p-4 pt-0", className),
|
|
3117
3172
|
...props
|
|
3118
3173
|
}
|
|
3119
3174
|
);
|
|
@@ -3123,7 +3178,7 @@ function DrawerTitle({ className, ...props }) {
|
|
|
3123
3178
|
DrawerPrimitive.Title,
|
|
3124
3179
|
{
|
|
3125
3180
|
"data-slot": "drawer-title",
|
|
3126
|
-
className:
|
|
3181
|
+
className: cn26(
|
|
3127
3182
|
"font-heading text-base font-medium text-foreground",
|
|
3128
3183
|
className
|
|
3129
3184
|
),
|
|
@@ -3139,7 +3194,7 @@ function DrawerDescription({
|
|
|
3139
3194
|
DrawerPrimitive.Description,
|
|
3140
3195
|
{
|
|
3141
3196
|
"data-slot": "drawer-description",
|
|
3142
|
-
className:
|
|
3197
|
+
className: cn26("text-sm text-balance text-muted-foreground", className),
|
|
3143
3198
|
...props
|
|
3144
3199
|
}
|
|
3145
3200
|
);
|
|
@@ -3147,6 +3202,7 @@ function DrawerDescription({
|
|
|
3147
3202
|
|
|
3148
3203
|
// src/ui/dropdown-menu.tsx
|
|
3149
3204
|
import { Menu as MenuPrimitive } from "@base-ui/react/menu";
|
|
3205
|
+
import { cn as cn27 } from "cn";
|
|
3150
3206
|
import { CheckIcon, ChevronRightIcon } from "lucide-react";
|
|
3151
3207
|
import { jsx as jsx27, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3152
3208
|
function DropdownMenu({ ...props }) {
|
|
@@ -3178,7 +3234,7 @@ function DropdownMenuContent({
|
|
|
3178
3234
|
MenuPrimitive.Popup,
|
|
3179
3235
|
{
|
|
3180
3236
|
"data-slot": "dropdown-menu-content",
|
|
3181
|
-
className:
|
|
3237
|
+
className: cn27(
|
|
3182
3238
|
"z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-background 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",
|
|
3183
3239
|
className
|
|
3184
3240
|
),
|
|
@@ -3201,7 +3257,7 @@ function DropdownMenuLabel({
|
|
|
3201
3257
|
{
|
|
3202
3258
|
"data-slot": "dropdown-menu-label",
|
|
3203
3259
|
"data-inset": inset,
|
|
3204
|
-
className:
|
|
3260
|
+
className: cn27(
|
|
3205
3261
|
"px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7",
|
|
3206
3262
|
className
|
|
3207
3263
|
),
|
|
@@ -3221,7 +3277,7 @@ function DropdownMenuItem({
|
|
|
3221
3277
|
"data-slot": "dropdown-menu-item",
|
|
3222
3278
|
"data-inset": inset,
|
|
3223
3279
|
"data-variant": variant,
|
|
3224
|
-
className:
|
|
3280
|
+
className: cn27(
|
|
3225
3281
|
"group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 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",
|
|
3226
3282
|
className
|
|
3227
3283
|
),
|
|
@@ -3243,7 +3299,7 @@ function DropdownMenuSubTrigger({
|
|
|
3243
3299
|
{
|
|
3244
3300
|
"data-slot": "dropdown-menu-sub-trigger",
|
|
3245
3301
|
"data-inset": inset,
|
|
3246
|
-
className:
|
|
3302
|
+
className: cn27(
|
|
3247
3303
|
"flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 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",
|
|
3248
3304
|
className
|
|
3249
3305
|
),
|
|
@@ -3267,7 +3323,7 @@ function DropdownMenuSubContent({
|
|
|
3267
3323
|
DropdownMenuContent,
|
|
3268
3324
|
{
|
|
3269
3325
|
"data-slot": "dropdown-menu-sub-content",
|
|
3270
|
-
className:
|
|
3326
|
+
className: cn27(
|
|
3271
3327
|
"w-auto min-w-[96px] rounded-lg bg-background 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",
|
|
3272
3328
|
className
|
|
3273
3329
|
),
|
|
@@ -3291,7 +3347,7 @@ function DropdownMenuCheckboxItem({
|
|
|
3291
3347
|
{
|
|
3292
3348
|
"data-slot": "dropdown-menu-checkbox-item",
|
|
3293
3349
|
"data-inset": inset,
|
|
3294
|
-
className:
|
|
3350
|
+
className: cn27(
|
|
3295
3351
|
"relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
3296
3352
|
className
|
|
3297
3353
|
),
|
|
@@ -3331,7 +3387,7 @@ function DropdownMenuRadioItem({
|
|
|
3331
3387
|
{
|
|
3332
3388
|
"data-slot": "dropdown-menu-radio-item",
|
|
3333
3389
|
"data-inset": inset,
|
|
3334
|
-
className:
|
|
3390
|
+
className: cn27(
|
|
3335
3391
|
"relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
3336
3392
|
className
|
|
3337
3393
|
),
|
|
@@ -3358,7 +3414,7 @@ function DropdownMenuSeparator({
|
|
|
3358
3414
|
MenuPrimitive.Separator,
|
|
3359
3415
|
{
|
|
3360
3416
|
"data-slot": "dropdown-menu-separator",
|
|
3361
|
-
className:
|
|
3417
|
+
className: cn27("-mx-1 my-1 h-px bg-border", className),
|
|
3362
3418
|
...props
|
|
3363
3419
|
}
|
|
3364
3420
|
);
|
|
@@ -3371,7 +3427,7 @@ function DropdownMenuShortcut({
|
|
|
3371
3427
|
"span",
|
|
3372
3428
|
{
|
|
3373
3429
|
"data-slot": "dropdown-menu-shortcut",
|
|
3374
|
-
className:
|
|
3430
|
+
className: cn27(
|
|
3375
3431
|
"ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground",
|
|
3376
3432
|
className
|
|
3377
3433
|
),
|
|
@@ -3382,13 +3438,14 @@ function DropdownMenuShortcut({
|
|
|
3382
3438
|
|
|
3383
3439
|
// src/ui/empty.tsx
|
|
3384
3440
|
import { cva as cva6 } from "class-variance-authority";
|
|
3441
|
+
import { cn as cn28 } from "cn";
|
|
3385
3442
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
3386
3443
|
function Empty({ className, ...props }) {
|
|
3387
3444
|
return /* @__PURE__ */ jsx28(
|
|
3388
3445
|
"div",
|
|
3389
3446
|
{
|
|
3390
3447
|
"data-slot": "empty",
|
|
3391
|
-
className:
|
|
3448
|
+
className: cn28(
|
|
3392
3449
|
"flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance",
|
|
3393
3450
|
className
|
|
3394
3451
|
),
|
|
@@ -3401,7 +3458,7 @@ function EmptyHeader({ className, ...props }) {
|
|
|
3401
3458
|
"div",
|
|
3402
3459
|
{
|
|
3403
3460
|
"data-slot": "empty-header",
|
|
3404
|
-
className:
|
|
3461
|
+
className: cn28("flex max-w-sm flex-col items-center gap-2", className),
|
|
3405
3462
|
...props
|
|
3406
3463
|
}
|
|
3407
3464
|
);
|
|
@@ -3430,7 +3487,7 @@ function EmptyMedia({
|
|
|
3430
3487
|
{
|
|
3431
3488
|
"data-slot": "empty-icon",
|
|
3432
3489
|
"data-variant": variant,
|
|
3433
|
-
className:
|
|
3490
|
+
className: cn28(emptyMediaVariants({ variant, className })),
|
|
3434
3491
|
...props
|
|
3435
3492
|
}
|
|
3436
3493
|
);
|
|
@@ -3440,7 +3497,7 @@ function EmptyTitle({ className, ...props }) {
|
|
|
3440
3497
|
"div",
|
|
3441
3498
|
{
|
|
3442
3499
|
"data-slot": "empty-title",
|
|
3443
|
-
className:
|
|
3500
|
+
className: cn28("text-sm font-medium tracking-tight", className),
|
|
3444
3501
|
...props
|
|
3445
3502
|
}
|
|
3446
3503
|
);
|
|
@@ -3450,7 +3507,7 @@ function EmptyDescription({ className, ...props }) {
|
|
|
3450
3507
|
"div",
|
|
3451
3508
|
{
|
|
3452
3509
|
"data-slot": "empty-description",
|
|
3453
|
-
className:
|
|
3510
|
+
className: cn28(
|
|
3454
3511
|
"text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
|
|
3455
3512
|
className
|
|
3456
3513
|
),
|
|
@@ -3463,7 +3520,7 @@ function EmptyContent({ className, ...props }) {
|
|
|
3463
3520
|
"div",
|
|
3464
3521
|
{
|
|
3465
3522
|
"data-slot": "empty-content",
|
|
3466
|
-
className:
|
|
3523
|
+
className: cn28(
|
|
3467
3524
|
"flex w-full max-w-sm min-w-0 flex-col items-center gap-2.5 text-sm text-balance",
|
|
3468
3525
|
className
|
|
3469
3526
|
),
|
|
@@ -3488,9 +3545,9 @@ function useMediaQuery(query) {
|
|
|
3488
3545
|
|
|
3489
3546
|
// src/ui/farmer/div.tsx
|
|
3490
3547
|
import { motion as motion5 } from "motion/react";
|
|
3491
|
-
import
|
|
3548
|
+
import React10 from "react";
|
|
3492
3549
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
3493
|
-
var AnimatedDiv =
|
|
3550
|
+
var AnimatedDiv = React10.forwardRef(
|
|
3494
3551
|
({ variants, mobileVariants, className, children, infinity, ...motionProps }, ref) => {
|
|
3495
3552
|
const isDesktop = useMediaQuery("(min-width: 768px)");
|
|
3496
3553
|
const selectedVariants = !isDesktop && mobileVariants ? mobileVariants : variants;
|
|
@@ -3812,15 +3869,17 @@ var kanbanOrderCardLayoutTransition = {
|
|
|
3812
3869
|
// src/ui/field.tsx
|
|
3813
3870
|
import { cva as cva7 } from "class-variance-authority";
|
|
3814
3871
|
import { useMemo as useMemo3 } from "react";
|
|
3872
|
+
import { cn as cn30 } from "cn";
|
|
3815
3873
|
|
|
3816
3874
|
// src/ui/label.tsx
|
|
3875
|
+
import { cn as cn29 } from "cn";
|
|
3817
3876
|
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
3818
3877
|
function Label({ className, ...props }) {
|
|
3819
3878
|
return /* @__PURE__ */ jsx30(
|
|
3820
3879
|
"label",
|
|
3821
3880
|
{
|
|
3822
3881
|
"data-slot": "label",
|
|
3823
|
-
className:
|
|
3882
|
+
className: cn29(
|
|
3824
3883
|
"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",
|
|
3825
3884
|
className
|
|
3826
3885
|
),
|
|
@@ -3836,7 +3895,7 @@ function FieldSet({ className, ...props }) {
|
|
|
3836
3895
|
"fieldset",
|
|
3837
3896
|
{
|
|
3838
3897
|
"data-slot": "field-set",
|
|
3839
|
-
className:
|
|
3898
|
+
className: cn30(
|
|
3840
3899
|
"flex flex-col gap-1 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",
|
|
3841
3900
|
className
|
|
3842
3901
|
),
|
|
@@ -3854,7 +3913,7 @@ function FieldLegend({
|
|
|
3854
3913
|
{
|
|
3855
3914
|
"data-slot": "field-legend",
|
|
3856
3915
|
"data-variant": variant,
|
|
3857
|
-
className:
|
|
3916
|
+
className: cn30(
|
|
3858
3917
|
"mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base",
|
|
3859
3918
|
className
|
|
3860
3919
|
),
|
|
@@ -3867,7 +3926,7 @@ function FieldGroup({ className, ...props }) {
|
|
|
3867
3926
|
"div",
|
|
3868
3927
|
{
|
|
3869
3928
|
"data-slot": "field-group",
|
|
3870
|
-
className:
|
|
3929
|
+
className: cn30(
|
|
3871
3930
|
"group/field-group @container/field-group flex w-full flex-col gap-2 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4",
|
|
3872
3931
|
className
|
|
3873
3932
|
),
|
|
@@ -3901,7 +3960,7 @@ function Field({
|
|
|
3901
3960
|
role: "group",
|
|
3902
3961
|
"data-slot": "field",
|
|
3903
3962
|
"data-orientation": orientation,
|
|
3904
|
-
className:
|
|
3963
|
+
className: cn30(fieldVariants({ orientation }), className),
|
|
3905
3964
|
...props
|
|
3906
3965
|
}
|
|
3907
3966
|
);
|
|
@@ -3911,7 +3970,7 @@ function FieldContent({ className, ...props }) {
|
|
|
3911
3970
|
"div",
|
|
3912
3971
|
{
|
|
3913
3972
|
"data-slot": "field-content",
|
|
3914
|
-
className:
|
|
3973
|
+
className: cn30(
|
|
3915
3974
|
"group/field-content flex flex-1 flex-col gap-0.5 leading-snug",
|
|
3916
3975
|
className
|
|
3917
3976
|
),
|
|
@@ -3927,7 +3986,7 @@ function FieldLabel({
|
|
|
3927
3986
|
Label,
|
|
3928
3987
|
{
|
|
3929
3988
|
"data-slot": "field-label",
|
|
3930
|
-
className:
|
|
3989
|
+
className: cn30(
|
|
3931
3990
|
"group/field-label peer/field-label flex w-fit gap-2 leading-snug 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-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10",
|
|
3932
3991
|
"has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",
|
|
3933
3992
|
className
|
|
@@ -3941,7 +4000,7 @@ function FieldTitle({ className, ...props }) {
|
|
|
3941
4000
|
"div",
|
|
3942
4001
|
{
|
|
3943
4002
|
"data-slot": "field-label",
|
|
3944
|
-
className:
|
|
4003
|
+
className: cn30(
|
|
3945
4004
|
"flex w-fit items-center gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50",
|
|
3946
4005
|
className
|
|
3947
4006
|
),
|
|
@@ -3954,7 +4013,7 @@ function FieldDescription({ className, ...props }) {
|
|
|
3954
4013
|
"p",
|
|
3955
4014
|
{
|
|
3956
4015
|
"data-slot": "field-description",
|
|
3957
|
-
className:
|
|
4016
|
+
className: cn30(
|
|
3958
4017
|
"text-left text-[10px] leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5",
|
|
3959
4018
|
"last:mt-0 nth-last-2:-mt-1",
|
|
3960
4019
|
"[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary",
|
|
@@ -3974,7 +4033,7 @@ function FieldSeparator({
|
|
|
3974
4033
|
{
|
|
3975
4034
|
"data-slot": "field-separator",
|
|
3976
4035
|
"data-content": !!children,
|
|
3977
|
-
className:
|
|
4036
|
+
className: cn30(
|
|
3978
4037
|
"relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",
|
|
3979
4038
|
className
|
|
3980
4039
|
),
|
|
@@ -4024,7 +4083,7 @@ function FieldError({
|
|
|
4024
4083
|
{
|
|
4025
4084
|
role: "alert",
|
|
4026
4085
|
"data-slot": "field-error",
|
|
4027
|
-
className:
|
|
4086
|
+
className: cn30("text-sm font-normal text-destructive", className),
|
|
4028
4087
|
...props,
|
|
4029
4088
|
children: content
|
|
4030
4089
|
}
|
|
@@ -4033,7 +4092,8 @@ function FieldError({
|
|
|
4033
4092
|
|
|
4034
4093
|
// src/ui/image.tsx
|
|
4035
4094
|
import NextImage from "next/image";
|
|
4036
|
-
import { useCallback as
|
|
4095
|
+
import { useCallback as useCallback3, useState as useState5 } from "react";
|
|
4096
|
+
import { cn as cn31 } from "cn";
|
|
4037
4097
|
import { jsx as jsx32, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
4038
4098
|
function srcValue(src) {
|
|
4039
4099
|
if (!src) return null;
|
|
@@ -4065,16 +4125,16 @@ function Image({
|
|
|
4065
4125
|
const loaded = hasSource && loadedSrc === currentSrc && !failed;
|
|
4066
4126
|
const shouldPreload = preload ?? loading === "eager";
|
|
4067
4127
|
const imageLoading = shouldPreload ? "eager" : loading;
|
|
4068
|
-
const markLoaded =
|
|
4128
|
+
const markLoaded = useCallback3(() => {
|
|
4069
4129
|
if (!currentSrc) return;
|
|
4070
4130
|
setFailedSrc(null);
|
|
4071
4131
|
setLoadedSrc(currentSrc);
|
|
4072
4132
|
}, [currentSrc]);
|
|
4073
|
-
const markFailed =
|
|
4133
|
+
const markFailed = useCallback3(() => {
|
|
4074
4134
|
if (!currentSrc) return;
|
|
4075
4135
|
setFailedSrc(currentSrc);
|
|
4076
4136
|
}, [currentSrc]);
|
|
4077
|
-
return /* @__PURE__ */ jsxs17("section", { className:
|
|
4137
|
+
return /* @__PURE__ */ jsxs17("section", { className: cn31("relative block overflow-hidden", wrapper), children: [
|
|
4078
4138
|
showSkeleton && !loaded && !failed && hasSource && /* @__PURE__ */ jsx32(Skeleton, { className: "absolute inset-0 size-full" }),
|
|
4079
4139
|
hasSource && !failed ? /* @__PURE__ */ jsx32(
|
|
4080
4140
|
NextImage,
|
|
@@ -4086,7 +4146,7 @@ function Image({
|
|
|
4086
4146
|
loading: imageLoading,
|
|
4087
4147
|
preload: shouldPreload,
|
|
4088
4148
|
fetchPriority: fetchPriority ?? (imageLoading === "eager" ? "high" : void 0),
|
|
4089
|
-
className:
|
|
4149
|
+
className: cn31(
|
|
4090
4150
|
"transition-opacity duration-200",
|
|
4091
4151
|
loaded ? "opacity-100" : "opacity-0",
|
|
4092
4152
|
className
|
|
@@ -4106,8 +4166,9 @@ function Image({
|
|
|
4106
4166
|
}
|
|
4107
4167
|
|
|
4108
4168
|
// src/ui/input-otp.tsx
|
|
4109
|
-
import * as
|
|
4169
|
+
import * as React11 from "react";
|
|
4110
4170
|
import { OTPInput, OTPInputContext } from "input-otp";
|
|
4171
|
+
import { cn as cn32 } from "cn";
|
|
4111
4172
|
import { MinusIcon } from "lucide-react";
|
|
4112
4173
|
import { jsx as jsx33, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
4113
4174
|
function InputOTP({
|
|
@@ -4119,12 +4180,12 @@ function InputOTP({
|
|
|
4119
4180
|
OTPInput,
|
|
4120
4181
|
{
|
|
4121
4182
|
"data-slot": "input-otp",
|
|
4122
|
-
containerClassName:
|
|
4183
|
+
containerClassName: cn32(
|
|
4123
4184
|
"cn-input-otp flex items-center has-disabled:opacity-50",
|
|
4124
4185
|
containerClassName
|
|
4125
4186
|
),
|
|
4126
4187
|
spellCheck: false,
|
|
4127
|
-
className:
|
|
4188
|
+
className: cn32("disabled:cursor-not-allowed", className),
|
|
4128
4189
|
...props
|
|
4129
4190
|
}
|
|
4130
4191
|
);
|
|
@@ -4134,7 +4195,7 @@ function InputOTPGroup({ className, ...props }) {
|
|
|
4134
4195
|
"div",
|
|
4135
4196
|
{
|
|
4136
4197
|
"data-slot": "input-otp-group",
|
|
4137
|
-
className:
|
|
4198
|
+
className: cn32(
|
|
4138
4199
|
"flex items-center rounded-lg has-aria-invalid:border-destructive has-aria-invalid:ring-3 has-aria-invalid:ring-destructive/20 dark:has-aria-invalid:ring-destructive/40",
|
|
4139
4200
|
className
|
|
4140
4201
|
),
|
|
@@ -4147,14 +4208,14 @@ function InputOTPSlot({
|
|
|
4147
4208
|
className,
|
|
4148
4209
|
...props
|
|
4149
4210
|
}) {
|
|
4150
|
-
const inputOTPContext =
|
|
4211
|
+
const inputOTPContext = React11.useContext(OTPInputContext);
|
|
4151
4212
|
const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
|
|
4152
4213
|
return /* @__PURE__ */ jsxs18(
|
|
4153
4214
|
"div",
|
|
4154
4215
|
{
|
|
4155
4216
|
"data-slot": "input-otp-slot",
|
|
4156
4217
|
"data-active": isActive,
|
|
4157
|
-
className:
|
|
4218
|
+
className: cn32(
|
|
4158
4219
|
"relative flex size-8 items-center justify-center border-y border-r border-input text-sm transition-[background-color,border-color,box-shadow,opacity] duration-150 ease-out outline-none motion-reduce:transition-none first:rounded-l-lg first:border-l last:rounded-r-lg aria-invalid:border-destructive data-[active=true]:z-10 data-[active=true]:border-ring data-[active=true]:ring-3 data-[active=true]:ring-ring/50 data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:ring-destructive/20 dark:bg-input/30 dark:data-[active=true]:aria-invalid:ring-destructive/40",
|
|
4159
4220
|
className
|
|
4160
4221
|
),
|
|
@@ -4183,6 +4244,7 @@ function InputOTPSeparator({ ...props }) {
|
|
|
4183
4244
|
import { mergeProps as mergeProps4 } from "@base-ui/react/merge-props";
|
|
4184
4245
|
import { useRender as useRender4 } from "@base-ui/react/use-render";
|
|
4185
4246
|
import { cva as cva8 } from "class-variance-authority";
|
|
4247
|
+
import { cn as cn33 } from "cn";
|
|
4186
4248
|
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
4187
4249
|
function ItemGroup({ className, ...props }) {
|
|
4188
4250
|
return /* @__PURE__ */ jsx34(
|
|
@@ -4190,7 +4252,7 @@ function ItemGroup({ className, ...props }) {
|
|
|
4190
4252
|
{
|
|
4191
4253
|
role: "list",
|
|
4192
4254
|
"data-slot": "item-group",
|
|
4193
|
-
className:
|
|
4255
|
+
className: cn33(
|
|
4194
4256
|
"group/item-group flex w-full flex-col gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2",
|
|
4195
4257
|
className
|
|
4196
4258
|
),
|
|
@@ -4207,7 +4269,7 @@ function ItemSeparator({
|
|
|
4207
4269
|
{
|
|
4208
4270
|
"data-slot": "item-separator",
|
|
4209
4271
|
orientation: "horizontal",
|
|
4210
|
-
className:
|
|
4272
|
+
className: cn33("my-2", className),
|
|
4211
4273
|
...props
|
|
4212
4274
|
}
|
|
4213
4275
|
);
|
|
@@ -4244,7 +4306,7 @@ function Item({
|
|
|
4244
4306
|
defaultTagName: "div",
|
|
4245
4307
|
props: mergeProps4(
|
|
4246
4308
|
{
|
|
4247
|
-
className:
|
|
4309
|
+
className: cn33(itemVariants({ variant, size, className }))
|
|
4248
4310
|
},
|
|
4249
4311
|
props
|
|
4250
4312
|
),
|
|
@@ -4281,7 +4343,7 @@ function ItemMedia({
|
|
|
4281
4343
|
{
|
|
4282
4344
|
"data-slot": "item-media",
|
|
4283
4345
|
"data-variant": variant,
|
|
4284
|
-
className:
|
|
4346
|
+
className: cn33(itemMediaVariants({ variant, className })),
|
|
4285
4347
|
...props
|
|
4286
4348
|
}
|
|
4287
4349
|
);
|
|
@@ -4291,7 +4353,7 @@ function ItemContent({ className, ...props }) {
|
|
|
4291
4353
|
"div",
|
|
4292
4354
|
{
|
|
4293
4355
|
"data-slot": "item-content",
|
|
4294
|
-
className:
|
|
4356
|
+
className: cn33(
|
|
4295
4357
|
"flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none",
|
|
4296
4358
|
className
|
|
4297
4359
|
),
|
|
@@ -4304,7 +4366,7 @@ function ItemTitle({ className, ...props }) {
|
|
|
4304
4366
|
"div",
|
|
4305
4367
|
{
|
|
4306
4368
|
"data-slot": "item-title",
|
|
4307
|
-
className:
|
|
4369
|
+
className: cn33(
|
|
4308
4370
|
"line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4",
|
|
4309
4371
|
className
|
|
4310
4372
|
),
|
|
@@ -4317,7 +4379,7 @@ function ItemDescription({ className, ...props }) {
|
|
|
4317
4379
|
"p",
|
|
4318
4380
|
{
|
|
4319
4381
|
"data-slot": "item-description",
|
|
4320
|
-
className:
|
|
4382
|
+
className: cn33(
|
|
4321
4383
|
"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",
|
|
4322
4384
|
className
|
|
4323
4385
|
),
|
|
@@ -4330,7 +4392,7 @@ function ItemActions({ className, ...props }) {
|
|
|
4330
4392
|
"div",
|
|
4331
4393
|
{
|
|
4332
4394
|
"data-slot": "item-actions",
|
|
4333
|
-
className:
|
|
4395
|
+
className: cn33("flex items-center gap-2", className),
|
|
4334
4396
|
...props
|
|
4335
4397
|
}
|
|
4336
4398
|
);
|
|
@@ -4340,7 +4402,7 @@ function ItemHeader({ className, ...props }) {
|
|
|
4340
4402
|
"div",
|
|
4341
4403
|
{
|
|
4342
4404
|
"data-slot": "item-header",
|
|
4343
|
-
className:
|
|
4405
|
+
className: cn33(
|
|
4344
4406
|
"flex basis-full items-center justify-between gap-2",
|
|
4345
4407
|
className
|
|
4346
4408
|
),
|
|
@@ -4353,7 +4415,7 @@ function ItemFooter({ className, ...props }) {
|
|
|
4353
4415
|
"div",
|
|
4354
4416
|
{
|
|
4355
4417
|
"data-slot": "item-footer",
|
|
4356
|
-
className:
|
|
4418
|
+
className: cn33(
|
|
4357
4419
|
"flex basis-full items-center justify-between gap-2",
|
|
4358
4420
|
className
|
|
4359
4421
|
),
|
|
@@ -4377,7 +4439,8 @@ import {
|
|
|
4377
4439
|
BlobSpeech,
|
|
4378
4440
|
JellyBlobMascot
|
|
4379
4441
|
} from "feral-blob";
|
|
4380
|
-
import * as
|
|
4442
|
+
import * as React12 from "react";
|
|
4443
|
+
import { cn as cn34 } from "cn";
|
|
4381
4444
|
import {
|
|
4382
4445
|
BlobSpeech as BlobSpeech2,
|
|
4383
4446
|
JellyBlobMascot as JellyBlobMascot2,
|
|
@@ -4389,7 +4452,7 @@ function JellyBlob({ ...props }) {
|
|
|
4389
4452
|
JellyBlobMascot,
|
|
4390
4453
|
{
|
|
4391
4454
|
...props,
|
|
4392
|
-
className:
|
|
4455
|
+
className: cn34("h-auto w-full", props.className)
|
|
4393
4456
|
}
|
|
4394
4457
|
) });
|
|
4395
4458
|
}
|
|
@@ -4419,7 +4482,7 @@ function JellyMini({
|
|
|
4419
4482
|
"span",
|
|
4420
4483
|
{
|
|
4421
4484
|
"aria-hidden": "true",
|
|
4422
|
-
className:
|
|
4485
|
+
className: cn34(
|
|
4423
4486
|
"inline-flex size-5 shrink-0 items-center justify-center select-none",
|
|
4424
4487
|
className
|
|
4425
4488
|
),
|
|
@@ -4435,10 +4498,10 @@ function JellyMini({
|
|
|
4435
4498
|
}
|
|
4436
4499
|
);
|
|
4437
4500
|
}
|
|
4438
|
-
var JellyMascotContext =
|
|
4501
|
+
var JellyMascotContext = React12.createContext(null);
|
|
4439
4502
|
function useJellyMood() {
|
|
4440
|
-
const state =
|
|
4441
|
-
return
|
|
4503
|
+
const state = React12.useContext(JellyMascotContext);
|
|
4504
|
+
return React12.useCallback(
|
|
4442
4505
|
(mood) => {
|
|
4443
4506
|
if (!mood || !state) return {};
|
|
4444
4507
|
return {
|
|
@@ -4481,7 +4544,7 @@ function JellyMascotProvider({
|
|
|
4481
4544
|
...blobProps
|
|
4482
4545
|
}) {
|
|
4483
4546
|
const { mounted } = useMounted();
|
|
4484
|
-
const [previewMood, setPreviewMood] =
|
|
4547
|
+
const [previewMood, setPreviewMood] = React12.useState(
|
|
4485
4548
|
null
|
|
4486
4549
|
);
|
|
4487
4550
|
const activeMood = previewMood ?? mood;
|
|
@@ -4506,13 +4569,13 @@ function JellyMascotFace({
|
|
|
4506
4569
|
size = "md",
|
|
4507
4570
|
className
|
|
4508
4571
|
}) {
|
|
4509
|
-
const mascot =
|
|
4572
|
+
const mascot = React12.useContext(JellyMascotContext);
|
|
4510
4573
|
if (!mascot) return null;
|
|
4511
4574
|
return /* @__PURE__ */ jsxs19(
|
|
4512
4575
|
"div",
|
|
4513
4576
|
{
|
|
4514
4577
|
"aria-hidden": "true",
|
|
4515
|
-
className:
|
|
4578
|
+
className: cn34(
|
|
4516
4579
|
"flex flex-col items-center select-none",
|
|
4517
4580
|
SIZE_WRAPPER[size],
|
|
4518
4581
|
className
|
|
@@ -4544,7 +4607,7 @@ function JellyMascot({
|
|
|
4544
4607
|
className,
|
|
4545
4608
|
...config
|
|
4546
4609
|
}) {
|
|
4547
|
-
const existing =
|
|
4610
|
+
const existing = React12.useContext(JellyMascotContext);
|
|
4548
4611
|
if (existing) return /* @__PURE__ */ jsx35(JellyMascotFace, { size, className });
|
|
4549
4612
|
return /* @__PURE__ */ jsx35(JellyMascotProvider, { ...config, children: /* @__PURE__ */ jsx35(JellyMascotFace, { size, className }) });
|
|
4550
4613
|
}
|
|
@@ -4562,7 +4625,7 @@ function JellyEmpty({
|
|
|
4562
4625
|
className,
|
|
4563
4626
|
...config
|
|
4564
4627
|
}) {
|
|
4565
|
-
return /* @__PURE__ */ jsx35(JellyMascotProvider, { ...config, children: /* @__PURE__ */ jsxs19(Empty, { className:
|
|
4628
|
+
return /* @__PURE__ */ jsx35(JellyMascotProvider, { ...config, children: /* @__PURE__ */ jsxs19(Empty, { className: cn34("gap-4", className), children: [
|
|
4566
4629
|
/* @__PURE__ */ jsxs19(EmptyHeader, { className: "gap-2", children: [
|
|
4567
4630
|
/* @__PURE__ */ jsx35(JellyMascotFace, { size }),
|
|
4568
4631
|
title ? /* @__PURE__ */ jsx35(EmptyTitle, { className: "text-base font-semibold sm:text-lg", children: title }) : null,
|
|
@@ -4573,13 +4636,14 @@ function JellyEmpty({
|
|
|
4573
4636
|
}
|
|
4574
4637
|
|
|
4575
4638
|
// src/ui/kbd.tsx
|
|
4639
|
+
import { cn as cn35 } from "cn";
|
|
4576
4640
|
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
4577
4641
|
function Kbd({ className, ...props }) {
|
|
4578
4642
|
return /* @__PURE__ */ jsx36(
|
|
4579
4643
|
"kbd",
|
|
4580
4644
|
{
|
|
4581
4645
|
"data-slot": "kbd",
|
|
4582
|
-
className:
|
|
4646
|
+
className: cn35(
|
|
4583
4647
|
"pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 text-xs font-medium text-muted-foreground select-none in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 [&_svg:not([class*='size-'])]:size-3",
|
|
4584
4648
|
className
|
|
4585
4649
|
),
|
|
@@ -4592,20 +4656,21 @@ function KbdGroup({ className, ...props }) {
|
|
|
4592
4656
|
"kbd",
|
|
4593
4657
|
{
|
|
4594
4658
|
"data-slot": "kbd-group",
|
|
4595
|
-
className:
|
|
4659
|
+
className: cn35("inline-flex items-center gap-1", className),
|
|
4596
4660
|
...props
|
|
4597
4661
|
}
|
|
4598
4662
|
);
|
|
4599
4663
|
}
|
|
4600
4664
|
|
|
4601
4665
|
// src/ui/message.tsx
|
|
4666
|
+
import { cn as cn36 } from "cn";
|
|
4602
4667
|
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
4603
4668
|
function MessageGroup({ className, ...props }) {
|
|
4604
4669
|
return /* @__PURE__ */ jsx37(
|
|
4605
4670
|
"div",
|
|
4606
4671
|
{
|
|
4607
4672
|
"data-slot": "message-group",
|
|
4608
|
-
className:
|
|
4673
|
+
className: cn36("flex min-w-0 flex-col gap-2", className),
|
|
4609
4674
|
...props
|
|
4610
4675
|
}
|
|
4611
4676
|
);
|
|
@@ -4620,7 +4685,7 @@ function Message({
|
|
|
4620
4685
|
{
|
|
4621
4686
|
"data-slot": "message",
|
|
4622
4687
|
"data-align": align,
|
|
4623
|
-
className:
|
|
4688
|
+
className: cn36(
|
|
4624
4689
|
"group/message relative flex w-full min-w-0 gap-2 text-sm data-[align=end]:flex-row-reverse",
|
|
4625
4690
|
className
|
|
4626
4691
|
),
|
|
@@ -4633,7 +4698,7 @@ function MessageAvatar({ className, ...props }) {
|
|
|
4633
4698
|
"div",
|
|
4634
4699
|
{
|
|
4635
4700
|
"data-slot": "message-avatar",
|
|
4636
|
-
className:
|
|
4701
|
+
className: cn36(
|
|
4637
4702
|
"flex w-fit min-w-8 shrink-0 items-center justify-center self-end overflow-hidden rounded-full bg-muted group-has-data-[slot=message-footer]/message:-translate-y-8",
|
|
4638
4703
|
className
|
|
4639
4704
|
),
|
|
@@ -4646,7 +4711,7 @@ function MessageContent({ className, ...props }) {
|
|
|
4646
4711
|
"div",
|
|
4647
4712
|
{
|
|
4648
4713
|
"data-slot": "message-content",
|
|
4649
|
-
className:
|
|
4714
|
+
className: cn36(
|
|
4650
4715
|
"flex w-full min-w-0 flex-col gap-2.5 wrap-break-word group-data-[align=end]/message:*:data-slot:self-end",
|
|
4651
4716
|
className
|
|
4652
4717
|
),
|
|
@@ -4659,7 +4724,7 @@ function MessageHeader({ className, ...props }) {
|
|
|
4659
4724
|
"div",
|
|
4660
4725
|
{
|
|
4661
4726
|
"data-slot": "message-header",
|
|
4662
|
-
className:
|
|
4727
|
+
className: cn36(
|
|
4663
4728
|
"flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-has-data-[variant=ghost]/message:px-0",
|
|
4664
4729
|
className
|
|
4665
4730
|
),
|
|
@@ -4672,7 +4737,7 @@ function MessageFooter({ className, ...props }) {
|
|
|
4672
4737
|
"div",
|
|
4673
4738
|
{
|
|
4674
4739
|
"data-slot": "message-footer",
|
|
4675
|
-
className:
|
|
4740
|
+
className: cn36(
|
|
4676
4741
|
"flex max-w-full min-w-0 items-center px-3 text-xs font-medium text-muted-foreground group-has-data-[variant=ghost]/message:px-0 group-data-[align=end]/message:justify-end",
|
|
4677
4742
|
className
|
|
4678
4743
|
),
|
|
@@ -4688,6 +4753,7 @@ import {
|
|
|
4688
4753
|
useMessageScrollerScrollable,
|
|
4689
4754
|
useMessageScrollerVisibility
|
|
4690
4755
|
} from "@shadcn/react/message-scroller";
|
|
4756
|
+
import { cn as cn37 } from "cn";
|
|
4691
4757
|
import { ArrowDownIcon } from "lucide-react";
|
|
4692
4758
|
import { Fragment as Fragment2, jsx as jsx38, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
4693
4759
|
function MessageScrollerProvider(props) {
|
|
@@ -4701,7 +4767,7 @@ function MessageScroller({
|
|
|
4701
4767
|
MessageScrollerPrimitive.Root,
|
|
4702
4768
|
{
|
|
4703
4769
|
"data-slot": "message-scroller",
|
|
4704
|
-
className:
|
|
4770
|
+
className: cn37(
|
|
4705
4771
|
"group/message-scroller relative flex size-full min-h-0 flex-col overflow-hidden",
|
|
4706
4772
|
className
|
|
4707
4773
|
),
|
|
@@ -4717,7 +4783,7 @@ function MessageScrollerViewport({
|
|
|
4717
4783
|
MessageScrollerPrimitive.Viewport,
|
|
4718
4784
|
{
|
|
4719
4785
|
"data-slot": "message-scroller-viewport",
|
|
4720
|
-
className:
|
|
4786
|
+
className: cn37(
|
|
4721
4787
|
"size-full min-h-0 min-w-0 scroll-fade scrollbar-thin scrollbar-gutter-stable overflow-y-auto overscroll-contain contain-content data-autoscrolling:scrollbar-thumb-transparent data-autoscrolling:scrollbar-track-transparent",
|
|
4722
4788
|
className
|
|
4723
4789
|
),
|
|
@@ -4733,7 +4799,7 @@ function MessageScrollerContent({
|
|
|
4733
4799
|
MessageScrollerPrimitive.Content,
|
|
4734
4800
|
{
|
|
4735
4801
|
"data-slot": "message-scroller-content",
|
|
4736
|
-
className:
|
|
4802
|
+
className: cn37("flex h-max min-h-full flex-col gap-6", className),
|
|
4737
4803
|
...props
|
|
4738
4804
|
}
|
|
4739
4805
|
);
|
|
@@ -4748,7 +4814,7 @@ function MessageScrollerItem({
|
|
|
4748
4814
|
{
|
|
4749
4815
|
"data-slot": "message-scroller-item",
|
|
4750
4816
|
scrollAnchor,
|
|
4751
|
-
className:
|
|
4817
|
+
className: cn37(
|
|
4752
4818
|
"min-w-0 shrink-0 [contain-intrinsic-size:auto_10rem] [content-visibility:auto]",
|
|
4753
4819
|
className
|
|
4754
4820
|
),
|
|
@@ -4773,7 +4839,7 @@ function MessageScrollerButton({
|
|
|
4773
4839
|
"data-variant": variant,
|
|
4774
4840
|
"data-size": size,
|
|
4775
4841
|
direction,
|
|
4776
|
-
className:
|
|
4842
|
+
className: cn37(
|
|
4777
4843
|
"data-[active=true]:ease-out-quint absolute inset-s-1/2 -translate-x-1/2 border-border bg-background text-foreground transition-[translate,scale,opacity] duration-200 hover:bg-muted hover:text-foreground data-[active=false]:pointer-events-none data-[active=false]:scale-95 data-[active=false]:opacity-0 data-[active=false]:duration-400 data-[active=false]:ease-[cubic-bezier(0.7,0,0.84,0)] data-[active=true]:translate-y-0 data-[active=true]:scale-100 data-[active=true]:opacity-100 data-[direction=end]:bottom-4 data-[direction=end]:data-[active=false]:translate-y-full data-[direction=start]:top-4 data-[direction=start]:data-[active=false]:-translate-y-full rtl:translate-x-1/2 data-[direction=start]:[&_svg]:rotate-180",
|
|
4778
4844
|
className
|
|
4779
4845
|
),
|
|
@@ -4788,7 +4854,7 @@ function MessageScrollerButton({
|
|
|
4788
4854
|
}
|
|
4789
4855
|
|
|
4790
4856
|
// src/ui/otp.tsx
|
|
4791
|
-
import {
|
|
4857
|
+
import { cn as cn38 } from "cn";
|
|
4792
4858
|
import {
|
|
4793
4859
|
AnimatePresence as AnimatePresence2,
|
|
4794
4860
|
animate,
|
|
@@ -4796,7 +4862,6 @@ import {
|
|
|
4796
4862
|
useReducedMotion
|
|
4797
4863
|
} from "motion/react";
|
|
4798
4864
|
import { Fragment as Fragment3, useEffect as useEffect6, useId as useId2, useRef as useRef3, useState as useState8 } from "react";
|
|
4799
|
-
import { twMerge as twMerge2 } from "tailwind-merge";
|
|
4800
4865
|
import { jsx as jsx39, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
4801
4866
|
var EASE_OUT = [0.16, 1, 0.3, 1];
|
|
4802
4867
|
var EASE_IN_OUT = [0.77, 0, 0.175, 1];
|
|
@@ -4831,9 +4896,6 @@ var SPRING_MOUSE = {
|
|
|
4831
4896
|
damping: 15,
|
|
4832
4897
|
mass: 0.3
|
|
4833
4898
|
};
|
|
4834
|
-
function otpCn(...inputs) {
|
|
4835
|
-
return twMerge2(clsx2(inputs));
|
|
4836
|
-
}
|
|
4837
4899
|
function OTPInput2({
|
|
4838
4900
|
length = 6,
|
|
4839
4901
|
value: controlledValue,
|
|
@@ -4965,7 +5027,7 @@ function OTPInput2({
|
|
|
4965
5027
|
const showSuccess = status === "success";
|
|
4966
5028
|
const activeIndex = focused ? active : -1;
|
|
4967
5029
|
const message = showSuccess ? successMessage : status === "error" ? errorMessage : hint;
|
|
4968
|
-
return /* @__PURE__ */ jsxs21("div", { className:
|
|
5030
|
+
return /* @__PURE__ */ jsxs21("div", { className: cn38("inline-flex flex-col gap-2", className), children: [
|
|
4969
5031
|
label ? /* @__PURE__ */ jsx39(
|
|
4970
5032
|
"label",
|
|
4971
5033
|
{
|
|
@@ -5024,7 +5086,7 @@ function OTPInput2({
|
|
|
5024
5086
|
"data-otp-slot": true,
|
|
5025
5087
|
"data-active": isActive,
|
|
5026
5088
|
"data-filled": char !== "",
|
|
5027
|
-
className:
|
|
5089
|
+
className: cn38(
|
|
5028
5090
|
"relative grid size-11 place-items-center overflow-hidden rounded-xl border bg-card text-xl font-semibold tabular-nums transition-colors duration-200",
|
|
5029
5091
|
showSuccess ? "border-emerald-500/60 text-foreground" : status === "error" ? "border-destructive/60 text-foreground" : char ? "border-border-strong text-foreground" : "border-border text-muted-foreground",
|
|
5030
5092
|
isActive && !showSuccess && status !== "error" && "border-brand border-2 ring-0",
|
|
@@ -5041,7 +5103,7 @@ function OTPInput2({
|
|
|
5041
5103
|
repeat: Number.POSITIVE_INFINITY,
|
|
5042
5104
|
ease: "linear"
|
|
5043
5105
|
},
|
|
5044
|
-
className:
|
|
5106
|
+
className: cn38(
|
|
5045
5107
|
"bg-brand pointer-events-none absolute top-1/2 h-6 w-px -translate-y-1/2",
|
|
5046
5108
|
char ? "right-3" : "left-1/2 -translate-x-1/2"
|
|
5047
5109
|
)
|
|
@@ -5164,7 +5226,7 @@ function OTPInput2({
|
|
|
5164
5226
|
"p",
|
|
5165
5227
|
{
|
|
5166
5228
|
"aria-live": "polite",
|
|
5167
|
-
className:
|
|
5229
|
+
className: cn38(
|
|
5168
5230
|
"text-sm",
|
|
5169
5231
|
showSuccess ? "text-emerald-500" : status === "error" ? "text-destructive" : "text-muted-foreground"
|
|
5170
5232
|
),
|
|
@@ -5183,6 +5245,7 @@ function toSlots(raw, length) {
|
|
|
5183
5245
|
|
|
5184
5246
|
// src/ui/popover.tsx
|
|
5185
5247
|
import { Popover as PopoverPrimitive } from "@base-ui/react/popover";
|
|
5248
|
+
import { cn as cn39 } from "cn";
|
|
5186
5249
|
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
5187
5250
|
function Popover({ ...props }) {
|
|
5188
5251
|
return /* @__PURE__ */ jsx40(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
|
|
@@ -5210,7 +5273,7 @@ function PopoverContent({
|
|
|
5210
5273
|
PopoverPrimitive.Popup,
|
|
5211
5274
|
{
|
|
5212
5275
|
"data-slot": "popover-content",
|
|
5213
|
-
className:
|
|
5276
|
+
className: cn39(
|
|
5214
5277
|
"z-50 flex w-72 origin-(--transform-origin) flex-col gap-2.5 rounded-lg bg-background p-2.5 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",
|
|
5215
5278
|
className
|
|
5216
5279
|
),
|
|
@@ -5225,7 +5288,7 @@ function PopoverHeader({ className, ...props }) {
|
|
|
5225
5288
|
"div",
|
|
5226
5289
|
{
|
|
5227
5290
|
"data-slot": "popover-header",
|
|
5228
|
-
className:
|
|
5291
|
+
className: cn39("flex flex-col gap-0.5 text-sm", className),
|
|
5229
5292
|
...props
|
|
5230
5293
|
}
|
|
5231
5294
|
);
|
|
@@ -5235,7 +5298,7 @@ function PopoverTitle({ className, ...props }) {
|
|
|
5235
5298
|
PopoverPrimitive.Title,
|
|
5236
5299
|
{
|
|
5237
5300
|
"data-slot": "popover-title",
|
|
5238
|
-
className:
|
|
5301
|
+
className: cn39("font-medium", className),
|
|
5239
5302
|
...props
|
|
5240
5303
|
}
|
|
5241
5304
|
);
|
|
@@ -5248,7 +5311,7 @@ function PopoverDescription({
|
|
|
5248
5311
|
PopoverPrimitive.Description,
|
|
5249
5312
|
{
|
|
5250
5313
|
"data-slot": "popover-description",
|
|
5251
|
-
className:
|
|
5314
|
+
className: cn39("text-muted-foreground", className),
|
|
5252
5315
|
...props
|
|
5253
5316
|
}
|
|
5254
5317
|
);
|
|
@@ -5257,10 +5320,10 @@ function PopoverDescription({
|
|
|
5257
5320
|
// src/ui/quantity.tsx
|
|
5258
5321
|
import { NumberField } from "@base-ui/react/number-field";
|
|
5259
5322
|
import { Minus, Plus } from "@gravity-ui/icons";
|
|
5260
|
-
import * as
|
|
5323
|
+
import * as React13 from "react";
|
|
5261
5324
|
import { jsx as jsx41, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
5262
|
-
var QuantityInput =
|
|
5263
|
-
const id =
|
|
5325
|
+
var QuantityInput = React13.forwardRef(function QuantityInput2({ ...props }, ref) {
|
|
5326
|
+
const id = React13.useId();
|
|
5264
5327
|
return /* @__PURE__ */ jsx41(NumberField.Root, { id, ...props, className: "flex flex-col items-start", children: /* @__PURE__ */ jsxs22(NumberField.Group, { className: "flex h-8 gap-1", children: [
|
|
5265
5328
|
/* @__PURE__ */ jsx41(
|
|
5266
5329
|
NumberField.Decrement,
|
|
@@ -5298,13 +5361,14 @@ var QuantityInput = React12.forwardRef(function QuantityInput2({ ...props }, ref
|
|
|
5298
5361
|
// src/ui/radio-group.tsx
|
|
5299
5362
|
import { Radio as RadioPrimitive } from "@base-ui/react/radio";
|
|
5300
5363
|
import { RadioGroup as RadioGroupPrimitive } from "@base-ui/react/radio-group";
|
|
5364
|
+
import { cn as cn40 } from "cn";
|
|
5301
5365
|
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
5302
5366
|
function RadioGroup({ className, ...props }) {
|
|
5303
5367
|
return /* @__PURE__ */ jsx42(
|
|
5304
5368
|
RadioGroupPrimitive,
|
|
5305
5369
|
{
|
|
5306
5370
|
"data-slot": "radio-group",
|
|
5307
|
-
className:
|
|
5371
|
+
className: cn40("grid w-full gap-2", className),
|
|
5308
5372
|
...props
|
|
5309
5373
|
}
|
|
5310
5374
|
);
|
|
@@ -5314,7 +5378,7 @@ function RadioGroupItem({ className, ...props }) {
|
|
|
5314
5378
|
RadioPrimitive.Root,
|
|
5315
5379
|
{
|
|
5316
5380
|
"data-slot": "radio-group-item",
|
|
5317
|
-
className:
|
|
5381
|
+
className: cn40(
|
|
5318
5382
|
"group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary",
|
|
5319
5383
|
className
|
|
5320
5384
|
),
|
|
@@ -5336,7 +5400,7 @@ import { useRender as useRender5 } from "@base-ui/react/use-render";
|
|
|
5336
5400
|
import { cva as cva9 } from "class-variance-authority";
|
|
5337
5401
|
import {
|
|
5338
5402
|
createContext as createContext5,
|
|
5339
|
-
useCallback as
|
|
5403
|
+
useCallback as useCallback5,
|
|
5340
5404
|
useContext as useContext6,
|
|
5341
5405
|
useEffect as useEffect7,
|
|
5342
5406
|
useId as useId4,
|
|
@@ -5347,6 +5411,7 @@ import {
|
|
|
5347
5411
|
|
|
5348
5412
|
// src/ui/tooltip.tsx
|
|
5349
5413
|
import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip";
|
|
5414
|
+
import { cn as cn41 } from "cn";
|
|
5350
5415
|
import { jsx as jsx43, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
5351
5416
|
function TooltipProvider({
|
|
5352
5417
|
delay = 0,
|
|
@@ -5388,7 +5453,7 @@ function TooltipContent({
|
|
|
5388
5453
|
TooltipPrimitive.Popup,
|
|
5389
5454
|
{
|
|
5390
5455
|
"data-slot": "tooltip-content",
|
|
5391
|
-
className:
|
|
5456
|
+
className: cn41(
|
|
5392
5457
|
"z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background 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",
|
|
5393
5458
|
className
|
|
5394
5459
|
),
|
|
@@ -5404,6 +5469,7 @@ function TooltipContent({
|
|
|
5404
5469
|
}
|
|
5405
5470
|
|
|
5406
5471
|
// src/ui/reui/filters.tsx
|
|
5472
|
+
import { cn as cn42 } from "cn";
|
|
5407
5473
|
import { AlertCircleIcon, CheckIcon as CheckIcon2, PlusIcon, XIcon } from "lucide-react";
|
|
5408
5474
|
import { Fragment as Fragment4, jsx as jsx44, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
5409
5475
|
var DEFAULT_I18N = {
|
|
@@ -5574,7 +5640,7 @@ function FilterInput({
|
|
|
5574
5640
|
return /* @__PURE__ */ jsxs24(
|
|
5575
5641
|
InputGroup,
|
|
5576
5642
|
{
|
|
5577
|
-
className:
|
|
5643
|
+
className: cn42(
|
|
5578
5644
|
"w-36",
|
|
5579
5645
|
// Height follows each style's own control ladder. `default` sets no
|
|
5580
5646
|
// height on purpose so the style's `.cn-input-group` applies (h-8 nova,
|
|
@@ -5598,7 +5664,7 @@ function FilterInput({
|
|
|
5598
5664
|
"aria-describedby": !isValid && validationMessage ? `${field?.key || "input"}-error` : void 0,
|
|
5599
5665
|
onBlur: handleBlur,
|
|
5600
5666
|
onKeyDown: handleKeyDown,
|
|
5601
|
-
className:
|
|
5667
|
+
className: cn42(
|
|
5602
5668
|
context.size == "sm" && "h-7! text-xs",
|
|
5603
5669
|
context.size == "lg" && "h-9!"
|
|
5604
5670
|
),
|
|
@@ -5708,7 +5774,7 @@ function useFieldOptions(field, searchInput, enabled) {
|
|
|
5708
5774
|
cancelled = true;
|
|
5709
5775
|
};
|
|
5710
5776
|
}, [isAsync, enabled, debouncedQuery]);
|
|
5711
|
-
const resolveSelected =
|
|
5777
|
+
const resolveSelected = useCallback5(
|
|
5712
5778
|
(values) => {
|
|
5713
5779
|
const cache = getFieldOptionCache(field);
|
|
5714
5780
|
return values.map(
|
|
@@ -5810,7 +5876,7 @@ function FilterOperatorDropdown({
|
|
|
5810
5876
|
DropdownMenuItem,
|
|
5811
5877
|
{
|
|
5812
5878
|
onClick: () => onChange(op.value),
|
|
5813
|
-
className:
|
|
5879
|
+
className: cn42(
|
|
5814
5880
|
"flex items-center justify-between data-highlighted:bg-accent data-highlighted:text-accent-foreground"
|
|
5815
5881
|
),
|
|
5816
5882
|
children: [
|
|
@@ -5818,7 +5884,7 @@ function FilterOperatorDropdown({
|
|
|
5818
5884
|
/* @__PURE__ */ jsx44(
|
|
5819
5885
|
CheckIcon2,
|
|
5820
5886
|
{
|
|
5821
|
-
className:
|
|
5887
|
+
className: cn42(
|
|
5822
5888
|
"ms-auto text-primary",
|
|
5823
5889
|
op.value === operator ? "opacity-100" : "opacity-0"
|
|
5824
5890
|
)
|
|
@@ -5908,7 +5974,7 @@ function SelectOptionsPopover({
|
|
|
5908
5974
|
"data-highlighted": isHighlighted || void 0,
|
|
5909
5975
|
onMouseEnter: () => setHighlightedIndex(overallIndex),
|
|
5910
5976
|
checked: isSelected,
|
|
5911
|
-
className:
|
|
5977
|
+
className: cn42(
|
|
5912
5978
|
"data-highlighted:bg-accent data-highlighted:text-accent-foreground",
|
|
5913
5979
|
option.className
|
|
5914
5980
|
),
|
|
@@ -5939,7 +6005,7 @@ function SelectOptionsPopover({
|
|
|
5939
6005
|
placeholder: context.i18n.placeholders.searchField(
|
|
5940
6006
|
field.label || ""
|
|
5941
6007
|
),
|
|
5942
|
-
className:
|
|
6008
|
+
className: cn42(
|
|
5943
6009
|
"h-8 rounded-none border-0 border-input bg-transparent! px-2 text-sm shadow-none",
|
|
5944
6010
|
"focus-visible:border-border focus-visible:ring-0 focus-visible:ring-offset-0",
|
|
5945
6011
|
open && "placeholder:text-foreground"
|
|
@@ -6044,7 +6110,7 @@ function SelectOptionsPopover({
|
|
|
6044
6110
|
DropdownMenuContent,
|
|
6045
6111
|
{
|
|
6046
6112
|
align: "start",
|
|
6047
|
-
className:
|
|
6113
|
+
className: cn42("w-50 px-0", field.className),
|
|
6048
6114
|
children: renderMenuContent()
|
|
6049
6115
|
}
|
|
6050
6116
|
)
|
|
@@ -6075,7 +6141,7 @@ function FilterValueSelector({
|
|
|
6075
6141
|
placeholder: field.placeholder,
|
|
6076
6142
|
pattern: field.pattern,
|
|
6077
6143
|
field,
|
|
6078
|
-
className:
|
|
6144
|
+
className: cn42("w-36", field.className),
|
|
6079
6145
|
autoFocus
|
|
6080
6146
|
}
|
|
6081
6147
|
);
|
|
@@ -6092,7 +6158,7 @@ var FiltersContent = ({
|
|
|
6092
6158
|
}) => {
|
|
6093
6159
|
const context = useFilterContext();
|
|
6094
6160
|
const fieldsMap = useMemo4(() => getFieldsMap(fields), [fields]);
|
|
6095
|
-
const updateFilter =
|
|
6161
|
+
const updateFilter = useCallback5(
|
|
6096
6162
|
(filterId, updates) => {
|
|
6097
6163
|
onChange(
|
|
6098
6164
|
filters.map((filter) => {
|
|
@@ -6109,7 +6175,7 @@ var FiltersContent = ({
|
|
|
6109
6175
|
},
|
|
6110
6176
|
[filters, onChange]
|
|
6111
6177
|
);
|
|
6112
|
-
const removeFilter =
|
|
6178
|
+
const removeFilter = useCallback5(
|
|
6113
6179
|
(filterId) => {
|
|
6114
6180
|
onChange(filters.filter((filter) => filter.id !== filterId));
|
|
6115
6181
|
},
|
|
@@ -6118,7 +6184,7 @@ var FiltersContent = ({
|
|
|
6118
6184
|
return /* @__PURE__ */ jsx44(
|
|
6119
6185
|
"div",
|
|
6120
6186
|
{
|
|
6121
|
-
className:
|
|
6187
|
+
className: cn42(
|
|
6122
6188
|
filtersContainerVariants({
|
|
6123
6189
|
variant: context.variant,
|
|
6124
6190
|
size: context.size
|
|
@@ -6243,7 +6309,7 @@ function FilterSubmenuContent({
|
|
|
6243
6309
|
"data-highlighted": isHighlighted || void 0,
|
|
6244
6310
|
onMouseEnter: () => setHighlightedIndex(index),
|
|
6245
6311
|
checked: isSelected,
|
|
6246
|
-
className:
|
|
6312
|
+
className: cn42(
|
|
6247
6313
|
"data-highlighted:bg-accent data-highlighted:text-accent-foreground",
|
|
6248
6314
|
option.className
|
|
6249
6315
|
),
|
|
@@ -6277,7 +6343,7 @@ function FilterSubmenuContent({
|
|
|
6277
6343
|
"aria-controls": `${baseId}-listbox`,
|
|
6278
6344
|
"aria-activedescendant": highlightedIndex >= 0 ? `${baseId}-item-${highlightedIndex}` : void 0,
|
|
6279
6345
|
placeholder: i18n.placeholders.searchField(field.label || ""),
|
|
6280
|
-
className:
|
|
6346
|
+
className: cn42(
|
|
6281
6347
|
"h-8 rounded-none border-0 bg-transparent! px-2 text-sm shadow-none",
|
|
6282
6348
|
"focus-visible:border-border focus-visible:ring-0 focus-visible:ring-offset-0",
|
|
6283
6349
|
isActive && "placeholder:text-foreground"
|
|
@@ -6466,7 +6532,7 @@ function Filters({
|
|
|
6466
6532
|
[i18n]
|
|
6467
6533
|
);
|
|
6468
6534
|
const fieldsMap = useMemo4(() => getFieldsMap(fields), [fields]);
|
|
6469
|
-
const updateFilter =
|
|
6535
|
+
const updateFilter = useCallback5(
|
|
6470
6536
|
(filterId, updates) => {
|
|
6471
6537
|
onChange(
|
|
6472
6538
|
filters.map((filter) => {
|
|
@@ -6483,13 +6549,13 @@ function Filters({
|
|
|
6483
6549
|
},
|
|
6484
6550
|
[filters, onChange]
|
|
6485
6551
|
);
|
|
6486
|
-
const removeFilter =
|
|
6552
|
+
const removeFilter = useCallback5(
|
|
6487
6553
|
(filterId) => {
|
|
6488
6554
|
onChange(filters.filter((filter) => filter.id !== filterId));
|
|
6489
6555
|
},
|
|
6490
6556
|
[filters, onChange]
|
|
6491
6557
|
);
|
|
6492
|
-
const addFilter =
|
|
6558
|
+
const addFilter = useCallback5(
|
|
6493
6559
|
(fieldKey) => {
|
|
6494
6560
|
const field = fieldsMap[fieldKey];
|
|
6495
6561
|
if (field && field.key) {
|
|
@@ -6548,7 +6614,7 @@ function Filters({
|
|
|
6548
6614
|
return /* @__PURE__ */ jsx44(FilterContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsxs24(
|
|
6549
6615
|
"div",
|
|
6550
6616
|
{
|
|
6551
|
-
className:
|
|
6617
|
+
className: cn42(filtersContainerVariants({ variant, size }), className),
|
|
6552
6618
|
children: [
|
|
6553
6619
|
selectableFields.length > 0 && /* @__PURE__ */ jsxs24(
|
|
6554
6620
|
DropdownMenu,
|
|
@@ -6568,7 +6634,7 @@ function Filters({
|
|
|
6568
6634
|
/* @__PURE__ */ jsxs24(
|
|
6569
6635
|
DropdownMenuContent,
|
|
6570
6636
|
{
|
|
6571
|
-
className:
|
|
6637
|
+
className: cn42("w-55", menuPopupClassName),
|
|
6572
6638
|
align: "start",
|
|
6573
6639
|
children: [
|
|
6574
6640
|
showSearchInput && /* @__PURE__ */ jsxs24(Fragment4, { children: [
|
|
@@ -6581,7 +6647,7 @@ function Filters({
|
|
|
6581
6647
|
"aria-controls": `${rootId}-listbox`,
|
|
6582
6648
|
"aria-activedescendant": highlightedIndex >= 0 ? `${rootId}-item-${highlightedIndex}` : void 0,
|
|
6583
6649
|
placeholder: mergedI18n.searchFields,
|
|
6584
|
-
className:
|
|
6650
|
+
className: cn42(
|
|
6585
6651
|
"h-8 rounded-none border-0 bg-transparent! px-2 text-sm shadow-none",
|
|
6586
6652
|
"focus-visible:border-border focus-visible:ring-0 focus-visible:ring-offset-0",
|
|
6587
6653
|
activeMenu === "root" && "placeholder:text-foreground"
|
|
@@ -6864,6 +6930,7 @@ var createFilterGroup = (id, label, fields, initialFilters = []) => ({
|
|
|
6864
6930
|
|
|
6865
6931
|
// src/ui/select.tsx
|
|
6866
6932
|
import { Select as SelectPrimitive } from "@base-ui/react/select";
|
|
6933
|
+
import { cn as cn43 } from "cn";
|
|
6867
6934
|
import { Check as Check2, ChevronDown as ChevronDown3, ChevronUp as ChevronUp2 } from "@gravity-ui/icons";
|
|
6868
6935
|
import { jsx as jsx45, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
6869
6936
|
var Select = SelectPrimitive.Root;
|
|
@@ -6872,7 +6939,7 @@ function SelectGroup({ className, ...props }) {
|
|
|
6872
6939
|
SelectPrimitive.Group,
|
|
6873
6940
|
{
|
|
6874
6941
|
"data-slot": "select-group",
|
|
6875
|
-
className:
|
|
6942
|
+
className: cn43("scroll-my-1 p-1", className),
|
|
6876
6943
|
...props
|
|
6877
6944
|
}
|
|
6878
6945
|
);
|
|
@@ -6882,7 +6949,7 @@ function SelectValue({ className, ...props }) {
|
|
|
6882
6949
|
SelectPrimitive.Value,
|
|
6883
6950
|
{
|
|
6884
6951
|
"data-slot": "select-value",
|
|
6885
|
-
className:
|
|
6952
|
+
className: cn43("flex flex-1 text-left", className),
|
|
6886
6953
|
...props
|
|
6887
6954
|
}
|
|
6888
6955
|
);
|
|
@@ -6898,7 +6965,7 @@ function SelectTrigger({
|
|
|
6898
6965
|
{
|
|
6899
6966
|
"data-slot": "select-trigger",
|
|
6900
6967
|
"data-size": size,
|
|
6901
|
-
className:
|
|
6968
|
+
className: cn43(
|
|
6902
6969
|
"flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:ring-2 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-placeholder:text-muted-foreground data-[size=default]:h-8 *:data-[slot=select-value]:line-clamp-1 dark:hover:bg-input/50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
6903
6970
|
className
|
|
6904
6971
|
),
|
|
@@ -6939,7 +7006,7 @@ function SelectContent({
|
|
|
6939
7006
|
{
|
|
6940
7007
|
"data-slot": "select-content",
|
|
6941
7008
|
"data-align-trigger": alignItemWithTrigger,
|
|
6942
|
-
className:
|
|
7009
|
+
className: cn43(
|
|
6943
7010
|
"relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-background 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-open:fade-in-0 data-open:zoom-in-95 data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
6944
7011
|
className
|
|
6945
7012
|
),
|
|
@@ -6962,7 +7029,7 @@ function SelectLabel({
|
|
|
6962
7029
|
SelectPrimitive.GroupLabel,
|
|
6963
7030
|
{
|
|
6964
7031
|
"data-slot": "select-label",
|
|
6965
|
-
className:
|
|
7032
|
+
className: cn43("px-1.5 py-1 text-xs text-muted-foreground", className),
|
|
6966
7033
|
...props
|
|
6967
7034
|
}
|
|
6968
7035
|
);
|
|
@@ -6976,7 +7043,7 @@ function SelectItem({
|
|
|
6976
7043
|
SelectPrimitive.Item,
|
|
6977
7044
|
{
|
|
6978
7045
|
"data-slot": "select-item",
|
|
6979
|
-
className:
|
|
7046
|
+
className: cn43(
|
|
6980
7047
|
"relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
|
6981
7048
|
className
|
|
6982
7049
|
),
|
|
@@ -7002,7 +7069,7 @@ function SelectSeparator({
|
|
|
7002
7069
|
SelectPrimitive.Separator,
|
|
7003
7070
|
{
|
|
7004
7071
|
"data-slot": "select-separator",
|
|
7005
|
-
className:
|
|
7072
|
+
className: cn43("pointer-events-none -mx-1 my-1 h-px bg-border", className),
|
|
7006
7073
|
...props
|
|
7007
7074
|
}
|
|
7008
7075
|
);
|
|
@@ -7015,7 +7082,7 @@ function SelectScrollUpButton({
|
|
|
7015
7082
|
SelectPrimitive.ScrollUpArrow,
|
|
7016
7083
|
{
|
|
7017
7084
|
"data-slot": "select-scroll-up-button",
|
|
7018
|
-
className:
|
|
7085
|
+
className: cn43(
|
|
7019
7086
|
"top-0 z-10 flex w-full cursor-default items-center justify-center bg-background py-1 [&_svg:not([class*='size-'])]:size-4",
|
|
7020
7087
|
className
|
|
7021
7088
|
),
|
|
@@ -7032,7 +7099,7 @@ function SelectScrollDownButton({
|
|
|
7032
7099
|
SelectPrimitive.ScrollDownArrow,
|
|
7033
7100
|
{
|
|
7034
7101
|
"data-slot": "select-scroll-down-button",
|
|
7035
|
-
className:
|
|
7102
|
+
className: cn43(
|
|
7036
7103
|
"bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-background py-1 [&_svg:not([class*='size-'])]:size-4",
|
|
7037
7104
|
className
|
|
7038
7105
|
),
|
|
@@ -7047,6 +7114,7 @@ import {
|
|
|
7047
7114
|
forwardRef as forwardRef4,
|
|
7048
7115
|
useLayoutEffect
|
|
7049
7116
|
} from "react";
|
|
7117
|
+
import { cn as cn44 } from "cn";
|
|
7050
7118
|
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
7051
7119
|
var componentThemeClassName = "[--ic-background:#ffffff] [--ic-foreground:#111111] [--ic-primary:#111111] [--ic-secondary:#646b75] [--ic-surface-border:#e9edf2] [--ic-border:#e3e7ec] [--ic-card:#ffffff] [--ic-card-foreground:#111111] [--ic-muted:#f5f7fa] [--ic-muted-foreground:#6d7480] [--ic-accent:#f3f5f8] [--color-accent:var(--ic-accent)] [--color-accent-foreground:var(--ic-accent-foreground)] [--ic-accent-foreground:#111111] [--ic-input:#e3e7ec] [--ic-ring:rgba(17,17,17,0.16)] [--ic-destructive:#dc2626] [--ic-paper:#fcfcfd] [--ic-popover-foreground:#111111] [--ic-brand:#0ea5e9] [--ic-brand-soft:#bae6fd] [--ic-shadow-soft:0_18px_38px_-24px_rgba(15,23,42,0.35)] [--ic-chart-1:oklch(0.52_0.19_254)] [--ic-chart-2:oklch(0.74_0.11_232)] [--ic-chart-3:oklch(0.42_0.16_262)] [--ic-chart-4:oklch(0.84_0.07_228)] [--ic-chart-5:oklch(0.62_0.14_240)] [--color-background:var(--ic-background)] [--color-foreground:var(--ic-foreground)] [--color-primary:var(--ic-primary)] [--color-secondary:var(--ic-secondary)] [--color-border:var(--ic-border)] [--color-card:var(--ic-card)] [--color-card-foreground:var(--ic-card-foreground)] [--color-muted:var(--ic-muted)] [--color-muted-foreground:var(--ic-muted-foreground)] [--color-accent:var(--ic-accent)] [--color-accent-foreground:var(--ic-accent-foreground)] [--color-input:var(--ic-input)] [--color-ring:var(--ic-ring)] [--color-destructive:var(--ic-destructive)] [--color-paper:var(--ic-paper)] [--color-popover-foreground:var(--ic-popover-foreground)] [--color-brand:var(--ic-brand)] [--color-brand-soft:var(--ic-brand-soft)] [--color-chart-1:var(--ic-chart-1)] [--color-chart-2:var(--ic-chart-2)] [--color-chart-3:var(--ic-chart-3)] [--color-chart-4:var(--ic-chart-4)] [--color-chart-5:var(--ic-chart-5)] dark:[--ic-background:#111111] dark:[--ic-foreground:#f6f3ec] dark:[--ic-primary:#f6f3ec] dark:[--ic-secondary:#cbc6bb] dark:[--ic-surface-border:#2a2a25] dark:[--ic-border:#2b2a25] dark:[--ic-card:#111111] dark:[--ic-card-foreground:#f6f3ec] dark:[--ic-muted:#171716] dark:[--ic-muted-foreground:#9a958a] dark:[--ic-accent:#1a1a18] [--color-accent:var(--ic-accent)] [--color-accent-foreground:var(--ic-accent-foreground)] dark:[--ic-accent-foreground:#f6f3ec] dark:[--ic-input:#2b2a25] dark:[--ic-ring:rgba(246,243,236,0.18)] dark:[--ic-destructive:#f87171] dark:[--ic-paper:#171716] dark:[--ic-popover-foreground:#f6f3ec] dark:[--ic-brand:#38bdf8] dark:[--ic-brand-soft:#0c4a6e] dark:[--ic-shadow-soft:0_20px_44px_-28px_rgba(0,0,0,0.6)] dark:[--ic-chart-1:oklch(0.68_0.17_250)] dark:[--ic-chart-2:oklch(0.82_0.09_225)] dark:[--ic-chart-3:oklch(0.58_0.15_260)] dark:[--ic-chart-4:oklch(0.75_0.12_235)] dark:[--ic-chart-5:oklch(0.88_0.06_220)]";
|
|
7052
7120
|
var STYLE_ID = "iconiq-skeleton-styles";
|
|
@@ -7171,7 +7239,7 @@ var Skeleton = forwardRef4(function Skeleton2({
|
|
|
7171
7239
|
return /* @__PURE__ */ jsx46(
|
|
7172
7240
|
"div",
|
|
7173
7241
|
{
|
|
7174
|
-
className:
|
|
7242
|
+
className: cn44(
|
|
7175
7243
|
componentThemeClassName,
|
|
7176
7244
|
"iconiq-skeleton-surface relative block h-4 w-full overflow-hidden",
|
|
7177
7245
|
showFade && "iconiq-skeleton-fade-root",
|
|
@@ -7200,7 +7268,7 @@ function SkeletonAvatar({
|
|
|
7200
7268
|
return /* @__PURE__ */ jsx46(
|
|
7201
7269
|
Skeleton,
|
|
7202
7270
|
{
|
|
7203
|
-
className:
|
|
7271
|
+
className: cn44("size-10", className),
|
|
7204
7272
|
decorative: true,
|
|
7205
7273
|
rounded: "full",
|
|
7206
7274
|
...props
|
|
@@ -7208,7 +7276,7 @@ function SkeletonAvatar({
|
|
|
7208
7276
|
);
|
|
7209
7277
|
}
|
|
7210
7278
|
function SkeletonText({ className, ...props }) {
|
|
7211
|
-
return /* @__PURE__ */ jsx46(Skeleton, { className:
|
|
7279
|
+
return /* @__PURE__ */ jsx46(Skeleton, { className: cn44("h-3", className), decorative: true, ...props });
|
|
7212
7280
|
}
|
|
7213
7281
|
function SkeletonButton({
|
|
7214
7282
|
className,
|
|
@@ -7217,7 +7285,7 @@ function SkeletonButton({
|
|
|
7217
7285
|
return /* @__PURE__ */ jsx46(
|
|
7218
7286
|
Skeleton,
|
|
7219
7287
|
{
|
|
7220
|
-
className:
|
|
7288
|
+
className: cn44("h-9 w-24", className),
|
|
7221
7289
|
decorative: true,
|
|
7222
7290
|
rounded: "lg",
|
|
7223
7291
|
...props
|
|
@@ -7275,44 +7343,7 @@ import {
|
|
|
7275
7343
|
import { CSS } from "@dnd-kit/utilities";
|
|
7276
7344
|
import * as React15 from "react";
|
|
7277
7345
|
import * as ReactDOM from "react-dom";
|
|
7278
|
-
|
|
7279
|
-
// src/lib/compose-refs.ts
|
|
7280
|
-
import * as React13 from "react";
|
|
7281
|
-
function setRef(ref, value) {
|
|
7282
|
-
if (typeof ref === "function") {
|
|
7283
|
-
return ref(value);
|
|
7284
|
-
}
|
|
7285
|
-
if (ref !== null && ref !== void 0) {
|
|
7286
|
-
ref.current = value;
|
|
7287
|
-
}
|
|
7288
|
-
}
|
|
7289
|
-
function composeRefs(...refs) {
|
|
7290
|
-
return (node) => {
|
|
7291
|
-
let hasCleanup = false;
|
|
7292
|
-
const cleanups = refs.map((ref) => {
|
|
7293
|
-
const cleanup = setRef(ref, node);
|
|
7294
|
-
if (!hasCleanup && typeof cleanup === "function") {
|
|
7295
|
-
hasCleanup = true;
|
|
7296
|
-
}
|
|
7297
|
-
return cleanup;
|
|
7298
|
-
});
|
|
7299
|
-
if (hasCleanup) {
|
|
7300
|
-
return () => {
|
|
7301
|
-
for (let i = 0; i < cleanups.length; i++) {
|
|
7302
|
-
const cleanup = cleanups[i];
|
|
7303
|
-
if (typeof cleanup === "function") {
|
|
7304
|
-
cleanup();
|
|
7305
|
-
} else {
|
|
7306
|
-
setRef(refs[i], null);
|
|
7307
|
-
}
|
|
7308
|
-
}
|
|
7309
|
-
};
|
|
7310
|
-
}
|
|
7311
|
-
};
|
|
7312
|
-
}
|
|
7313
|
-
function useComposedRefs(...refs) {
|
|
7314
|
-
return React13.useCallback(composeRefs(...refs), refs);
|
|
7315
|
-
}
|
|
7346
|
+
import { cn as cn45 } from "cn";
|
|
7316
7347
|
|
|
7317
7348
|
// src/hooks/use-isomorphic-layout-effect.ts
|
|
7318
7349
|
import * as React14 from "react";
|
|
@@ -7641,7 +7672,7 @@ function SortableItem(props) {
|
|
|
7641
7672
|
id,
|
|
7642
7673
|
ref: composedRef,
|
|
7643
7674
|
style: composedStyle,
|
|
7644
|
-
className:
|
|
7675
|
+
className: cn45(
|
|
7645
7676
|
"focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:outline-hidden",
|
|
7646
7677
|
{
|
|
7647
7678
|
"touch-none select-none": asHandle,
|
|
@@ -7689,7 +7720,7 @@ function SortableItemHandle(props) {
|
|
|
7689
7720
|
"aria-controls": itemContext.id,
|
|
7690
7721
|
ref: composedRef,
|
|
7691
7722
|
disabled: isDisabled,
|
|
7692
|
-
className:
|
|
7723
|
+
className: cn45(
|
|
7693
7724
|
"select-none disabled:pointer-events-none disabled:opacity-50",
|
|
7694
7725
|
context.flatCursor ? "cursor-default" : "cursor-grab data-dragging:cursor-grabbing",
|
|
7695
7726
|
className
|
|
@@ -7729,7 +7760,7 @@ function SortableOverlay(props) {
|
|
|
7729
7760
|
{
|
|
7730
7761
|
dropAnimation,
|
|
7731
7762
|
modifiers: context.modifiers,
|
|
7732
|
-
className:
|
|
7763
|
+
className: cn45(!context.flatCursor && "cursor-grabbing"),
|
|
7733
7764
|
...overlayProps,
|
|
7734
7765
|
children: /* @__PURE__ */ jsx48(SortableOverlayContext.Provider, { value: true, children: context.activeId ? typeof children === "function" ? children({ value: context.activeId }) : children : null })
|
|
7735
7766
|
}
|
|
@@ -7740,6 +7771,7 @@ function SortableOverlay(props) {
|
|
|
7740
7771
|
|
|
7741
7772
|
// src/ui/switch.tsx
|
|
7742
7773
|
import { Switch as SwitchPrimitive } from "@base-ui/react/switch";
|
|
7774
|
+
import { cn as cn46 } from "cn";
|
|
7743
7775
|
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
7744
7776
|
function Switch({
|
|
7745
7777
|
className,
|
|
@@ -7751,7 +7783,7 @@ function Switch({
|
|
|
7751
7783
|
{
|
|
7752
7784
|
"data-slot": "switch",
|
|
7753
7785
|
"data-size": size,
|
|
7754
|
-
className:
|
|
7786
|
+
className: cn46(
|
|
7755
7787
|
"peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-[background-color,border-color,box-shadow,opacity] duration-150 ease-out outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 motion-reduce:transition-none dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50",
|
|
7756
7788
|
className
|
|
7757
7789
|
),
|