@me1a/ui 2.2.2 → 2.2.3

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 (353) hide show
  1. package/dist/{atoms/accordion.mjs → accordion/index.mjs} +2 -2
  2. package/dist/accordion/index.mjs.map +1 -0
  3. package/dist/{atoms/avatar.mjs → avatar/index.mjs} +2 -2
  4. package/dist/avatar/index.mjs.map +1 -0
  5. package/dist/{atoms/badge.d.mts → badge/index.d.mts} +9 -8
  6. package/dist/{atoms/badge.mjs → badge/index.mjs} +2 -2
  7. package/dist/{atoms/badge.mjs.map → badge/index.mjs.map} +1 -1
  8. package/dist/{atoms/box.mjs → box/index.mjs} +2 -2
  9. package/dist/box/index.mjs.map +1 -0
  10. package/dist/{atoms/breadcrumb.mjs → breadcrumb/index.mjs} +2 -2
  11. package/dist/breadcrumb/index.mjs.map +1 -0
  12. package/dist/{atoms/button.d.mts → button/index.d.mts} +2 -2
  13. package/dist/{atoms/button.mjs → button/index.mjs} +2 -2
  14. package/dist/button/index.mjs.map +1 -0
  15. package/dist/card/index.d.mts +127 -0
  16. package/dist/card/index.mjs +2 -0
  17. package/dist/card/index.mjs.map +1 -0
  18. package/dist/{atoms/checkbox.mjs → checkbox/index.mjs} +2 -2
  19. package/dist/checkbox/index.mjs.map +1 -0
  20. package/dist/{atoms/collapsible.mjs → collapsible/index.mjs} +2 -2
  21. package/dist/collapsible/index.mjs.map +1 -0
  22. package/dist/{atoms/command.mjs → command/index.mjs} +2 -2
  23. package/dist/command/index.mjs.map +1 -0
  24. package/dist/container/index.d.mts +33 -0
  25. package/dist/{atoms/container.mjs → container/index.mjs} +2 -2
  26. package/dist/container/index.mjs.map +1 -0
  27. package/dist/{atoms/dialog.mjs → dialog/index.mjs} +2 -2
  28. package/dist/dialog/index.mjs.map +1 -0
  29. package/dist/{organisms/drawer.mjs → drawer/index.mjs} +2 -2
  30. package/dist/drawer/index.mjs.map +1 -0
  31. package/dist/{organisms/dropdown-menu.d.mts → dropdown-menu/index.d.mts} +2 -2
  32. package/dist/{organisms/dropdown-menu.mjs → dropdown-menu/index.mjs} +2 -2
  33. package/dist/dropdown-menu/index.mjs.map +1 -0
  34. package/dist/{rhf/form.mjs → form/index.mjs} +2 -2
  35. package/dist/form/index.mjs.map +1 -0
  36. package/dist/{hooks.d.mts → hooks/index.d.mts} +2 -2
  37. package/dist/{hooks.mjs → hooks/index.mjs} +2 -2
  38. package/dist/{hooks.js.map → hooks/index.mjs.map} +1 -1
  39. package/dist/index.d.mts +159 -39
  40. package/dist/index.mjs +47 -2
  41. package/dist/index.mjs.map +1 -1
  42. package/dist/{atoms/input.mjs → input/index.mjs} +2 -2
  43. package/dist/{atoms/input.mjs.map → input/index.mjs.map} +1 -1
  44. package/dist/{atoms/label.d.mts → label/index.d.mts} +2 -2
  45. package/dist/{atoms/label.mjs → label/index.mjs} +2 -2
  46. package/dist/{atoms/label.mjs.map → label/index.mjs.map} +1 -1
  47. package/dist/{molecules/navigation-menu.d.mts → navigation-menu/index.d.mts} +21 -20
  48. package/dist/{molecules/navigation-menu.mjs → navigation-menu/index.mjs} +2 -2
  49. package/dist/navigation-menu/index.mjs.map +1 -0
  50. package/dist/{atoms/page-loader.d.mts → page-loader/index.d.mts} +2 -2
  51. package/dist/{atoms/page-loader.mjs → page-loader/index.mjs} +2 -2
  52. package/dist/page-loader/index.mjs.map +1 -0
  53. package/dist/{atoms/pagination.d.mts → pagination/index.d.mts} +2 -2
  54. package/dist/{atoms/pagination.mjs → pagination/index.mjs} +2 -2
  55. package/dist/pagination/index.mjs.map +1 -0
  56. package/dist/{atoms/popover.mjs → popover/index.mjs} +2 -2
  57. package/dist/popover/index.mjs.map +1 -0
  58. package/dist/{atoms/radio-group.d.mts → radio-group/index.d.mts} +2 -2
  59. package/dist/{atoms/radio-group.mjs → radio-group/index.mjs} +2 -2
  60. package/dist/radio-group/index.mjs.map +1 -0
  61. package/dist/{atoms/resizable.mjs → resizable/index.mjs} +2 -2
  62. package/dist/resizable/index.mjs.map +1 -0
  63. package/dist/{rhf/rhf-checkbox.mjs → rhf-checkbox/index.mjs} +2 -2
  64. package/dist/rhf-checkbox/index.mjs.map +1 -0
  65. package/dist/{rhf/rhf-multi-select.mjs → rhf-multi-select/index.mjs} +2 -2
  66. package/dist/rhf-multi-select/index.mjs.map +1 -0
  67. package/dist/{rhf/rhf-radio-button-group.mjs → rhf-radio-button-group/index.mjs} +2 -2
  68. package/dist/rhf-radio-button-group/index.mjs.map +1 -0
  69. package/dist/{rhf/rhf-radio-group.mjs → rhf-radio-group/index.mjs} +2 -2
  70. package/dist/rhf-radio-group/index.mjs.map +1 -0
  71. package/dist/{rhf/rhf-select.mjs → rhf-select/index.mjs} +2 -2
  72. package/dist/rhf-select/index.mjs.map +1 -0
  73. package/dist/{rhf/rhf-switch.mjs → rhf-switch/index.mjs} +2 -2
  74. package/dist/rhf-switch/index.mjs.map +1 -0
  75. package/dist/{rhf/rhf-textarea.mjs → rhf-textarea/index.mjs} +2 -2
  76. package/dist/rhf-textarea/index.mjs.map +1 -0
  77. package/dist/{atoms/separator.mjs → separator/index.mjs} +2 -2
  78. package/dist/separator/index.mjs.map +1 -0
  79. package/dist/{atoms/sheet.d.mts → sheet/index.d.mts} +2 -2
  80. package/dist/{atoms/sheet.mjs → sheet/index.mjs} +2 -2
  81. package/dist/{atoms/sheet.mjs.map → sheet/index.mjs.map} +1 -1
  82. package/dist/{organisms/sidebar.d.mts → sidebar/index.d.mts} +4 -4
  83. package/dist/{organisms/sidebar.mjs → sidebar/index.mjs} +2 -2
  84. package/dist/sidebar/index.mjs.map +1 -0
  85. package/dist/skeleton/index.d.mts +17 -0
  86. package/dist/skeleton/index.mjs +2 -0
  87. package/dist/skeleton/index.mjs.map +1 -0
  88. package/dist/{atoms/stack.mjs → stack/index.mjs} +2 -2
  89. package/dist/{atoms/stack.mjs.map → stack/index.mjs.map} +1 -1
  90. package/dist/{atoms/switch.mjs → switch/index.mjs} +2 -2
  91. package/dist/switch/index.mjs.map +1 -0
  92. package/dist/{atoms/table.mjs → table/index.mjs} +2 -2
  93. package/dist/{atoms/table.mjs.map → table/index.mjs.map} +1 -1
  94. package/dist/tabs/index.d.mts +97 -0
  95. package/dist/tabs/index.mjs +2 -0
  96. package/dist/tabs/index.mjs.map +1 -0
  97. package/dist/{atoms/text-field.d.mts → text-field/index.d.mts} +2 -2
  98. package/dist/{atoms/text-field.mjs → text-field/index.mjs} +2 -2
  99. package/dist/text-field/index.mjs.map +1 -0
  100. package/dist/textarea/index.d.mts +24 -0
  101. package/dist/{atoms/textarea.mjs → textarea/index.mjs} +2 -2
  102. package/dist/textarea/index.mjs.map +1 -0
  103. package/dist/{atoms/toast.d.mts → toast/index.d.mts} +2 -2
  104. package/dist/{atoms/toast.mjs → toast/index.mjs} +2 -2
  105. package/dist/{atoms/toast.mjs.map → toast/index.mjs.map} +1 -1
  106. package/dist/{atoms/toaster.mjs → toaster/index.mjs} +2 -2
  107. package/dist/toaster/index.mjs.map +1 -0
  108. package/dist/{atoms/tooltip.mjs → tooltip/index.mjs} +2 -2
  109. package/dist/tooltip/index.mjs.map +1 -0
  110. package/dist/types/index.d.mts +2 -0
  111. package/dist/types/index.mjs +2 -0
  112. package/dist/types/index.mjs.map +1 -0
  113. package/dist/{atoms/typography.d.mts → typography/index.d.mts} +2 -2
  114. package/dist/{atoms/typography.mjs → typography/index.mjs} +2 -2
  115. package/dist/typography/index.mjs.map +1 -0
  116. package/dist/utils/index.d.mts +5 -0
  117. package/dist/{utils.mjs → utils/index.mjs} +2 -2
  118. package/dist/utils/index.mjs.map +1 -0
  119. package/package.json +196 -257
  120. package/dist/atoms/accordion.d.ts +0 -94
  121. package/dist/atoms/accordion.js +0 -2
  122. package/dist/atoms/accordion.js.map +0 -1
  123. package/dist/atoms/accordion.mjs.map +0 -1
  124. package/dist/atoms/avatar.d.ts +0 -34
  125. package/dist/atoms/avatar.js +0 -2
  126. package/dist/atoms/avatar.js.map +0 -1
  127. package/dist/atoms/avatar.mjs.map +0 -1
  128. package/dist/atoms/badge.d.ts +0 -40
  129. package/dist/atoms/badge.js +0 -2
  130. package/dist/atoms/badge.js.map +0 -1
  131. package/dist/atoms/box.d.ts +0 -50
  132. package/dist/atoms/box.js +0 -2
  133. package/dist/atoms/box.js.map +0 -1
  134. package/dist/atoms/box.mjs.map +0 -1
  135. package/dist/atoms/breadcrumb.d.ts +0 -35
  136. package/dist/atoms/breadcrumb.js +0 -2
  137. package/dist/atoms/breadcrumb.js.map +0 -1
  138. package/dist/atoms/breadcrumb.mjs.map +0 -1
  139. package/dist/atoms/button.d.ts +0 -82
  140. package/dist/atoms/button.js +0 -2
  141. package/dist/atoms/button.js.map +0 -1
  142. package/dist/atoms/button.mjs.map +0 -1
  143. package/dist/atoms/checkbox.d.ts +0 -21
  144. package/dist/atoms/checkbox.js +0 -2
  145. package/dist/atoms/checkbox.js.map +0 -1
  146. package/dist/atoms/checkbox.mjs.map +0 -1
  147. package/dist/atoms/collapsible.d.ts +0 -26
  148. package/dist/atoms/collapsible.js +0 -2
  149. package/dist/atoms/collapsible.js.map +0 -1
  150. package/dist/atoms/collapsible.mjs.map +0 -1
  151. package/dist/atoms/command.d.ts +0 -122
  152. package/dist/atoms/command.js +0 -2
  153. package/dist/atoms/command.js.map +0 -1
  154. package/dist/atoms/command.mjs.map +0 -1
  155. package/dist/atoms/container.js +0 -2
  156. package/dist/atoms/container.js.map +0 -1
  157. package/dist/atoms/container.mjs.map +0 -1
  158. package/dist/atoms/dialog.d.ts +0 -35
  159. package/dist/atoms/dialog.js +0 -2
  160. package/dist/atoms/dialog.js.map +0 -1
  161. package/dist/atoms/dialog.mjs.map +0 -1
  162. package/dist/atoms/input.d.ts +0 -12
  163. package/dist/atoms/input.js +0 -2
  164. package/dist/atoms/input.js.map +0 -1
  165. package/dist/atoms/label.d.ts +0 -18
  166. package/dist/atoms/label.js +0 -2
  167. package/dist/atoms/label.js.map +0 -1
  168. package/dist/atoms/page-loader.d.ts +0 -29
  169. package/dist/atoms/page-loader.js +0 -2
  170. package/dist/atoms/page-loader.js.map +0 -1
  171. package/dist/atoms/page-loader.mjs.map +0 -1
  172. package/dist/atoms/pagination.d.ts +0 -105
  173. package/dist/atoms/pagination.js +0 -2
  174. package/dist/atoms/pagination.js.map +0 -1
  175. package/dist/atoms/pagination.mjs.map +0 -1
  176. package/dist/atoms/popover.d.ts +0 -30
  177. package/dist/atoms/popover.js +0 -2
  178. package/dist/atoms/popover.js.map +0 -1
  179. package/dist/atoms/popover.mjs.map +0 -1
  180. package/dist/atoms/radio-group.d.ts +0 -62
  181. package/dist/atoms/radio-group.js +0 -2
  182. package/dist/atoms/radio-group.js.map +0 -1
  183. package/dist/atoms/radio-group.mjs.map +0 -1
  184. package/dist/atoms/resizable.d.ts +0 -53
  185. package/dist/atoms/resizable.js +0 -2
  186. package/dist/atoms/resizable.js.map +0 -1
  187. package/dist/atoms/resizable.mjs.map +0 -1
  188. package/dist/atoms/separator.d.ts +0 -13
  189. package/dist/atoms/separator.js +0 -2
  190. package/dist/atoms/separator.js.map +0 -1
  191. package/dist/atoms/separator.mjs.map +0 -1
  192. package/dist/atoms/sheet.d.ts +0 -42
  193. package/dist/atoms/sheet.js +0 -2
  194. package/dist/atoms/sheet.js.map +0 -1
  195. package/dist/atoms/skeleton.js +0 -2
  196. package/dist/atoms/skeleton.js.map +0 -1
  197. package/dist/atoms/skeleton.mjs +0 -2
  198. package/dist/atoms/skeleton.mjs.map +0 -1
  199. package/dist/atoms/stack.d.ts +0 -121
  200. package/dist/atoms/stack.js +0 -2
  201. package/dist/atoms/stack.js.map +0 -1
  202. package/dist/atoms/switch.d.ts +0 -21
  203. package/dist/atoms/switch.js +0 -2
  204. package/dist/atoms/switch.js.map +0 -1
  205. package/dist/atoms/switch.mjs.map +0 -1
  206. package/dist/atoms/table.d.ts +0 -53
  207. package/dist/atoms/table.js +0 -2
  208. package/dist/atoms/table.js.map +0 -1
  209. package/dist/atoms/text-field.d.ts +0 -65
  210. package/dist/atoms/text-field.js +0 -2
  211. package/dist/atoms/text-field.js.map +0 -1
  212. package/dist/atoms/text-field.mjs.map +0 -1
  213. package/dist/atoms/textarea.js +0 -2
  214. package/dist/atoms/textarea.js.map +0 -1
  215. package/dist/atoms/textarea.mjs.map +0 -1
  216. package/dist/atoms/toast.d.ts +0 -18
  217. package/dist/atoms/toast.js +0 -2
  218. package/dist/atoms/toast.js.map +0 -1
  219. package/dist/atoms/toaster.d.ts +0 -26
  220. package/dist/atoms/toaster.js +0 -2
  221. package/dist/atoms/toaster.js.map +0 -1
  222. package/dist/atoms/toaster.mjs.map +0 -1
  223. package/dist/atoms/tooltip.d.ts +0 -25
  224. package/dist/atoms/tooltip.js +0 -2
  225. package/dist/atoms/tooltip.js.map +0 -1
  226. package/dist/atoms/tooltip.mjs.map +0 -1
  227. package/dist/atoms/typography.d.ts +0 -24
  228. package/dist/atoms/typography.js +0 -2
  229. package/dist/atoms/typography.js.map +0 -1
  230. package/dist/atoms/typography.mjs.map +0 -1
  231. package/dist/atoms.d.mts +0 -1237
  232. package/dist/atoms.d.ts +0 -1237
  233. package/dist/atoms.js +0 -2
  234. package/dist/atoms.js.map +0 -1
  235. package/dist/atoms.mjs +0 -2
  236. package/dist/atoms.mjs.map +0 -1
  237. package/dist/hooks.d.ts +0 -57
  238. package/dist/hooks.js +0 -2
  239. package/dist/hooks.mjs.map +0 -1
  240. package/dist/index.d.ts +0 -2619
  241. package/dist/index.js +0 -2
  242. package/dist/index.js.map +0 -1
  243. package/dist/molecules/card.d.mts +0 -72
  244. package/dist/molecules/card.d.ts +0 -72
  245. package/dist/molecules/card.js +0 -2
  246. package/dist/molecules/card.js.map +0 -1
  247. package/dist/molecules/card.mjs +0 -2
  248. package/dist/molecules/card.mjs.map +0 -1
  249. package/dist/molecules/navigation-menu.d.ts +0 -103
  250. package/dist/molecules/navigation-menu.js +0 -2
  251. package/dist/molecules/navigation-menu.js.map +0 -1
  252. package/dist/molecules/navigation-menu.mjs.map +0 -1
  253. package/dist/molecules/tabs.d.mts +0 -32
  254. package/dist/molecules/tabs.d.ts +0 -32
  255. package/dist/molecules/tabs.js +0 -2
  256. package/dist/molecules/tabs.js.map +0 -1
  257. package/dist/molecules/tabs.mjs +0 -2
  258. package/dist/molecules/tabs.mjs.map +0 -1
  259. package/dist/molecules.d.mts +0 -201
  260. package/dist/molecules.d.ts +0 -201
  261. package/dist/molecules.js +0 -2
  262. package/dist/molecules.js.map +0 -1
  263. package/dist/molecules.mjs +0 -2
  264. package/dist/molecules.mjs.map +0 -1
  265. package/dist/organisms/drawer.d.ts +0 -63
  266. package/dist/organisms/drawer.js +0 -2
  267. package/dist/organisms/drawer.js.map +0 -1
  268. package/dist/organisms/drawer.mjs.map +0 -1
  269. package/dist/organisms/dropdown-menu.d.ts +0 -335
  270. package/dist/organisms/dropdown-menu.js +0 -2
  271. package/dist/organisms/dropdown-menu.js.map +0 -1
  272. package/dist/organisms/dropdown-menu.mjs.map +0 -1
  273. package/dist/organisms/sidebar.d.ts +0 -328
  274. package/dist/organisms/sidebar.js +0 -2
  275. package/dist/organisms/sidebar.js.map +0 -1
  276. package/dist/organisms/sidebar.mjs.map +0 -1
  277. package/dist/organisms.d.mts +0 -717
  278. package/dist/organisms.d.ts +0 -717
  279. package/dist/organisms.js +0 -2
  280. package/dist/organisms.js.map +0 -1
  281. package/dist/organisms.mjs +0 -2
  282. package/dist/organisms.mjs.map +0 -1
  283. package/dist/rhf/form.d.ts +0 -96
  284. package/dist/rhf/form.js +0 -2
  285. package/dist/rhf/form.js.map +0 -1
  286. package/dist/rhf/form.mjs.map +0 -1
  287. package/dist/rhf/rhf-checkbox.d.ts +0 -57
  288. package/dist/rhf/rhf-checkbox.js +0 -2
  289. package/dist/rhf/rhf-checkbox.js.map +0 -1
  290. package/dist/rhf/rhf-checkbox.mjs.map +0 -1
  291. package/dist/rhf/rhf-multi-select.d.ts +0 -84
  292. package/dist/rhf/rhf-multi-select.js +0 -2
  293. package/dist/rhf/rhf-multi-select.js.map +0 -1
  294. package/dist/rhf/rhf-multi-select.mjs.map +0 -1
  295. package/dist/rhf/rhf-radio-button-group.d.ts +0 -73
  296. package/dist/rhf/rhf-radio-button-group.js +0 -2
  297. package/dist/rhf/rhf-radio-button-group.js.map +0 -1
  298. package/dist/rhf/rhf-radio-button-group.mjs.map +0 -1
  299. package/dist/rhf/rhf-radio-group.d.ts +0 -103
  300. package/dist/rhf/rhf-radio-group.js +0 -2
  301. package/dist/rhf/rhf-radio-group.js.map +0 -1
  302. package/dist/rhf/rhf-radio-group.mjs.map +0 -1
  303. package/dist/rhf/rhf-select.d.ts +0 -80
  304. package/dist/rhf/rhf-select.js +0 -2
  305. package/dist/rhf/rhf-select.js.map +0 -1
  306. package/dist/rhf/rhf-select.mjs.map +0 -1
  307. package/dist/rhf/rhf-switch.d.ts +0 -57
  308. package/dist/rhf/rhf-switch.js +0 -2
  309. package/dist/rhf/rhf-switch.js.map +0 -1
  310. package/dist/rhf/rhf-switch.mjs.map +0 -1
  311. package/dist/rhf/rhf-textarea.d.ts +0 -66
  312. package/dist/rhf/rhf-textarea.js +0 -2
  313. package/dist/rhf/rhf-textarea.js.map +0 -1
  314. package/dist/rhf/rhf-textarea.mjs.map +0 -1
  315. package/dist/rhf.d.mts +0 -614
  316. package/dist/rhf.d.ts +0 -614
  317. package/dist/rhf.js +0 -2
  318. package/dist/rhf.js.map +0 -1
  319. package/dist/rhf.mjs +0 -2
  320. package/dist/rhf.mjs.map +0 -1
  321. package/dist/types.js +0 -2
  322. package/dist/types.js.map +0 -1
  323. package/dist/types.mjs +0 -2
  324. package/dist/types.mjs.map +0 -1
  325. package/dist/utils.js +0 -2
  326. package/dist/utils.js.map +0 -1
  327. package/dist/utils.mjs.map +0 -1
  328. /package/dist/{atoms/accordion.d.mts → accordion/index.d.mts} +0 -0
  329. /package/dist/{atoms/avatar.d.mts → avatar/index.d.mts} +0 -0
  330. /package/dist/{atoms/box.d.mts → box/index.d.mts} +0 -0
  331. /package/dist/{atoms/breadcrumb.d.mts → breadcrumb/index.d.mts} +0 -0
  332. /package/dist/{atoms/checkbox.d.mts → checkbox/index.d.mts} +0 -0
  333. /package/dist/{atoms/collapsible.d.mts → collapsible/index.d.mts} +0 -0
  334. /package/dist/{atoms/command.d.mts → command/index.d.mts} +0 -0
  335. /package/dist/{atoms/dialog.d.mts → dialog/index.d.mts} +0 -0
  336. /package/dist/{organisms/drawer.d.mts → drawer/index.d.mts} +0 -0
  337. /package/dist/{rhf/form.d.mts → form/index.d.mts} +0 -0
  338. /package/dist/{atoms/input.d.mts → input/index.d.mts} +0 -0
  339. /package/dist/{atoms/popover.d.mts → popover/index.d.mts} +0 -0
  340. /package/dist/{atoms/resizable.d.mts → resizable/index.d.mts} +0 -0
  341. /package/dist/{rhf/rhf-checkbox.d.mts → rhf-checkbox/index.d.mts} +0 -0
  342. /package/dist/{rhf/rhf-multi-select.d.mts → rhf-multi-select/index.d.mts} +0 -0
  343. /package/dist/{rhf/rhf-radio-button-group.d.mts → rhf-radio-button-group/index.d.mts} +0 -0
  344. /package/dist/{rhf/rhf-radio-group.d.mts → rhf-radio-group/index.d.mts} +0 -0
  345. /package/dist/{rhf/rhf-select.d.mts → rhf-select/index.d.mts} +0 -0
  346. /package/dist/{rhf/rhf-switch.d.mts → rhf-switch/index.d.mts} +0 -0
  347. /package/dist/{rhf/rhf-textarea.d.mts → rhf-textarea/index.d.mts} +0 -0
  348. /package/dist/{atoms/separator.d.mts → separator/index.d.mts} +0 -0
  349. /package/dist/{atoms/stack.d.mts → stack/index.d.mts} +0 -0
  350. /package/dist/{atoms/switch.d.mts → switch/index.d.mts} +0 -0
  351. /package/dist/{atoms/table.d.mts → table/index.d.mts} +0 -0
  352. /package/dist/{atoms/toaster.d.mts → toaster/index.d.mts} +0 -0
  353. /package/dist/{atoms/tooltip.d.mts → tooltip/index.d.mts} +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/utils/cn.ts","../../src/components/atoms/stack/stack.tsx"],"names":["cn","inputs","twMerge","clsx","Stack","a","className","direction","spacing","wrap","center","justify","align","width","height","style","props","ref","jsx"],"mappings":"+eAGO,SAASA,CAAMC,CAAAA,GAAAA,CAAAA,CAAsB,CAC1C,OAAOC,qBAAAA,CAAQC,SAAKF,CAAAA,CAAM,CAAC,CAC7B,CCkHA,IAAMG,CAAc,CAAAC,YAAA,CAAA,UAAA,CAClB,CACE,CACE,SAAA,CAAAC,CACA,CAAA,SAAA,CAAAC,EAAY,UACZ,CAAA,OAAA,CAAAC,CAAU,CAAA,IAAA,CACV,IAAAC,CAAAA,CAAAA,CAAO,KACP,CAAA,MAAA,CAAAC,EAAS,KACT,CAAA,OAAA,CAAAC,CACA,CAAA,KAAA,CAAAC,EACA,KAAAC,CAAAA,CAAAA,CACA,MAAAC,CAAAA,CAAAA,CACA,MAAAC,CACA,CAAA,GAAGC,CACL,CAAA,CACAC,CAGEC,GAAAA,cAAAA,CAAC,KACC,CAAA,CAAA,GAAA,CAAKD,EACL,SAAWjB,CAAAA,CAAAA,CAET,MAEAO,CAAAA,CAAAA,GAAc,WAAa,UAAa,CAAA,UAAA,CAExC,CACE,OAAA,CAASC,IAAY,MACrB,CAAA,OAAA,CAASA,CAAY,GAAA,IAAA,CACrB,OAASA,CAAAA,CAAAA,GAAY,IACrB,CAAA,OAAA,CAASA,IAAY,IACrB,CAAA,OAAA,CAASA,CAAY,GAAA,IAAA,CACrB,QAASA,CAAY,GAAA,IACvB,CAEAC,CAAAA,CAAAA,EAAQ,YAERC,CAAU,EAAA,6BAAA,CAEVC,CAAW,EAAA,CACT,eAAiBA,CAAAA,CAAAA,GAAY,OAC7B,CAAA,aAAA,CAAeA,IAAY,KAC3B,CAAA,gBAAA,CAAkBA,CAAY,GAAA,QAAA,CAC9B,kBAAmBA,CAAY,GAAA,SAAA,CAC/B,gBAAkBA,CAAAA,CAAAA,GAAY,SAC9B,gBAAkBA,CAAAA,CAAAA,GAAY,QAChC,CAAA,CAEAC,CAAS,EAAA,CACP,aAAeA,CAAAA,CAAAA,GAAU,QACzB,WAAaA,CAAAA,CAAAA,GAAU,KACvB,CAAA,cAAA,CAAgBA,IAAU,QAC1B,CAAA,eAAA,CAAiBA,CAAU,GAAA,SAAA,CAC3B,iBAAkBA,CAAU,GAAA,UAC9B,CACAN,CAAAA,CACF,CACA,CAAA,KAAA,CAAO,CACL,KAAA,CAAAO,EACA,MAAAC,CAAAA,CAAAA,CACA,GAAGC,CACL,EACC,GAAGC,CAAAA,CACN,CAGN,EAEAZ,EAAM,WAAc,CAAA,OAAA","file":"stack.js","sourcesContent":["import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","/**\n * Stack is a layout component that arranges its children in a vertical or horizontal stack\n * with consistent spacing between items. It's built on top of Flexbox and provides\n * a simple way to create consistent layouts.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-stack--docs\n *\n * @example\n * ```tsx\n * // Basic vertical stack\n * <Stack>\n * <div>Item 1</div>\n * <div>Item 2</div>\n * <div>Item 3</div>\n * </Stack>\n *\n * // Horizontal stack with custom spacing\n * <Stack direction=\"horizontal\" spacing=\"lg\">\n * <div>Item 1</div>\n * <div>Item 2</div>\n * </Stack>\n *\n * // Centered stack with wrapping\n * <Stack direction=\"horizontal\" center wrap>\n * <div>Item 1</div>\n * <div>Item 2</div>\n * <div>Item 3</div>\n * </Stack>\n *\n * // Stack with custom alignment\n * <Stack align=\"center\" justify=\"between\">\n * <div>Left</div>\n * <div>Center</div>\n * <div>Right</div>\n * </Stack>\n *\n * // Stack with custom dimensions\n * <Stack width=\"100%\" height=\"200px\">\n * <div>Full width, fixed height stack</div>\n * </Stack>\n * ```\n */\nimport * as React from \"react\"\nimport { cn } from \"@/utils\"\n\nexport interface StackProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * The direction in which to stack the items.\n * - \"vertical\": Items are stacked top to bottom\n * - \"horizontal\": Items are stacked left to right\n *\n * @default \"vertical\"\n */\n direction?: \"vertical\" | \"horizontal\"\n /**\n * The spacing between items in the stack.\n * - \"none\": 0px\n * - \"xs\": 0.25rem (4px)\n * - \"sm\": 0.5rem (8px)\n * - \"md\": 1rem (16px)\n * - \"lg\": 1.5rem (24px)\n * - \"xl\": 2rem (32px)\n *\n * @default \"md\"\n */\n spacing?: \"none\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\"\n /**\n * Whether to allow items to wrap to the next line when they don't fit.\n * Only applies to horizontal stacks.\n *\n * @default false\n */\n wrap?: boolean\n /**\n * Whether to center items both horizontally and vertically.\n * This is a shorthand for setting both align and justify to \"center\".\n *\n * @default false\n */\n center?: boolean\n /**\n * How to justify items along the main axis.\n * - \"start\": Items are packed toward the start\n * - \"end\": Items are packed toward the end\n * - \"center\": Items are centered\n * - \"between\": Items are evenly distributed with first item at start and last at end\n * - \"around\": Items are evenly distributed with equal space around them\n * - \"evenly\": Items are distributed so that the spacing between any two items is equal\n *\n * @default undefined\n */\n justify?: \"start\" | \"end\" | \"center\" | \"between\" | \"around\" | \"evenly\"\n /**\n * How to align items along the cross axis.\n * - \"start\": Items are aligned at the start\n * - \"end\": Items are aligned at the end\n * - \"center\": Items are centered\n * - \"stretch\": Items are stretched to fill the container\n * - \"baseline\": Items are aligned at their baselines\n *\n * @default undefined\n */\n align?: \"start\" | \"end\" | \"center\" | \"stretch\" | \"baseline\"\n /**\n * The width of the stack container.\n * Can be any valid CSS width value (e.g., \"100%\", \"200px\", \"50vw\").\n *\n * @default undefined\n */\n width?: string\n /**\n * The height of the stack container.\n * Can be any valid CSS height value (e.g., \"100%\", \"200px\", \"50vh\").\n *\n * @default undefined\n */\n height?: string\n}\n\nconst Stack = React.forwardRef<HTMLDivElement, StackProps>(\n (\n {\n className,\n direction = \"vertical\",\n spacing = \"md\",\n wrap = false,\n center = false,\n justify,\n align,\n width,\n height,\n style,\n ...props\n },\n ref\n ) => {\n return (\n <div\n ref={ref}\n className={cn(\n // Base styles\n \"flex\",\n // Direction\n direction === \"vertical\" ? \"flex-col\" : \"flex-row\",\n // Spacing\n {\n \"gap-0\": spacing === \"none\",\n \"gap-1\": spacing === \"xs\",\n \"gap-2\": spacing === \"sm\",\n \"gap-4\": spacing === \"md\",\n \"gap-6\": spacing === \"lg\",\n \"gap-8\": spacing === \"xl\"\n },\n // Wrap\n wrap && \"flex-wrap\",\n // Center\n center && \"items-center justify-center\",\n // Justify\n justify && {\n \"justify-start\": justify === \"start\",\n \"justify-end\": justify === \"end\",\n \"justify-center\": justify === \"center\",\n \"justify-between\": justify === \"between\",\n \"justify-around\": justify === \"around\",\n \"justify-evenly\": justify === \"evenly\"\n },\n // Align\n align && {\n \"items-start\": align === \"start\",\n \"items-end\": align === \"end\",\n \"items-center\": align === \"center\",\n \"items-stretch\": align === \"stretch\",\n \"items-baseline\": align === \"baseline\"\n },\n className\n )}\n style={{\n width,\n height,\n ...style\n }}\n {...props}\n />\n )\n }\n)\n\nStack.displayName = \"Stack\"\n\nexport { Stack }\n"]}
@@ -1,21 +0,0 @@
1
- import * as React from 'react';
2
- import * as SwitchPrimitives from '@radix-ui/react-switch';
3
-
4
- /**
5
- * Switch component that provides a toggle input control.
6
- * Built on top of Radix UI's Switch primitive.
7
- *
8
- * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-switch--docs
9
- *
10
- * @example
11
- * ```tsx
12
- * <Switch />
13
- * <Switch defaultChecked />
14
- * <Switch disabled />
15
- * ```
16
- */
17
- declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
18
-
19
- type SwitchProps = React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>;
20
-
21
- export { Switch, type SwitchProps };
@@ -1,2 +0,0 @@
1
- 'use strict';var o=require('react'),t=require('@radix-ui/react-switch'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),jsxRuntime=require('react/jsx-runtime');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var o__namespace=/*#__PURE__*/_interopNamespace(o);var t__namespace=/*#__PURE__*/_interopNamespace(t);function e(...i){return tailwindMerge.twMerge(clsx.clsx(i))}var s=o__namespace.forwardRef(({className:i,...a},c)=>jsxRuntime.jsx(t__namespace.Root,{className:e("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",i),...a,ref:c,children:jsxRuntime.jsx(t__namespace.Thumb,{className:e("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));s.displayName=t__namespace.Root.displayName;exports.Switch=s;//# sourceMappingURL=switch.js.map
2
- //# sourceMappingURL=switch.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/utils/cn.ts","../../src/components/atoms/switch/switch.tsx"],"names":["cn","inputs","twMerge","clsx","Switch","o","className","props","ref","jsx","t"],"mappings":"skBAGO,SAASA,CAAMC,CAAAA,GAAAA,CAAAA,CAAsB,CAC1C,OAAOC,qBAAQC,CAAAA,SAAAA,CAAKF,CAAM,CAAC,CAC7B,CCcA,IAAMG,EAAeC,YACnB,CAAA,UAAA,CAAA,CAAC,CAAE,SAAA,CAAAC,CAAW,CAAA,GAAGC,CAAM,CAAA,CAAGC,CACxBC,GAAAA,cAAAA,CAAkBC,YAAjB,CAAA,IAAA,CAAA,CACC,SAAWV,CAAAA,CAAAA,CACT,6XACAM,CAAAA,CACF,EACC,GAAGC,CAAAA,CACJ,GAAKC,CAAAA,CAAAA,CAEL,QAAAC,CAAAA,cAAAA,CAAkBC,YAAjB,CAAA,KAAA,CAAA,CACC,SAAWV,CAAAA,CAAAA,CACT,4KACF,CAAA,CACF,CACF,CAAA,CAEJ,EACAI,CAAAA,CAAO,YAA+BM,YAAK,CAAA,IAAA,CAAA,WAAA","file":"switch.js","sourcesContent":["import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","import * as React from \"react\"\nimport * as SwitchPrimitives from \"@radix-ui/react-switch\"\n\nimport { cn } from \"@/utils/index\"\nimport { SwitchProps } from \"./switch.types\"\n\n/**\n * Switch component that provides a toggle input control.\n * Built on top of Radix UI's Switch primitive.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-switch--docs\n *\n * @example\n * ```tsx\n * <Switch />\n * <Switch defaultChecked />\n * <Switch disabled />\n * ```\n */\nconst Switch = React.forwardRef<React.ElementRef<typeof SwitchPrimitives.Root>, SwitchProps>(\n ({ className, ...props }, ref) => (\n <SwitchPrimitives.Root\n className={cn(\n \"peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input\",\n className\n )}\n {...props}\n ref={ref}\n >\n <SwitchPrimitives.Thumb\n className={cn(\n \"pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0\"\n )}\n />\n </SwitchPrimitives.Root>\n )\n)\nSwitch.displayName = SwitchPrimitives.Root.displayName\n\nexport { Switch }\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/utils/cn.ts","../../src/components/atoms/switch/switch.tsx"],"names":["cn","inputs","twMerge","clsx","Switch","className","props","ref","jsx"],"mappings":"kKAGO,SAASA,CAAMC,CAAAA,GAAAA,CAAAA,CAAsB,CAC1C,OAAOC,OAAQC,CAAAA,IAAAA,CAAKF,CAAM,CAAC,CAC7B,CCcA,IAAMG,EAAe,CACnB,CAAA,UAAA,CAAA,CAAC,CAAE,SAAA,CAAAC,CAAW,CAAA,GAAGC,CAAM,CAAA,CAAGC,CACxBC,GAAAA,GAAAA,CAAkB,CAAjB,CAAA,IAAA,CAAA,CACC,SAAWR,CAAAA,CAAAA,CACT,6XACAK,CAAAA,CACF,EACC,GAAGC,CAAAA,CACJ,GAAKC,CAAAA,CAAAA,CAEL,QAAAC,CAAAA,GAAAA,CAAkB,CAAjB,CAAA,KAAA,CAAA,CACC,SAAWR,CAAAA,CAAAA,CACT,4KACF,CAAA,CACF,CACF,CAAA,CAEJ,EACAI,CAAAA,CAAO,YAA+B,CAAK,CAAA,IAAA,CAAA,WAAA","file":"switch.mjs","sourcesContent":["import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","import * as React from \"react\"\nimport * as SwitchPrimitives from \"@radix-ui/react-switch\"\n\nimport { cn } from \"@/utils/index\"\nimport { SwitchProps } from \"./switch.types\"\n\n/**\n * Switch component that provides a toggle input control.\n * Built on top of Radix UI's Switch primitive.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-switch--docs\n *\n * @example\n * ```tsx\n * <Switch />\n * <Switch defaultChecked />\n * <Switch disabled />\n * ```\n */\nconst Switch = React.forwardRef<React.ElementRef<typeof SwitchPrimitives.Root>, SwitchProps>(\n ({ className, ...props }, ref) => (\n <SwitchPrimitives.Root\n className={cn(\n \"peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input\",\n className\n )}\n {...props}\n ref={ref}\n >\n <SwitchPrimitives.Thumb\n className={cn(\n \"pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0\"\n )}\n />\n </SwitchPrimitives.Root>\n )\n)\nSwitch.displayName = SwitchPrimitives.Root.displayName\n\nexport { Switch }\n"]}
@@ -1,53 +0,0 @@
1
- import * as React from 'react';
2
-
3
- interface TableProps extends React.HTMLAttributes<HTMLTableElement> {
4
- }
5
- interface TableHeaderProps extends React.HTMLAttributes<HTMLTableSectionElement> {
6
- }
7
- interface TableBodyProps extends React.HTMLAttributes<HTMLTableSectionElement> {
8
- }
9
- interface TableFooterProps extends React.HTMLAttributes<HTMLTableSectionElement> {
10
- }
11
- interface TableRowProps extends React.HTMLAttributes<HTMLTableRowElement> {
12
- }
13
- interface TableHeadProps extends React.ThHTMLAttributes<HTMLTableCellElement> {
14
- }
15
- interface TableCellProps extends React.TdHTMLAttributes<HTMLTableCellElement> {
16
- }
17
- interface TableCaptionProps extends React.HTMLAttributes<HTMLTableCaptionElement> {
18
- }
19
-
20
- /**
21
- * Table component that provides a structured way to display data in rows and columns.
22
- * Built on top of native HTML table elements with enhanced styling and accessibility.
23
- *
24
- * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-table--docs
25
- *
26
- * @example
27
- * ```tsx
28
- * <Table>
29
- * <TableHeader>
30
- * <TableRow>
31
- * <TableHead>Name</TableHead>
32
- * <TableHead>Email</TableHead>
33
- * </TableRow>
34
- * </TableHeader>
35
- * <TableBody>
36
- * <TableRow>
37
- * <TableCell>John Doe</TableCell>
38
- * <TableCell>john@example.com</TableCell>
39
- * </TableRow>
40
- * </TableBody>
41
- * </Table>
42
- * ```
43
- */
44
- declare const Table: React.ForwardRefExoticComponent<TableProps & React.RefAttributes<HTMLTableElement>>;
45
- declare const TableHeader: React.ForwardRefExoticComponent<TableHeaderProps & React.RefAttributes<HTMLTableSectionElement>>;
46
- declare const TableBody: React.ForwardRefExoticComponent<TableBodyProps & React.RefAttributes<HTMLTableSectionElement>>;
47
- declare const TableFooter: React.ForwardRefExoticComponent<TableFooterProps & React.RefAttributes<HTMLTableSectionElement>>;
48
- declare const TableRow: React.ForwardRefExoticComponent<TableRowProps & React.RefAttributes<HTMLTableRowElement>>;
49
- declare const TableHead: React.ForwardRefExoticComponent<TableHeadProps & React.RefAttributes<HTMLTableCellElement>>;
50
- declare const TableCell: React.ForwardRefExoticComponent<TableCellProps & React.RefAttributes<HTMLTableCellElement>>;
51
- declare const TableCaption: React.ForwardRefExoticComponent<TableCaptionProps & React.RefAttributes<HTMLTableCaptionElement>>;
52
-
53
- export { Table, TableBody, type TableBodyProps, TableCaption, type TableCaptionProps, TableCell, type TableCellProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TableHeader, type TableHeaderProps, type TableProps, TableRow, type TableRowProps };
@@ -1,2 +0,0 @@
1
- 'use strict';var t=require('react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),jsxRuntime=require('react/jsx-runtime');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var t__namespace=/*#__PURE__*/_interopNamespace(t);function l(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var s=t__namespace.forwardRef(({className:e,...a},o)=>jsxRuntime.jsx("div",{className:"relative w-full overflow-auto",children:jsxRuntime.jsx("table",{ref:o,className:l("w-full caption-bottom text-sm",e),...a})}));s.displayName="Table";var b=t__namespace.forwardRef(({className:e,...a},o)=>jsxRuntime.jsx("thead",{ref:o,className:l("[&_tr]:border-b",e),...a}));b.displayName="TableHeader";var T=t__namespace.forwardRef(({className:e,...a},o)=>jsxRuntime.jsx("tbody",{ref:o,className:l("[&_tr:last-child]:border-0",e),...a}));T.displayName="TableBody";var d=t__namespace.forwardRef(({className:e,...a},o)=>jsxRuntime.jsx("tfoot",{ref:o,className:l("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...a}));d.displayName="TableFooter";var p=t__namespace.forwardRef(({className:e,...a},o)=>jsxRuntime.jsx("tr",{ref:o,className:l("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",e),...a}));p.displayName="TableRow";var m=t__namespace.forwardRef(({className:e,...a},o)=>jsxRuntime.jsx("th",{ref:o,className:l("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...a}));m.displayName="TableHead";var c=t__namespace.forwardRef(({className:e,...a},o)=>jsxRuntime.jsx("td",{ref:o,className:l("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...a}));c.displayName="TableCell";var n=t__namespace.forwardRef(({className:e,...a},o)=>jsxRuntime.jsx("caption",{ref:o,className:l("mt-4 text-sm text-muted-foreground",e),...a}));n.displayName="TableCaption";exports.Table=s;exports.TableBody=T;exports.TableCaption=n;exports.TableCell=c;exports.TableFooter=d;exports.TableHead=m;exports.TableHeader=b;exports.TableRow=p;//# sourceMappingURL=table.js.map
2
- //# sourceMappingURL=table.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/utils/cn.ts","../../src/components/atoms/table/table.tsx"],"names":["cn","inputs","twMerge","clsx","Table","t","className","props","ref","jsx","TableHeader","TableBody","TableFooter","TableRow","TableHead","TableCell","TableCaption"],"mappings":"+eAGO,SAASA,CAAMC,CAAAA,GAAAA,CAAAA,CAAsB,CAC1C,OAAOC,qBAAQC,CAAAA,SAAAA,CAAKF,CAAM,CAAC,CAC7B,CCgCA,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AAA,GAAGC,CAAO,CAAA,CAElG,EACAS,CAAAA,CAAa,WAAc,CAAA,cAAA","file":"table.js","sourcesContent":["import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","import * as React from \"react\"\nimport { cn } from \"@/utils/index\"\nimport {\n TableProps,\n TableHeaderProps,\n TableBodyProps,\n TableFooterProps,\n TableRowProps,\n TableHeadProps,\n TableCellProps,\n TableCaptionProps\n} from \"./table.types\"\n\n/**\n * Table component that provides a structured way to display data in rows and columns.\n * Built on top of native HTML table elements with enhanced styling and accessibility.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-table--docs\n *\n * @example\n * ```tsx\n * <Table>\n * <TableHeader>\n * <TableRow>\n * <TableHead>Name</TableHead>\n * <TableHead>Email</TableHead>\n * </TableRow>\n * </TableHeader>\n * <TableBody>\n * <TableRow>\n * <TableCell>John Doe</TableCell>\n * <TableCell>john@example.com</TableCell>\n * </TableRow>\n * </TableBody>\n * </Table>\n * ```\n */\nconst Table = React.forwardRef<HTMLTableElement, TableProps>(({ className, ...props }, ref) => (\n <div className=\"relative w-full overflow-auto\">\n <table ref={ref} className={cn(\"w-full caption-bottom text-sm\", className)} {...props} />\n </div>\n))\nTable.displayName = \"Table\"\n\nconst TableHeader = React.forwardRef<HTMLTableSectionElement, TableHeaderProps>(\n ({ className, ...props }, ref) => (\n <thead ref={ref} className={cn(\"[&_tr]:border-b\", className)} {...props} />\n )\n)\nTableHeader.displayName = \"TableHeader\"\n\nconst TableBody = React.forwardRef<HTMLTableSectionElement, TableBodyProps>(\n ({ className, ...props }, ref) => (\n <tbody ref={ref} className={cn(\"[&_tr:last-child]:border-0\", className)} {...props} />\n )\n)\nTableBody.displayName = \"TableBody\"\n\nconst TableFooter = React.forwardRef<HTMLTableSectionElement, TableFooterProps>(\n ({ className, ...props }, ref) => (\n <tfoot\n ref={ref}\n className={cn(\"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0\", className)}\n {...props}\n />\n )\n)\nTableFooter.displayName = \"TableFooter\"\n\nconst TableRow = React.forwardRef<HTMLTableRowElement, TableRowProps>(\n ({ className, ...props }, ref) => (\n <tr\n ref={ref}\n className={cn(\n \"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted\",\n className\n )}\n {...props}\n />\n )\n)\nTableRow.displayName = \"TableRow\"\n\nconst TableHead = React.forwardRef<HTMLTableCellElement, TableHeadProps>(\n ({ className, ...props }, ref) => (\n <th\n ref={ref}\n className={cn(\n \"h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]\",\n className\n )}\n {...props}\n />\n )\n)\nTableHead.displayName = \"TableHead\"\n\nconst TableCell = React.forwardRef<HTMLTableCellElement, TableCellProps>(\n ({ className, ...props }, ref) => (\n <td\n ref={ref}\n className={cn(\n \"p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]\",\n className\n )}\n {...props}\n />\n )\n)\nTableCell.displayName = \"TableCell\"\n\nconst TableCaption = React.forwardRef<HTMLTableCaptionElement, TableCaptionProps>(\n ({ className, ...props }, ref) => (\n <caption ref={ref} className={cn(\"mt-4 text-sm text-muted-foreground\", className)} {...props} />\n )\n)\nTableCaption.displayName = \"TableCaption\"\n\nexport { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption }\n"]}
@@ -1,65 +0,0 @@
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
-
5
- /**
6
- * Props interface for the TextField component.
7
- * Extends the native input HTML attributes and adds support for variants and icons.
8
- *
9
- * @interface TextFieldProps
10
- * @extends {React.InputHTMLAttributes<HTMLInputElement>}
11
- * @extends {VariantProps<typeof textFieldVariants>}
12
- *
13
- * @property {string} [variant] - The visual style variant of the text field.
14
- * @property {string} [size] - The size variant of the text field.
15
- * @property {string} [className] - Additional CSS classes to apply to the text field.
16
- * @property {React.ReactNode} [startIcon] - Icon to display before the input.
17
- * @property {React.ReactNode} [endIcon] - Icon to display after the input.
18
- * @property {boolean} [loading] - Whether the text field is in a loading state.
19
- * @property {string} [error] - Error message to display below the text field.
20
- * @property {string} [label] - Label text for the text field.
21
- * @property {string} [helperText] - Helper text to display below the text field.
22
- */
23
- interface TextFieldProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size">, VariantProps<typeof textFieldVariants> {
24
- startIcon?: React.ReactNode;
25
- endIcon?: React.ReactNode;
26
- loading?: boolean;
27
- error?: string;
28
- label?: string;
29
- helperText?: string;
30
- }
31
-
32
- /**
33
- * Text field variant styles using class-variance-authority.
34
- * Defines the visual styles for different text field variants and sizes.
35
- */
36
- declare const textFieldVariants: (props?: ({
37
- variant?: "default" | "error" | null | undefined;
38
- size?: "default" | "sm" | "lg" | null | undefined;
39
- } & class_variance_authority_types.ClassProp) | undefined) => string;
40
- /**
41
- * A versatile text field component that supports multiple variants, sizes, and icons.
42
- * Built on top of shadcn/ui's Input component.
43
- *
44
- * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-text-field--docs
45
- *
46
- * @component
47
- * @example
48
- * ```tsx
49
- * // Default text field
50
- * <TextField placeholder="Enter text" />
51
- *
52
- * // With icons
53
- * <TextField startIcon={<SearchIcon />} placeholder="Search..." />
54
- * <TextField endIcon={<CalendarIcon />} placeholder="Select date" />
55
- *
56
- * // With loading state
57
- * <TextField loading placeholder="Loading..." />
58
- *
59
- * // With error
60
- * <TextField error="Invalid input" placeholder="Enter text" />
61
- * ```
62
- */
63
- declare const TextField: React.ForwardRefExoticComponent<TextFieldProps & React.RefAttributes<HTMLInputElement>>;
64
-
65
- export { TextField, type TextFieldProps };
@@ -1,2 +0,0 @@
1
- 'use strict';var m=require('react'),classVarianceAuthority=require('class-variance-authority'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),lucideReact=require('lucide-react'),jsxRuntime=require('react/jsx-runtime'),n=require('@radix-ui/react-label');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var m__namespace=/*#__PURE__*/_interopNamespace(m);var n__namespace=/*#__PURE__*/_interopNamespace(n);function e(...t){return tailwindMerge.twMerge(clsx.clsx(t))}var f=m__namespace.forwardRef(({className:t,type:o,...a},i)=>jsxRuntime.jsx("input",{type:o,className:e("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:i,...a}));f.displayName="Input";var V=classVarianceAuthority.cva("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),p=m__namespace.forwardRef(({className:t,...o},a)=>jsxRuntime.jsx(n__namespace.Root,{ref:a,className:e(V(),t),...o}));p.displayName=n__namespace.Root.displayName;var M=classVarianceAuthority.cva("w-full",{variants:{variant:{default:"",error:"border-destructive focus-visible:ring-destructive"},size:{default:"h-10",sm:"h-8 text-xs",lg:"h-12 text-base"}},defaultVariants:{variant:"default",size:"default"}}),R=m__namespace.forwardRef(({className:t,variant:o,size:a,startIcon:i,endIcon:d,loading:s=false,error:l,label:u,helperText:c,disabled:L,...P},N)=>{let b=m__namespace.useId();return jsxRuntime.jsxs("div",{className:"w-full space-y-2",children:[u&&jsxRuntime.jsx(p,{htmlFor:b,children:u}),jsxRuntime.jsxs("div",{className:"relative",children:[i&&jsxRuntime.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:i}),jsxRuntime.jsx(f,{id:b,className:e(M({variant:l?"error":o,size:a,className:t}),i&&"pl-9",(d||s)&&"pr-9"),ref:N,disabled:L||s,...P}),(d||s)&&jsxRuntime.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:s?jsxRuntime.jsx(lucideReact.Loader2,{className:"h-4 w-4 animate-spin"}):d})]}),(l||c)&&jsxRuntime.jsx("p",{className:e("text-sm",l?"text-destructive":"text-muted-foreground"),children:l||c})]})});R.displayName="TextField";exports.TextField=R;//# sourceMappingURL=text-field.js.map
2
- //# sourceMappingURL=text-field.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/utils/cn.ts","../../src/components/atoms/input/input.tsx","../../src/components/atoms/label/label.tsx","../../src/components/atoms/text-field/text-field.tsx"],"names":["cn","inputs","twMerge","clsx","Input","x","className","type","props","ref","jsx","labelVariants","cva","Label","v","n","textFieldVariants","TextField","m","variant","size","startIcon","endIcon","loading","error","label","helperText","disabled","id","jsxs","Loader2"],"mappings":"oqBAGO,SAASA,CAAMC,CAAAA,GAAAA,CAAAA,CAAsB,CAC1C,OAAOC,qBAAQC,CAAAA,SAAAA,CAAKF,CAAM,CAAC,CAC7B,CCMA,IAAMG,CAAAA,CAAcC,YAClB,CAAA,UAAA,CAAA,CAAC,CAAE,SAAAC,CAAAA,CAAAA,CAAW,IAAAC,CAAAA,CAAAA,CAAM,GAAGC,CAAM,CAAGC,CAAAA,CAAAA,GAE5BC,eAAC,OACC,CAAA,CAAA,IAAA,CAAMH,CACN,CAAA,SAAA,CAAWP,CACT,CAAA,yWAAA,CACAM,CACF,CAAA,CACA,IAAKG,CACJ,CAAA,GAAGD,CACN,CAAA,CAGN,CACAJ,CAAAA,CAAAA,CAAM,WAAc,CAAA,OAAA,CCpBpB,IAAMO,CAAgBC,CAAAA,0BAAAA,CACpB,4FACF,CAAA,CAaMC,EAAcC,YAClB,CAAA,UAAA,CAAA,CAAC,CAAE,SAAA,CAAAR,CAAW,CAAA,GAAGE,CAAM,CAAA,CAAGC,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AAW,CAAAA,CAAAA,CACH,CAEFX,CAAAA,cAAAA,CAACN,CAAA,CAAA,CACC,EAAIwB,CAAAA,CAAAA,CACJ,UAAW5B,CACTgB,CAAAA,CAAAA,CAAkB,CAAE,OAAA,CAASQ,CAAQ,CAAA,OAAA,CAAUL,CAAS,CAAA,IAAA,CAAAC,EAAM,SAAAd,CAAAA,CAAU,CAAC,CAAA,CACzEe,CAAa,EAAA,MAAA,CAAA,CACZC,CAAWC,EAAAA,CAAAA,GAAY,MAC1B,CACA,CAAA,GAAA,CAAKd,CACL,CAAA,QAAA,CAAUkB,CAAYJ,EAAAA,CAAAA,CACrB,GAAGf,CAAAA,CACN,GACEc,CAAWC,EAAAA,CAAAA,GACXb,cAAC,CAAA,KAAA,CAAA,CAAI,SAAU,CAAA,iEAAA,CACZ,QAAAa,CAAAA,CAAAA,CAAUb,eAACoB,mBAAA,CAAA,CAAQ,SAAU,CAAA,sBAAA,CAAuB,CAAKR,CAAAA,CAAAA,CAC5D,CAEJ,CAAA,CAAA,CAAA,CAAA,CACEE,GAASE,CACThB,GAAAA,cAAAA,CAAC,GAAE,CAAA,CAAA,SAAA,CAAWV,CAAG,CAAA,SAAA,CAAWwB,CAAQ,CAAA,kBAAA,CAAqB,uBAAuB,CAC7E,CAAA,QAAA,CAAAA,CAASE,EAAAA,CAAAA,CACZ,CAEJ,CAAA,CAAA,CAEJ,CACF,EAEAT,EAAU,WAAc,CAAA,WAAA","file":"text-field.js","sourcesContent":["import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","import * as React from \"react\"\n\nimport { cn } from \"@/utils/cn\"\n\n/**\n * Input component for creating accessible input fields.\n * Built on top of shadcn/ui's Input component.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-input--docs\n *\n */\nconst Input = React.forwardRef<HTMLInputElement, React.ComponentProps<\"input\">>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n \"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n className\n )}\n ref={ref}\n {...props}\n />\n )\n }\n)\nInput.displayName = \"Input\"\n\nexport { Input }\n","import * as React from \"react\"\nimport * as LabelPrimitive from \"@radix-ui/react-label\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/utils/index\"\n\nconst labelVariants = cva(\n \"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\"\n)\n\nexport interface LabelProps\n extends React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>,\n VariantProps<typeof labelVariants> {}\n\n/**\n * Label component for creating accessible labels.\n * Built on top of Radix UI's Label primitive.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-label--docs\n *\n */\nconst Label = React.forwardRef<React.ElementRef<typeof LabelPrimitive.Root>, LabelProps>(\n ({ className, ...props }, ref) => (\n <LabelPrimitive.Root ref={ref} className={cn(labelVariants(), className)} {...props} />\n )\n)\nLabel.displayName = LabelPrimitive.Root.displayName\n\nexport { Label }\n","import * as React from \"react\"\nimport { cva } from \"class-variance-authority\"\nimport { cn } from \"@/utils/cn\"\nimport { TextFieldProps } from \"./text-field.types\"\nimport { Loader2 } from \"lucide-react\"\nimport { Input } from \"../input\"\nimport { Label } from \"../label\"\n\n/**\n * Text field variant styles using class-variance-authority.\n * Defines the visual styles for different text field variants and sizes.\n */\nconst textFieldVariants = cva(\"w-full\", {\n variants: {\n variant: {\n default: \"\",\n error: \"border-destructive focus-visible:ring-destructive\"\n },\n size: {\n default: \"h-10\",\n sm: \"h-8 text-xs\",\n lg: \"h-12 text-base\"\n }\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\"\n }\n})\n\n/**\n * A versatile text field component that supports multiple variants, sizes, and icons.\n * Built on top of shadcn/ui's Input component.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-text-field--docs\n *\n * @component\n * @example\n * ```tsx\n * // Default text field\n * <TextField placeholder=\"Enter text\" />\n *\n * // With icons\n * <TextField startIcon={<SearchIcon />} placeholder=\"Search...\" />\n * <TextField endIcon={<CalendarIcon />} placeholder=\"Select date\" />\n *\n * // With loading state\n * <TextField loading placeholder=\"Loading...\" />\n *\n * // With error\n * <TextField error=\"Invalid input\" placeholder=\"Enter text\" />\n * ```\n */\nconst TextField = React.forwardRef<HTMLInputElement, TextFieldProps>(\n (\n {\n className,\n variant,\n size,\n startIcon,\n endIcon,\n loading = false,\n error,\n label,\n helperText,\n disabled,\n ...props\n },\n ref\n ) => {\n const id = React.useId()\n\n return (\n <div className=\"w-full space-y-2\">\n {label && <Label htmlFor={id}>{label}</Label>}\n <div className=\"relative\">\n {startIcon && (\n <div className=\"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground\">\n {startIcon}\n </div>\n )}\n <Input\n id={id}\n className={cn(\n textFieldVariants({ variant: error ? \"error\" : variant, size, className }),\n startIcon && \"pl-9\",\n (endIcon || loading) && \"pr-9\"\n )}\n ref={ref}\n disabled={disabled || loading}\n {...props}\n />\n {(endIcon || loading) && (\n <div className=\"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground\">\n {loading ? <Loader2 className=\"h-4 w-4 animate-spin\" /> : endIcon}\n </div>\n )}\n </div>\n {(error || helperText) && (\n <p className={cn(\"text-sm\", error ? \"text-destructive\" : \"text-muted-foreground\")}>\n {error || helperText}\n </p>\n )}\n </div>\n )\n }\n)\n\nTextField.displayName = \"TextField\"\n\nexport { TextField, textFieldVariants }\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/utils/cn.ts","../../src/components/atoms/input/input.tsx","../../src/components/atoms/label/label.tsx","../../src/components/atoms/text-field/text-field.tsx"],"names":["cn","inputs","twMerge","clsx","Input","x","className","type","props","ref","jsx","labelVariants","cva","Label","v","textFieldVariants","TextField","variant","size","startIcon","endIcon","loading","error","label","helperText","disabled","id","jsxs","Loader2"],"mappings":"oPAGO,SAASA,CAAMC,CAAAA,GAAAA,CAAAA,CAAsB,CAC1C,OAAOC,OAAQC,CAAAA,IAAAA,CAAKF,CAAM,CAAC,CAC7B,CCMA,IAAMG,CAAAA,CAAcC,CAClB,CAAA,UAAA,CAAA,CAAC,CAAE,SAAAC,CAAAA,CAAAA,CAAW,IAAAC,CAAAA,CAAAA,CAAM,GAAGC,CAAM,CAAGC,CAAAA,CAAAA,GAE5BC,IAAC,OACC,CAAA,CAAA,IAAA,CAAMH,CACN,CAAA,SAAA,CAAWP,CACT,CAAA,yWAAA,CACAM,CACF,CAAA,CACA,IAAKG,CACJ,CAAA,GAAGD,CACN,CAAA,CAGN,CACAJ,CAAAA,CAAAA,CAAM,WAAc,CAAA,OAAA,CCpBpB,IAAMO,CAAgBC,CAAAA,GAAAA,CACpB,4FACF,CAAA,CAaMC,EAAcC,CAClB,CAAA,UAAA,CAAA,CAAC,CAAE,SAAA,CAAAR,CAAW,CAAA,GAAGE,CAAM,CAAA,CAAGC,IACxBC,GAAgB,CAAA,CAAA,CAAA,IAAA,CAAf,CAAoB,GAAA,CAAKD,CAAK,CAAA,SAAA,CAAWT,CAAGW,CAAAA,CAAAA,GAAiBL,CAAS,CAAA,CAAI,GAAGE,CAAAA,CAAO,CAEzF,CAAA,CACAK,CAAM,CAAA,WAAA,CAA6B,OAAK,WCgDtB,CA9DZE,IAAAA,CAAAA,CAAoBH,IAAI,QAAU,CAAA,CACtC,QAAU,CAAA,CACR,OAAS,CAAA,CACP,OAAS,CAAA,EAAA,CACT,MAAO,mDACT,CAAA,CACA,IAAM,CAAA,CACJ,OAAS,CAAA,MAAA,CACT,EAAI,CAAA,aAAA,CACJ,GAAI,gBACN,CACF,CACA,CAAA,eAAA,CAAiB,CACf,OAAA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AAU,CAAA,iEAAA,CACZ,QAAAW,CAAAA,CAAAA,CAAUX,IAACkB,OAAA,CAAA,CAAQ,SAAU,CAAA,sBAAA,CAAuB,CAAKR,CAAAA,CAAAA,CAC5D,CAEJ,CAAA,CAAA,CAAA,CAAA,CACEE,GAASE,CACTd,GAAAA,GAAAA,CAAC,GAAE,CAAA,CAAA,SAAA,CAAWV,CAAG,CAAA,SAAA,CAAWsB,CAAQ,CAAA,kBAAA,CAAqB,uBAAuB,CAC7E,CAAA,QAAA,CAAAA,CAASE,EAAAA,CAAAA,CACZ,CAEJ,CAAA,CAAA,CAEJ,CACF,EAEAR,EAAU,WAAc,CAAA,WAAA","file":"text-field.mjs","sourcesContent":["import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","import * as React from \"react\"\n\nimport { cn } from \"@/utils/cn\"\n\n/**\n * Input component for creating accessible input fields.\n * Built on top of shadcn/ui's Input component.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-input--docs\n *\n */\nconst Input = React.forwardRef<HTMLInputElement, React.ComponentProps<\"input\">>(\n ({ className, type, ...props }, ref) => {\n return (\n <input\n type={type}\n className={cn(\n \"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n className\n )}\n ref={ref}\n {...props}\n />\n )\n }\n)\nInput.displayName = \"Input\"\n\nexport { Input }\n","import * as React from \"react\"\nimport * as LabelPrimitive from \"@radix-ui/react-label\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/utils/index\"\n\nconst labelVariants = cva(\n \"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70\"\n)\n\nexport interface LabelProps\n extends React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root>,\n VariantProps<typeof labelVariants> {}\n\n/**\n * Label component for creating accessible labels.\n * Built on top of Radix UI's Label primitive.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-label--docs\n *\n */\nconst Label = React.forwardRef<React.ElementRef<typeof LabelPrimitive.Root>, LabelProps>(\n ({ className, ...props }, ref) => (\n <LabelPrimitive.Root ref={ref} className={cn(labelVariants(), className)} {...props} />\n )\n)\nLabel.displayName = LabelPrimitive.Root.displayName\n\nexport { Label }\n","import * as React from \"react\"\nimport { cva } from \"class-variance-authority\"\nimport { cn } from \"@/utils/cn\"\nimport { TextFieldProps } from \"./text-field.types\"\nimport { Loader2 } from \"lucide-react\"\nimport { Input } from \"../input\"\nimport { Label } from \"../label\"\n\n/**\n * Text field variant styles using class-variance-authority.\n * Defines the visual styles for different text field variants and sizes.\n */\nconst textFieldVariants = cva(\"w-full\", {\n variants: {\n variant: {\n default: \"\",\n error: \"border-destructive focus-visible:ring-destructive\"\n },\n size: {\n default: \"h-10\",\n sm: \"h-8 text-xs\",\n lg: \"h-12 text-base\"\n }\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\"\n }\n})\n\n/**\n * A versatile text field component that supports multiple variants, sizes, and icons.\n * Built on top of shadcn/ui's Input component.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-text-field--docs\n *\n * @component\n * @example\n * ```tsx\n * // Default text field\n * <TextField placeholder=\"Enter text\" />\n *\n * // With icons\n * <TextField startIcon={<SearchIcon />} placeholder=\"Search...\" />\n * <TextField endIcon={<CalendarIcon />} placeholder=\"Select date\" />\n *\n * // With loading state\n * <TextField loading placeholder=\"Loading...\" />\n *\n * // With error\n * <TextField error=\"Invalid input\" placeholder=\"Enter text\" />\n * ```\n */\nconst TextField = React.forwardRef<HTMLInputElement, TextFieldProps>(\n (\n {\n className,\n variant,\n size,\n startIcon,\n endIcon,\n loading = false,\n error,\n label,\n helperText,\n disabled,\n ...props\n },\n ref\n ) => {\n const id = React.useId()\n\n return (\n <div className=\"w-full space-y-2\">\n {label && <Label htmlFor={id}>{label}</Label>}\n <div className=\"relative\">\n {startIcon && (\n <div className=\"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground\">\n {startIcon}\n </div>\n )}\n <Input\n id={id}\n className={cn(\n textFieldVariants({ variant: error ? \"error\" : variant, size, className }),\n startIcon && \"pl-9\",\n (endIcon || loading) && \"pr-9\"\n )}\n ref={ref}\n disabled={disabled || loading}\n {...props}\n />\n {(endIcon || loading) && (\n <div className=\"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground\">\n {loading ? <Loader2 className=\"h-4 w-4 animate-spin\" /> : endIcon}\n </div>\n )}\n </div>\n {(error || helperText) && (\n <p className={cn(\"text-sm\", error ? \"text-destructive\" : \"text-muted-foreground\")}>\n {error || helperText}\n </p>\n )}\n </div>\n )\n }\n)\n\nTextField.displayName = \"TextField\"\n\nexport { TextField, textFieldVariants }\n"]}
@@ -1,2 +0,0 @@
1
- 'use strict';var e=require('react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),jsxRuntime=require('react/jsx-runtime');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var e__namespace=/*#__PURE__*/_interopNamespace(e);function o(...r){return tailwindMerge.twMerge(clsx.clsx(r))}var c=e__namespace.forwardRef(({className:r,autoResize:n=false,...i},l)=>{let s=e__namespace.useRef(null);return e__namespace.useEffect(()=>{if(!n||!s.current)return;let t=s.current,a=()=>{t.style.height="auto",t.style.height=`${t.scrollHeight}px`;};return t.addEventListener("input",a),a(),()=>t.removeEventListener("input",a)},[n]),jsxRuntime.jsx("textarea",{className:o("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",r),ref:l,...i})});c.displayName="Textarea";exports.Textarea=c;//# sourceMappingURL=textarea.js.map
2
- //# sourceMappingURL=textarea.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/utils/cn.ts","../../src/components/atoms/textarea/textarea.tsx"],"names":["cn","inputs","twMerge","clsx","Textarea","e","className","autoResize","props","ref","internalRef","textarea","resizeTextarea","jsx"],"mappings":"+eAGO,SAASA,CAAAA,CAAAA,GAAMC,EAAsB,CAC1C,OAAOC,qBAAQC,CAAAA,SAAAA,CAAKF,CAAM,CAAC,CAC7B,CCUMG,IAAAA,CAAAA,CAAiBC,wBACrB,CAAC,CAAE,SAAAC,CAAAA,CAAAA,CAAW,UAAAC,CAAAA,CAAAA,CAAa,MAAO,GAAGC,CAAM,CAAGC,CAAAA,CAAAA,GAAQ,CACpD,IAAMC,EAAoBL,YAA4B,CAAA,MAAA,CAAA,IAAI,CAE1D,CAAA,OAAMA,YAAU,CAAA,SAAA,CAAA,IAAM,CACpB,GAAI,CAACE,CAAc,EAAA,CAACG,CAAY,CAAA,OAAA,CAAS,OAEzC,IAAMC,CAAAA,CAAWD,CAAY,CAAA,OAAA,CACvBE,CAAiB,CAAA,IAAM,CAC3BD,CAAS,CAAA,KAAA,CAAM,MAAS,CAAA,MAAA,CACxBA,CAAS,CAAA,KAAA,CAAM,OAAS,CAAGA,EAAAA,CAAAA,CAAS,YAAY,CAAA,EAAA,EAClD,CAEA,CAAA,OAAAA,EAAS,gBAAiB,CAAA,OAAA,CAASC,CAAc,CAAA,CACjDA,CAAe,EAAA,CAER,IAAMD,CAAS,CAAA,mBAAA,CAAoB,OAASC,CAAAA,CAAc,CACnE,CAAA,CAAG,CAACL,CAAU,CAAC,CAGbM,CAAAA,cAAAA,CAAC,UACC,CAAA,CAAA,SAAA,CAAWb,EACT,2QACAM,CAAAA,CACF,CACA,CAAA,GAAA,CAAKG,CACJ,CAAA,GAAGD,EACN,CAEJ,CACF,EAEAJ,CAAAA,CAAS,WAAc,CAAA,UAAA","file":"textarea.js","sourcesContent":["import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","import * as React from \"react\"\nimport { cn } from \"@/utils/index\"\nimport { TextareaProps } from \"./textarea.types\"\n\n/**\n * Textarea component for creating accessible text areas.\n * Built on top of shadcn/ui's Textarea component.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-textarea--docs\n *\n * @example\n * ```tsx\n * <Textarea placeholder=\"Enter text\" />\n * ```\n */\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n ({ className, autoResize = false, ...props }, ref) => {\n const internalRef = React.useRef<HTMLTextAreaElement>(null)\n\n React.useEffect(() => {\n if (!autoResize || !internalRef.current) return\n\n const textarea = internalRef.current\n const resizeTextarea = () => {\n textarea.style.height = \"auto\"\n textarea.style.height = `${textarea.scrollHeight}px`\n }\n\n textarea.addEventListener(\"input\", resizeTextarea)\n resizeTextarea() // Initial resize\n\n return () => textarea.removeEventListener(\"input\", resizeTextarea)\n }, [autoResize])\n\n return (\n <textarea\n className={cn(\n \"flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n className\n )}\n ref={ref}\n {...props}\n />\n )\n }\n)\n\nTextarea.displayName = \"Textarea\"\n\nexport { Textarea }\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/utils/cn.ts","../../src/components/atoms/textarea/textarea.tsx"],"names":["cn","inputs","twMerge","clsx","Textarea","className","autoResize","props","ref","internalRef","textarea","resizeTextarea","jsx"],"mappings":"yHAGO,SAASA,CAAAA,CAAAA,GAAMC,EAAsB,CAC1C,OAAOC,OAAQC,CAAAA,IAAAA,CAAKF,CAAM,CAAC,CAC7B,CCUMG,IAAAA,CAAAA,CAAiB,aACrB,CAAC,CAAE,SAAAC,CAAAA,CAAAA,CAAW,UAAAC,CAAAA,CAAAA,CAAa,MAAO,GAAGC,CAAM,CAAGC,CAAAA,CAAAA,GAAQ,CACpD,IAAMC,EAAoB,CAA4B,CAAA,MAAA,CAAA,IAAI,CAE1D,CAAA,OAAM,CAAU,CAAA,SAAA,CAAA,IAAM,CACpB,GAAI,CAACH,CAAc,EAAA,CAACG,CAAY,CAAA,OAAA,CAAS,OAEzC,IAAMC,CAAAA,CAAWD,CAAY,CAAA,OAAA,CACvBE,CAAiB,CAAA,IAAM,CAC3BD,CAAS,CAAA,KAAA,CAAM,MAAS,CAAA,MAAA,CACxBA,CAAS,CAAA,KAAA,CAAM,OAAS,CAAGA,EAAAA,CAAAA,CAAS,YAAY,CAAA,EAAA,EAClD,CAEA,CAAA,OAAAA,EAAS,gBAAiB,CAAA,OAAA,CAASC,CAAc,CAAA,CACjDA,CAAe,EAAA,CAER,IAAMD,CAAS,CAAA,mBAAA,CAAoB,OAASC,CAAAA,CAAc,CACnE,CAAA,CAAG,CAACL,CAAU,CAAC,CAGbM,CAAAA,GAAAA,CAAC,UACC,CAAA,CAAA,SAAA,CAAWZ,EACT,2QACAK,CAAAA,CACF,CACA,CAAA,GAAA,CAAKG,CACJ,CAAA,GAAGD,EACN,CAEJ,CACF,EAEAH,CAAAA,CAAS,WAAc,CAAA,UAAA","file":"textarea.mjs","sourcesContent":["import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","import * as React from \"react\"\nimport { cn } from \"@/utils/index\"\nimport { TextareaProps } from \"./textarea.types\"\n\n/**\n * Textarea component for creating accessible text areas.\n * Built on top of shadcn/ui's Textarea component.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-textarea--docs\n *\n * @example\n * ```tsx\n * <Textarea placeholder=\"Enter text\" />\n * ```\n */\nconst Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(\n ({ className, autoResize = false, ...props }, ref) => {\n const internalRef = React.useRef<HTMLTextAreaElement>(null)\n\n React.useEffect(() => {\n if (!autoResize || !internalRef.current) return\n\n const textarea = internalRef.current\n const resizeTextarea = () => {\n textarea.style.height = \"auto\"\n textarea.style.height = `${textarea.scrollHeight}px`\n }\n\n textarea.addEventListener(\"input\", resizeTextarea)\n resizeTextarea() // Initial resize\n\n return () => textarea.removeEventListener(\"input\", resizeTextarea)\n }, [autoResize])\n\n return (\n <textarea\n className={cn(\n \"flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n className\n )}\n ref={ref}\n {...props}\n />\n )\n }\n)\n\nTextarea.displayName = \"Textarea\"\n\nexport { Textarea }\n"]}
@@ -1,18 +0,0 @@
1
- import * as class_variance_authority_types from 'class-variance-authority/types';
2
- import * as React from 'react';
3
- import * as ToastPrimitives from '@radix-ui/react-toast';
4
- import { VariantProps } from 'class-variance-authority';
5
-
6
- declare const ToastProvider: React.FC<ToastPrimitives.ToastProviderProps>;
7
- declare const ToastViewport: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & React.RefAttributes<HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
8
- declare const Toast: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastProps & React.RefAttributes<HTMLLIElement>, "ref"> & VariantProps<(props?: ({
9
- variant?: "default" | "destructive" | null | undefined;
10
- } & class_variance_authority_types.ClassProp) | undefined) => string> & React.RefAttributes<HTMLLIElement>>;
11
- declare const ToastAction: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
12
- declare const ToastClose: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
13
- declare const ToastTitle: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastTitleProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
14
- declare const ToastDescription: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastDescriptionProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
15
- type ToastProps = React.ComponentPropsWithoutRef<typeof Toast>;
16
- type ToastActionElement = React.ReactElement<typeof ToastAction>;
17
-
18
- export { Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, ToastViewport };
@@ -1,2 +0,0 @@
1
- 'use strict';var r=require('react'),t=require('@radix-ui/react-toast'),classVarianceAuthority=require('class-variance-authority'),lucideReact=require('lucide-react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),jsxRuntime=require('react/jsx-runtime');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var r__namespace=/*#__PURE__*/_interopNamespace(r);var t__namespace=/*#__PURE__*/_interopNamespace(t);function i(...e){return tailwindMerge.twMerge(clsx.clsx(e))}var y=t__namespace.Provider,n=r__namespace.forwardRef(({className:e,...o},s)=>jsxRuntime.jsx(t__namespace.Viewport,{ref:s,className:i("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...o}));n.displayName=t__namespace.Viewport.displayName;var P=classVarianceAuthority.cva("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),p=r__namespace.forwardRef(({className:e,variant:o,...s},l)=>jsxRuntime.jsx(t__namespace.Root,{ref:l,className:i(P({variant:o}),e),...s}));p.displayName=t__namespace.Root.displayName;var m=r__namespace.forwardRef(({className:e,...o},s)=>jsxRuntime.jsx(t__namespace.Action,{ref:s,className:i("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...o}));m.displayName=t__namespace.Action.displayName;var c=r__namespace.forwardRef(({className:e,...o},s)=>jsxRuntime.jsx(t__namespace.Close,{ref:s,className:i("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"","aria-label":"Close toast",...o,children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})}));c.displayName=t__namespace.Close.displayName;var d=r__namespace.forwardRef(({className:e,...o},s)=>jsxRuntime.jsx(t__namespace.Title,{ref:s,className:i("text-sm font-semibold [&+div]:text-xs",e),...o}));d.displayName=t__namespace.Title.displayName;var f=r__namespace.forwardRef(({className:e,...o},s)=>jsxRuntime.jsx(t__namespace.Description,{ref:s,className:i("text-sm opacity-90",e),...o}));f.displayName=t__namespace.Description.displayName;exports.Toast=p;exports.ToastAction=m;exports.ToastClose=c;exports.ToastDescription=f;exports.ToastProvider=y;exports.ToastTitle=d;exports.ToastViewport=n;//# sourceMappingURL=toast.js.map
2
- //# sourceMappingURL=toast.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/utils/cn.ts","../../src/components/atoms/toast/toast.tsx"],"names":["cn","inputs","twMerge","clsx","ToastProvider","t","ToastViewport","r","className","props","ref","jsx","toastVariants","cva","Toast","variant","ToastAction","ToastClose","X","ToastTitle","ToastDescription"],"mappings":"oqBAGO,SAASA,CAAAA,CAAAA,GAAMC,CAAsB,CAAA,CAC1C,OAAOC,qBAAAA,CAAQC,SAAKF,CAAAA,CAAM,CAAC,CAC7B,CCuBMG,IAAAA,CAAAA,CAAgCC,YAEhCC,CAAAA,QAAAA,CAAAA,CAAAA,CAAsBC,YAG1B,CAAA,UAAA,CAAA,CAAC,CAAE,SAAA,CAAAC,CAAW,CAAA,GAAGC,CAAM,CAAA,CAAGC,CAC1BC,GAAAA,cAAAA,CAAiBN,YAAhB,CAAA,QAAA,CAAA,CACC,GAAKK,CAAAA,CAAAA,CACL,SAAWV,CAAAA,CAAAA,CACT,mIACAQ,CAAAA,CACF,CACC,CAAA,GAAGC,CACN,CAAA,CACD,EACDH,CAAc,CAAA,WAAA,CAA8BD,YAAS,CAAA,QAAA,CAAA,WAAA,CAE/CO,IAAAA,CAAAA,CAAgBC,0BACpB,CAAA,2lBAAA,CACA,CACE,QAAA,CAAU,CACR,OAAA,CAAS,CACP,OAAA,CAAS,sCACT,CAAA,W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SAAA,CAAU,CACzB,CAAA,CACD,EACDD,CAAW,CAAA,WAAA,CAA8BZ,YAAM,CAAA,KAAA,CAAA,WAAA,CAEzCc,IAAAA,CAAAA,CAAmBZ,YAGvB,CAAA,UAAA,CAAA,CAAC,CAAE,SAAA,CAAAC,CAAW,CAAA,GAAGC,CAAM,CAAA,CAAGC,CAC1BC,GAAAA,cAAAA,CAAiBN,YAAhB,CAAA,KAAA,CAAA,CACC,GAAKK,CAAAA,CAAAA,CACL,SAAWV,CAAAA,CAAAA,CAAG,uCAAyCQ,CAAAA,CAAS,CAC/D,CAAA,GAAGC,CACN,CAAA,CACD,EACDU,CAAAA,CAAW,WAA8B,CAAAd,YAAA,CAAA,KAAA,CAAM,WAE/C,CAAA,IAAMe,CAAyB,CAAAb,YAAA,CAAA,UAAA,CAG7B,CAAC,CAAE,SAAAC,CAAAA,CAAAA,CAAW,GAAGC,CAAM,CAAGC,CAAAA,CAAAA,GAC1BC,cAAiB,CAAAN,YAAA,CAAA,WAAA,CAAhB,CACC,GAAA,CAAKK,CACL,CAAA,SAAA,CAAWV,CAAG,CAAA,oBAAA,CAAsBQ,CAAS,CAAA,CAC5C,GAAGC,CAAAA,CACN,CACD,EACDW,CAAiB,CAAA,WAAA,CAA8Bf,YAAY,CAAA,WAAA,CAAA,WAAA","file":"toast.js","sourcesContent":["import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","/**\n * Toast component for displaying temporary notifications.\n * Built on top of Radix UI's Toast primitive.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-toast--docs\n *\n * @example\n * ```tsx\n * <ToastProvider>\n * <Toast>\n * <ToastTitle>Title</ToastTitle>\n * <ToastDescription>Description</ToastDescription>\n * <ToastAction>Action</ToastAction>\n * <ToastClose />\n * </Toast>\n * <ToastViewport />\n * </ToastProvider>\n * ```\n */\n\nimport * as React from \"react\"\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as ToastPrimitives from \"@radix-ui/react-toast\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { X } from \"lucide-react\"\n\nimport { cn } from \"@/utils/index\"\n\nconst ToastProvider = ToastPrimitives.Provider\n\nconst ToastViewport = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Viewport>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Viewport>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Viewport\n ref={ref}\n className={cn(\n \"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]\",\n className\n )}\n {...props}\n />\n))\nToastViewport.displayName = ToastPrimitives.Viewport.displayName\n\nconst toastVariants = cva(\n \"group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full\",\n {\n variants: {\n variant: {\n default: \"border bg-background text-foreground\",\n destructive:\n \"destructive group border-destructive bg-destructive text-destructive-foreground\"\n }\n },\n defaultVariants: {\n variant: \"default\"\n }\n }\n)\n\nconst Toast = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Root>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Root> & VariantProps<typeof toastVariants>\n>(({ className, variant, ...props }, ref) => {\n return (\n <ToastPrimitives.Root\n ref={ref}\n className={cn(toastVariants({ variant }), className)}\n {...props}\n />\n )\n})\nToast.displayName = ToastPrimitives.Root.displayName\n\nconst ToastAction = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Action>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Action>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Action\n ref={ref}\n className={cn(\n \"inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive\",\n className\n )}\n {...props}\n />\n))\nToastAction.displayName = ToastPrimitives.Action.displayName\n\nconst ToastClose = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Close>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Close>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Close\n ref={ref}\n className={cn(\n \"absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600\",\n className\n )}\n toast-close=\"\"\n aria-label=\"Close toast\"\n {...props}\n >\n <X className=\"h-4 w-4\" />\n </ToastPrimitives.Close>\n))\nToastClose.displayName = ToastPrimitives.Close.displayName\n\nconst ToastTitle = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Title>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Title>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Title\n ref={ref}\n className={cn(\"text-sm font-semibold [&+div]:text-xs\", className)}\n {...props}\n />\n))\nToastTitle.displayName = ToastPrimitives.Title.displayName\n\nconst ToastDescription = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Description>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Description>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Description\n ref={ref}\n className={cn(\"text-sm opacity-90\", className)}\n {...props}\n />\n))\nToastDescription.displayName = ToastPrimitives.Description.displayName\n\ntype ToastProps = React.ComponentPropsWithoutRef<typeof Toast>\n\ntype ToastActionElement = React.ReactElement<typeof ToastAction>\n\nexport {\n type ToastProps,\n type ToastActionElement,\n ToastProvider,\n ToastViewport,\n Toast,\n ToastTitle,\n ToastDescription,\n ToastClose,\n ToastAction\n}\n"]}
@@ -1,26 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
-
3
- /**
4
- * Toaster component for managing and displaying toast notifications.
5
- * Built on top of the Toast primitive components.
6
- *
7
- * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-toaster--docs
8
- *
9
- * @example
10
- * ```tsx
11
- * // Add Toaster to your app's root layout
12
- * <Toaster />
13
- *
14
- * // Use the toast hook to show notifications
15
- * const { toast } = useToast()
16
- *
17
- * toast({
18
- * title: "Success",
19
- * description: "Your changes have been saved.",
20
- * action: <ToastAction altText="Undo">Undo</ToastAction>
21
- * })
22
- * ```
23
- */
24
- declare function Toaster(): react_jsx_runtime.JSX.Element;
25
-
26
- export { Toaster };
@@ -1,2 +0,0 @@
1
- 'use strict';var n=require('react'),s=require('@radix-ui/react-toast'),classVarianceAuthority=require('class-variance-authority'),lucideReact=require('lucide-react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),jsxRuntime=require('react/jsx-runtime');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var n__namespace=/*#__PURE__*/_interopNamespace(n);var s__namespace=/*#__PURE__*/_interopNamespace(s);var w=1,D=1e6;var A=0;function _(){return A=(A+1)%Number.MAX_SAFE_INTEGER,A.toString()}var P=new Map,x=t=>{if(P.has(t))return;let e=setTimeout(()=>{P.delete(t),c({type:"REMOVE_TOAST",toastId:t});},D);P.set(t,e);},N=(t,e)=>{switch(e.type){case "ADD_TOAST":return {...t,toasts:[e.toast,...t.toasts].slice(0,w)};case "UPDATE_TOAST":return {...t,toasts:t.toasts.map(o=>o.id===e.toast.id?{...o,...e.toast}:o)};case "DISMISS_TOAST":{let{toastId:o}=e;return o?x(o):t.toasts.forEach(a=>{x(a.id);}),{...t,toasts:t.toasts.map(a=>a.id===o||o===void 0?{...a,open:false}:a)}}case "REMOVE_TOAST":return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(o=>o.id!==e.toastId)}}},T=[],d={toasts:[]};function c(t){d=N(d,t),T.forEach(e=>{e(d);});}function b({...t}){let e=_(),o=p=>c({type:"UPDATE_TOAST",toast:{...p,id:e}}),a=()=>c({type:"DISMISS_TOAST",toastId:e});return c({type:"ADD_TOAST",toast:{...t,id:e,open:true,onOpenChange:p=>{p||a();}}}),{id:e,dismiss:a,update:o}}function E(){let[t,e]=n__namespace.useState(d);return n__namespace.useEffect(()=>(T.push(e),()=>{let o=T.indexOf(e);o>-1&&T.splice(o,1);}),[t]),{...t,toast:b,dismiss:o=>c({type:"DISMISS_TOAST",toastId:o})}}function i(...t){return tailwindMerge.twMerge(clsx.clsx(t))}var S=s__namespace.Provider,f=n__namespace.forwardRef(({className:t,...e},o)=>jsxRuntime.jsx(s__namespace.Viewport,{ref:o,className:i("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",t),...e}));f.displayName=s__namespace.Viewport.displayName;var W=classVarianceAuthority.cva("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),u=n__namespace.forwardRef(({className:t,variant:e,...o},a)=>jsxRuntime.jsx(s__namespace.Root,{ref:a,className:i(W({variant:e}),t),...o}));u.displayName=s__namespace.Root.displayName;var O=n__namespace.forwardRef(({className:t,...e},o)=>jsxRuntime.jsx(s__namespace.Action,{ref:o,className:i("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",t),...e}));O.displayName=s__namespace.Action.displayName;var l=n__namespace.forwardRef(({className:t,...e},o)=>jsxRuntime.jsx(s__namespace.Close,{ref:o,className:i("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",t),"toast-close":"","aria-label":"Close toast",...e,children:jsxRuntime.jsx(lucideReact.X,{className:"h-4 w-4"})}));l.displayName=s__namespace.Close.displayName;var v=n__namespace.forwardRef(({className:t,...e},o)=>jsxRuntime.jsx(s__namespace.Title,{ref:o,className:i("text-sm font-semibold [&+div]:text-xs",t),...e}));v.displayName=s__namespace.Title.displayName;var y=n__namespace.forwardRef(({className:t,...e},o)=>jsxRuntime.jsx(s__namespace.Description,{ref:o,className:i("text-sm opacity-90",t),...e}));y.displayName=s__namespace.Description.displayName;function U(){let{toasts:t}=E();return jsxRuntime.jsxs(S,{children:[t.map(function({id:e,title:o,description:a,action:p,...h}){return jsxRuntime.jsxs(u,{...h,children:[jsxRuntime.jsxs("div",{className:"grid gap-1",children:[o&&jsxRuntime.jsx(v,{children:o}),a&&jsxRuntime.jsx(y,{children:a})]}),p,jsxRuntime.jsx(l,{})]},e)}),jsxRuntime.jsx(f,{})]})}exports.Toaster=U;//# sourceMappingURL=toaster.js.map
2
- //# sourceMappingURL=toaster.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/hooks/use-toast.ts","../../src/utils/cn.ts","../../src/components/atoms/toast/toast.tsx","../../src/components/atoms/toaster/toaster.tsx"],"names":["TOAST_LIMIT","TOAST_REMOVE_DELAY","count","genId","toastTimeouts","addToRemoveQueue","toastId","timeout","dispatch","reducer","state","action","t","toast","listeners","memoryState","listener","props","id","update","dismiss","open","useToast","setState","m","index","cn","inputs","twMerge","clsx","ToastProvider","s","ToastViewport","n","className","ref","jsx","toastVariants","cva","Toast","variant","ToastAction","ToastClose","X","ToastTitle","ToastDescription","Toaster","toasts","jsxs","title","description"],"mappings":"oqBAOA,IAAMA,CAAc,CAAA,CAAA,CACdC,EAAqB,GAgB3B,CAAA,IAAIC,CAAQ,CAAA,CAAA,CAEZ,SAASC,CAAQ,EAAA,CACf,OAAAD,CAASA,CAAAA,CAAAA,CAAAA,CAAQ,GAAK,MAAO,CAAA,gBAAA,CACtBA,CAAM,CAAA,QAAA,EACf,CA0BA,IAAME,CAAgB,CAAA,IAAI,IAEpBC,CAAoBC,CAAAA,CAAAA,EAAoB,CAC5C,GAAIF,EAAc,GAAIE,CAAAA,CAAO,EAC3B,OAGF,IAAMC,EAAU,UAAW,CAAA,IAAM,CAC/BH,CAAAA,CAAc,OAAOE,CAAO,CAAA,CAC5BE,CAAS,CAAA,CACP,KAAM,cACN,CAAA,OAAA,CAASF,CACX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AAG,oBAAsBQ,CAAAA,CAAS,EAC5C,GAAGjB,CAAAA,CACN,CACD,CAAA,CACD4B,EAAiB,WAA8B,CAAAd,YAAA,CAAA,WAAA,CAAY,WC3F/C,CARL,SAASe,CAAU,EAAA,CACxB,GAAM,CAAE,MAAA,CAAAC,CAAO,CAAIzB,CAAAA,CAAAA,EAEnB,CAAA,OACE0B,gBAAClB,CAAA,CAAA,CACE,QAAAiB,CAAAA,CAAAA,CAAAA,CAAO,IAAI,SAAU,CAAE,EAAA7B,CAAAA,CAAAA,CAAI,MAAA+B,CAAO,CAAA,WAAA,CAAAC,EAAa,MAAAvC,CAAAA,CAAAA,CAAQ,GAAGM,CAAM,CAAA,CAAG,CAClE,OACE+B,gBAACT,CAAA,CAAA,CAAgB,GAAGtB,CAAAA,CAClB,UAAA+B,eAAC,CAAA,KAAA,CAAA,CAAI,SAAU,CAAA,YAAA,CACZ,UAAAC,CAASb,EAAAA,cAAAA,CAACQ,EAAA,CAAY,QAAA,CAAAK,EAAM,CAC5BC,CAAAA,CAAAA,EAAed,cAACS,CAAAA,CAAAA,CAAA,CAAkB,QAAAK,CAAAA,CAAAA,CAAY,GACjD,CACCvC,CAAAA,CAAAA,CACDyB,eAACM,CAAA,CAAA,EAAW,CANFxB,CAAAA,CAAAA,CAAAA,CAOZ,CAEJ,CAAC,CAAA,CACDkB,eAACJ,CAAA,CAAA,EAAc,GACjB,CAEJ","file":"toaster.js","sourcesContent":["\"use client\"\n\n// Inspired by react-hot-toast library\nimport * as React from \"react\"\n\nimport type { ToastActionElement, ToastProps } from \"@/components/atoms/toast\"\n\nconst TOAST_LIMIT = 1\nconst TOAST_REMOVE_DELAY = 1000000\n\ntype ToasterToast = ToastProps & {\n id: string\n title?: React.ReactNode\n description?: React.ReactNode\n action?: ToastActionElement\n}\n\nconst actionTypes = {\n ADD_TOAST: \"ADD_TOAST\",\n UPDATE_TOAST: \"UPDATE_TOAST\",\n DISMISS_TOAST: \"DISMISS_TOAST\",\n REMOVE_TOAST: \"REMOVE_TOAST\"\n} as const\n\nlet count = 0\n\nfunction genId() {\n count = (count + 1) % Number.MAX_SAFE_INTEGER\n return count.toString()\n}\n\ntype ActionType = typeof actionTypes\n\ntype Action =\n | {\n type: ActionType[\"ADD_TOAST\"]\n toast: ToasterToast\n }\n | {\n type: ActionType[\"UPDATE_TOAST\"]\n toast: Partial<ToasterToast>\n }\n | {\n type: ActionType[\"DISMISS_TOAST\"]\n toastId?: ToasterToast[\"id\"]\n }\n | {\n type: ActionType[\"REMOVE_TOAST\"]\n toastId?: ToasterToast[\"id\"]\n }\n\ninterface State {\n toasts: ToasterToast[]\n}\n\nconst toastTimeouts = new Map<string, ReturnType<typeof setTimeout>>()\n\nconst addToRemoveQueue = (toastId: string) => {\n if (toastTimeouts.has(toastId)) {\n return\n }\n\n const timeout = setTimeout(() => {\n toastTimeouts.delete(toastId)\n dispatch({\n type: \"REMOVE_TOAST\",\n toastId: toastId\n })\n }, TOAST_REMOVE_DELAY)\n\n toastTimeouts.set(toastId, timeout)\n}\n\nexport const reducer = (state: State, action: Action): State => {\n switch (action.type) {\n case \"ADD_TOAST\":\n return {\n ...state,\n toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT)\n }\n\n case \"UPDATE_TOAST\":\n return {\n ...state,\n toasts: state.toasts.map((t) => (t.id === action.toast.id ? { ...t, ...action.toast } : t))\n }\n\n case \"DISMISS_TOAST\": {\n const { toastId } = action\n\n // ! Side effects ! - This could be extracted into a dismissToast() action,\n // but I'll keep it here for simplicity\n if (toastId) {\n addToRemoveQueue(toastId)\n } else {\n state.toasts.forEach((toast) => {\n addToRemoveQueue(toast.id)\n })\n }\n\n return {\n ...state,\n toasts: state.toasts.map((t) =>\n t.id === toastId || toastId === undefined\n ? {\n ...t,\n open: false\n }\n : t\n )\n }\n }\n case \"REMOVE_TOAST\":\n if (action.toastId === undefined) {\n return {\n ...state,\n toasts: []\n }\n }\n return {\n ...state,\n toasts: state.toasts.filter((t) => t.id !== action.toastId)\n }\n }\n}\n\nconst listeners: Array<(state: State) => void> = []\n\nlet memoryState: State = { toasts: [] }\n\nfunction dispatch(action: Action) {\n memoryState = reducer(memoryState, action)\n listeners.forEach((listener) => {\n listener(memoryState)\n })\n}\n\ntype Toast = Omit<ToasterToast, \"id\">\n\nfunction toast({ ...props }: Toast) {\n const id = genId()\n\n const update = (props: ToasterToast) =>\n dispatch({\n type: \"UPDATE_TOAST\",\n toast: { ...props, id }\n })\n const dismiss = () => dispatch({ type: \"DISMISS_TOAST\", toastId: id })\n\n dispatch({\n type: \"ADD_TOAST\",\n toast: {\n ...props,\n id,\n open: true,\n onOpenChange: (open) => {\n if (!open) dismiss()\n }\n }\n })\n\n return {\n id: id,\n dismiss,\n update\n }\n}\n\nfunction useToast() {\n const [state, setState] = React.useState<State>(memoryState)\n\n React.useEffect(() => {\n listeners.push(setState)\n return () => {\n const index = listeners.indexOf(setState)\n if (index > -1) {\n listeners.splice(index, 1)\n }\n }\n }, [state])\n\n return {\n ...state,\n toast,\n dismiss: (toastId?: string) => dispatch({ type: \"DISMISS_TOAST\", toastId })\n }\n}\n\nexport { useToast, toast }\n","import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","/**\n * Toast component for displaying temporary notifications.\n * Built on top of Radix UI's Toast primitive.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-toast--docs\n *\n * @example\n * ```tsx\n * <ToastProvider>\n * <Toast>\n * <ToastTitle>Title</ToastTitle>\n * <ToastDescription>Description</ToastDescription>\n * <ToastAction>Action</ToastAction>\n * <ToastClose />\n * </Toast>\n * <ToastViewport />\n * </ToastProvider>\n * ```\n */\n\nimport * as React from \"react\"\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as ToastPrimitives from \"@radix-ui/react-toast\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { X } from \"lucide-react\"\n\nimport { cn } from \"@/utils/index\"\n\nconst ToastProvider = ToastPrimitives.Provider\n\nconst ToastViewport = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Viewport>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Viewport>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Viewport\n ref={ref}\n className={cn(\n \"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]\",\n className\n )}\n {...props}\n />\n))\nToastViewport.displayName = ToastPrimitives.Viewport.displayName\n\nconst toastVariants = cva(\n \"group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full\",\n {\n variants: {\n variant: {\n default: \"border bg-background text-foreground\",\n destructive:\n \"destructive group border-destructive bg-destructive text-destructive-foreground\"\n }\n },\n defaultVariants: {\n variant: \"default\"\n }\n }\n)\n\nconst Toast = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Root>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Root> & VariantProps<typeof toastVariants>\n>(({ className, variant, ...props }, ref) => {\n return (\n <ToastPrimitives.Root\n ref={ref}\n className={cn(toastVariants({ variant }), className)}\n {...props}\n />\n )\n})\nToast.displayName = ToastPrimitives.Root.displayName\n\nconst ToastAction = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Action>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Action>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Action\n ref={ref}\n className={cn(\n \"inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive\",\n className\n )}\n {...props}\n />\n))\nToastAction.displayName = ToastPrimitives.Action.displayName\n\nconst ToastClose = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Close>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Close>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Close\n ref={ref}\n className={cn(\n \"absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600\",\n className\n )}\n toast-close=\"\"\n aria-label=\"Close toast\"\n {...props}\n >\n <X className=\"h-4 w-4\" />\n </ToastPrimitives.Close>\n))\nToastClose.displayName = ToastPrimitives.Close.displayName\n\nconst ToastTitle = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Title>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Title>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Title\n ref={ref}\n className={cn(\"text-sm font-semibold [&+div]:text-xs\", className)}\n {...props}\n />\n))\nToastTitle.displayName = ToastPrimitives.Title.displayName\n\nconst ToastDescription = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Description>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Description>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Description\n ref={ref}\n className={cn(\"text-sm opacity-90\", className)}\n {...props}\n />\n))\nToastDescription.displayName = ToastPrimitives.Description.displayName\n\ntype ToastProps = React.ComponentPropsWithoutRef<typeof Toast>\n\ntype ToastActionElement = React.ReactElement<typeof ToastAction>\n\nexport {\n type ToastProps,\n type ToastActionElement,\n ToastProvider,\n ToastViewport,\n Toast,\n ToastTitle,\n ToastDescription,\n ToastClose,\n ToastAction\n}\n","/**\n * Toaster component for managing and displaying toast notifications.\n * Built on top of the Toast primitive components.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-toaster--docs\n *\n * @example\n * ```tsx\n * // Add Toaster to your app's root layout\n * <Toaster />\n *\n * // Use the toast hook to show notifications\n * const { toast } = useToast()\n *\n * toast({\n * title: \"Success\",\n * description: \"Your changes have been saved.\",\n * action: <ToastAction altText=\"Undo\">Undo</ToastAction>\n * })\n * ```\n */\n\nimport { useToast } from \"@/hooks/use-toast\"\nimport {\n Toast,\n ToastClose,\n ToastDescription,\n ToastProvider,\n ToastTitle,\n ToastViewport\n} from \"@/components/atoms/toast\"\n\nexport function Toaster() {\n const { toasts } = useToast()\n\n return (\n <ToastProvider>\n {toasts.map(function ({ id, title, description, action, ...props }) {\n return (\n <Toast key={id} {...props}>\n <div className=\"grid gap-1\">\n {title && <ToastTitle>{title}</ToastTitle>}\n {description && <ToastDescription>{description}</ToastDescription>}\n </div>\n {action}\n <ToastClose />\n </Toast>\n )\n })}\n <ToastViewport />\n </ToastProvider>\n )\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/hooks/use-toast.ts","../../src/utils/cn.ts","../../src/components/atoms/toast/toast.tsx","../../src/components/atoms/toaster/toaster.tsx"],"names":["TOAST_LIMIT","TOAST_REMOVE_DELAY","count","genId","toastTimeouts","addToRemoveQueue","toastId","timeout","dispatch","reducer","state","action","t","toast","listeners","memoryState","listener","props","id","update","dismiss","open","useToast","setState","m","index","cn","inputs","twMerge","clsx","ToastProvider","ToastViewport","className","ref","jsx","toastVariants","cva","Toast","variant","ToastAction","ToastClose","X","ToastTitle","ToastDescription","Toaster","toasts","jsxs","title","description"],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CAEJ,CAAC,CAAA,CACDgB,IAACH,CAAA,CAAA,EAAc,GACjB,CAEJ","file":"toaster.mjs","sourcesContent":["\"use client\"\n\n// Inspired by react-hot-toast library\nimport * as React from \"react\"\n\nimport type { ToastActionElement, ToastProps } from \"@/components/atoms/toast\"\n\nconst TOAST_LIMIT = 1\nconst TOAST_REMOVE_DELAY = 1000000\n\ntype ToasterToast = ToastProps & {\n id: string\n title?: React.ReactNode\n description?: React.ReactNode\n action?: ToastActionElement\n}\n\nconst actionTypes = {\n ADD_TOAST: \"ADD_TOAST\",\n UPDATE_TOAST: \"UPDATE_TOAST\",\n DISMISS_TOAST: \"DISMISS_TOAST\",\n REMOVE_TOAST: \"REMOVE_TOAST\"\n} as const\n\nlet count = 0\n\nfunction genId() {\n count = (count + 1) % Number.MAX_SAFE_INTEGER\n return count.toString()\n}\n\ntype ActionType = typeof actionTypes\n\ntype Action =\n | {\n type: ActionType[\"ADD_TOAST\"]\n toast: ToasterToast\n }\n | {\n type: ActionType[\"UPDATE_TOAST\"]\n toast: Partial<ToasterToast>\n }\n | {\n type: ActionType[\"DISMISS_TOAST\"]\n toastId?: ToasterToast[\"id\"]\n }\n | {\n type: ActionType[\"REMOVE_TOAST\"]\n toastId?: ToasterToast[\"id\"]\n }\n\ninterface State {\n toasts: ToasterToast[]\n}\n\nconst toastTimeouts = new Map<string, ReturnType<typeof setTimeout>>()\n\nconst addToRemoveQueue = (toastId: string) => {\n if (toastTimeouts.has(toastId)) {\n return\n }\n\n const timeout = setTimeout(() => {\n toastTimeouts.delete(toastId)\n dispatch({\n type: \"REMOVE_TOAST\",\n toastId: toastId\n })\n }, TOAST_REMOVE_DELAY)\n\n toastTimeouts.set(toastId, timeout)\n}\n\nexport const reducer = (state: State, action: Action): State => {\n switch (action.type) {\n case \"ADD_TOAST\":\n return {\n ...state,\n toasts: [action.toast, ...state.toasts].slice(0, TOAST_LIMIT)\n }\n\n case \"UPDATE_TOAST\":\n return {\n ...state,\n toasts: state.toasts.map((t) => (t.id === action.toast.id ? { ...t, ...action.toast } : t))\n }\n\n case \"DISMISS_TOAST\": {\n const { toastId } = action\n\n // ! Side effects ! - This could be extracted into a dismissToast() action,\n // but I'll keep it here for simplicity\n if (toastId) {\n addToRemoveQueue(toastId)\n } else {\n state.toasts.forEach((toast) => {\n addToRemoveQueue(toast.id)\n })\n }\n\n return {\n ...state,\n toasts: state.toasts.map((t) =>\n t.id === toastId || toastId === undefined\n ? {\n ...t,\n open: false\n }\n : t\n )\n }\n }\n case \"REMOVE_TOAST\":\n if (action.toastId === undefined) {\n return {\n ...state,\n toasts: []\n }\n }\n return {\n ...state,\n toasts: state.toasts.filter((t) => t.id !== action.toastId)\n }\n }\n}\n\nconst listeners: Array<(state: State) => void> = []\n\nlet memoryState: State = { toasts: [] }\n\nfunction dispatch(action: Action) {\n memoryState = reducer(memoryState, action)\n listeners.forEach((listener) => {\n listener(memoryState)\n })\n}\n\ntype Toast = Omit<ToasterToast, \"id\">\n\nfunction toast({ ...props }: Toast) {\n const id = genId()\n\n const update = (props: ToasterToast) =>\n dispatch({\n type: \"UPDATE_TOAST\",\n toast: { ...props, id }\n })\n const dismiss = () => dispatch({ type: \"DISMISS_TOAST\", toastId: id })\n\n dispatch({\n type: \"ADD_TOAST\",\n toast: {\n ...props,\n id,\n open: true,\n onOpenChange: (open) => {\n if (!open) dismiss()\n }\n }\n })\n\n return {\n id: id,\n dismiss,\n update\n }\n}\n\nfunction useToast() {\n const [state, setState] = React.useState<State>(memoryState)\n\n React.useEffect(() => {\n listeners.push(setState)\n return () => {\n const index = listeners.indexOf(setState)\n if (index > -1) {\n listeners.splice(index, 1)\n }\n }\n }, [state])\n\n return {\n ...state,\n toast,\n dismiss: (toastId?: string) => dispatch({ type: \"DISMISS_TOAST\", toastId })\n }\n}\n\nexport { useToast, toast }\n","import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","/**\n * Toast component for displaying temporary notifications.\n * Built on top of Radix UI's Toast primitive.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-toast--docs\n *\n * @example\n * ```tsx\n * <ToastProvider>\n * <Toast>\n * <ToastTitle>Title</ToastTitle>\n * <ToastDescription>Description</ToastDescription>\n * <ToastAction>Action</ToastAction>\n * <ToastClose />\n * </Toast>\n * <ToastViewport />\n * </ToastProvider>\n * ```\n */\n\nimport * as React from \"react\"\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport * as ToastPrimitives from \"@radix-ui/react-toast\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { X } from \"lucide-react\"\n\nimport { cn } from \"@/utils/index\"\n\nconst ToastProvider = ToastPrimitives.Provider\n\nconst ToastViewport = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Viewport>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Viewport>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Viewport\n ref={ref}\n className={cn(\n \"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]\",\n className\n )}\n {...props}\n />\n))\nToastViewport.displayName = ToastPrimitives.Viewport.displayName\n\nconst toastVariants = cva(\n \"group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full\",\n {\n variants: {\n variant: {\n default: \"border bg-background text-foreground\",\n destructive:\n \"destructive group border-destructive bg-destructive text-destructive-foreground\"\n }\n },\n defaultVariants: {\n variant: \"default\"\n }\n }\n)\n\nconst Toast = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Root>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Root> & VariantProps<typeof toastVariants>\n>(({ className, variant, ...props }, ref) => {\n return (\n <ToastPrimitives.Root\n ref={ref}\n className={cn(toastVariants({ variant }), className)}\n {...props}\n />\n )\n})\nToast.displayName = ToastPrimitives.Root.displayName\n\nconst ToastAction = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Action>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Action>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Action\n ref={ref}\n className={cn(\n \"inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive\",\n className\n )}\n {...props}\n />\n))\nToastAction.displayName = ToastPrimitives.Action.displayName\n\nconst ToastClose = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Close>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Close>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Close\n ref={ref}\n className={cn(\n \"absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600\",\n className\n )}\n toast-close=\"\"\n aria-label=\"Close toast\"\n {...props}\n >\n <X className=\"h-4 w-4\" />\n </ToastPrimitives.Close>\n))\nToastClose.displayName = ToastPrimitives.Close.displayName\n\nconst ToastTitle = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Title>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Title>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Title\n ref={ref}\n className={cn(\"text-sm font-semibold [&+div]:text-xs\", className)}\n {...props}\n />\n))\nToastTitle.displayName = ToastPrimitives.Title.displayName\n\nconst ToastDescription = React.forwardRef<\n React.ElementRef<typeof ToastPrimitives.Description>,\n React.ComponentPropsWithoutRef<typeof ToastPrimitives.Description>\n>(({ className, ...props }, ref) => (\n <ToastPrimitives.Description\n ref={ref}\n className={cn(\"text-sm opacity-90\", className)}\n {...props}\n />\n))\nToastDescription.displayName = ToastPrimitives.Description.displayName\n\ntype ToastProps = React.ComponentPropsWithoutRef<typeof Toast>\n\ntype ToastActionElement = React.ReactElement<typeof ToastAction>\n\nexport {\n type ToastProps,\n type ToastActionElement,\n ToastProvider,\n ToastViewport,\n Toast,\n ToastTitle,\n ToastDescription,\n ToastClose,\n ToastAction\n}\n","/**\n * Toaster component for managing and displaying toast notifications.\n * Built on top of the Toast primitive components.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-toaster--docs\n *\n * @example\n * ```tsx\n * // Add Toaster to your app's root layout\n * <Toaster />\n *\n * // Use the toast hook to show notifications\n * const { toast } = useToast()\n *\n * toast({\n * title: \"Success\",\n * description: \"Your changes have been saved.\",\n * action: <ToastAction altText=\"Undo\">Undo</ToastAction>\n * })\n * ```\n */\n\nimport { useToast } from \"@/hooks/use-toast\"\nimport {\n Toast,\n ToastClose,\n ToastDescription,\n ToastProvider,\n ToastTitle,\n ToastViewport\n} from \"@/components/atoms/toast\"\n\nexport function Toaster() {\n const { toasts } = useToast()\n\n return (\n <ToastProvider>\n {toasts.map(function ({ id, title, description, action, ...props }) {\n return (\n <Toast key={id} {...props}>\n <div className=\"grid gap-1\">\n {title && <ToastTitle>{title}</ToastTitle>}\n {description && <ToastDescription>{description}</ToastDescription>}\n </div>\n {action}\n <ToastClose />\n </Toast>\n )\n })}\n <ToastViewport />\n </ToastProvider>\n )\n}\n"]}
@@ -1,25 +0,0 @@
1
- import * as React from 'react';
2
- import * as TooltipPrimitive from '@radix-ui/react-tooltip';
3
-
4
- /**
5
- * TooltipProvider component for creating accessible tooltips.
6
- * Built on top of Radix UI's Tooltip primitive.
7
- *
8
- * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-tooltip--docs
9
- *
10
- * @example
11
- * ```tsx
12
- * <TooltipProvider>
13
- * <Tooltip>
14
- * <TooltipTrigger>Hover me</TooltipTrigger>
15
- * <TooltipContent>Tooltip content</TooltipContent>
16
- * </Tooltip>
17
- * </TooltipProvider>
18
- * ```
19
- */
20
- declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
21
- declare const Tooltip: React.FC<TooltipPrimitive.TooltipProps>;
22
- declare const TooltipTrigger: React.ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & React.RefAttributes<HTMLButtonElement>>;
23
- declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipPrimitive.TooltipContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
24
-
25
- export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
@@ -1,2 +0,0 @@
1
- 'use strict';var r=require('react'),t=require('@radix-ui/react-tooltip'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),jsxRuntime=require('react/jsx-runtime');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var r__namespace=/*#__PURE__*/_interopNamespace(r);var t__namespace=/*#__PURE__*/_interopNamespace(t);function i(...o){return tailwindMerge.twMerge(clsx.clsx(o))}var g=t__namespace.Provider,u=t__namespace.Root,x=t__namespace.Trigger,d=r__namespace.forwardRef(({className:o,sideOffset:a=4,...m},n)=>jsxRuntime.jsx(t__namespace.Portal,{children:jsxRuntime.jsx(t__namespace.Content,{ref:n,sideOffset:a,className:i("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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-tooltip-content-transform-origin]",o),...m})}));d.displayName=t__namespace.Content.displayName;exports.Tooltip=u;exports.TooltipContent=d;exports.TooltipProvider=g;exports.TooltipTrigger=x;//# sourceMappingURL=tooltip.js.map
2
- //# sourceMappingURL=tooltip.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/utils/cn.ts","../../src/components/atoms/tooltip/tooltip.tsx"],"names":["cn","inputs","twMerge","clsx","TooltipProvider","t","Tooltip","TooltipTrigger","TooltipContent","r","className","sideOffset","props","ref","jsx"],"mappings":"ukBAGO,SAASA,CAAMC,CAAAA,GAAAA,CAAAA,CAAsB,CAC1C,OAAOC,qBAAQC,CAAAA,SAAAA,CAAKF,CAAM,CAAC,CAC7B,KCgBMG,CAAmC,CAAAC,YAAA,CAAA,QAAA,CAEnCC,CAA2B,CAAAD,YAAA,CAAA,IAAA,CAE3BE,EAAkCF,YAElCG,CAAAA,OAAAA,CAAAA,CAAAA,CAAuBC,YAG3B,CAAA,UAAA,CAAA,CAAC,CAAE,SAAA,CAAAC,CAAW,CAAA,UAAA,CAAAC,EAAa,CAAG,CAAA,GAAGC,CAAM,CAAA,CAAGC,CAC1CC,GAAAA,cAAAA,CAAkBT,YAAjB,CAAA,MAAA,CAAA,CACC,SAAAS,cAAkB,CAAAT,YAAA,CAAA,OAAA,CAAjB,CACC,GAAA,CAAKQ,CACL,CAAA,UAAA,CAAYF,CACZ,CAAA,SAAA,CAAWX,EACT,qaACAU,CAAAA,CACF,CACC,CAAA,GAAGE,EACN,CACF,CAAA,CACD,EACDJ,CAAAA,CAAe,YAA+BH,YAAQ,CAAA,OAAA,CAAA,WAAA","file":"tooltip.js","sourcesContent":["import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","import * as React from \"react\"\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\"\n\nimport { cn } from \"@/utils/index\"\n\n/**\n * TooltipProvider component for creating accessible tooltips.\n * Built on top of Radix UI's Tooltip primitive.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-tooltip--docs\n *\n * @example\n * ```tsx\n * <TooltipProvider>\n * <Tooltip>\n * <TooltipTrigger>Hover me</TooltipTrigger>\n * <TooltipContent>Tooltip content</TooltipContent>\n * </Tooltip>\n * </TooltipProvider>\n * ```\n */\nconst TooltipProvider = TooltipPrimitive.Provider\n\nconst Tooltip = TooltipPrimitive.Root\n\nconst TooltipTrigger = TooltipPrimitive.Trigger\n\nconst TooltipContent = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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-tooltip-content-transform-origin]\",\n className\n )}\n {...props}\n />\n </TooltipPrimitive.Portal>\n))\nTooltipContent.displayName = TooltipPrimitive.Content.displayName\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/utils/cn.ts","../../src/components/atoms/tooltip/tooltip.tsx"],"names":["cn","inputs","twMerge","clsx","TooltipProvider","Tooltip","TooltipTrigger","TooltipContent","className","sideOffset","props","ref","jsx"],"mappings":"mKAGO,SAASA,CAAMC,CAAAA,GAAAA,CAAAA,CAAsB,CAC1C,OAAOC,OAAQC,CAAAA,IAAAA,CAAKF,CAAM,CAAC,CAC7B,KCgBMG,CAAmC,CAAA,CAAA,CAAA,QAAA,CAEnCC,CAA2B,CAAA,CAAA,CAAA,IAAA,CAE3BC,EAAkC,CAElCC,CAAAA,OAAAA,CAAAA,CAAAA,CAAuB,CAG3B,CAAA,UAAA,CAAA,CAAC,CAAE,SAAA,CAAAC,CAAW,CAAA,UAAA,CAAAC,EAAa,CAAG,CAAA,GAAGC,CAAM,CAAA,CAAGC,CAC1CC,GAAAA,GAAAA,CAAkB,CAAjB,CAAA,MAAA,CAAA,CACC,SAAAA,GAAkB,CAAA,CAAA,CAAA,OAAA,CAAjB,CACC,GAAA,CAAKD,CACL,CAAA,UAAA,CAAYF,CACZ,CAAA,SAAA,CAAWT,EACT,qaACAQ,CAAAA,CACF,CACC,CAAA,GAAGE,EACN,CACF,CAAA,CACD,EACDH,CAAAA,CAAe,YAA+B,CAAQ,CAAA,OAAA,CAAA,WAAA","file":"tooltip.mjs","sourcesContent":["import { type ClassValue, clsx } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","import * as React from \"react\"\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\"\n\nimport { cn } from \"@/utils/index\"\n\n/**\n * TooltipProvider component for creating accessible tooltips.\n * Built on top of Radix UI's Tooltip primitive.\n *\n * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-tooltip--docs\n *\n * @example\n * ```tsx\n * <TooltipProvider>\n * <Tooltip>\n * <TooltipTrigger>Hover me</TooltipTrigger>\n * <TooltipContent>Tooltip content</TooltipContent>\n * </Tooltip>\n * </TooltipProvider>\n * ```\n */\nconst TooltipProvider = TooltipPrimitive.Provider\n\nconst Tooltip = TooltipPrimitive.Root\n\nconst TooltipTrigger = TooltipPrimitive.Trigger\n\nconst TooltipContent = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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-tooltip-content-transform-origin]\",\n className\n )}\n {...props}\n />\n </TooltipPrimitive.Portal>\n))\nTooltipContent.displayName = TooltipPrimitive.Content.displayName\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }\n"]}
@@ -1,24 +0,0 @@
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
-
5
- declare const typographyVariants: (props?: ({
6
- variant?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" | "blockquote" | "list" | "lead" | "large" | "small" | "muted" | null | undefined;
7
- align?: "left" | "center" | "right" | "justify" | null | undefined;
8
- } & class_variance_authority_types.ClassProp) | undefined) => string;
9
- interface TypographyProps extends React.HTMLAttributes<HTMLElement>, VariantProps<typeof typographyVariants> {
10
- as?: React.ElementType;
11
- }
12
- /**
13
- * Typography component for creating accessible text elements.
14
- * Built on top of shadcn/ui's Typography component.
15
- *
16
- * @url https://sergii-melnykov.github.io/ui/?path=/docs/atoms-typography--docs
17
- *
18
- */
19
- declare const Typography: React.ForwardRefExoticComponent<TypographyProps & React.RefAttributes<HTMLElement>>;
20
-
21
- type TypographyVariant = NonNullable<VariantProps<typeof typographyVariants>["variant"]>;
22
- type TypographyAlign = NonNullable<VariantProps<typeof typographyVariants>["align"]>;
23
-
24
- export { Typography, type TypographyAlign, type TypographyProps, type TypographyVariant, typographyVariants };
@@ -1,2 +0,0 @@
1
- 'use strict';var r=require('react'),clsx=require('clsx'),tailwindMerge=require('tailwind-merge'),classVarianceAuthority=require('class-variance-authority'),jsxRuntime=require('react/jsx-runtime');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var r__namespace=/*#__PURE__*/_interopNamespace(r);function e(...t){return tailwindMerge.twMerge(clsx.clsx(t))}var c=classVarianceAuthority.cva("",{variants:{variant:{h1:"scroll-m-5 text-4xl font-extrabold tracking-tight lg:text-5xl",h2:"scroll-m-5 text-3xl font-semibold tracking-tight",h3:"scroll-m-5 text-2xl font-semibold tracking-tight",h4:"scroll-m-5 text-xl font-semibold tracking-tight",h5:"scroll-m-5 text-lg font-semibold tracking-tight",h6:"scroll-m-5 text-base font-semibold tracking-tight",p:"leading-7 [&:not(:first-child)]:mt-6",blockquote:"mt-6 border-l-2 border-slate-300 pl-6 italic",list:"my-6 ml-6 list-disc [&>li]:mt-2",lead:"text-xl text-muted-foreground",large:"text-lg font-semibold",small:"text-sm font-medium leading-none",muted:"text-sm text-muted-foreground"},align:{left:"text-left",center:"text-center",right:"text-right",justify:"text-justify"}},defaultVariants:{variant:"p",align:"left"}}),f=r__namespace.forwardRef(({className:t,variant:o,align:l,as:a="p",...i},n)=>jsxRuntime.jsx(a,{className:e(c({variant:o,align:l,className:t})),ref:n,...i}));f.displayName="Typography";exports.Typography=f;exports.typographyVariants=c;//# sourceMappingURL=typography.js.map
2
- //# sourceMappingURL=typography.js.map