@xploreu/components 0.4.2 → 0.4.4

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 (333) hide show
  1. package/dist/{chunk-ISGXRZLJ.js → chunk-746IQSMF.js} +2 -2
  2. package/dist/{chunk-ISGXRZLJ.js.map → chunk-746IQSMF.js.map} +1 -1
  3. package/dist/chunk-DXI32G2S.js +2 -0
  4. package/dist/chunk-DXI32G2S.js.map +1 -0
  5. package/dist/chunk-JH6RZ3QH.js +2 -0
  6. package/dist/chunk-JH6RZ3QH.js.map +1 -0
  7. package/dist/{chunk-7FRAZHPK.js → chunk-NG3NFI2B.js} +2 -2
  8. package/dist/{chunk-7FRAZHPK.js.map → chunk-NG3NFI2B.js.map} +1 -1
  9. package/dist/chunk-NGSCUYDU.js +2 -0
  10. package/dist/chunk-NGSCUYDU.js.map +1 -0
  11. package/dist/chunk-NTQ2FXS7.js +2 -0
  12. package/dist/chunk-NTQ2FXS7.js.map +1 -0
  13. package/dist/{chunk-J6UNQSKZ.js → chunk-PJYKUR4F.js} +2 -2
  14. package/dist/{chunk-J6UNQSKZ.js.map → chunk-PJYKUR4F.js.map} +1 -1
  15. package/dist/{chunk-Y4HXGKZD.js → chunk-VE5ZAJ35.js} +2 -2
  16. package/dist/{chunk-Y4HXGKZD.js.map → chunk-VE5ZAJ35.js.map} +1 -1
  17. package/dist/chunk-Y6JASO6W.js +2 -0
  18. package/dist/chunk-Y6JASO6W.js.map +1 -0
  19. package/dist/composites/combobox-chip-outside.d.ts +4 -4
  20. package/dist/composites/combobox-chip-outside.js +1 -1
  21. package/dist/composites/index.d.ts +57 -12
  22. package/dist/composites/index.js +1 -1
  23. package/dist/composites/index.js.map +1 -1
  24. package/dist/composites/phone-input.d.ts +3 -3
  25. package/dist/composites/phone-input.js +1 -1
  26. package/dist/effects/auto-height.d.ts +4 -4
  27. package/dist/effects/highlight.d.ts +19 -19
  28. package/dist/form/form-input.d.ts +5 -5
  29. package/dist/form/form-input.js +1 -1
  30. package/dist/form/form-textarea.d.ts +4 -4
  31. package/dist/form/form.d.ts +8 -8
  32. package/dist/form/index.js +1 -1
  33. package/dist/icons/about-me-icon.d.ts +2 -2
  34. package/dist/icons/academic-cap-dual-tone-icon.d.ts +2 -2
  35. package/dist/icons/academic-cap-icon.d.ts +2 -2
  36. package/dist/icons/activity-on-tab-profile-icon.d.ts +2 -2
  37. package/dist/icons/add-connect-icon.d.ts +2 -2
  38. package/dist/icons/alert-jobs-icon.d.ts +2 -2
  39. package/dist/icons/applicants-icon.d.ts +2 -2
  40. package/dist/icons/application-status-icon.d.ts +2 -2
  41. package/dist/icons/archive-message-icon.d.ts +2 -2
  42. package/dist/icons/arrow-go-to-location-icon.d.ts +2 -2
  43. package/dist/icons/bag-icon.d.ts +2 -2
  44. package/dist/icons/bag2-icon.d.ts +2 -2
  45. package/dist/icons/bag3-icon.d.ts +2 -2
  46. package/dist/icons/bell-icon.d.ts +2 -2
  47. package/dist/icons/birthday-date-icon.d.ts +2 -2
  48. package/dist/icons/book-dual-tone-icon.d.ts +2 -2
  49. package/dist/icons/book-open.d.ts +2 -2
  50. package/dist/icons/bookmark-filled-icon.d.ts +2 -2
  51. package/dist/icons/bookmark-icon.d.ts +2 -2
  52. package/dist/icons/brief-dual-tone-icon.d.ts +2 -2
  53. package/dist/icons/brief-minimalistic-dual-tone-icon.d.ts +2 -2
  54. package/dist/icons/brief-minimalistic-icon.d.ts +2 -2
  55. package/dist/icons/building-dual-tone-icon.d.ts +2 -2
  56. package/dist/icons/building-icon.d.ts +2 -2
  57. package/dist/icons/building-infrastructure-icon.d.ts +2 -2
  58. package/dist/icons/calendar-icon.d.ts +2 -2
  59. package/dist/icons/case-icon.d.ts +2 -2
  60. package/dist/icons/certificate-icon.d.ts +2 -2
  61. package/dist/icons/certificate-on-profile-icon.d.ts +2 -2
  62. package/dist/icons/chart-square-icon.d.ts +2 -2
  63. package/dist/icons/chat-round-dots-icon.d.ts +2 -2
  64. package/dist/icons/checkbox-base-icon.d.ts +2 -2
  65. package/dist/icons/checkbox-new-icon.d.ts +2 -2
  66. package/dist/icons/checkbox-select-icon.d.ts +2 -2
  67. package/dist/icons/checklist-icon.d.ts +2 -2
  68. package/dist/icons/checklist-minimalist-icon.d.ts +2 -2
  69. package/dist/icons/circle-quarter-icon.d.ts +2 -2
  70. package/dist/icons/city-icon.d.ts +2 -2
  71. package/dist/icons/clear-icon.d.ts +2 -2
  72. package/dist/icons/clipboard-icon.d.ts +2 -2
  73. package/dist/icons/clock-min.d.ts +2 -2
  74. package/dist/icons/clock-plus.d.ts +2 -2
  75. package/dist/icons/cloud-upload-icon.d.ts +2 -2
  76. package/dist/icons/comment-icon.d.ts +2 -2
  77. package/dist/icons/company-industry-icon.d.ts +2 -2
  78. package/dist/icons/company-on-job-description-icon.d.ts +2 -2
  79. package/dist/icons/company-on-job-preferences-icon.d.ts +2 -2
  80. package/dist/icons/company-post-icon.d.ts +2 -2
  81. package/dist/icons/connection-company-icon.d.ts +2 -2
  82. package/dist/icons/connections-icon.d.ts +2 -2
  83. package/dist/icons/contact-on-settings-icon.d.ts +2 -2
  84. package/dist/icons/copy-icon.d.ts +2 -2
  85. package/dist/icons/course-icon-search-icon.d.ts +2 -2
  86. package/dist/icons/create-free-jobs-with-ai-icon.d.ts +2 -2
  87. package/dist/icons/create-group-message-icon.d.ts +2 -2
  88. package/dist/icons/create-job-icon.d.ts +2 -2
  89. package/dist/icons/delete-icon.d.ts +2 -2
  90. package/dist/icons/document-add-icon.d.ts +2 -2
  91. package/dist/icons/document-notes-icon.d.ts +2 -2
  92. package/dist/icons/dots-icon.d.ts +2 -2
  93. package/dist/icons/download-cv-icon.d.ts +2 -2
  94. package/dist/icons/download-minimalistic-icon.d.ts +2 -2
  95. package/dist/icons/drive-db.d.ts +2 -2
  96. package/dist/icons/duration-of-work-icon.d.ts +2 -2
  97. package/dist/icons/duration-open-to-offer-icon.d.ts +2 -2
  98. package/dist/icons/edit-icon.d.ts +2 -2
  99. package/dist/icons/edit-on-button-profile-icon.d.ts +2 -2
  100. package/dist/icons/edit-on-section-profile-icon.d.ts +2 -2
  101. package/dist/icons/education-icon.d.ts +2 -2
  102. package/dist/icons/education-on-card-icon.d.ts +2 -2
  103. package/dist/icons/employment-type-on-job-preferences-icon.d.ts +2 -2
  104. package/dist/icons/evaluation-icon.d.ts +2 -2
  105. package/dist/icons/expected-salary-on-job-preferences-icon.d.ts +2 -2
  106. package/dist/icons/experience-icon.d.ts +2 -2
  107. package/dist/icons/female-on-summary-profile-icon.d.ts +2 -2
  108. package/dist/icons/file-default-icon.d.ts +2 -2
  109. package/dist/icons/file-doc-icon.d.ts +2 -2
  110. package/dist/icons/file-docx-icon.d.ts +2 -2
  111. package/dist/icons/file-jpg-icon.d.ts +2 -2
  112. package/dist/icons/file-mkv-icon.d.ts +2 -2
  113. package/dist/icons/file-mov-icon.d.ts +2 -2
  114. package/dist/icons/file-mp4-icon.d.ts +2 -2
  115. package/dist/icons/file-pdf-icon.d.ts +2 -2
  116. package/dist/icons/file-png-icon.d.ts +2 -2
  117. package/dist/icons/file-ppt-icon.d.ts +2 -2
  118. package/dist/icons/file-text-icon.d.ts +2 -2
  119. package/dist/icons/file-video-icon.d.ts +2 -2
  120. package/dist/icons/fire-icon.d.ts +2 -2
  121. package/dist/icons/flag-icon.d.ts +2 -2
  122. package/dist/icons/folder-icon.d.ts +2 -2
  123. package/dist/icons/followers-on-connections-icon.d.ts +2 -2
  124. package/dist/icons/following-on-connections-icon.d.ts +2 -2
  125. package/dist/icons/forward-icon.d.ts +2 -2
  126. package/dist/icons/funnel-icon.d.ts +2 -2
  127. package/dist/icons/gallery-add-icon.d.ts +2 -2
  128. package/dist/icons/gallery-favorite-icon.d.ts +2 -2
  129. package/dist/icons/gallery-icon.d.ts +2 -2
  130. package/dist/icons/general-preference-on-settings-icon.d.ts +2 -2
  131. package/dist/icons/globe-dual-tone-icon.d.ts +2 -2
  132. package/dist/icons/hand-stars-icon.d.ts +2 -2
  133. package/dist/icons/hard-skill-on-profile-icon.d.ts +2 -2
  134. package/dist/icons/help-icon.d.ts +2 -2
  135. package/dist/icons/hidden-icon.d.ts +2 -2
  136. package/dist/icons/hide-passwords-icon.d.ts +2 -2
  137. package/dist/icons/hired-by-others-icon.d.ts +2 -2
  138. package/dist/icons/home-icon.d.ts +2 -2
  139. package/dist/icons/home-smile-icon.d.ts +2 -2
  140. package/dist/icons/home-table.d.ts +2 -2
  141. package/dist/icons/icon-component.d.ts +2 -2
  142. package/dist/icons/image-on-message-icon.d.ts +2 -2
  143. package/dist/icons/index.js +1 -1
  144. package/dist/icons/info-icon.d.ts +2 -2
  145. package/dist/icons/info-square-icon.d.ts +2 -2
  146. package/dist/icons/interested-of-industry-icon.d.ts +2 -2
  147. package/dist/icons/invitations-on-connections-icon.d.ts +2 -2
  148. package/dist/icons/job-description-icon.d.ts +2 -2
  149. package/dist/icons/job-preference-icon.d.ts +2 -2
  150. package/dist/icons/jobs-category-icon.d.ts +2 -2
  151. package/dist/icons/jobseeker-status-on-job-preferences-icon.d.ts +2 -2
  152. package/dist/icons/language-on-profile-icon.d.ts +2 -2
  153. package/dist/icons/layers-icon.d.ts +2 -2
  154. package/dist/icons/layout-icon.d.ts +2 -2
  155. package/dist/icons/like-filled-icon.d.ts +2 -2
  156. package/dist/icons/like-icon.d.ts +2 -2
  157. package/dist/icons/link-copy.d.ts +2 -2
  158. package/dist/icons/list-icon.d.ts +2 -2
  159. package/dist/icons/list-option-feedback-icon.d.ts +2 -2
  160. package/dist/icons/living-on-summary-profile-icon.d.ts +2 -2
  161. package/dist/icons/location-company-on-card-icon.d.ts +2 -2
  162. package/dist/icons/location-on-search-icon.d.ts +2 -2
  163. package/dist/icons/lock-icon.d.ts +2 -2
  164. package/dist/icons/logo-icon.d.ts +2 -2
  165. package/dist/icons/logout-icon.d.ts +2 -2
  166. package/dist/icons/lonceng-z-icon.d.ts +2 -2
  167. package/dist/icons/mail-icon.d.ts +2 -2
  168. package/dist/icons/mailbox-icon.d.ts +2 -2
  169. package/dist/icons/male-on-summary-profile-icon.d.ts +2 -2
  170. package/dist/icons/map-cluster-marker-icon.d.ts +2 -2
  171. package/dist/icons/map-marker-icon.d.ts +2 -2
  172. package/dist/icons/map-pin-icon.d.ts +2 -2
  173. package/dist/icons/map-pin-icon2.d.ts +2 -2
  174. package/dist/icons/map-pin2-icon.d.ts +2 -2
  175. package/dist/icons/mark-as-read-icon.d.ts +2 -2
  176. package/dist/icons/media-icon.d.ts +2 -2
  177. package/dist/icons/message-on-card-icon.d.ts +2 -2
  178. package/dist/icons/messages-icon.d.ts +2 -2
  179. package/dist/icons/mic-record-icon.d.ts +2 -2
  180. package/dist/icons/mini-sidebar-icon.d.ts +2 -2
  181. package/dist/icons/money-bill-icon.d.ts +2 -2
  182. package/dist/icons/mute-message-icon.d.ts +2 -2
  183. package/dist/icons/my-connecions-icon.d.ts +2 -2
  184. package/dist/icons/my-connections-on-tab-profile-icon.d.ts +2 -2
  185. package/dist/icons/my-cover-letter-icon.d.ts +2 -2
  186. package/dist/icons/my-dashboard-icon.d.ts +2 -2
  187. package/dist/icons/my-dashboards-icon.d.ts +2 -2
  188. package/dist/icons/my-drive-icon.d.ts +2 -2
  189. package/dist/icons/my-portofolio-icon.d.ts +2 -2
  190. package/dist/icons/my-resume-icon.d.ts +2 -2
  191. package/dist/icons/new-message-icon.d.ts +2 -2
  192. package/dist/icons/new-post-icon.d.ts +2 -2
  193. package/dist/icons/news-icon.d.ts +2 -2
  194. package/dist/icons/notification-icon.d.ts +2 -2
  195. package/dist/icons/notification-on-settings-icon.d.ts +2 -2
  196. package/dist/icons/offered-by-others-icon.d.ts +2 -2
  197. package/dist/icons/office-open-to-offer-icon.d.ts +2 -2
  198. package/dist/icons/office-opent-to-offer-section-icon.d.ts +2 -2
  199. package/dist/icons/open-another-page-icon.d.ts +2 -2
  200. package/dist/icons/open-preview-my-profile-icon.d.ts +2 -2
  201. package/dist/icons/open-to-offer-section-icon.d.ts +2 -2
  202. package/dist/icons/open-to-opportunities-icon.d.ts +2 -2
  203. package/dist/icons/other-job-for-you-icon.d.ts +2 -2
  204. package/dist/icons/other-job-from-this-company-icon.d.ts +2 -2
  205. package/dist/icons/passwords-icon.d.ts +2 -2
  206. package/dist/icons/pdf-on-apply-job-icon.d.ts +2 -2
  207. package/dist/icons/pen-new-square-icon.d.ts +2 -2
  208. package/dist/icons/people-you-may-know-icon.d.ts +2 -2
  209. package/dist/icons/people-your-company-icon.d.ts +2 -2
  210. package/dist/icons/phone-dual-tone-icon.d.ts +2 -2
  211. package/dist/icons/phone-icon.d.ts +2 -2
  212. package/dist/icons/pin-location-new-icon.d.ts +2 -2
  213. package/dist/icons/pin-message-icon.d.ts +2 -2
  214. package/dist/icons/plain-icon.d.ts +2 -2
  215. package/dist/icons/plus-square-icon.d.ts +2 -2
  216. package/dist/icons/posts-icon-search-icon.d.ts +2 -2
  217. package/dist/icons/priority-by-icon.d.ts +2 -2
  218. package/dist/icons/private-post-icon.d.ts +2 -2
  219. package/dist/icons/profile-icon.d.ts +2 -2
  220. package/dist/icons/public-post-icon.d.ts +2 -2
  221. package/dist/icons/public-post-on-card-icon.d.ts +2 -2
  222. package/dist/icons/repeat-icon.d.ts +2 -2
  223. package/dist/icons/reply-icon.d.ts +2 -2
  224. package/dist/icons/report-icon.d.ts +2 -2
  225. package/dist/icons/repost-icon.d.ts +2 -2
  226. package/dist/icons/reposted-icon.d.ts +2 -2
  227. package/dist/icons/save-jobs-icon.d.ts +2 -2
  228. package/dist/icons/save-post-menu-icon.d.ts +2 -2
  229. package/dist/icons/search-bar-icon.d.ts +2 -2
  230. package/dist/icons/search-icon.d.ts +2 -2
  231. package/dist/icons/search-with-date-icon.d.ts +2 -2
  232. package/dist/icons/send-comment-icon.d.ts +2 -2
  233. package/dist/icons/settings-icon.d.ts +2 -2
  234. package/dist/icons/share-circle-icon.d.ts +2 -2
  235. package/dist/icons/share-icon.d.ts +2 -2
  236. package/dist/icons/share-link.d.ts +2 -2
  237. package/dist/icons/shield-dualtone.d.ts +2 -2
  238. package/dist/icons/show-passwords-icon.d.ts +2 -2
  239. package/dist/icons/size-company-icon.d.ts +2 -2
  240. package/dist/icons/skill-on-tab-profile-icon.d.ts +2 -2
  241. package/dist/icons/skills-icon.d.ts +2 -2
  242. package/dist/icons/smile-icon.d.ts +2 -2
  243. package/dist/icons/soft-skill-icon.d.ts +2 -2
  244. package/dist/icons/sort-by-icon.d.ts +2 -2
  245. package/dist/icons/sort-horizontal-icon.d.ts +2 -2
  246. package/dist/icons/sosial-media-section-icon.d.ts +2 -2
  247. package/dist/icons/sparkles-icon.d.ts +2 -2
  248. package/dist/icons/speech-icon.d.ts +2 -2
  249. package/dist/icons/stacked-layout-dual-tone-icon.d.ts +2 -2
  250. package/dist/icons/star-icon.d.ts +2 -2
  251. package/dist/icons/stars-icon.d.ts +2 -2
  252. package/dist/icons/sugested-company-icon.d.ts +2 -2
  253. package/dist/icons/suitcase-icon.d.ts +2 -2
  254. package/dist/icons/technical-skill-icon.d.ts +2 -2
  255. package/dist/icons/theme-icon.d.ts +2 -2
  256. package/dist/icons/themes-icon.d.ts +2 -2
  257. package/dist/icons/trash-icon.d.ts +2 -2
  258. package/dist/icons/unarchive-message-icon.d.ts +2 -2
  259. package/dist/icons/unfollow-icon.d.ts +2 -2
  260. package/dist/icons/unmute-message-icon.d.ts +2 -2
  261. package/dist/icons/unpin-message-icon.d.ts +2 -2
  262. package/dist/icons/unsave-job-icon.d.ts +2 -2
  263. package/dist/icons/upload-document-icon.d.ts +2 -2
  264. package/dist/icons/upload-document-new-icon.d.ts +2 -2
  265. package/dist/icons/upload-event-icon.d.ts +2 -2
  266. package/dist/icons/upload-file-placeholder-icon.d.ts +2 -2
  267. package/dist/icons/upload-generate-image-icon.d.ts +2 -2
  268. package/dist/icons/upload-generate-post-icon.d.ts +2 -2
  269. package/dist/icons/upload-media-icon.d.ts +2 -2
  270. package/dist/icons/upload-media-new-icon.d.ts +2 -2
  271. package/dist/icons/upload-pictures-on-profile-icon.d.ts +2 -2
  272. package/dist/icons/upload-pollingt-new-icon.d.ts +2 -2
  273. package/dist/icons/upload-pooling-icon.d.ts +2 -2
  274. package/dist/icons/upload-reels-icon.d.ts +2 -2
  275. package/dist/icons/user-connections.d.ts +2 -2
  276. package/dist/icons/user-dual-tone-icon.d.ts +2 -2
  277. package/dist/icons/user-hands-up.d.ts +2 -2
  278. package/dist/icons/user-heart-rounded.d.ts +2 -2
  279. package/dist/icons/user-icon.d.ts +2 -2
  280. package/dist/icons/user-unfollow.d.ts +2 -2
  281. package/dist/icons/users-dual-tone-icon.d.ts +2 -2
  282. package/dist/icons/users-group-icon.d.ts +2 -2
  283. package/dist/icons/users-group-rounded-icon.d.ts +2 -2
  284. package/dist/icons/users-group-two-rounded-icon.d.ts +2 -2
  285. package/dist/icons/verified-icon.d.ts +2 -2
  286. package/dist/icons/video-on-message-icon.d.ts +2 -2
  287. package/dist/icons/view-grid-row-icon.d.ts +2 -2
  288. package/dist/icons/view-grid1-icon.d.ts +2 -2
  289. package/dist/icons/view-grid2-icon.d.ts +2 -2
  290. package/dist/icons/view-grid3-icon.d.ts +2 -2
  291. package/dist/icons/view-grid4-icon.d.ts +2 -2
  292. package/dist/icons/volume-icon.d.ts +2 -2
  293. package/dist/icons/volume-off-icon.d.ts +2 -2
  294. package/dist/icons/widget-four-icon.d.ts +2 -2
  295. package/dist/icons/widget-icon.d.ts +2 -2
  296. package/dist/icons/working-at-summary-profile-icon.d.ts +2 -2
  297. package/dist/icons/workplace-on-job-preferences-icon.d.ts +2 -2
  298. package/dist/icons/workplace-open-to-offers-icon.d.ts +2 -2
  299. package/dist/icons/x-square-icon.d.ts +2 -2
  300. package/dist/icons/your-summary-profile-icon.d.ts +2 -2
  301. package/dist/primitives/alert-dialog.d.ts +21 -21
  302. package/dist/primitives/dialog.d.ts +21 -21
  303. package/dist/primitives/index.d.ts +20 -2
  304. package/dist/primitives/index.js +1 -1
  305. package/dist/primitives/popover.d.ts +31 -0
  306. package/dist/primitives/popover.js +2 -0
  307. package/dist/primitives/popover.js.map +1 -0
  308. package/dist/primitives/sheet.d.ts +5 -5
  309. package/dist/primitives/slot.d.ts +4 -4
  310. package/dist/primitives/tabs.d.ts +14 -14
  311. package/dist/ui/alert-dialog.d.ts +15 -15
  312. package/dist/ui/badge.d.ts +5 -5
  313. package/dist/ui/button.d.ts +3 -3
  314. package/dist/ui/combobox.d.ts +34 -34
  315. package/dist/ui/combobox.js +1 -1
  316. package/dist/ui/dialog.d.ts +12 -12
  317. package/dist/ui/index.d.ts +117 -1
  318. package/dist/ui/index.js +1 -1
  319. package/dist/ui/infinite-scroll.d.ts +3 -3
  320. package/dist/ui/input.d.ts +6 -6
  321. package/dist/ui/input.js +1 -1
  322. package/dist/ui/label.d.ts +3 -3
  323. package/dist/ui/popover.d.ts +26 -0
  324. package/dist/ui/popover.js +2 -0
  325. package/dist/ui/popover.js.map +1 -0
  326. package/dist/ui/sheet.d.ts +11 -11
  327. package/dist/ui/tabs.d.ts +6 -6
  328. package/dist/ui/textarea.d.ts +2 -2
  329. package/package.json +3 -1
  330. package/dist/chunk-HUWF445V.js +0 -2
  331. package/dist/chunk-HUWF445V.js.map +0 -1
  332. package/dist/chunk-JWKTYYJB.js +0 -2
  333. package/dist/chunk-JWKTYYJB.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/composites/combobox-chip-outside.tsx"],"names":["ComboboxChipOutside","multiple","inputPlaceholder","container","items","infiniteScroll","isPending","taggable","maxVisible","props","inputValue","setInputValue","useControlledState","value","setValue","createdItems","setCreatedItems","createdValuesRef","currentValues","v","prev","next","item","trimmedInput","isInputSelected","isCreatingItem","combinedItems","base","createItem","jsxs","Combobox","a","b","eventDetails","newTags","tag","jsx","ComboboxInput","Input","ComboboxTrigger","XIcon","event","SearchIcon","ComboboxChips","cn","ComboboxValue","visible","overflow","Fragment","ComboboxChip","ComboboxChipRemove","ComboboxPopup","ComboboxStatus","ComboboxList","Combo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BAAA,CAAsB,QAAA,CAAA,SAAA,CAAO,CAAA,CAE/CA,GAAAA,CAAC,QAAK,SAAA,CAAU,wCAAA,CACb,QAAA,CAAAb,GAAAA,CACH,GACF,CAAA,CACF,CAAA,CAEFa,GAAAA,CAACmB,CAAAA,CAAA,CAAwB,GAAGlD,CAAAA,CAAgB,CAAA,CAAA,CAC9C,CAAA,CAAA,CACF,GACF,CAEJ","file":"chunk-7FRAZHPK.js","sourcesContent":["import * as React from \"react\"\r\n\r\nimport { cn } from \"@xploreu/lib/cn\"\r\nimport { ComboboxInput as ComboboxInputPrimitive } from \"../primitives/combobox\"\r\nimport { Input } from \"../ui\"\r\nimport {\r\n Combobox,\r\n ComboboxChip,\r\n ComboboxChipRemove,\r\n ComboboxChips,\r\n ComboboxInfiniteScroll,\r\n ComboboxItem,\r\n ComboboxList,\r\n ComboboxPortal,\r\n ComboboxPopup,\r\n ComboboxStatus,\r\n ComboboxTrigger,\r\n ComboboxValue,\r\n type ComboboxProps\r\n} from \"../ui/combobox\"\r\nimport { SearchIcon, XIcon } from \"lucide-react\"\r\nimport { useControlledState } from \"@xploreu/hooks/use-controlled-state\"\r\n\r\ntype ComboboxChipOutsideProps<Value> = Omit<ComboboxProps<Value, true>, \"multiple\"> & {\r\n multiple?: boolean\r\n inputPlaceholder?: string\r\n container?: React.ComponentProps<typeof ComboboxPortal>[\"container\"]\r\n items: ({ label: string; value: string }[]) | undefined\r\n infiniteScroll?: React.ComponentProps<typeof ComboboxInfiniteScroll>\r\n isPending?: boolean\r\n /**\r\n * When true, enables creatable / taggable mode.\r\n * If the typed value has no exact match in the current item list,\r\n * a \"Create \\\"…\\\"\" option is shown at the top of the dropdown.\r\n * Created items are appended to the value with `{ label, value, tag: true }`.\r\n */\r\n taggable?: boolean\r\n /**\r\n * Maximum number of chips to show before collapsing the rest into a \"+N\" chip.\r\n * When undefined, all chips are shown.\r\n */\r\n maxVisible?: number\r\n}\r\n\r\nfunction ComboboxChipOutside<Value extends { label: string; value: string; tag?: true }>({\r\n multiple = true,\r\n inputPlaceholder = \"Search...\",\r\n container,\r\n items,\r\n infiniteScroll,\r\n isPending,\r\n taggable = false,\r\n maxVisible,\r\n ...props\r\n}: ComboboxChipOutsideProps<Value>) {\r\n const [inputValue, setInputValue] = useControlledState({\r\n value: props?.inputValue?.toString(),\r\n defaultValue: props?.defaultInputValue?.toString(),\r\n onChange: props?.onInputValueChange,\r\n })\r\n\r\n const [value, setValue] = useControlledState({\r\n value: props?.value ?? [],\r\n defaultValue: props?.defaultValue ?? [],\r\n onChange: props?.onValueChange,\r\n })\r\n\r\n // Track items created via taggable mode\r\n // Sync with value to avoid stale tags when controlled value is reset from outside\r\n const [createdItems, setCreatedItems] = React.useState<Value[]>([])\r\n const createdValuesRef = React.useRef<Set<string>>(new Set())\r\n\r\n React.useEffect(() => {\r\n const currentValues = new Set(value.map((v) => v.value))\r\n setCreatedItems((prev) => {\r\n const next = prev.filter((item) => currentValues.has(item.value))\r\n if (next.length === prev.length) return prev\r\n createdValuesRef.current = new Set(next.map((v) => v.value))\r\n return next\r\n })\r\n }, [value])\r\n\r\n // Determine if the current input has no exact match in existing items\r\n const trimmedInput = inputValue?.toString().trim() ?? \"\"\r\n const isInputSelected = React.useMemo(() => {\r\n if (!trimmedInput) return false\r\n return value.some(\r\n (item) => item.value.toLowerCase() === trimmedInput.toLowerCase()\r\n )\r\n }, [trimmedInput, value])\r\n // true = show the taggable item in dropdown (either as \"Create:\" or as checked item)\r\n const isCreatingItem = React.useMemo(() => {\r\n if (!taggable || !trimmedInput) return false\r\n return !items?.some(\r\n (item) => item.label.toLowerCase() === trimmedInput.toLowerCase()\r\n )\r\n }, [taggable, trimmedInput, items])\r\n\r\n // Merge server items with locally created tags + the \"Create\" placeholder\r\n const combinedItems = React.useMemo(() => {\r\n const base: Value[] = [\r\n ...items ?? [],\r\n ...createdItems,\r\n ]\r\n\r\n if (isCreatingItem) {\r\n const createItem = {\r\n label: trimmedInput,\r\n value: trimmedInput,\r\n tag: true,\r\n }\r\n return [...base, createItem]\r\n }\r\n\r\n return base\r\n }, [items, createdItems, isCreatingItem, trimmedInput])\r\n\r\n const handleValueChange: ComboboxProps<Value, true>[\"onValueChange\"] = (value, eventDetails) => {\r\n // Capture newly created taggable items internally\r\n if (taggable) {\r\n const newTags = value.filter(\r\n (v) => v?.tag === true\r\n && !createdValuesRef.current.has(v.value)\r\n )\r\n if (newTags.length > 0) {\r\n for (const tag of newTags) {\r\n createdValuesRef.current.add(tag.value)\r\n }\r\n setCreatedItems((prev) => [...prev, ...newTags])\r\n }\r\n }\r\n\r\n // if multiple is false, we need to replace the value with the new value instead of adding to it\r\n if (!multiple) {\r\n setValue([value[value.length - 1]], eventDetails)\r\n } else {\r\n setValue(value, eventDetails)\r\n }\r\n }\r\n\r\n return (\r\n <Combobox\r\n {...props}\r\n behavior=\"chip-outside\"\r\n multiple\r\n items={taggable ? combinedItems : items}\r\n isItemEqualToValue={(a, b) => a.value === b.value}\r\n onValueChange={handleValueChange}\r\n onInputValueChange={setInputValue}\r\n >\r\n <div className=\"flex flex-col gap-2\">\r\n <ComboboxInputPrimitive\r\n render={\r\n <Input\r\n className=\"h-9 text-body-regular-3 pl-9 pr-7\"\r\n endContent={\r\n <ComboboxTrigger\r\n nativeButton={false}\r\n render={(\r\n <XIcon\r\n className=\"!size-5 !right-1.5 data-[hidden=true]:opacity-0 opacity-100 transition-opacity duration-300 cursor-pointer\"\r\n data-hidden={!inputValue}\r\n data-slot=\"combobox-clear-input\"\r\n onClick={(event) => {\r\n setInputValue(\"\", {\r\n reason: \"none\",\r\n event: event.nativeEvent,\r\n cancel: () => { },\r\n allowPropagation: () => { },\r\n isCanceled: false,\r\n isPropagationAllowed: true,\r\n trigger: undefined,\r\n })\r\n }}\r\n />\r\n )}\r\n />\r\n }\r\n placeholder={inputPlaceholder}\r\n startContent={<SearchIcon className=\"!size-4 !text-fg-tertiary-hover\" />}\r\n wrapperClassName=\"w-full\"\r\n />\r\n }\r\n />\r\n <ComboboxChips\r\n className={cn(maxVisible !== undefined && \"flex-nowrap overflow-hidden\")}\r\n onMouseDown={(e) => e.preventBaseUIHandler()}\r\n >\r\n <ComboboxValue>\r\n {(value: Value[]) => {\r\n const visible = maxVisible !== undefined ? value.slice(0, maxVisible) : value\r\n const overflow = maxVisible !== undefined ? value.length - maxVisible : 0\r\n return (\r\n <>\r\n {visible?.map((item) => (\r\n <ComboboxChip\r\n key={item?.value || \"\"}\r\n className={cn(maxVisible !== undefined && \"min-w-0 shrink\")}\r\n >\r\n {maxVisible !== undefined\r\n ? <span className=\"truncate\">{item?.label || \"\"}</span>\r\n : (item?.label || \"\")\r\n }\r\n <ComboboxChipRemove />\r\n </ComboboxChip>\r\n ))}\r\n {overflow > 0 && (\r\n <ComboboxChip className=\"shrink-0\">\r\n +{overflow}\r\n </ComboboxChip>\r\n )}\r\n </>\r\n )\r\n }}\r\n </ComboboxValue>\r\n </ComboboxChips>\r\n </div>\r\n <ComboboxPopup container={container}>\r\n <ComboboxStatus\r\n status={\r\n isPending || items === undefined\r\n ? \"pending\"\r\n : items?.length === 0 && !isCreatingItem\r\n ? \"empty\"\r\n : null\r\n }\r\n />\r\n <ComboboxList>\r\n {items?.map((item) => (\r\n <ComboboxItem\r\n key={item.value}\r\n value={{ label: item.label, value: item.value }}\r\n >\r\n <div className=\"flex items-center gap-2 w-full min-w-0\">\r\n <span className=\"truncate\">\r\n {item.label}\r\n </span>\r\n </div>\r\n </ComboboxItem>\r\n ))}\r\n {isCreatingItem && (\r\n <ComboboxItem\r\n value={{ label: trimmedInput, value: trimmedInput, tag: true }}\r\n >\r\n <div className=\"flex items-center gap-1.5 w-full min-w-0\">\r\n {!isInputSelected && (\r\n <span className=\"text-text-secondary\">Create:</span>\r\n )}\r\n <span className=\"font-medium text-text-primary truncate\">\r\n {trimmedInput}\r\n </span>\r\n </div>\r\n </ComboboxItem>\r\n )}\r\n <ComboboxInfiniteScroll {...infiniteScroll} />\r\n </ComboboxList>\r\n </ComboboxPopup>\r\n </Combobox>\r\n )\r\n}\r\n\r\nexport { ComboboxChipOutside }"]}
1
+ {"version":3,"sources":["../src/composites/combobox-chip-outside.tsx"],"names":["ComboboxChipOutside","multiple","inputPlaceholder","container","items","infiniteScroll","isPending","taggable","maxVisible","props","inputValue","setInputValue","useControlledState","value","setValue","createdItems","setCreatedItems","createdValuesRef","currentValues","v","prev","next","item","trimmedInput","isInputSelected","isCreatingItem","combinedItems","base","createItem","jsxs","Combobox","a","b","eventDetails","newTags","tag","jsx","ComboboxInput","Input","ComboboxTrigger","XIcon","event","SearchIcon","ComboboxChips","cn","ComboboxValue","visible","overflow","Fragment","ComboboxChip","ComboboxChipRemove","ComboboxPopup","ComboboxStatus","ComboboxList","ComboboxItem","ComboboxInfiniteScroll"],"mappings":"iUA4CA,SAASA,CAAAA,CAAgF,CACvF,QAAA,CAAAC,IAAW,IAAA,CACX,gBAAA,CAAAC,CAAAA,CAAmB,WAAA,CACnB,UAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,EAAW,KAAA,CACX,UAAA,CAAAC,CAAAA,CACA,GAAGC,GACL,CAAA,CAAoC,CAClC,GAAM,CAACC,EAAYC,CAAa,CAAA,CAAIC,kBAAAA,CAAmB,CACrD,MAAOH,GAAAA,EAAO,UAAA,EAAY,QAAA,EAAS,CACnC,aAAcA,GAAAA,EAAO,iBAAA,EAAmB,QAAA,EAAS,CACjD,SAAUA,GAAAA,EAAO,kBACnB,CAAC,CAAA,CAEK,CAACI,GAAAA,CAAOC,CAAQ,CAAA,CAAIF,kBAAAA,CAAmB,CAC3C,KAAA,CAAOH,GAAAA,EAAO,KAAA,EAAS,EAAC,CACxB,YAAA,CAAcA,GAAAA,EAAO,YAAA,EAAgB,EAAC,CACtC,QAAA,CAAUA,GAAAA,EAAO,aACnB,CAAC,CAAA,CAIK,CAACM,GAAAA,CAAcC,CAAe,EAAU,CA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AU,wCAAA,CACb,QAAA,CAAAA,GAAAA,CAAC,QAAK,SAAA,CAAU,UAAA,CACb,QAAA,CAAAd,CAAAA,CAAK,MACR,CAAA,CACF,CAAA,CAAA,CAPKA,CAAAA,CAAK,KAQZ,CACD,CAAA,CACAG,GAAAA,EACCW,GAAAA,CAACkB,CAAAA,CAAA,CACC,KAAA,CAAO,CAAE,KAAA,CAAO/B,GAAAA,CAAc,KAAA,CAAOA,GAAAA,CAAc,GAAA,CAAK,IAAK,EAE7D,QAAA,CAAAM,IAAAA,CAAC,KAAA,CAAA,CAAI,SAAA,CAAU,2CACZ,QAAA,CAAA,CAAA,CAACL,CAAAA,EACAY,GAAAA,CAAC,MAAA,CAAA,CAAK,UAAU,qBAAA,CAAsB,QAAA,CAAA,SAAA,CAAO,CAAA,CAE/CA,GAAAA,CAAC,QAAK,SAAA,CAAU,wCAAA,CACb,QAAA,CAAAb,GAAAA,CACH,GACF,CAAA,CACF,CAAA,CAEFa,GAAAA,CAACmB,CAAAA,CAAA,CAAwB,GAAGlD,CAAAA,CAAgB,CAAA,CAAA,CAC9C,CAAA,CAAA,CACF,GACF,CAEJ","file":"chunk-NG3NFI2B.js","sourcesContent":["import * as React from \"react\"\r\n\r\nimport { cn } from \"@xploreu/lib/cn\"\r\nimport { ComboboxInput as ComboboxInputPrimitive } from \"../primitives/combobox\"\r\nimport { Input } from \"../ui\"\r\nimport {\r\n Combobox,\r\n ComboboxChip,\r\n ComboboxChipRemove,\r\n ComboboxChips,\r\n ComboboxInfiniteScroll,\r\n ComboboxItem,\r\n ComboboxList,\r\n ComboboxPortal,\r\n ComboboxPopup,\r\n ComboboxStatus,\r\n ComboboxTrigger,\r\n ComboboxValue,\r\n type ComboboxProps\r\n} from \"../ui/combobox\"\r\nimport { SearchIcon, XIcon } from \"lucide-react\"\r\nimport { useControlledState } from \"@xploreu/hooks/use-controlled-state\"\r\n\r\ntype ComboboxChipOutsideProps<Value> = Omit<ComboboxProps<Value, true>, \"multiple\"> & {\r\n multiple?: boolean\r\n inputPlaceholder?: string\r\n container?: React.ComponentProps<typeof ComboboxPortal>[\"container\"]\r\n items: ({ label: string; value: string }[]) | undefined\r\n infiniteScroll?: React.ComponentProps<typeof ComboboxInfiniteScroll>\r\n isPending?: boolean\r\n /**\r\n * When true, enables creatable / taggable mode.\r\n * If the typed value has no exact match in the current item list,\r\n * a \"Create \\\"…\\\"\" option is shown at the top of the dropdown.\r\n * Created items are appended to the value with `{ label, value, tag: true }`.\r\n */\r\n taggable?: boolean\r\n /**\r\n * Maximum number of chips to show before collapsing the rest into a \"+N\" chip.\r\n * When undefined, all chips are shown.\r\n */\r\n maxVisible?: number\r\n}\r\n\r\nfunction ComboboxChipOutside<Value extends { label: string; value: string; tag?: true }>({\r\n multiple = true,\r\n inputPlaceholder = \"Search...\",\r\n container,\r\n items,\r\n infiniteScroll,\r\n isPending,\r\n taggable = false,\r\n maxVisible,\r\n ...props\r\n}: ComboboxChipOutsideProps<Value>) {\r\n const [inputValue, setInputValue] = useControlledState({\r\n value: props?.inputValue?.toString(),\r\n defaultValue: props?.defaultInputValue?.toString(),\r\n onChange: props?.onInputValueChange,\r\n })\r\n\r\n const [value, setValue] = useControlledState({\r\n value: props?.value ?? [],\r\n defaultValue: props?.defaultValue ?? [],\r\n onChange: props?.onValueChange,\r\n })\r\n\r\n // Track items created via taggable mode\r\n // Sync with value to avoid stale tags when controlled value is reset from outside\r\n const [createdItems, setCreatedItems] = React.useState<Value[]>([])\r\n const createdValuesRef = React.useRef<Set<string>>(new Set())\r\n\r\n React.useEffect(() => {\r\n const currentValues = new Set(value.map((v) => v.value))\r\n setCreatedItems((prev) => {\r\n const next = prev.filter((item) => currentValues.has(item.value))\r\n if (next.length === prev.length) return prev\r\n createdValuesRef.current = new Set(next.map((v) => v.value))\r\n return next\r\n })\r\n }, [value])\r\n\r\n // Determine if the current input has no exact match in existing items\r\n const trimmedInput = inputValue?.toString().trim() ?? \"\"\r\n const isInputSelected = React.useMemo(() => {\r\n if (!trimmedInput) return false\r\n return value.some(\r\n (item) => item.value.toLowerCase() === trimmedInput.toLowerCase()\r\n )\r\n }, [trimmedInput, value])\r\n // true = show the taggable item in dropdown (either as \"Create:\" or as checked item)\r\n const isCreatingItem = React.useMemo(() => {\r\n if (!taggable || !trimmedInput) return false\r\n return !items?.some(\r\n (item) => item.label.toLowerCase() === trimmedInput.toLowerCase()\r\n )\r\n }, [taggable, trimmedInput, items])\r\n\r\n // Merge server items with locally created tags + the \"Create\" placeholder\r\n const combinedItems = React.useMemo(() => {\r\n const base: Value[] = [\r\n ...items ?? [],\r\n ...createdItems,\r\n ]\r\n\r\n if (isCreatingItem) {\r\n const createItem = {\r\n label: trimmedInput,\r\n value: trimmedInput,\r\n tag: true,\r\n }\r\n return [...base, createItem]\r\n }\r\n\r\n return base\r\n }, [items, createdItems, isCreatingItem, trimmedInput])\r\n\r\n const handleValueChange: ComboboxProps<Value, true>[\"onValueChange\"] = (value, eventDetails) => {\r\n // Capture newly created taggable items internally\r\n if (taggable) {\r\n const newTags = value.filter(\r\n (v) => v?.tag === true\r\n && !createdValuesRef.current.has(v.value)\r\n )\r\n if (newTags.length > 0) {\r\n for (const tag of newTags) {\r\n createdValuesRef.current.add(tag.value)\r\n }\r\n setCreatedItems((prev) => [...prev, ...newTags])\r\n }\r\n }\r\n\r\n // if multiple is false, we need to replace the value with the new value instead of adding to it\r\n if (!multiple) {\r\n setValue([value[value.length - 1]], eventDetails)\r\n } else {\r\n setValue(value, eventDetails)\r\n }\r\n }\r\n\r\n return (\r\n <Combobox\r\n {...props}\r\n behavior=\"chip-outside\"\r\n multiple\r\n items={taggable ? combinedItems : items}\r\n isItemEqualToValue={(a, b) => a.value === b.value}\r\n onValueChange={handleValueChange}\r\n onInputValueChange={setInputValue}\r\n >\r\n <div className=\"flex flex-col gap-2\">\r\n <ComboboxInputPrimitive\r\n render={\r\n <Input\r\n className=\"h-9 text-body-regular-3 pl-9 pr-7\"\r\n endContent={\r\n <ComboboxTrigger\r\n nativeButton={false}\r\n render={(\r\n <XIcon\r\n className=\"!size-5 !right-1.5 data-[hidden=true]:opacity-0 opacity-100 transition-opacity duration-300 cursor-pointer\"\r\n data-hidden={!inputValue}\r\n data-slot=\"combobox-clear-input\"\r\n onClick={(event) => {\r\n setInputValue(\"\", {\r\n reason: \"none\",\r\n event: event.nativeEvent,\r\n cancel: () => { },\r\n allowPropagation: () => { },\r\n isCanceled: false,\r\n isPropagationAllowed: true,\r\n trigger: undefined,\r\n })\r\n }}\r\n />\r\n )}\r\n />\r\n }\r\n placeholder={inputPlaceholder}\r\n startContent={<SearchIcon className=\"!size-4 !text-fg-tertiary-hover\" />}\r\n wrapperClassName=\"w-full\"\r\n />\r\n }\r\n />\r\n <ComboboxChips\r\n className={cn(maxVisible !== undefined && \"flex-nowrap overflow-hidden\")}\r\n onMouseDown={(e) => e.preventBaseUIHandler()}\r\n >\r\n <ComboboxValue>\r\n {(value: Value[]) => {\r\n const visible = maxVisible !== undefined ? value.slice(0, maxVisible) : value\r\n const overflow = maxVisible !== undefined ? value.length - maxVisible : 0\r\n return (\r\n <>\r\n {visible?.map((item) => (\r\n <ComboboxChip\r\n key={item?.value || \"\"}\r\n className={cn(maxVisible !== undefined && \"min-w-0 shrink\")}\r\n >\r\n {maxVisible !== undefined\r\n ? <span className=\"truncate\">{item?.label || \"\"}</span>\r\n : (item?.label || \"\")\r\n }\r\n <ComboboxChipRemove />\r\n </ComboboxChip>\r\n ))}\r\n {overflow > 0 && (\r\n <ComboboxChip className=\"shrink-0\">\r\n +{overflow}\r\n </ComboboxChip>\r\n )}\r\n </>\r\n )\r\n }}\r\n </ComboboxValue>\r\n </ComboboxChips>\r\n </div>\r\n <ComboboxPopup container={container}>\r\n <ComboboxStatus\r\n status={\r\n isPending || items === undefined\r\n ? \"pending\"\r\n : items?.length === 0 && !isCreatingItem\r\n ? \"empty\"\r\n : null\r\n }\r\n />\r\n <ComboboxList>\r\n {items?.map((item) => (\r\n <ComboboxItem\r\n key={item.value}\r\n value={{ label: item.label, value: item.value }}\r\n >\r\n <div className=\"flex items-center gap-2 w-full min-w-0\">\r\n <span className=\"truncate\">\r\n {item.label}\r\n </span>\r\n </div>\r\n </ComboboxItem>\r\n ))}\r\n {isCreatingItem && (\r\n <ComboboxItem\r\n value={{ label: trimmedInput, value: trimmedInput, tag: true }}\r\n >\r\n <div className=\"flex items-center gap-1.5 w-full min-w-0\">\r\n {!isInputSelected && (\r\n <span className=\"text-text-secondary\">Create:</span>\r\n )}\r\n <span className=\"font-medium text-text-primary truncate\">\r\n {trimmedInput}\r\n </span>\r\n </div>\r\n </ComboboxItem>\r\n )}\r\n <ComboboxInfiniteScroll {...infiniteScroll} />\r\n </ComboboxList>\r\n </ComboboxPopup>\r\n </Combobox>\r\n )\r\n}\r\n\r\nexport { ComboboxChipOutside }"]}
@@ -0,0 +1,2 @@
1
+ import {b,c,d,e,f,k as k$1,g,h as h$1,i,j}from'./chunk-Y6JASO6W.js';import'react';import {cn}from'@xploreu/lib/cn';import {jsx}from'react/jsx-runtime';function h(o){return jsx(b,{...o})}function k(o){return jsx(c,{...o})}function A({className:o,align:e$1="center",sideOffset:c=8,initialFocus:b,finalFocus:y,container:g,style:u,children:f$1,...T}){return jsx(d,{container:g,children:jsx(e,{align:e$1,sideOffset:c,className:"isolate z-50",...T,children:jsx(f,{className:cn("bg-bg-primary text-text-primary origin-(--transform-origin) w-72 max-w-(--available-width) rounded-md border border-border-primary p-4 shadow-md outline-hidden",o),finalFocus:y,initialFocus:b,style:u,children:f$1})})})}function B(o){return jsx(k$1,{...o})}function D(o){return jsx(g,{...o})}function N({className:o,...e}){return jsx(h$1,{className:cn("z-50 size-2.5 rotate-45 rounded-xs bg-bg-primary border border-border-primary data-[side=bottom]:-top-[5px] data-[side=top]:-bottom-[5px] data-[side=right]:-left-[5px] data-[side=left]:-right-[5px] data-[side=top]:border-b data-[side=top]:border-r data-[side=top]:border-t-0 data-[side=top]:border-l-0 data-[side=bottom]:border-t data-[side=bottom]:border-l data-[side=bottom]:border-b-0 data-[side=bottom]:border-r-0 data-[side=left]:border-r data-[side=left]:border-t data-[side=left]:border-l-0 data-[side=left]:border-b-0 data-[side=right]:border-l data-[side=right]:border-b data-[side=right]:border-r-0 data-[side=right]:border-t-0",o),...e})}function z({className:o,...e}){return jsx(i,{className:cn("text-label-semibold-2 text-text-primary",o),...e})}function F({className:o,...e}){return jsx(j,{className:cn("mt-0.5 text-body-regular-sm text-text-secondary",o),...e})}export{h as a,k as b,A as c,B as d,D as e,N as f,z as g,F as h};//# sourceMappingURL=chunk-NGSCUYDU.js.map
2
+ //# sourceMappingURL=chunk-NGSCUYDU.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ui/popover.tsx"],"names":["Popover","props","jsx","PopoverTrigger","PopoverPopup","className","align","sideOffset","initialFocus","finalFocus","container","style","children","PopoverPortal","PopoverPositioner","cn","PopoverClose","PopoverBackdrop","PopoverArrow","PopoverTitle","PopoverDescription"],"mappings":"uJA6BA,SAASA,EAAQC,CAAAA,CAAqB,CACpC,OAAOC,GAAAA,CAACF,CAAAA,CAAA,CAAkB,GAAGC,CAAAA,CAAO,CACtC,CAIA,SAASE,EAAeF,CAAAA,CAA4B,CAClD,OAAOC,GAAAA,CAACC,CAAAA,CAAA,CAAyB,GAAGF,CAAAA,CAAO,CAC7C,CAQA,SAASG,EAAa,CACpB,SAAA,CAAAC,EACA,KAAA,CAAAC,GAAAA,CAAQ,SACR,UAAA,CAAAC,CAAAA,CAAa,EACb,YAAA,CAAAC,CAAAA,CACA,UAAA,CAAAC,CAAAA,CACA,UAAAC,CAAAA,CACA,KAAA,CAAAC,EACA,QAAA,CAAAC,GAAAA,CACA,GAAGX,CACL,CAAA,CAAsB,CACpB,OACEC,GAAAA,CAACW,EAAA,CAAuB,SAAA,CAAWH,EACjC,QAAA,CAAAR,GAAAA,CAACY,EAAA,CACC,KAAA,CAAOR,IACP,UAAA,CAAYC,CAAAA,CACZ,UAAU,cAAA,CACT,GAAGN,EAEJ,QAAA,CAAAC,GAAAA,CAACE,EAAA,CACC,SAAA,CAAWW,GACT,iKAAA,CACAV,CACF,EACA,UAAA,CAAYI,CAAAA,CACZ,aAAcD,CAAAA,CACd,KAAA,CAAOG,EAEN,QAAA,CAAAC,GAAAA,CACH,CAAA,CACF,CAAA,CACF,CAEJ,CAIA,SAASI,EAAaf,CAAAA,CAA0B,CAC9C,OAAOC,GAAAA,CAACc,GAAAA,CAAA,CAAuB,GAAGf,CAAAA,CAAO,CAC3C,CAIA,SAASgB,EAAgBhB,CAAAA,CAA6B,CACpD,OAAOC,GAAAA,CAACe,CAAAA,CAAA,CAA0B,GAAGhB,CAAAA,CAAO,CAC9C,CAIA,SAASiB,EAAa,CAAE,SAAA,CAAAb,EAAW,GAAGJ,CAAM,EAAsB,CAChE,OACEC,IAACgB,GAAAA,CAAA,CACC,UAAWH,EAAAA,CACT,+nBAAA,CACAV,CACF,CAAA,CACC,GAAGJ,CAAAA,CACN,CAEJ,CAIA,SAASkB,CAAAA,CAAa,CAAE,SAAA,CAAAd,CAAAA,CAAW,GAAGJ,CAAM,CAAA,CAAsB,CAChE,OACEC,GAAAA,CAACiB,EAAA,CACC,SAAA,CAAWJ,GAAG,yCAAA,CAA2CV,CAAS,EACjE,GAAGJ,CAAAA,CACN,CAEJ,CAIA,SAASmB,EAAmB,CAAE,SAAA,CAAAf,EAAW,GAAGJ,CAAM,EAA4B,CAC5E,OACEC,IAACkB,CAAAA,CAAA,CACC,UAAWL,EAAAA,CAAG,iDAAA,CAAmDV,CAAS,CAAA,CACzE,GAAGJ,EACN,CAEJ","file":"chunk-NGSCUYDU.js","sourcesContent":["\"use client\"\r\n\r\nimport * as React from \"react\"\r\n\r\nimport {\r\n Popover as PopoverPrimitive,\r\n PopoverArrow as PopoverArrowPrimitive,\r\n PopoverBackdrop as PopoverBackdropPrimitive,\r\n PopoverClose as PopoverClosePrimitive,\r\n PopoverDescription as PopoverDescriptionPrimitive,\r\n PopoverPopup as PopoverPopupPrimitive,\r\n PopoverPortal as PopoverPortalPrimitive,\r\n PopoverPositioner as PopoverPositionerPrimitive,\r\n PopoverTitle as PopoverTitlePrimitive,\r\n PopoverTrigger as PopoverTriggerPrimitive,\r\n type PopoverArrowProps as PopoverArrowPrimitiveProps,\r\n type PopoverBackdropProps as PopoverBackdropPrimitiveProps,\r\n type PopoverCloseProps as PopoverClosePrimitiveProps,\r\n type PopoverDescriptionProps as PopoverDescriptionPrimitiveProps,\r\n type PopoverPopupProps as PopoverPopupPrimitiveProps,\r\n type PopoverPositionerProps as PopoverPositionerPrimitiveProps,\r\n type PopoverProps as PopoverPrimitiveProps,\r\n type PopoverTitleProps as PopoverTitlePrimitiveProps,\r\n type PopoverTriggerProps as PopoverTriggerPrimitiveProps,\r\n} from \"../primitives/popover\"\r\nimport { cn } from \"@xploreu/lib/cn\"\r\n\r\ntype PopoverProps = PopoverPrimitiveProps\r\n\r\nfunction Popover(props: PopoverProps) {\r\n return <PopoverPrimitive {...props} />\r\n}\r\n\r\ntype PopoverTriggerProps = PopoverTriggerPrimitiveProps\r\n\r\nfunction PopoverTrigger(props: PopoverTriggerProps) {\r\n return <PopoverTriggerPrimitive {...props} />\r\n}\r\n\r\ntype PopoverPopupProps = PopoverPositionerPrimitiveProps &\r\n PopoverPopupPrimitiveProps & {\r\n /** Container for the popover portal. Defaults to document.body. */\r\n container?: React.ComponentProps<typeof PopoverPortalPrimitive>[\"container\"]\r\n }\r\n\r\nfunction PopoverPopup({\r\n className,\r\n align = \"center\",\r\n sideOffset = 8,\r\n initialFocus,\r\n finalFocus,\r\n container,\r\n style,\r\n children,\r\n ...props\r\n}: PopoverPopupProps) {\r\n return (\r\n <PopoverPortalPrimitive container={container}>\r\n <PopoverPositionerPrimitive\r\n align={align}\r\n sideOffset={sideOffset}\r\n className=\"isolate z-50\"\r\n {...props}\r\n >\r\n <PopoverPopupPrimitive\r\n className={cn(\r\n \"bg-bg-primary text-text-primary origin-(--transform-origin) w-72 max-w-(--available-width) rounded-md border border-border-primary p-4 shadow-md outline-hidden\",\r\n className,\r\n )}\r\n finalFocus={finalFocus}\r\n initialFocus={initialFocus}\r\n style={style}\r\n >\r\n {children}\r\n </PopoverPopupPrimitive>\r\n </PopoverPositionerPrimitive>\r\n </PopoverPortalPrimitive>\r\n )\r\n}\r\n\r\ntype PopoverCloseProps = PopoverClosePrimitiveProps\r\n\r\nfunction PopoverClose(props: PopoverCloseProps) {\r\n return <PopoverClosePrimitive {...props} />\r\n}\r\n\r\ntype PopoverBackdropProps = PopoverBackdropPrimitiveProps\r\n\r\nfunction PopoverBackdrop(props: PopoverBackdropProps) {\r\n return <PopoverBackdropPrimitive {...props} />\r\n}\r\n\r\ntype PopoverArrowProps = PopoverArrowPrimitiveProps\r\n\r\nfunction PopoverArrow({ className, ...props }: PopoverArrowProps) {\r\n return (\r\n <PopoverArrowPrimitive\r\n className={cn(\r\n \"z-50 size-2.5 rotate-45 rounded-xs bg-bg-primary border border-border-primary data-[side=bottom]:-top-[5px] data-[side=top]:-bottom-[5px] data-[side=right]:-left-[5px] data-[side=left]:-right-[5px] data-[side=top]:border-b data-[side=top]:border-r data-[side=top]:border-t-0 data-[side=top]:border-l-0 data-[side=bottom]:border-t data-[side=bottom]:border-l data-[side=bottom]:border-b-0 data-[side=bottom]:border-r-0 data-[side=left]:border-r data-[side=left]:border-t data-[side=left]:border-l-0 data-[side=left]:border-b-0 data-[side=right]:border-l data-[side=right]:border-b data-[side=right]:border-r-0 data-[side=right]:border-t-0\",\r\n className\r\n )}\r\n {...props}\r\n />\r\n )\r\n}\r\n\r\ntype PopoverTitleProps = PopoverTitlePrimitiveProps\r\n\r\nfunction PopoverTitle({ className, ...props }: PopoverTitleProps) {\r\n return (\r\n <PopoverTitlePrimitive\r\n className={cn(\"text-label-semibold-2 text-text-primary\", className)}\r\n {...props}\r\n />\r\n )\r\n}\r\n\r\ntype PopoverDescriptionProps = PopoverDescriptionPrimitiveProps\r\n\r\nfunction PopoverDescription({ className, ...props }: PopoverDescriptionProps) {\r\n return (\r\n <PopoverDescriptionPrimitive\r\n className={cn(\"mt-0.5 text-body-regular-sm text-text-secondary\", className)}\r\n {...props}\r\n />\r\n )\r\n}\r\n\r\nexport {\r\n Popover,\r\n PopoverTrigger,\r\n PopoverPopup,\r\n PopoverClose,\r\n PopoverBackdrop,\r\n PopoverArrow,\r\n PopoverTitle,\r\n PopoverDescription,\r\n type PopoverProps,\r\n type PopoverTriggerProps,\r\n type PopoverPopupProps,\r\n type PopoverCloseProps,\r\n type PopoverBackdropProps,\r\n type PopoverArrowProps,\r\n type PopoverTitleProps,\r\n type PopoverDescriptionProps,\r\n}"]}
@@ -0,0 +1,2 @@
1
+ import'react';import {Tooltip}from'@base-ui/react/tooltip';import {AnimatePresence,motion}from'motion/react';import {useControlledState}from'@xploreu/hooks/use-controlled-state';import {getStrictContext}from'@xploreu/lib/get-strict-context';import {jsx}from'react/jsx-runtime';var[P,a]=getStrictContext("TooltipContext");function f(o){let[i,e]=useControlledState({value:o?.open,defaultValue:o?.defaultOpen,onChange:o?.onOpenChange});return jsx(P,{value:{open:i,setOpen:e},children:jsx(Tooltip.Root,{"data-slot":"tooltip",...o,onOpenChange:e})})}function g(o){return jsx(Tooltip.Trigger,{"data-slot":"tooltip-trigger",...o})}function d(o){let{open:i}=a();return jsx(AnimatePresence,{children:i&&jsx(Tooltip.Portal,{"data-slot":"tooltip-portal",keepMounted:true,...o})})}function C(o){return jsx(Tooltip.Positioner,{"data-slot":"tooltip-positioner",...o})}function v({transition:o={type:"spring",stiffness:300,damping:25},...i}){return jsx(Tooltip.Popup,{"data-slot":"tooltip-popup",render:jsx(motion.div,{animate:{opacity:1,scale:1},exit:{opacity:0,scale:.5},initial:{opacity:0,scale:.5},transition:o,...i},"tooltip-popup")})}function R(o){return jsx(Tooltip.Arrow,{"data-slot":"tooltip-arrow",...o})}export{f as a,g as b,d as c,C as d,v as e,R as f};//# sourceMappingURL=chunk-NTQ2FXS7.js.map
2
+ //# sourceMappingURL=chunk-NTQ2FXS7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/primitives/tooltip.tsx"],"names":["TooltipProvider","useTooltip","getStrictContext","Tooltip","props","open","setOpen","useControlledState","jsx","TooltipPrimitive","TooltipTrigger","TooltipPortal","AnimatePresence","TooltipPositioner","TooltipPopup","transition","motion","TooltipArrow"],"mappings":"qRAcA,GAAM,CAACA,EAAiBC,CAAU,CAAA,CAChCC,iBAAqC,gBAAgB,CAAA,CAIvD,SAASC,CAAAA,CAAQC,CAAAA,CAAqB,CACpC,GAAM,CAACC,CAAAA,CAAMC,CAAO,CAAA,CAAIC,kBAAAA,CAAmB,CACzC,KAAA,CAAOH,CAAAA,EAAO,IAAA,CACd,aAAcA,CAAAA,EAAO,WAAA,CACrB,QAAA,CAAUA,CAAAA,EAAO,YACnB,CAAC,EAED,OACEI,GAAAA,CAACR,EAAA,CAAgB,KAAA,CAAO,CAAE,IAAA,CAAAK,CAAAA,CAAM,OAAA,CAAAC,CAAQ,CAAA,CACtC,QAAA,CAAAE,IAACC,OAAAA,CAAiB,IAAA,CAAjB,CACC,WAAA,CAAU,SAAA,CACT,GAAGL,CAAAA,CACJ,YAAA,CAAcE,CAAAA,CAChB,CAAA,CACF,CAEJ,CAIA,SAASI,CAAAA,CAAeN,CAAAA,CAA4B,CAClD,OAAOI,GAAAA,CAACC,QAAiB,OAAA,CAAjB,CAAyB,WAAA,CAAU,iBAAA,CAAmB,GAAGL,CAAAA,CAAO,CAC1E,CAOA,SAASO,CAAAA,CAAcP,CAAAA,CAA2B,CAChD,GAAM,CAAE,IAAA,CAAAC,CAAK,CAAA,CAAIJ,CAAAA,EAAW,CAE5B,OACEO,IAACI,eAAAA,CAAA,CACE,SAAAP,CAAAA,EACCG,GAAAA,CAACC,QAAiB,MAAA,CAAjB,CACC,WAAA,CAAU,gBAAA,CACV,WAAA,CAAW,IAAA,CACV,GAAGL,CAAAA,CACN,CAAA,CAEJ,CAEJ,CAIA,SAASS,EAAkBT,CAAAA,CAA+B,CACxD,OAAOI,GAAAA,CAACC,OAAAA,CAAiB,UAAA,CAAjB,CAA4B,WAAA,CAAU,oBAAA,CAAsB,GAAGL,CAAAA,CAAO,CAChF,CAQA,SAASU,CAAAA,CAAa,CACpB,UAAA,CAAAC,CAAAA,CAAa,CAAE,KAAM,QAAA,CAAU,SAAA,CAAW,GAAA,CAAK,OAAA,CAAS,EAAG,CAAA,CAC3D,GAAGX,CACL,CAAA,CAAsB,CACpB,OACEI,GAAAA,CAACC,OAAAA,CAAiB,MAAjB,CACC,WAAA,CAAU,gBACV,MAAA,CACED,GAAAA,CAACQ,OAAO,GAAA,CAAP,CAEC,OAAA,CAAS,CAAE,OAAA,CAAS,CAAA,CAAG,MAAO,CAAE,CAAA,CAChC,KAAM,CAAE,OAAA,CAAS,EAAG,KAAA,CAAO,EAAI,CAAA,CAC/B,OAAA,CAAS,CAAE,OAAA,CAAS,EAAG,KAAA,CAAO,EAAI,EAClC,UAAA,CAAYD,CAAAA,CACX,GAAGX,CAAAA,CAAAA,CALA,eAMN,CAAA,CAEJ,CAEJ,CAIA,SAASa,EAAab,CAAAA,CAA0B,CAC9C,OAAOI,GAAAA,CAACC,OAAAA,CAAiB,KAAA,CAAjB,CAAuB,WAAA,CAAU,eAAA,CAAiB,GAAGL,CAAAA,CAAO,CACtE","file":"chunk-NTQ2FXS7.js","sourcesContent":["'use client';\r\n\r\nimport * as React from 'react';\r\nimport { Tooltip as TooltipPrimitive } from '@base-ui/react/tooltip';\r\nimport { AnimatePresence, motion, type HTMLMotionProps } from 'motion/react';\r\n\r\nimport { useControlledState } from '@xploreu/hooks/use-controlled-state';\r\nimport { getStrictContext } from '@xploreu/lib/get-strict-context';\r\n\r\ntype TooltipContextType = {\r\n open: boolean;\r\n setOpen: TooltipProps['onOpenChange'];\r\n};\r\n\r\nconst [TooltipProvider, useTooltip] =\r\n getStrictContext<TooltipContextType>('TooltipContext');\r\n\r\ntype TooltipProps = React.ComponentProps<typeof TooltipPrimitive.Root>;\r\n\r\nfunction Tooltip(props: TooltipProps) {\r\n const [open, setOpen] = useControlledState({\r\n value: props?.open,\r\n defaultValue: props?.defaultOpen,\r\n onChange: props?.onOpenChange,\r\n });\r\n\r\n return (\r\n <TooltipProvider value={{ open, setOpen }}>\r\n <TooltipPrimitive.Root\r\n data-slot=\"tooltip\"\r\n {...props}\r\n onOpenChange={setOpen}\r\n />\r\n </TooltipProvider>\r\n );\r\n}\r\n\r\ntype TooltipTriggerProps = React.ComponentProps<typeof TooltipPrimitive.Trigger>;\r\n\r\nfunction TooltipTrigger(props: TooltipTriggerProps) {\r\n return <TooltipPrimitive.Trigger data-slot=\"tooltip-trigger\" {...props} />;\r\n}\r\n\r\ntype TooltipPortalProps = Omit<\r\n React.ComponentProps<typeof TooltipPrimitive.Portal>,\r\n 'keepMounted'\r\n>;\r\n\r\nfunction TooltipPortal(props: TooltipPortalProps) {\r\n const { open } = useTooltip();\r\n\r\n return (\r\n <AnimatePresence>\r\n {open && (\r\n <TooltipPrimitive.Portal\r\n data-slot=\"tooltip-portal\"\r\n keepMounted\r\n {...props}\r\n />\r\n )}\r\n </AnimatePresence>\r\n );\r\n}\r\n\r\ntype TooltipPositionerProps = React.ComponentProps<typeof TooltipPrimitive.Positioner>;\r\n\r\nfunction TooltipPositioner(props: TooltipPositionerProps) {\r\n return <TooltipPrimitive.Positioner data-slot=\"tooltip-positioner\" {...props} />;\r\n}\r\n\r\ntype TooltipPopupProps = Omit<\r\n React.ComponentProps<typeof TooltipPrimitive.Popup>,\r\n 'render'\r\n> &\r\n HTMLMotionProps<'div'>;\r\n\r\nfunction TooltipPopup({\r\n transition = { type: 'spring', stiffness: 300, damping: 25 },\r\n ...props\r\n}: TooltipPopupProps) {\r\n return (\r\n <TooltipPrimitive.Popup\r\n data-slot=\"tooltip-popup\"\r\n render={\r\n <motion.div\r\n key=\"tooltip-popup\"\r\n animate={{ opacity: 1, scale: 1 }}\r\n exit={{ opacity: 0, scale: 0.5 }}\r\n initial={{ opacity: 0, scale: 0.5 }}\r\n transition={transition}\r\n {...props}\r\n />\r\n }\r\n />\r\n );\r\n}\r\n\r\ntype TooltipArrowProps = React.ComponentProps<typeof TooltipPrimitive.Arrow>;\r\n\r\nfunction TooltipArrow(props: TooltipArrowProps) {\r\n return <TooltipPrimitive.Arrow data-slot=\"tooltip-arrow\" {...props} />;\r\n}\r\n\r\nexport {\r\n Tooltip,\r\n TooltipTrigger,\r\n TooltipPortal,\r\n TooltipPositioner,\r\n TooltipPopup,\r\n TooltipArrow,\r\n type TooltipProps,\r\n type TooltipTriggerProps,\r\n type TooltipPortalProps,\r\n type TooltipPositionerProps,\r\n type TooltipPopupProps,\r\n type TooltipArrowProps,\r\n};\r\n"]}
@@ -1,2 +1,2 @@
1
- import {b,d,e,f,g,h}from'./chunk-G6HDEOYZ.js';import {b as b$1}from'./chunk-HUWF445V.js';import'react';import {jsx,jsxs}from'react/jsx-runtime';function z({inputRef:t,name:u,label:s,control:c,description:T,size:r,type:f$1,variant:I,startContent:P,endContent:V,className:y,classNameInput:N,placeholder:C,disabled:g$1}){return jsx(b,{control:c,name:u,render:({field:l})=>jsxs(d,{className:y,children:[s&&jsx(e,{size:r,children:s}),jsx(f,{children:jsx(b$1,{className:N,disabled:g$1,endContent:V,placeholder:C,size:r,startContent:P,type:f$1,variant:I,...l,ref:o=>{l.ref(o),t&&(typeof t=="function"?t(o):t.current=o);}})}),jsx(g,{size:r,children:T}),jsx(h,{size:r})]})})}export{z as a};//# sourceMappingURL=chunk-J6UNQSKZ.js.map
2
- //# sourceMappingURL=chunk-J6UNQSKZ.js.map
1
+ import {b,d,e,f,g,h}from'./chunk-G6HDEOYZ.js';import {b as b$1}from'./chunk-JH6RZ3QH.js';import'react';import {jsx,jsxs}from'react/jsx-runtime';function z({inputRef:t,name:u,label:s,control:c,description:T,size:r,type:f$1,variant:I,startContent:P,endContent:V,className:y,classNameInput:N,placeholder:C,disabled:g$1}){return jsx(b,{control:c,name:u,render:({field:l})=>jsxs(d,{className:y,children:[s&&jsx(e,{size:r,children:s}),jsx(f,{children:jsx(b$1,{className:N,disabled:g$1,endContent:V,placeholder:C,size:r,startContent:P,type:f$1,variant:I,...l,ref:o=>{l.ref(o),t&&(typeof t=="function"?t(o):t.current=o);}})}),jsx(g,{size:r,children:T}),jsx(h,{size:r})]})})}export{z as a};//# sourceMappingURL=chunk-PJYKUR4F.js.map
2
+ //# sourceMappingURL=chunk-PJYKUR4F.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/form/form-input.tsx"],"names":["FormInput","inputRef","name","label","control","description","size","type","variant","startContent","endContent","className","classNameInput","placeholder","disabled","jsx","FormField","field","jsxs","FormItem","FormLabel","FormControl","Input","e","FormDescription","FormMessage"],"mappings":"gJAkCA,SAASA,CAAAA,CAAmF,CAC1F,QAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,GAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,WAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,GACF,CAAA,CAAwC,CACtC,OACEC,GAAAA,CAACC,CAAAA,CAAA,CACC,OAAA,CAASZ,CAAAA,CACT,IAAA,CAAMF,CAAAA,CACN,MAAA,CAAQ,CAAC,CAAE,KAAA,CAAAe,CAAM,CAAA,GAEbC,IAAAA,CAACC,CAAAA,CAAA,CAAS,SAAA,CAAWR,CAAAA,CAClB,QAAA,CAAA,CAAAR,CAAAA,EACCY,IAACK,CAAAA,CAAA,CAAU,IAAA,CAAMd,CAAAA,CACd,QAAA,CAAAH,CAAAA,CACH,CAAA,CAEFY,GAAAA,CAACM,CAAAA,CAAA,CACC,QAAA,CAAAN,GAAAA,CAACO,GAAAA,CAAA,CACC,SAAA,CAAWV,CAAAA,CACX,QAAA,CAAUE,GAAAA,CACV,UAAA,CAAYJ,CAAAA,CACZ,WAAA,CAAaG,CAAAA,CACb,IAAA,CAAMP,CAAAA,CACN,YAAA,CAAcG,CAAAA,CACd,IAAA,CAAMF,GAAAA,CACN,OAAA,CAASC,CAAAA,CACR,GAAGS,CAAAA,CACJ,IAAMM,CAAAA,EAAM,CACVN,CAAAA,CAAM,GAAA,CAAIM,CAAC,CAAA,CACPtB,CAAAA,GACE,OAAOA,CAAAA,EAAa,UAAA,CACtBA,CAAAA,CAASsB,CAAC,CAAA,CAEVtB,CAAAA,CAAS,OAAA,CAAUsB,CAAAA,EAGzB,EACF,CAAA,CACF,CAAA,CACAR,GAAAA,CAACS,CAAAA,CAAA,CAAgB,IAAA,CAAMlB,CAAAA,CACpB,QAAA,CAAAD,CAAAA,CACH,CAAA,CACAU,GAAAA,CAACU,CAAAA,CAAA,CAAY,IAAA,CAAMnB,CAAAA,CAAM,CAAA,CAAA,CAC3B,EAGN,CAEJ","file":"chunk-J6UNQSKZ.js","sourcesContent":["\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport type {\r\n FieldPath,\r\n FieldValues,\r\n UseControllerProps\r\n} from \"react-hook-form\"\r\n\r\nimport {\r\n FormControl,\r\n FormDescription,\r\n FormField,\r\n FormItem,\r\n FormLabel,\r\n FormMessage,\r\n} from \"./form\"\r\nimport { Input } from \"../ui/input\"\r\n\r\ntype FormInputProps<\r\n TFieldValues extends FieldValues,\r\n TName extends FieldPath<TFieldValues>\r\n> = {\r\n inputRef?: React.Ref<HTMLInputElement>;\r\n label?: string;\r\n description?: string;\r\n placeholder?: string;\r\n type?: React.HTMLInputTypeAttribute;\r\n className?: string;\r\n classNameInput?: string;\r\n size?: \"sm\" | \"md\";\r\n} & UseControllerProps<TFieldValues, TName>\r\n & Omit<React.ComponentProps<typeof Input>, \"size\">\r\n\r\nfunction FormInput<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>>({\r\n inputRef,\r\n name,\r\n label,\r\n control,\r\n description,\r\n size,\r\n type,\r\n variant,\r\n startContent,\r\n endContent,\r\n className,\r\n classNameInput,\r\n placeholder,\r\n disabled,\r\n}: FormInputProps<TFieldValues, TName>) {\r\n return (\r\n <FormField\r\n control={control}\r\n name={name}\r\n render={({ field }) => {\r\n return (\r\n <FormItem className={className}>\r\n {label && (\r\n <FormLabel size={size}>\r\n {label}\r\n </FormLabel>\r\n )}\r\n <FormControl>\r\n <Input\r\n className={classNameInput}\r\n disabled={disabled}\r\n endContent={endContent}\r\n placeholder={placeholder}\r\n size={size}\r\n startContent={startContent}\r\n type={type}\r\n variant={variant}\r\n {...field}\r\n ref={(e) => {\r\n field.ref(e)\r\n if (inputRef) {\r\n if (typeof inputRef === \"function\") {\r\n inputRef(e)\r\n } else {\r\n inputRef.current = e\r\n }\r\n }\r\n }}\r\n />\r\n </FormControl>\r\n <FormDescription size={size}>\r\n {description}\r\n </FormDescription>\r\n <FormMessage size={size} />\r\n </FormItem>\r\n )\r\n }}\r\n />\r\n )\r\n}\r\n\r\nexport { FormInput }\r\nexport type { FormInputProps }\r\n"]}
1
+ {"version":3,"sources":["../src/form/form-input.tsx"],"names":["FormInput","inputRef","name","label","control","description","size","type","variant","startContent","endContent","className","classNameInput","placeholder","disabled","jsx","FormField","field","jsxs","FormItem","FormLabel","FormControl","Input","e","FormDescription","FormMessage"],"mappings":"gJAkCA,SAASA,CAAAA,CAAmF,CAC1F,QAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,KAAA,CAAAC,CAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,CAAAA,CACA,IAAA,CAAAC,GAAAA,CACA,OAAA,CAAAC,CAAAA,CACA,YAAA,CAAAC,CAAAA,CACA,WAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,cAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,GACF,CAAA,CAAwC,CACtC,OACEC,GAAAA,CAACC,CAAAA,CAAA,CACC,OAAA,CAASZ,CAAAA,CACT,IAAA,CAAMF,CAAAA,CACN,MAAA,CAAQ,CAAC,CAAE,KAAA,CAAAe,CAAM,CAAA,GAEbC,IAAAA,CAACC,CAAAA,CAAA,CAAS,SAAA,CAAWR,CAAAA,CAClB,QAAA,CAAA,CAAAR,CAAAA,EACCY,IAACK,CAAAA,CAAA,CAAU,IAAA,CAAMd,CAAAA,CACd,QAAA,CAAAH,CAAAA,CACH,CAAA,CAEFY,GAAAA,CAACM,CAAAA,CAAA,CACC,QAAA,CAAAN,GAAAA,CAACO,GAAAA,CAAA,CACC,SAAA,CAAWV,CAAAA,CACX,QAAA,CAAUE,GAAAA,CACV,UAAA,CAAYJ,CAAAA,CACZ,WAAA,CAAaG,CAAAA,CACb,IAAA,CAAMP,CAAAA,CACN,YAAA,CAAcG,CAAAA,CACd,IAAA,CAAMF,GAAAA,CACN,OAAA,CAASC,CAAAA,CACR,GAAGS,CAAAA,CACJ,IAAMM,CAAAA,EAAM,CACVN,CAAAA,CAAM,GAAA,CAAIM,CAAC,CAAA,CACPtB,CAAAA,GACE,OAAOA,CAAAA,EAAa,UAAA,CACtBA,CAAAA,CAASsB,CAAC,CAAA,CAEVtB,CAAAA,CAAS,OAAA,CAAUsB,CAAAA,EAGzB,EACF,CAAA,CACF,CAAA,CACAR,GAAAA,CAACS,CAAAA,CAAA,CAAgB,IAAA,CAAMlB,CAAAA,CACpB,QAAA,CAAAD,CAAAA,CACH,CAAA,CACAU,GAAAA,CAACU,CAAAA,CAAA,CAAY,IAAA,CAAMnB,CAAAA,CAAM,CAAA,CAAA,CAC3B,EAGN,CAEJ","file":"chunk-PJYKUR4F.js","sourcesContent":["\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport type {\r\n FieldPath,\r\n FieldValues,\r\n UseControllerProps\r\n} from \"react-hook-form\"\r\n\r\nimport {\r\n FormControl,\r\n FormDescription,\r\n FormField,\r\n FormItem,\r\n FormLabel,\r\n FormMessage,\r\n} from \"./form\"\r\nimport { Input } from \"../ui/input\"\r\n\r\ntype FormInputProps<\r\n TFieldValues extends FieldValues,\r\n TName extends FieldPath<TFieldValues>\r\n> = {\r\n inputRef?: React.Ref<HTMLInputElement>;\r\n label?: string;\r\n description?: string;\r\n placeholder?: string;\r\n type?: React.HTMLInputTypeAttribute;\r\n className?: string;\r\n classNameInput?: string;\r\n size?: \"sm\" | \"md\";\r\n} & UseControllerProps<TFieldValues, TName>\r\n & Omit<React.ComponentProps<typeof Input>, \"size\">\r\n\r\nfunction FormInput<TFieldValues extends FieldValues, TName extends FieldPath<TFieldValues>>({\r\n inputRef,\r\n name,\r\n label,\r\n control,\r\n description,\r\n size,\r\n type,\r\n variant,\r\n startContent,\r\n endContent,\r\n className,\r\n classNameInput,\r\n placeholder,\r\n disabled,\r\n}: FormInputProps<TFieldValues, TName>) {\r\n return (\r\n <FormField\r\n control={control}\r\n name={name}\r\n render={({ field }) => {\r\n return (\r\n <FormItem className={className}>\r\n {label && (\r\n <FormLabel size={size}>\r\n {label}\r\n </FormLabel>\r\n )}\r\n <FormControl>\r\n <Input\r\n className={classNameInput}\r\n disabled={disabled}\r\n endContent={endContent}\r\n placeholder={placeholder}\r\n size={size}\r\n startContent={startContent}\r\n type={type}\r\n variant={variant}\r\n {...field}\r\n ref={(e) => {\r\n field.ref(e)\r\n if (inputRef) {\r\n if (typeof inputRef === \"function\") {\r\n inputRef(e)\r\n } else {\r\n inputRef.current = e\r\n }\r\n }\r\n }}\r\n />\r\n </FormControl>\r\n <FormDescription size={size}>\r\n {description}\r\n </FormDescription>\r\n <FormMessage size={size} />\r\n </FormItem>\r\n )\r\n }}\r\n />\r\n )\r\n}\r\n\r\nexport { FormInput }\r\nexport type { FormInputProps }\r\n"]}
@@ -1,2 +1,2 @@
1
- import {d as d$1,e,p,h,t as t$1,v,z}from'./chunk-ISGXRZLJ.js';import {a}from'./chunk-HUWF445V.js';import*as t from'react';import*as C from'react-phone-number-input';import Y from'react-phone-number-input/flags';import {cn}from'@xploreu/lib/cn';import'@base-ui/react/combobox';import {ChevronsUpDownIcon}from'lucide-react';import {jsx,jsxs}from'react/jsx-runtime';var R=({country:l,countryName:o})=>{let s=l?Y[l]:void 0;return jsx("span",{className:"flex h-4 w-6 shrink-0 overflow-hidden rounded-sm bg-fg-quaternary/20 [&_svg:not([class*='size-'])]:size-full",children:s&&jsx(s,{title:o})})},d=44,k=288,H=6;function D({disabled:l,value:o,options:s,onChange:i}){let[c,r]=t.useState(false),[b,g]=t.useState(""),[y,N]=t.useState(0),v$1=t.useRef(null),m=t.useMemo(()=>s.filter(e=>!!e.value),[s]),u=t.useMemo(()=>{let e=b.trim().toLowerCase();return e?m.filter(a=>{let f=C.getCountryCallingCode(a.value);return a.label.toLowerCase().includes(e)||a.value.toLowerCase().includes(e)||f.includes(e.replace(/^\+/,""))}):m},[b,m]),_=t.useMemo(()=>m.find(e=>e.value===o)??null,[m,o]);t.useEffect(()=>{N(0),v$1.current&&(v$1.current.scrollTop=0);},[b]);let z$1=Math.min(u.length*d,k),h$1=t.useMemo(()=>{let e=Math.floor(y/d),a=Math.max(0,e-H),f=Math.ceil(k/d),P=Math.min(u.length,e+f+H);return {startIndex:a,endIndex:P,items:u.slice(a,P)}},[u,y]),F=h$1.startIndex*d,U=Math.max(0,(u.length-h$1.endIndex)*d),q=t.useCallback(e=>{e?.value&&(i(e.value),g(""),r(false));},[i]);return jsxs(d$1,{behavior:"default",disabled:l,inputValue:b,items:u,open:c,value:_,virtualized:true,filter:null,isItemEqualToValue:(e,a)=>e.value===a.value,openOnInputClick:false,onValueChange:q,onInputValueChange:g,onOpenChange:e=>{r(e),e||g("");},children:[jsx(e,{render:jsxs("button",{type:"button",className:cn(a(),"h-11 w-18 shrink-0 justify-between gap-1 rounded-r-none border-r-0 px-3","hover:bg-bg-primary-hover focus-visible:z-10 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-brand","disabled:pointer-events-none disabled:opacity-50"),disabled:l,children:[jsxs("span",{className:"flex items-center gap-1.5 overflow-hidden",children:[jsx(R,{country:o,countryName:o}),o&&jsx("span",{className:"text-body-medium-3 text-text-primary",children:o})]}),jsx(ChevronsUpDownIcon,{className:"size-3.5 shrink-0 text-fg-quaternary"})]})}),jsxs(p,{className:"w-72",children:[jsx(h,{placeholder:"Search country...","aria-label":"Search country"}),jsx(t$1,{status:u.length===0?"empty":null}),jsx(v,{ref:v$1,className:"relative gap-0",style:{height:z$1},onScroll:e=>N(e.currentTarget.scrollTop),children:jsx("div",{className:"flex w-full shrink-0 flex-col",style:{paddingTop:F,paddingBottom:U},children:h$1.items.map((e,a)=>{let f=h$1.startIndex+a;return jsx(z,{index:f,value:e,children:jsxs("div",{className:"flex items-center gap-2 w-full min-w-0",children:[jsx(R,{country:e.value,countryName:e.label}),jsx("span",{className:"flex-1 text-sm truncate",children:e.label}),jsxs("span",{className:"text-sm text-text-tertiary shrink-0",children:["+",C.getCountryCallingCode(e.value)]})]})},e.value)})})})]})]})}var L=t.forwardRef(({className:l,onChange:o,...s},i)=>{let c=t.useCallback(r=>{r.currentTarget.value==="+"&&(r.currentTarget.value=""),o?.(r);},[o]);return jsx("input",{className:cn(a(),"h-11 flex-1 rounded-l-none text-body-regular-2",l),ref:i,type:"tel",onChange:c,...s})});L.displayName="InputComponent";var G=t.forwardRef(({className:l,onChange:o,value:s,...i},c)=>jsx(C.default,{ref:c,className:cn("flex w-full min-w-0 items-center",l),flagComponent:R,countrySelectComponent:D,inputComponent:L,smartCaret:false,value:s||void 0,onChange:r=>o?.(r||""),...i}));G.displayName="PhoneInput";export{G as a};//# sourceMappingURL=chunk-Y4HXGKZD.js.map
2
- //# sourceMappingURL=chunk-Y4HXGKZD.js.map
1
+ import {d as d$1,e,p,h,t as t$1,v,z}from'./chunk-746IQSMF.js';import {a}from'./chunk-JH6RZ3QH.js';import*as t from'react';import*as C from'react-phone-number-input';import Y from'react-phone-number-input/flags';import {cn}from'@xploreu/lib/cn';import'@base-ui/react/combobox';import {ChevronsUpDownIcon}from'lucide-react';import {jsx,jsxs}from'react/jsx-runtime';var R=({country:l,countryName:o})=>{let s=l?Y[l]:void 0;return jsx("span",{className:"flex h-4 w-6 shrink-0 overflow-hidden rounded-sm bg-fg-quaternary/20 [&_svg:not([class*='size-'])]:size-full",children:s&&jsx(s,{title:o})})},d=44,k=288,H=6;function D({disabled:l,value:o,options:s,onChange:i}){let[c,r]=t.useState(false),[b,g]=t.useState(""),[y,N]=t.useState(0),v$1=t.useRef(null),m=t.useMemo(()=>s.filter(e=>!!e.value),[s]),u=t.useMemo(()=>{let e=b.trim().toLowerCase();return e?m.filter(a=>{let f=C.getCountryCallingCode(a.value);return a.label.toLowerCase().includes(e)||a.value.toLowerCase().includes(e)||f.includes(e.replace(/^\+/,""))}):m},[b,m]),_=t.useMemo(()=>m.find(e=>e.value===o)??null,[m,o]);t.useEffect(()=>{N(0),v$1.current&&(v$1.current.scrollTop=0);},[b]);let z$1=Math.min(u.length*d,k),h$1=t.useMemo(()=>{let e=Math.floor(y/d),a=Math.max(0,e-H),f=Math.ceil(k/d),P=Math.min(u.length,e+f+H);return {startIndex:a,endIndex:P,items:u.slice(a,P)}},[u,y]),F=h$1.startIndex*d,U=Math.max(0,(u.length-h$1.endIndex)*d),q=t.useCallback(e=>{e?.value&&(i(e.value),g(""),r(false));},[i]);return jsxs(d$1,{behavior:"default",disabled:l,inputValue:b,items:u,open:c,value:_,virtualized:true,filter:null,isItemEqualToValue:(e,a)=>e.value===a.value,openOnInputClick:false,onValueChange:q,onInputValueChange:g,onOpenChange:e=>{r(e),e||g("");},children:[jsx(e,{render:jsxs("button",{type:"button",className:cn(a(),"h-11 w-18 shrink-0 justify-between gap-1 rounded-r-none border-r-0 px-3","hover:bg-bg-primary-hover focus-visible:z-10 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-brand","disabled:pointer-events-none disabled:opacity-50"),disabled:l,children:[jsxs("span",{className:"flex items-center gap-1.5 overflow-hidden",children:[jsx(R,{country:o,countryName:o}),o&&jsx("span",{className:"text-body-medium-3 text-text-primary",children:o})]}),jsx(ChevronsUpDownIcon,{className:"size-3.5 shrink-0 text-fg-quaternary"})]})}),jsxs(p,{className:"w-72",children:[jsx(h,{placeholder:"Search country...","aria-label":"Search country"}),jsx(t$1,{status:u.length===0?"empty":null}),jsx(v,{ref:v$1,className:"relative gap-0",style:{height:z$1},onScroll:e=>N(e.currentTarget.scrollTop),children:jsx("div",{className:"flex w-full shrink-0 flex-col",style:{paddingTop:F,paddingBottom:U},children:h$1.items.map((e,a)=>{let f=h$1.startIndex+a;return jsx(z,{index:f,value:e,children:jsxs("div",{className:"flex items-center gap-2 w-full min-w-0",children:[jsx(R,{country:e.value,countryName:e.label}),jsx("span",{className:"flex-1 text-sm truncate",children:e.label}),jsxs("span",{className:"text-sm text-text-tertiary shrink-0",children:["+",C.getCountryCallingCode(e.value)]})]})},e.value)})})})]})]})}var L=t.forwardRef(({className:l,onChange:o,...s},i)=>{let c=t.useCallback(r=>{r.currentTarget.value==="+"&&(r.currentTarget.value=""),o?.(r);},[o]);return jsx("input",{className:cn(a(),"h-11 flex-1 rounded-l-none text-body-regular-2",l),ref:i,type:"tel",onChange:c,...s})});L.displayName="InputComponent";var G=t.forwardRef(({className:l,onChange:o,value:s,...i},c)=>jsx(C.default,{ref:c,className:cn("flex w-full min-w-0 items-center",l),flagComponent:R,countrySelectComponent:D,inputComponent:L,smartCaret:false,value:s||void 0,onChange:r=>o?.(r||""),...i}));G.displayName="PhoneInput";export{G as a};//# sourceMappingURL=chunk-VE5ZAJ35.js.map
2
+ //# sourceMappingURL=chunk-VE5ZAJ35.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/composites/phone-input.tsx"],"names":["FlagComponent","country","countryName","Flag","flags","jsx","COUNTRY_ROW_HEIGHT","COUNTRY_LIST_HEIGHT","COUNTRY_OVERSCAN","CountrySelect","disabled","selectedCountry","countryList","onChange","open","setOpen","inputValue","setInputValue","scrollTop","setScrollTop","listRef","items","item","filteredItems","search","callingCode","value","listHeight","virtualRange","visibleStartIndex","startIndex","visibleCount","endIndex","paddingTop","paddingBottom","handleValueChange","jsxs","Combobox","a","b","ComboboxTrigger","cn","inputVariants","ChevronsUpDownIcon","ComboboxPopup","ComboboxInput","ComboboxStatus","ComboboxList","event","virtualIndex","index","ComboboxItem","InputComponent","className","props","ref","handleChange","PhoneInput"],"mappings":"2WAoCA,IAAMA,EAAgB,CAAC,CAAE,OAAA,CAAAC,CAAAA,CAAS,YAAAC,CAAY,CAAA,GAA0B,CACtE,IAAMC,EAAOF,CAAAA,CAAUG,CAAAA,CAAMH,CAAO,CAAA,CAAI,MAAA,CAExC,OACEI,GAAAA,CAAC,MAAA,CAAA,CAAK,UAAU,8GAAA,CACb,QAAA,CAAAF,CAAAA,EAAQE,GAAAA,CAACF,EAAA,CAAK,KAAA,CAAOD,CAAAA,CAAa,CAAA,CACrC,CAEJ,CAAA,CASMI,CAAAA,CAAqB,EAAA,CACrBC,CAAAA,CAAsB,IACtBC,CAAAA,CAAmB,CAAA,CASzB,SAASC,CAAAA,CAAc,CACrB,QAAA,CAAAC,CAAAA,CACA,KAAA,CAAOC,CAAAA,CACP,QAASC,CAAAA,CACT,QAAA,CAAAC,CACF,CAAA,CAAuB,CACrB,GAAM,CAACC,CAAAA,CAAMC,CAAO,CAAA,CAAU,CAAA,CAAA,QAAA,CAAS,KAAK,CAAA,CACtC,CAACC,CAAAA,CAAYC,CAAa,CAAA,CAAU,CAAA,CAAA,QAAA,CAAS,EAAE,CAAA,CAC/C,CAACC,CAAAA,CAAWC,CAAY,EAAU,CAAA,CAAA,QAAA,CAAS,CAAC,CAAA,CAC5CC,GAAAA,CAAgB,SAAuB,IAAI,CAAA,CAE3CC,CAAAA,CAAc,CAAA,CAAA,OAAA,CAClB,IAAMT,CAAAA,CAAY,MAAA,CAAQU,CAAAA,EA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CACAW,CACF,CAAA,CACA,GAAA,CAAKE,EACL,IAAA,CAAK,KAAA,CACL,QAAA,CAAUC,CAAAA,CACT,GAAGF,CAAAA,CACN,CAEJ,CAAC,CAAA,CACDF,EAAe,WAAA,CAAc,gBAAA,CAM7B,IAAMK,CAAAA,CACE,aAGJ,CAAC,CACD,SAAA,CAAAJ,CAAAA,CACA,SAAAxC,CAAAA,CACA,KAAA,CAAAa,CAAAA,CACA,GAAG4B,CACL,CAAA,CAAGC,CAAAA,GAEClD,GAAAA,CAAU,UAAT,CACC,GAAA,CAAKkD,CAAAA,CACL,SAAA,CAAWd,GACT,kCAAA,CACAY,CACF,CAAA,CACA,aAAA,CAAerD,EACf,sBAAA,CAAwBS,CAAAA,CACxB,cAAA,CAAgB2C,CAAAA,CAChB,WAAY,KAAA,CACZ,KAAA,CAAO1B,CAAAA,EAAS,MAAA,CAChB,SAAWA,CAAAA,EAAUb,CAAAA,GAAWa,CAAAA,EAAU,EAAqB,EAC9D,GAAG4B,CAAAA,CACN,CAEH,EACHG,EAAW,WAAA,CAAc,YAAA","file":"chunk-Y4HXGKZD.js","sourcesContent":["\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as RPNInput from \"react-phone-number-input\"\r\nimport flags from \"react-phone-number-input/flags\"\r\n\r\nimport { cn } from \"@xploreu/lib/cn\"\r\nimport { Combobox as ComboboxPrimitive } from \"@base-ui/react/combobox\"\r\nimport {\r\n Combobox,\r\n ComboboxInput,\r\n ComboboxItem,\r\n ComboboxList,\r\n ComboboxPopup,\r\n ComboboxStatus,\r\n ComboboxTrigger,\r\n} from \"../ui/combobox\"\r\nimport { inputVariants } from \"../ui/input\"\r\nimport { ChevronsUpDownIcon } from \"lucide-react\"\r\n\r\n// ---------------------------------------------------------------------------\r\n// Types\r\n// ---------------------------------------------------------------------------\r\n\r\ntype PhoneInputProps = Omit<\r\n React.ComponentProps<\"input\">,\r\n \"onChange\" | \"value\" | \"ref\"\r\n> &\r\n Omit<RPNInput.Props<typeof RPNInput.default>, \"onChange\"> & {\r\n onChange?: (value: RPNInput.Value) => void\r\n }\r\n\r\n// ---------------------------------------------------------------------------\r\n// Flag\r\n// ---------------------------------------------------------------------------\r\n\r\nconst FlagComponent = ({ country, countryName }: RPNInput.FlagProps) => {\r\n const Flag = country ? flags[country] : undefined\r\n\r\n return (\r\n <span className=\"flex h-4 w-6 shrink-0 overflow-hidden rounded-sm bg-fg-quaternary/20 [&_svg:not([class*='size-'])]:size-full\">\r\n {Flag && <Flag title={countryName} />}\r\n </span>\r\n )\r\n}\r\n\r\n// ---------------------------------------------------------------------------\r\n// Country Select — uses base-ui Combobox\r\n// ---------------------------------------------------------------------------\r\n\r\ntype CountryEntry = { label: string; value: RPNInput.Country | undefined }\r\ntype CountryItem = { label: string; value: RPNInput.Country }\r\n\r\nconst COUNTRY_ROW_HEIGHT = 44\r\nconst COUNTRY_LIST_HEIGHT = 288\r\nconst COUNTRY_OVERSCAN = 6\r\n\r\ntype CountrySelectProps = {\r\n disabled?: boolean\r\n value: RPNInput.Country\r\n options: CountryEntry[]\r\n onChange: (country: RPNInput.Country) => void\r\n}\r\n\r\nfunction CountrySelect({\r\n disabled,\r\n value: selectedCountry,\r\n options: countryList,\r\n onChange,\r\n}: CountrySelectProps) {\r\n const [open, setOpen] = React.useState(false)\r\n const [inputValue, setInputValue] = React.useState(\"\")\r\n const [scrollTop, setScrollTop] = React.useState(0)\r\n const listRef = React.useRef<HTMLDivElement>(null)\r\n\r\n const items = React.useMemo(\r\n () => countryList.filter((item): item is CountryItem => Boolean(item.value)),\r\n [countryList]\r\n )\r\n\r\n const filteredItems = React.useMemo(() => {\r\n const search = inputValue.trim().toLowerCase()\r\n\r\n if (!search) return items\r\n\r\n return items.filter((item) => {\r\n const callingCode = RPNInput.getCountryCallingCode(item.value)\r\n\r\n return item.label.toLowerCase().includes(search)\r\n || item.value.toLowerCase().includes(search)\r\n || callingCode.includes(search.replace(/^\\+/, \"\"))\r\n })\r\n }, [inputValue, items])\r\n\r\n const value = React.useMemo(\r\n () => items.find((item) => item.value === selectedCountry) ?? null,\r\n [items, selectedCountry]\r\n )\r\n\r\n React.useEffect(() => {\r\n setScrollTop(0)\r\n if (listRef.current) listRef.current.scrollTop = 0\r\n }, [inputValue])\r\n\r\n const listHeight = Math.min(\r\n filteredItems.length * COUNTRY_ROW_HEIGHT,\r\n COUNTRY_LIST_HEIGHT\r\n )\r\n\r\n const virtualRange = React.useMemo(() => {\r\n const visibleStartIndex = Math.floor(scrollTop / COUNTRY_ROW_HEIGHT)\r\n const startIndex = Math.max(\r\n 0,\r\n visibleStartIndex - COUNTRY_OVERSCAN\r\n )\r\n const visibleCount = Math.ceil(COUNTRY_LIST_HEIGHT / COUNTRY_ROW_HEIGHT)\r\n const endIndex = Math.min(\r\n filteredItems.length,\r\n visibleStartIndex + visibleCount + COUNTRY_OVERSCAN\r\n )\r\n\r\n return {\r\n startIndex,\r\n endIndex,\r\n items: filteredItems.slice(startIndex, endIndex),\r\n }\r\n }, [filteredItems, scrollTop])\r\n\r\n const paddingTop = virtualRange.startIndex * COUNTRY_ROW_HEIGHT\r\n const paddingBottom = Math.max(\r\n 0,\r\n (filteredItems.length - virtualRange.endIndex) * COUNTRY_ROW_HEIGHT\r\n )\r\n\r\n const handleValueChange = React.useCallback(\r\n (item: CountryItem | null) => {\r\n if (!item?.value) return\r\n\r\n onChange(item.value)\r\n setInputValue(\"\")\r\n setOpen(false)\r\n },\r\n [onChange]\r\n )\r\n\r\n return (\r\n <Combobox\r\n behavior=\"default\"\r\n disabled={disabled}\r\n inputValue={inputValue}\r\n items={filteredItems}\r\n open={open}\r\n value={value}\r\n virtualized\r\n filter={null}\r\n isItemEqualToValue={(a, b) => a.value === b.value}\r\n openOnInputClick={false}\r\n onValueChange={handleValueChange}\r\n onInputValueChange={setInputValue}\r\n onOpenChange={(open) => {\r\n setOpen(open)\r\n if (!open) setInputValue(\"\")\r\n }}\r\n >\r\n {/* Visible trigger button styled as part of the input */}\r\n <ComboboxTrigger\r\n render={\r\n <button\r\n type=\"button\"\r\n className={cn(\r\n inputVariants(),\r\n \"h-11 w-18 shrink-0 justify-between gap-1 rounded-r-none border-r-0 px-3\",\r\n \"hover:bg-bg-primary-hover focus-visible:z-10 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-brand\",\r\n \"disabled:pointer-events-none disabled:opacity-50\"\r\n )}\r\n disabled={disabled}\r\n >\r\n <span className=\"flex items-center gap-1.5 overflow-hidden\">\r\n <FlagComponent\r\n country={selectedCountry}\r\n countryName={selectedCountry}\r\n />\r\n {selectedCountry && (\r\n <span className=\"text-body-medium-3 text-text-primary\">\r\n {selectedCountry}\r\n </span>\r\n )}\r\n </span>\r\n <ChevronsUpDownIcon className=\"size-3.5 shrink-0 text-fg-quaternary\" />\r\n </button>\r\n }\r\n />\r\n\r\n {/* Dropdown content */}\r\n <ComboboxPopup className=\"w-72\">\r\n <ComboboxInput\r\n placeholder=\"Search country...\"\r\n aria-label=\"Search country\"\r\n />\r\n <ComboboxStatus status={filteredItems.length === 0 ? \"empty\" : null} />\r\n <ComboboxList\r\n ref={listRef}\r\n className=\"relative gap-0\"\r\n style={{ height: listHeight }}\r\n onScroll={(event) => setScrollTop(event.currentTarget.scrollTop)}\r\n >\r\n <div\r\n className=\"flex w-full shrink-0 flex-col\"\r\n style={{ paddingTop, paddingBottom }}\r\n >\r\n {virtualRange.items.map((item, virtualIndex) => {\r\n const index = virtualRange.startIndex + virtualIndex\r\n\r\n return (\r\n <ComboboxItem\r\n key={item.value}\r\n index={index}\r\n value={item}\r\n >\r\n <div className=\"flex items-center gap-2 w-full min-w-0\">\r\n <FlagComponent country={item.value} countryName={item.label} />\r\n <span className=\"flex-1 text-sm truncate\">{item.label}</span>\r\n <span className=\"text-sm text-text-tertiary shrink-0\">\r\n +{RPNInput.getCountryCallingCode(item.value)}\r\n </span>\r\n </div>\r\n </ComboboxItem>\r\n )\r\n })}\r\n </div>\r\n </ComboboxList>\r\n </ComboboxPopup>\r\n </Combobox >\r\n )\r\n}\r\n\r\n// ---------------------------------------------------------------------------\r\n// Input Component\r\n// ---------------------------------------------------------------------------\r\n\r\nconst InputComponent = React.forwardRef<\r\n HTMLInputElement,\r\n React.ComponentProps<\"input\">\r\n>(({ className, onChange, ...props }, ref) => {\r\n const handleChange = React.useCallback(\r\n (event: React.ChangeEvent<HTMLInputElement>) => {\r\n if (event.currentTarget.value === \"+\") {\r\n event.currentTarget.value = \"\"\r\n }\r\n\r\n onChange?.(event)\r\n },\r\n [onChange]\r\n )\r\n\r\n return (\r\n <input\r\n className={cn(\r\n inputVariants(),\r\n \"h-11 flex-1 rounded-l-none text-body-regular-2\",\r\n className\r\n )}\r\n ref={ref}\r\n type=\"tel\"\r\n onChange={handleChange}\r\n {...props}\r\n />\r\n )\r\n})\r\nInputComponent.displayName = \"InputComponent\"\r\n\r\n// ---------------------------------------------------------------------------\r\n// Phone Input\r\n// ---------------------------------------------------------------------------\r\n\r\nconst PhoneInput: React.ForwardRefExoticComponent<PhoneInputProps> =\r\n React.forwardRef<\r\n React.ElementRef<typeof RPNInput.default>,\r\n PhoneInputProps\r\n >(({\r\n className,\r\n onChange,\r\n value,\r\n ...props\r\n }, ref) => {\r\n return (\r\n <RPNInput.default\r\n ref={ref}\r\n className={cn(\r\n \"flex w-full min-w-0 items-center\",\r\n className\r\n )}\r\n flagComponent={FlagComponent}\r\n countrySelectComponent={CountrySelect}\r\n inputComponent={InputComponent}\r\n smartCaret={false}\r\n value={value || undefined}\r\n onChange={(value) => onChange?.(value || (\"\" as RPNInput.Value))}\r\n {...props}\r\n />\r\n )\r\n })\r\nPhoneInput.displayName = \"PhoneInput\"\r\n\r\nexport { PhoneInput, type PhoneInputProps }\r\n"]}
1
+ {"version":3,"sources":["../src/composites/phone-input.tsx"],"names":["FlagComponent","country","countryName","Flag","flags","jsx","COUNTRY_ROW_HEIGHT","COUNTRY_LIST_HEIGHT","COUNTRY_OVERSCAN","CountrySelect","disabled","selectedCountry","countryList","onChange","open","setOpen","inputValue","setInputValue","scrollTop","setScrollTop","listRef","items","item","filteredItems","search","callingCode","value","listHeight","virtualRange","visibleStartIndex","startIndex","visibleCount","endIndex","paddingTop","paddingBottom","handleValueChange","jsxs","Combobox","a","b","ComboboxTrigger","cn","inputVariants","ChevronsUpDownIcon","ComboboxPopup","ComboboxInput","ComboboxStatus","ComboboxList","event","virtualIndex","index","ComboboxItem","InputComponent","className","props","ref","handleChange","PhoneInput"],"mappings":"2WAoCA,IAAMA,EAAgB,CAAC,CAAE,OAAA,CAAAC,CAAAA,CAAS,YAAAC,CAAY,CAAA,GAA0B,CACtE,IAAMC,EAAOF,CAAAA,CAAUG,CAAAA,CAAMH,CAAO,CAAA,CAAI,MAAA,CAExC,OACEI,GAAAA,CAAC,MAAA,CAAA,CAAK,UAAU,8GAAA,CACb,QAAA,CAAAF,CAAAA,EAAQE,GAAAA,CAACF,EAAA,CAAK,KAAA,CAAOD,CAAAA,CAAa,CAAA,CACrC,CAEJ,CAAA,CASMI,CAAAA,CAAqB,EAAA,CACrBC,CAAAA,CAAsB,IACtBC,CAAAA,CAAmB,CAAA,CASzB,SAASC,CAAAA,CAAc,CACrB,QAAA,CAAAC,CAAAA,CACA,KAAA,CAAOC,CAAAA,CACP,QAASC,CAAAA,CACT,QAAA,CAAAC,CACF,CAAA,CAAuB,CACrB,GAAM,CAACC,CAAAA,CAAMC,CAAO,CAAA,CAAU,CAAA,CAAA,QAAA,CAAS,KAAK,CAAA,CACtC,CAACC,CAAAA,CAAYC,CAAa,CAAA,CAAU,CAAA,CAAA,QAAA,CAAS,EAAE,CAAA,CAC/C,CAACC,CAAAA,CAAWC,CAAY,EAAU,CAAA,CAAA,QAAA,CAAS,CAAC,CAAA,CAC5CC,GAAAA,CAAgB,SAAuB,IAAI,CAAA,CAE3CC,CAAAA,CAAc,CAAA,CAAA,OAAA,CAClB,IAAMT,CAAAA,CAAY,MAAA,CAAQU,CAAAA,EAA8B,CAAA,CAAQA,EAAK,KAAM,CAAA,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ACL,IAAA,CAAK,KAAA,CACL,QAAA,CAAUC,CAAAA,CACT,GAAGF,CAAAA,CACN,CAEJ,CAAC,CAAA,CACDF,EAAe,WAAA,CAAc,gBAAA,CAM7B,IAAMK,CAAAA,CACE,aAGJ,CAAC,CACD,SAAA,CAAAJ,CAAAA,CACA,SAAAxC,CAAAA,CACA,KAAA,CAAAa,CAAAA,CACA,GAAG4B,CACL,CAAA,CAAGC,CAAAA,GAEClD,GAAAA,CAAU,UAAT,CACC,GAAA,CAAKkD,CAAAA,CACL,SAAA,CAAWd,GACT,kCAAA,CACAY,CACF,CAAA,CACA,aAAA,CAAerD,EACf,sBAAA,CAAwBS,CAAAA,CACxB,cAAA,CAAgB2C,CAAAA,CAChB,WAAY,KAAA,CACZ,KAAA,CAAO1B,CAAAA,EAAS,MAAA,CAChB,SAAWA,CAAAA,EAAUb,CAAAA,GAAWa,CAAAA,EAAU,EAAqB,EAC9D,GAAG4B,CAAAA,CACN,CAEH,EACHG,EAAW,WAAA,CAAc,YAAA","file":"chunk-VE5ZAJ35.js","sourcesContent":["\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as RPNInput from \"react-phone-number-input\"\r\nimport flags from \"react-phone-number-input/flags\"\r\n\r\nimport { cn } from \"@xploreu/lib/cn\"\r\nimport { Combobox as ComboboxPrimitive } from \"@base-ui/react/combobox\"\r\nimport {\r\n Combobox,\r\n ComboboxInput,\r\n ComboboxItem,\r\n ComboboxList,\r\n ComboboxPopup,\r\n ComboboxStatus,\r\n ComboboxTrigger,\r\n} from \"../ui/combobox\"\r\nimport { inputVariants } from \"../ui/input\"\r\nimport { ChevronsUpDownIcon } from \"lucide-react\"\r\n\r\n// ---------------------------------------------------------------------------\r\n// Types\r\n// ---------------------------------------------------------------------------\r\n\r\ntype PhoneInputProps = Omit<\r\n React.ComponentProps<\"input\">,\r\n \"onChange\" | \"value\" | \"ref\"\r\n> &\r\n Omit<RPNInput.Props<typeof RPNInput.default>, \"onChange\"> & {\r\n onChange?: (value: RPNInput.Value) => void\r\n }\r\n\r\n// ---------------------------------------------------------------------------\r\n// Flag\r\n// ---------------------------------------------------------------------------\r\n\r\nconst FlagComponent = ({ country, countryName }: RPNInput.FlagProps) => {\r\n const Flag = country ? flags[country] : undefined\r\n\r\n return (\r\n <span className=\"flex h-4 w-6 shrink-0 overflow-hidden rounded-sm bg-fg-quaternary/20 [&_svg:not([class*='size-'])]:size-full\">\r\n {Flag && <Flag title={countryName} />}\r\n </span>\r\n )\r\n}\r\n\r\n// ---------------------------------------------------------------------------\r\n// Country Select — uses base-ui Combobox\r\n// ---------------------------------------------------------------------------\r\n\r\ntype CountryEntry = { label: string; value: RPNInput.Country | undefined }\r\ntype CountryItem = { label: string; value: RPNInput.Country }\r\n\r\nconst COUNTRY_ROW_HEIGHT = 44\r\nconst COUNTRY_LIST_HEIGHT = 288\r\nconst COUNTRY_OVERSCAN = 6\r\n\r\ntype CountrySelectProps = {\r\n disabled?: boolean\r\n value: RPNInput.Country\r\n options: CountryEntry[]\r\n onChange: (country: RPNInput.Country) => void\r\n}\r\n\r\nfunction CountrySelect({\r\n disabled,\r\n value: selectedCountry,\r\n options: countryList,\r\n onChange,\r\n}: CountrySelectProps) {\r\n const [open, setOpen] = React.useState(false)\r\n const [inputValue, setInputValue] = React.useState(\"\")\r\n const [scrollTop, setScrollTop] = React.useState(0)\r\n const listRef = React.useRef<HTMLDivElement>(null)\r\n\r\n const items = React.useMemo(\r\n () => countryList.filter((item): item is CountryItem => Boolean(item.value)),\r\n [countryList]\r\n )\r\n\r\n const filteredItems = React.useMemo(() => {\r\n const search = inputValue.trim().toLowerCase()\r\n\r\n if (!search) return items\r\n\r\n return items.filter((item) => {\r\n const callingCode = RPNInput.getCountryCallingCode(item.value)\r\n\r\n return item.label.toLowerCase().includes(search)\r\n || item.value.toLowerCase().includes(search)\r\n || callingCode.includes(search.replace(/^\\+/, \"\"))\r\n })\r\n }, [inputValue, items])\r\n\r\n const value = React.useMemo(\r\n () => items.find((item) => item.value === selectedCountry) ?? null,\r\n [items, selectedCountry]\r\n )\r\n\r\n React.useEffect(() => {\r\n setScrollTop(0)\r\n if (listRef.current) listRef.current.scrollTop = 0\r\n }, [inputValue])\r\n\r\n const listHeight = Math.min(\r\n filteredItems.length * COUNTRY_ROW_HEIGHT,\r\n COUNTRY_LIST_HEIGHT\r\n )\r\n\r\n const virtualRange = React.useMemo(() => {\r\n const visibleStartIndex = Math.floor(scrollTop / COUNTRY_ROW_HEIGHT)\r\n const startIndex = Math.max(\r\n 0,\r\n visibleStartIndex - COUNTRY_OVERSCAN\r\n )\r\n const visibleCount = Math.ceil(COUNTRY_LIST_HEIGHT / COUNTRY_ROW_HEIGHT)\r\n const endIndex = Math.min(\r\n filteredItems.length,\r\n visibleStartIndex + visibleCount + COUNTRY_OVERSCAN\r\n )\r\n\r\n return {\r\n startIndex,\r\n endIndex,\r\n items: filteredItems.slice(startIndex, endIndex),\r\n }\r\n }, [filteredItems, scrollTop])\r\n\r\n const paddingTop = virtualRange.startIndex * COUNTRY_ROW_HEIGHT\r\n const paddingBottom = Math.max(\r\n 0,\r\n (filteredItems.length - virtualRange.endIndex) * COUNTRY_ROW_HEIGHT\r\n )\r\n\r\n const handleValueChange = React.useCallback(\r\n (item: CountryItem | null) => {\r\n if (!item?.value) return\r\n\r\n onChange(item.value)\r\n setInputValue(\"\")\r\n setOpen(false)\r\n },\r\n [onChange]\r\n )\r\n\r\n return (\r\n <Combobox\r\n behavior=\"default\"\r\n disabled={disabled}\r\n inputValue={inputValue}\r\n items={filteredItems}\r\n open={open}\r\n value={value}\r\n virtualized\r\n filter={null}\r\n isItemEqualToValue={(a, b) => a.value === b.value}\r\n openOnInputClick={false}\r\n onValueChange={handleValueChange}\r\n onInputValueChange={setInputValue}\r\n onOpenChange={(open) => {\r\n setOpen(open)\r\n if (!open) setInputValue(\"\")\r\n }}\r\n >\r\n {/* Visible trigger button styled as part of the input */}\r\n <ComboboxTrigger\r\n render={\r\n <button\r\n type=\"button\"\r\n className={cn(\r\n inputVariants(),\r\n \"h-11 w-18 shrink-0 justify-between gap-1 rounded-r-none border-r-0 px-3\",\r\n \"hover:bg-bg-primary-hover focus-visible:z-10 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-brand\",\r\n \"disabled:pointer-events-none disabled:opacity-50\"\r\n )}\r\n disabled={disabled}\r\n >\r\n <span className=\"flex items-center gap-1.5 overflow-hidden\">\r\n <FlagComponent\r\n country={selectedCountry}\r\n countryName={selectedCountry}\r\n />\r\n {selectedCountry && (\r\n <span className=\"text-body-medium-3 text-text-primary\">\r\n {selectedCountry}\r\n </span>\r\n )}\r\n </span>\r\n <ChevronsUpDownIcon className=\"size-3.5 shrink-0 text-fg-quaternary\" />\r\n </button>\r\n }\r\n />\r\n\r\n {/* Dropdown content */}\r\n <ComboboxPopup className=\"w-72\">\r\n <ComboboxInput\r\n placeholder=\"Search country...\"\r\n aria-label=\"Search country\"\r\n />\r\n <ComboboxStatus status={filteredItems.length === 0 ? \"empty\" : null} />\r\n <ComboboxList\r\n ref={listRef}\r\n className=\"relative gap-0\"\r\n style={{ height: listHeight }}\r\n onScroll={(event) => setScrollTop(event.currentTarget.scrollTop)}\r\n >\r\n <div\r\n className=\"flex w-full shrink-0 flex-col\"\r\n style={{ paddingTop, paddingBottom }}\r\n >\r\n {virtualRange.items.map((item, virtualIndex) => {\r\n const index = virtualRange.startIndex + virtualIndex\r\n\r\n return (\r\n <ComboboxItem\r\n key={item.value}\r\n index={index}\r\n value={item}\r\n >\r\n <div className=\"flex items-center gap-2 w-full min-w-0\">\r\n <FlagComponent country={item.value} countryName={item.label} />\r\n <span className=\"flex-1 text-sm truncate\">{item.label}</span>\r\n <span className=\"text-sm text-text-tertiary shrink-0\">\r\n +{RPNInput.getCountryCallingCode(item.value)}\r\n </span>\r\n </div>\r\n </ComboboxItem>\r\n )\r\n })}\r\n </div>\r\n </ComboboxList>\r\n </ComboboxPopup>\r\n </Combobox >\r\n )\r\n}\r\n\r\n// ---------------------------------------------------------------------------\r\n// Input Component\r\n// ---------------------------------------------------------------------------\r\n\r\nconst InputComponent = React.forwardRef<\r\n HTMLInputElement,\r\n React.ComponentProps<\"input\">\r\n>(({ className, onChange, ...props }, ref) => {\r\n const handleChange = React.useCallback(\r\n (event: React.ChangeEvent<HTMLInputElement>) => {\r\n if (event.currentTarget.value === \"+\") {\r\n event.currentTarget.value = \"\"\r\n }\r\n\r\n onChange?.(event)\r\n },\r\n [onChange]\r\n )\r\n\r\n return (\r\n <input\r\n className={cn(\r\n inputVariants(),\r\n \"h-11 flex-1 rounded-l-none text-body-regular-2\",\r\n className\r\n )}\r\n ref={ref}\r\n type=\"tel\"\r\n onChange={handleChange}\r\n {...props}\r\n />\r\n )\r\n})\r\nInputComponent.displayName = \"InputComponent\"\r\n\r\n// ---------------------------------------------------------------------------\r\n// Phone Input\r\n// ---------------------------------------------------------------------------\r\n\r\nconst PhoneInput: React.ForwardRefExoticComponent<PhoneInputProps> =\r\n React.forwardRef<\r\n React.ElementRef<typeof RPNInput.default>,\r\n PhoneInputProps\r\n >(({\r\n className,\r\n onChange,\r\n value,\r\n ...props\r\n }, ref) => {\r\n return (\r\n <RPNInput.default\r\n ref={ref}\r\n className={cn(\r\n \"flex w-full min-w-0 items-center\",\r\n className\r\n )}\r\n flagComponent={FlagComponent}\r\n countrySelectComponent={CountrySelect}\r\n inputComponent={InputComponent}\r\n smartCaret={false}\r\n value={value || undefined}\r\n onChange={(value) => onChange?.(value || (\"\" as RPNInput.Value))}\r\n {...props}\r\n />\r\n )\r\n })\r\nPhoneInput.displayName = \"PhoneInput\"\r\n\r\nexport { PhoneInput, type PhoneInputProps }\r\n"]}
@@ -0,0 +1,2 @@
1
+ import'react';import {Popover}from'@base-ui/react/popover';import {AnimatePresence,motion}from'motion/react';import {useControlledState}from'@xploreu/hooks/use-controlled-state';import {getStrictContext}from'@xploreu/lib/get-strict-context';import {jsx}from'react/jsx-runtime';var [a,c]=getStrictContext("PopoverContext");function f(o){let[r,t]=useControlledState({value:o?.open,defaultValue:o?.defaultOpen,onChange:o?.onOpenChange});return jsx(a,{value:{open:r,setOpen:t},children:jsx(Popover.Root,{"data-slot":"popover",...o,onOpenChange:t})})}function C(o){return jsx(Popover.Trigger,{"data-slot":"popover-trigger",...o})}function g(o){let{open:r}=c();return jsx(AnimatePresence,{children:r&&jsx(Popover.Portal,{"data-slot":"popover-portal",keepMounted:true,...o})})}function T(o){return jsx(Popover.Positioner,{"data-slot":"popover-positioner",...o})}function R({initialFocus:o,finalFocus:r,transition:t={type:"spring",stiffness:300,damping:25},...P}){return jsx(Popover.Popup,{finalFocus:r,initialFocus:o,render:jsx(motion.div,{animate:{opacity:1,scale:1},"data-slot":"popover-popup",exit:{opacity:0,scale:.95},initial:{opacity:0,scale:.95},transition:t,...P},"popover-popup")})}function k(o){return jsx(Popover.Backdrop,{"data-slot":"popover-backdrop",...o})}function A(o){return jsx(Popover.Arrow,{"data-slot":"popover-arrow",...o})}function O(o){return jsx(Popover.Title,{"data-slot":"popover-title",...o})}function w(o){return jsx(Popover.Description,{"data-slot":"popover-description",...o})}function x(o){return jsx(Popover.Close,{"data-slot":"popover-close",...o})}export{c as a,f as b,C as c,g as d,T as e,R as f,k as g,A as h,O as i,w as j,x as k};//# sourceMappingURL=chunk-Y6JASO6W.js.map
2
+ //# sourceMappingURL=chunk-Y6JASO6W.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/primitives/popover.tsx"],"names":["PopoverProvider","usePopover","getStrictContext","Popover","props","open","setOpen","useControlledState","jsx","PopoverPrimitive","PopoverTrigger","PopoverPortal","AnimatePresence","PopoverPositioner","PopoverPopup","initialFocus","finalFocus","transition","motion","PopoverBackdrop","PopoverArrow","PopoverTitle","PopoverDescription","PopoverClose"],"mappings":"qRAmBA,IAAM,CAACA,CAAAA,CAAiBC,CAAU,CAAA,CAChCC,gBAAAA,CAAqC,gBAAgB,EAIvD,SAASC,CAAAA,CAAQC,CAAAA,CAAqB,CACpC,GAAM,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-Y6JASO6W.js","sourcesContent":["\"use client\"\r\n\r\nimport * as React from \"react\"\r\n\r\nimport { Popover as PopoverPrimitive } from \"@base-ui/react/popover\"\r\nimport {\r\n AnimatePresence,\r\n type HTMLMotionProps,\r\n motion\r\n} from \"motion/react\"\r\n\r\nimport { useControlledState } from \"@xploreu/hooks/use-controlled-state\"\r\nimport { getStrictContext } from \"@xploreu/lib/get-strict-context\"\r\n\r\ntype PopoverContextType = {\r\n open: boolean;\r\n setOpen: PopoverProps[\"onOpenChange\"];\r\n}\r\n\r\nconst [PopoverProvider, usePopover] =\r\n getStrictContext<PopoverContextType>(\"PopoverContext\")\r\n\r\ntype PopoverProps = React.ComponentProps<typeof PopoverPrimitive.Root>\r\n\r\nfunction Popover(props: PopoverProps) {\r\n const [open, setOpen] = useControlledState({\r\n value: props?.open,\r\n defaultValue: props?.defaultOpen,\r\n onChange: props?.onOpenChange,\r\n })\r\n\r\n return (\r\n <PopoverProvider value={{ open, setOpen }}>\r\n <PopoverPrimitive.Root\r\n data-slot=\"popover\"\r\n {...props}\r\n onOpenChange={setOpen}\r\n />\r\n </PopoverProvider>\r\n )\r\n}\r\n\r\ntype PopoverTriggerProps = React.ComponentProps<typeof PopoverPrimitive.Trigger>\r\n\r\nfunction PopoverTrigger(props: PopoverTriggerProps) {\r\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />\r\n}\r\n\r\ntype PopoverPortalProps = Omit<\r\n React.ComponentProps<typeof PopoverPrimitive.Portal>,\r\n \"keepMounted\"\r\n>\r\n\r\nfunction PopoverPortal(props: PopoverPortalProps) {\r\n const { open } = usePopover()\r\n\r\n return (\r\n <AnimatePresence>\r\n {open && (\r\n <PopoverPrimitive.Portal\r\n data-slot=\"popover-portal\"\r\n keepMounted\r\n {...props}\r\n />\r\n )}\r\n </AnimatePresence>\r\n )\r\n}\r\n\r\ntype PopoverPositionerProps = React.ComponentProps<\r\n typeof PopoverPrimitive.Positioner\r\n>\r\n\r\nfunction PopoverPositioner(props: PopoverPositionerProps) {\r\n return (\r\n <PopoverPrimitive.Positioner\r\n data-slot=\"popover-positioner\"\r\n {...props}\r\n />\r\n )\r\n}\r\n\r\ntype PopoverPopupProps = Omit<\r\n React.ComponentProps<typeof PopoverPrimitive.Popup>,\r\n \"render\"\r\n> &\r\n HTMLMotionProps<\"div\">\r\n\r\nfunction PopoverPopup({\r\n initialFocus,\r\n finalFocus,\r\n transition = { type: \"spring\", stiffness: 300, damping: 25 },\r\n ...props\r\n}: PopoverPopupProps) {\r\n return (\r\n <PopoverPrimitive.Popup\r\n finalFocus={finalFocus}\r\n initialFocus={initialFocus}\r\n render={\r\n <motion.div\r\n key=\"popover-popup\"\r\n animate={{ opacity: 1, scale: 1 }}\r\n data-slot=\"popover-popup\"\r\n exit={{ opacity: 0, scale: 0.95 }}\r\n initial={{ opacity: 0, scale: 0.95 }}\r\n transition={transition}\r\n {...props}\r\n />\r\n }\r\n />\r\n )\r\n}\r\n\r\ntype PopoverBackdropProps = React.ComponentProps<\r\n typeof PopoverPrimitive.Backdrop\r\n>\r\n\r\nfunction PopoverBackdrop(props: PopoverBackdropProps) {\r\n return (\r\n <PopoverPrimitive.Backdrop\r\n data-slot=\"popover-backdrop\"\r\n {...props}\r\n />\r\n )\r\n}\r\n\r\ntype PopoverArrowProps = React.ComponentProps<typeof PopoverPrimitive.Arrow>\r\n\r\nfunction PopoverArrow(props: PopoverArrowProps) {\r\n return <PopoverPrimitive.Arrow data-slot=\"popover-arrow\" {...props} />\r\n}\r\n\r\ntype PopoverTitleProps = React.ComponentProps<typeof PopoverPrimitive.Title>\r\n\r\nfunction PopoverTitle(props: PopoverTitleProps) {\r\n return <PopoverPrimitive.Title data-slot=\"popover-title\" {...props} />\r\n}\r\n\r\ntype PopoverDescriptionProps = React.ComponentProps<\r\n typeof PopoverPrimitive.Description\r\n>\r\n\r\nfunction PopoverDescription(props: PopoverDescriptionProps) {\r\n return (\r\n <PopoverPrimitive.Description\r\n data-slot=\"popover-description\"\r\n {...props}\r\n />\r\n )\r\n}\r\n\r\ntype PopoverCloseProps = React.ComponentProps<typeof PopoverPrimitive.Close>\r\n\r\nfunction PopoverClose(props: PopoverCloseProps) {\r\n return <PopoverPrimitive.Close data-slot=\"popover-close\" {...props} />\r\n}\r\n\r\nexport {\r\n Popover,\r\n PopoverTrigger,\r\n PopoverPortal,\r\n PopoverPositioner,\r\n PopoverPopup,\r\n PopoverBackdrop,\r\n PopoverArrow,\r\n PopoverTitle,\r\n PopoverDescription,\r\n PopoverClose,\r\n usePopover,\r\n type PopoverProps,\r\n type PopoverTriggerProps,\r\n type PopoverPortalProps,\r\n type PopoverPositionerProps,\r\n type PopoverPopupProps,\r\n type PopoverBackdropProps,\r\n type PopoverArrowProps,\r\n type PopoverTitleProps,\r\n type PopoverDescriptionProps,\r\n type PopoverCloseProps,\r\n type PopoverContextType,\r\n}"]}
@@ -1,4 +1,4 @@
1
- import * as react from 'react';
1
+ import * as React from 'react';
2
2
  import { ComboboxProps, ComboboxPortal, ComboboxInfiniteScroll } from '../ui/combobox.js';
3
3
  import '@base-ui/react/combobox';
4
4
  import 'motion/react';
@@ -11,12 +11,12 @@ import 'class-variance-authority';
11
11
  type ComboboxChipOutsideProps<Value> = Omit<ComboboxProps<Value, true>, "multiple"> & {
12
12
  multiple?: boolean;
13
13
  inputPlaceholder?: string;
14
- container?: react.ComponentProps<typeof ComboboxPortal>["container"];
14
+ container?: React.ComponentProps<typeof ComboboxPortal>["container"];
15
15
  items: ({
16
16
  label: string;
17
17
  value: string;
18
18
  }[]) | undefined;
19
- infiniteScroll?: react.ComponentProps<typeof ComboboxInfiniteScroll>;
19
+ infiniteScroll?: React.ComponentProps<typeof ComboboxInfiniteScroll>;
20
20
  isPending?: boolean;
21
21
  /**
22
22
  * When true, enables creatable / taggable mode.
@@ -35,6 +35,6 @@ declare function ComboboxChipOutside<Value extends {
35
35
  label: string;
36
36
  value: string;
37
37
  tag?: true;
38
- }>({ multiple, inputPlaceholder, container, items, infiniteScroll, isPending, taggable, maxVisible, ...props }: ComboboxChipOutsideProps<Value>): react.JSX.Element;
38
+ }>({ multiple, inputPlaceholder, container, items, infiniteScroll, isPending, taggable, maxVisible, ...props }: ComboboxChipOutsideProps<Value>): React.JSX.Element;
39
39
 
40
40
  export { ComboboxChipOutside };
@@ -1,2 +1,2 @@
1
- export{a as ComboboxChipOutside}from'../chunk-7FRAZHPK.js';import'../chunk-JWKTYYJB.js';import'../chunk-J6UNQSKZ.js';import'../chunk-3ASGRRVT.js';import'../chunk-K2BMQ2TN.js';import'../chunk-G6HDEOYZ.js';import'../chunk-K7GGFR7W.js';import'../chunk-WIUYDPXB.js';import'../chunk-MMCL4HWD.js';import'../chunk-ZVME3JB3.js';import'../chunk-2TUGHMFW.js';import'../chunk-VNAMAKPG.js';import'../chunk-ISGXRZLJ.js';import'../chunk-HUWF445V.js';import'../chunk-MAY6ICTE.js';import'../chunk-4PD3DZE6.js';import'../chunk-3RJED3RZ.js';import'../chunk-FKOYTHRM.js';import'../chunk-GJ5F6YBZ.js';import'../chunk-4D2HXXN3.js';import'../chunk-S7ZMBRYT.js';import'../chunk-322IBGFZ.js';import'../chunk-QDCD6MNO.js';import'../chunk-AGKZWMW5.js';import'../chunk-YWG6HJAX.js';import'../chunk-NHQA6KSU.js';import'../chunk-DDCGJBN7.js';import'../chunk-SGJYHWYM.js';import'../chunk-QYGN3VYS.js';import'../chunk-LFQAJN4H.js';import'../chunk-BEJ2SIQP.js';import'../chunk-PSHB2EQA.js';import'../chunk-JVBWH3DS.js';import'../chunk-EHRGIXKH.js';import'../chunk-CQC2IBSD.js';import'../chunk-CKVTRZ3S.js';import'../chunk-YSG3MHTX.js';import'../chunk-TIVYCE4X.js';import'../chunk-RCP2CZRA.js';import'../chunk-2JHFRTOZ.js';import'../chunk-FJTQQ4SC.js';import'../chunk-W2HFGSVH.js';import'../chunk-2GABMQSA.js';import'../chunk-7ECOWHUV.js';import'../chunk-IUPJTP3B.js';import'../chunk-ADC7WDF4.js';import'../chunk-ICQEZHVV.js';import'../chunk-3HUMZKFZ.js';import'../chunk-U5N2WWD3.js';import'../chunk-F2D445K4.js';import'../chunk-NUCPKDK5.js';import'../chunk-2IOTGL4J.js';import'../chunk-NASTZUK6.js';import'../chunk-ZSYQCIYS.js';import'../chunk-4EYPU56T.js';import'../chunk-4NU44YPN.js';import'../chunk-3SQB2TJB.js';import'../chunk-L5AG5DTS.js';import'../chunk-EAF4H4YJ.js';import'../chunk-XH22TH7N.js';import'../chunk-7LF2CJ3L.js';import'../chunk-KO4EAVJY.js';import'../chunk-PEHI6LCP.js';import'../chunk-BZGVXBP3.js';import'../chunk-U6W5PRLZ.js';import'../chunk-JXTOUSXQ.js';import'../chunk-DRYKJQ72.js';import'../chunk-46KQF4UN.js';import'../chunk-556ANF7Z.js';import'../chunk-UKXYDUDY.js';import'../chunk-7YXRTIXL.js';import'../chunk-OL4WHG4U.js';import'../chunk-V5WX4TSN.js';import'../chunk-Z22ALCLD.js';import'../chunk-IHTB4XCP.js';import'../chunk-5KMCPFGM.js';import'../chunk-6I4GG756.js';import'../chunk-4UC2VYI5.js';import'../chunk-TMDCYGCN.js';import'../chunk-3376QA4Q.js';import'../chunk-PDZ7VJPX.js';import'../chunk-Y72C3IVO.js';import'../chunk-5OQVCPXP.js';import'../chunk-LSW5TIYQ.js';import'../chunk-5YFGDOSH.js';import'../chunk-3NFGWKSO.js';import'../chunk-L73GMVVO.js';import'../chunk-SLLTAQ22.js';import'../chunk-WMUM5NGX.js';import'../chunk-A2U6VIQW.js';import'../chunk-VZMFSH37.js';import'../chunk-ECVIBKDN.js';import'../chunk-MPD36YFP.js';import'../chunk-Z5GMQ477.js';import'../chunk-6FL6AY4D.js';import'../chunk-6IKHZM3V.js';import'../chunk-ZVCIT3QN.js';import'../chunk-UACQQO3I.js';import'../chunk-IHLMMP5Q.js';import'../chunk-LN37WPV7.js';import'../chunk-5NAO3POG.js';import'../chunk-JWAU7A2Q.js';import'../chunk-YFCBMUPK.js';import'../chunk-CEYIRTZQ.js';import'../chunk-TORDOY73.js';import'../chunk-CAK44O3E.js';import'../chunk-MTWFWU3I.js';import'../chunk-NREZRMEX.js';import'../chunk-3SKJUZ5H.js';import'../chunk-EDXV6BE6.js';import'../chunk-HM2QBLIL.js';import'../chunk-XY4CWRWG.js';import'../chunk-2FGDZ6WR.js';import'../chunk-KHCZBVOK.js';import'../chunk-2TO4PAQM.js';import'../chunk-HSTY767P.js';import'../chunk-BKWINCGB.js';import'../chunk-VOTCMLJE.js';import'../chunk-ZKFUHFBC.js';import'../chunk-UCQKCAYY.js';import'../chunk-HL32HBMO.js';import'../chunk-K7EZKYBC.js';import'../chunk-FIXJ55FT.js';import'../chunk-GDU3OVET.js';import'../chunk-3EU5QGAN.js';import'../chunk-6EMNBLEM.js';import'../chunk-4CBZOTZR.js';import'../chunk-M5IVXDZ4.js';import'../chunk-2ZG2WNSI.js';import'../chunk-FBKS63GQ.js';import'../chunk-NUGYUIN6.js';import'../chunk-6KFTNJLJ.js';import'../chunk-C7GZULSV.js';import'../chunk-GGD2FGWK.js';import'../chunk-AI5FYYCO.js';import'../chunk-R33XCP5H.js';import'../chunk-SDKXW3R4.js';import'../chunk-EJ5XTT5H.js';import'../chunk-6FEBVO2P.js';import'../chunk-JCFEHT75.js';import'../chunk-5I545S2U.js';import'../chunk-V6YCCR75.js';import'../chunk-NYSABCPP.js';import'../chunk-QNEJRZ4U.js';import'../chunk-SCPA3CM2.js';import'../chunk-2PQUW476.js';import'../chunk-HEKI5WR2.js';import'../chunk-TTZ2UE5L.js';import'../chunk-JZJHLBOV.js';import'../chunk-L6ZGEGUV.js';import'../chunk-DQSDZXTX.js';import'../chunk-ICHHISXQ.js';import'../chunk-EERDL5XC.js';import'../chunk-GE3TPDYX.js';import'../chunk-RMGJAA2L.js';import'../chunk-Z7IOYXOK.js';import'../chunk-X2VRJLPR.js';import'../chunk-KPA4J3CC.js';import'../chunk-4JEHGT2R.js';import'../chunk-3Q72MLBZ.js';import'../chunk-ZWZZVZOP.js';import'../chunk-VLSPFIZU.js';import'../chunk-BGSHHAM2.js';import'../chunk-SR76VRAC.js';import'../chunk-4GMRFP6B.js';import'../chunk-F5FFAJ6B.js';import'../chunk-5FALHJEA.js';import'../chunk-F7KNYOYR.js';import'../chunk-IRRA2OTH.js';import'../chunk-QM2KF35E.js';import'../chunk-WI5V5Z76.js';import'../chunk-PCUUUW7T.js';import'../chunk-FELUIC3Z.js';import'../chunk-BKBLZKQ7.js';import'../chunk-4FH2LYOC.js';import'../chunk-U27RVBYT.js';import'../chunk-SX54FORI.js';import'../chunk-XOIZGRZ6.js';import'../chunk-EY3W3WZX.js';import'../chunk-X2J6MJ6Y.js';import'../chunk-KCSDB6W4.js';import'../chunk-3N22A4KQ.js';import'../chunk-YTN4DVWB.js';import'../chunk-XNDNAHCC.js';import'../chunk-UESMX3LA.js';import'../chunk-33MUUBSB.js';import'../chunk-VK62KNI7.js';import'../chunk-OREIXD3L.js';import'../chunk-EYH5SNDK.js';import'../chunk-RUTYHOHT.js';import'../chunk-Y2R7ZZYY.js';import'../chunk-LYV7R7DB.js';import'../chunk-EKS6U6XR.js';import'../chunk-5LAJMBKN.js';import'../chunk-ZEONZS5N.js';import'../chunk-75BEGXGF.js';import'../chunk-CP6DGMEP.js';import'../chunk-7TNSQNT7.js';import'../chunk-ZTCAXM77.js';import'../chunk-UVYYUEHO.js';import'../chunk-FFYGBVMN.js';import'../chunk-HJJ2VCYO.js';import'../chunk-KZMULPFK.js';import'../chunk-X5TJ3Z24.js';import'../chunk-J64EBQ23.js';import'../chunk-PFSN7DQX.js';import'../chunk-DVXIIACM.js';import'../chunk-ZPPUEK2E.js';import'../chunk-GOXCPAUM.js';import'../chunk-6L6HTR6E.js';import'../chunk-4VQUQ3NT.js';import'../chunk-MHRHCLIU.js';import'../chunk-V4VKQ2QF.js';import'../chunk-NVVCGBML.js';import'../chunk-2V46QEC7.js';import'../chunk-TJNOFRWB.js';import'../chunk-Y2TTBBRP.js';import'../chunk-NYQJHUKD.js';import'../chunk-6NPT5BJ7.js';import'../chunk-MYGQXM66.js';import'../chunk-ZY5FUK37.js';import'../chunk-DNIYW2WB.js';import'../chunk-QWFECUYL.js';import'../chunk-IPTGAZ37.js';import'../chunk-DEFVXH3J.js';import'../chunk-Y56EKYRN.js';import'../chunk-IW6VX3I7.js';import'../chunk-4S6MFDRP.js';import'../chunk-OE7VPOT4.js';import'../chunk-LHVBJHQZ.js';import'../chunk-QH67MZKV.js';import'../chunk-O5CSN63E.js';import'../chunk-I2K2QQOA.js';import'../chunk-ZPKZLDR2.js';import'../chunk-EBXTHJF5.js';import'../chunk-ZXSIHT6V.js';import'../chunk-TJFA5O6Z.js';import'../chunk-KCCBSGT3.js';import'../chunk-WSMQZH5E.js';import'../chunk-CEY3P2QK.js';import'../chunk-E6ZLTD7K.js';import'../chunk-YWDIILO5.js';import'../chunk-WVOOXXON.js';import'../chunk-YRO736RI.js';import'../chunk-QBNIE5KZ.js';import'../chunk-24ZESL25.js';import'../chunk-UJRREWOA.js';import'../chunk-3KSOBU4X.js';import'../chunk-ZMNFPSA3.js';import'../chunk-6C2TVGCV.js';import'../chunk-JUM5W2FF.js';import'../chunk-MOH4SNJJ.js';import'../chunk-YFZPYFTS.js';import'../chunk-JSE2CMYN.js';import'../chunk-WYRCNM2M.js';import'../chunk-EYKDAQEG.js';import'../chunk-K3RU27VR.js';import'../chunk-CFKH5BM3.js';import'../chunk-OEEQX3JR.js';import'../chunk-ZT35KBQN.js';import'../chunk-T7HRX3EC.js';import'../chunk-C4ELFIL6.js';import'../chunk-CHPQMJNP.js';import'../chunk-CJSVB5XT.js';import'../chunk-XFY6L3B6.js';import'../chunk-BNOMWF6G.js';import'../chunk-XQ5APSL5.js';import'../chunk-6UJXNDLR.js';import'../chunk-HG6NCRSN.js';import'../chunk-4TNLRALG.js';import'../chunk-BM65PK4H.js';import'../chunk-3Q67KQWC.js';import'../chunk-A4G246BH.js';import'../chunk-WUGIELON.js';import'../chunk-GYYQR6WJ.js';import'../chunk-PEAZKA47.js';import'../chunk-XU65MB53.js';import'../chunk-JUY2JZGK.js';import'../chunk-NTXAFTKR.js';import'../chunk-MFV4KTCM.js';import'../chunk-I56A4HTS.js';import'../chunk-KYD4ATTG.js';import'../chunk-DZKJRP4J.js';import'../chunk-DSH6THYW.js';import'../chunk-2TQHUVNP.js';import'../chunk-RBLL355H.js';import'../chunk-IXWAWSD4.js';import'../chunk-Z67QQMOX.js';import'../chunk-5YDJTHDG.js';import'../chunk-TED2PUK6.js';//# sourceMappingURL=combobox-chip-outside.js.map
1
+ export{a as ComboboxChipOutside}from'../chunk-NG3NFI2B.js';import'../chunk-DXI32G2S.js';import'../chunk-WIUYDPXB.js';import'../chunk-NTQ2FXS7.js';import'../chunk-MMCL4HWD.js';import'../chunk-ZVME3JB3.js';import'../chunk-2TUGHMFW.js';import'../chunk-PJYKUR4F.js';import'../chunk-3ASGRRVT.js';import'../chunk-K2BMQ2TN.js';import'../chunk-G6HDEOYZ.js';import'../chunk-K7GGFR7W.js';import'../chunk-VNAMAKPG.js';import'../chunk-746IQSMF.js';import'../chunk-KYD4ATTG.js';import'../chunk-TED2PUK6.js';import'../chunk-JH6RZ3QH.js';import'../chunk-MAY6ICTE.js';import'../chunk-322IBGFZ.js';import'../chunk-QDCD6MNO.js';import'../chunk-LFQAJN4H.js';import'../chunk-BEJ2SIQP.js';import'../chunk-4PD3DZE6.js';import'../chunk-3RJED3RZ.js';import'../chunk-FKOYTHRM.js';import'../chunk-GJ5F6YBZ.js';import'../chunk-4D2HXXN3.js';import'../chunk-S7ZMBRYT.js';import'../chunk-TIVYCE4X.js';import'../chunk-RCP2CZRA.js';import'../chunk-AGKZWMW5.js';import'../chunk-YWG6HJAX.js';import'../chunk-NHQA6KSU.js';import'../chunk-DDCGJBN7.js';import'../chunk-SGJYHWYM.js';import'../chunk-QYGN3VYS.js';import'../chunk-ADC7WDF4.js';import'../chunk-ICQEZHVV.js';import'../chunk-PSHB2EQA.js';import'../chunk-JVBWH3DS.js';import'../chunk-EHRGIXKH.js';import'../chunk-CQC2IBSD.js';import'../chunk-CKVTRZ3S.js';import'../chunk-YSG3MHTX.js';import'../chunk-ZSYQCIYS.js';import'../chunk-4EYPU56T.js';import'../chunk-2JHFRTOZ.js';import'../chunk-FJTQQ4SC.js';import'../chunk-W2HFGSVH.js';import'../chunk-2GABMQSA.js';import'../chunk-7ECOWHUV.js';import'../chunk-IUPJTP3B.js';import'../chunk-KO4EAVJY.js';import'../chunk-PEHI6LCP.js';import'../chunk-3HUMZKFZ.js';import'../chunk-U5N2WWD3.js';import'../chunk-F2D445K4.js';import'../chunk-NUCPKDK5.js';import'../chunk-2IOTGL4J.js';import'../chunk-NASTZUK6.js';import'../chunk-UKXYDUDY.js';import'../chunk-7YXRTIXL.js';import'../chunk-4NU44YPN.js';import'../chunk-3SQB2TJB.js';import'../chunk-L5AG5DTS.js';import'../chunk-EAF4H4YJ.js';import'../chunk-XH22TH7N.js';import'../chunk-7LF2CJ3L.js';import'../chunk-4UC2VYI5.js';import'../chunk-TMDCYGCN.js';import'../chunk-BZGVXBP3.js';import'../chunk-U6W5PRLZ.js';import'../chunk-JXTOUSXQ.js';import'../chunk-DRYKJQ72.js';import'../chunk-46KQF4UN.js';import'../chunk-556ANF7Z.js';import'../chunk-3NFGWKSO.js';import'../chunk-L73GMVVO.js';import'../chunk-OL4WHG4U.js';import'../chunk-V5WX4TSN.js';import'../chunk-Z22ALCLD.js';import'../chunk-IHTB4XCP.js';import'../chunk-5KMCPFGM.js';import'../chunk-6I4GG756.js';import'../chunk-Z5GMQ477.js';import'../chunk-6FL6AY4D.js';import'../chunk-3376QA4Q.js';import'../chunk-PDZ7VJPX.js';import'../chunk-Y72C3IVO.js';import'../chunk-5OQVCPXP.js';import'../chunk-LSW5TIYQ.js';import'../chunk-5YFGDOSH.js';import'../chunk-JWAU7A2Q.js';import'../chunk-YFCBMUPK.js';import'../chunk-SLLTAQ22.js';import'../chunk-WMUM5NGX.js';import'../chunk-A2U6VIQW.js';import'../chunk-VZMFSH37.js';import'../chunk-ECVIBKDN.js';import'../chunk-MPD36YFP.js';import'../chunk-EDXV6BE6.js';import'../chunk-HM2QBLIL.js';import'../chunk-6IKHZM3V.js';import'../chunk-ZVCIT3QN.js';import'../chunk-UACQQO3I.js';import'../chunk-IHLMMP5Q.js';import'../chunk-LN37WPV7.js';import'../chunk-5NAO3POG.js';import'../chunk-VOTCMLJE.js';import'../chunk-ZKFUHFBC.js';import'../chunk-CEYIRTZQ.js';import'../chunk-TORDOY73.js';import'../chunk-CAK44O3E.js';import'../chunk-MTWFWU3I.js';import'../chunk-NREZRMEX.js';import'../chunk-3SKJUZ5H.js';import'../chunk-6EMNBLEM.js';import'../chunk-4CBZOTZR.js';import'../chunk-XY4CWRWG.js';import'../chunk-2FGDZ6WR.js';import'../chunk-KHCZBVOK.js';import'../chunk-2TO4PAQM.js';import'../chunk-HSTY767P.js';import'../chunk-BKWINCGB.js';import'../chunk-GGD2FGWK.js';import'../chunk-AI5FYYCO.js';import'../chunk-UCQKCAYY.js';import'../chunk-HL32HBMO.js';import'../chunk-K7EZKYBC.js';import'../chunk-FIXJ55FT.js';import'../chunk-GDU3OVET.js';import'../chunk-3EU5QGAN.js';import'../chunk-V6YCCR75.js';import'../chunk-NYSABCPP.js';import'../chunk-M5IVXDZ4.js';import'../chunk-2ZG2WNSI.js';import'../chunk-FBKS63GQ.js';import'../chunk-NUGYUIN6.js';import'../chunk-6KFTNJLJ.js';import'../chunk-C7GZULSV.js';import'../chunk-L6ZGEGUV.js';import'../chunk-DQSDZXTX.js';import'../chunk-R33XCP5H.js';import'../chunk-SDKXW3R4.js';import'../chunk-EJ5XTT5H.js';import'../chunk-6FEBVO2P.js';import'../chunk-JCFEHT75.js';import'../chunk-5I545S2U.js';import'../chunk-KPA4J3CC.js';import'../chunk-4JEHGT2R.js';import'../chunk-QNEJRZ4U.js';import'../chunk-SCPA3CM2.js';import'../chunk-2PQUW476.js';import'../chunk-HEKI5WR2.js';import'../chunk-TTZ2UE5L.js';import'../chunk-JZJHLBOV.js';import'../chunk-F5FFAJ6B.js';import'../chunk-5FALHJEA.js';import'../chunk-ICHHISXQ.js';import'../chunk-EERDL5XC.js';import'../chunk-GE3TPDYX.js';import'../chunk-RMGJAA2L.js';import'../chunk-Z7IOYXOK.js';import'../chunk-X2VRJLPR.js';import'../chunk-FELUIC3Z.js';import'../chunk-BKBLZKQ7.js';import'../chunk-3Q72MLBZ.js';import'../chunk-ZWZZVZOP.js';import'../chunk-VLSPFIZU.js';import'../chunk-BGSHHAM2.js';import'../chunk-SR76VRAC.js';import'../chunk-4GMRFP6B.js';import'../chunk-KCSDB6W4.js';import'../chunk-3N22A4KQ.js';import'../chunk-F7KNYOYR.js';import'../chunk-IRRA2OTH.js';import'../chunk-QM2KF35E.js';import'../chunk-WI5V5Z76.js';import'../chunk-PCUUUW7T.js';import'../chunk-EYH5SNDK.js';import'../chunk-RUTYHOHT.js';import'../chunk-4FH2LYOC.js';import'../chunk-U27RVBYT.js';import'../chunk-SX54FORI.js';import'../chunk-XOIZGRZ6.js';import'../chunk-EY3W3WZX.js';import'../chunk-X2J6MJ6Y.js';import'../chunk-CP6DGMEP.js';import'../chunk-7TNSQNT7.js';import'../chunk-YTN4DVWB.js';import'../chunk-XNDNAHCC.js';import'../chunk-UESMX3LA.js';import'../chunk-33MUUBSB.js';import'../chunk-VK62KNI7.js';import'../chunk-OREIXD3L.js';import'../chunk-J64EBQ23.js';import'../chunk-PFSN7DQX.js';import'../chunk-Y2R7ZZYY.js';import'../chunk-LYV7R7DB.js';import'../chunk-EKS6U6XR.js';import'../chunk-5LAJMBKN.js';import'../chunk-ZEONZS5N.js';import'../chunk-75BEGXGF.js';import'../chunk-V4VKQ2QF.js';import'../chunk-NVVCGBML.js';import'../chunk-ZTCAXM77.js';import'../chunk-UVYYUEHO.js';import'../chunk-FFYGBVMN.js';import'../chunk-HJJ2VCYO.js';import'../chunk-KZMULPFK.js';import'../chunk-X5TJ3Z24.js';import'../chunk-ZY5FUK37.js';import'../chunk-DNIYW2WB.js';import'../chunk-DVXIIACM.js';import'../chunk-ZPPUEK2E.js';import'../chunk-GOXCPAUM.js';import'../chunk-6L6HTR6E.js';import'../chunk-4VQUQ3NT.js';import'../chunk-MHRHCLIU.js';import'../chunk-OE7VPOT4.js';import'../chunk-LHVBJHQZ.js';import'../chunk-2V46QEC7.js';import'../chunk-TJNOFRWB.js';import'../chunk-Y2TTBBRP.js';import'../chunk-NYQJHUKD.js';import'../chunk-6NPT5BJ7.js';import'../chunk-MYGQXM66.js';import'../chunk-TJFA5O6Z.js';import'../chunk-KCCBSGT3.js';import'../chunk-QWFECUYL.js';import'../chunk-IPTGAZ37.js';import'../chunk-DEFVXH3J.js';import'../chunk-Y56EKYRN.js';import'../chunk-IW6VX3I7.js';import'../chunk-4S6MFDRP.js';import'../chunk-QBNIE5KZ.js';import'../chunk-24ZESL25.js';import'../chunk-QH67MZKV.js';import'../chunk-O5CSN63E.js';import'../chunk-I2K2QQOA.js';import'../chunk-ZPKZLDR2.js';import'../chunk-EBXTHJF5.js';import'../chunk-ZXSIHT6V.js';import'../chunk-YFZPYFTS.js';import'../chunk-JSE2CMYN.js';import'../chunk-WSMQZH5E.js';import'../chunk-CEY3P2QK.js';import'../chunk-E6ZLTD7K.js';import'../chunk-YWDIILO5.js';import'../chunk-WVOOXXON.js';import'../chunk-YRO736RI.js';import'../chunk-T7HRX3EC.js';import'../chunk-C4ELFIL6.js';import'../chunk-UJRREWOA.js';import'../chunk-3KSOBU4X.js';import'../chunk-ZMNFPSA3.js';import'../chunk-6C2TVGCV.js';import'../chunk-JUM5W2FF.js';import'../chunk-MOH4SNJJ.js';import'../chunk-HG6NCRSN.js';import'../chunk-4TNLRALG.js';import'../chunk-WYRCNM2M.js';import'../chunk-EYKDAQEG.js';import'../chunk-K3RU27VR.js';import'../chunk-CFKH5BM3.js';import'../chunk-OEEQX3JR.js';import'../chunk-ZT35KBQN.js';import'../chunk-XU65MB53.js';import'../chunk-JUY2JZGK.js';import'../chunk-CHPQMJNP.js';import'../chunk-CJSVB5XT.js';import'../chunk-XFY6L3B6.js';import'../chunk-BNOMWF6G.js';import'../chunk-XQ5APSL5.js';import'../chunk-6UJXNDLR.js';import'../chunk-MFV4KTCM.js';import'../chunk-I56A4HTS.js';import'../chunk-BM65PK4H.js';import'../chunk-3Q67KQWC.js';import'../chunk-A4G246BH.js';import'../chunk-WUGIELON.js';import'../chunk-GYYQR6WJ.js';import'../chunk-PEAZKA47.js';import'../chunk-NTXAFTKR.js';import'../chunk-DZKJRP4J.js';import'../chunk-DSH6THYW.js';import'../chunk-2TQHUVNP.js';import'../chunk-RBLL355H.js';import'../chunk-IXWAWSD4.js';import'../chunk-Z67QQMOX.js';import'../chunk-5YDJTHDG.js';import'../chunk-NGSCUYDU.js';import'../chunk-Y6JASO6W.js';//# sourceMappingURL=combobox-chip-outside.js.map
2
2
  //# sourceMappingURL=combobox-chip-outside.js.map
@@ -1,26 +1,26 @@
1
1
  export { ComboboxChipOutside } from './combobox-chip-outside.js';
2
- import * as react from 'react';
2
+ import * as React from 'react';
3
3
  import { ComboboxProps, ComboboxPortal, ComboboxInfiniteScroll } from '../ui/combobox.js';
4
+ import { VariantProps } from 'class-variance-authority';
5
+ import { inputVariants } from '../ui/input.js';
4
6
  export { PhoneInput } from './phone-input.js';
7
+ import * as class_variance_authority_types from 'class-variance-authority/types';
5
8
  import '@base-ui/react/combobox';
6
9
  import 'motion/react';
7
10
  import '../effects/highlight.js';
8
11
  import '../ui/infinite-scroll.js';
9
- import '../ui/input.js';
10
- import 'class-variance-authority/types';
11
- import 'class-variance-authority';
12
12
  import 'react-phone-number-input';
13
13
 
14
14
  type ComboboxChipProps<Value> = Omit<ComboboxProps<Value, true>, "multiple"> & {
15
15
  multiple?: boolean;
16
16
  inputPlaceholder?: string;
17
- container?: react.ComponentProps<typeof ComboboxPortal>["container"];
17
+ container?: React.ComponentProps<typeof ComboboxPortal>["container"];
18
18
  items: ({
19
19
  label: string;
20
20
  value: string;
21
21
  image?: string;
22
22
  }[]) | undefined;
23
- infiniteScroll?: react.ComponentProps<typeof ComboboxInfiniteScroll>;
23
+ infiniteScroll?: React.ComponentProps<typeof ComboboxInfiniteScroll>;
24
24
  isPending?: boolean;
25
25
  /**
26
26
  * When true, enables creatable / taggable mode.
@@ -40,7 +40,29 @@ declare function ComboboxChip<Value extends {
40
40
  value: string;
41
41
  image?: string;
42
42
  tag?: true;
43
- }>({ multiple, inputPlaceholder, container, items, infiniteScroll, isPending, taggable, maxVisible, ...props }: ComboboxChipProps<Value>): react.JSX.Element;
43
+ }>({ multiple, inputPlaceholder, container, items, infiniteScroll, isPending, taggable, maxVisible, ...props }: ComboboxChipProps<Value>): React.JSX.Element;
44
+
45
+ type ComboboxSimpleItem = {
46
+ label: string;
47
+ value: string;
48
+ };
49
+ type ComboboxSimpleProps = {
50
+ items: ComboboxSimpleItem[] | undefined;
51
+ value?: ComboboxSimpleItem | null;
52
+ defaultValue?: ComboboxSimpleItem | null;
53
+ onValueChange?: (value: ComboboxSimpleItem | null) => void;
54
+ placeholder?: string;
55
+ icon?: React.ReactNode;
56
+ container?: React.ComponentProps<typeof ComboboxPortal>["container"];
57
+ isPending?: boolean;
58
+ className?: string;
59
+ triggerClassName?: string;
60
+ contentClassName?: string;
61
+ disabled?: boolean;
62
+ size?: VariantProps<typeof inputVariants>["size"];
63
+ infiniteScroll?: React.ComponentProps<typeof ComboboxInfiniteScroll>;
64
+ };
65
+ declare function ComboboxSimple({ items, value, defaultValue, onValueChange, placeholder, icon, container, isPending, className, triggerClassName, contentClassName, disabled, size, infiniteScroll, }: ComboboxSimpleProps): React.JSX.Element;
44
66
 
45
67
  type FilterComboboxItem = {
46
68
  label: string;
@@ -49,14 +71,14 @@ type FilterComboboxItem = {
49
71
  type BaseProps = {
50
72
  items: FilterComboboxItem[] | undefined;
51
73
  placeholder?: string;
52
- icon?: react.ReactNode;
53
- container?: react.ComponentProps<typeof ComboboxPortal>["container"];
74
+ icon?: React.ReactNode;
75
+ container?: React.ComponentProps<typeof ComboboxPortal>["container"];
54
76
  isPending?: boolean;
55
77
  className?: string;
56
78
  triggerClassName?: string;
57
79
  contentClassName?: string;
58
80
  disabled?: boolean;
59
- infiniteScroll?: react.ComponentProps<typeof ComboboxInfiniteScroll>;
81
+ infiniteScroll?: React.ComponentProps<typeof ComboboxInfiniteScroll>;
60
82
  };
61
83
  type SingleProps = BaseProps & {
62
84
  multiple?: false;
@@ -71,6 +93,29 @@ type MultipleProps = BaseProps & {
71
93
  onValueChange?: (value: FilterComboboxItem[]) => void;
72
94
  };
73
95
  type FilterComboboxProps = SingleProps | MultipleProps;
74
- declare function FilterCombobox(props: FilterComboboxProps): react.JSX.Element;
96
+ declare function FilterCombobox(props: FilterComboboxProps): React.JSX.Element;
97
+
98
+ type ProfileAvatarStatus = "open-to-all" | "open-to-work" | "open-to-freelance" | "open-to-coach" | undefined;
99
+ type ProfileAvatarVariant = "profile" | "company" | "university" | "group";
100
+ declare const profileAvatarVariants: (props?: ({
101
+ size?: "sm" | "md" | "lg" | "xl" | "xs" | "2xl" | "3xl" | null | undefined;
102
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
103
+ declare function ProfileAvatar({ avatarClassName, badgeClassName, imageSrc, avatarImageClassName, imageAlt, className, status, size, isVerified, onEdit, onClickAvatar, variant, isOnline, companyLogoSrc, bordered, badged, ...props }: React.ComponentProps<"div"> & {
104
+ avatarClassName?: string;
105
+ badgeClassName?: string;
106
+ imageSrc?: string;
107
+ imageAlt?: string;
108
+ isVerified?: boolean;
109
+ avatarImageClassName?: string;
110
+ size?: VariantProps<typeof profileAvatarVariants>["size"];
111
+ status?: ProfileAvatarStatus;
112
+ onEdit?: () => void;
113
+ onClickAvatar?: () => void;
114
+ variant?: ProfileAvatarVariant;
115
+ isOnline?: boolean;
116
+ companyLogoSrc?: string;
117
+ bordered?: boolean;
118
+ badged?: boolean;
119
+ }): React.JSX.Element;
75
120
 
76
- export { ComboboxChip, FilterCombobox, type FilterComboboxItem, type FilterComboboxProps };
121
+ export { ComboboxChip, ComboboxSimple, type ComboboxSimpleItem, type ComboboxSimpleProps, FilterCombobox, type FilterComboboxItem, type FilterComboboxProps, ProfileAvatar, type ProfileAvatarStatus, type ProfileAvatarVariant };