@hyunsdev/ui 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (340) hide show
  1. package/LICENSE +674 -0
  2. package/README.md +89 -0
  3. package/SKILL.md +38 -0
  4. package/dist/WindowContext-DybYtZJa.d.ts +50 -0
  5. package/dist/_styles-BbTx89aX.d.ts +3 -0
  6. package/dist/chunk-23KUNTRD.js +49 -0
  7. package/dist/chunk-23KUNTRD.js.map +1 -0
  8. package/dist/chunk-3RTSANKB.js +51 -0
  9. package/dist/chunk-3RTSANKB.js.map +1 -0
  10. package/dist/chunk-4QIWBOF4.js +129 -0
  11. package/dist/chunk-4QIWBOF4.js.map +1 -0
  12. package/dist/chunk-5JCWC7IU.js +293 -0
  13. package/dist/chunk-5JCWC7IU.js.map +1 -0
  14. package/dist/chunk-6ANDNGHD.js +33 -0
  15. package/dist/chunk-6ANDNGHD.js.map +1 -0
  16. package/dist/chunk-7W7QZHEZ.js +42 -0
  17. package/dist/chunk-7W7QZHEZ.js.map +1 -0
  18. package/dist/chunk-BHO4WT2N.js +51 -0
  19. package/dist/chunk-BHO4WT2N.js.map +1 -0
  20. package/dist/chunk-BI3KKBIC.js +11 -0
  21. package/dist/chunk-BI3KKBIC.js.map +1 -0
  22. package/dist/chunk-D3SP7GL3.js +55 -0
  23. package/dist/chunk-D3SP7GL3.js.map +1 -0
  24. package/dist/chunk-D7W4RSQX.js +115 -0
  25. package/dist/chunk-D7W4RSQX.js.map +1 -0
  26. package/dist/chunk-DN2AEEA2.js +11 -0
  27. package/dist/chunk-DN2AEEA2.js.map +1 -0
  28. package/dist/chunk-ETTKFCO6.js +84 -0
  29. package/dist/chunk-ETTKFCO6.js.map +1 -0
  30. package/dist/chunk-GJT7TDBS.js +66 -0
  31. package/dist/chunk-GJT7TDBS.js.map +1 -0
  32. package/dist/chunk-HZT6RQYZ.js +109 -0
  33. package/dist/chunk-HZT6RQYZ.js.map +1 -0
  34. package/dist/chunk-JB2QZV7K.js +60 -0
  35. package/dist/chunk-JB2QZV7K.js.map +1 -0
  36. package/dist/chunk-KJJB2PVC.js +21 -0
  37. package/dist/chunk-KJJB2PVC.js.map +1 -0
  38. package/dist/chunk-NE3IVPMO.js +31 -0
  39. package/dist/chunk-NE3IVPMO.js.map +1 -0
  40. package/dist/chunk-O2BG2KSY.js +23 -0
  41. package/dist/chunk-O2BG2KSY.js.map +1 -0
  42. package/dist/chunk-OUFGNJ3V.js +1726 -0
  43. package/dist/chunk-OUFGNJ3V.js.map +1 -0
  44. package/dist/chunk-PLZMCJSL.js +351 -0
  45. package/dist/chunk-PLZMCJSL.js.map +1 -0
  46. package/dist/chunk-POG5DZBT.js +104 -0
  47. package/dist/chunk-POG5DZBT.js.map +1 -0
  48. package/dist/chunk-SECZM6JE.js +170 -0
  49. package/dist/chunk-SECZM6JE.js.map +1 -0
  50. package/dist/chunk-T64WPXSC.js +48 -0
  51. package/dist/chunk-T64WPXSC.js.map +1 -0
  52. package/dist/chunk-TU5CYBB4.js +90 -0
  53. package/dist/chunk-TU5CYBB4.js.map +1 -0
  54. package/dist/chunk-UVAI2U6X.js +153 -0
  55. package/dist/chunk-UVAI2U6X.js.map +1 -0
  56. package/dist/chunk-UXCBLYG6.js +142 -0
  57. package/dist/chunk-UXCBLYG6.js.map +1 -0
  58. package/dist/chunk-VUR4MQMH.js +53 -0
  59. package/dist/chunk-VUR4MQMH.js.map +1 -0
  60. package/dist/chunk-WIEKNG4S.js +26 -0
  61. package/dist/chunk-WIEKNG4S.js.map +1 -0
  62. package/dist/chunk-WIZ4OLOB.js +23 -0
  63. package/dist/chunk-WIZ4OLOB.js.map +1 -0
  64. package/dist/chunk-WJRJBMFN.js +21 -0
  65. package/dist/chunk-WJRJBMFN.js.map +1 -0
  66. package/dist/chunk-YUPLJP3F.js +33 -0
  67. package/dist/chunk-YUPLJP3F.js.map +1 -0
  68. package/dist/chunk-Z7ITPSUF.js +184 -0
  69. package/dist/chunk-Z7ITPSUF.js.map +1 -0
  70. package/dist/chunk-ZC76ALSI.js +75 -0
  71. package/dist/chunk-ZC76ALSI.js.map +1 -0
  72. package/dist/code-block-core-xkE94Rk5.d.ts +30 -0
  73. package/dist/components/accordion.d.ts +9 -0
  74. package/dist/components/accordion.js +98 -0
  75. package/dist/components/accordion.js.map +1 -0
  76. package/dist/components/alert-dialog.d.ts +26 -0
  77. package/dist/components/alert-dialog.js +341 -0
  78. package/dist/components/alert-dialog.js.map +1 -0
  79. package/dist/components/alert.d.ts +13 -0
  80. package/dist/components/alert.js +76 -0
  81. package/dist/components/alert.js.map +1 -0
  82. package/dist/components/aspect-ratio.d.ts +6 -0
  83. package/dist/components/aspect-ratio.js +12 -0
  84. package/dist/components/aspect-ratio.js.map +1 -0
  85. package/dist/components/avatar.d.ts +13 -0
  86. package/dist/components/avatar.js +19 -0
  87. package/dist/components/avatar.js.map +1 -0
  88. package/dist/components/badge.d.ts +12 -0
  89. package/dist/components/badge.js +11 -0
  90. package/dist/components/badge.js.map +1 -0
  91. package/dist/components/breadcrumb.d.ts +13 -0
  92. package/dist/components/breadcrumb.js +102 -0
  93. package/dist/components/breadcrumb.js.map +1 -0
  94. package/dist/components/button-group.d.ts +16 -0
  95. package/dist/components/button-group.js +15 -0
  96. package/dist/components/button-group.js.map +1 -0
  97. package/dist/components/button.d.ts +14 -0
  98. package/dist/components/button.js +11 -0
  99. package/dist/components/button.js.map +1 -0
  100. package/dist/components/calendar.d.ts +14 -0
  101. package/dist/components/calendar.js +13 -0
  102. package/dist/components/calendar.js.map +1 -0
  103. package/dist/components/card.d.ts +13 -0
  104. package/dist/components/card.js +21 -0
  105. package/dist/components/card.js.map +1 -0
  106. package/dist/components/carousel.d.ts +32 -0
  107. package/dist/components/carousel.js +196 -0
  108. package/dist/components/carousel.js.map +1 -0
  109. package/dist/components/chart.d.ts +46 -0
  110. package/dist/components/chart.js +254 -0
  111. package/dist/components/chart.js.map +1 -0
  112. package/dist/components/checkbox.d.ts +6 -0
  113. package/dist/components/checkbox.js +41 -0
  114. package/dist/components/checkbox.js.map +1 -0
  115. package/dist/components/code-block-core.d.ts +3 -0
  116. package/dist/components/code-block-core.js +13 -0
  117. package/dist/components/code-block-core.js.map +1 -0
  118. package/dist/components/code-block-custom.d.ts +20 -0
  119. package/dist/components/code-block-custom.js +16 -0
  120. package/dist/components/code-block-custom.js.map +1 -0
  121. package/dist/components/code-block-shiki.d.ts +13 -0
  122. package/dist/components/code-block-shiki.js +15 -0
  123. package/dist/components/code-block-shiki.js.map +1 -0
  124. package/dist/components/code-block.d.ts +5 -0
  125. package/dist/components/code-block.js +14 -0
  126. package/dist/components/code-block.js.map +1 -0
  127. package/dist/components/collapsible.d.ts +8 -0
  128. package/dist/components/collapsible.js +24 -0
  129. package/dist/components/collapsible.js.map +1 -0
  130. package/dist/components/collection.d.ts +63 -0
  131. package/dist/components/collection.js +598 -0
  132. package/dist/components/collection.js.map +1 -0
  133. package/dist/components/color-dot.d.ts +19 -0
  134. package/dist/components/color-dot.js +41 -0
  135. package/dist/components/color-dot.js.map +1 -0
  136. package/dist/components/color-picker.d.ts +12 -0
  137. package/dist/components/color-picker.js +142 -0
  138. package/dist/components/color-picker.js.map +1 -0
  139. package/dist/components/combobox.d.ts +74 -0
  140. package/dist/components/combobox.js +610 -0
  141. package/dist/components/combobox.js.map +1 -0
  142. package/dist/components/command.d.ts +21 -0
  143. package/dist/components/command.js +31 -0
  144. package/dist/components/command.js.map +1 -0
  145. package/dist/components/date-picker.d.ts +43 -0
  146. package/dist/components/date-picker.js +235 -0
  147. package/dist/components/date-picker.js.map +1 -0
  148. package/dist/components/dialog.d.ts +25 -0
  149. package/dist/components/dialog.js +31 -0
  150. package/dist/components/dialog.js.map +1 -0
  151. package/dist/components/drawer.d.ts +15 -0
  152. package/dist/components/drawer.js +124 -0
  153. package/dist/components/drawer.js.map +1 -0
  154. package/dist/components/dropdown-menu.d.ts +34 -0
  155. package/dist/components/dropdown-menu.js +248 -0
  156. package/dist/components/dropdown-menu.js.map +1 -0
  157. package/dist/components/empty.d.ts +15 -0
  158. package/dist/components/empty.js +104 -0
  159. package/dist/components/empty.js.map +1 -0
  160. package/dist/components/field.d.ts +29 -0
  161. package/dist/components/field.js +214 -0
  162. package/dist/components/field.js.map +1 -0
  163. package/dist/components/format-bytes.d.ts +12 -0
  164. package/dist/components/format-bytes.js +30 -0
  165. package/dist/components/format-bytes.js.map +1 -0
  166. package/dist/components/format-number.d.ts +12 -0
  167. package/dist/components/format-number.js +30 -0
  168. package/dist/components/format-number.js.map +1 -0
  169. package/dist/components/gauge.d.ts +11 -0
  170. package/dist/components/gauge.js +82 -0
  171. package/dist/components/gauge.js.map +1 -0
  172. package/dist/components/hover-card.d.ts +8 -0
  173. package/dist/components/hover-card.js +45 -0
  174. package/dist/components/hover-card.js.map +1 -0
  175. package/dist/components/input-group.d.ts +24 -0
  176. package/dist/components/input-group.js +23 -0
  177. package/dist/components/input-group.js.map +1 -0
  178. package/dist/components/input-otp.d.ts +20 -0
  179. package/dist/components/input-otp.js +95 -0
  180. package/dist/components/input-otp.js.map +1 -0
  181. package/dist/components/input.d.ts +9 -0
  182. package/dist/components/input.js +9 -0
  183. package/dist/components/input.js.map +1 -0
  184. package/dist/components/item.d.ts +27 -0
  185. package/dist/components/item.js +182 -0
  186. package/dist/components/item.js.map +1 -0
  187. package/dist/components/kbd.d.ts +6 -0
  188. package/dist/components/kbd.js +34 -0
  189. package/dist/components/kbd.js.map +1 -0
  190. package/dist/components/label.d.ts +6 -0
  191. package/dist/components/label.js +9 -0
  192. package/dist/components/label.js.map +1 -0
  193. package/dist/components/loading-bar.d.ts +8 -0
  194. package/dist/components/loading-bar.js +127 -0
  195. package/dist/components/loading-bar.js.map +1 -0
  196. package/dist/components/loading-dots.d.ts +5 -0
  197. package/dist/components/loading-dots.js +45 -0
  198. package/dist/components/loading-dots.js.map +1 -0
  199. package/dist/components/main-provider.d.ts +7 -0
  200. package/dist/components/main-provider.js +12 -0
  201. package/dist/components/main-provider.js.map +1 -0
  202. package/dist/components/mark.d.ts +11 -0
  203. package/dist/components/mark.js +44 -0
  204. package/dist/components/mark.js.map +1 -0
  205. package/dist/components/pagination.d.ts +21 -0
  206. package/dist/components/pagination.js +114 -0
  207. package/dist/components/pagination.js.map +1 -0
  208. package/dist/components/popover.d.ts +12 -0
  209. package/dist/components/popover.js +22 -0
  210. package/dist/components/popover.js.map +1 -0
  211. package/dist/components/prev-next-navigation.d.ts +15 -0
  212. package/dist/components/prev-next-navigation.js +85 -0
  213. package/dist/components/prev-next-navigation.js.map +1 -0
  214. package/dist/components/progress.d.ts +6 -0
  215. package/dist/components/progress.js +38 -0
  216. package/dist/components/progress.js.map +1 -0
  217. package/dist/components/radio-group.d.ts +7 -0
  218. package/dist/components/radio-group.js +57 -0
  219. package/dist/components/radio-group.js.map +1 -0
  220. package/dist/components/relative-time.d.ts +16 -0
  221. package/dist/components/relative-time.js +75 -0
  222. package/dist/components/relative-time.js.map +1 -0
  223. package/dist/components/resizable.d.ts +10 -0
  224. package/dist/components/resizable.js +45 -0
  225. package/dist/components/resizable.js.map +1 -0
  226. package/dist/components/scroll-area.d.ts +7 -0
  227. package/dist/components/scroll-area.js +11 -0
  228. package/dist/components/scroll-area.js.map +1 -0
  229. package/dist/components/select.d.ts +20 -0
  230. package/dist/components/select.js +189 -0
  231. package/dist/components/select.js.map +1 -0
  232. package/dist/components/separator.d.ts +6 -0
  233. package/dist/components/separator.js +9 -0
  234. package/dist/components/separator.js.map +1 -0
  235. package/dist/components/sheet.d.ts +16 -0
  236. package/dist/components/sheet.js +25 -0
  237. package/dist/components/sheet.js.map +1 -0
  238. package/dist/components/show-more.d.ts +15 -0
  239. package/dist/components/show-more.js +79 -0
  240. package/dist/components/show-more.js.map +1 -0
  241. package/dist/components/skeleton.d.ts +5 -0
  242. package/dist/components/skeleton.js +8 -0
  243. package/dist/components/skeleton.js.map +1 -0
  244. package/dist/components/slider.d.ts +6 -0
  245. package/dist/components/slider.js +65 -0
  246. package/dist/components/slider.js.map +1 -0
  247. package/dist/components/snippet.d.ts +13 -0
  248. package/dist/components/snippet.js +135 -0
  249. package/dist/components/snippet.js.map +1 -0
  250. package/dist/components/sonner.d.ts +6 -0
  251. package/dist/components/sonner.js +10 -0
  252. package/dist/components/sonner.js.map +1 -0
  253. package/dist/components/spinner.d.ts +5 -0
  254. package/dist/components/spinner.js +8 -0
  255. package/dist/components/spinner.js.map +1 -0
  256. package/dist/components/stat.d.ts +17 -0
  257. package/dist/components/stat.js +71 -0
  258. package/dist/components/stat.js.map +1 -0
  259. package/dist/components/steps.d.ts +17 -0
  260. package/dist/components/steps.js +133 -0
  261. package/dist/components/steps.js.map +1 -0
  262. package/dist/components/switch.d.ts +8 -0
  263. package/dist/components/switch.js +44 -0
  264. package/dist/components/switch.js.map +1 -0
  265. package/dist/components/table.d.ts +12 -0
  266. package/dist/components/table.js +101 -0
  267. package/dist/components/table.js.map +1 -0
  268. package/dist/components/tabs.d.ts +14 -0
  269. package/dist/components/tabs.js +88 -0
  270. package/dist/components/tabs.js.map +1 -0
  271. package/dist/components/textarea.d.ts +5 -0
  272. package/dist/components/textarea.js +9 -0
  273. package/dist/components/textarea.js.map +1 -0
  274. package/dist/components/theme-provider.d.ts +10 -0
  275. package/dist/components/theme-provider.js +14 -0
  276. package/dist/components/theme-provider.js.map +1 -0
  277. package/dist/components/time-picker.d.ts +17 -0
  278. package/dist/components/time-picker.js +219 -0
  279. package/dist/components/time-picker.js.map +1 -0
  280. package/dist/components/timeline.d.ts +17 -0
  281. package/dist/components/timeline.js +138 -0
  282. package/dist/components/timeline.js.map +1 -0
  283. package/dist/components/toggle-group.d.ts +14 -0
  284. package/dist/components/toggle-group.js +82 -0
  285. package/dist/components/toggle-group.js.map +1 -0
  286. package/dist/components/toggle.d.ts +12 -0
  287. package/dist/components/toggle.js +11 -0
  288. package/dist/components/toggle.js.map +1 -0
  289. package/dist/components/tooltip.d.ts +9 -0
  290. package/dist/components/tooltip.js +15 -0
  291. package/dist/components/tooltip.js.map +1 -0
  292. package/dist/components/typography.d.ts +17 -0
  293. package/dist/components/typography.js +91 -0
  294. package/dist/components/typography.js.map +1 -0
  295. package/dist/hooks/use-mobile.d.ts +3 -0
  296. package/dist/hooks/use-mobile.js +7 -0
  297. package/dist/hooks/use-mobile.js.map +1 -0
  298. package/dist/hooks/use-theme.d.ts +3 -0
  299. package/dist/hooks/use-theme.js +8 -0
  300. package/dist/hooks/use-theme.js.map +1 -0
  301. package/dist/index.d.ts +7 -0
  302. package/dist/index.js +27 -0
  303. package/dist/index.js.map +1 -0
  304. package/dist/layouts/center/index.d.ts +18 -0
  305. package/dist/layouts/center/index.js +73 -0
  306. package/dist/layouts/center/index.js.map +1 -0
  307. package/dist/layouts/chat/index.d.ts +42 -0
  308. package/dist/layouts/chat/index.js +191 -0
  309. package/dist/layouts/chat/index.js.map +1 -0
  310. package/dist/layouts/command/index.d.ts +2 -0
  311. package/dist/layouts/command/index.js +1 -0
  312. package/dist/layouts/command/index.js.map +1 -0
  313. package/dist/layouts/panel/index.d.ts +55 -0
  314. package/dist/layouts/panel/index.js +513 -0
  315. package/dist/layouts/panel/index.js.map +1 -0
  316. package/dist/layouts/presentation/index.d.ts +14 -0
  317. package/dist/layouts/presentation/index.js +100 -0
  318. package/dist/layouts/presentation/index.js.map +1 -0
  319. package/dist/layouts/site/index.d.ts +17 -0
  320. package/dist/layouts/site/index.js +82 -0
  321. package/dist/layouts/site/index.js.map +1 -0
  322. package/dist/layouts/window/index.d.ts +223 -0
  323. package/dist/layouts/window/index.js +127 -0
  324. package/dist/layouts/window/index.js.map +1 -0
  325. package/dist/layouts/workbench/index.d.ts +281 -0
  326. package/dist/layouts/workbench/index.js +2457 -0
  327. package/dist/layouts/workbench/index.js.map +1 -0
  328. package/dist/lib/format.d.ts +15 -0
  329. package/dist/lib/format.js +9 -0
  330. package/dist/lib/format.js.map +1 -0
  331. package/dist/lib/theme.d.ts +22 -0
  332. package/dist/lib/theme.js +25 -0
  333. package/dist/lib/theme.js.map +1 -0
  334. package/dist/lib/utils.d.ts +5 -0
  335. package/dist/lib/utils.js +7 -0
  336. package/dist/lib/utils.js.map +1 -0
  337. package/dist/styles/fonts.css +1 -0
  338. package/dist/styles/globals.css +717 -0
  339. package/dist/styles/tokens.css +693 -0
  340. package/package.json +137 -0
@@ -0,0 +1,12 @@
1
+ import React__default from 'react';
2
+ import { FormatBytesOptions } from '../lib/format.js';
3
+
4
+ type FormatBytesProps = Omit<React__default.ComponentProps<"span">, "children"> & {
5
+ value: number | null | undefined;
6
+ fallback?: React__default.ReactNode;
7
+ locale?: Intl.LocalesArgument;
8
+ formatOptions?: Omit<FormatBytesOptions, "locale">;
9
+ };
10
+ declare function FormatBytes({ className, fallback, formatOptions, locale, value, ...props }: FormatBytesProps): string | number | bigint | boolean | React__default.JSX.Element | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> | null;
11
+
12
+ export { FormatBytes, type FormatBytesProps };
@@ -0,0 +1,30 @@
1
+ import {
2
+ formatBytes
3
+ } from "../chunk-7W7QZHEZ.js";
4
+ import {
5
+ cn
6
+ } from "../chunk-DN2AEEA2.js";
7
+
8
+ // src/components/format-bytes.tsx
9
+ import { jsx } from "react/jsx-runtime";
10
+ function FormatBytes({
11
+ className,
12
+ fallback = null,
13
+ formatOptions,
14
+ locale,
15
+ value,
16
+ ...props
17
+ }) {
18
+ const label = formatBytes(value, {
19
+ locale,
20
+ ...formatOptions
21
+ });
22
+ if (label === null) {
23
+ return fallback;
24
+ }
25
+ return /* @__PURE__ */ jsx("span", { "data-slot": "format-bytes", className: cn("tabular-nums", className), ...props, children: label });
26
+ }
27
+ export {
28
+ FormatBytes
29
+ };
30
+ //# sourceMappingURL=format-bytes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/format-bytes.tsx"],"sourcesContent":["import type React from \"react\"\n\nimport { formatBytes, type FormatBytesOptions } from \"@hyunsdev/ui/lib/format\"\nimport { cn } from \"@hyunsdev/ui/lib/utils\"\n\ntype FormatBytesProps = Omit<React.ComponentProps<\"span\">, \"children\"> & {\n value: number | null | undefined\n fallback?: React.ReactNode\n locale?: Intl.LocalesArgument\n formatOptions?: Omit<FormatBytesOptions, \"locale\">\n}\n\nfunction FormatBytes({\n className,\n fallback = null,\n formatOptions,\n locale,\n value,\n ...props\n}: FormatBytesProps) {\n const label = formatBytes(value, {\n locale,\n ...formatOptions,\n })\n\n if (label === null) {\n return fallback\n }\n\n return (\n <span data-slot=\"format-bytes\" className={cn(\"tabular-nums\", className)} {...props}>\n {label}\n </span>\n )\n}\n\nexport { FormatBytes, type FormatBytesProps }\n"],"mappings":";;;;;;;;AA8BI;AAlBJ,SAAS,YAAY;AAAA,EACnB;AAAA,EACA,WAAW;AAAA,EACX;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAqB;AACnB,QAAM,QAAQ,YAAY,OAAO;AAAA,IAC/B;AAAA,IACA,GAAG;AAAA,EACL,CAAC;AAED,MAAI,UAAU,MAAM;AAClB,WAAO;AAAA,EACT;AAEA,SACE,oBAAC,UAAK,aAAU,gBAAe,WAAW,GAAG,gBAAgB,SAAS,GAAI,GAAG,OAC1E,iBACH;AAEJ;","names":[]}
@@ -0,0 +1,12 @@
1
+ import React__default from 'react';
2
+ import { FormatNumberValue, FormatNumberOptions } from '../lib/format.js';
3
+
4
+ type FormatNumberProps = Omit<React__default.ComponentProps<"span">, "children"> & {
5
+ value: FormatNumberValue | null | undefined;
6
+ fallback?: React__default.ReactNode;
7
+ locale?: Intl.LocalesArgument;
8
+ formatOptions?: Omit<FormatNumberOptions, "locale">;
9
+ };
10
+ declare function FormatNumber({ className, fallback, formatOptions, locale, value, ...props }: FormatNumberProps): string | number | bigint | boolean | React__default.JSX.Element | Iterable<React__default.ReactNode> | Promise<string | number | bigint | boolean | React__default.ReactPortal | React__default.ReactElement<unknown, string | React__default.JSXElementConstructor<any>> | Iterable<React__default.ReactNode> | null | undefined> | null;
11
+
12
+ export { FormatNumber, type FormatNumberProps };
@@ -0,0 +1,30 @@
1
+ import {
2
+ formatNumber
3
+ } from "../chunk-7W7QZHEZ.js";
4
+ import {
5
+ cn
6
+ } from "../chunk-DN2AEEA2.js";
7
+
8
+ // src/components/format-number.tsx
9
+ import { jsx } from "react/jsx-runtime";
10
+ function FormatNumber({
11
+ className,
12
+ fallback = null,
13
+ formatOptions,
14
+ locale,
15
+ value,
16
+ ...props
17
+ }) {
18
+ const label = formatNumber(value, {
19
+ locale,
20
+ ...formatOptions
21
+ });
22
+ if (label === null) {
23
+ return fallback;
24
+ }
25
+ return /* @__PURE__ */ jsx("span", { "data-slot": "format-number", className: cn("tabular-nums", className), ...props, children: label });
26
+ }
27
+ export {
28
+ FormatNumber
29
+ };
30
+ //# sourceMappingURL=format-number.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/format-number.tsx"],"sourcesContent":["import type React from \"react\"\n\nimport {\n formatNumber,\n type FormatNumberOptions,\n type FormatNumberValue,\n} from \"@hyunsdev/ui/lib/format\"\nimport { cn } from \"@hyunsdev/ui/lib/utils\"\n\ntype FormatNumberProps = Omit<React.ComponentProps<\"span\">, \"children\"> & {\n value: FormatNumberValue | null | undefined\n fallback?: React.ReactNode\n locale?: Intl.LocalesArgument\n formatOptions?: Omit<FormatNumberOptions, \"locale\">\n}\n\nfunction FormatNumber({\n className,\n fallback = null,\n formatOptions,\n locale,\n value,\n ...props\n}: FormatNumberProps) {\n const label = formatNumber(value, {\n locale,\n ...formatOptions,\n })\n\n if (label === null) {\n return fallback\n }\n\n return (\n <span data-slot=\"format-number\" className={cn(\"tabular-nums\", className)} {...props}>\n {label}\n </span>\n )\n}\n\nexport { FormatNumber, type FormatNumberProps }\n"],"mappings":";;;;;;;;AAkCI;AAlBJ,SAAS,aAAa;AAAA,EACpB;AAAA,EACA,WAAW;AAAA,EACX;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAsB;AACpB,QAAM,QAAQ,aAAa,OAAO;AAAA,IAChC;AAAA,IACA,GAAG;AAAA,EACL,CAAC;AAED,MAAI,UAAU,MAAM;AAClB,WAAO;AAAA,EACT;AAEA,SACE,oBAAC,UAAK,aAAU,iBAAgB,WAAW,GAAG,gBAAgB,SAAS,GAAI,GAAG,OAC3E,iBACH;AAEJ;","names":[]}
@@ -0,0 +1,11 @@
1
+ import * as React$1 from 'react';
2
+
3
+ type GaugeProps = React.ComponentProps<"div"> & {
4
+ value: number;
5
+ max?: number;
6
+ strokeWidth?: number;
7
+ children?: React.ReactNode;
8
+ };
9
+ declare function Gauge({ className, value, max, strokeWidth, children, ...props }: GaugeProps): React$1.JSX.Element;
10
+
11
+ export { Gauge };
@@ -0,0 +1,82 @@
1
+ "use client";
2
+ import {
3
+ cn
4
+ } from "../chunk-DN2AEEA2.js";
5
+
6
+ // src/components/gauge.tsx
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
+ function clamp(value, min, max) {
9
+ return Math.min(Math.max(value, min), max);
10
+ }
11
+ function Gauge({ className, value, max = 100, strokeWidth = 10, children, ...props }) {
12
+ const safeMax = max > 0 ? max : 100;
13
+ const normalizedValue = clamp(value, 0, safeMax) / safeMax;
14
+ const viewBoxSize = 100;
15
+ const center = viewBoxSize / 2;
16
+ const radius = center - strokeWidth / 2 - 3;
17
+ const circumference = 2 * Math.PI * radius;
18
+ const activeLength = circumference * normalizedValue;
19
+ return /* @__PURE__ */ jsxs(
20
+ "div",
21
+ {
22
+ role: "progressbar",
23
+ "aria-valuemin": 0,
24
+ "aria-valuemax": safeMax,
25
+ "aria-valuenow": clamp(value, 0, safeMax),
26
+ "data-slot": "gauge",
27
+ className: cn("relative inline-grid size-12 shrink-0 place-items-center", className),
28
+ ...props,
29
+ children: [
30
+ /* @__PURE__ */ jsx(
31
+ "svg",
32
+ {
33
+ viewBox: `0 0 ${viewBoxSize} ${viewBoxSize}`,
34
+ xmlns: "http://www.w3.org/2000/svg",
35
+ className: "size-full overflow-visible",
36
+ "aria-hidden": "true",
37
+ children: /* @__PURE__ */ jsxs("g", { style: { transform: "rotate(-90deg)", transformOrigin: "50% 50%" }, children: [
38
+ /* @__PURE__ */ jsx(
39
+ "circle",
40
+ {
41
+ cx: center,
42
+ cy: center,
43
+ r: radius,
44
+ fill: "none",
45
+ stroke: "var(--background-secondary-alt)",
46
+ strokeWidth,
47
+ strokeLinecap: "round"
48
+ }
49
+ ),
50
+ /* @__PURE__ */ jsx(
51
+ "circle",
52
+ {
53
+ cx: center,
54
+ cy: center,
55
+ r: radius,
56
+ fill: "none",
57
+ stroke: "var(--interactive-accent)",
58
+ strokeWidth,
59
+ strokeLinecap: "round",
60
+ strokeDasharray: `${Math.max(activeLength, 1e-3)} ${circumference}`,
61
+ opacity: activeLength > 0 ? 1 : 0
62
+ }
63
+ )
64
+ ] })
65
+ }
66
+ ),
67
+ children ? /* @__PURE__ */ jsx(
68
+ "div",
69
+ {
70
+ "data-slot": "gauge-content",
71
+ className: "text-text-normal pointer-events-none absolute inset-0 grid place-items-center text-center",
72
+ children
73
+ }
74
+ ) : null
75
+ ]
76
+ }
77
+ );
78
+ }
79
+ export {
80
+ Gauge
81
+ };
82
+ //# sourceMappingURL=gauge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/gauge.tsx"],"sourcesContent":["\"use client\"\n\nimport { cn } from \"@hyunsdev/ui/lib/utils\"\n\ntype GaugeProps = React.ComponentProps<\"div\"> & {\n value: number\n max?: number\n strokeWidth?: number\n children?: React.ReactNode\n}\n\nfunction clamp(value: number, min: number, max: number) {\n return Math.min(Math.max(value, min), max)\n}\n\nfunction Gauge({ className, value, max = 100, strokeWidth = 10, children, ...props }: GaugeProps) {\n const safeMax = max > 0 ? max : 100\n const normalizedValue = clamp(value, 0, safeMax) / safeMax\n\n const viewBoxSize = 100\n const center = viewBoxSize / 2\n const radius = center - strokeWidth / 2 - 3\n const circumference = 2 * Math.PI * radius\n const activeLength = circumference * normalizedValue\n\n return (\n <div\n role=\"progressbar\"\n aria-valuemin={0}\n aria-valuemax={safeMax}\n aria-valuenow={clamp(value, 0, safeMax)}\n data-slot=\"gauge\"\n className={cn(\"relative inline-grid size-12 shrink-0 place-items-center\", className)}\n {...props}\n >\n <svg\n viewBox={`0 0 ${viewBoxSize} ${viewBoxSize}`}\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"size-full overflow-visible\"\n aria-hidden=\"true\"\n >\n <g style={{ transform: \"rotate(-90deg)\", transformOrigin: \"50% 50%\" }}>\n <circle\n cx={center}\n cy={center}\n r={radius}\n fill=\"none\"\n stroke=\"var(--background-secondary-alt)\"\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n />\n <circle\n cx={center}\n cy={center}\n r={radius}\n fill=\"none\"\n stroke=\"var(--interactive-accent)\"\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeDasharray={`${Math.max(activeLength, 0.001)} ${circumference}`}\n opacity={activeLength > 0 ? 1 : 0}\n />\n </g>\n </svg>\n\n {children ? (\n <div\n data-slot=\"gauge-content\"\n className=\"text-text-normal pointer-events-none absolute inset-0 grid place-items-center text-center\"\n >\n {children}\n </div>\n ) : null}\n </div>\n )\n}\n\nexport { Gauge }\n"],"mappings":";;;;;;AAyCQ,SACE,KADF;AA9BR,SAAS,MAAM,OAAe,KAAa,KAAa;AACtD,SAAO,KAAK,IAAI,KAAK,IAAI,OAAO,GAAG,GAAG,GAAG;AAC3C;AAEA,SAAS,MAAM,EAAE,WAAW,OAAO,MAAM,KAAK,cAAc,IAAI,UAAU,GAAG,MAAM,GAAe;AAChG,QAAM,UAAU,MAAM,IAAI,MAAM;AAChC,QAAM,kBAAkB,MAAM,OAAO,GAAG,OAAO,IAAI;AAEnD,QAAM,cAAc;AACpB,QAAM,SAAS,cAAc;AAC7B,QAAM,SAAS,SAAS,cAAc,IAAI;AAC1C,QAAM,gBAAgB,IAAI,KAAK,KAAK;AACpC,QAAM,eAAe,gBAAgB;AAErC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,iBAAe;AAAA,MACf,iBAAe;AAAA,MACf,iBAAe,MAAM,OAAO,GAAG,OAAO;AAAA,MACtC,aAAU;AAAA,MACV,WAAW,GAAG,4DAA4D,SAAS;AAAA,MAClF,GAAG;AAAA,MAEJ;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,SAAS,OAAO,WAAW,IAAI,WAAW;AAAA,YAC1C,OAAM;AAAA,YACN,WAAU;AAAA,YACV,eAAY;AAAA,YAEZ,+BAAC,OAAE,OAAO,EAAE,WAAW,kBAAkB,iBAAiB,UAAU,GAClE;AAAA;AAAA,gBAAC;AAAA;AAAA,kBACC,IAAI;AAAA,kBACJ,IAAI;AAAA,kBACJ,GAAG;AAAA,kBACH,MAAK;AAAA,kBACL,QAAO;AAAA,kBACP;AAAA,kBACA,eAAc;AAAA;AAAA,cAChB;AAAA,cACA;AAAA,gBAAC;AAAA;AAAA,kBACC,IAAI;AAAA,kBACJ,IAAI;AAAA,kBACJ,GAAG;AAAA,kBACH,MAAK;AAAA,kBACL,QAAO;AAAA,kBACP;AAAA,kBACA,eAAc;AAAA,kBACd,iBAAiB,GAAG,KAAK,IAAI,cAAc,IAAK,CAAC,IAAI,aAAa;AAAA,kBAClE,SAAS,eAAe,IAAI,IAAI;AAAA;AAAA,cAClC;AAAA,eACF;AAAA;AAAA,QACF;AAAA,QAEC,WACC;AAAA,UAAC;AAAA;AAAA,YACC,aAAU;AAAA,YACV,WAAU;AAAA,YAET;AAAA;AAAA,QACH,IACE;AAAA;AAAA;AAAA,EACN;AAEJ;","names":[]}
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
3
+
4
+ declare function HoverCard({ ...props }: React.ComponentProps<typeof HoverCardPrimitive.Root>): React.JSX.Element;
5
+ declare function HoverCardTrigger({ ...props }: React.ComponentProps<typeof HoverCardPrimitive.Trigger>): React.JSX.Element;
6
+ declare function HoverCardContent({ className, align, sideOffset, ...props }: React.ComponentProps<typeof HoverCardPrimitive.Content>): React.JSX.Element;
7
+
8
+ export { HoverCard, HoverCardContent, HoverCardTrigger };
@@ -0,0 +1,45 @@
1
+ "use client";
2
+ import {
3
+ floatingSurfaceClass
4
+ } from "../chunk-O2BG2KSY.js";
5
+ import {
6
+ cn
7
+ } from "../chunk-DN2AEEA2.js";
8
+
9
+ // src/components/hover-card.tsx
10
+ import "react";
11
+ import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
12
+ import { jsx } from "react/jsx-runtime";
13
+ function HoverCard({ ...props }) {
14
+ return /* @__PURE__ */ jsx(HoverCardPrimitive.Root, { "data-slot": "hover-card", ...props });
15
+ }
16
+ function HoverCardTrigger({ ...props }) {
17
+ return /* @__PURE__ */ jsx(HoverCardPrimitive.Trigger, { "data-slot": "hover-card-trigger", ...props });
18
+ }
19
+ function HoverCardContent({
20
+ className,
21
+ align = "center",
22
+ sideOffset = 4,
23
+ ...props
24
+ }) {
25
+ return /* @__PURE__ */ jsx(HoverCardPrimitive.Portal, { "data-slot": "hover-card-portal", children: /* @__PURE__ */ jsx(
26
+ HoverCardPrimitive.Content,
27
+ {
28
+ "data-slot": "hover-card-content",
29
+ align,
30
+ sideOffset,
31
+ className: cn(
32
+ "data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-[var(--layer-popover)] w-64 origin-(--radix-hover-card-content-transform-origin) rounded-[var(--radius-floating)] p-2.5 text-sm outline-hidden duration-100",
33
+ floatingSurfaceClass,
34
+ className
35
+ ),
36
+ ...props
37
+ }
38
+ ) });
39
+ }
40
+ export {
41
+ HoverCard,
42
+ HoverCardContent,
43
+ HoverCardTrigger
44
+ };
45
+ //# sourceMappingURL=hover-card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/hover-card.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\n\nimport * as HoverCardPrimitive from \"@radix-ui/react-hover-card\"\n\nimport { cn } from \"@hyunsdev/ui/lib/utils\"\n\nimport { floatingSurfaceClass } from \"./_styles\"\n\nfunction HoverCard({ ...props }: React.ComponentProps<typeof HoverCardPrimitive.Root>) {\n return <HoverCardPrimitive.Root data-slot=\"hover-card\" {...props} />\n}\n\nfunction HoverCardTrigger({ ...props }: React.ComponentProps<typeof HoverCardPrimitive.Trigger>) {\n return <HoverCardPrimitive.Trigger data-slot=\"hover-card-trigger\" {...props} />\n}\n\nfunction HoverCardContent({\n className,\n align = \"center\",\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof HoverCardPrimitive.Content>) {\n return (\n <HoverCardPrimitive.Portal data-slot=\"hover-card-portal\">\n <HoverCardPrimitive.Content\n data-slot=\"hover-card-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-[var(--layer-popover)] w-64 origin-(--radix-hover-card-content-transform-origin) rounded-[var(--radius-floating)] p-2.5 text-sm outline-hidden duration-100\",\n floatingSurfaceClass,\n className,\n )}\n {...props}\n />\n </HoverCardPrimitive.Portal>\n )\n}\n\nexport { HoverCard, HoverCardTrigger, HoverCardContent }\n"],"mappings":";;;;;;;;;AAEA,OAAuB;AAEvB,YAAY,wBAAwB;AAO3B;AADT,SAAS,UAAU,EAAE,GAAG,MAAM,GAAyD;AACrF,SAAO,oBAAoB,yBAAnB,EAAwB,aAAU,cAAc,GAAG,OAAO;AACpE;AAEA,SAAS,iBAAiB,EAAE,GAAG,MAAM,GAA4D;AAC/F,SAAO,oBAAoB,4BAAnB,EAA2B,aAAU,sBAAsB,GAAG,OAAO;AAC/E;AAEA,SAAS,iBAAiB;AAAA,EACxB;AAAA,EACA,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,GAAG;AACL,GAA4D;AAC1D,SACE,oBAAoB,2BAAnB,EAA0B,aAAU,qBACnC;AAAA,IAAoB;AAAA,IAAnB;AAAA,MACC,aAAU;AAAA,MACV;AAAA,MACA;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN,GACF;AAEJ;","names":[]}
@@ -0,0 +1,24 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import * as React from 'react';
3
+ import { VariantProps } from 'class-variance-authority';
4
+ import { Button } from './button.js';
5
+ import { Input } from './input.js';
6
+ import { F as FieldControlSize } from '../_styles-BbTx89aX.js';
7
+
8
+ type InputGroupProps = React.ComponentProps<"div"> & {
9
+ size?: FieldControlSize;
10
+ };
11
+ declare function InputGroup({ className, size, ...props }: InputGroupProps): React.JSX.Element;
12
+ declare const inputGroupAddonVariants: (props?: ({
13
+ align?: "inline-start" | "inline-end" | "block-start" | "block-end" | null | undefined;
14
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
15
+ declare function InputGroupAddon({ className, align, ...props }: React.ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>): React.JSX.Element;
16
+ declare const inputGroupButtonVariants: (props?: ({
17
+ size?: "sm" | "xs" | "icon-xs" | "icon-sm" | null | undefined;
18
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
19
+ declare function InputGroupButton({ className, type, variant, size, ...props }: Omit<React.ComponentProps<typeof Button>, "size"> & VariantProps<typeof inputGroupButtonVariants>): React.JSX.Element;
20
+ declare function InputGroupText({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
21
+ declare function InputGroupInput({ className, ...props }: React.ComponentProps<typeof Input>): React.JSX.Element;
22
+ declare function InputGroupTextarea({ className, ...props }: React.ComponentProps<"textarea">): React.JSX.Element;
23
+
24
+ export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea };
@@ -0,0 +1,23 @@
1
+ "use client";
2
+ import {
3
+ InputGroup,
4
+ InputGroupAddon,
5
+ InputGroupButton,
6
+ InputGroupInput,
7
+ InputGroupText,
8
+ InputGroupTextarea
9
+ } from "../chunk-UVAI2U6X.js";
10
+ import "../chunk-NE3IVPMO.js";
11
+ import "../chunk-YUPLJP3F.js";
12
+ import "../chunk-TU5CYBB4.js";
13
+ import "../chunk-O2BG2KSY.js";
14
+ import "../chunk-DN2AEEA2.js";
15
+ export {
16
+ InputGroup,
17
+ InputGroupAddon,
18
+ InputGroupButton,
19
+ InputGroupInput,
20
+ InputGroupText,
21
+ InputGroupTextarea
22
+ };
23
+ //# sourceMappingURL=input-group.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,20 @@
1
+ import * as React from 'react';
2
+ import { OTPInputProps } from 'input-otp';
3
+ import { F as FieldControlSize } from '../_styles-BbTx89aX.js';
4
+
5
+ type DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;
6
+ type InputOTPProps = DistributiveOmit<OTPInputProps, "size"> & React.RefAttributes<HTMLInputElement> & {
7
+ containerClassName?: string;
8
+ size?: FieldControlSize;
9
+ };
10
+ declare function InputOTP({ className, containerClassName, size, ...props }: InputOTPProps): React.JSX.Element;
11
+ declare function InputOTPGroup({ className, size, ...props }: React.ComponentProps<"div"> & {
12
+ size?: FieldControlSize;
13
+ }): React.JSX.Element;
14
+ declare function InputOTPSlot({ index, className, size, ...props }: React.ComponentProps<"div"> & {
15
+ index: number;
16
+ size?: FieldControlSize;
17
+ }): React.JSX.Element;
18
+ declare function InputOTPSeparator({ ...props }: React.ComponentProps<"div">): React.JSX.Element;
19
+
20
+ export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };
@@ -0,0 +1,95 @@
1
+ "use client";
2
+ import "../chunk-O2BG2KSY.js";
3
+ import {
4
+ cn
5
+ } from "../chunk-DN2AEEA2.js";
6
+
7
+ // src/components/input-otp.tsx
8
+ import * as React from "react";
9
+ import { OTPInput, OTPInputContext } from "input-otp";
10
+ import { MinusIcon } from "lucide-react";
11
+ import { jsx, jsxs } from "react/jsx-runtime";
12
+ var InputOTPSizeContext = React.createContext("default");
13
+ function InputOTP({ className, containerClassName, size = "default", ...props }) {
14
+ return /* @__PURE__ */ jsx(InputOTPSizeContext.Provider, { value: size, children: /* @__PURE__ */ jsx(
15
+ OTPInput,
16
+ {
17
+ "data-slot": "input-otp",
18
+ "data-size": size,
19
+ containerClassName: cn(
20
+ "cn-input-otp flex items-center has-disabled:opacity-50",
21
+ containerClassName
22
+ ),
23
+ spellCheck: false,
24
+ className: cn("disabled:cursor-not-allowed", className),
25
+ ...props
26
+ }
27
+ ) });
28
+ }
29
+ function InputOTPGroup({
30
+ className,
31
+ size,
32
+ ...props
33
+ }) {
34
+ const inputOTPSize = React.useContext(InputOTPSizeContext);
35
+ const resolvedSize = size ?? inputOTPSize;
36
+ return /* @__PURE__ */ jsx(InputOTPSizeContext.Provider, { value: resolvedSize, children: /* @__PURE__ */ jsx(
37
+ "div",
38
+ {
39
+ "data-slot": "input-otp-group",
40
+ "data-size": resolvedSize,
41
+ className: cn(
42
+ "group/input-otp-group has-aria-invalid:ring-field-border-error/20 flex items-center rounded-lg has-aria-invalid:ring-3",
43
+ className
44
+ ),
45
+ ...props
46
+ }
47
+ ) });
48
+ }
49
+ function InputOTPSlot({
50
+ index,
51
+ className,
52
+ size,
53
+ ...props
54
+ }) {
55
+ const inputOTPSize = React.useContext(InputOTPSizeContext);
56
+ const resolvedSize = size ?? inputOTPSize;
57
+ const inputOTPContext = React.useContext(OTPInputContext);
58
+ const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
59
+ return /* @__PURE__ */ jsxs(
60
+ "div",
61
+ {
62
+ "data-slot": "input-otp-slot",
63
+ "data-size": resolvedSize,
64
+ "data-active": isActive,
65
+ className: cn(
66
+ "border-field-border bg-field-background text-field-text aria-invalid:border-field-border-error data-[active=true]:border-field-border-focus data-[active=true]:ring-focus-ring data-[active=true]:aria-invalid:border-field-border-error data-[active=true]:aria-invalid:ring-field-border-error/20 relative flex size-8 items-center justify-center border-y border-r text-sm transition-all outline-none first:rounded-l-lg first:border-l last:rounded-r-lg data-[active=true]:z-10 data-[active=true]:ring-3 data-[size=sm]:size-7 data-[size=sm]:text-[0.8rem] data-[size=sm]:first:rounded-l-[min(var(--radius-md),12px)] data-[size=sm]:last:rounded-r-[min(var(--radius-md),12px)]",
67
+ className
68
+ ),
69
+ ...props,
70
+ children: [
71
+ char,
72
+ hasFakeCaret && /* @__PURE__ */ jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx("div", { className: "animate-caret-blink bg-text-normal h-4 w-px duration-1000" }) })
73
+ ]
74
+ }
75
+ );
76
+ }
77
+ function InputOTPSeparator({ ...props }) {
78
+ return /* @__PURE__ */ jsx(
79
+ "div",
80
+ {
81
+ "data-slot": "input-otp-separator",
82
+ className: "flex items-center [&_svg:not([class*='size-'])]:size-4",
83
+ role: "separator",
84
+ ...props,
85
+ children: /* @__PURE__ */ jsx(MinusIcon, {})
86
+ }
87
+ );
88
+ }
89
+ export {
90
+ InputOTP,
91
+ InputOTPGroup,
92
+ InputOTPSeparator,
93
+ InputOTPSlot
94
+ };
95
+ //# sourceMappingURL=input-otp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/input-otp.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\n\nimport { OTPInput, OTPInputContext, type OTPInputProps } from \"input-otp\"\nimport { MinusIcon } from \"lucide-react\"\n\nimport { cn } from \"@hyunsdev/ui/lib/utils\"\n\nimport { type FieldControlSize } from \"./_styles\"\n\nconst InputOTPSizeContext = React.createContext<FieldControlSize>(\"default\")\n\ntype DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never\n\ntype InputOTPProps = DistributiveOmit<OTPInputProps, \"size\"> &\n React.RefAttributes<HTMLInputElement> & {\n containerClassName?: string\n size?: FieldControlSize\n }\n\nfunction InputOTP({ className, containerClassName, size = \"default\", ...props }: InputOTPProps) {\n return (\n <InputOTPSizeContext.Provider value={size}>\n <OTPInput\n data-slot=\"input-otp\"\n data-size={size}\n containerClassName={cn(\n \"cn-input-otp flex items-center has-disabled:opacity-50\",\n containerClassName,\n )}\n spellCheck={false}\n className={cn(\"disabled:cursor-not-allowed\", className)}\n {...props}\n />\n </InputOTPSizeContext.Provider>\n )\n}\n\nfunction InputOTPGroup({\n className,\n size,\n ...props\n}: React.ComponentProps<\"div\"> & {\n size?: FieldControlSize\n}) {\n const inputOTPSize = React.useContext(InputOTPSizeContext)\n const resolvedSize = size ?? inputOTPSize\n\n return (\n <InputOTPSizeContext.Provider value={resolvedSize}>\n <div\n data-slot=\"input-otp-group\"\n data-size={resolvedSize}\n className={cn(\n \"group/input-otp-group has-aria-invalid:ring-field-border-error/20 flex items-center rounded-lg has-aria-invalid:ring-3\",\n className,\n )}\n {...props}\n />\n </InputOTPSizeContext.Provider>\n )\n}\n\nfunction InputOTPSlot({\n index,\n className,\n size,\n ...props\n}: React.ComponentProps<\"div\"> & {\n index: number\n size?: FieldControlSize\n}) {\n const inputOTPSize = React.useContext(InputOTPSizeContext)\n const resolvedSize = size ?? inputOTPSize\n const inputOTPContext = React.useContext(OTPInputContext)\n const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {}\n\n return (\n <div\n data-slot=\"input-otp-slot\"\n data-size={resolvedSize}\n data-active={isActive}\n className={cn(\n \"border-field-border bg-field-background text-field-text aria-invalid:border-field-border-error data-[active=true]:border-field-border-focus data-[active=true]:ring-focus-ring data-[active=true]:aria-invalid:border-field-border-error data-[active=true]:aria-invalid:ring-field-border-error/20 relative flex size-8 items-center justify-center border-y border-r text-sm transition-all outline-none first:rounded-l-lg first:border-l last:rounded-r-lg data-[active=true]:z-10 data-[active=true]:ring-3 data-[size=sm]:size-7 data-[size=sm]:text-[0.8rem] data-[size=sm]:first:rounded-l-[min(var(--radius-md),12px)] data-[size=sm]:last:rounded-r-[min(var(--radius-md),12px)]\",\n className,\n )}\n {...props}\n >\n {char}\n {hasFakeCaret && (\n <div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n <div className=\"animate-caret-blink bg-text-normal h-4 w-px duration-1000\" />\n </div>\n )}\n </div>\n )\n}\n\nfunction InputOTPSeparator({ ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"input-otp-separator\"\n className=\"flex items-center [&_svg:not([class*='size-'])]:size-4\"\n role=\"separator\"\n {...props}\n >\n <MinusIcon />\n </div>\n )\n}\n\nexport { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator }\n"],"mappings":";;;;;;;AAEA,YAAY,WAAW;AAEvB,SAAS,UAAU,uBAA2C;AAC9D,SAAS,iBAAiB;AAmBpB,cAuDF,YAvDE;AAbN,IAAM,sBAA4B,oBAAgC,SAAS;AAU3E,SAAS,SAAS,EAAE,WAAW,oBAAoB,OAAO,WAAW,GAAG,MAAM,GAAkB;AAC9F,SACE,oBAAC,oBAAoB,UAApB,EAA6B,OAAO,MACnC;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,aAAW;AAAA,MACX,oBAAoB;AAAA,QAClB;AAAA,QACA;AAAA,MACF;AAAA,MACA,YAAY;AAAA,MACZ,WAAW,GAAG,+BAA+B,SAAS;AAAA,MACrD,GAAG;AAAA;AAAA,EACN,GACF;AAEJ;AAEA,SAAS,cAAc;AAAA,EACrB;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAEG;AACD,QAAM,eAAqB,iBAAW,mBAAmB;AACzD,QAAM,eAAe,QAAQ;AAE7B,SACE,oBAAC,oBAAoB,UAApB,EAA6B,OAAO,cACnC;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,aAAW;AAAA,MACX,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN,GACF;AAEJ;AAEA,SAAS,aAAa;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAGG;AACD,QAAM,eAAqB,iBAAW,mBAAmB;AACzD,QAAM,eAAe,QAAQ;AAC7B,QAAM,kBAAwB,iBAAW,eAAe;AACxD,QAAM,EAAE,MAAM,cAAc,SAAS,IAAI,iBAAiB,MAAM,KAAK,KAAK,CAAC;AAE3E,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,aAAW;AAAA,MACX,eAAa;AAAA,MACb,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEH;AAAA;AAAA,QACA,gBACC,oBAAC,SAAI,WAAU,yEACb,8BAAC,SAAI,WAAU,6DAA4D,GAC7E;AAAA;AAAA;AAAA,EAEJ;AAEJ;AAEA,SAAS,kBAAkB,EAAE,GAAG,MAAM,GAAgC;AACpE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAU;AAAA,MACV,MAAK;AAAA,MACJ,GAAG;AAAA,MAEJ,8BAAC,aAAU;AAAA;AAAA,EACb;AAEJ;","names":[]}
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ import { F as FieldControlSize } from '../_styles-BbTx89aX.js';
3
+
4
+ type InputProps = Omit<React.ComponentProps<"input">, "size"> & {
5
+ size?: FieldControlSize;
6
+ };
7
+ declare function Input({ className, type, size, ...props }: InputProps): React.JSX.Element;
8
+
9
+ export { Input };
@@ -0,0 +1,9 @@
1
+ import {
2
+ Input
3
+ } from "../chunk-YUPLJP3F.js";
4
+ import "../chunk-O2BG2KSY.js";
5
+ import "../chunk-DN2AEEA2.js";
6
+ export {
7
+ Input
8
+ };
9
+ //# sourceMappingURL=input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,27 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import * as React from 'react';
3
+ import { VariantProps } from 'class-variance-authority';
4
+ import { Separator } from './separator.js';
5
+ import '@radix-ui/react-separator';
6
+
7
+ declare function ItemGroup({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
8
+ declare function ItemSeparator({ className, ...props }: React.ComponentProps<typeof Separator>): React.JSX.Element;
9
+ declare const itemVariants: (props?: ({
10
+ variant?: "default" | "outline" | "muted" | null | undefined;
11
+ size?: "default" | "sm" | "xs" | null | undefined;
12
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
13
+ declare function Item({ className, variant, size, asChild, ...props }: React.ComponentProps<"div"> & VariantProps<typeof itemVariants> & {
14
+ asChild?: boolean;
15
+ }): React.JSX.Element;
16
+ declare const itemMediaVariants: (props?: ({
17
+ variant?: "default" | "image" | "icon" | null | undefined;
18
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
19
+ declare function ItemMedia({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof itemMediaVariants>): React.JSX.Element;
20
+ declare function ItemContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
21
+ declare function ItemTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
22
+ declare function ItemDescription({ className, ...props }: React.ComponentProps<"p">): React.JSX.Element;
23
+ declare function ItemActions({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
24
+ declare function ItemHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
25
+ declare function ItemFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
26
+
27
+ export { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle };