@next-degree/pickle-shared-js 0.12.7 → 0.13.1

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 (349) hide show
  1. package/dist/{company_service_sanity-2J1ZuUnu.d.cts → company_service_sanity-ByIKe90u.d.cts} +560 -560
  2. package/dist/{company_service_sanity-KaAGfnNV.d.ts → company_service_sanity-DbYwWmnS.d.ts} +560 -560
  3. package/dist/components/buttons/BackButton.cjs +5 -8
  4. package/dist/components/buttons/BackButton.cjs.map +1 -1
  5. package/dist/components/buttons/BackButton.d.cts +2 -2
  6. package/dist/components/buttons/BackButton.d.ts +2 -2
  7. package/dist/components/buttons/BackButton.js +5 -8
  8. package/dist/components/buttons/BackButton.js.map +1 -1
  9. package/dist/components/company/CompanyBenefits.cjs +1 -5
  10. package/dist/components/company/CompanyBenefits.cjs.map +1 -1
  11. package/dist/components/company/CompanyBenefits.d.cts +2 -2
  12. package/dist/components/company/CompanyBenefits.d.ts +2 -2
  13. package/dist/components/company/CompanyBenefits.js +1 -5
  14. package/dist/components/company/CompanyBenefits.js.map +1 -1
  15. package/dist/components/company/CompanyInformation.cjs +23 -44
  16. package/dist/components/company/CompanyInformation.cjs.map +1 -1
  17. package/dist/components/company/CompanyInformation.d.cts +2 -2
  18. package/dist/components/company/CompanyInformation.d.ts +2 -2
  19. package/dist/components/company/CompanyInformation.js +23 -44
  20. package/dist/components/company/CompanyInformation.js.map +1 -1
  21. package/dist/components/company/CompanyTake.cjs +12 -26
  22. package/dist/components/company/CompanyTake.cjs.map +1 -1
  23. package/dist/components/company/CompanyTake.d.cts +2 -2
  24. package/dist/components/company/CompanyTake.d.ts +2 -2
  25. package/dist/components/company/CompanyTake.js +12 -26
  26. package/dist/components/company/CompanyTake.js.map +1 -1
  27. package/dist/components/jobCard/JobLocation.cjs +23 -34
  28. package/dist/components/jobCard/JobLocation.cjs.map +1 -1
  29. package/dist/components/jobCard/JobLocation.d.cts +3 -3
  30. package/dist/components/jobCard/JobLocation.d.ts +3 -3
  31. package/dist/components/jobCard/JobLocation.js +23 -34
  32. package/dist/components/jobCard/JobLocation.js.map +1 -1
  33. package/dist/components/jobPost/JobDescription.cjs +164 -30
  34. package/dist/components/jobPost/JobDescription.cjs.map +1 -1
  35. package/dist/components/jobPost/JobDescription.d.cts +2 -2
  36. package/dist/components/jobPost/JobDescription.d.ts +2 -2
  37. package/dist/components/jobPost/JobDescription.js +164 -30
  38. package/dist/components/jobPost/JobDescription.js.map +1 -1
  39. package/dist/components/jobPost/JobHeader.cjs +110 -138
  40. package/dist/components/jobPost/JobHeader.cjs.map +1 -1
  41. package/dist/components/jobPost/JobHeader.d.cts +2 -2
  42. package/dist/components/jobPost/JobHeader.d.ts +2 -2
  43. package/dist/components/jobPost/JobHeader.js +110 -138
  44. package/dist/components/jobPost/JobHeader.js.map +1 -1
  45. package/dist/components/jobPost/JobPost.cjs +382 -318
  46. package/dist/components/jobPost/JobPost.cjs.map +1 -1
  47. package/dist/components/jobPost/JobPost.d.cts +3 -3
  48. package/dist/components/jobPost/JobPost.d.ts +3 -3
  49. package/dist/components/jobPost/JobPost.js +344 -280
  50. package/dist/components/jobPost/JobPost.js.map +1 -1
  51. package/dist/components/primitives/avatar.cjs +3 -4
  52. package/dist/components/primitives/avatar.cjs.map +1 -1
  53. package/dist/components/primitives/avatar.js +3 -4
  54. package/dist/components/primitives/avatar.js.map +1 -1
  55. package/dist/components/primitives/command.cjs +37 -50
  56. package/dist/components/primitives/command.cjs.map +1 -1
  57. package/dist/components/primitives/command.d.cts +5 -6
  58. package/dist/components/primitives/command.d.ts +5 -6
  59. package/dist/components/primitives/command.js +37 -50
  60. package/dist/components/primitives/command.js.map +1 -1
  61. package/dist/components/primitives/dialog.cjs +18 -27
  62. package/dist/components/primitives/dialog.cjs.map +1 -1
  63. package/dist/components/primitives/dialog.d.cts +2 -3
  64. package/dist/components/primitives/dialog.d.ts +2 -3
  65. package/dist/components/primitives/dialog.js +18 -27
  66. package/dist/components/primitives/dialog.js.map +1 -1
  67. package/dist/components/primitives/input-otp.cjs +8 -11
  68. package/dist/components/primitives/input-otp.cjs.map +1 -1
  69. package/dist/components/primitives/input-otp.d.cts +2 -2
  70. package/dist/components/primitives/input-otp.d.ts +2 -2
  71. package/dist/components/primitives/input-otp.js +8 -11
  72. package/dist/components/primitives/input-otp.js.map +1 -1
  73. package/dist/components/primitives/popover.cjs +2 -3
  74. package/dist/components/primitives/popover.cjs.map +1 -1
  75. package/dist/components/primitives/popover.js +2 -3
  76. package/dist/components/primitives/popover.js.map +1 -1
  77. package/dist/components/primitives/radio-group.cjs +12 -16
  78. package/dist/components/primitives/radio-group.cjs.map +1 -1
  79. package/dist/components/primitives/radio-group.js +12 -16
  80. package/dist/components/primitives/radio-group.js.map +1 -1
  81. package/dist/components/primitives/separator.cjs +1 -2
  82. package/dist/components/primitives/separator.cjs.map +1 -1
  83. package/dist/components/primitives/separator.js +1 -2
  84. package/dist/components/primitives/separator.js.map +1 -1
  85. package/dist/components/primitives/tooltip.cjs +1 -2
  86. package/dist/components/primitives/tooltip.cjs.map +1 -1
  87. package/dist/components/primitives/tooltip.js +1 -2
  88. package/dist/components/primitives/tooltip.js.map +1 -1
  89. package/dist/components/ui/Avatar.cjs +6 -11
  90. package/dist/components/ui/Avatar.cjs.map +1 -1
  91. package/dist/components/ui/Avatar.d.cts +3 -3
  92. package/dist/components/ui/Avatar.d.ts +3 -3
  93. package/dist/components/ui/Avatar.js +6 -11
  94. package/dist/components/ui/Avatar.js.map +1 -1
  95. package/dist/components/ui/Badge.cjs +12 -2
  96. package/dist/components/ui/Badge.cjs.map +1 -1
  97. package/dist/components/ui/Badge.d.cts +1 -2
  98. package/dist/components/ui/Badge.d.ts +1 -2
  99. package/dist/components/ui/Badge.js +2 -2
  100. package/dist/components/ui/Badge.js.map +1 -1
  101. package/dist/components/ui/Button.cjs +163 -8
  102. package/dist/components/ui/Button.cjs.map +1 -1
  103. package/dist/components/ui/Button.d.cts +4 -8
  104. package/dist/components/ui/Button.d.ts +4 -8
  105. package/dist/components/ui/Button.js +153 -8
  106. package/dist/components/ui/Button.js.map +1 -1
  107. package/dist/components/ui/Checkbox.cjs +18 -28
  108. package/dist/components/ui/Checkbox.cjs.map +1 -1
  109. package/dist/components/ui/Checkbox.js +18 -28
  110. package/dist/components/ui/Checkbox.js.map +1 -1
  111. package/dist/components/ui/Chip.cjs +12 -2
  112. package/dist/components/ui/Chip.cjs.map +1 -1
  113. package/dist/components/ui/Chip.d.cts +1 -2
  114. package/dist/components/ui/Chip.d.ts +1 -2
  115. package/dist/components/ui/Chip.js +2 -2
  116. package/dist/components/ui/Chip.js.map +1 -1
  117. package/dist/components/ui/Combobox.cjs +171 -233
  118. package/dist/components/ui/Combobox.cjs.map +1 -1
  119. package/dist/components/ui/Combobox.js +171 -233
  120. package/dist/components/ui/Combobox.js.map +1 -1
  121. package/dist/components/ui/Counter.cjs +56 -74
  122. package/dist/components/ui/Counter.cjs.map +1 -1
  123. package/dist/components/ui/Counter.js +56 -74
  124. package/dist/components/ui/Counter.js.map +1 -1
  125. package/dist/components/ui/DatePicker.cjs +44 -68
  126. package/dist/components/ui/DatePicker.cjs.map +1 -1
  127. package/dist/components/ui/DatePicker.js +44 -68
  128. package/dist/components/ui/DatePicker.js.map +1 -1
  129. package/dist/components/ui/DismissibleBanner.cjs +13 -16
  130. package/dist/components/ui/DismissibleBanner.cjs.map +1 -1
  131. package/dist/components/ui/DismissibleBanner.d.cts +2 -2
  132. package/dist/components/ui/DismissibleBanner.d.ts +2 -2
  133. package/dist/components/ui/DismissibleBanner.js +13 -16
  134. package/dist/components/ui/DismissibleBanner.js.map +1 -1
  135. package/dist/components/ui/ErrorMessage.cjs +1 -2
  136. package/dist/components/ui/ErrorMessage.cjs.map +1 -1
  137. package/dist/components/ui/ErrorMessage.d.cts +2 -2
  138. package/dist/components/ui/ErrorMessage.d.ts +2 -2
  139. package/dist/components/ui/ErrorMessage.js +1 -2
  140. package/dist/components/ui/ErrorMessage.js.map +1 -1
  141. package/dist/components/ui/Icon.cjs +1 -2
  142. package/dist/components/ui/Icon.cjs.map +1 -1
  143. package/dist/components/ui/Icon.js +1 -2
  144. package/dist/components/ui/Icon.js.map +1 -1
  145. package/dist/components/ui/Input.cjs +48 -68
  146. package/dist/components/ui/Input.cjs.map +1 -1
  147. package/dist/components/ui/Input.js +48 -68
  148. package/dist/components/ui/Input.js.map +1 -1
  149. package/dist/components/ui/InputOtp.cjs +56 -73
  150. package/dist/components/ui/InputOtp.cjs.map +1 -1
  151. package/dist/components/ui/InputOtp.js +56 -73
  152. package/dist/components/ui/InputOtp.js.map +1 -1
  153. package/dist/components/ui/Label.cjs +14 -24
  154. package/dist/components/ui/Label.cjs.map +1 -1
  155. package/dist/components/ui/Label.d.cts +2 -2
  156. package/dist/components/ui/Label.d.ts +2 -2
  157. package/dist/components/ui/Label.js +14 -24
  158. package/dist/components/ui/Label.js.map +1 -1
  159. package/dist/components/ui/LinkButton.cjs +5 -5
  160. package/dist/components/ui/LinkButton.cjs.map +1 -1
  161. package/dist/components/ui/LinkButton.d.cts +1 -2
  162. package/dist/components/ui/LinkButton.d.ts +1 -2
  163. package/dist/components/ui/LinkButton.js +5 -5
  164. package/dist/components/ui/LinkButton.js.map +1 -1
  165. package/dist/components/ui/ListItem.cjs +32 -48
  166. package/dist/components/ui/ListItem.cjs.map +1 -1
  167. package/dist/components/ui/ListItem.d.cts +2 -2
  168. package/dist/components/ui/ListItem.d.ts +2 -2
  169. package/dist/components/ui/ListItem.js +32 -48
  170. package/dist/components/ui/ListItem.js.map +1 -1
  171. package/dist/components/ui/Map/ClusterMarker.cjs +80 -0
  172. package/dist/components/ui/Map/ClusterMarker.cjs.map +1 -0
  173. package/dist/components/ui/Map/ClusterMarker.d.cts +6 -0
  174. package/dist/components/ui/Map/ClusterMarker.d.ts +6 -0
  175. package/dist/components/ui/Map/ClusterMarker.js +56 -0
  176. package/dist/components/ui/Map/ClusterMarker.js.map +1 -0
  177. package/dist/components/ui/Map/FocusCircle.cjs +86 -0
  178. package/dist/components/ui/Map/FocusCircle.cjs.map +1 -0
  179. package/dist/components/ui/Map/FocusCircle.d.cts +5 -0
  180. package/dist/components/ui/Map/FocusCircle.d.ts +5 -0
  181. package/dist/components/ui/Map/FocusCircle.js +62 -0
  182. package/dist/components/ui/Map/FocusCircle.js.map +1 -0
  183. package/dist/components/ui/Map/IndividualMarker.cjs +60 -0
  184. package/dist/components/ui/Map/IndividualMarker.cjs.map +1 -0
  185. package/dist/components/ui/Map/IndividualMarker.d.cts +6 -0
  186. package/dist/components/ui/Map/IndividualMarker.d.ts +6 -0
  187. package/dist/components/ui/Map/IndividualMarker.js +36 -0
  188. package/dist/components/ui/Map/IndividualMarker.js.map +1 -0
  189. package/dist/components/ui/Map/MapComponent.cjs +401 -0
  190. package/dist/components/ui/Map/MapComponent.cjs.map +1 -0
  191. package/dist/components/ui/Map/MapComponent.d.cts +6 -0
  192. package/dist/components/ui/Map/MapComponent.d.ts +6 -0
  193. package/dist/components/ui/Map/MapComponent.js +367 -0
  194. package/dist/components/ui/Map/MapComponent.js.map +1 -0
  195. package/dist/components/ui/Map/MapContent.cjs +279 -0
  196. package/dist/components/ui/Map/MapContent.cjs.map +1 -0
  197. package/dist/components/ui/Map/MapContent.d.cts +6 -0
  198. package/dist/components/ui/Map/MapContent.d.ts +6 -0
  199. package/dist/components/ui/Map/MapContent.js +255 -0
  200. package/dist/components/ui/Map/MapContent.js.map +1 -0
  201. package/dist/components/ui/Map/clustering.cjs +105 -0
  202. package/dist/components/ui/Map/clustering.cjs.map +1 -0
  203. package/dist/components/ui/Map/clustering.d.cts +17 -0
  204. package/dist/components/ui/Map/clustering.d.ts +17 -0
  205. package/dist/components/ui/Map/clustering.js +77 -0
  206. package/dist/components/ui/Map/clustering.js.map +1 -0
  207. package/dist/components/ui/Map/constants.cjs +65 -0
  208. package/dist/components/ui/Map/constants.cjs.map +1 -0
  209. package/dist/components/ui/Map/constants.d.cts +28 -0
  210. package/dist/components/ui/Map/constants.d.ts +28 -0
  211. package/dist/components/ui/Map/constants.js +34 -0
  212. package/dist/components/ui/Map/constants.js.map +1 -0
  213. package/dist/components/ui/Map/hooks.cjs +96 -0
  214. package/dist/components/ui/Map/hooks.cjs.map +1 -0
  215. package/dist/components/ui/Map/hooks.d.cts +17 -0
  216. package/dist/components/ui/Map/hooks.d.ts +17 -0
  217. package/dist/components/ui/Map/hooks.js +59 -0
  218. package/dist/components/ui/Map/hooks.js.map +1 -0
  219. package/dist/components/ui/Map/index.cjs +402 -0
  220. package/dist/components/ui/Map/index.cjs.map +1 -0
  221. package/dist/components/ui/Map/index.d.cts +3 -0
  222. package/dist/components/ui/Map/index.d.ts +3 -0
  223. package/dist/components/ui/Map/index.js +365 -0
  224. package/dist/components/ui/Map/index.js.map +1 -0
  225. package/dist/components/ui/Map/types.cjs +19 -0
  226. package/dist/components/ui/Map/types.cjs.map +1 -0
  227. package/dist/components/ui/Map/types.d.cts +82 -0
  228. package/dist/components/ui/Map/types.d.ts +82 -0
  229. package/dist/components/ui/Map/types.js +1 -0
  230. package/dist/components/ui/Map/types.js.map +1 -0
  231. package/dist/components/ui/Map/utils.cjs +80 -0
  232. package/dist/components/ui/Map/utils.cjs.map +1 -0
  233. package/dist/components/ui/Map/utils.d.cts +9 -0
  234. package/dist/components/ui/Map/utils.d.ts +9 -0
  235. package/dist/components/ui/Map/utils.js +49 -0
  236. package/dist/components/ui/Map/utils.js.map +1 -0
  237. package/dist/components/ui/PlacesQueryInput.cjs +71 -94
  238. package/dist/components/ui/PlacesQueryInput.cjs.map +1 -1
  239. package/dist/components/ui/PlacesQueryInput.d.cts +2 -2
  240. package/dist/components/ui/PlacesQueryInput.d.ts +2 -2
  241. package/dist/components/ui/PlacesQueryInput.js +71 -94
  242. package/dist/components/ui/PlacesQueryInput.js.map +1 -1
  243. package/dist/components/ui/Radio.cjs +49 -69
  244. package/dist/components/ui/Radio.cjs.map +1 -1
  245. package/dist/components/ui/Radio.js +49 -69
  246. package/dist/components/ui/Radio.js.map +1 -1
  247. package/dist/components/ui/ReadMore.cjs +163 -25
  248. package/dist/components/ui/ReadMore.cjs.map +1 -1
  249. package/dist/components/ui/ReadMore.d.cts +2 -2
  250. package/dist/components/ui/ReadMore.d.ts +2 -2
  251. package/dist/components/ui/ReadMore.js +163 -25
  252. package/dist/components/ui/ReadMore.js.map +1 -1
  253. package/dist/components/ui/Select.cjs +138 -172
  254. package/dist/components/ui/Select.cjs.map +1 -1
  255. package/dist/components/ui/Select.js +132 -166
  256. package/dist/components/ui/Select.js.map +1 -1
  257. package/dist/components/ui/StepTabs.cjs +24 -27
  258. package/dist/components/ui/StepTabs.cjs.map +1 -1
  259. package/dist/components/ui/StepTabs.d.cts +3 -3
  260. package/dist/components/ui/StepTabs.d.ts +3 -3
  261. package/dist/components/ui/StepTabs.js +24 -27
  262. package/dist/components/ui/StepTabs.js.map +1 -1
  263. package/dist/components/ui/Switch.cjs +13 -21
  264. package/dist/components/ui/Switch.cjs.map +1 -1
  265. package/dist/components/ui/Switch.js +13 -21
  266. package/dist/components/ui/Switch.js.map +1 -1
  267. package/dist/components/ui/buttonShadcn.cjs +1 -2
  268. package/dist/components/ui/buttonShadcn.cjs.map +1 -1
  269. package/dist/components/ui/buttonShadcn.d.cts +1 -1
  270. package/dist/components/ui/buttonShadcn.d.ts +1 -1
  271. package/dist/components/ui/buttonShadcn.js +1 -2
  272. package/dist/components/ui/buttonShadcn.js.map +1 -1
  273. package/dist/components/ui/calendar.cjs +5 -6
  274. package/dist/components/ui/calendar.cjs.map +1 -1
  275. package/dist/components/ui/calendar.d.cts +1 -2
  276. package/dist/components/ui/calendar.d.ts +1 -2
  277. package/dist/components/ui/calendar.js +5 -6
  278. package/dist/components/ui/calendar.js.map +1 -1
  279. package/dist/contexts/WindowHistoryProvider.cjs +1 -2
  280. package/dist/contexts/WindowHistoryProvider.cjs.map +1 -1
  281. package/dist/contexts/WindowHistoryProvider.d.cts +1 -2
  282. package/dist/contexts/WindowHistoryProvider.d.ts +1 -2
  283. package/dist/contexts/WindowHistoryProvider.js +1 -2
  284. package/dist/contexts/WindowHistoryProvider.js.map +1 -1
  285. package/dist/{displayText-DahwdHdi.d.ts → displayText-Ce_aqgGP.d.ts} +2 -2
  286. package/dist/{displayText-DW0qiJqh.d.cts → displayText-Cm8PqS6s.d.cts} +2 -2
  287. package/dist/hooks/useDisplayText.d.cts +3 -3
  288. package/dist/hooks/useDisplayText.d.ts +3 -3
  289. package/dist/hooks/useWindowHistory.cjs +0 -1
  290. package/dist/hooks/useWindowHistory.cjs.map +1 -1
  291. package/dist/hooks/useWindowHistory.d.cts +0 -1
  292. package/dist/hooks/useWindowHistory.d.ts +0 -1
  293. package/dist/hooks/useWindowHistory.js +0 -1
  294. package/dist/hooks/useWindowHistory.js.map +1 -1
  295. package/dist/index.cjs +1343 -1111
  296. package/dist/index.cjs.map +1 -1
  297. package/dist/index.d.cts +8 -8
  298. package/dist/index.d.ts +8 -8
  299. package/dist/index.js +1293 -1061
  300. package/dist/index.js.map +1 -1
  301. package/dist/{job_posting_service_sanity-BKo9TBDT.d.ts → job_posting_service_sanity-1eG3Jh9_.d.ts} +496 -496
  302. package/dist/{job_posting_service_sanity-BNq-Am9N.d.cts → job_posting_service_sanity-DKYye6oH.d.cts} +496 -496
  303. package/dist/lib/locations.d.cts +3 -3
  304. package/dist/lib/locations.d.ts +3 -3
  305. package/dist/lib/mappings.d.cts +3 -3
  306. package/dist/lib/mappings.d.ts +3 -3
  307. package/dist/lib/salaryRange.d.cts +1 -1
  308. package/dist/lib/salaryRange.d.ts +1 -1
  309. package/dist/services/displayText.d.cts +3 -3
  310. package/dist/services/displayText.d.ts +3 -3
  311. package/dist/styles/globals.css +179 -6
  312. package/dist/styles/globals.css.map +1 -1
  313. package/dist/types/data/company_service_latest.d.cts +1 -1
  314. package/dist/types/data/company_service_latest.d.ts +1 -1
  315. package/dist/types/data/job_posting_service_latest.d.cts +1 -1
  316. package/dist/types/data/job_posting_service_latest.d.ts +1 -1
  317. package/dist/types/data/shared_pickle_output_latest.d.cts +1 -1
  318. package/dist/types/data/shared_pickle_output_latest.d.ts +1 -1
  319. package/dist/types/index.d.cts +6 -6
  320. package/dist/types/index.d.ts +6 -6
  321. package/dist/types/latest/company_service_latest.d.cts +1 -1
  322. package/dist/types/latest/company_service_latest.d.ts +1 -1
  323. package/dist/types/latest/custom/company_service_sanity.d.cts +3 -3
  324. package/dist/types/latest/custom/company_service_sanity.d.ts +3 -3
  325. package/dist/types/latest/custom/job_posting_service_sanity.d.cts +3 -3
  326. package/dist/types/latest/custom/job_posting_service_sanity.d.ts +3 -3
  327. package/dist/types/latest/job_posting_service_latest.d.cts +1 -1
  328. package/dist/types/latest/job_posting_service_latest.d.ts +1 -1
  329. package/dist/types/latest/shared_pickle_output_latest.d.cts +1 -1
  330. package/dist/types/latest/shared_pickle_output_latest.d.ts +1 -1
  331. package/package.json +5 -3
  332. package/dist/components/ui/MapComponent.cjs +0 -61
  333. package/dist/components/ui/MapComponent.cjs.map +0 -1
  334. package/dist/components/ui/MapComponent.d.cts +0 -15
  335. package/dist/components/ui/MapComponent.d.ts +0 -15
  336. package/dist/components/ui/MapComponent.js +0 -41
  337. package/dist/components/ui/MapComponent.js.map +0 -1
  338. package/dist/{company_service_latest-CITz7F53.d.cts → company_service_latest-BjyG4KCB.d.cts} +319 -319
  339. package/dist/{company_service_latest-CITz7F53.d.ts → company_service_latest-BjyG4KCB.d.ts} +319 -319
  340. package/dist/{company_service_latest-C7Moeufo.d.cts → company_service_latest-KJi2W9Ij.d.cts} +319 -319
  341. package/dist/{company_service_latest-C7Moeufo.d.ts → company_service_latest-KJi2W9Ij.d.ts} +319 -319
  342. package/dist/{job_posting_service_latest-DdgK8Nnz.d.cts → job_posting_service_latest-82DHqOGu.d.cts} +274 -274
  343. package/dist/{job_posting_service_latest-DdgK8Nnz.d.ts → job_posting_service_latest-82DHqOGu.d.ts} +274 -274
  344. package/dist/{job_posting_service_latest-C_TEBzCf.d.cts → job_posting_service_latest-D9I5NE7l.d.cts} +274 -274
  345. package/dist/{job_posting_service_latest-C_TEBzCf.d.ts → job_posting_service_latest-D9I5NE7l.d.ts} +274 -274
  346. package/dist/{shared_pickle_output_latest-CtvHTPeX.d.cts → shared_pickle_output_latest-YbRs_xtC.d.cts} +22 -22
  347. package/dist/{shared_pickle_output_latest-CtvHTPeX.d.ts → shared_pickle_output_latest-YbRs_xtC.d.ts} +22 -22
  348. package/dist/{shared_pickle_output_latest-CXBCG04N.d.cts → shared_pickle_output_latest-dO-t8iZx.d.cts} +22 -22
  349. package/dist/{shared_pickle_output_latest-CXBCG04N.d.ts → shared_pickle_output_latest-dO-t8iZx.d.ts} +22 -22
@@ -7,12 +7,12 @@ import { useCallback, useEffect, useRef, useState } from "react";
7
7
  // src/components/primitives/command.tsx
8
8
  import { Command as CommandPrimitive } from "cmdk";
9
9
  import { Search } from "lucide-react";
10
- import * as React2 from "react";
10
+ import * as React3 from "react";
11
11
 
12
12
  // src/components/primitives/dialog.tsx
13
13
  import * as DialogPrimitive from "@radix-ui/react-dialog";
14
14
  import { X } from "lucide-react";
15
- import * as React from "react";
15
+ import * as React2 from "react";
16
16
 
17
17
  // src/lib/utils.ts
18
18
  import { clsx } from "clsx";
@@ -22,9 +22,8 @@ function cn(...inputs) {
22
22
  }
23
23
 
24
24
  // src/components/primitives/dialog.tsx
25
- import { jsx, jsxs } from "react/jsx-runtime";
26
25
  var DialogPortal = DialogPrimitive.Portal;
27
- var DialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
26
+ var DialogOverlay = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React2.createElement(
28
27
  DialogPrimitive.Overlay,
29
28
  {
30
29
  ref,
@@ -36,31 +35,23 @@ var DialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PUR
36
35
  }
37
36
  ));
38
37
  DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
39
- var DialogContent = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [
40
- /* @__PURE__ */ jsx(DialogOverlay, {}),
41
- /* @__PURE__ */ jsxs(
42
- DialogPrimitive.Content,
43
- {
44
- ref,
45
- className: cn(
46
- "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-neutral-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] dark:border-neutral-800 dark:bg-neutral-950 sm:rounded-lg",
47
- className
48
- ),
49
- ...props,
50
- children: [
51
- children,
52
- /* @__PURE__ */ jsxs(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-500 dark:ring-offset-neutral-950 dark:focus:ring-neutral-300 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-400", children: [
53
- /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }),
54
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
55
- ] })
56
- ]
57
- }
58
- )
59
- ] }));
38
+ var DialogContent = React2.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React2.createElement(DialogPortal, null, /* @__PURE__ */ React2.createElement(DialogOverlay, null), /* @__PURE__ */ React2.createElement(
39
+ DialogPrimitive.Content,
40
+ {
41
+ ref,
42
+ className: cn(
43
+ "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-neutral-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] dark:border-neutral-800 dark:bg-neutral-950 sm:rounded-lg",
44
+ className
45
+ ),
46
+ ...props
47
+ },
48
+ children,
49
+ /* @__PURE__ */ React2.createElement(DialogPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-500 dark:ring-offset-neutral-950 dark:focus:ring-neutral-300 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-400" }, /* @__PURE__ */ React2.createElement(X, { className: "h-4 w-4" }), /* @__PURE__ */ React2.createElement("span", { className: "sr-only" }, "Close"))
50
+ )));
60
51
  DialogContent.displayName = DialogPrimitive.Content.displayName;
61
- var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className), ...props });
52
+ var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ React2.createElement("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className), ...props });
62
53
  DialogHeader.displayName = "DialogHeader";
63
- var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx(
54
+ var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ React2.createElement(
64
55
  "div",
65
56
  {
66
57
  className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className),
@@ -68,7 +59,7 @@ var DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx(
68
59
  }
69
60
  );
70
61
  DialogFooter.displayName = "DialogFooter";
71
- var DialogTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
62
+ var DialogTitle = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React2.createElement(
72
63
  DialogPrimitive.Title,
73
64
  {
74
65
  ref,
@@ -77,7 +68,7 @@ var DialogTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE_
77
68
  }
78
69
  ));
79
70
  DialogTitle.displayName = DialogPrimitive.Title.displayName;
80
- var DialogDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
71
+ var DialogDescription = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React2.createElement(
81
72
  DialogPrimitive.Description,
82
73
  {
83
74
  ref,
@@ -88,8 +79,7 @@ var DialogDescription = React.forwardRef(({ className, ...props }, ref) => /* @_
88
79
  DialogDescription.displayName = DialogPrimitive.Description.displayName;
89
80
 
90
81
  // src/components/primitives/command.tsx
91
- import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
92
- var Command = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx2(
82
+ var Command = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React3.createElement(
93
83
  CommandPrimitive,
94
84
  {
95
85
  ref,
@@ -101,22 +91,19 @@ var Command = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
101
91
  }
102
92
  ));
103
93
  Command.displayName = CommandPrimitive.displayName;
104
- var CommandInput = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs2("div", { className: "m-1 flex items-center rounded-xl border px-3", "cmdk-input-wrapper": "", children: [
105
- /* @__PURE__ */ jsx2(Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
106
- /* @__PURE__ */ jsx2(
107
- CommandPrimitive.Input,
108
- {
109
- ref,
110
- className: cn(
111
- "flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-neutral-500 disabled:cursor-not-allowed disabled:opacity-50",
112
- className
113
- ),
114
- ...props
115
- }
116
- )
117
- ] }));
94
+ var CommandInput = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React3.createElement("div", { className: "m-1 flex items-center rounded-xl border px-3", "cmdk-input-wrapper": "" }, /* @__PURE__ */ React3.createElement(Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }), /* @__PURE__ */ React3.createElement(
95
+ CommandPrimitive.Input,
96
+ {
97
+ ref,
98
+ className: cn(
99
+ "flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-neutral-500 disabled:cursor-not-allowed disabled:opacity-50",
100
+ className
101
+ ),
102
+ ...props
103
+ }
104
+ )));
118
105
  CommandInput.displayName = CommandPrimitive.Input.displayName;
119
- var CommandList = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx2(
106
+ var CommandList = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React3.createElement(
120
107
  CommandPrimitive.List,
121
108
  {
122
109
  ref,
@@ -125,9 +112,9 @@ var CommandList = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE
125
112
  }
126
113
  ));
127
114
  CommandList.displayName = CommandPrimitive.List.displayName;
128
- var CommandEmpty = React2.forwardRef((props, ref) => /* @__PURE__ */ jsx2(CommandPrimitive.Empty, { ref, className: "py-6 text-center text-sm", ...props }));
115
+ var CommandEmpty = React3.forwardRef((props, ref) => /* @__PURE__ */ React3.createElement(CommandPrimitive.Empty, { ref, className: "py-6 text-center text-sm", ...props }));
129
116
  CommandEmpty.displayName = CommandPrimitive.Empty.displayName;
130
- var CommandGroup = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx2(
117
+ var CommandGroup = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React3.createElement(
131
118
  CommandPrimitive.Group,
132
119
  {
133
120
  ref,
@@ -139,7 +126,7 @@ var CommandGroup = React2.forwardRef(({ className, ...props }, ref) => /* @__PUR
139
126
  }
140
127
  ));
141
128
  CommandGroup.displayName = CommandPrimitive.Group.displayName;
142
- var CommandSeparator = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx2(
129
+ var CommandSeparator = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React3.createElement(
143
130
  CommandPrimitive.Separator,
144
131
  {
145
132
  ref,
@@ -148,7 +135,7 @@ var CommandSeparator = React2.forwardRef(({ className, ...props }, ref) => /* @_
148
135
  }
149
136
  ));
150
137
  CommandSeparator.displayName = CommandPrimitive.Separator.displayName;
151
- var CommandItem = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx2(
138
+ var CommandItem = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React3.createElement(
152
139
  CommandPrimitive.Item,
153
140
  {
154
141
  ref,
@@ -161,7 +148,7 @@ var CommandItem = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE
161
148
  ));
162
149
  CommandItem.displayName = CommandPrimitive.Item.displayName;
163
150
  var CommandShortcut = ({ className, ...props }) => {
164
- return /* @__PURE__ */ jsx2(
151
+ return /* @__PURE__ */ React3.createElement(
165
152
  "span",
166
153
  {
167
154
  className: cn("ml-auto text-xs tracking-widest text-neutral-500", className),
@@ -186,7 +173,6 @@ var autocomplete = async (input, key) => {
186
173
  };
187
174
 
188
175
  // src/components/ui/PlacesQueryInput.tsx
189
- import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
190
176
  function PlacesQueryInput({
191
177
  apiKey,
192
178
  selected,
@@ -247,50 +233,41 @@ function PlacesQueryInput({
247
233
  window.addEventListener("resize", checkDropdownPosition);
248
234
  return () => window.removeEventListener("resize", checkDropdownPosition);
249
235
  }, []);
250
- return /* @__PURE__ */ jsx3("div", { className: cn("relative w-full", className), ref: inputRef, onBlur: handleBlur, children: /* @__PURE__ */ jsxs3(Command, { children: [
251
- /* @__PURE__ */ jsxs3("div", { className: "relative w-full", children: [
252
- /* @__PURE__ */ jsx3(
253
- CommandInput,
254
- {
255
- placeholder: "Type an address to search...",
256
- value: input,
257
- onValueChange: handleInputChange,
258
- className: "truncate pr-8"
259
- }
260
- ),
261
- isLoadingPredictions && /* @__PURE__ */ jsx3(LoaderCircle, { className: "absolute inset-y-0 right-2 my-auto flex h-8 w-8 animate-spin items-center justify-center rounded-full text-green-100" }),
262
- input && /* @__PURE__ */ jsx3(
263
- "button",
264
- {
265
- type: "button",
266
- className: "absolute inset-y-0 right-2 my-auto flex h-8 w-8 cursor-pointer items-center justify-center rounded-full hover:bg-pickle-20",
267
- onClick: handleClear,
268
- children: /* @__PURE__ */ jsx3(CircleX, { className: "h-4 w-4 text-green-100" })
269
- }
236
+ return /* @__PURE__ */ React.createElement("div", { className: cn("relative w-full", className), ref: inputRef, onBlur: handleBlur }, /* @__PURE__ */ React.createElement(Command, null, /* @__PURE__ */ React.createElement("div", { className: "relative w-full" }, /* @__PURE__ */ React.createElement(
237
+ CommandInput,
238
+ {
239
+ placeholder: "Type an address to search...",
240
+ value: input,
241
+ onValueChange: handleInputChange,
242
+ className: "truncate pr-8"
243
+ }
244
+ ), isLoadingPredictions && /* @__PURE__ */ React.createElement(LoaderCircle, { className: "absolute inset-y-0 right-2 my-auto flex h-8 w-8 animate-spin items-center justify-center rounded-full text-green-100" }), input && /* @__PURE__ */ React.createElement(
245
+ "button",
246
+ {
247
+ type: "button",
248
+ className: "absolute inset-y-0 right-2 my-auto flex h-8 w-8 cursor-pointer items-center justify-center rounded-full hover:bg-pickle-20",
249
+ onClick: handleClear
250
+ },
251
+ /* @__PURE__ */ React.createElement(CircleX, { className: "h-4 w-4 text-green-100" })
252
+ )), predictions && /* @__PURE__ */ React.createElement(
253
+ CommandList,
254
+ {
255
+ className: cn(
256
+ "absolute z-50 w-full rounded-md border bg-white shadow-lg",
257
+ shouldOpenUpward ? "bottom-full" : "top-full"
270
258
  )
271
- ] }),
272
- predictions && /* @__PURE__ */ jsxs3(
273
- CommandList,
259
+ },
260
+ /* @__PURE__ */ React.createElement(CommandEmpty, null, "No results"),
261
+ /* @__PURE__ */ React.createElement(CommandGroup, null, predictions.map((prediction) => /* @__PURE__ */ React.createElement(
262
+ CommandItem,
274
263
  {
275
- className: cn(
276
- "absolute z-50 w-full rounded-md border bg-white shadow-lg",
277
- shouldOpenUpward ? "bottom-full" : "top-full"
278
- ),
279
- children: [
280
- /* @__PURE__ */ jsx3(CommandEmpty, { children: "No results" }),
281
- /* @__PURE__ */ jsx3(CommandGroup, { children: predictions.map((prediction) => /* @__PURE__ */ jsx3(
282
- CommandItem,
283
- {
284
- onSelect: () => handleSelect(prediction),
285
- className: "truncate",
286
- children: prediction.description
287
- },
288
- prediction.place_id
289
- )) })
290
- ]
291
- }
292
- )
293
- ] }) });
264
+ key: prediction.place_id,
265
+ onSelect: () => handleSelect(prediction),
266
+ className: "truncate"
267
+ },
268
+ prediction.description
269
+ )))
270
+ )));
294
271
  }
295
272
  var PlacesQueryInput_default = PlacesQueryInput;
296
273
  export {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/ui/PlacesQueryInput.tsx","../../../src/components/primitives/command.tsx","../../../src/components/primitives/dialog.tsx","../../../src/lib/utils.ts","../../../src/lib/google.ts"],"sourcesContent":["'use client'\n\nimport { type PlaceAutocompleteResult } from '@googlemaps/google-maps-services-js'\nimport { CircleX, LoaderCircle } from 'lucide-react'\nimport { useCallback, useEffect, useRef, useState } from 'react'\n\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from '@/components/primitives/command'\nimport { autocomplete } from '@/lib/google'\nimport { cn } from '@/lib/utils'\n\n/**\n * The idea is of this type is to have a more specific type for the Place object,\n * without the repos that use it having to import the PlaceAutocompleteResult type.\n * 'place_id' can be used to query the Google Places API directly for more information about the place.\n */\nexport type Place = Pick<PlaceAutocompleteResult, 'description' | 'place_id'>\n\ninterface PlacesQueryInputProps {\n apiKey: string\n selected?: Place\n onSelect: (place?: Place) => void\n className?: string\n}\n\nfunction PlacesQueryInput({\n apiKey,\n selected,\n onSelect,\n className,\n}: Readonly<PlacesQueryInputProps>) {\n const [predictions, setPredictions] = useState<PlaceAutocompleteResult[] | null>(null)\n const [input, setInput] = useState(selected?.description ?? '')\n const [isLoadingPredictions, setIsLoadingPredictions] = useState(false)\n const [shouldOpenUpward, setShouldOpenUpward] = useState(false)\n const timeoutRef = useRef<NodeJS.Timeout | null>(null)\n const inputRef = useRef<HTMLDivElement | null>(null)\n\n const debouncedAutocomplete = useCallback((value: string) => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current)\n }\n timeoutRef.current = setTimeout(async () => {\n try {\n if (value.length > 2) {\n setIsLoadingPredictions(true)\n const fetchedPredictions = await autocomplete(value, apiKey)\n setIsLoadingPredictions(false)\n setPredictions(fetchedPredictions ?? [])\n } else {\n setPredictions(null)\n }\n } catch (error) {\n setIsLoadingPredictions(false)\n setPredictions([])\n console.error('Autocomplete error:', error)\n }\n }, 300)\n }, [])\n\n const handleInputChange = (value: string) => {\n setInput(value)\n debouncedAutocomplete(value)\n }\n\n const handleSelect = (prediction: PlaceAutocompleteResult) => {\n onSelect(prediction)\n setPredictions(null)\n setInput(prediction.description)\n }\n\n const handleClear = () => {\n onSelect()\n setPredictions(null)\n setInput('')\n }\n\n /** Close the dropdown when the input loses focus, with the timeout to allow the user to click on a prediction.\n * */\n const handleBlur = () => setTimeout(() => setPredictions(null), 200)\n\n useEffect(() => {\n const checkDropdownPosition = () => {\n if (inputRef.current) {\n const rect = inputRef.current.getBoundingClientRect()\n const windowHeight = window.innerHeight\n setShouldOpenUpward(rect.bottom + 200 > windowHeight)\n }\n }\n\n checkDropdownPosition()\n window.addEventListener('resize', checkDropdownPosition)\n return () => window.removeEventListener('resize', checkDropdownPosition)\n }, [])\n\n return (\n <div className={cn('relative w-full', className)} ref={inputRef} onBlur={handleBlur}>\n <Command>\n <div className=\"relative w-full\">\n <CommandInput\n placeholder=\"Type an address to search...\"\n value={input}\n onValueChange={handleInputChange}\n className=\"truncate pr-8\"\n />\n {isLoadingPredictions && (\n <LoaderCircle className=\"absolute inset-y-0 right-2 my-auto flex h-8 w-8 animate-spin items-center justify-center rounded-full text-green-100\" />\n )}\n {input && (\n <button\n type=\"button\"\n className=\"absolute inset-y-0 right-2 my-auto flex h-8 w-8 cursor-pointer items-center justify-center rounded-full hover:bg-pickle-20\"\n onClick={handleClear}\n >\n <CircleX className=\"h-4 w-4 text-green-100\" />\n </button>\n )}\n </div>\n {predictions && (\n <CommandList\n className={cn(\n 'absolute z-50 w-full rounded-md border bg-white shadow-lg',\n shouldOpenUpward ? 'bottom-full' : 'top-full'\n )}\n >\n <CommandEmpty>No results</CommandEmpty>\n <CommandGroup>\n {predictions.map((prediction) => (\n <CommandItem\n key={prediction.place_id}\n onSelect={() => handleSelect(prediction)}\n className=\"truncate\"\n >\n {prediction.description}\n </CommandItem>\n ))}\n </CommandGroup>\n </CommandList>\n )}\n </Command>\n </div>\n )\n}\n\nexport default PlacesQueryInput\n","'use client'\n\nimport { type DialogProps } from '@radix-ui/react-dialog'\nimport { Command as CommandPrimitive } from 'cmdk'\nimport { Search } from 'lucide-react'\nimport * as React from 'react'\n\nimport { Dialog, DialogContent } from '@/components/primitives/dialog'\nimport { cn } from '@/lib/utils'\n\nconst Command = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n 'flex h-full w-full flex-col overflow-hidden rounded-xl bg-white text-neutral-950',\n className\n )}\n {...props}\n />\n))\nCommand.displayName = CommandPrimitive.displayName\n\ntype CommandDialogProps = DialogProps\n\nconst CommandDialog = ({ children, ...props }: CommandDialogProps) => {\n return (\n <Dialog {...props}>\n <DialogContent className=\"overflow-hidden p-0 shadow-lg\">\n <Command className=\"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n )\n}\n\nconst CommandInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n <div className=\"m-1 flex items-center rounded-xl border px-3\" cmdk-input-wrapper=\"\">\n <Search className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n 'flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-neutral-500 disabled:cursor-not-allowed disabled:opacity-50',\n className\n )}\n {...props}\n />\n </div>\n))\n\nCommandInput.displayName = CommandPrimitive.Input.displayName\n\nconst CommandList = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn('overflow-y-auto overflow-x-hidden', className)}\n {...props}\n />\n))\n\nCommandList.displayName = CommandPrimitive.List.displayName\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Empty>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>((props, ref) => (\n <CommandPrimitive.Empty ref={ref} className=\"py-6 text-center text-sm\" {...props} />\n))\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n 'overflow-hidden p-1 text-neutral-950 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500',\n className\n )}\n {...props}\n />\n))\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator\n ref={ref}\n className={cn('-mx-1 h-px bg-neutral-200', className)}\n {...props}\n />\n))\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName\n\nconst CommandItem = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-pointer select-none items-center rounded-xl px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-neutral-100 data-[selected=true]:text-neutral-900 data-[disabled=true]:opacity-50\",\n className\n )}\n {...props}\n />\n))\n\nCommandItem.displayName = CommandPrimitive.Item.displayName\n\nconst CommandShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn('ml-auto text-xs tracking-widest text-neutral-500', className)}\n {...props}\n />\n )\n}\nCommandShortcut.displayName = 'CommandShortcut'\n\nexport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n}\n","'use client'\n\nimport * as DialogPrimitive from '@radix-ui/react-dialog'\nimport { X } from 'lucide-react'\nimport * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst Dialog = DialogPrimitive.Root\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n className\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-neutral-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] dark:border-neutral-800 dark:bg-neutral-950 sm:rounded-lg',\n className\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-500 dark:ring-offset-neutral-950 dark:focus:ring-neutral-300 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-400\">\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n))\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col space-y-1.5 text-center sm:text-left', className)} {...props} />\n)\nDialogHeader.displayName = 'DialogHeader'\n\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className)}\n {...props}\n />\n)\nDialogFooter.displayName = 'DialogFooter'\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn('text-lg font-semibold leading-none tracking-tight', className)}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn('text-sm text-neutral-500 dark:text-neutral-400', className)}\n {...props}\n />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n}\n","import { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","'use server'\n\nimport { Client, PlaceAutocompleteType, type PlaceData } from '@googlemaps/google-maps-services-js'\n\nconst client = new Client()\n\nexport const autocomplete = async (input: string, key: string) => {\n try {\n const response = await client.placeAutocomplete({\n params: { input, key, types: PlaceAutocompleteType.address },\n })\n\n return response.data.predictions\n } catch (error) {\n console.error(error)\n }\n}\n\ntype Place = {\n place_id?: string\n address?: string\n}\n/**\n * This is the exported function that calls the Google api to fetch the location based on the place_id or address.\n */\nexport const fetchLocation = async (\n place: Place,\n key: string\n): Promise<Partial<PlaceData> | undefined> => {\n try {\n if (place.place_id) {\n const placeDetails = await getPlaceDetails(place.place_id, key)\n if (placeDetails) return placeDetails\n }\n if (place.address) {\n const result = await geocode(place.address, key)\n const firstAddress = result?.[0]\n return firstAddress\n }\n\n return undefined\n } catch (error) {\n console.error('Error fetching location:', error)\n }\n}\n\n/**\n * If you have a place ID, you can use the placeDetails method to get more information about a place.\n * The advantage over an address is that there will be no ambiguity about the location.\n * @param place_id\n * @param key\n * @returns\n */\nexport const getPlaceDetails = async (place_id: string, key: string) => {\n try {\n const response = await client.placeDetails({\n params: { place_id, key },\n })\n\n return response.data.result\n } catch (error) {\n console.error(error)\n }\n}\n\n/**\n * The geocode method is used to convert an address into actual location(s) with lat/long.\n */\nexport const geocode = async (address: string, key: string) => {\n try {\n const response = await client.geocode({\n params: { address, key },\n })\n\n return response.data.results\n } catch (error) {\n console.error(error)\n }\n}\n"],"mappings":";;;AAGA,SAAS,SAAS,oBAAoB;AACtC,SAAS,aAAa,WAAW,QAAQ,gBAAgB;;;ACDzD,SAAS,WAAW,wBAAwB;AAC5C,SAAS,cAAc;AACvB,YAAYA,YAAW;;;ACHvB,YAAY,qBAAqB;AACjC,SAAS,SAAS;AAClB,YAAY,WAAW;;;ACJvB,SAA0B,YAAY;AACtC,SAAS,eAAe;AAEjB,SAAS,MAAM,QAAsB;AAC1C,SAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B;;;ADeE,cA0BI,YA1BJ;AARF,IAAM,eAA+B;AAIrC,IAAM,gBAAsB,iBAG1B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B;AAAA,EAAiB;AAAA,EAAhB;AAAA,IACC;AAAA,IACA,WAAW;AAAA,MACT;AAAA,MACA;AAAA,IACF;AAAA,IACC,GAAG;AAAA;AACN,CACD;AACD,cAAc,cAA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AA,EACzE,GAAG,CAAC,CAAC;AAEL,SACE,gBAAAD,KAAC,SAAI,WAAW,GAAG,mBAAmB,SAAS,GAAG,KAAK,UAAU,QAAQ,YACvE,0BAAAC,MAAC,WACC;AAAA,oBAAAA,MAAC,SAAI,WAAU,mBACb;AAAA,sBAAAD;AAAA,QAAC;AAAA;AAAA,UACC,aAAY;AAAA,UACZ,OAAO;AAAA,UACP,eAAe;AAAA,UACf,WAAU;AAAA;AAAA,MACZ;AAAA,MACC,wBACC,gBAAAA,KAAC,gBAAa,WAAU,wHAAuH;AAAA,MAEhJ,SACC,gBAAAA;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,WAAU;AAAA,UACV,SAAS;AAAA,UAET,0BAAAA,KAAC,WAAQ,WAAU,0BAAyB;AAAA;AAAA,MAC9C;AAAA,OAEJ;AAAA,IACC,eACC,gBAAAC;AAAA,MAAC;AAAA;AAAA,QACC,WAAW;AAAA,UACT;AAAA,UACA,mBAAmB,gBAAgB;AAAA,QACrC;AAAA,QAEA;AAAA,0BAAAD,KAAC,gBAAa,wBAAU;AAAA,UACxB,gBAAAA,KAAC,gBACE,sBAAY,IAAI,CAAC,eAChB,gBAAAA;AAAA,YAAC;AAAA;AAAA,cAEC,UAAU,MAAM,aAAa,UAAU;AAAA,cACvC,WAAU;AAAA,cAET,qBAAW;AAAA;AAAA,YAJP,WAAW;AAAA,UAKlB,CACD,GACH;AAAA;AAAA;AAAA,IACF;AAAA,KAEJ,GACF;AAEJ;AAEA,IAAO,2BAAQ;","names":["React","jsx","jsxs","jsxs","jsx","jsx","jsxs"]}
1
+ {"version":3,"sources":["../../../src/components/ui/PlacesQueryInput.tsx","../../../src/components/primitives/command.tsx","../../../src/components/primitives/dialog.tsx","../../../src/lib/utils.ts","../../../src/lib/google.ts"],"sourcesContent":["'use client'\n\nimport { type PlaceAutocompleteResult } from '@googlemaps/google-maps-services-js'\nimport { CircleX, LoaderCircle } from 'lucide-react'\nimport { useCallback, useEffect, useRef, useState } from 'react'\n\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from '@/components/primitives/command'\nimport { autocomplete } from '@/lib/google'\nimport { cn } from '@/lib/utils'\n\n/**\n * The idea is of this type is to have a more specific type for the Place object,\n * without the repos that use it having to import the PlaceAutocompleteResult type.\n * 'place_id' can be used to query the Google Places API directly for more information about the place.\n */\nexport type Place = Pick<PlaceAutocompleteResult, 'description' | 'place_id'>\n\ninterface PlacesQueryInputProps {\n apiKey: string\n selected?: Place\n onSelect: (place?: Place) => void\n className?: string\n}\n\nfunction PlacesQueryInput({\n apiKey,\n selected,\n onSelect,\n className,\n}: Readonly<PlacesQueryInputProps>) {\n const [predictions, setPredictions] = useState<PlaceAutocompleteResult[] | null>(null)\n const [input, setInput] = useState(selected?.description ?? '')\n const [isLoadingPredictions, setIsLoadingPredictions] = useState(false)\n const [shouldOpenUpward, setShouldOpenUpward] = useState(false)\n const timeoutRef = useRef<NodeJS.Timeout | null>(null)\n const inputRef = useRef<HTMLDivElement | null>(null)\n\n const debouncedAutocomplete = useCallback((value: string) => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current)\n }\n timeoutRef.current = setTimeout(async () => {\n try {\n if (value.length > 2) {\n setIsLoadingPredictions(true)\n const fetchedPredictions = await autocomplete(value, apiKey)\n setIsLoadingPredictions(false)\n setPredictions(fetchedPredictions ?? [])\n } else {\n setPredictions(null)\n }\n } catch (error) {\n setIsLoadingPredictions(false)\n setPredictions([])\n console.error('Autocomplete error:', error)\n }\n }, 300)\n }, [])\n\n const handleInputChange = (value: string) => {\n setInput(value)\n debouncedAutocomplete(value)\n }\n\n const handleSelect = (prediction: PlaceAutocompleteResult) => {\n onSelect(prediction)\n setPredictions(null)\n setInput(prediction.description)\n }\n\n const handleClear = () => {\n onSelect()\n setPredictions(null)\n setInput('')\n }\n\n /** Close the dropdown when the input loses focus, with the timeout to allow the user to click on a prediction.\n * */\n const handleBlur = () => setTimeout(() => setPredictions(null), 200)\n\n useEffect(() => {\n const checkDropdownPosition = () => {\n if (inputRef.current) {\n const rect = inputRef.current.getBoundingClientRect()\n const windowHeight = window.innerHeight\n setShouldOpenUpward(rect.bottom + 200 > windowHeight)\n }\n }\n\n checkDropdownPosition()\n window.addEventListener('resize', checkDropdownPosition)\n return () => window.removeEventListener('resize', checkDropdownPosition)\n }, [])\n\n return (\n <div className={cn('relative w-full', className)} ref={inputRef} onBlur={handleBlur}>\n <Command>\n <div className=\"relative w-full\">\n <CommandInput\n placeholder=\"Type an address to search...\"\n value={input}\n onValueChange={handleInputChange}\n className=\"truncate pr-8\"\n />\n {isLoadingPredictions && (\n <LoaderCircle className=\"absolute inset-y-0 right-2 my-auto flex h-8 w-8 animate-spin items-center justify-center rounded-full text-green-100\" />\n )}\n {input && (\n <button\n type=\"button\"\n className=\"absolute inset-y-0 right-2 my-auto flex h-8 w-8 cursor-pointer items-center justify-center rounded-full hover:bg-pickle-20\"\n onClick={handleClear}\n >\n <CircleX className=\"h-4 w-4 text-green-100\" />\n </button>\n )}\n </div>\n {predictions && (\n <CommandList\n className={cn(\n 'absolute z-50 w-full rounded-md border bg-white shadow-lg',\n shouldOpenUpward ? 'bottom-full' : 'top-full'\n )}\n >\n <CommandEmpty>No results</CommandEmpty>\n <CommandGroup>\n {predictions.map((prediction) => (\n <CommandItem\n key={prediction.place_id}\n onSelect={() => handleSelect(prediction)}\n className=\"truncate\"\n >\n {prediction.description}\n </CommandItem>\n ))}\n </CommandGroup>\n </CommandList>\n )}\n </Command>\n </div>\n )\n}\n\nexport default PlacesQueryInput\n","'use client'\n\nimport { type DialogProps } from '@radix-ui/react-dialog'\nimport { Command as CommandPrimitive } from 'cmdk'\nimport { Search } from 'lucide-react'\nimport * as React from 'react'\n\nimport { Dialog, DialogContent } from '@/components/primitives/dialog'\nimport { cn } from '@/lib/utils'\n\nconst Command = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n 'flex h-full w-full flex-col overflow-hidden rounded-xl bg-white text-neutral-950',\n className\n )}\n {...props}\n />\n))\nCommand.displayName = CommandPrimitive.displayName\n\ntype CommandDialogProps = DialogProps\n\nconst CommandDialog = ({ children, ...props }: CommandDialogProps) => {\n return (\n <Dialog {...props}>\n <DialogContent className=\"overflow-hidden p-0 shadow-lg\">\n <Command className=\"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n )\n}\n\nconst CommandInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n <div className=\"m-1 flex items-center rounded-xl border px-3\" cmdk-input-wrapper=\"\">\n <Search className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n 'flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-neutral-500 disabled:cursor-not-allowed disabled:opacity-50',\n className\n )}\n {...props}\n />\n </div>\n))\n\nCommandInput.displayName = CommandPrimitive.Input.displayName\n\nconst CommandList = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn('overflow-y-auto overflow-x-hidden', className)}\n {...props}\n />\n))\n\nCommandList.displayName = CommandPrimitive.List.displayName\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Empty>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>((props, ref) => (\n <CommandPrimitive.Empty ref={ref} className=\"py-6 text-center text-sm\" {...props} />\n))\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n 'overflow-hidden p-1 text-neutral-950 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-neutral-500',\n className\n )}\n {...props}\n />\n))\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator\n ref={ref}\n className={cn('-mx-1 h-px bg-neutral-200', className)}\n {...props}\n />\n))\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName\n\nconst CommandItem = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-pointer select-none items-center rounded-xl px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-neutral-100 data-[selected=true]:text-neutral-900 data-[disabled=true]:opacity-50\",\n className\n )}\n {...props}\n />\n))\n\nCommandItem.displayName = CommandPrimitive.Item.displayName\n\nconst CommandShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn('ml-auto text-xs tracking-widest text-neutral-500', className)}\n {...props}\n />\n )\n}\nCommandShortcut.displayName = 'CommandShortcut'\n\nexport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n}\n","'use client'\n\nimport * as DialogPrimitive from '@radix-ui/react-dialog'\nimport { X } from 'lucide-react'\nimport * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst Dialog = DialogPrimitive.Root\n\nconst DialogTrigger = DialogPrimitive.Trigger\n\nconst DialogPortal = DialogPrimitive.Portal\n\nconst DialogClose = DialogPrimitive.Close\n\nconst DialogOverlay = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Overlay\n ref={ref}\n className={cn(\n 'fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n className\n )}\n {...props}\n />\n))\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName\n\nconst DialogContent = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content>\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-neutral-200 bg-white p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] dark:border-neutral-800 dark:bg-neutral-950 sm:rounded-lg',\n className\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close className=\"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-white transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-neutral-950 focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-neutral-100 data-[state=open]:text-neutral-500 dark:ring-offset-neutral-950 dark:focus:ring-neutral-300 dark:data-[state=open]:bg-neutral-800 dark:data-[state=open]:text-neutral-400\">\n <X className=\"h-4 w-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPortal>\n))\nDialogContent.displayName = DialogPrimitive.Content.displayName\n\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col space-y-1.5 text-center sm:text-left', className)} {...props} />\n)\nDialogHeader.displayName = 'DialogHeader'\n\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn('flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2', className)}\n {...props}\n />\n)\nDialogFooter.displayName = 'DialogFooter'\n\nconst DialogTitle = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Title>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n className={cn('text-lg font-semibold leading-none tracking-tight', className)}\n {...props}\n />\n))\nDialogTitle.displayName = DialogPrimitive.Title.displayName\n\nconst DialogDescription = React.forwardRef<\n React.ElementRef<typeof DialogPrimitive.Description>,\n React.ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n className={cn('text-sm text-neutral-500 dark:text-neutral-400', className)}\n {...props}\n />\n))\nDialogDescription.displayName = DialogPrimitive.Description.displayName\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n}\n","import { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","'use server'\n\nimport { Client, PlaceAutocompleteType, type PlaceData } from '@googlemaps/google-maps-services-js'\n\nconst client = new Client()\n\nexport const autocomplete = async (input: string, key: string) => {\n try {\n const response = await client.placeAutocomplete({\n params: { input, key, types: PlaceAutocompleteType.address },\n })\n\n return response.data.predictions\n } catch (error) {\n console.error(error)\n }\n}\n\ntype Place = {\n place_id?: string\n address?: string\n}\n/**\n * This is the exported function that calls the Google api to fetch the location based on the place_id or address.\n */\nexport const fetchLocation = async (\n place: Place,\n key: string\n): Promise<Partial<PlaceData> | undefined> => {\n try {\n if (place.place_id) {\n const placeDetails = await getPlaceDetails(place.place_id, key)\n if (placeDetails) return placeDetails\n }\n if (place.address) {\n const result = await geocode(place.address, key)\n const firstAddress = result?.[0]\n return firstAddress\n }\n\n return undefined\n } catch (error) {\n console.error('Error fetching location:', error)\n }\n}\n\n/**\n * If you have a place ID, you can use the placeDetails method to get more information about a place.\n * The advantage over an address is that there will be no ambiguity about the location.\n * @param place_id\n * @param key\n * @returns\n */\nexport const getPlaceDetails = async (place_id: string, key: string) => {\n try {\n const response = await client.placeDetails({\n params: { place_id, key },\n })\n\n return response.data.result\n } catch (error) {\n console.error(error)\n }\n}\n\n/**\n * The geocode method is used to convert an address into actual location(s) with lat/long.\n */\nexport const geocode = async (address: string, key: string) => {\n try {\n const response = await client.geocode({\n params: { address, key },\n })\n\n return response.data.results\n } catch (error) {\n console.error(error)\n }\n}\n"],"mappings":";;;AAGA,SAAS,SAAS,oBAAoB;AACtC,SAAS,aAAa,WAAW,QAAQ,gBAAgB;;;ACDzD,SAAS,WAAW,wBAAwB;AAC5C,SAAS,cAAc;AACvB,YAAYA,YAAW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e,OAAO;AAC5B,4BAAoB,KAAK,SAAS,MAAM,YAAY;AAAA,MACtD;AAAA,IACF;AAEA,0BAAsB;AACtB,WAAO,iBAAiB,UAAU,qBAAqB;AACvD,WAAO,MAAM,OAAO,oBAAoB,UAAU,qBAAqB;AAAA,EACzE,GAAG,CAAC,CAAC;AAEL,SACE,oCAAC,SAAI,WAAW,GAAG,mBAAmB,SAAS,GAAG,KAAK,UAAU,QAAQ,cACvE,oCAAC,eACC,oCAAC,SAAI,WAAU,qBACb;AAAA,IAAC;AAAA;AAAA,MACC,aAAY;AAAA,MACZ,OAAO;AAAA,MACP,eAAe;AAAA,MACf,WAAU;AAAA;AAAA,EACZ,GACC,wBACC,oCAAC,gBAAa,WAAU,wHAAuH,GAEhJ,SACC;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,WAAU;AAAA,MACV,SAAS;AAAA;AAAA,IAET,oCAAC,WAAQ,WAAU,0BAAyB;AAAA,EAC9C,CAEJ,GACC,eACC;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA,mBAAmB,gBAAgB;AAAA,MACrC;AAAA;AAAA,IAEA,oCAAC,oBAAa,YAAU;AAAA,IACxB,oCAAC,oBACE,YAAY,IAAI,CAAC,eAChB;AAAA,MAAC;AAAA;AAAA,QACC,KAAK,WAAW;AAAA,QAChB,UAAU,MAAM,aAAa,UAAU;AAAA,QACvC,WAAU;AAAA;AAAA,MAET,WAAW;AAAA,IACd,CACD,CACH;AAAA,EACF,CAEJ,CACF;AAEJ;AAEA,IAAO,2BAAQ;","names":["React","React"]}
@@ -47,32 +47,27 @@ function cn(...inputs) {
47
47
  }
48
48
 
49
49
  // src/components/primitives/radio-group.tsx
50
- var import_jsx_runtime = require("react/jsx-runtime");
51
- var RadioGroup = (0, import_react.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RadioGroupPrimitive.Root, { className, ...props, ref }));
50
+ var RadioGroup = (0, import_react.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ React.createElement(RadioGroupPrimitive.Root, { className, ...props, ref }));
52
51
  RadioGroup.displayName = RadioGroupPrimitive.Root.displayName;
53
52
  var RadioGroupItem = (0, import_react.forwardRef)(({ className, children, ...props }, ref) => {
54
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "group flex flex-row items-center gap-2", children: [
55
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
56
- RadioGroupPrimitive.Item,
57
- {
58
- ref,
59
- className: cn(
60
- "peer aspect-square h-4 rounded-full border border-grey-10 shadow outline outline-1 outline-offset-2 outline-transparent focus:outline-none focus:outline-purple-100 focus-visible:ring-1 focus-visible:ring-ring active:border-green-80 disabled:cursor-not-allowed disabled:opacity-50 group-hover:border-grey-20 data-[state=checked]:border-4 data-[disabled]:border-grey-20 data-[state=checked]:border-green-90 data-[disabled]:bg-grey-10 data-[state=checked]:group-hover:border-green-80",
61
- className
62
- ),
63
- ...props
64
- }
65
- ),
66
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", { htmlFor: props.id, className: "text-sm peer-data-[disabled]:text-grey-40", children })
67
- ] });
53
+ return /* @__PURE__ */ React.createElement("div", { className: "group flex flex-row items-center gap-2" }, /* @__PURE__ */ React.createElement(
54
+ RadioGroupPrimitive.Item,
55
+ {
56
+ ref,
57
+ className: cn(
58
+ "peer aspect-square h-4 rounded-full border border-grey-10 shadow outline outline-1 outline-offset-2 outline-transparent focus:outline-none focus:outline-purple-100 focus-visible:ring-1 focus-visible:ring-ring active:border-green-80 disabled:cursor-not-allowed disabled:opacity-50 group-hover:border-grey-20 data-[state=checked]:border-4 data-[disabled]:border-grey-20 data-[state=checked]:border-green-90 data-[disabled]:bg-grey-10 data-[state=checked]:group-hover:border-green-80",
59
+ className
60
+ ),
61
+ ...props
62
+ }
63
+ ), /* @__PURE__ */ React.createElement("label", { htmlFor: props.id, className: "text-sm peer-data-[disabled]:text-grey-40" }, children));
68
64
  });
69
65
  RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;
70
66
 
71
67
  // src/components/ui/ErrorMessage.tsx
72
- var import_jsx_runtime2 = require("react/jsx-runtime");
73
68
  function ErrorMessage({ message, className, ...props }) {
74
69
  if (!message) return null;
75
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { className: cn("px-1 text-xs text-red-600", className), ...props, children: message });
70
+ return /* @__PURE__ */ React.createElement("p", { className: cn("px-1 text-xs text-red-600", className), ...props }, message);
76
71
  }
77
72
  var ErrorMessage_default = ErrorMessage;
78
73
 
@@ -81,12 +76,11 @@ var import_lucide_react = require("lucide-react");
81
76
 
82
77
  // src/components/primitives/tooltip.tsx
83
78
  var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
84
- var React = __toESM(require("react"), 1);
85
- var import_jsx_runtime3 = require("react/jsx-runtime");
79
+ var React2 = __toESM(require("react"), 1);
86
80
  var TooltipProvider = TooltipPrimitive.Provider;
87
81
  var Tooltip = TooltipPrimitive.Root;
88
82
  var TooltipTrigger = TooltipPrimitive.Trigger;
89
- var TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
83
+ var TooltipContent = React2.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React2.createElement(
90
84
  TooltipPrimitive.Content,
91
85
  {
92
86
  ref,
@@ -101,34 +95,24 @@ var TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props },
101
95
  TooltipContent.displayName = TooltipPrimitive.Content.displayName;
102
96
 
103
97
  // src/components/ui/Label.tsx
104
- var import_jsx_runtime4 = require("react/jsx-runtime");
105
98
  function Label({ text, required, description, className, ...props }) {
106
99
  if (!text) return null;
107
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex w-full flex-row gap-1", children: [
108
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
109
- "label",
110
- {
111
- className: cn(
112
- "text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
113
- className
114
- ),
115
- ...props,
116
- children: [
117
- text,
118
- required && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-red-600", children: "\xA0*" })
119
- ]
120
- }
121
- ),
122
- !!description && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Tooltip, { children: [
123
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react.InfoIcon, { className: "h-4 w-4" }) }),
124
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(TooltipContent, { className: "max-w-48", children: description })
125
- ] }) })
126
- ] });
100
+ return /* @__PURE__ */ React.createElement("div", { className: "flex w-full flex-row gap-1" }, /* @__PURE__ */ React.createElement(
101
+ "label",
102
+ {
103
+ className: cn(
104
+ "text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
105
+ className
106
+ ),
107
+ ...props
108
+ },
109
+ text,
110
+ required && /* @__PURE__ */ React.createElement("span", { className: "text-red-600" }, "\xA0*")
111
+ ), !!description && /* @__PURE__ */ React.createElement(TooltipProvider, null, /* @__PURE__ */ React.createElement(Tooltip, null, /* @__PURE__ */ React.createElement(TooltipTrigger, { asChild: true }, /* @__PURE__ */ React.createElement(import_lucide_react.InfoIcon, { className: "h-4 w-4" })), /* @__PURE__ */ React.createElement(TooltipContent, { className: "max-w-48" }, description))));
127
112
  }
128
113
  var Label_default = Label;
129
114
 
130
115
  // src/components/ui/Radio.tsx
131
- var import_jsx_runtime5 = require("react/jsx-runtime");
132
116
  var Radio = (0, import_react2.forwardRef)(
133
117
  ({
134
118
  label,
@@ -140,33 +124,29 @@ var Radio = (0, import_react2.forwardRef)(
140
124
  orientation,
141
125
  ...props
142
126
  }, ref) => {
143
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: cn("flex flex-col gap-1", classNames?.root), children: [
144
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Label_default, { text: label, description, required: props.required }),
145
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
146
- RadioGroup,
127
+ return /* @__PURE__ */ React.createElement("div", { className: cn("flex flex-col gap-1", classNames?.root) }, /* @__PURE__ */ React.createElement(Label_default, { text: label, description, required: props.required }), /* @__PURE__ */ React.createElement(
128
+ RadioGroup,
129
+ {
130
+ ref,
131
+ className: cn(
132
+ "flex text-sm",
133
+ orientation === "vertical" ? "flex-col gap-2" : "flex-row gap-4",
134
+ classNames?.group
135
+ ),
136
+ onValueChange: handleValueChange,
137
+ ...props
138
+ },
139
+ options?.map(({ id, title, value }) => /* @__PURE__ */ React.createElement(
140
+ RadioGroupItem,
147
141
  {
148
- ref,
149
- className: cn(
150
- "flex text-sm",
151
- orientation === "vertical" ? "flex-col gap-2" : "flex-row gap-4",
152
- classNames?.group
153
- ),
154
- onValueChange: handleValueChange,
155
- ...props,
156
- children: options?.map(({ id, title, value }) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
157
- RadioGroupItem,
158
- {
159
- value,
160
- id: `radio-group-item-${title}`,
161
- className: classNames?.item,
162
- children: title
163
- },
164
- id
165
- ))
166
- }
167
- ),
168
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ErrorMessage_default, { message: error })
169
- ] });
142
+ key: id,
143
+ value,
144
+ id: `radio-group-item-${title}`,
145
+ className: classNames?.item
146
+ },
147
+ title
148
+ ))
149
+ ), /* @__PURE__ */ React.createElement(ErrorMessage_default, { message: error }));
170
150
  }
171
151
  );
172
152
  Radio.displayName = "Radio";
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/ui/Radio.tsx","../../../src/components/primitives/radio-group.tsx","../../../src/lib/utils.ts","../../../src/components/ui/ErrorMessage.tsx","../../../src/components/ui/Label.tsx","../../../src/components/primitives/tooltip.tsx"],"sourcesContent":["import { type ComponentProps, forwardRef } from 'react'\n\nimport { RadioGroup, RadioGroupItem } from '@/components/primitives/radio-group'\nimport ErrorMessage from '@/components/ui/ErrorMessage'\nimport Label from '@/components/ui/Label'\nimport { cn } from '@/lib/utils'\n\ntype RadioItem = { id: string | number; title: string; value: string }\ntype RadioClassNames = { root?: string; group?: string; item?: string }\ntype RadioGroupProps = Omit<ComponentProps<typeof RadioGroup>, 'onValueChange'>\nexport type RadioProps = RadioGroupProps & {\n label?: string\n error?: string\n description?: string\n classNames?: RadioClassNames\n options?: RadioItem[]\n onChange?: (value: string) => void\n}\n\nexport const Radio = forwardRef<HTMLInputElement, RadioProps>(\n (\n {\n label,\n error,\n description,\n options,\n classNames,\n onChange: handleValueChange,\n orientation,\n ...props\n },\n ref\n ) => {\n return (\n <div className={cn('flex flex-col gap-1', classNames?.root)}>\n <Label text={label} description={description} required={props.required} />\n\n <RadioGroup\n ref={ref}\n className={cn(\n 'flex text-sm',\n orientation === 'vertical' ? 'flex-col gap-2' : 'flex-row gap-4',\n classNames?.group\n )}\n onValueChange={handleValueChange}\n {...props}\n >\n {options?.map(({ id, title, value }) => (\n <RadioGroupItem\n key={id}\n value={value}\n id={`radio-group-item-${title}`}\n className={classNames?.item}\n >\n {title}\n </RadioGroupItem>\n ))}\n </RadioGroup>\n\n <ErrorMessage message={error} />\n </div>\n )\n }\n)\nRadio.displayName = 'Radio'\n","'use client'\n\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group'\nimport {\n type ComponentPropsWithoutRef,\n type ElementRef,\n forwardRef,\n type PropsWithChildren,\n} from 'react'\n\nimport { cn } from '@/lib/utils'\n\nexport const RadioGroup = forwardRef<\n ElementRef<typeof RadioGroupPrimitive.Root>,\n ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <RadioGroupPrimitive.Root className={className} {...props} ref={ref} />\n))\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName\n\nexport const RadioGroupItem = forwardRef<\n ElementRef<typeof RadioGroupPrimitive.Item>,\n PropsWithChildren<ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>>\n>(({ className, children, ...props }, ref) => {\n return (\n <div className=\"group flex flex-row items-center gap-2\">\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(\n 'peer aspect-square h-4 rounded-full border border-grey-10 shadow outline outline-1 outline-offset-2 outline-transparent focus:outline-none focus:outline-purple-100 focus-visible:ring-1 focus-visible:ring-ring active:border-green-80 disabled:cursor-not-allowed disabled:opacity-50 group-hover:border-grey-20 data-[state=checked]:border-4 data-[disabled]:border-grey-20 data-[state=checked]:border-green-90 data-[disabled]:bg-grey-10 data-[state=checked]:group-hover:border-green-80',\n className\n )}\n {...props}\n />\n <label htmlFor={props.id} className=\"text-sm peer-data-[disabled]:text-grey-40\">\n {children}\n </label>\n </div>\n )\n})\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName\n","import { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","import { type ComponentPropsWithoutRef } from 'react'\n\nimport { cn } from '@/lib/utils'\n\ninterface Props extends ComponentPropsWithoutRef<'p'> {\n message?: string\n}\n\nfunction ErrorMessage({ message, className, ...props }: Readonly<Props>) {\n if (!message) return null\n\n return (\n <p className={cn('px-1 text-xs text-red-600', className)} {...props}>\n {message}\n </p>\n )\n}\n\nexport default ErrorMessage\n","import { InfoIcon } from 'lucide-react'\nimport { type ComponentPropsWithoutRef } from 'react'\n\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from '@/components/primitives/tooltip'\nimport { cn } from '@/lib/utils'\n\ninterface Props extends ComponentPropsWithoutRef<'label'> {\n text?: string\n required?: boolean\n description?: string\n}\n\nfunction Label({ text, required, description, className, ...props }: Readonly<Props>) {\n if (!text) return null\n\n return (\n <div className=\"flex w-full flex-row gap-1\">\n <label\n className={cn(\n 'text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70',\n className\n )}\n {...props}\n >\n {text}\n {required && <span className=\"text-red-600\">&nbsp;*</span>}\n </label>\n\n {!!description && (\n <TooltipProvider>\n <Tooltip>\n <TooltipTrigger asChild>\n <InfoIcon className=\"h-4 w-4\" />\n </TooltipTrigger>\n <TooltipContent className=\"max-w-48\">{description}</TooltipContent>\n </Tooltip>\n </TooltipProvider>\n )}\n </div>\n )\n}\n\nexport default Label\n","'use client'\n\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip'\nimport * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst TooltipProvider = TooltipPrimitive.Provider\n\nconst Tooltip = TooltipPrimitive.Root\n\nconst TooltipTrigger = TooltipPrimitive.Trigger\n\nconst TooltipContent = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n 'z-50 overflow-hidden rounded-md border border-neutral-200 bg-white px-3 py-1.5 text-sm text-neutral-950 shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50',\n className\n )}\n {...props}\n />\n))\nTooltipContent.displayName = TooltipPrimitive.Content.displayName\n\nexport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAA,gBAAgD;;;ACEhD,0BAAqC;AACrC,mBAKO;;;ACRP,kBAAsC;AACtC,4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;AAAA,EAEJ;AACF;AACA,MAAM,cAAc;","names":["import_react","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime"]}
1
+ {"version":3,"sources":["../../../src/components/ui/Radio.tsx","../../../src/components/primitives/radio-group.tsx","../../../src/lib/utils.ts","../../../src/components/ui/ErrorMessage.tsx","../../../src/components/ui/Label.tsx","../../../src/components/primitives/tooltip.tsx"],"sourcesContent":["import { type ComponentProps, forwardRef } from 'react'\n\nimport { RadioGroup, RadioGroupItem } from '@/components/primitives/radio-group'\nimport ErrorMessage from '@/components/ui/ErrorMessage'\nimport Label from '@/components/ui/Label'\nimport { cn } from '@/lib/utils'\n\ntype RadioItem = { id: string | number; title: string; value: string }\ntype RadioClassNames = { root?: string; group?: string; item?: string }\ntype RadioGroupProps = Omit<ComponentProps<typeof RadioGroup>, 'onValueChange'>\nexport type RadioProps = RadioGroupProps & {\n label?: string\n error?: string\n description?: string\n classNames?: RadioClassNames\n options?: RadioItem[]\n onChange?: (value: string) => void\n}\n\nexport const Radio = forwardRef<HTMLInputElement, RadioProps>(\n (\n {\n label,\n error,\n description,\n options,\n classNames,\n onChange: handleValueChange,\n orientation,\n ...props\n },\n ref\n ) => {\n return (\n <div className={cn('flex flex-col gap-1', classNames?.root)}>\n <Label text={label} description={description} required={props.required} />\n\n <RadioGroup\n ref={ref}\n className={cn(\n 'flex text-sm',\n orientation === 'vertical' ? 'flex-col gap-2' : 'flex-row gap-4',\n classNames?.group\n )}\n onValueChange={handleValueChange}\n {...props}\n >\n {options?.map(({ id, title, value }) => (\n <RadioGroupItem\n key={id}\n value={value}\n id={`radio-group-item-${title}`}\n className={classNames?.item}\n >\n {title}\n </RadioGroupItem>\n ))}\n </RadioGroup>\n\n <ErrorMessage message={error} />\n </div>\n )\n }\n)\nRadio.displayName = 'Radio'\n","'use client'\n\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group'\nimport {\n type ComponentPropsWithoutRef,\n type ElementRef,\n forwardRef,\n type PropsWithChildren,\n} from 'react'\n\nimport { cn } from '@/lib/utils'\n\nexport const RadioGroup = forwardRef<\n ElementRef<typeof RadioGroupPrimitive.Root>,\n ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <RadioGroupPrimitive.Root className={className} {...props} ref={ref} />\n))\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName\n\nexport const RadioGroupItem = forwardRef<\n ElementRef<typeof RadioGroupPrimitive.Item>,\n PropsWithChildren<ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>>\n>(({ className, children, ...props }, ref) => {\n return (\n <div className=\"group flex flex-row items-center gap-2\">\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(\n 'peer aspect-square h-4 rounded-full border border-grey-10 shadow outline outline-1 outline-offset-2 outline-transparent focus:outline-none focus:outline-purple-100 focus-visible:ring-1 focus-visible:ring-ring active:border-green-80 disabled:cursor-not-allowed disabled:opacity-50 group-hover:border-grey-20 data-[state=checked]:border-4 data-[disabled]:border-grey-20 data-[state=checked]:border-green-90 data-[disabled]:bg-grey-10 data-[state=checked]:group-hover:border-green-80',\n className\n )}\n {...props}\n />\n <label htmlFor={props.id} className=\"text-sm peer-data-[disabled]:text-grey-40\">\n {children}\n </label>\n </div>\n )\n})\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName\n","import { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n","import { type ComponentPropsWithoutRef } from 'react'\n\nimport { cn } from '@/lib/utils'\n\ninterface Props extends ComponentPropsWithoutRef<'p'> {\n message?: string\n}\n\nfunction ErrorMessage({ message, className, ...props }: Readonly<Props>) {\n if (!message) return null\n\n return (\n <p className={cn('px-1 text-xs text-red-600', className)} {...props}>\n {message}\n </p>\n )\n}\n\nexport default ErrorMessage\n","import { InfoIcon } from 'lucide-react'\nimport { type ComponentPropsWithoutRef } from 'react'\n\nimport {\n Tooltip,\n TooltipContent,\n TooltipProvider,\n TooltipTrigger,\n} from '@/components/primitives/tooltip'\nimport { cn } from '@/lib/utils'\n\ninterface Props extends ComponentPropsWithoutRef<'label'> {\n text?: string\n required?: boolean\n description?: string\n}\n\nfunction Label({ text, required, description, className, ...props }: Readonly<Props>) {\n if (!text) return null\n\n return (\n <div className=\"flex w-full flex-row gap-1\">\n <label\n className={cn(\n 'text-xs text-grey-80 peer-disabled:cursor-not-allowed peer-disabled:opacity-70',\n className\n )}\n {...props}\n >\n {text}\n {required && <span className=\"text-red-600\">&nbsp;*</span>}\n </label>\n\n {!!description && (\n <TooltipProvider>\n <Tooltip>\n <TooltipTrigger asChild>\n <InfoIcon className=\"h-4 w-4\" />\n </TooltipTrigger>\n <TooltipContent className=\"max-w-48\">{description}</TooltipContent>\n </Tooltip>\n </TooltipProvider>\n )}\n </div>\n )\n}\n\nexport default Label\n","'use client'\n\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip'\nimport * as React from 'react'\n\nimport { cn } from '@/lib/utils'\n\nconst TooltipProvider = TooltipPrimitive.Provider\n\nconst Tooltip = TooltipPrimitive.Root\n\nconst TooltipTrigger = TooltipPrimitive.Trigger\n\nconst TooltipContent = React.forwardRef<\n React.ElementRef<typeof TooltipPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n 'z-50 overflow-hidden rounded-md border border-neutral-200 bg-white px-3 py-1.5 text-sm text-neutral-950 shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:border-neutral-800 dark:bg-neutral-950 dark:text-neutral-50',\n className\n )}\n {...props}\n />\n))\nTooltipContent.displayName = TooltipPrimitive.Content.displayName\n\nexport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAA,gBAAgD;;;ACEhD,0BAAqC;AACrC,mBAKO;;;ACRP,kBAAsC;AACtC,4BAAwB;AAEjB,SAAS,MAAM,QAAsB;AAC1C,aAAO,mCAAQ,kBAAK,MAAM,CAAC;AAC7B;;;ADOO,IAAM,iBAAa,yBAGxB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B,oCAAqB,0BAApB,EAAyB,WAAuB,GAAG,OAAO,KAAU,CACtE;AACD,WAAW,cAAkC,yBAAK;AAE3C,IAAM,qBAAiB,yBAG5B,CAAC,EAAE,WAAW,UAAU,GAAG,MAAM,GAAG,QAAQ;AAC5C,SACE,oCAAC,SAAI,WAAU,4CACb;AAAA,IAAqB;AAAA,IAApB;AAAA,MACC;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN,GACA,oCAAC,WAAM,SAAS,MAAM,IAAI,WAAU,+CACjC,QACH,CACF;AAEJ,CAAC;AACD,eAAe,cAAkC,yBAAK;;;AEhCtD,SAAS,aAAa,EAAE,SAAS,WAAW,GAAG,MAAM,GAAoB;AACvE,MAAI,CAAC,QAAS,QAAO;AAErB,SACE,oCAAC,OAAE,WAAW,GAAG,6BAA6B,SAAS,GAAI,GAAG,SAC3D,OACH;AAEJ;AAEA,IAAO,uBAAQ;;;AClBf,0BAAyB;;;ACEzB,uBAAkC;AAClC,IAAAC,SAAuB;AAIvB,IAAM,kBAAmC;AAEzC,IAAM,UAA2B;AAEjC,IAAM,iBAAkC;AAExC,IAAM,iBAAuB,kBAG3B,CAAC,EAAE,WAAW,aAAa,GAAG,GAAG,MAAM,GAAG,QAC1C;AAAA,EAAkB;AAAA,EAAjB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