@sonamu-kit/react-components 0.4.10 → 0.5.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.
Files changed (234) hide show
  1. package/dist/_virtual/~icons/lucide/arrow-left.js +13 -10
  2. package/dist/_virtual/~icons/lucide/arrow-left.js.map +1 -1
  3. package/dist/_virtual/~icons/lucide/arrow-right.js +13 -10
  4. package/dist/_virtual/~icons/lucide/arrow-right.js.map +1 -1
  5. package/dist/_virtual/~icons/lucide/calendar.js +17 -14
  6. package/dist/_virtual/~icons/lucide/calendar.js.map +1 -1
  7. package/dist/_virtual/~icons/lucide/check.js +13 -10
  8. package/dist/_virtual/~icons/lucide/check.js.map +1 -1
  9. package/dist/_virtual/~icons/lucide/chevron-down.js +13 -10
  10. package/dist/_virtual/~icons/lucide/chevron-down.js.map +1 -1
  11. package/dist/_virtual/~icons/lucide/chevron-left.js +13 -10
  12. package/dist/_virtual/~icons/lucide/chevron-left.js.map +1 -1
  13. package/dist/_virtual/~icons/lucide/chevron-right.js +13 -10
  14. package/dist/_virtual/~icons/lucide/chevron-right.js.map +1 -1
  15. package/dist/_virtual/~icons/lucide/chevrons-up-down.js +13 -10
  16. package/dist/_virtual/~icons/lucide/chevrons-up-down.js.map +1 -1
  17. package/dist/_virtual/~icons/lucide/circle.js +13 -10
  18. package/dist/_virtual/~icons/lucide/circle.js.map +1 -1
  19. package/dist/_virtual/~icons/lucide/dot.js +15 -12
  20. package/dist/_virtual/~icons/lucide/dot.js.map +1 -1
  21. package/dist/_virtual/~icons/lucide/grip-vertical.js +19 -16
  22. package/dist/_virtual/~icons/lucide/grip-vertical.js.map +1 -1
  23. package/dist/_virtual/~icons/lucide/image.js +16 -13
  24. package/dist/_virtual/~icons/lucide/image.js.map +1 -1
  25. package/dist/_virtual/~icons/lucide/loader-2.js +13 -10
  26. package/dist/_virtual/~icons/lucide/loader-2.js.map +1 -1
  27. package/dist/_virtual/~icons/lucide/loader2.js +13 -10
  28. package/dist/_virtual/~icons/lucide/loader2.js.map +1 -1
  29. package/dist/_virtual/~icons/lucide/more-horizontal.js +16 -13
  30. package/dist/_virtual/~icons/lucide/more-horizontal.js.map +1 -1
  31. package/dist/_virtual/~icons/lucide/panel-left.js +15 -12
  32. package/dist/_virtual/~icons/lucide/panel-left.js.map +1 -1
  33. package/dist/_virtual/~icons/lucide/plus.js +13 -10
  34. package/dist/_virtual/~icons/lucide/plus.js.map +1 -1
  35. package/dist/_virtual/~icons/lucide/search.js +14 -11
  36. package/dist/_virtual/~icons/lucide/search.js.map +1 -1
  37. package/dist/_virtual/~icons/lucide/trash-2.js +13 -10
  38. package/dist/_virtual/~icons/lucide/trash-2.js.map +1 -1
  39. package/dist/_virtual/~icons/lucide/upload.js +13 -10
  40. package/dist/_virtual/~icons/lucide/upload.js.map +1 -1
  41. package/dist/_virtual/~icons/lucide/x-circle.js +15 -12
  42. package/dist/_virtual/~icons/lucide/x-circle.js.map +1 -1
  43. package/dist/_virtual/~icons/lucide/x.js +13 -10
  44. package/dist/_virtual/~icons/lucide/x.js.map +1 -1
  45. package/dist/components/ui/accordion.js +1 -2
  46. package/dist/components/ui/accordion.js.map +1 -1
  47. package/dist/components/ui/alert-dialog.d.ts +2 -2
  48. package/dist/components/ui/alert-dialog.js +1 -2
  49. package/dist/components/ui/alert-dialog.js.map +1 -1
  50. package/dist/components/ui/alert.js +15 -15
  51. package/dist/components/ui/alert.js.map +1 -1
  52. package/dist/components/ui/aspect-ratio.js +1 -2
  53. package/dist/components/ui/aspect-ratio.js.map +1 -1
  54. package/dist/components/ui/avatar.js +1 -2
  55. package/dist/components/ui/avatar.js.map +1 -1
  56. package/dist/components/ui/badge.d.ts +1 -1
  57. package/dist/components/ui/badge.js +11 -11
  58. package/dist/components/ui/badge.js.map +1 -1
  59. package/dist/components/ui/breadcrumb.d.ts +2 -2
  60. package/dist/components/ui/breadcrumb.js +1 -2
  61. package/dist/components/ui/breadcrumb.js.map +1 -1
  62. package/dist/components/ui/button.js +33 -33
  63. package/dist/components/ui/button.js.map +1 -1
  64. package/dist/components/ui/calendar.d.ts +1 -1
  65. package/dist/components/ui/calendar.js +41 -43
  66. package/dist/components/ui/calendar.js.map +1 -1
  67. package/dist/components/ui/card.d.ts +7 -7
  68. package/dist/components/ui/card.js +1 -2
  69. package/dist/components/ui/card.js.map +1 -1
  70. package/dist/components/ui/carousel.js +2 -3
  71. package/dist/components/ui/carousel.js.map +1 -1
  72. package/dist/components/ui/checkbox.js +2 -3
  73. package/dist/components/ui/checkbox.js.map +1 -1
  74. package/dist/components/ui/collapsible.js +1 -2
  75. package/dist/components/ui/collapsible.js.map +1 -1
  76. package/dist/components/ui/combobox.js +1 -2
  77. package/dist/components/ui/combobox.js.map +1 -1
  78. package/dist/components/ui/command.d.ts +2 -2
  79. package/dist/components/ui/command.js +1 -2
  80. package/dist/components/ui/command.js.map +1 -1
  81. package/dist/components/ui/common-modal.d.ts +1 -1
  82. package/dist/components/ui/common-modal.js +1 -2
  83. package/dist/components/ui/common-modal.js.map +1 -1
  84. package/dist/components/ui/context-menu.d.ts +1 -1
  85. package/dist/components/ui/context-menu.js +1 -2
  86. package/dist/components/ui/context-menu.js.map +1 -1
  87. package/dist/components/ui/date-input.d.ts +1 -1
  88. package/dist/components/ui/date-input.js +3 -3
  89. package/dist/components/ui/date-input.js.map +1 -1
  90. package/dist/components/ui/date-picker.d.ts +3 -3
  91. package/dist/components/ui/date-picker.js +3 -4
  92. package/dist/components/ui/date-picker.js.map +1 -1
  93. package/dist/components/ui/dialog.d.ts +2 -2
  94. package/dist/components/ui/dialog.js +1 -2
  95. package/dist/components/ui/dialog.js.map +1 -1
  96. package/dist/components/ui/drawer.d.ts +3 -3
  97. package/dist/components/ui/drawer.js +1 -2
  98. package/dist/components/ui/drawer.js.map +1 -1
  99. package/dist/components/ui/dropdown-menu.d.ts +1 -1
  100. package/dist/components/ui/dropdown-menu.js +1 -2
  101. package/dist/components/ui/dropdown-menu.js.map +1 -1
  102. package/dist/components/ui/file-input.d.ts +1 -1
  103. package/dist/components/ui/file-input.js +20 -12
  104. package/dist/components/ui/file-input.js.map +1 -1
  105. package/dist/components/ui/form.d.ts +6 -4
  106. package/dist/components/ui/form.js +1 -2
  107. package/dist/components/ui/form.js.map +1 -1
  108. package/dist/components/ui/hover-card.js +1 -2
  109. package/dist/components/ui/hover-card.js.map +1 -1
  110. package/dist/components/ui/input-otp.d.ts +4 -2
  111. package/dist/components/ui/input-otp.js +1 -2
  112. package/dist/components/ui/input-otp.js.map +1 -1
  113. package/dist/components/ui/input.js +1 -2
  114. package/dist/components/ui/input.js.map +1 -1
  115. package/dist/components/ui/label.js +1 -2
  116. package/dist/components/ui/label.js.map +1 -1
  117. package/dist/components/ui/menubar.d.ts +6 -6
  118. package/dist/components/ui/menubar.js +1 -2
  119. package/dist/components/ui/menubar.js.map +1 -1
  120. package/dist/components/ui/month-picker-multiple.d.ts +1 -1
  121. package/dist/components/ui/month-picker-multiple.js +80 -79
  122. package/dist/components/ui/month-picker-multiple.js.map +1 -1
  123. package/dist/components/ui/navigation-menu.js +1 -2
  124. package/dist/components/ui/navigation-menu.js.map +1 -1
  125. package/dist/components/ui/pagination.js +1 -2
  126. package/dist/components/ui/pagination.js.map +1 -1
  127. package/dist/components/ui/popover.d.ts +4 -4
  128. package/dist/components/ui/popover.js +1 -2
  129. package/dist/components/ui/popover.js.map +1 -1
  130. package/dist/components/ui/progress.js +1 -2
  131. package/dist/components/ui/progress.js.map +1 -1
  132. package/dist/components/ui/radio-group.js +1 -2
  133. package/dist/components/ui/radio-group.js.map +1 -1
  134. package/dist/components/ui/range-number-input.d.ts +1 -1
  135. package/dist/components/ui/range-number-input.js +1 -2
  136. package/dist/components/ui/range-number-input.js.map +1 -1
  137. package/dist/components/ui/resizable.d.ts +4 -20
  138. package/dist/components/ui/resizable.js +5 -6
  139. package/dist/components/ui/resizable.js.map +1 -1
  140. package/dist/components/ui/scroll-area.js +1 -2
  141. package/dist/components/ui/scroll-area.js.map +1 -1
  142. package/dist/components/ui/select/enum-select.d.ts +2 -1
  143. package/dist/components/ui/select/enum-select.js +1 -2
  144. package/dist/components/ui/select/enum-select.js.map +1 -1
  145. package/dist/components/ui/select/id-async-select.js +60 -60
  146. package/dist/components/ui/select/id-async-select.js.map +1 -1
  147. package/dist/components/ui/select/select.js +11 -9
  148. package/dist/components/ui/select/select.js.map +1 -1
  149. package/dist/components/ui/separator.js +1 -2
  150. package/dist/components/ui/separator.js.map +1 -1
  151. package/dist/components/ui/sheet.d.ts +2 -2
  152. package/dist/components/ui/sheet.js +20 -21
  153. package/dist/components/ui/sheet.js.map +1 -1
  154. package/dist/components/ui/sidebar.d.ts +23 -23
  155. package/dist/components/ui/sidebar.js +1 -2
  156. package/dist/components/ui/sidebar.js.map +1 -1
  157. package/dist/components/ui/skeleton.d.ts +1 -1
  158. package/dist/components/ui/skeleton.js +1 -2
  159. package/dist/components/ui/skeleton.js.map +1 -1
  160. package/dist/components/ui/slider.js +1 -2
  161. package/dist/components/ui/slider.js.map +1 -1
  162. package/dist/components/ui/sonamu-filter/constants.js +1 -2
  163. package/dist/components/ui/sonamu-filter/constants.js.map +1 -1
  164. package/dist/components/ui/sonamu-filter/rule-row-input.d.ts +1 -1
  165. package/dist/components/ui/sonamu-filter/rule-row-input.js +1 -2
  166. package/dist/components/ui/sonamu-filter/rule-row-input.js.map +1 -1
  167. package/dist/components/ui/sonamu-filter/sonamu-filter-modal.d.ts +1 -1
  168. package/dist/components/ui/sonamu-filter/sonamu-filter-modal.js +2 -3
  169. package/dist/components/ui/sonamu-filter/sonamu-filter-modal.js.map +1 -1
  170. package/dist/components/ui/sonamu-filter/sonamu-filter-popover.d.ts +1 -1
  171. package/dist/components/ui/sonamu-filter/sonamu-filter-popover.js +1 -2
  172. package/dist/components/ui/sonamu-filter/sonamu-filter-popover.js.map +1 -1
  173. package/dist/components/ui/sonamu-filter/utils.js +2 -3
  174. package/dist/components/ui/sonamu-filter/utils.js.map +1 -1
  175. package/dist/components/ui/sonamu-filter/value-input.d.ts +1 -1
  176. package/dist/components/ui/sonamu-filter/value-input.js +1 -2
  177. package/dist/components/ui/sonamu-filter/value-input.js.map +1 -1
  178. package/dist/components/ui/sonner.d.ts +1 -1
  179. package/dist/components/ui/switch.js +1 -2
  180. package/dist/components/ui/switch.js.map +1 -1
  181. package/dist/components/ui/table.d.ts +8 -8
  182. package/dist/components/ui/table.js +1 -2
  183. package/dist/components/ui/table.js.map +1 -1
  184. package/dist/components/ui/tabs.js +1 -2
  185. package/dist/components/ui/tabs.js.map +1 -1
  186. package/dist/components/ui/tag-input.d.ts +1 -1
  187. package/dist/components/ui/tag-input.js +3 -12
  188. package/dist/components/ui/tag-input.js.map +1 -1
  189. package/dist/components/ui/textarea.js +1 -2
  190. package/dist/components/ui/textarea.js.map +1 -1
  191. package/dist/components/ui/toast.js +18 -19
  192. package/dist/components/ui/toast.js.map +1 -1
  193. package/dist/components/ui/toaster.d.ts +1 -1
  194. package/dist/components/ui/toaster.js +1 -2
  195. package/dist/components/ui/toaster.js.map +1 -1
  196. package/dist/components/ui/toggle-group.js +1 -2
  197. package/dist/components/ui/toggle-group.js.map +1 -1
  198. package/dist/components/ui/toggle.js +17 -17
  199. package/dist/components/ui/toggle.js.map +1 -1
  200. package/dist/components/ui/tooltip.js +1 -2
  201. package/dist/components/ui/tooltip.js.map +1 -1
  202. package/dist/contexts/index.js +1 -2
  203. package/dist/contexts/sonamu-context.d.ts +1 -1
  204. package/dist/contexts/sonamu-context.js +1 -2
  205. package/dist/contexts/sonamu-context.js.map +1 -1
  206. package/dist/demo/App.d.ts +1 -1
  207. package/dist/demo/Layout.d.ts +1 -1
  208. package/dist/demo/components/FormDebugPanel.d.ts +1 -1
  209. package/dist/demo/routeTree.gen.d.ts +37 -37
  210. package/dist/demo/schemas/form-demo.schema.d.ts +8 -8
  211. package/dist/hooks/index.js +1 -2
  212. package/dist/hooks/use-toast.js +2 -3
  213. package/dist/hooks/use-toast.js.map +1 -1
  214. package/dist/i18n/rc-keys.js +1 -2
  215. package/dist/i18n/rc-keys.js.map +1 -1
  216. package/dist/lib/base-helpers.js +3 -3
  217. package/dist/lib/base-helpers.js.map +1 -1
  218. package/dist/lib/caster.d.ts +1 -1
  219. package/dist/lib/caster.js +1 -2
  220. package/dist/lib/caster.js.map +1 -1
  221. package/dist/lib/form-helpers.js +1 -2
  222. package/dist/lib/form-helpers.js.map +1 -1
  223. package/dist/lib/list-helpers.js +1 -2
  224. package/dist/lib/list-helpers.js.map +1 -1
  225. package/dist/lib/modal-helpers.js +1 -2
  226. package/dist/lib/modal-helpers.js.map +1 -1
  227. package/dist/lib/types.js +1 -2
  228. package/dist/lib/types.js.map +1 -1
  229. package/dist/lib/use-mobile.js +7 -9
  230. package/dist/lib/use-mobile.js.map +1 -1
  231. package/dist/lib/utils.js +1 -2
  232. package/dist/lib/utils.js.map +1 -1
  233. package/dist/styles/globals.css +1 -7
  234. package/package.json +69 -67
@@ -1,7 +1,6 @@
1
1
  import * as e from "@radix-ui/react-collapsible";
2
- //#region src/components/ui/collapsible.tsx
2
+ // src/components/ui/collapsible.tsx
3
3
  var t = e.Root, n = e.CollapsibleTrigger, r = e.CollapsibleContent;
4
- //#endregion
5
4
  export { t as Collapsible, r as CollapsibleContent, n as CollapsibleTrigger };
6
5
 
7
6
  //# sourceMappingURL=collapsible.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"collapsible.js","names":[],"sources":["../../../src/components/ui/collapsible.tsx"],"sourcesContent":["import * as CollapsiblePrimitive from \"@radix-ui/react-collapsible\";\n\nconst Collapsible = CollapsiblePrimitive.Root;\n\nconst CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;\n\nconst CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;\n\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent };\n"],"mappings":";;AAEA,IAAM,IAAc,EAAqB,MAEnC,IAAqB,EAAqB,oBAE1C,IAAqB,EAAqB"}
1
+ {"version":3,"file":"collapsible.js","names":["CollapsiblePrimitive","Collapsible","CollapsibleTrigger","CollapsibleContent"],"sources":["../../../src/components/ui/collapsible.tsx"],"sourcesContent":["import * as CollapsiblePrimitive from \"@radix-ui/react-collapsible\";\n\nconst Collapsible = CollapsiblePrimitive.Root;\n\nconst CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger;\n\nconst CollapsibleContent = CollapsiblePrimitive.CollapsibleContent;\n\nexport { Collapsible, CollapsibleTrigger, CollapsibleContent };\n"],"mappings":";;AAEA,IAAMC,IAAcD,EAAqB,MAEnCE,IAAqBF,EAAqB,oBAE1CG,IAAqBH,EAAqB"}
@@ -9,7 +9,7 @@ import { Command as o, CommandEmpty as s, CommandGroup as c, CommandInput as l,
9
9
  import { Popover as f, PopoverContent as p, PopoverTrigger as m } from "./popover.js";
10
10
  import * as h from "react";
11
11
  import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
12
- //#region src/components/ui/combobox.tsx
12
+ // src/components/ui/combobox.tsx
13
13
  var y = h.forwardRef(({ options: y, name: b, value: x, onValueChange: S, onBlur: C, placeholder: w, searchPlaceholder: T, emptyText: E, disabled: D = !1, className: O, clearable: k = !1 }, A) => {
14
14
  let { SD: j } = a(), [M, N] = h.useState(!1), P = h.useRef(null), F = w ?? j("rc.combobox.selectPlaceholder"), I = T ?? j("common.searchPlaceholder"), L = E ?? j("rc.combobox.noResults");
15
15
  h.useImperativeHandle(A, () => P.current);
@@ -62,7 +62,6 @@ var y = h.forwardRef(({ options: y, name: b, value: x, onValueChange: S, onBlur:
62
62
  })] });
63
63
  });
64
64
  y.displayName = "Combobox";
65
- //#endregion
66
65
  export { y as Combobox };
67
66
 
68
67
  //# sourceMappingURL=combobox.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"combobox.js","names":[],"sources":["../../../src/components/ui/combobox.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport CheckIcon from \"~icons/lucide/check\";\nimport ChevronsUpDownIcon from \"~icons/lucide/chevrons-up-down\";\nimport XCircleIcon from \"~icons/lucide/x-circle\";\n\nimport { useSonamuBaseContext } from \"@/contexts\";\n\nimport { cn } from \"../../lib/utils\";\nimport { Button } from \"./button\";\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from \"./command\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"./popover\";\n\nexport interface ComboboxOption {\n value: string;\n label: string;\n}\n\ninterface ComboboxProps {\n options: ComboboxOption[];\n name?: string;\n value?: string;\n onValueChange?: (value: string | undefined) => void;\n onBlur?: React.FocusEventHandler<HTMLInputElement>;\n placeholder?: string;\n searchPlaceholder?: string;\n emptyText?: string;\n disabled?: boolean;\n className?: string;\n clearable?: boolean;\n}\n\nconst Combobox = React.forwardRef<HTMLInputElement, ComboboxProps>(\n (\n {\n options,\n name,\n value,\n onValueChange,\n onBlur,\n placeholder,\n searchPlaceholder,\n emptyText,\n disabled = false,\n className,\n clearable = false,\n },\n ref,\n ) => {\n const { SD } = useSonamuBaseContext();\n const [open, setOpen] = React.useState(false);\n const inputRef = React.useRef<HTMLInputElement>(null);\n\n // SD 기본값 설정\n const finalPlaceholder = placeholder ?? SD(\"rc.combobox.selectPlaceholder\");\n const finalSearchPlaceholder = searchPlaceholder ?? SD(\"common.searchPlaceholder\");\n const finalEmptyText = emptyText ?? SD(\"rc.combobox.noResults\");\n\n // oxlint-disable-next-line @typescript-eslint/no-non-null-assertion -- useImperativeHandle은 ref가 할당된 후 실행되므로 안전함\n React.useImperativeHandle(ref, () => inputRef.current!);\n\n const handleSelect = (currentValue: string) => {\n const newValue = currentValue === value ? \"\" : currentValue;\n onValueChange?.(newValue || undefined);\n setOpen(false);\n };\n\n const handleClear = (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n onValueChange?.(undefined);\n setOpen(false);\n };\n\n const hasValue = Boolean(value);\n\n return (\n <>\n <input type=\"hidden\" ref={inputRef} name={name} value={value || \"\"} onBlur={onBlur} />\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <Button\n variant=\"outline\"\n role=\"combobox\"\n aria-expanded={open}\n disabled={disabled}\n className={cn(\"w-full justify-between\", className)}\n >\n <span className=\"flex-1 truncate text-left\">\n {value ? options.find((option) => option.value === value)?.label : finalPlaceholder}\n </span>\n <div className=\"flex items-center gap-1 shrink-0 pl-2\">\n {clearable && hasValue && (\n <span\n className=\"flex items-center justify-center\"\n onMouseDown={(e) => e.stopPropagation()}\n onClick={handleClear}\n >\n <XCircleIcon className=\"h-4 w-4 cursor-pointer opacity-50 hover:opacity-100 transition-opacity\" />\n </span>\n )}\n <ChevronsUpDownIcon className=\"h-4 w-4 opacity-50\" />\n </div>\n </Button>\n </PopoverTrigger>\n <PopoverContent className=\"w-full p-0\">\n <Command>\n <CommandInput placeholder={finalSearchPlaceholder} className=\"h-9\" />\n <CommandList>\n <CommandEmpty>{finalEmptyText}</CommandEmpty>\n <CommandGroup>\n {options.map((option) => (\n <CommandItem key={option.value} value={option.value} onSelect={handleSelect}>\n {option.label}\n <CheckIcon\n className={cn(\n \"ml-auto\",\n value === option.value ? \"opacity-100\" : \"opacity-0\",\n )}\n />\n </CommandItem>\n ))}\n </CommandGroup>\n </CommandList>\n </Command>\n </PopoverContent>\n </Popover>\n </>\n );\n },\n);\n\nCombobox.displayName = \"Combobox\";\n\nexport { Combobox };\n"],"mappings":";;;;;;;;;;;;AAwCA,IAAM,IAAW,EAAM,YAEnB,EACE,YACA,SACA,UACA,kBACA,WACA,gBACA,sBACA,cACA,cAAW,IACX,cACA,eAAY,MAEd,MACG;CACH,IAAM,EAAE,UAAO,EAAqB,GAC9B,CAAC,GAAM,KAAW,EAAM,SAAS,EAAK,GACtC,IAAW,EAAM,OAAyB,IAAI,GAG9C,IAAmB,KAAe,EAAG,+BAA+B,GACpE,IAAyB,KAAqB,EAAG,0BAA0B,GAC3E,IAAiB,KAAa,EAAG,uBAAuB;CAG9D,EAAM,oBAAoB,SAAW,EAAS,OAAQ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,WACA,MAAU,EAAO,QAAQ,gBAAgB,WAC3C,EACD,CAAA,CACU;MARK,EAAO,KAQZ,CACd,EACW,CAAA,CACH,EAAA,CAAA,CACN,EAAA,CAAA;EACK,CAAA,CACT;GACT,EAAA,CAAA;AAEN,CACF;AAEA,EAAS,cAAc"}
1
+ {"version":3,"file":"combobox.js","names":["React","_Fragment","XCircleIcon","ChevronsUpDownIcon","CheckIcon","ForwardRef","ForwardRef$1","ForwardRef$2","React$1","Combobox","useSonamuBaseContext","open","setOpen","inputRef","finalPlaceholder","placeholder","SD","finalSearchPlaceholder","searchPlaceholder","finalEmptyText","emptyText","ref","handleSelect","onValueChange","currentValue","value","handleClear","hasValue","Fragment","Popover","PopoverTrigger","Button","cn","className","options","option","clearable","PopoverContent","Command","CommandInput","CommandList","CommandEmpty","CommandGroup","CommandItem"],"sources":["../../../src/components/ui/combobox.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport CheckIcon from \"~icons/lucide/check\";\nimport ChevronsUpDownIcon from \"~icons/lucide/chevrons-up-down\";\nimport XCircleIcon from \"~icons/lucide/x-circle\";\n\nimport { useSonamuBaseContext } from \"@/contexts\";\n\nimport { cn } from \"../../lib/utils\";\nimport { Button } from \"./button\";\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from \"./command\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"./popover\";\n\nexport interface ComboboxOption {\n value: string;\n label: string;\n}\n\ninterface ComboboxProps {\n options: ComboboxOption[];\n name?: string;\n value?: string;\n onValueChange?: (value: string | undefined) => void;\n onBlur?: React.FocusEventHandler<HTMLInputElement>;\n placeholder?: string;\n searchPlaceholder?: string;\n emptyText?: string;\n disabled?: boolean;\n className?: string;\n clearable?: boolean;\n}\n\nconst Combobox = React.forwardRef<HTMLInputElement, ComboboxProps>(\n (\n {\n options,\n name,\n value,\n onValueChange,\n onBlur,\n placeholder,\n searchPlaceholder,\n emptyText,\n disabled = false,\n className,\n clearable = false,\n },\n ref,\n ) => {\n const { SD } = useSonamuBaseContext();\n const [open, setOpen] = React.useState(false);\n const inputRef = React.useRef<HTMLInputElement>(null);\n\n // SD 기본값 설정\n const finalPlaceholder = placeholder ?? SD(\"rc.combobox.selectPlaceholder\");\n const finalSearchPlaceholder = searchPlaceholder ?? SD(\"common.searchPlaceholder\");\n const finalEmptyText = emptyText ?? SD(\"rc.combobox.noResults\");\n\n // oxlint-disable-next-line @typescript-eslint/no-non-null-assertion -- useImperativeHandle은 ref가 할당된 후 실행되므로 안전함\n React.useImperativeHandle(ref, () => inputRef.current!);\n\n const handleSelect = (currentValue: string) => {\n const newValue = currentValue === value ? \"\" : currentValue;\n onValueChange?.(newValue || undefined);\n setOpen(false);\n };\n\n const handleClear = (e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n onValueChange?.(undefined);\n setOpen(false);\n };\n\n const hasValue = Boolean(value);\n\n return (\n <>\n <input type=\"hidden\" ref={inputRef} name={name} value={value || \"\"} onBlur={onBlur} />\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <Button\n variant=\"outline\"\n role=\"combobox\"\n aria-expanded={open}\n disabled={disabled}\n className={cn(\"w-full justify-between\", className)}\n >\n <span className=\"flex-1 truncate text-left\">\n {value ? options.find((option) => option.value === value)?.label : finalPlaceholder}\n </span>\n <div className=\"flex items-center gap-1 shrink-0 pl-2\">\n {clearable && hasValue && (\n <span\n className=\"flex items-center justify-center\"\n onMouseDown={(e) => e.stopPropagation()}\n onClick={handleClear}\n >\n <XCircleIcon className=\"h-4 w-4 cursor-pointer opacity-50 hover:opacity-100 transition-opacity\" />\n </span>\n )}\n <ChevronsUpDownIcon className=\"h-4 w-4 opacity-50\" />\n </div>\n </Button>\n </PopoverTrigger>\n <PopoverContent className=\"w-full p-0\">\n <Command>\n <CommandInput placeholder={finalSearchPlaceholder} className=\"h-9\" />\n <CommandList>\n <CommandEmpty>{finalEmptyText}</CommandEmpty>\n <CommandGroup>\n {options.map((option) => (\n <CommandItem key={option.value} value={option.value} onSelect={handleSelect}>\n {option.label}\n <CheckIcon\n className={cn(\n \"ml-auto\",\n value === option.value ? \"opacity-100\" : \"opacity-0\",\n )}\n />\n </CommandItem>\n ))}\n </CommandGroup>\n </CommandList>\n </Command>\n </PopoverContent>\n </Popover>\n </>\n );\n },\n);\n\nCombobox.displayName = \"Combobox\";\n\nexport { Combobox };\n"],"mappings":";;;;;;;;;;;;AAwCA,IAAMS,IAAWT,EAAM,YAEnB,EACE,YACA,SACA,UACA,kBACA,WACA,gBACA,sBACA,cACA,cAAW,IACX,cACA,eAAY,MAEd,MACG;CACH,IAAM,EAAE,UAAOU,EAAqB,GAC9B,CAACC,GAAMC,KAAWZ,EAAM,SAAS,EAAK,GACtCa,IAAWb,EAAM,OAAyB,IAAI,GAG9Cc,IAAmBC,KAAeC,EAAG,+BAA+B,GACpEC,IAAyBC,KAAqBF,EAAG,0BAA0B,GAC3EG,IAAiBC,KAAaJ,EAAG,uBAAuB;CAG9D,EAAM,oBAAoBK,SAAWR,EAAS,OAAQ;CAEtD,IAAMS,KAAgB,MAAyB;EAG7C,AADAC,KADiBC,MAAiBC,IAAQ,KAAKD,MACnB,KAAA,CAAS,GACrCZ,EAAQ,EAAK;CACf,GAEMc,KAAe,MAAwB;EAI3C,AAHA,EAAE,eAAe,GACjB,EAAE,gBAAgB,GAClBH,IAAgB,KAAA,CAAS,GACzBX,EAAQ,EAAK;CACf,GAEMe,IAAW,EAAQF;CAEzB,OACE,kBAAAxB,GAAA,EAAA,UAAA,CACE,kBAAC,SAAD;EAAO,MAAK;EAAS,KAAKY;EAAgB;EAAM,OAAOY,KAAS;EAAY;CAAS,CAAA,GACrF,kBAACI,GAAD;EAAe;EAAM,cAAcjB;EAAnC,UAAA,CACE,kBAACkB,GAAD;GAAgB,SAAA;GACd,UAAA,kBAACC,GAAD;IACE,SAAQ;IACR,MAAK;IACL,iBAAepB;IACL;IACV,WAAWqB,EAAG,0BAA0BC,CAAS;IALnD,UAAA,CAOE,kBAAC,QAAD;KAAM,WAAU;KACb,UAAAR,IAAQS,EAAQ,MAAM,MAAWC,EAAO,UAAUV,CAAK,CAAC,EAAE,QAAQX;IAC/D,CAAA,GACN,kBAAC,OAAD;KAAK,WAAU;KAAf,UAAA,CACGsB,KAAaT,KACZ,kBAAC,QAAD;MACE,WAAU;MACV,cAAc,MAAM,EAAE,gBAAgB;MACtC,SAASD;MAET,UAAA,kBAACxB,GAAD,EAAa,WAAU,yEAA0E,CAAA;KAC7F,CAAA,GAER,kBAACC,GAAD,EAAoB,WAAU,qBAAsB,CAAA,CACjD;IACC,CAAA,CAAA;;EACM,CAAA,GAChB,kBAACkC,GAAD;GAAgB,WAAU;GACxB,UAAA,kBAACC,GAAD,EAAA,UAAA,CACE,kBAACC,GAAD;IAAc,aAAatB;IAAwB,WAAU;GAAO,CAAA,GACpE,kBAACuB,GAAD,EAAA,UAAA,CACE,kBAACC,GAAD,EAAA,UAAetB,EAA6B,CAAA,GAC5C,kBAACuB,GAAD,EAAA,UACGR,EAAQ,KAAK,MACZ,kBAACS,GAAD;IAAgC,OAAOR,EAAO;IAAO,UAAUb;IAA/D,UAAA,CACGa,EAAO,OACR,kBAAC/B,GAAD,EACE,WAAW4B,EACT,WACAP,MAAUU,EAAO,QAAQ,gBAAgB,WAC3C,EACD,CAAA,CACU;GARK,GAAAA,EAAO,KAQZ,CACd,EACW,CAAA,CACH,EAAA,CAAA,CACN,EAAA,CAAA;EACK,CAAA,CACT;CACT,CAAA,CAAA,EAAA,CAAA;AAEN,CACF;AAEA,EAAS,cAAc"}
@@ -21,7 +21,7 @@ declare const Command: React.ForwardRefExoticComponent<Omit<{
21
21
  type CommandDialogProps = DialogProps & {
22
22
  commandProps?: React.ComponentPropsWithoutRef<typeof CommandPrimitive>;
23
23
  };
24
- declare const CommandDialog: ({ children, commandProps, ...props }: CommandDialogProps) => import("react/jsx-runtime").JSX.Element;
24
+ declare const CommandDialog: ({ children, commandProps, ...props }: CommandDialogProps) => React.JSX.Element;
25
25
  declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof React.InputHTMLAttributes<HTMLInputElement>> & {
26
26
  ref?: React.Ref<HTMLInputElement>;
27
27
  } & {
@@ -78,7 +78,7 @@ declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
78
78
  forceMount?: boolean;
79
79
  } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
80
80
  declare const CommandShortcut: {
81
- ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
81
+ ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element;
82
82
  displayName: string;
83
83
  };
84
84
  export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
@@ -5,7 +5,7 @@ import { Dialog as n, DialogContent as r } from "./dialog.js";
5
5
  import * as i from "react";
6
6
  import { jsx as a, jsxs as o } from "react/jsx-runtime";
7
7
  import { Command as s } from "cmdk";
8
- //#region src/components/ui/command.tsx
8
+ // src/components/ui/command.tsx
9
9
  var c = i.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ a(s, {
10
10
  ref: r,
11
11
  className: e("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground", t),
@@ -70,7 +70,6 @@ var g = ({ className: t, ...n }) => /* @__PURE__ */ a("span", {
70
70
  ...n
71
71
  });
72
72
  g.displayName = "CommandShortcut";
73
- //#endregion
74
73
  export { c as Command, l as CommandDialog, f as CommandEmpty, p as CommandGroup, u as CommandInput, h as CommandItem, d as CommandList, m as CommandSeparator, g as CommandShortcut };
75
74
 
76
75
  //# sourceMappingURL=command.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"command.js","names":[],"sources":["../../../src/components/ui/command.tsx"],"sourcesContent":["\"use client\";\n\nimport { type DialogProps } from \"@radix-ui/react-dialog\";\nimport { Command as CommandPrimitive } from \"cmdk\";\nimport * as React from \"react\";\nimport SearchIcon from \"~icons/lucide/search\";\n\nimport { cn } from \"../../lib/utils\";\nimport { Dialog, DialogContent } from \"./dialog\";\n\nconst Command = React.forwardRef<\n React.ComponentRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n \"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground\",\n className,\n )}\n {...props}\n />\n));\nCommand.displayName = CommandPrimitive.displayName;\n\ntype CommandDialogProps = DialogProps & {\n commandProps?: React.ComponentPropsWithoutRef<typeof CommandPrimitive>;\n};\n\nconst CommandDialog = ({ children, commandProps, ...props }: CommandDialogProps) => {\n const { className: commandClassName, ...restCommandProps } = commandProps ?? {};\n return (\n <Dialog {...props}>\n <DialogContent className=\"overflow-hidden p-0 shadow-lg\">\n <Command\n className={cn(\n \"**:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 **:[[cmdk-group]]:px-2 **:[[cmdk-input-wrapper]_svg]:size-5 **:[[cmdk-input]]:h-12 **:[[cmdk-item]]:px-2 **:[[cmdk-item]]:py-3 **:[[cmdk-item]_svg]:size-5\",\n commandClassName,\n )}\n {...restCommandProps}\n >\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n};\n\nconst CommandInput = React.forwardRef<\n React.ComponentRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n <div className=\"flex items-center border-b px-3\" cmdk-input-wrapper=\"\">\n <SearchIcon className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n \"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n />\n </div>\n));\n\nCommandInput.displayName = CommandPrimitive.Input.displayName;\n\nconst CommandList = React.forwardRef<\n React.ComponentRef<typeof CommandPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn(\"max-h-[300px] overflow-y-auto overflow-x-hidden\", className)}\n {...props}\n />\n));\n\nCommandList.displayName = CommandPrimitive.List.displayName;\n\nconst CommandEmpty = React.forwardRef<\n React.ComponentRef<typeof CommandPrimitive.Empty>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>((props, ref) => (\n <CommandPrimitive.Empty ref={ref} className=\"py-6 text-center text-sm\" {...props} />\n));\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName;\n\nconst CommandGroup = React.forwardRef<\n React.ComponentRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n \"overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground\",\n className,\n )}\n {...props}\n />\n));\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName;\n\nconst CommandSeparator = React.forwardRef<\n React.ComponentRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 h-px bg-border\", className)}\n {...props}\n />\n));\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName;\n\nconst CommandItem = React.forwardRef<\n React.ComponentRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 **:[svg]:pointer-events-none **:[svg]:size-4 **:[svg]:shrink-0\",\n className,\n )}\n {...props}\n />\n));\n\nCommandItem.displayName = CommandPrimitive.Item.displayName;\n\nconst CommandShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\"ml-auto text-xs tracking-widest text-muted-foreground\", className)}\n {...props}\n />\n );\n};\nCommandShortcut.displayName = \"CommandShortcut\";\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n};\n"],"mappings":";;;;;;;;AAUA,IAAM,IAAU,EAAM,YAGnB,EAAE,cAAW,GAAG,KAAS,MAC1B,kBAAC,GAAD;CACO;CACL,WAAW,EACT,6FACA,CACF;CACA,GAAI;AACL,CAAA,CACF;AACD,EAAQ,cAAc,EAAiB;AAMvC,IAAM,KAAiB,EAAE,aAAU,iBAAc,GAAG,QAAgC;CAClF,IAAM,EAAE,WAAW,GAAkB,GAAG,MAAqB,KAAgB,CAAC;CAC9E,OACE,kBAAC,GAAD;EAAQ,GAAI;YACV,kBAAC,GAAD;GAAe,WAAU;aACvB,kBAAC,GAAD;IACE,WAAW,EACT,qUACA,CACF;IACA,GAAI;IAEH;GACM,CAAA;EACI,CAAA;CACT,CAAA;AAEZ,GAEM,IAAe,EAAM,YAGxB,EAAE,cAAW,GAAG,KAAS,MAC1B,kBAAC,OAAD;CAAK,WAAU;CAAkC,sBAAmB;WAApE,CACE,kBAAC,GAAD,EAAY,WAAU,mCAAoC,CAAA,GAC1D,kBAAC,EAAiB,OAAlB;EACO;EACL,WAAW,EACT,0JACA,CACF;EACA,GAAI;CACL,CAAA,CACE;EACN;AAED,EAAa,cAAc,EAAiB,MAAM;AAElD,IAAM,IAAc,EAAM,YAGvB,EAAE,cAAW,GAAG,KAAS,MAC1B,kBAAC,EAAiB,MAAlB;CACO;CACL,WAAW,EAAG,mDAAmD,CAAS;CAC1E,GAAI;AACL,CAAA,CACF;AAED,EAAY,cAAc,EAAiB,KAAK;AAEhD,IAAM,IAAe,EAAM,YAGxB,GAAO,MACR,kBAAC,EAAiB,OAAlB;CAA6B;CAAK,WAAU;CAA2B,GAAI;AAAQ,CAAA,CACpF;AAED,EAAa,cAAc,EAAiB,MAAM;AAElD,IAAM,IAAe,EAAM,YAGxB,EAAE,cAAW,GAAG,KAAS,MAC1B,kBAAC,EAAiB,OAAlB;CACO;CACL,WAAW,EACT,+NACA,CACF;CACA,GAAI;AACL,CAAA,CACF;AAED,EAAa,cAAc,EAAiB,MAAM;AAElD,IAAM,IAAmB,EAAM,YAG5B,EAAE,cAAW,GAAG,KAAS,MAC1B,kBAAC,EAAiB,WAAlB;CACO;CACL,WAAW,EAAG,wBAAwB,CAAS;CAC/C,GAAI;AACL,CAAA,CACF;AACD,EAAiB,cAAc,EAAiB,UAAU;AAE1D,IAAM,IAAc,EAAM,YAGvB,EAAE,cAAW,GAAG,KAAS,MAC1B,kBAAC,EAAiB,MAAlB;CACO;CACL,WAAW,EACT,gUACA,CACF;CACA,GAAI;AACL,CAAA,CACF;AAED,EAAY,cAAc,EAAiB,KAAK;AAEhD,IAAM,KAAmB,EAAE,cAAW,GAAG,QAErC,kBAAC,QAAD;CACE,WAAW,EAAG,yDAAyD,CAAS;CAChF,GAAI;AACL,CAAA;AAGL,EAAgB,cAAc"}
1
+ {"version":3,"file":"command.js","names":["Command","React","CommandPrimitive","SearchIcon","ForwardRef","React$1","Command$1","props","Command","cn","className","CommandDialog","commandClassName","restCommandProps","commandProps","Dialog","DialogContent","CommandInput","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem","CommandShortcut"],"sources":["../../../src/components/ui/command.tsx"],"sourcesContent":["\"use client\";\n\nimport { type DialogProps } from \"@radix-ui/react-dialog\";\nimport { Command as CommandPrimitive } from \"cmdk\";\nimport * as React from \"react\";\nimport SearchIcon from \"~icons/lucide/search\";\n\nimport { cn } from \"../../lib/utils\";\nimport { Dialog, DialogContent } from \"./dialog\";\n\nconst Command = React.forwardRef<\n React.ComponentRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n \"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground\",\n className,\n )}\n {...props}\n />\n));\nCommand.displayName = CommandPrimitive.displayName;\n\ntype CommandDialogProps = DialogProps & {\n commandProps?: React.ComponentPropsWithoutRef<typeof CommandPrimitive>;\n};\n\nconst CommandDialog = ({ children, commandProps, ...props }: CommandDialogProps) => {\n const { className: commandClassName, ...restCommandProps } = commandProps ?? {};\n return (\n <Dialog {...props}>\n <DialogContent className=\"overflow-hidden p-0 shadow-lg\">\n <Command\n className={cn(\n \"**:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 **:[[cmdk-group]]:px-2 **:[[cmdk-input-wrapper]_svg]:size-5 **:[[cmdk-input]]:h-12 **:[[cmdk-item]]:px-2 **:[[cmdk-item]]:py-3 **:[[cmdk-item]_svg]:size-5\",\n commandClassName,\n )}\n {...restCommandProps}\n >\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n};\n\nconst CommandInput = React.forwardRef<\n React.ComponentRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n <div className=\"flex items-center border-b px-3\" cmdk-input-wrapper=\"\">\n <SearchIcon className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n \"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n />\n </div>\n));\n\nCommandInput.displayName = CommandPrimitive.Input.displayName;\n\nconst CommandList = React.forwardRef<\n React.ComponentRef<typeof CommandPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn(\"max-h-[300px] overflow-y-auto overflow-x-hidden\", className)}\n {...props}\n />\n));\n\nCommandList.displayName = CommandPrimitive.List.displayName;\n\nconst CommandEmpty = React.forwardRef<\n React.ComponentRef<typeof CommandPrimitive.Empty>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>((props, ref) => (\n <CommandPrimitive.Empty ref={ref} className=\"py-6 text-center text-sm\" {...props} />\n));\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName;\n\nconst CommandGroup = React.forwardRef<\n React.ComponentRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n \"overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground\",\n className,\n )}\n {...props}\n />\n));\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName;\n\nconst CommandSeparator = React.forwardRef<\n React.ComponentRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 h-px bg-border\", className)}\n {...props}\n />\n));\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName;\n\nconst CommandItem = React.forwardRef<\n React.ComponentRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 **:[svg]:pointer-events-none **:[svg]:size-4 **:[svg]:shrink-0\",\n className,\n )}\n {...props}\n />\n));\n\nCommandItem.displayName = CommandPrimitive.Item.displayName;\n\nconst CommandShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\"ml-auto text-xs tracking-widest text-muted-foreground\", className)}\n {...props}\n />\n );\n};\nCommandShortcut.displayName = \"CommandShortcut\";\n\nexport {\n Command,\n CommandDialog,\n CommandInput,\n CommandList,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandShortcut,\n CommandSeparator,\n};\n"],"mappings":";;;;;;;;AAUA,IAAMA,IAAUC,EAAM,YAGnB,EAAE,cAAW,GAAGM,KAAS,MAC1B,kBAACL,GAAD;CACO;CACL,WAAWO,EACT,6FACAC,CACF;CACA,GAAIH;AACL,CAAA,CACF;AACD,EAAQ,cAAcL,EAAiB;AAMvC,IAAMS,KAAiB,EAAE,aAAU,iBAAc,GAAGJ,QAAgC;CAClF,IAAM,EAAE,WAAWK,GAAkB,GAAGC,MAAqBC,KAAgB,CAAC;CAC9E,OACE,kBAACC,GAAD;EAAQ,GAAIR;EACV,UAAA,kBAACS,GAAD;GAAe,WAAU;GACvB,UAAA,kBAAChB,GAAD;IACE,WAAWS,EACT,qUACAG,CACF;IACA,GAAIC;IAEH;GACM,CAAA;EACI,CAAA;CACT,CAAA;AAEZ,GA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AAGhB,QAErC,kBAAC,QAAD;CACE,WAAWE,EAAG,yDAAyDC,CAAS;CAChF,GAAIH;AACL,CAAA;AAGL,EAAgB,cAAc"}
@@ -19,7 +19,7 @@ export declare const commonModalAtom: import('jotai').PrimitiveAtom<{
19
19
  type CommonModalProps = {
20
20
  className?: string;
21
21
  };
22
- export declare function CommonModal({ className }: CommonModalProps): import("react/jsx-runtime").JSX.Element;
22
+ export declare function CommonModal({ className }: CommonModalProps): React.JSX.Element;
23
23
  export declare function useCommonModal(): {
24
24
  open: boolean;
25
25
  reactNode: React.ReactNode;
@@ -4,7 +4,7 @@ import { Dialog as t, DialogContent as n, DialogDescription as r, DialogHeader a
4
4
  import { useEffect as o } from "react";
5
5
  import { jsx as s, jsxs as c } from "react/jsx-runtime";
6
6
  import { atom as l, useAtom as u } from "jotai";
7
- //#region src/components/ui/common-modal.tsx
7
+ // src/components/ui/common-modal.tsx
8
8
  var d = l({
9
9
  open: !1,
10
10
  reactNode: null
@@ -58,7 +58,6 @@ function p() {
58
58
  }
59
59
  };
60
60
  }
61
- //#endregion
62
61
  export { f as CommonModal, d as commonModalAtom, p as useCommonModal };
63
62
 
64
63
  //# sourceMappingURL=common-modal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"common-modal.js","names":[],"sources":["../../../src/components/ui/common-modal.tsx"],"sourcesContent":["\"use client\";\n\nimport { atom, useAtom } from \"jotai\";\nimport type * as React from \"react\";\nimport { useEffect } from \"react\";\n\nimport { cn } from \"../../lib/utils\";\nimport { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from \"./dialog\";\n\ntype ExtendedModalProps<CompletionData = unknown> = {\n title?: string;\n description?: string;\n className?: string;\n onCompleted?: (data?: CompletionData) => void;\n onControlledOpen?: () => void;\n onControlledClose?: () => void;\n};\n\nexport const commonModalAtom = atom<\n {\n open: boolean;\n reactNode: React.ReactNode | null;\n } & ExtendedModalProps\n>({\n open: false,\n reactNode: null,\n});\n\ntype CommonModalProps = {\n className?: string;\n};\n\nexport function CommonModal({ className }: CommonModalProps) {\n const [atomValue, setAtomValue] = useAtom(commonModalAtom);\n const {\n open,\n reactNode,\n title,\n description,\n className: modalClassName,\n onControlledOpen,\n onControlledClose,\n } = atomValue;\n\n const closeAndClear = () => {\n if (onControlledClose) {\n onControlledClose();\n }\n setAtomValue({\n open: false,\n reactNode: null,\n });\n };\n\n useEffect(() => {\n if (open && onControlledOpen) {\n onControlledOpen();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open]);\n\n return (\n <Dialog\n open={open}\n onOpenChange={(isOpen) => {\n if (!isOpen) {\n closeAndClear();\n }\n }}\n >\n <DialogContent className={cn(\"max-w-4xl\", modalClassName, className)}>\n <DialogHeader>\n <DialogTitle className={!title ? \"sr-only\" : undefined}>{title || \"Modal\"}</DialogTitle>\n <DialogDescription className={!description ? \"sr-only\" : undefined}>\n {description || \"Modal content\"}\n </DialogDescription>\n </DialogHeader>\n {reactNode}\n </DialogContent>\n </Dialog>\n );\n}\n\nexport function useCommonModal() {\n const [atomValue, setAtomValue] = useAtom(commonModalAtom);\n const { open, reactNode, onCompleted } = atomValue;\n\n const openModal = (content: React.ReactNode, props?: ExtendedModalProps) => {\n setAtomValue({\n open: true,\n reactNode: content,\n ...props,\n });\n };\n\n const closeModal = () => {\n setAtomValue({\n open: false,\n reactNode: null,\n });\n };\n\n const doneModal = <CompletionData,>(data?: CompletionData) => {\n closeModal();\n if (onCompleted) {\n onCompleted(data);\n }\n };\n\n return {\n open,\n reactNode,\n openModal,\n closeModal,\n doneModal,\n };\n}\n"],"mappings":";;;;;;;AAkBA,IAAa,IAAkB,EAK7B;CACA,MAAM;CACN,WAAW;AACb,CAAC;AAMD,SAAgB,EAAY,EAAE,gBAA+B;CAC3D,IAAM,CAAC,GAAW,KAAgB,EAAQ,CAAe,GACnD,EACJ,SACA,cACA,UACA,gBACA,WAAW,GACX,qBACA,yBACE,GAEE,UAAsB;EAI1B,AAHI,KACF,EAAkB,GAEpB,EAAa;GACX,MAAM;GACN,WAAW;EACb,CAAC;CACH;CASA,OAPA,QAAgB;EACd,AAAI,KAAQ,KACV,EAAiB;CAGrB,GAAG,CAAC,CAAI,CAAC,GAGP,kBAAC,GAAD;EACQ;EACN,eAAe,MAAW;GACxB,AAAK,KACH,EAAc;EAElB;YAEA,kBAAC,GAAD;GAAe,WAAW,EAAG,aAAa,GAAgB,CAAS;aAAnE,CACE,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD;IAAa,WAAY,IAAoB,KAAA,IAAZ;cAAwB,KAAS;GAAqB,CAAA,GACvF,kBAAC,GAAD;IAAmB,WAAY,IAA0B,KAAA,IAAZ;cAC1C,KAAe;GACC,CAAA,CACP,EAAA,CAAA,GACb,CACY;;CACT,CAAA;AAEZ;AAEA,SAAgB,IAAiB;CAC/B,IAAM,CAAC,GAAW,KAAgB,EAAQ,CAAe,GACnD,EAAE,SAAM,cAAW,mBAAgB,GAEnC,KAAa,GAA0B,MAA+B;EAC1E,EAAa;GACX,MAAM;GACN,WAAW;GACX,GAAG;EACL,CAAC;CACH,GAEM,UAAmB;EACvB,EAAa;GACX,MAAM;GACN,WAAW;EACb,CAAC;CACH;CASA,OAAO;EACL;EACA;EACA;EACA;EACA,YAZkC,MAA0B;GAE5D,AADA,EAAW,GACP,KACF,EAAY,CAAI;EAEpB;CAQA;AACF"}
1
+ {"version":3,"file":"common-modal.js","names":["commonModalAtom","atom","CommonModal","atomValue","setAtomValue","useAtom","modalClassName","closeAndClear","onControlledClose","useEffect","open","onControlledOpen","Dialog","isOpen","DialogContent","cn","className","DialogHeader","DialogTitle","title","DialogDescription","description","reactNode","useCommonModal","openModal","content","props","closeModal","onCompleted","data"],"sources":["../../../src/components/ui/common-modal.tsx"],"sourcesContent":["\"use client\";\n\nimport { atom, useAtom } from \"jotai\";\nimport type * as React from \"react\";\nimport { useEffect } from \"react\";\n\nimport { cn } from \"../../lib/utils\";\nimport { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from \"./dialog\";\n\ntype ExtendedModalProps<CompletionData = unknown> = {\n title?: string;\n description?: string;\n className?: string;\n onCompleted?: (data?: CompletionData) => void;\n onControlledOpen?: () => void;\n onControlledClose?: () => void;\n};\n\nexport const commonModalAtom = atom<\n {\n open: boolean;\n reactNode: React.ReactNode | null;\n } & ExtendedModalProps\n>({\n open: false,\n reactNode: null,\n});\n\ntype CommonModalProps = {\n className?: string;\n};\n\nexport function CommonModal({ className }: CommonModalProps) {\n const [atomValue, setAtomValue] = useAtom(commonModalAtom);\n const {\n open,\n reactNode,\n title,\n description,\n className: modalClassName,\n onControlledOpen,\n onControlledClose,\n } = atomValue;\n\n const closeAndClear = () => {\n if (onControlledClose) {\n onControlledClose();\n }\n setAtomValue({\n open: false,\n reactNode: null,\n });\n };\n\n useEffect(() => {\n if (open && onControlledOpen) {\n onControlledOpen();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open]);\n\n return (\n <Dialog\n open={open}\n onOpenChange={(isOpen) => {\n if (!isOpen) {\n closeAndClear();\n }\n }}\n >\n <DialogContent className={cn(\"max-w-4xl\", modalClassName, className)}>\n <DialogHeader>\n <DialogTitle className={!title ? \"sr-only\" : undefined}>{title || \"Modal\"}</DialogTitle>\n <DialogDescription className={!description ? \"sr-only\" : undefined}>\n {description || \"Modal content\"}\n </DialogDescription>\n </DialogHeader>\n {reactNode}\n </DialogContent>\n </Dialog>\n );\n}\n\nexport function useCommonModal() {\n const [atomValue, setAtomValue] = useAtom(commonModalAtom);\n const { open, reactNode, onCompleted } = atomValue;\n\n const openModal = (content: React.ReactNode, props?: ExtendedModalProps) => {\n setAtomValue({\n open: true,\n reactNode: content,\n ...props,\n });\n };\n\n const closeModal = () => {\n setAtomValue({\n open: false,\n reactNode: null,\n });\n };\n\n const doneModal = <CompletionData,>(data?: CompletionData) => {\n closeModal();\n if (onCompleted) {\n onCompleted(data);\n }\n };\n\n return {\n open,\n reactNode,\n openModal,\n closeModal,\n doneModal,\n };\n}\n"],"mappings":";;;;;;;AAkBA,IAAaA,IAAkBC,EAK7B;CACA,MAAM;CACN,WAAW;AACb,CAAC;AAMD,SAAgBC,EAAY,EAAE,gBAA+B;CAC3D,IAAM,CAACC,GAAWC,KAAgBC,EAAQL,CAAe,GACnD,EACJ,SACA,cACA,UACA,gBACA,WAAWM,GACX,qBACA,yBACEH,GAEEI,UAAsB;EAI1B,AAHIC,KACFA,EAAkB,GAEpBJ,EAAa;GACX,MAAM;GACN,WAAW;EACb,CAAC;CACH;CASA,OAPAK,QAAgB;EACd,AAAIC,KAAQC,KACVA,EAAiB;CAGrB,GAAG,CAACD,CAAI,CAAC,GAGP,kBAACE,GAAD;EACQ;EACN,eAAe,MAAW;GACxB,AAAKC,KACHN,EAAc;EAElB;EAEA,UAAA,kBAACO,GAAD;GAAe,WAAWC,EAAG,aAAaT,GAAgBU,CAAS;GAAnE,UAAA,CACE,kBAACC,GAAD,EAAA,UAAA,CACE,kBAACC,GAAD;IAAa,WAAYC,IAAoB,KAAA,IAAZ;IAAwB,UAAAA,KAAS;GAAqB,CAAA,GACvF,kBAACC,GAAD;IAAmB,WAAYC,IAA0B,KAAA,IAAZ;IAC1C,UAAAA,KAAe;GACC,CAAA,CACP,EAAA,CAAA,GACbC,CACY;;CACT,CAAA;AAEZ;AAEA,SAAgBC,IAAiB;CAC/B,IAAM,CAACpB,GAAWC,KAAgBC,EAAQL,CAAe,GACnD,EAAE,SAAM,cAAW,mBAAgBG,GAEnCqB,KAAa,GAA0B,MAA+B;EAC1E,EAAa;GACX,MAAM;GACN,WAAWC;GACX,GAAGC;EACL,CAAC;CACH,GAEMC,UAAmB;EACvB,EAAa;GACX,MAAM;GACN,WAAW;EACb,CAAC;CACH;CASA,OAAO;EACL;EACA;EACA;EACA;EACA,YAZkC,MAA0B;GAE5D,AADAA,EAAW,GACPC,KACFA,EAAYC,CAAI;EAEpB;CAQA;AACF"}
@@ -21,7 +21,7 @@ declare const ContextMenuLabel: React.ForwardRefExoticComponent<Omit<ContextMenu
21
21
  } & React.RefAttributes<HTMLDivElement>>;
22
22
  declare const ContextMenuSeparator: React.ForwardRefExoticComponent<Omit<ContextMenuPrimitive.ContextMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
23
23
  declare const ContextMenuShortcut: {
24
- ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
24
+ ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element;
25
25
  displayName: string;
26
26
  };
27
27
  export { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, ContextMenuCheckboxItem, ContextMenuRadioItem, ContextMenuLabel, ContextMenuSeparator, ContextMenuShortcut, ContextMenuGroup, ContextMenuPortal, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuRadioGroup, };
@@ -5,7 +5,7 @@ import r from "../../_virtual/~icons/lucide/circle.js";
5
5
  import * as i from "react";
6
6
  import { jsx as a, jsxs as o } from "react/jsx-runtime";
7
7
  import * as s from "@radix-ui/react-context-menu";
8
- //#region src/components/ui/context-menu.tsx
8
+ // src/components/ui/context-menu.tsx
9
9
  var c = s.Root, l = s.Trigger, u = s.Group, d = s.Portal, f = s.Sub, p = s.RadioGroup, m = i.forwardRef(({ className: n, inset: r, children: i, ...c }, l) => /* @__PURE__ */ o(s.SubTrigger, {
10
10
  ref: l,
11
11
  className: e("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", r && "pl-8", n),
@@ -69,7 +69,6 @@ var S = ({ className: t, ...n }) => /* @__PURE__ */ a("span", {
69
69
  ...n
70
70
  });
71
71
  S.displayName = "ContextMenuShortcut";
72
- //#endregion
73
72
  export { c as ContextMenu, v as ContextMenuCheckboxItem, g as ContextMenuContent, u as ContextMenuGroup, _ as ContextMenuItem, b as ContextMenuLabel, d as ContextMenuPortal, p as ContextMenuRadioGroup, y as ContextMenuRadioItem, x as ContextMenuSeparator, S as ContextMenuShortcut, f as ContextMenuSub, h as ContextMenuSubContent, m as ContextMenuSubTrigger, l as ContextMenuTrigger };
74
73
 
75
74
  //# sourceMappingURL=context-menu.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context-menu.js","names":[],"sources":["../../../src/components/ui/context-menu.tsx"],"sourcesContent":["import * as ContextMenuPrimitive from \"@radix-ui/react-context-menu\";\nimport * as React from \"react\";\nimport CheckIcon from \"~icons/lucide/check\";\nimport ChevronRightIcon from \"~icons/lucide/chevron-right\";\nimport CircleIcon from \"~icons/lucide/circle\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst ContextMenu = ContextMenuPrimitive.Root;\n\nconst ContextMenuTrigger = ContextMenuPrimitive.Trigger;\n\nconst ContextMenuGroup = ContextMenuPrimitive.Group;\n\nconst ContextMenuPortal = ContextMenuPrimitive.Portal;\n\nconst ContextMenuSub = ContextMenuPrimitive.Sub;\n\nconst ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;\n\nconst ContextMenuSubTrigger = React.forwardRef<\n React.ComponentRef<typeof ContextMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n }\n>(({ className, inset, children, ...props }, ref) => (\n <ContextMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto h-4 w-4\" />\n </ContextMenuPrimitive.SubTrigger>\n));\nContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;\n\nconst ContextMenuSubContent = React.forwardRef<\n React.ComponentRef<typeof ContextMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n \"z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-context-menu-content-transform-origin]\",\n className,\n )}\n {...props}\n />\n));\nContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;\n\nconst ContextMenuContent = React.forwardRef<\n React.ComponentRef<typeof ContextMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.Content\n ref={ref}\n className={cn(\n \"z-50 max-h-[--radix-context-menu-content-available-height] min-w-32 overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-context-menu-content-transform-origin]\",\n className,\n )}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n));\nContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;\n\nconst ContextMenuItem = React.forwardRef<\n React.ComponentRef<typeof ContextMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <ContextMenuPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n />\n));\nContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;\n\nconst ContextMenuCheckboxItem = React.forwardRef<\n React.ComponentRef<typeof ContextMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <ContextMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"h-4 w-4\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.CheckboxItem>\n));\nContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;\n\nconst ContextMenuRadioItem = React.forwardRef<\n React.ComponentRef<typeof ContextMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <ContextMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <CircleIcon className=\"h-2 w-2 fill-current\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.RadioItem>\n));\nContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;\n\nconst ContextMenuLabel = React.forwardRef<\n React.ComponentRef<typeof ContextMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Label> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <ContextMenuPrimitive.Label\n ref={ref}\n className={cn(\"px-2 py-1.5 text-sm font-semibold text-foreground\", inset && \"pl-8\", className)}\n {...props}\n />\n));\nContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;\n\nconst ContextMenuSeparator = React.forwardRef<\n React.ComponentRef<typeof ContextMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-border\", className)}\n {...props}\n />\n));\nContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;\n\nconst ContextMenuShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\"ml-auto text-xs tracking-widest text-muted-foreground\", className)}\n {...props}\n />\n );\n};\nContextMenuShortcut.displayName = \"ContextMenuShortcut\";\n\nexport {\n ContextMenu,\n ContextMenuTrigger,\n ContextMenuContent,\n ContextMenuItem,\n ContextMenuCheckboxItem,\n ContextMenuRadioItem,\n ContextMenuLabel,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuGroup,\n ContextMenuPortal,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuRadioGroup,\n};\n"],"mappings":";;;;;;;;AAQA,IAAM,IAAc,EAAqB,MAEnC,IAAqB,EAAqB,SAE1C,IAAmB,EAAqB,OAExC,IAAoB,EAAqB,QAEzC,IAAiB,EAAqB,KAEtC,IAAwB,EAAqB,YAE7C,IAAwB,EAAM,YAKjC,E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ACL,WAAW,EACT,kNACA,CACF;CACA,GAAI;WANN,CAQE,kBAAC,QAAD;EAAM,WAAU;YACd,kBAAC,EAAqB,eAAtB,EAAA,UACE,kBAAC,GAAD,EAAY,WAAU,uBAAwB,CAAA,EACZ,CAAA;CAChC,CAAA,GACL,CAC6B;EACjC;AACD,EAAqB,cAAc,EAAqB,UAAU;AAElE,IAAM,IAAmB,EAAM,YAK5B,EAAE,cAAW,UAAO,GAAG,KAAS,MACjC,kBAAC,EAAqB,OAAtB;CACO;CACL,WAAW,EAAG,qDAAqD,KAAS,QAAQ,CAAS;CAC7F,GAAI;AACL,CAAA,CACF;AACD,EAAiB,cAAc,EAAqB,MAAM;AAE1D,IAAM,IAAuB,EAAM,YAGhC,EAAE,cAAW,GAAG,KAAS,MAC1B,kBAAC,EAAqB,WAAtB;CACO;CACL,WAAW,EAAG,6BAA6B,CAAS;CACpD,GAAI;AACL,CAAA,CACF;AACD,EAAqB,cAAc,EAAqB,UAAU;AAElE,IAAM,KAAuB,EAAE,cAAW,GAAG,QAEzC,kBAAC,QAAD;CACE,WAAW,EAAG,yDAAyD,CAAS;CAChF,GAAI;AACL,CAAA;AAGL,EAAoB,cAAc"}
1
+ {"version":3,"file":"context-menu.js","names":["React","ChevronRightIcon","CheckIcon","CircleIcon","ForwardRef","ForwardRef$1","ForwardRef$2","React$1","ContextMenuPrimitive","ContextMenu","ContextMenuTrigger","ContextMenuGroup","ContextMenuPortal","ContextMenuSub","ContextMenuRadioGroup","ContextMenuSubTrigger","props","cn","inset","className","children","ContextMenuSubContent","ContextMenuContent","ContextMenuItem","ContextMenuCheckboxItem","ContextMenuRadioItem","ContextMenuLabel","ContextMenuSeparator","ContextMenuShortcut"],"sources":["../../../src/components/ui/context-menu.tsx"],"sourcesContent":["import * as ContextMenuPrimitive from \"@radix-ui/react-context-menu\";\nimport * as React from \"react\";\nimport CheckIcon from \"~icons/lucide/check\";\nimport ChevronRightIcon from \"~icons/lucide/chevron-right\";\nimport CircleIcon from \"~icons/lucide/circle\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst ContextMenu = ContextMenuPrimitive.Root;\n\nconst ContextMenuTrigger = ContextMenuPrimitive.Trigger;\n\nconst ContextMenuGroup = ContextMenuPrimitive.Group;\n\nconst ContextMenuPortal = ContextMenuPrimitive.Portal;\n\nconst ContextMenuSub = ContextMenuPrimitive.Sub;\n\nconst ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup;\n\nconst ContextMenuSubTrigger = React.forwardRef<\n React.ComponentRef<typeof ContextMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n }\n>(({ className, inset, children, ...props }, ref) => (\n <ContextMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto h-4 w-4\" />\n </ContextMenuPrimitive.SubTrigger>\n));\nContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName;\n\nconst ContextMenuSubContent = React.forwardRef<\n React.ComponentRef<typeof ContextMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.SubContent\n ref={ref}\n className={cn(\n \"z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-context-menu-content-transform-origin]\",\n className,\n )}\n {...props}\n />\n));\nContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName;\n\nconst ContextMenuContent = React.forwardRef<\n React.ComponentRef<typeof ContextMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.Portal>\n <ContextMenuPrimitive.Content\n ref={ref}\n className={cn(\n \"z-50 max-h-[--radix-context-menu-content-available-height] min-w-32 overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in fade-in-80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-context-menu-content-transform-origin]\",\n className,\n )}\n {...props}\n />\n </ContextMenuPrimitive.Portal>\n));\nContextMenuContent.displayName = ContextMenuPrimitive.Content.displayName;\n\nconst ContextMenuItem = React.forwardRef<\n React.ComponentRef<typeof ContextMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Item> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <ContextMenuPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50\",\n inset && \"pl-8\",\n className,\n )}\n {...props}\n />\n));\nContextMenuItem.displayName = ContextMenuPrimitive.Item.displayName;\n\nconst ContextMenuCheckboxItem = React.forwardRef<\n React.ComponentRef<typeof ContextMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <ContextMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50\",\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"h-4 w-4\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.CheckboxItem>\n));\nContextMenuCheckboxItem.displayName = ContextMenuPrimitive.CheckboxItem.displayName;\n\nconst ContextMenuRadioItem = React.forwardRef<\n React.ComponentRef<typeof ContextMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <ContextMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <ContextMenuPrimitive.ItemIndicator>\n <CircleIcon className=\"h-2 w-2 fill-current\" />\n </ContextMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </ContextMenuPrimitive.RadioItem>\n));\nContextMenuRadioItem.displayName = ContextMenuPrimitive.RadioItem.displayName;\n\nconst ContextMenuLabel = React.forwardRef<\n React.ComponentRef<typeof ContextMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Label> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <ContextMenuPrimitive.Label\n ref={ref}\n className={cn(\"px-2 py-1.5 text-sm font-semibold text-foreground\", inset && \"pl-8\", className)}\n {...props}\n />\n));\nContextMenuLabel.displayName = ContextMenuPrimitive.Label.displayName;\n\nconst ContextMenuSeparator = React.forwardRef<\n React.ComponentRef<typeof ContextMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <ContextMenuPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-border\", className)}\n {...props}\n />\n));\nContextMenuSeparator.displayName = ContextMenuPrimitive.Separator.displayName;\n\nconst ContextMenuShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\"ml-auto text-xs tracking-widest text-muted-foreground\", className)}\n {...props}\n />\n );\n};\nContextMenuShortcut.displayName = \"ContextMenuShortcut\";\n\nexport {\n ContextMenu,\n ContextMenuTrigger,\n ContextMenuContent,\n ContextMenuItem,\n ContextMenuCheckboxItem,\n ContextMenuRadioItem,\n ContextMenuLabel,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuGroup,\n ContextMenuPortal,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuRadioGroup,\n};\n"],"mappings":";;;;;;;;AAQA,IAAMS,IAAcD,EAAqB,MAEnCE,IAAqBF,EAAqB,SAE1CG,IAAmBH,EAAqB,OAExCI,IAAoBJ,EAAqB,QAEzCK,IAAiBL,EAAqB,KAEtCM,IAAwBN,EAAqB,YAE7CO,IAAwBf,EAAM,YAKjC,EAAE,cAAW,UAAO,aAAU,GAAGgB,KAAS,MAC3C,kBAACR,EAAqB,YAAtB;CACO;CACL,WAAWS,EACT,8MACAC,KAAS,QACTC,CACF;CACA,GAAIH;CAPN,UAAA,CASGI,GACD,kBAACnB,GAAD,EAAkB,WAAU,kBAAmB,CAAA,CAChB;AAClC,CAAA,CAAA;AACD,EAAsB,cAAcO,EAAqB,WAAW;AAEpE,IAAMa,IAAwBrB,EAAM,YAGjC,EAAE,cAAW,GAAGgB,KAAS,MAC1B,kBAACR,EAAqB,YAAtB;CACO;CACL,WAAWS,EACT,4eACAE,CACF;CACA,GA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IAAmB1B,EAAM,YAK5B,EAAE,cAAW,UAAO,GAAGgB,KAAS,MACjC,kBAACR,EAAqB,OAAtB;CACO;CACL,WAAWS,EAAG,qDAAqDC,KAAS,QAAQC,CAAS;CAC7F,GAAIH;AACL,CAAA,CACF;AACD,EAAiB,cAAcR,EAAqB,MAAM;AAE1D,IAAMmB,IAAuB3B,EAAM,YAGhC,EAAE,cAAW,GAAGgB,KAAS,MAC1B,kBAACR,EAAqB,WAAtB;CACO;CACL,WAAWS,EAAG,6BAA6BE,CAAS;CACpD,GAAIH;AACL,CAAA,CACF;AACD,EAAqB,cAAcR,EAAqB,UAAU;AAElE,IAAMoB,KAAuB,EAAE,cAAW,GAAGZ,QAEzC,kBAAC,QAAD;CACE,WAAWC,EAAG,yDAAyDE,CAAS;CAChF,GAAIH;AACL,CAAA;AAGL,EAAoB,cAAc"}
@@ -3,5 +3,5 @@ type DateInputProps = Override<React.ComponentProps<"input">, {
3
3
  value: Date | null;
4
4
  onValueChange: (value: Date | null) => void;
5
5
  }>;
6
- declare function DateInput({ value, onValueChange, ...props }: DateInputProps): import("react/jsx-runtime").JSX.Element;
6
+ declare function DateInput({ value, onValueChange, ...props }: DateInputProps): import('react').JSX.Element;
7
7
  export { DateInput, type DateInputProps };
@@ -1,16 +1,16 @@
1
1
  import { Input as e } from "./input.js";
2
2
  import { jsx as t } from "react/jsx-runtime";
3
3
  import { format as n } from "date-fns";
4
- //#region src/components/ui/date-input.tsx
4
+ // src/components/ui/date-input.tsx
5
5
  function r({ value: r, onValueChange: i, ...a }) {
6
+ let o = r ? n(r instanceof Date ? r : new Date(r), "yyyy-MM-dd'T'HH:mm") : "";
6
7
  return /* @__PURE__ */ t(e, {
7
8
  type: "datetime-local",
8
- value: r ? n(r instanceof Date ? r : new Date(r), "yyyy-MM-dd'T'HH:mm") : "",
9
+ value: o,
9
10
  onChange: (e) => i(e.target.value ? new Date(e.target.value) : null),
10
11
  ...a
11
12
  });
12
13
  }
13
- //#endregion
14
14
  export { r as DateInput };
15
15
 
16
16
  //# sourceMappingURL=date-input.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"date-input.js","names":[],"sources":["../../../src/components/ui/date-input.tsx"],"sourcesContent":["import { format } from \"date-fns\";\n\nimport { type Override } from \"../../lib/types\";\nimport { Input } from \"./input\";\n\ntype DateInputProps = Override<\n React.ComponentProps<\"input\">,\n {\n value: Date | null;\n onValueChange: (value: Date | null) => void;\n }\n>;\nfunction DateInput({ value, onValueChange, ...props }: DateInputProps) {\n // 입력과 같은 현지 시각 기준으로 표시해 수정 시 시차가 생기지 않게 합니다.\n const dateValue = !value\n ? \"\"\n : format(value instanceof Date ? value : new Date(value), \"yyyy-MM-dd'T'HH:mm\");\n\n return (\n <Input\n type=\"datetime-local\"\n value={dateValue}\n onChange={(e) => onValueChange(e.target.value ? new Date(e.target.value) : null)}\n {...props}\n />\n );\n}\n\nexport { DateInput, type DateInputProps };\n"],"mappings":";;;;AAYA,SAAS,EAAU,EAAE,UAAO,kBAAe,GAAG,KAAyB;CAMrE,OACE,kBAAC,GAAD;EACE,MAAK;EACL,OAPe,IAEf,EAAO,aAAiB,OAAO,IAAQ,IAAI,KAAK,CAAK,GAAG,oBAAoB,IAD5E;EAOA,WAAW,MAAM,EAAc,EAAE,OAAO,QAAQ,IAAI,KAAK,EAAE,OAAO,KAAK,IAAI,IAAI;EAC/E,GAAI;CACL,CAAA;AAEL"}
1
+ {"version":3,"file":"date-input.js","names":["DateInput","props","dateValue","value","format","Input","onValueChange"],"sources":["../../../src/components/ui/date-input.tsx"],"sourcesContent":["import { format } from \"date-fns\";\n\nimport { type Override } from \"../../lib/types\";\nimport { Input } from \"./input\";\n\ntype DateInputProps = Override<\n React.ComponentProps<\"input\">,\n {\n value: Date | null;\n onValueChange: (value: Date | null) => void;\n }\n>;\nfunction DateInput({ value, onValueChange, ...props }: DateInputProps) {\n // 입력과 같은 현지 시각 기준으로 표시해 수정 시 시차가 생기지 않게 합니다.\n const dateValue = !value\n ? \"\"\n : format(value instanceof Date ? value : new Date(value), \"yyyy-MM-dd'T'HH:mm\");\n\n return (\n <Input\n type=\"datetime-local\"\n value={dateValue}\n onChange={(e) => onValueChange(e.target.value ? new Date(e.target.value) : null)}\n {...props}\n />\n );\n}\n\nexport { DateInput, type DateInputProps };\n"],"mappings":";;;;AAYA,SAASA,EAAU,EAAE,UAAO,kBAAe,GAAGC,KAAyB;CAErE,IAAMC,IAAaC,IAEfC,EAAOD,aAAiB,OAAOA,IAAQ,IAAI,KAAKA,CAAK,GAAG,oBAAoB,IAD5E;CAGJ,OACE,kBAACE,GAAD;EACE,MAAK;EACL,OAAOH;EACP,WAAW,MAAMI,EAAc,EAAE,OAAO,QAAQ,IAAI,KAAK,EAAE,OAAO,KAAK,IAAI,IAAI;EAC/E,GAAIL;CACL,CAAA;AAEL"}
@@ -7,8 +7,8 @@ interface DatePickerProps {
7
7
  disabled?: boolean;
8
8
  className?: string;
9
9
  }
10
- export declare function DatePicker({ value, onValueChange, placeholder, disabled, className, }: DatePickerProps): import("react/jsx-runtime").JSX.Element;
11
- export declare function DatePickerWithDropdown({ value, onValueChange, placeholder, disabled, className, }: DatePickerProps): import("react/jsx-runtime").JSX.Element;
10
+ export declare function DatePicker({ value, onValueChange, placeholder, disabled, className, }: DatePickerProps): React.JSX.Element;
11
+ export declare function DatePickerWithDropdown({ value, onValueChange, placeholder, disabled, className, }: DatePickerProps): React.JSX.Element;
12
12
  interface DatePickerWithRangeProps {
13
13
  CalendarIcon: React.ComponentType<{
14
14
  className?: string;
@@ -22,5 +22,5 @@ interface DatePickerWithRangeProps {
22
22
  maxDate?: Date;
23
23
  minDate?: Date;
24
24
  }
25
- export declare function DatePickerWithRange({ CalendarIcon: CalendarIconProp, value, onValueChange, placeholder, dateFormat, className, numberOfMonths, maxDate, minDate, }: DatePickerWithRangeProps): import("react/jsx-runtime").JSX.Element;
25
+ export declare function DatePickerWithRange({ CalendarIcon: CalendarIconProp, value, onValueChange, placeholder, dateFormat, className, numberOfMonths, maxDate, minDate, }: DatePickerWithRangeProps): React.JSX.Element;
26
26
  export type { DatePickerProps, DatePickerWithRangeProps, DateRange };
@@ -8,7 +8,7 @@ import s from "../../_virtual/~icons/lucide/calendar.js";
8
8
  import * as c from "react";
9
9
  import { jsx as l, jsxs as u } from "react/jsx-runtime";
10
10
  import { format as d } from "date-fns";
11
- //#region src/components/ui/date-picker.tsx
11
+ // src/components/ui/date-picker.tsx
12
12
  function f({ value: c, onValueChange: f, placeholder: p, disabled: m = !1, className: h }) {
13
13
  let { SD: g } = r(), _ = p ?? g("rc.datePicker.pickDate");
14
14
  return /* @__PURE__ */ u(i, { children: [/* @__PURE__ */ l(o, {
@@ -29,7 +29,7 @@ function f({ value: c, onValueChange: f, placeholder: p, disabled: m = !1, class
29
29
  onSelect: (e) => {
30
30
  f?.(e);
31
31
  },
32
- initialFocus: !0
32
+ autoFocus: !0
33
33
  })
34
34
  })] });
35
35
  }
@@ -70,7 +70,7 @@ function m({ CalendarIcon: e, value: r, onValueChange: s, placeholder: f = "Pick
70
70
  p,
71
71
  f
72
72
  ]), x = c.useMemo(() => {
73
- if (!(!g && !_)) return (e) => !!(g && e > g || _ && e < _);
73
+ if (g || _) return (e) => !!(g && e > g || _ && e < _);
74
74
  }, [g, _]);
75
75
  return /* @__PURE__ */ u(i, {
76
76
  open: v,
@@ -99,7 +99,6 @@ function m({ CalendarIcon: e, value: r, onValueChange: s, placeholder: f = "Pick
99
99
  })]
100
100
  });
101
101
  }
102
- //#endregion
103
102
  export { f as DatePicker, p as DatePickerWithDropdown, m as DatePickerWithRange };
104
103
 
105
104
  //# sourceMappingURL=date-picker.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"date-picker.js","names":[],"sources":["../../../src/components/ui/date-picker.tsx"],"sourcesContent":["\"use client\";\n\nimport { format } from \"date-fns\";\nimport * as React from \"react\";\nimport { type DateRange } from \"react-day-picker\";\nimport CalendarIcon from \"~icons/lucide/calendar\";\n\nimport { useSonamuBaseContext } from \"@/contexts\";\n\nimport { cn } from \"../../lib/utils\";\nimport { Button } from \"./button\";\nimport { Calendar } from \"./calendar\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"./popover\";\n\n// ============================================================================\n// DatePicker — 단일 날짜 선택\n// ============================================================================\n\ninterface DatePickerProps {\n value?: Date;\n onValueChange?: (date: Date | undefined) => void;\n placeholder?: string;\n disabled?: boolean;\n className?: string;\n}\n\nexport function DatePicker({\n value,\n onValueChange,\n placeholder,\n disabled = false,\n className,\n}: DatePickerProps) {\n const { SD } = useSonamuBaseContext();\n const finalPlaceholder = placeholder ?? SD(\"rc.datePicker.pickDate\");\n\n return (\n <Popover>\n <PopoverTrigger asChild>\n <Button\n variant=\"outline\"\n disabled={disabled}\n data-empty={!value}\n className={cn(\n \"w-full justify-start text-left font-normal\",\n \"data-[empty=true]:text-muted-foreground\",\n className,\n )}\n >\n <CalendarIcon />\n {value ? format(value, \"PPP\") : <span>{finalPlaceholder}</span>}\n </Button>\n </PopoverTrigger>\n <PopoverContent className=\"w-auto p-0\" align=\"start\">\n <Calendar\n mode=\"single\"\n selected={value}\n onSelect={(date) => {\n onValueChange?.(date);\n }}\n initialFocus\n />\n </PopoverContent>\n </Popover>\n );\n}\n\n// ============================================================================\n// DatePickerWithDropdown — 월/년 드롭다운 포함\n// ============================================================================\n\nexport function DatePickerWithDropdown({\n value,\n onValueChange,\n placeholder,\n disabled = false,\n className,\n}: DatePickerProps) {\n const { SD } = useSonamuBaseContext();\n const finalPlaceholder = placeholder ?? SD(\"rc.datePicker.selectDate\");\n const [open, setOpen] = React.useState(false);\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <Button\n variant=\"outline\"\n disabled={disabled}\n className={cn(\n \"w-full justify-between font-normal\",\n !value && \"text-muted-foreground\",\n className,\n )}\n >\n {value ? value.toLocaleDateString() : finalPlaceholder}\n <CalendarIcon />\n </Button>\n </PopoverTrigger>\n <PopoverContent className=\"w-auto overflow-hidden p-0\" align=\"start\">\n <Calendar\n mode=\"single\"\n selected={value}\n captionLayout=\"dropdown\"\n onSelect={(selectedDate) => {\n onValueChange?.(selectedDate);\n setOpen(false);\n }}\n />\n </PopoverContent>\n </Popover>\n );\n}\n\n// ============================================================================\n// DatePickerWithRange — 날짜 범위 선택\n// ============================================================================\n\ninterface DatePickerWithRangeProps {\n CalendarIcon: React.ComponentType<{ className?: string }>;\n value?: DateRange;\n onValueChange?: (value: DateRange | undefined) => void;\n placeholder?: string;\n dateFormat?: string;\n className?: string;\n numberOfMonths?: number;\n maxDate?: Date;\n minDate?: Date;\n}\n\nexport function DatePickerWithRange({\n CalendarIcon: CalendarIconProp,\n value,\n onValueChange,\n placeholder = \"Pick a date\",\n dateFormat = \"yyyy/MM/dd\",\n className = \"\",\n numberOfMonths = 2,\n maxDate,\n minDate,\n}: DatePickerWithRangeProps) {\n const [isOpen, setIsOpen] = React.useState(false);\n\n const displayText = React.useMemo(() => {\n if (!value?.from && !value?.to) {\n return placeholder;\n }\n const fromStr = value?.from ? format(value.from, dateFormat) : \"\";\n const toStr = value?.to ? format(value.to, dateFormat) : \"\";\n if (fromStr && toStr) {\n return `${fromStr} - ${toStr}`;\n }\n if (toStr) {\n return `- ${toStr}`;\n }\n return `${fromStr} -`;\n }, [value, dateFormat, placeholder]);\n\n const disabledMatcher = React.useMemo(() => {\n if (!maxDate && !minDate) {\n return undefined;\n }\n return (date: Date): boolean => {\n if (maxDate && date > maxDate) {\n return true;\n }\n if (minDate && date < minDate) {\n return true;\n }\n return false;\n };\n }, [maxDate, minDate]);\n\n return (\n <Popover open={isOpen} onOpenChange={setIsOpen}>\n <PopoverTrigger asChild>\n <Button\n variant=\"outline\"\n className={`justify-start gap-2 h-8 px-3 text-xs font-normal ${className}`}\n >\n <CalendarIconProp className=\"h-4 w-4 shrink-0\" />\n <span className=\"truncate\">{displayText}</span>\n </Button>\n </PopoverTrigger>\n <PopoverContent className=\"w-auto p-0\" align=\"start\">\n <Calendar\n mode=\"range\"\n defaultMonth={\n value?.from ??\n (value?.to ? new Date(value.to.getFullYear(), value.to.getMonth() - 1, 1) : undefined)\n }\n selected={value}\n onSelect={onValueChange}\n numberOfMonths={numberOfMonths}\n disabled={disabledMatcher}\n />\n </PopoverContent>\n </Popover>\n );\n}\n\nexport type { DatePickerProps, DatePickerWithRangeProps, DateRange };\n"],"mappings":";;;;;;;;;;;AA0BA,SAAgB,EAAW,EACzB,UACA,kBACA,gBACA,cAAW,IACX,gBACkB;CAClB,IAAM,EAAE,UAAO,EAAqB,GAC9B,IAAmB,KAAe,EAAG,wBAAwB;CAEnE,OACE,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD;EAAgB,SAAA;YACd,kBAAC,GAAD;GACE,SAAQ;GACE;GACV,cAAY,CAAC;GACb,WAAW,EACT,8CACA,2CACA,CACF;aARF,CAUE,kBAAC,GAAD,CAAe,CAAA,GACd,IAAQ,EAAO,GAAO,KAAK,IAAI,kBAAC,QAAD,EAAA,UAAO,EAAuB,CAAA,CACxD;;CACM,CAAA,GAChB,kBAAC,GAAD;EAAgB,WAAU;EAAa,OAAM;YAC3C,kBAAC,GAAD;GACE,MAAK;GACL,UAAU;GACV,WAAW,MAAS;IAClB,IAAgB,CAAI;GACtB;GACA,cAAA;EACD,CAAA;CACa,CAAA,CACT,EAAA,CAAA;AAEb;AAMA,SAAgB,EAAuB,EACrC,UACA,kBACA,gBACA,cAAW,IACX,gBACkB;CAClB,IAAM,EAAE,UAAO,EAAqB,GAC9B,IAAmB,KAAe,EAAG,0BAA0B,GAC/D,CAAC,GAAM,KAAW,EAAM,SAAS,EAAK;CAE5C,OACE,kBAAC,GAAD;EAAe;EAAM,cAAc;YAAnC,CACE,kBAAC,GAAD;GAAgB,SAAA;aACd,kBAAC,GAAD;IACE,SAAQ;IACE;IACV,WAAW,EACT,sCACA,CAAC,KAAS,yBACV,CACF;cAPF,CASG,IAAQ,EAAM,mBAAmB,IAAI,GACtC,kBAAC,GAAD,CAAe,CAAA,CACT;;E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GAAG,EAAM,GAAG,SAAS,IAAI,GAAG,CAAC,IAAI,KAAA;IAE9E,UAAU;IACV,UAAU;IACM;IAChB,UAAU;GACX,CAAA;EACa,CAAA,CACT;;AAEb"}
1
+ {"version":3,"file":"date-picker.js","names":["CalendarIcon","React","ForwardRef","React$1","DatePicker","useSonamuBaseContext","finalPlaceholder","placeholder","SD","Popover","PopoverTrigger","Button","value","cn","className","format","PopoverContent","Calendar","date","DatePickerWithDropdown","open","setOpen","onValueChange","selectedDate","DatePickerWithRange","CalendarIconProp","isOpen","setIsOpen","displayText","fromStr","dateFormat","toStr","disabledMatcher","maxDate","minDate"],"sources":["../../../src/components/ui/date-picker.tsx"],"sourcesContent":["\"use client\";\n\nimport { format } from \"date-fns\";\nimport * as React from \"react\";\nimport { type DateRange } from \"react-day-picker\";\nimport CalendarIcon from \"~icons/lucide/calendar\";\n\nimport { useSonamuBaseContext } from \"@/contexts\";\n\nimport { cn } from \"../../lib/utils\";\nimport { Button } from \"./button\";\nimport { Calendar } from \"./calendar\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"./popover\";\n\n// ============================================================================\n// DatePicker — 단일 날짜 선택\n// ============================================================================\n\ninterface DatePickerProps {\n value?: Date;\n onValueChange?: (date: Date | undefined) => void;\n placeholder?: string;\n disabled?: boolean;\n className?: string;\n}\n\nexport function DatePicker({\n value,\n onValueChange,\n placeholder,\n disabled = false,\n className,\n}: DatePickerProps) {\n const { SD } = useSonamuBaseContext();\n const finalPlaceholder = placeholder ?? SD(\"rc.datePicker.pickDate\");\n\n return (\n <Popover>\n <PopoverTrigger asChild>\n <Button\n variant=\"outline\"\n disabled={disabled}\n data-empty={!value}\n className={cn(\n \"w-full justify-start text-left font-normal\",\n \"data-[empty=true]:text-muted-foreground\",\n className,\n )}\n >\n <CalendarIcon />\n {value ? format(value, \"PPP\") : <span>{finalPlaceholder}</span>}\n </Button>\n </PopoverTrigger>\n <PopoverContent className=\"w-auto p-0\" align=\"start\">\n <Calendar\n mode=\"single\"\n selected={value}\n onSelect={(date) => {\n onValueChange?.(date);\n }}\n autoFocus\n />\n </PopoverContent>\n </Popover>\n );\n}\n\n// ============================================================================\n// DatePickerWithDropdown — 월/년 드롭다운 포함\n// ============================================================================\n\nexport function DatePickerWithDropdown({\n value,\n onValueChange,\n placeholder,\n disabled = false,\n className,\n}: DatePickerProps) {\n const { SD } = useSonamuBaseContext();\n const finalPlaceholder = placeholder ?? SD(\"rc.datePicker.selectDate\");\n const [open, setOpen] = React.useState(false);\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger asChild>\n <Button\n variant=\"outline\"\n disabled={disabled}\n className={cn(\n \"w-full justify-between font-normal\",\n !value && \"text-muted-foreground\",\n className,\n )}\n >\n {value ? value.toLocaleDateString() : finalPlaceholder}\n <CalendarIcon />\n </Button>\n </PopoverTrigger>\n <PopoverContent className=\"w-auto overflow-hidden p-0\" align=\"start\">\n <Calendar\n mode=\"single\"\n selected={value}\n captionLayout=\"dropdown\"\n onSelect={(selectedDate) => {\n onValueChange?.(selectedDate);\n setOpen(false);\n }}\n />\n </PopoverContent>\n </Popover>\n );\n}\n\n// ============================================================================\n// DatePickerWithRange — 날짜 범위 선택\n// ============================================================================\n\ninterface DatePickerWithRangeProps {\n CalendarIcon: React.ComponentType<{ className?: string }>;\n value?: DateRange;\n onValueChange?: (value: DateRange | undefined) => void;\n placeholder?: string;\n dateFormat?: string;\n className?: string;\n numberOfMonths?: number;\n maxDate?: Date;\n minDate?: Date;\n}\n\nexport function DatePickerWithRange({\n CalendarIcon: CalendarIconProp,\n value,\n onValueChange,\n placeholder = \"Pick a date\",\n dateFormat = \"yyyy/MM/dd\",\n className = \"\",\n numberOfMonths = 2,\n maxDate,\n minDate,\n}: DatePickerWithRangeProps) {\n const [isOpen, setIsOpen] = React.useState(false);\n\n const displayText = React.useMemo(() => {\n if (!value?.from && !value?.to) {\n return placeholder;\n }\n const fromStr = value?.from ? format(value.from, dateFormat) : \"\";\n const toStr = value?.to ? format(value.to, dateFormat) : \"\";\n if (fromStr && toStr) {\n return `${fromStr} - ${toStr}`;\n }\n if (toStr) {\n return `- ${toStr}`;\n }\n return `${fromStr} -`;\n }, [value, dateFormat, placeholder]);\n\n const disabledMatcher = React.useMemo(() => {\n if (!maxDate && !minDate) {\n return undefined;\n }\n return (date: Date): boolean => {\n if (maxDate && date > maxDate) {\n return true;\n }\n if (minDate && date < minDate) {\n return true;\n }\n return false;\n };\n }, [maxDate, minDate]);\n\n return (\n <Popover open={isOpen} onOpenChange={setIsOpen}>\n <PopoverTrigger asChild>\n <Button\n variant=\"outline\"\n className={`justify-start gap-2 h-8 px-3 text-xs font-normal ${className}`}\n >\n <CalendarIconProp className=\"h-4 w-4 shrink-0\" />\n <span className=\"truncate\">{displayText}</span>\n </Button>\n </PopoverTrigger>\n <PopoverContent className=\"w-auto p-0\" align=\"start\">\n <Calendar\n mode=\"range\"\n defaultMonth={\n value?.from ??\n (value?.to ? new Date(value.to.getFullYear(), value.to.getMonth() - 1, 1) : undefined)\n }\n selected={value}\n onSelect={onValueChange}\n numberOfMonths={numberOfMonths}\n disabled={disabledMatcher}\n />\n </PopoverContent>\n </Popover>\n );\n}\n\nexport type { DatePickerProps, DatePickerWithRangeProps, DateRange };\n"],"mappings":";;;;;;;;;;;AA0BA,SAAgBI,EAAW,EACzB,UACA,kBACA,gBACA,cAAW,IACX,gBACkB;CAClB,IAAM,EAAE,UAAOC,EAAqB,GAC9BC,IAAmBC,KAAeC,EAAG,wBAAwB;CAEnE,OACE,kBAACC,GAAD,EAAA,UAAA,CACE,kBAACC,GAAD;EAAgB,SAAA;EACd,UAAA,kBAACC,GAAD;GACE,SAAQ;GACE;GACV,cAAY,CAACC;GACb,WAAWC,EACT,8CACA,2CACAC,CACF;GARF,UAAA,CAUE,kBAACd,GAAD,CAAe,CAAA,GACdY,IAAQG,EAAOH,GAAO,KAAK,IAAI,kBAAC,QAAD,EAAA,UAAON,EAAuB,CAAA,CACxD;;CACM,CAAA,GACh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AU,IAAI;EAOzD,OANID,KAAWE,IACN,GAAGF,EAAQ,KAAKE,MAErBA,IACK,KAAKA,MAEP,GAAGF,EAAQ;CACpB,GAAG;EAACjB;EAAOkB;EAAYvB;CAAW,CAAC,GAE7ByB,IAAkB/B,EAAM,cAAc;EAC1C,IAAKgC,KAAYC,GAGjB,QAAQ,MAIN,GAHID,KAAWf,IAAOe,KAGlBC,KAAWhB,IAAOgB;CAK1B,GAAG,CAACD,GAASC,CAAO,CAAC;CAErB,OACE,kBAACzB,GAAD;EAAS,MAAMiB;EAAQ,cAAcC;EAArC,UAAA,CACE,kBAACjB,GAAD;GAAgB,SAAA;GACd,UAAA,kBAACC,GAAD;IACE,SAAQ;IACR,WAAW,oDAAoDG;IAFjE,UAAA,CAIE,kBAACW,GAAD,EAAkB,WAAU,mBAAoB,CAAA,GAChD,kBAAC,QAAD;KAAM,WAAU;KAAY,UAAAG;IAAkB,CAAA,CACxC;;EACM,CAAA,GAChB,kBAACZ,GAAD;GAAgB,WAAU;GAAa,OAAM;GAC3C,UAAA,kBAACC,GAAD;IACE,MAAK;IACL,cACEL,GAAO,SACNA,GAAO,KAAK,IAAI,KAAKA,EAAM,GAAG,YAAY,GAAGA,EAAM,GAAG,SAAS,IAAI,GAAG,CAAC,IAAI,KAAA;IAE9E,UAAUA;IACV,UAAUU;IACM;IAChB,UAAUU;GACX,CAAA;EACa,CAAA,CACT;;AAEb"}
@@ -7,11 +7,11 @@ declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.Dialo
7
7
  declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
8
  declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
9
  declare const DialogHeader: {
10
- ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
10
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
11
11
  displayName: string;
12
12
  };
13
13
  declare const DialogFooter: {
14
- ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
14
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
15
15
  displayName: string;
16
16
  };
17
17
  declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
@@ -4,7 +4,7 @@ import t from "../../_virtual/~icons/lucide/x.js";
4
4
  import * as n from "react";
5
5
  import { jsx as r, jsxs as i } from "react/jsx-runtime";
6
6
  import * as a from "@radix-ui/react-dialog";
7
- //#region src/components/ui/dialog.tsx
7
+ // src/components/ui/dialog.tsx
8
8
  var o = a.Root, s = a.Trigger, c = a.Portal, l = a.Close, u = n.forwardRef(({ className: t, ...n }, i) => /* @__PURE__ */ r(a.Overlay, {
9
9
  ref: i,
10
10
  className: e("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", t),
@@ -46,7 +46,6 @@ var h = n.forwardRef(({ className: t, ...n }, i) => /* @__PURE__ */ r(a.Descript
46
46
  ...n
47
47
  }));
48
48
  h.displayName = a.Description.displayName;
49
- //#endregion
50
49
  export { o as Dialog, l as DialogClose, d as DialogContent, h as DialogDescription, p as DialogFooter, f as DialogHeader, u as DialogOverlay, c as DialogPortal, m as DialogTitle, s as DialogTrigger };
51
50
 
52
51
  //# sourceMappingURL=dialog.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.js","names":[],"sources":["../../../src/components/ui/dialog.tsx"],"sourcesContent":["\"use client\";\n\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport * as React from \"react\";\nimport XIcon from \"~icons/lucide/x\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst Dialog = DialogPrimitive.Root;\n\nconst DialogTrigger = DialogPrimitive.Trigger;\n\nconst DialogPortal = DialogPrimitive.Portal;\n\nconst DialogClose = DialogPrimitive.Close;\n\nconst DialogOverlay = React.forwardRef<\n React.ComponentRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n \"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className,\n )}\n {...props}\n />\n));\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\n\nconst DialogContent = React.forwardRef<\n React.ComponentRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg\",\n className,\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground\">\n <XIcon className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n));\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn(\"flex flex-col space-y-1.5 text-center sm:text-left\", className)} {...props} />\n);\nDialogHeader.displayName = \"DialogHeader\";\n\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\", className)}\n {...props}\n />\n);\nDialogFooter.displayName = \"DialogFooter\";\n\nconst DialogTitle = React.forwardRef<\n React.ComponentRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\"text-lg font-semibold leading-none tracking-tight\", className)}\n {...props}\n />\n));\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\nconst DialogDescription = React.forwardRef<\n React.ComponentRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n};\n"],"mappings":";;;;;;;AAQA,IAAM,IAAS,EAAgB,MAEzB,IAAgB,EAAgB,SAEhC,IAAe,EAAgB,QAE/B,IAAc,EAAgB,OAE9B,IAAgB,EAAM,YAGzB,EAAE,cAAW,GAAG,KAAS,MAC1B,kBAAC,EAAgB,SAAjB;CACO;CACL,WAAW,EACT,0JACA,CACF;CACA,GAAI;AACL,CAAA,CACF;AACD,EAAc,cAAc,EAAgB,QAAQ;AAEpD,IAAM,IAAgB,EAAM,YAGzB,EAAE,cAAW,aAAU,GAAG,KAAS,MACpC,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD,CAAgB,CAAA,GAChB,kBAAC,EAAgB,SAAjB;CACO;CACL,WAAW,EACT,+fACA,CACF;CACA,GAAI;WANN,CAQG,GACD,kBAAC,EAAgB,OAAjB;EAAuB,WAAU;YAAjC,CACE,kBAAC,GAAD,EAAO,WAAU,UAAW,CAAA,GAC5B,kBAAC,QAAD;GAAM,WAAU;aAAU;EAAW,CAAA,CAChB;GACA;EACb,EAAA,CAAA,CACf;AACD,EAAc,cAAc,EAAgB,QAAQ;AAEpD,IAAM,KAAgB,EAAE,cAAW,GAAG,QACpC,kBAAC,OAAD;CAAK,WAAW,EAAG,sDAAsD,CAAS;CAAG,GAAI;AAAQ,CAAA;AAEnG,EAAa,cAAc;AAE3B,IAAM,KAAgB,EAAE,cAAW,GAAG,QACpC,kBAAC,OAAD;CACE,WAAW,EAAG,iEAAiE,CAAS;CACxF,GAAI;AACL,CAAA;AAEH,EAAa,cAAc;AAE3B,IAAM,IAAc,EAAM,YAGvB,EAAE,cAAW,GAAG,KAAS,MAC1B,kBAAC,EAAgB,OAAjB;CACO;CACL,WAAW,EAAG,qDAAqD,CAAS;CAC5E,GAAI;AACL,CAAA,CACF;AACD,EAAY,cAAc,EAAgB,MAAM;AAEhD,IAAM,IAAoB,EAAM,YAG7B,EAAE,cAAW,GAAG,KAAS,MAC1B,kBAAC,EAAgB,aAAjB;CACO;CACL,WAAW,EAAG,iCAAiC,CAAS;CACxD,GAAI;AACL,CAAA,CACF;AACD,EAAkB,cAAc,EAAgB,YAAY"}
1
+ {"version":3,"file":"dialog.js","names":["React","XIcon","ForwardRef","React$1","DialogPrimitive","Dialog","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","props","cn","className","DialogContent","children","DialogHeader","DialogFooter","DialogTitle","DialogDescription"],"sources":["../../../src/components/ui/dialog.tsx"],"sourcesContent":["\"use client\";\n\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\";\nimport * as React from \"react\";\nimport XIcon from \"~icons/lucide/x\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst Dialog = DialogPrimitive.Root;\n\nconst DialogTrigger = DialogPrimitive.Trigger;\n\nconst DialogPortal = DialogPrimitive.Portal;\n\nconst DialogClose = DialogPrimitive.Close;\n\nconst DialogOverlay = React.forwardRef<\n React.ComponentRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n \"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0\",\n className,\n )}\n {...props}\n />\n));\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\n\nconst DialogContent = React.forwardRef<\n React.ComponentRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg\",\n className,\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground\">\n <XIcon className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n));\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn(\"flex flex-col space-y-1.5 text-center sm:text-left\", className)} {...props} />\n);\nDialogHeader.displayName = \"DialogHeader\";\n\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2\", className)}\n {...props}\n />\n);\nDialogFooter.displayName = \"DialogFooter\";\n\nconst DialogTitle = React.forwardRef<\n React.ComponentRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn(\"text-lg font-semibold leading-none tracking-tight\", className)}\n {...props}\n />\n));\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\nconst DialogDescription = React.forwardRef<\n React.ComponentRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n};\n"],"mappings":";;;;;;;AAQA,IAAMK,IAASD,EAAgB,MAEzBE,IAAgBF,EAAgB,SAEhCG,IAAeH,EAAgB,QAE/BI,IAAcJ,EAAgB,OAE9BK,IAAgBT,EAAM,YAGzB,EAAE,cAAW,GAAGU,KAAS,MAC1B,kBAACN,EAAgB,SAAjB;CAC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
1
1
  import { Drawer as DrawerPrimitive } from 'vaul';
2
2
  import * as React from "react";
3
3
  declare const Drawer: {
4
- ({ shouldScaleBackground, ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ ({ shouldScaleBackground, ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>): React.JSX.Element;
5
5
  displayName: string;
6
6
  };
7
7
  declare const DrawerTrigger: React.ForwardRefExoticComponent<import('@radix-ui/react-dialog').DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
@@ -10,11 +10,11 @@ declare const DrawerClose: React.ForwardRefExoticComponent<import('@radix-ui/rea
10
10
  declare const DrawerOverlay: React.ForwardRefExoticComponent<Omit<Omit<import('@radix-ui/react-dialog').DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
11
11
  declare const DrawerContent: React.ForwardRefExoticComponent<Omit<Omit<import('@radix-ui/react-dialog').DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
12
12
  declare const DrawerHeader: {
13
- ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
13
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
14
14
  displayName: string;
15
15
  };
16
16
  declare const DrawerFooter: {
17
- ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
17
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): React.JSX.Element;
18
18
  displayName: string;
19
19
  };
20
20
  declare const DrawerTitle: React.ForwardRefExoticComponent<Omit<import('@radix-ui/react-dialog').DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
@@ -3,7 +3,7 @@ import { cn as e } from "../../lib/utils.js";
3
3
  import * as t from "react";
4
4
  import { jsx as n, jsxs as r } from "react/jsx-runtime";
5
5
  import { Drawer as i } from "vaul";
6
- //#region src/components/ui/drawer.tsx
6
+ // src/components/ui/drawer.tsx
7
7
  var a = ({ shouldScaleBackground: e = !0, ...t }) => /* @__PURE__ */ n(i.Root, {
8
8
  shouldScaleBackground: e,
9
9
  ...t
@@ -44,7 +44,6 @@ var m = t.forwardRef(({ className: t, ...r }, a) => /* @__PURE__ */ n(i.Descript
44
44
  ...r
45
45
  }));
46
46
  m.displayName = i.Description.displayName;
47
- //#endregion
48
47
  export { a as Drawer, c as DrawerClose, u as DrawerContent, m as DrawerDescription, f as DrawerFooter, d as DrawerHeader, l as DrawerOverlay, s as DrawerPortal, p as DrawerTitle, o as DrawerTrigger };
49
48
 
50
49
  //# sourceMappingURL=drawer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"drawer.js","names":[],"sources":["../../../src/components/ui/drawer.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Drawer as DrawerPrimitive } from \"vaul\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst Drawer = ({\n shouldScaleBackground = true,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Root>) => (\n <DrawerPrimitive.Root shouldScaleBackground={shouldScaleBackground} {...props} />\n);\nDrawer.displayName = \"Drawer\";\n\nconst DrawerTrigger = DrawerPrimitive.Trigger;\n\nconst DrawerPortal = DrawerPrimitive.Portal;\n\nconst DrawerClose = DrawerPrimitive.Close;\n\nconst DrawerOverlay = React.forwardRef<\n React.ComponentRef<typeof DrawerPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Overlay\n ref={ref}\n className={cn(\"fixed inset-0 z-50 bg-black/80\", className)}\n {...props}\n />\n));\nDrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName;\n\nconst DrawerContent = React.forwardRef<\n React.ComponentRef<typeof DrawerPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DrawerPortal>\n <DrawerOverlay />\n <DrawerPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background\",\n className,\n )}\n {...props}\n >\n <div className=\"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted\" />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPortal>\n));\nDrawerContent.displayName = \"DrawerContent\";\n\nconst DrawerHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn(\"grid gap-1.5 p-4 text-center sm:text-left\", className)} {...props} />\n);\nDrawerHeader.displayName = \"DrawerHeader\";\n\nconst DrawerFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)} {...props} />\n);\nDrawerFooter.displayName = \"DrawerFooter\";\n\nconst DrawerTitle = React.forwardRef<\n React.ComponentRef<typeof DrawerPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Title\n ref={ref}\n className={cn(\"text-lg font-semibold leading-none tracking-tight\", className)}\n {...props}\n />\n));\nDrawerTitle.displayName = DrawerPrimitive.Title.displayName;\n\nconst DrawerDescription = React.forwardRef<\n React.ComponentRef<typeof DrawerPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nDrawerDescription.displayName = DrawerPrimitive.Description.displayName;\n\nexport {\n Drawer,\n DrawerPortal,\n DrawerOverlay,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n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W,EAAG,iCAAiC,CAAS;CACxD,GAAI;AACL,CAAA,CACF;AACD,EAAkB,cAAc,EAAgB,YAAY"}
1
+ {"version":3,"file":"drawer.js","names":["Drawer","DrawerPrimitive","React","React$1","Drawer$1","props","Drawer","DrawerTrigger","DrawerPortal","DrawerClose","DrawerOverlay","cn","className","DrawerContent","children","DrawerHeader","DrawerFooter","DrawerTitle","DrawerDescription"],"sources":["../../../src/components/ui/drawer.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\nimport { Drawer as DrawerPrimitive } from \"vaul\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst Drawer = ({\n shouldScaleBackground = true,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Root>) => (\n <DrawerPrimitive.Root shouldScaleBackground={shouldScaleBackground} {...props} />\n);\nDrawer.displayName = \"Drawer\";\n\nconst DrawerTrigger = DrawerPrimitive.Trigger;\n\nconst DrawerPortal = DrawerPrimitive.Portal;\n\nconst DrawerClose = DrawerPrimitive.Close;\n\nconst DrawerOverlay = React.forwardRef<\n React.ComponentRef<typeof DrawerPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Overlay\n ref={ref}\n className={cn(\"fixed inset-0 z-50 bg-black/80\", className)}\n {...props}\n />\n));\nDrawerOverlay.displayName = DrawerPrimitive.Overlay.displayName;\n\nconst DrawerContent = React.forwardRef<\n React.ComponentRef<typeof DrawerPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DrawerPortal>\n <DrawerOverlay />\n <DrawerPrimitive.Content\n ref={ref}\n className={cn(\n \"fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background\",\n className,\n )}\n {...props}\n >\n <div className=\"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted\" />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPortal>\n));\nDrawerContent.displayName = \"DrawerContent\";\n\nconst DrawerHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn(\"grid gap-1.5 p-4 text-center sm:text-left\", className)} {...props} />\n);\nDrawerHeader.displayName = \"DrawerHeader\";\n\nconst DrawerFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)} {...props} />\n);\nDrawerFooter.displayName = \"DrawerFooter\";\n\nconst DrawerTitle = React.forwardRef<\n React.ComponentRef<typeof DrawerPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Title\n ref={ref}\n className={cn(\"text-lg font-semibold leading-none tracking-tight\", className)}\n {...props}\n />\n));\nDrawerTitle.displayName = DrawerPrimitive.Title.displayName;\n\nconst DrawerDescription = React.forwardRef<\n React.ComponentRef<typeof DrawerPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Description\n ref={ref}\n className={cn(\"text-sm text-muted-foreground\", className)}\n {...props}\n />\n));\nDrawerDescription.displayName = DrawerPrimitive.Description.displayName;\n\nexport {\n Drawer,\n DrawerPortal,\n DrawerOverlay,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n};\n"],"mappings":";;;;;;AAOA,IAAMA,KAAU,EACd,2BAAwB,IACxB,GAAGK,QAEH,kBAACJ,EAAgB,MAAjB;CAA6C;CAAuB,GAAII;AAAQ,CAAA;AAElF,EAAO,cAAc;AAErB,IAAME,IAAgBN,EAAgB,SAEhCO,IAAeP,EAAgB,QAE/BQ,IAAcR,EAAgB,OAE9BS,IAAgBR,EAAM,YAGzB,EAAE,cAAW,GAAGG,KAAS,MAC1B,kBAACJ,EAAgB,SAAjB;CACO;CACL,WAAWU,EAAG,kCAAkCC,CAAS;CACzD,GAAIP;AACL,CAAA,CACF;AACD,EAAc,cAAcJ,EAAgB,QAAQ;AAEpD,IAAMY,IAAgBX,EAAM,YAGzB,EAAE,cAAW,aAAU,GAAGG,KAAS,MACpC,kBAACG,GAAD,EAAA,UAAA,CACE,kBAACE,GAAD,CAAgB,CAAA,GAChB,kBAACT,EAAgB,SAAjB;CACO;CACL,WAAWU,EACT,kGACAC,CACF;CACA,GAAIP;CANN,UAAA,CAQE,kBAAC,OAAD,EAAK,WAAU,mDAAoD,CAAA,GAClES,CACsB;AACb,CAAA,CAAA,EAAA,CAAA,CACf;AACD,EAAc,cAAc;AAE5B,IAAMC,KAAgB,EAAE,cAAW,GAAGV,QACpC,kBAAC,OAAD;CAAK,WAAWM,EAAG,6CAA6CC,CAAS;CAAG,GAAIP;AAAQ,CAAA;AAE1F,EAAa,cAAc;AAE3B,IAAMW,KAAgB,EAAE,cAAW,GAAGX,QACpC,kBAAC,OAAD;CAAK,WAAWM,EAAG,mCAAmCC,CAAS;CAAG,GAAIP;AAAQ,CAAA;AAEhF,EAAa,cAAc;AAE3B,IAAMY,IAAcf,EAAM,YAGvB,EAAE,cAAW,GAAGG,KAAS,MAC1B,kBAACJ,EAAgB,OAAjB;CACO;CACL,WAAWU,EAAG,qDAAqDC,CAAS;CAC5E,GAAIP;AACL,CAAA,CACF;AACD,EAAY,cAAcJ,EAAgB,MAAM;AAEhD,IAAMiB,IAAoBhB,EAAM,YAG7B,EAAE,cAAW,GAAGG,KAAS,MAC1B,kBAACJ,EAAgB,aAAjB;CACO;CACL,WAAWU,EAAG,iCAAiCC,CAAS;CACxD,GAAIP;AACL,CAAA,CACF;AACD,EAAkB,cAAcJ,EAAgB,YAAY"}
@@ -21,7 +21,7 @@ declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<DropdownMe
21
21
  } & React.RefAttributes<HTMLDivElement>>;
22
22
  declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
23
23
  declare const DropdownMenuShortcut: {
24
- ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
24
+ ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element;
25
25
  displayName: string;
26
26
  };
27
27
  export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, };