eai-frontend-components 2.0.7 → 2.0.8

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 (582) hide show
  1. package/dist/index.d.ts +24 -73
  2. package/package.json +1 -1
  3. package/dist/components/accordion.d.ts +0 -8
  4. package/dist/components/accordion.d.ts.map +0 -1
  5. package/dist/components/accordion.js +0 -13
  6. package/dist/components/alert-dialog.d.ts +0 -25
  7. package/dist/components/alert-dialog.d.ts.map +0 -1
  8. package/dist/components/alert-dialog.js +0 -27
  9. package/dist/components/alert.d.ts +0 -9
  10. package/dist/components/alert.d.ts.map +0 -1
  11. package/dist/components/alert.js +0 -22
  12. package/dist/components/avatar.d.ts +0 -7
  13. package/dist/components/avatar.d.ts.map +0 -1
  14. package/dist/components/avatar.js +0 -11
  15. package/dist/components/badge.d.ts +0 -10
  16. package/dist/components/badge.d.ts.map +0 -1
  17. package/dist/components/badge.js +0 -26
  18. package/dist/components/breadcrumb.d.ts +0 -20
  19. package/dist/components/breadcrumb.d.ts.map +0 -1
  20. package/dist/components/breadcrumb.js +0 -23
  21. package/dist/components/button.d.ts +0 -12
  22. package/dist/components/button.d.ts.map +0 -1
  23. package/dist/components/button.js +0 -33
  24. package/dist/components/calendar.d.ts +0 -9
  25. package/dist/components/calendar.d.ts.map +0 -1
  26. package/dist/components/calendar.js +0 -70
  27. package/dist/components/card.d.ts +0 -9
  28. package/dist/components/card.d.ts.map +0 -1
  29. package/dist/components/card.js +0 -16
  30. package/dist/components/carousel.d.ts +0 -19
  31. package/dist/components/carousel.d.ts.map +0 -1
  32. package/dist/components/carousel.js +0 -98
  33. package/dist/components/chart.d.ts +0 -63
  34. package/dist/components/chart.d.ts.map +0 -1
  35. package/dist/components/chart.js +0 -130
  36. package/dist/components/checkbox.d.ts +0 -5
  37. package/dist/components/checkbox.d.ts.map +0 -1
  38. package/dist/components/checkbox.js +0 -8
  39. package/dist/components/collapsible.d.ts +0 -6
  40. package/dist/components/collapsible.d.ts.map +0 -1
  41. package/dist/components/collapsible.js +0 -5
  42. package/dist/components/command.d.ts +0 -81
  43. package/dist/components/command.d.ts.map +0 -1
  44. package/dist/components/command.js +0 -28
  45. package/dist/components/context-menu.d.ts +0 -28
  46. package/dist/components/context-menu.d.ts.map +0 -1
  47. package/dist/components/context-menu.js +0 -33
  48. package/dist/components/custom/date-picker.d.ts +0 -12
  49. package/dist/components/custom/date-picker.d.ts.map +0 -1
  50. package/dist/components/custom/date-picker.js +0 -35
  51. package/dist/components/custom/form/checkbox.d.ts +0 -13
  52. package/dist/components/custom/form/checkbox.d.ts.map +0 -1
  53. package/dist/components/custom/form/checkbox.js +0 -15
  54. package/dist/components/custom/form/color.d.ts +0 -15
  55. package/dist/components/custom/form/color.d.ts.map +0 -1
  56. package/dist/components/custom/form/color.js +0 -40
  57. package/dist/components/custom/form/combobox.d.ts +0 -37
  58. package/dist/components/custom/form/combobox.d.ts.map +0 -1
  59. package/dist/components/custom/form/combobox.js +0 -82
  60. package/dist/components/custom/form/cpf-cnpj.d.ts +0 -16
  61. package/dist/components/custom/form/cpf-cnpj.d.ts.map +0 -1
  62. package/dist/components/custom/form/cpf-cnpj.js +0 -32
  63. package/dist/components/custom/form/currency.d.ts +0 -14
  64. package/dist/components/custom/form/currency.d.ts.map +0 -1
  65. package/dist/components/custom/form/currency.js +0 -15
  66. package/dist/components/custom/form/date-range.d.ts +0 -16
  67. package/dist/components/custom/form/date-range.d.ts.map +0 -1
  68. package/dist/components/custom/form/date-range.js +0 -24
  69. package/dist/components/custom/form/date.d.ts +0 -16
  70. package/dist/components/custom/form/date.d.ts.map +0 -1
  71. package/dist/components/custom/form/date.js +0 -35
  72. package/dist/components/custom/form/decimal.d.ts +0 -14
  73. package/dist/components/custom/form/decimal.d.ts.map +0 -1
  74. package/dist/components/custom/form/decimal.js +0 -15
  75. package/dist/components/custom/form/file.d.ts +0 -15
  76. package/dist/components/custom/form/file.d.ts.map +0 -1
  77. package/dist/components/custom/form/file.js +0 -18
  78. package/dist/components/custom/form/form-help-text.d.ts +0 -3
  79. package/dist/components/custom/form/form-help-text.d.ts.map +0 -1
  80. package/dist/components/custom/form/form-help-text.js +0 -7
  81. package/dist/components/custom/form/form-label.d.ts +0 -4
  82. package/dist/components/custom/form/form-label.d.ts.map +0 -1
  83. package/dist/components/custom/form/form-label.js +0 -9
  84. package/dist/components/custom/form/form-message.d.ts +0 -3
  85. package/dist/components/custom/form/form-message.d.ts.map +0 -1
  86. package/dist/components/custom/form/form-message.js +0 -5
  87. package/dist/components/custom/form/ghost.d.ts +0 -8
  88. package/dist/components/custom/form/ghost.d.ts.map +0 -1
  89. package/dist/components/custom/form/ghost.js +0 -8
  90. package/dist/components/custom/form/input.d.ts +0 -18
  91. package/dist/components/custom/form/input.d.ts.map +0 -1
  92. package/dist/components/custom/form/input.js +0 -14
  93. package/dist/components/custom/form/mask.d.ts +0 -19
  94. package/dist/components/custom/form/mask.d.ts.map +0 -1
  95. package/dist/components/custom/form/mask.js +0 -19
  96. package/dist/components/custom/form/multi-select-old.d.ts +0 -19
  97. package/dist/components/custom/form/multi-select-old.d.ts.map +0 -1
  98. package/dist/components/custom/form/multi-select-old.js +0 -30
  99. package/dist/components/custom/form/multi-select.d.ts +0 -26
  100. package/dist/components/custom/form/multi-select.d.ts.map +0 -1
  101. package/dist/components/custom/form/multi-select.js +0 -66
  102. package/dist/components/custom/form/password.d.ts +0 -16
  103. package/dist/components/custom/form/password.d.ts.map +0 -1
  104. package/dist/components/custom/form/password.js +0 -14
  105. package/dist/components/custom/form/percent.d.ts +0 -14
  106. package/dist/components/custom/form/percent.d.ts.map +0 -1
  107. package/dist/components/custom/form/percent.js +0 -15
  108. package/dist/components/custom/form/phone.d.ts +0 -16
  109. package/dist/components/custom/form/phone.d.ts.map +0 -1
  110. package/dist/components/custom/form/phone.js +0 -23
  111. package/dist/components/custom/form/radio-group.d.ts +0 -23
  112. package/dist/components/custom/form/radio-group.d.ts.map +0 -1
  113. package/dist/components/custom/form/radio-group.js +0 -15
  114. package/dist/components/custom/form/select.d.ts +0 -20
  115. package/dist/components/custom/form/select.d.ts.map +0 -1
  116. package/dist/components/custom/form/select.js +0 -12
  117. package/dist/components/custom/form/step-new-form.d.ts +0 -10
  118. package/dist/components/custom/form/step-new-form.d.ts.map +0 -1
  119. package/dist/components/custom/form/step-new-form.js +0 -13
  120. package/dist/components/custom/form/switch.d.ts +0 -13
  121. package/dist/components/custom/form/switch.d.ts.map +0 -1
  122. package/dist/components/custom/form/switch.js +0 -16
  123. package/dist/components/custom/form/text.d.ts +0 -18
  124. package/dist/components/custom/form/text.d.ts.map +0 -1
  125. package/dist/components/custom/form/text.js +0 -14
  126. package/dist/components/custom/form/textarea.d.ts +0 -16
  127. package/dist/components/custom/form/textarea.d.ts.map +0 -1
  128. package/dist/components/custom/form/textarea.js +0 -19
  129. package/dist/components/custom/form/utils.d.ts +0 -18
  130. package/dist/components/custom/form/utils.d.ts.map +0 -1
  131. package/dist/components/custom/form/utils.js +0 -88
  132. package/dist/components/custom/header.d.ts +0 -3
  133. package/dist/components/custom/header.d.ts.map +0 -1
  134. package/dist/components/custom/header.js +0 -94
  135. package/dist/components/custom/label.d.ts +0 -13
  136. package/dist/components/custom/label.d.ts.map +0 -1
  137. package/dist/components/custom/label.js +0 -20
  138. package/dist/components/custom/not-found.d.ts +0 -3
  139. package/dist/components/custom/not-found.d.ts.map +0 -1
  140. package/dist/components/custom/not-found.js +0 -9
  141. package/dist/components/custom/sidebar/app-sidebar.d.ts +0 -5
  142. package/dist/components/custom/sidebar/app-sidebar.d.ts.map +0 -1
  143. package/dist/components/custom/sidebar/app-sidebar.js +0 -26
  144. package/dist/components/custom/sidebar/module-switcher.d.ts +0 -3
  145. package/dist/components/custom/sidebar/module-switcher.d.ts.map +0 -1
  146. package/dist/components/custom/sidebar/module-switcher.js +0 -55
  147. package/dist/components/custom/sidebar/nav-footer.d.ts +0 -3
  148. package/dist/components/custom/sidebar/nav-footer.d.ts.map +0 -1
  149. package/dist/components/custom/sidebar/nav-footer.js +0 -17
  150. package/dist/components/custom/sidebar/nav-main.d.ts +0 -3
  151. package/dist/components/custom/sidebar/nav-main.d.ts.map +0 -1
  152. package/dist/components/custom/sidebar/nav-main.js +0 -32
  153. package/dist/components/custom/sidebar/nav-submenu-collapsible.d.ts +0 -9
  154. package/dist/components/custom/sidebar/nav-submenu-collapsible.d.ts.map +0 -1
  155. package/dist/components/custom/sidebar/nav-submenu-collapsible.js +0 -21
  156. package/dist/components/custom/sidebar/nav-submenu-dropdown.d.ts +0 -10
  157. package/dist/components/custom/sidebar/nav-submenu-dropdown.d.ts.map +0 -1
  158. package/dist/components/custom/sidebar/nav-submenu-dropdown.js +0 -13
  159. package/dist/components/custom/sidebar/nav-user.d.ts +0 -3
  160. package/dist/components/custom/sidebar/nav-user.d.ts.map +0 -1
  161. package/dist/components/custom/sidebar/nav-user.js +0 -51
  162. package/dist/components/custom/sidebar/sidebar-button.d.ts +0 -9
  163. package/dist/components/custom/sidebar/sidebar-button.d.ts.map +0 -1
  164. package/dist/components/custom/sidebar/sidebar-button.js +0 -7
  165. package/dist/components/custom/sidebar/sidebar-item-two-lines.d.ts +0 -12
  166. package/dist/components/custom/sidebar/sidebar-item-two-lines.d.ts.map +0 -1
  167. package/dist/components/custom/sidebar/sidebar-item-two-lines.js +0 -5
  168. package/dist/components/custom/sidebar/sidebar-item.d.ts +0 -9
  169. package/dist/components/custom/sidebar/sidebar-item.d.ts.map +0 -1
  170. package/dist/components/custom/sidebar/sidebar-item.js +0 -7
  171. package/dist/components/custom/sidebar/types/sidebar.d.ts +0 -29
  172. package/dist/components/custom/sidebar/types/sidebar.d.ts.map +0 -1
  173. package/dist/components/custom/sidebar/types/sidebar.js +0 -5
  174. package/dist/components/custom/table/data-table-export.d.ts +0 -8
  175. package/dist/components/custom/table/data-table-export.d.ts.map +0 -1
  176. package/dist/components/custom/table/data-table-export.js +0 -65
  177. package/dist/components/custom/table/data-table-footer.d.ts +0 -25
  178. package/dist/components/custom/table/data-table-footer.d.ts.map +0 -1
  179. package/dist/components/custom/table/data-table-footer.js +0 -39
  180. package/dist/components/custom/table/data-table-header.d.ts +0 -9
  181. package/dist/components/custom/table/data-table-header.d.ts.map +0 -1
  182. package/dist/components/custom/table/data-table-header.js +0 -11
  183. package/dist/components/custom/table/data-table-rows.d.ts +0 -13
  184. package/dist/components/custom/table/data-table-rows.d.ts.map +0 -1
  185. package/dist/components/custom/table/data-table-rows.js +0 -25
  186. package/dist/components/custom/table/data-table.d.ts +0 -35
  187. package/dist/components/custom/table/data-table.d.ts.map +0 -1
  188. package/dist/components/custom/table/data-table.js +0 -99
  189. package/dist/components/custom/table/types/data-table.d.ts +0 -29
  190. package/dist/components/custom/table/types/data-table.d.ts.map +0 -1
  191. package/dist/components/custom/table/types/data-table.js +0 -1
  192. package/dist/components/custom/theme-provider.d.ts +0 -24
  193. package/dist/components/custom/theme-provider.d.ts.map +0 -1
  194. package/dist/components/custom/theme-provider.js +0 -79
  195. package/dist/components/dateRangePicker.d.ts +0 -3
  196. package/dist/components/dateRangePicker.d.ts.map +0 -1
  197. package/dist/components/dateRangePicker.js +0 -15
  198. package/dist/components/dialog.d.ts +0 -23
  199. package/dist/components/dialog.d.ts.map +0 -1
  200. package/dist/components/dialog.js +0 -23
  201. package/dist/components/drawer.d.ts +0 -23
  202. package/dist/components/drawer.d.ts.map +0 -1
  203. package/dist/components/drawer.js +0 -22
  204. package/dist/components/dropdown-menu.d.ts +0 -28
  205. package/dist/components/dropdown-menu.d.ts.map +0 -1
  206. package/dist/components/dropdown-menu.js +0 -32
  207. package/dist/components/form.d.ts +0 -24
  208. package/dist/components/form.d.ts.map +0 -1
  209. package/dist/components/form.js +0 -60
  210. package/dist/components/hover-card.d.ts +0 -7
  211. package/dist/components/hover-card.d.ts.map +0 -1
  212. package/dist/components/hover-card.js +0 -9
  213. package/dist/components/input.d.ts +0 -24
  214. package/dist/components/input.d.ts.map +0 -1
  215. package/dist/components/input.js +0 -71
  216. package/dist/components/label.d.ts +0 -6
  217. package/dist/components/label.d.ts.map +0 -1
  218. package/dist/components/label.js +0 -9
  219. package/dist/components/masks.d.ts +0 -17
  220. package/dist/components/masks.d.ts.map +0 -1
  221. package/dist/components/masks.js +0 -25
  222. package/dist/components/pagination.d.ts +0 -30
  223. package/dist/components/pagination.d.ts.map +0 -1
  224. package/dist/components/pagination.js +0 -23
  225. package/dist/components/popover.d.ts +0 -7
  226. package/dist/components/popover.d.ts.map +0 -1
  227. package/dist/components/popover.js +0 -11
  228. package/dist/components/progress.d.ts +0 -5
  229. package/dist/components/progress.d.ts.map +0 -1
  230. package/dist/components/progress.js +0 -7
  231. package/dist/components/radio-group.d.ts +0 -6
  232. package/dist/components/radio-group.d.ts.map +0 -1
  233. package/dist/components/radio-group.js +0 -14
  234. package/dist/components/scroll-area.d.ts +0 -6
  235. package/dist/components/scroll-area.d.ts.map +0 -1
  236. package/dist/components/scroll-area.js +0 -11
  237. package/dist/components/select.d.ts +0 -14
  238. package/dist/components/select.d.ts.map +0 -1
  239. package/dist/components/select.js +0 -24
  240. package/dist/components/separator.d.ts +0 -5
  241. package/dist/components/separator.d.ts.map +0 -1
  242. package/dist/components/separator.js +0 -7
  243. package/dist/components/sheet.d.ts +0 -26
  244. package/dist/components/sheet.d.ts.map +0 -1
  245. package/dist/components/sheet.js +0 -37
  246. package/dist/components/sidebar.d.ts +0 -67
  247. package/dist/components/sidebar.d.ts.map +0 -1
  248. package/dist/components/sidebar.js +0 -221
  249. package/dist/components/skeleton.d.ts +0 -3
  250. package/dist/components/skeleton.d.ts.map +0 -1
  251. package/dist/components/skeleton.js +0 -6
  252. package/dist/components/slider.d.ts +0 -5
  253. package/dist/components/slider.d.ts.map +0 -1
  254. package/dist/components/slider.js +0 -7
  255. package/dist/components/switch.d.ts +0 -5
  256. package/dist/components/switch.d.ts.map +0 -1
  257. package/dist/components/switch.js +0 -7
  258. package/dist/components/table.d.ts +0 -11
  259. package/dist/components/table.d.ts.map +0 -1
  260. package/dist/components/table.js +0 -20
  261. package/dist/components/tabs.d.ts +0 -8
  262. package/dist/components/tabs.d.ts.map +0 -1
  263. package/dist/components/tabs.js +0 -12
  264. package/dist/components/textarea.d.ts +0 -4
  265. package/dist/components/textarea.d.ts.map +0 -1
  266. package/dist/components/textarea.js +0 -14
  267. package/dist/components/toast.d.ts +0 -16
  268. package/dist/components/toast.d.ts.map +0 -1
  269. package/dist/components/toast.js +0 -34
  270. package/dist/components/toaster.d.ts +0 -2
  271. package/dist/components/toaster.d.ts.map +0 -1
  272. package/dist/components/toaster.js +0 -21
  273. package/dist/components/tooltip.d.ts +0 -8
  274. package/dist/components/tooltip.d.ts.map +0 -1
  275. package/dist/components/tooltip.js +0 -10
  276. package/dist/components/ui/accordion.d.ts +0 -8
  277. package/dist/components/ui/accordion.d.ts.map +0 -1
  278. package/dist/components/ui/accordion.js +0 -13
  279. package/dist/components/ui/alert-dialog.d.ts +0 -25
  280. package/dist/components/ui/alert-dialog.d.ts.map +0 -1
  281. package/dist/components/ui/alert-dialog.js +0 -27
  282. package/dist/components/ui/alert.d.ts +0 -9
  283. package/dist/components/ui/alert.d.ts.map +0 -1
  284. package/dist/components/ui/alert.js +0 -22
  285. package/dist/components/ui/avatar.d.ts +0 -7
  286. package/dist/components/ui/avatar.d.ts.map +0 -1
  287. package/dist/components/ui/avatar.js +0 -11
  288. package/dist/components/ui/badge.d.ts +0 -10
  289. package/dist/components/ui/badge.d.ts.map +0 -1
  290. package/dist/components/ui/badge.js +0 -26
  291. package/dist/components/ui/breadcrumb.d.ts +0 -20
  292. package/dist/components/ui/breadcrumb.d.ts.map +0 -1
  293. package/dist/components/ui/breadcrumb.js +0 -23
  294. package/dist/components/ui/button.d.ts +0 -12
  295. package/dist/components/ui/button.d.ts.map +0 -1
  296. package/dist/components/ui/button.js +0 -33
  297. package/dist/components/ui/calendar.d.ts +0 -9
  298. package/dist/components/ui/calendar.d.ts.map +0 -1
  299. package/dist/components/ui/calendar.js +0 -70
  300. package/dist/components/ui/card.d.ts +0 -9
  301. package/dist/components/ui/card.d.ts.map +0 -1
  302. package/dist/components/ui/card.js +0 -16
  303. package/dist/components/ui/carousel.d.ts +0 -19
  304. package/dist/components/ui/carousel.d.ts.map +0 -1
  305. package/dist/components/ui/carousel.js +0 -98
  306. package/dist/components/ui/chart.d.ts +0 -63
  307. package/dist/components/ui/chart.d.ts.map +0 -1
  308. package/dist/components/ui/chart.js +0 -130
  309. package/dist/components/ui/checkbox.d.ts +0 -5
  310. package/dist/components/ui/checkbox.d.ts.map +0 -1
  311. package/dist/components/ui/checkbox.js +0 -8
  312. package/dist/components/ui/collapsible.d.ts +0 -6
  313. package/dist/components/ui/collapsible.d.ts.map +0 -1
  314. package/dist/components/ui/collapsible.js +0 -5
  315. package/dist/components/ui/command.d.ts +0 -81
  316. package/dist/components/ui/command.d.ts.map +0 -1
  317. package/dist/components/ui/command.js +0 -28
  318. package/dist/components/ui/context-menu.d.ts +0 -28
  319. package/dist/components/ui/context-menu.d.ts.map +0 -1
  320. package/dist/components/ui/context-menu.js +0 -33
  321. package/dist/components/ui/custom/date-picker.d.ts +0 -12
  322. package/dist/components/ui/custom/date-picker.d.ts.map +0 -1
  323. package/dist/components/ui/custom/date-picker.js +0 -35
  324. package/dist/components/ui/custom/form/checkbox.d.ts +0 -13
  325. package/dist/components/ui/custom/form/checkbox.d.ts.map +0 -1
  326. package/dist/components/ui/custom/form/checkbox.js +0 -15
  327. package/dist/components/ui/custom/form/color.d.ts +0 -15
  328. package/dist/components/ui/custom/form/color.d.ts.map +0 -1
  329. package/dist/components/ui/custom/form/color.js +0 -40
  330. package/dist/components/ui/custom/form/combobox.d.ts +0 -37
  331. package/dist/components/ui/custom/form/combobox.d.ts.map +0 -1
  332. package/dist/components/ui/custom/form/combobox.js +0 -82
  333. package/dist/components/ui/custom/form/cpf-cnpj.d.ts +0 -16
  334. package/dist/components/ui/custom/form/cpf-cnpj.d.ts.map +0 -1
  335. package/dist/components/ui/custom/form/cpf-cnpj.js +0 -32
  336. package/dist/components/ui/custom/form/currency.d.ts +0 -14
  337. package/dist/components/ui/custom/form/currency.d.ts.map +0 -1
  338. package/dist/components/ui/custom/form/currency.js +0 -15
  339. package/dist/components/ui/custom/form/date-range.d.ts +0 -16
  340. package/dist/components/ui/custom/form/date-range.d.ts.map +0 -1
  341. package/dist/components/ui/custom/form/date-range.js +0 -24
  342. package/dist/components/ui/custom/form/date.d.ts +0 -16
  343. package/dist/components/ui/custom/form/date.d.ts.map +0 -1
  344. package/dist/components/ui/custom/form/date.js +0 -35
  345. package/dist/components/ui/custom/form/decimal.d.ts +0 -14
  346. package/dist/components/ui/custom/form/decimal.d.ts.map +0 -1
  347. package/dist/components/ui/custom/form/decimal.js +0 -15
  348. package/dist/components/ui/custom/form/file.d.ts +0 -15
  349. package/dist/components/ui/custom/form/file.d.ts.map +0 -1
  350. package/dist/components/ui/custom/form/file.js +0 -18
  351. package/dist/components/ui/custom/form/form-help-text.d.ts +0 -3
  352. package/dist/components/ui/custom/form/form-help-text.d.ts.map +0 -1
  353. package/dist/components/ui/custom/form/form-help-text.js +0 -7
  354. package/dist/components/ui/custom/form/form-label.d.ts +0 -7
  355. package/dist/components/ui/custom/form/form-label.d.ts.map +0 -1
  356. package/dist/components/ui/custom/form/form-label.js +0 -9
  357. package/dist/components/ui/custom/form/form-message.d.ts +0 -5
  358. package/dist/components/ui/custom/form/form-message.d.ts.map +0 -1
  359. package/dist/components/ui/custom/form/form-message.js +0 -5
  360. package/dist/components/ui/custom/form/ghost.d.ts +0 -8
  361. package/dist/components/ui/custom/form/ghost.d.ts.map +0 -1
  362. package/dist/components/ui/custom/form/ghost.js +0 -8
  363. package/dist/components/ui/custom/form/input.d.ts +0 -18
  364. package/dist/components/ui/custom/form/input.d.ts.map +0 -1
  365. package/dist/components/ui/custom/form/input.js +0 -14
  366. package/dist/components/ui/custom/form/mask.d.ts +0 -19
  367. package/dist/components/ui/custom/form/mask.d.ts.map +0 -1
  368. package/dist/components/ui/custom/form/mask.js +0 -19
  369. package/dist/components/ui/custom/form/multi-select-old.d.ts +0 -19
  370. package/dist/components/ui/custom/form/multi-select-old.d.ts.map +0 -1
  371. package/dist/components/ui/custom/form/multi-select-old.js +0 -30
  372. package/dist/components/ui/custom/form/multi-select.d.ts +0 -26
  373. package/dist/components/ui/custom/form/multi-select.d.ts.map +0 -1
  374. package/dist/components/ui/custom/form/multi-select.js +0 -66
  375. package/dist/components/ui/custom/form/password.d.ts +0 -16
  376. package/dist/components/ui/custom/form/password.d.ts.map +0 -1
  377. package/dist/components/ui/custom/form/password.js +0 -14
  378. package/dist/components/ui/custom/form/percent.d.ts +0 -14
  379. package/dist/components/ui/custom/form/percent.d.ts.map +0 -1
  380. package/dist/components/ui/custom/form/percent.js +0 -15
  381. package/dist/components/ui/custom/form/phone.d.ts +0 -16
  382. package/dist/components/ui/custom/form/phone.d.ts.map +0 -1
  383. package/dist/components/ui/custom/form/phone.js +0 -23
  384. package/dist/components/ui/custom/form/radio-group.d.ts +0 -23
  385. package/dist/components/ui/custom/form/radio-group.d.ts.map +0 -1
  386. package/dist/components/ui/custom/form/radio-group.js +0 -15
  387. package/dist/components/ui/custom/form/select.d.ts +0 -20
  388. package/dist/components/ui/custom/form/select.d.ts.map +0 -1
  389. package/dist/components/ui/custom/form/select.js +0 -12
  390. package/dist/components/ui/custom/form/step-new-form.d.ts +0 -10
  391. package/dist/components/ui/custom/form/step-new-form.d.ts.map +0 -1
  392. package/dist/components/ui/custom/form/step-new-form.js +0 -13
  393. package/dist/components/ui/custom/form/switch.d.ts +0 -13
  394. package/dist/components/ui/custom/form/switch.d.ts.map +0 -1
  395. package/dist/components/ui/custom/form/switch.js +0 -16
  396. package/dist/components/ui/custom/form/text.d.ts +0 -18
  397. package/dist/components/ui/custom/form/text.d.ts.map +0 -1
  398. package/dist/components/ui/custom/form/text.js +0 -14
  399. package/dist/components/ui/custom/form/textarea.d.ts +0 -16
  400. package/dist/components/ui/custom/form/textarea.d.ts.map +0 -1
  401. package/dist/components/ui/custom/form/textarea.js +0 -19
  402. package/dist/components/ui/custom/form/utils.d.ts +0 -18
  403. package/dist/components/ui/custom/form/utils.d.ts.map +0 -1
  404. package/dist/components/ui/custom/form/utils.js +0 -88
  405. package/dist/components/ui/custom/header.d.ts +0 -11
  406. package/dist/components/ui/custom/header.d.ts.map +0 -1
  407. package/dist/components/ui/custom/header.js +0 -74
  408. package/dist/components/ui/custom/label.d.ts +0 -13
  409. package/dist/components/ui/custom/label.d.ts.map +0 -1
  410. package/dist/components/ui/custom/label.js +0 -20
  411. package/dist/components/ui/custom/not-found.d.ts +0 -3
  412. package/dist/components/ui/custom/not-found.d.ts.map +0 -1
  413. package/dist/components/ui/custom/not-found.js +0 -9
  414. package/dist/components/ui/custom/sidebar/app-sidebar.d.ts +0 -5
  415. package/dist/components/ui/custom/sidebar/app-sidebar.d.ts.map +0 -1
  416. package/dist/components/ui/custom/sidebar/app-sidebar.js +0 -26
  417. package/dist/components/ui/custom/sidebar/module-switcher.d.ts +0 -9
  418. package/dist/components/ui/custom/sidebar/module-switcher.d.ts.map +0 -1
  419. package/dist/components/ui/custom/sidebar/module-switcher.js +0 -55
  420. package/dist/components/ui/custom/sidebar/nav-footer.d.ts +0 -7
  421. package/dist/components/ui/custom/sidebar/nav-footer.d.ts.map +0 -1
  422. package/dist/components/ui/custom/sidebar/nav-footer.js +0 -13
  423. package/dist/components/ui/custom/sidebar/nav-main.d.ts +0 -7
  424. package/dist/components/ui/custom/sidebar/nav-main.d.ts.map +0 -1
  425. package/dist/components/ui/custom/sidebar/nav-main.js +0 -27
  426. package/dist/components/ui/custom/sidebar/nav-submenu-collapsible.d.ts +0 -9
  427. package/dist/components/ui/custom/sidebar/nav-submenu-collapsible.d.ts.map +0 -1
  428. package/dist/components/ui/custom/sidebar/nav-submenu-collapsible.js +0 -18
  429. package/dist/components/ui/custom/sidebar/nav-submenu-dropdown.d.ts +0 -10
  430. package/dist/components/ui/custom/sidebar/nav-submenu-dropdown.d.ts.map +0 -1
  431. package/dist/components/ui/custom/sidebar/nav-submenu-dropdown.js +0 -10
  432. package/dist/components/ui/custom/sidebar/nav-user.d.ts +0 -9
  433. package/dist/components/ui/custom/sidebar/nav-user.d.ts.map +0 -1
  434. package/dist/components/ui/custom/sidebar/nav-user.js +0 -24
  435. package/dist/components/ui/custom/sidebar/sidebar-button.d.ts +0 -9
  436. package/dist/components/ui/custom/sidebar/sidebar-button.d.ts.map +0 -1
  437. package/dist/components/ui/custom/sidebar/sidebar-button.js +0 -7
  438. package/dist/components/ui/custom/sidebar/sidebar-item-two-lines.d.ts +0 -12
  439. package/dist/components/ui/custom/sidebar/sidebar-item-two-lines.d.ts.map +0 -1
  440. package/dist/components/ui/custom/sidebar/sidebar-item-two-lines.js +0 -5
  441. package/dist/components/ui/custom/sidebar/sidebar-item.d.ts +0 -9
  442. package/dist/components/ui/custom/sidebar/sidebar-item.d.ts.map +0 -1
  443. package/dist/components/ui/custom/sidebar/sidebar-item.js +0 -7
  444. package/dist/components/ui/custom/sidebar/sidebar-module-switcher.d.ts +0 -9
  445. package/dist/components/ui/custom/sidebar/sidebar-module-switcher.d.ts.map +0 -1
  446. package/dist/components/ui/custom/sidebar/sidebar-module-switcher.js +0 -20
  447. package/dist/components/ui/custom/sidebar/types/sidebar.d.ts +0 -29
  448. package/dist/components/ui/custom/sidebar/types/sidebar.d.ts.map +0 -1
  449. package/dist/components/ui/custom/sidebar/types/sidebar.js +0 -5
  450. package/dist/components/ui/custom/table/data-table-export.d.ts +0 -8
  451. package/dist/components/ui/custom/table/data-table-export.d.ts.map +0 -1
  452. package/dist/components/ui/custom/table/data-table-export.js +0 -65
  453. package/dist/components/ui/custom/table/data-table-footer.d.ts +0 -25
  454. package/dist/components/ui/custom/table/data-table-footer.d.ts.map +0 -1
  455. package/dist/components/ui/custom/table/data-table-footer.js +0 -39
  456. package/dist/components/ui/custom/table/data-table-header.d.ts +0 -9
  457. package/dist/components/ui/custom/table/data-table-header.d.ts.map +0 -1
  458. package/dist/components/ui/custom/table/data-table-header.js +0 -11
  459. package/dist/components/ui/custom/table/data-table-rows.d.ts +0 -13
  460. package/dist/components/ui/custom/table/data-table-rows.d.ts.map +0 -1
  461. package/dist/components/ui/custom/table/data-table-rows.js +0 -25
  462. package/dist/components/ui/custom/table/data-table.d.ts +0 -35
  463. package/dist/components/ui/custom/table/data-table.d.ts.map +0 -1
  464. package/dist/components/ui/custom/table/data-table.js +0 -99
  465. package/dist/components/ui/custom/table/types/data-table.d.ts +0 -29
  466. package/dist/components/ui/custom/table/types/data-table.d.ts.map +0 -1
  467. package/dist/components/ui/custom/table/types/data-table.js +0 -1
  468. package/dist/components/ui/custom/theme-provider.d.ts +0 -24
  469. package/dist/components/ui/custom/theme-provider.d.ts.map +0 -1
  470. package/dist/components/ui/custom/theme-provider.js +0 -79
  471. package/dist/components/ui/dateRangePicker.d.ts +0 -3
  472. package/dist/components/ui/dateRangePicker.d.ts.map +0 -1
  473. package/dist/components/ui/dateRangePicker.js +0 -15
  474. package/dist/components/ui/dialog.d.ts +0 -23
  475. package/dist/components/ui/dialog.d.ts.map +0 -1
  476. package/dist/components/ui/dialog.js +0 -23
  477. package/dist/components/ui/drawer.d.ts +0 -23
  478. package/dist/components/ui/drawer.d.ts.map +0 -1
  479. package/dist/components/ui/drawer.js +0 -22
  480. package/dist/components/ui/dropdown-menu.d.ts +0 -28
  481. package/dist/components/ui/dropdown-menu.d.ts.map +0 -1
  482. package/dist/components/ui/dropdown-menu.js +0 -32
  483. package/dist/components/ui/form.d.ts +0 -24
  484. package/dist/components/ui/form.d.ts.map +0 -1
  485. package/dist/components/ui/form.js +0 -60
  486. package/dist/components/ui/hover-card.d.ts +0 -7
  487. package/dist/components/ui/hover-card.d.ts.map +0 -1
  488. package/dist/components/ui/hover-card.js +0 -9
  489. package/dist/components/ui/input.d.ts +0 -24
  490. package/dist/components/ui/input.d.ts.map +0 -1
  491. package/dist/components/ui/input.js +0 -71
  492. package/dist/components/ui/label.d.ts +0 -6
  493. package/dist/components/ui/label.d.ts.map +0 -1
  494. package/dist/components/ui/label.js +0 -9
  495. package/dist/components/ui/masks.d.ts +0 -17
  496. package/dist/components/ui/masks.d.ts.map +0 -1
  497. package/dist/components/ui/masks.js +0 -25
  498. package/dist/components/ui/pagination.d.ts +0 -30
  499. package/dist/components/ui/pagination.d.ts.map +0 -1
  500. package/dist/components/ui/pagination.js +0 -23
  501. package/dist/components/ui/popover.d.ts +0 -7
  502. package/dist/components/ui/popover.d.ts.map +0 -1
  503. package/dist/components/ui/popover.js +0 -11
  504. package/dist/components/ui/progress.d.ts +0 -5
  505. package/dist/components/ui/progress.d.ts.map +0 -1
  506. package/dist/components/ui/progress.js +0 -7
  507. package/dist/components/ui/radio-group.d.ts +0 -6
  508. package/dist/components/ui/radio-group.d.ts.map +0 -1
  509. package/dist/components/ui/radio-group.js +0 -14
  510. package/dist/components/ui/scroll-area.d.ts +0 -6
  511. package/dist/components/ui/scroll-area.d.ts.map +0 -1
  512. package/dist/components/ui/scroll-area.js +0 -11
  513. package/dist/components/ui/select.d.ts +0 -14
  514. package/dist/components/ui/select.d.ts.map +0 -1
  515. package/dist/components/ui/select.js +0 -24
  516. package/dist/components/ui/separator.d.ts +0 -5
  517. package/dist/components/ui/separator.d.ts.map +0 -1
  518. package/dist/components/ui/separator.js +0 -7
  519. package/dist/components/ui/sheet.d.ts +0 -26
  520. package/dist/components/ui/sheet.d.ts.map +0 -1
  521. package/dist/components/ui/sheet.js +0 -37
  522. package/dist/components/ui/sidebar.d.ts +0 -67
  523. package/dist/components/ui/sidebar.d.ts.map +0 -1
  524. package/dist/components/ui/sidebar.js +0 -221
  525. package/dist/components/ui/skeleton.d.ts +0 -3
  526. package/dist/components/ui/skeleton.d.ts.map +0 -1
  527. package/dist/components/ui/skeleton.js +0 -6
  528. package/dist/components/ui/slider.d.ts +0 -5
  529. package/dist/components/ui/slider.d.ts.map +0 -1
  530. package/dist/components/ui/slider.js +0 -7
  531. package/dist/components/ui/switch.d.ts +0 -5
  532. package/dist/components/ui/switch.d.ts.map +0 -1
  533. package/dist/components/ui/switch.js +0 -7
  534. package/dist/components/ui/table.d.ts +0 -11
  535. package/dist/components/ui/table.d.ts.map +0 -1
  536. package/dist/components/ui/table.js +0 -20
  537. package/dist/components/ui/tabs.d.ts +0 -8
  538. package/dist/components/ui/tabs.d.ts.map +0 -1
  539. package/dist/components/ui/tabs.js +0 -12
  540. package/dist/components/ui/textarea.d.ts +0 -4
  541. package/dist/components/ui/textarea.d.ts.map +0 -1
  542. package/dist/components/ui/textarea.js +0 -14
  543. package/dist/components/ui/toast.d.ts +0 -16
  544. package/dist/components/ui/toast.d.ts.map +0 -1
  545. package/dist/components/ui/toast.js +0 -34
  546. package/dist/components/ui/toaster.d.ts +0 -2
  547. package/dist/components/ui/toaster.d.ts.map +0 -1
  548. package/dist/components/ui/toaster.js +0 -21
  549. package/dist/components/ui/tooltip.d.ts +0 -8
  550. package/dist/components/ui/tooltip.d.ts.map +0 -1
  551. package/dist/components/ui/tooltip.js +0 -10
  552. package/dist/components/ui/use-calendar.d.ts +0 -7
  553. package/dist/components/ui/use-calendar.d.ts.map +0 -1
  554. package/dist/components/ui/use-calendar.js +0 -23
  555. package/dist/components/ui/use-toast.d.ts +0 -46
  556. package/dist/components/ui/use-toast.d.ts.map +0 -1
  557. package/dist/components/ui/use-toast.js +0 -125
  558. package/dist/components/use-calendar.d.ts +0 -7
  559. package/dist/components/use-calendar.d.ts.map +0 -1
  560. package/dist/components/use-calendar.js +0 -23
  561. package/dist/components/use-toast.d.ts +0 -46
  562. package/dist/components/use-toast.d.ts.map +0 -1
  563. package/dist/components/use-toast.js +0 -125
  564. package/dist/hooks/use-mobile.d.ts +0 -2
  565. package/dist/hooks/use-mobile.d.ts.map +0 -1
  566. package/dist/hooks/use-mobile.js +0 -15
  567. package/dist/index.d.ts.map +0 -1
  568. package/dist/lib/help/date-utils.d.ts +0 -7
  569. package/dist/lib/help/date-utils.d.ts.map +0 -1
  570. package/dist/lib/help/date-utils.js +0 -34
  571. package/dist/lib/help/format.d.ts +0 -22
  572. package/dist/lib/help/format.d.ts.map +0 -1
  573. package/dist/lib/help/format.js +0 -140
  574. package/dist/lib/help/theme.d.ts +0 -291
  575. package/dist/lib/help/theme.d.ts.map +0 -1
  576. package/dist/lib/help/theme.js +0 -340
  577. package/dist/lib/help/uuid.d.ts +0 -2
  578. package/dist/lib/help/uuid.d.ts.map +0 -1
  579. package/dist/lib/help/uuid.js +0 -4
  580. package/dist/lib/utils.d.ts +0 -3
  581. package/dist/lib/utils.d.ts.map +0 -1
  582. package/dist/lib/utils.js +0 -5
@@ -1,82 +0,0 @@
1
- import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
- import { Button } from '@/components/ui/button';
3
- import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList } from '@/components/ui/command';
4
- import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';
5
- import { cn } from '@/lib/utils';
6
- import { Check, ChevronsUpDown, LoaderCircle, X } from 'lucide-react';
7
- import { useEffect, useState } from 'react';
8
- import * as FormComponents from '../../form';
9
- import { formHelpText } from './form-help-text';
10
- import { formLabelAndSubLabel } from './form-label';
11
- import { formMessage } from './form-message';
12
- export const FormCombobox = ({ control, name, label, subLabel, helpText, placeholder, className, disabled, required, options, selectedOption, iconLeft, iconRight, addEmptyOption, canUnselect = false, closePopUpOnChange = true, runInternalSearch = true, disabledSearch = false, onChange, onSearch, footerAction, }) => {
13
- const { FormField, FormItem, FormLabel, FormControl, FormMessage } = FormComponents;
14
- const [open, setOpen] = useState(false);
15
- const [loading, setLoading] = useState(false);
16
- const [searchString, setSearchString] = useState('');
17
- const DEFAULT_PLACEHOLDER = 'Digite para buscar...';
18
- useEffect(() => {
19
- setLoading(false);
20
- }, [options]);
21
- const getOptions = () => {
22
- if (options.length === 0) {
23
- return [];
24
- }
25
- let filteredOptions = options;
26
- if (runInternalSearch) {
27
- filteredOptions = options.filter((option) => {
28
- const title = option.title
29
- .toLowerCase()
30
- .normalize('NFD')
31
- .replace(/[^a-z0-9\s]/gi, '');
32
- const subTitle = option.subTitle
33
- ?.toLowerCase()
34
- .normalize('NFD')
35
- .replace(/[^a-z0-9\s]/gi, '');
36
- const search = searchString
37
- .toLowerCase()
38
- .normalize('NFD')
39
- .replace(/[^a-z0-9\s]/gi, '');
40
- return title.includes(search) || subTitle?.includes(search);
41
- });
42
- }
43
- if (addEmptyOption) {
44
- filteredOptions.unshift({ value: undefined, title: '--Selecione--', subTitle: '' });
45
- }
46
- return filteredOptions;
47
- };
48
- const getSelectedOption = (value) => {
49
- const option = options.find((option) => option.value === value);
50
- if (option) {
51
- return option;
52
- }
53
- return selectedOption;
54
- };
55
- const handleSelect = (value, field) => {
56
- const option = value ? getSelectedOption(value) : undefined;
57
- if (canUnselect) {
58
- field.onChange(field.value === value ? undefined : value);
59
- }
60
- else {
61
- field.onChange(value);
62
- }
63
- if (onChange) {
64
- onChange(option);
65
- }
66
- if (closePopUpOnChange) {
67
- setOpen(false);
68
- }
69
- };
70
- const handleKeyUp = (event) => {
71
- const searchString = event.target.value;
72
- if (onSearch) {
73
- setLoading(true);
74
- onSearch(searchString);
75
- }
76
- setSearchString(searchString);
77
- };
78
- return (_jsx(FormField, { control: control, name: name, render: ({ field, formState }) => (_jsxs(FormItem, { className: className, children: [_jsxs("div", { className: 'flex items-center space-x-1.5', children: [label && formLabelAndSubLabel(FormLabel, label, subLabel, required), helpText && formHelpText(helpText)] }), _jsxs(Popover, { open: open, onOpenChange: (open) => {
79
- if (!disabled)
80
- setOpen(open);
81
- }, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsx(FormControl, { children: _jsx("div", { className: cn(`rounded-sm outline-none ${open ? 'ring-2 ring-ring ring-offset-2' : 'ring-0'}`, className), children: _jsxs(Button, { type: 'button', variant: 'outline', role: 'combobox', "aria-expanded": open, className: cn('justify-between disabled:border-disabled disabled:cursor-not-allowed disabled:opacity-50', formState.errors[name] ? 'border-red-600' : '', className), disabled: disabled || formState.isSubmitting, children: [iconLeft, _jsx("div", { className: 'grid flex-1 text-left text-sm leading-tight', children: _jsx("span", { className: 'truncate font-normal', children: getSelectedOption(field.value) ? (_jsxs("div", { className: 'flex gap-2', children: [getSelectedOption(field.value)?.icon, getSelectedOption(field.value)?.title] })) : (_jsx("span", { className: 'text-zinc-500', children: placeholder ?? DEFAULT_PLACEHOLDER })) }) }), iconRight ?? _jsx(ChevronsUpDown, { size: 20, className: 'stroke-zinc-500' })] }) }) }) }), _jsxs(PopoverContent, { className: cn('p-0', className, 'w-[--radix-popover-trigger-width]'), children: [_jsxs(Command, { shouldFilter: false, children: [!disabledSearch && _jsx(CommandInput, { placeholder: placeholder ?? DEFAULT_PLACEHOLDER, onKeyUp: handleKeyUp }), _jsxs(CommandList, { children: [_jsx(CommandEmpty, { className: 'flex flex-col justify-between items-center p-3 font-normal text-sm', children: loading ? (_jsx(LoaderCircle, { size: 16, className: 'text-sidebar-foreground animate-spin mr-2' })) : getOptions()?.length === 0 && (searchString !== '' || disabledSearch) ? ('Nenhum resultado encontrado') : ('Utilize o campo de busca acima') }), options.length > 0 && (_jsx(CommandGroup, { children: getOptions().map((option) => (_jsxs(CommandItem, { value: option.value, className: 'group', onSelect: () => handleSelect(option.value, field), children: [_jsxs("div", { className: cn('grid flex-1 text-left text-sm leading-tight', option.className), children: [_jsxs("div", { className: 'flex gap-2', children: [option.icon, _jsx("span", { className: 'truncate font-normal', children: option.title })] }), _jsx("span", { className: 'truncate text-xs text-zinc-500', children: option.subTitle })] }), _jsxs("div", { className: `ml-auto text-zinc-500 ${field.value === option.value ? 'opacity-100' : 'opacity-0'}`, children: [_jsx(Check, { className: cn('flex', canUnselect && 'group-hover:hidden hover:hidden'), size: 16 }), _jsx(X, { className: cn('hidden', canUnselect && 'group-hover:flex hover:flex'), size: 16 })] })] }, `key-opt-${option.value}`))) }))] })] }), footerAction && (_jsx("div", { className: 'grid w-full p-1 border-t', children: _jsxs(Button, { type: 'button', variant: 'ghost', className: 'h-8', onClick: () => footerAction.onClick(), children: [footerAction.icon, footerAction.label] }) }))] })] }), formMessage(FormMessage)] })) }));
82
- };
@@ -1,16 +0,0 @@
1
- interface Props {
2
- control: any;
3
- name: string;
4
- label: string;
5
- subLabel?: string;
6
- helpText?: JSX.Element;
7
- placeholder?: string;
8
- className?: string;
9
- disabled?: boolean;
10
- required?: boolean;
11
- onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
12
- onKeyUp?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
13
- }
14
- export declare const FormInputCpfCnpj: React.FC<Props>;
15
- export {};
16
- //# sourceMappingURL=cpf-cnpj.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cpf-cnpj.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/custom/form/cpf-cnpj.tsx"],"names":[],"mappings":"AAOA,UAAU,KAAK;IACd,OAAO,EAAE,GAAG,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAChE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CACjE;AAID,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CA6D5C,CAAC"}
@@ -1,32 +0,0 @@
1
- import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
- import { MaskInputCpfCnpj } from '@/components/ui/input';
3
- import { useState } from 'react';
4
- import * as FormComponents from '../../form';
5
- import { formHelpText } from './form-help-text';
6
- import { formLabelAndSubLabel } from './form-label';
7
- import { formMessage } from './form-message';
8
- const masks = ['999.999.999-999', '99.999.999/9999-99'];
9
- export const FormInputCpfCnpj = ({ control, name, label, subLabel, helpText, placeholder, className, disabled, required, onChange, onKeyUp, }) => {
10
- const { FormField, FormItem, FormLabel, FormControl, FormMessage } = FormComponents;
11
- const [mask, setMask] = useState(masks[0]);
12
- const handleMaskChange = (value) => {
13
- const numericValue = value.replace(/\D/g, '');
14
- if (numericValue.length > 11) {
15
- setMask(masks[1]);
16
- }
17
- else {
18
- setMask(masks[0]);
19
- }
20
- };
21
- return (_jsx(FormField, { control: control, name: name, render: ({ field, formState }) => (_jsxs(FormItem, { className: className, children: [_jsxs("div", { className: 'flex items-center space-x-1.5', children: [label && formLabelAndSubLabel(FormLabel, label, subLabel, required), helpText && formHelpText(helpText)] }), _jsx(FormControl, { children: _jsx(MaskInputCpfCnpj, { ...field, className: `${className}`, placeholder: placeholder, disabled: disabled || formState.isSubmitting, mask: mask, onChange: (e) => {
22
- field.onChange(e);
23
- handleMaskChange(e.target.value);
24
- if (onChange) {
25
- onChange(e);
26
- }
27
- }, onKeyUp: (e) => {
28
- if (onKeyUp) {
29
- onKeyUp(e);
30
- }
31
- } }) }), formMessage(FormMessage)] })) }));
32
- };
@@ -1,14 +0,0 @@
1
- interface Props {
2
- control: any;
3
- name: string;
4
- label: string;
5
- subLabel?: string;
6
- helpText?: JSX.Element;
7
- className?: string;
8
- disabled?: boolean;
9
- required?: boolean;
10
- onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
11
- }
12
- export declare const FormInputCurrency: React.FC<Props>;
13
- export {};
14
- //# sourceMappingURL=currency.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"currency.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/custom/form/currency.tsx"],"names":[],"mappings":"AAMA,UAAU,KAAK;IACd,OAAO,EAAE,GAAG,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CAChE;AAED,eAAO,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAgC7C,CAAC"}
@@ -1,15 +0,0 @@
1
- import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
- import { MaskInputDecimal } from '@/components/ui/input';
3
- import * as FormComponents from '../../form';
4
- import { formHelpText } from './form-help-text';
5
- import { formLabelAndSubLabel } from './form-label';
6
- import { formMessage } from './form-message';
7
- export const FormInputCurrency = ({ control, name, label, subLabel, helpText, className, disabled, required, onChange }) => {
8
- const { FormField, FormItem, FormLabel, FormControl, FormMessage } = FormComponents;
9
- return (_jsx(FormField, { control: control, name: name, render: ({ field, formState }) => (_jsxs(FormItem, { className: className, children: [_jsxs("div", { className: 'flex items-center space-x-1.5', children: [label && formLabelAndSubLabel(FormLabel, label, subLabel, required), helpText && formHelpText(helpText)] }), _jsx(FormControl, { children: _jsx(MaskInputDecimal, { ...field, symbol: 'R$', className: `${className}`, disabled: disabled || formState.isSubmitting, onChange: (e) => {
10
- field.onChange(e);
11
- if (onChange) {
12
- onChange(e);
13
- }
14
- } }) }), formMessage(FormMessage)] })) }));
15
- };
@@ -1,16 +0,0 @@
1
- import { DateRange } from 'react-day-picker';
2
- interface Props {
3
- control: any;
4
- name: string;
5
- label: string;
6
- subLabel?: string;
7
- helpText?: JSX.Element;
8
- placeholder?: string;
9
- className?: string;
10
- disabled?: boolean;
11
- required?: boolean;
12
- onChange?: (event: React.ChangeEvent<HTMLInputElement> | DateRange | undefined) => void;
13
- }
14
- export declare const FormDataRange: React.FC<Props>;
15
- export {};
16
- //# sourceMappingURL=date-range.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"date-range.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/custom/form/date-range.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAU7C,UAAU,KAAK;IACd,OAAO,EAAE,GAAG,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,GAAG,SAAS,GAAG,SAAS,KAAK,IAAI,CAAC;CACxF;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAmFzC,CAAC"}
@@ -1,24 +0,0 @@
1
- import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { Button } from '@/components/ui/button';
3
- import { Calendar } from '@/components/ui/calendar';
4
- import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';
5
- import { cn } from '@/lib/utils';
6
- import { format } from 'date-fns';
7
- import { CalendarIcon } from 'lucide-react';
8
- import { useState } from 'react';
9
- import * as FormComponents from '../../form';
10
- import { formHelpText } from './form-help-text';
11
- import { formLabelAndSubLabel } from './form-label';
12
- import { formMessage } from './form-message';
13
- export const FormDataRange = ({ control, name, label, subLabel, helpText, placeholder, className, disabled, required, onChange, }) => {
14
- const { FormField, FormItem, FormLabel, FormControl, FormMessage } = FormComponents;
15
- // const [date, setDate] = useState<DateRange | undefined>(field.value);
16
- const [open, setOpen] = useState(false);
17
- const handleDateChange = (newDate, field) => {
18
- // setDate(newDate);
19
- field.onChange(newDate);
20
- if (onChange)
21
- onChange(newDate);
22
- };
23
- return (_jsx(FormField, { control: control, name: name, render: ({ field, formState }) => (_jsxs(FormItem, { className: className, children: [_jsxs("div", { className: 'flex items-center space-x-1.5', children: [label && formLabelAndSubLabel(FormLabel, label, subLabel, required), helpText && formHelpText(helpText)] }), _jsx(FormControl, { children: _jsxs(Popover, { open: open, onOpenChange: setOpen, children: [_jsx(PopoverTrigger, { asChild: true, className: 'w-full', children: _jsx("div", { className: ` rounded-sm outline-none ${open ? 'ring-2 ring-ring ring-offset-2' : 'ring-0'}`, children: _jsxs(Button, { type: 'button', variant: 'outline', role: 'combobox', "aria-expanded": open, className: cn(` ${className} justify-start disabled:border-disabled disabled:cursor-not-allowed disabled:opacity-50`, formState.errors[name] ? 'border-red-600' : ''), disabled: disabled || formState.isSubmitting, children: [_jsx(CalendarIcon, { className: 'text-zinc-500' }), field.value?.from ? (field.value?.to ? (_jsxs(_Fragment, { children: [format(field.value?.from, 'dd/MM/yyyy'), " - ", format(field.value?.to, 'dd/MM/yyyy')] })) : (format(field.value?.from, 'dd/MM/yyyy'))) : (_jsx("span", { className: 'font-normal text-zinc-500', children: "Escolha um Per\u00EDodo" }))] }) }) }), _jsx(PopoverContent, { className: 'flex w-auto p-0', align: 'start', children: _jsx("div", { className: 'flex flex-row space-x-4', children: _jsx(Calendar, { initialFocus: true, mode: 'range', defaultMonth: field.value?.from, selected: field.value, numberOfMonths: 2, className: 'flex', onSelect: (newDate) => handleDateChange(newDate, field) }) }) })] }) }), formMessage(FormMessage)] })) }));
24
- };
@@ -1,16 +0,0 @@
1
- interface Props {
2
- control: any;
3
- name: string;
4
- label: string;
5
- subLabel?: string;
6
- helpText?: JSX.Element;
7
- placeholder?: string;
8
- className?: string;
9
- disabled?: boolean;
10
- required?: boolean;
11
- onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
12
- onKeyUp?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
13
- }
14
- export declare const FormInputDate: React.FC<Props>;
15
- export {};
16
- //# sourceMappingURL=date.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/custom/form/date.tsx"],"names":[],"mappings":"AAaA,UAAU,KAAK;IACd,OAAO,EAAE,GAAG,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAChE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CACjE;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAiFzC,CAAC"}
@@ -1,35 +0,0 @@
1
- import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
- import { Calendar } from '@/components/ui/calendar';
3
- import { MaskInput } from '@/components/ui/input';
4
- import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover';
5
- import { stringToDate } from '@/lib/help/date-utils';
6
- import { cn } from '@/lib/utils';
7
- import { ptBR } from 'date-fns/locale';
8
- import { CalendarIcon } from 'lucide-react';
9
- import { useState } from 'react';
10
- import * as FormComponents from '../../form';
11
- import { formHelpText } from './form-help-text';
12
- import { formLabelAndSubLabel } from './form-label';
13
- import { formMessage } from './form-message';
14
- export const FormInputDate = ({ control, name, label, subLabel, helpText, placeholder = '01/01/2023', className, disabled, required, onChange, onKeyUp, }) => {
15
- const { FormField, FormItem, FormLabel, FormControl, FormMessage } = FormComponents;
16
- const [open, setOpen] = useState(false);
17
- return (_jsx(FormField, { control: control, name: name, render: ({ field, formState }) => (_jsxs(FormItem, { className: className, children: [_jsxs("div", { className: 'flex items-center space-x-1.5', children: [label && formLabelAndSubLabel(FormLabel, label, subLabel, required), helpText && formHelpText(helpText)] }), _jsx(FormControl, { children: _jsxs("div", { className: 'relative w-full', children: [_jsx(MaskInput, { ...field, mask: '99/99/9999', maskPlaceholder: null, placeholder: placeholder, disabled: disabled || formState.isSubmitting, className: cn('pl-9', className), onChange: (e) => {
18
- field.onChange(e);
19
- if (onChange) {
20
- onChange(e);
21
- }
22
- }, onKeyUp: (e) => {
23
- if (onKeyUp) {
24
- onKeyUp(e);
25
- }
26
- } }), _jsx("div", { className: 'absolute left-3 top-1/2 -translate-y-1/2 cursor-pointer', children: _jsxs(Popover, { open: open, onOpenChange: setOpen, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsx(CalendarIcon, { size: 16, className: 'cursor-pointer text-gray-500' }) }), _jsx(PopoverContent, { className: 'w-[250px] p-0', align: 'start', children: _jsx(Calendar, { mode: 'single', locale: ptBR, required: true, selected: stringToDate(field.value) ?? new Date(), onSelect: (date) => {
27
- field.onChange(date ? date.toLocaleDateString('pt-BR') : '');
28
- if (onChange) {
29
- onChange({
30
- target: { value: date ? date.toLocaleDateString('pt-BR') : '' },
31
- });
32
- }
33
- setOpen(false);
34
- }, className: 'rounded-md', captionLayout: 'dropdown' }) })] }) })] }) }), formMessage(FormMessage)] })) }));
35
- };
@@ -1,14 +0,0 @@
1
- interface Props {
2
- control: any;
3
- name: string;
4
- label: string;
5
- subLabel?: string;
6
- helpText?: JSX.Element;
7
- className?: string;
8
- disabled?: boolean;
9
- required?: boolean;
10
- onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
11
- }
12
- export declare const FormInputDecimal: React.FC<Props>;
13
- export {};
14
- //# sourceMappingURL=decimal.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"decimal.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/custom/form/decimal.tsx"],"names":[],"mappings":"AAMA,UAAU,KAAK;IACd,OAAO,EAAE,GAAG,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CAChE;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CA+B5C,CAAC"}
@@ -1,15 +0,0 @@
1
- import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
- import { MaskInputDecimal } from '@/components/ui/input';
3
- import * as FormComponents from '../../form';
4
- import { formHelpText } from './form-help-text';
5
- import { formLabelAndSubLabel } from './form-label';
6
- import { formMessage } from './form-message';
7
- export const FormInputDecimal = ({ control, name, label, subLabel, helpText, className, disabled, required, onChange }) => {
8
- const { FormField, FormItem, FormLabel, FormControl, FormMessage } = FormComponents;
9
- return (_jsx(FormField, { control: control, name: name, render: ({ field, formState }) => (_jsxs(FormItem, { className: className, children: [_jsxs("div", { className: 'flex items-center space-x-1.5', children: [label && formLabelAndSubLabel(FormLabel, label, subLabel, required), helpText && formHelpText(helpText)] }), _jsx(FormControl, { children: _jsx(MaskInputDecimal, { ...field, className: `${className}`, disabled: disabled || formState.isSubmitting, onChange: (e) => {
10
- field.onChange(e);
11
- if (onChange) {
12
- onChange(e);
13
- }
14
- } }) }), formMessage(FormMessage)] })) }));
15
- };
@@ -1,15 +0,0 @@
1
- interface Props {
2
- control: any;
3
- name: string;
4
- label: string;
5
- subLabel?: string;
6
- helpText?: JSX.Element;
7
- placeholder?: string;
8
- className?: string;
9
- disabled?: boolean;
10
- required?: boolean;
11
- onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
12
- }
13
- export declare const FormInputFile: React.FC<Props>;
14
- export {};
15
- //# sourceMappingURL=file.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/custom/form/file.tsx"],"names":[],"mappings":"AAOA,UAAU,KAAK;IACd,OAAO,EAAE,GAAG,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CAChE;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CA4CzC,CAAC"}
@@ -1,18 +0,0 @@
1
- import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
- import { InputFile } from '@/components/ui/input';
3
- import { useState } from 'react';
4
- import * as FormComponents from '../../form';
5
- import { formHelpText } from './form-help-text';
6
- import { formLabelAndSubLabel } from './form-label';
7
- import { formMessage } from './form-message';
8
- export const FormInputFile = ({ control, name, label, subLabel, helpText, placeholder, className, disabled, required, onChange, }) => {
9
- const { FormField, FormItem, FormLabel, FormControl, FormMessage } = FormComponents;
10
- const [value, setValue] = useState('');
11
- return (_jsx(FormField, { control: control, name: name, render: ({ field, formState }) => (_jsxs(FormItem, { className: className, children: [_jsxs("div", { className: 'flex items-center space-x-1.5', children: [label && formLabelAndSubLabel(FormLabel, label, subLabel, required), helpText && formHelpText(helpText)] }), _jsx(FormControl, { children: _jsx(InputFile, { value: value, placeholder: placeholder, disabled: disabled || formState.isSubmitting, onChange: (e) => {
12
- if (onChange) {
13
- onChange(e);
14
- }
15
- setValue(e.target.value);
16
- field.onChange(e.target.files);
17
- } }) }), formMessage(FormMessage)] })) }));
18
- };
@@ -1,3 +0,0 @@
1
- declare const formHelpText: (helpText: JSX.Element) => import("react/jsx-runtime").JSX.Element;
2
- export { formHelpText };
3
- //# sourceMappingURL=form-help-text.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"form-help-text.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/custom/form/form-help-text.tsx"],"names":[],"mappings":"AAGA,QAAA,MAAM,YAAY,GAAI,UAAU,GAAG,CAAC,OAAO,4CAa1C,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,CAAC"}
@@ -1,7 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip';
3
- import { CircleHelp } from 'lucide-react';
4
- const formHelpText = (helpText) => {
5
- return (_jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { className: 'pb-2', children: _jsx(CircleHelp, { size: 16, className: 'text-muted' }) }), _jsx(TooltipContent, { className: 'text-white bg-background-primary', align: 'start', children: helpText })] }) }));
6
- };
7
- export { formHelpText };
@@ -1,7 +0,0 @@
1
- import * as LabelPrimitive from '@radix-ui/react-label';
2
- import React from 'react';
3
- type FormLabelComponent = React.ForwardRefExoticComponent<React.ComponentPropsWithoutRef<typeof LabelPrimitive.Root> & React.RefAttributes<React.ElementRef<typeof LabelPrimitive.Root>>>;
4
- declare const formLabel: (FormLabel: FormLabelComponent, label: string) => import("react/jsx-runtime").JSX.Element;
5
- declare const formLabelAndSubLabel: (FormLabel: FormLabelComponent, label: string, subLabel?: string, required?: boolean | undefined, className?: string) => import("react/jsx-runtime").JSX.Element;
6
- export { formLabel, formLabelAndSubLabel };
7
- //# sourceMappingURL=form-label.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"form-label.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/custom/form/form-label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,KAAK,kBAAkB,GAAG,KAAK,CAAC,yBAAyB,CAAC,KAAK,CAAC,wBAAwB,CAAC,OAAO,cAAc,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAE1L,QAAA,MAAM,SAAS,GAAI,WAAW,kBAAkB,EAAE,OAAO,MAAM,4CAE9D,CAAC;AAEF,QAAA,MAAM,oBAAoB,GAAI,WAAW,kBAAkB,EAAE,OAAO,MAAM,EAAE,WAAW,MAAM,EAAE,WAAW,OAAO,GAAG,SAAS,EAAE,YAAY,MAAM,4CAUhJ,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,CAAC"}
@@ -1,9 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { cn } from '@/lib/utils';
3
- const formLabel = (FormLabel, label) => {
4
- return _jsx(FormLabel, { className: 'text-default font-medium text-sm h-5', children: label });
5
- };
6
- const formLabelAndSubLabel = (FormLabel, label, subLabel, required, className) => {
7
- return (_jsxs("div", { className: cn('flex flex-col pb-2', className), children: [_jsxs("div", { className: 'flex gap-1', children: [formLabel(FormLabel, label), required && _jsx(FormLabel, { className: 'text-red-600 font-medium text-sm', children: "*" })] }), subLabel && _jsx(FormLabel, { className: 'text-default font-normal pt-1', children: subLabel })] }));
8
- };
9
- export { formLabel, formLabelAndSubLabel };
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- type FormMessageComponent = React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
3
- declare const formMessage: (FormMessage: FormMessageComponent) => import("react/jsx-runtime").JSX.Element;
4
- export { formMessage };
5
- //# sourceMappingURL=form-message.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"form-message.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/custom/form/form-message.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,KAAK,oBAAoB,GAAG,KAAK,CAAC,yBAAyB,CAAC,KAAK,CAAC,cAAc,CAAC,oBAAoB,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,oBAAoB,CAAC,CAAC,CAAC;AAEpJ,QAAA,MAAM,WAAW,GAAI,aAAa,oBAAoB,4CAErD,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,CAAC"}
@@ -1,5 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- const formMessage = (FormMessage) => {
3
- return _jsx(FormMessage, { className: 'text-red-600 mt-1' });
4
- };
5
- export { formMessage };
@@ -1,8 +0,0 @@
1
- interface Props {
2
- control: any;
3
- name: string;
4
- className?: string;
5
- }
6
- export declare const FormInputGhost: React.FC<Props>;
7
- export {};
8
- //# sourceMappingURL=ghost.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ghost.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/custom/form/ghost.tsx"],"names":[],"mappings":"AAIA,UAAU,KAAK;IACd,OAAO,EAAE,GAAG,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAiB1C,CAAC"}
@@ -1,8 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { InputText } from '@/components/ui/input';
3
- import * as FormComponents from '../../form';
4
- import { formMessage } from './form-message';
5
- export const FormInputGhost = ({ control, name, className }) => {
6
- const { FormField, FormItem, FormControl, FormMessage } = FormComponents;
7
- return (_jsx(FormField, { control: control, name: name, render: ({ field }) => (_jsxs(FormItem, { className: className, children: [_jsx(FormControl, { children: _jsx(InputText, { ...field, className: 'hidden' }) }), formMessage(FormMessage)] })) }));
8
- };
@@ -1,18 +0,0 @@
1
- interface Props {
2
- control: any;
3
- type?: string;
4
- name: string;
5
- label: string;
6
- subLabel?: string;
7
- helpText?: JSX.Element;
8
- placeholder?: string;
9
- maxLength?: number;
10
- className?: string;
11
- disabled?: boolean;
12
- required?: boolean;
13
- onChange?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
14
- onKeyUp?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
15
- }
16
- export declare const FormInput: React.FC<Props>;
17
- export {};
18
- //# sourceMappingURL=input.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/custom/form/input.tsx"],"names":[],"mappings":"AAMA,UAAU,KAAK;IACd,OAAO,EAAE,GAAG,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAClE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CACjE;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CA8CrC,CAAC"}
@@ -1,14 +0,0 @@
1
- import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
- import { Input } from '@/components/ui/input';
3
- import * as FormComponents from '../../form';
4
- import { formHelpText } from './form-help-text';
5
- import { formLabelAndSubLabel } from './form-label';
6
- import { formMessage } from './form-message';
7
- export const FormInput = ({ control, type, name, label, subLabel, helpText, placeholder, maxLength, className, disabled, required, onKeyUp, }) => {
8
- const { FormField, FormItem, FormLabel, FormControl, FormMessage } = FormComponents;
9
- return (_jsx(FormField, { control: control, name: name, render: ({ field, formState }) => (_jsxs(FormItem, { className: className, children: [_jsxs("div", { className: 'flex items-center space-x-1.5', children: [label && formLabelAndSubLabel(FormLabel, label, subLabel, required), helpText && formHelpText(helpText)] }), _jsx(FormControl, { children: _jsx(Input, { ...field, className: className, maxLength: maxLength, placeholder: placeholder, disabled: disabled || formState.isSubmitting, type: type, onKeyUp: (e) => {
10
- if (onKeyUp) {
11
- onKeyUp(e);
12
- }
13
- } }) }), formMessage(FormMessage)] })) }));
14
- };
@@ -1,19 +0,0 @@
1
- interface Props {
2
- control: any;
3
- name: string;
4
- label: string;
5
- subLabel?: string;
6
- helpText?: JSX.Element;
7
- placeholder?: string;
8
- mask: string;
9
- maskPlaceholder?: string | null;
10
- className?: string;
11
- disabled?: boolean;
12
- required?: boolean;
13
- inputRef?: React.Ref<HTMLInputElement>;
14
- onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
15
- onKeyUp?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
16
- }
17
- export declare const FormInputMask: React.FC<Props>;
18
- export {};
19
- //# sourceMappingURL=mask.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mask.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/custom/form/mask.tsx"],"names":[],"mappings":"AAMA,UAAU,KAAK;IACd,OAAO,EAAE,GAAG,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IACvC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAChE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;CACjE;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAsDzC,CAAC"}
@@ -1,19 +0,0 @@
1
- import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
- import { MaskInput } from '@/components/ui/input';
3
- import * as FormComponents from '../../form';
4
- import { formHelpText } from './form-help-text';
5
- import { formLabelAndSubLabel } from './form-label';
6
- import { formMessage } from './form-message';
7
- export const FormInputMask = ({ control, name, label, subLabel, helpText, placeholder, mask, maskPlaceholder, className, disabled, required, inputRef, onChange, onKeyUp, }) => {
8
- const { FormField, FormItem, FormLabel, FormControl, FormMessage } = FormComponents;
9
- return (_jsx(FormField, { control: control, name: name, render: ({ field, formState }) => (_jsxs(FormItem, { className: className, children: [_jsxs("div", { className: 'flex items-center space-x-1.5', children: [label && formLabelAndSubLabel(FormLabel, label, subLabel, required), helpText && formHelpText(helpText)] }), _jsx(FormControl, { children: _jsx(MaskInput, { ...field, mask: mask, maskPlaceholder: maskPlaceholder, placeholder: placeholder, disabled: disabled || formState.isSubmitting, onChange: (e) => {
10
- field.onChange(e);
11
- if (onChange) {
12
- onChange(e);
13
- }
14
- }, onKeyUp: (e) => {
15
- if (onKeyUp) {
16
- onKeyUp(e);
17
- }
18
- }, ref: inputRef }) }), formMessage(FormMessage)] })) }));
19
- };
@@ -1,19 +0,0 @@
1
- export interface FilterOption {
2
- value: string;
3
- label: string;
4
- }
5
- interface Props {
6
- control: any;
7
- name: string;
8
- label?: string;
9
- subLabel?: string;
10
- helpText?: JSX.Element;
11
- placeholder?: string;
12
- className?: string;
13
- disabled?: boolean;
14
- required?: boolean;
15
- options: FilterOption[];
16
- }
17
- export declare const FormMultiSelect: React.FC<Props>;
18
- export {};
19
- //# sourceMappingURL=multi-select-old.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"multi-select-old.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/custom/form/multi-select-old.tsx"],"names":[],"mappings":"AAUA,MAAM,WAAW,YAAY;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACd;AAED,UAAU,KAAK;IACd,OAAO,EAAE,GAAG,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,YAAY,EAAE,CAAC;CACxB;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CA0F3C,CAAC"}
@@ -1,30 +0,0 @@
1
- import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
- import { cn } from '@/lib/utils';
3
- import { Check, ChevronDown, X } from 'lucide-react';
4
- import { useState } from 'react';
5
- import * as FormComponents from '../../form';
6
- import { Badge } from './badge';
7
- import { formHelpText } from './form-help-text';
8
- import { formLabelAndSubLabel } from './form-label';
9
- import { formMessage } from './form-message';
10
- import { Popover, PopoverContent, PopoverTrigger } from './popover';
11
- export const FormMultiSelect = ({ control, name, label, subLabel, helpText, placeholder, className, disabled, required, options, }) => {
12
- const { FormField, FormItem, FormLabel, FormControl, FormMessage } = FormComponents;
13
- const [open, setOpen] = useState(false);
14
- const removeOption = (option, field) => {
15
- setOpen(false);
16
- toggleOption(option, field);
17
- };
18
- const toggleOption = (option, field) => {
19
- const prevValue = field.value || [];
20
- const newValue = prevValue?.some((item) => item.value === option.value)
21
- ? prevValue.filter((item) => item.value !== option.value)
22
- : [...prevValue, option];
23
- field.onChange(newValue);
24
- };
25
- return (_jsx(FormField, { control: control, name: name, render: ({ field }) => (_jsxs(FormItem, { children: [_jsxs("div", { className: 'flex items-center space-x-1.5', children: [label && formLabelAndSubLabel(FormLabel, label, subLabel, required), helpText && formHelpText(helpText)] }), _jsxs(Popover, { open: open, onOpenChange: setOpen, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsx(FormControl, { children: _jsxs("div", { className: cn(className, 'flex rounded-md text-sm font-medium border border-input justify-between items-center'), children: [_jsx("div", { className: 'flex flex-wrap text-zinc-500 cursor-pointer w-full gap-1', children: field.value?.length > 0 ? (field.value.map((option) => (_jsxs(Badge, { className: 'flex max-h-[24px] items-center bg-zinc-100 text-zinc-950 text-[12px] font-medium py-1 px-2 rounded-[6px]', children: [option.label, _jsx(X, { className: 'cursor-pointer ml-2', size: 12, onClick: () => removeOption(option, field) })] }, option.value)))) : (_jsx("div", { className: 'w-full', children: placeholder || 'Selecionar' })) }), _jsx(ChevronDown, { size: 20, className: 'text-zinc-500 cursor-pointer' })] }) }) }), _jsx(PopoverContent, { className: cn('w-[240px] py-2 px-3', className), children: _jsx("div", { className: 'flex flex-col space-y-1 overflow-y-auto max-h-[200px]', children: options.map((option) => (_jsxs("div", { className: 'flex justify-between items-center gap-2 p-2 text-sm rounded-md cursor-pointer hover:bg-datatable-accent', onClick: () => toggleOption(option, field), onKeyDown: (e) => {
26
- if (e.key === 'Enter' || e.key === ' ') {
27
- toggleOption(option, field);
28
- }
29
- }, children: [option.label, field.value?.some((item) => item.value === option.value) && _jsx(Check, { size: 16 })] }, option.value))) }) })] }), formMessage(FormMessage)] })) }));
30
- };