brd-ui-kit 0.1.75 → 0.1.77

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 (501) hide show
  1. package/dist/brd-ui-kit.css +1 -1
  2. package/dist/calendar-PqChui7l.cjs +2 -0
  3. package/dist/{calendar-DReGV_22.cjs.map → calendar-PqChui7l.cjs.map} +1 -1
  4. package/dist/{calendar-C0DXP3T-.js → calendar-XWqEaWHP.js} +267 -272
  5. package/dist/{calendar-C0DXP3T-.js.map → calendar-XWqEaWHP.js.map} +1 -1
  6. package/dist/{calendar-locale-CP2pxhFK.cjs → calendar-locale-CosU_VZY.cjs} +2 -2
  7. package/dist/{calendar-locale-CP2pxhFK.cjs.map → calendar-locale-CosU_VZY.cjs.map} +1 -1
  8. package/dist/{calendar-locale-DJf03PI9.js → calendar-locale-DqQZymBn.js} +2 -2
  9. package/dist/{calendar-locale-DJf03PI9.js.map → calendar-locale-DqQZymBn.js.map} +1 -1
  10. package/dist/chart-9H_9wEfR.cjs +63 -0
  11. package/dist/{chart-C69jBlXa.cjs.map → chart-9H_9wEfR.cjs.map} +1 -1
  12. package/dist/{chart-CAPCe8o5.js → chart-DFbmMKiQ.js} +2956 -2951
  13. package/dist/{chart-CAPCe8o5.js.map → chart-DFbmMKiQ.js.map} +1 -1
  14. package/dist/components/app-sidebar/app-sidebar.d.ts +2 -2
  15. package/dist/components/basic-chart/basic-chart.d.ts +1 -1
  16. package/dist/components/basic-table/basic-table.d.ts +5 -5
  17. package/dist/components/data-table/data-table-actions-column.d.ts +3 -3
  18. package/dist/components/data-table/data-table-bulk-actions.d.ts +3 -3
  19. package/dist/components/data-table/data-table-column-visibility.d.ts +2 -2
  20. package/dist/components/data-table/data-table-filter.d.ts +2 -2
  21. package/dist/components/data-table/data-table-row-actions-column.d.ts +5 -5
  22. package/dist/components/data-table/use-data-table-editable-rows.d.ts +5 -5
  23. package/dist/components/files-uploader/files-uploader.d.ts +2 -2
  24. package/dist/components/icons/ArrowCounterClockwise.d.ts +1 -0
  25. package/dist/components/icons/BoundingBox.d.ts +1 -0
  26. package/dist/components/icons/Briefcase.d.ts +1 -0
  27. package/dist/components/icons/Building.d.ts +1 -0
  28. package/dist/components/icons/Buildings.d.ts +1 -0
  29. package/dist/components/icons/CaretDown.d.ts +1 -0
  30. package/dist/components/icons/CaretLeft.d.ts +1 -0
  31. package/dist/components/icons/CaretRight.d.ts +1 -0
  32. package/dist/components/icons/CaretUp.d.ts +1 -0
  33. package/dist/components/icons/CaretUpDown.d.ts +1 -0
  34. package/dist/components/icons/ChartLine.d.ts +1 -0
  35. package/dist/components/icons/Check.d.ts +1 -0
  36. package/dist/components/icons/CheckCircle.d.ts +1 -0
  37. package/dist/components/icons/Clock.d.ts +1 -0
  38. package/dist/components/icons/CreditCard.d.ts +1 -0
  39. package/dist/components/icons/DotsThree.d.ts +1 -0
  40. package/dist/components/icons/DownloadSimple.d.ts +1 -0
  41. package/dist/components/icons/EnvelopeSimple.d.ts +1 -0
  42. package/dist/components/icons/Eye.d.ts +1 -0
  43. package/dist/components/icons/EyeSlash.d.ts +1 -0
  44. package/dist/components/icons/FileText.d.ts +1 -0
  45. package/dist/components/icons/Folder.d.ts +1 -0
  46. package/dist/components/icons/Funnel.d.ts +1 -0
  47. package/dist/components/icons/Gear.d.ts +1 -0
  48. package/dist/components/icons/Info.d.ts +1 -0
  49. package/dist/components/icons/LockKey.d.ts +1 -0
  50. package/dist/components/icons/MagnifyingGlass.d.ts +1 -0
  51. package/dist/components/icons/MaxLogo.d.ts +1 -0
  52. package/dist/components/icons/Package.d.ts +1 -0
  53. package/dist/components/icons/Pencil.d.ts +1 -0
  54. package/dist/components/icons/Phone.d.ts +1 -0
  55. package/dist/components/icons/Plus.d.ts +1 -0
  56. package/dist/components/icons/PresentationChart.d.ts +1 -0
  57. package/dist/components/icons/SpinnerGap.d.ts +1 -0
  58. package/dist/components/icons/TelegramLogo.d.ts +1 -0
  59. package/dist/components/icons/Trash.d.ts +1 -0
  60. package/dist/components/icons/UserCircleGear.d.ts +1 -0
  61. package/dist/components/icons/Users.d.ts +1 -0
  62. package/dist/components/icons/UsersFour.d.ts +1 -0
  63. package/dist/components/icons/Warning.d.ts +1 -0
  64. package/dist/components/icons/WarningCircle.d.ts +1 -0
  65. package/dist/components/icons/WhatsAppLogoFilled.d.ts +1 -0
  66. package/dist/components/icons/Wrench.d.ts +1 -0
  67. package/dist/components/icons/X.d.ts +1 -0
  68. package/dist/components/icons/XCircle.d.ts +1 -0
  69. package/dist/components/icons/index.d.ts +50 -0
  70. package/dist/components/icons/stroke-icon.d.ts +19 -0
  71. package/dist/components/icons.d.ts +2 -0
  72. package/dist/components/input-field/input-field.d.ts +3 -3
  73. package/dist/components/input-password/input-password.d.ts +1 -1
  74. package/dist/components/input-phone/input-phone.d.ts +4 -4
  75. package/dist/components/popover-modal/popover-modal.d.ts +4 -4
  76. package/dist/components/select-field/select-field.d.ts +2 -2
  77. package/dist/components/ui/avatar/avatar.d.ts +7 -7
  78. package/dist/components/ui/badge/badge.d.ts +2 -2
  79. package/dist/components/ui/button/button.d.ts +3 -3
  80. package/dist/components/ui/calendar/calendar.d.ts +6 -6
  81. package/dist/components/ui/calendar/calendar.styles.d.ts +1 -1
  82. package/dist/components/ui/card/card.d.ts +13 -13
  83. package/dist/components/ui/chart/chart.d.ts +23 -21
  84. package/dist/components/ui/checkbox/checkbox.d.ts +4 -4
  85. package/dist/components/ui/combobox/combobox.d.ts +6 -6
  86. package/dist/components/ui/dialog/dialog.d.ts +11 -11
  87. package/dist/components/ui/drawer/drawer.d.ts +11 -11
  88. package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts +42 -42
  89. package/dist/components/ui/icon/icon-map.d.ts +68 -0
  90. package/dist/components/ui/icon/icon.d.ts +6 -6
  91. package/dist/components/ui/icon/index.d.ts +3 -1
  92. package/dist/components/ui/input/input.d.ts +2 -2
  93. package/dist/components/ui/input-group/input-group.d.ts +7 -7
  94. package/dist/components/ui/label/label.d.ts +4 -4
  95. package/dist/components/ui/pagination/pagination.d.ts +8 -8
  96. package/dist/components/ui/popover/popover.d.ts +8 -8
  97. package/dist/components/ui/progress/progress.d.ts +4 -4
  98. package/dist/components/ui/radio-group/radio-group.d.ts +7 -7
  99. package/dist/components/ui/select/select.d.ts +11 -11
  100. package/dist/components/ui/select-calendar-menu/select-calendar-menu.d.ts +4 -4
  101. package/dist/components/ui/separator/separator.d.ts +4 -4
  102. package/dist/components/ui/switch/switch.d.ts +4 -4
  103. package/dist/components/ui/table/table.d.ts +17 -17
  104. package/dist/components/ui/tabs/tabs.d.ts +8 -8
  105. package/dist/components/ui/toggle-group/toggle-group.styles.d.ts +1 -1
  106. package/dist/components/ui/tooltip/tooltip.d.ts +8 -8
  107. package/dist/components/ui/typography/typography.d.ts +174 -174
  108. package/dist/components-app-pagination-app-pagination.cjs +1 -1
  109. package/dist/components-app-pagination-app-pagination.cjs.map +1 -1
  110. package/dist/components-app-pagination-app-pagination.js +34 -32
  111. package/dist/components-app-pagination-app-pagination.js.map +1 -1
  112. package/dist/components-app-sidebar-app-sidebar.cjs +1 -1
  113. package/dist/components-app-sidebar-app-sidebar.cjs.map +1 -1
  114. package/dist/components-app-sidebar-app-sidebar.js +33 -32
  115. package/dist/components-app-sidebar-app-sidebar.js.map +1 -1
  116. package/dist/components-avatar-uploader-avatar-uploader.cjs +2 -2
  117. package/dist/components-avatar-uploader-avatar-uploader.cjs.map +1 -1
  118. package/dist/components-avatar-uploader-avatar-uploader.js +54 -36
  119. package/dist/components-avatar-uploader-avatar-uploader.js.map +1 -1
  120. package/dist/components-basic-avatar-basic-avatar.cjs +2 -2
  121. package/dist/components-basic-avatar-basic-avatar.cjs.map +1 -1
  122. package/dist/components-basic-avatar-basic-avatar.js +25 -5
  123. package/dist/components-basic-avatar-basic-avatar.js.map +1 -1
  124. package/dist/components-basic-chart-basic-chart.cjs +2 -2
  125. package/dist/components-basic-chart-basic-chart.cjs.map +1 -1
  126. package/dist/components-basic-chart-basic-chart.js +106 -108
  127. package/dist/components-basic-chart-basic-chart.js.map +1 -1
  128. package/dist/components-basic-table-basic-table.cjs +2 -2
  129. package/dist/components-basic-table-basic-table.cjs.map +1 -1
  130. package/dist/components-basic-table-basic-table.js +232 -231
  131. package/dist/components-basic-table-basic-table.js.map +1 -1
  132. package/dist/components-data-table-data-table-actions-column.cjs +1 -1
  133. package/dist/components-data-table-data-table-actions-column.cjs.map +1 -1
  134. package/dist/components-data-table-data-table-actions-column.js +1 -1
  135. package/dist/components-data-table-data-table-actions-column.js.map +1 -1
  136. package/dist/components-data-table-data-table-bulk-actions.cjs +1 -1
  137. package/dist/components-data-table-data-table-bulk-actions.cjs.map +1 -1
  138. package/dist/components-data-table-data-table-bulk-actions.js +9 -9
  139. package/dist/components-data-table-data-table-bulk-actions.js.map +1 -1
  140. package/dist/components-data-table-data-table-column-visibility.cjs +1 -1
  141. package/dist/components-data-table-data-table-column-visibility.cjs.map +1 -1
  142. package/dist/components-data-table-data-table-column-visibility.js +11 -10
  143. package/dist/components-data-table-data-table-column-visibility.js.map +1 -1
  144. package/dist/components-data-table-data-table-filter.cjs +1 -1
  145. package/dist/components-data-table-data-table-filter.cjs.map +1 -1
  146. package/dist/components-data-table-data-table-filter.js +15 -15
  147. package/dist/components-data-table-data-table-filter.js.map +1 -1
  148. package/dist/components-data-table-data-table-row-actions-column.cjs +1 -1
  149. package/dist/components-data-table-data-table-row-actions-column.cjs.map +1 -1
  150. package/dist/components-data-table-data-table-row-actions-column.js +1 -1
  151. package/dist/components-data-table-data-table-row-actions-column.js.map +1 -1
  152. package/dist/components-data-table-use-data-table-editable-rows.cjs +1 -1
  153. package/dist/components-data-table-use-data-table-editable-rows.cjs.map +1 -1
  154. package/dist/components-data-table-use-data-table-editable-rows.js +88 -90
  155. package/dist/components-data-table-use-data-table-editable-rows.js.map +1 -1
  156. package/dist/components-files-uploader-files-uploader.cjs +3 -3
  157. package/dist/components-files-uploader-files-uploader.cjs.map +1 -1
  158. package/dist/components-files-uploader-files-uploader.js +41 -38
  159. package/dist/components-files-uploader-files-uploader.js.map +1 -1
  160. package/dist/components-icons-ArrowCounterClockwise.cjs +2 -0
  161. package/dist/components-icons-ArrowCounterClockwise.cjs.map +1 -0
  162. package/dist/components-icons-ArrowCounterClockwise.js +5 -0
  163. package/dist/components-icons-ArrowCounterClockwise.js.map +1 -0
  164. package/dist/components-icons-BoundingBox.cjs +2 -0
  165. package/dist/components-icons-BoundingBox.cjs.map +1 -0
  166. package/dist/components-icons-BoundingBox.js +5 -0
  167. package/dist/components-icons-BoundingBox.js.map +1 -0
  168. package/dist/components-icons-Briefcase.cjs +2 -0
  169. package/dist/components-icons-Briefcase.cjs.map +1 -0
  170. package/dist/components-icons-Briefcase.js +5 -0
  171. package/dist/components-icons-Briefcase.js.map +1 -0
  172. package/dist/components-icons-Building.cjs +2 -0
  173. package/dist/components-icons-Building.cjs.map +1 -0
  174. package/dist/components-icons-Building.js +5 -0
  175. package/dist/components-icons-Building.js.map +1 -0
  176. package/dist/components-icons-Buildings.cjs +2 -0
  177. package/dist/components-icons-Buildings.cjs.map +1 -0
  178. package/dist/components-icons-Buildings.js +5 -0
  179. package/dist/components-icons-Buildings.js.map +1 -0
  180. package/dist/components-icons-CaretDown.cjs +2 -0
  181. package/dist/components-icons-CaretDown.cjs.map +1 -0
  182. package/dist/components-icons-CaretDown.js +5 -0
  183. package/dist/components-icons-CaretDown.js.map +1 -0
  184. package/dist/components-icons-CaretLeft.cjs +2 -0
  185. package/dist/components-icons-CaretLeft.cjs.map +1 -0
  186. package/dist/components-icons-CaretLeft.js +5 -0
  187. package/dist/components-icons-CaretLeft.js.map +1 -0
  188. package/dist/components-icons-CaretRight.cjs +2 -0
  189. package/dist/components-icons-CaretRight.cjs.map +1 -0
  190. package/dist/components-icons-CaretRight.js +5 -0
  191. package/dist/components-icons-CaretRight.js.map +1 -0
  192. package/dist/components-icons-CaretUp.cjs +2 -0
  193. package/dist/components-icons-CaretUp.cjs.map +1 -0
  194. package/dist/components-icons-CaretUp.js +5 -0
  195. package/dist/components-icons-CaretUp.js.map +1 -0
  196. package/dist/components-icons-CaretUpDown.cjs +2 -0
  197. package/dist/components-icons-CaretUpDown.cjs.map +1 -0
  198. package/dist/components-icons-CaretUpDown.js +5 -0
  199. package/dist/components-icons-CaretUpDown.js.map +1 -0
  200. package/dist/components-icons-ChartLine.cjs +2 -0
  201. package/dist/components-icons-ChartLine.cjs.map +1 -0
  202. package/dist/components-icons-ChartLine.js +5 -0
  203. package/dist/components-icons-ChartLine.js.map +1 -0
  204. package/dist/components-icons-Check.cjs +2 -0
  205. package/dist/components-icons-Check.cjs.map +1 -0
  206. package/dist/components-icons-Check.js +5 -0
  207. package/dist/components-icons-Check.js.map +1 -0
  208. package/dist/components-icons-CheckCircle.cjs +2 -0
  209. package/dist/components-icons-CheckCircle.cjs.map +1 -0
  210. package/dist/components-icons-CheckCircle.js +5 -0
  211. package/dist/components-icons-CheckCircle.js.map +1 -0
  212. package/dist/components-icons-Clock.cjs +2 -0
  213. package/dist/components-icons-Clock.cjs.map +1 -0
  214. package/dist/components-icons-Clock.js +5 -0
  215. package/dist/components-icons-Clock.js.map +1 -0
  216. package/dist/components-icons-CreditCard.cjs +2 -0
  217. package/dist/components-icons-CreditCard.cjs.map +1 -0
  218. package/dist/components-icons-CreditCard.js +5 -0
  219. package/dist/components-icons-CreditCard.js.map +1 -0
  220. package/dist/components-icons-DotsThree.cjs +2 -0
  221. package/dist/components-icons-DotsThree.cjs.map +1 -0
  222. package/dist/components-icons-DotsThree.js +5 -0
  223. package/dist/components-icons-DotsThree.js.map +1 -0
  224. package/dist/components-icons-DownloadSimple.cjs +2 -0
  225. package/dist/components-icons-DownloadSimple.cjs.map +1 -0
  226. package/dist/components-icons-DownloadSimple.js +5 -0
  227. package/dist/components-icons-DownloadSimple.js.map +1 -0
  228. package/dist/components-icons-EnvelopeSimple.cjs +2 -0
  229. package/dist/components-icons-EnvelopeSimple.cjs.map +1 -0
  230. package/dist/components-icons-EnvelopeSimple.js +5 -0
  231. package/dist/components-icons-EnvelopeSimple.js.map +1 -0
  232. package/dist/components-icons-Eye.cjs +2 -0
  233. package/dist/components-icons-Eye.cjs.map +1 -0
  234. package/dist/components-icons-Eye.js +5 -0
  235. package/dist/components-icons-Eye.js.map +1 -0
  236. package/dist/components-icons-EyeSlash.cjs +2 -0
  237. package/dist/components-icons-EyeSlash.cjs.map +1 -0
  238. package/dist/components-icons-EyeSlash.js +5 -0
  239. package/dist/components-icons-EyeSlash.js.map +1 -0
  240. package/dist/components-icons-FileText.cjs +2 -0
  241. package/dist/components-icons-FileText.cjs.map +1 -0
  242. package/dist/components-icons-FileText.js +5 -0
  243. package/dist/components-icons-FileText.js.map +1 -0
  244. package/dist/components-icons-Folder.cjs +2 -0
  245. package/dist/components-icons-Folder.cjs.map +1 -0
  246. package/dist/components-icons-Folder.js +5 -0
  247. package/dist/components-icons-Folder.js.map +1 -0
  248. package/dist/components-icons-Funnel.cjs +2 -0
  249. package/dist/components-icons-Funnel.cjs.map +1 -0
  250. package/dist/components-icons-Funnel.js +5 -0
  251. package/dist/components-icons-Funnel.js.map +1 -0
  252. package/dist/components-icons-Gear.cjs +2 -0
  253. package/dist/components-icons-Gear.cjs.map +1 -0
  254. package/dist/components-icons-Gear.js +5 -0
  255. package/dist/components-icons-Gear.js.map +1 -0
  256. package/dist/components-icons-Info.cjs +2 -0
  257. package/dist/components-icons-Info.cjs.map +1 -0
  258. package/dist/components-icons-Info.js +5 -0
  259. package/dist/components-icons-Info.js.map +1 -0
  260. package/dist/components-icons-LockKey.cjs +2 -0
  261. package/dist/components-icons-LockKey.cjs.map +1 -0
  262. package/dist/components-icons-LockKey.js +5 -0
  263. package/dist/components-icons-LockKey.js.map +1 -0
  264. package/dist/components-icons-MagnifyingGlass.cjs +2 -0
  265. package/dist/components-icons-MagnifyingGlass.cjs.map +1 -0
  266. package/dist/components-icons-MagnifyingGlass.js +5 -0
  267. package/dist/components-icons-MagnifyingGlass.js.map +1 -0
  268. package/dist/components-icons-MaxLogo.cjs +2 -0
  269. package/dist/components-icons-MaxLogo.cjs.map +1 -0
  270. package/dist/components-icons-MaxLogo.js +5 -0
  271. package/dist/components-icons-MaxLogo.js.map +1 -0
  272. package/dist/components-icons-Package.cjs +2 -0
  273. package/dist/components-icons-Package.cjs.map +1 -0
  274. package/dist/components-icons-Package.js +5 -0
  275. package/dist/components-icons-Package.js.map +1 -0
  276. package/dist/components-icons-Pencil.cjs +2 -0
  277. package/dist/components-icons-Pencil.cjs.map +1 -0
  278. package/dist/components-icons-Pencil.js +5 -0
  279. package/dist/components-icons-Pencil.js.map +1 -0
  280. package/dist/components-icons-Phone.cjs +2 -0
  281. package/dist/components-icons-Phone.cjs.map +1 -0
  282. package/dist/components-icons-Phone.js +5 -0
  283. package/dist/components-icons-Phone.js.map +1 -0
  284. package/dist/components-icons-Plus.cjs +2 -0
  285. package/dist/components-icons-Plus.cjs.map +1 -0
  286. package/dist/components-icons-Plus.js +5 -0
  287. package/dist/components-icons-Plus.js.map +1 -0
  288. package/dist/components-icons-PresentationChart.cjs +2 -0
  289. package/dist/components-icons-PresentationChart.cjs.map +1 -0
  290. package/dist/components-icons-PresentationChart.js +5 -0
  291. package/dist/components-icons-PresentationChart.js.map +1 -0
  292. package/dist/components-icons-SpinnerGap.cjs +2 -0
  293. package/dist/components-icons-SpinnerGap.cjs.map +1 -0
  294. package/dist/components-icons-SpinnerGap.js +5 -0
  295. package/dist/components-icons-SpinnerGap.js.map +1 -0
  296. package/dist/components-icons-TelegramLogo.cjs +2 -0
  297. package/dist/components-icons-TelegramLogo.cjs.map +1 -0
  298. package/dist/components-icons-TelegramLogo.js +5 -0
  299. package/dist/components-icons-TelegramLogo.js.map +1 -0
  300. package/dist/components-icons-Trash.cjs +2 -0
  301. package/dist/components-icons-Trash.cjs.map +1 -0
  302. package/dist/components-icons-Trash.js +5 -0
  303. package/dist/components-icons-Trash.js.map +1 -0
  304. package/dist/components-icons-UserCircleGear.cjs +2 -0
  305. package/dist/components-icons-UserCircleGear.cjs.map +1 -0
  306. package/dist/components-icons-UserCircleGear.js +5 -0
  307. package/dist/components-icons-UserCircleGear.js.map +1 -0
  308. package/dist/components-icons-Users.cjs +2 -0
  309. package/dist/components-icons-Users.cjs.map +1 -0
  310. package/dist/components-icons-Users.js +5 -0
  311. package/dist/components-icons-Users.js.map +1 -0
  312. package/dist/components-icons-UsersFour.cjs +2 -0
  313. package/dist/components-icons-UsersFour.cjs.map +1 -0
  314. package/dist/components-icons-UsersFour.js +5 -0
  315. package/dist/components-icons-UsersFour.js.map +1 -0
  316. package/dist/components-icons-Warning.cjs +2 -0
  317. package/dist/components-icons-Warning.cjs.map +1 -0
  318. package/dist/components-icons-Warning.js +5 -0
  319. package/dist/components-icons-Warning.js.map +1 -0
  320. package/dist/components-icons-WarningCircle.cjs +2 -0
  321. package/dist/components-icons-WarningCircle.cjs.map +1 -0
  322. package/dist/components-icons-WarningCircle.js +5 -0
  323. package/dist/components-icons-WarningCircle.js.map +1 -0
  324. package/dist/components-icons-WhatsAppLogoFilled.cjs +2 -0
  325. package/dist/components-icons-WhatsAppLogoFilled.cjs.map +1 -0
  326. package/dist/components-icons-WhatsAppLogoFilled.js +5 -0
  327. package/dist/components-icons-WhatsAppLogoFilled.js.map +1 -0
  328. package/dist/components-icons-Wrench.cjs +2 -0
  329. package/dist/components-icons-Wrench.cjs.map +1 -0
  330. package/dist/components-icons-Wrench.js +5 -0
  331. package/dist/components-icons-Wrench.js.map +1 -0
  332. package/dist/components-icons-X.cjs +2 -0
  333. package/dist/components-icons-X.cjs.map +1 -0
  334. package/dist/components-icons-X.js +5 -0
  335. package/dist/components-icons-X.js.map +1 -0
  336. package/dist/components-icons-XCircle.cjs +2 -0
  337. package/dist/components-icons-XCircle.cjs.map +1 -0
  338. package/dist/components-icons-XCircle.js +5 -0
  339. package/dist/components-icons-XCircle.js.map +1 -0
  340. package/dist/components-icons-stroke-icon.cjs +2 -0
  341. package/dist/components-icons-stroke-icon.cjs.map +1 -0
  342. package/dist/components-icons-stroke-icon.js +39 -0
  343. package/dist/components-icons-stroke-icon.js.map +1 -0
  344. package/dist/components-icons.cjs +2 -0
  345. package/dist/components-icons.cjs.map +1 -0
  346. package/dist/components-icons.js +97 -0
  347. package/dist/components-icons.js.map +1 -0
  348. package/dist/components-input-contact-input-contact.cjs +4 -4
  349. package/dist/components-input-contact-input-contact.cjs.map +1 -1
  350. package/dist/components-input-contact-input-contact.js +104 -75
  351. package/dist/components-input-contact-input-contact.js.map +1 -1
  352. package/dist/components-input-field-input-field.cjs +1 -1
  353. package/dist/components-input-field-input-field.cjs.map +1 -1
  354. package/dist/components-input-field-input-field.js +18 -19
  355. package/dist/components-input-field-input-field.js.map +1 -1
  356. package/dist/components-input-password-input-password.cjs +1 -1
  357. package/dist/components-input-password-input-password.cjs.map +1 -1
  358. package/dist/components-input-password-input-password.js +14 -52
  359. package/dist/components-input-password-input-password.js.map +1 -1
  360. package/dist/components-input-phone-input-phone.cjs.map +1 -1
  361. package/dist/components-input-phone-input-phone.js.map +1 -1
  362. package/dist/components-popover-modal-popover-modal.cjs +1 -1
  363. package/dist/components-popover-modal-popover-modal.cjs.map +1 -1
  364. package/dist/components-popover-modal-popover-modal.js +40 -29
  365. package/dist/components-popover-modal-popover-modal.js.map +1 -1
  366. package/dist/components-select-field-select-field.cjs.map +1 -1
  367. package/dist/components-select-field-select-field.js.map +1 -1
  368. package/dist/components-ui-avatar-avatar.cjs +1 -1
  369. package/dist/components-ui-avatar-avatar.cjs.map +1 -1
  370. package/dist/components-ui-avatar-avatar.js +12 -13
  371. package/dist/components-ui-avatar-avatar.js.map +1 -1
  372. package/dist/components-ui-badge-badge.cjs +1 -1
  373. package/dist/components-ui-badge-badge.cjs.map +1 -1
  374. package/dist/components-ui-badge-badge.js +10 -11
  375. package/dist/components-ui-badge-badge.js.map +1 -1
  376. package/dist/components-ui-button-button.cjs +1 -1
  377. package/dist/components-ui-button-button.cjs.map +1 -1
  378. package/dist/components-ui-button-button.js +10 -11
  379. package/dist/components-ui-button-button.js.map +1 -1
  380. package/dist/components-ui-button-button.styles.cjs +4 -4
  381. package/dist/components-ui-button-button.styles.cjs.map +1 -1
  382. package/dist/components-ui-button-button.styles.js +4 -4
  383. package/dist/components-ui-button-button.styles.js.map +1 -1
  384. package/dist/components-ui-calendar-calendar.cjs +1 -1
  385. package/dist/components-ui-calendar-calendar.js +4 -3
  386. package/dist/components-ui-calendar-calendar.js.map +1 -1
  387. package/dist/components-ui-calendar-calendar.styles.cjs +1 -1
  388. package/dist/components-ui-calendar-calendar.styles.cjs.map +1 -1
  389. package/dist/components-ui-calendar-calendar.styles.js +1 -1
  390. package/dist/components-ui-calendar-calendar.styles.js.map +1 -1
  391. package/dist/components-ui-calendar.cjs +1 -1
  392. package/dist/components-ui-calendar.js +2 -2
  393. package/dist/components-ui-card-card.cjs +1 -1
  394. package/dist/components-ui-card-card.cjs.map +1 -1
  395. package/dist/components-ui-card-card.js +10 -11
  396. package/dist/components-ui-card-card.js.map +1 -1
  397. package/dist/components-ui-chart-chart.cjs +1 -1
  398. package/dist/components-ui-chart-chart.js +1 -1
  399. package/dist/components-ui-chart.cjs +1 -1
  400. package/dist/components-ui-chart.js +1 -1
  401. package/dist/components-ui-checkbox-checkbox.cjs +1 -1
  402. package/dist/components-ui-checkbox-checkbox.cjs.map +1 -1
  403. package/dist/components-ui-checkbox-checkbox.js +13 -13
  404. package/dist/components-ui-checkbox-checkbox.js.map +1 -1
  405. package/dist/components-ui-combobox-combobox.cjs +5 -5
  406. package/dist/components-ui-combobox-combobox.cjs.map +1 -1
  407. package/dist/components-ui-combobox-combobox.js +1478 -1479
  408. package/dist/components-ui-combobox-combobox.js.map +1 -1
  409. package/dist/components-ui-dialog-dialog.cjs +1 -1
  410. package/dist/components-ui-dialog-dialog.cjs.map +1 -1
  411. package/dist/components-ui-dialog-dialog.js +23 -23
  412. package/dist/components-ui-dialog-dialog.js.map +1 -1
  413. package/dist/components-ui-drawer-drawer.cjs +2 -2
  414. package/dist/components-ui-drawer-drawer.cjs.map +1 -1
  415. package/dist/components-ui-drawer-drawer.js +16 -19
  416. package/dist/components-ui-drawer-drawer.js.map +1 -1
  417. package/dist/components-ui-dropdown-menu-dropdown-menu.cjs +1 -1
  418. package/dist/components-ui-dropdown-menu-dropdown-menu.cjs.map +1 -1
  419. package/dist/components-ui-dropdown-menu-dropdown-menu.js +1 -1
  420. package/dist/components-ui-dropdown-menu-dropdown-menu.js.map +1 -1
  421. package/dist/components-ui-icon-icon-map.cjs +2 -0
  422. package/dist/components-ui-icon-icon-map.cjs.map +1 -0
  423. package/dist/components-ui-icon-icon-map.js +71 -0
  424. package/dist/components-ui-icon-icon-map.js.map +1 -0
  425. package/dist/components-ui-icon-icon.cjs +1 -1
  426. package/dist/components-ui-icon-icon.cjs.map +1 -1
  427. package/dist/components-ui-icon-icon.js +29 -61735
  428. package/dist/components-ui-icon-icon.js.map +1 -1
  429. package/dist/components-ui-icon.cjs +1 -1
  430. package/dist/components-ui-icon.js +3 -1
  431. package/dist/components-ui-icon.js.map +1 -1
  432. package/dist/components-ui-input-group-input-group.cjs +1 -1
  433. package/dist/components-ui-input-group-input-group.cjs.map +1 -1
  434. package/dist/components-ui-input-group-input-group.js +12 -13
  435. package/dist/components-ui-input-group-input-group.js.map +1 -1
  436. package/dist/components-ui-input-input.cjs +1 -1
  437. package/dist/components-ui-input-input.cjs.map +1 -1
  438. package/dist/components-ui-input-input.js +2 -3
  439. package/dist/components-ui-input-input.js.map +1 -1
  440. package/dist/components-ui-label-label.cjs +1 -1
  441. package/dist/components-ui-label-label.cjs.map +1 -1
  442. package/dist/components-ui-label-label.js +1 -1
  443. package/dist/components-ui-label-label.js.map +1 -1
  444. package/dist/components-ui-pagination-pagination.cjs +2 -2
  445. package/dist/components-ui-pagination-pagination.cjs.map +1 -1
  446. package/dist/components-ui-pagination-pagination.js +48 -46
  447. package/dist/components-ui-pagination-pagination.js.map +1 -1
  448. package/dist/components-ui-popover-popover.cjs +1 -1
  449. package/dist/components-ui-popover-popover.cjs.map +1 -1
  450. package/dist/components-ui-popover-popover.js +14 -19
  451. package/dist/components-ui-popover-popover.js.map +1 -1
  452. package/dist/components-ui-progress-progress.cjs +1 -1
  453. package/dist/components-ui-progress-progress.cjs.map +1 -1
  454. package/dist/components-ui-progress-progress.js +1 -1
  455. package/dist/components-ui-progress-progress.js.map +1 -1
  456. package/dist/components-ui-radio-group-radio-group.cjs +1 -1
  457. package/dist/components-ui-radio-group-radio-group.cjs.map +1 -1
  458. package/dist/components-ui-radio-group-radio-group.js +0 -1
  459. package/dist/components-ui-radio-group-radio-group.js.map +1 -1
  460. package/dist/components-ui-select-calendar-menu-select-calendar-menu.cjs +1 -1
  461. package/dist/components-ui-select-calendar-menu-select-calendar-menu.cjs.map +1 -1
  462. package/dist/components-ui-select-calendar-menu-select-calendar-menu.js +54 -47
  463. package/dist/components-ui-select-calendar-menu-select-calendar-menu.js.map +1 -1
  464. package/dist/components-ui-select-select.cjs +1 -1
  465. package/dist/components-ui-select-select.cjs.map +1 -1
  466. package/dist/components-ui-select-select.js +36 -36
  467. package/dist/components-ui-select-select.js.map +1 -1
  468. package/dist/components-ui-separator-separator.cjs +1 -1
  469. package/dist/components-ui-separator-separator.cjs.map +1 -1
  470. package/dist/components-ui-separator-separator.js +11 -12
  471. package/dist/components-ui-separator-separator.js.map +1 -1
  472. package/dist/components-ui-sonner-sonner.cjs +1 -1
  473. package/dist/components-ui-sonner-sonner.cjs.map +1 -1
  474. package/dist/components-ui-sonner-sonner.js +38 -32
  475. package/dist/components-ui-sonner-sonner.js.map +1 -1
  476. package/dist/components-ui-switch-switch.cjs +1 -1
  477. package/dist/components-ui-switch-switch.cjs.map +1 -1
  478. package/dist/components-ui-switch-switch.js +6 -7
  479. package/dist/components-ui-switch-switch.js.map +1 -1
  480. package/dist/components-ui-table-table.cjs +1 -1
  481. package/dist/components-ui-table-table.cjs.map +1 -1
  482. package/dist/components-ui-table-table.js +0 -1
  483. package/dist/components-ui-table-table.js.map +1 -1
  484. package/dist/components-ui-tabs-tabs.cjs +2 -2
  485. package/dist/components-ui-tabs-tabs.cjs.map +1 -1
  486. package/dist/components-ui-tabs-tabs.js +16 -16
  487. package/dist/components-ui-tabs-tabs.js.map +1 -1
  488. package/dist/components-ui-tooltip-tooltip.cjs +1 -1
  489. package/dist/components-ui-tooltip-tooltip.cjs.map +1 -1
  490. package/dist/components-ui-tooltip-tooltip.js +9 -10
  491. package/dist/components-ui-tooltip-tooltip.js.map +1 -1
  492. package/dist/components-ui-typography-typography.cjs +1 -1
  493. package/dist/components-ui-typography-typography.cjs.map +1 -1
  494. package/dist/components-ui-typography-typography.js +7 -7
  495. package/dist/components-ui-typography-typography.js.map +1 -1
  496. package/dist/index.cjs +1 -1
  497. package/dist/index.js +234 -233
  498. package/dist/index.js.map +1 -1
  499. package/package.json +10 -1
  500. package/dist/calendar-DReGV_22.cjs +0 -2
  501. package/dist/chart-C69jBlXa.cjs +0 -63
@@ -0,0 +1 @@
1
+ {"version":3,"file":"components-icons-stroke-icon.js","sources":["../src/components/icons/stroke-icon.tsx"],"sourcesContent":["import { cn } from \"@/lib/utils\";\nimport type { StrokeIconProps } from \"phosphor-strokes-icons\";\nimport type {\n ComponentType,\n DetailedHTMLProps,\n HTMLAttributes,\n SVGProps,\n} from \"react\";\nimport { iconPresets } from \"../ui/icon/icon-presets\";\nimport type { IconPreset } from \"../ui/icon/icon-presets\";\n\nexport type StrokeIconComponent = ComponentType<StrokeIconProps>;\n\ntype StrokeIconComponentProps = DetailedHTMLProps<\n HTMLAttributes<HTMLDivElement>,\n HTMLDivElement\n> & {\n icon: StrokeIconComponent;\n size?: IconPreset | StrokeIconProps[\"size\"];\n strokeWidth?: StrokeIconProps[\"strokeWidth\"];\n color?: StrokeIconProps[\"color\"];\n disabled?: boolean;\n absoluteStrokeWidth?: StrokeIconProps[\"absoluteStrokeWidth\"];\n classes?: {\n wrapper?: string;\n icon?: string;\n };\n svgProps?: Omit<\n SVGProps<SVGSVGElement>,\n \"size\" | \"strokeWidth\" | \"color\" | \"className\"\n >;\n};\n\nexport const StrokeIcon = ({\n icon: IconComponent,\n size = \"medium\",\n strokeWidth,\n color,\n absoluteStrokeWidth = true,\n classes,\n className,\n svgProps,\n disabled,\n ...rest\n}: StrokeIconComponentProps) => {\n const presetConfig =\n typeof size === \"string\" && size in iconPresets\n ? iconPresets[size as IconPreset]\n : iconPresets.medium;\n const resolvedSize =\n typeof size === \"string\" && size in iconPresets ? presetConfig.size : size;\n const resolvedStrokeWidth = strokeWidth ?? presetConfig.strokeWidth;\n\n return (\n <div\n {...rest}\n className={cn(classes?.wrapper)}\n >\n <IconComponent\n {...svgProps}\n size={resolvedSize}\n strokeWidth={resolvedStrokeWidth}\n color={color}\n absoluteStrokeWidth={absoluteStrokeWidth}\n className={cn(className, classes?.icon, disabled && \"text-disabled-text\")}\n />\n </div>\n );\n};\n\nexport type { StrokeIconComponentProps };\n"],"names":["StrokeIcon","IconComponent","size","strokeWidth","color","absoluteStrokeWidth","classes","className","svgProps","disabled","rest","presetConfig","iconPresets","resolvedSize","resolvedStrokeWidth","jsx","cn"],"mappings":";;;AAiCO,MAAMA,IAAa,CAAC;AAAA,EACzB,MAAMC;AAAA,EACN,MAAAC,IAAO;AAAA,EACP,aAAAC;AAAA,EACA,OAAAC;AAAA,EACA,qBAAAC,IAAsB;AAAA,EACtB,SAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,MAAgC;AAC9B,QAAMC,IACJ,OAAOT,KAAS,YAAYA,KAAQU,IAChCA,EAAYV,CAAkB,IAC9BU,EAAY,QACZC,IACJ,OAAOX,KAAS,YAAYA,KAAQU,IAAcD,EAAa,OAAOT,GAClEY,IAAsBX,KAAeQ,EAAa;AAExD,SACE,gBAAAI;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAGL;AAAA,MACJ,WAAWM,EAAGV,GAAS,OAAO;AAAA,MAE9B,UAAA,gBAAAS;AAAA,QAACd;AAAA,QAAA;AAAA,UACE,GAAGO;AAAA,UACJ,MAAMK;AAAA,UACN,aAAaC;AAAA,UACb,OAAAV;AAAA,UACA,qBAAAC;AAAA,UACA,WAAWW,EAAGT,GAAWD,GAAS,MAAMG,KAAY,oBAAoB;AAAA,QAAA;AAAA,MAAA;AAAA,IAC1E;AAAA,EAAA;AAGN;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("phosphor-strokes-icons/icons/ArrowCounterClockwise"),r=require("phosphor-strokes-icons/icons/BoundingBox"),t=require("phosphor-strokes-icons/icons/Briefcase"),n=require("phosphor-strokes-icons/icons/Building"),o=require("phosphor-strokes-icons/icons/Buildings"),i=require("phosphor-strokes-icons/icons/CaretDown"),u=require("phosphor-strokes-icons/icons/CaretLeft"),c=require("phosphor-strokes-icons/icons/CaretRight"),a=require("phosphor-strokes-icons/icons/CaretUp"),l=require("phosphor-strokes-icons/icons/CaretUpDown"),s=require("phosphor-strokes-icons/icons/ChartLine"),b=require("phosphor-strokes-icons/icons/Check"),g=require("phosphor-strokes-icons/icons/CheckCircle"),p=require("phosphor-strokes-icons/icons/Clock"),d=require("phosphor-strokes-icons/icons/CreditCard"),P=require("phosphor-strokes-icons/icons/DotsThree"),y=require("phosphor-strokes-icons/icons/DownloadSimple"),f=require("phosphor-strokes-icons/icons/EnvelopeSimple"),m=require("phosphor-strokes-icons/icons/Eye"),C=require("phosphor-strokes-icons/icons/EyeSlash"),q=require("phosphor-strokes-icons/icons/FileText"),j=require("phosphor-strokes-icons/icons/Folder"),O=require("phosphor-strokes-icons/icons/Funnel"),h=require("phosphor-strokes-icons/icons/Gear"),k=require("phosphor-strokes-icons/icons/Info"),L=require("phosphor-strokes-icons/icons/LockKey"),S=require("phosphor-strokes-icons/icons/MagnifyingGlass"),w=require("phosphor-strokes-icons/icons/MaxLogo"),B=require("phosphor-strokes-icons/icons/Package"),F=require("phosphor-strokes-icons/icons/Pencil"),U=require("phosphor-strokes-icons/icons/Phone"),T=require("phosphor-strokes-icons/icons/Plus"),D=require("phosphor-strokes-icons/icons/PresentationChart"),G=require("phosphor-strokes-icons/icons/SpinnerGap"),W=require("phosphor-strokes-icons/icons/TelegramLogo"),x=require("phosphor-strokes-icons/icons/Trash"),E=require("phosphor-strokes-icons/icons/UserCircleGear"),M=require("phosphor-strokes-icons/icons/Users"),A=require("phosphor-strokes-icons/icons/UsersFour"),I=require("phosphor-strokes-icons/icons/Warning"),X=require("phosphor-strokes-icons/icons/WarningCircle"),_=require("phosphor-strokes-icons/icons/WhatsAppLogoFilled"),v=require("phosphor-strokes-icons/icons/Wrench"),K=require("phosphor-strokes-icons/icons/X"),R=require("phosphor-strokes-icons/icons/XCircle"),z=require("./components-icons-stroke-icon.cjs"),H=require("./components-ui-icon-icon-presets.cjs");Object.defineProperty(exports,"ArrowCounterClockwise",{enumerable:!0,get:()=>e.ArrowCounterClockwise});Object.defineProperty(exports,"BoundingBox",{enumerable:!0,get:()=>r.BoundingBox});Object.defineProperty(exports,"Briefcase",{enumerable:!0,get:()=>t.Briefcase});Object.defineProperty(exports,"Building",{enumerable:!0,get:()=>n.Building});Object.defineProperty(exports,"Buildings",{enumerable:!0,get:()=>o.Buildings});Object.defineProperty(exports,"CaretDown",{enumerable:!0,get:()=>i.CaretDown});Object.defineProperty(exports,"CaretLeft",{enumerable:!0,get:()=>u.CaretLeft});Object.defineProperty(exports,"CaretRight",{enumerable:!0,get:()=>c.CaretRight});Object.defineProperty(exports,"CaretUp",{enumerable:!0,get:()=>a.CaretUp});Object.defineProperty(exports,"CaretUpDown",{enumerable:!0,get:()=>l.CaretUpDown});Object.defineProperty(exports,"ChartLine",{enumerable:!0,get:()=>s.ChartLine});Object.defineProperty(exports,"Check",{enumerable:!0,get:()=>b.Check});Object.defineProperty(exports,"CheckCircle",{enumerable:!0,get:()=>g.CheckCircle});Object.defineProperty(exports,"Clock",{enumerable:!0,get:()=>p.Clock});Object.defineProperty(exports,"CreditCard",{enumerable:!0,get:()=>d.CreditCard});Object.defineProperty(exports,"DotsThree",{enumerable:!0,get:()=>P.DotsThree});Object.defineProperty(exports,"DownloadSimple",{enumerable:!0,get:()=>y.DownloadSimple});Object.defineProperty(exports,"EnvelopeSimple",{enumerable:!0,get:()=>f.EnvelopeSimple});Object.defineProperty(exports,"Eye",{enumerable:!0,get:()=>m.Eye});Object.defineProperty(exports,"EyeSlash",{enumerable:!0,get:()=>C.EyeSlash});Object.defineProperty(exports,"FileText",{enumerable:!0,get:()=>q.FileText});Object.defineProperty(exports,"Folder",{enumerable:!0,get:()=>j.Folder});Object.defineProperty(exports,"Funnel",{enumerable:!0,get:()=>O.Funnel});Object.defineProperty(exports,"Gear",{enumerable:!0,get:()=>h.Gear});Object.defineProperty(exports,"Info",{enumerable:!0,get:()=>k.Info});Object.defineProperty(exports,"LockKey",{enumerable:!0,get:()=>L.LockKey});Object.defineProperty(exports,"MagnifyingGlass",{enumerable:!0,get:()=>S.MagnifyingGlass});Object.defineProperty(exports,"MaxLogo",{enumerable:!0,get:()=>w.MaxLogo});Object.defineProperty(exports,"Package",{enumerable:!0,get:()=>B.Package});Object.defineProperty(exports,"Pencil",{enumerable:!0,get:()=>F.Pencil});Object.defineProperty(exports,"Phone",{enumerable:!0,get:()=>U.Phone});Object.defineProperty(exports,"Plus",{enumerable:!0,get:()=>T.Plus});Object.defineProperty(exports,"PresentationChart",{enumerable:!0,get:()=>D.PresentationChart});Object.defineProperty(exports,"SpinnerGap",{enumerable:!0,get:()=>G.SpinnerGap});Object.defineProperty(exports,"TelegramLogo",{enumerable:!0,get:()=>W.TelegramLogo});Object.defineProperty(exports,"Trash",{enumerable:!0,get:()=>x.Trash});Object.defineProperty(exports,"UserCircleGear",{enumerable:!0,get:()=>E.UserCircleGear});Object.defineProperty(exports,"Users",{enumerable:!0,get:()=>M.Users});Object.defineProperty(exports,"UsersFour",{enumerable:!0,get:()=>A.UsersFour});Object.defineProperty(exports,"Warning",{enumerable:!0,get:()=>I.Warning});Object.defineProperty(exports,"WarningCircle",{enumerable:!0,get:()=>X.WarningCircle});Object.defineProperty(exports,"WhatsAppLogoFilled",{enumerable:!0,get:()=>_.WhatsAppLogoFilled});Object.defineProperty(exports,"Wrench",{enumerable:!0,get:()=>v.Wrench});Object.defineProperty(exports,"X",{enumerable:!0,get:()=>K.X});Object.defineProperty(exports,"XCircle",{enumerable:!0,get:()=>R.XCircle});exports.StrokeIcon=z.StrokeIcon;exports.iconPresets=H.iconPresets;
2
+ //# sourceMappingURL=components-icons.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"components-icons.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,97 @@
1
+ import { ArrowCounterClockwise as e } from "phosphor-strokes-icons/icons/ArrowCounterClockwise";
2
+ import { BoundingBox as p } from "phosphor-strokes-icons/icons/BoundingBox";
3
+ import { Briefcase as m } from "phosphor-strokes-icons/icons/Briefcase";
4
+ import { Building as n } from "phosphor-strokes-icons/icons/Building";
5
+ import { Buildings as a } from "phosphor-strokes-icons/icons/Buildings";
6
+ import { CaretDown as s } from "phosphor-strokes-icons/icons/CaretDown";
7
+ import { CaretLeft as c } from "phosphor-strokes-icons/icons/CaretLeft";
8
+ import { CaretRight as h } from "phosphor-strokes-icons/icons/CaretRight";
9
+ import { CaretUp as k } from "phosphor-strokes-icons/icons/CaretUp";
10
+ import { CaretUpDown as L } from "phosphor-strokes-icons/icons/CaretUpDown";
11
+ import { ChartLine as w } from "phosphor-strokes-icons/icons/ChartLine";
12
+ import { Check as F } from "phosphor-strokes-icons/icons/Check";
13
+ import { CheckCircle as U } from "phosphor-strokes-icons/icons/CheckCircle";
14
+ import { Clock as D } from "phosphor-strokes-icons/icons/Clock";
15
+ import { CreditCard as T } from "phosphor-strokes-icons/icons/CreditCard";
16
+ import { DotsThree as E } from "phosphor-strokes-icons/icons/DotsThree";
17
+ import { DownloadSimple as I } from "phosphor-strokes-icons/icons/DownloadSimple";
18
+ import { EnvelopeSimple as X } from "phosphor-strokes-icons/icons/EnvelopeSimple";
19
+ import { Eye as K } from "phosphor-strokes-icons/icons/Eye";
20
+ import { EyeSlash as b } from "phosphor-strokes-icons/icons/EyeSlash";
21
+ import { FileText as q } from "phosphor-strokes-icons/icons/FileText";
22
+ import { Folder as H } from "phosphor-strokes-icons/icons/Folder";
23
+ import { Funnel as N } from "phosphor-strokes-icons/icons/Funnel";
24
+ import { Gear as Q } from "phosphor-strokes-icons/icons/Gear";
25
+ import { Info as Y } from "phosphor-strokes-icons/icons/Info";
26
+ import { LockKey as _ } from "phosphor-strokes-icons/icons/LockKey";
27
+ import { MagnifyingGlass as rr } from "phosphor-strokes-icons/icons/MagnifyingGlass";
28
+ import { MaxLogo as er } from "phosphor-strokes-icons/icons/MaxLogo";
29
+ import { Package as pr } from "phosphor-strokes-icons/icons/Package";
30
+ import { Pencil as mr } from "phosphor-strokes-icons/icons/Pencil";
31
+ import { Phone as nr } from "phosphor-strokes-icons/icons/Phone";
32
+ import { Plus as ar } from "phosphor-strokes-icons/icons/Plus";
33
+ import { PresentationChart as sr } from "phosphor-strokes-icons/icons/PresentationChart";
34
+ import { SpinnerGap as cr } from "phosphor-strokes-icons/icons/SpinnerGap";
35
+ import { TelegramLogo as hr } from "phosphor-strokes-icons/icons/TelegramLogo";
36
+ import { Trash as kr } from "phosphor-strokes-icons/icons/Trash";
37
+ import { UserCircleGear as Lr } from "phosphor-strokes-icons/icons/UserCircleGear";
38
+ import { Users as wr } from "phosphor-strokes-icons/icons/Users";
39
+ import { UsersFour as Fr } from "phosphor-strokes-icons/icons/UsersFour";
40
+ import { Warning as Ur } from "phosphor-strokes-icons/icons/Warning";
41
+ import { WarningCircle as Dr } from "phosphor-strokes-icons/icons/WarningCircle";
42
+ import { WhatsAppLogoFilled as Tr } from "phosphor-strokes-icons/icons/WhatsAppLogoFilled";
43
+ import { Wrench as Er } from "phosphor-strokes-icons/icons/Wrench";
44
+ import { X as Ir } from "phosphor-strokes-icons/icons/X";
45
+ import { XCircle as Xr } from "phosphor-strokes-icons/icons/XCircle";
46
+ import { StrokeIcon as Kr } from "./components-icons-stroke-icon.js";
47
+ import { iconPresets as br } from "./components-ui-icon-icon-presets.js";
48
+ export {
49
+ e as ArrowCounterClockwise,
50
+ p as BoundingBox,
51
+ m as Briefcase,
52
+ n as Building,
53
+ a as Buildings,
54
+ s as CaretDown,
55
+ c as CaretLeft,
56
+ h as CaretRight,
57
+ k as CaretUp,
58
+ L as CaretUpDown,
59
+ w as ChartLine,
60
+ F as Check,
61
+ U as CheckCircle,
62
+ D as Clock,
63
+ T as CreditCard,
64
+ E as DotsThree,
65
+ I as DownloadSimple,
66
+ X as EnvelopeSimple,
67
+ K as Eye,
68
+ b as EyeSlash,
69
+ q as FileText,
70
+ H as Folder,
71
+ N as Funnel,
72
+ Q as Gear,
73
+ Y as Info,
74
+ _ as LockKey,
75
+ rr as MagnifyingGlass,
76
+ er as MaxLogo,
77
+ pr as Package,
78
+ mr as Pencil,
79
+ nr as Phone,
80
+ ar as Plus,
81
+ sr as PresentationChart,
82
+ cr as SpinnerGap,
83
+ Kr as StrokeIcon,
84
+ hr as TelegramLogo,
85
+ kr as Trash,
86
+ Lr as UserCircleGear,
87
+ wr as Users,
88
+ Fr as UsersFour,
89
+ Ur as Warning,
90
+ Dr as WarningCircle,
91
+ Tr as WhatsAppLogoFilled,
92
+ Er as Wrench,
93
+ Ir as X,
94
+ Xr as XCircle,
95
+ br as iconPresets
96
+ };
97
+ //# sourceMappingURL=components-icons.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"components-icons.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,5 +1,5 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./brd-ui-kit.css');const r=require("react/jsx-runtime");;/* empty css */const g=require("./lib-utils.cjs");require("class-variance-authority");const c=require("react");require("./components-ui-badge-badge.styles.cjs");const y=require("./components-ui-button-button.cjs");require("./components-ui-button-button.styles.cjs");require("./components-ui-card-card.cjs");require("./components-ui-checkbox-checkbox.cjs");const s=require("./components-ui-icon-icon.cjs");require("./calendar-DReGV_22.cjs");require("./components-ui-combobox-combobox.cjs");require("./components-ui-dialog-dialog.cjs");require("./components-ui-label-label.cjs");require("./components-ui-separator-separator.cjs");require("./components-ui-field-field.styles.cjs");require("./components-ui-input-input.styles.cjs");require("./components-ui-textarea-textarea.cjs");require("./components-ui-input-group-input-group.styles.cjs");require("./components-ui-navigation-item-navigation-item.styles.cjs");require("./components-ui-navigation-menu-navigation-menu.styles.cjs");require("./components-ui-pagination-pagination.cjs");require("./components-ui-progress-progress.cjs");require("./components-ui-radio-group-radio-group.cjs");require("./components-ui-switch-switch.cjs");require("./components-ui-toggle-toggle.styles.cjs");require("./components-ui-toggle-group-toggle-group.cjs");require("./components-ui-table-table.cjs");require("./components-ui-tabs-tabs.cjs");require("./components-ui-tooltip-tooltip.cjs");require("./components-ui-typography-typography.styles.cjs");const v=require("./hooks-usePopupControls.cjs");require("./components-app-pagination-app-pagination.styles.cjs");require("./components-app-sidebar-app-sidebar.styles.cjs");require("./components-data-table-data-table.styles.cjs");require("./components-ui-dropdown-menu-dropdown-menu.styles.cjs");const _=require("./components-input-field-input-field.cjs");require("./components-select-field-select-field.cjs");require("./lodash-kqhtUJfz.cjs");require("./chart-C69jBlXa.cjs");require("./index-DGxwh2Ms.cjs");require("./index-fTTv8YY8.cjs");const j=require("./components-input-phone-input-phone.cjs"),w=[{label:"Мобильный",icon:"phone"},{label:"Telegram",icon:"telegram-logo"},{label:"WhatsApp",icon:"whats-app-logo-filled"},{label:"Max",icon:"max-logo"},{label:"E-mail",icon:"envelope-simple"}],q=n=>{switch(n){case"max-logo":return{bgColor:"bg-[linear-gradient(135deg,#9933DD_0%,#2831B9_50%,#44CCFF_100%)]"};case"telegram-logo":return{bgColor:"bg-[#289AD2]"};case"whats-app-logo-filled":return{bgColor:"bg-[#00C202]",textColor:"text-[#00C202]"};default:return{}}},a=n=>({wrapper:g.cn(`flex h-5.5 w-5.5 shrink-0 items-center justify-center rounded-sm
2
- ${q(n).bgColor??"bg-primary-inverse-hover-bg"}
3
- ${q(n).textColor??"text-primary-inverse-text"}`),icon:"size-5 shrink-0"}),P=n=>{const{inputProps:h,inputPhoneProps:x,onTypeChange:b,...p}=n,[o,C]=c.useState("phone"),{isOpened:t,openPopup:m,closePopup:u}=v.usePopupControls(),l=c.useRef(null);c.useEffect(()=>{const e=i=>{l.current&&!l.current.contains(i.target)&&u()};return t&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[t,u]);const d=e=>{switch(e){case"phone":return"+7 (999) 999-99-99";case"telegram-logo":return"@username";case"whats-app-logo-filled":return"+7 (999) 999-99-99";case"max-logo":return"ID пользователя Max";case"envelope-simple":return"example@mail.com";default:return"Введите значение"}},f=e=>()=>{C(e),b?.(e),u()};return r.jsxs("div",{className:g.cn("relative",n.classes?.container),children:[["telegram-logo","max-logo","envelope-simple"].includes(o)?r.jsx(_.InputField,{...h,...p,date:[{id:"0",position:"inline-start",component:r.jsx(s.Icon,{type:o,size:"medium",classes:a(o)})},{id:"1",position:"inline-end",component:r.jsx(s.Icon,{type:t?"caret-up":"caret-down",size:"medium",className:"cursor-pointer",onClick:m})}],placeholder:d(o)}):r.jsx(j.InputPhone,{...x,...p,date:[{id:"0",position:"inline-start",component:r.jsx(s.Icon,{type:o,size:"medium",classes:a(o)})},{id:"1",position:"inline-end",component:r.jsx(s.Icon,{type:t?"caret-up":"caret-down",size:"medium",className:"cursor-pointer",onClick:m})}],placeholder:d(o)}),t&&r.jsx("div",{className:`border-inp-hover-border bg-primary-bg absolute my-2 flex w-full
4
- flex-col rounded-xl border`,ref:l,children:w.map(({label:e,icon:i})=>r.jsxs(y.Button,{variant:"ghost",className:"flex w-full justify-start",type:"button",onClick:f(i),children:[r.jsx(s.Icon,{type:i,size:"medium",className:"text-primary-inverse-text",classes:a(i)}),e]},e))})]})};exports.InputContact=P;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./brd-ui-kit.css');const r=require("react/jsx-runtime"),j=require("phosphor-strokes-icons/icons/CaretDown"),y=require("phosphor-strokes-icons/icons/CaretUp"),_=require("phosphor-strokes-icons/icons/EnvelopeSimple"),k=require("phosphor-strokes-icons/icons/MaxLogo"),S=require("phosphor-strokes-icons/icons/Phone"),i=require("./components-icons-stroke-icon.cjs"),T=require("phosphor-strokes-icons/icons/TelegramLogo"),L=require("phosphor-strokes-icons/icons/WhatsAppLogoFilled");;/* empty css */const C=require("./lib-utils.cjs");require("class-variance-authority");require("./components-ui-badge-badge.styles.cjs");const F=require("./components-ui-button-button.cjs");require("./components-ui-button-button.styles.cjs");require("./components-ui-card-card.cjs");require("./components-ui-checkbox-checkbox.cjs");const N=require("./hooks-usePopupControls.cjs");require("./calendar-PqChui7l.cjs");require("phosphor-strokes-icons/icons");require("./components-ui-combobox-combobox.cjs");require("./components-ui-dialog-dialog.cjs");const c=require("react");require("./components-ui-label-label.cjs");require("./components-ui-separator-separator.cjs");require("./components-ui-field-field.styles.cjs");require("./components-ui-input-input.styles.cjs");require("./components-ui-textarea-textarea.cjs");require("./components-ui-input-group-input-group.styles.cjs");require("./components-ui-navigation-item-navigation-item.styles.cjs");require("./components-ui-navigation-menu-navigation-menu.styles.cjs");require("./components-ui-pagination-pagination.cjs");require("./components-ui-progress-progress.cjs");require("./components-ui-radio-group-radio-group.cjs");require("./components-ui-switch-switch.cjs");require("./components-ui-toggle-toggle.styles.cjs");require("./components-ui-toggle-group-toggle-group.cjs");require("./components-ui-table-table.cjs");require("./components-ui-tabs-tabs.cjs");require("./components-ui-tooltip-tooltip.cjs");require("./components-ui-typography-typography.styles.cjs");require("phosphor-strokes-icons/icons/CaretLeft");require("phosphor-strokes-icons/icons/CaretRight");require("./components-app-pagination-app-pagination.styles.cjs");require("phosphor-strokes-icons/icons/CaretUpDown");require("./components-app-sidebar-app-sidebar.styles.cjs");require("./components-data-table-data-table.styles.cjs");require("./components-ui-dropdown-menu-dropdown-menu.styles.cjs");const z=require("./components-input-field-input-field.cjs");require("phosphor-strokes-icons/icons/Eye");require("phosphor-strokes-icons/icons/EyeSlash");require("./components-select-field-select-field.cjs");require("./lodash-kqhtUJfz.cjs");require("./chart-9H_9wEfR.cjs");require("phosphor-strokes-icons/icons/CheckCircle");require("phosphor-strokes-icons/icons/Info");require("phosphor-strokes-icons/icons/SpinnerGap");require("phosphor-strokes-icons/icons/Warning");require("phosphor-strokes-icons/icons/X");require("phosphor-strokes-icons/icons/XCircle");require("./index-DGxwh2Ms.cjs");require("./index-fTTv8YY8.cjs");require("phosphor-strokes-icons/icons/Plus");const D=require("./components-input-phone-input-phone.cjs"),E=[{label:"Мобильный",icon:"phone"},{label:"Telegram",icon:"telegram-logo"},{label:"WhatsApp",icon:"whats-app-logo-filled"},{label:"Max",icon:"max-logo"},{label:"E-mail",icon:"envelope-simple"}],h={phone:S.Phone,"telegram-logo":T.TelegramLogo,"whats-app-logo-filled":L.WhatsAppLogoFilled,"max-logo":k.MaxLogo,"envelope-simple":_.EnvelopeSimple},x=o=>{switch(o){case"max-logo":return{bgColor:"bg-[linear-gradient(135deg,#9933DD_0%,#2831B9_50%,#44CCFF_100%)]"};case"telegram-logo":return{bgColor:"bg-[#289AD2]"};case"whats-app-logo-filled":return{bgColor:"bg-[#00C202]",textColor:"text-[#00C202]"};default:return{}}},a=o=>({wrapper:C.cn(`flex h-5.5 w-5.5 shrink-0 items-center justify-center rounded-sm
2
+ ${x(o).bgColor??"bg-primary-inverse-hover-bg"}
3
+ ${x(o).textColor??"text-primary-inverse-text"}`),icon:"size-5 shrink-0"}),O=o=>{const{inputProps:b,inputPhoneProps:f,onTypeChange:v,...p}=o,[n,I]=c.useState("phone"),{isOpened:s,openPopup:q,closePopup:u}=N.usePopupControls(),l=c.useRef(null);c.useEffect(()=>{const e=t=>{l.current&&!l.current.contains(t.target)&&u()};return s&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[s,u]);const m=e=>{switch(e){case"phone":return"+7 (999) 999-99-99";case"telegram-logo":return"@username";case"whats-app-logo-filled":return"+7 (999) 999-99-99";case"max-logo":return"ID пользователя Max";case"envelope-simple":return"example@mail.com";default:return"Введите значение"}},w=e=>()=>{I(e),v?.(e),u()},d=h[n],g=s?y.CaretUp:j.CaretDown;return r.jsxs("div",{className:C.cn("relative",o.classes?.container),children:[["telegram-logo","max-logo","envelope-simple"].includes(n)?r.jsx(z.InputField,{...b,...p,date:[{id:"0",position:"inline-start",component:r.jsx(i.StrokeIcon,{icon:d,size:"medium",classes:a(n)})},{id:"1",position:"inline-end",component:r.jsx(i.StrokeIcon,{icon:g,size:"medium",className:"cursor-pointer",onClick:q})}],placeholder:m(n)}):r.jsx(D.InputPhone,{...f,...p,date:[{id:"0",position:"inline-start",component:r.jsx(i.StrokeIcon,{icon:d,size:"medium",classes:a(n)})},{id:"1",position:"inline-end",component:r.jsx(i.StrokeIcon,{icon:g,size:"medium",className:"cursor-pointer",onClick:q})}],placeholder:m(n)}),s&&r.jsx("div",{className:`border-inp-hover-border bg-primary-bg absolute my-2 flex w-full
4
+ flex-col rounded-xl border`,ref:l,children:E.map(({label:e,icon:t})=>{const P=h[t];return r.jsxs(F.Button,{variant:"ghost",className:"flex w-full justify-start",type:"button",onClick:w(t),children:[r.jsx(i.StrokeIcon,{icon:P,size:"medium",className:"text-primary-inverse-text",classes:a(t)}),e]},e)})})]})};exports.InputContact=O;
5
5
  //# sourceMappingURL=components-input-contact-input-contact.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"components-input-contact-input-contact.cjs","sources":["../src/constants/contact-input.ts","../src/components/input-contact/input-contact.tsx"],"sourcesContent":["import type { TOption } from \"@/components/input-contact/input-contact\";\n\nexport const OPTIONS: TOption[] = [\n {\n label: \"Мобильный\",\n icon: \"phone\",\n },\n {\n label: \"Telegram\",\n icon: \"telegram-logo\",\n },\n {\n label: \"WhatsApp\",\n icon: \"whats-app-logo-filled\",\n },\n {\n label: \"Max\",\n icon: \"max-logo\",\n },\n {\n label: \"E-mail\",\n icon: \"envelope-simple\",\n },\n];\n","import { OPTIONS } from \"@/constants/contact-input\";\nimport {\n Button,\n Icon,\n InputField,\n InputPhone,\n cn,\n usePopupControls,\n type InputPhoneProps,\n} from \"@/index\";\nimport { useEffect, useRef, useState } from \"react\";\n\nexport type TOption = {\n label: string;\n icon: TypesChange;\n};\n\ntype TypesChange =\n | \"phone\"\n | \"telegram-logo\"\n | \"whats-app-logo-filled\"\n | \"max-logo\"\n | \"envelope-simple\";\n\ntype Props = {\n isValid?: boolean;\n label?: string;\n description?: string;\n classes?: {\n fieldset?: string;\n fieldgroup?: string;\n field?: string;\n container?: string;\n };\n value?: string;\n name?: string;\n onTypeChange?: (type: TypesChange) => void;\n inputProps: React.ComponentPropsWithRef<\"input\">;\n inputPhoneProps: InputPhoneProps;\n};\n\n// TODO: заменить цвета\nconst iconStyles = (icon: TypesChange) => {\n switch (icon) {\n case \"max-logo\":\n return {\n bgColor: \"bg-[linear-gradient(135deg,#9933DD_0%,#2831B9_50%,#44CCFF_100%)]\",\n };\n\n case \"telegram-logo\":\n return {\n bgColor: \"bg-[#289AD2]\",\n };\n\n case \"whats-app-logo-filled\":\n return {\n bgColor: \"bg-[#00C202]\",\n textColor: \"text-[#00C202]\",\n };\n\n default:\n return {};\n }\n};\n\nconst getContactIconClasses = (icon: TypesChange) => ({\n wrapper: cn(\n `flex h-5.5 w-5.5 shrink-0 items-center justify-center rounded-sm\n ${iconStyles(icon).bgColor ?? \"bg-primary-inverse-hover-bg\"}\n ${iconStyles(icon).textColor ?? \"text-primary-inverse-text\"}`,\n ),\n icon: \"size-5 shrink-0\",\n});\n\nexport const InputContact = (props: Props) => {\n const { inputProps, inputPhoneProps, onTypeChange, ...rest } = props;\n\n const [type, setType] = useState<TypesChange>(\"phone\");\n const { isOpened, openPopup, closePopup } = usePopupControls();\n const wrapperRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (wrapperRef.current && !wrapperRef.current.contains(event.target as Node)) {\n closePopup();\n }\n };\n\n if (isOpened) {\n document.addEventListener(\"mousedown\", handleClickOutside);\n }\n\n return () => {\n document.removeEventListener(\"mousedown\", handleClickOutside);\n };\n }, [isOpened, closePopup]);\n\n const getPlaceholder = (type: TypesChange): string => {\n switch (type) {\n case \"phone\":\n return \"+7 (999) 999-99-99\";\n case \"telegram-logo\":\n return \"@username\";\n case \"whats-app-logo-filled\":\n return \"+7 (999) 999-99-99\";\n case \"max-logo\":\n return \"ID пользователя Max\";\n case \"envelope-simple\":\n return \"example@mail.com\";\n default:\n return \"Введите значение\";\n }\n };\n\n const handleTypeChange = (type: TypesChange) => {\n return () => {\n setType(type);\n onTypeChange?.(type);\n closePopup();\n };\n };\n\n return (\n <div className={cn(\"relative\", props.classes?.container)}>\n {[\"telegram-logo\", \"max-logo\", \"envelope-simple\"].includes(type) ? (\n <InputField\n {...inputProps}\n {...rest}\n date={[\n {\n id: \"0\",\n position: \"inline-start\",\n component: (\n <Icon\n type={type}\n size=\"medium\"\n classes={getContactIconClasses(type)}\n />\n ),\n },\n {\n id: \"1\",\n position: \"inline-end\",\n component: (\n <Icon\n type={isOpened ? \"caret-up\" : \"caret-down\"}\n size=\"medium\"\n className=\"cursor-pointer\"\n onClick={openPopup}\n />\n ),\n },\n ]}\n placeholder={getPlaceholder(type)}\n />\n ) : (\n <InputPhone\n {...inputPhoneProps}\n {...rest}\n date={[\n {\n id: \"0\",\n position: \"inline-start\",\n component: (\n <Icon\n type={type}\n size=\"medium\"\n classes={getContactIconClasses(type)}\n />\n ),\n },\n {\n id: \"1\",\n position: \"inline-end\",\n component: (\n <Icon\n type={isOpened ? \"caret-up\" : \"caret-down\"}\n size=\"medium\"\n className=\"cursor-pointer\"\n onClick={openPopup}\n />\n ),\n },\n ]}\n placeholder={getPlaceholder(type)}\n />\n )}\n\n {isOpened && (\n <div\n className=\"border-inp-hover-border bg-primary-bg absolute my-2 flex w-full\n flex-col rounded-xl border\"\n ref={wrapperRef}\n >\n {OPTIONS.map(({ label, icon }) => {\n return (\n <Button\n key={label}\n variant=\"ghost\"\n className=\"flex w-full justify-start\"\n type=\"button\"\n onClick={handleTypeChange(icon)}\n >\n <Icon\n type={icon}\n size=\"medium\"\n className=\"text-primary-inverse-text\"\n classes={getContactIconClasses(icon)}\n />\n\n {label}\n </Button>\n );\n })}\n </div>\n )}\n </div>\n );\n};\n\nexport type { Props as InputContactProps, TypesChange };\n"],"names":["OPTIONS","iconStyles","icon","getContactIconClasses","cn","InputContact","props","inputProps","inputPhoneProps","onTypeChange","rest","type","setType","useState","isOpened","openPopup","closePopup","usePopupControls","wrapperRef","useRef","useEffect","handleClickOutside","event","getPlaceholder","handleTypeChange","jsxs","jsx","InputField","Icon","InputPhone","label","Button"],"mappings":"uqEAEaA,EAAqB,CAChC,CACE,MAAO,YACP,KAAM,OAAA,EAER,CACE,MAAO,WACP,KAAM,eAAA,EAER,CACE,MAAO,WACP,KAAM,uBAAA,EAER,CACE,MAAO,MACP,KAAM,UAAA,EAER,CACE,MAAO,SACP,KAAM,iBAAA,CAEV,ECmBMC,EAAcC,GAAsB,CACxC,OAAQA,EAAA,CACN,IAAK,WACH,MAAO,CACL,QAAS,kEAAA,EAGb,IAAK,gBACH,MAAO,CACL,QAAS,cAAA,EAGb,IAAK,wBACH,MAAO,CACL,QAAS,eACT,UAAW,gBAAA,EAGf,QACE,MAAO,CAAA,CAAC,CAEd,EAEMC,EAAyBD,IAAuB,CACpD,QAASE,EAAAA,GACP;AAAA,MACEH,EAAWC,CAAI,EAAE,SAAW,6BAA6B;AAAA,MACzDD,EAAWC,CAAI,EAAE,WAAa,2BAA2B,EAAA,EAE7D,KAAM,iBACR,GAEaG,EAAgBC,GAAiB,CAC5C,KAAM,CAAE,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BACV,QAASC,CAAA,CAAA,CACX,CAEJ,EAEF,YAAaQ,EAAeZ,CAAI,CAAA,CAAA,EAGlCe,EAAAA,IAACG,EAAAA,WAAA,CACE,GAAGrB,EACH,GAAGE,EACJ,KAAM,CACJ,CACE,GAAI,IACJ,SAAU,eACV,UACEgB,EAAAA,IAACE,EAAAA,KAAA,CACC,KAAAjB,EACA,KAAK,SACL,QAASR,EAAsBQ,CAAI,CAAA,CAAA,CACrC,EAGJ,CACE,GAAI,IACJ,SAAU,aACV,UACEe,EAAAA,IAACE,EAAAA,KAAA,CACC,KAAMd,EAAW,WAAa,aAC9B,KAAK,SACL,UAAU,iBACV,QAASC,CAAA,CAAA,CACX,CAEJ,EAEF,YAAaQ,EAAeZ,CAAI,CAAA,CAAA,EAInCG,GACCY,EAAAA,IAAC,MAAA,CACC,UAAU;AAAA,wCAEV,IAAKR,EAEJ,WAAQ,IAAI,CAAC,CAAE,MAAAY,EAAO,KAAA5B,KAEnBuB,EAAAA,KAACM,EAAAA,OAAA,CAEC,QAAQ,QACR,UAAU,4BACV,KAAK,SACL,QAASP,EAAiBtB,CAAI,EAE9B,SAAA,CAAAwB,EAAAA,IAACE,EAAAA,KAAA,CACC,KAAM1B,EACN,KAAK,SACL,UAAU,4BACV,QAASC,EAAsBD,CAAI,CAAA,CAAA,EAGpC4B,CAAA,CAAA,EAbIA,CAAA,CAgBV,CAAA,CAAA,CACH,EAEJ,CAEJ"}
1
+ {"version":3,"file":"components-input-contact-input-contact.cjs","sources":["../src/constants/contact-input.ts","../src/components/input-contact/input-contact.tsx"],"sourcesContent":["import type { TOption } from \"@/components/input-contact/input-contact\";\n\nexport const OPTIONS: TOption[] = [\n {\n label: \"Мобильный\",\n icon: \"phone\",\n },\n {\n label: \"Telegram\",\n icon: \"telegram-logo\",\n },\n {\n label: \"WhatsApp\",\n icon: \"whats-app-logo-filled\",\n },\n {\n label: \"Max\",\n icon: \"max-logo\",\n },\n {\n label: \"E-mail\",\n icon: \"envelope-simple\",\n },\n];\n","import { OPTIONS } from \"@/constants/contact-input\";\nimport { CaretDown } from \"@/components/icons/CaretDown\";\nimport { CaretUp } from \"@/components/icons/CaretUp\";\nimport { EnvelopeSimple } from \"@/components/icons/EnvelopeSimple\";\nimport { MaxLogo } from \"@/components/icons/MaxLogo\";\nimport { Phone } from \"@/components/icons/Phone\";\nimport { StrokeIcon, type StrokeIconComponent } from \"@/components/icons/stroke-icon\";\nimport { TelegramLogo } from \"@/components/icons/TelegramLogo\";\nimport { WhatsAppLogoFilled } from \"@/components/icons/WhatsAppLogoFilled\";\nimport {\n Button,\n InputField,\n InputPhone,\n cn,\n usePopupControls,\n type InputPhoneProps,\n} from \"@/index\";\nimport { useEffect, useRef, useState } from \"react\";\n\nexport type TOption = {\n label: string;\n icon: TypesChange;\n};\n\ntype TypesChange =\n | \"phone\"\n | \"telegram-logo\"\n | \"whats-app-logo-filled\"\n | \"max-logo\"\n | \"envelope-simple\";\n\nconst contactIcons: Record<TypesChange, StrokeIconComponent> = {\n phone: Phone,\n \"telegram-logo\": TelegramLogo,\n \"whats-app-logo-filled\": WhatsAppLogoFilled,\n \"max-logo\": MaxLogo,\n \"envelope-simple\": EnvelopeSimple,\n};\n\ntype Props = {\n isValid?: boolean;\n label?: string;\n description?: string;\n classes?: {\n fieldset?: string;\n fieldgroup?: string;\n field?: string;\n container?: string;\n };\n value?: string;\n name?: string;\n onTypeChange?: (type: TypesChange) => void;\n inputProps: React.ComponentPropsWithRef<\"input\">;\n inputPhoneProps: InputPhoneProps;\n};\n\n// TODO: заменить цвета\nconst iconStyles = (icon: TypesChange) => {\n switch (icon) {\n case \"max-logo\":\n return {\n bgColor: \"bg-[linear-gradient(135deg,#9933DD_0%,#2831B9_50%,#44CCFF_100%)]\",\n };\n\n case \"telegram-logo\":\n return {\n bgColor: \"bg-[#289AD2]\",\n };\n\n case \"whats-app-logo-filled\":\n return {\n bgColor: \"bg-[#00C202]\",\n textColor: \"text-[#00C202]\",\n };\n\n default:\n return {};\n }\n};\n\nconst getContactIconClasses = (icon: TypesChange) => ({\n wrapper: cn(\n `flex h-5.5 w-5.5 shrink-0 items-center justify-center rounded-sm\n ${iconStyles(icon).bgColor ?? \"bg-primary-inverse-hover-bg\"}\n ${iconStyles(icon).textColor ?? \"text-primary-inverse-text\"}`,\n ),\n icon: \"size-5 shrink-0\",\n});\n\nexport const InputContact = (props: Props) => {\n const { inputProps, inputPhoneProps, onTypeChange, ...rest } = props;\n\n const [type, setType] = useState<TypesChange>(\"phone\");\n const { isOpened, openPopup, closePopup } = usePopupControls();\n const wrapperRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (wrapperRef.current && !wrapperRef.current.contains(event.target as Node)) {\n closePopup();\n }\n };\n\n if (isOpened) {\n document.addEventListener(\"mousedown\", handleClickOutside);\n }\n\n return () => {\n document.removeEventListener(\"mousedown\", handleClickOutside);\n };\n }, [isOpened, closePopup]);\n\n const getPlaceholder = (type: TypesChange): string => {\n switch (type) {\n case \"phone\":\n return \"+7 (999) 999-99-99\";\n case \"telegram-logo\":\n return \"@username\";\n case \"whats-app-logo-filled\":\n return \"+7 (999) 999-99-99\";\n case \"max-logo\":\n return \"ID пользователя Max\";\n case \"envelope-simple\":\n return \"example@mail.com\";\n default:\n return \"Введите значение\";\n }\n };\n\n const handleTypeChange = (type: TypesChange) => {\n return () => {\n setType(type);\n onTypeChange?.(type);\n closePopup();\n };\n };\n\n const SelectedIcon = contactIcons[type];\n const ToggleIcon = isOpened ? CaretUp : CaretDown;\n\n return (\n <div className={cn(\"relative\", props.classes?.container)}>\n {[\"telegram-logo\", \"max-logo\", \"envelope-simple\"].includes(type) ? (\n <InputField\n {...inputProps}\n {...rest}\n date={[\n {\n id: \"0\",\n position: \"inline-start\",\n component: (\n <StrokeIcon\n icon={SelectedIcon}\n size=\"medium\"\n classes={getContactIconClasses(type)}\n />\n ),\n },\n {\n id: \"1\",\n position: \"inline-end\",\n component: (\n <StrokeIcon\n icon={ToggleIcon}\n size=\"medium\"\n className=\"cursor-pointer\"\n onClick={openPopup}\n />\n ),\n },\n ]}\n placeholder={getPlaceholder(type)}\n />\n ) : (\n <InputPhone\n {...inputPhoneProps}\n {...rest}\n date={[\n {\n id: \"0\",\n position: \"inline-start\",\n component: (\n <StrokeIcon\n icon={SelectedIcon}\n size=\"medium\"\n classes={getContactIconClasses(type)}\n />\n ),\n },\n {\n id: \"1\",\n position: \"inline-end\",\n component: (\n <StrokeIcon\n icon={ToggleIcon}\n size=\"medium\"\n className=\"cursor-pointer\"\n onClick={openPopup}\n />\n ),\n },\n ]}\n placeholder={getPlaceholder(type)}\n />\n )}\n\n {isOpened && (\n <div\n className=\"border-inp-hover-border bg-primary-bg absolute my-2 flex w-full\n flex-col rounded-xl border\"\n ref={wrapperRef}\n >\n {OPTIONS.map(({ label, icon }) => {\n const OptionIcon = contactIcons[icon];\n\n return (\n <Button\n key={label}\n variant=\"ghost\"\n className=\"flex w-full justify-start\"\n type=\"button\"\n onClick={handleTypeChange(icon)}\n >\n <StrokeIcon\n icon={OptionIcon}\n size=\"medium\"\n className=\"text-primary-inverse-text\"\n classes={getContactIconClasses(icon)}\n />\n\n {label}\n </Button>\n );\n })}\n </div>\n )}\n </div>\n );\n};\n\nexport type { Props as InputContactProps, TypesChange };\n"],"names":["OPTIONS","contactIcons","Phone","TelegramLogo","WhatsAppLogoFilled","MaxLogo","EnvelopeSimple","iconStyles","icon","getContactIconClasses","cn","InputContact","props","inputProps","inputPhoneProps","onTypeChange","rest","type","setType","useState","isOpened","openPopup","closePopup","usePopupControls","wrapperRef","useRef","useEffect","handleClickOutside","event","getPlaceholder","handleTypeChange","SelectedIcon","ToggleIcon","CaretUp","CaretDown","jsxs","jsx","InputField","StrokeIcon","InputPhone","label","OptionIcon","Button"],"mappings":"ooGAEaA,EAAqB,CAChC,CACE,MAAO,YACP,KAAM,OAAA,EAER,CACE,MAAO,WACP,KAAM,eAAA,EAER,CACE,MAAO,WACP,KAAM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AAQ,IAAI,CAAC,CAAE,MAAAgB,EAAO,KAAAhC,KAAW,CAChC,MAAMiC,EAAaxC,EAAaO,CAAI,EAEpC,OACE2B,EAAAA,KAACO,EAAAA,OAAA,CAEC,QAAQ,QACR,UAAU,4BACV,KAAK,SACL,QAASZ,EAAiBtB,CAAI,EAE9B,SAAA,CAAA4B,EAAAA,IAACE,EAAAA,WAAA,CACC,KAAMG,EACN,KAAK,SACL,UAAU,4BACV,QAAShC,EAAsBD,CAAI,CAAA,CAAA,EAGpCgC,CAAA,CAAA,EAbIA,CAAA,CAgBX,CAAC,CAAA,CAAA,CACH,EAEJ,CAEJ"}
@@ -1,17 +1,26 @@
1
- import { jsxs as d, jsx as o } from "react/jsx-runtime";
1
+ import { jsxs as f, jsx as e } from "react/jsx-runtime";
2
+ import { CaretDown as k } from "phosphor-strokes-icons/icons/CaretDown";
3
+ import { CaretUp as N } from "phosphor-strokes-icons/icons/CaretUp";
4
+ import { EnvelopeSimple as T } from "phosphor-strokes-icons/icons/EnvelopeSimple";
5
+ import { MaxLogo as z } from "phosphor-strokes-icons/icons/MaxLogo";
6
+ import { Phone as S } from "phosphor-strokes-icons/icons/Phone";
7
+ import { StrokeIcon as n } from "./components-icons-stroke-icon.js";
8
+ import { TelegramLogo as D } from "phosphor-strokes-icons/icons/TelegramLogo";
9
+ import { WhatsAppLogoFilled as E } from "phosphor-strokes-icons/icons/WhatsAppLogoFilled";
2
10
  import './brd-ui-kit.css';/* empty css */
3
- import { cn as f } from "./lib-utils.js";
11
+ import { cn as C } from "./lib-utils.js";
4
12
  import "class-variance-authority";
5
- import { useState as y, useRef as w, useEffect as P } from "react";
6
13
  import "./components-ui-badge-badge.styles.js";
7
- import { Button as I } from "./components-ui-button-button.js";
14
+ import { Button as L } from "./components-ui-button-button.js";
8
15
  import "./components-ui-button-button.styles.js";
9
16
  import "./components-ui-card-card.js";
10
17
  import "./components-ui-checkbox-checkbox.js";
11
- import { Icon as p } from "./components-ui-icon-icon.js";
12
- import "./calendar-C0DXP3T-.js";
18
+ import { usePopupControls as O } from "./hooks-usePopupControls.js";
19
+ import "./calendar-XWqEaWHP.js";
20
+ import "phosphor-strokes-icons/icons";
13
21
  import "./components-ui-combobox-combobox.js";
14
22
  import "./components-ui-dialog-dialog.js";
23
+ import { useState as j, useRef as F, useEffect as A } from "react";
15
24
  import "./components-ui-label-label.js";
16
25
  import "./components-ui-separator-separator.js";
17
26
  import "./components-ui-field-field.styles.js";
@@ -30,19 +39,30 @@ import "./components-ui-table-table.js";
30
39
  import "./components-ui-tabs-tabs.js";
31
40
  import "./components-ui-tooltip-tooltip.js";
32
41
  import "./components-ui-typography-typography.styles.js";
33
- import { usePopupControls as N } from "./hooks-usePopupControls.js";
42
+ import "phosphor-strokes-icons/icons/CaretLeft";
43
+ import "phosphor-strokes-icons/icons/CaretRight";
34
44
  import "./components-app-pagination-app-pagination.styles.js";
45
+ import "phosphor-strokes-icons/icons/CaretUpDown";
35
46
  import "./components-app-sidebar-app-sidebar.styles.js";
36
47
  import "./components-data-table-data-table.styles.js";
37
48
  import "./components-ui-dropdown-menu-dropdown-menu.styles.js";
38
- import { InputField as k } from "./components-input-field-input-field.js";
49
+ import { InputField as M } from "./components-input-field-input-field.js";
50
+ import "phosphor-strokes-icons/icons/Eye";
51
+ import "phosphor-strokes-icons/icons/EyeSlash";
39
52
  import "./components-select-field-select-field.js";
40
53
  import "./lodash-FemA_LCk.js";
41
- import "./chart-CAPCe8o5.js";
54
+ import "./chart-DFbmMKiQ.js";
55
+ import "phosphor-strokes-icons/icons/CheckCircle";
56
+ import "phosphor-strokes-icons/icons/Info";
57
+ import "phosphor-strokes-icons/icons/SpinnerGap";
58
+ import "phosphor-strokes-icons/icons/Warning";
59
+ import "phosphor-strokes-icons/icons/X";
60
+ import "phosphor-strokes-icons/icons/XCircle";
42
61
  import "./index-C4iHL8Gs.js";
43
62
  import "./index-C6N9aMq_.js";
44
- import { InputPhone as z } from "./components-input-phone-input-phone.js";
45
- const T = [
63
+ import "phosphor-strokes-icons/icons/Plus";
64
+ import { InputPhone as _ } from "./components-input-phone-input-phone.js";
65
+ const B = [
46
66
  {
47
67
  label: "Мобильный",
48
68
  icon: "phone"
@@ -63,7 +83,13 @@ const T = [
63
83
  label: "E-mail",
64
84
  icon: "envelope-simple"
65
85
  }
66
- ], g = (t) => {
86
+ ], h = {
87
+ phone: S,
88
+ "telegram-logo": D,
89
+ "whats-app-logo-filled": E,
90
+ "max-logo": z,
91
+ "envelope-simple": T
92
+ }, x = (t) => {
67
93
  switch (t) {
68
94
  case "max-logo":
69
95
  return {
@@ -81,25 +107,25 @@ const T = [
81
107
  default:
82
108
  return {};
83
109
  }
84
- }, l = (t) => ({
85
- wrapper: f(
110
+ }, s = (t) => ({
111
+ wrapper: C(
86
112
  `flex h-5.5 w-5.5 shrink-0 items-center justify-center rounded-sm
87
- ${g(t).bgColor ?? "bg-primary-inverse-hover-bg"}
88
- ${g(t).textColor ?? "text-primary-inverse-text"}`
113
+ ${x(t).bgColor ?? "bg-primary-inverse-hover-bg"}
114
+ ${x(t).textColor ?? "text-primary-inverse-text"}`
89
115
  ),
90
116
  icon: "size-5 shrink-0"
91
- }), Ce = (t) => {
92
- const { inputProps: h, inputPhoneProps: x, onTypeChange: b, ...a } = t, [r, C] = y("phone"), { isOpened: i, openPopup: c, closePopup: s } = N(), m = w(null);
93
- P(() => {
94
- const e = (n) => {
95
- m.current && !m.current.contains(n.target) && s();
117
+ }), Xo = (t) => {
118
+ const { inputProps: b, inputPhoneProps: v, onTypeChange: w, ...a } = t, [r, y] = j("phone"), { isOpened: m, openPopup: c, closePopup: p } = O(), l = F(null);
119
+ A(() => {
120
+ const o = (i) => {
121
+ l.current && !l.current.contains(i.target) && p();
96
122
  };
97
- return i && document.addEventListener("mousedown", e), () => {
98
- document.removeEventListener("mousedown", e);
123
+ return m && document.addEventListener("mousedown", o), () => {
124
+ document.removeEventListener("mousedown", o);
99
125
  };
100
- }, [i, s]);
101
- const u = (e) => {
102
- switch (e) {
126
+ }, [m, p]);
127
+ const u = (o) => {
128
+ switch (o) {
103
129
  case "phone":
104
130
  return "+7 (999) 999-99-99";
105
131
  case "telegram-logo":
@@ -113,35 +139,35 @@ const T = [
113
139
  default:
114
140
  return "Введите значение";
115
141
  }
116
- }, v = (e) => () => {
117
- C(e), b?.(e), s();
118
- };
119
- return /* @__PURE__ */ d("div", { className: f("relative", t.classes?.container), children: [
120
- ["telegram-logo", "max-logo", "envelope-simple"].includes(r) ? /* @__PURE__ */ o(
121
- k,
142
+ }, I = (o) => () => {
143
+ y(o), w?.(o), p();
144
+ }, d = h[r], g = m ? N : k;
145
+ return /* @__PURE__ */ f("div", { className: C("relative", t.classes?.container), children: [
146
+ ["telegram-logo", "max-logo", "envelope-simple"].includes(r) ? /* @__PURE__ */ e(
147
+ M,
122
148
  {
123
- ...h,
149
+ ...b,
124
150
  ...a,
125
151
  date: [
126
152
  {
127
153
  id: "0",
128
154
  position: "inline-start",
129
- component: /* @__PURE__ */ o(
130
- p,
155
+ component: /* @__PURE__ */ e(
156
+ n,
131
157
  {
132
- type: r,
158
+ icon: d,
133
159
  size: "medium",
134
- classes: l(r)
160
+ classes: s(r)
135
161
  }
136
162
  )
137
163
  },
138
164
  {
139
165
  id: "1",
140
166
  position: "inline-end",
141
- component: /* @__PURE__ */ o(
142
- p,
167
+ component: /* @__PURE__ */ e(
168
+ n,
143
169
  {
144
- type: i ? "caret-up" : "caret-down",
170
+ icon: g,
145
171
  size: "medium",
146
172
  className: "cursor-pointer",
147
173
  onClick: c
@@ -151,31 +177,31 @@ const T = [
151
177
  ],
152
178
  placeholder: u(r)
153
179
  }
154
- ) : /* @__PURE__ */ o(
155
- z,
180
+ ) : /* @__PURE__ */ e(
181
+ _,
156
182
  {
157
- ...x,
183
+ ...v,
158
184
  ...a,
159
185
  date: [
160
186
  {
161
187
  id: "0",
162
188
  position: "inline-start",
163
- component: /* @__PURE__ */ o(
164
- p,
189
+ component: /* @__PURE__ */ e(
190
+ n,
165
191
  {
166
- type: r,
192
+ icon: d,
167
193
  size: "medium",
168
- classes: l(r)
194
+ classes: s(r)
169
195
  }
170
196
  )
171
197
  },
172
198
  {
173
199
  id: "1",
174
200
  position: "inline-end",
175
- component: /* @__PURE__ */ o(
176
- p,
201
+ component: /* @__PURE__ */ e(
202
+ n,
177
203
  {
178
- type: i ? "caret-up" : "caret-down",
204
+ icon: g,
179
205
  size: "medium",
180
206
  className: "cursor-pointer",
181
207
  onClick: c
@@ -186,39 +212,42 @@ const T = [
186
212
  placeholder: u(r)
187
213
  }
188
214
  ),
189
- i && /* @__PURE__ */ o(
215
+ m && /* @__PURE__ */ e(
190
216
  "div",
191
217
  {
192
218
  className: `border-inp-hover-border bg-primary-bg absolute my-2 flex w-full
193
219
  flex-col rounded-xl border`,
194
- ref: m,
195
- children: T.map(({ label: e, icon: n }) => /* @__PURE__ */ d(
196
- I,
197
- {
198
- variant: "ghost",
199
- className: "flex w-full justify-start",
200
- type: "button",
201
- onClick: v(n),
202
- children: [
203
- /* @__PURE__ */ o(
204
- p,
205
- {
206
- type: n,
207
- size: "medium",
208
- className: "text-primary-inverse-text",
209
- classes: l(n)
210
- }
211
- ),
212
- e
213
- ]
214
- },
215
- e
216
- ))
220
+ ref: l,
221
+ children: B.map(({ label: o, icon: i }) => {
222
+ const P = h[i];
223
+ return /* @__PURE__ */ f(
224
+ L,
225
+ {
226
+ variant: "ghost",
227
+ className: "flex w-full justify-start",
228
+ type: "button",
229
+ onClick: I(i),
230
+ children: [
231
+ /* @__PURE__ */ e(
232
+ n,
233
+ {
234
+ icon: P,
235
+ size: "medium",
236
+ className: "text-primary-inverse-text",
237
+ classes: s(i)
238
+ }
239
+ ),
240
+ o
241
+ ]
242
+ },
243
+ o
244
+ );
245
+ })
217
246
  }
218
247
  )
219
248
  ] });
220
249
  };
221
250
  export {
222
- Ce as InputContact
251
+ Xo as InputContact
223
252
  };
224
253
  //# sourceMappingURL=components-input-contact-input-contact.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"components-input-contact-input-contact.js","sources":["../src/constants/contact-input.ts","../src/components/input-contact/input-contact.tsx"],"sourcesContent":["import type { TOption } from \"@/components/input-contact/input-contact\";\n\nexport const OPTIONS: TOption[] = [\n {\n label: \"Мобильный\",\n icon: \"phone\",\n },\n {\n label: \"Telegram\",\n icon: \"telegram-logo\",\n },\n {\n label: \"WhatsApp\",\n icon: \"whats-app-logo-filled\",\n },\n {\n label: \"Max\",\n icon: \"max-logo\",\n },\n {\n label: \"E-mail\",\n icon: \"envelope-simple\",\n },\n];\n","import { OPTIONS } from \"@/constants/contact-input\";\nimport {\n Button,\n Icon,\n InputField,\n InputPhone,\n cn,\n usePopupControls,\n type InputPhoneProps,\n} from \"@/index\";\nimport { useEffect, useRef, useState } from \"react\";\n\nexport type TOption = {\n label: string;\n icon: TypesChange;\n};\n\ntype TypesChange =\n | \"phone\"\n | \"telegram-logo\"\n | \"whats-app-logo-filled\"\n | \"max-logo\"\n | \"envelope-simple\";\n\ntype Props = {\n isValid?: boolean;\n label?: string;\n description?: string;\n classes?: {\n fieldset?: string;\n fieldgroup?: string;\n field?: string;\n container?: string;\n };\n value?: string;\n name?: string;\n onTypeChange?: (type: TypesChange) => void;\n inputProps: React.ComponentPropsWithRef<\"input\">;\n inputPhoneProps: InputPhoneProps;\n};\n\n// TODO: заменить цвета\nconst iconStyles = (icon: TypesChange) => {\n switch (icon) {\n case \"max-logo\":\n return {\n bgColor: \"bg-[linear-gradient(135deg,#9933DD_0%,#2831B9_50%,#44CCFF_100%)]\",\n };\n\n case \"telegram-logo\":\n return {\n bgColor: \"bg-[#289AD2]\",\n };\n\n case \"whats-app-logo-filled\":\n return {\n bgColor: \"bg-[#00C202]\",\n textColor: \"text-[#00C202]\",\n };\n\n default:\n return {};\n }\n};\n\nconst getContactIconClasses = (icon: TypesChange) => ({\n wrapper: cn(\n `flex h-5.5 w-5.5 shrink-0 items-center justify-center rounded-sm\n ${iconStyles(icon).bgColor ?? \"bg-primary-inverse-hover-bg\"}\n ${iconStyles(icon).textColor ?? \"text-primary-inverse-text\"}`,\n ),\n icon: \"size-5 shrink-0\",\n});\n\nexport const InputContact = (props: Props) => {\n const { inputProps, inputPhoneProps, onTypeChange, ...rest } = props;\n\n const [type, setType] = useState<TypesChange>(\"phone\");\n const { isOpened, openPopup, closePopup } = usePopupControls();\n const wrapperRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (wrapperRef.current && !wrapperRef.current.contains(event.target as Node)) {\n closePopup();\n }\n };\n\n if (isOpened) {\n document.addEventListener(\"mousedown\", handleClickOutside);\n }\n\n return () => {\n document.removeEventListener(\"mousedown\", handleClickOutside);\n };\n }, [isOpened, closePopup]);\n\n const getPlaceholder = (type: TypesChange): string => {\n switch (type) {\n case \"phone\":\n return \"+7 (999) 999-99-99\";\n case \"telegram-logo\":\n return \"@username\";\n case \"whats-app-logo-filled\":\n return \"+7 (999) 999-99-99\";\n case \"max-logo\":\n return \"ID пользователя Max\";\n case \"envelope-simple\":\n return \"example@mail.com\";\n default:\n return \"Введите значение\";\n }\n };\n\n const handleTypeChange = (type: TypesChange) => {\n return () => {\n setType(type);\n onTypeChange?.(type);\n closePopup();\n };\n };\n\n return (\n <div className={cn(\"relative\", props.classes?.container)}>\n {[\"telegram-logo\", \"max-logo\", \"envelope-simple\"].includes(type) ? (\n <InputField\n {...inputProps}\n {...rest}\n date={[\n {\n id: \"0\",\n position: \"inline-start\",\n component: (\n <Icon\n type={type}\n size=\"medium\"\n classes={getContactIconClasses(type)}\n />\n ),\n },\n {\n id: \"1\",\n position: \"inline-end\",\n component: (\n <Icon\n type={isOpened ? \"caret-up\" : \"caret-down\"}\n size=\"medium\"\n className=\"cursor-pointer\"\n onClick={openPopup}\n />\n ),\n },\n ]}\n placeholder={getPlaceholder(type)}\n />\n ) : (\n <InputPhone\n {...inputPhoneProps}\n {...rest}\n date={[\n {\n id: \"0\",\n position: \"inline-start\",\n component: (\n <Icon\n type={type}\n size=\"medium\"\n classes={getContactIconClasses(type)}\n />\n ),\n },\n {\n id: \"1\",\n position: \"inline-end\",\n component: (\n <Icon\n type={isOpened ? \"caret-up\" : \"caret-down\"}\n size=\"medium\"\n className=\"cursor-pointer\"\n onClick={openPopup}\n />\n ),\n },\n ]}\n placeholder={getPlaceholder(type)}\n />\n )}\n\n {isOpened && (\n <div\n className=\"border-inp-hover-border bg-primary-bg absolute my-2 flex w-full\n flex-col rounded-xl border\"\n ref={wrapperRef}\n >\n {OPTIONS.map(({ label, icon }) => {\n return (\n <Button\n key={label}\n variant=\"ghost\"\n className=\"flex w-full justify-start\"\n type=\"button\"\n onClick={handleTypeChange(icon)}\n >\n <Icon\n type={icon}\n size=\"medium\"\n className=\"text-primary-inverse-text\"\n classes={getContactIconClasses(icon)}\n />\n\n {label}\n </Button>\n );\n })}\n </div>\n )}\n </div>\n );\n};\n\nexport type { Props as InputContactProps, TypesChange };\n"],"names":["OPTIONS","iconStyles","icon","getContactIconClasses","cn","InputContact","props","inputProps","inputPhoneProps","onTypeChange","rest","type","setType","useState","isOpened","openPopup","closePopup","usePopupControls","wrapperRef","useRef","useEffect","handleClickOutside","event","getPlaceholder","handleTypeChange","jsxs","jsx","InputField","Icon","InputPhone","label","Button"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEO,MAAMA,IAAqB;AAAA,EAChC;AAAA,IACE,OAAO;AAAA,IACP,MAAM;AAAA,EAAA;AAAA,EAER;AAAA,IACE,OAAO;AAAA,IACP,MAAM;AAAA,EAAA;AAAA,EAER;AAAA,IACE,OAAO;AAAA,IACP,MAAM;AAAA,EAAA;AAAA,EAER;AAAA,IACE,OAAO;AAAA,IACP,MAAM;AAAA,EAAA;AAAA,EAER;AAAA,IACE,OAAO;AAAA,IACP,MAAM;AAAA,EAAA;AAEV,GCmBMC,IAAa,CAACC,MAAsB;AACxC,UAAQA,GAAA;AAAA,IACN,KAAK;AACH,aAAO;AAAA,QACL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U;AAAA,gBACV,SAASC;AAAA,cAAA;AAAA,YAAA;AAAA,UACX;AAAA,QAEJ;AAAA,QAEF,aAAaQ,EAAeZ,CAAI;AAAA,MAAA;AAAA,IAAA;AAAA,IAInCG,KACC,gBAAAY;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAU;AAAA;AAAA,QAEV,KAAKR;AAAA,QAEJ,YAAQ,IAAI,CAAC,EAAE,OAAAY,GAAO,MAAA5B,QAEnB,gBAAAuB;AAAA,UAACM;AAAA,UAAA;AAAA,YAEC,SAAQ;AAAA,YACR,WAAU;AAAA,YACV,MAAK;AAAA,YACL,SAASP,EAAiBtB,CAAI;AAAA,YAE9B,UAAA;AAAA,cAAA,gBAAAwB;AAAA,gBAACE;AAAA,gBAAA;AAAA,kBACC,MAAM1B;AAAA,kBACN,MAAK;AAAA,kBACL,WAAU;AAAA,kBACV,SAASC,EAAsBD,CAAI;AAAA,gBAAA;AAAA,cAAA;AAAA,cAGpC4B;AAAA,YAAA;AAAA,UAAA;AAAA,UAbIA;AAAA,QAAA,CAgBV;AAAA,MAAA;AAAA,IAAA;AAAA,EACH,GAEJ;AAEJ;"}
1
+ {"version":3,"file":"components-input-contact-input-contact.js","sources":["../src/constants/contact-input.ts","../src/components/input-contact/input-contact.tsx"],"sourcesContent":["import type { TOption } from \"@/components/input-contact/input-contact\";\n\nexport const OPTIONS: TOption[] = [\n {\n label: \"Мобильный\",\n icon: \"phone\",\n },\n {\n label: \"Telegram\",\n icon: \"telegram-logo\",\n },\n {\n label: \"WhatsApp\",\n icon: \"whats-app-logo-filled\",\n },\n {\n label: \"Max\",\n icon: \"max-logo\",\n },\n {\n label: \"E-mail\",\n icon: \"envelope-simple\",\n },\n];\n","import { OPTIONS } from \"@/constants/contact-input\";\nimport { CaretDown } from \"@/components/icons/CaretDown\";\nimport { CaretUp } from \"@/components/icons/CaretUp\";\nimport { EnvelopeSimple } from \"@/components/icons/EnvelopeSimple\";\nimport { MaxLogo } from \"@/components/icons/MaxLogo\";\nimport { Phone } from \"@/components/icons/Phone\";\nimport { StrokeIcon, type StrokeIconComponent } from \"@/components/icons/stroke-icon\";\nimport { TelegramLogo } from \"@/components/icons/TelegramLogo\";\nimport { WhatsAppLogoFilled } from \"@/components/icons/WhatsAppLogoFilled\";\nimport {\n Button,\n InputField,\n InputPhone,\n cn,\n usePopupControls,\n type InputPhoneProps,\n} from \"@/index\";\nimport { useEffect, useRef, useState } from \"react\";\n\nexport type TOption = {\n label: string;\n icon: TypesChange;\n};\n\ntype TypesChange =\n | \"phone\"\n | \"telegram-logo\"\n | \"whats-app-logo-filled\"\n | \"max-logo\"\n | \"envelope-simple\";\n\nconst contactIcons: Record<TypesChange, StrokeIconComponent> = {\n phone: Phone,\n \"telegram-logo\": TelegramLogo,\n \"whats-app-logo-filled\": WhatsAppLogoFilled,\n \"max-logo\": MaxLogo,\n \"envelope-simple\": EnvelopeSimple,\n};\n\ntype Props = {\n isValid?: boolean;\n label?: string;\n description?: string;\n classes?: {\n fieldset?: string;\n fieldgroup?: string;\n field?: string;\n container?: string;\n };\n value?: string;\n name?: string;\n onTypeChange?: (type: TypesChange) => void;\n inputProps: React.ComponentPropsWithRef<\"input\">;\n inputPhoneProps: InputPhoneProps;\n};\n\n// TODO: заменить цвета\nconst iconStyles = (icon: TypesChange) => {\n switch (icon) {\n case \"max-logo\":\n return {\n bgColor: \"bg-[linear-gradient(135deg,#9933DD_0%,#2831B9_50%,#44CCFF_100%)]\",\n };\n\n case \"telegram-logo\":\n return {\n bgColor: \"bg-[#289AD2]\",\n };\n\n case \"whats-app-logo-filled\":\n return {\n bgColor: \"bg-[#00C202]\",\n textColor: \"text-[#00C202]\",\n };\n\n default:\n return {};\n }\n};\n\nconst getContactIconClasses = (icon: TypesChange) => ({\n wrapper: cn(\n `flex h-5.5 w-5.5 shrink-0 items-center justify-center rounded-sm\n ${iconStyles(icon).bgColor ?? \"bg-primary-inverse-hover-bg\"}\n ${iconStyles(icon).textColor ?? \"text-primary-inverse-text\"}`,\n ),\n icon: \"size-5 shrink-0\",\n});\n\nexport const InputContact = (props: Props) => {\n const { inputProps, inputPhoneProps, onTypeChange, ...rest } = props;\n\n const [type, setType] = useState<TypesChange>(\"phone\");\n const { isOpened, openPopup, closePopup } = usePopupControls();\n const wrapperRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (wrapperRef.current && !wrapperRef.current.contains(event.target as Node)) {\n closePopup();\n }\n };\n\n if (isOpened) {\n document.addEventListener(\"mousedown\", handleClickOutside);\n }\n\n return () => {\n document.removeEventListener(\"mousedown\", handleClickOutside);\n };\n }, [isOpened, closePopup]);\n\n const getPlaceholder = (type: TypesChange): string => {\n switch (type) {\n case \"phone\":\n return \"+7 (999) 999-99-99\";\n case \"telegram-logo\":\n return \"@username\";\n case \"whats-app-logo-filled\":\n return \"+7 (999) 999-99-99\";\n case \"max-logo\":\n return \"ID пользователя Max\";\n case \"envelope-simple\":\n return \"example@mail.com\";\n default:\n return \"Введите значение\";\n }\n };\n\n const handleTypeChange = (type: TypesChange) => {\n return () => {\n setType(type);\n onTypeChange?.(type);\n closePopup();\n };\n };\n\n const SelectedIcon = contactIcons[type];\n const ToggleIcon = isOpened ? CaretUp : CaretDown;\n\n return (\n <div className={cn(\"relative\", props.classes?.container)}>\n {[\"telegram-logo\", \"max-logo\", \"envelope-simple\"].includes(type) ? (\n <InputField\n {...inputProps}\n {...rest}\n date={[\n {\n id: \"0\",\n position: \"inline-start\",\n component: (\n <StrokeIcon\n icon={SelectedIcon}\n size=\"medium\"\n classes={getContactIconClasses(type)}\n />\n ),\n },\n {\n id: \"1\",\n position: \"inline-end\",\n component: (\n <StrokeIcon\n icon={ToggleIcon}\n size=\"medium\"\n className=\"cursor-pointer\"\n onClick={openPopup}\n />\n ),\n },\n ]}\n placeholder={getPlaceholder(type)}\n />\n ) : (\n <InputPhone\n {...inputPhoneProps}\n {...rest}\n date={[\n {\n id: \"0\",\n position: \"inline-start\",\n component: (\n <StrokeIcon\n icon={SelectedIcon}\n size=\"medium\"\n classes={getContactIconClasses(type)}\n />\n ),\n },\n {\n id: \"1\",\n position: \"inline-end\",\n component: (\n <StrokeIcon\n icon={ToggleIcon}\n size=\"medium\"\n className=\"cursor-pointer\"\n onClick={openPopup}\n />\n ),\n },\n ]}\n placeholder={getPlaceholder(type)}\n />\n )}\n\n {isOpened && (\n <div\n className=\"border-inp-hover-border bg-primary-bg absolute my-2 flex w-full\n flex-col rounded-xl border\"\n ref={wrapperRef}\n >\n {OPTIONS.map(({ label, icon }) => {\n const OptionIcon = contactIcons[icon];\n\n return (\n <Button\n key={label}\n variant=\"ghost\"\n className=\"flex w-full justify-start\"\n type=\"button\"\n onClick={handleTypeChange(icon)}\n >\n <StrokeIcon\n icon={OptionIcon}\n size=\"medium\"\n className=\"text-primary-inverse-text\"\n classes={getContactIconClasses(icon)}\n />\n\n {label}\n </Button>\n );\n })}\n </div>\n )}\n </div>\n );\n};\n\nexport type { Props as InputContactProps, TypesChange };\n"],"names":["OPTIONS","contactIcons","Phone","TelegramLogo","WhatsAppLogoFilled","MaxLogo","EnvelopeSimple","iconStyles","icon","getContactIconClasses","cn","InputContact","props","inputProps","inputPhoneProps","onTypeChange","rest","type","setType","useState","isOpened","openPopup","closePopup","usePopupControls","wrapperRef","useRef","useEffect","handleClickOutside","event","getPlaceholder","handleTypeChange","SelectedIcon","ToggleIcon","CaretUp","CaretDown","jsxs","jsx","InputField","StrokeIcon","InputPhone","label","OptionIcon","Button"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEO,MAAMA,IAAqB;AAAA,EAChC;AAAA,IACE,OAAO;AAAA,IACP,MAAM;AAAA,EAAA;AAAA,EAER;AAAA,IACE,OAAO;AAAA,IACP,MAAM;AAAA,EAAA;AAAA,EAER;AAAA,IACE,OAAO;AAAA,IACP,MAAM;AAAA,EAAA;AAAA,EAER;AAAA,IACE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AAA,YACE,IAAI;AAAA,YACJ,UAAU;AAAA,YACV,WACE,gBAAAoB;AAAA,cAACE;AAAA,cAAA;AAAA,gBACC,MAAMP;AAAA,gBACN,MAAK;AAAA,gBACL,SAAStB,EAAsBQ,CAAI;AAAA,cAAA;AAAA,YAAA;AAAA,UACrC;AAAA,UAGJ;AAAA,YACE,IAAI;AAAA,YACJ,UAAU;AAAA,YACV,WACE,gBAAAmB;AAAA,cAACE;AAAA,cAAA;AAAA,gBACC,MAAMN;AAAA,gBACN,MAAK;AAAA,gBACL,WAAU;AAAA,gBACV,SAASX;AAAA,cAAA;AAAA,YAAA;AAAA,UACX;AAAA,QAEJ;AAAA,QAEF,aAAaQ,EAAeZ,CAAI;AAAA,MAAA;AAAA,IAAA;AAAA,IAInCG,KACC,gBAAAgB;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAU;AAAA;AAAA,QAEV,KAAKZ;AAAA,QAEJ,YAAQ,IAAI,CAAC,EAAE,OAAAgB,GAAO,MAAAhC,QAAW;AAChC,gBAAMiC,IAAaxC,EAAaO,CAAI;AAEpC,iBACE,gBAAA2B;AAAA,YAACO;AAAA,YAAA;AAAA,cAEC,SAAQ;AAAA,cACR,WAAU;AAAA,cACV,MAAK;AAAA,cACL,SAASZ,EAAiBtB,CAAI;AAAA,cAE9B,UAAA;AAAA,gBAAA,gBAAA4B;AAAA,kBAACE;AAAA,kBAAA;AAAA,oBACC,MAAMG;AAAA,oBACN,MAAK;AAAA,oBACL,WAAU;AAAA,oBACV,SAAShC,EAAsBD,CAAI;AAAA,kBAAA;AAAA,gBAAA;AAAA,gBAGpCgC;AAAA,cAAA;AAAA,YAAA;AAAA,YAbIA;AAAA,UAAA;AAAA,QAgBX,CAAC;AAAA,MAAA;AAAA,IAAA;AAAA,EACH,GAEJ;AAEJ;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");require("react");const i=require("./components-ui-field-field.cjs"),j=require("./components-ui-input-input.cjs"),o=require("./components-ui-input-group-input-group.cjs"),m=({date:p=[],isValid:l,disabled:n=!1,label:s,description:c,classes:r,ref:d,...a})=>{const t={...l===!0&&!n&&{"aria-valid":!0},...l===!1&&!n&&{"aria-invalid":!0},disabled:n};return e.jsx(i.FieldSet,{className:r?.fieldset,children:e.jsx(i.FieldGroup,{className:r?.fieldgroup,children:e.jsxs(i.Field,{className:r?.field,children:[s&&e.jsx(i.FieldLabel,{...t,children:s}),p.length>0?e.jsxs(o.InputGroup,{"data-slot":!0,children:[e.jsx(o.InputGroupInput,{ref:d,...a,...t,disabled:n}),p.map(u=>e.jsx(o.InputGroupAddon,{align:u.position,children:u.component},u.id))]}):e.jsx(j.Input,{ref:d,...a,...t,disabled:n}),c&&e.jsx(i.FieldDescription,{...t,children:c})]})})})};exports.InputField=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),i=require("./components-ui-field-field.cjs"),j=require("./components-ui-input-input.cjs"),o=require("./components-ui-input-group-input-group.cjs"),m=({date:p=[],isValid:l,disabled:e=!1,label:s,description:c,classes:u,ref:d,...a})=>{const t={...l===!0&&!e&&{"aria-valid":!0},...l===!1&&!e&&{"aria-invalid":!0},disabled:e};return n.jsx(i.FieldSet,{className:u?.fieldset,children:n.jsx(i.FieldGroup,{className:u?.fieldgroup,children:n.jsxs(i.Field,{className:u?.field,children:[s&&n.jsx(i.FieldLabel,{...t,children:s}),p.length>0?n.jsxs(o.InputGroup,{"data-slot":!0,children:[n.jsx(o.InputGroupInput,{ref:d,...a,...t,disabled:e}),p.map(r=>n.jsx(o.InputGroupAddon,{align:r.position,children:r.component},r.id))]}):n.jsx(j.Input,{ref:d,...a,...t,disabled:e}),c&&n.jsx(i.FieldDescription,{...t,children:c})]})})})};exports.InputField=m;
2
2
  //# sourceMappingURL=components-input-field-input-field.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"components-input-field-input-field.cjs","sources":["../src/components/input-field/input-field.tsx"],"sourcesContent":["import React from \"react\";\nimport { Field, FieldDescription, FieldGroup, FieldLabel, FieldSet } from \"../ui/field\";\nimport { Input } from \"../ui/input\";\nimport { InputGroup, InputGroupAddon, InputGroupInput } from \"../ui/input-group\";\n\nexport type DateAddon = {\n id: string | number;\n position?: \"inline-start\" | \"inline-end\" | \"block-start\" | \"block-end\" | null;\n component: React.ReactNode;\n};\n\ntype BaseProps = {\n date?: DateAddon[];\n isValid?: boolean;\n label?: string;\n description?: string;\n classes?: {\n fieldset?: string;\n fieldgroup?: string;\n field?: string;\n };\n};\n\ntype InputFieldProps = BaseProps & React.ComponentPropsWithRef<\"input\">;\n\nexport const InputField = ({\n date = [],\n isValid,\n disabled = false,\n label,\n description,\n classes,\n ref,\n ...rest\n}: InputFieldProps) => {\n const validationProps = {\n ...(isValid === true && !disabled && { \"aria-valid\": true }),\n ...(isValid === false && !disabled && { \"aria-invalid\": true }),\n disabled,\n };\n\n return (\n <FieldSet className={classes?.fieldset}>\n <FieldGroup className={classes?.fieldgroup}>\n <Field className={classes?.field}>\n {label && <FieldLabel {...validationProps}>{label}</FieldLabel>}\n {date.length > 0 ? (\n <InputGroup data-slot>\n <InputGroupInput\n ref={ref}\n {...rest}\n {...validationProps}\n disabled={disabled}\n />\n {date.map((e) => (\n <InputGroupAddon\n key={e.id}\n align={e.position}\n >\n {e.component}\n </InputGroupAddon>\n ))}\n </InputGroup>\n ) : (\n <Input\n ref={ref}\n {...rest}\n {...validationProps}\n disabled={disabled}\n />\n )}\n {description && (\n <FieldDescription {...validationProps}>{description}</FieldDescription>\n )}\n </Field>\n </FieldGroup>\n </FieldSet>\n );\n};\n\ntype InputProps = InputFieldProps;\n\nexport type { InputFieldProps, InputProps };\n"],"names":["InputField","date","isValid","disabled","label","description","classes","ref","rest","validationProps","jsx","FieldSet","FieldGroup","jsxs","Field","FieldLabel","InputGroup","InputGroupInput","e","InputGroupAddon","Input","FieldDescription"],"mappings":"+RAyBaA,EAAa,CAAC,CACzB,KAAAC,EAAO,CAAA,EACP,QAAAC,EACA,SAAAC,EAAW,GACX,MAAAC,EACA,YAAAC,EACA,QAAAC,EACA,IAAAC,EACA,GAAGC,CACL,IAAuB,CACrB,MAAMC,EAAkB,CACtB,GAAIP,IAAY,IAAQ,CAACC,GAAY,CAAE,aAAc,EAAA,EACrD,GAAID,IAAY,IAAS,CAACC,GAAY,CAAE,eAAgB,EAAA,EACxD,SAAAA,CAAA,EAGF,OACEO,EAAAA,IAACC,EAAAA,SAAA,CAAS,UAAWL,GAAS,SAC5B,SAAAI,EAAAA,IAACE,aAAA,CAAW,UAAWN,GAAS,WAC9B,SAAAO,OAACC,EAAAA,MAAA,CAAM,UAAWR,GAAS,MACxB,SAAA,CAAAF,GAASM,EAAAA,IAACK,aAAA,CAAY,GAAGN,EAAkB,SAAAL,EAAM,EACjDH,EAAK,OAAS,EACbY,EAAAA,KAACG,EAAAA,WAAA,CAAW,YAAS,GACnB,SAAA,CAAAN,EAAAA,IAACO,EAAAA,gBAAA,CACC,IAAAV,EACC,GAAGC,EACH,GAAGC,EACJ,SAAAN,CAAA,CAAA,EAEDF,EAAK,IAAKiB,GACTR,EAAAA,IAACS,EAAAA,gBAAA,CAEC,MAAOD,EAAE,SAER,SAAAA,EAAE,SAAA,EAHEA,EAAE,EAAA,CAKV,CAAA,CAAA,CACH,EAEAR,EAAAA,IAACU,EAAAA,MAAA,CACC,IAAAb,EACC,GAAGC,EACH,GAAGC,EACJ,SAAAN,CAAA,CAAA,EAGHE,GACCK,EAAAA,IAACW,EAAAA,iBAAA,CAAkB,GAAGZ,EAAkB,SAAAJ,CAAA,CAAY,CAAA,CAAA,CAExD,EACF,EACF,CAEJ"}
1
+ {"version":3,"file":"components-input-field-input-field.cjs","sources":["../src/components/input-field/input-field.tsx"],"sourcesContent":["import type { ComponentPropsWithRef, ReactNode } from \"react\";\nimport { Field, FieldDescription, FieldGroup, FieldLabel, FieldSet } from \"../ui/field\";\nimport { Input } from \"../ui/input\";\nimport { InputGroup, InputGroupAddon, InputGroupInput } from \"../ui/input-group\";\n\nexport type DateAddon = {\n id: string | number;\n position?: \"inline-start\" | \"inline-end\" | \"block-start\" | \"block-end\" | null;\n component: ReactNode;\n};\n\ntype BaseProps = {\n date?: DateAddon[];\n isValid?: boolean;\n label?: string;\n description?: string;\n classes?: {\n fieldset?: string;\n fieldgroup?: string;\n field?: string;\n };\n};\n\ntype InputFieldProps = BaseProps & ComponentPropsWithRef<\"input\">;\n\nexport const InputField = ({\n date = [],\n isValid,\n disabled = false,\n label,\n description,\n classes,\n ref,\n ...rest\n}: InputFieldProps) => {\n const validationProps = {\n ...(isValid === true && !disabled && { \"aria-valid\": true }),\n ...(isValid === false && !disabled && { \"aria-invalid\": true }),\n disabled,\n };\n\n return (\n <FieldSet className={classes?.fieldset}>\n <FieldGroup className={classes?.fieldgroup}>\n <Field className={classes?.field}>\n {label && <FieldLabel {...validationProps}>{label}</FieldLabel>}\n {date.length > 0 ? (\n <InputGroup data-slot>\n <InputGroupInput\n ref={ref}\n {...rest}\n {...validationProps}\n disabled={disabled}\n />\n {date.map((e) => (\n <InputGroupAddon\n key={e.id}\n align={e.position}\n >\n {e.component}\n </InputGroupAddon>\n ))}\n </InputGroup>\n ) : (\n <Input\n ref={ref}\n {...rest}\n {...validationProps}\n disabled={disabled}\n />\n )}\n {description && (\n <FieldDescription {...validationProps}>{description}</FieldDescription>\n )}\n </Field>\n </FieldGroup>\n </FieldSet>\n );\n};\n\ntype InputProps = InputFieldProps;\n\nexport type { InputFieldProps, InputProps };\n"],"names":["InputField","date","isValid","disabled","label","description","classes","ref","rest","validationProps","jsx","FieldSet","FieldGroup","jsxs","Field","FieldLabel","InputGroup","InputGroupInput","e","InputGroupAddon","Input","FieldDescription"],"mappings":"wQAyBaA,EAAa,CAAC,CACzB,KAAAC,EAAO,CAAA,EACP,QAAAC,EACA,SAAAC,EAAW,GACX,MAAAC,EACA,YAAAC,EACA,QAAAC,EACA,IAAAC,EACA,GAAGC,CACL,IAAuB,CACrB,MAAMC,EAAkB,CACtB,GAAIP,IAAY,IAAQ,CAACC,GAAY,CAAE,aAAc,EAAA,EACrD,GAAID,IAAY,IAAS,CAACC,GAAY,CAAE,eAAgB,EAAA,EACxD,SAAAA,CAAA,EAGF,OACEO,EAAAA,IAACC,EAAAA,SAAA,CAAS,UAAWL,GAAS,SAC5B,SAAAI,EAAAA,IAACE,aAAA,CAAW,UAAWN,GAAS,WAC9B,SAAAO,OAACC,EAAAA,MAAA,CAAM,UAAWR,GAAS,MACxB,SAAA,CAAAF,GAASM,EAAAA,IAACK,aAAA,CAAY,GAAGN,EAAkB,SAAAL,EAAM,EACjDH,EAAK,OAAS,EACbY,EAAAA,KAACG,EAAAA,WAAA,CAAW,YAAS,GACnB,SAAA,CAAAN,EAAAA,IAACO,EAAAA,gBAAA,CACC,IAAAV,EACC,GAAGC,EACH,GAAGC,EACJ,SAAAN,CAAA,CAAA,EAEDF,EAAK,IAAKiB,GACTR,EAAAA,IAACS,EAAAA,gBAAA,CAEC,MAAOD,EAAE,SAER,SAAAA,EAAE,SAAA,EAHEA,EAAE,EAAA,CAKV,CAAA,CAAA,CACH,EAEAR,EAAAA,IAACU,EAAAA,MAAA,CACC,IAAAb,EACC,GAAGC,EACH,GAAGC,EACJ,SAAAN,CAAA,CAAA,EAGHE,GACCK,EAAAA,IAACW,EAAAA,iBAAA,CAAkB,GAAGZ,EAAkB,SAAAJ,CAAA,CAAY,CAAA,CAAA,CAExD,EACF,EACF,CAEJ"}