@solace-health/ui 0.10.670 → 0.10.672

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 (292) hide show
  1. package/README.md +9 -2
  2. package/dist/BackLink/BackLink.cjs +1 -1
  3. package/dist/BackLink/BackLink.js +1 -1
  4. package/dist/Card/illustrations/Clock.cjs +1 -1
  5. package/dist/Card/illustrations/Clock.js +1 -1
  6. package/dist/Card/illustrations/Coffee.cjs +1 -1
  7. package/dist/Card/illustrations/Coffee.js +1 -1
  8. package/dist/Card/illustrations/Laptop.cjs +1 -1
  9. package/dist/Card/illustrations/Laptop.js +1 -1
  10. package/dist/Card/illustrations/Medication.cjs +1 -1
  11. package/dist/Card/illustrations/Medication.js +1 -1
  12. package/dist/Card/illustrations/Notepad.cjs +1 -1
  13. package/dist/Card/illustrations/Notepad.js +1 -1
  14. package/dist/Card/illustrations/index.cjs +1 -1
  15. package/dist/Card/illustrations/index.js +1 -1
  16. package/dist/Card/index.cjs +1 -1
  17. package/dist/Card/index.js +1 -1
  18. package/dist/DateDropdown/index.cjs +1 -1
  19. package/dist/DateDropdown/index.js +1 -1
  20. package/dist/DateSelectCalendar/DateSelectCalendar.cjs +1 -1
  21. package/dist/DateSelectCalendar/DateSelectCalendar.js +1 -1
  22. package/dist/Error/index.cjs +1 -1
  23. package/dist/Error/index.js +1 -1
  24. package/dist/ExpandableDrawer/index.cjs +1 -1
  25. package/dist/ExpandableDrawer/index.js +1 -1
  26. package/dist/File/index.cjs +1 -1
  27. package/dist/File/index.js +1 -1
  28. package/dist/Form/AddressSelect/index.cjs +1 -1
  29. package/dist/Form/AddressSelect/index.js +1 -1
  30. package/dist/Form/Checkbox/index.cjs +1 -1
  31. package/dist/Form/Checkbox/index.js +1 -1
  32. package/dist/Form/DateDropdown/index.cjs +1 -1
  33. package/dist/Form/DateDropdown/index.js +1 -1
  34. package/dist/Form/DateSelect/index.cjs +1 -1
  35. package/dist/Form/DateSelect/index.js +1 -1
  36. package/dist/Form/DateTextMaskInput/index.cjs +1 -1
  37. package/dist/Form/DateTextMaskInput/index.js +1 -1
  38. package/dist/Form/FileUpload/index.cjs +1 -1
  39. package/dist/Form/FileUpload/index.js +1 -1
  40. package/dist/Form/Keyword/index.cjs +1 -1
  41. package/dist/Form/Keyword/index.js +1 -1
  42. package/dist/Form/LocationSelect/index.cjs +1 -1
  43. package/dist/Form/LocationSelect/index.js +1 -1
  44. package/dist/Form/Number/index.cjs +1 -1
  45. package/dist/Form/Number/index.js +1 -1
  46. package/dist/Form/OTP/index.cjs +1 -1
  47. package/dist/Form/OTP/index.js +1 -1
  48. package/dist/Form/Radio/index.cjs +1 -1
  49. package/dist/Form/Radio/index.js +1 -1
  50. package/dist/Form/Select/index.cjs +1 -1
  51. package/dist/Form/Select/index.js +1 -1
  52. package/dist/Form/SelectMenu/index.cjs +1 -1
  53. package/dist/Form/SelectMenu/index.js +1 -1
  54. package/dist/Form/SentimentSelector/index.cjs +1 -1
  55. package/dist/Form/SentimentSelector/index.js +1 -1
  56. package/dist/Form/Signature/index.cjs +1 -1
  57. package/dist/Form/Signature/index.js +1 -1
  58. package/dist/Form/Text/index.cjs +1 -1
  59. package/dist/Form/Text/index.js +1 -1
  60. package/dist/Form/TextInput/index.cjs +1 -1
  61. package/dist/Form/TextInput/index.js +1 -1
  62. package/dist/Form/TimePicker/index.cjs +1 -1
  63. package/dist/Form/TimePicker/index.js +1 -1
  64. package/dist/Form/TimeSelect/index.cjs +1 -1
  65. package/dist/Form/TimeSelect/index.js +1 -1
  66. package/dist/Form/index.cjs +1 -1
  67. package/dist/Form/index.js +1 -1
  68. package/dist/Form/shared/FormInputLabel.cjs +1 -1
  69. package/dist/Form/shared/FormInputLabel.js +1 -1
  70. package/dist/Form/shared/HelpModal.cjs +1 -1
  71. package/dist/Form/shared/HelpModal.js +1 -1
  72. package/dist/IconSelector/IconSelector.cjs +1 -1
  73. package/dist/IconSelector/IconSelector.js +1 -1
  74. package/dist/Icons/index.cjs +1 -1
  75. package/dist/Icons/index.js +1 -1
  76. package/dist/InfoContainer/index.cjs +1 -1
  77. package/dist/InfoContainer/index.js +1 -1
  78. package/dist/InfoContainer/style.cjs +1 -1
  79. package/dist/InfoContainer/style.js +1 -1
  80. package/dist/Input/index.cjs +1 -1
  81. package/dist/Input/index.js +1 -1
  82. package/dist/Menu/ExpandIcon.cjs +1 -1
  83. package/dist/Menu/ExpandIcon.js +1 -1
  84. package/dist/Menu/index.cjs +1 -1
  85. package/dist/Menu/index.js +1 -1
  86. package/dist/Molecules/FilterPopover/FiltersMenu/FiltersMenu.cjs +1 -1
  87. package/dist/Molecules/FilterPopover/FiltersMenu/FiltersMenu.js +1 -1
  88. package/dist/Molecules/FilterPopover/index.cjs +1 -1
  89. package/dist/Molecules/FilterPopover/index.js +1 -1
  90. package/dist/NavigationMenu/ExpandIcon.cjs +1 -1
  91. package/dist/NavigationMenu/ExpandIcon.js +1 -1
  92. package/dist/NavigationMenu/index.cjs +1 -1
  93. package/dist/NavigationMenu/index.js +1 -1
  94. package/dist/NumberedProgressSteps/index.cjs +1 -1
  95. package/dist/NumberedProgressSteps/index.js +1 -1
  96. package/dist/PreviewDrawer/PreviewDrawer.cjs +1 -1
  97. package/dist/PreviewDrawer/PreviewDrawer.js +1 -1
  98. package/dist/Search/index.cjs +1 -1
  99. package/dist/Search/index.js +1 -1
  100. package/dist/SelectClient/index.cjs +1 -1
  101. package/dist/SelectClient/index.js +1 -1
  102. package/dist/SentimentSelector/index.cjs +1 -1
  103. package/dist/SentimentSelector/index.js +1 -1
  104. package/dist/Status/Status.cjs +1 -1
  105. package/dist/Status/Status.js +1 -1
  106. package/dist/TimeSelect/styles.cjs +4 -4
  107. package/dist/TimeSelect/styles.js +1 -1
  108. package/dist/chunk-2DLCWPKO.cjs +27 -0
  109. package/dist/chunk-2DLCWPKO.cjs.map +1 -0
  110. package/dist/{chunk-EZK5NRS6.cjs → chunk-2Z75NLB2.cjs} +2 -2
  111. package/dist/{chunk-EZK5NRS6.cjs.map → chunk-2Z75NLB2.cjs.map} +1 -1
  112. package/dist/{chunk-74AGGELC.js → chunk-3GWTFO2L.js} +2 -2
  113. package/dist/{chunk-74AGGELC.js.map → chunk-3GWTFO2L.js.map} +1 -1
  114. package/dist/{chunk-FMFRB4JI.cjs → chunk-4JAIMZSZ.cjs} +2 -2
  115. package/dist/chunk-4JAIMZSZ.cjs.map +1 -0
  116. package/dist/chunk-55W7GEND.cjs +2 -0
  117. package/dist/{chunk-LVQ73HQQ.cjs.map → chunk-55W7GEND.cjs.map} +1 -1
  118. package/dist/chunk-6ZOLJV4E.js +2 -0
  119. package/dist/chunk-6ZOLJV4E.js.map +1 -0
  120. package/dist/chunk-7QWN4Z56.js +27 -0
  121. package/dist/chunk-7QWN4Z56.js.map +1 -0
  122. package/dist/{chunk-IWIYGWAU.cjs → chunk-AJXBTYDZ.cjs} +2 -2
  123. package/dist/{chunk-IWIYGWAU.cjs.map → chunk-AJXBTYDZ.cjs.map} +1 -1
  124. package/dist/{chunk-FDMT42JJ.js → chunk-AWC577P3.js} +2 -2
  125. package/dist/{chunk-FDMT42JJ.js.map → chunk-AWC577P3.js.map} +1 -1
  126. package/dist/{chunk-UJH4JKQC.cjs → chunk-CXL7BWGB.cjs} +2 -2
  127. package/dist/{chunk-UJH4JKQC.cjs.map → chunk-CXL7BWGB.cjs.map} +1 -1
  128. package/dist/{chunk-O7A6NMSW.cjs → chunk-DXV2Z73Z.cjs} +2 -2
  129. package/dist/{chunk-O7A6NMSW.cjs.map → chunk-DXV2Z73Z.cjs.map} +1 -1
  130. package/dist/{chunk-2KSGTBVN.js → chunk-EHYU2D5K.js} +3 -3
  131. package/dist/{chunk-2KSGTBVN.js.map → chunk-EHYU2D5K.js.map} +1 -1
  132. package/dist/{chunk-LVCOLESY.cjs → chunk-FTPAMVPB.cjs} +2 -2
  133. package/dist/{chunk-LVCOLESY.cjs.map → chunk-FTPAMVPB.cjs.map} +1 -1
  134. package/dist/{chunk-IBQWP337.cjs → chunk-G4NTJXGK.cjs} +2 -2
  135. package/dist/{chunk-IBQWP337.cjs.map → chunk-G4NTJXGK.cjs.map} +1 -1
  136. package/dist/{chunk-K5FWHEG5.js → chunk-IB72OMMJ.js} +2 -2
  137. package/dist/{chunk-K5FWHEG5.js.map → chunk-IB72OMMJ.js.map} +1 -1
  138. package/dist/chunk-IGLT4ZRI.cjs +2 -0
  139. package/dist/{chunk-73J2BHID.cjs.map → chunk-IGLT4ZRI.cjs.map} +1 -1
  140. package/dist/{chunk-OYN4D5J3.js → chunk-IH63GMEB.js} +2 -2
  141. package/dist/{chunk-OYN4D5J3.js.map → chunk-IH63GMEB.js.map} +1 -1
  142. package/dist/{chunk-ZGR3AQC3.js → chunk-JLEVRYCV.js} +2 -2
  143. package/dist/{chunk-ZGR3AQC3.js.map → chunk-JLEVRYCV.js.map} +1 -1
  144. package/dist/{chunk-KPBWHCJ2.js → chunk-JTOJMLMA.js} +2 -2
  145. package/dist/{chunk-KPBWHCJ2.js.map → chunk-JTOJMLMA.js.map} +1 -1
  146. package/dist/{chunk-SBGL7Q6I.cjs → chunk-KXR3HDPA.cjs} +2 -2
  147. package/dist/{chunk-SBGL7Q6I.cjs.map → chunk-KXR3HDPA.cjs.map} +1 -1
  148. package/dist/{chunk-M7LXLMUQ.js → chunk-L4WGCCAE.js} +2 -2
  149. package/dist/{chunk-M7LXLMUQ.js.map → chunk-L4WGCCAE.js.map} +1 -1
  150. package/dist/{chunk-VIPOYVA3.js → chunk-L6YTU45G.js} +2 -2
  151. package/dist/{chunk-VIPOYVA3.js.map → chunk-L6YTU45G.js.map} +1 -1
  152. package/dist/{chunk-QSXPBYYK.cjs → chunk-LSE2OPPE.cjs} +8 -8
  153. package/dist/{chunk-QSXPBYYK.cjs.map → chunk-LSE2OPPE.cjs.map} +1 -1
  154. package/dist/{chunk-NQNIXM6Z.cjs → chunk-N7VC2Y6D.cjs} +2 -2
  155. package/dist/{chunk-NQNIXM6Z.cjs.map → chunk-N7VC2Y6D.cjs.map} +1 -1
  156. package/dist/chunk-NOYE7M3C.js +2 -0
  157. package/dist/{chunk-QDMOGPMW.js.map → chunk-NOYE7M3C.js.map} +1 -1
  158. package/dist/{chunk-STIYYCSL.js → chunk-NUYCR4PO.js} +2 -2
  159. package/dist/{chunk-STIYYCSL.js.map → chunk-NUYCR4PO.js.map} +1 -1
  160. package/dist/{chunk-M2YQU26J.js → chunk-O25TRUNJ.js} +2 -2
  161. package/dist/{chunk-M2YQU26J.js.map → chunk-O25TRUNJ.js.map} +1 -1
  162. package/dist/{chunk-CE72EJFK.js → chunk-OJ34K2SI.js} +2 -2
  163. package/dist/{chunk-CE72EJFK.js.map → chunk-OJ34K2SI.js.map} +1 -1
  164. package/dist/{chunk-KJULJRWW.cjs → chunk-P4TOP5DA.cjs} +2 -2
  165. package/dist/{chunk-KJULJRWW.cjs.map → chunk-P4TOP5DA.cjs.map} +1 -1
  166. package/dist/{chunk-PVA67MWT.js → chunk-PZJJE33F.js} +2 -2
  167. package/dist/{chunk-PVA67MWT.js.map → chunk-PZJJE33F.js.map} +1 -1
  168. package/dist/{chunk-MESFO57T.js → chunk-QA5JXTX4.js} +2 -2
  169. package/dist/{chunk-MESFO57T.js.map → chunk-QA5JXTX4.js.map} +1 -1
  170. package/dist/{chunk-6T7SXJ44.js → chunk-QLHKZWHA.js} +2 -2
  171. package/dist/{chunk-6T7SXJ44.js.map → chunk-QLHKZWHA.js.map} +1 -1
  172. package/dist/{chunk-3WAG2NWA.cjs → chunk-QNRAGVW4.cjs} +2 -2
  173. package/dist/{chunk-3WAG2NWA.cjs.map → chunk-QNRAGVW4.cjs.map} +1 -1
  174. package/dist/chunk-S5RP7WP6.cjs +2 -0
  175. package/dist/{chunk-235PPUQG.cjs.map → chunk-S5RP7WP6.cjs.map} +1 -1
  176. package/dist/{chunk-FQGC44HX.js → chunk-SFZYM6JO.js} +2 -2
  177. package/dist/{chunk-FQGC44HX.js.map → chunk-SFZYM6JO.js.map} +1 -1
  178. package/dist/{chunk-DJ5RP6A2.cjs → chunk-SOCTL7OO.cjs} +2 -2
  179. package/dist/{chunk-DJ5RP6A2.cjs.map → chunk-SOCTL7OO.cjs.map} +1 -1
  180. package/dist/{chunk-RXR3BZZK.cjs → chunk-SS7XU6DP.cjs} +2 -2
  181. package/dist/{chunk-RXR3BZZK.cjs.map → chunk-SS7XU6DP.cjs.map} +1 -1
  182. package/dist/{chunk-5ZJT4NON.cjs → chunk-TOHCZ3QW.cjs} +2 -2
  183. package/dist/{chunk-5ZJT4NON.cjs.map → chunk-TOHCZ3QW.cjs.map} +1 -1
  184. package/dist/{chunk-XOWSDMW5.js → chunk-TP3L65F4.js} +2 -2
  185. package/dist/{chunk-XOWSDMW5.js.map → chunk-TP3L65F4.js.map} +1 -1
  186. package/dist/chunk-UHBA7YS3.js +2 -0
  187. package/dist/{chunk-757OMTKD.js.map → chunk-UHBA7YS3.js.map} +1 -1
  188. package/dist/{chunk-ZZW5IT44.cjs → chunk-UK4RUGSU.cjs} +2 -2
  189. package/dist/{chunk-ZZW5IT44.cjs.map → chunk-UK4RUGSU.cjs.map} +1 -1
  190. package/dist/{chunk-7LWN7ALJ.cjs → chunk-UTNF7OCC.cjs} +3 -3
  191. package/dist/{chunk-7LWN7ALJ.cjs.map → chunk-UTNF7OCC.cjs.map} +1 -1
  192. package/dist/{chunk-2E7ZG247.cjs → chunk-UUJBL6HC.cjs} +2 -2
  193. package/dist/{chunk-2E7ZG247.cjs.map → chunk-UUJBL6HC.cjs.map} +1 -1
  194. package/dist/{chunk-ZF7TZTE3.js → chunk-UZGCNEY6.js} +2 -2
  195. package/dist/{chunk-ZF7TZTE3.js.map → chunk-UZGCNEY6.js.map} +1 -1
  196. package/dist/chunk-VADMB7CF.cjs +2 -0
  197. package/dist/{chunk-LPH4UR2F.cjs.map → chunk-VADMB7CF.cjs.map} +1 -1
  198. package/dist/{chunk-Y2INDMUK.js → chunk-VK4LJHQD.js} +3 -3
  199. package/dist/{chunk-Y2INDMUK.js.map → chunk-VK4LJHQD.js.map} +1 -1
  200. package/dist/{chunk-H37HOXIG.cjs → chunk-VRPFY5VJ.cjs} +2 -2
  201. package/dist/{chunk-H37HOXIG.cjs.map → chunk-VRPFY5VJ.cjs.map} +1 -1
  202. package/dist/{chunk-VRNWKIGB.js → chunk-VUICODT4.js} +2 -2
  203. package/dist/{chunk-VRNWKIGB.js.map → chunk-VUICODT4.js.map} +1 -1
  204. package/dist/chunk-VWU25NGN.js +2 -0
  205. package/dist/{chunk-N72Q537P.js.map → chunk-VWU25NGN.js.map} +1 -1
  206. package/dist/chunk-WBCK7PUI.js +2 -0
  207. package/dist/{chunk-UOJ2V7M2.js.map → chunk-WBCK7PUI.js.map} +1 -1
  208. package/dist/{chunk-MERMPFZT.js → chunk-WHAXVJN5.js} +2 -2
  209. package/dist/{chunk-MERMPFZT.js.map → chunk-WHAXVJN5.js.map} +1 -1
  210. package/dist/{chunk-BFHEVJNW.cjs → chunk-WTGHWP7T.cjs} +2 -2
  211. package/dist/{chunk-BFHEVJNW.cjs.map → chunk-WTGHWP7T.cjs.map} +1 -1
  212. package/dist/{chunk-QFJFQRIG.js → chunk-XN7TZP35.js} +2 -2
  213. package/dist/{chunk-QFJFQRIG.js.map → chunk-XN7TZP35.js.map} +1 -1
  214. package/dist/{chunk-URUWP25E.cjs → chunk-XUH2Y7XC.cjs} +2 -2
  215. package/dist/{chunk-URUWP25E.cjs.map → chunk-XUH2Y7XC.cjs.map} +1 -1
  216. package/dist/{chunk-UIKSYA4B.cjs → chunk-XWIFC5YM.cjs} +2 -2
  217. package/dist/{chunk-UIKSYA4B.cjs.map → chunk-XWIFC5YM.cjs.map} +1 -1
  218. package/dist/{chunk-SC4FK5N3.cjs → chunk-YM3NQKVL.cjs} +2 -2
  219. package/dist/{chunk-SC4FK5N3.cjs.map → chunk-YM3NQKVL.cjs.map} +1 -1
  220. package/dist/{chunk-R2R3QR2N.js → chunk-YNMPPS4U.js} +2 -2
  221. package/dist/{chunk-R2R3QR2N.js.map → chunk-YNMPPS4U.js.map} +1 -1
  222. package/dist/{chunk-EJBXIBM4.js → chunk-Z3HUGXO2.js} +2 -2
  223. package/dist/{chunk-EJBXIBM4.js.map → chunk-Z3HUGXO2.js.map} +1 -1
  224. package/dist/{chunk-RQTTULKO.cjs → chunk-ZP5TG7V6.cjs} +2 -2
  225. package/dist/{chunk-RQTTULKO.cjs.map → chunk-ZP5TG7V6.cjs.map} +1 -1
  226. package/dist/{chunk-TKAISLRS.cjs → chunk-ZWRW73XY.cjs} +2 -2
  227. package/dist/{chunk-TKAISLRS.cjs.map → chunk-ZWRW73XY.cjs.map} +1 -1
  228. package/dist/index.cjs +1 -1
  229. package/dist/index.js +1 -1
  230. package/dist/metafile-cjs.json +1 -1
  231. package/dist/metafile-esm.json +1 -1
  232. package/dist/v2/address-input/address-input.cjs +1 -1
  233. package/dist/v2/address-input/address-input.js +1 -1
  234. package/dist/v2/button/button.cjs +1 -1
  235. package/dist/v2/button/button.d.ts +1 -0
  236. package/dist/v2/button/button.js +1 -1
  237. package/dist/v2/calendar/calendar.cjs +1 -1
  238. package/dist/v2/calendar/calendar.js +1 -1
  239. package/dist/v2/carousel/carousel.cjs +1 -1
  240. package/dist/v2/carousel/carousel.js +1 -1
  241. package/dist/v2/checkbox/button-checkbox.cjs +1 -1
  242. package/dist/v2/checkbox/button-checkbox.js +1 -1
  243. package/dist/v2/checkbox-group/checkbox-group.cjs +1 -1
  244. package/dist/v2/checkbox-group/checkbox-group.js +1 -1
  245. package/dist/v2/combobox/combobox.cjs +1 -1
  246. package/dist/v2/combobox/combobox.js +1 -1
  247. package/dist/v2/command/command.cjs +1 -1
  248. package/dist/v2/command/command.js +1 -1
  249. package/dist/v2/date-picker/date-picker-input.cjs +1 -1
  250. package/dist/v2/date-picker/date-picker-input.js +1 -1
  251. package/dist/v2/date-picker/date-picker.cjs +1 -1
  252. package/dist/v2/date-picker/date-picker.js +1 -1
  253. package/dist/v2/dialog/dialog.cjs +1 -1
  254. package/dist/v2/dialog/dialog.js +1 -1
  255. package/dist/v2/drawer/drawer.cjs +1 -1
  256. package/dist/v2/drawer/drawer.js +1 -1
  257. package/dist/v2/flex-drawer/flex-drawer.cjs +1 -1
  258. package/dist/v2/flex-drawer/flex-drawer.js +1 -1
  259. package/dist/v2/image-preview/image-preview.cjs +1 -1
  260. package/dist/v2/image-preview/image-preview.js +1 -1
  261. package/dist/v2/index.cjs +1 -1
  262. package/dist/v2/index.js +1 -1
  263. package/dist/v2/input/input.cjs +1 -1
  264. package/dist/v2/input/input.d.ts +1 -1
  265. package/dist/v2/input/input.js +1 -1
  266. package/dist/v2/input/input.stories.d.ts +1 -0
  267. package/dist/v2/multiselect/components/MultiSelectCommandGroup.cjs +1 -1
  268. package/dist/v2/multiselect/components/MultiSelectCommandGroup.js +1 -1
  269. package/dist/v2/multiselect/components/MultiSelectDropdown.cjs +1 -1
  270. package/dist/v2/multiselect/components/MultiSelectDropdown.js +1 -1
  271. package/dist/v2/multiselect/components/MultiSelectInput.cjs +1 -1
  272. package/dist/v2/multiselect/components/MultiSelectInput.js +1 -1
  273. package/dist/v2/multiselect/multiselect.cjs +1 -1
  274. package/dist/v2/multiselect/multiselect.js +1 -1
  275. package/dist/v2/time-select/time-select.cjs +1 -1
  276. package/dist/v2/time-select/time-select.js +1 -1
  277. package/package.json +5 -5
  278. package/dist/chunk-235PPUQG.cjs +0 -2
  279. package/dist/chunk-73J2BHID.cjs +0 -2
  280. package/dist/chunk-757OMTKD.js +0 -2
  281. package/dist/chunk-FMFRB4JI.cjs.map +0 -1
  282. package/dist/chunk-LFGDYEFJ.js +0 -27
  283. package/dist/chunk-LFGDYEFJ.js.map +0 -1
  284. package/dist/chunk-LPH4UR2F.cjs +0 -2
  285. package/dist/chunk-LVQ73HQQ.cjs +0 -2
  286. package/dist/chunk-N72Q537P.js +0 -2
  287. package/dist/chunk-QDMOGPMW.js +0 -2
  288. package/dist/chunk-SP2L5FI7.js +0 -2
  289. package/dist/chunk-SP2L5FI7.js.map +0 -1
  290. package/dist/chunk-UIJEPPNJ.cjs +0 -27
  291. package/dist/chunk-UIJEPPNJ.cjs.map +0 -1
  292. package/dist/chunk-UOJ2V7M2.js +0 -2
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkAYDT2WNR_cjs=require('./chunk-AYDT2WNR.cjs'),chunkUQH4L66A_cjs=require('./chunk-UQH4L66A.cjs'),chunkDBJQ7H6H_cjs=require('./chunk-DBJQ7H6H.cjs'),chunkNQNIXM6Z_cjs=require('./chunk-NQNIXM6Z.cjs'),chunk4VLWKHXC_cjs=require('./chunk-4VLWKHXC.cjs'),chunkPM4UNYHM_cjs=require('./chunk-PM4UNYHM.cjs'),chunkUYX4D44N_cjs=require('./chunk-UYX4D44N.cjs'),chunkKLVOKO56_cjs=require('./chunk-KLVOKO56.cjs'),chunkUJH4JKQC_cjs=require('./chunk-UJH4JKQC.cjs'),chunkEZK5NRS6_cjs=require('./chunk-EZK5NRS6.cjs'),chunkQRO22BPZ_cjs=require('./chunk-QRO22BPZ.cjs'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var ae=react.forwardRef((C,P)=>{let{id:x,value:s,onChange:D,placeholder:F,defaultOptions:T=[],options:K=[],delay:V,onSearch:n,triggerSearchOnOpen:W,loading:B=false,loadingIndicator:E,emptyIndicator:H,maxSelected:k=0,onMaxSelected:q,hidePlaceholderWhenSelected:L=true,disabled:a,className:Y,classNames:z,badgeWrapperClassName:A,badgeClassName:G,getBadgeClassName:J=()=>"",selectFirstItem:Q=true,commandProps:e,inputProps:U,persistInputOnSelect:X=false,persistInputOnBlur:Z=false}=C,{inputRef:t,commandRef:c,onSearchRef:_,scrollbarRef:u,prevExternalOptionsRef:$}=chunkKLVOKO56_cjs.a({onSearch:n}),{uniqueId:p,open:o,setOpen:m,selected:r,setSelected:l,options:j,setOptions:ee,inputSearchValue:te,setInputSearchValue:d,debouncedSearchTerm:re}=chunkUYX4D44N_cjs.a({id:x,value:s,defaultOptions:T,delay:V}),{toggleOption:f,handleKeyDown:oe}=chunkPM4UNYHM_cjs.a({open:o,selected:r,maxSelected:k,onChange:D,onMaxSelected:q,setInputSearchValue:d,commandRef:c,inputRef:t,setSelected:l,setOpen:m,persistInputOnSelect:X});chunkAYDT2WNR_cjs.a({debouncedSearchTerm:re,open:o,onSearchRef:_,triggerSearchOnOpen:W}),chunkUQH4L66A_cjs.a({externalOptions:K,setOptions:ee,prevExternalOptionsRef:$}),chunkDBJQ7H6H_cjs.a({value:s,setSelected:l}),react.useImperativeHandle(P,()=>({selectedValue:[...r],input:t.current,focus:()=>t?.current?.focus(),reset:()=>l([])}),[r,t,l]);let le=react.useCallback(()=>{if(e?.filter)return e.filter},[e?.filter]);return jsxRuntime.jsxs(chunkEZK5NRS6_cjs.a,{ref:c,...e,onKeyDown:S=>{oe(S),e?.onKeyDown?.(S);},className:chunkQRO22BPZ_cjs.a("h-auto overflow-visible bg-transparent",e?.className),shouldFilter:e?.shouldFilter!==void 0?e.shouldFilter:!n,filter:le(),children:[jsxRuntime.jsx(chunk4VLWKHXC_cjs.a,{open:o,disabled:a,inputRef:t,selected:r,uniqueId:p,className:Y,children:jsxRuntime.jsx(chunkNQNIXM6Z_cjs.a,{selected:r,scrollbarRef:u,toggleOption:f,inputProps:U,inputRef:t,open:o,setOpen:m,placeholder:F,hidePlaceholderWhenSelected:L,disabled:a,classNames:z,badgeWrapperClassName:A,badgeClassName:G,getBadgeClassName:J,inputSearchValue:te,setInputSearchValue:d,persistInputOnBlur:Z})}),jsxRuntime.jsx(chunkUJH4JKQC_cjs.a,{uniqueId:p,scrollbarRef:u,open:o,loading:B,options:j,selected:r,toggleOption:f,onSearch:n,inputRef:t,emptyIndicator:H,loadingIndicator:E,selectFirstItem:Q})]})});ae.displayName="MultiSelect";exports.a=ae;//# sourceMappingURL=chunk-H37HOXIG.cjs.map
2
- //# sourceMappingURL=chunk-H37HOXIG.cjs.map
1
+ 'use strict';var chunkCXL7BWGB_cjs=require('./chunk-CXL7BWGB.cjs'),chunkN7VC2Y6D_cjs=require('./chunk-N7VC2Y6D.cjs'),chunk4VLWKHXC_cjs=require('./chunk-4VLWKHXC.cjs'),chunkKLVOKO56_cjs=require('./chunk-KLVOKO56.cjs'),chunkAYDT2WNR_cjs=require('./chunk-AYDT2WNR.cjs'),chunkUQH4L66A_cjs=require('./chunk-UQH4L66A.cjs'),chunkDBJQ7H6H_cjs=require('./chunk-DBJQ7H6H.cjs'),chunkPM4UNYHM_cjs=require('./chunk-PM4UNYHM.cjs'),chunkUYX4D44N_cjs=require('./chunk-UYX4D44N.cjs'),chunk2Z75NLB2_cjs=require('./chunk-2Z75NLB2.cjs'),chunkQRO22BPZ_cjs=require('./chunk-QRO22BPZ.cjs'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var ae=react.forwardRef((C,P)=>{let{id:x,value:s,onChange:D,placeholder:F,defaultOptions:T=[],options:K=[],delay:V,onSearch:n,triggerSearchOnOpen:W,loading:B=false,loadingIndicator:E,emptyIndicator:H,maxSelected:k=0,onMaxSelected:q,hidePlaceholderWhenSelected:L=true,disabled:a,className:Y,classNames:z,badgeWrapperClassName:A,badgeClassName:G,getBadgeClassName:J=()=>"",selectFirstItem:Q=true,commandProps:e,inputProps:U,persistInputOnSelect:X=false,persistInputOnBlur:Z=false}=C,{inputRef:t,commandRef:c,onSearchRef:_,scrollbarRef:u,prevExternalOptionsRef:$}=chunkKLVOKO56_cjs.a({onSearch:n}),{uniqueId:p,open:o,setOpen:m,selected:r,setSelected:l,options:j,setOptions:ee,inputSearchValue:te,setInputSearchValue:d,debouncedSearchTerm:re}=chunkUYX4D44N_cjs.a({id:x,value:s,defaultOptions:T,delay:V}),{toggleOption:f,handleKeyDown:oe}=chunkPM4UNYHM_cjs.a({open:o,selected:r,maxSelected:k,onChange:D,onMaxSelected:q,setInputSearchValue:d,commandRef:c,inputRef:t,setSelected:l,setOpen:m,persistInputOnSelect:X});chunkAYDT2WNR_cjs.a({debouncedSearchTerm:re,open:o,onSearchRef:_,triggerSearchOnOpen:W}),chunkUQH4L66A_cjs.a({externalOptions:K,setOptions:ee,prevExternalOptionsRef:$}),chunkDBJQ7H6H_cjs.a({value:s,setSelected:l}),react.useImperativeHandle(P,()=>({selectedValue:[...r],input:t.current,focus:()=>t?.current?.focus(),reset:()=>l([])}),[r,t,l]);let le=react.useCallback(()=>{if(e?.filter)return e.filter},[e?.filter]);return jsxRuntime.jsxs(chunk2Z75NLB2_cjs.a,{ref:c,...e,onKeyDown:S=>{oe(S),e?.onKeyDown?.(S);},className:chunkQRO22BPZ_cjs.a("h-auto overflow-visible bg-transparent",e?.className),shouldFilter:e?.shouldFilter!==void 0?e.shouldFilter:!n,filter:le(),children:[jsxRuntime.jsx(chunk4VLWKHXC_cjs.a,{open:o,disabled:a,inputRef:t,selected:r,uniqueId:p,className:Y,children:jsxRuntime.jsx(chunkN7VC2Y6D_cjs.a,{selected:r,scrollbarRef:u,toggleOption:f,inputProps:U,inputRef:t,open:o,setOpen:m,placeholder:F,hidePlaceholderWhenSelected:L,disabled:a,classNames:z,badgeWrapperClassName:A,badgeClassName:G,getBadgeClassName:J,inputSearchValue:te,setInputSearchValue:d,persistInputOnBlur:Z})}),jsxRuntime.jsx(chunkCXL7BWGB_cjs.a,{uniqueId:p,scrollbarRef:u,open:o,loading:B,options:j,selected:r,toggleOption:f,onSearch:n,inputRef:t,emptyIndicator:H,loadingIndicator:E,selectFirstItem:Q})]})});ae.displayName="MultiSelect";exports.a=ae;//# sourceMappingURL=chunk-VRPFY5VJ.cjs.map
2
+ //# sourceMappingURL=chunk-VRPFY5VJ.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/v2/multiselect/multiselect.tsx"],"names":["MultiSelect","forwardRef","props","ref","id","value","onChange","placeholder","externalDefaultOptions","externalOptions","delay","onSearch","triggerSearchOnOpen","loading","loadingIndicator","emptyIndicator","maxSelected","onMaxSelected","hidePlaceholderWhenSelected","disabled","className","classNames","badgeWrapperClassName","badgeClassName","getBadgeClassName","selectFirstItem","commandProps","inputProps","persistInputOnSelect","persistInputOnBlur","inputRef","commandRef","onSearchRef","scrollbarRef","prevExternalOptionsRef","useRefs","uniqueId","open","setOpen","selected","setSelected","options","setOptions","inputSearchValue","setInputSearchValue","debouncedSearchTerm","useMultiSelect","toggleOption","handleKeyDown","useInteractions","useSearch","useSyncOptions","useSyncSelected","useImperativeHandle","commandFilter","useCallback","jsxs","Command","e","cn","jsx","MultiSelectTrigger","MultiSelectInput","MultiSelectDropdown"],"mappings":"snBAcO,IAAMA,EAAAA,CAAcC,iBACzB,CAACC,CAAAA,CAAyBC,IAA6B,CACrD,GAAM,CACJ,EAAA,CAAAC,CAAAA,CACA,MAAAC,CAAAA,CACA,QAAA,CAAAC,EACA,WAAA,CAAAC,CAAAA,CACA,eAAgBC,CAAAA,CAAyB,GACzC,OAAA,CAASC,CAAAA,CAAkB,EAAC,CAC5B,KAAA,CAAAC,EACA,QAAA,CAAAC,CAAAA,CACA,oBAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CAAU,KAAA,CACV,iBAAAC,CAAAA,CACA,cAAA,CAAAC,EACA,WAAA,CAAAC,CAAAA,CAAc,EACd,aAAA,CAAAC,CAAAA,CACA,4BAAAC,CAAAA,CAA8B,IAAA,CAC9B,SAAAC,CAAAA,CACA,SAAA,CAAAC,EACA,UAAA,CAAAC,CAAAA,CACA,sBAAAC,CAAAA,CACA,cAAA,CAAAC,EACA,iBAAA,CAAAC,CAAAA,CAAoB,IAAM,EAAA,CAC1B,eAAA,CAAAC,EAAkB,IAAA,CAClB,YAAA,CAAAC,EACA,UAAA,CAAAC,CAAAA,CACA,qBAAAC,CAAAA,CAAuB,KAAA,CACvB,mBAAAC,CAAAA,CAAqB,KACvB,EAAI3B,CAAAA,CAEE,CAAE,SAAA4B,CAAAA,CAAU,UAAA,CAAAC,CAAAA,CAAY,WAAA,CAAAC,EAAa,YAAA,CAAAC,CAAAA,CAAc,uBAAAC,CAAuB,CAAA,CAAIC,oBAAQ,CAC1F,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OAAA,CAAAxB,EACA,OAAA,CAAA4B,CAAAA,CACA,SAAAF,CAAAA,CACA,YAAA,CAAAQ,EACA,QAAA,CAAApC,CAAAA,CACA,SAAAmB,CAAAA,CACA,cAAA,CAAAf,EACA,gBAAA,CAAAD,CAAAA,CACA,gBAAAW,CAAAA,CAEJ,CAAA,CAAA,CACF,CAEJ,CACF,EAEAzB,GAAY,WAAA,CAAc,aAAA","file":"chunk-H37HOXIG.cjs","sourcesContent":["import { forwardRef, Ref, useCallback, useImperativeHandle } from 'react';\nimport { Command } from '@/v2/command/command';\nimport { cn } from '@/lib/utils';\nimport { MultiSelectProps, MultiSelectRef } from './types';\nimport { useMultiSelect } from './hooks/useMultiSelect';\nimport { useRefs } from './hooks/useRefs';\nimport { useInteractions } from './hooks/useInteractions';\nimport { useSearch } from './hooks/useSearch';\nimport { MultiSelectTrigger } from './components/MultiSelectTrigger';\nimport { MultiSelectInput } from './components/MultiSelectInput';\nimport { MultiSelectDropdown } from './components/MultiSelectDropdown';\nimport { useSyncOptions } from './hooks/useSyncOptions';\nimport { useSyncSelected } from './hooks/useSyncSelected';\n\nexport const MultiSelect = forwardRef<MultiSelectRef, MultiSelectProps>(\n (props: MultiSelectProps, ref: Ref<MultiSelectRef>) => {\n const {\n id,\n value,\n onChange,\n placeholder,\n defaultOptions: externalDefaultOptions = [],\n options: externalOptions = [],\n delay,\n onSearch,\n triggerSearchOnOpen,\n loading = false,\n loadingIndicator,\n emptyIndicator,\n maxSelected = 0,\n onMaxSelected,\n hidePlaceholderWhenSelected = true,\n disabled,\n className,\n classNames,\n badgeWrapperClassName,\n badgeClassName,\n getBadgeClassName = () => '',\n selectFirstItem = true,\n commandProps,\n inputProps,\n persistInputOnSelect = false,\n persistInputOnBlur = false,\n } = props;\n\n const { inputRef, commandRef, onSearchRef, scrollbarRef, prevExternalOptionsRef } = useRefs({\n onSearch,\n });\n\n const {\n uniqueId,\n open,\n setOpen,\n selected,\n setSelected,\n options,\n setOptions,\n inputSearchValue,\n setInputSearchValue,\n debouncedSearchTerm,\n } = useMultiSelect({\n id,\n value,\n defaultOptions: externalDefaultOptions,\n delay,\n });\n\n const { toggleOption, handleKeyDown } = useInteractions({\n open,\n selected,\n maxSelected,\n onChange,\n onMaxSelected,\n setInputSearchValue,\n commandRef,\n inputRef,\n setSelected,\n setOpen,\n persistInputOnSelect,\n });\n\n useSearch({\n debouncedSearchTerm,\n open,\n onSearchRef,\n triggerSearchOnOpen,\n });\n\n useSyncOptions({\n externalOptions,\n setOptions,\n prevExternalOptionsRef,\n });\n\n useSyncSelected({\n value,\n setSelected,\n });\n\n useImperativeHandle(\n ref,\n () => ({\n selectedValue: [...selected],\n input: inputRef.current as HTMLInputElement,\n focus: () => inputRef?.current?.focus(),\n reset: () => setSelected([]),\n }),\n [selected, inputRef, setSelected],\n );\n\n const commandFilter = useCallback(() => {\n if (commandProps?.filter) {\n return commandProps.filter;\n }\n\n // Using default filter in `cmdk`. We don't have to provide it.\n return undefined;\n }, [commandProps?.filter]);\n\n return (\n <Command\n ref={commandRef}\n {...commandProps}\n onKeyDown={(e) => {\n handleKeyDown(e);\n commandProps?.onKeyDown?.(e);\n }}\n className={cn('h-auto overflow-visible bg-transparent', commandProps?.className)}\n shouldFilter={\n commandProps?.shouldFilter !== undefined ? commandProps.shouldFilter : !onSearch\n } // When onSearch is provided, we don't want to filter the options. You can still override it.\n filter={commandFilter()}\n >\n <MultiSelectTrigger {...{ open, disabled, inputRef, selected, uniqueId, className }}>\n <MultiSelectInput\n {...{\n selected,\n scrollbarRef,\n toggleOption,\n inputProps,\n inputRef,\n open,\n setOpen,\n placeholder,\n hidePlaceholderWhenSelected,\n disabled,\n classNames,\n badgeWrapperClassName,\n badgeClassName,\n getBadgeClassName,\n inputSearchValue,\n setInputSearchValue,\n persistInputOnBlur,\n }}\n />\n </MultiSelectTrigger>\n\n <MultiSelectDropdown\n {...{\n uniqueId,\n scrollbarRef,\n open,\n loading,\n options,\n selected,\n toggleOption,\n onSearch,\n inputRef,\n emptyIndicator,\n loadingIndicator,\n selectFirstItem,\n }}\n />\n </Command>\n );\n },\n);\n\nMultiSelect.displayName = 'MultiSelect';\n"]}
1
+ {"version":3,"sources":["../src/v2/multiselect/multiselect.tsx"],"names":["MultiSelect","forwardRef","props","ref","id","value","onChange","placeholder","externalDefaultOptions","externalOptions","delay","onSearch","triggerSearchOnOpen","loading","loadingIndicator","emptyIndicator","maxSelected","onMaxSelected","hidePlaceholderWhenSelected","disabled","className","classNames","badgeWrapperClassName","badgeClassName","getBadgeClassName","selectFirstItem","commandProps","inputProps","persistInputOnSelect","persistInputOnBlur","inputRef","commandRef","onSearchRef","scrollbarRef","prevExternalOptionsRef","useRefs","uniqueId","open","setOpen","selected","setSelected","options","setOptions","inputSearchValue","setInputSearchValue","debouncedSearchTerm","useMultiSelect","toggleOption","handleKeyDown","useInteractions","useSearch","useSyncOptions","useSyncSelected","useImperativeHandle","commandFilter","useCallback","jsxs","Command","e","cn","jsx","MultiSelectTrigger","MultiSelectInput","MultiSelectDropdown"],"mappings":"snBAcO,IAAMA,EAAAA,CAAcC,iBACzB,CAACC,CAAAA,CAAyBC,IAA6B,CACrD,GAAM,CACJ,EAAA,CAAAC,CAAAA,CACA,MAAAC,CAAAA,CACA,QAAA,CAAAC,EACA,WAAA,CAAAC,CAAAA,CACA,eAAgBC,CAAAA,CAAyB,GACzC,OAAA,CAASC,CAAAA,CAAkB,EAAC,CAC5B,KAAA,CAAAC,EACA,QAAA,CAAAC,CAAAA,CACA,oBAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CAAU,KAAA,CACV,iBAAAC,CAAAA,CACA,cAAA,CAAAC,EACA,WAAA,CAAAC,CAAAA,CAAc,EACd,aAAA,CAAAC,CAAAA,CACA,4BAAAC,CAAAA,CAA8B,IAAA,CAC9B,SAAAC,CAAAA,CACA,SAAA,CAAAC,EACA,UAAA,CAAAC,CAAAA,CACA,sBAAAC,CAAAA,CACA,cAAA,CAAAC,EACA,iBAAA,CAAAC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,EACA,WAAA,CAAA/B,CAAAA,CACA,4BAAAW,CAAAA,CACA,QAAA,CAAAC,EACA,UAAA,CAAAE,CAAAA,CACA,sBAAAC,CAAAA,CACA,cAAA,CAAAC,EACA,iBAAA,CAAAC,CAAAA,CACA,iBAAAmB,EAAAA,CACA,mBAAA,CAAAC,EACA,kBAAA,CAAAf,CAAAA,CAEJ,EACF,CAAA,CAEA+B,cAAAA,CAACG,oBAAA,CAEG,QAAA,CAAA3B,EACA,YAAA,CAAAH,CAAAA,CACA,KAAAI,CAAAA,CACA,OAAA,CAAAxB,EACA,OAAA,CAAA4B,CAAAA,CACA,SAAAF,CAAAA,CACA,YAAA,CAAAQ,EACA,QAAA,CAAApC,CAAAA,CACA,SAAAmB,CAAAA,CACA,cAAA,CAAAf,EACA,gBAAA,CAAAD,CAAAA,CACA,gBAAAW,CAAAA,CAEJ,CAAA,CAAA,CACF,CAEJ,CACF,EAEAzB,GAAY,WAAA,CAAc,aAAA","file":"chunk-VRPFY5VJ.cjs","sourcesContent":["import { forwardRef, Ref, useCallback, useImperativeHandle } from 'react';\nimport { Command } from '@/v2/command/command';\nimport { cn } from '@/lib/utils';\nimport { MultiSelectProps, MultiSelectRef } from './types';\nimport { useMultiSelect } from './hooks/useMultiSelect';\nimport { useRefs } from './hooks/useRefs';\nimport { useInteractions } from './hooks/useInteractions';\nimport { useSearch } from './hooks/useSearch';\nimport { MultiSelectTrigger } from './components/MultiSelectTrigger';\nimport { MultiSelectInput } from './components/MultiSelectInput';\nimport { MultiSelectDropdown } from './components/MultiSelectDropdown';\nimport { useSyncOptions } from './hooks/useSyncOptions';\nimport { useSyncSelected } from './hooks/useSyncSelected';\n\nexport const MultiSelect = forwardRef<MultiSelectRef, MultiSelectProps>(\n (props: MultiSelectProps, ref: Ref<MultiSelectRef>) => {\n const {\n id,\n value,\n onChange,\n placeholder,\n defaultOptions: externalDefaultOptions = [],\n options: externalOptions = [],\n delay,\n onSearch,\n triggerSearchOnOpen,\n loading = false,\n loadingIndicator,\n emptyIndicator,\n maxSelected = 0,\n onMaxSelected,\n hidePlaceholderWhenSelected = true,\n disabled,\n className,\n classNames,\n badgeWrapperClassName,\n badgeClassName,\n getBadgeClassName = () => '',\n selectFirstItem = true,\n commandProps,\n inputProps,\n persistInputOnSelect = false,\n persistInputOnBlur = false,\n } = props;\n\n const { inputRef, commandRef, onSearchRef, scrollbarRef, prevExternalOptionsRef } = useRefs({\n onSearch,\n });\n\n const {\n uniqueId,\n open,\n setOpen,\n selected,\n setSelected,\n options,\n setOptions,\n inputSearchValue,\n setInputSearchValue,\n debouncedSearchTerm,\n } = useMultiSelect({\n id,\n value,\n defaultOptions: externalDefaultOptions,\n delay,\n });\n\n const { toggleOption, handleKeyDown } = useInteractions({\n open,\n selected,\n maxSelected,\n onChange,\n onMaxSelected,\n setInputSearchValue,\n commandRef,\n inputRef,\n setSelected,\n setOpen,\n persistInputOnSelect,\n });\n\n useSearch({\n debouncedSearchTerm,\n open,\n onSearchRef,\n triggerSearchOnOpen,\n });\n\n useSyncOptions({\n externalOptions,\n setOptions,\n prevExternalOptionsRef,\n });\n\n useSyncSelected({\n value,\n setSelected,\n });\n\n useImperativeHandle(\n ref,\n () => ({\n selectedValue: [...selected],\n input: inputRef.current as HTMLInputElement,\n focus: () => inputRef?.current?.focus(),\n reset: () => setSelected([]),\n }),\n [selected, inputRef, setSelected],\n );\n\n const commandFilter = useCallback(() => {\n if (commandProps?.filter) {\n return commandProps.filter;\n }\n\n // Using default filter in `cmdk`. We don't have to provide it.\n return undefined;\n }, [commandProps?.filter]);\n\n return (\n <Command\n ref={commandRef}\n {...commandProps}\n onKeyDown={(e) => {\n handleKeyDown(e);\n commandProps?.onKeyDown?.(e);\n }}\n className={cn('h-auto overflow-visible bg-transparent', commandProps?.className)}\n shouldFilter={\n commandProps?.shouldFilter !== undefined ? commandProps.shouldFilter : !onSearch\n } // When onSearch is provided, we don't want to filter the options. You can still override it.\n filter={commandFilter()}\n >\n <MultiSelectTrigger {...{ open, disabled, inputRef, selected, uniqueId, className }}>\n <MultiSelectInput\n {...{\n selected,\n scrollbarRef,\n toggleOption,\n inputProps,\n inputRef,\n open,\n setOpen,\n placeholder,\n hidePlaceholderWhenSelected,\n disabled,\n classNames,\n badgeWrapperClassName,\n badgeClassName,\n getBadgeClassName,\n inputSearchValue,\n setInputSearchValue,\n persistInputOnBlur,\n }}\n />\n </MultiSelectTrigger>\n\n <MultiSelectDropdown\n {...{\n uniqueId,\n scrollbarRef,\n open,\n loading,\n options,\n selected,\n toggleOption,\n onSearch,\n inputRef,\n emptyIndicator,\n loadingIndicator,\n selectFirstItem,\n }}\n />\n </Command>\n );\n },\n);\n\nMultiSelect.displayName = 'MultiSelect';\n"]}
@@ -1,2 +1,2 @@
1
- import {a as a$2}from'./chunk-QXJCAXNP.js';import {a,b,c}from'./chunk-ICTICKOW.js';import {a as a$1}from'./chunk-K6BJQE2V.js';import {jsxs,jsx}from'react/jsx-runtime';var g=({active:a$3=false})=>jsxs(a,{children:[jsxs(b,{children:[jsx("img",{src:`${a$1}/illustrations/card/notepad-desktop.svg`,alt:"notepad",width:"300",height:"300"}),jsx(a$2,{active:a$3,children:jsx("img",{src:`${a$1}/illustrations/card/notepad-desktop-fill.svg`,alt:"",width:"300",height:"300"})})]}),jsxs(c,{children:[jsx("img",{src:`${a$1}/illustrations/card/notepad-mobile.svg`,alt:"notepad",width:"358",height:"112"}),jsx(a$2,{active:a$3,children:jsx("img",{src:`${a$1}/illustrations/card/notepad-mobile-fill.svg`,alt:"notepad",width:"358",height:"112"})})]})]});export{g as a};//# sourceMappingURL=chunk-VRNWKIGB.js.map
2
- //# sourceMappingURL=chunk-VRNWKIGB.js.map
1
+ import {a,b,c}from'./chunk-ICTICKOW.js';import {a as a$2}from'./chunk-QXJCAXNP.js';import {a as a$1}from'./chunk-K6BJQE2V.js';import {jsxs,jsx}from'react/jsx-runtime';var g=({active:a$3=false})=>jsxs(a,{children:[jsxs(b,{children:[jsx("img",{src:`${a$1}/illustrations/card/notepad-desktop.svg`,alt:"notepad",width:"300",height:"300"}),jsx(a$2,{active:a$3,children:jsx("img",{src:`${a$1}/illustrations/card/notepad-desktop-fill.svg`,alt:"",width:"300",height:"300"})})]}),jsxs(c,{children:[jsx("img",{src:`${a$1}/illustrations/card/notepad-mobile.svg`,alt:"notepad",width:"358",height:"112"}),jsx(a$2,{active:a$3,children:jsx("img",{src:`${a$1}/illustrations/card/notepad-mobile-fill.svg`,alt:"notepad",width:"358",height:"112"})})]})]});export{g as a};//# sourceMappingURL=chunk-VUICODT4.js.map
2
+ //# sourceMappingURL=chunk-VUICODT4.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/Card/illustrations/Notepad.tsx"],"names":["Notepad","active","jsxs","IllustrationContainer","DesktopIllustration","jsx","ILLUSTRATIONS_BASE_URL","FillContainer_default","MobileIllustration"],"mappings":"uKAQO,IAAMA,CAAAA,CAAU,CAAC,CAAE,MAAA,CAAAC,IAAS,KAAM,CAAA,GACvCC,KAACC,CAAAA,CAAA,CACC,UAAAD,IAAAA,CAACE,CAAAA,CAAA,CACC,QAAA,CAAA,CAAAC,GAAAA,CAAC,OACC,GAAA,CAAK,CAAA,EAAGC,GAAsB,CAAA,uCAAA,CAAA,CAC9B,GAAA,CAAI,UACJ,KAAA,CAAM,KAAA,CACN,OAAO,KAAA,CACT,CAAA,CACAD,IAACE,GAAAA,CAAA,CAAc,OAAQN,GAAAA,CACrB,QAAA,CAAAI,IAAC,KAAA,CAAA,CACC,GAAA,CAAK,GAAGC,GAAsB,CAAA,4CAAA,CAAA,CAC9B,IAAI,EAAA,CACJ,KAAA,CAAM,MACN,MAAA,CAAO,KAAA,CACT,EACF,CAAA,CAAA,CACF,CAAA,CACAJ,KAACM,CAAAA,CAAA,CACC,UAAAH,GAAAA,CAAC,KAAA,CAAA,CACC,IAAK,CAAA,EAAGC,GAAsB,yCAC9B,GAAA,CAAI,SAAA,CACJ,MAAM,KAAA,CACN,MAAA,CAAO,MACT,CAAA,CACAD,GAAAA,CAACE,IAAA,CAAc,MAAA,CAAQN,IACrB,QAAA,CAAAI,GAAAA,CAAC,OACC,GAAA,CAAK,CAAA,EAAGC,GAAsB,CAAA,2CAAA,CAAA,CAC9B,GAAA,CAAI,UACJ,KAAA,CAAM,KAAA,CACN,OAAO,KAAA,CACT,CAAA,CACF,GACF,CAAA,CAAA,CACF","file":"chunk-VRNWKIGB.js","sourcesContent":["import { ILLUSTRATIONS_BASE_URL } from '../../constants';\nimport FillContainer from '../../Form/Checkbox/shared/FillContainer';\nimport {\n DesktopIllustration,\n IllustrationContainer,\n MobileIllustration,\n} from '../../Form/Checkbox/shared/style';\n\nexport const Notepad = ({ active = false }: { active?: boolean }) => (\n <IllustrationContainer>\n <DesktopIllustration>\n <img\n src={`${ILLUSTRATIONS_BASE_URL}/illustrations/card/notepad-desktop.svg`}\n alt=\"notepad\"\n width=\"300\"\n height=\"300\"\n />\n <FillContainer active={active}>\n <img\n src={`${ILLUSTRATIONS_BASE_URL}/illustrations/card/notepad-desktop-fill.svg`}\n alt=\"\"\n width=\"300\"\n height=\"300\"\n />\n </FillContainer>\n </DesktopIllustration>\n <MobileIllustration>\n <img\n src={`${ILLUSTRATIONS_BASE_URL}/illustrations/card/notepad-mobile.svg`}\n alt=\"notepad\"\n width=\"358\"\n height=\"112\"\n />\n <FillContainer active={active}>\n <img\n src={`${ILLUSTRATIONS_BASE_URL}/illustrations/card/notepad-mobile-fill.svg`}\n alt=\"notepad\"\n width=\"358\"\n height=\"112\"\n />\n </FillContainer>\n </MobileIllustration>\n </IllustrationContainer>\n);\n"]}
1
+ {"version":3,"sources":["../src/Card/illustrations/Notepad.tsx"],"names":["Notepad","active","jsxs","IllustrationContainer","DesktopIllustration","jsx","ILLUSTRATIONS_BASE_URL","FillContainer_default","MobileIllustration"],"mappings":"uKAQO,IAAMA,CAAAA,CAAU,CAAC,CAAE,MAAA,CAAAC,IAAS,KAAM,CAAA,GACvCC,KAACC,CAAAA,CAAA,CACC,UAAAD,IAAAA,CAACE,CAAAA,CAAA,CACC,QAAA,CAAA,CAAAC,GAAAA,CAAC,OACC,GAAA,CAAK,CAAA,EAAGC,GAAsB,CAAA,uCAAA,CAAA,CAC9B,GAAA,CAAI,UACJ,KAAA,CAAM,KAAA,CACN,OAAO,KAAA,CACT,CAAA,CACAD,IAACE,GAAAA,CAAA,CAAc,OAAQN,GAAAA,CACrB,QAAA,CAAAI,IAAC,KAAA,CAAA,CACC,GAAA,CAAK,GAAGC,GAAsB,CAAA,4CAAA,CAAA,CAC9B,IAAI,EAAA,CACJ,KAAA,CAAM,MACN,MAAA,CAAO,KAAA,CACT,EACF,CAAA,CAAA,CACF,CAAA,CACAJ,KAACM,CAAAA,CAAA,CACC,UAAAH,GAAAA,CAAC,KAAA,CAAA,CACC,IAAK,CAAA,EAAGC,GAAsB,yCAC9B,GAAA,CAAI,SAAA,CACJ,MAAM,KAAA,CACN,MAAA,CAAO,MACT,CAAA,CACAD,GAAAA,CAACE,IAAA,CAAc,MAAA,CAAQN,IACrB,QAAA,CAAAI,GAAAA,CAAC,OACC,GAAA,CAAK,CAAA,EAAGC,GAAsB,CAAA,2CAAA,CAAA,CAC9B,GAAA,CAAI,UACJ,KAAA,CAAM,KAAA,CACN,OAAO,KAAA,CACT,CAAA,CACF,GACF,CAAA,CAAA,CACF","file":"chunk-VUICODT4.js","sourcesContent":["import { ILLUSTRATIONS_BASE_URL } from '../../constants';\nimport FillContainer from '../../Form/Checkbox/shared/FillContainer';\nimport {\n DesktopIllustration,\n IllustrationContainer,\n MobileIllustration,\n} from '../../Form/Checkbox/shared/style';\n\nexport const Notepad = ({ active = false }: { active?: boolean }) => (\n <IllustrationContainer>\n <DesktopIllustration>\n <img\n src={`${ILLUSTRATIONS_BASE_URL}/illustrations/card/notepad-desktop.svg`}\n alt=\"notepad\"\n width=\"300\"\n height=\"300\"\n />\n <FillContainer active={active}>\n <img\n src={`${ILLUSTRATIONS_BASE_URL}/illustrations/card/notepad-desktop-fill.svg`}\n alt=\"\"\n width=\"300\"\n height=\"300\"\n />\n </FillContainer>\n </DesktopIllustration>\n <MobileIllustration>\n <img\n src={`${ILLUSTRATIONS_BASE_URL}/illustrations/card/notepad-mobile.svg`}\n alt=\"notepad\"\n width=\"358\"\n height=\"112\"\n />\n <FillContainer active={active}>\n <img\n src={`${ILLUSTRATIONS_BASE_URL}/illustrations/card/notepad-mobile-fill.svg`}\n alt=\"notepad\"\n width=\"358\"\n height=\"112\"\n />\n </FillContainer>\n </MobileIllustration>\n </IllustrationContainer>\n);\n"]}
@@ -0,0 +1,2 @@
1
+ import {a}from'./chunk-K5YPBA2R.js';import {a as a$1}from'./chunk-JUFN2WAD.js';var m={Horizontal:a$1,Vertical:a};export{m as a};//# sourceMappingURL=chunk-VWU25NGN.js.map
2
+ //# sourceMappingURL=chunk-VWU25NGN.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/NumberedProgressSteps/index.tsx"],"names":["NumberedProgressSteps_default","Horizontal_default","Vertical_default"],"mappings":"+EAGA,IAAOA,CAAAA,CAAQ,CACb,UAAA,CAAAC,GAAAA,CACA,SAAAC,CACF","file":"chunk-N72Q537P.js","sourcesContent":["import Horizontal from './Horizontal';\nimport Vertical from './Vertical';\n\nexport default {\n Horizontal,\n Vertical,\n};\n"]}
1
+ {"version":3,"sources":["../src/NumberedProgressSteps/index.tsx"],"names":["NumberedProgressSteps_default","Horizontal_default","Vertical_default"],"mappings":"+EAGA,IAAOA,CAAAA,CAAQ,CACb,UAAA,CAAAC,GAAAA,CACA,SAAAC,CACF","file":"chunk-VWU25NGN.js","sourcesContent":["import Horizontal from './Horizontal';\nimport Vertical from './Vertical';\n\nexport default {\n Horizontal,\n Vertical,\n};\n"]}
@@ -0,0 +1,2 @@
1
+ import {a as a$4}from'./chunk-XN7TZP35.js';import {a as a$3}from'./chunk-JTOJMLMA.js';import {a}from'./chunk-QA5JXTX4.js';import {a as a$2}from'./chunk-JLEVRYCV.js';import {a as a$1}from'./chunk-VUICODT4.js';var c={Clock:a$4,Coffee:a$3,Medication:a$2,Notepad:a$1,Laptop:a};export{c as a};//# sourceMappingURL=chunk-WBCK7PUI.js.map
2
+ //# sourceMappingURL=chunk-WBCK7PUI.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/Card/illustrations/index.tsx"],"names":["illustrations_default","Clock","Coffee","Medication","Notepad","Laptop"],"mappings":"gNAMA,IAAOA,CAAAA,CAAQ,CAAE,KAAA,CAAAC,GAAAA,CAAO,MAAA,CAAAC,GAAAA,CAAQ,UAAA,CAAAC,GAAAA,CAAY,OAAA,CAAAC,GAAAA,CAAS,MAAA,CAAAC,CAAO","file":"chunk-UOJ2V7M2.js","sourcesContent":["import { Clock } from './Clock';\nimport { Coffee } from './Coffee';\nimport { Medication } from './Medication';\nimport { Notepad } from './Notepad';\nimport { Laptop } from './Laptop';\n\nexport default { Clock, Coffee, Medication, Notepad, Laptop };\n"]}
1
+ {"version":3,"sources":["../src/Card/illustrations/index.tsx"],"names":["illustrations_default","Clock","Coffee","Medication","Notepad","Laptop"],"mappings":"gNAMA,IAAOA,CAAAA,CAAQ,CAAE,KAAA,CAAAC,GAAAA,CAAO,MAAA,CAAAC,GAAAA,CAAQ,UAAA,CAAAC,GAAAA,CAAY,OAAA,CAAAC,GAAAA,CAAS,MAAA,CAAAC,CAAO","file":"chunk-WBCK7PUI.js","sourcesContent":["import { Clock } from './Clock';\nimport { Coffee } from './Coffee';\nimport { Medication } from './Medication';\nimport { Notepad } from './Notepad';\nimport { Laptop } from './Laptop';\n\nexport default { Clock, Coffee, Medication, Notepad, Laptop };\n"]}
@@ -1,2 +1,2 @@
1
- import {b}from'./chunk-LFGDYEFJ.js';import w,{getGeocode}from'use-places-autocomplete';import {useRef,useState,useCallback,useEffect}from'react';import {useLoadScript}from'@react-google-maps/api';import {jsxs,jsx}from'react/jsx-runtime';var x=u=>{let s="",d="",l="",i="",a="";u.address_components.forEach(r=>{r.types.some(p=>{switch(p){case "locality":return s=r.long_name,true;case "sublocality":case "administrative_area_level_3":case "neighborhood":return s=s||r.long_name,true;case "administrative_area_level_1":return d=r.short_name,true;case "street_number":return l=r.short_name,true;case "route":return i=r.short_name,true;case "postal_code":return a=r.short_name,true;default:return false}});});let n=u.geometry.location.lat(),c=u.geometry.location.lng(),m=`${l} ${i}`.trim();return {city:s,state:d,street:m,zip:a,lat:n,long:c}},R=2,S=({onSelectAddress:u=void 0,...s})=>{let d=useRef(null),l=useRef(`address-input-${Math.random().toString(36).slice(2)}-listbox`),[i,a]=useState(-1),{suggestions:{data:n=[]},setValue:c,clearSuggestions:m}=w({requestOptions:{componentRestrictions:{country:"us"}}}),r=useCallback(()=>{m(),a(-1);},[m]);useEffect(()=>{let e=o=>{d.current&&!d.current.contains(o.target)&&r();},t=o=>{o.key==="Escape"&&r();};return n.length>0&&(document.addEventListener("mousedown",e),document.addEventListener("keydown",t)),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t);}},[n.length,r]),useEffect(()=>{n.length===0?a(-1):a(e=>e<0?e:Math.min(e,n.length-1));},[n.length]);let p=e=>{c(e,false),r(),!(e.length<=R)&&getGeocode({address:e}).then(t=>{if(!t||t.length===0)return;let o=x(t[0]);u?.(o);});},A=useCallback(e=>{c(e),a(-1);},[c]),_=i>=0?`${l.current}-option-${i}`:void 0;return jsxs("div",{className:"relative",children:[jsx(b,{...s,onChange:e=>{s.onChange?.(e),A(e.target.value);},onKeyDown:e=>{if(s.onKeyDown?.(e),!e.defaultPrevented){if(!n.length){e.key==="Escape"&&r();return}if(e.key==="ArrowDown"){e.preventDefault(),a(t=>{let o=t+1;return o>=n.length||o<0?0:o});return}if(e.key==="ArrowUp"){e.preventDefault(),a(t=>t<=0?n.length-1:t-1);return}if(e.key==="Enter"&&i>=0){e.preventDefault();let t=n[i];t&&p(t.description);return}e.key==="Escape"&&(e.preventDefault(),r());}},role:"combobox","aria-expanded":n.length>0,"aria-controls":n.length>0?l.current:void 0,"aria-activedescendant":_,"aria-autocomplete":"list"}),n.length>0&&jsx("div",{ref:d,id:l.current,role:"listbox",className:"z-modal-stacking-context absolute mt-1 max-h-60 w-full overflow-auto rounded-md border border-gray-200 bg-white shadow-lg",children:n.map((e,t)=>{let o=`${l.current}-option-${t}`,v=t===i;return jsx("div",{id:o,role:"option","aria-selected":v,tabIndex:-1,className:`cursor-pointer px-3 py-2 text-sm hover:bg-green-100 ${v?"bg-green-100":""}`,onMouseEnter:()=>a(t),onMouseDown:g=>g.preventDefault(),onClick:()=>p(e.description),onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),p(e.description));},children:e.description},e.place_id)})})]})},P=["places"],H=({googleMapsApiKey:u,onSelectAddress:s=void 0,...d})=>{let{isLoaded:l,loadError:i}=useLoadScript({googleMapsApiKey:u,libraries:P});return !l||i?jsx(b,{...d}):jsx(S,{onSelectAddress:s,...d})};export{S as a,H as b};//# sourceMappingURL=chunk-MERMPFZT.js.map
2
- //# sourceMappingURL=chunk-MERMPFZT.js.map
1
+ import {b}from'./chunk-7QWN4Z56.js';import w,{getGeocode}from'use-places-autocomplete';import {useRef,useState,useCallback,useEffect}from'react';import {useLoadScript}from'@react-google-maps/api';import {jsxs,jsx}from'react/jsx-runtime';var x=u=>{let s="",d="",l="",i="",a="";u.address_components.forEach(r=>{r.types.some(p=>{switch(p){case "locality":return s=r.long_name,true;case "sublocality":case "administrative_area_level_3":case "neighborhood":return s=s||r.long_name,true;case "administrative_area_level_1":return d=r.short_name,true;case "street_number":return l=r.short_name,true;case "route":return i=r.short_name,true;case "postal_code":return a=r.short_name,true;default:return false}});});let n=u.geometry.location.lat(),c=u.geometry.location.lng(),m=`${l} ${i}`.trim();return {city:s,state:d,street:m,zip:a,lat:n,long:c}},R=2,S=({onSelectAddress:u=void 0,...s})=>{let d=useRef(null),l=useRef(`address-input-${Math.random().toString(36).slice(2)}-listbox`),[i,a]=useState(-1),{suggestions:{data:n=[]},setValue:c,clearSuggestions:m}=w({requestOptions:{componentRestrictions:{country:"us"}}}),r=useCallback(()=>{m(),a(-1);},[m]);useEffect(()=>{let e=o=>{d.current&&!d.current.contains(o.target)&&r();},t=o=>{o.key==="Escape"&&r();};return n.length>0&&(document.addEventListener("mousedown",e),document.addEventListener("keydown",t)),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t);}},[n.length,r]),useEffect(()=>{n.length===0?a(-1):a(e=>e<0?e:Math.min(e,n.length-1));},[n.length]);let p=e=>{c(e,false),r(),!(e.length<=R)&&getGeocode({address:e}).then(t=>{if(!t||t.length===0)return;let o=x(t[0]);u?.(o);});},A=useCallback(e=>{c(e),a(-1);},[c]),_=i>=0?`${l.current}-option-${i}`:void 0;return jsxs("div",{className:"relative",children:[jsx(b,{...s,onChange:e=>{s.onChange?.(e),A(e.target.value);},onKeyDown:e=>{if(s.onKeyDown?.(e),!e.defaultPrevented){if(!n.length){e.key==="Escape"&&r();return}if(e.key==="ArrowDown"){e.preventDefault(),a(t=>{let o=t+1;return o>=n.length||o<0?0:o});return}if(e.key==="ArrowUp"){e.preventDefault(),a(t=>t<=0?n.length-1:t-1);return}if(e.key==="Enter"&&i>=0){e.preventDefault();let t=n[i];t&&p(t.description);return}e.key==="Escape"&&(e.preventDefault(),r());}},role:"combobox","aria-expanded":n.length>0,"aria-controls":n.length>0?l.current:void 0,"aria-activedescendant":_,"aria-autocomplete":"list"}),n.length>0&&jsx("div",{ref:d,id:l.current,role:"listbox",className:"z-modal-stacking-context absolute mt-1 max-h-60 w-full overflow-auto rounded-md border border-gray-200 bg-white shadow-lg",children:n.map((e,t)=>{let o=`${l.current}-option-${t}`,v=t===i;return jsx("div",{id:o,role:"option","aria-selected":v,tabIndex:-1,className:`cursor-pointer px-3 py-2 text-sm hover:bg-green-100 ${v?"bg-green-100":""}`,onMouseEnter:()=>a(t),onMouseDown:g=>g.preventDefault(),onClick:()=>p(e.description),onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&(g.preventDefault(),p(e.description));},children:e.description},e.place_id)})})]})},P=["places"],H=({googleMapsApiKey:u,onSelectAddress:s=void 0,...d})=>{let{isLoaded:l,loadError:i}=useLoadScript({googleMapsApiKey:u,libraries:P});return !l||i?jsx(b,{...d}):jsx(S,{onSelectAddress:s,...d})};export{S as a,H as b};//# sourceMappingURL=chunk-WHAXVJN5.js.map
2
+ //# sourceMappingURL=chunk-WHAXVJN5.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/v2/address-input/address-input.tsx"],"names":["getAddressAttributes","result","city","state","streetNumber","streetName","zip","component","type","lat","long","street","MIN_ADDRESS_LENGTH","AddressInputInternal","onSelectAddress","rest","dropdownRef","useRef","listboxIdRef","highlightedIndex","setHighlightedIndex","useState","data","setValue","clearSuggestions","usePlacesAutocomplete","closeSuggestions","useCallback","useEffect","handleClickOutside","event","handleEscape","current","handleAddressSelect","address","getGeocode","results","formattedResults","handleAddressOnChange","inputValue","highlightedOptionId","jsxs","jsx","Input","next","suggestion","index","optionId","isHighlighted","libraries","AddressInput","googleMapsApiKey","props","isLoaded","loadError","useLoadScript"],"mappings":"6OAKA,IAAMA,EAAwBC,CAAAA,EAA0B,CACtD,IAAIC,CAAAA,CAAO,GACPC,CAAAA,CAAQ,EAAA,CACRC,EAAe,EAAA,CACfC,CAAAA,CAAa,GACbC,CAAAA,CAAM,EAAA,CAEVL,CAAAA,CAAO,kBAAA,CAAmB,QAASM,CAAAA,EAAc,CAC/CA,CAAAA,CAAU,KAAA,CAAM,KAAMC,CAAAA,EAAS,CAC7B,OAAQA,CAAAA,EACN,KAAK,UAAA,CACH,OAAAN,CAAAA,CAAOK,CAAAA,CAAU,UACV,IAAA,CACT,KAAK,aAAA,CACL,KAAK,8BACL,KAAK,cAAA,CACH,OAAAL,CAAAA,CAAOA,GAAQK,CAAAA,CAAU,SAAA,CAClB,IAAA,CACT,KAAK,8BACH,OAAAJ,CAAAA,CAAQI,EAAU,UAAA,CACX,IAAA,CACT,KAAK,eAAA,CACH,OAAAH,CAAAA,CAAeG,CAAAA,CAAU,WACl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7C,OAAA,CAAS,IAAMG,EAAoBY,CAAAA,CAAW,WAAW,CAAA,CACzD,SAAA,CAAYf,GAAU,CAAA,CAChBA,CAAAA,CAAM,GAAA,GAAQ,OAAA,EAAWA,EAAM,GAAA,GAAQ,GAAA,IACzCA,EAAM,cAAA,EAAe,CACrBG,EAAoBY,CAAAA,CAAW,WAAW,CAAA,EAE9C,CAAA,CAEC,SAAAA,CAAAA,CAAW,WAAA,CAAA,CAlBPA,CAAAA,CAAW,QAmBlB,CAEJ,CAAC,CAAA,CACH,CAAA,CAAA,CAEJ,CAEJ,EAEMI,CAAAA,CAAwB,CAAC,QAAQ,CAAA,CAE1BC,CAAAA,CAAe,CAAC,CAC3B,gBAAA,CAAAC,CAAAA,CACA,eAAA,CAAArC,EAAkB,MAAA,CAClB,GAAGsC,CACL,CAAA,GAAwD,CACtD,GAAM,CAAE,QAAA,CAAAC,CAAAA,CAAU,UAAAC,CAAU,CAAA,CAAIC,cAAc,CAC5C,gBAAA,CAAAJ,EACA,SAAA,CAAAF,CACF,CAAC,CAAA,CAED,OAAI,CAACI,CAAAA,EAAYC,CAAAA,CACRZ,GAAAA,CAACC,EAAA,CAAO,GAAGS,CAAAA,CAAO,CAAA,CAEpBV,IAAC7B,CAAAA,CAAA,CAAqB,gBAAiBC,CAAAA,CAAkB,GAAGsC,EAAO,CAC5E","file":"chunk-MERMPFZT.js","sourcesContent":["import usePlacesAutocomplete, { GeocodeResult, getGeocode } from 'use-places-autocomplete';\nimport { ComponentProps, useCallback, useEffect, useRef, useState } from 'react';\nimport { useLoadScript } from '@react-google-maps/api';\nimport { Input } from '../input/input';\n\nconst getAddressAttributes = (result: GeocodeResult) => {\n let city = '';\n let state = '';\n let streetNumber = '';\n let streetName = '';\n let zip = '';\n\n result.address_components.forEach((component) => {\n component.types.some((type) => {\n switch (type) {\n case 'locality':\n city = component.long_name; // Always prefer locality\n return true;\n case 'sublocality':\n case 'administrative_area_level_3':\n case 'neighborhood':\n city = city || component.long_name; // sets if no city\n return true;\n case 'administrative_area_level_1':\n state = component.short_name;\n return true;\n case 'street_number':\n streetNumber = component.short_name;\n return true;\n case 'route':\n streetName = component.short_name;\n return true;\n case 'postal_code':\n zip = component.short_name;\n return true;\n default:\n return false;\n }\n });\n });\n\n const lat = result.geometry.location.lat();\n const long = result.geometry.location.lng();\n const street = `${streetNumber} ${streetName}`.trim();\n\n return { city, state, street, zip, lat, long };\n};\n\ntype InputProps = ComponentProps<typeof Input>;\n\nexport type AddressResults = {\n city: string;\n state: string;\n street: string;\n zip: string;\n lat: number;\n long: number;\n};\n\ntype AddressInputProps = InputProps & {\n onSelectAddress?: (results: AddressResults) => void;\n};\n\nconst MIN_ADDRESS_LENGTH = 2;\n\nexport const AddressInputInternal = ({\n onSelectAddress = undefined,\n ...rest\n}: AddressInputProps) => {\n const dropdownRef = useRef<HTMLDivElement>(null);\n const listboxIdRef = useRef(`address-input-${Math.random().toString(36).slice(2)}-listbox`);\n const [highlightedIndex, setHighlightedIndex] = useState(-1);\n\n const {\n suggestions: { data = [] },\n setValue,\n clearSuggestions,\n } = usePlacesAutocomplete({\n requestOptions: {\n componentRestrictions: { country: 'us' },\n },\n });\n\n const closeSuggestions = useCallback(() => {\n clearSuggestions();\n setHighlightedIndex(-1);\n }, [clearSuggestions]);\n\n // Handle click outside to close suggestions\n useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (dropdownRef.current && !dropdownRef.current.contains(event.target as Node)) {\n closeSuggestions();\n }\n };\n\n const handleEscape = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n closeSuggestions();\n }\n };\n\n if (data.length > 0) {\n document.addEventListener('mousedown', handleClickOutside);\n document.addEventListener('keydown', handleEscape);\n }\n\n return () => {\n document.removeEventListener('mousedown', handleClickOutside);\n document.removeEventListener('keydown', handleEscape);\n };\n }, [data.length, closeSuggestions]);\n\n useEffect(() => {\n if (data.length === 0) {\n setHighlightedIndex(-1);\n } else {\n setHighlightedIndex((current) => {\n if (current < 0) {\n return current;\n }\n\n return Math.min(current, data.length - 1);\n });\n }\n }, [data.length]);\n\n const handleAddressSelect = (address: string) => {\n setValue(address, false);\n closeSuggestions();\n\n if (address.length <= MIN_ADDRESS_LENGTH) {\n return;\n }\n\n getGeocode({ address }).then((results) => {\n if (!results || results.length === 0) {\n return;\n }\n\n const formattedResults = getAddressAttributes(results[0]);\n onSelectAddress?.(formattedResults);\n });\n };\n\n const handleAddressOnChange = useCallback(\n (inputValue: string) => {\n setValue(inputValue);\n setHighlightedIndex(-1);\n },\n [setValue],\n );\n\n const highlightedOptionId =\n highlightedIndex >= 0 ? `${listboxIdRef.current}-option-${highlightedIndex}` : undefined;\n\n return (\n <div className=\"relative\">\n <Input\n {...rest}\n onChange={(e) => {\n rest.onChange?.(e);\n handleAddressOnChange(e.target.value);\n }}\n onKeyDown={(e) => {\n rest.onKeyDown?.(e);\n\n if (e.defaultPrevented) {\n return;\n }\n\n if (!data.length) {\n if (e.key === 'Escape') {\n closeSuggestions();\n }\n return;\n }\n\n if (e.key === 'ArrowDown') {\n e.preventDefault();\n setHighlightedIndex((current) => {\n const next = current + 1;\n if (next >= data.length || next < 0) {\n return 0;\n }\n return next;\n });\n return;\n }\n\n if (e.key === 'ArrowUp') {\n e.preventDefault();\n setHighlightedIndex((current) => {\n if (current <= 0) {\n return data.length - 1;\n }\n return current - 1;\n });\n return;\n }\n\n if (e.key === 'Enter' && highlightedIndex >= 0) {\n e.preventDefault();\n const suggestion = data[highlightedIndex];\n if (suggestion) {\n handleAddressSelect(suggestion.description);\n }\n return;\n }\n\n if (e.key === 'Escape') {\n e.preventDefault();\n closeSuggestions();\n }\n }}\n role=\"combobox\"\n aria-expanded={data.length > 0}\n aria-controls={data.length > 0 ? listboxIdRef.current : undefined}\n aria-activedescendant={highlightedOptionId}\n aria-autocomplete=\"list\"\n />\n {data.length > 0 && (\n <div\n ref={dropdownRef}\n id={listboxIdRef.current}\n role=\"listbox\"\n className=\"z-modal-stacking-context absolute mt-1 max-h-60 w-full overflow-auto rounded-md border border-gray-200 bg-white shadow-lg\"\n >\n {data.map((suggestion, index) => {\n const optionId = `${listboxIdRef.current}-option-${index}`;\n const isHighlighted = index === highlightedIndex;\n\n return (\n <div\n key={suggestion.place_id}\n id={optionId}\n role=\"option\"\n aria-selected={isHighlighted}\n tabIndex={-1}\n className={`cursor-pointer px-3 py-2 text-sm hover:bg-green-100 ${\n isHighlighted ? 'bg-green-100' : ''\n }`}\n onMouseEnter={() => setHighlightedIndex(index)}\n onMouseDown={(event) => event.preventDefault()}\n onClick={() => handleAddressSelect(suggestion.description)}\n onKeyDown={(event) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n handleAddressSelect(suggestion.description);\n }\n }}\n >\n {suggestion.description}\n </div>\n );\n })}\n </div>\n )}\n </div>\n );\n};\n\nconst libraries: ['places'] = ['places'];\n\nexport const AddressInput = ({\n googleMapsApiKey,\n onSelectAddress = undefined,\n ...props\n}: AddressInputProps & { googleMapsApiKey: string }) => {\n const { isLoaded, loadError } = useLoadScript({\n googleMapsApiKey,\n libraries,\n });\n // if not loaded or error, return regular input\n if (!isLoaded || loadError) {\n return <Input {...props} />;\n }\n return <AddressInputInternal onSelectAddress={onSelectAddress} {...props} />;\n};\n"]}
1
+ {"version":3,"sources":["../src/v2/address-input/address-input.tsx"],"names":["getAddressAttributes","result","city","state","streetNumber","streetName","zip","component","type","lat","long","street","MIN_ADDRESS_LENGTH","AddressInputInternal","onSelectAddress","rest","dropdownRef","useRef","listboxIdRef","highlightedIndex","setHighlightedIndex","useState","data","setValue","clearSuggestions","usePlacesAutocomplete","closeSuggestions","useCallback","useEffect","handleClickOutside","event","handleEscape","current","handleAddressSelect","address","getGeocode","results","formattedResults","handleAddressOnChange","inputValue","highlightedOptionId","jsxs","jsx","Input","next","suggestion","index","optionId","isHighlighted","libraries","AddressInput","googleMapsApiKey","props","isLoaded","loadError","useLoadScript"],"mappings":"6OAKA,IAAMA,EAAwBC,CAAAA,EAA0B,CACtD,I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CACRZ,GAAAA,CAACC,EAAA,CAAO,GAAGS,CAAAA,CAAO,CAAA,CAEpBV,IAAC7B,CAAAA,CAAA,CAAqB,gBAAiBC,CAAAA,CAAkB,GAAGsC,EAAO,CAC5E","file":"chunk-WHAXVJN5.js","sourcesContent":["import usePlacesAutocomplete, { GeocodeResult, getGeocode } from 'use-places-autocomplete';\nimport { ComponentProps, useCallback, useEffect, useRef, useState } from 'react';\nimport { useLoadScript } from '@react-google-maps/api';\nimport { Input } from '../input/input';\n\nconst getAddressAttributes = (result: GeocodeResult) => {\n let city = '';\n let state = '';\n let streetNumber = '';\n let streetName = '';\n let zip = '';\n\n result.address_components.forEach((component) => {\n component.types.some((type) => {\n switch (type) {\n case 'locality':\n city = component.long_name; // Always prefer locality\n return true;\n case 'sublocality':\n case 'administrative_area_level_3':\n case 'neighborhood':\n city = city || component.long_name; // sets if no city\n return true;\n case 'administrative_area_level_1':\n state = component.short_name;\n return true;\n case 'street_number':\n streetNumber = component.short_name;\n return true;\n case 'route':\n streetName = component.short_name;\n return true;\n case 'postal_code':\n zip = component.short_name;\n return true;\n default:\n return false;\n }\n });\n });\n\n const lat = result.geometry.location.lat();\n const long = result.geometry.location.lng();\n const street = `${streetNumber} ${streetName}`.trim();\n\n return { city, state, street, zip, lat, long };\n};\n\ntype InputProps = ComponentProps<typeof Input>;\n\nexport type AddressResults = {\n city: string;\n state: string;\n street: string;\n zip: string;\n lat: number;\n long: number;\n};\n\ntype AddressInputProps = InputProps & {\n onSelectAddress?: (results: AddressResults) => void;\n};\n\nconst MIN_ADDRESS_LENGTH = 2;\n\nexport const AddressInputInternal = ({\n onSelectAddress = undefined,\n ...rest\n}: AddressInputProps) => {\n const dropdownRef = useRef<HTMLDivElement>(null);\n const listboxIdRef = useRef(`address-input-${Math.random().toString(36).slice(2)}-listbox`);\n const [highlightedIndex, setHighlightedIndex] = useState(-1);\n\n const {\n suggestions: { data = [] },\n setValue,\n clearSuggestions,\n } = usePlacesAutocomplete({\n requestOptions: {\n componentRestrictions: { country: 'us' },\n },\n });\n\n const closeSuggestions = useCallback(() => {\n clearSuggestions();\n setHighlightedIndex(-1);\n }, [clearSuggestions]);\n\n // Handle click outside to close suggestions\n useEffect(() => {\n const handleClickOutside = (event: MouseEvent) => {\n if (dropdownRef.current && !dropdownRef.current.contains(event.target as Node)) {\n closeSuggestions();\n }\n };\n\n const handleEscape = (event: KeyboardEvent) => {\n if (event.key === 'Escape') {\n closeSuggestions();\n }\n };\n\n if (data.length > 0) {\n document.addEventListener('mousedown', handleClickOutside);\n document.addEventListener('keydown', handleEscape);\n }\n\n return () => {\n document.removeEventListener('mousedown', handleClickOutside);\n document.removeEventListener('keydown', handleEscape);\n };\n }, [data.length, closeSuggestions]);\n\n useEffect(() => {\n if (data.length === 0) {\n setHighlightedIndex(-1);\n } else {\n setHighlightedIndex((current) => {\n if (current < 0) {\n return current;\n }\n\n return Math.min(current, data.length - 1);\n });\n }\n }, [data.length]);\n\n const handleAddressSelect = (address: string) => {\n setValue(address, false);\n closeSuggestions();\n\n if (address.length <= MIN_ADDRESS_LENGTH) {\n return;\n }\n\n getGeocode({ address }).then((results) => {\n if (!results || results.length === 0) {\n return;\n }\n\n const formattedResults = getAddressAttributes(results[0]);\n onSelectAddress?.(formattedResults);\n });\n };\n\n const handleAddressOnChange = useCallback(\n (inputValue: string) => {\n setValue(inputValue);\n setHighlightedIndex(-1);\n },\n [setValue],\n );\n\n const highlightedOptionId =\n highlightedIndex >= 0 ? `${listboxIdRef.current}-option-${highlightedIndex}` : undefined;\n\n return (\n <div className=\"relative\">\n <Input\n {...rest}\n onChange={(e) => {\n rest.onChange?.(e);\n handleAddressOnChange(e.target.value);\n }}\n onKeyDown={(e) => {\n rest.onKeyDown?.(e);\n\n if (e.defaultPrevented) {\n return;\n }\n\n if (!data.length) {\n if (e.key === 'Escape') {\n closeSuggestions();\n }\n return;\n }\n\n if (e.key === 'ArrowDown') {\n e.preventDefault();\n setHighlightedIndex((current) => {\n const next = current + 1;\n if (next >= data.length || next < 0) {\n return 0;\n }\n return next;\n });\n return;\n }\n\n if (e.key === 'ArrowUp') {\n e.preventDefault();\n setHighlightedIndex((current) => {\n if (current <= 0) {\n return data.length - 1;\n }\n return current - 1;\n });\n return;\n }\n\n if (e.key === 'Enter' && highlightedIndex >= 0) {\n e.preventDefault();\n const suggestion = data[highlightedIndex];\n if (suggestion) {\n handleAddressSelect(suggestion.description);\n }\n return;\n }\n\n if (e.key === 'Escape') {\n e.preventDefault();\n closeSuggestions();\n }\n }}\n role=\"combobox\"\n aria-expanded={data.length > 0}\n aria-controls={data.length > 0 ? listboxIdRef.current : undefined}\n aria-activedescendant={highlightedOptionId}\n aria-autocomplete=\"list\"\n />\n {data.length > 0 && (\n <div\n ref={dropdownRef}\n id={listboxIdRef.current}\n role=\"listbox\"\n className=\"z-modal-stacking-context absolute mt-1 max-h-60 w-full overflow-auto rounded-md border border-gray-200 bg-white shadow-lg\"\n >\n {data.map((suggestion, index) => {\n const optionId = `${listboxIdRef.current}-option-${index}`;\n const isHighlighted = index === highlightedIndex;\n\n return (\n <div\n key={suggestion.place_id}\n id={optionId}\n role=\"option\"\n aria-selected={isHighlighted}\n tabIndex={-1}\n className={`cursor-pointer px-3 py-2 text-sm hover:bg-green-100 ${\n isHighlighted ? 'bg-green-100' : ''\n }`}\n onMouseEnter={() => setHighlightedIndex(index)}\n onMouseDown={(event) => event.preventDefault()}\n onClick={() => handleAddressSelect(suggestion.description)}\n onKeyDown={(event) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n handleAddressSelect(suggestion.description);\n }\n }}\n >\n {suggestion.description}\n </div>\n );\n })}\n </div>\n )}\n </div>\n );\n};\n\nconst libraries: ['places'] = ['places'];\n\nexport const AddressInput = ({\n googleMapsApiKey,\n onSelectAddress = undefined,\n ...props\n}: AddressInputProps & { googleMapsApiKey: string }) => {\n const { isLoaded, loadError } = useLoadScript({\n googleMapsApiKey,\n libraries,\n });\n // if not loaded or error, return regular input\n if (!isLoaded || loadError) {\n return <Input {...props} />;\n }\n return <AddressInputInternal onSelectAddress={onSelectAddress} {...props} />;\n};\n"]}
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkIJMCTNX6_cjs=require('./chunk-IJMCTNX6.cjs'),chunkI5LC3XFB_cjs=require('./chunk-I5LC3XFB.cjs'),chunkMKSIR4NW_cjs=require('./chunk-MKSIR4NW.cjs'),jsxRuntime=require('react/jsx-runtime');var m=({active:a=false})=>jsxRuntime.jsxs(chunkI5LC3XFB_cjs.a,{children:[jsxRuntime.jsxs(chunkI5LC3XFB_cjs.b,{children:[jsxRuntime.jsx("img",{src:`${chunkMKSIR4NW_cjs.a}/illustrations/card/medication-desktop.svg`,alt:"medication",width:"300",height:"300"}),jsxRuntime.jsx(chunkIJMCTNX6_cjs.a,{active:a,children:jsxRuntime.jsx("img",{src:`${chunkMKSIR4NW_cjs.a}/illustrations/card/medication-desktop-fill.svg`,alt:"",width:"300",height:"300"})})]}),jsxRuntime.jsxs(chunkI5LC3XFB_cjs.c,{children:[jsxRuntime.jsx("img",{src:`${chunkMKSIR4NW_cjs.a}/illustrations/card/medication-mobile.svg`,alt:"medication",width:"358",height:"112"}),jsxRuntime.jsx(chunkIJMCTNX6_cjs.a,{active:a,children:jsxRuntime.jsx("img",{src:`${chunkMKSIR4NW_cjs.a}/illustrations/card/medication-mobile-fill.svg`,alt:"",width:"358",height:"112"})})]})]});exports.a=m;//# sourceMappingURL=chunk-BFHEVJNW.cjs.map
2
- //# sourceMappingURL=chunk-BFHEVJNW.cjs.map
1
+ 'use strict';var chunkI5LC3XFB_cjs=require('./chunk-I5LC3XFB.cjs'),chunkIJMCTNX6_cjs=require('./chunk-IJMCTNX6.cjs'),chunkMKSIR4NW_cjs=require('./chunk-MKSIR4NW.cjs'),jsxRuntime=require('react/jsx-runtime');var m=({active:a=false})=>jsxRuntime.jsxs(chunkI5LC3XFB_cjs.a,{children:[jsxRuntime.jsxs(chunkI5LC3XFB_cjs.b,{children:[jsxRuntime.jsx("img",{src:`${chunkMKSIR4NW_cjs.a}/illustrations/card/medication-desktop.svg`,alt:"medication",width:"300",height:"300"}),jsxRuntime.jsx(chunkIJMCTNX6_cjs.a,{active:a,children:jsxRuntime.jsx("img",{src:`${chunkMKSIR4NW_cjs.a}/illustrations/card/medication-desktop-fill.svg`,alt:"",width:"300",height:"300"})})]}),jsxRuntime.jsxs(chunkI5LC3XFB_cjs.c,{children:[jsxRuntime.jsx("img",{src:`${chunkMKSIR4NW_cjs.a}/illustrations/card/medication-mobile.svg`,alt:"medication",width:"358",height:"112"}),jsxRuntime.jsx(chunkIJMCTNX6_cjs.a,{active:a,children:jsxRuntime.jsx("img",{src:`${chunkMKSIR4NW_cjs.a}/illustrations/card/medication-mobile-fill.svg`,alt:"",width:"358",height:"112"})})]})]});exports.a=m;//# sourceMappingURL=chunk-WTGHWP7T.cjs.map
2
+ //# sourceMappingURL=chunk-WTGHWP7T.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/Card/illustrations/Medication.tsx"],"names":["Medication","active","jsxs","IllustrationContainer","DesktopIllustration","jsx","ILLUSTRATIONS_BASE_URL","FillContainer_default","MobileIllustration"],"mappings":"+MAQO,IAAMA,CAAAA,CAAa,CAAC,CAAE,MAAA,CAAAC,EAAS,KAAM,CAAA,GAC1CC,gBAACC,mBAAAA,CAAA,CACC,UAAAD,eAAAA,CAACE,mBAAAA,CAAA,CACC,QAAA,CAAA,CAAAC,cAAAA,CAAC,OACC,GAAA,CAAK,CAAA,EAAGC,mBAAsB,CAAA,0CAAA,CAAA,CAC9B,GAAA,CAAI,aACJ,KAAA,CAAM,KAAA,CACN,OAAO,KAAA,CACT,CAAA,CAEAD,eAACE,mBAAAA,CAAA,CAAc,OAAQN,CAAAA,CACrB,QAAA,CAAAI,eAAC,KAAA,CAAA,CACC,GAAA,CAAK,GAAGC,mBAAsB,CAAA,+CAAA,CAAA,CAC9B,IAAI,EAAA,CACJ,KAAA,CAAM,MACN,MAAA,CAAO,KAAA,CACT,EACF,CAAA,CAAA,CACF,CAAA,CACAJ,gBAACM,mBAAAA,CAAA,CACC,UAAAH,cAAAA,CAAC,KAAA,CAAA,CACC,IAAK,CAAA,EAAGC,mBAAsB,4CAC9B,GAAA,CAAI,YAAA,CACJ,MAAM,KAAA,CACN,MAAA,CAAO,MACT,CAAA,CACAD,cAAAA,CAACE,oBAAA,CAAc,MAAA,CAAQN,EACrB,QAAA,CAAAI,cAAAA,CAAC,OACC,GAAA,CAAK,CAAA,EAAGC,mBAAsB,CAAA,8CAAA,CAAA,CAC9B,GAAA,CAAI,GACJ,KAAA,CAAM,KAAA,CACN,OAAO,KAAA,CACT,CAAA,CACF,GACF,CAAA,CAAA,CACF","file":"chunk-BFHEVJNW.cjs","sourcesContent":["import { ILLUSTRATIONS_BASE_URL } from '../../constants';\nimport FillContainer from '../../Form/Checkbox/shared/FillContainer';\nimport {\n DesktopIllustration,\n IllustrationContainer,\n MobileIllustration,\n} from '../../Form/Checkbox/shared/style';\n\nexport const Medication = ({ active = false }: { active?: boolean }) => (\n <IllustrationContainer>\n <DesktopIllustration>\n <img\n src={`${ILLUSTRATIONS_BASE_URL}/illustrations/card/medication-desktop.svg`}\n alt=\"medication\"\n width=\"300\"\n height=\"300\"\n />\n\n <FillContainer active={active}>\n <img\n src={`${ILLUSTRATIONS_BASE_URL}/illustrations/card/medication-desktop-fill.svg`}\n alt=\"\"\n width=\"300\"\n height=\"300\"\n />\n </FillContainer>\n </DesktopIllustration>\n <MobileIllustration>\n <img\n src={`${ILLUSTRATIONS_BASE_URL}/illustrations/card/medication-mobile.svg`}\n alt=\"medication\"\n width=\"358\"\n height=\"112\"\n />\n <FillContainer active={active}>\n <img\n src={`${ILLUSTRATIONS_BASE_URL}/illustrations/card/medication-mobile-fill.svg`}\n alt=\"\"\n width=\"358\"\n height=\"112\"\n />\n </FillContainer>\n </MobileIllustration>\n </IllustrationContainer>\n);\n"]}
1
+ {"version":3,"sources":["../src/Card/illustrations/Medication.tsx"],"names":["Medication","active","jsxs","IllustrationContainer","DesktopIllustration","jsx","ILLUSTRATIONS_BASE_URL","FillContainer_default","MobileIllustration"],"mappings":"+MAQO,IAAMA,CAAAA,CAAa,CAAC,CAAE,MAAA,CAAAC,EAAS,KAAM,CAAA,GAC1CC,gBAACC,mBAAAA,CAAA,CACC,UAAAD,eAAAA,CAACE,mBAAAA,CAAA,CACC,QAAA,CAAA,CAAAC,cAAAA,CAAC,OACC,GAAA,CAAK,CAAA,EAAGC,mBAAsB,CAAA,0CAAA,CAAA,CAC9B,GAAA,CAAI,aACJ,KAAA,CAAM,KAAA,CACN,OAAO,KAAA,CACT,CAAA,CAEAD,eAACE,mBAAAA,CAAA,CAAc,OAAQN,CAAAA,CACrB,QAAA,CAAAI,eAAC,KAAA,CAAA,CACC,GAAA,CAAK,GAAGC,mBAAsB,CAAA,+CAAA,CAAA,CAC9B,IAAI,EAAA,CACJ,KAAA,CAAM,MACN,MAAA,CAAO,KAAA,CACT,EACF,CAAA,CAAA,CACF,CAAA,CACAJ,gBAACM,mBAAAA,CAAA,CACC,UAAAH,cAAAA,CAAC,KAAA,CAAA,CACC,IAAK,CAAA,EAAGC,mBAAsB,4CAC9B,GAAA,CAAI,YAAA,CACJ,MAAM,KAAA,CACN,MAAA,CAAO,MACT,CAAA,CACAD,cAAAA,CAACE,oBAAA,CAAc,MAAA,CAAQN,EACrB,QAAA,CAAAI,cAAAA,CAAC,OACC,GAAA,CAAK,CAAA,EAAGC,mBAAsB,CAAA,8CAAA,CAAA,CAC9B,GAAA,CAAI,GACJ,KAAA,CAAM,KAAA,CACN,OAAO,KAAA,CACT,CAAA,CACF,GACF,CAAA,CAAA,CACF","file":"chunk-WTGHWP7T.cjs","sourcesContent":["import { ILLUSTRATIONS_BASE_URL } from '../../constants';\nimport FillContainer from '../../Form/Checkbox/shared/FillContainer';\nimport {\n DesktopIllustration,\n IllustrationContainer,\n MobileIllustration,\n} from '../../Form/Checkbox/shared/style';\n\nexport const Medication = ({ active = false }: { active?: boolean }) => (\n <IllustrationContainer>\n <DesktopIllustration>\n <img\n src={`${ILLUSTRATIONS_BASE_URL}/illustrations/card/medication-desktop.svg`}\n alt=\"medication\"\n width=\"300\"\n height=\"300\"\n />\n\n <FillContainer active={active}>\n <img\n src={`${ILLUSTRATIONS_BASE_URL}/illustrations/card/medication-desktop-fill.svg`}\n alt=\"\"\n width=\"300\"\n height=\"300\"\n />\n </FillContainer>\n </DesktopIllustration>\n <MobileIllustration>\n <img\n src={`${ILLUSTRATIONS_BASE_URL}/illustrations/card/medication-mobile.svg`}\n alt=\"medication\"\n width=\"358\"\n height=\"112\"\n />\n <FillContainer active={active}>\n <img\n src={`${ILLUSTRATIONS_BASE_URL}/illustrations/card/medication-mobile-fill.svg`}\n alt=\"\"\n width=\"358\"\n height=\"112\"\n />\n </FillContainer>\n </MobileIllustration>\n </IllustrationContainer>\n);\n"]}
@@ -1,2 +1,2 @@
1
- import {a as a$2}from'./chunk-QXJCAXNP.js';import {a,b,c}from'./chunk-ICTICKOW.js';import {a as a$1}from'./chunk-K6BJQE2V.js';import {jsxs,jsx}from'react/jsx-runtime';var h=({active:r=false})=>jsxs(a,{children:[jsxs(b,{children:[jsx("img",{src:`${a$1}/illustrations/card/clock-desktop.svg`,alt:"clock",width:"300",height:"300"}),jsx(a$2,{active:r,children:jsx("img",{src:`${a$1}/illustrations/card/clock-desktop-fill.svg`,alt:"",width:"300",height:"300"})})]}),jsxs(c,{children:[jsx("img",{src:`${a$1}/illustrations/card/clock-mobile.svg`,alt:"clock",width:"358",height:"112"}),jsx(a$2,{active:r,children:jsx("img",{src:`${a$1}/illustrations/card/clock-mobile-fill.svg`,alt:"",width:"358",height:"112"})})]})]});export{h as a};//# sourceMappingURL=chunk-QFJFQRIG.js.map
2
- //# sourceMappingURL=chunk-QFJFQRIG.js.map
1
+ import {a,b,c}from'./chunk-ICTICKOW.js';import {a as a$2}from'./chunk-QXJCAXNP.js';import {a as a$1}from'./chunk-K6BJQE2V.js';import {jsxs,jsx}from'react/jsx-runtime';var h=({active:r=false})=>jsxs(a,{children:[jsxs(b,{children:[jsx("img",{src:`${a$1}/illustrations/card/clock-desktop.svg`,alt:"clock",width:"300",height:"300"}),jsx(a$2,{active:r,children:jsx("img",{src:`${a$1}/illustrations/card/clock-desktop-fill.svg`,alt:"",width:"300",height:"300"})})]}),jsxs(c,{children:[jsx("img",{src:`${a$1}/illustrations/card/clock-mobile.svg`,alt:"clock",width:"358",height:"112"}),jsx(a$2,{active:r,children:jsx("img",{src:`${a$1}/illustrations/card/clock-mobile-fill.svg`,alt:"",width:"358",height:"112"})})]})]});export{h as a};//# sourceMappingURL=chunk-XN7TZP35.js.map
2
+ //# sourceMappingURL=chunk-XN7TZP35.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/Card/illustrations/Clock.tsx"],"names":["Clock","active","jsxs","IllustrationContainer","DesktopIllustration","jsx","ILLUSTRATIONS_BASE_URL","FillContainer_default","MobileIllustration"],"mappings":"uKAQO,IAAMA,CAAAA,CAAQ,CAAC,CAAE,MAAA,CAAAC,EAAS,KAAM,CAAA,GACrCC,KAACC,CAAAA,CAAA,CACC,UAAAD,IAAAA,CAACE,CAAAA,CAAA,CACC,QAAA,CAAA,CAAAC,GAAAA,CAAC,OACC,GAAA,CAAK,CAAA,EAAGC,GAAsB,CAAA,qCAAA,CAAA,CAC9B,GAAA,CAAI,QACJ,KAAA,CAAM,KAAA,CACN,OAAO,KAAA,CACT,CAAA,CAEAD,IAACE,GAAAA,CAAA,CAAc,OAAQN,CAAAA,CACrB,QAAA,CAAAI,IAAC,KAAA,CAAA,CACC,GAAA,CAAK,GAAGC,GAAsB,CAAA,0CAAA,CAAA,CAC9B,IAAI,EAAA,CACJ,KAAA,CAAM,MACN,MAAA,CAAO,KAAA,CACT,EACF,CAAA,CAAA,CACF,CAAA,CAEAJ,KAACM,CAAAA,CAAA,CACC,UAAAH,GAAAA,CAAC,KAAA,CAAA,CACC,IAAK,CAAA,EAAGC,GAAsB,uCAC9B,GAAA,CAAI,OAAA,CACJ,MAAM,KAAA,CACN,MAAA,CAAO,MACT,CAAA,CACAD,GAAAA,CAACE,IAAA,CAAc,MAAA,CAAQN,EACrB,QAAA,CAAAI,GAAAA,CAAC,OACC,GAAA,CAAK,CAAA,EAAGC,GAAsB,CAAA,yCAAA,CAAA,CAC9B,GAAA,CAAI,GACJ,KAAA,CAAM,KAAA,CACN,OAAO,KAAA,CACT,CAAA,CACF,GACF,CAAA,CAAA,CACF","file":"chunk-QFJFQRIG.js","sourcesContent":["import { ILLUSTRATIONS_BASE_URL } from '../../constants';\nimport FillContainer from '../../Form/Checkbox/shared/FillContainer';\nimport {\n DesktopIllustration,\n IllustrationContainer,\n MobileIllustration,\n} from '../../Form/Checkbox/shared/style';\n\nexport const Clock = ({ active = false }: { active?: boolean }) => (\n <IllustrationContainer>\n <DesktopIllustration>\n <img\n src={`${ILLUSTRATIONS_BASE_URL}/illustrations/card/clock-desktop.svg`}\n alt=\"clock\"\n width=\"300\"\n height=\"300\"\n />\n\n <FillContainer active={active}>\n <img\n src={`${ILLUSTRATIONS_BASE_URL}/illustrations/card/clock-desktop-fill.svg`}\n alt=\"\"\n width=\"300\"\n height=\"300\"\n />\n </FillContainer>\n </DesktopIllustration>\n\n <MobileIllustration>\n <img\n src={`${ILLUSTRATIONS_BASE_URL}/illustrations/card/clock-mobile.svg`}\n alt=\"clock\"\n width=\"358\"\n height=\"112\"\n />\n <FillContainer active={active}>\n <img\n src={`${ILLUSTRATIONS_BASE_URL}/illustrations/card/clock-mobile-fill.svg`}\n alt=\"\"\n width=\"358\"\n height=\"112\"\n />\n </FillContainer>\n </MobileIllustration>\n </IllustrationContainer>\n);\n"]}
1
+ {"version":3,"sources":["../src/Card/illustrations/Clock.tsx"],"names":["Clock","active","jsxs","IllustrationContainer","DesktopIllustration","jsx","ILLUSTRATIONS_BASE_URL","FillContainer_default","MobileIllustration"],"mappings":"uKAQO,IAAMA,CAAAA,CAAQ,CAAC,CAAE,MAAA,CAAAC,EAAS,KAAM,CAAA,GACrCC,KAACC,CAAAA,CAAA,CACC,UAAAD,IAAAA,CAACE,CAAAA,CAAA,CACC,QAAA,CAAA,CAAAC,GAAAA,CAAC,OACC,GAAA,CAAK,CAAA,EAAGC,GAAsB,CAAA,qCAAA,CAAA,CAC9B,GAAA,CAAI,QACJ,KAAA,CAAM,KAAA,CACN,OAAO,KAAA,CACT,CAAA,CAEAD,IAACE,GAAAA,CAAA,CAAc,OAAQN,CAAAA,CACrB,QAAA,CAAAI,IAAC,KAAA,CAAA,CACC,GAAA,CAAK,GAAGC,GAAsB,CAAA,0CAAA,CAAA,CAC9B,IAAI,EAAA,CACJ,KAAA,CAAM,MACN,MAAA,CAAO,KAAA,CACT,EACF,CAAA,CAAA,CACF,CAAA,CAEAJ,KAACM,CAAAA,CAAA,CACC,UAAAH,GAAAA,CAAC,KAAA,CAAA,CACC,IAAK,CAAA,EAAGC,GAAsB,uCAC9B,GAAA,CAAI,OAAA,CACJ,MAAM,KAAA,CACN,MAAA,CAAO,MACT,CAAA,CACAD,GAAAA,CAACE,IAAA,CAAc,MAAA,CAAQN,EACrB,QAAA,CAAAI,GAAAA,CAAC,OACC,GAAA,CAAK,CAAA,EAAGC,GAAsB,CAAA,yCAAA,CAAA,CAC9B,GAAA,CAAI,GACJ,KAAA,CAAM,KAAA,CACN,OAAO,KAAA,CACT,CAAA,CACF,GACF,CAAA,CAAA,CACF","file":"chunk-XN7TZP35.js","sourcesContent":["import { ILLUSTRATIONS_BASE_URL } from '../../constants';\nimport FillContainer from '../../Form/Checkbox/shared/FillContainer';\nimport {\n DesktopIllustration,\n IllustrationContainer,\n MobileIllustration,\n} from '../../Form/Checkbox/shared/style';\n\nexport const Clock = ({ active = false }: { active?: boolean }) => (\n <IllustrationContainer>\n <DesktopIllustration>\n <img\n src={`${ILLUSTRATIONS_BASE_URL}/illustrations/card/clock-desktop.svg`}\n alt=\"clock\"\n width=\"300\"\n height=\"300\"\n />\n\n <FillContainer active={active}>\n <img\n src={`${ILLUSTRATIONS_BASE_URL}/illustrations/card/clock-desktop-fill.svg`}\n alt=\"\"\n width=\"300\"\n height=\"300\"\n />\n </FillContainer>\n </DesktopIllustration>\n\n <MobileIllustration>\n <img\n src={`${ILLUSTRATIONS_BASE_URL}/illustrations/card/clock-mobile.svg`}\n alt=\"clock\"\n width=\"358\"\n height=\"112\"\n />\n <FillContainer active={active}>\n <img\n src={`${ILLUSTRATIONS_BASE_URL}/illustrations/card/clock-mobile-fill.svg`}\n alt=\"\"\n width=\"358\"\n height=\"112\"\n />\n </FillContainer>\n </MobileIllustration>\n </IllustrationContainer>\n);\n"]}
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkFMFRB4JI_cjs=require('./chunk-FMFRB4JI.cjs'),chunkQRO22BPZ_cjs=require('./chunk-QRO22BPZ.cjs'),e=require('react'),w=require('embla-carousel-react'),lu=require('react-icons/lu'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var e__namespace=/*#__PURE__*/_interopNamespace(e);var w__default=/*#__PURE__*/_interopDefault(w);var v=e__namespace.createContext(null);function d(){let t=e__namespace.useContext(v);if(!t)throw new Error("useCarousel must be used within a <Carousel />");return t}function T({orientation:t="horizontal",opts:l,setApi:o,plugins:s,className:u,children:c,...i}){let[x,r]=w__default.default({...l,axis:t==="horizontal"?"x":"y"},s),[P,R]=e__namespace.useState(false),[y,b]=e__namespace.useState(false),[N,S]=e__namespace.useState(0),[h,z]=e__namespace.useState(0),p=e__namespace.useCallback(C=>{C&&(R(C.canScrollPrev()),b(C.canScrollNext()),S(C.selectedScrollSnap()),z(C.scrollSnapList().length));},[]),g=e__namespace.useCallback(()=>{r?.scrollPrev();},[r]),E=e__namespace.useCallback(()=>{r?.scrollNext();},[r]);return e__namespace.useEffect(()=>{!r||!o||o(r);},[r,o]),e__namespace.useEffect(()=>{if(r)return p(r),r.on("reInit",p),r.on("select",p),()=>{r?.off("select",p);}},[r,p]),jsxRuntime.jsx(v.Provider,{value:{carouselRef:x,api:r,opts:l,orientation:t||(l?.axis==="y"?"vertical":"horizontal"),selectedIndex:N,slideCount:h,scrollPrev:g,scrollNext:E,canScrollPrev:P,canScrollNext:y},children:jsxRuntime.jsx("div",{className:chunkQRO22BPZ_cjs.a("relative",u),role:"region","aria-roledescription":"carousel","data-slot":"carousel",...i,children:c})})}function O({className:t,...l}){let{carouselRef:o,orientation:s}=d();return jsxRuntime.jsx("div",{ref:o,className:"overflow-hidden","data-slot":"carousel-content",children:jsxRuntime.jsx("div",{className:chunkQRO22BPZ_cjs.a("flex",s==="horizontal"?"-ml-4":"-mt-4 flex-col",t),...l})})}function F({className:t,...l}){let{orientation:o}=d();return jsxRuntime.jsx("div",{role:"group","aria-roledescription":"slide","data-slot":"carousel-item",className:chunkQRO22BPZ_cjs.a("min-w-0 shrink-0 grow-0 basis-full",o==="horizontal"?"pl-4":"pt-4",t),...l})}function j({className:t,variant:l="outline",size:o="sm",...s}){let{orientation:u,scrollPrev:c,canScrollPrev:i}=d();return jsxRuntime.jsxs(chunkFMFRB4JI_cjs.b,{"data-slot":"carousel-previous",variant:l,size:o,className:chunkQRO22BPZ_cjs.a("absolute size-8 rounded-full",u==="horizontal"?"top-1/2 -left-12 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",t),disabled:!i,onClick:c,...s,children:[jsxRuntime.jsx(lu.LuArrowLeft,{}),jsxRuntime.jsx("span",{className:"sr-only",children:"Previous slide"})]})}function q({className:t,variant:l="outline",size:o="sm",...s}){let{orientation:u,scrollNext:c,canScrollNext:i}=d();return jsxRuntime.jsxs(chunkFMFRB4JI_cjs.b,{"data-slot":"carousel-next",variant:l,size:o,className:chunkQRO22BPZ_cjs.a("absolute size-8 rounded-full",u==="horizontal"?"top-1/2 -right-12 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",t),disabled:!i,onClick:c,...s,children:[jsxRuntime.jsx(lu.LuArrowRight,{}),jsxRuntime.jsx("span",{className:"sr-only",children:"Next slide"})]})}function D({className:t,...l}){let{slideCount:o,selectedIndex:s}=d();return o<=1?null:jsxRuntime.jsxs("div",{className:chunkQRO22BPZ_cjs.a("text-muted-foreground text-sm",t),"data-slot":"carousel-fraction",...l,children:[s+1,"/",o]})}exports.a=d;exports.b=T;exports.c=O;exports.d=F;exports.e=j;exports.f=q;exports.g=D;//# sourceMappingURL=chunk-URUWP25E.cjs.map
2
- //# sourceMappingURL=chunk-URUWP25E.cjs.map
1
+ 'use strict';var chunk4JAIMZSZ_cjs=require('./chunk-4JAIMZSZ.cjs'),chunkQRO22BPZ_cjs=require('./chunk-QRO22BPZ.cjs'),e=require('react'),w=require('embla-carousel-react'),lu=require('react-icons/lu'),jsxRuntime=require('react/jsx-runtime');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var e__namespace=/*#__PURE__*/_interopNamespace(e);var w__default=/*#__PURE__*/_interopDefault(w);var v=e__namespace.createContext(null);function d(){let t=e__namespace.useContext(v);if(!t)throw new Error("useCarousel must be used within a <Carousel />");return t}function T({orientation:t="horizontal",opts:l,setApi:o,plugins:s,className:u,children:c,...i}){let[x,r]=w__default.default({...l,axis:t==="horizontal"?"x":"y"},s),[P,R]=e__namespace.useState(false),[y,b]=e__namespace.useState(false),[N,S]=e__namespace.useState(0),[h,z]=e__namespace.useState(0),p=e__namespace.useCallback(C=>{C&&(R(C.canScrollPrev()),b(C.canScrollNext()),S(C.selectedScrollSnap()),z(C.scrollSnapList().length));},[]),g=e__namespace.useCallback(()=>{r?.scrollPrev();},[r]),E=e__namespace.useCallback(()=>{r?.scrollNext();},[r]);return e__namespace.useEffect(()=>{!r||!o||o(r);},[r,o]),e__namespace.useEffect(()=>{if(r)return p(r),r.on("reInit",p),r.on("select",p),()=>{r?.off("select",p);}},[r,p]),jsxRuntime.jsx(v.Provider,{value:{carouselRef:x,api:r,opts:l,orientation:t||(l?.axis==="y"?"vertical":"horizontal"),selectedIndex:N,slideCount:h,scrollPrev:g,scrollNext:E,canScrollPrev:P,canScrollNext:y},children:jsxRuntime.jsx("div",{className:chunkQRO22BPZ_cjs.a("relative",u),role:"region","aria-roledescription":"carousel","data-slot":"carousel",...i,children:c})})}function O({className:t,...l}){let{carouselRef:o,orientation:s}=d();return jsxRuntime.jsx("div",{ref:o,className:"overflow-hidden","data-slot":"carousel-content",children:jsxRuntime.jsx("div",{className:chunkQRO22BPZ_cjs.a("flex",s==="horizontal"?"-ml-4":"-mt-4 flex-col",t),...l})})}function F({className:t,...l}){let{orientation:o}=d();return jsxRuntime.jsx("div",{role:"group","aria-roledescription":"slide","data-slot":"carousel-item",className:chunkQRO22BPZ_cjs.a("min-w-0 shrink-0 grow-0 basis-full",o==="horizontal"?"pl-4":"pt-4",t),...l})}function j({className:t,variant:l="outline",size:o="sm",...s}){let{orientation:u,scrollPrev:c,canScrollPrev:i}=d();return jsxRuntime.jsxs(chunk4JAIMZSZ_cjs.b,{"data-slot":"carousel-previous",variant:l,size:o,className:chunkQRO22BPZ_cjs.a("absolute size-8 rounded-full",u==="horizontal"?"top-1/2 -left-12 -translate-y-1/2":"-top-12 left-1/2 -translate-x-1/2 rotate-90",t),disabled:!i,onClick:c,...s,children:[jsxRuntime.jsx(lu.LuArrowLeft,{}),jsxRuntime.jsx("span",{className:"sr-only",children:"Previous slide"})]})}function q({className:t,variant:l="outline",size:o="sm",...s}){let{orientation:u,scrollNext:c,canScrollNext:i}=d();return jsxRuntime.jsxs(chunk4JAIMZSZ_cjs.b,{"data-slot":"carousel-next",variant:l,size:o,className:chunkQRO22BPZ_cjs.a("absolute size-8 rounded-full",u==="horizontal"?"top-1/2 -right-12 -translate-y-1/2":"-bottom-12 left-1/2 -translate-x-1/2 rotate-90",t),disabled:!i,onClick:c,...s,children:[jsxRuntime.jsx(lu.LuArrowRight,{}),jsxRuntime.jsx("span",{className:"sr-only",children:"Next slide"})]})}function D({className:t,...l}){let{slideCount:o,selectedIndex:s}=d();return o<=1?null:jsxRuntime.jsxs("div",{className:chunkQRO22BPZ_cjs.a("text-muted-foreground text-sm",t),"data-slot":"carousel-fraction",...l,children:[s+1,"/",o]})}exports.a=d;exports.b=T;exports.c=O;exports.d=F;exports.e=j;exports.f=q;exports.g=D;//# sourceMappingURL=chunk-XUH2Y7XC.cjs.map
2
+ //# sourceMappingURL=chunk-XUH2Y7XC.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/v2/carousel/carousel.tsx"],"names":["CarouselContext","e","useCarousel","context","Carousel","orientation","opts","setApi","plugins","className","children","props","carouselRef","api","useEmblaCarousel","canScrollPrev","setCanScrollPrev","canScrollNext","setCanScrollNext","selectedIndex","setSelectedIndex","slideCount","setSlideCount","onSelect","scrollPrev","scrollNext","jsx","cn","CarouselContent","CarouselItem","CarouselPrevious","variant","size","jsxs","Button","LuArrowLeft","CarouselNext","LuArrowRight","CarouselFraction"],"mappings":"qsBA6BA,IAAMA,CAAAA,CAAwBC,YAAA,CAAA,aAAA,CAA2C,IAAI,CAAA,CAE7E,SAASC,CAAAA,EAAc,CACrB,IAAMC,CAAAA,CAAgBF,YAAA,CAAA,UAAA,CAAWD,CAAe,CAAA,CAEhD,GAAI,CAACG,CAAAA,CACH,MAAM,IAAI,KAAA,CAAM,gDAAgD,CAAA,CAGlE,OAAOA,CACT,CAEA,SAASC,CAAAA,CAAS,CAChB,WAAA,CAAAC,CAAAA,CAAc,YAAA,CACd,IAAA,CAA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A,CAAIjB,CAAAA,EAAY,CAElD,OAAImB,CAAAA,EAAc,CAAA,CAAU,IAAA,CAG1BY,eAAAA,CAAC,KAAA,CAAA,CACC,SAAA,CAAWN,mBAAAA,CAAG,+BAAA,CAAiClB,CAAS,CAAA,CACxD,WAAA,CAAU,mBAAA,CACT,GAAGE,CAAAA,CAEH,QAAA,CAAA,CAAAQ,CAAAA,CAAgB,CAAA,CAAE,GAAA,CAAEE,GACvB,CAEJ","file":"chunk-URUWP25E.cjs","sourcesContent":["import * as React from 'react';\nimport useEmblaCarousel, { type UseEmblaCarouselType } from 'embla-carousel-react';\nimport { LuArrowLeft, LuArrowRight } from 'react-icons/lu';\nimport { cn } from '@/lib/utils';\nimport { Button } from '@/v2/button/button';\n\ntype CarouselApi = UseEmblaCarouselType[1];\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>;\ntype CarouselOptions = UseCarouselParameters[0];\ntype CarouselPlugin = UseCarouselParameters[1];\n\ntype CarouselProps = {\n opts?: CarouselOptions;\n plugins?: CarouselPlugin;\n orientation?: 'horizontal' | 'vertical';\n setApi?: (api: CarouselApi) => void;\n};\n\ntype CarouselContextProps = {\n carouselRef: ReturnType<typeof useEmblaCarousel>[0];\n api: ReturnType<typeof useEmblaCarousel>[1];\n selectedIndex: number;\n slideCount: number;\n scrollPrev: () => void;\n scrollNext: () => void;\n canScrollPrev: boolean;\n canScrollNext: boolean;\n} & CarouselProps;\n\nconst CarouselContext = React.createContext<CarouselContextProps | null>(null);\n\nfunction useCarousel() {\n const context = React.useContext(CarouselContext);\n\n if (!context) {\n throw new Error('useCarousel must be used within a <Carousel />');\n }\n\n return context;\n}\n\nfunction Carousel({\n orientation = 'horizontal',\n opts,\n setApi,\n plugins,\n className,\n children,\n ...props\n}: React.ComponentProps<'div'> & CarouselProps) {\n const [carouselRef, api] = useEmblaCarousel(\n {\n ...opts,\n axis: orientation === 'horizontal' ? 'x' : 'y',\n },\n plugins,\n );\n const [canScrollPrev, setCanScrollPrev] = React.useState(false);\n const [canScrollNext, setCanScrollNext] = React.useState(false);\n const [selectedIndex, setSelectedIndex] = React.useState(0);\n const [slideCount, setSlideCount] = React.useState(0);\n\n const onSelect = React.useCallback((api: CarouselApi) => {\n if (!api) return;\n setCanScrollPrev(api.canScrollPrev());\n setCanScrollNext(api.canScrollNext());\n setSelectedIndex(api.selectedScrollSnap());\n setSlideCount(api.scrollSnapList().length);\n }, []);\n\n const scrollPrev = React.useCallback(() => {\n api?.scrollPrev();\n }, [api]);\n\n const scrollNext = React.useCallback(() => {\n api?.scrollNext();\n }, [api]);\n\n React.useEffect(() => {\n if (!api || !setApi) return;\n setApi(api);\n }, [api, setApi]);\n\n React.useEffect(() => {\n if (!api) return;\n onSelect(api);\n api.on('reInit', onSelect);\n api.on('select', onSelect);\n\n // eslint-disable-next-line consistent-return\n return () => {\n api?.off('select', onSelect);\n };\n }, [api, onSelect]);\n\n return (\n <CarouselContext.Provider\n // eslint-disable-next-line react/jsx-no-constructed-context-values\n value={{\n carouselRef,\n api,\n opts,\n orientation: orientation || (opts?.axis === 'y' ? 'vertical' : 'horizontal'),\n selectedIndex,\n slideCount,\n scrollPrev,\n scrollNext,\n canScrollPrev,\n canScrollNext,\n }}\n >\n <div\n className={cn('relative', className)}\n role=\"region\"\n aria-roledescription=\"carousel\"\n data-slot=\"carousel\"\n {...props}\n >\n {children}\n </div>\n </CarouselContext.Provider>\n );\n}\n\nfunction CarouselContent({ className, ...props }: React.ComponentProps<'div'>) {\n const { carouselRef, orientation } = useCarousel();\n\n return (\n <div ref={carouselRef} className=\"overflow-hidden\" data-slot=\"carousel-content\">\n <div\n className={cn('flex', orientation === 'horizontal' ? '-ml-4' : '-mt-4 flex-col', className)}\n {...props}\n />\n </div>\n );\n}\n\nfunction CarouselItem({ className, ...props }: React.ComponentProps<'div'>) {\n const { orientation } = useCarousel();\n\n return (\n <div\n role=\"group\"\n aria-roledescription=\"slide\"\n data-slot=\"carousel-item\"\n className={cn(\n 'min-w-0 shrink-0 grow-0 basis-full',\n orientation === 'horizontal' ? 'pl-4' : 'pt-4',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CarouselPrevious({\n className,\n variant = 'outline',\n size = 'sm',\n ...props\n}: React.ComponentProps<typeof Button>) {\n const { orientation, scrollPrev, canScrollPrev } = useCarousel();\n\n return (\n <Button\n data-slot=\"carousel-previous\"\n variant={variant}\n size={size}\n className={cn(\n 'absolute size-8 rounded-full',\n orientation === 'horizontal'\n ? 'top-1/2 -left-12 -translate-y-1/2'\n : '-top-12 left-1/2 -translate-x-1/2 rotate-90',\n className,\n )}\n disabled={!canScrollPrev}\n onClick={scrollPrev}\n {...props}\n >\n <LuArrowLeft />\n <span className=\"sr-only\">Previous slide</span>\n </Button>\n );\n}\n\nfunction CarouselNext({\n className,\n variant = 'outline',\n size = 'sm',\n ...props\n}: React.ComponentProps<typeof Button>) {\n const { orientation, scrollNext, canScrollNext } = useCarousel();\n\n return (\n <Button\n data-slot=\"carousel-next\"\n variant={variant}\n size={size}\n className={cn(\n 'absolute size-8 rounded-full',\n orientation === 'horizontal'\n ? 'top-1/2 -right-12 -translate-y-1/2'\n : '-bottom-12 left-1/2 -translate-x-1/2 rotate-90',\n className,\n )}\n disabled={!canScrollNext}\n onClick={scrollNext}\n {...props}\n >\n <LuArrowRight />\n <span className=\"sr-only\">Next slide</span>\n </Button>\n );\n}\n\nfunction CarouselFraction({ className, ...props }: React.ComponentProps<'div'>) {\n const { slideCount, selectedIndex } = useCarousel();\n\n if (slideCount <= 1) return null;\n\n return (\n <div\n className={cn('text-muted-foreground text-sm', className)}\n data-slot=\"carousel-fraction\"\n {...props}\n >\n {selectedIndex + 1}/{slideCount}\n </div>\n );\n}\n\nexport {\n type CarouselApi,\n Carousel,\n CarouselContent,\n CarouselItem,\n CarouselPrevious,\n CarouselNext,\n CarouselFraction,\n useCarousel,\n};\n"]}
1
+ {"version":3,"sources":["../src/v2/carousel/carousel.tsx"],"names":["CarouselContext","e","useCarousel","context","Carousel","orientation","opts","setApi","plugins","className","children","props","carouselRef","api","useEmblaCarousel","canScrollPrev","setCanScrollPrev","canScrollNext","setCanScrollNext","selectedIndex","setSelectedIndex","slideCount","setSlideCount","onSelect","scrollPrev","scrollNext","jsx","cn","CarouselContent","CarouselItem","CarouselPrevious","variant","size","jsxs","Button","LuArrowLeft","CarouselNext","LuArrowRight","CarouselFraction"],"mappings":"qsBA6BA,IAAMA,CAAAA,CAAwBC,YAAA,CAAA,aAAA,CAA2C,IAAI,CAAA,CAE7E,SAASC,CAAAA,EAAc,CACrB,IAAMC,CAAAA,CAAgBF,YAAA,CAAA,UAAA,CAAWD,CAAe,CAAA,CAEhD,GAAI,CAACG,CAAAA,CACH,MAAM,IAAI,KAAA,CAAM,gDAAgD,CAAA,CAGlE,OAAOA,CACT,CAEA,SAASC,CAAAA,CAAS,CAChB,WAAA,CAAAC,CAAAA,CAAc,YAAA,CACd,IAAA,CAAAC,CAAAA,CACA,MAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAAgD,CAC9C,GAAM,CAACC,CAAAA,CAAaC,CAAG,CAAA,CAAIC,kBAAAA,CACzB,CACE,GAAGR,CAAAA,CACH,IAAA,CAAMD,CAAAA,GAAgB,YAAA,CAAe,GAAA,CAAM,GAC7C,CAAA,CACAG,CACF,CAAA,CACM,CAACO,CAAAA,CAAeC,CAAgB,CAAA,CAAUf,YAAA,CAAA,QAAA,CAAS,KAAK,CAAA,CACxD,CAACgB,CAAAA,CAAeC,CAAgB,CAAA,CAAUjB,YAAA,CAAA,QAAA,CAAS,KAAK,CAAA,CACxD,CAACkB,CAAAA,CAAeC,CAAgB,CAAA,CAAUnB,YAAA,CAAA,QAAA,CAAS,CAAC,CAAA,CACpD,CAACoB,CAAAA,CAAYC,CAAa,CAAA,CAAUrB,YAAA,CAAA,QAAA,CAAS,CAAC,CAAA,CAE9CsB,C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AAA,CACV,OAAA,CAASH,CAAAA,CACT,IAAA,CAAMC,CAAAA,CACN,SAAA,CAAWL,mBAAAA,CACT,8BAAA,CACAtB,CAAAA,GAAgB,YAAA,CACZ,oCAAA,CACA,gDAAA,CACJI,CACF,CAAA,CACA,QAAA,CAAU,CAACQ,CAAAA,CACX,OAAA,CAASQ,CAAAA,CACR,GAAGd,CAAAA,CAEJ,QAAA,CAAA,CAAAe,cAAAA,CAACW,eAAAA,CAAA,EAAa,CAAA,CACdX,cAAAA,CAAC,MAAA,CAAA,CAAK,SAAA,CAAU,SAAA,CAAU,QAAA,CAAA,YAAA,CAAU,CAAA,CAAA,CACtC,CAEJ,CAEA,SAASY,CAAAA,CAAiB,CAAE,SAAA,CAAA7B,CAAAA,CAAW,GAAGE,CAAM,CAAA,CAAgC,CAC9E,GAAM,CAAE,UAAA,CAAAU,CAAAA,CAAY,aAAA,CAAAF,CAAc,CAAA,CAAIjB,CAAAA,EAAY,CAElD,OAAImB,CAAAA,EAAc,CAAA,CAAU,IAAA,CAG1BY,eAAAA,CAAC,KAAA,CAAA,CACC,SAAA,CAAWN,mBAAAA,CAAG,+BAAA,CAAiClB,CAAS,CAAA,CACxD,WAAA,CAAU,mBAAA,CACT,GAAGE,CAAAA,CAEH,QAAA,CAAA,CAAAQ,CAAAA,CAAgB,CAAA,CAAE,GAAA,CAAEE,GACvB,CAEJ","file":"chunk-XUH2Y7XC.cjs","sourcesContent":["import * as React from 'react';\nimport useEmblaCarousel, { type UseEmblaCarouselType } from 'embla-carousel-react';\nimport { LuArrowLeft, LuArrowRight } from 'react-icons/lu';\nimport { cn } from '@/lib/utils';\nimport { Button } from '@/v2/button/button';\n\ntype CarouselApi = UseEmblaCarouselType[1];\ntype UseCarouselParameters = Parameters<typeof useEmblaCarousel>;\ntype CarouselOptions = UseCarouselParameters[0];\ntype CarouselPlugin = UseCarouselParameters[1];\n\ntype CarouselProps = {\n opts?: CarouselOptions;\n plugins?: CarouselPlugin;\n orientation?: 'horizontal' | 'vertical';\n setApi?: (api: CarouselApi) => void;\n};\n\ntype CarouselContextProps = {\n carouselRef: ReturnType<typeof useEmblaCarousel>[0];\n api: ReturnType<typeof useEmblaCarousel>[1];\n selectedIndex: number;\n slideCount: number;\n scrollPrev: () => void;\n scrollNext: () => void;\n canScrollPrev: boolean;\n canScrollNext: boolean;\n} & CarouselProps;\n\nconst CarouselContext = React.createContext<CarouselContextProps | null>(null);\n\nfunction useCarousel() {\n const context = React.useContext(CarouselContext);\n\n if (!context) {\n throw new Error('useCarousel must be used within a <Carousel />');\n }\n\n return context;\n}\n\nfunction Carousel({\n orientation = 'horizontal',\n opts,\n setApi,\n plugins,\n className,\n children,\n ...props\n}: React.ComponentProps<'div'> & CarouselProps) {\n const [carouselRef, api] = useEmblaCarousel(\n {\n ...opts,\n axis: orientation === 'horizontal' ? 'x' : 'y',\n },\n plugins,\n );\n const [canScrollPrev, setCanScrollPrev] = React.useState(false);\n const [canScrollNext, setCanScrollNext] = React.useState(false);\n const [selectedIndex, setSelectedIndex] = React.useState(0);\n const [slideCount, setSlideCount] = React.useState(0);\n\n const onSelect = React.useCallback((api: CarouselApi) => {\n if (!api) return;\n setCanScrollPrev(api.canScrollPrev());\n setCanScrollNext(api.canScrollNext());\n setSelectedIndex(api.selectedScrollSnap());\n setSlideCount(api.scrollSnapList().length);\n }, []);\n\n const scrollPrev = React.useCallback(() => {\n api?.scrollPrev();\n }, [api]);\n\n const scrollNext = React.useCallback(() => {\n api?.scrollNext();\n }, [api]);\n\n React.useEffect(() => {\n if (!api || !setApi) return;\n setApi(api);\n }, [api, setApi]);\n\n React.useEffect(() => {\n if (!api) return;\n onSelect(api);\n api.on('reInit', onSelect);\n api.on('select', onSelect);\n\n // eslint-disable-next-line consistent-return\n return () => {\n api?.off('select', onSelect);\n };\n }, [api, onSelect]);\n\n return (\n <CarouselContext.Provider\n // eslint-disable-next-line react/jsx-no-constructed-context-values\n value={{\n carouselRef,\n api,\n opts,\n orientation: orientation || (opts?.axis === 'y' ? 'vertical' : 'horizontal'),\n selectedIndex,\n slideCount,\n scrollPrev,\n scrollNext,\n canScrollPrev,\n canScrollNext,\n }}\n >\n <div\n className={cn('relative', className)}\n role=\"region\"\n aria-roledescription=\"carousel\"\n data-slot=\"carousel\"\n {...props}\n >\n {children}\n </div>\n </CarouselContext.Provider>\n );\n}\n\nfunction CarouselContent({ className, ...props }: React.ComponentProps<'div'>) {\n const { carouselRef, orientation } = useCarousel();\n\n return (\n <div ref={carouselRef} className=\"overflow-hidden\" data-slot=\"carousel-content\">\n <div\n className={cn('flex', orientation === 'horizontal' ? '-ml-4' : '-mt-4 flex-col', className)}\n {...props}\n />\n </div>\n );\n}\n\nfunction CarouselItem({ className, ...props }: React.ComponentProps<'div'>) {\n const { orientation } = useCarousel();\n\n return (\n <div\n role=\"group\"\n aria-roledescription=\"slide\"\n data-slot=\"carousel-item\"\n className={cn(\n 'min-w-0 shrink-0 grow-0 basis-full',\n orientation === 'horizontal' ? 'pl-4' : 'pt-4',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction CarouselPrevious({\n className,\n variant = 'outline',\n size = 'sm',\n ...props\n}: React.ComponentProps<typeof Button>) {\n const { orientation, scrollPrev, canScrollPrev } = useCarousel();\n\n return (\n <Button\n data-slot=\"carousel-previous\"\n variant={variant}\n size={size}\n className={cn(\n 'absolute size-8 rounded-full',\n orientation === 'horizontal'\n ? 'top-1/2 -left-12 -translate-y-1/2'\n : '-top-12 left-1/2 -translate-x-1/2 rotate-90',\n className,\n )}\n disabled={!canScrollPrev}\n onClick={scrollPrev}\n {...props}\n >\n <LuArrowLeft />\n <span className=\"sr-only\">Previous slide</span>\n </Button>\n );\n}\n\nfunction CarouselNext({\n className,\n variant = 'outline',\n size = 'sm',\n ...props\n}: React.ComponentProps<typeof Button>) {\n const { orientation, scrollNext, canScrollNext } = useCarousel();\n\n return (\n <Button\n data-slot=\"carousel-next\"\n variant={variant}\n size={size}\n className={cn(\n 'absolute size-8 rounded-full',\n orientation === 'horizontal'\n ? 'top-1/2 -right-12 -translate-y-1/2'\n : '-bottom-12 left-1/2 -translate-x-1/2 rotate-90',\n className,\n )}\n disabled={!canScrollNext}\n onClick={scrollNext}\n {...props}\n >\n <LuArrowRight />\n <span className=\"sr-only\">Next slide</span>\n </Button>\n );\n}\n\nfunction CarouselFraction({ className, ...props }: React.ComponentProps<'div'>) {\n const { slideCount, selectedIndex } = useCarousel();\n\n if (slideCount <= 1) return null;\n\n return (\n <div\n className={cn('text-muted-foreground text-sm', className)}\n data-slot=\"carousel-fraction\"\n {...props}\n >\n {selectedIndex + 1}/{slideCount}\n </div>\n );\n}\n\nexport {\n type CarouselApi,\n Carousel,\n CarouselContent,\n CarouselItem,\n CarouselPrevious,\n CarouselNext,\n CarouselFraction,\n useCarousel,\n};\n"]}
@@ -1,2 +1,2 @@
1
- 'use strict';var chunkFMFRB4JI_cjs=require('./chunk-FMFRB4JI.cjs'),chunkQRO22BPZ_cjs=require('./chunk-QRO22BPZ.cjs'),chunkULTFWLWO_cjs=require('./chunk-ULTFWLWO.cjs'),u=require('react'),vaul=require('vaul'),lu=require('react-icons/lu'),jsxRuntime=require('react/jsx-runtime');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var u__namespace=/*#__PURE__*/_interopNamespace(u);function x({autoFocus:t=true,...e}){let{isMobile:a,isTablet:i}=chunkULTFWLWO_cjs.b(),n=!a&&!i;return jsxRuntime.jsx(vaul.Drawer.Root,{"data-slot":"drawer",handleOnly:n,autoFocus:t,...e})}function C({...t}){return jsxRuntime.jsx(vaul.Drawer.Trigger,{"data-slot":"drawer-trigger",...t})}function f({...t}){return jsxRuntime.jsx(vaul.Drawer.Portal,{"data-slot":"drawer-portal",...t})}function v({...t}){return jsxRuntime.jsx(vaul.Drawer.Close,{"data-slot":"drawer-close",...t})}var b=u__namespace.forwardRef(({className:t,...e},a)=>jsxRuntime.jsx(vaul.Drawer.Overlay,{ref:a,"data-slot":"drawer-overlay",className:chunkQRO22BPZ_cjs.a("z-modal-stacking-context fixed inset-0 bg-black/50",t),...e}));function R({className:t,children:e,...a}){let i=/\bw-(\w+)\b/.test(t??""),{isMobile:n,isTablet:w}=chunkULTFWLWO_cjs.b(),m=!n&&!w;return jsxRuntime.jsxs(f,{"data-slot":"drawer-portal",children:[jsxRuntime.jsx(b,{}),jsxRuntime.jsxs(vaul.Drawer.Content,{"data-slot":"drawer-content",className:chunkQRO22BPZ_cjs.a("group/drawer-content bg-background z-modal-stacking-context fixed flex h-auto flex-col",m?"!select-auto":"","data-[vaul-drawer-direction=top]:inset-x-0","data-[vaul-drawer-direction=top]:top-0","data-[vaul-drawer-direction=top]:mb-24","data-[vaul-drawer-direction=top]:max-h-[80vh]","data-[vaul-drawer-direction=top]:rounded-b-lg","data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0","data-[vaul-drawer-direction=bottom]:bottom-0","data-[vaul-drawer-direction=bottom]:mt-24","data-[vaul-drawer-direction=bottom]:max-h-[80vh]","data-[vaul-drawer-direction=bottom]:rounded-t-lg","data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0","data-[vaul-drawer-direction=right]:right-0","data-[vaul-drawer-direction=right]:border-l","data-[vaul-drawer-direction=right]:rounded-l-md",!i&&"data-[vaul-drawer-direction=right]:w-3/4",!i&&"data-[vaul-drawer-direction=right]:sm:max-w-md","data-[vaul-drawer-direction=left]:inset-y-0","data-[vaul-drawer-direction=left]:left-0","data-[vaul-drawer-direction=left]:border-r","data-[vaul-drawer-direction=left]:rounded-r-md",!i&&"data-[vaul-drawer-direction=left]:w-3/4",!i&&"data-[vaul-drawer-direction=left]:sm:max-w-sm",t),...a,children:[jsxRuntime.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),e]})]})}function T({className:t,showClose:e=false,...a}){return jsxRuntime.jsxs("div",{"data-slot":"drawer-header",className:chunkQRO22BPZ_cjs.a("relative flex flex-col gap-0.5 border-b p-4 text-left md:gap-1.5 md:p-8",t),...a,children:[e&&jsxRuntime.jsx(v,{className:"focus:ring-ring absolute rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none","aria-label":"Close",asChild:true,children:jsxRuntime.jsx(chunkFMFRB4JI_cjs.b,{variant:"ghost-secondary",className:"text-primary absolute top-1/2 right-4 h-8 w-8 -translate-y-1/2 p-0",children:jsxRuntime.jsx(lu.LuX,{})})}),a.children]})}function k({className:t,...e}){return jsxRuntime.jsx("div",{"data-slot":"drawer-footer",className:chunkQRO22BPZ_cjs.a("mt-auto flex gap-2 border-t p-4 md:p-8",t),...e})}function N({className:t,...e}){return jsxRuntime.jsx(vaul.Drawer.Title,{"data-slot":"drawer-title",className:chunkQRO22BPZ_cjs.a("text-display-md",t),...e})}function O({...t}){return jsxRuntime.jsx(vaul.Drawer.Description,{"data-slot":"drawer-description",...t})}exports.a=x;exports.b=C;exports.c=f;exports.d=v;exports.e=b;exports.f=R;exports.g=T;exports.h=k;exports.i=N;exports.j=O;//# sourceMappingURL=chunk-UIKSYA4B.cjs.map
2
- //# sourceMappingURL=chunk-UIKSYA4B.cjs.map
1
+ 'use strict';var chunk4JAIMZSZ_cjs=require('./chunk-4JAIMZSZ.cjs'),chunkULTFWLWO_cjs=require('./chunk-ULTFWLWO.cjs'),chunkQRO22BPZ_cjs=require('./chunk-QRO22BPZ.cjs'),u=require('react'),vaul=require('vaul'),lu=require('react-icons/lu'),jsxRuntime=require('react/jsx-runtime');function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e){Object.keys(e).forEach(function(k){if(k!=='default'){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:true,get:function(){return e[k]}});}})}n.default=e;return Object.freeze(n)}var u__namespace=/*#__PURE__*/_interopNamespace(u);function x({autoFocus:t=true,...e}){let{isMobile:a,isTablet:i}=chunkULTFWLWO_cjs.b(),n=!a&&!i;return jsxRuntime.jsx(vaul.Drawer.Root,{"data-slot":"drawer",handleOnly:n,autoFocus:t,...e})}function C({...t}){return jsxRuntime.jsx(vaul.Drawer.Trigger,{"data-slot":"drawer-trigger",...t})}function f({...t}){return jsxRuntime.jsx(vaul.Drawer.Portal,{"data-slot":"drawer-portal",...t})}function v({...t}){return jsxRuntime.jsx(vaul.Drawer.Close,{"data-slot":"drawer-close",...t})}var b=u__namespace.forwardRef(({className:t,...e},a)=>jsxRuntime.jsx(vaul.Drawer.Overlay,{ref:a,"data-slot":"drawer-overlay",className:chunkQRO22BPZ_cjs.a("z-modal-stacking-context fixed inset-0 bg-black/50",t),...e}));function R({className:t,children:e,...a}){let i=/\bw-(\w+)\b/.test(t??""),{isMobile:n,isTablet:w}=chunkULTFWLWO_cjs.b(),m=!n&&!w;return jsxRuntime.jsxs(f,{"data-slot":"drawer-portal",children:[jsxRuntime.jsx(b,{}),jsxRuntime.jsxs(vaul.Drawer.Content,{"data-slot":"drawer-content",className:chunkQRO22BPZ_cjs.a("group/drawer-content bg-background z-modal-stacking-context fixed flex h-auto flex-col",m?"!select-auto":"","data-[vaul-drawer-direction=top]:inset-x-0","data-[vaul-drawer-direction=top]:top-0","data-[vaul-drawer-direction=top]:mb-24","data-[vaul-drawer-direction=top]:max-h-[80vh]","data-[vaul-drawer-direction=top]:rounded-b-lg","data-[vaul-drawer-direction=top]:border-b","data-[vaul-drawer-direction=bottom]:inset-x-0","data-[vaul-drawer-direction=bottom]:bottom-0","data-[vaul-drawer-direction=bottom]:mt-24","data-[vaul-drawer-direction=bottom]:max-h-[80vh]","data-[vaul-drawer-direction=bottom]:rounded-t-lg","data-[vaul-drawer-direction=bottom]:border-t","data-[vaul-drawer-direction=right]:inset-y-0","data-[vaul-drawer-direction=right]:right-0","data-[vaul-drawer-direction=right]:border-l","data-[vaul-drawer-direction=right]:rounded-l-md",!i&&"data-[vaul-drawer-direction=right]:w-3/4",!i&&"data-[vaul-drawer-direction=right]:sm:max-w-md","data-[vaul-drawer-direction=left]:inset-y-0","data-[vaul-drawer-direction=left]:left-0","data-[vaul-drawer-direction=left]:border-r","data-[vaul-drawer-direction=left]:rounded-r-md",!i&&"data-[vaul-drawer-direction=left]:w-3/4",!i&&"data-[vaul-drawer-direction=left]:sm:max-w-sm",t),...a,children:[jsxRuntime.jsx("div",{className:"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block"}),e]})]})}function T({className:t,showClose:e=false,...a}){return jsxRuntime.jsxs("div",{"data-slot":"drawer-header",className:chunkQRO22BPZ_cjs.a("relative flex flex-col gap-0.5 border-b p-4 text-left md:gap-1.5 md:p-8",t),...a,children:[e&&jsxRuntime.jsx(v,{className:"focus:ring-ring absolute rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none","aria-label":"Close",asChild:true,children:jsxRuntime.jsx(chunk4JAIMZSZ_cjs.b,{variant:"ghost-secondary",className:"text-primary absolute top-1/2 right-4 h-8 w-8 -translate-y-1/2 p-0",children:jsxRuntime.jsx(lu.LuX,{})})}),a.children]})}function k({className:t,...e}){return jsxRuntime.jsx("div",{"data-slot":"drawer-footer",className:chunkQRO22BPZ_cjs.a("mt-auto flex gap-2 border-t p-4 md:p-8",t),...e})}function N({className:t,...e}){return jsxRuntime.jsx(vaul.Drawer.Title,{"data-slot":"drawer-title",className:chunkQRO22BPZ_cjs.a("text-display-md",t),...e})}function O({...t}){return jsxRuntime.jsx(vaul.Drawer.Description,{"data-slot":"drawer-description",...t})}exports.a=x;exports.b=C;exports.c=f;exports.d=v;exports.e=b;exports.f=R;exports.g=T;exports.h=k;exports.i=N;exports.j=O;//# sourceMappingURL=chunk-XWIFC5YM.cjs.map
2
+ //# sourceMappingURL=chunk-XWIFC5YM.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/v2/drawer/drawer.tsx"],"names":["Drawer","autoFocus","props","isMobile","isTablet","useWindowSize_default","handleOnly","jsx","DrawerPrimitive","DrawerTrigger","DrawerPortal","DrawerClose","DrawerOverlay","u","className","ref","cn","DrawerContent","children","hasWidth","allowUserSelect","jsxs","DrawerHeader","showClose","Button","LuX","DrawerFooter","DrawerTitle","DrawerDescription"],"mappings":"0nBAQA,SAASA,CAAAA,CAAO,CAAE,SAAA,CAAAC,CAAAA,CAAY,IAAA,CAAM,GAAGC,CAAM,CAAA,CAAsD,CACjG,GAAM,CAAE,QAAA,CAAAC,EAAU,QAAA,CAAAC,CAAS,CAAA,CAAIC,mBAAAA,GAIzBC,CAAAA,CAAa,CAACH,GAAY,CAACC,CAAAA,CACjC,OACEG,cAAAA,CAACC,WAAAA,CAAgB,IAAA,CAAhB,CACC,YAAU,QAAA,CACV,UAAA,CAAYF,EAIZ,SAAA,CAAWL,CAAAA,CACV,GAAGC,CAAAA,CACN,CAEJ,CAEA,SAASO,EAAc,CAAE,GAAGP,CAAM,CAAA,CAAyD,CACzF,OAAOK,cAAAA,CAACC,WAAAA,CAAgB,OAAA,CAAhB,CAAwB,YAAU,gBAAA,CAAkB,GAAGN,EAAO,CACxE,CAEA,SAASQ,CAAAA,CAAa,CAAE,GAAGR,CAAM,CAAA,CAAwD,CACvF,OAAOK,cAAAA,CAACC,YAAgB,MAAA,CAAhB,CAAuB,YAAU,eAAA,CAAiB,GAAGN,CAAAA,CAAO,CACtE,CAEA,SAASS,CAAAA,CAAY,CAAE,GAAGT,CAAM,EAAuD,CACrF,OAAOK,cAAAA,CAACC,WAAAA,CAAgB,MAAhB,CAAsB,WAAA,CAAU,eAAgB,GAAGN,CAAAA,CAAO,CACpE,CAGA,IAAMU,CAAAA,CAA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import { LuX } from 'react-icons/lu';\nimport { cn } from '@/lib/utils';\nimport { Button } from '@/v2/button/button';\nimport { useWindowSize } from '@/hooks';\n\nfunction Drawer({ autoFocus = true, ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>) {\n const { isMobile, isTablet } = useWindowSize();\n // Invert the default behavior of vaul's drawer: https://vaul.emilkowal.ski/api#root\n // Desktop users can click the X or overlay to close, so we can disable dragging the drawer itself to close\n // this lets us allow users them to select text in the drawer without accidentally closing it\n const handleOnly = !isMobile && !isTablet;\n return (\n <DrawerPrimitive.Root\n data-slot=\"drawer\"\n handleOnly={handleOnly}\n // Invert the default behavior of vaul's drawer to always autoFocus by default\n // This ensures that keyboard users see focus moved to the drawer when it opens\n // unless explicitly disabled\n autoFocus={autoFocus}\n {...props}\n />\n );\n}\n\nfunction DrawerTrigger({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Trigger>) {\n return <DrawerPrimitive.Trigger data-slot=\"drawer-trigger\" {...props} />;\n}\n\nfunction DrawerPortal({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Portal>) {\n return <DrawerPrimitive.Portal data-slot=\"drawer-portal\" {...props} />;\n}\n\nfunction DrawerClose({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Close>) {\n return <DrawerPrimitive.Close data-slot=\"drawer-close\" {...props} />;\n}\n\n// NOTE: forwardRef for radix (underlying library for vaul)\nconst DrawerOverlay = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Overlay\n ref={ref}\n data-slot=\"drawer-overlay\"\n className={cn('z-modal-stacking-context fixed inset-0 bg-black/50', className)}\n {...props}\n />\n));\n\nfunction DrawerContent({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Content>) {\n const hasWidth = /\\bw-(\\w+)\\b/.test(className ?? '');\n\n const { isMobile, isTablet } = useWindowSize();\n // Desktop users can click the X or overlay to close, so we can disable dragging the drawer itself to close\n // this lets us allow users them to select text in the drawer without accidentally closing it\n const allowUserSelect = !isMobile && !isTablet;\n\n return (\n <DrawerPortal data-slot=\"drawer-portal\">\n <DrawerOverlay />\n <DrawerPrimitive.Content\n data-slot=\"drawer-content\"\n className={cn(\n 'group/drawer-content bg-background z-modal-stacking-context fixed flex h-auto flex-col',\n\n allowUserSelect ? '!select-auto' : '',\n\n // top drawer\n 'data-[vaul-drawer-direction=top]:inset-x-0',\n 'data-[vaul-drawer-direction=top]:top-0',\n 'data-[vaul-drawer-direction=top]:mb-24',\n 'data-[vaul-drawer-direction=top]:max-h-[80vh]',\n 'data-[vaul-drawer-direction=top]:rounded-b-lg',\n 'data-[vaul-drawer-direction=top]:border-b',\n\n // bottom drawer\n 'data-[vaul-drawer-direction=bottom]:inset-x-0',\n 'data-[vaul-drawer-direction=bottom]:bottom-0',\n 'data-[vaul-drawer-direction=bottom]:mt-24',\n 'data-[vaul-drawer-direction=bottom]:max-h-[80vh]',\n 'data-[vaul-drawer-direction=bottom]:rounded-t-lg',\n 'data-[vaul-drawer-direction=bottom]:border-t',\n\n // right drawer\n 'data-[vaul-drawer-direction=right]:inset-y-0',\n 'data-[vaul-drawer-direction=right]:right-0',\n 'data-[vaul-drawer-direction=right]:border-l',\n 'data-[vaul-drawer-direction=right]:rounded-l-md',\n !hasWidth && 'data-[vaul-drawer-direction=right]:w-3/4',\n !hasWidth && 'data-[vaul-drawer-direction=right]:sm:max-w-md',\n\n // left drawer\n 'data-[vaul-drawer-direction=left]:inset-y-0',\n 'data-[vaul-drawer-direction=left]:left-0',\n 'data-[vaul-drawer-direction=left]:border-r',\n 'data-[vaul-drawer-direction=left]:rounded-r-md',\n !hasWidth && 'data-[vaul-drawer-direction=left]:w-3/4',\n !hasWidth && 'data-[vaul-drawer-direction=left]:sm:max-w-sm',\n className,\n )}\n {...props}\n >\n <div className=\"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block\" />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPortal>\n );\n}\n\nfunction DrawerHeader({\n className,\n showClose = false,\n ...props\n}: React.ComponentProps<'div'> & { showClose?: boolean }) {\n return (\n <div\n data-slot=\"drawer-header\"\n className={cn(\n 'relative flex flex-col gap-0.5 border-b p-4 text-left md:gap-1.5 md:p-8',\n className,\n )}\n {...props}\n >\n {showClose && (\n <DrawerClose\n className=\"focus:ring-ring absolute rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none\"\n aria-label=\"Close\"\n asChild\n >\n <Button\n variant=\"ghost-secondary\"\n className=\"text-primary absolute top-1/2 right-4 h-8 w-8 -translate-y-1/2 p-0\"\n >\n <LuX />\n </Button>\n </DrawerClose>\n )}\n {props.children}\n </div>\n );\n}\n\nfunction DrawerFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"drawer-footer\"\n className={cn('mt-auto flex gap-2 border-t p-4 md:p-8', className)}\n {...props}\n />\n );\n}\n\nfunction DrawerTitle({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Title>) {\n return (\n <DrawerPrimitive.Title\n data-slot=\"drawer-title\"\n className={cn('text-display-md', className)}\n {...props}\n />\n );\n}\n\nfunction DrawerDescription({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Description>) {\n return <DrawerPrimitive.Description data-slot=\"drawer-description\" {...props} />;\n}\n\nexport {\n Drawer,\n DrawerClose,\n DrawerContent,\n DrawerDescription,\n DrawerFooter,\n DrawerHeader,\n DrawerOverlay,\n DrawerPortal,\n DrawerTitle,\n DrawerTrigger,\n};\n"]}
1
+ {"version":3,"sources":["../src/v2/drawer/drawer.tsx"],"names":["Drawer","autoFocus","props","isMobile","isTablet","useWindowSize_default","handleOnly","jsx","DrawerPrimitive","DrawerTrigger","DrawerPortal","DrawerClose","DrawerOverlay","u","className","ref","cn","DrawerContent","children","hasWidth","allowUserSelect","jsxs","DrawerHeader","showClose","Button","LuX","DrawerFooter","DrawerTitle","DrawerDescription"],"mappings":"0nBAQA,SAASA,CAAAA,CAAO,CAAE,SAAA,CAAAC,CAAAA,CAAY,IAAA,CAAM,GAAGC,CAAM,CAAA,CAAsD,CACjG,GAAM,CAAE,QAAA,CAAAC,EAAU,QAAA,CAAAC,CAAS,CAAA,CAAIC,mBAAAA,GAIzBC,CAAAA,CAAa,CAACH,GAAY,CAACC,CAAAA,CACjC,OACEG,cAAAA,CAACC,WAAAA,CAAgB,IAAA,CAAhB,CACC,YAAU,QAAA,CACV,UAAA,CAAYF,EAIZ,SAAA,CAAWL,CAAAA,CACV,GAAGC,CAAAA,CACN,CAEJ,CAEA,SAASO,EAAc,CAAE,GAAGP,CAAM,CAAA,CAAyD,CACzF,OAAOK,cAAAA,CAACC,WAAAA,CAAgB,OAAA,CAAhB,CAAwB,YAAU,gBAAA,CAAkB,GAAGN,EAAO,CACxE,CAEA,SAASQ,CAAAA,CAAa,CAAE,GAAGR,CAAM,CAAA,CAAwD,CACvF,OAAOK,cAAAA,CAACC,YAAgB,MAAA,CAAhB,CAAuB,YAAU,eAAA,CAAiB,GAAGN,CAAAA,CAAO,CACtE,CAEA,SAASS,CAAAA,CAAY,CAAE,GAAGT,CAAM,EAAuD,CACrF,OAAOK,cAAAA,CAACC,WAAAA,CAAgB,MAAhB,CAAsB,WAAA,CAAU,eAAgB,GAAGN,CAAAA,CAAO,CACpE,CAGA,IAAMU,CAAAA,CAAsBC,YAAA,CAAA,UAAA,CAG1B,CAAC,CAAE,SAAA,CAAAC,EAAW,GAAGZ,CAAM,EAAGa,CAAAA,GAC1BR,cAAAA,CAACC,YAAgB,OAAA,CAAhB,CACC,IAAKO,CAAAA,CACL,WAAA,CAAU,iBACV,SAAA,CAAWC,mBAAAA,CAAG,qDAAsDF,CAAS,CAAA,CAC5E,GAAGZ,CAAAA,CACN,CACD,EAED,SAASe,EAAc,CACrB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A,CACC,SAAA,CAAU,sKAAA,CACV,YAAA,CAAW,QACX,OAAA,CAAO,IAAA,CAEP,SAAAJ,cAAAA,CAACiB,mBAAAA,CAAA,CACC,OAAA,CAAQ,iBAAA,CACR,SAAA,CAAU,oEAAA,CAEV,SAAAjB,cAAAA,CAACkB,MAAAA,CAAA,EAAI,CAAA,CACP,CAAA,CACF,EAEDvB,CAAAA,CAAM,QAAA,CAAA,CACT,CAEJ,CAEA,SAASwB,CAAAA,CAAa,CAAE,UAAAZ,CAAAA,CAAW,GAAGZ,CAAM,CAAA,CAAgC,CAC1E,OACEK,cAAAA,CAAC,KAAA,CAAA,CACC,YAAU,eAAA,CACV,SAAA,CAAWS,oBAAG,wCAAA,CAA0CF,CAAS,EAChE,GAAGZ,CAAAA,CACN,CAEJ,CAEA,SAASyB,CAAAA,CAAY,CAAE,UAAAb,CAAAA,CAAW,GAAGZ,CAAM,CAAA,CAAuD,CAChG,OACEK,cAAAA,CAACC,YAAgB,KAAA,CAAhB,CACC,YAAU,cAAA,CACV,SAAA,CAAWQ,oBAAG,iBAAA,CAAmBF,CAAS,CAAA,CACzC,GAAGZ,EACN,CAEJ,CAEA,SAAS0B,CAAAA,CAAkB,CAAE,GAAG1B,CAAM,CAAA,CAA6D,CACjG,OAAOK,cAAAA,CAACC,YAAgB,WAAA,CAAhB,CAA4B,YAAU,oBAAA,CAAsB,GAAGN,EAAO,CAChF","file":"chunk-XWIFC5YM.cjs","sourcesContent":["import * as React from 'react';\nimport { Drawer as DrawerPrimitive } from 'vaul';\n\nimport { LuX } from 'react-icons/lu';\nimport { cn } from '@/lib/utils';\nimport { Button } from '@/v2/button/button';\nimport { useWindowSize } from '@/hooks';\n\nfunction Drawer({ autoFocus = true, ...props }: React.ComponentProps<typeof DrawerPrimitive.Root>) {\n const { isMobile, isTablet } = useWindowSize();\n // Invert the default behavior of vaul's drawer: https://vaul.emilkowal.ski/api#root\n // Desktop users can click the X or overlay to close, so we can disable dragging the drawer itself to close\n // this lets us allow users them to select text in the drawer without accidentally closing it\n const handleOnly = !isMobile && !isTablet;\n return (\n <DrawerPrimitive.Root\n data-slot=\"drawer\"\n handleOnly={handleOnly}\n // Invert the default behavior of vaul's drawer to always autoFocus by default\n // This ensures that keyboard users see focus moved to the drawer when it opens\n // unless explicitly disabled\n autoFocus={autoFocus}\n {...props}\n />\n );\n}\n\nfunction DrawerTrigger({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Trigger>) {\n return <DrawerPrimitive.Trigger data-slot=\"drawer-trigger\" {...props} />;\n}\n\nfunction DrawerPortal({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Portal>) {\n return <DrawerPrimitive.Portal data-slot=\"drawer-portal\" {...props} />;\n}\n\nfunction DrawerClose({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Close>) {\n return <DrawerPrimitive.Close data-slot=\"drawer-close\" {...props} />;\n}\n\n// NOTE: forwardRef for radix (underlying library for vaul)\nconst DrawerOverlay = React.forwardRef<\n React.ElementRef<typeof DrawerPrimitive.Overlay>,\n React.ComponentPropsWithoutRef<typeof DrawerPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n <DrawerPrimitive.Overlay\n ref={ref}\n data-slot=\"drawer-overlay\"\n className={cn('z-modal-stacking-context fixed inset-0 bg-black/50', className)}\n {...props}\n />\n));\n\nfunction DrawerContent({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof DrawerPrimitive.Content>) {\n const hasWidth = /\\bw-(\\w+)\\b/.test(className ?? '');\n\n const { isMobile, isTablet } = useWindowSize();\n // Desktop users can click the X or overlay to close, so we can disable dragging the drawer itself to close\n // this lets us allow users them to select text in the drawer without accidentally closing it\n const allowUserSelect = !isMobile && !isTablet;\n\n return (\n <DrawerPortal data-slot=\"drawer-portal\">\n <DrawerOverlay />\n <DrawerPrimitive.Content\n data-slot=\"drawer-content\"\n className={cn(\n 'group/drawer-content bg-background z-modal-stacking-context fixed flex h-auto flex-col',\n\n allowUserSelect ? '!select-auto' : '',\n\n // top drawer\n 'data-[vaul-drawer-direction=top]:inset-x-0',\n 'data-[vaul-drawer-direction=top]:top-0',\n 'data-[vaul-drawer-direction=top]:mb-24',\n 'data-[vaul-drawer-direction=top]:max-h-[80vh]',\n 'data-[vaul-drawer-direction=top]:rounded-b-lg',\n 'data-[vaul-drawer-direction=top]:border-b',\n\n // bottom drawer\n 'data-[vaul-drawer-direction=bottom]:inset-x-0',\n 'data-[vaul-drawer-direction=bottom]:bottom-0',\n 'data-[vaul-drawer-direction=bottom]:mt-24',\n 'data-[vaul-drawer-direction=bottom]:max-h-[80vh]',\n 'data-[vaul-drawer-direction=bottom]:rounded-t-lg',\n 'data-[vaul-drawer-direction=bottom]:border-t',\n\n // right drawer\n 'data-[vaul-drawer-direction=right]:inset-y-0',\n 'data-[vaul-drawer-direction=right]:right-0',\n 'data-[vaul-drawer-direction=right]:border-l',\n 'data-[vaul-drawer-direction=right]:rounded-l-md',\n !hasWidth && 'data-[vaul-drawer-direction=right]:w-3/4',\n !hasWidth && 'data-[vaul-drawer-direction=right]:sm:max-w-md',\n\n // left drawer\n 'data-[vaul-drawer-direction=left]:inset-y-0',\n 'data-[vaul-drawer-direction=left]:left-0',\n 'data-[vaul-drawer-direction=left]:border-r',\n 'data-[vaul-drawer-direction=left]:rounded-r-md',\n !hasWidth && 'data-[vaul-drawer-direction=left]:w-3/4',\n !hasWidth && 'data-[vaul-drawer-direction=left]:sm:max-w-sm',\n className,\n )}\n {...props}\n >\n <div className=\"bg-muted mx-auto mt-4 hidden h-2 w-[100px] shrink-0 rounded-full group-data-[vaul-drawer-direction=bottom]/drawer-content:block\" />\n {children}\n </DrawerPrimitive.Content>\n </DrawerPortal>\n );\n}\n\nfunction DrawerHeader({\n className,\n showClose = false,\n ...props\n}: React.ComponentProps<'div'> & { showClose?: boolean }) {\n return (\n <div\n data-slot=\"drawer-header\"\n className={cn(\n 'relative flex flex-col gap-0.5 border-b p-4 text-left md:gap-1.5 md:p-8',\n className,\n )}\n {...props}\n >\n {showClose && (\n <DrawerClose\n className=\"focus:ring-ring absolute rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none\"\n aria-label=\"Close\"\n asChild\n >\n <Button\n variant=\"ghost-secondary\"\n className=\"text-primary absolute top-1/2 right-4 h-8 w-8 -translate-y-1/2 p-0\"\n >\n <LuX />\n </Button>\n </DrawerClose>\n )}\n {props.children}\n </div>\n );\n}\n\nfunction DrawerFooter({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"drawer-footer\"\n className={cn('mt-auto flex gap-2 border-t p-4 md:p-8', className)}\n {...props}\n />\n );\n}\n\nfunction DrawerTitle({ className, ...props }: React.ComponentProps<typeof DrawerPrimitive.Title>) {\n return (\n <DrawerPrimitive.Title\n data-slot=\"drawer-title\"\n className={cn('text-display-md', className)}\n {...props}\n />\n );\n}\n\nfunction DrawerDescription({ ...props }: React.ComponentProps<typeof DrawerPrimitive.Description>) {\n return <DrawerPrimitive.Description data-slot=\"drawer-description\" {...props} />;\n}\n\nexport {\n Drawer,\n DrawerClose,\n DrawerContent,\n DrawerDescription,\n DrawerFooter,\n DrawerHeader,\n DrawerOverlay,\n DrawerPortal,\n DrawerTitle,\n DrawerTrigger,\n};\n"]}
@@ -1,2 +1,2 @@
1
- 'use strict';var chunk3WAG2NWA_cjs=require('./chunk-3WAG2NWA.cjs'),chunkQRO22BPZ_cjs=require('./chunk-QRO22BPZ.cjs'),jsxRuntime=require('react/jsx-runtime');var m=({id:h,children:i=null,className:b,classNames:r={},columns:o=2,value:t,onValueChange:C,items:l=[],...n})=>{let u=(e,s)=>{let g=s?[...t,e]:t.filter(d=>d!==e);C(g);};return jsxRuntime.jsx("div",{className:chunkQRO22BPZ_cjs.a("grid gap-2",o===1&&"grid-cols-1",o===2&&"grid-cols-2",o===3&&"grid-cols-3",o===4&&"grid-cols-4",b,r?.base),id:h,children:l?.length?l.map(e=>jsxRuntime.jsx(chunk3WAG2NWA_cjs.a,{classNames:r?.buttonCheckbox,checked:t.includes(e.value),onCheckedChange:s=>u(e.value,s),size:n.size,...n,children:e.label},e.value)):i})};exports.a=m;//# sourceMappingURL=chunk-SC4FK5N3.cjs.map
2
- //# sourceMappingURL=chunk-SC4FK5N3.cjs.map
1
+ 'use strict';var chunkQNRAGVW4_cjs=require('./chunk-QNRAGVW4.cjs'),chunkQRO22BPZ_cjs=require('./chunk-QRO22BPZ.cjs'),jsxRuntime=require('react/jsx-runtime');var m=({id:h,children:i=null,className:b,classNames:r={},columns:o=2,value:t,onValueChange:C,items:l=[],...n})=>{let u=(e,s)=>{let g=s?[...t,e]:t.filter(d=>d!==e);C(g);};return jsxRuntime.jsx("div",{className:chunkQRO22BPZ_cjs.a("grid gap-2",o===1&&"grid-cols-1",o===2&&"grid-cols-2",o===3&&"grid-cols-3",o===4&&"grid-cols-4",b,r?.base),id:h,children:l?.length?l.map(e=>jsxRuntime.jsx(chunkQNRAGVW4_cjs.a,{classNames:r?.buttonCheckbox,checked:t.includes(e.value),onCheckedChange:s=>u(e.value,s),size:n.size,...n,children:e.label},e.value)):i})};exports.a=m;//# sourceMappingURL=chunk-YM3NQKVL.cjs.map
2
+ //# sourceMappingURL=chunk-YM3NQKVL.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/v2/checkbox-group/checkbox-group.tsx"],"names":["CheckboxGroup","id","children","className","classNames","columns","value","onValueChange","items","props","handleToggle","optionValue","checked","newValues","v","jsx","cn","option","ButtonCheckbox"],"mappings":"6JAsBO,IAAMA,CAAAA,CAAgB,CAAC,CAC5B,EAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CAAW,IAAA,CACX,SAAA,CAAAC,CAAAA,CACA,WAAAC,CAAAA,CAAa,EAAC,CACd,OAAA,CAAAC,CAAAA,CAAU,CAAA,CACV,KAAA,CAAAC,CAAAA,CACA,aAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CAAQ,EAAC,CACT,GAAGC,CACL,CAAA,GAA0B,CACxB,IAAMC,CAAAA,CAAe,CAACC,CAAAA,CAAqBC,CAAAA,GAAqB,CAC9D,IAAMC,CAAAA,CAAYD,CAAAA,CAAU,CAAC,GAAGN,CAAAA,CAAOK,CAAW,CAAA,CAAIL,CAAAA,CAAM,MAAA,CAAQQ,CAAAA,EAAMA,CAAAA,GAAMH,CAAW,CAAA,CAC3FJ,CAAAA,CAAcM,CAAS,EACzB,CAAA,CAEA,OACEE,cAAAA,CAAC,KAAA,CAAA,CACC,UAAWC,mBAAAA,CACT,YAAA,CACAX,CAAAA,GAAY,CAAA,EAAK,aAAA,CACjBA,CAAAA,GAAY,CAAA,EAAK,aAAA,CACjBA,CAAAA,GAAY,CAAA,EAAK,aAAA,CACjBA,CAAAA,GAAY,CAAA,EAAK,aAAA,CACjBF,EACAC,CAAAA,EAAY,IACd,CAAA,CACA,EAAA,CAAIH,CAAAA,CAEH,QAAA,CAAAO,CAAAA,EAAO,MAAA,CACJA,CAAAA,CAAM,GAAA,CAAKS,CAAAA,EACTF,cAAAA,CAACG,mBAAAA,CAAA,CACC,WAAYd,CAAAA,EAAY,cAAA,CAExB,OAAA,CAASE,CAAAA,CAAM,QAAA,CAASW,CAAAA,CAAO,KAAK,CAAA,CACpC,eAAA,CAAkBL,CAAAA,EAAqBF,CAAAA,CAAaO,CAAAA,CAAO,KAAA,CAAOL,CAAO,CAAA,CACzE,IAAA,CAAMH,CAAAA,CAAM,IAAA,CACX,GAAGA,CAAAA,CAEH,QAAA,CAAAQ,CAAAA,CAAO,KAAA,CAAA,CANHA,CAAAA,CAAO,KAOd,CACD,CAAA,CACDf,CAAAA,CACN,CAEJ","file":"chunk-SC4FK5N3.cjs","sourcesContent":["import type { ComponentProps, PropsWithChildren } from 'react';\nimport { cn } from '@/lib/utils';\nimport { ButtonCheckbox, type ButtonCheckboxSlots } from '../checkbox/button-checkbox';\nimport type { Slots } from '../types';\n\nexport type CheckboxGroupSlots = Slots & {\n classNames?: {\n buttonCheckbox?: ButtonCheckboxSlots['classNames'];\n };\n};\n\nexport type CheckboxGroupProps = Omit<\n ComponentProps<typeof ButtonCheckbox>,\n 'classNames' | 'value'\n> & {\n columns?: 1 | 2 | 3 | 4;\n onValueChange: (value: string[]) => void;\n items?: { label: string; value: string }[];\n value: string[];\n} & CheckboxGroupSlots &\n PropsWithChildren;\n\nexport const CheckboxGroup = ({\n id,\n children = null,\n className,\n classNames = {},\n columns = 2,\n value,\n onValueChange,\n items = [],\n ...props\n}: CheckboxGroupProps) => {\n const handleToggle = (optionValue: string, checked: boolean) => {\n const newValues = checked ? [...value, optionValue] : value.filter((v) => v !== optionValue);\n onValueChange(newValues);\n };\n\n return (\n <div\n className={cn(\n 'grid gap-2',\n columns === 1 && 'grid-cols-1',\n columns === 2 && 'grid-cols-2',\n columns === 3 && 'grid-cols-3',\n columns === 4 && 'grid-cols-4',\n className,\n classNames?.base,\n )}\n id={id}\n >\n {items?.length\n ? items.map((option) => (\n <ButtonCheckbox\n classNames={classNames?.buttonCheckbox}\n key={option.value}\n checked={value.includes(option.value)}\n onCheckedChange={(checked: boolean) => handleToggle(option.value, checked)}\n size={props.size}\n {...props}\n >\n {option.label}\n </ButtonCheckbox>\n ))\n : children}\n </div>\n );\n};\n"]}
1
+ {"version":3,"sources":["../src/v2/checkbox-group/checkbox-group.tsx"],"names":["CheckboxGroup","id","children","className","classNames","columns","value","onValueChange","items","props","handleToggle","optionValue","checked","newValues","v","jsx","cn","option","ButtonCheckbox"],"mappings":"6JAsBO,IAAMA,CAAAA,CAAgB,CAAC,CAC5B,EAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,CAAAA,CAAW,IAAA,CACX,SAAA,CAAAC,CAAAA,CACA,WAAAC,CAAAA,CAAa,EAAC,CACd,OAAA,CAAAC,CAAAA,CAAU,CAAA,CACV,KAAA,CAAAC,CAAAA,CACA,aAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CAAQ,EAAC,CACT,GAAGC,CACL,CAAA,GAA0B,CACxB,IAAMC,CAAAA,CAAe,CAACC,CAAAA,CAAqBC,CAAAA,GAAqB,CAC9D,IAAMC,CAAAA,CAAYD,CAAAA,CAAU,CAAC,GAAGN,CAAAA,CAAOK,CAAW,CAAA,CAAIL,CAAAA,CAAM,MAAA,CAAQQ,CAAAA,EAAMA,CAAAA,GAAMH,CAAW,CAAA,CAC3FJ,CAAAA,CAAcM,CAAS,EACzB,CAAA,CAEA,OACEE,cAAAA,CAAC,KAAA,CAAA,CACC,UAAWC,mBAAAA,CACT,YAAA,CACAX,CAAAA,GAAY,CAAA,EAAK,aAAA,CACjBA,CAAAA,GAAY,CAAA,EAAK,aAAA,CACjBA,CAAAA,GAAY,CAAA,EAAK,aAAA,CACjBA,CAAAA,GAAY,CAAA,EAAK,aAAA,CACjBF,EACAC,CAAAA,EAAY,IACd,CAAA,CACA,EAAA,CAAIH,CAAAA,CAEH,QAAA,CAAAO,CAAAA,EAAO,MAAA,CACJA,CAAAA,CAAM,GAAA,CAAKS,CAAAA,EACTF,cAAAA,CAACG,mBAAAA,CAAA,CACC,WAAYd,CAAAA,EAAY,cAAA,CAExB,OAAA,CAASE,CAAAA,CAAM,QAAA,CAASW,CAAAA,CAAO,KAAK,CAAA,CACpC,eAAA,CAAkBL,CAAAA,EAAqBF,CAAAA,CAAaO,CAAAA,CAAO,KAAA,CAAOL,CAAO,CAAA,CACzE,IAAA,CAAMH,CAAAA,CAAM,IAAA,CACX,GAAGA,CAAAA,CAEH,QAAA,CAAAQ,CAAAA,CAAO,KAAA,CAAA,CANHA,CAAAA,CAAO,KAOd,CACD,CAAA,CACDf,CAAAA,CACN,CAEJ","file":"chunk-YM3NQKVL.cjs","sourcesContent":["import type { ComponentProps, PropsWithChildren } from 'react';\nimport { cn } from '@/lib/utils';\nimport { ButtonCheckbox, type ButtonCheckboxSlots } from '../checkbox/button-checkbox';\nimport type { Slots } from '../types';\n\nexport type CheckboxGroupSlots = Slots & {\n classNames?: {\n buttonCheckbox?: ButtonCheckboxSlots['classNames'];\n };\n};\n\nexport type CheckboxGroupProps = Omit<\n ComponentProps<typeof ButtonCheckbox>,\n 'classNames' | 'value'\n> & {\n columns?: 1 | 2 | 3 | 4;\n onValueChange: (value: string[]) => void;\n items?: { label: string; value: string }[];\n value: string[];\n} & CheckboxGroupSlots &\n PropsWithChildren;\n\nexport const CheckboxGroup = ({\n id,\n children = null,\n className,\n classNames = {},\n columns = 2,\n value,\n onValueChange,\n items = [],\n ...props\n}: CheckboxGroupProps) => {\n const handleToggle = (optionValue: string, checked: boolean) => {\n const newValues = checked ? [...value, optionValue] : value.filter((v) => v !== optionValue);\n onValueChange(newValues);\n };\n\n return (\n <div\n className={cn(\n 'grid gap-2',\n columns === 1 && 'grid-cols-1',\n columns === 2 && 'grid-cols-2',\n columns === 3 && 'grid-cols-3',\n columns === 4 && 'grid-cols-4',\n className,\n classNames?.base,\n )}\n id={id}\n >\n {items?.length\n ? items.map((option) => (\n <ButtonCheckbox\n classNames={classNames?.buttonCheckbox}\n key={option.value}\n checked={value.includes(option.value)}\n onCheckedChange={(checked: boolean) => handleToggle(option.value, checked)}\n size={props.size}\n {...props}\n >\n {option.label}\n </ButtonCheckbox>\n ))\n : children}\n </div>\n );\n};\n"]}
@@ -1,2 +1,2 @@
1
- import {b as b$1}from'./chunk-SP2L5FI7.js';import {b as b$2}from'./chunk-JDBEGLQW.js';import {a}from'./chunk-YTIIAU4W.js';import*as b from'react';import {jsx,jsxs}from'react/jsx-runtime';var x=b.forwardRef(({id:l,children:n,className:d,classNames:e={},size:h="default",nestedSection:a$1=null,...o},p)=>jsx(b$1,{variant:"outline",disabled:o.disabled,size:h,asChild:true,className:a(d,e?.base,!!a$1&&"cursor-default"),children:jsxs("div",{ref:p,className:a("h-auto flex-col items-stretch justify-start px-0! select-none",o.checked?"border-dark-green":"border-gray-400",o.disabled&&"text-secondary-foreground hover:text-secondary-foreground border-gray-300 hover:border-gray-300 hover:bg-white",e?.labelComponent),children:[jsxs("label",{htmlFor:l,className:a("flex min-h-12 w-full cursor-pointer items-center gap-2 px-4 py-3 leading-tight whitespace-normal",o.disabled&&"hover:cursor-not-allowed",e?.checkboxWrapper),children:[jsx(b$2,{id:l,...o,variant:"button",classNames:e?.checkbox}),e?.labelText?jsx("span",{className:a(e?.labelText),children:n}):n]}),a$1&&jsx("div",{className:a("mt-1 px-3 pb-3 font-normal",e?.nestedSection),children:a$1})]})}));x.displayName="ButtonCheckbox";export{x as a};//# sourceMappingURL=chunk-R2R3QR2N.js.map
2
- //# sourceMappingURL=chunk-R2R3QR2N.js.map
1
+ import {b as b$1}from'./chunk-6ZOLJV4E.js';import {b as b$2}from'./chunk-JDBEGLQW.js';import {a}from'./chunk-YTIIAU4W.js';import*as b from'react';import {jsx,jsxs}from'react/jsx-runtime';var x=b.forwardRef(({id:l,children:n,className:d,classNames:e={},size:h="default",nestedSection:a$1=null,...o},p)=>jsx(b$1,{variant:"outline",disabled:o.disabled,size:h,asChild:true,className:a(d,e?.base,!!a$1&&"cursor-default"),children:jsxs("div",{ref:p,className:a("h-auto flex-col items-stretch justify-start px-0! select-none",o.checked?"border-dark-green":"border-gray-400",o.disabled&&"text-secondary-foreground hover:text-secondary-foreground border-gray-300 hover:border-gray-300 hover:bg-white",e?.labelComponent),children:[jsxs("label",{htmlFor:l,className:a("flex min-h-12 w-full cursor-pointer items-center gap-2 px-4 py-3 leading-tight whitespace-normal",o.disabled&&"hover:cursor-not-allowed",e?.checkboxWrapper),children:[jsx(b$2,{id:l,...o,variant:"button",classNames:e?.checkbox}),e?.labelText?jsx("span",{className:a(e?.labelText),children:n}):n]}),a$1&&jsx("div",{className:a("mt-1 px-3 pb-3 font-normal",e?.nestedSection),children:a$1})]})}));x.displayName="ButtonCheckbox";export{x as a};//# sourceMappingURL=chunk-YNMPPS4U.js.map
2
+ //# sourceMappingURL=chunk-YNMPPS4U.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/v2/checkbox/button-checkbox.tsx"],"names":["Butt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,MAAA,CAAA,CAAK,SAAA,CAAWE,CAAAA,CAAGP,CAAAA,EAAY,SAAS,CAAA,CAAI,QAAA,CAAAF,CAAAA,CAAS,CAAA,CAEtDA,GAEJ,CAAA,CACCI,GAAAA,EACCG,GAAAA,CAAC,KAAA,CAAA,CAAI,SAAA,CAAWE,CAAAA,CAAG,4BAAA,CAA8BP,CAAAA,EAAY,aAAa,CAAA,CACvE,QAAA,CAAAE,GAAAA,CACH,CAAA,CAAA,CAEJ,CAAA,CACF,CAGN,EAEAN,EAAe,WAAA,CAAc,gBAAA","file":"chunk-R2R3QR2N.js","sourcesContent":["import * as React from 'react';\nimport { cn } from '@/lib/utils';\nimport { Button, type ButtonSize } from '@/v2/button/button';\nimport { Checkbox, type CheckboxProps } from '@/v2/checkbox/checkbox';\nimport type { Slots } from '../types';\n\nexport type ButtonCheckboxSlots = Slots & {\n classNames?: {\n checkboxWrapper?: string;\n labelComponent?: string;\n labelText?: string;\n nestedSection?: string;\n checkbox?: CheckboxProps['classNames'];\n };\n};\n\nexport const ButtonCheckbox = React.forwardRef<\n HTMLDivElement,\n ButtonCheckboxSlots &\n CheckboxProps & { nestedSection?: React.ReactNode | null; size?: ButtonSize }\n>(\n (\n { id, children, className, classNames = {}, size = 'default', nestedSection = null, ...props },\n ref,\n ) => {\n return (\n <Button\n variant=\"outline\"\n disabled={props.disabled}\n size={size}\n asChild\n className={cn(className, classNames?.base, !!nestedSection && 'cursor-default')}\n >\n <div\n ref={ref}\n className={cn(\n 'h-auto flex-col items-stretch justify-start px-0! select-none',\n props.checked ? 'border-dark-green' : 'border-gray-400',\n props.disabled &&\n 'text-secondary-foreground hover:text-secondary-foreground border-gray-300 hover:border-gray-300 hover:bg-white',\n classNames?.labelComponent,\n )}\n >\n <label\n htmlFor={id}\n className={cn(\n 'flex min-h-12 w-full cursor-pointer items-center gap-2 px-4 py-3 leading-tight whitespace-normal',\n props.disabled && 'hover:cursor-not-allowed',\n classNames?.checkboxWrapper,\n )}\n >\n <Checkbox id={id} {...props} variant=\"button\" classNames={classNames?.checkbox} />\n {classNames?.labelText ? (\n <span className={cn(classNames?.labelText)}>{children}</span>\n ) : (\n children\n )}\n </label>\n {nestedSection && (\n <div className={cn('mt-1 px-3 pb-3 font-normal', classNames?.nestedSection)}>\n {nestedSection}\n </div>\n )}\n </div>\n </Button>\n );\n },\n);\n\nButtonCheckbox.displayName = 'ButtonCheckbox';\n"]}
1
+ {"version":3,"sources":["../src/v2/checkbox/button-checkbox.tsx"],"names":["ButtonCheckbox","id","children","className","classNames","size","nestedSection","props","ref","jsx","Button","cn","jsxs","Checkbox"],"mappings":"2LAgBO,IAAMA,CAAAA,CAAuB,CAAA,CAAA,UAAA,CAKlC,CACE,CAAE,EAAA,CAAAC,CAAAA,CAAI,QAAA,CAAAC,CAAAA,CAAU,SAAA,CAAAC,CAAAA,CAAW,UAAA,CAAAC,CAAAA,CAAa,EAAC,CAAG,IAAA,CAAAC,CAAAA,CAAO,SAAA,CAAW,aAAA,CAAAC,GAAAA,CAAgB,KAAM,GAAGC,CAAM,CAAA,CAC7FC,CAAAA,GAGEC,GAAAA,CAACC,GAAAA,CAAA,CACC,OAAA,CAAQ,SAAA,CACR,QAAA,CAAUH,CAAAA,CAAM,QAAA,CAChB,IAAA,CAAMF,CAAAA,CACN,OAAA,CAAO,IAAA,CACP,UAAWM,CAAAA,CAAGR,CAAAA,CAAWC,CAAAA,EAAY,IAAA,CAAM,CAAC,CAACE,GAAAA,EAAiB,gBAAgB,CAAA,CAE9E,QAAA,CAAAM,IAAAA,CAAC,KAAA,CAAA,CACC,GAAA,CAAKJ,CAAAA,CACL,SAAA,CAAWG,CAAAA,CACT,gEACAJ,CAAAA,CAAM,OAAA,CAAU,mBAAA,CAAsB,iBAAA,CACtCA,CAAAA,CAAM,QAAA,EACJ,gHAAA,CACFH,CAAAA,EAAY,cACd,CAAA,CAEA,QAAA,CAAA,CAAAQ,IAAAA,CAAC,OAAA,CAAA,CACC,OAAA,CAASX,CAAAA,CACT,SAAA,CAAWU,EACT,kGAAA,CACAJ,CAAAA,CAAM,QAAA,EAAY,0BAAA,CAClBH,CAAAA,EAAY,eACd,CAAA,CAEA,QAAA,CAAA,CAAAK,GAAAA,CAACI,GAAAA,CAAA,CAAS,EAAA,CAAIZ,CAAAA,CAAK,GAAGM,CAAAA,CAAO,OAAA,CAAQ,SAAS,UAAA,CAAYH,CAAAA,EAAY,QAAA,CAAU,CAAA,CAC/EA,CAAAA,EAAY,SAAA,CACXK,GAAAA,CAAC,MAAA,CAAA,CAAK,SAAA,CAAWE,CAAAA,CAAGP,CAAAA,EAAY,SAAS,CAAA,CAAI,QAAA,CAAAF,CAAAA,CAAS,CAAA,CAEtDA,GAEJ,CAAA,CACCI,GAAAA,EACCG,GAAAA,CAAC,KAAA,CAAA,CAAI,SAAA,CAAWE,CAAAA,CAAG,4BAAA,CAA8BP,CAAAA,EAAY,aAAa,CAAA,CACvE,QAAA,CAAAE,GAAAA,CACH,CAAA,CAAA,CAEJ,CAAA,CACF,CAGN,EAEAN,EAAe,WAAA,CAAc,gBAAA","file":"chunk-YNMPPS4U.js","sourcesContent":["import * as React from 'react';\nimport { cn } from '@/lib/utils';\nimport { Button, type ButtonSize } from '@/v2/button/button';\nimport { Checkbox, type CheckboxProps } from '@/v2/checkbox/checkbox';\nimport type { Slots } from '../types';\n\nexport type ButtonCheckboxSlots = Slots & {\n classNames?: {\n checkboxWrapper?: string;\n labelComponent?: string;\n labelText?: string;\n nestedSection?: string;\n checkbox?: CheckboxProps['classNames'];\n };\n};\n\nexport const ButtonCheckbox = React.forwardRef<\n HTMLDivElement,\n ButtonCheckboxSlots &\n CheckboxProps & { nestedSection?: React.ReactNode | null; size?: ButtonSize }\n>(\n (\n { id, children, className, classNames = {}, size = 'default', nestedSection = null, ...props },\n ref,\n ) => {\n return (\n <Button\n variant=\"outline\"\n disabled={props.disabled}\n size={size}\n asChild\n className={cn(className, classNames?.base, !!nestedSection && 'cursor-default')}\n >\n <div\n ref={ref}\n className={cn(\n 'h-auto flex-col items-stretch justify-start px-0! select-none',\n props.checked ? 'border-dark-green' : 'border-gray-400',\n props.disabled &&\n 'text-secondary-foreground hover:text-secondary-foreground border-gray-300 hover:border-gray-300 hover:bg-white',\n classNames?.labelComponent,\n )}\n >\n <label\n htmlFor={id}\n className={cn(\n 'flex min-h-12 w-full cursor-pointer items-center gap-2 px-4 py-3 leading-tight whitespace-normal',\n props.disabled && 'hover:cursor-not-allowed',\n classNames?.checkboxWrapper,\n )}\n >\n <Checkbox id={id} {...props} variant=\"button\" classNames={classNames?.checkbox} />\n {classNames?.labelText ? (\n <span className={cn(classNames?.labelText)}>{children}</span>\n ) : (\n children\n )}\n </label>\n {nestedSection && (\n <div className={cn('mt-1 px-3 pb-3 font-normal', classNames?.nestedSection)}>\n {nestedSection}\n </div>\n )}\n </div>\n </Button>\n );\n },\n);\n\nButtonCheckbox.displayName = 'ButtonCheckbox';\n"]}
@@ -1,2 +1,2 @@
1
- import {a as a$3}from'./chunk-4GCD4SP5.js';import {a as a$4}from'./chunk-274XPO4S.js';import {a as a$5}from'./chunk-XJ7ZDJZG.js';import {a as a$8}from'./chunk-ZF7TZTE3.js';import {a as a$7}from'./chunk-44OJTSLO.js';import {a as a$2}from'./chunk-HDSZKGQO.js';import {a as a$1}from'./chunk-Q27GDY4Y.js';import {a}from'./chunk-7GJG2HUA.js';import {a as a$9}from'./chunk-OYN4D5J3.js';import {a as a$6}from'./chunk-STIYYCSL.js';import {a as a$a}from'./chunk-YTIIAU4W.js';import {forwardRef,useImperativeHandle,useCallback}from'react';import {jsxs,jsx}from'react/jsx-runtime';var ae=forwardRef((C,P)=>{let{id:x,value:s,onChange:D,placeholder:F,defaultOptions:T=[],options:K=[],delay:V,onSearch:n,triggerSearchOnOpen:W,loading:B=false,loadingIndicator:E,emptyIndicator:H,maxSelected:k=0,onMaxSelected:q,hidePlaceholderWhenSelected:L=true,disabled:a$b,className:Y,classNames:z,badgeWrapperClassName:A,badgeClassName:G,getBadgeClassName:J=()=>"",selectFirstItem:Q=true,commandProps:e,inputProps:U,persistInputOnSelect:X=false,persistInputOnBlur:Z=false}=C,{inputRef:t,commandRef:c,onSearchRef:_,scrollbarRef:u,prevExternalOptionsRef:$}=a({onSearch:n}),{uniqueId:p,open:o,setOpen:m,selected:r,setSelected:l,options:j,setOptions:ee,inputSearchValue:te,setInputSearchValue:d,debouncedSearchTerm:re}=a$1({id:x,value:s,defaultOptions:T,delay:V}),{toggleOption:f,handleKeyDown:oe}=a$2({open:o,selected:r,maxSelected:k,onChange:D,onMaxSelected:q,setInputSearchValue:d,commandRef:c,inputRef:t,setSelected:l,setOpen:m,persistInputOnSelect:X});a$3({debouncedSearchTerm:re,open:o,onSearchRef:_,triggerSearchOnOpen:W}),a$4({externalOptions:K,setOptions:ee,prevExternalOptionsRef:$}),a$5({value:s,setSelected:l}),useImperativeHandle(P,()=>({selectedValue:[...r],input:t.current,focus:()=>t?.current?.focus(),reset:()=>l([])}),[r,t,l]);let le=useCallback(()=>{if(e?.filter)return e.filter},[e?.filter]);return jsxs(a$6,{ref:c,...e,onKeyDown:S=>{oe(S),e?.onKeyDown?.(S);},className:a$a("h-auto overflow-visible bg-transparent",e?.className),shouldFilter:e?.shouldFilter!==void 0?e.shouldFilter:!n,filter:le(),children:[jsx(a$7,{open:o,disabled:a$b,inputRef:t,selected:r,uniqueId:p,className:Y,children:jsx(a$8,{selected:r,scrollbarRef:u,toggleOption:f,inputProps:U,inputRef:t,open:o,setOpen:m,placeholder:F,hidePlaceholderWhenSelected:L,disabled:a$b,classNames:z,badgeWrapperClassName:A,badgeClassName:G,getBadgeClassName:J,inputSearchValue:te,setInputSearchValue:d,persistInputOnBlur:Z})}),jsx(a$9,{uniqueId:p,scrollbarRef:u,open:o,loading:B,options:j,selected:r,toggleOption:f,onSearch:n,inputRef:t,emptyIndicator:H,loadingIndicator:E,selectFirstItem:Q})]})});ae.displayName="MultiSelect";export{ae as a};//# sourceMappingURL=chunk-EJBXIBM4.js.map
2
- //# sourceMappingURL=chunk-EJBXIBM4.js.map
1
+ import {a as a$9}from'./chunk-IH63GMEB.js';import {a as a$8}from'./chunk-UZGCNEY6.js';import {a as a$7}from'./chunk-44OJTSLO.js';import {a}from'./chunk-7GJG2HUA.js';import {a as a$3}from'./chunk-4GCD4SP5.js';import {a as a$4}from'./chunk-274XPO4S.js';import {a as a$5}from'./chunk-XJ7ZDJZG.js';import {a as a$2}from'./chunk-HDSZKGQO.js';import {a as a$1}from'./chunk-Q27GDY4Y.js';import {a as a$6}from'./chunk-NUYCR4PO.js';import {a as a$a}from'./chunk-YTIIAU4W.js';import {forwardRef,useImperativeHandle,useCallback}from'react';import {jsxs,jsx}from'react/jsx-runtime';var ae=forwardRef((C,P)=>{let{id:x,value:s,onChange:D,placeholder:F,defaultOptions:T=[],options:K=[],delay:V,onSearch:n,triggerSearchOnOpen:W,loading:B=false,loadingIndicator:E,emptyIndicator:H,maxSelected:k=0,onMaxSelected:q,hidePlaceholderWhenSelected:L=true,disabled:a$b,className:Y,classNames:z,badgeWrapperClassName:A,badgeClassName:G,getBadgeClassName:J=()=>"",selectFirstItem:Q=true,commandProps:e,inputProps:U,persistInputOnSelect:X=false,persistInputOnBlur:Z=false}=C,{inputRef:t,commandRef:c,onSearchRef:_,scrollbarRef:u,prevExternalOptionsRef:$}=a({onSearch:n}),{uniqueId:p,open:o,setOpen:m,selected:r,setSelected:l,options:j,setOptions:ee,inputSearchValue:te,setInputSearchValue:d,debouncedSearchTerm:re}=a$1({id:x,value:s,defaultOptions:T,delay:V}),{toggleOption:f,handleKeyDown:oe}=a$2({open:o,selected:r,maxSelected:k,onChange:D,onMaxSelected:q,setInputSearchValue:d,commandRef:c,inputRef:t,setSelected:l,setOpen:m,persistInputOnSelect:X});a$3({debouncedSearchTerm:re,open:o,onSearchRef:_,triggerSearchOnOpen:W}),a$4({externalOptions:K,setOptions:ee,prevExternalOptionsRef:$}),a$5({value:s,setSelected:l}),useImperativeHandle(P,()=>({selectedValue:[...r],input:t.current,focus:()=>t?.current?.focus(),reset:()=>l([])}),[r,t,l]);let le=useCallback(()=>{if(e?.filter)return e.filter},[e?.filter]);return jsxs(a$6,{ref:c,...e,onKeyDown:S=>{oe(S),e?.onKeyDown?.(S);},className:a$a("h-auto overflow-visible bg-transparent",e?.className),shouldFilter:e?.shouldFilter!==void 0?e.shouldFilter:!n,filter:le(),children:[jsx(a$7,{open:o,disabled:a$b,inputRef:t,selected:r,uniqueId:p,className:Y,children:jsx(a$8,{selected:r,scrollbarRef:u,toggleOption:f,inputProps:U,inputRef:t,open:o,setOpen:m,placeholder:F,hidePlaceholderWhenSelected:L,disabled:a$b,classNames:z,badgeWrapperClassName:A,badgeClassName:G,getBadgeClassName:J,inputSearchValue:te,setInputSearchValue:d,persistInputOnBlur:Z})}),jsx(a$9,{uniqueId:p,scrollbarRef:u,open:o,loading:B,options:j,selected:r,toggleOption:f,onSearch:n,inputRef:t,emptyIndicator:H,loadingIndicator:E,selectFirstItem:Q})]})});ae.displayName="MultiSelect";export{ae as a};//# sourceMappingURL=chunk-Z3HUGXO2.js.map
2
+ //# sourceMappingURL=chunk-Z3HUGXO2.js.map