@vlrc-fe/components 1.0.6 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (452) hide show
  1. package/dist/Form/FormFileUpload/index.d.ts +1 -1
  2. package/dist/Form/FormFileUpload/index.d.ts.map +1 -1
  3. package/dist/Form/index.d.ts +1 -1
  4. package/dist/Form/index.d.ts.map +1 -1
  5. package/dist/MultiSelect/type.d.ts +2 -2
  6. package/dist/index.cjs +1 -1
  7. package/dist/index.js +64 -40
  8. package/dist/index10.cjs +1 -1
  9. package/dist/index10.js +46 -80
  10. package/dist/index100.cjs +1 -1
  11. package/dist/index100.js +22 -60
  12. package/dist/index101.cjs +1 -1
  13. package/dist/index101.js +1147 -43
  14. package/dist/index102.cjs +1 -1
  15. package/dist/index102.js +30 -64
  16. package/dist/index103.cjs +1 -1
  17. package/dist/index103.js +31 -147
  18. package/dist/index104.cjs +1 -1
  19. package/dist/index104.js +93 -19
  20. package/dist/index105.cjs +1 -1
  21. package/dist/index105.js +80 -25
  22. package/dist/index106.cjs +1 -1
  23. package/dist/index106.js +9 -50
  24. package/dist/index107.cjs +1 -1
  25. package/dist/index107.js +30 -156
  26. package/dist/index108.cjs +1 -1
  27. package/dist/index108.js +350 -14
  28. package/dist/index109.cjs +1 -1
  29. package/dist/index109.js +11 -0
  30. package/dist/index11.cjs +1 -1
  31. package/dist/index11.js +55 -60
  32. package/dist/index110.cjs +1 -0
  33. package/dist/index110.js +430 -0
  34. package/dist/index111.cjs +1 -0
  35. package/dist/index111.js +36 -0
  36. package/dist/index112.cjs +1 -0
  37. package/dist/index112.js +28 -0
  38. package/dist/index113.cjs +1 -0
  39. package/dist/index113.js +14 -0
  40. package/dist/index114.cjs +1 -0
  41. package/dist/index114.js +156 -0
  42. package/dist/index115.cjs +1 -0
  43. package/dist/index115.js +19 -0
  44. package/dist/index116.cjs +1 -0
  45. package/dist/index116.js +67 -0
  46. package/dist/index117.cjs +1 -0
  47. package/dist/index117.js +118 -0
  48. package/dist/index118.cjs +1 -0
  49. package/dist/index118.js +36 -0
  50. package/dist/index119.cjs +1 -0
  51. package/dist/index119.js +13 -0
  52. package/dist/index12.cjs +1 -1
  53. package/dist/index12.js +44 -121
  54. package/dist/index120.cjs +1 -0
  55. package/dist/index120.js +31 -0
  56. package/dist/index121.cjs +1 -0
  57. package/dist/index121.js +37 -0
  58. package/dist/index122.cjs +1 -0
  59. package/dist/index122.js +123 -0
  60. package/dist/index123.cjs +1 -0
  61. package/dist/index123.js +44 -0
  62. package/dist/index124.cjs +1 -0
  63. package/dist/index124.js +43 -0
  64. package/dist/index125.cjs +1 -0
  65. package/dist/index125.js +14 -0
  66. package/dist/index126.cjs +1 -0
  67. package/dist/index126.js +64 -0
  68. package/dist/index127.cjs +1 -0
  69. package/dist/index127.js +23 -0
  70. package/dist/index128.cjs +1 -0
  71. package/dist/index128.js +34 -0
  72. package/dist/index129.cjs +1 -0
  73. package/dist/index129.js +27 -0
  74. package/dist/index13.cjs +1 -1
  75. package/dist/index13.js +30 -12
  76. package/dist/index130.cjs +1 -0
  77. package/dist/index130.js +26 -0
  78. package/dist/index131.cjs +1 -0
  79. package/dist/index131.js +157 -0
  80. package/dist/index132.cjs +1 -0
  81. package/dist/index132.js +34 -0
  82. package/dist/index133.cjs +1 -0
  83. package/dist/index133.js +46 -0
  84. package/dist/index134.cjs +1 -0
  85. package/dist/index134.js +142 -0
  86. package/dist/index135.cjs +1 -0
  87. package/dist/index135.js +125 -0
  88. package/dist/index136.cjs +1 -0
  89. package/dist/index136.js +26 -0
  90. package/dist/index137.cjs +1 -0
  91. package/dist/index137.js +88 -0
  92. package/dist/index138.cjs +1 -0
  93. package/dist/index138.js +221 -0
  94. package/dist/index139.cjs +1 -0
  95. package/dist/index139.js +166 -0
  96. package/dist/index14.cjs +1 -1
  97. package/dist/index14.js +8 -12
  98. package/dist/index140.cjs +1 -0
  99. package/dist/index140.js +126 -0
  100. package/dist/index141.cjs +1 -0
  101. package/dist/index141.js +15 -0
  102. package/dist/index142.cjs +1 -0
  103. package/dist/index142.js +9 -0
  104. package/dist/index143.cjs +1 -0
  105. package/dist/index143.js +17 -0
  106. package/dist/index144.cjs +1 -0
  107. package/dist/index144.js +22 -0
  108. package/dist/index145.cjs +1 -0
  109. package/dist/index145.js +18 -0
  110. package/dist/index146.cjs +1 -0
  111. package/dist/index146.js +6 -0
  112. package/dist/index147.cjs +1 -0
  113. package/dist/index147.js +7 -0
  114. package/dist/index148.cjs +1 -0
  115. package/dist/index148.js +8 -0
  116. package/dist/index149.cjs +1 -0
  117. package/dist/index149.js +7 -0
  118. package/dist/index15.cjs +1 -1
  119. package/dist/index15.js +12 -112
  120. package/dist/index150.cjs +1 -0
  121. package/dist/index150.js +7 -0
  122. package/dist/index151.cjs +1 -0
  123. package/dist/index151.js +9 -0
  124. package/dist/index152.cjs +1 -0
  125. package/dist/index152.js +69 -0
  126. package/dist/index153.cjs +1 -0
  127. package/dist/index153.js +11 -0
  128. package/dist/index154.cjs +1 -0
  129. package/dist/index154.js +202 -0
  130. package/dist/index155.cjs +1 -0
  131. package/dist/index155.js +124 -0
  132. package/dist/index156.cjs +1 -0
  133. package/dist/index156.js +32 -0
  134. package/dist/index157.cjs +1 -0
  135. package/dist/index157.js +20 -0
  136. package/dist/index158.cjs +1 -0
  137. package/dist/index158.js +69 -0
  138. package/dist/index159.cjs +1 -0
  139. package/dist/index159.js +32 -0
  140. package/dist/index16.cjs +1 -1
  141. package/dist/index16.js +4 -726
  142. package/dist/index160.cjs +1 -0
  143. package/dist/index160.js +11 -0
  144. package/dist/index161.cjs +1 -0
  145. package/dist/index161.js +280 -0
  146. package/dist/index162.cjs +1 -0
  147. package/dist/index162.js +157 -0
  148. package/dist/index163.cjs +1 -0
  149. package/dist/index163.js +20 -0
  150. package/dist/index164.cjs +1 -0
  151. package/dist/index164.js +10 -0
  152. package/dist/index165.cjs +1 -0
  153. package/dist/index165.js +14 -0
  154. package/dist/index166.cjs +1 -0
  155. package/dist/index166.js +8 -0
  156. package/dist/index167.cjs +1 -0
  157. package/dist/index167.js +8 -0
  158. package/dist/index168.cjs +1 -0
  159. package/dist/index168.js +11 -0
  160. package/dist/index169.cjs +1 -0
  161. package/dist/index169.js +10 -0
  162. package/dist/index17.cjs +1 -1
  163. package/dist/index17.js +79 -339
  164. package/dist/index170.cjs +1 -0
  165. package/dist/index170.js +6 -0
  166. package/dist/index171.cjs +1 -0
  167. package/dist/index171.js +8 -0
  168. package/dist/index172.cjs +1 -0
  169. package/dist/index172.js +8 -0
  170. package/dist/index173.cjs +1 -0
  171. package/dist/index173.js +10 -0
  172. package/dist/index174.cjs +1 -0
  173. package/dist/index174.js +11 -0
  174. package/dist/index175.cjs +1 -0
  175. package/dist/index175.js +15 -0
  176. package/dist/index176.cjs +1 -0
  177. package/dist/index176.js +11 -0
  178. package/dist/index177.cjs +1 -0
  179. package/dist/index177.js +11 -0
  180. package/dist/index178.cjs +1 -0
  181. package/dist/index178.js +6 -0
  182. package/dist/index179.cjs +1 -0
  183. package/dist/index179.js +43 -0
  184. package/dist/index18.cjs +1 -1
  185. package/dist/index18.js +19 -66
  186. package/dist/index180.cjs +1 -0
  187. package/dist/index180.js +382 -0
  188. package/dist/index181.cjs +1 -0
  189. package/dist/index181.js +40 -0
  190. package/dist/index182.cjs +1 -0
  191. package/dist/index182.js +23 -0
  192. package/dist/index183.cjs +1 -0
  193. package/dist/index183.js +59 -0
  194. package/dist/index184.cjs +1 -0
  195. package/dist/index184.js +55 -0
  196. package/dist/index185.cjs +1 -0
  197. package/dist/index185.js +54 -0
  198. package/dist/index186.cjs +1 -0
  199. package/dist/index186.js +57 -0
  200. package/dist/index187.cjs +1 -0
  201. package/dist/index187.js +57 -0
  202. package/dist/index188.cjs +1 -0
  203. package/dist/index188.js +88 -0
  204. package/dist/index189.cjs +1 -0
  205. package/dist/index189.js +66 -0
  206. package/dist/index19.cjs +1 -1
  207. package/dist/index19.js +18 -8
  208. package/dist/index190.cjs +1 -0
  209. package/dist/index190.js +594 -0
  210. package/dist/index191.cjs +9 -0
  211. package/dist/index191.js +30 -0
  212. package/dist/index192.cjs +1 -0
  213. package/dist/index192.js +50 -0
  214. package/dist/index193.cjs +1 -0
  215. package/dist/index193.js +65 -0
  216. package/dist/index194.cjs +1 -0
  217. package/dist/index194.js +48 -0
  218. package/dist/index195.cjs +1 -0
  219. package/dist/index195.js +67 -0
  220. package/dist/index196.cjs +1 -0
  221. package/dist/index196.js +151 -0
  222. package/dist/index197.cjs +1 -0
  223. package/dist/index197.js +23 -0
  224. package/dist/index198.cjs +1 -0
  225. package/dist/index198.js +27 -0
  226. package/dist/index199.cjs +1 -0
  227. package/dist/index199.js +53 -0
  228. package/dist/index20.cjs +1 -1
  229. package/dist/index20.js +51 -98
  230. package/dist/index200.cjs +1 -0
  231. package/dist/index200.js +161 -0
  232. package/dist/index201.cjs +1 -0
  233. package/dist/index201.js +16 -0
  234. package/dist/index202.cjs +1 -0
  235. package/dist/index21.cjs +1 -1
  236. package/dist/index21.js +81 -28
  237. package/dist/index22.cjs +1 -1
  238. package/dist/index22.js +64 -14
  239. package/dist/index23.cjs +1 -1
  240. package/dist/index23.js +25 -22
  241. package/dist/index24.cjs +1 -1
  242. package/dist/index24.js +1014 -33
  243. package/dist/index25.cjs +1 -1
  244. package/dist/index25.js +22 -96
  245. package/dist/index26.cjs +1 -1
  246. package/dist/index26.js +108 -25
  247. package/dist/index27.cjs +1 -1
  248. package/dist/index27.js +15 -9
  249. package/dist/index28.cjs +1 -1
  250. package/dist/index28.js +20 -66
  251. package/dist/index29.cjs +1 -1
  252. package/dist/index29.js +81 -11
  253. package/dist/index30.cjs +1 -1
  254. package/dist/index30.js +91 -29
  255. package/dist/index31.cjs +1 -1
  256. package/dist/index31.js +14 -41
  257. package/dist/index32.cjs +1 -1
  258. package/dist/index32.js +93 -12
  259. package/dist/index33.cjs +1 -1
  260. package/dist/index33.js +22 -62
  261. package/dist/index34.cjs +1 -1
  262. package/dist/index34.js +84 -22
  263. package/dist/index35.cjs +1 -1
  264. package/dist/index35.js +85 -33
  265. package/dist/index36.cjs +1 -1
  266. package/dist/index36.js +407 -25
  267. package/dist/index37.cjs +1 -1
  268. package/dist/index37.js +170 -25
  269. package/dist/index38.cjs +1 -1
  270. package/dist/index38.js +28 -154
  271. package/dist/index39.cjs +1 -1
  272. package/dist/index39.js +158 -33
  273. package/dist/index40.cjs +1 -1
  274. package/dist/index40.js +104 -45
  275. package/dist/index41.cjs +1 -1
  276. package/dist/index41.js +337 -140
  277. package/dist/index42.cjs +1 -1
  278. package/dist/index42.js +96 -124
  279. package/dist/index43.cjs +1 -1
  280. package/dist/index43.js +319 -23
  281. package/dist/index44.cjs +1 -1
  282. package/dist/index44.js +205 -81
  283. package/dist/index45.cjs +1 -1
  284. package/dist/index45.js +33 -220
  285. package/dist/index46.cjs +1 -1
  286. package/dist/index46.js +161 -163
  287. package/dist/index47.cjs +1 -1
  288. package/dist/index47.js +20 -125
  289. package/dist/index48.cjs +1 -1
  290. package/dist/index48.js +24 -14
  291. package/dist/index49.cjs +1 -1
  292. package/dist/index49.js +167 -7
  293. package/dist/index5.js +26 -14
  294. package/dist/index50.cjs +1 -1
  295. package/dist/index50.js +44 -15
  296. package/dist/index51.cjs +1 -1
  297. package/dist/index51.js +15 -18
  298. package/dist/index52.cjs +1 -1
  299. package/dist/index52.js +3 -17
  300. package/dist/index53.cjs +1 -1
  301. package/dist/index53.js +5 -5
  302. package/dist/index54.cjs +1 -1
  303. package/dist/index54.js +19 -4
  304. package/dist/index55.cjs +1 -1
  305. package/dist/index55.js +24 -6
  306. package/dist/index56.cjs +1 -1
  307. package/dist/index56.js +66 -4
  308. package/dist/index57.cjs +1 -1
  309. package/dist/index57.js +14 -5
  310. package/dist/index58.cjs +1 -1
  311. package/dist/index58.js +4 -8
  312. package/dist/index59.cjs +1 -1
  313. package/dist/index59.js +50 -67
  314. package/dist/index6.cjs +1 -1
  315. package/dist/index6.js +85 -46
  316. package/dist/index60.cjs +1 -1
  317. package/dist/index60.js +6 -10
  318. package/dist/index61.cjs +1 -1
  319. package/dist/index61.js +25 -199
  320. package/dist/index62.cjs +1 -1
  321. package/dist/index62.js +13 -122
  322. package/dist/index63.cjs +1 -1
  323. package/dist/index63.js +9 -30
  324. package/dist/index64.cjs +1 -1
  325. package/dist/index64.js +3 -20
  326. package/dist/index65.cjs +1 -1
  327. package/dist/index65.js +24 -66
  328. package/dist/index66.cjs +1 -1
  329. package/dist/index66.js +68 -30
  330. package/dist/index67.cjs +38 -1
  331. package/dist/index67.js +3 -11
  332. package/dist/index68.cjs +1 -1
  333. package/dist/index68.js +12 -279
  334. package/dist/index69.cjs +1 -1
  335. package/dist/index69.js +50 -155
  336. package/dist/index7.cjs +1 -1
  337. package/dist/index7.js +29 -85
  338. package/dist/index70.cjs +1 -1
  339. package/dist/index70.js +115 -19
  340. package/dist/index71.cjs +4 -1
  341. package/dist/index71.js +6 -9
  342. package/dist/index72.cjs +1 -1
  343. package/dist/index72.js +12 -12
  344. package/dist/index73.cjs +1 -1
  345. package/dist/index73.js +539 -6
  346. package/dist/index74.cjs +1 -1
  347. package/dist/index74.js +197 -6
  348. package/dist/index75.cjs +1 -1
  349. package/dist/index75.js +120 -9
  350. package/dist/index76.cjs +1 -1
  351. package/dist/index76.js +912 -8
  352. package/dist/index77.cjs +3 -1
  353. package/dist/index77.js +76 -4
  354. package/dist/index78.cjs +1 -1
  355. package/dist/index78.js +120 -6
  356. package/dist/index79.cjs +1 -1
  357. package/dist/index79.js +12 -6
  358. package/dist/index8.cjs +1 -1
  359. package/dist/index8.js +35 -62
  360. package/dist/index80.cjs +1 -1
  361. package/dist/index80.js +14 -8
  362. package/dist/index81.cjs +1 -1
  363. package/dist/index81.js +113 -9
  364. package/dist/index82.cjs +1 -1
  365. package/dist/index82.js +725 -13
  366. package/dist/index83.cjs +1 -1
  367. package/dist/index83.js +346 -9
  368. package/dist/index84.cjs +1 -1
  369. package/dist/index84.js +74 -9
  370. package/dist/index85.cjs +1 -1
  371. package/dist/index85.js +148 -4
  372. package/dist/index86.cjs +1 -1
  373. package/dist/index86.js +31 -42
  374. package/dist/index87.cjs +1 -1
  375. package/dist/index87.js +12 -380
  376. package/dist/index88.cjs +1 -1
  377. package/dist/index88.js +345 -37
  378. package/dist/index89.cjs +20 -1
  379. package/dist/index89.js +40 -18
  380. package/dist/index9.cjs +1 -1
  381. package/dist/index9.js +85 -17
  382. package/dist/index90.cjs +1 -1
  383. package/dist/index90.js +113 -56
  384. package/dist/index91.cjs +1 -1
  385. package/dist/index91.js +272 -51
  386. package/dist/index92.cjs +1 -1
  387. package/dist/index92.js +129 -50
  388. package/dist/index93.cjs +1 -1
  389. package/dist/index93.js +13 -54
  390. package/dist/index94.cjs +1 -1
  391. package/dist/index94.js +28 -55
  392. package/dist/index95.cjs +1 -1
  393. package/dist/index95.js +525 -80
  394. package/dist/index96.cjs +1 -1
  395. package/dist/index96.js +75 -61
  396. package/dist/index97.cjs +1 -1
  397. package/dist/index97.js +67 -583
  398. package/dist/index98.cjs +1 -9
  399. package/dist/index98.js +32 -27
  400. package/dist/index99.cjs +1 -1
  401. package/dist/index99.js +17 -49
  402. package/dist/ui/alert-dialog.d.ts +15 -0
  403. package/dist/ui/alert-dialog.d.ts.map +1 -0
  404. package/dist/ui/alert.d.ts +10 -0
  405. package/dist/ui/alert.d.ts.map +1 -0
  406. package/dist/ui/aspect-ratio.d.ts +4 -0
  407. package/dist/ui/aspect-ratio.d.ts.map +1 -0
  408. package/dist/ui/avatar.d.ts +7 -0
  409. package/dist/ui/avatar.d.ts.map +1 -0
  410. package/dist/ui/badge.d.ts +1 -1
  411. package/dist/ui/breadcrumb.d.ts +12 -0
  412. package/dist/ui/breadcrumb.d.ts.map +1 -0
  413. package/dist/ui/button.d.ts +1 -1
  414. package/dist/ui/carousel.d.ts +20 -0
  415. package/dist/ui/carousel.d.ts.map +1 -0
  416. package/dist/ui/collapsible.d.ts +6 -0
  417. package/dist/ui/collapsible.d.ts.map +1 -0
  418. package/dist/ui/context-menu.d.ts +26 -0
  419. package/dist/ui/context-menu.d.ts.map +1 -0
  420. package/dist/ui/drawer.d.ts +14 -0
  421. package/dist/ui/drawer.d.ts.map +1 -0
  422. package/dist/ui/hover-card.d.ts +7 -0
  423. package/dist/ui/hover-card.d.ts.map +1 -0
  424. package/dist/ui/index.d.ts +23 -0
  425. package/dist/ui/index.d.ts.map +1 -1
  426. package/dist/ui/input-otp.d.ts +12 -0
  427. package/dist/ui/input-otp.d.ts.map +1 -0
  428. package/dist/ui/menubar.d.ts +27 -0
  429. package/dist/ui/menubar.d.ts.map +1 -0
  430. package/dist/ui/navigation-menu.d.ts +15 -0
  431. package/dist/ui/navigation-menu.d.ts.map +1 -0
  432. package/dist/ui/pagination.d.ts +14 -0
  433. package/dist/ui/pagination.d.ts.map +1 -0
  434. package/dist/ui/resizable.d.ts +9 -0
  435. package/dist/ui/resizable.d.ts.map +1 -0
  436. package/dist/ui/sheet.d.ts +14 -0
  437. package/dist/ui/sheet.d.ts.map +1 -0
  438. package/dist/ui/sidebar.d.ts +70 -0
  439. package/dist/ui/sidebar.d.ts.map +1 -0
  440. package/dist/ui/skeleton.d.ts +3 -0
  441. package/dist/ui/skeleton.d.ts.map +1 -0
  442. package/dist/ui/slider.d.ts +5 -0
  443. package/dist/ui/slider.d.ts.map +1 -0
  444. package/dist/ui/switch.d.ts +5 -0
  445. package/dist/ui/switch.d.ts.map +1 -0
  446. package/dist/ui/tabs.d.ts +8 -0
  447. package/dist/ui/tabs.d.ts.map +1 -0
  448. package/dist/ui/toggle-group.d.ts +8 -0
  449. package/dist/ui/toggle-group.d.ts.map +1 -0
  450. package/dist/ui/toggle.d.ts +10 -0
  451. package/dist/ui/toggle.d.ts.map +1 -0
  452. package/package.json +23 -5
package/dist/index44.cjs CHANGED
@@ -1 +1 @@
1
- var e=(0,require("class-variance-authority").cva)(`m-1 transition-all duration-300 ease-in-out`,{variants:{variant:{default:`border-foreground/10 text-foreground bg-card hover:bg-card/80`,secondary:`border-foreground/10 bg-secondary text-secondary-foreground hover:bg-secondary/80`,destructive:`border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80`,inverted:`inverted`},badgeAnimation:{bounce:`hover:-translate-y-1 hover:scale-110`,pulse:`hover:animate-pulse`,wiggle:`hover:animate-wiggle`,fade:`hover:opacity-80`,slide:`hover:translate-x-1`,none:``}},defaultVariants:{variant:`default`,badgeAnimation:`bounce`}});exports.multiSelectVariants=e;
1
+ const e=require("./index41.cjs"),t=require("./index42.cjs"),n=require("./index43.cjs");function r(t){let r=n.getComputedStyle(t),i=parseFloat(r.width)||0,a=parseFloat(r.height)||0,o=n.isHTMLElement(t),s=o?t.offsetWidth:i,c=o?t.offsetHeight:a,l=e.round(i)!==s||e.round(a)!==c;return l&&(i=s,a=c),{width:i,height:a,$:l}}function i(e){return n.isElement(e)?e:e.contextElement}function a(t){let a=i(t);if(!n.isHTMLElement(a))return e.createCoords(1);let o=a.getBoundingClientRect(),{width:s,height:c,$:l}=r(a),u=(l?e.round(o.width):o.width)/s,d=(l?e.round(o.height):o.height)/c;return(!u||!Number.isFinite(u))&&(u=1),(!d||!Number.isFinite(d))&&(d=1),{x:u,y:d}}var o=e.createCoords(0);function s(e){let t=n.getWindow(e);return!n.isWebKit()||!t.visualViewport?o:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function c(e,t,r){return t===void 0&&(t=!1),!!r&&t&&r===n.getWindow(e)}function l(t,r,o,l){r===void 0&&(r=!1),o===void 0&&(o=!1);let u=t.getBoundingClientRect(),d=i(t),f=e.createCoords(1);r&&(l?n.isElement(l)&&(f=a(l)):f=a(t));let p=c(d,o,l)?s(d):e.createCoords(0),m=(u.left+p.x)/f.x,h=(u.top+p.y)/f.y,g=u.width/f.x,_=u.height/f.y;if(d&&l){let e=n.getWindow(d),t=n.isElement(l)?n.getWindow(l):l,r=e,i=n.getFrameElement(r);for(;i&&t!==r;){let e=a(i),t=i.getBoundingClientRect(),o=n.getComputedStyle(i),s=t.left+(i.clientLeft+parseFloat(o.paddingLeft))*e.x,c=t.top+(i.clientTop+parseFloat(o.paddingTop))*e.y;m*=e.x,h*=e.y,g*=e.x,_*=e.y,m+=s,h+=c,r=n.getWindow(i),i=n.getFrameElement(r)}}return e.rectToClientRect({width:g,height:_,x:m,y:h})}function u(e,t){let r=n.getNodeScroll(e).scrollLeft;return t?t.left+r:l(n.getDocumentElement(e)).left+r}function d(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-u(e,n),y:n.top+t.scrollTop}}function f(t){let{elements:r,rect:i,offsetParent:o,strategy:s}=t,c=s===`fixed`,u=n.getDocumentElement(o),f=r?n.isTopLayer(r.floating):!1;if(o===u||f&&c)return i;let p={scrollLeft:0,scrollTop:0},m=e.createCoords(1),h=e.createCoords(0),g=n.isHTMLElement(o);if((g||!c)&&((n.getNodeName(o)!==`body`||n.isOverflowElement(u))&&(p=n.getNodeScroll(o)),g)){let e=l(o);m=a(o),h.x=e.x+o.clientLeft,h.y=e.y+o.clientTop}let _=u&&!g&&!c?d(u,p):e.createCoords(0);return{width:i.width*m.x,height:i.height*m.y,x:i.x*m.x-p.scrollLeft*m.x+h.x+_.x,y:i.y*m.y-p.scrollTop*m.y+h.y+_.y}}function p(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function m(t){let r=n.getNodeScroll(t),i=t.ownerDocument.body,a=e.max(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),o=e.max(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight),s=-r.scrollLeft+u(t),c=-r.scrollTop;return n.getComputedStyle(i).direction===`rtl`&&(s+=e.max(t.clientWidth,i.clientWidth)-a),{width:a,height:o,x:s,y:c}}var h=25;function g(e,t,r){r===void 0&&(r=`viewport`);let i=r===`layoutViewport`,a=n.getWindow(e),o=n.getDocumentElement(e),s=a.visualViewport,c=o.clientWidth,l=o.clientHeight,d=0,f=0;if(s){let e=!n.isWebKit()||t===`fixed`;i?e||(d=-s.offsetLeft,f=-s.offsetTop):(c=s.width,l=s.height,e&&(d=s.offsetLeft,f=s.offsetTop))}if(u(o)<=0){let e=o.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(o.clientWidth-t.clientWidth-r),a=getComputedStyle(o).scrollbarGutter===`stable both-edges`?i/2:i;a<=h&&(c-=a)}return{width:c,height:l,x:d,y:f}}function _(e,t){let n=l(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=a(e);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:i*o.x,y:r*o.y}}function v(t,r,i){let a;if(r===`viewport`||r===`layoutViewport`)a=g(t,i,r);else if(r===`document`)a=m(n.getDocumentElement(t));else if(n.isElement(r))a=_(r,i);else{let e=s(t);a={x:r.x-e.x,y:r.y-e.y,width:r.width,height:r.height}}return e.rectToClientRect(a)}function y(e,t){let r=t.get(e);if(r)return r;let i=n.getOverflowAncestors(e,[],!1).filter(e=>n.isElement(e)&&n.getNodeName(e)!==`body`),a=null,o=n.getComputedStyle(e).position===`fixed`,s=o?n.getParentNode(e):e;for(;n.isElement(s)&&!n.isLastTraversableNode(s);){let e=n.getComputedStyle(s),t=n.isContainingBlock(s),r=a?a.position:o?`fixed`:``;!t&&(r===`fixed`||r===`absolute`&&e.position===`static`)?i=i.filter(e=>e!==s):a=e,s=n.getParentNode(s)}return t.set(e,i),i}function b(t){let{element:r,boundary:i,rootBoundary:a,strategy:o}=t,s=[...i===`clippingAncestors`?n.isTopLayer(r)?[]:y(r,this._c):[].concat(i),a],c=v(r,s[0],o),l=c.top,u=c.right,d=c.bottom,f=c.left;for(let t=1;t<s.length;t++){let n=v(r,s[t],o);l=e.max(n.top,l),u=e.min(n.right,u),d=e.min(n.bottom,d),f=e.max(n.left,f)}return{width:u-f,height:d-l,x:f,y:l}}function x(e){let{width:t,height:n}=r(e);return{width:t,height:n}}function S(t,r,i){let a=n.isHTMLElement(r),o=n.getDocumentElement(r),s=i===`fixed`,c=l(t,!0,s,r),f={scrollLeft:0,scrollTop:0},p=e.createCoords(0);if((a||!s)&&((n.getNodeName(r)!==`body`||n.isOverflowElement(o))&&(f=n.getNodeScroll(r)),a)){let e=l(r,!0,s,r);p.x=e.x+r.clientLeft,p.y=e.y+r.clientTop}!a&&o&&(p.x=u(o));let m=o&&!a&&!s?d(o,f):e.createCoords(0);return{x:c.left+f.scrollLeft-p.x-m.x,y:c.top+f.scrollTop-p.y-m.y,width:c.width,height:c.height}}function C(e){return n.getComputedStyle(e).position===`static`}function w(e,t){if(!n.isHTMLElement(e)||n.getComputedStyle(e).position===`fixed`)return null;if(t)return t(e);let r=e.offsetParent;return n.getDocumentElement(e)===r&&(r=r.ownerDocument.body),r}function T(e,t){let r=n.getWindow(e);if(n.isTopLayer(e))return r;if(!n.isHTMLElement(e)){let t=n.getParentNode(e);for(;t&&!n.isLastTraversableNode(t);){if(n.isElement(t)&&!C(t))return t;t=n.getParentNode(t)}return r}let i=w(e,t);for(;i&&n.isTableElement(i)&&C(i);)i=w(i,t);return i&&n.isLastTraversableNode(i)&&C(i)&&!n.isContainingBlock(i)?r:i||n.getContainingBlock(e)||r}var E=async function(e){let t=this.getOffsetParent||T,n=this.getDimensions,r=await n(e.floating);return{reference:S(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function D(e){return n.getComputedStyle(e).direction===`rtl`}var O={convertOffsetParentRelativeRectToViewportRelativeRect:f,getDocumentElement:n.getDocumentElement,getClippingRect:b,getOffsetParent:T,getElementRects:E,getClientRects:p,getDimensions:x,getScale:a,isElement:n.isElement,isRTL:D};function k(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function A(t,r,i){let a=null,o,s=n.getDocumentElement(t);function c(){var e;clearTimeout(o),(e=a)==null||e.disconnect(),a=null}function l(n,i){n===void 0&&(n=!1),i===void 0&&(i=1),c();let u=t.getBoundingClientRect(),{left:d,top:f,width:p,height:m}=u;if(n||r(),!p||!m)return;let h=e.floor(f),g=e.floor(s.clientWidth-(d+p)),_=e.floor(s.clientHeight-(f+m)),v=e.floor(d),y={rootMargin:-h+`px `+-g+`px `+-_+`px `+-v+`px`,threshold:e.max(0,e.min(1,i))||1},b=!0;function x(e){let n=e[0].intersectionRatio;if(!k(u,t.getBoundingClientRect()))return l();if(n!==i){if(!b)return l();n?l(!1,n):o=setTimeout(()=>{l(!1,1e-7)},1e3)}b=!1}try{a=new IntersectionObserver(x,{...y,root:s.ownerDocument})}catch{a=new IntersectionObserver(x,y)}a.observe(t)}let u=n.getWindow(t),d=()=>l(i);return u.addEventListener(`resize`,d),l(!0),()=>{u.removeEventListener(`resize`,d),c()}}function j(e,t,r,a){a===void 0&&(a={});let{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:c=typeof ResizeObserver==`function`,layoutShift:u=typeof IntersectionObserver==`function`,animationFrame:d=!1}=a,f=i(e),p=o||s?[...f?n.getOverflowAncestors(f):[],...t?n.getOverflowAncestors(t):[]]:[];p.forEach(e=>{o&&e.addEventListener(`scroll`,r),s&&e.addEventListener(`resize`,r)});let m=f&&u?A(f,r,s):null,h=-1,g=null;c&&(g=new ResizeObserver(e=>{let[n]=e;n&&n.target===f&&g&&t&&(g.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var e;(e=g)==null||e.observe(t)})),r()}),f&&!d&&g.observe(f),t&&g.observe(t));let _,v=d?l(e):null;d&&y();function y(){let t=l(e);v&&!k(v,t)&&r(),v=t,_=requestAnimationFrame(y)}return r(),()=>{var e;p.forEach(e=>{o&&e.removeEventListener(`scroll`,r),s&&e.removeEventListener(`resize`,r)}),m?.(),(e=g)==null||e.disconnect(),g=null,d&&cancelAnimationFrame(_)}}var M=t.offset,N=t.shift,P=t.flip,F=t.size,I=t.hide,L=t.arrow,R=t.limitShift,z=(e,n,r)=>{let i=new Map,a=r??{},o={...O,...a.platform,_c:i};return t.computePosition(e,n,{...a,platform:o})};exports.arrow=L,exports.autoUpdate=j,exports.computePosition=z,exports.flip=P,exports.hide=I,exports.limitShift=R,exports.offset=M,exports.platform=O,exports.shift=N,exports.size=F;
package/dist/index44.js CHANGED
@@ -1,88 +1,212 @@
1
- //#region src/MultiSelect/utils.ts
2
- var e = (e) => Array.isArray(e) && e.length > 0 && "heading" in e[0], t = (e, t) => {
3
- if (e.length !== t.length) return !1;
4
- let n = [...e].sort(), r = [...t].sort();
5
- return n.every((e, t) => e === r[t]);
6
- }, n = (t, n) => {
7
- if (t.length === 0) return {
8
- options: [],
9
- duplicates: []
10
- };
11
- let r = e(t) ? t.flatMap((e) => e.options) : t, i = /* @__PURE__ */ new Set(), a = [], o = [];
12
- return r.forEach((e) => {
13
- i.has(e.value) ? (a.push(e.value), n || o.push(e)) : (i.add(e.value), o.push(e));
14
- }), {
15
- options: n ? o : r,
16
- duplicates: a
17
- };
18
- }, r = (e, t, n) => {
19
- if (!e) return {
20
- maxCount: t,
21
- hideIcons: !1,
22
- compactMode: !1
23
- };
24
- if (e === !0) {
1
+ import "./index42.js";
2
+ import { arrow as e, computePosition as t, flip as n, hide as r, limitShift as i, offset as a, shift as o, size as s } from "./index43.js";
3
+ import * as c from "react";
4
+ import { useLayoutEffect as l } from "react";
5
+ import * as u from "react-dom";
6
+ //#region ../../node_modules/.pnpm/@floating-ui+react-dom@2.1.9_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs
7
+ var d = typeof document < "u" ? l : function() {};
8
+ function f(e, t) {
9
+ if (e === t) return !0;
10
+ if (typeof e != typeof t) return !1;
11
+ if (typeof e == "function" && e.toString() === t.toString()) return !0;
12
+ let n, r, i;
13
+ if (e && t && typeof e == "object") {
14
+ if (Array.isArray(e)) {
15
+ if (n = e.length, n !== t.length) return !1;
16
+ for (r = n; r-- !== 0;) if (!f(e[r], t[r])) return !1;
17
+ return !0;
18
+ }
19
+ if (i = Object.keys(e), n = i.length, n !== Object.keys(t).length) return !1;
20
+ for (r = n; r-- !== 0;) if (!{}.hasOwnProperty.call(t, i[r])) return !1;
21
+ for (r = n; r-- !== 0;) {
22
+ let n = i[r];
23
+ if (!(n === "_owner" && e.$$typeof) && !f(e[n], t[n])) return !1;
24
+ }
25
+ return !0;
26
+ }
27
+ return e !== e && t !== t;
28
+ }
29
+ function p(e) {
30
+ return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
31
+ }
32
+ function m(e, t) {
33
+ let n = p(e);
34
+ return Math.round(t * n) / n;
35
+ }
36
+ function h(e) {
37
+ let t = c.useRef(e);
38
+ return d(() => {
39
+ t.current = e;
40
+ }), t;
41
+ }
42
+ function g(e) {
43
+ e === void 0 && (e = {});
44
+ let { placement: n = "bottom", strategy: r = "absolute", middleware: i = [], platform: a, elements: { reference: o, floating: s } = {}, transform: l = !0, whileElementsMounted: g, open: _ } = e, [v, y] = c.useState({
45
+ x: 0,
46
+ y: 0,
47
+ strategy: r,
48
+ placement: n,
49
+ middlewareData: {},
50
+ isPositioned: !1
51
+ }), [b, x] = c.useState(i);
52
+ f(b, i) || x(i);
53
+ let [S, C] = c.useState(null), [w, T] = c.useState(null), E = c.useCallback((e) => {
54
+ e !== A.current && (A.current = e, C(e));
55
+ }, []), D = c.useCallback((e) => {
56
+ e !== j.current && (j.current = e, T(e));
57
+ }, []), O = o || S, k = s || w, A = c.useRef(null), j = c.useRef(null), M = c.useRef(v), N = g != null, P = h(g), F = h(a), I = h(_), L = c.useCallback(() => {
58
+ if (!A.current || !j.current) return;
59
+ let e = {
60
+ placement: n,
61
+ strategy: r,
62
+ middleware: b
63
+ };
64
+ F.current && (e.platform = F.current), t(A.current, j.current, e).then((e) => {
65
+ let t = {
66
+ ...e,
67
+ isPositioned: I.current !== !1
68
+ };
69
+ R.current && !f(M.current, t) && (M.current = t, u.flushSync(() => {
70
+ y(t);
71
+ }));
72
+ });
73
+ }, [
74
+ b,
75
+ n,
76
+ r,
77
+ F,
78
+ I
79
+ ]);
80
+ d(() => {
81
+ _ === !1 && M.current.isPositioned && (M.current.isPositioned = !1, y((e) => ({
82
+ ...e,
83
+ isPositioned: !1
84
+ })));
85
+ }, [_]);
86
+ let R = c.useRef(!1);
87
+ d(() => (R.current = !0, () => {
88
+ R.current = !1;
89
+ }), []), d(() => {
90
+ if (O && (A.current = O), k && (j.current = k), O && k) {
91
+ if (P.current) return P.current(O, k, L);
92
+ L();
93
+ }
94
+ }, [
95
+ O,
96
+ k,
97
+ L,
98
+ P,
99
+ N
100
+ ]);
101
+ let z = c.useMemo(() => ({
102
+ reference: A,
103
+ floating: j,
104
+ setReference: E,
105
+ setFloating: D
106
+ }), [E, D]), B = c.useMemo(() => ({
107
+ reference: O,
108
+ floating: k
109
+ }), [O, k]), V = c.useMemo(() => {
25
110
  let e = {
26
- mobile: {
27
- maxCount: 2,
28
- hideIcons: !1,
29
- compactMode: !0
30
- },
31
- tablet: {
32
- maxCount: 4,
33
- hideIcons: !1,
34
- compactMode: !1
35
- },
36
- desktop: {
37
- maxCount: 6,
38
- hideIcons: !1,
39
- compactMode: !1
40
- }
41
- }[n];
42
- return {
43
- maxCount: e?.maxCount ?? t,
44
- hideIcons: e?.hideIcons ?? !1,
45
- compactMode: e?.compactMode ?? !1
111
+ position: r,
112
+ left: 0,
113
+ top: 0
46
114
  };
115
+ if (!B.floating) return e;
116
+ let t = m(B.floating, v.x), n = m(B.floating, v.y);
117
+ return l ? {
118
+ ...e,
119
+ transform: "translate(" + t + "px, " + n + "px)",
120
+ ...p(B.floating) >= 1.5 && { willChange: "transform" }
121
+ } : {
122
+ position: r,
123
+ left: t,
124
+ top: n
125
+ };
126
+ }, [
127
+ r,
128
+ l,
129
+ B.floating,
130
+ v.x,
131
+ v.y
132
+ ]);
133
+ return c.useMemo(() => ({
134
+ ...v,
135
+ update: L,
136
+ refs: z,
137
+ elements: B,
138
+ floatingStyles: V
139
+ }), [
140
+ v,
141
+ L,
142
+ z,
143
+ B,
144
+ V
145
+ ]);
146
+ }
147
+ var _ = (t) => {
148
+ function n(e) {
149
+ return {}.hasOwnProperty.call(e, "current");
47
150
  }
48
- let r = e[n];
49
151
  return {
50
- maxCount: r?.maxCount ?? t,
51
- hideIcons: r?.hideIcons ?? !1,
52
- compactMode: r?.compactMode ?? !1
152
+ name: "arrow",
153
+ options: t,
154
+ fn(r) {
155
+ let { element: i, padding: a } = typeof t == "function" ? t(r) : t;
156
+ return i && n(i) ? i.current == null ? {} : e({
157
+ element: i.current,
158
+ padding: a
159
+ }).fn(r) : i ? e({
160
+ element: i,
161
+ padding: a
162
+ }).fn(r) : {};
163
+ }
164
+ };
165
+ }, v = (e, t) => {
166
+ let n = a(e);
167
+ return {
168
+ name: n.name,
169
+ fn: n.fn,
170
+ options: [e, t]
171
+ };
172
+ }, y = (e, t) => {
173
+ let n = o(e);
174
+ return {
175
+ name: n.name,
176
+ fn: n.fn,
177
+ options: [e, t]
178
+ };
179
+ }, b = (e, t) => ({
180
+ fn: i(e).fn,
181
+ options: [e, t]
182
+ }), x = (e, t) => {
183
+ let r = n(e);
184
+ return {
185
+ name: r.name,
186
+ fn: r.fn,
187
+ options: [e, t]
188
+ };
189
+ }, S = (e, t) => {
190
+ let n = s(e);
191
+ return {
192
+ name: n.name,
193
+ fn: n.fn,
194
+ options: [e, t]
195
+ };
196
+ }, C = (e, t) => {
197
+ let n = r(e);
198
+ return {
199
+ name: n.name,
200
+ fn: n.fn,
201
+ options: [e, t]
202
+ };
203
+ }, w = (e, t) => {
204
+ let n = _(e);
205
+ return {
206
+ name: n.name,
207
+ fn: n.fn,
208
+ options: [e, t]
53
209
  };
54
- }, i = (e, t) => {
55
- if (t?.badgeAnimation) switch (t.badgeAnimation) {
56
- case "bounce": return e ? "animate-bounce" : "hover:-translate-y-1 hover:scale-110";
57
- case "pulse": return "hover:animate-pulse";
58
- case "wiggle": return "hover:animate-wiggle";
59
- case "fade": return "hover:opacity-80";
60
- case "slide": return "hover:translate-x-1";
61
- case "none": return "";
62
- default: return "";
63
- }
64
- return e ? "animate-bounce" : "";
65
- }, a = (e) => {
66
- if (e?.popoverAnimation) switch (e.popoverAnimation) {
67
- case "scale": return "animate-scaleIn";
68
- case "slide": return "animate-slideInDown";
69
- case "fade": return "animate-fadeIn";
70
- case "flip": return "animate-flipIn";
71
- case "none": return "";
72
- default: return "";
73
- }
74
- return "";
75
- }, o = (t, n, r) => !r || !n ? t : t.length === 0 ? [] : e(t) ? t.map((e) => ({
76
- ...e,
77
- options: e.options.filter((e) => e.label.toLowerCase().includes(n.toLowerCase()) || e.value.toLowerCase().includes(n.toLowerCase()))
78
- })).filter((e) => e.options.length > 0) : t.filter((e) => e.label.toLowerCase().includes(n.toLowerCase()) || e.value.toLowerCase().includes(n.toLowerCase())), s = (e, t, n, r) => ({
79
- minWidth: n || (e === "mobile" ? "0px" : "200px"),
80
- maxWidth: r || "100%",
81
- width: t ? "auto" : "100%"
82
- }), c = (e, t) => {
83
- if (!t) return e.length;
84
- let n = t.toLowerCase();
85
- return e.filter((e) => e.label.toLowerCase().includes(n) || e.value.toLowerCase().includes(n)).length;
86
210
  };
87
211
  //#endregion
88
- export { t as arraysEqual, n as buildAllOptions, i as buildBadgeAnimationClass, a as buildPopoverAnimationClass, s as buildWidthConstraints, r as computeResponsiveSettings, c as countMatchingOptions, o as filterOptions, e as isGroupedOptions };
212
+ export { w as arrow, x as flip, C as hide, b as limitShift, v as offset, y as shift, S as size, g as useFloating };
package/dist/index45.cjs CHANGED
@@ -1 +1 @@
1
- var e=e=>Array.isArray(e)&&e.length>0&&`heading`in e[0],t=(e,t)=>{if(e.length!==t.length)return!1;let n=[...e].sort(),r=[...t].sort();return n.every((e,t)=>e===r[t])},n=(t,n)=>{if(t.length===0)return{options:[],duplicates:[]};let r=e(t)?t.flatMap(e=>e.options):t,i=new Set,a=[],o=[];return r.forEach(e=>{i.has(e.value)?(a.push(e.value),n||o.push(e)):(i.add(e.value),o.push(e))}),{options:n?o:r,duplicates:a}},r=(e,t,n)=>{if(!e)return{maxCount:t,hideIcons:!1,compactMode:!1};if(e===!0){let e={mobile:{maxCount:2,hideIcons:!1,compactMode:!0},tablet:{maxCount:4,hideIcons:!1,compactMode:!1},desktop:{maxCount:6,hideIcons:!1,compactMode:!1}}[n];return{maxCount:e?.maxCount??t,hideIcons:e?.hideIcons??!1,compactMode:e?.compactMode??!1}}let r=e[n];return{maxCount:r?.maxCount??t,hideIcons:r?.hideIcons??!1,compactMode:r?.compactMode??!1}},i=(e,t)=>{if(t?.badgeAnimation)switch(t.badgeAnimation){case`bounce`:return e?`animate-bounce`:`hover:-translate-y-1 hover:scale-110`;case`pulse`:return`hover:animate-pulse`;case`wiggle`:return`hover:animate-wiggle`;case`fade`:return`hover:opacity-80`;case`slide`:return`hover:translate-x-1`;case`none`:return``;default:return``}return e?`animate-bounce`:``},a=e=>{if(e?.popoverAnimation)switch(e.popoverAnimation){case`scale`:return`animate-scaleIn`;case`slide`:return`animate-slideInDown`;case`fade`:return`animate-fadeIn`;case`flip`:return`animate-flipIn`;case`none`:return``;default:return``}return``},o=(t,n,r)=>!r||!n?t:t.length===0?[]:e(t)?t.map(e=>({...e,options:e.options.filter(e=>e.label.toLowerCase().includes(n.toLowerCase())||e.value.toLowerCase().includes(n.toLowerCase()))})).filter(e=>e.options.length>0):t.filter(e=>e.label.toLowerCase().includes(n.toLowerCase())||e.value.toLowerCase().includes(n.toLowerCase())),s=(e,t,n,r)=>({minWidth:n||(e===`mobile`?`0px`:`200px`),maxWidth:r||`100%`,width:t?`auto`:`100%`}),c=(e,t)=>{if(!t)return e.length;let n=t.toLowerCase();return e.filter(e=>e.label.toLowerCase().includes(n)||e.value.toLowerCase().includes(n)).length};exports.arraysEqual=t,exports.buildAllOptions=n,exports.buildBadgeAnimationClass=i,exports.buildPopoverAnimationClass=a,exports.buildWidthConstraints=s,exports.computeResponsiveSettings=r,exports.countMatchingOptions=c,exports.filterOptions=o,exports.isGroupedOptions=e;
1
+ const e=require("./index2.cjs");require("./index43.cjs");const t=require("./index44.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("react-dom");r=e.__toESM(r,1);var i=typeof document<`u`?n.useLayoutEffect:function(){};function a(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!a(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!a(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function o(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function s(e,t){let n=o(e);return Math.round(t*n)/n}function c(e){let t=n.useRef(e);return i(()=>{t.current=e}),t}function l(e){e===void 0&&(e={});let{placement:l=`bottom`,strategy:u=`absolute`,middleware:d=[],platform:f,elements:{reference:p,floating:m}={},transform:h=!0,whileElementsMounted:g,open:_}=e,[v,y]=n.useState({x:0,y:0,strategy:u,placement:l,middlewareData:{},isPositioned:!1}),[b,x]=n.useState(d);a(b,d)||x(d);let[S,C]=n.useState(null),[w,T]=n.useState(null),E=n.useCallback(e=>{e!==A.current&&(A.current=e,C(e))},[]),D=n.useCallback(e=>{e!==j.current&&(j.current=e,T(e))},[]),O=p||S,k=m||w,A=n.useRef(null),j=n.useRef(null),M=n.useRef(v),N=g!=null,P=c(g),F=c(f),I=c(_),L=n.useCallback(()=>{if(!A.current||!j.current)return;let e={placement:l,strategy:u,middleware:b};F.current&&(e.platform=F.current),t.computePosition(A.current,j.current,e).then(e=>{let t={...e,isPositioned:I.current!==!1};R.current&&!a(M.current,t)&&(M.current=t,r.flushSync(()=>{y(t)}))})},[b,l,u,F,I]);i(()=>{_===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,y(e=>({...e,isPositioned:!1})))},[_]);let R=n.useRef(!1);i(()=>(R.current=!0,()=>{R.current=!1}),[]),i(()=>{if(O&&(A.current=O),k&&(j.current=k),O&&k){if(P.current)return P.current(O,k,L);L()}},[O,k,L,P,N]);let z=n.useMemo(()=>({reference:A,floating:j,setReference:E,setFloating:D}),[E,D]),B=n.useMemo(()=>({reference:O,floating:k}),[O,k]),V=n.useMemo(()=>{let e={position:u,left:0,top:0};if(!B.floating)return e;let t=s(B.floating,v.x),n=s(B.floating,v.y);return h?{...e,transform:`translate(`+t+`px, `+n+`px)`,...o(B.floating)>=1.5&&{willChange:`transform`}}:{position:u,left:t,top:n}},[u,h,B.floating,v.x,v.y]);return n.useMemo(()=>({...v,update:L,refs:z,elements:B,floatingStyles:V}),[v,L,z,B,V])}var u=e=>{function n(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(r){let{element:i,padding:a}=typeof e==`function`?e(r):e;return i&&n(i)?i.current==null?{}:t.arrow({element:i.current,padding:a}).fn(r):i?t.arrow({element:i,padding:a}).fn(r):{}}}},d=(e,n)=>{let r=t.offset(e);return{name:r.name,fn:r.fn,options:[e,n]}},f=(e,n)=>{let r=t.shift(e);return{name:r.name,fn:r.fn,options:[e,n]}},p=(e,n)=>({fn:t.limitShift(e).fn,options:[e,n]}),m=(e,n)=>{let r=t.flip(e);return{name:r.name,fn:r.fn,options:[e,n]}},h=(e,n)=>{let r=t.size(e);return{name:r.name,fn:r.fn,options:[e,n]}},g=(e,n)=>{let r=t.hide(e);return{name:r.name,fn:r.fn,options:[e,n]}},_=(e,t)=>{let n=u(e);return{name:n.name,fn:n.fn,options:[e,t]}};exports.arrow=_,exports.flip=m,exports.hide=g,exports.limitShift=p,exports.offset=d,exports.shift=f,exports.size=h,exports.useFloating=l;
package/dist/index45.js CHANGED
@@ -1,221 +1,34 @@
1
- import { cn as e } from "./index3.js";
2
- import { Badge as t } from "./index5.js";
3
- import { Command as n, CommandEmpty as r, CommandGroup as i, CommandInput as a, CommandItem as o, CommandList as s, CommandSeparator as c } from "./index11.js";
4
- import { Separator as l } from "./index14.js";
5
- import { multiSelectVariants as u } from "./index43.js";
6
- import { isGroupedOptions as d } from "./index44.js";
7
- import { CheckIcon as f, ChevronDown as p, XCircle as m, XIcon as h } from "lucide-react";
8
- import "react";
9
- import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
10
- //#region src/MultiSelect/renderers.tsx
11
- var y = ({ politeMessage: e, assertiveMessage: t }) => /* @__PURE__ */ v("div", {
12
- className: "sr-only",
13
- children: [/* @__PURE__ */ _("div", {
14
- "aria-live": "polite",
15
- "aria-atomic": "true",
16
- role: "status",
17
- children: e
18
- }), /* @__PURE__ */ _("div", {
19
- "aria-live": "assertive",
20
- "aria-atomic": "true",
21
- role: "alert",
22
- children: t
23
- })]
24
- }), b = ({ selectedValues: n, responsiveSettings: r, screenSize: i, singleLine: a, animation: o, animationConfig: s, badgeAnimationClass: c, variant: d, getOptionByValue: f, toggleOption: g, clearExtraOptions: y, handleClear: b }) => /* @__PURE__ */ v("div", {
25
- className: "flex justify-between items-center w-full",
26
- children: [/* @__PURE__ */ v("div", {
27
- className: e("flex items-center gap-1", a ? "overflow-x-auto multiselect-singleline-scroll" : "flex-wrap", r.compactMode && "gap-0.5"),
28
- style: a ? { paddingBottom: "4px" } : {},
29
- children: [n.slice(0, r.maxCount).map((n) => {
30
- let l = f(n), p = l?.icon, h = l?.style;
31
- if (!l) return null;
32
- let y = {
33
- animationDuration: `${o}s`,
34
- ...h?.badgeColor && { backgroundColor: h.badgeColor },
35
- ...h?.gradient && {
36
- background: h.gradient,
37
- color: "white"
38
- }
39
- };
40
- return /* @__PURE__ */ v(t, {
41
- className: e(c, u({ variant: d }), h?.gradient && "text-white border-transparent", r.compactMode && "text-xs px-1.5 py-0.5", i === "mobile" && "max-w-30 truncate", a && "shrink-0 whitespace-nowrap", "[&>svg]:pointer-events-auto"),
42
- style: {
43
- ...y,
44
- animationDuration: `${s?.duration || o}s`,
45
- animationDelay: `${s?.delay || 0}s`
46
- },
47
- children: [
48
- p && !r.hideIcons && /* @__PURE__ */ _(p, {
49
- className: e("h-4 w-4 mr-2", r.compactMode && "h-3 w-3 mr-1", h?.iconColor && "text-current"),
50
- ...h?.iconColor && { style: { color: h.iconColor } }
51
- }),
52
- /* @__PURE__ */ _("span", {
53
- className: e(i === "mobile" && "truncate"),
54
- children: l.label
55
- }),
56
- /* @__PURE__ */ _("div", {
57
- role: "button",
58
- tabIndex: 0,
59
- onClick: (e) => {
60
- e.stopPropagation(), g(n);
61
- },
62
- onKeyDown: (e) => {
63
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), g(n));
64
- },
65
- "aria-label": `Remove ${l.label} from selection`,
66
- className: "ml-2 h-4 w-4 cursor-pointer hover:bg-white/20 rounded-sm p-0.5 -m-0.5 focus:outline-none focus:ring-1 focus:ring-white/50",
67
- children: /* @__PURE__ */ _(m, { className: e("h-3 w-3", r.compactMode && "h-2.5 w-2.5") })
68
- })
69
- ]
70
- }, n);
71
- }).filter(Boolean), n.length > r.maxCount && /* @__PURE__ */ v(t, {
72
- className: e("bg-transparent text-foreground border-foreground/1 hover:bg-transparent", c, u({ variant: d }), r.compactMode && "text-xs px-1.5 py-0.5", a && "shrink-0 whitespace-nowrap", "[&>svg]:pointer-events-auto"),
73
- style: {
74
- animationDuration: `${s?.duration || o}s`,
75
- animationDelay: `${s?.delay || 0}s`
76
- },
77
- children: [`+ ${n.length - r.maxCount} more`, /* @__PURE__ */ _(m, {
78
- className: e("ml-2 h-4 w-4 cursor-pointer", r.compactMode && "ml-1 h-3 w-3"),
79
- onClick: (e) => {
80
- e.stopPropagation(), y();
81
- }
82
- })]
83
- })]
84
- }), /* @__PURE__ */ v("div", {
85
- className: "flex items-center justify-between",
86
- children: [
87
- /* @__PURE__ */ _("div", {
88
- role: "button",
89
- tabIndex: 0,
90
- onClick: (e) => {
91
- e.stopPropagation(), b();
92
- },
93
- onKeyDown: (e) => {
94
- (e.key === "Enter" || e.key === " ") && (e.preventDefault(), e.stopPropagation(), b());
95
- },
96
- "aria-label": `Clear all ${n.length} selected options`,
97
- className: "flex items-center justify-center h-4 w-4 mx-2 cursor-pointer text-muted-foreground hover:text-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-1 rounded-sm",
98
- children: /* @__PURE__ */ _(h, { className: "h-4 w-4" })
99
- }),
100
- /* @__PURE__ */ _(l, {
101
- orientation: "vertical",
102
- className: "flex min-h-6 h-full"
103
- }),
104
- /* @__PURE__ */ _(p, {
105
- className: "h-4 mx-2 cursor-pointer text-muted-foreground",
106
- "aria-hidden": "true"
107
- })
108
- ]
109
- })]
110
- }), x = ({ placeholder: e }) => /* @__PURE__ */ v("div", {
111
- className: "flex items-center justify-between w-full mx-auto",
112
- children: [/* @__PURE__ */ _("span", {
113
- className: "text-sm text-muted-foreground mx-3",
114
- children: e
115
- }), /* @__PURE__ */ _(p, { className: "h-4 cursor-pointer text-muted-foreground mx-2" })]
116
- }), S = ({ filteredOptions: t, hideSelectAll: u, searchValue: p, searchable: m, selectedValues: h, getAllOptions: y, toggleAll: b, toggleOption: x, handleClear: S, setIsPopoverOpen: C, handleInputKeyDown: w, setSearchValue: T, multiSelectId: E, emptyIndicator: D, screenSize: O }) => /* @__PURE__ */ v(n, { children: [
117
- m && /* @__PURE__ */ _(a, {
118
- placeholder: "Search options...",
119
- onKeyDown: w,
120
- value: p,
121
- onValueChange: T,
122
- "aria-label": "Search through available options",
123
- "aria-describedby": `${E}-search-help`
124
- }),
125
- m && /* @__PURE__ */ _("div", {
126
- id: `${E}-search-help`,
127
- className: "sr-only",
128
- children: "Type to filter options. Use arrow keys to navigate results."
129
- }),
130
- /* @__PURE__ */ v(s, {
131
- className: e("max-h-[40vh] overflow-y-auto multiselect-scrollbar", O === "mobile" && "max-h-[50vh]", "overscroll-behavior-y-contain"),
132
- children: [
133
- /* @__PURE__ */ _(r, { children: D || "No results found." }),
134
- " ",
135
- !u && !p && /* @__PURE__ */ _(i, { children: /* @__PURE__ */ v(o, {
136
- onSelect: b,
137
- role: "option",
138
- "aria-selected": h.length === y().filter((e) => !e.disabled).length,
139
- "aria-label": `Select all ${y().length} options`,
140
- className: "cursor-pointer",
141
- children: [/* @__PURE__ */ _("div", {
142
- className: e("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary", h.length === y().filter((e) => !e.disabled).length ? "bg-primary text-primary-foreground" : "opacity-50 [&_svg]:invisible"),
143
- "aria-hidden": "true",
144
- children: /* @__PURE__ */ _(f, { className: "h-4 w-4" })
145
- }), /* @__PURE__ */ v("span", { children: [
146
- "(Select All",
147
- y().length > 20 ? ` - ${y().length} options` : "",
148
- ")"
149
- ] })]
150
- }, "all") }),
151
- d(t) ? t.map((t) => /* @__PURE__ */ _(i, {
152
- heading: t.heading,
153
- children: t.options.map((t) => {
154
- let n = h.includes(t.value);
155
- return /* @__PURE__ */ v(o, {
156
- onSelect: () => x(t.value),
157
- role: "option",
158
- "aria-selected": n,
159
- "aria-disabled": t.disabled,
160
- "aria-label": `${t.label}${n ? ", selected" : ", not selected"}${t.disabled ? ", disabled" : ""}`,
161
- className: e("cursor-pointer", t.disabled && "opacity-50 cursor-not-allowed"),
162
- disabled: t.disabled,
163
- children: [
164
- /* @__PURE__ */ _("div", {
165
- className: e("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary", n ? "bg-primary text-primary-foreground" : "opacity-50 [&_svg]:invisible"),
166
- "aria-hidden": "true",
167
- children: /* @__PURE__ */ _(f, { className: "h-4 w-4" })
168
- }),
169
- t.icon && /* @__PURE__ */ _(t.icon, {
170
- className: "mr-2 h-4 w-4 text-muted-foreground",
171
- "aria-hidden": "true"
172
- }),
173
- /* @__PURE__ */ _("span", { children: t.label })
174
- ]
175
- }, t.value);
176
- })
177
- }, t.heading)) : /* @__PURE__ */ _(i, { children: t.map((t) => {
178
- let n = h.includes(t.value);
179
- return /* @__PURE__ */ v(o, {
180
- onSelect: () => x(t.value),
181
- role: "option",
182
- "aria-selected": n,
183
- "aria-disabled": t.disabled,
184
- "aria-label": `${t.label}${n ? ", selected" : ", not selected"}${t.disabled ? ", disabled" : ""}`,
185
- className: e("cursor-pointer", t.disabled && "opacity-50 cursor-not-allowed"),
186
- disabled: t.disabled,
187
- children: [
188
- /* @__PURE__ */ _("div", {
189
- className: e("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary", n ? "bg-primary text-primary-foreground" : "opacity-50 [&_svg]:invisible"),
190
- "aria-hidden": "true",
191
- children: /* @__PURE__ */ _(f, { className: "h-4 w-4" })
192
- }),
193
- t.icon && /* @__PURE__ */ _(t.icon, {
194
- className: "mr-2 h-4 w-4 text-muted-foreground",
195
- "aria-hidden": "true"
196
- }),
197
- /* @__PURE__ */ _("span", { children: t.label })
198
- ]
199
- }, t.value);
200
- }) }),
201
- /* @__PURE__ */ _(c, {}),
202
- /* @__PURE__ */ _(i, { children: /* @__PURE__ */ v("div", {
203
- className: "flex items-center justify-between",
204
- children: [h.length > 0 && /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(o, {
205
- onSelect: S,
206
- className: "flex-1 justify-center cursor-pointer",
207
- children: "Clear"
208
- }), /* @__PURE__ */ _(l, {
209
- orientation: "vertical",
210
- className: "flex min-h-6 h-full"
211
- })] }), /* @__PURE__ */ _(o, {
212
- onSelect: () => C(!1),
213
- className: "flex-1 justify-center cursor-pointer max-w-full",
214
- children: "Close"
215
- })]
216
- }) })
217
- ]
218
- })
219
- ] });
1
+ import { useLayoutEffect2 as e } from "./index16.js";
2
+ import * as t from "react";
3
+ //#region ../../node_modules/.pnpm/@radix-ui+react-use-size@1.1.4_@types+react@19.2.17_react@19.2.8/node_modules/@radix-ui/react-use-size/dist/index.mjs
4
+ var n = Object.defineProperty, r = (e, t) => n(e, "name", {
5
+ value: t,
6
+ configurable: !0
7
+ });
8
+ function i(n) {
9
+ let [r, i] = t.useState(void 0);
10
+ return e(() => {
11
+ if (n) {
12
+ i({
13
+ width: n.offsetWidth,
14
+ height: n.offsetHeight
15
+ });
16
+ let e = new ResizeObserver((e) => {
17
+ if (!Array.isArray(e) || !e.length) return;
18
+ let t = e[0], r, a;
19
+ if ("borderBoxSize" in t) {
20
+ let e = t.borderBoxSize, n = Array.isArray(e) ? e[0] : e;
21
+ r = n.inlineSize, a = n.blockSize;
22
+ } else r = n.offsetWidth, a = n.offsetHeight;
23
+ i({
24
+ width: r,
25
+ height: a
26
+ });
27
+ });
28
+ return e.observe(n, { box: "border-box" }), () => e.unobserve(n);
29
+ } else i(void 0);
30
+ }, [n]), r;
31
+ }
32
+ r(i, "useSize");
220
33
  //#endregion
221
- export { y as LiveRegion, S as OptionsContent, x as PlaceholderContent, b as SelectedValuesContent };
34
+ export { i as useSize };
package/dist/index46.cjs CHANGED
@@ -1 +1 @@
1
- const e=require("./index4.cjs"),t=require("./index6.cjs"),n=require("./index12.cjs"),r=require("./index15.cjs"),i=require("./index44.cjs"),a=require("./index45.cjs");let o=require("lucide-react");require("react");let s=require("react/jsx-runtime");var c=({politeMessage:e,assertiveMessage:t})=>(0,s.jsxs)(`div`,{className:`sr-only`,children:[(0,s.jsx)(`div`,{"aria-live":`polite`,"aria-atomic":`true`,role:`status`,children:e}),(0,s.jsx)(`div`,{"aria-live":`assertive`,"aria-atomic":`true`,role:`alert`,children:t})]}),l=({selectedValues:n,responsiveSettings:a,screenSize:c,singleLine:l,animation:u,animationConfig:d,badgeAnimationClass:f,variant:p,getOptionByValue:m,toggleOption:h,clearExtraOptions:g,handleClear:_})=>(0,s.jsxs)(`div`,{className:`flex justify-between items-center w-full`,children:[(0,s.jsxs)(`div`,{className:e.cn(`flex items-center gap-1`,l?`overflow-x-auto multiselect-singleline-scroll`:`flex-wrap`,a.compactMode&&`gap-0.5`),style:l?{paddingBottom:`4px`}:{},children:[n.slice(0,a.maxCount).map(n=>{let r=m(n),g=r?.icon,_=r?.style;if(!r)return null;let v={animationDuration:`${u}s`,..._?.badgeColor&&{backgroundColor:_.badgeColor},..._?.gradient&&{background:_.gradient,color:`white`}};return(0,s.jsxs)(t.Badge,{className:e.cn(f,i.multiSelectVariants({variant:p}),_?.gradient&&`text-white border-transparent`,a.compactMode&&`text-xs px-1.5 py-0.5`,c===`mobile`&&`max-w-30 truncate`,l&&`shrink-0 whitespace-nowrap`,`[&>svg]:pointer-events-auto`),style:{...v,animationDuration:`${d?.duration||u}s`,animationDelay:`${d?.delay||0}s`},children:[g&&!a.hideIcons&&(0,s.jsx)(g,{className:e.cn(`h-4 w-4 mr-2`,a.compactMode&&`h-3 w-3 mr-1`,_?.iconColor&&`text-current`),..._?.iconColor&&{style:{color:_.iconColor}}}),(0,s.jsx)(`span`,{className:e.cn(c===`mobile`&&`truncate`),children:r.label}),(0,s.jsx)(`div`,{role:`button`,tabIndex:0,onClick:e=>{e.stopPropagation(),h(n)},onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),e.stopPropagation(),h(n))},"aria-label":`Remove ${r.label} from selection`,className:`ml-2 h-4 w-4 cursor-pointer hover:bg-white/20 rounded-sm p-0.5 -m-0.5 focus:outline-none focus:ring-1 focus:ring-white/50`,children:(0,s.jsx)(o.XCircle,{className:e.cn(`h-3 w-3`,a.compactMode&&`h-2.5 w-2.5`)})})]},n)}).filter(Boolean),n.length>a.maxCount&&(0,s.jsxs)(t.Badge,{className:e.cn(`bg-transparent text-foreground border-foreground/1 hover:bg-transparent`,f,i.multiSelectVariants({variant:p}),a.compactMode&&`text-xs px-1.5 py-0.5`,l&&`shrink-0 whitespace-nowrap`,`[&>svg]:pointer-events-auto`),style:{animationDuration:`${d?.duration||u}s`,animationDelay:`${d?.delay||0}s`},children:[`+ ${n.length-a.maxCount} more`,(0,s.jsx)(o.XCircle,{className:e.cn(`ml-2 h-4 w-4 cursor-pointer`,a.compactMode&&`ml-1 h-3 w-3`),onClick:e=>{e.stopPropagation(),g()}})]})]}),(0,s.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,s.jsx)(`div`,{role:`button`,tabIndex:0,onClick:e=>{e.stopPropagation(),_()},onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),e.stopPropagation(),_())},"aria-label":`Clear all ${n.length} selected options`,className:`flex items-center justify-center h-4 w-4 mx-2 cursor-pointer text-muted-foreground hover:text-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-1 rounded-sm`,children:(0,s.jsx)(o.XIcon,{className:`h-4 w-4`})}),(0,s.jsx)(r.Separator,{orientation:`vertical`,className:`flex min-h-6 h-full`}),(0,s.jsx)(o.ChevronDown,{className:`h-4 mx-2 cursor-pointer text-muted-foreground`,"aria-hidden":`true`})]})]}),u=({placeholder:e})=>(0,s.jsxs)(`div`,{className:`flex items-center justify-between w-full mx-auto`,children:[(0,s.jsx)(`span`,{className:`text-sm text-muted-foreground mx-3`,children:e}),(0,s.jsx)(o.ChevronDown,{className:`h-4 cursor-pointer text-muted-foreground mx-2`})]}),d=({filteredOptions:t,hideSelectAll:i,searchValue:c,searchable:l,selectedValues:u,getAllOptions:d,toggleAll:f,toggleOption:p,handleClear:m,setIsPopoverOpen:h,handleInputKeyDown:g,setSearchValue:_,multiSelectId:v,emptyIndicator:y,screenSize:b})=>(0,s.jsxs)(n.Command,{children:[l&&(0,s.jsx)(n.CommandInput,{placeholder:`Search options...`,onKeyDown:g,value:c,onValueChange:_,"aria-label":`Search through available options`,"aria-describedby":`${v}-search-help`}),l&&(0,s.jsx)(`div`,{id:`${v}-search-help`,className:`sr-only`,children:`Type to filter options. Use arrow keys to navigate results.`}),(0,s.jsxs)(n.CommandList,{className:e.cn(`max-h-[40vh] overflow-y-auto multiselect-scrollbar`,b===`mobile`&&`max-h-[50vh]`,`overscroll-behavior-y-contain`),children:[(0,s.jsx)(n.CommandEmpty,{children:y||`No results found.`}),` `,!i&&!c&&(0,s.jsx)(n.CommandGroup,{children:(0,s.jsxs)(n.CommandItem,{onSelect:f,role:`option`,"aria-selected":u.length===d().filter(e=>!e.disabled).length,"aria-label":`Select all ${d().length} options`,className:`cursor-pointer`,children:[(0,s.jsx)(`div`,{className:e.cn(`mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary`,u.length===d().filter(e=>!e.disabled).length?`bg-primary text-primary-foreground`:`opacity-50 [&_svg]:invisible`),"aria-hidden":`true`,children:(0,s.jsx)(o.CheckIcon,{className:`h-4 w-4`})}),(0,s.jsxs)(`span`,{children:[`(Select All`,d().length>20?` - ${d().length} options`:``,`)`]})]},`all`)}),a.isGroupedOptions(t)?t.map(t=>(0,s.jsx)(n.CommandGroup,{heading:t.heading,children:t.options.map(t=>{let r=u.includes(t.value);return(0,s.jsxs)(n.CommandItem,{onSelect:()=>p(t.value),role:`option`,"aria-selected":r,"aria-disabled":t.disabled,"aria-label":`${t.label}${r?`, selected`:`, not selected`}${t.disabled?`, disabled`:``}`,className:e.cn(`cursor-pointer`,t.disabled&&`opacity-50 cursor-not-allowed`),disabled:t.disabled,children:[(0,s.jsx)(`div`,{className:e.cn(`mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary`,r?`bg-primary text-primary-foreground`:`opacity-50 [&_svg]:invisible`),"aria-hidden":`true`,children:(0,s.jsx)(o.CheckIcon,{className:`h-4 w-4`})}),t.icon&&(0,s.jsx)(t.icon,{className:`mr-2 h-4 w-4 text-muted-foreground`,"aria-hidden":`true`}),(0,s.jsx)(`span`,{children:t.label})]},t.value)})},t.heading)):(0,s.jsx)(n.CommandGroup,{children:t.map(t=>{let r=u.includes(t.value);return(0,s.jsxs)(n.CommandItem,{onSelect:()=>p(t.value),role:`option`,"aria-selected":r,"aria-disabled":t.disabled,"aria-label":`${t.label}${r?`, selected`:`, not selected`}${t.disabled?`, disabled`:``}`,className:e.cn(`cursor-pointer`,t.disabled&&`opacity-50 cursor-not-allowed`),disabled:t.disabled,children:[(0,s.jsx)(`div`,{className:e.cn(`mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary`,r?`bg-primary text-primary-foreground`:`opacity-50 [&_svg]:invisible`),"aria-hidden":`true`,children:(0,s.jsx)(o.CheckIcon,{className:`h-4 w-4`})}),t.icon&&(0,s.jsx)(t.icon,{className:`mr-2 h-4 w-4 text-muted-foreground`,"aria-hidden":`true`}),(0,s.jsx)(`span`,{children:t.label})]},t.value)})}),(0,s.jsx)(n.CommandSeparator,{}),(0,s.jsx)(n.CommandGroup,{children:(0,s.jsxs)(`div`,{className:`flex items-center justify-between`,children:[u.length>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.CommandItem,{onSelect:m,className:`flex-1 justify-center cursor-pointer`,children:`Clear`}),(0,s.jsx)(r.Separator,{orientation:`vertical`,className:`flex min-h-6 h-full`})]}),(0,s.jsx)(n.CommandItem,{onSelect:()=>h(!1),className:`flex-1 justify-center cursor-pointer max-w-full`,children:`Close`})]})})]})]});exports.LiveRegion=c,exports.OptionsContent=d,exports.PlaceholderContent=u,exports.SelectedValuesContent=l;
1
+ const e=require("./index2.cjs"),t=require("./index17.cjs");let n=require("react");n=e.__toESM(n,1);var r=Object.defineProperty,i=(e,t)=>r(e,`name`,{value:t,configurable:!0});function a(e){let[r,i]=n.useState(void 0);return t.useLayoutEffect2(()=>{if(e){i({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let n=t[0],r,a;if(`borderBoxSize`in n){let e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,a=t.blockSize}else r=e.offsetWidth,a=e.offsetHeight;i({width:r,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else i(void 0)},[e]),r}i(a,`useSize`),exports.useSize=a;