@jbpark/ui-kit 2.0.1 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,26 +1,26 @@
1
- import { t as cn } from "./utils-DEenfsJ-.mjs";
2
- import { t as Typography_default } from "./Typography-LYvEW-c8.mjs";
1
+ import { n as renderConditional, t as cn } from "./utils-CssUrKWE.mjs";
2
+ import { t as Typography_default } from "./Typography-DJSakhLz.mjs";
3
3
  import { ArrowUp, Check, ChevronDown, CircleQuestionMark, CircleX, Info, Loader2, LoaderCircle, OctagonAlert, OctagonX, Search, Square, SquareCheck, X, XIcon } from "lucide-react";
4
4
  import * as React$1 from "react";
5
5
  import React, { Children, createElement, forwardRef, useEffect, useId, useMemo, useRef, useState } from "react";
6
+ import * as AccordionPrimitive from "@radix-ui/react-accordion";
7
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
8
  import { Slot } from "@radix-ui/react-slot";
7
9
  import { cva } from "class-variance-authority";
8
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
9
10
  import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
11
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
12
+ import { Drawer } from "vaul";
10
13
  import * as LabelPrimitive from "@radix-ui/react-label";
11
- import { useIntersectionObserver, useThrottle, useWindowScroll } from "@uidotdev/usehooks";
12
14
  import * as PopoverPrimitive from "@radix-ui/react-popover";
13
15
  import * as ProgressPrimitive from "@radix-ui/react-progress";
14
16
  import * as SwitchPrimitive from "@radix-ui/react-switch";
15
- import * as AccordionPrimitive from "@radix-ui/react-accordion";
17
+ import { useIntersectionObserver, useThrottle, useWindowScroll } from "@uidotdev/usehooks";
16
18
  import { AnimatePresence, motion } from "motion/react";
17
19
  import { useResponsiveSize } from "@jbpark/use-hooks";
18
20
  import { useGSAP } from "@gsap/react";
19
- import { Drawer } from "vaul";
20
21
  import { createPortal } from "react-dom";
21
22
  import { createRoot } from "react-dom/client";
22
23
  import { v4 } from "uuid";
23
- import * as DialogPrimitive from "@radix-ui/react-dialog";
24
24
  import { Autoplay, EffectCards, Navigation, Scrollbar } from "swiper/modules";
25
25
  import { Swiper, SwiperSlide } from "swiper/react";
26
26
  import "swiper/css";
@@ -29,6 +29,61 @@ import "swiper/css/effect-cards";
29
29
  import "swiper/css/navigation";
30
30
  import "swiper/css/scrollbar";
31
31
 
32
+ //#region rolldown:runtime
33
+ var __defProp = Object.defineProperty;
34
+ var __exportAll = (all, symbols) => {
35
+ let target = {};
36
+ for (var name in all) {
37
+ __defProp(target, name, {
38
+ get: all[name],
39
+ enumerable: true
40
+ });
41
+ }
42
+ if (symbols) {
43
+ __defProp(target, Symbol.toStringTag, { value: "Module" });
44
+ }
45
+ return target;
46
+ };
47
+
48
+ //#endregion
49
+ //#region src/core/accordion.tsx
50
+ var accordion_exports = /* @__PURE__ */ __exportAll({
51
+ Accordion: () => Accordion$1,
52
+ AccordionContent: () => AccordionContent$1,
53
+ AccordionItem: () => AccordionItem$1,
54
+ AccordionTrigger: () => AccordionTrigger$1
55
+ });
56
+ const Accordion$1 = AccordionPrimitive.Root;
57
+ const AccordionItem$1 = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Item, {
58
+ ref,
59
+ className: cn("border-b", className),
60
+ ...props
61
+ }));
62
+ AccordionItem$1.displayName = "AccordionItem";
63
+ const AccordionTrigger$1 = React$1.forwardRef(({ expandIcon, className, children, ...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Header, {
64
+ className: "flex",
65
+ children: /* @__PURE__ */ jsxs(AccordionPrimitive.Trigger, {
66
+ ref,
67
+ className: cn(`flex flex-1 items-center justify-between py-4 text-left text-sm
68
+ font-medium transition-all hover:underline
69
+ [&[data-state=open]>svg]:rotate-180`, className),
70
+ ...props,
71
+ children: [children, expandIcon || /* @__PURE__ */ jsx(ChevronDown, { className: "text-muted-foreground h-4 w-4 shrink-0 transition-transform\n duration-200" })]
72
+ })
73
+ }));
74
+ AccordionTrigger$1.displayName = AccordionPrimitive.Trigger.displayName;
75
+ const AccordionContent$1 = React$1.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Content, {
76
+ ref,
77
+ className: "data-[state=closed]:animate-accordion-up\n data-[state=open]:animate-accordion-down overflow-hidden text-sm",
78
+ ...props,
79
+ children: /* @__PURE__ */ jsx("div", {
80
+ className: cn("pt-0 pb-4", className),
81
+ children
82
+ })
83
+ }));
84
+ AccordionContent$1.displayName = AccordionPrimitive.Content.displayName;
85
+
86
+ //#endregion
32
87
  //#region src/core/button.tsx
33
88
  const buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", {
34
89
  variants: {
@@ -64,8 +119,363 @@ function Button$2({ className, variant, size, asChild = false, ...props }) {
64
119
  });
65
120
  }
66
121
 
122
+ //#endregion
123
+ //#region src/core/checkbox.tsx
124
+ var checkbox_exports = /* @__PURE__ */ __exportAll({ Checkbox: () => Checkbox$1 });
125
+ const Checkbox$1 = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(CheckboxPrimitive.Root, {
126
+ ref,
127
+ className: cn(`peer border-primary focus-visible:ring-ring
128
+ data-[state=checked]:bg-primary
129
+ data-[state=checked]:text-primary-foreground grid h-4 w-4 shrink-0
130
+ place-content-center rounded-sm border shadow focus-visible:ring-1
131
+ focus-visible:outline-none disabled:cursor-not-allowed
132
+ disabled:opacity-50`, className),
133
+ ...props,
134
+ children: /* @__PURE__ */ jsx(CheckboxPrimitive.Indicator, {
135
+ className: cn("grid place-content-center text-current"),
136
+ children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" })
137
+ })
138
+ }));
139
+ Checkbox$1.displayName = CheckboxPrimitive.Root.displayName;
140
+
141
+ //#endregion
142
+ //#region src/core/dialog.tsx
143
+ var dialog_exports = /* @__PURE__ */ __exportAll({
144
+ Dialog: () => Dialog$1,
145
+ DialogClose: () => DialogClose,
146
+ DialogContent: () => DialogContent$1,
147
+ DialogDescription: () => DialogDescription$1,
148
+ DialogFooter: () => DialogFooter$1,
149
+ DialogHeader: () => DialogHeader$1,
150
+ DialogOverlay: () => DialogOverlay,
151
+ DialogPortal: () => DialogPortal,
152
+ DialogTitle: () => DialogTitle$1,
153
+ DialogTrigger: () => DialogTrigger
154
+ });
155
+ function Dialog$1({ ...props }) {
156
+ return /* @__PURE__ */ jsx(DialogPrimitive.Root, {
157
+ "data-slot": "dialog",
158
+ ...props
159
+ });
160
+ }
161
+ function DialogTrigger({ ...props }) {
162
+ return /* @__PURE__ */ jsx(DialogPrimitive.Trigger, {
163
+ "data-slot": "dialog-trigger",
164
+ ...props
165
+ });
166
+ }
167
+ function DialogPortal({ ...props }) {
168
+ return /* @__PURE__ */ jsx(DialogPrimitive.Portal, {
169
+ "data-slot": "dialog-portal",
170
+ ...props
171
+ });
172
+ }
173
+ function DialogClose({ ...props }) {
174
+ return /* @__PURE__ */ jsx(DialogPrimitive.Close, {
175
+ "data-slot": "dialog-close",
176
+ ...props
177
+ });
178
+ }
179
+ function DialogOverlay({ className, ...props }) {
180
+ return /* @__PURE__ */ jsx(DialogPrimitive.Overlay, {
181
+ "data-slot": "dialog-overlay",
182
+ className: cn(`data-[state=open]:animate-in data-[state=closed]:animate-out
183
+ data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0
184
+ z-50 bg-black/50`, className),
185
+ ...props
186
+ });
187
+ }
188
+ function DialogContent$1({ className, children, showCloseButton = true, classNames, closeIcon, closable, container, onCancel, ...props }) {
189
+ return /* @__PURE__ */ jsxs(DialogPortal, {
190
+ "data-slot": "dialog-portal",
191
+ container,
192
+ children: [/* @__PURE__ */ jsx(DialogOverlay, { className: cn(classNames?.mask) }), /* @__PURE__ */ jsxs(DialogPrimitive.Content, {
193
+ "data-slot": "dialog-content",
194
+ className: cn(`bg-background data-[state=open]:animate-in
195
+ data-[state=closed]:animate-out data-[state=closed]:fade-out-0
196
+ data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95
197
+ data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid
198
+ w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%]
199
+ gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg`, className),
200
+ ...props,
201
+ children: [children, showCloseButton && /* @__PURE__ */ jsxs(DialogPrimitive.Close, {
202
+ "data-slot": "dialog-close",
203
+ className: "ring-offset-background focus:ring-ring\n data-[state=open]:bg-accent\n data-[state=open]:text-muted-foreground absolute top-4 right-4\n rounded-xs opacity-70 transition-opacity hover:opacity-100\n focus:ring-2 focus:ring-offset-2 focus:outline-hidden\n disabled:pointer-events-none [&_svg]:pointer-events-none\n [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
204
+ disabled: typeof closable === "object" && closable.disabled,
205
+ onClick: onCancel,
206
+ children: [closeIcon || /* @__PURE__ */ jsx(XIcon, {}), /* @__PURE__ */ jsx("span", {
207
+ className: "sr-only",
208
+ children: "Close"
209
+ })]
210
+ })]
211
+ })]
212
+ });
213
+ }
214
+ function DialogHeader$1({ className, ...props }) {
215
+ return /* @__PURE__ */ jsx("div", {
216
+ "data-slot": "dialog-header",
217
+ className: cn("flex flex-col gap-2 text-center sm:text-left", className),
218
+ ...props
219
+ });
220
+ }
221
+ function DialogFooter$1({ className, ...props }) {
222
+ return /* @__PURE__ */ jsx("div", {
223
+ "data-slot": "dialog-footer",
224
+ className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
225
+ ...props
226
+ });
227
+ }
228
+ function DialogTitle$1({ className, ...props }) {
229
+ return /* @__PURE__ */ jsx(DialogPrimitive.Title, {
230
+ "data-slot": "dialog-title",
231
+ className: cn("text-lg leading-none font-semibold", className),
232
+ ...props
233
+ });
234
+ }
235
+ function DialogDescription$1({ className, ...props }) {
236
+ return /* @__PURE__ */ jsx(DialogPrimitive.Description, {
237
+ "data-slot": "dialog-description",
238
+ className: cn("text-muted-foreground text-sm", className),
239
+ ...props
240
+ });
241
+ }
242
+
243
+ //#endregion
244
+ //#region src/core/drawer.tsx
245
+ var drawer_exports = /* @__PURE__ */ __exportAll({
246
+ Drawer: () => Drawer$2,
247
+ DrawerClose: () => DrawerClose,
248
+ DrawerContent: () => DrawerContent$1,
249
+ DrawerDescription: () => DrawerDescription$1,
250
+ DrawerFooter: () => DrawerFooter$1,
251
+ DrawerHeader: () => DrawerHeader$1,
252
+ DrawerOverlay: () => DrawerOverlay,
253
+ DrawerPortal: () => DrawerPortal,
254
+ DrawerTitle: () => DrawerTitle$1,
255
+ DrawerTrigger: () => DrawerTrigger
256
+ });
257
+ function Drawer$2({ ...props }) {
258
+ return /* @__PURE__ */ jsx(Drawer.Root, {
259
+ "data-slot": "drawer",
260
+ ...props
261
+ });
262
+ }
263
+ function DrawerTrigger({ ...props }) {
264
+ return /* @__PURE__ */ jsx(Drawer.Trigger, {
265
+ "data-slot": "drawer-trigger",
266
+ ...props
267
+ });
268
+ }
269
+ function DrawerPortal({ ...props }) {
270
+ return /* @__PURE__ */ jsx(Drawer.Portal, {
271
+ "data-slot": "drawer-portal",
272
+ ...props
273
+ });
274
+ }
275
+ function DrawerClose({ ...props }) {
276
+ return /* @__PURE__ */ jsx(Drawer.Close, {
277
+ "data-slot": "drawer-close",
278
+ ...props
279
+ });
280
+ }
281
+ function DrawerOverlay({ className, ...props }) {
282
+ return /* @__PURE__ */ jsx(Drawer.Overlay, {
283
+ "data-slot": "drawer-overlay",
284
+ className: cn(`data-[state=open]:animate-in data-[state=closed]:animate-out
285
+ data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0
286
+ z-50 bg-black/50`, className),
287
+ ...props
288
+ });
289
+ }
290
+ function DrawerContent$1({ className, classNames = {}, handlebar, mask, children, ...props }) {
291
+ return /* @__PURE__ */ jsxs(DrawerPortal, {
292
+ "data-slot": "drawer-portal",
293
+ children: [/* @__PURE__ */ jsx(DrawerOverlay, { className: cn(classNames?.mask, !mask && "hidden") }), /* @__PURE__ */ jsxs(Drawer.Content, {
294
+ "data-slot": "drawer-content",
295
+ className: cn("group/drawer-content bg-background fixed z-50 flex h-auto flex-col", `data-[vaul-drawer-direction=top]:inset-x-0
296
+ data-[vaul-drawer-direction=top]:top-0
297
+ data-[vaul-drawer-direction=top]:mb-24
298
+ data-[vaul-drawer-direction=top]:max-h-[80vh]
299
+ data-[vaul-drawer-direction=top]:rounded-b-lg
300
+ data-[vaul-drawer-direction=top]:border-b`, `data-[vaul-drawer-direction=bottom]:inset-x-0
301
+ data-[vaul-drawer-direction=bottom]:bottom-0
302
+ data-[vaul-drawer-direction=bottom]:mt-24
303
+ data-[vaul-drawer-direction=bottom]:max-h-[80vh]
304
+ data-[vaul-drawer-direction=bottom]:rounded-t-lg
305
+ data-[vaul-drawer-direction=bottom]:border-t`, `data-[vaul-drawer-direction=right]:inset-y-0
306
+ data-[vaul-drawer-direction=right]:right-0
307
+ data-[vaul-drawer-direction=right]:w-3/4
308
+ data-[vaul-drawer-direction=right]:border-l
309
+ data-[vaul-drawer-direction=right]:sm:max-w-sm`, `data-[vaul-drawer-direction=left]:inset-y-0
310
+ data-[vaul-drawer-direction=left]:left-0
311
+ data-[vaul-drawer-direction=left]:w-3/4
312
+ data-[vaul-drawer-direction=left]:border-r
313
+ data-[vaul-drawer-direction=left]:sm:max-w-sm`, className),
314
+ ...props,
315
+ children: [/* @__PURE__ */ jsx("div", { className: cn(`bg-muted mx-auto mt-4 hidden h-2 w-25 shrink-0 rounded-full
316
+ group-data-[vaul-drawer-direction=bottom]/drawer-content:block`, classNames?.handlebar, !handlebar && "hidden") }), children]
317
+ })]
318
+ });
319
+ }
320
+ function DrawerHeader$1({ className, ...props }) {
321
+ return /* @__PURE__ */ jsx("div", {
322
+ "data-slot": "drawer-header",
323
+ className: cn(`flex flex-col gap-0.5 p-4
324
+ group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center
325
+ group-data-[vaul-drawer-direction=top]/drawer-content:text-center
326
+ md:gap-1.5 md:text-left`, className),
327
+ ...props
328
+ });
329
+ }
330
+ function DrawerFooter$1({ className, ...props }) {
331
+ return /* @__PURE__ */ jsx("div", {
332
+ "data-slot": "drawer-footer",
333
+ className: cn("mt-auto flex flex-col gap-2 p-4", className),
334
+ ...props
335
+ });
336
+ }
337
+ function DrawerTitle$1({ className, ...props }) {
338
+ return /* @__PURE__ */ jsx(Drawer.Title, {
339
+ "data-slot": "drawer-title",
340
+ className: cn("text-foreground font-semibold", className),
341
+ ...props
342
+ });
343
+ }
344
+ function DrawerDescription$1({ className, ...props }) {
345
+ return /* @__PURE__ */ jsx(Drawer.Description, {
346
+ "data-slot": "drawer-description",
347
+ className: cn("text-muted-foreground text-sm", className),
348
+ ...props
349
+ });
350
+ }
351
+
352
+ //#endregion
353
+ //#region src/core/input.tsx
354
+ var input_exports = /* @__PURE__ */ __exportAll({ Input: () => Input$1 });
355
+ const Input$1 = React$1.forwardRef(({ className, type, ...props }, ref) => {
356
+ return /* @__PURE__ */ jsx("input", {
357
+ type,
358
+ className: cn(`border-input file:text-foreground placeholder:text-muted-foreground
359
+ focus-visible:ring-ring flex h-9 w-full rounded-md border
360
+ bg-transparent px-3 py-1 text-base shadow-sm transition-colors
361
+ file:border-0 file:bg-transparent file:text-sm file:font-medium
362
+ focus-visible:ring-1 focus-visible:outline-none
363
+ disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`, className),
364
+ ref,
365
+ ...props
366
+ });
367
+ });
368
+ Input$1.displayName = "Input";
369
+
370
+ //#endregion
371
+ //#region src/core/label.tsx
372
+ var label_exports = /* @__PURE__ */ __exportAll({ Label: () => Label$1 });
373
+ const labelVariants = cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70");
374
+ const Label$1 = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(LabelPrimitive.Root, {
375
+ ref,
376
+ className: cn(labelVariants(), className),
377
+ ...props
378
+ }));
379
+ Label$1.displayName = LabelPrimitive.Root.displayName;
380
+
381
+ //#endregion
382
+ //#region src/core/popover.tsx
383
+ var popover_exports = /* @__PURE__ */ __exportAll({
384
+ Popover: () => Popover$1,
385
+ PopoverAnchor: () => PopoverAnchor,
386
+ PopoverContent: () => PopoverContent$1,
387
+ PopoverTrigger: () => PopoverTrigger$1
388
+ });
389
+ const Popover$1 = PopoverPrimitive.Root;
390
+ const PopoverTrigger$1 = PopoverPrimitive.Trigger;
391
+ const PopoverAnchor = PopoverPrimitive.Anchor;
392
+ const PopoverContent$1 = React$1.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(PopoverPrimitive.Content, {
393
+ ref,
394
+ align,
395
+ sideOffset,
396
+ className: cn(`bg-popover text-popover-foreground data-[state=open]:animate-in
397
+ data-[state=closed]:animate-out data-[state=closed]:fade-out-0
398
+ data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95
399
+ data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2
400
+ data-[side=left]:slide-in-from-right-2
401
+ data-[side=right]:slide-in-from-left-2
402
+ data-[side=top]:slide-in-from-bottom-2 z-50 w-72
403
+ origin-[--radix-popover-content-transform-origin] rounded-md border p-4
404
+ shadow-md outline-none`, className),
405
+ ...props
406
+ }) }));
407
+ PopoverContent$1.displayName = PopoverPrimitive.Content.displayName;
408
+
409
+ //#endregion
410
+ //#region src/core/progress.tsx
411
+ var progress_exports = /* @__PURE__ */ __exportAll({ Progress: () => Progress$1 });
412
+ const Progress$1 = React$1.forwardRef(({ className, barClassName, barStyle, value, ...props }, ref) => /* @__PURE__ */ jsx(ProgressPrimitive.Root, {
413
+ ref,
414
+ className: cn("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full", className),
415
+ ...props,
416
+ children: /* @__PURE__ */ jsx(ProgressPrimitive.Indicator, {
417
+ className: cn("bg-primary h-full w-full flex-1 transition-all", barClassName),
418
+ style: {
419
+ transform: `translateX(-${100 - (value || 0)}%)`,
420
+ ...barStyle
421
+ }
422
+ })
423
+ }));
424
+ Progress$1.displayName = ProgressPrimitive.Root.displayName;
425
+
426
+ //#endregion
427
+ //#region src/core/skeleton.tsx
428
+ var skeleton_exports = /* @__PURE__ */ __exportAll({ Skeleton: () => Skeleton$1 });
429
+ function Skeleton$1({ className, ...props }) {
430
+ return /* @__PURE__ */ jsx("div", {
431
+ "data-slot": "skeleton",
432
+ className: cn("bg-accent animate-pulse rounded-md", className),
433
+ ...props
434
+ });
435
+ }
436
+
437
+ //#endregion
438
+ //#region src/core/switch.tsx
439
+ var switch_exports = /* @__PURE__ */ __exportAll({ Switch: () => Switch$1 });
440
+ function Switch$1({ className, handleClassName, ...props }) {
441
+ return /* @__PURE__ */ jsx(SwitchPrimitive.Root, {
442
+ "data-slot": "switch",
443
+ className: cn(`peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input
444
+ focus-visible:border-ring focus-visible:ring-ring/50
445
+ dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8
446
+ shrink-0 items-center rounded-full border border-transparent shadow-xs
447
+ transition-all outline-none focus-visible:ring-[3px]
448
+ disabled:cursor-not-allowed disabled:opacity-50`, className),
449
+ ...props,
450
+ children: /* @__PURE__ */ jsx(SwitchPrimitive.Thumb, {
451
+ "data-slot": "switch-thumb",
452
+ className: cn(`bg-background dark:data-[state=unchecked]:bg-foreground
453
+ dark:data-[state=checked]:bg-primary-foreground pointer-events-none
454
+ block size-4 rounded-full ring-0 transition-transform
455
+ data-[state=checked]:translate-x-[calc(100%-2px)]
456
+ data-[state=unchecked]:translate-x-0`, handleClassName)
457
+ })
458
+ });
459
+ }
460
+
461
+ //#endregion
462
+ //#region src/core/textarea.tsx
463
+ var textarea_exports = /* @__PURE__ */ __exportAll({ Textarea: () => Textarea });
464
+ const Textarea = React$1.forwardRef(({ className, ...props }, ref) => {
465
+ return /* @__PURE__ */ jsx("textarea", {
466
+ className: cn(`border-input placeholder:text-muted-foreground focus-visible:ring-ring
467
+ flex min-h-15 w-full rounded-md border bg-transparent px-3 py-2
468
+ text-base shadow-sm focus-visible:ring-1 focus-visible:outline-none
469
+ disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`, className),
470
+ ref,
471
+ ...props
472
+ });
473
+ });
474
+ Textarea.displayName = "Textarea";
475
+
67
476
  //#endregion
68
477
  //#region src/components/atoms/Button/index.tsx
478
+ const Core$6 = Button$2;
69
479
  const variantClasses = {
70
480
  solid: "",
71
481
  outlined: cn("border border-[rgb(var(--btn-border)/0.5)]", "bg-background text-foreground", "hover:bg-accent"),
@@ -88,7 +498,8 @@ const Button$1 = ({ icon, className, variant = "solid", size = "medium", color =
88
498
  const iconOnly = icon && !children;
89
499
  const computedColor = danger ? "danger" : color;
90
500
  const colored = computedColor && computedColor !== "default";
91
- return /* @__PURE__ */ jsxs(Button$2, {
501
+ const displayIcon = loading ? typeof loading === "object" ? loading.icon : /* @__PURE__ */ jsx(LoaderCircle, { className: "animate-spin" }) : icon;
502
+ return /* @__PURE__ */ jsxs(Core$6, {
92
503
  disabled,
93
504
  variant: "default",
94
505
  "data-color": computedColor,
@@ -104,39 +515,11 @@ const Button$1 = ({ icon, className, variant = "solid", size = "medium", color =
104
515
  onMouseDown?.(e);
105
516
  },
106
517
  ...props,
107
- children: [loading ? typeof loading === "object" ? loading.icon : /* @__PURE__ */ jsx(LoaderCircle, { className: "animate-spin" }) : icon, children]
518
+ children: [displayIcon, children]
108
519
  });
109
520
  };
110
521
  var Button_default$1 = Button$1;
111
522
 
112
- //#endregion
113
- //#region src/core/checkbox.tsx
114
- const Checkbox$1 = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(CheckboxPrimitive.Root, {
115
- ref,
116
- className: cn(`peer border-primary focus-visible:ring-ring
117
- data-[state=checked]:bg-primary
118
- data-[state=checked]:text-primary-foreground grid h-4 w-4 shrink-0
119
- place-content-center rounded-sm border shadow focus-visible:ring-1
120
- focus-visible:outline-none disabled:cursor-not-allowed
121
- disabled:opacity-50`, className),
122
- ...props,
123
- children: /* @__PURE__ */ jsx(CheckboxPrimitive.Indicator, {
124
- className: cn("grid place-content-center text-current"),
125
- children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" })
126
- })
127
- }));
128
- Checkbox$1.displayName = CheckboxPrimitive.Root.displayName;
129
-
130
- //#endregion
131
- //#region src/core/label.tsx
132
- const labelVariants = cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70");
133
- const Label$1 = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(LabelPrimitive.Root, {
134
- ref,
135
- className: cn(labelVariants(), className),
136
- ...props
137
- }));
138
- Label$1.displayName = LabelPrimitive.Root.displayName;
139
-
140
523
  //#endregion
141
524
  //#region src/components/atoms/Checkbox/Group/index.tsx
142
525
  const Group = ({ direction = "vertical", placement = "left", className, classNames = {}, options: _options, onChange = () => {} }) => {
@@ -174,6 +557,8 @@ var Group_default = Group;
174
557
 
175
558
  //#endregion
176
559
  //#region src/components/atoms/Checkbox/index.tsx
560
+ const { Checkbox: CoreCheckbox } = checkbox_exports;
561
+ const { Label: CoreLabel } = label_exports;
177
562
  const Checkbox = ({ placement = "left", value = "", children, className, icons, checked: _checked, onChange: _onChange = () => {}, ...props }) => {
178
563
  const [checked, setChecked] = useState(false);
179
564
  const reactId = useId();
@@ -204,12 +589,12 @@ const Checkbox = ({ placement = "left", value = "", children, className, icons,
204
589
  htmlFor: id,
205
590
  children
206
591
  })
207
- ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Checkbox$1, {
592
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(CoreCheckbox, {
208
593
  id,
209
594
  checked,
210
595
  className: "cursor-pointer",
211
596
  onCheckedChange: onChange
212
- }), children && /* @__PURE__ */ jsx(Label$1, {
597
+ }), children && /* @__PURE__ */ jsx(CoreLabel, {
213
598
  htmlFor: id,
214
599
  className: "cursor-pointer text-left",
215
600
  children
@@ -259,31 +644,15 @@ const FloatButton = ({ className, children, ...props }) => {
259
644
  FloatButton.BackTop = BackTop_default;
260
645
  var FloatButton_default = FloatButton;
261
646
 
262
- //#endregion
263
- //#region src/core/input.tsx
264
- const Input$1 = React$1.forwardRef(({ className, type, ...props }, ref) => {
265
- return /* @__PURE__ */ jsx("input", {
266
- type,
267
- className: cn(`border-input file:text-foreground placeholder:text-muted-foreground
268
- focus-visible:ring-ring flex h-9 w-full rounded-md border
269
- bg-transparent px-3 py-1 text-base shadow-sm transition-colors
270
- file:border-0 file:bg-transparent file:text-sm file:font-medium
271
- focus-visible:ring-1 focus-visible:outline-none
272
- disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`, className),
273
- ref,
274
- ...props
275
- });
276
- });
277
- Input$1.displayName = "Input";
278
-
279
647
  //#endregion
280
648
  //#region src/components/atoms/Input/Search/index.tsx
649
+ const { Input: Core$5 } = input_exports;
281
650
  const Search$1 = forwardRef(({ className, value, allowClear = true, onChange = () => {}, onPressEnter, ...props }, ref) => {
282
651
  return /* @__PURE__ */ jsxs("div", {
283
652
  className: cn("relative flex items-center gap-x-2", "rounded-md", "p-3", className),
284
653
  children: [
285
654
  /* @__PURE__ */ jsx(Search, { className: "absolute size-5" }),
286
- /* @__PURE__ */ jsx(Input$1, {
655
+ /* @__PURE__ */ jsx(Core$5, {
287
656
  ref,
288
657
  inputMode: "search",
289
658
  type: "search",
@@ -306,24 +675,11 @@ const Search$1 = forwardRef(({ className, value, allowClear = true, onChange = (
306
675
  Search$1.displayName = "Search";
307
676
  var Search_default = Search$1;
308
677
 
309
- //#endregion
310
- //#region src/core/textarea.tsx
311
- const Textarea = React$1.forwardRef(({ className, ...props }, ref) => {
312
- return /* @__PURE__ */ jsx("textarea", {
313
- className: cn(`border-input placeholder:text-muted-foreground focus-visible:ring-ring
314
- flex min-h-[60px] w-full rounded-md border bg-transparent px-3 py-2
315
- text-base shadow-sm focus-visible:ring-1 focus-visible:outline-none
316
- disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`, className),
317
- ref,
318
- ...props
319
- });
320
- });
321
- Textarea.displayName = "Textarea";
322
-
323
678
  //#endregion
324
679
  //#region src/components/atoms/Input/TextArea/index.tsx
680
+ const { Textarea: Core$4 } = textarea_exports;
325
681
  const TextArea = ({ className, ref, ...props }) => {
326
- return /* @__PURE__ */ jsx(Textarea, {
682
+ return /* @__PURE__ */ jsx(Core$4, {
327
683
  ref,
328
684
  className: cn(className),
329
685
  ...props
@@ -333,74 +689,129 @@ var TextArea_default = TextArea;
333
689
 
334
690
  //#endregion
335
691
  //#region src/components/atoms/Input/index.tsx
336
- const Input = ({ ...props }) => {
337
- return /* @__PURE__ */ jsx(Input$1, { ...props });
338
- };
339
- Input.Search = Search_default;
340
- Input.TextArea = TextArea_default;
341
- var Input_default = Input;
342
-
343
- //#endregion
344
- //#region src/core/popover.tsx
345
- const Popover$1 = PopoverPrimitive.Root;
346
- const PopoverTrigger = PopoverPrimitive.Trigger;
347
- const PopoverAnchor = PopoverPrimitive.Anchor;
348
- const PopoverContent = React$1.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(PopoverPrimitive.Content, {
349
- ref,
350
- align,
351
- sideOffset,
352
- className: cn(`bg-popover text-popover-foreground data-[state=open]:animate-in
353
- data-[state=closed]:animate-out data-[state=closed]:fade-out-0
354
- data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95
355
- data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2
356
- data-[side=left]:slide-in-from-right-2
357
- data-[side=right]:slide-in-from-left-2
358
- data-[side=top]:slide-in-from-bottom-2 z-50 w-72
359
- origin-[--radix-popover-content-transform-origin] rounded-md border p-4
360
- shadow-md outline-none`, className),
361
- ...props
362
- }) }));
363
- PopoverContent.displayName = PopoverPrimitive.Content.displayName;
692
+ const { Input: Core$3 } = input_exports;
693
+ const Input = ({ ...props }) => {
694
+ return /* @__PURE__ */ jsx(Core$3, { ...props });
695
+ };
696
+ Input.Search = Search_default;
697
+ Input.TextArea = TextArea_default;
698
+ var Input_default = Input;
364
699
 
365
700
  //#endregion
366
701
  //#region src/components/atoms/Popover/index.tsx
367
- const Popover = ({ title, content, children }) => {
368
- return /* @__PURE__ */ jsxs(Popover$1, { children: [/* @__PURE__ */ jsx(PopoverTrigger, {
702
+ const { Popover: CorePopover, PopoverContent, PopoverTrigger } = popover_exports;
703
+ const placementMap = {
704
+ top: {
705
+ side: "top",
706
+ align: "center"
707
+ },
708
+ left: {
709
+ side: "left",
710
+ align: "center"
711
+ },
712
+ right: {
713
+ side: "right",
714
+ align: "center"
715
+ },
716
+ bottom: {
717
+ side: "bottom",
718
+ align: "center"
719
+ },
720
+ topLeft: {
721
+ side: "top",
722
+ align: "start"
723
+ },
724
+ topRight: {
725
+ side: "top",
726
+ align: "end"
727
+ },
728
+ bottomLeft: {
729
+ side: "bottom",
730
+ align: "start"
731
+ },
732
+ bottomRight: {
733
+ side: "bottom",
734
+ align: "end"
735
+ },
736
+ leftTop: {
737
+ side: "left",
738
+ align: "start"
739
+ },
740
+ leftBottom: {
741
+ side: "left",
742
+ align: "end"
743
+ },
744
+ rightTop: {
745
+ side: "right",
746
+ align: "start"
747
+ },
748
+ rightBottom: {
749
+ side: "right",
750
+ align: "end"
751
+ }
752
+ };
753
+ const arrowBase = "absolute h-0 w-0 drop-shadow-md";
754
+ const arrowShape = {
755
+ vertical: "border-l-8 border-r-8 border-l-transparent border-r-transparent",
756
+ horizontal: "border-t-8 border-b-8 border-t-transparent border-b-transparent"
757
+ };
758
+ const arrowAlign = {
759
+ center: {
760
+ x: "left-1/2 -translate-x-1/2",
761
+ y: "top-1/2 -translate-y-1/2"
762
+ },
763
+ start: {
764
+ x: "left-4",
765
+ y: "top-4"
766
+ },
767
+ end: {
768
+ x: "right-4",
769
+ y: "bottom-4"
770
+ }
771
+ };
772
+ const arrowStyles = {
773
+ top: cn(arrowShape.vertical, arrowAlign.center.x, "top-full border-t-8 border-t-white"),
774
+ topLeft: cn(arrowShape.vertical, arrowAlign.start.x, "top-full border-t-8 border-t-white"),
775
+ topRight: cn(arrowShape.vertical, arrowAlign.end.x, "top-full border-t-8 border-t-white"),
776
+ bottom: cn(arrowShape.vertical, arrowAlign.center.x, "bottom-full border-b-8 border-b-white"),
777
+ bottomLeft: cn(arrowShape.vertical, arrowAlign.start.x, "bottom-full border-b-8 border-b-white"),
778
+ bottomRight: cn(arrowShape.vertical, arrowAlign.end.x, "bottom-full border-b-8 border-b-white"),
779
+ left: cn(arrowShape.horizontal, arrowAlign.center.y, "left-full border-l-8 border-l-white"),
780
+ leftTop: cn(arrowShape.horizontal, arrowAlign.start.y, "left-full border-l-8 border-l-white"),
781
+ leftBottom: cn(arrowShape.horizontal, arrowAlign.end.y, "left-full border-l-8 border-l-white"),
782
+ right: cn(arrowShape.horizontal, arrowAlign.center.y, "right-full border-r-8 border-r-white"),
783
+ rightTop: cn(arrowShape.horizontal, arrowAlign.start.y, "right-full border-r-8 border-r-white"),
784
+ rightBottom: cn(arrowShape.horizontal, arrowAlign.end.y, "right-full border-r-8 border-r-white")
785
+ };
786
+ const Popover = ({ title, placement = "top", className, content, children }) => {
787
+ return /* @__PURE__ */ jsxs(CorePopover, { children: [/* @__PURE__ */ jsx(PopoverTrigger, {
369
788
  asChild: true,
370
789
  children
371
790
  }), /* @__PURE__ */ jsxs(PopoverContent, {
372
- align: "start",
373
- children: [title && typeof title === "string" ? /* @__PURE__ */ jsx(Typography_default.Title, {
374
- level: 5,
375
- children: title
376
- }) : title, content]
791
+ align: placementMap[placement].align,
792
+ side: placementMap[placement].side,
793
+ sideOffset: 16,
794
+ className: cn("relative w-auto", className),
795
+ children: [
796
+ renderConditional(title, (v) => /* @__PURE__ */ jsx(Typography_default.Title, {
797
+ level: 6,
798
+ children: v
799
+ })),
800
+ content,
801
+ /* @__PURE__ */ jsx("div", { className: cn(arrowBase, arrowStyles[placement]) })
802
+ ]
377
803
  })] });
378
804
  };
379
805
  var Popover_default = Popover;
380
806
 
381
- //#endregion
382
- //#region src/core/progress.tsx
383
- const Progress$1 = React$1.forwardRef(({ className, barClassName, barStyle, value, ...props }, ref) => /* @__PURE__ */ jsx(ProgressPrimitive.Root, {
384
- ref,
385
- className: cn("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full", className),
386
- ...props,
387
- children: /* @__PURE__ */ jsx(ProgressPrimitive.Indicator, {
388
- className: cn("bg-primary h-full w-full flex-1 transition-all", barClassName),
389
- style: {
390
- transform: `translateX(-${100 - (value || 0)}%)`,
391
- ...barStyle
392
- }
393
- })
394
- }));
395
- Progress$1.displayName = ProgressPrimitive.Root.displayName;
396
-
397
807
  //#endregion
398
808
  //#region src/components/atoms/Progress/index.tsx
809
+ const { Progress: Core$2 } = progress_exports;
399
810
  const Progress = ({ value, className, direction = "horizontal", classNames }) => {
400
811
  const isHorizontal = direction === "horizontal";
401
812
  const dimension = isHorizontal ? "width" : "height";
402
813
  const percent = isNaN(value) ? 0 : value;
403
- return /* @__PURE__ */ jsx(Progress$1, {
814
+ return /* @__PURE__ */ jsx(Core$2, {
404
815
  value,
405
816
  className: cn(isHorizontal ? "h-4 w-full" : "flex h-full w-4 flex-col justify-end", className, classNames?.background),
406
817
  barClassName: cn("flex-none", classNames?.bar),
@@ -412,16 +823,6 @@ const Progress = ({ value, className, direction = "horizontal", classNames }) =>
412
823
  };
413
824
  var Progress_default = Progress;
414
825
 
415
- //#endregion
416
- //#region src/core/skeleton.tsx
417
- function Skeleton$1({ className, ...props }) {
418
- return /* @__PURE__ */ jsx("div", {
419
- "data-slot": "skeleton",
420
- className: cn("bg-accent animate-pulse rounded-md", className),
421
- ...props
422
- });
423
- }
424
-
425
826
  //#endregion
426
827
  //#region src/components/atoms/Skeleton/Button/index.tsx
427
828
  const Button = ({ className, ...props }) => {
@@ -445,6 +846,7 @@ var Node_default = Node;
445
846
 
446
847
  //#endregion
447
848
  //#region src/components/atoms/Skeleton/index.tsx
849
+ const { Skeleton: Core$1 } = skeleton_exports;
448
850
  const getValueAtIndex = (value, index) => {
449
851
  return Array.isArray(value) ? value[index] ?? value[0] : value;
450
852
  };
@@ -457,13 +859,13 @@ const Skeleton = ({ active = true, loading = true, avatar, size = "default", dir
457
859
  if (!loading) return children;
458
860
  return /* @__PURE__ */ jsxs("div", {
459
861
  className: cn("flex items-center gap-3"),
460
- children: [avatar && /* @__PURE__ */ jsx(Skeleton$1, { className: cn("h-12 w-12", "rounded-xl", !active && "animate-none", classNames.avatar) }), /* @__PURE__ */ jsx("div", {
862
+ children: [avatar && /* @__PURE__ */ jsx(Core$1, { className: cn("h-12 w-12", "rounded-xl", !active && "animate-none", classNames.avatar) }), /* @__PURE__ */ jsx("div", {
461
863
  className: cn("flex grow", direction === "vertical" && "flex-col", classNames.wrapper),
462
864
  style: { gap },
463
865
  children: Array.from({ length: count }).map((_, index) => {
464
866
  const itemWidth = getValueAtIndex(width, index);
465
867
  const itemHeight = getValueAtIndex(height, index);
466
- return /* @__PURE__ */ jsx(Skeleton$1, {
868
+ return /* @__PURE__ */ jsx(Core$1, {
467
869
  className: cn("rounded-md", !active && "animate-none", SIZES[size], className, classNames.item),
468
870
  style: {
469
871
  ...style,
@@ -492,33 +894,11 @@ const Spin = ({ spinning, className, ...props }) => {
492
894
  };
493
895
  var Spin_default = Spin;
494
896
 
495
- //#endregion
496
- //#region src/core/switch.tsx
497
- function Switch$1({ className, handleClassName, ...props }) {
498
- return /* @__PURE__ */ jsx(SwitchPrimitive.Root, {
499
- "data-slot": "switch",
500
- className: cn(`peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input
501
- focus-visible:border-ring focus-visible:ring-ring/50
502
- dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8
503
- shrink-0 items-center rounded-full border border-transparent shadow-xs
504
- transition-all outline-none focus-visible:ring-[3px]
505
- disabled:cursor-not-allowed disabled:opacity-50`, className),
506
- ...props,
507
- children: /* @__PURE__ */ jsx(SwitchPrimitive.Thumb, {
508
- "data-slot": "switch-thumb",
509
- className: cn(`bg-background dark:data-[state=unchecked]:bg-foreground
510
- dark:data-[state=checked]:bg-primary-foreground pointer-events-none
511
- block size-4 rounded-full ring-0 transition-transform
512
- data-[state=checked]:translate-x-[calc(100%-2px)]
513
- data-[state=unchecked]:translate-x-0`, handleClassName)
514
- })
515
- });
516
- }
517
-
518
897
  //#endregion
519
898
  //#region src/components/atoms/Switch/index.tsx
899
+ const { Switch: Core } = switch_exports;
520
900
  const Switch = ({ onChange, className, classNames, ...props }) => {
521
- return /* @__PURE__ */ jsx(Switch$1, {
901
+ return /* @__PURE__ */ jsx(Core, {
522
902
  className: cn(className, classNames?.track),
523
903
  handleClassName: cn(classNames?.handle),
524
904
  onCheckedChange: (checked) => {
@@ -535,10 +915,10 @@ const Card = ({ title, children, className, classNames, variant = "outlined", ..
535
915
  return /* @__PURE__ */ jsxs("div", {
536
916
  className: cn("w-full", "rounded-lg p-4", "bg-white shadow-sm transition-all", variant === "outlined" && "border border-gray-200", className),
537
917
  ...props,
538
- children: [title && /* @__PURE__ */ jsx("div", {
918
+ children: [renderConditional(title, (v) => /* @__PURE__ */ jsx("div", {
539
919
  className: cn("mb-4 font-bold", classNames?.title),
540
- children: title
541
- }), /* @__PURE__ */ jsx("div", {
920
+ children: v
921
+ })), /* @__PURE__ */ jsx("div", {
542
922
  className: cn(classNames?.body),
543
923
  children
544
924
  })]
@@ -546,40 +926,9 @@ const Card = ({ title, children, className, classNames, variant = "outlined", ..
546
926
  };
547
927
  var Card_default = Card;
548
928
 
549
- //#endregion
550
- //#region src/core/accordion.tsx
551
- const Accordion = AccordionPrimitive.Root;
552
- const AccordionItem = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Item, {
553
- ref,
554
- className: cn("border-b", className),
555
- ...props
556
- }));
557
- AccordionItem.displayName = "AccordionItem";
558
- const AccordionTrigger = React$1.forwardRef(({ expandIcon, className, children, ...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Header, {
559
- className: "flex",
560
- children: /* @__PURE__ */ jsxs(AccordionPrimitive.Trigger, {
561
- ref,
562
- className: cn(`flex flex-1 items-center justify-between py-4 text-left text-sm
563
- font-medium transition-all hover:underline
564
- [&[data-state=open]>svg]:rotate-180`, className),
565
- ...props,
566
- children: [children, expandIcon || /* @__PURE__ */ jsx(ChevronDown, { className: "text-muted-foreground h-4 w-4 shrink-0 transition-transform\n duration-200" })]
567
- })
568
- }));
569
- AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
570
- const AccordionContent = React$1.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Content, {
571
- ref,
572
- className: "data-[state=closed]:animate-accordion-up\n data-[state=open]:animate-accordion-down overflow-hidden text-sm",
573
- ...props,
574
- children: /* @__PURE__ */ jsx("div", {
575
- className: cn("pt-0 pb-4", className),
576
- children
577
- })
578
- }));
579
- AccordionContent.displayName = AccordionPrimitive.Content.displayName;
580
-
581
929
  //#endregion
582
930
  //#region src/components/molecules/Collapse/index.tsx
931
+ const { Accordion, AccordionItem, AccordionTrigger, AccordionContent } = accordion_exports;
583
932
  const Collapse = ({ expandIcon, accordion = false, items: _items = [], className, classNames, defaultActiveKey }) => {
584
933
  const [items, setItems] = useState([]);
585
934
  useEffect(() => {
@@ -4680,93 +5029,9 @@ const Space = ({ loading, loader, children, size = "middle", orientation = "hori
4680
5029
  };
4681
5030
  var Space_default = Space;
4682
5031
 
4683
- //#endregion
4684
- //#region src/core/drawer.tsx
4685
- function Drawer$2({ ...props }) {
4686
- return /* @__PURE__ */ jsx(Drawer.Root, {
4687
- "data-slot": "drawer",
4688
- ...props
4689
- });
4690
- }
4691
- function DrawerPortal({ ...props }) {
4692
- return /* @__PURE__ */ jsx(Drawer.Portal, {
4693
- "data-slot": "drawer-portal",
4694
- ...props
4695
- });
4696
- }
4697
- function DrawerOverlay({ className, ...props }) {
4698
- return /* @__PURE__ */ jsx(Drawer.Overlay, {
4699
- "data-slot": "drawer-overlay",
4700
- className: cn(`data-[state=open]:animate-in data-[state=closed]:animate-out
4701
- data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0
4702
- z-50 bg-black/50`, className),
4703
- ...props
4704
- });
4705
- }
4706
- function DrawerContent({ className, classNames = {}, handlebar, mask, children, ...props }) {
4707
- return /* @__PURE__ */ jsxs(DrawerPortal, {
4708
- "data-slot": "drawer-portal",
4709
- children: [/* @__PURE__ */ jsx(DrawerOverlay, { className: cn(classNames?.mask, !mask && "hidden") }), /* @__PURE__ */ jsxs(Drawer.Content, {
4710
- "data-slot": "drawer-content",
4711
- className: cn("group/drawer-content bg-background fixed z-50 flex h-auto flex-col", `data-[vaul-drawer-direction=top]:inset-x-0
4712
- data-[vaul-drawer-direction=top]:top-0
4713
- data-[vaul-drawer-direction=top]:mb-24
4714
- data-[vaul-drawer-direction=top]:max-h-[80vh]
4715
- data-[vaul-drawer-direction=top]:rounded-b-lg
4716
- data-[vaul-drawer-direction=top]:border-b`, `data-[vaul-drawer-direction=bottom]:inset-x-0
4717
- data-[vaul-drawer-direction=bottom]:bottom-0
4718
- data-[vaul-drawer-direction=bottom]:mt-24
4719
- data-[vaul-drawer-direction=bottom]:max-h-[80vh]
4720
- data-[vaul-drawer-direction=bottom]:rounded-t-lg
4721
- data-[vaul-drawer-direction=bottom]:border-t`, `data-[vaul-drawer-direction=right]:inset-y-0
4722
- data-[vaul-drawer-direction=right]:right-0
4723
- data-[vaul-drawer-direction=right]:w-3/4
4724
- data-[vaul-drawer-direction=right]:border-l
4725
- data-[vaul-drawer-direction=right]:sm:max-w-sm`, `data-[vaul-drawer-direction=left]:inset-y-0
4726
- data-[vaul-drawer-direction=left]:left-0
4727
- data-[vaul-drawer-direction=left]:w-3/4
4728
- data-[vaul-drawer-direction=left]:border-r
4729
- data-[vaul-drawer-direction=left]:sm:max-w-sm`, className),
4730
- ...props,
4731
- children: [/* @__PURE__ */ jsx("div", { className: cn(`bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full
4732
- group-data-[vaul-drawer-direction=bottom]/drawer-content:block`, classNames?.handlebar, !handlebar && "hidden") }), children]
4733
- })]
4734
- });
4735
- }
4736
- function DrawerHeader({ className, ...props }) {
4737
- return /* @__PURE__ */ jsx("div", {
4738
- "data-slot": "drawer-header",
4739
- className: cn(`flex flex-col gap-0.5 p-4
4740
- group-data-[vaul-drawer-direction=bottom]/drawer-content:text-center
4741
- group-data-[vaul-drawer-direction=top]/drawer-content:text-center
4742
- md:gap-1.5 md:text-left`, className),
4743
- ...props
4744
- });
4745
- }
4746
- function DrawerFooter({ className, ...props }) {
4747
- return /* @__PURE__ */ jsx("div", {
4748
- "data-slot": "drawer-footer",
4749
- className: cn("mt-auto flex flex-col gap-2 p-4", className),
4750
- ...props
4751
- });
4752
- }
4753
- function DrawerTitle({ className, ...props }) {
4754
- return /* @__PURE__ */ jsx(Drawer.Title, {
4755
- "data-slot": "drawer-title",
4756
- className: cn("text-foreground font-semibold", className),
4757
- ...props
4758
- });
4759
- }
4760
- function DrawerDescription({ className, ...props }) {
4761
- return /* @__PURE__ */ jsx(Drawer.Description, {
4762
- "data-slot": "drawer-description",
4763
- className: cn("text-muted-foreground text-sm", className),
4764
- ...props
4765
- });
4766
- }
4767
-
4768
5032
  //#endregion
4769
5033
  //#region src/components/organisms/Drawer/index.tsx
5034
+ const { DrawerContent, Drawer: DrawerCore, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle } = drawer_exports;
4770
5035
  const Drawer$1 = ({ open, title, footer, closable = true, closeIcon, direction = "bottom", maskClosable = true, handlebar = true, draggable = false, rounded = false, mask = true, className, classNames, style, children, container, onClose, ...props }) => {
4771
5036
  useEffect(() => {
4772
5037
  if (!open) return;
@@ -4782,7 +5047,7 @@ const Drawer$1 = ({ open, title, footer, closable = true, closeIcon, direction =
4782
5047
  }
4783
5048
  }, [open, mask]);
4784
5049
  if (typeof window === "undefined") return null;
4785
- return /* @__PURE__ */ jsx(Drawer$2, {
5050
+ return /* @__PURE__ */ jsx(DrawerCore, {
4786
5051
  open,
4787
5052
  direction,
4788
5053
  handleOnly: !draggable,
@@ -4805,21 +5070,21 @@ const Drawer$1 = ({ open, title, footer, closable = true, closeIcon, direction =
4805
5070
  className: cn(classNames?.header, !title && "p-0"),
4806
5071
  children: [/* @__PURE__ */ jsxs(DrawerTitle, {
4807
5072
  className: cn("flex justify-between", classNames?.title),
4808
- children: [/* @__PURE__ */ jsx("span", { children: title }), closable && /* @__PURE__ */ jsx("span", {
4809
- className: cn("absolute right-5 top-3 cursor-pointer", classNames?.close),
5073
+ children: [/* @__PURE__ */ jsx("span", { children: title }), renderConditional(closable ? closeIcon || /* @__PURE__ */ jsx(X, {}) : null, (v) => /* @__PURE__ */ jsx("span", {
5074
+ className: cn("absolute top-3 right-5 cursor-pointer", classNames?.close),
4810
5075
  onClick: onClose,
4811
- children: closeIcon || /* @__PURE__ */ jsx(X, {})
4812
- })]
5076
+ children: v
5077
+ }))]
4813
5078
  }), /* @__PURE__ */ jsx(DrawerDescription, { className: "hidden" })]
4814
5079
  }),
4815
5080
  /* @__PURE__ */ jsx("div", {
4816
5081
  className: cn("overflow-auto p-5", classNames?.body),
4817
5082
  children
4818
5083
  }),
4819
- footer && /* @__PURE__ */ jsx(DrawerFooter, {
5084
+ renderConditional(footer, (v) => /* @__PURE__ */ jsx(DrawerFooter, {
4820
5085
  className: cn(classNames?.footer),
4821
- children: footer
4822
- })
5086
+ children: v
5087
+ }))
4823
5088
  ]
4824
5089
  })
4825
5090
  });
@@ -4877,10 +5142,10 @@ const List = ({ loading, loaderProps, loader, header, title, empty, scroll, data
4877
5142
  className: cn(className),
4878
5143
  ...props,
4879
5144
  children: [
4880
- /* @__PURE__ */ jsx("div", {
4881
- className: cn(classNames?.title),
4882
- children: title
4883
- }),
5145
+ renderConditional(title, (v) => /* @__PURE__ */ jsx("h2", {
5146
+ className: cn("px-1.5 py-4", "text-black-90 text-lg leading-5.75 font-bold"),
5147
+ children: v
5148
+ })),
4884
5149
  /* @__PURE__ */ jsx("div", {
4885
5150
  className: cn(classNames?.header),
4886
5151
  children: header
@@ -4903,86 +5168,9 @@ const List = ({ loading, loaderProps, loader, header, title, empty, scroll, data
4903
5168
  List.Item = Item_default;
4904
5169
  var List_default = List;
4905
5170
 
4906
- //#endregion
4907
- //#region src/core/dialog.tsx
4908
- function Dialog({ ...props }) {
4909
- return /* @__PURE__ */ jsx(DialogPrimitive.Root, {
4910
- "data-slot": "dialog",
4911
- ...props
4912
- });
4913
- }
4914
- function DialogPortal({ ...props }) {
4915
- return /* @__PURE__ */ jsx(DialogPrimitive.Portal, {
4916
- "data-slot": "dialog-portal",
4917
- ...props
4918
- });
4919
- }
4920
- function DialogOverlay({ className, ...props }) {
4921
- return /* @__PURE__ */ jsx(DialogPrimitive.Overlay, {
4922
- "data-slot": "dialog-overlay",
4923
- className: cn(`data-[state=open]:animate-in data-[state=closed]:animate-out
4924
- data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0
4925
- z-50 bg-black/50`, className),
4926
- ...props
4927
- });
4928
- }
4929
- function DialogContent({ className, children, showCloseButton = true, classNames, closeIcon, closable, container, onCancel, ...props }) {
4930
- return /* @__PURE__ */ jsxs(DialogPortal, {
4931
- "data-slot": "dialog-portal",
4932
- container,
4933
- children: [/* @__PURE__ */ jsx(DialogOverlay, { className: cn(classNames?.mask) }), /* @__PURE__ */ jsxs(DialogPrimitive.Content, {
4934
- "data-slot": "dialog-content",
4935
- className: cn(`bg-background data-[state=open]:animate-in
4936
- data-[state=closed]:animate-out data-[state=closed]:fade-out-0
4937
- data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95
4938
- data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid
4939
- w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%]
4940
- gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg`, className),
4941
- ...props,
4942
- children: [children, showCloseButton && /* @__PURE__ */ jsxs(DialogPrimitive.Close, {
4943
- "data-slot": "dialog-close",
4944
- className: "ring-offset-background focus:ring-ring\n data-[state=open]:bg-accent\n data-[state=open]:text-muted-foreground absolute top-4 right-4\n rounded-xs opacity-70 transition-opacity hover:opacity-100\n focus:ring-2 focus:ring-offset-2 focus:outline-hidden\n disabled:pointer-events-none [&_svg]:pointer-events-none\n [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
4945
- disabled: typeof closable === "object" && closable.disabled,
4946
- onClick: onCancel,
4947
- children: [closeIcon || /* @__PURE__ */ jsx(XIcon, {}), /* @__PURE__ */ jsx("span", {
4948
- className: "sr-only",
4949
- children: "Close"
4950
- })]
4951
- })]
4952
- })]
4953
- });
4954
- }
4955
- function DialogHeader({ className, ...props }) {
4956
- return /* @__PURE__ */ jsx("div", {
4957
- "data-slot": "dialog-header",
4958
- className: cn("flex flex-col gap-2 text-center sm:text-left", className),
4959
- ...props
4960
- });
4961
- }
4962
- function DialogFooter({ className, ...props }) {
4963
- return /* @__PURE__ */ jsx("div", {
4964
- "data-slot": "dialog-footer",
4965
- className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
4966
- ...props
4967
- });
4968
- }
4969
- function DialogTitle({ className, ...props }) {
4970
- return /* @__PURE__ */ jsx(DialogPrimitive.Title, {
4971
- "data-slot": "dialog-title",
4972
- className: cn("text-lg leading-none font-semibold", className),
4973
- ...props
4974
- });
4975
- }
4976
- function DialogDescription({ className, ...props }) {
4977
- return /* @__PURE__ */ jsx(DialogPrimitive.Description, {
4978
- "data-slot": "dialog-description",
4979
- className: cn("text-muted-foreground text-sm", className),
4980
- ...props
4981
- });
4982
- }
4983
-
4984
5171
  //#endregion
4985
5172
  //#region src/components/organisms/Modal/index.tsx
5173
+ const { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle } = dialog_exports;
4986
5174
  const isBrowser = typeof window !== "undefined" && typeof document !== "undefined";
4987
5175
  let modalRoot = null;
4988
5176
  let modalStack = [];