@jbpark/ui-kit 2.1.0 → 2.2.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,8 +1,7 @@
1
1
  import { n as renderConditional, t as cn } from "./utils-CssUrKWE.mjs";
2
- import { t as Typography_default } from "./Typography-DJSakhLz.mjs";
3
- import { ArrowUp, Check, ChevronDown, CircleQuestionMark, CircleX, Info, Loader2, LoaderCircle, OctagonAlert, OctagonX, Search, Square, SquareCheck, X, XIcon } from "lucide-react";
4
- import * as React$1 from "react";
5
- import React, { Children, createElement, forwardRef, useEffect, useId, useMemo, useRef, useState } from "react";
2
+ import { t as Typography_default } from "./Typography-GMk9208W.mjs";
3
+ import { ArrowUp, Check, CheckIcon, ChevronDown, ChevronDownIcon, ChevronUpIcon, CircleIcon, CircleQuestionMark, CircleX, Info, Loader2, LoaderCircle, OctagonAlert, OctagonX, Search, Square, SquareCheck, X, XIcon } from "lucide-react";
4
+ import React, { Children, createElement, useEffect, useId, useMemo, useRef, useState } from "react";
6
5
  import * as AccordionPrimitive from "@radix-ui/react-accordion";
7
6
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
8
7
  import { Slot } from "@radix-ui/react-slot";
@@ -13,7 +12,9 @@ import { Drawer } from "vaul";
13
12
  import * as LabelPrimitive from "@radix-ui/react-label";
14
13
  import * as PopoverPrimitive from "@radix-ui/react-popover";
15
14
  import * as ProgressPrimitive from "@radix-ui/react-progress";
15
+ import { RadioGroup, Select } from "radix-ui";
16
16
  import * as SwitchPrimitive from "@radix-ui/react-switch";
17
+ import { HexColorPicker } from "react-colorful";
17
18
  import { useIntersectionObserver, useThrottle, useWindowScroll } from "@uidotdev/usehooks";
18
19
  import { AnimatePresence, motion } from "motion/react";
19
20
  import { useResponsiveSize } from "@jbpark/use-hooks";
@@ -53,53 +54,67 @@ var accordion_exports = /* @__PURE__ */ __exportAll({
53
54
  AccordionItem: () => AccordionItem$1,
54
55
  AccordionTrigger: () => AccordionTrigger$1
55
56
  });
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),
57
+ function Accordion$1({ ...props }) {
58
+ return /* @__PURE__ */ jsx(AccordionPrimitive.Root, {
59
+ "data-slot": "accordion",
60
+ ...props
61
+ });
62
+ }
63
+ function AccordionItem$1({ className, ...props }) {
64
+ return /* @__PURE__ */ jsx(AccordionPrimitive.Item, {
65
+ "data-slot": "accordion-item",
66
+ className: cn("border-b last:border-b-0", className),
67
+ ...props
68
+ });
69
+ }
70
+ function AccordionTrigger$1({ className, children, expandIcon, ...props }) {
71
+ return /* @__PURE__ */ jsx(AccordionPrimitive.Header, {
72
+ className: "flex",
73
+ children: /* @__PURE__ */ jsxs(AccordionPrimitive.Trigger, {
74
+ "data-slot": "accordion-trigger",
75
+ className: cn(`focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1
76
+ items-start justify-between gap-4 rounded-md py-4 text-left text-sm
77
+ font-medium transition-all outline-none hover:underline
78
+ focus-visible:ring-[3px] disabled:pointer-events-none
79
+ disabled:opacity-50 [&[data-state=open]>svg]:rotate-180`, className),
80
+ ...props,
81
+ children: [children, expandIcon || /* @__PURE__ */ jsx(ChevronDownIcon, { className: "text-muted-foreground pointer-events-none size-4 shrink-0\n translate-y-0.5 transition-transform duration-200" })]
82
+ })
83
+ });
84
+ }
85
+ function AccordionContent$1({ className, children, ...props }) {
86
+ return /* @__PURE__ */ jsx(AccordionPrimitive.Content, {
87
+ "data-slot": "accordion-content",
88
+ className: "data-[state=closed]:animate-accordion-up\n data-[state=open]:animate-accordion-down overflow-hidden text-sm",
70
89
  ...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;
90
+ children: /* @__PURE__ */ jsx("div", {
91
+ className: cn("pt-0 pb-4", className),
92
+ children
93
+ })
94
+ });
95
+ }
85
96
 
86
97
  //#endregion
87
98
  //#region src/core/button.tsx
88
99
  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", {
89
100
  variants: {
90
101
  variant: {
91
- default: "bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",
92
- destructive: "bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
102
+ default: "bg-primary text-primary-foreground hover:bg-primary/90",
103
+ destructive: "bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
93
104
  outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
94
- secondary: "bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",
105
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
95
106
  ghost: "hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
96
107
  link: "text-primary underline-offset-4 hover:underline"
97
108
  },
98
109
  size: {
99
110
  default: "h-9 px-4 py-2 has-[>svg]:px-3",
111
+ xs: "h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",
100
112
  sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
101
113
  lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
102
- icon: "size-9"
114
+ icon: "size-9",
115
+ "icon-xs": "size-6 rounded-md [&_svg:not([class*='size-'])]:size-3",
116
+ "icon-sm": "size-8",
117
+ "icon-lg": "size-10"
103
118
  }
104
119
  },
105
120
  defaultVariants: {
@@ -107,9 +122,11 @@ const buttonVariants = cva("inline-flex items-center justify-center gap-2 whites
107
122
  size: "default"
108
123
  }
109
124
  });
110
- function Button$2({ className, variant, size, asChild = false, ...props }) {
125
+ function Button$2({ className, variant = "default", size = "default", asChild = false, ...props }) {
111
126
  return /* @__PURE__ */ jsx(asChild ? Slot : "button", {
112
127
  "data-slot": "button",
128
+ "data-variant": variant,
129
+ "data-size": size,
113
130
  className: cn(buttonVariants({
114
131
  variant,
115
132
  size,
@@ -122,21 +139,25 @@ function Button$2({ className, variant, size, asChild = false, ...props }) {
122
139
  //#endregion
123
140
  //#region src/core/checkbox.tsx
124
141
  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;
142
+ function Checkbox$1({ className, ...props }) {
143
+ return /* @__PURE__ */ jsx(CheckboxPrimitive.Root, {
144
+ "data-slot": "checkbox",
145
+ className: cn(`peer border-input dark:bg-input/30 data-[state=checked]:bg-primary
146
+ data-[state=checked]:text-primary-foreground
147
+ dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary
148
+ focus-visible:border-ring focus-visible:ring-ring/50
149
+ aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40
150
+ aria-invalid:border-destructive size-4 shrink-0 rounded-sm border
151
+ shadow-xs transition-shadow outline-none focus-visible:ring-[3px]
152
+ disabled:cursor-not-allowed disabled:opacity-50`, className),
153
+ ...props,
154
+ children: /* @__PURE__ */ jsx(CheckboxPrimitive.Indicator, {
155
+ "data-slot": "checkbox-indicator",
156
+ className: "grid place-content-center text-current transition-none",
157
+ children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-3.5" })
158
+ })
159
+ });
160
+ }
140
161
 
141
162
  //#endregion
142
163
  //#region src/core/dialog.tsx
@@ -185,7 +206,17 @@ function DialogOverlay({ className, ...props }) {
185
206
  ...props
186
207
  });
187
208
  }
188
- function DialogContent$1({ className, children, showCloseButton = true, classNames, closeIcon, closable, container, onCancel, ...props }) {
209
+ function DialogContent$1({ className, children, classNames, closeIcon: _closeIcon, closable, container, onCancel, ...props }) {
210
+ const closeIcon = /* @__PURE__ */ jsxs(DialogPrimitive.Close, {
211
+ "data-slot": "dialog-close",
212
+ className: "ring-offset-background focus:ring-ring\n data-[state=open]:bg-accent data-[state=open]:text-muted-foreground\n absolute top-4 right-4 rounded-xs opacity-70 transition-opacity\n hover:opacity-100 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",
213
+ disabled: typeof closable === "object" && closable.disabled,
214
+ onClick: onCancel,
215
+ children: [_closeIcon || /* @__PURE__ */ jsx(XIcon, {}), /* @__PURE__ */ jsx("span", {
216
+ className: "sr-only",
217
+ children: "Close"
218
+ })]
219
+ });
189
220
  return /* @__PURE__ */ jsxs(DialogPortal, {
190
221
  "data-slot": "dialog-portal",
191
222
  container,
@@ -196,18 +227,10 @@ function DialogContent$1({ className, children, showCloseButton = true, classNam
196
227
  data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95
197
228
  data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid
198
229
  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),
230
+ gap-4 rounded-lg border p-6 shadow-lg duration-200 outline-none
231
+ sm:max-w-lg`, className),
200
232
  ...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
- })]
233
+ children: [children, closable && closeIcon]
211
234
  })]
212
235
  });
213
236
  }
@@ -218,11 +241,18 @@ function DialogHeader$1({ className, ...props }) {
218
241
  ...props
219
242
  });
220
243
  }
221
- function DialogFooter$1({ className, ...props }) {
222
- return /* @__PURE__ */ jsx("div", {
244
+ function DialogFooter$1({ className, showCloseButton = false, children, ...props }) {
245
+ return /* @__PURE__ */ jsxs("div", {
223
246
  "data-slot": "dialog-footer",
224
247
  className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
225
- ...props
248
+ ...props,
249
+ children: [children, showCloseButton && /* @__PURE__ */ jsx(DialogPrimitive.Close, {
250
+ asChild: true,
251
+ children: /* @__PURE__ */ jsx(Button_default$1, {
252
+ variant: "outlined",
253
+ children: "Close"
254
+ })
255
+ })]
226
256
  });
227
257
  }
228
258
  function DialogTitle$1({ className, ...props }) {
@@ -254,9 +284,10 @@ var drawer_exports = /* @__PURE__ */ __exportAll({
254
284
  DrawerTitle: () => DrawerTitle$1,
255
285
  DrawerTrigger: () => DrawerTrigger
256
286
  });
257
- function Drawer$2({ ...props }) {
287
+ function Drawer$2({ draggable, ...props }) {
258
288
  return /* @__PURE__ */ jsx(Drawer.Root, {
259
289
  "data-slot": "drawer",
290
+ handleOnly: !draggable,
260
291
  ...props
261
292
  });
262
293
  }
@@ -287,10 +318,10 @@ function DrawerOverlay({ className, ...props }) {
287
318
  ...props
288
319
  });
289
320
  }
290
- function DrawerContent$1({ className, classNames = {}, handlebar, mask, children, ...props }) {
321
+ function DrawerContent$1({ className, children, classNames = {}, handlebar, mask, ...props }) {
291
322
  return /* @__PURE__ */ jsxs(DrawerPortal, {
292
323
  "data-slot": "drawer-portal",
293
- children: [/* @__PURE__ */ jsx(DrawerOverlay, { className: cn(classNames?.mask, !mask && "hidden") }), /* @__PURE__ */ jsxs(Drawer.Content, {
324
+ children: [/* @__PURE__ */ jsx(DrawerOverlay, { className: cn(classNames?.mask || "", !mask && "hidden") }), /* @__PURE__ */ jsxs(Drawer.Content, {
294
325
  "data-slot": "drawer-content",
295
326
  className: cn("group/drawer-content bg-background fixed z-50 flex h-auto flex-col", `data-[vaul-drawer-direction=top]:inset-x-0
296
327
  data-[vaul-drawer-direction=top]:top-0
@@ -312,8 +343,8 @@ function DrawerContent$1({ className, classNames = {}, handlebar, mask, children
312
343
  data-[vaul-drawer-direction=left]:border-r
313
344
  data-[vaul-drawer-direction=left]:sm:max-w-sm`, className),
314
345
  ...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]
346
+ children: [handlebar && /* @__PURE__ */ jsx("div", { className: cn(`bg-muted mx-auto mt-4 hidden h-2 w-25 shrink-0 rounded-full
347
+ group-data-[vaul-drawer-direction=bottom]/drawer-content:block`, classNames?.handlebar) }), children]
317
348
  })]
318
349
  });
319
350
  }
@@ -352,31 +383,36 @@ function DrawerDescription$1({ className, ...props }) {
352
383
  //#endregion
353
384
  //#region src/core/input.tsx
354
385
  var input_exports = /* @__PURE__ */ __exportAll({ Input: () => Input$1 });
355
- const Input$1 = React$1.forwardRef(({ className, type, ...props }, ref) => {
386
+ function Input$1({ className, type, ...props }) {
356
387
  return /* @__PURE__ */ jsx("input", {
357
388
  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,
389
+ "data-slot": "input",
390
+ className: cn(`file:text-foreground placeholder:text-muted-foreground
391
+ selection:bg-primary selection:text-primary-foreground dark:bg-input/30
392
+ border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3
393
+ py-1 text-base shadow-xs transition-[color,box-shadow] outline-none
394
+ file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm
395
+ file:font-medium disabled:pointer-events-none
396
+ disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`, `focus-visible:border-ring focus-visible:ring-ring/50
397
+ focus-visible:ring-[3px]`, `aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40
398
+ aria-invalid:border-destructive`, className),
365
399
  ...props
366
400
  });
367
- });
368
- Input$1.displayName = "Input";
401
+ }
369
402
 
370
403
  //#endregion
371
404
  //#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;
405
+ var label_exports = /* @__PURE__ */ __exportAll({ Label: () => Label$2 });
406
+ function Label$2({ className, ...props }) {
407
+ return /* @__PURE__ */ jsx(LabelPrimitive.Root, {
408
+ "data-slot": "label",
409
+ className: cn(`flex items-center gap-2 text-sm leading-none font-medium select-none
410
+ group-data-[disabled=true]:pointer-events-none
411
+ group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed
412
+ peer-disabled:opacity-50`, className),
413
+ ...props
414
+ });
415
+ }
380
416
 
381
417
  //#endregion
382
418
  //#region src/core/popover.tsx
@@ -384,44 +420,251 @@ var popover_exports = /* @__PURE__ */ __exportAll({
384
420
  Popover: () => Popover$1,
385
421
  PopoverAnchor: () => PopoverAnchor,
386
422
  PopoverContent: () => PopoverContent$1,
423
+ PopoverDescription: () => PopoverDescription,
424
+ PopoverHeader: () => PopoverHeader,
425
+ PopoverTitle: () => PopoverTitle,
387
426
  PopoverTrigger: () => PopoverTrigger$1
388
427
  });
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;
428
+ function Popover$1({ ...props }) {
429
+ return /* @__PURE__ */ jsx(PopoverPrimitive.Root, {
430
+ "data-slot": "popover",
431
+ ...props
432
+ });
433
+ }
434
+ function PopoverTrigger$1({ ...props }) {
435
+ return /* @__PURE__ */ jsx(PopoverPrimitive.Trigger, {
436
+ "data-slot": "popover-trigger",
437
+ ...props
438
+ });
439
+ }
440
+ function PopoverContent$1({ className, align = "center", sideOffset = 4, ...props }) {
441
+ return /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(PopoverPrimitive.Content, {
442
+ "data-slot": "popover-content",
443
+ align,
444
+ sideOffset,
445
+ className: cn(`bg-popover text-popover-foreground data-[state=open]:animate-in
446
+ data-[state=closed]:animate-out data-[state=closed]:fade-out-0
447
+ data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95
448
+ data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2
449
+ data-[side=left]:slide-in-from-right-2
450
+ data-[side=right]:slide-in-from-left-2
451
+ data-[side=top]:slide-in-from-bottom-2 z-50 w-72
452
+ origin-(--radix-popover-content-transform-origin) rounded-md border
453
+ p-4 shadow-md outline-hidden`, className),
454
+ ...props
455
+ }) });
456
+ }
457
+ function PopoverAnchor({ ...props }) {
458
+ return /* @__PURE__ */ jsx(PopoverPrimitive.Anchor, {
459
+ "data-slot": "popover-anchor",
460
+ ...props
461
+ });
462
+ }
463
+ function PopoverHeader({ className, ...props }) {
464
+ return /* @__PURE__ */ jsx("div", {
465
+ "data-slot": "popover-header",
466
+ className: cn("flex flex-col gap-1 text-sm", className),
467
+ ...props
468
+ });
469
+ }
470
+ function PopoverTitle({ className, ...props }) {
471
+ return /* @__PURE__ */ jsx("div", {
472
+ "data-slot": "popover-title",
473
+ className: cn("font-medium", className),
474
+ ...props
475
+ });
476
+ }
477
+ function PopoverDescription({ className, ...props }) {
478
+ return /* @__PURE__ */ jsx("p", {
479
+ "data-slot": "popover-description",
480
+ className: cn("text-muted-foreground", className),
481
+ ...props
482
+ });
483
+ }
408
484
 
409
485
  //#endregion
410
486
  //#region src/core/progress.tsx
411
487
  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;
488
+ function Progress$1({ className, value, barClassName, barStyle, ...props }) {
489
+ return /* @__PURE__ */ jsx(ProgressPrimitive.Root, {
490
+ "data-slot": "progress",
491
+ className: cn("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full", className),
492
+ ...props,
493
+ children: /* @__PURE__ */ jsx(ProgressPrimitive.Indicator, {
494
+ "data-slot": "progress-indicator",
495
+ className: cn("bg-primary h-full w-full flex-1 transition-all", barClassName),
496
+ style: {
497
+ transform: `translateX(-${100 - (value || 0)}%)`,
498
+ ...barStyle
499
+ }
500
+ })
501
+ });
502
+ }
503
+
504
+ //#endregion
505
+ //#region src/core/radio-group.tsx
506
+ var radio_group_exports = /* @__PURE__ */ __exportAll({
507
+ RadioGroup: () => RadioGroup$1,
508
+ RadioGroupItem: () => RadioGroupItem
509
+ });
510
+ function RadioGroup$1({ className, ...props }) {
511
+ return /* @__PURE__ */ jsx(RadioGroup.Root, {
512
+ "data-slot": "radio-group",
513
+ className: cn("grid gap-3", className),
514
+ ...props
515
+ });
516
+ }
517
+ function RadioGroupItem({ className, ...props }) {
518
+ return /* @__PURE__ */ jsx(RadioGroup.Item, {
519
+ "data-slot": "radio-group-item",
520
+ className: cn(`border-input text-primary focus-visible:border-ring
521
+ focus-visible:ring-ring/50 aria-invalid:ring-destructive/20
522
+ dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive
523
+ dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border
524
+ shadow-xs transition-[color,box-shadow] outline-none
525
+ focus-visible:ring-[3px] disabled:cursor-not-allowed
526
+ disabled:opacity-50`, className),
527
+ ...props,
528
+ children: /* @__PURE__ */ jsx(RadioGroup.Indicator, {
529
+ "data-slot": "radio-group-indicator",
530
+ className: "relative flex items-center justify-center",
531
+ children: /* @__PURE__ */ jsx(CircleIcon, { className: "fill-primary absolute top-1/2 left-1/2 size-2\n -translate-x-1/2 -translate-y-1/2" })
532
+ })
533
+ });
534
+ }
535
+
536
+ //#endregion
537
+ //#region src/core/select.tsx
538
+ var select_exports = /* @__PURE__ */ __exportAll({
539
+ Select: () => Select$2,
540
+ SelectContent: () => SelectContent$1,
541
+ SelectGroup: () => SelectGroup$1,
542
+ SelectItem: () => SelectItem$1,
543
+ SelectLabel: () => SelectLabel$1,
544
+ SelectScrollDownButton: () => SelectScrollDownButton,
545
+ SelectScrollUpButton: () => SelectScrollUpButton,
546
+ SelectSeparator: () => SelectSeparator,
547
+ SelectTrigger: () => SelectTrigger$1,
548
+ SelectValue: () => SelectValue$1
549
+ });
550
+ function Select$2({ ...props }) {
551
+ return /* @__PURE__ */ jsx(Select.Root, {
552
+ "data-slot": "select",
553
+ ...props
554
+ });
555
+ }
556
+ function SelectGroup$1({ ...props }) {
557
+ return /* @__PURE__ */ jsx(Select.Group, {
558
+ "data-slot": "select-group",
559
+ ...props
560
+ });
561
+ }
562
+ function SelectValue$1({ ...props }) {
563
+ return /* @__PURE__ */ jsx(Select.Value, {
564
+ "data-slot": "select-value",
565
+ ...props
566
+ });
567
+ }
568
+ function SelectTrigger$1({ className, size = "default", children, ...props }) {
569
+ return /* @__PURE__ */ jsxs(Select.Trigger, {
570
+ "data-slot": "select-trigger",
571
+ "data-size": size,
572
+ className: cn(`border-input data-[placeholder]:text-muted-foreground
573
+ [&_svg:not([class*='text-'])]:text-muted-foreground
574
+ focus-visible:border-ring focus-visible:ring-ring/50
575
+ aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40
576
+ aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50
577
+ flex w-fit items-center justify-between gap-2 rounded-md border
578
+ bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs
579
+ transition-[color,box-shadow] outline-none focus-visible:ring-[3px]
580
+ disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9
581
+ data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1
582
+ *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center
583
+ *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none
584
+ [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`, className),
585
+ ...props,
586
+ children: [children, /* @__PURE__ */ jsx(Select.Icon, {
587
+ asChild: true,
588
+ children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4 opacity-50" })
589
+ })]
590
+ });
591
+ }
592
+ function SelectContent$1({ className, children, position = "item-aligned", align = "center", ...props }) {
593
+ return /* @__PURE__ */ jsx(Select.Portal, { children: /* @__PURE__ */ jsxs(Select.Content, {
594
+ "data-slot": "select-content",
595
+ className: cn(`bg-popover text-popover-foreground data-[state=open]:animate-in
596
+ data-[state=closed]:animate-out data-[state=closed]:fade-out-0
597
+ data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95
598
+ data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2
599
+ data-[side=left]:slide-in-from-right-2
600
+ data-[side=right]:slide-in-from-left-2
601
+ data-[side=top]:slide-in-from-bottom-2 relative z-50
602
+ max-h-(--radix-select-content-available-height) min-w-[8rem]
603
+ origin-(--radix-select-content-transform-origin) overflow-x-hidden
604
+ overflow-y-auto rounded-md border shadow-md`, position === "popper" && `data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1
605
+ data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`, className),
606
+ position,
607
+ align,
608
+ ...props,
609
+ children: [
610
+ /* @__PURE__ */ jsx(SelectScrollUpButton, {}),
611
+ /* @__PURE__ */ jsx(Select.Viewport, {
612
+ className: cn("p-1", position === "popper" && `h-[var(--radix-select-trigger-height)] w-full
613
+ min-w-[var(--radix-select-trigger-width)] scroll-my-1`),
614
+ children
615
+ }),
616
+ /* @__PURE__ */ jsx(SelectScrollDownButton, {})
617
+ ]
618
+ }) });
619
+ }
620
+ function SelectLabel$1({ className, ...props }) {
621
+ return /* @__PURE__ */ jsx(Select.Label, {
622
+ "data-slot": "select-label",
623
+ className: cn("text-muted-foreground px-2 py-1.5 text-xs", className),
624
+ ...props
625
+ });
626
+ }
627
+ function SelectItem$1({ className, children, ...props }) {
628
+ return /* @__PURE__ */ jsxs(Select.Item, {
629
+ "data-slot": "select-item",
630
+ className: cn(`focus:bg-accent focus:text-accent-foreground
631
+ [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full
632
+ cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm
633
+ outline-hidden select-none data-[disabled]:pointer-events-none
634
+ data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0
635
+ [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex
636
+ *:[span]:last:items-center *:[span]:last:gap-2`, className),
637
+ ...props,
638
+ children: [/* @__PURE__ */ jsx("span", {
639
+ "data-slot": "select-item-indicator",
640
+ className: "absolute right-2 flex size-3.5 items-center justify-center",
641
+ children: /* @__PURE__ */ jsx(Select.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) })
642
+ }), /* @__PURE__ */ jsx(Select.ItemText, { children })]
643
+ });
644
+ }
645
+ function SelectSeparator({ className, ...props }) {
646
+ return /* @__PURE__ */ jsx(Select.Separator, {
647
+ "data-slot": "select-separator",
648
+ className: cn("bg-border pointer-events-none -mx-1 my-1 h-px", className),
649
+ ...props
650
+ });
651
+ }
652
+ function SelectScrollUpButton({ className, ...props }) {
653
+ return /* @__PURE__ */ jsx(Select.ScrollUpButton, {
654
+ "data-slot": "select-scroll-up-button",
655
+ className: cn("flex cursor-default items-center justify-center py-1", className),
656
+ ...props,
657
+ children: /* @__PURE__ */ jsx(ChevronUpIcon, { className: "size-4" })
658
+ });
659
+ }
660
+ function SelectScrollDownButton({ className, ...props }) {
661
+ return /* @__PURE__ */ jsx(Select.ScrollDownButton, {
662
+ "data-slot": "select-scroll-down-button",
663
+ className: cn("flex cursor-default items-center justify-center py-1", className),
664
+ ...props,
665
+ children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4" })
666
+ });
667
+ }
425
668
 
426
669
  //#endregion
427
670
  //#region src/core/skeleton.tsx
@@ -437,21 +680,26 @@ function Skeleton$1({ className, ...props }) {
437
680
  //#endregion
438
681
  //#region src/core/switch.tsx
439
682
  var switch_exports = /* @__PURE__ */ __exportAll({ Switch: () => Switch$1 });
440
- function Switch$1({ className, handleClassName, ...props }) {
683
+ function Switch$1({ className, size = "default", handleClassName, ...props }) {
441
684
  return /* @__PURE__ */ jsx(SwitchPrimitive.Root, {
442
685
  "data-slot": "switch",
686
+ "data-size": size,
443
687
  className: cn(`peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input
444
688
  focus-visible:border-ring focus-visible:ring-ring/50
445
- dark:data-[state=unchecked]:bg-input/80 inline-flex h-[1.15rem] w-8
689
+ dark:data-[state=unchecked]:bg-input/80 group/switch inline-flex
446
690
  shrink-0 items-center rounded-full border border-transparent shadow-xs
447
691
  transition-all outline-none focus-visible:ring-[3px]
448
- disabled:cursor-not-allowed disabled:opacity-50`, className),
692
+ disabled:cursor-not-allowed disabled:opacity-50
693
+ data-[size=default]:h-[1.15rem] data-[size=default]:w-8
694
+ data-[size=sm]:h-3.5 data-[size=sm]:w-6`, className),
449
695
  ...props,
450
696
  children: /* @__PURE__ */ jsx(SwitchPrimitive.Thumb, {
451
697
  "data-slot": "switch-thumb",
452
698
  className: cn(`bg-background dark:data-[state=unchecked]:bg-foreground
453
699
  dark:data-[state=checked]:bg-primary-foreground pointer-events-none
454
- block size-4 rounded-full ring-0 transition-transform
700
+ block rounded-full ring-0 transition-transform
701
+ group-data-[size=default]/switch:size-4
702
+ group-data-[size=sm]/switch:size-3
455
703
  data-[state=checked]:translate-x-[calc(100%-2px)]
456
704
  data-[state=unchecked]:translate-x-0`, handleClassName)
457
705
  })
@@ -461,21 +709,24 @@ function Switch$1({ className, handleClassName, ...props }) {
461
709
  //#endregion
462
710
  //#region src/core/textarea.tsx
463
711
  var textarea_exports = /* @__PURE__ */ __exportAll({ Textarea: () => Textarea });
464
- const Textarea = React$1.forwardRef(({ className, ...props }, ref) => {
712
+ function Textarea({ className, ...props }) {
465
713
  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,
714
+ "data-slot": "textarea",
715
+ className: cn(`border-input placeholder:text-muted-foreground
716
+ focus-visible:border-ring focus-visible:ring-ring/50
717
+ aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40
718
+ aria-invalid:border-destructive dark:bg-input/30 flex
719
+ field-sizing-content min-h-16 w-full rounded-md border bg-transparent
720
+ px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none
721
+ focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50
722
+ md:text-sm`, className),
471
723
  ...props
472
724
  });
473
- });
474
- Textarea.displayName = "Textarea";
725
+ }
475
726
 
476
727
  //#endregion
477
728
  //#region src/components/atoms/Button/index.tsx
478
- const Core$6 = Button$2;
729
+ const Core$8 = Button$2;
479
730
  const variantClasses = {
480
731
  solid: "",
481
732
  outlined: cn("border border-[rgb(var(--btn-border)/0.5)]", "bg-background text-foreground", "hover:bg-accent"),
@@ -499,7 +750,7 @@ const Button$1 = ({ icon, className, variant = "solid", size = "medium", color =
499
750
  const computedColor = danger ? "danger" : color;
500
751
  const colored = computedColor && computedColor !== "default";
501
752
  const displayIcon = loading ? typeof loading === "object" ? loading.icon : /* @__PURE__ */ jsx(LoaderCircle, { className: "animate-spin" }) : icon;
502
- return /* @__PURE__ */ jsxs(Core$6, {
753
+ return /* @__PURE__ */ jsxs(Core$8, {
503
754
  disabled,
504
755
  variant: "default",
505
756
  "data-color": computedColor,
@@ -522,35 +773,35 @@ var Button_default$1 = Button$1;
522
773
 
523
774
  //#endregion
524
775
  //#region src/components/atoms/Checkbox/Group/index.tsx
525
- const Group = ({ direction = "vertical", placement = "left", className, classNames = {}, options: _options, onChange = () => {} }) => {
526
- const [options, setOptions] = useState([]);
527
- const updateOptions = (checked, value) => {
528
- const nextOptions = options.map((item) => ({
529
- ...item,
530
- checked: item.value === value ? checked : item.checked
531
- }));
532
- setOptions(nextOptions);
533
- onChange(nextOptions.filter((item) => item.checked).map((item) => item.value));
776
+ const Group = ({ direction = "vertical", placement = "left", className, classNames = {}, options: _options = [], defaultValue, value: _value, onChange: _onChange = () => {} }) => {
777
+ const [uncontrolledValue, setUncontrolledValue] = useState(defaultValue || []);
778
+ const controlled = _value !== void 0;
779
+ const value = controlled ? _value : uncontrolledValue;
780
+ const options = _options.map((item) => typeof item === "object" ? item : {
781
+ label: `${item}`,
782
+ value: item
783
+ });
784
+ const onChange = (checked, optionValue) => {
785
+ const nextValue = checked ? [...value, optionValue] : value.filter((v) => v !== optionValue);
786
+ if (!controlled) setUncontrolledValue(nextValue);
787
+ _onChange(nextValue);
534
788
  };
535
- useEffect(() => {
536
- setOptions(_options?.map((item) => typeof item === "object" ? item : {
537
- label: `${item}`,
538
- value: item,
539
- checked: false
540
- }) || []);
541
- }, [_options]);
542
789
  return /* @__PURE__ */ jsx("ul", {
543
790
  className: cn(direction === "vertical" ? "space-y-2" : "flex gap-2", className),
544
- children: options.map((item, i) => /* @__PURE__ */ jsx("li", {
545
- className: cn("flex", classNames?.wrapper),
546
- children: /* @__PURE__ */ jsx(Checkbox_default, {
547
- placement,
548
- className: cn(classNames?.item),
549
- value: item.value,
550
- onChange: (checked) => updateOptions(checked, item.value),
551
- children: item.label
552
- })
553
- }, i))
791
+ children: options.map((item, i) => {
792
+ const checked = value.includes(item.value);
793
+ return /* @__PURE__ */ jsx("li", {
794
+ className: cn("flex", classNames?.wrapper),
795
+ children: /* @__PURE__ */ jsx(Checkbox_default, {
796
+ placement,
797
+ className: cn(classNames?.item),
798
+ value: item.value,
799
+ checked,
800
+ onChange: (checked$1) => onChange(checked$1, item.value),
801
+ children: item.label
802
+ })
803
+ }, i);
804
+ })
554
805
  });
555
806
  };
556
807
  var Group_default = Group;
@@ -559,12 +810,14 @@ var Group_default = Group;
559
810
  //#region src/components/atoms/Checkbox/index.tsx
560
811
  const { Checkbox: CoreCheckbox } = checkbox_exports;
561
812
  const { Label: CoreLabel } = label_exports;
562
- const Checkbox = ({ placement = "left", value = "", children, className, icons, checked: _checked, onChange: _onChange = () => {}, ...props }) => {
563
- const [checked, setChecked] = useState(false);
813
+ const Checkbox = ({ placement = "left", value = "", children, className, icons, defaultChecked, checked: _checked, onChange: _onChange = () => {}, ...props }) => {
814
+ const [uncontrolledChecked, setUncontrolledChecked] = useState(defaultChecked || false);
564
815
  const reactId = useId();
565
816
  const id = typeof value === "boolean" || !value ? reactId : String(value);
817
+ const controlled = _checked !== void 0;
818
+ const checked = controlled ? _checked : uncontrolledChecked;
566
819
  const onChange = (next) => {
567
- setChecked(next);
820
+ if (!controlled) setUncontrolledChecked(next);
568
821
  _onChange(next);
569
822
  };
570
823
  const renderContent = icons ? /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -599,9 +852,6 @@ const Checkbox = ({ placement = "left", value = "", children, className, icons,
599
852
  className: "cursor-pointer text-left",
600
853
  children
601
854
  })] });
602
- useEffect(() => {
603
- setChecked(!!_checked);
604
- }, [_checked]);
605
855
  return /* @__PURE__ */ jsx("div", {
606
856
  className: cn("flex items-center gap-x-2", placement === "right" && "flex-row-reverse", className),
607
857
  ...props,
@@ -611,92 +861,6 @@ const Checkbox = ({ placement = "left", value = "", children, className, icons,
611
861
  Checkbox.Group = Group_default;
612
862
  var Checkbox_default = Checkbox;
613
863
 
614
- //#endregion
615
- //#region src/components/atoms/FloatButton/BackTop/index.tsx
616
- const BackTop = ({ visibilityHeight = 450, className, onClick, ...props }) => {
617
- const [{ y }, scrollTo] = useWindowScroll();
618
- return /* @__PURE__ */ jsx(FloatButton_default, {
619
- icon: /* @__PURE__ */ jsx(ArrowUp, {}),
620
- className: cn(className, (!y || visibilityHeight > y) && "hidden"),
621
- onClick: (e) => {
622
- scrollTo({
623
- left: 0,
624
- top: 0,
625
- behavior: "smooth"
626
- });
627
- onClick?.(e);
628
- },
629
- ...props
630
- });
631
- };
632
- var BackTop_default = BackTop;
633
-
634
- //#endregion
635
- //#region src/components/atoms/FloatButton/index.tsx
636
- const FloatButton = ({ className, children, ...props }) => {
637
- return /* @__PURE__ */ jsx(Button_default$1, {
638
- className: cn("fixed right-5 bottom-5 rounded-full", "bg-white hover:bg-white", "z-50 h-12 w-12", "shadow-md", className),
639
- variant: "outlined",
640
- ...props,
641
- children
642
- });
643
- };
644
- FloatButton.BackTop = BackTop_default;
645
- var FloatButton_default = FloatButton;
646
-
647
- //#endregion
648
- //#region src/components/atoms/Input/Search/index.tsx
649
- const { Input: Core$5 } = input_exports;
650
- const Search$1 = forwardRef(({ className, value, allowClear = true, onChange = () => {}, onPressEnter, ...props }, ref) => {
651
- return /* @__PURE__ */ jsxs("div", {
652
- className: cn("relative flex items-center gap-x-2", "rounded-md", "p-3", className),
653
- children: [
654
- /* @__PURE__ */ jsx(Search, { className: "absolute size-5" }),
655
- /* @__PURE__ */ jsx(Core$5, {
656
- ref,
657
- inputMode: "search",
658
- type: "search",
659
- enterKeyHint: "search",
660
- className: cn("w-full"),
661
- value,
662
- onChange,
663
- onKeyDown: (e) => {
664
- if (e.key === "Enter") onPressEnter();
665
- },
666
- ...props
667
- }),
668
- /* @__PURE__ */ jsx(CircleX, {
669
- className: cn("absolute size-4 shrink-0 cursor-pointer", (!allowClear || !value) && "hidden"),
670
- onClick: () => onChange({ target: { value: "" } })
671
- })
672
- ]
673
- });
674
- });
675
- Search$1.displayName = "Search";
676
- var Search_default = Search$1;
677
-
678
- //#endregion
679
- //#region src/components/atoms/Input/TextArea/index.tsx
680
- const { Textarea: Core$4 } = textarea_exports;
681
- const TextArea = ({ className, ref, ...props }) => {
682
- return /* @__PURE__ */ jsx(Core$4, {
683
- ref,
684
- className: cn(className),
685
- ...props
686
- });
687
- };
688
- var TextArea_default = TextArea;
689
-
690
- //#endregion
691
- //#region src/components/atoms/Input/index.tsx
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;
699
-
700
864
  //#endregion
701
865
  //#region src/components/atoms/Popover/index.tsx
702
866
  const { Popover: CorePopover, PopoverContent, PopoverTrigger } = popover_exports;
@@ -750,38 +914,153 @@ const placementMap = {
750
914
  align: "end"
751
915
  }
752
916
  };
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
- };
917
+ const beforeBase = "before:content-[\"\"] before:absolute before:h-0 before:w-0";
918
+ const afterBase = "after:content-[\"\"] after:absolute after:h-0 after:w-0";
919
+ const vBorderShape = "before:border-l-[9px] before:border-r-[9px] before:border-l-transparent before:border-r-transparent";
920
+ const hBorderShape = "before:border-t-[9px] before:border-b-[9px] before:border-t-transparent before:border-b-transparent";
921
+ const vFillShape = "after:border-l-8 after:border-r-8 after:border-l-transparent after:border-r-transparent";
922
+ const hFillShape = "after:border-t-8 after:border-b-8 after:border-t-transparent after:border-b-transparent";
923
+ const topBorder = "before:border-t-[9px] before:border-t-border";
924
+ const bottomBorder = "before:border-b-[9px] before:border-b-border";
925
+ const leftBorder = "before:border-l-[9px] before:border-l-border";
926
+ const rightBorder = "before:border-r-[9px] before:border-r-border";
927
+ const topFill = "after:border-t-8 after:border-t-popover";
928
+ const bottomFill = "after:border-b-8 after:border-b-popover";
929
+ const leftFill = "after:border-l-8 after:border-l-popover";
930
+ const rightFill = "after:border-r-8 after:border-r-popover";
772
931
  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")
932
+ top: [
933
+ "absolute left-1/2 -translate-x-1/2 top-full",
934
+ beforeBase,
935
+ "before:top-0 before:left-1/2 before:-translate-x-1/2",
936
+ vBorderShape,
937
+ topBorder,
938
+ afterBase,
939
+ "after:-top-px after:left-1/2 after:-translate-x-1/2",
940
+ vFillShape,
941
+ topFill
942
+ ].join(" "),
943
+ topLeft: [
944
+ "absolute left-4 top-full",
945
+ beforeBase,
946
+ "before:top-0 before:left-0",
947
+ vBorderShape,
948
+ topBorder,
949
+ afterBase,
950
+ "after:-top-px after:left-px",
951
+ vFillShape,
952
+ topFill
953
+ ].join(" "),
954
+ topRight: [
955
+ "absolute right-4 top-full",
956
+ beforeBase,
957
+ "before:top-0 before:right-0",
958
+ vBorderShape,
959
+ topBorder,
960
+ afterBase,
961
+ "after:-top-px after:right-px",
962
+ vFillShape,
963
+ topFill
964
+ ].join(" "),
965
+ bottom: [
966
+ "absolute left-1/2 -translate-x-1/2 bottom-full",
967
+ beforeBase,
968
+ "before:bottom-0 before:left-1/2 before:-translate-x-1/2",
969
+ vBorderShape,
970
+ bottomBorder,
971
+ afterBase,
972
+ "after:-bottom-px after:left-1/2 after:-translate-x-1/2",
973
+ vFillShape,
974
+ bottomFill
975
+ ].join(" "),
976
+ bottomLeft: [
977
+ "absolute left-4 bottom-full",
978
+ beforeBase,
979
+ "before:bottom-0 before:left-0",
980
+ vBorderShape,
981
+ bottomBorder,
982
+ afterBase,
983
+ "after:-bottom-px after:left-px",
984
+ vFillShape,
985
+ bottomFill
986
+ ].join(" "),
987
+ bottomRight: [
988
+ "absolute right-4 bottom-full",
989
+ beforeBase,
990
+ "before:bottom-0 before:right-0",
991
+ vBorderShape,
992
+ bottomBorder,
993
+ afterBase,
994
+ "after:-bottom-px after:right-px",
995
+ vFillShape,
996
+ bottomFill
997
+ ].join(" "),
998
+ left: [
999
+ "absolute top-1/2 -translate-y-1/2 left-full",
1000
+ beforeBase,
1001
+ "before:left-0 before:top-1/2 before:-translate-y-1/2",
1002
+ hBorderShape,
1003
+ leftBorder,
1004
+ afterBase,
1005
+ "after:-left-px after:top-1/2 after:-translate-y-1/2",
1006
+ hFillShape,
1007
+ leftFill
1008
+ ].join(" "),
1009
+ leftTop: [
1010
+ "absolute top-4 left-full",
1011
+ beforeBase,
1012
+ "before:left-0 before:top-0",
1013
+ hBorderShape,
1014
+ leftBorder,
1015
+ afterBase,
1016
+ "after:-left-px after:top-px",
1017
+ hFillShape,
1018
+ leftFill
1019
+ ].join(" "),
1020
+ leftBottom: [
1021
+ "absolute bottom-4 left-full",
1022
+ beforeBase,
1023
+ "before:left-0 before:bottom-0",
1024
+ hBorderShape,
1025
+ leftBorder,
1026
+ afterBase,
1027
+ "after:-left-px after:bottom-px",
1028
+ hFillShape,
1029
+ leftFill
1030
+ ].join(" "),
1031
+ right: [
1032
+ "absolute top-1/2 -translate-y-1/2 right-full",
1033
+ beforeBase,
1034
+ "before:right-0 before:top-1/2 before:-translate-y-1/2",
1035
+ hBorderShape,
1036
+ rightBorder,
1037
+ afterBase,
1038
+ "after:-right-px after:top-1/2 after:-translate-y-1/2",
1039
+ hFillShape,
1040
+ rightFill
1041
+ ].join(" "),
1042
+ rightTop: [
1043
+ "absolute top-4 right-full",
1044
+ beforeBase,
1045
+ "before:right-0 before:top-0",
1046
+ hBorderShape,
1047
+ rightBorder,
1048
+ afterBase,
1049
+ "after:-right-px after:top-px",
1050
+ hFillShape,
1051
+ rightFill
1052
+ ].join(" "),
1053
+ rightBottom: [
1054
+ "absolute bottom-4 right-full",
1055
+ beforeBase,
1056
+ "before:right-0 before:bottom-0",
1057
+ hBorderShape,
1058
+ rightBorder,
1059
+ afterBase,
1060
+ "after:-right-px after:bottom-px",
1061
+ hFillShape,
1062
+ rightFill
1063
+ ].join(" ")
785
1064
  };
786
1065
  const Popover = ({ title, placement = "top", className, content, children }) => {
787
1066
  return /* @__PURE__ */ jsxs(CorePopover, { children: [/* @__PURE__ */ jsx(PopoverTrigger, {
@@ -798,20 +1077,151 @@ const Popover = ({ title, placement = "top", className, content, children }) =>
798
1077
  children: v
799
1078
  })),
800
1079
  content,
801
- /* @__PURE__ */ jsx("div", { className: cn(arrowBase, arrowStyles[placement]) })
1080
+ /* @__PURE__ */ jsx("div", { className: cn(arrowStyles[placement]) })
802
1081
  ]
803
1082
  })] });
804
1083
  };
805
1084
  var Popover_default = Popover;
806
1085
 
1086
+ //#endregion
1087
+ //#region src/components/atoms/ColorPicker/index.tsx
1088
+ const ColorPicker = ({ defaultValue, value: _value, showText, onChange: _onChange = () => {} }) => {
1089
+ const [uncontrolledValue, setUncontrolledValue] = useState(defaultValue || "#fff");
1090
+ const controlled = _value !== void 0;
1091
+ const value = controlled ? _value : uncontrolledValue;
1092
+ const onChange = (color) => {
1093
+ if (!controlled) setUncontrolledValue(color);
1094
+ _onChange(color);
1095
+ };
1096
+ return /* @__PURE__ */ jsx(Popover_default, {
1097
+ placement: "bottomLeft",
1098
+ content: /* @__PURE__ */ jsx(HexColorPicker, {
1099
+ color: value,
1100
+ onChange
1101
+ }),
1102
+ children: /* @__PURE__ */ jsxs("div", {
1103
+ className: cn("inline-flex items-center", "rounded border p-0.5"),
1104
+ children: [/* @__PURE__ */ jsx("div", {
1105
+ className: cn("size-6 cursor-pointer rounded border", "shadow-sm"),
1106
+ style: { backgroundColor: value }
1107
+ }), showText && /* @__PURE__ */ jsx("span", {
1108
+ className: "px-1 font-mono text-sm font-medium",
1109
+ children: value.toUpperCase()
1110
+ })]
1111
+ })
1112
+ });
1113
+ };
1114
+ var ColorPicker_default = ColorPicker;
1115
+
1116
+ //#endregion
1117
+ //#region src/components/atoms/FloatButton/BackTop/index.tsx
1118
+ const BackTop = ({ visibilityHeight = 450, className, onClick, ...props }) => {
1119
+ const [{ y }, scrollTo] = useWindowScroll();
1120
+ return /* @__PURE__ */ jsx(FloatButton_default, {
1121
+ icon: /* @__PURE__ */ jsx(ArrowUp, {}),
1122
+ className: cn(className, (!y || visibilityHeight > y) && "hidden"),
1123
+ onClick: (e) => {
1124
+ scrollTo({
1125
+ left: 0,
1126
+ top: 0,
1127
+ behavior: "smooth"
1128
+ });
1129
+ onClick?.(e);
1130
+ },
1131
+ ...props
1132
+ });
1133
+ };
1134
+ var BackTop_default = BackTop;
1135
+
1136
+ //#endregion
1137
+ //#region src/components/atoms/FloatButton/index.tsx
1138
+ const FloatButton = ({ className, children, ...props }) => {
1139
+ return /* @__PURE__ */ jsx(Button_default$1, {
1140
+ className: cn("fixed right-5 bottom-5 rounded-full", "bg-white hover:bg-white", "z-50 h-12 w-12", "shadow-md", className),
1141
+ variant: "outlined",
1142
+ ...props,
1143
+ children
1144
+ });
1145
+ };
1146
+ FloatButton.BackTop = BackTop_default;
1147
+ var FloatButton_default = FloatButton;
1148
+
1149
+ //#endregion
1150
+ //#region src/components/atoms/Input/Search/index.tsx
1151
+ const { Input: Core$7 } = input_exports;
1152
+ const Search$1 = ({ ref, className, defaultValue, value, allowClear = true, onChange, onSearch: _onSearch, ...props }) => {
1153
+ const internalRef = useRef(null);
1154
+ const inputRef = ref || internalRef;
1155
+ const onClear = () => {
1156
+ if (inputRef.current) {
1157
+ inputRef.current.value = "";
1158
+ onChange?.({ target: { value: "" } });
1159
+ }
1160
+ };
1161
+ const onSearch = () => {
1162
+ if (inputRef.current) _onSearch?.(inputRef.current.value);
1163
+ };
1164
+ return /* @__PURE__ */ jsxs("div", {
1165
+ className: cn("flex items-center", "rounded-md", className),
1166
+ children: [/* @__PURE__ */ jsxs("div", {
1167
+ className: cn("relative grow", "inline-flex items-center"),
1168
+ children: [/* @__PURE__ */ jsx(Core$7, {
1169
+ ref: inputRef,
1170
+ inputMode: "search",
1171
+ type: "search",
1172
+ enterKeyHint: "search",
1173
+ className: cn("rounded-r-none", "[&::-webkit-search-cancel-button]:hidden", "[&::-webkit-search-decoration]:hidden"),
1174
+ value,
1175
+ defaultValue,
1176
+ onChange,
1177
+ onKeyDown: (e) => {
1178
+ if (e.key === "Enter") onSearch();
1179
+ },
1180
+ ...props
1181
+ }), /* @__PURE__ */ jsx(CircleX, {
1182
+ className: cn("absolute right-2 size-4", "shrink-0 cursor-pointer", (!allowClear || value !== void 0 && !value) && "hidden"),
1183
+ onClick: onClear
1184
+ })]
1185
+ }), /* @__PURE__ */ jsx(Button_default$1, {
1186
+ icon: /* @__PURE__ */ jsx(Search, {}),
1187
+ className: cn("rounded-l-none", "size-9"),
1188
+ onClick: onSearch
1189
+ })]
1190
+ });
1191
+ };
1192
+ Search$1.displayName = "Search";
1193
+ var Search_default = Search$1;
1194
+
1195
+ //#endregion
1196
+ //#region src/components/atoms/Input/TextArea/index.tsx
1197
+ const { Textarea: Core$6 } = textarea_exports;
1198
+ const TextArea = ({ className, ref, ...props }) => {
1199
+ return /* @__PURE__ */ jsx(Core$6, {
1200
+ ref,
1201
+ className: cn(className),
1202
+ ...props
1203
+ });
1204
+ };
1205
+ var TextArea_default = TextArea;
1206
+
1207
+ //#endregion
1208
+ //#region src/components/atoms/Input/index.tsx
1209
+ const { Input: Core$5 } = input_exports;
1210
+ const Input = ({ ...props }) => {
1211
+ return /* @__PURE__ */ jsx(Core$5, { ...props });
1212
+ };
1213
+ Input.Search = Search_default;
1214
+ Input.TextArea = TextArea_default;
1215
+ var Input_default = Input;
1216
+
807
1217
  //#endregion
808
1218
  //#region src/components/atoms/Progress/index.tsx
809
- const { Progress: Core$2 } = progress_exports;
1219
+ const { Progress: Core$4 } = progress_exports;
810
1220
  const Progress = ({ value, className, direction = "horizontal", classNames }) => {
811
1221
  const isHorizontal = direction === "horizontal";
812
1222
  const dimension = isHorizontal ? "width" : "height";
813
1223
  const percent = isNaN(value) ? 0 : value;
814
- return /* @__PURE__ */ jsx(Core$2, {
1224
+ return /* @__PURE__ */ jsx(Core$4, {
815
1225
  value,
816
1226
  className: cn(isHorizontal ? "h-4 w-full" : "flex h-full w-4 flex-col justify-end", className, classNames?.background),
817
1227
  barClassName: cn("flex-none", classNames?.bar),
@@ -823,6 +1233,49 @@ const Progress = ({ value, className, direction = "horizontal", classNames }) =>
823
1233
  };
824
1234
  var Progress_default = Progress;
825
1235
 
1236
+ //#endregion
1237
+ //#region src/components/atoms/Radio/index.tsx
1238
+ const { RadioGroup: Core$3, RadioGroupItem: Item$3 } = radio_group_exports;
1239
+ const { Label: Label$1 } = label_exports;
1240
+ const Radio = ({ children }) => {
1241
+ const id = useId();
1242
+ return /* @__PURE__ */ jsx(Core$3, { children: /* @__PURE__ */ jsxs("div", {
1243
+ className: "flex items-center gap-3",
1244
+ children: [/* @__PURE__ */ jsx(Item$3, {
1245
+ value: "default",
1246
+ id
1247
+ }), /* @__PURE__ */ jsxs(Label$1, {
1248
+ htmlFor: id,
1249
+ children: [" ", children]
1250
+ })]
1251
+ }) });
1252
+ };
1253
+ var Radio_default = Radio;
1254
+
1255
+ //#endregion
1256
+ //#region src/components/atoms/Select/index.tsx
1257
+ const { Select: Core$2, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectTrigger, SelectValue } = select_exports;
1258
+ const isGroup = (option) => {
1259
+ return "options" in option && Array.isArray(option.options);
1260
+ };
1261
+ const Select$1 = ({ className, placeholder, options, onChange, ...props }) => {
1262
+ return /* @__PURE__ */ jsxs(Core$2, {
1263
+ onValueChange: onChange,
1264
+ ...props,
1265
+ children: [/* @__PURE__ */ jsx(SelectTrigger, {
1266
+ className: cn("w-full max-w-48", className),
1267
+ children: /* @__PURE__ */ jsx(SelectValue, { placeholder })
1268
+ }), /* @__PURE__ */ jsx(SelectContent, { children: options?.map((option, index) => isGroup(option) ? /* @__PURE__ */ jsxs(SelectGroup, { children: [/* @__PURE__ */ jsx(SelectLabel, { children: option.label }), option.options.map((item) => /* @__PURE__ */ jsx(SelectItem, {
1269
+ value: item.value,
1270
+ children: item.label
1271
+ }, item.value))] }, index) : /* @__PURE__ */ jsx(SelectItem, {
1272
+ value: option.value,
1273
+ children: option.label
1274
+ }, option.value)) })]
1275
+ });
1276
+ };
1277
+ var Select_default = Select$1;
1278
+
826
1279
  //#endregion
827
1280
  //#region src/components/atoms/Skeleton/Button/index.tsx
828
1281
  const Button = ({ className, ...props }) => {
@@ -897,12 +1350,20 @@ var Spin_default = Spin;
897
1350
  //#endregion
898
1351
  //#region src/components/atoms/Switch/index.tsx
899
1352
  const { Switch: Core } = switch_exports;
900
- const Switch = ({ onChange, className, classNames, ...props }) => {
1353
+ const Switch = ({ className, classNames, defaultChecked, checked: _checked, onChange: _onChange = () => {}, ...props }) => {
1354
+ const [uncontrolledChecked, setUncontrolledChecked] = useState(defaultChecked || false);
1355
+ const controlled = _checked !== void 0;
1356
+ const checked = controlled ? _checked : uncontrolledChecked;
1357
+ const onChange = (next) => {
1358
+ if (!controlled) setUncontrolledChecked(next);
1359
+ _onChange(next);
1360
+ };
901
1361
  return /* @__PURE__ */ jsx(Core, {
902
- className: cn(className, classNames?.track),
903
- handleClassName: cn(classNames?.handle),
904
- onCheckedChange: (checked) => {
905
- onChange?.(checked);
1362
+ checked,
1363
+ className: cn("h-8.5 w-13", className, classNames?.track),
1364
+ handleClassName: cn("h-7 w-7", "data-[state=checked]:translate-x-5", "data-[state=unchecked]:translate-x-[2px]", classNames?.handle),
1365
+ onCheckedChange: (checked$1) => {
1366
+ onChange(checked$1);
906
1367
  },
907
1368
  ...props
908
1369
  });
@@ -929,16 +1390,25 @@ var Card_default = Card;
929
1390
  //#endregion
930
1391
  //#region src/components/molecules/Collapse/index.tsx
931
1392
  const { Accordion, AccordionItem, AccordionTrigger, AccordionContent } = accordion_exports;
932
- const Collapse = ({ expandIcon, accordion = false, items: _items = [], className, classNames, defaultActiveKey }) => {
933
- const [items, setItems] = useState([]);
934
- useEffect(() => {
935
- setItems(_items);
936
- }, [_items]);
1393
+ const Collapse = ({ expandIcon, accordion = false, items = [], className, classNames, defaultActiveKey, activeKey: _activeKey, onChange: _onChange }) => {
1394
+ const controlled = _activeKey !== void 0;
937
1395
  return /* @__PURE__ */ jsx(Accordion, {
938
1396
  className,
939
- ...accordion ? {
1397
+ ...accordion ? controlled ? {
940
1398
  type: "single",
941
- defaultValue: `${defaultActiveKey?.[0]}`
1399
+ value: `${_activeKey?.[0] ?? ""}`,
1400
+ onValueChange: (value) => {
1401
+ _onChange?.(value ? [value] : []);
1402
+ }
1403
+ } : {
1404
+ type: "single",
1405
+ defaultValue: `${defaultActiveKey?.[0] ?? ""}`
1406
+ } : controlled ? {
1407
+ type: "multiple",
1408
+ value: _activeKey?.map((key) => `${key}`),
1409
+ onValueChange: (values) => {
1410
+ _onChange?.(values);
1411
+ }
942
1412
  } : {
943
1413
  type: "multiple",
944
1414
  defaultValue: defaultActiveKey?.map((key) => `${key}`)
@@ -963,9 +1433,8 @@ var Collapse_default = Collapse;
963
1433
 
964
1434
  //#endregion
965
1435
  //#region src/components/molecules/Menu/Item/Label/index.tsx
966
- const Label = ({ children, level = 4, className, ...props }) => {
1436
+ const Label = ({ children, className, ...props }) => {
967
1437
  if (typeof children === "string") return /* @__PURE__ */ jsx(Typography_default.Text, {
968
- level,
969
1438
  className: cn(className),
970
1439
  ...props,
971
1440
  children
@@ -1115,13 +1584,13 @@ function findKey(menu, targetKeys) {
1115
1584
  return false;
1116
1585
  }
1117
1586
  const Menu = ({ items, mode = "vertical", defaultSelectedKeys = [], selectedKeys: _selectedKeys, className, classNames, styles, offset, inlineOffset, onClick, onSelect: _onSelect, ...props }) => {
1118
- const isControlled = _selectedKeys !== void 0;
1587
+ const controlled = _selectedKeys !== void 0;
1119
1588
  const [uncontrolledSelectedKeys, setUncontrolledSelectedKeys] = useState(defaultSelectedKeys ?? []);
1120
- const selectedKeys = isControlled ? _selectedKeys : uncontrolledSelectedKeys;
1589
+ const selectedKeys = controlled ? _selectedKeys : uncontrolledSelectedKeys;
1121
1590
  const selectedKeysSet = useMemo(() => new Set(selectedKeys ?? []), [selectedKeys]);
1122
1591
  const selectionMap = useMemo(() => buildSelectionMap(items ?? [], selectedKeysSet), [items, selectedKeysSet]);
1123
1592
  const onSelect = (params) => {
1124
- if (!isControlled) setUncontrolledSelectedKeys([params.key]);
1593
+ if (!controlled) setUncontrolledSelectedKeys([params.key]);
1125
1594
  _onSelect?.(params);
1126
1595
  };
1127
1596
  return /* @__PURE__ */ jsx("ul", {
@@ -1150,31 +1619,32 @@ var Menu_default = Menu;
1150
1619
 
1151
1620
  //#endregion
1152
1621
  //#region src/components/molecules/Dropdown/index.tsx
1153
- const Dropdown = ({ children, menu, trigger = "hover", open: _open = false, onOpenChange = () => {}, ...props }) => {
1154
- const [open, setOpen] = useState(false);
1622
+ const Dropdown = ({ children, menu, trigger = "hover", open: _open, onOpenChange: _onOpenChange = () => {}, ...props }) => {
1623
+ const [uncontrolledOpen, setUncontrolledOpen] = useState(false);
1624
+ const controlled = _open !== void 0;
1625
+ const open = controlled ? _open : uncontrolledOpen;
1155
1626
  const isClickTrigger = trigger === "click";
1156
- useEffect(() => {
1157
- setOpen(_open);
1158
- }, [_open]);
1627
+ const onOpenChange = (nextOpen) => {
1628
+ if (!controlled) setUncontrolledOpen(nextOpen);
1629
+ _onOpenChange(nextOpen);
1630
+ };
1159
1631
  return /* @__PURE__ */ jsxs("div", {
1160
1632
  ...props,
1161
1633
  className: cn("relative z-0", "inline-block cursor-pointer"),
1162
1634
  onMouseEnter: () => {
1163
1635
  if (isClickTrigger) return;
1164
- setOpen(true);
1636
+ onOpenChange(true);
1165
1637
  },
1166
1638
  onMouseLeave: () => {
1167
1639
  if (isClickTrigger) return;
1168
- setOpen(false);
1640
+ onOpenChange(false);
1169
1641
  },
1170
1642
  children: [/* @__PURE__ */ jsx("div", {
1171
1643
  onClick: () => {
1172
1644
  if (!isClickTrigger) return;
1173
- setOpen(!open);
1174
1645
  onOpenChange(!open);
1175
1646
  },
1176
1647
  onBlur: () => {
1177
- setOpen(false);
1178
1648
  onOpenChange(false);
1179
1649
  },
1180
1650
  children
@@ -5408,7 +5878,7 @@ var Swiper_default = Swiper$1;
5408
5878
  //#region src/components/templates/Layout/Content/index.tsx
5409
5879
  const Content = ({ children, className, ...props }) => {
5410
5880
  return /* @__PURE__ */ jsx("div", {
5411
- className: cn("shrink flex-grow basis-0", className),
5881
+ className: cn("shrink grow basis-0", className),
5412
5882
  ...props,
5413
5883
  children
5414
5884
  });
@@ -5441,7 +5911,7 @@ var Header_default = Header;
5441
5911
  //#region src/components/templates/Layout/Sider/index.tsx
5442
5912
  const Sider = ({ children, className, ...props }) => {
5443
5913
  return /* @__PURE__ */ jsx("div", {
5444
- className: cn("z-[100]", "w-[200px]", className),
5914
+ className: cn("z-100", "w-50", className),
5445
5915
  ...props,
5446
5916
  children
5447
5917
  });
@@ -5464,4 +5934,4 @@ Layout.Sider = Sider_default;
5464
5934
  var Layout_default = Layout;
5465
5935
 
5466
5936
  //#endregion
5467
- export { Button_default$1 as C, Checkbox_default as S, Skeleton_default as _, Drawer_default as a, Input_default as b, Dropdown_default as c, buildSelectionMap as d, findKey as f, Spin_default as g, Switch_default as h, List_default as i, MENU_CLASSNAMES as l, Card_default as m, Swiper_default as n, Space_default as o, Collapse_default as p, Modal_default as r, Marquees_default as s, Layout_default as t, Menu_default as u, Progress_default as v, FloatButton_default as x, Popover_default as y };
5937
+ export { ColorPicker_default as C, Button_default$1 as E, FloatButton_default as S, Checkbox_default as T, Skeleton_default as _, Drawer_default as a, Progress_default as b, Dropdown_default as c, buildSelectionMap as d, findKey as f, Spin_default as g, Switch_default as h, List_default as i, MENU_CLASSNAMES as l, Card_default as m, Swiper_default as n, Space_default as o, Collapse_default as p, Modal_default as r, Marquees_default as s, Layout_default as t, Menu_default as u, Select_default as v, Popover_default as w, Input_default as x, Radio_default as y };