bitboss-ui 2.0.23 → 2.0.25

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 (491) hide show
  1. package/dist/index.js +138 -140
  2. package/dist/index10.js +78 -8
  3. package/dist/{index101.js → index100.js} +2 -3
  4. package/dist/{index103.js → index102.js} +2 -3
  5. package/dist/index104.js +289 -0
  6. package/dist/{index107.js → index106.js} +8 -9
  7. package/dist/{index109.js → index108.js} +2 -3
  8. package/dist/index11.js +35 -75
  9. package/dist/{index111.js → index110.js} +2 -3
  10. package/dist/{index113.js → index112.js} +2 -3
  11. package/dist/{index115.js → index114.js} +2 -3
  12. package/dist/{index117.js → index116.js} +8 -9
  13. package/dist/{index119.js → index118.js} +1 -2
  14. package/dist/index12.js +189 -37
  15. package/dist/index120.js +42 -0
  16. package/dist/index121.js +38 -35
  17. package/dist/index122.js +38 -39
  18. package/dist/index123.js +42 -40
  19. package/dist/index124.js +31 -44
  20. package/dist/index125.js +2 -36
  21. package/dist/index126.js +21 -3
  22. package/dist/index127.js +2 -22
  23. package/dist/index128.js +312 -3
  24. package/dist/index129.js +21 -310
  25. package/dist/index13.js +78 -190
  26. package/dist/index130.js +2 -25
  27. package/dist/index131.js +5 -3
  28. package/dist/index132.js +9 -6
  29. package/dist/index133.js +5 -9
  30. package/dist/index134.js +3 -7
  31. package/dist/index135.js +1 -2
  32. package/dist/index136.js +1 -2
  33. package/dist/index137.js +1 -2
  34. package/dist/index138.js +1 -2
  35. package/dist/index139.js +1 -2
  36. package/dist/index140.js +1 -2
  37. package/dist/index141.js +1 -2
  38. package/dist/index142.js +1 -2
  39. package/dist/index143.js +1 -2
  40. package/dist/index144.js +1 -2
  41. package/dist/index145.js +1 -2
  42. package/dist/index146.js +1 -2
  43. package/dist/index147.js +1 -2
  44. package/dist/index148.js +1 -2
  45. package/dist/index149.js +1 -2
  46. package/dist/{index16.js → index15.js} +3 -4
  47. package/dist/index150.js +1 -2
  48. package/dist/index151.js +1 -2
  49. package/dist/index152.js +1 -2
  50. package/dist/index153.js +1 -2
  51. package/dist/index154.js +1 -2
  52. package/dist/index155.js +1 -2
  53. package/dist/index156.js +1 -2
  54. package/dist/index157.js +1 -2
  55. package/dist/index158.js +1 -2
  56. package/dist/index159.js +1 -2
  57. package/dist/index160.js +2 -3
  58. package/dist/{index161.js → index162.js} +0 -1
  59. package/dist/index164.js +5 -0
  60. package/dist/index165.js +1 -2
  61. package/dist/index166.js +1 -2
  62. package/dist/index167.js +1 -2
  63. package/dist/index168.js +1 -2
  64. package/dist/index169.js +1 -2
  65. package/dist/{index18.js → index17.js} +3 -4
  66. package/dist/index170.js +2 -3
  67. package/dist/index172.js +4 -0
  68. package/dist/index173.js +3 -3
  69. package/dist/index174.js +1 -2
  70. package/dist/index175.js +1 -2
  71. package/dist/index176.js +1 -2
  72. package/dist/index177.js +1 -2
  73. package/dist/index178.js +1 -2
  74. package/dist/index179.js +1 -2
  75. package/dist/index180.js +1 -2
  76. package/dist/index181.js +1 -2
  77. package/dist/index182.js +1 -2
  78. package/dist/index183.js +1 -2
  79. package/dist/index184.js +1 -2
  80. package/dist/{index185.js → index186.js} +0 -1
  81. package/dist/index188.js +5 -0
  82. package/dist/index189.js +1 -2
  83. package/dist/{index20.js → index19.js} +17 -19
  84. package/dist/index190.js +1 -2
  85. package/dist/index191.js +1 -2
  86. package/dist/index192.js +1 -2
  87. package/dist/index193.js +1 -2
  88. package/dist/index194.js +1 -2
  89. package/dist/index195.js +1 -2
  90. package/dist/index196.js +1 -2
  91. package/dist/index197.js +1 -2
  92. package/dist/index198.js +81 -4
  93. package/dist/index199.js +0 -1
  94. package/dist/index200.js +7 -81
  95. package/dist/index201.js +5 -45
  96. package/dist/index202.js +18 -0
  97. package/dist/index203.js +16 -14
  98. package/dist/index204.js +19 -4
  99. package/dist/index205.js +19 -4
  100. package/dist/index206.js +26 -35
  101. package/dist/index207.js +3 -7
  102. package/dist/index208.js +2 -8
  103. package/dist/index209.js +247 -7
  104. package/dist/{index22.js → index21.js} +20 -21
  105. package/dist/index210.js +49 -124
  106. package/dist/index211.js +44 -6
  107. package/dist/index212.js +5 -124
  108. package/dist/index213.js +49 -20
  109. package/dist/index214.js +3 -17
  110. package/dist/index215.js +3 -17
  111. package/dist/index216.js +35 -3
  112. package/dist/index217.js +6 -3
  113. package/dist/index218.js +7 -175
  114. package/dist/index219.js +2 -6
  115. package/dist/index220.js +4 -370
  116. package/dist/index221.js +43 -20
  117. package/dist/index223.js +13 -4
  118. package/dist/index224.js +154 -246
  119. package/dist/index225.js +77 -46
  120. package/dist/index227.js +126 -6
  121. package/dist/index228.js +123 -50
  122. package/dist/index229.js +2 -159
  123. package/dist/{index24.js → index23.js} +7 -8
  124. package/dist/index230.js +174 -85
  125. package/dist/index231.js +7 -0
  126. package/dist/index232.js +369 -3
  127. package/dist/index233.js +2 -5
  128. package/dist/index234.js +2 -3
  129. package/dist/index235.js +18 -3
  130. package/dist/index236.js +105 -18
  131. package/dist/{index239.js → index238.js} +2 -3
  132. package/dist/index240.js +4 -0
  133. package/dist/index241.js +10 -3
  134. package/dist/index242.js +2 -10
  135. package/dist/index243.js +281 -4
  136. package/dist/index244.js +6 -4
  137. package/dist/index245.js +2 -10
  138. package/dist/index246.js +2 -24
  139. package/dist/index247.js +2 -10
  140. package/dist/index248.js +2 -7
  141. package/dist/index249.js +2 -17
  142. package/dist/{index26.js → index25.js} +5 -6
  143. package/dist/index250.js +2 -225
  144. package/dist/index251.js +2 -4
  145. package/dist/index252.js +4 -0
  146. package/dist/index253.js +2 -8
  147. package/dist/index254.js +2 -432
  148. package/dist/index255.js +24 -86
  149. package/dist/index256.js +22 -282
  150. package/dist/index258.js +7 -3
  151. package/dist/index259.js +224 -3
  152. package/dist/index260.js +431 -3
  153. package/dist/index261.js +89 -3
  154. package/dist/index262.js +9 -3
  155. package/dist/index263.js +3 -127
  156. package/dist/index264.js +8 -22
  157. package/dist/index265.js +25 -0
  158. package/dist/index266.js +6 -201
  159. package/dist/index267.js +16 -3
  160. package/dist/index268.js +4 -3
  161. package/dist/index269.js +3 -3
  162. package/dist/{index28.js → index27.js} +2 -3
  163. package/dist/index270.js +12 -3
  164. package/dist/index271.js +9 -3
  165. package/dist/index272.js +9 -3
  166. package/dist/index273.js +14 -26
  167. package/dist/index274.js +199 -22
  168. package/dist/index275.js +5 -0
  169. package/dist/index277.js +2 -128
  170. package/dist/index278.js +126 -3
  171. package/dist/index279.js +20 -8
  172. package/dist/index281.js +435 -12
  173. package/dist/index282.js +125 -8
  174. package/dist/index283.js +3 -18
  175. package/dist/index284.js +2 -66
  176. package/dist/index285.js +211 -6
  177. package/dist/index286.js +5 -5
  178. package/dist/index287.js +65 -3
  179. package/dist/index288.js +15 -4
  180. package/dist/index289.js +2 -212
  181. package/dist/{index30.js → index29.js} +2 -3
  182. package/dist/index290.js +6 -15
  183. package/dist/index291.js +7 -80
  184. package/dist/index292.js +21 -0
  185. package/dist/index293.js +79 -5
  186. package/dist/index295.js +4 -60
  187. package/dist/index296.js +4 -36
  188. package/dist/index297.js +59 -3
  189. package/dist/index298.js +0 -1
  190. package/dist/index299.js +34 -7
  191. package/dist/index300.js +46 -7
  192. package/dist/index301.js +2 -20
  193. package/dist/index302.js +480 -48
  194. package/dist/index304.js +423 -0
  195. package/dist/index305.js +42 -417
  196. package/dist/index306.js +2 -48
  197. package/dist/{index32.js → index31.js} +3 -4
  198. package/dist/{index34.js → index33.js} +4 -5
  199. package/dist/{index36.js → index35.js} +21 -23
  200. package/dist/{index38.js → index37.js} +6 -7
  201. package/dist/{index40.js → index39.js} +2 -3
  202. package/dist/index4.js +16 -0
  203. package/dist/{index42.js → index41.js} +3 -4
  204. package/dist/{index44.js → index43.js} +10 -12
  205. package/dist/{index46.js → index45.js} +3 -4
  206. package/dist/{index48.js → index47.js} +2 -3
  207. package/dist/{index50.js → index49.js} +3 -4
  208. package/dist/index5.js +40 -15
  209. package/dist/{index52.js → index51.js} +2 -3
  210. package/dist/{index54.js → index53.js} +2 -3
  211. package/dist/{index56.js → index55.js} +2 -3
  212. package/dist/{index58.js → index57.js} +1 -2
  213. package/dist/{index60.js → index59.js} +7 -9
  214. package/dist/index6.js +76 -39
  215. package/dist/{index62.js → index61.js} +2 -3
  216. package/dist/{index64.js → index63.js} +2 -3
  217. package/dist/{index66.js → index65.js} +4 -5
  218. package/dist/{index68.js → index67.js} +2 -3
  219. package/dist/{index70.js → index69.js} +1 -2
  220. package/dist/index7.js +62 -79
  221. package/dist/{index72.js → index71.js} +7 -8
  222. package/dist/{index74.js → index73.js} +15 -17
  223. package/dist/{index76.js → index75.js} +4 -5
  224. package/dist/index77.js +46 -0
  225. package/dist/index78.js +120 -38
  226. package/dist/index8.js +18 -61
  227. package/dist/{index81.js → index80.js} +4 -5
  228. package/dist/{index83.js → index82.js} +4 -6
  229. package/dist/{index85.js → index84.js} +6 -7
  230. package/dist/{index87.js → index86.js} +1 -2
  231. package/dist/{index89.js → index88.js} +2 -3
  232. package/dist/index9.js +7 -20
  233. package/dist/{index91.js → index90.js} +2 -3
  234. package/dist/{index93.js → index92.js} +2 -3
  235. package/dist/{index95.js → index94.js} +0 -1
  236. package/dist/{index97.js → index96.js} +2 -3
  237. package/dist/{index99.js → index98.js} +2 -3
  238. package/dist/style.css +1 -1
  239. package/package.json +2 -2
  240. package/dist/index.js.map +0 -1
  241. package/dist/index10.js.map +0 -1
  242. package/dist/index101.js.map +0 -1
  243. package/dist/index103.js.map +0 -1
  244. package/dist/index105.js +0 -273
  245. package/dist/index105.js.map +0 -1
  246. package/dist/index107.js.map +0 -1
  247. package/dist/index109.js.map +0 -1
  248. package/dist/index11.js.map +0 -1
  249. package/dist/index111.js.map +0 -1
  250. package/dist/index113.js.map +0 -1
  251. package/dist/index115.js.map +0 -1
  252. package/dist/index117.js.map +0 -1
  253. package/dist/index119.js.map +0 -1
  254. package/dist/index12.js.map +0 -1
  255. package/dist/index121.js.map +0 -1
  256. package/dist/index122.js.map +0 -1
  257. package/dist/index123.js.map +0 -1
  258. package/dist/index124.js.map +0 -1
  259. package/dist/index125.js.map +0 -1
  260. package/dist/index126.js.map +0 -1
  261. package/dist/index127.js.map +0 -1
  262. package/dist/index128.js.map +0 -1
  263. package/dist/index129.js.map +0 -1
  264. package/dist/index13.js.map +0 -1
  265. package/dist/index130.js.map +0 -1
  266. package/dist/index131.js.map +0 -1
  267. package/dist/index132.js.map +0 -1
  268. package/dist/index133.js.map +0 -1
  269. package/dist/index134.js.map +0 -1
  270. package/dist/index135.js.map +0 -1
  271. package/dist/index136.js.map +0 -1
  272. package/dist/index137.js.map +0 -1
  273. package/dist/index138.js.map +0 -1
  274. package/dist/index139.js.map +0 -1
  275. package/dist/index14.js +0 -85
  276. package/dist/index14.js.map +0 -1
  277. package/dist/index140.js.map +0 -1
  278. package/dist/index141.js.map +0 -1
  279. package/dist/index142.js.map +0 -1
  280. package/dist/index143.js.map +0 -1
  281. package/dist/index144.js.map +0 -1
  282. package/dist/index145.js.map +0 -1
  283. package/dist/index146.js.map +0 -1
  284. package/dist/index147.js.map +0 -1
  285. package/dist/index148.js.map +0 -1
  286. package/dist/index149.js.map +0 -1
  287. package/dist/index150.js.map +0 -1
  288. package/dist/index151.js.map +0 -1
  289. package/dist/index152.js.map +0 -1
  290. package/dist/index153.js.map +0 -1
  291. package/dist/index154.js.map +0 -1
  292. package/dist/index155.js.map +0 -1
  293. package/dist/index156.js.map +0 -1
  294. package/dist/index157.js.map +0 -1
  295. package/dist/index158.js.map +0 -1
  296. package/dist/index159.js.map +0 -1
  297. package/dist/index16.js.map +0 -1
  298. package/dist/index160.js.map +0 -1
  299. package/dist/index161.js.map +0 -1
  300. package/dist/index163.js +0 -6
  301. package/dist/index163.js.map +0 -1
  302. package/dist/index165.js.map +0 -1
  303. package/dist/index166.js.map +0 -1
  304. package/dist/index167.js.map +0 -1
  305. package/dist/index168.js.map +0 -1
  306. package/dist/index169.js.map +0 -1
  307. package/dist/index170.js.map +0 -1
  308. package/dist/index171.js +0 -6
  309. package/dist/index171.js.map +0 -1
  310. package/dist/index173.js.map +0 -1
  311. package/dist/index174.js.map +0 -1
  312. package/dist/index175.js.map +0 -1
  313. package/dist/index176.js.map +0 -1
  314. package/dist/index177.js.map +0 -1
  315. package/dist/index178.js.map +0 -1
  316. package/dist/index179.js.map +0 -1
  317. package/dist/index18.js.map +0 -1
  318. package/dist/index180.js.map +0 -1
  319. package/dist/index181.js.map +0 -1
  320. package/dist/index182.js.map +0 -1
  321. package/dist/index183.js.map +0 -1
  322. package/dist/index184.js.map +0 -1
  323. package/dist/index185.js.map +0 -1
  324. package/dist/index187.js +0 -6
  325. package/dist/index187.js.map +0 -1
  326. package/dist/index189.js.map +0 -1
  327. package/dist/index190.js.map +0 -1
  328. package/dist/index191.js.map +0 -1
  329. package/dist/index192.js.map +0 -1
  330. package/dist/index193.js.map +0 -1
  331. package/dist/index194.js.map +0 -1
  332. package/dist/index195.js.map +0 -1
  333. package/dist/index196.js.map +0 -1
  334. package/dist/index197.js.map +0 -1
  335. package/dist/index198.js.map +0 -1
  336. package/dist/index199.js.map +0 -1
  337. package/dist/index20.js.map +0 -1
  338. package/dist/index200.js.map +0 -1
  339. package/dist/index201.js.map +0 -1
  340. package/dist/index203.js.map +0 -1
  341. package/dist/index204.js.map +0 -1
  342. package/dist/index205.js.map +0 -1
  343. package/dist/index206.js.map +0 -1
  344. package/dist/index207.js.map +0 -1
  345. package/dist/index208.js.map +0 -1
  346. package/dist/index209.js.map +0 -1
  347. package/dist/index210.js.map +0 -1
  348. package/dist/index211.js.map +0 -1
  349. package/dist/index212.js.map +0 -1
  350. package/dist/index213.js.map +0 -1
  351. package/dist/index214.js.map +0 -1
  352. package/dist/index215.js.map +0 -1
  353. package/dist/index216.js.map +0 -1
  354. package/dist/index217.js.map +0 -1
  355. package/dist/index218.js.map +0 -1
  356. package/dist/index219.js.map +0 -1
  357. package/dist/index22.js.map +0 -1
  358. package/dist/index220.js.map +0 -1
  359. package/dist/index221.js.map +0 -1
  360. package/dist/index222.js +0 -30
  361. package/dist/index222.js.map +0 -1
  362. package/dist/index223.js.map +0 -1
  363. package/dist/index224.js.map +0 -1
  364. package/dist/index225.js.map +0 -1
  365. package/dist/index226.js +0 -47
  366. package/dist/index226.js.map +0 -1
  367. package/dist/index227.js.map +0 -1
  368. package/dist/index228.js.map +0 -1
  369. package/dist/index229.js.map +0 -1
  370. package/dist/index230.js.map +0 -1
  371. package/dist/index232.js.map +0 -1
  372. package/dist/index233.js.map +0 -1
  373. package/dist/index234.js.map +0 -1
  374. package/dist/index235.js.map +0 -1
  375. package/dist/index236.js.map +0 -1
  376. package/dist/index237.js +0 -109
  377. package/dist/index237.js.map +0 -1
  378. package/dist/index239.js.map +0 -1
  379. package/dist/index24.js.map +0 -1
  380. package/dist/index241.js.map +0 -1
  381. package/dist/index242.js.map +0 -1
  382. package/dist/index243.js.map +0 -1
  383. package/dist/index244.js.map +0 -1
  384. package/dist/index245.js.map +0 -1
  385. package/dist/index246.js.map +0 -1
  386. package/dist/index247.js.map +0 -1
  387. package/dist/index248.js.map +0 -1
  388. package/dist/index249.js.map +0 -1
  389. package/dist/index250.js.map +0 -1
  390. package/dist/index251.js.map +0 -1
  391. package/dist/index253.js.map +0 -1
  392. package/dist/index254.js.map +0 -1
  393. package/dist/index255.js.map +0 -1
  394. package/dist/index256.js.map +0 -1
  395. package/dist/index257.js +0 -9
  396. package/dist/index257.js.map +0 -1
  397. package/dist/index258.js.map +0 -1
  398. package/dist/index259.js.map +0 -1
  399. package/dist/index26.js.map +0 -1
  400. package/dist/index260.js.map +0 -1
  401. package/dist/index261.js.map +0 -1
  402. package/dist/index262.js.map +0 -1
  403. package/dist/index263.js.map +0 -1
  404. package/dist/index264.js.map +0 -1
  405. package/dist/index266.js.map +0 -1
  406. package/dist/index267.js.map +0 -1
  407. package/dist/index268.js.map +0 -1
  408. package/dist/index269.js.map +0 -1
  409. package/dist/index270.js.map +0 -1
  410. package/dist/index271.js.map +0 -1
  411. package/dist/index272.js.map +0 -1
  412. package/dist/index273.js.map +0 -1
  413. package/dist/index274.js.map +0 -1
  414. package/dist/index276.js +0 -439
  415. package/dist/index276.js.map +0 -1
  416. package/dist/index277.js.map +0 -1
  417. package/dist/index278.js.map +0 -1
  418. package/dist/index279.js.map +0 -1
  419. package/dist/index28.js.map +0 -1
  420. package/dist/index280.js +0 -6
  421. package/dist/index280.js.map +0 -1
  422. package/dist/index281.js.map +0 -1
  423. package/dist/index282.js.map +0 -1
  424. package/dist/index283.js.map +0 -1
  425. package/dist/index284.js.map +0 -1
  426. package/dist/index285.js.map +0 -1
  427. package/dist/index286.js.map +0 -1
  428. package/dist/index287.js.map +0 -1
  429. package/dist/index288.js.map +0 -1
  430. package/dist/index289.js.map +0 -1
  431. package/dist/index290.js.map +0 -1
  432. package/dist/index291.js.map +0 -1
  433. package/dist/index293.js.map +0 -1
  434. package/dist/index294.js +0 -7
  435. package/dist/index294.js.map +0 -1
  436. package/dist/index295.js.map +0 -1
  437. package/dist/index296.js.map +0 -1
  438. package/dist/index297.js.map +0 -1
  439. package/dist/index298.js.map +0 -1
  440. package/dist/index299.js.map +0 -1
  441. package/dist/index30.js.map +0 -1
  442. package/dist/index300.js.map +0 -1
  443. package/dist/index301.js.map +0 -1
  444. package/dist/index302.js.map +0 -1
  445. package/dist/index303.js +0 -483
  446. package/dist/index303.js.map +0 -1
  447. package/dist/index305.js.map +0 -1
  448. package/dist/index306.js.map +0 -1
  449. package/dist/index307.js +0 -5
  450. package/dist/index307.js.map +0 -1
  451. package/dist/index32.js.map +0 -1
  452. package/dist/index34.js.map +0 -1
  453. package/dist/index36.js.map +0 -1
  454. package/dist/index38.js.map +0 -1
  455. package/dist/index40.js.map +0 -1
  456. package/dist/index42.js.map +0 -1
  457. package/dist/index44.js.map +0 -1
  458. package/dist/index46.js.map +0 -1
  459. package/dist/index48.js.map +0 -1
  460. package/dist/index5.js.map +0 -1
  461. package/dist/index50.js.map +0 -1
  462. package/dist/index52.js.map +0 -1
  463. package/dist/index54.js.map +0 -1
  464. package/dist/index56.js.map +0 -1
  465. package/dist/index58.js.map +0 -1
  466. package/dist/index6.js.map +0 -1
  467. package/dist/index60.js.map +0 -1
  468. package/dist/index62.js.map +0 -1
  469. package/dist/index64.js.map +0 -1
  470. package/dist/index66.js.map +0 -1
  471. package/dist/index68.js.map +0 -1
  472. package/dist/index7.js.map +0 -1
  473. package/dist/index70.js.map +0 -1
  474. package/dist/index72.js.map +0 -1
  475. package/dist/index74.js.map +0 -1
  476. package/dist/index76.js.map +0 -1
  477. package/dist/index78.js.map +0 -1
  478. package/dist/index79.js +0 -130
  479. package/dist/index79.js.map +0 -1
  480. package/dist/index8.js.map +0 -1
  481. package/dist/index81.js.map +0 -1
  482. package/dist/index83.js.map +0 -1
  483. package/dist/index85.js.map +0 -1
  484. package/dist/index87.js.map +0 -1
  485. package/dist/index89.js.map +0 -1
  486. package/dist/index9.js.map +0 -1
  487. package/dist/index91.js.map +0 -1
  488. package/dist/index93.js.map +0 -1
  489. package/dist/index95.js.map +0 -1
  490. package/dist/index97.js.map +0 -1
  491. package/dist/index99.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"index305.js","sources":["../node_modules/@tanstack/virtual-core/dist/esm/index.js"],"sourcesContent":["import { debounce, memo, notUndefined, approxEqual } from \"./utils.js\";\nconst defaultKeyExtractor = (index) => index;\nconst defaultRangeExtractor = (range) => {\n const start = Math.max(range.startIndex - range.overscan, 0);\n const end = Math.min(range.endIndex + range.overscan, range.count - 1);\n const arr = [];\n for (let i = start; i <= end; i++) {\n arr.push(i);\n }\n return arr;\n};\nconst observeElementRect = (instance, cb) => {\n const element = instance.scrollElement;\n if (!element) {\n return;\n }\n const targetWindow = instance.targetWindow;\n if (!targetWindow) {\n return;\n }\n const handler = (rect) => {\n const { width, height } = rect;\n cb({ width: Math.round(width), height: Math.round(height) });\n };\n handler(element.getBoundingClientRect());\n if (!targetWindow.ResizeObserver) {\n return () => {\n };\n }\n const observer = new targetWindow.ResizeObserver((entries) => {\n const entry = entries[0];\n if (entry == null ? void 0 : entry.borderBoxSize) {\n const box = entry.borderBoxSize[0];\n if (box) {\n handler({ width: box.inlineSize, height: box.blockSize });\n return;\n }\n }\n handler(element.getBoundingClientRect());\n });\n observer.observe(element, { box: \"border-box\" });\n return () => {\n observer.unobserve(element);\n };\n};\nconst addEventListenerOptions = {\n passive: true\n};\nconst observeWindowRect = (instance, cb) => {\n const element = instance.scrollElement;\n if (!element) {\n return;\n }\n const handler = () => {\n cb({ width: element.innerWidth, height: element.innerHeight });\n };\n handler();\n element.addEventListener(\"resize\", handler, addEventListenerOptions);\n return () => {\n element.removeEventListener(\"resize\", handler);\n };\n};\nconst supportsScrollend = typeof window == \"undefined\" ? true : \"onscrollend\" in window;\nconst observeElementOffset = (instance, cb) => {\n const element = instance.scrollElement;\n if (!element) {\n return;\n }\n const targetWindow = instance.targetWindow;\n if (!targetWindow) {\n return;\n }\n let offset = 0;\n const fallback = supportsScrollend ? () => void 0 : debounce(\n targetWindow,\n () => {\n cb(offset, false);\n },\n instance.options.isScrollingResetDelay\n );\n const createHandler = (isScrolling) => () => {\n offset = element[instance.options.horizontal ? \"scrollLeft\" : \"scrollTop\"];\n fallback();\n cb(offset, isScrolling);\n };\n const handler = createHandler(true);\n const endHandler = createHandler(false);\n endHandler();\n element.addEventListener(\"scroll\", handler, addEventListenerOptions);\n element.addEventListener(\"scrollend\", endHandler, addEventListenerOptions);\n return () => {\n element.removeEventListener(\"scroll\", handler);\n element.removeEventListener(\"scrollend\", endHandler);\n };\n};\nconst observeWindowOffset = (instance, cb) => {\n const element = instance.scrollElement;\n if (!element) {\n return;\n }\n const targetWindow = instance.targetWindow;\n if (!targetWindow) {\n return;\n }\n let offset = 0;\n const fallback = supportsScrollend ? () => void 0 : debounce(\n targetWindow,\n () => {\n cb(offset, false);\n },\n instance.options.isScrollingResetDelay\n );\n const createHandler = (isScrolling) => () => {\n offset = element[instance.options.horizontal ? \"scrollX\" : \"scrollY\"];\n fallback();\n cb(offset, isScrolling);\n };\n const handler = createHandler(true);\n const endHandler = createHandler(false);\n endHandler();\n element.addEventListener(\"scroll\", handler, addEventListenerOptions);\n element.addEventListener(\"scrollend\", endHandler, addEventListenerOptions);\n return () => {\n element.removeEventListener(\"scroll\", handler);\n element.removeEventListener(\"scrollend\", endHandler);\n };\n};\nconst measureElement = (element, entry, instance) => {\n if (entry == null ? void 0 : entry.borderBoxSize) {\n const box = entry.borderBoxSize[0];\n if (box) {\n const size = Math.round(\n box[instance.options.horizontal ? \"inlineSize\" : \"blockSize\"]\n );\n return size;\n }\n }\n return Math.round(\n element.getBoundingClientRect()[instance.options.horizontal ? \"width\" : \"height\"]\n );\n};\nconst windowScroll = (offset, {\n adjustments = 0,\n behavior\n}, instance) => {\n var _a, _b;\n const toOffset = offset + adjustments;\n (_b = (_a = instance.scrollElement) == null ? void 0 : _a.scrollTo) == null ? void 0 : _b.call(_a, {\n [instance.options.horizontal ? \"left\" : \"top\"]: toOffset,\n behavior\n });\n};\nconst elementScroll = (offset, {\n adjustments = 0,\n behavior\n}, instance) => {\n var _a, _b;\n const toOffset = offset + adjustments;\n (_b = (_a = instance.scrollElement) == null ? void 0 : _a.scrollTo) == null ? void 0 : _b.call(_a, {\n [instance.options.horizontal ? \"left\" : \"top\"]: toOffset,\n behavior\n });\n};\nclass Virtualizer {\n constructor(opts) {\n this.unsubs = [];\n this.scrollElement = null;\n this.targetWindow = null;\n this.isScrolling = false;\n this.scrollToIndexTimeoutId = null;\n this.measurementsCache = [];\n this.itemSizeCache = /* @__PURE__ */ new Map();\n this.pendingMeasuredCacheIndexes = [];\n this.scrollRect = null;\n this.scrollOffset = null;\n this.scrollDirection = null;\n this.scrollAdjustments = 0;\n this.elementsCache = /* @__PURE__ */ new Map();\n this.observer = /* @__PURE__ */ (() => {\n let _ro = null;\n const get = () => {\n if (_ro) {\n return _ro;\n }\n if (!this.targetWindow || !this.targetWindow.ResizeObserver) {\n return null;\n }\n return _ro = new this.targetWindow.ResizeObserver((entries) => {\n entries.forEach((entry) => {\n this._measureElement(entry.target, entry);\n });\n });\n };\n return {\n disconnect: () => {\n var _a;\n return (_a = get()) == null ? void 0 : _a.disconnect();\n },\n observe: (target) => {\n var _a;\n return (_a = get()) == null ? void 0 : _a.observe(target, { box: \"border-box\" });\n },\n unobserve: (target) => {\n var _a;\n return (_a = get()) == null ? void 0 : _a.unobserve(target);\n }\n };\n })();\n this.range = null;\n this.setOptions = (opts2) => {\n Object.entries(opts2).forEach(([key, value]) => {\n if (typeof value === \"undefined\") delete opts2[key];\n });\n this.options = {\n debug: false,\n initialOffset: 0,\n overscan: 1,\n paddingStart: 0,\n paddingEnd: 0,\n scrollPaddingStart: 0,\n scrollPaddingEnd: 0,\n horizontal: false,\n getItemKey: defaultKeyExtractor,\n rangeExtractor: defaultRangeExtractor,\n onChange: () => {\n },\n measureElement,\n initialRect: { width: 0, height: 0 },\n scrollMargin: 0,\n gap: 0,\n indexAttribute: \"data-index\",\n initialMeasurementsCache: [],\n lanes: 1,\n isScrollingResetDelay: 150,\n enabled: true,\n ...opts2\n };\n };\n this.notify = (force, sync) => {\n var _a, _b;\n const { startIndex, endIndex } = this.range ?? {\n startIndex: void 0,\n endIndex: void 0\n };\n const range = this.calculateRange();\n if (force || startIndex !== (range == null ? void 0 : range.startIndex) || endIndex !== (range == null ? void 0 : range.endIndex)) {\n (_b = (_a = this.options).onChange) == null ? void 0 : _b.call(_a, this, sync);\n }\n };\n this.cleanup = () => {\n this.unsubs.filter(Boolean).forEach((d) => d());\n this.unsubs = [];\n this.scrollElement = null;\n this.targetWindow = null;\n this.observer.disconnect();\n this.elementsCache.clear();\n };\n this._didMount = () => {\n return () => {\n this.cleanup();\n };\n };\n this._willUpdate = () => {\n var _a;\n const scrollElement = this.options.enabled ? this.options.getScrollElement() : null;\n if (this.scrollElement !== scrollElement) {\n this.cleanup();\n if (!scrollElement) {\n this.notify(false, false);\n return;\n }\n this.scrollElement = scrollElement;\n if (this.scrollElement && \"ownerDocument\" in this.scrollElement) {\n this.targetWindow = this.scrollElement.ownerDocument.defaultView;\n } else {\n this.targetWindow = ((_a = this.scrollElement) == null ? void 0 : _a.window) ?? null;\n }\n this._scrollToOffset(this.getScrollOffset(), {\n adjustments: void 0,\n behavior: void 0\n });\n this.unsubs.push(\n this.options.observeElementRect(this, (rect) => {\n this.scrollRect = rect;\n this.notify(false, false);\n })\n );\n this.unsubs.push(\n this.options.observeElementOffset(this, (offset, isScrolling) => {\n this.scrollAdjustments = 0;\n this.scrollDirection = isScrolling ? this.getScrollOffset() < offset ? \"forward\" : \"backward\" : null;\n this.scrollOffset = offset;\n const prevIsScrolling = this.isScrolling;\n this.isScrolling = isScrolling;\n this.notify(prevIsScrolling !== isScrolling, isScrolling);\n })\n );\n }\n };\n this.getSize = () => {\n if (!this.options.enabled) {\n this.scrollRect = null;\n return 0;\n }\n this.scrollRect = this.scrollRect ?? this.options.initialRect;\n return this.scrollRect[this.options.horizontal ? \"width\" : \"height\"];\n };\n this.getScrollOffset = () => {\n if (!this.options.enabled) {\n this.scrollOffset = null;\n return 0;\n }\n this.scrollOffset = this.scrollOffset ?? (typeof this.options.initialOffset === \"function\" ? this.options.initialOffset() : this.options.initialOffset);\n return this.scrollOffset;\n };\n this.getFurthestMeasurement = (measurements, index) => {\n const furthestMeasurementsFound = /* @__PURE__ */ new Map();\n const furthestMeasurements = /* @__PURE__ */ new Map();\n for (let m = index - 1; m >= 0; m--) {\n const measurement = measurements[m];\n if (furthestMeasurementsFound.has(measurement.lane)) {\n continue;\n }\n const previousFurthestMeasurement = furthestMeasurements.get(\n measurement.lane\n );\n if (previousFurthestMeasurement == null || measurement.end > previousFurthestMeasurement.end) {\n furthestMeasurements.set(measurement.lane, measurement);\n } else if (measurement.end < previousFurthestMeasurement.end) {\n furthestMeasurementsFound.set(measurement.lane, true);\n }\n if (furthestMeasurementsFound.size === this.options.lanes) {\n break;\n }\n }\n return furthestMeasurements.size === this.options.lanes ? Array.from(furthestMeasurements.values()).sort((a, b) => {\n if (a.end === b.end) {\n return a.index - b.index;\n }\n return a.end - b.end;\n })[0] : void 0;\n };\n this.getMeasurementOptions = memo(\n () => [\n this.options.count,\n this.options.paddingStart,\n this.options.scrollMargin,\n this.options.getItemKey,\n this.options.enabled\n ],\n (count, paddingStart, scrollMargin, getItemKey, enabled) => {\n this.pendingMeasuredCacheIndexes = [];\n return {\n count,\n paddingStart,\n scrollMargin,\n getItemKey,\n enabled\n };\n },\n {\n key: false\n }\n );\n this.getMeasurements = memo(\n () => [this.getMeasurementOptions(), this.itemSizeCache],\n ({ count, paddingStart, scrollMargin, getItemKey, enabled }, itemSizeCache) => {\n var _a;\n if (!enabled) {\n this.measurementsCache = [];\n this.itemSizeCache.clear();\n return [];\n }\n if (this.measurementsCache.length === 0) {\n this.measurementsCache = this.options.initialMeasurementsCache;\n this.measurementsCache.forEach((item) => {\n this.itemSizeCache.set(item.key, item.size);\n });\n }\n const min = this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;\n this.pendingMeasuredCacheIndexes = [];\n const measurements = this.measurementsCache.slice(0, min);\n for (let i = min; i < count; i++) {\n let measureElement2 = (_a = this.measurementsCache[i]) == null ? void 0 : _a.measureElement;\n if (!measureElement2) {\n measureElement2 = (node) => {\n const key2 = getItemKey(i);\n const prevNode = this.elementsCache.get(key2);\n if (!node) {\n if (prevNode) {\n this.observer.unobserve(prevNode);\n this.elementsCache.delete(key2);\n }\n return;\n }\n if (prevNode !== node) {\n if (prevNode) {\n this.observer.unobserve(prevNode);\n }\n this.observer.observe(node);\n this.elementsCache.set(key2, node);\n }\n if (node.isConnected) {\n this.resizeItem(\n i,\n this.options.measureElement(node, void 0, this)\n );\n }\n };\n }\n const key = getItemKey(i);\n const furthestMeasurement = this.options.lanes === 1 ? measurements[i - 1] : this.getFurthestMeasurement(measurements, i);\n const start = furthestMeasurement ? furthestMeasurement.end + this.options.gap : paddingStart + scrollMargin;\n const measuredSize = itemSizeCache.get(key);\n const size = typeof measuredSize === \"number\" ? measuredSize : this.options.estimateSize(i);\n const end = start + size;\n const lane = furthestMeasurement ? furthestMeasurement.lane : i % this.options.lanes;\n measurements[i] = {\n index: i,\n start,\n size,\n end,\n key,\n lane,\n measureElement: measureElement2\n };\n }\n this.measurementsCache = measurements;\n return measurements;\n },\n {\n key: process.env.NODE_ENV !== \"production\" && \"getMeasurements\",\n debug: () => this.options.debug\n }\n );\n this.calculateRange = memo(\n () => [this.getMeasurements(), this.getSize(), this.getScrollOffset()],\n (measurements, outerSize, scrollOffset) => {\n return this.range = measurements.length > 0 && outerSize > 0 ? calculateRange({\n measurements,\n outerSize,\n scrollOffset\n }) : null;\n },\n {\n key: process.env.NODE_ENV !== \"production\" && \"calculateRange\",\n debug: () => this.options.debug\n }\n );\n this.getIndexes = memo(\n () => [\n this.options.rangeExtractor,\n this.calculateRange(),\n this.options.overscan,\n this.options.count\n ],\n (rangeExtractor, range, overscan, count) => {\n return range === null ? [] : rangeExtractor({\n startIndex: range.startIndex,\n endIndex: range.endIndex,\n overscan,\n count\n });\n },\n {\n key: process.env.NODE_ENV !== \"production\" && \"getIndexes\",\n debug: () => this.options.debug\n }\n );\n this.indexFromElement = (node) => {\n const attributeName = this.options.indexAttribute;\n const indexStr = node.getAttribute(attributeName);\n if (!indexStr) {\n console.warn(\n `Missing attribute name '${attributeName}={index}' on measured element.`\n );\n return -1;\n }\n return parseInt(indexStr, 10);\n };\n this._measureElement = (node, entry) => {\n const i = this.indexFromElement(node);\n const item = this.getMeasurements()[i];\n if (!item || !node.isConnected) {\n this.elementsCache.forEach((cached, key) => {\n if (cached === node) {\n this.observer.unobserve(node);\n this.elementsCache.delete(key);\n }\n });\n return;\n }\n const prevNode = this.elementsCache.get(item.key);\n if (prevNode !== node) {\n if (prevNode) {\n this.observer.unobserve(prevNode);\n }\n this.observer.observe(node);\n this.elementsCache.set(item.key, node);\n }\n this.resizeItem(i, this.options.measureElement(node, entry, this));\n };\n this.resizeItem = (index, size) => {\n const item = this.getMeasurements()[index];\n if (!item) {\n return;\n }\n const itemSize = this.itemSizeCache.get(item.key) ?? item.size;\n const delta = size - itemSize;\n if (delta !== 0) {\n if (this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(item, delta, this) : item.start < this.getScrollOffset() + this.scrollAdjustments) {\n if (process.env.NODE_ENV !== \"production\" && this.options.debug) {\n console.info(\"correction\", delta);\n }\n this._scrollToOffset(this.getScrollOffset(), {\n adjustments: this.scrollAdjustments += delta,\n behavior: void 0\n });\n }\n this.pendingMeasuredCacheIndexes.push(item.index);\n this.itemSizeCache = new Map(this.itemSizeCache.set(item.key, size));\n this.notify(true, false);\n }\n };\n this.measureElement = (node) => {\n if (!node) {\n return;\n }\n this._measureElement(node, void 0);\n };\n this.getVirtualItems = memo(\n () => [this.getIndexes(), this.getMeasurements()],\n (indexes, measurements) => {\n const virtualItems = [];\n for (let k = 0, len = indexes.length; k < len; k++) {\n const i = indexes[k];\n const measurement = measurements[i];\n virtualItems.push(measurement);\n }\n return virtualItems;\n },\n {\n key: process.env.NODE_ENV !== \"production\" && \"getIndexes\",\n debug: () => this.options.debug\n }\n );\n this.getVirtualItemForOffset = (offset) => {\n const measurements = this.getMeasurements();\n if (measurements.length === 0) {\n return void 0;\n }\n return notUndefined(\n measurements[findNearestBinarySearch(\n 0,\n measurements.length - 1,\n (index) => notUndefined(measurements[index]).start,\n offset\n )]\n );\n };\n this.getOffsetForAlignment = (toOffset, align) => {\n const size = this.getSize();\n const scrollOffset = this.getScrollOffset();\n if (align === \"auto\") {\n if (toOffset <= scrollOffset) {\n align = \"start\";\n } else if (toOffset >= scrollOffset + size) {\n align = \"end\";\n } else {\n align = \"start\";\n }\n }\n if (align === \"start\") {\n toOffset = toOffset;\n } else if (align === \"end\") {\n toOffset = toOffset - size;\n } else if (align === \"center\") {\n toOffset = toOffset - size / 2;\n }\n const scrollSizeProp = this.options.horizontal ? \"scrollWidth\" : \"scrollHeight\";\n const scrollSize = this.scrollElement ? \"document\" in this.scrollElement ? this.scrollElement.document.documentElement[scrollSizeProp] : this.scrollElement[scrollSizeProp] : 0;\n const maxOffset = scrollSize - size;\n return Math.max(Math.min(maxOffset, toOffset), 0);\n };\n this.getOffsetForIndex = (index, align = \"auto\") => {\n index = Math.max(0, Math.min(index, this.options.count - 1));\n const item = this.getMeasurements()[index];\n if (!item) {\n return void 0;\n }\n const size = this.getSize();\n const scrollOffset = this.getScrollOffset();\n if (align === \"auto\") {\n if (item.end >= scrollOffset + size - this.options.scrollPaddingEnd) {\n align = \"end\";\n } else if (item.start <= scrollOffset + this.options.scrollPaddingStart) {\n align = \"start\";\n } else {\n return [scrollOffset, align];\n }\n }\n const toOffset = align === \"end\" ? item.end + this.options.scrollPaddingEnd : item.start - this.options.scrollPaddingStart;\n return [this.getOffsetForAlignment(toOffset, align), align];\n };\n this.isDynamicMode = () => this.elementsCache.size > 0;\n this.cancelScrollToIndex = () => {\n if (this.scrollToIndexTimeoutId !== null && this.targetWindow) {\n this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId);\n this.scrollToIndexTimeoutId = null;\n }\n };\n this.scrollToOffset = (toOffset, { align = \"start\", behavior } = {}) => {\n this.cancelScrollToIndex();\n if (behavior === \"smooth\" && this.isDynamicMode()) {\n console.warn(\n \"The `smooth` scroll behavior is not fully supported with dynamic size.\"\n );\n }\n this._scrollToOffset(this.getOffsetForAlignment(toOffset, align), {\n adjustments: void 0,\n behavior\n });\n };\n this.scrollToIndex = (index, { align: initialAlign = \"auto\", behavior } = {}) => {\n index = Math.max(0, Math.min(index, this.options.count - 1));\n this.cancelScrollToIndex();\n if (behavior === \"smooth\" && this.isDynamicMode()) {\n console.warn(\n \"The `smooth` scroll behavior is not fully supported with dynamic size.\"\n );\n }\n const offsetAndAlign = this.getOffsetForIndex(index, initialAlign);\n if (!offsetAndAlign) return;\n const [offset, align] = offsetAndAlign;\n this._scrollToOffset(offset, { adjustments: void 0, behavior });\n if (behavior !== \"smooth\" && this.isDynamicMode() && this.targetWindow) {\n this.scrollToIndexTimeoutId = this.targetWindow.setTimeout(() => {\n this.scrollToIndexTimeoutId = null;\n const elementInDOM = this.elementsCache.has(\n this.options.getItemKey(index)\n );\n if (elementInDOM) {\n const [latestOffset] = notUndefined(\n this.getOffsetForIndex(index, align)\n );\n if (!approxEqual(latestOffset, this.getScrollOffset())) {\n this.scrollToIndex(index, { align, behavior });\n }\n } else {\n this.scrollToIndex(index, { align, behavior });\n }\n });\n }\n };\n this.scrollBy = (delta, { behavior } = {}) => {\n this.cancelScrollToIndex();\n if (behavior === \"smooth\" && this.isDynamicMode()) {\n console.warn(\n \"The `smooth` scroll behavior is not fully supported with dynamic size.\"\n );\n }\n this._scrollToOffset(this.getScrollOffset() + delta, {\n adjustments: void 0,\n behavior\n });\n };\n this.getTotalSize = () => {\n var _a;\n const measurements = this.getMeasurements();\n let end;\n if (measurements.length === 0) {\n end = this.options.paddingStart;\n } else {\n end = this.options.lanes === 1 ? ((_a = measurements[measurements.length - 1]) == null ? void 0 : _a.end) ?? 0 : Math.max(\n ...measurements.slice(-this.options.lanes).map((m) => m.end)\n );\n }\n return end - this.options.scrollMargin + this.options.paddingEnd;\n };\n this._scrollToOffset = (offset, {\n adjustments,\n behavior\n }) => {\n this.options.scrollToFn(offset, { behavior, adjustments }, this);\n };\n this.measure = () => {\n var _a, _b;\n this.itemSizeCache = /* @__PURE__ */ new Map();\n (_b = (_a = this.options).onChange) == null ? void 0 : _b.call(_a, this, false);\n };\n this.setOptions(opts);\n }\n}\nconst findNearestBinarySearch = (low, high, getCurrentValue, value) => {\n while (low <= high) {\n const middle = (low + high) / 2 | 0;\n const currentValue = getCurrentValue(middle);\n if (currentValue < value) {\n low = middle + 1;\n } else if (currentValue > value) {\n high = middle - 1;\n } else {\n return middle;\n }\n }\n if (low > 0) {\n return low - 1;\n } else {\n return 0;\n }\n};\nfunction calculateRange({\n measurements,\n outerSize,\n scrollOffset\n}) {\n const count = measurements.length - 1;\n const getOffset = (index) => measurements[index].start;\n const startIndex = findNearestBinarySearch(0, count, getOffset, scrollOffset);\n let endIndex = startIndex;\n while (endIndex < count && measurements[endIndex].end < scrollOffset + outerSize) {\n endIndex++;\n }\n return { startIndex, endIndex };\n}\nexport {\n Virtualizer,\n approxEqual,\n debounce,\n defaultKeyExtractor,\n defaultRangeExtractor,\n elementScroll,\n measureElement,\n memo,\n notUndefined,\n observeElementOffset,\n observeElementRect,\n observeWindowOffset,\n observeWindowRect,\n windowScroll\n};\n//# sourceMappingURL=index.js.map\n"],"names":["defaultKeyExtractor","index","defaultRangeExtractor","range","start","end","arr","i","observeElementRect","instance","cb","element","targetWindow","handler","rect","width","height","observer","entries","entry","box","addEventListenerOptions","supportsScrollend","observeElementOffset","offset","fallback","debounce","createHandler","isScrolling","endHandler","measureElement","elementScroll","adjustments","behavior","_a","_b","toOffset","Virtualizer","opts","_ro","get","target","opts2","key","value","force","sync","startIndex","endIndex","d","scrollElement","prevIsScrolling","measurements","furthestMeasurementsFound","furthestMeasurements","m","measurement","previousFurthestMeasurement","a","b","memo","count","paddingStart","scrollMargin","getItemKey","enabled","itemSizeCache","item","min","measureElement2","node","key2","prevNode","furthestMeasurement","measuredSize","size","lane","outerSize","scrollOffset","calculateRange","rangeExtractor","overscan","attributeName","indexStr","cached","itemSize","delta","indexes","virtualItems","k","len","notUndefined","findNearestBinarySearch","align","scrollSizeProp","maxOffset","initialAlign","offsetAndAlign","latestOffset","approxEqual","low","high","getCurrentValue","middle","currentValue"],"mappings":";AACK,MAACA,IAAsB,CAACC,MAAUA,GACjCC,IAAwB,CAACC,MAAU;AACvC,QAAMC,IAAQ,KAAK,IAAID,EAAM,aAAaA,EAAM,UAAU,CAAC,GACrDE,IAAM,KAAK,IAAIF,EAAM,WAAWA,EAAM,UAAUA,EAAM,QAAQ,CAAC,GAC/DG,IAAM,CAAA;AACZ,WAASC,IAAIH,GAAOG,KAAKF,GAAKE;AAC5B,IAAAD,EAAI,KAAKC,CAAC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AC3C,QAAIC,IAAe5D;AACjB,MAAAwD,IAAMG,IAAS;AAAA,aACNC,IAAe5D;AACxB,MAAAyD,IAAOE,IAAS;AAAA;AAEhB,aAAOA;AAAA,EAEV;AACD,SAAIH,IAAM,IACDA,IAAM,IAEN;AAEX;AACA,SAASrB,EAAe;AAAA,EACtB,cAAA3B;AAAA,EACA,WAAAyB;AAAA,EACA,cAAAC;AACF,GAAG;AACD,QAAMjB,IAAQT,EAAa,SAAS,GAE9BL,IAAa6C,EAAwB,GAAG/B,GAD5B,CAAC5D,MAAUmD,EAAanD,CAAK,EAAE,OACe6E,CAAY;AAC5E,MAAI9B,IAAWD;AACf,SAAOC,IAAWa,KAAST,EAAaJ,CAAQ,EAAE,MAAM8B,IAAeD;AACrE,IAAA7B;AAEF,SAAO,EAAE,YAAAD,GAAY,UAAAC;AACvB;","x_google_ignoreList":[0]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index306.js","sources":["../node_modules/@tanstack/virtual-core/dist/esm/utils.js"],"sourcesContent":["function memo(getDeps, fn, opts) {\n let deps = opts.initialDeps ?? [];\n let result;\n return () => {\n var _a, _b, _c, _d;\n let depTime;\n if (opts.key && ((_a = opts.debug) == null ? void 0 : _a.call(opts))) depTime = Date.now();\n const newDeps = getDeps();\n const depsChanged = newDeps.length !== deps.length || newDeps.some((dep, index) => deps[index] !== dep);\n if (!depsChanged) {\n return result;\n }\n deps = newDeps;\n let resultTime;\n if (opts.key && ((_b = opts.debug) == null ? void 0 : _b.call(opts))) resultTime = Date.now();\n result = fn(...newDeps);\n if (opts.key && ((_c = opts.debug) == null ? void 0 : _c.call(opts))) {\n const depEndTime = Math.round((Date.now() - depTime) * 100) / 100;\n const resultEndTime = Math.round((Date.now() - resultTime) * 100) / 100;\n const resultFpsPercentage = resultEndTime / 16;\n const pad = (str, num) => {\n str = String(str);\n while (str.length < num) {\n str = \" \" + str;\n }\n return str;\n };\n console.info(\n `%c⏱ ${pad(resultEndTime, 5)} /${pad(depEndTime, 5)} ms`,\n `\n font-size: .6rem;\n font-weight: bold;\n color: hsl(${Math.max(\n 0,\n Math.min(120 - 120 * resultFpsPercentage, 120)\n )}deg 100% 31%);`,\n opts == null ? void 0 : opts.key\n );\n }\n (_d = opts == null ? void 0 : opts.onChange) == null ? void 0 : _d.call(opts, result);\n return result;\n };\n}\nfunction notUndefined(value, msg) {\n if (value === void 0) {\n throw new Error(`Unexpected undefined${msg ? `: ${msg}` : \"\"}`);\n } else {\n return value;\n }\n}\nconst approxEqual = (a, b) => Math.abs(a - b) < 1;\nconst debounce = (targetWindow, fn, ms) => {\n let timeoutId;\n return function(...args) {\n targetWindow.clearTimeout(timeoutId);\n timeoutId = targetWindow.setTimeout(() => fn.apply(this, args), ms);\n };\n};\nexport {\n approxEqual,\n debounce,\n memo,\n notUndefined\n};\n//# sourceMappingURL=utils.js.map\n"],"names":["memo","getDeps","fn","opts","deps","result","_a","_b","_c","_d","depTime","newDeps","dep","index","resultTime","depEndTime","resultEndTime","resultFpsPercentage","pad","str","num","notUndefined","value","msg","approxEqual","a","b","debounce","targetWindow","ms","timeoutId","args"],"mappings":"AAAA,SAASA,EAAKC,GAASC,GAAIC,GAAM;AAC/B,MAAIC,IAAOD,EAAK,eAAe,IAC3BE;AACJ,SAAO,MAAM;AACX,QAAIC,GAAIC,GAAIC,GAAIC;AAChB,QAAIC;AACJ,IAAIP,EAAK,SAASG,IAAKH,EAAK,UAAU,QAAgBG,EAAG,KAAKH,CAAI,OAAIO,IAAU,KAAK;AACrF,UAAMC,IAAUV;AAEhB,QAAI,EADgBU,EAAQ,WAAWP,EAAK,UAAUO,EAAQ,KAAK,CAACC,GAAKC,MAAUT,EAAKS,CAAK,MAAMD,CAAG;AAEpG,aAAOP;AAET,IAAAD,IAAOO;AACP,QAAIG;AAGJ,QAFIX,EAAK,SAASI,IAAKJ,EAAK,UAAU,QAAgBI,EAAG,KAAKJ,CAAI,OAAIW,IAAa,KAAK,QACxFT,IAASH,EAAG,GAAGS,CAAO,GAClBR,EAAK,SAASK,IAAKL,EAAK,UAAU,QAAgBK,EAAG,KAAKL,CAAI,IAAI;AACpE,YAAMY,IAAa,KAAK,OAAO,KAAK,IAAG,IAAKL,KAAW,GAAG,IAAI,KACxDM,IAAgB,KAAK,OAAO,KAAK,IAAG,IAAKF,KAAc,GAAG,IAAI,KAC9DG,IAAsBD,IAAgB,IACtCE,IAAM,CAACC,GAAKC,MAAQ;AAExB,aADAD,IAAM,OAAOA,CAAG,GACTA,EAAI,SAASC;AAClB,UAAAD,IAAM,MAAMA;AAEd,eAAOA;AAAA,MACf;AACM,cAAQ;AAAA,QACN,OAAOD,EAAIF,GAAe,CAAC,CAAC,KAAKE,EAAIH,GAAY,CAAC,CAAC;AAAA,QACnD;AAAA;AAAA;AAAA,yBAGiB,KAAK;AAAA,UACpB;AAAA,UACA,KAAK,IAAI,MAAM,MAAME,GAAqB,GAAG;AAAA,QAC9C,CAAA;AAAA,QACDd,KAAQ,OAAO,SAASA,EAAK;AAAA,MACrC;AAAA,IACK;AACD,YAACM,IAAKN,KAAQ,OAAO,SAASA,EAAK,aAAa,QAAgBM,EAAG,KAAKN,GAAME,CAAM,GAC7EA;AAAA,EACX;AACA;AACA,SAASgB,EAAaC,GAAOC,GAAK;AAChC,MAAID,MAAU;AACZ,UAAM,IAAI,MAAM,sBAA8C;AAE9D,SAAOA;AAEX;AACK,MAACE,IAAc,CAACC,GAAGC,MAAM,KAAK,IAAID,IAAIC,CAAC,IAAI,GAC1CC,IAAW,CAACC,GAAc1B,GAAI2B,MAAO;AACzC,MAAIC;AACJ,SAAO,YAAYC,GAAM;AACvB,IAAAH,EAAa,aAAaE,CAAS,GACnCA,IAAYF,EAAa,WAAW,MAAM1B,EAAG,MAAM,MAAM6B,CAAI,GAAGF,CAAE;AAAA,EACtE;AACA;","x_google_ignoreList":[0]}
package/dist/index307.js DELETED
@@ -1,5 +0,0 @@
1
- var e = { exports: {} };
2
- export {
3
- e as __module
4
- };
5
- //# sourceMappingURL=index307.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index307.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index32.js","sources":["../src/components/BaseRadioGroup/BaseRadioGroup.vue"],"sourcesContent":["<template>\n\t<OptionsContainer\n\t\tclass=\"bb-base-radio-group\"\n\t\t:direction=\"direction\"\n\t\t:has-errors=\"hasErrors\"\n\t\t:hide-label=\"hideLabel\"\n\t\t:loading=\"!!loading\"\n\t\t:loading-text=\"loadingText\"\n\t\t:no-data-text=\"noDataText\"\n\t\t:options=\"options\"\n\t>\n\t\t<template #prepend><slot name=\"prepend\"></slot></template>\n\t\t<template #loading><slot name=\"loading\"></slot></template>\n\t\t<template #no-data><slot name=\"no-data\"></slot></template>\n\t\t<template #option:prepend=\"data\"\n\t\t\t><slot name=\"option:prepend\" v-bind=\"data\"></slot\n\t\t></template>\n\t\t<template #input=\"{ option, index }\">\n\t\t\t<BaseRadio\n\t\t\t\t:id=\"option.valueHash\"\n\t\t\t\t:aria-describedby=\"ariaDescribedby\"\n\t\t\t\t:autofocus=\"autofocus && !index\"\n\t\t\t\t:checked=\"option.selected\"\n\t\t\t\t:color=\"color\"\n\t\t\t\t:disabled=\"option.disabled\"\n\t\t\t\t:has-errors=\"hasErrors\"\n\t\t\t\t:model-value=\"props.modelValue\"\n\t\t\t\t:name=\"name\"\n\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t:required=\"required\"\n\t\t\t\t:value=\"option.value\"\n\t\t\t\tv-bind=\"eventListeners\"\n\t\t\t>\n\t\t\t\t<template v-if=\"$slots.icon\" #icon=\"data\">\n\t\t\t\t\t<slot\n\t\t\t\t\t\t:item=\"option.item\"\n\t\t\t\t\t\tname=\"icon\"\n\t\t\t\t\t\t:text=\"option.text\"\n\t\t\t\t\t\tv-bind=\"data\"\n\t\t\t\t\t/>\n\t\t\t\t</template>\n\t\t\t</BaseRadio>\n\t\t</template>\n\t\t<template #option:append=\"data\"\n\t\t\t><slot name=\"option:prepend\" v-bind=\"data\"></slot\n\t\t></template>\n\t\t<template #append><slot name=\"prepend\"></slot></template>\n\t</OptionsContainer>\n</template>\n\n<script setup lang=\"ts\" generic=\"T = any\">\nimport { ref, toRef } from 'vue';\nimport { useOptions } from '@/composables/useOptions';\nimport BaseRadio from '../BaseRadio/BaseRadio.vue';\nimport OptionsContainer from '../OptionsContainer.vue';\nimport type { InputHTMLAttributes, HTMLAttributes } from 'vue';\nimport type { NestedKeyOf } from '@/types/NestedKeyOf';\nimport type { SlotAttributes } from '../BaseRadio/BaseRadio.vue';\n\nexport type BaseRadioGroupProps<T> = {\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tariaDescribedby?: InputHTMLAttributes['aria-describedby'];\n\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Define a color for the component.\n\t *\n\t * Either a custom color or a coded color in common HEX, RGB, etc... format.\n\t */\n\tcolor?: string;\n\n\t/**\n\t * Defines an array of dependencies that will trigger actions in the component upon change.\n\t */\n\tdependencies?: any[];\n\n\t/**\n\t * Timeout used to debounce response to changes to dependencies.\n\t */\n\tdepsDebounceTime?: number;\n\n\t/**\n\t * Direction of the layout of the inputs inside the fieldset. It can be either `horizontal` or `vertical`\n\t */\n\tdirection?: 'horizontal' | 'vertical';\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * If coherence is enforce the input cannot have a modelValue the is incoherent with its current items.\n\t *\n\t * e.g. You cannot set v-model to a user that is not present in the items passed.\n\t *\n\t * modelValue will be reset upon incoherence.\n\t */\n\tenforceCoherence?: boolean;\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * Visually hides the label of the input while maintaining accessibility.\n\t */\n\thideLabel?: boolean;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Used to retrieve items can be an array or a function.\n\t */\n\titems:\n\t\t| T[]\n\t\t| ((prefill: boolean, modelValue?: any[]) => Promise<T[]>)\n\t\t| ((prefill: boolean, modelValue?: any[]) => T[]);\n\n\t/**\n\t * Defines a path that returns a property of the object to use as text or a function that returns a string\n\t */\n\titemText?: T extends object\n\t\t? NestedKeyOf<T> | ((item: T) => string)\n\t\t: ((item: T) => string) | undefined;\n\n\t/**\n\t * Defines a path that returns a property of the object to use as value or a function that returns any value\n\t */\n\titemValue?: T extends object\n\t\t? NestedKeyOf<T> | ((item: T) => string)\n\t\t: ((item: T) => any) | undefined;\n\n\t/**\n\t * String displayed while items are being loaded.\n\t */\n\tloadingText?: string;\n\n\t/**\n\t * Used by v-model. Can be any serializable type.\n\t */\n\tmodelValue: any;\n\n\t/**\n\t * Timeout used to debounce response to changes to modelValue.\n\t */\n\tmodelValueDebounceTime?: number;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname: InputHTMLAttributes['name'];\n\n\t/**\n\t * String displayed when there are no items to display.\n\t */\n\tnoDataText?: string;\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: InputHTMLAttributes['readonly'];\n\n\t/**\n\t * Sets the input as required.\n\t */\n\trequired?: boolean;\n};\n\nexport type BaseRadioGroupEvents = {\n\t(e: 'blur', event: FocusEvent): void;\n\t(e: 'change', event: Event): void;\n\t(e: 'click', event: MouseEvent): void;\n\t(e: 'focus', event: FocusEvent): void;\n\t(e: 'inactive'): void;\n\t(e: 'input', event: Event): void;\n\t(e: 'keydown', event: KeyboardEvent): void;\n\t(e: 'mousedown', event: MouseEvent): void;\n\t(e: 'mouseup', event: MouseEvent): void;\n\t(e: 'update:modelValue', value: any): void;\n};\n\nconst props = withDefaults(defineProps<BaseRadioGroupProps<T>>(), {\n\tdepsDebounceTime: 0,\n\tdirection: 'horizontal',\n\titems: () => [],\n\tloadingText: 'Caricamento...',\n\tmodelValueDebounceTime: 0,\n\tnoDataText: 'Nessun elemento da visualizzare',\n});\n\nconst emit = defineEmits<BaseRadioGroupEvents>();\n\ndefineSlots<{\n\tprepend?: (props: object) => any;\n\tloading?: (props: object) => any;\n\t'no-data'?: (props: object) => any;\n\t'option:prepend'?: (props: {\n\t\tchecked: boolean;\n\t\tdisabled: boolean;\n\t\tid?: string;\n\t\titem: T;\n\t\ttext: string;\n\t}) => any;\n\ticon?: (\n\t\tprops: SlotAttributes & {\n\t\t\titem: T;\n\t\t\ttext: string;\n\t\t}\n\t) => any;\n\tlabel?: (props: { item: T; text: string; checked: boolean }) => any;\n\t'option:append'?: (props: {\n\t\tchecked: boolean;\n\t\tdisabled: boolean;\n\t\tid?: string;\n\t\titem: T;\n\t\ttext: string;\n\t}) => any;\n\tappend?: (props: object) => any;\n}>();\n\nconst container = ref<HTMLElement>();\nconst active = ref(false);\n\nconst { innerLoading: loading, options } = useOptions({\n\tdependencies: toRef(props, 'dependencies'),\n\tdepsDebounceTime: props.depsDebounceTime,\n\tdisabled: toRef(props, 'disabled'),\n\temit,\n\tenforceCoherence: props.enforceCoherence,\n\titems: toRef(props, 'items'),\n\titemText: props.itemText,\n\titemValue: props.itemValue,\n\tmodelValue: toRef(props, 'modelValue'),\n\tmodelValueDebounceTime: props.modelValueDebounceTime,\n\tmultiple: false,\n\tprefill: true,\n\tqueryDebounceTime: 0,\n\tresetQueryOnOptionSelected: false,\n\tstash: false,\n});\n\nconst onFocus = (event: FocusEvent) => {\n\temit('focus', event);\n\tif (!active.value) {\n\t\tdocument.addEventListener('focusin', onDocumentFocus, { passive: true });\n\t\tdocument.addEventListener('click', onDocumentClick, { passive: true });\n\t\tactive.value = true;\n\t}\n};\n\nconst eventListeners = {\n\tonBlur: (event: FocusEvent) => emit('blur', event),\n\tonChange: (event: Event) => emit('change', event),\n\tonClick: (event: MouseEvent) => emit('click', event),\n\tonFocus,\n\tonInput: (event: Event) => emit('input', event),\n\tonKeydown: (event: KeyboardEvent) => emit('keydown', event),\n\tonMousedown: (event: MouseEvent) => emit('mousedown', event),\n\tonMouseup: (event: MouseEvent) => emit('mouseup', event),\n\t'onUpdate:modelValue': (value: any) => emit('update:modelValue', value),\n};\n\nconst onDocumentFocus = (event: FocusEvent) => {\n\tif (event.target instanceof HTMLElement) {\n\t\tif (!container.value?.contains(event.target)) {\n\t\t\temit('inactive');\n\t\t\tactive.value = false;\n\t\t\tdocument.removeEventListener('focusin', onDocumentFocus);\n\t\t\tdocument.removeEventListener('click', onDocumentClick);\n\t\t}\n\t}\n};\n\nconst onDocumentClick = (event: MouseEvent) => {\n\tif (event.target instanceof HTMLElement) {\n\t\tif (!container.value?.contains(event.target)) {\n\t\t\temit('inactive');\n\t\t\tactive.value = false;\n\t\t\tdocument.removeEventListener('focusin', onDocumentFocus);\n\t\t\tdocument.removeEventListener('click', onDocumentClick);\n\t\t}\n\t}\n};\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BaseRadioGroup';\n</style>\n"],"names":["props","__props","emit","__emit","container","ref","active","loading","options","useOptions","toRef","eventListeners","event","onDocumentFocus","onDocumentClick","value","_a"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiMA,UAAMA,IAAQC,GASRC,IAAOC,GA8BPC,IAAYC,KACZC,IAASD,EAAI,EAAK,GAElB,EAAE,cAAcE,GAAS,SAAAC,EAAA,IAAYC,EAAW;AAAA,MACrD,cAAcC,EAAMV,GAAO,cAAc;AAAA,MACzC,kBAAkBA,EAAM;AAAA,MACxB,UAAUU,EAAMV,GAAO,UAAU;AAAA,MACjC,MAAAE;AAAA,MACA,kBAAkBF,EAAM;AAAA,MACxB,OAAOU,EAAMV,GAAO,OAAO;AAAA,MAC3B,UAAUA,EAAM;AAAA,MAChB,WAAWA,EAAM;AAAA,MACjB,YAAYU,EAAMV,GAAO,YAAY;AAAA,MACrC,wBAAwBA,EAAM;AAAA,MAC9B,UAAU;AAAA,MACV,SAAS;AAAA,MACT,mBAAmB;AAAA,MACnB,4BA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;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index34.js","sources":["../src/components/BaseRating/BaseRating.vue"],"sourcesContent":["<template>\n\t<span v-bind=\"outerContainerAttributes\" ref=\"container\">\n\t\t<span class=\"bb-base-rating__inner-container\">\n\t\t\t<slot name=\"prepend\"></slot>\n\t\t\t<label\n\t\t\t\tv-for=\"(option, index) in options\"\n\t\t\t\t:key=\"option.value\"\n\t\t\t\tclass=\"bb-base-rating__option\"\n\t\t\t\t:class=\"{ 'bb-base-rating__option--highlighted': option.highlighted }\"\n\t\t\t>\n\t\t\t\t<span class=\"bb-base-rating__label-text sr-only\">{{\n\t\t\t\t\toption.value\n\t\t\t\t}}</span>\n\t\t\t\t<input\n\t\t\t\t\t:id=\"option.id\"\n\t\t\t\t\t:aria-describedby=\"ariaDescribedby\"\n\t\t\t\t\t:autofocus=\"autofocus && !index\"\n\t\t\t\t\t:checked=\"option.checked\"\n\t\t\t\t\tclass=\"sr-only\"\n\t\t\t\t\t:disabled=\"option.disabled\"\n\t\t\t\t\t:name=\"option.name\"\n\t\t\t\t\t:required=\"required\"\n\t\t\t\t\ttype=\"radio\"\n\t\t\t\t\t:value=\"option.value\"\n\t\t\t\t\tv-bind=\"eventListeners\"\n\t\t\t\t/>\n\t\t\t\t<slot\n\t\t\t\t\t:id=\"option.id\"\n\t\t\t\t\t:checked=\"option.checked\"\n\t\t\t\t\t:disabled=\"option.disabled\"\n\t\t\t\t\tname=\"icon\"\n\t\t\t\t\t:size=\"option.size\"\n\t\t\t\t\t:value=\"option.value\"\n\t\t\t\t>\n\t\t\t\t\t<svg\n\t\t\t\t\t\t:height=\"option.size\"\n\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t:width=\"option.size\"\n\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<path\n\t\t\t\t\t\t\td=\"m8.243 7.34l-6.38.925l-.113.023a1 1 0 0 0-.44 1.684l4.622 4.499l-1.09 6.355l-.013.11a1 1 0 0 0 1.464.944l5.706-3l5.693 3l.1.046a1 1 0 0 0 1.352-1.1l-1.091-6.355l4.624-4.5l.078-.085a1 1 0 0 0-.633-1.62l-6.38-.926l-2.852-5.78a1 1 0 0 0-1.794 0L8.243 7.34z\"\n\t\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\t\tstroke-linejoin=\"round\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</svg>\n\t\t\t\t</slot>\n\t\t\t</label>\n\t\t\t<slot name=\"append\"></slot>\n\t\t</span>\n\t</span>\n</template>\n\n<script setup lang=\"ts\">\nimport { booleanishToBoolean } from '@/utilities/functions/booleanishToBoolean';\nimport { computed, ref } from 'vue';\nimport { identity } from '@/utilities/functions/identity';\nimport { isCssColor } from '@/utilities/functions/isCssColor';\nimport { isNotNil } from '@/utilities/functions/isNotNil';\nimport type { InputHTMLAttributes, HTMLAttributes } from 'vue';\nimport type { Size, BbIconProps } from '../BbIcon/BbIcon.vue';\n\nexport type BaseRatingProps = {\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tariaDescribedby?: InputHTMLAttributes['aria-describedby'];\n\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Define a color for the component.\n\t *\n\t * Either a custom color or a coded color in common HEX, RGB, etc... format.\n\t */\n\tcolor?: string;\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\t/**\n\t * Used by v-model\n\t */\n\tmodelValue: null | number;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname: Exclude<InputHTMLAttributes['name'], undefined>;\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: InputHTMLAttributes['readonly'];\n\n\t/**\n\t * Sets the input as required.\n\t */\n\trequired?: boolean;\n\n\t/**\n\t * Maximum number of stars to render and maximum value of the component\n\t */\n\tstars?: number;\n} & Pick<BbIconProps, 'size'>;\n\ntype Option = {\n\tchecked: boolean;\n\tdisabled: boolean;\n\thighlighted: boolean;\n\tid?: string;\n\tname: string;\n\tsize: number | undefined;\n\tvalue: number;\n};\n\nconst props = withDefaults(defineProps<BaseRatingProps>(), {\n\tstars: 5,\n});\n\nexport type BaseRatingEvents = {\n\t(e: 'blur', event: FocusEvent): void;\n\t(e: 'change', event: Event): void;\n\t(e: 'click', event: MouseEvent): void;\n\t(e: 'focus', event: FocusEvent): void;\n\t(e: 'inactive'): void;\n\t(e: 'input', event: Event): void;\n\t(e: 'keydown', event: KeyboardEvent): void;\n\t(e: 'mousedown', event: MouseEvent): void;\n\t(e: 'mouseup', event: MouseEvent): void;\n\t(e: 'update:modelValue', value: number | null): void;\n};\n\nexport type BaseRatingSlots = {\n\ticon?: (props: {\n\t\tchecked: boolean;\n\t\tdisabled: boolean;\n\t\tid?: string;\n\t\tsize: number | undefined;\n\t\tvalue: number;\n\t}) => any;\n\tprepend?: (props: object) => any;\n\tappend?: (props: object) => any;\n};\n\ndefineSlots<BaseRatingSlots>();\n\nconst emit = defineEmits<BaseRatingEvents>();\n\nconst container = ref<HTMLElement>();\nconst active = ref(false);\n\nconst onInputChange = (event: Event) => {\n\temit('change', event);\n\tif (event.target instanceof HTMLInputElement) {\n\t\tif (event.target.checked) {\n\t\t\temit('update:modelValue', +event.target.value);\n\t\t}\n\t}\n};\n\nconst onInputClick = (event: MouseEvent) => {\n\temit('click', event);\n\tif (event.target instanceof HTMLInputElement) {\n\t\tif (event.target.checked) {\n\t\t\tif (+event.target.value === props.modelValue) {\n\t\t\t\temit('update:modelValue', null);\n\t\t\t}\n\t\t}\n\t}\n};\n\nconst onInputFocus = (event: FocusEvent) => {\n\temit('focus', event);\n\tif (!active.value) {\n\t\tdocument.addEventListener('focusin', onDocumentFocus, { passive: true });\n\t\tdocument.addEventListener('click', onDocumentClick, { passive: true });\n\t\tactive.value = true;\n\t}\n};\n\nconst eventListeners = {\n\tonBlur: (event: FocusEvent) => emit('blur', event),\n\tonChange: onInputChange,\n\tonClick: onInputClick,\n\tonFocus: onInputFocus,\n\tonInput: (event: Event) => emit('input', event),\n\tonKeydown: (event: KeyboardEvent) => emit('keydown', event),\n\tonMousedown: (event: MouseEvent) => emit('mousedown', event),\n\tonMouseup: (event: MouseEvent) => emit('mouseup', event),\n};\n\nconst onDocumentFocus = (event: FocusEvent) => {\n\tif (event.target instanceof HTMLElement) {\n\t\tif (!container.value?.contains(event.target)) {\n\t\t\temit('inactive');\n\t\t\tactive.value = false;\n\t\t\tdocument.removeEventListener('focusin', onDocumentFocus);\n\t\t\tdocument.removeEventListener('click', onDocumentClick);\n\t\t}\n\t}\n};\n\nconst onDocumentClick = (event: MouseEvent) => {\n\tif (event.target instanceof HTMLElement) {\n\t\tif (!container.value?.contains(event.target)) {\n\t\t\temit('inactive');\n\t\t\tactive.value = false;\n\t\t\tdocument.removeEventListener('focusin', onDocumentFocus);\n\t\t\tdocument.removeEventListener('click', onDocumentClick);\n\t\t}\n\t}\n};\n\nconst sizeMap: Size = {\n\txs: 12,\n\tsm: 16,\n\tmd: 24,\n\tlg: 28,\n\txl: 36,\n\txxl: 40,\n};\n\nconst size = computed(() => {\n\tlet dimension: number | undefined;\n\tif (typeof props.size === 'string') {\n\t\tdimension = sizeMap[props.size as keyof Size] ?? parseInt(props.size, 10);\n\t} else {\n\t\tdimension = props.size;\n\t}\n\treturn dimension;\n});\n\nconst options = computed(() => {\n\treturn new Array(props.stars)\n\t\t.fill(0)\n\t\t.map((_, index) => index + 1)\n\t\t.map((number): Option => {\n\t\t\tconst id = props.id\n\t\t\t\t? [props.id, number].filter(identity).join('_')\n\t\t\t\t: undefined;\n\n\t\t\tconst checked = number === props.modelValue;\n\t\t\tconst highlighted = !!(props.modelValue && number <= props.modelValue);\n\n\t\t\tconst disabled = !!(\n\t\t\t\tprops.disabled ||\n\t\t\t\t(isNotNil(props.readonly) ? booleanishToBoolean(props.readonly) : false)\n\t\t\t);\n\n\t\t\treturn {\n\t\t\t\tchecked,\n\t\t\t\tdisabled,\n\t\t\t\thighlighted,\n\t\t\t\tid,\n\t\t\t\tname: props.name,\n\t\t\t\tsize: size.value,\n\t\t\t\tvalue: number,\n\t\t\t};\n\t\t});\n});\n\nconst outerContainerAttributes = computed(() => {\n\tlet style: { [key: string]: string } = {};\n\tif (props.color && isCssColor(props.color)) {\n\t\tstyle['--color'] = props.color;\n\t}\n\tif (size.value) {\n\t\tstyle['--size'] = `${size.value}px`;\n\t}\n\treturn {\n\t\tclass: {\n\t\t\t'bb-base-rating': true,\n\t\t\t'bb-base-rating--has-value': props.modelValue,\n\t\t\t'bb-base-rating--disabled': props.disabled,\n\t\t\t'bb-base-rating--errors': props.hasErrors,\n\t\t\t'bb-base-rating--readonly': props.readonly,\n\t\t\t[`bb-base-rating--${props.color}`]:\n\t\t\t\tprops.color && !isCssColor(props.color),\n\t\t},\n\t\tstyle,\n\t};\n});\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BaseRating';\n</style>\n"],"names":["props","__props","emit","__emit","container","ref","active","eventListeners","event","onDocumentFocus","onDocumentClick","_a","sizeMap","size","computed","dimension","options","_","index","number","id","identity","checked","highlighted","disabled","isNotNil","booleanishToBoolean","outerContainerAttributes","style","isCssColor"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmIA,UAAMA,IAAQC,GA+BRC,IAAOC,GAEPC,IAAYC,KACZC,IAASD,EAAI,EAAK,GA+BlBE,IAAiB;AAAA,MACtB,QAAQ,CAACC,MAAsBN,EAAK,QAAQM,CAAK;AAAA,MACjD,UA/BqB,CAACA,MAAiB;AACvC,QAAAN,EAAK,UAAUM,CAAK,GAChBA,EAAM,kBAAkB,oBACvBA,EAAM,OAAO,WAChBN,EAAK,qBAAqB,CAACM,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S,CAAC6B,EAAW7B,EAAM,KAAK;AAAA,QACxC;AAAA,QACA,OAAA4B;AAAA,MAAA;AAAA,IACD,CACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index36.js","sources":["../src/components/BaseSelect/BaseSelect.vue"],"sourcesContent":["<template>\n\t<CommonInputOuterContainer\n\t\tref=\"outerContainer\"\n\t\t:class=\"{\n\t\t\t'bb-base-select': true,\n\t\t\t'bb-base-select--active': active,\n\t\t\t'bb-base-select--shown': shown,\n\t\t\t'bb-base-select--loading': computedLoading,\n\t\t\t'bb-base-select--disabled': disabled,\n\t\t\t'bb-base-select--errors': hasErrors,\n\t\t\t'bb-base-select--readonly': readonly,\n\t\t}\"\n\t\t@click=\"onOuterContainerClick\"\n\t>\n\t\t<template #prepend-outer\n\t\t\t><slot name=\"prepend-outer\" :query=\"query\"></slot\n\t\t></template>\n\n\t\t<CommonInputInnerContainer\n\t\t\tref=\"innerContainer\"\n\t\t\t:append:icon=\"props['append:icon']\"\n\t\t\t:prepend:icon=\"props['prepend:icon']\"\n\t\t>\n\t\t\t<template #prepend><slot name=\"prepend\" :query=\"query\"></slot></template>\n\t\t\t<template #prefix><slot name=\"prefix\" /></template>\n\t\t\t<BbSmoothHeight tag=\"span\">\n\t\t\t\t<span class=\"bb-base-select__input-container\">\n\t\t\t\t\t<template v-if=\"multiple\">\n\t\t\t\t\t\t<template v-if=\"comma\">\n\t\t\t\t\t\t\t<CommaBox ref=\"commaBox\" :options=\"selectedOptions\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\t<template v-else>\n\t\t\t\t\t\t\t<ChipsBox\n\t\t\t\t\t\t\t\tref=\"chipsBox\"\n\t\t\t\t\t\t\t\t:options=\"selectedOptions\"\n\t\t\t\t\t\t\t\t@option:unselected=\"onOptionUnselected\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</template>\n\t\t\t\t\t<input\n\t\t\t\t\t\t:id=\"id\"\n\t\t\t\t\t\tref=\"input\"\n\t\t\t\t\t\tv-model=\"query\"\n\t\t\t\t\t\t:aria-autocomplete=\"'list'\"\n\t\t\t\t\t\t:aria-controls=\"`${id}_listbox`\"\n\t\t\t\t\t\t:aria-describedby=\"ariaDescribedby\"\n\t\t\t\t\t\t:aria-expanded=\"shown\"\n\t\t\t\t\t\t:autocomplete=\"autocomplete\"\n\t\t\t\t\t\t:autofocus=\"autofocus\"\n\t\t\t\t\t\t:class=\"'bb-base-select__text-input'\"\n\t\t\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t\t\t:inputmode=\"inputmode\"\n\t\t\t\t\t\t:placeholder=\"computedPlaceholder\"\n\t\t\t\t\t\t:readonly=\"readonly || !allowWriting\"\n\t\t\t\t\t\t:required=\"\n\t\t\t\t\t\t\t(required && !multiple) || (multiple && !modelValue.length)\n\t\t\t\t\t\t\"\n\t\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\t\t:type=\"'text'\"\n\t\t\t\t\t\t@blur.stop=\"onInputBlur\"\n\t\t\t\t\t\t@change.stop=\"onInputChange\"\n\t\t\t\t\t\t@focus.once.stop=\"onInputFirstFocus\"\n\t\t\t\t\t\t@focus.stop=\"onInputFocus\"\n\t\t\t\t\t\t@input.stop=\"onInputInput\"\n\t\t\t\t\t\t@keydown.stop.delete=\"onBackspace\"\n\t\t\t\t\t\t@keydown.stop.left=\"onArrowLeft\"\n\t\t\t\t\t\t@keydown.stop.prevent.down=\"onArrowDown\"\n\t\t\t\t\t\t@keydown.stop.prevent.enter=\"onEnter\"\n\t\t\t\t\t\t@keydown.stop.prevent.esc=\"onEscape\"\n\t\t\t\t\t\t@keydown.stop.prevent.up=\"onArrowUp\"\n\t\t\t\t\t\t@keydown.stop.right=\"onArrowRight\"\n\t\t\t\t\t/>\n\t\t\t\t</span>\n\t\t\t</BbSmoothHeight>\n\t\t\t<slot :loading=\"!!innerLoading\" name=\"chevron\" :shown=\"shown\">\n\t\t\t\t<svg\n\t\t\t\t\tclass=\"bb-base-select__chevron\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M7.41 8.58L12 13.17l4.59-4.59L18 10l-6 6l-6-6z\"\n\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t/>\n\t\t\t\t</svg>\n\t\t\t</slot>\n\t\t\t<template #append><slot name=\"append\" :query=\"query\"></slot></template>\n\n\t\t\t<template #suffix><slot name=\"suffix\" /></template>\n\t\t</CommonInputInnerContainer>\n\t\t<template #append-outer\n\t\t\t><slot name=\"append-outer\" :query=\"query\"></slot\n\t\t></template>\n\t\t<input v-for=\"input in hiddenInputs\" :key=\"input.value\" v-bind=\"input\" />\n\n\t\t<teleport v-if=\"renderListBox\" to=\"body\">\n\t\t\t<ListBox\n\t\t\t\tref=\"optionsContainer\"\n\t\t\t\t:loading=\"computedLoading\"\n\t\t\t\t:open=\"shown\"\n\t\t\t\t:options=\"filteredOptions\"\n\t\t\t\t:style=\"optionsContainerStyles\"\n\t\t\t\t@option:selected=\"onOptionSelected\"\n\t\t\t\t@option:unselected=\"onOptionUnselected\"\n\t\t\t>\n\t\t\t\t<template #options:prepend><slot name=\"options:prepend\" /></template>\n\t\t\t\t<template #loading><slot name=\"loading\" :query=\"query\" /></template>\n\t\t\t\t<template #no-data><slot name=\"no-data\" :query=\"query\" /></template>\n\t\t\t\t<template #options:append><slot name=\"options:append\" /></template>\n\t\t\t\t<template #option=\"data\"\n\t\t\t\t\t><slot\n\t\t\t\t\t\t:has-errors=\"hasErrors\"\n\t\t\t\t\t\t:loading=\"computedLoading\"\n\t\t\t\t\t\tname=\"option\"\n\t\t\t\t\t\tv-bind=\"data\"\n\t\t\t\t/></template>\n\t\t\t</ListBox>\n\t\t</teleport>\n\t</CommonInputOuterContainer>\n</template>\n\n<script setup lang=\"ts\">\nimport { BbSmoothHeight } from '@/index';\nimport { computed, ref, nextTick, defineAsyncComponent } from 'vue';\nimport { isNotNil } from '@/utilities/functions/isNotNil';\nimport { last } from '@/utilities/functions/last';\nimport { matchAnyKey } from '@/utilities/functions/matchAnyKey';\nimport { toRef } from 'vue';\nimport { useFloating, autoUpdate, flip, shift, offset } from '@floating-ui/vue';\nimport { useId } from '@/composables/useId';\nimport { useIntersectionObserver } from '@vueuse/core';\nimport { useLogger } from '@/composables/useLogger';\nimport { useMobile } from '@/composables/useMobile';\nimport { useOptions } from '@/composables/useOptions';\nimport { wait } from '@/utilities/functions/wait';\nimport { when } from '@/utilities/functions/when';\nimport ChipsBox from '../ChipsBox.vue';\nimport CommaBox from '../CommaBox.vue';\nimport CommonInputInnerContainer from '../CommonInputInnerContainer.vue';\nimport CommonInputOuterContainer from '../CommonInputOuterContainer.vue';\nimport type { HTMLAttributes, InputHTMLAttributes } from 'vue';\nimport type { Option as BaseOption } from '@/types/Option';\nimport { waitFor } from '@/utilities/functions/waitFor';\n\nexport type BaseSelectProps = {\n\t/**\n\t * Allows the user to add options to the list by\n\t * inserting text in the input and pressing ENTER.\n\t * The value and text of the option generated is a\n\t * string equal to what has been inserted.\n\t */\n\taddOptions?: boolean;\n\n\t/**\n\t * Allows typing into the input.\n\t */\n\tallowWriting?: boolean | 'not-mobile';\n\n\t/**\n\t * Name of the icon to be added at the end of the input.\n\t */\n\t// eslint-disable-next-line vue/prop-name-casing\n\t'append:icon'?: string;\n\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tariaDescribedby?: InputHTMLAttributes['aria-describedby'];\n\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tautocomplete?: InputHTMLAttributes['autocomplete'];\n\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Sets the display model for selected values to a list\n\t * of comma separated string. In this mode the user\n\t * cannot deselect an option by pressing the close button.\n\t */\n\tcomma?: boolean;\n\n\t/**\n\t * Defines an array of dependencies that will trigger actions in the component upon change.\n\t */\n\tdependencies?: any[];\n\n\t/**\n\t * Timeout used to debounce response to changes to dependencies.\n\t */\n\tdepsDebounceTime?: number;\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * If coherence is enforce the input cannot have a modelValue that is incoherent with its current items.\n\t *\n\t * e.g. You cannot set v-model to a user that is not present in the items passed.\n\t *\n\t * modelValue will be reset upon incoherence.\n\t */\n\tenforceCoherence?: boolean;\n\n\t/**\n\t * Defines how the filtering should work.\n\t * In any case options are always filtered by the text displayed but\n\t * they can also take into account other properties of the\n\t * passed elements when this property is a string or an array of string.\n\t * E.g. items could be a list of users and you can filter users by email or phone by passing `['email', 'phone']`\n\t * You can also pass false to not filter anything or a function for more granular control.\n\t *\n\t */\n\tfilterBy?:\n\t\t| string\n\t\t| string[]\n\t\t| false\n\t\t| ((value: any, item: any) => boolean)\n\t\t| null;\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Used to retrieve items can be an array or a function.\n\t */\n\titems:\n\t\t| any[]\n\t\t| ((query: string, prefill: boolean, modelValue: any) => Promise<any[]>)\n\t\t| ((query: string, prefill: boolean, modelValue: any) => any[]);\n\n\t/**\n\t * Defines a path that returns a property of the object to use as text or a function that returns a string\n\t */\n\titemText?: string | ((item: any) => string) | undefined;\n\n\t/**\n\t * Defines a path that returns a property of the object to use as value or a function that returns any value\n\t */\n\titemValue?: string | ((item: any) => string) | undefined;\n\n\t/**\n\t * Sets the component in a loading state, usually triggering some visual styles.\n\t */\n\tloading?: boolean;\n\n\t/**\n\t * String displayed while items are being loaded.\n\t */\n\tloadingText?: string;\n\n\t/**\n\t * Used by v-model. Can be any serializable type.\n\t */\n\tmodelValue: any;\n\n\t/**\n\t * Timeout used to debounce response to changes to modelValue.\n\t */\n\tmodelValueDebounceTime?: number;\n\n\t/**\n\t * Allows the selection of multiple items.\n\t */\n\tmultiple?: boolean;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname?: InputHTMLAttributes['name'];\n\n\t/**\n\t * String displayed when there are no items to display.\n\t */\n\tnoDataText?: string;\n\n\t/**\n\t * String displayed when there's no data.\n\t */\n\tplaceholder?: InputHTMLAttributes['placeholder'];\n\n\t/**\n\t * Defines the prefill strategy for the input. By default the input will prefill\n\t * on focus. It can also always prefill with `true` and only prefill on search with `false`.\n\t */\n\tprefill?: boolean | 'focus';\n\n\t/**\n\t * Name of the icon to be added at the start of the input.\n\t */\n\t// eslint-disable-next-line vue/prop-name-casing\n\t'prepend:icon'?: string;\n\n\t/**\n\t * Time to wait when the users stops writing in the input before querying data.\n\t * Especially useful when searching live data on big datasets.\n\t */\n\tqueryDebounceTime?: number;\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: boolean;\n\n\t/**\n\t * Sets the input as required.\n\t */\n\trequired?: boolean;\n\n\t/**\n\t * If `true` when in multiple selection, reset the query immediately\n\t * upon selecting an option. By default the query is\n\t * not reset until focus is lost so the user can search\n\t * for \"Cath\" and select \"Cathy\" and then write more to\n\t * search for \"Catherine\"\n\t */\n\tresetQueryOnOptionSelected?: boolean;\n\n\t/**\n\t * Adds a stash to accumulate selected values. Especially\n\t * useful when searching in a big database of items.\n\t * E.g. if you search for \"John\" and then search for \"Richard\"\n\t * you either always return the previous items or you stash them passing `true` to this option.\n\t */\n\tstash?: boolean;\n\n\t/**\n\t * How long the transition has to last in milliseconds\n\t */\n\ttransitionDuration?: number;\n\n\t/**\n\t * Pass `true` if the dropdown is not updating following movement in the UI, like in modals. Very expensive so use with care.\n\t */\n\tupdateOnAnimationFrame?: boolean;\n};\nexport type BaseSelectEvents = {\n\t(e: 'blur', event: FocusEvent): void;\n\t(e: 'change', event: Event): void;\n\t(e: 'click', event: MouseEvent): void;\n\t(e: 'focus', event: FocusEvent): void;\n\t(e: 'inactive'): void;\n\t(e: 'input', event: Event): void;\n\t(e: 'update:modelValue', value: any): void;\n};\n\nexport type BaseSelectSlots = {\n\tappend?: (props: { query: string }) => any;\n\t'append-outer'?: (props: { query: string }) => any;\n\tchevron?: (props: { loading: boolean; shown: boolean }) => any;\n\tchip?: (props: {\n\t\tdisabled: boolean | undefined;\n\t\thasErrors?: boolean;\n\t\tindex: number;\n\t\titem: any;\n\t\tloading: boolean;\n\t\tmanual: boolean;\n\t\tselected: boolean | undefined;\n\t\ttext: string;\n\t\tvalue: any;\n\t}) => any;\n\tloading?: (props: { query: string }) => any;\n\t'no-data'?: (props: { query: string }) => any;\n\toption?: (props: {\n\t\tdisabled: boolean;\n\t\tfocused: boolean;\n\t\tindex: number;\n\t\thasErrors?: boolean;\n\t\titem: any;\n\t\tloading: boolean;\n\t\tselected: boolean;\n\t\ttext: string;\n\t\tvalue: any;\n\t}) => any;\n\t'option:append'?: (props: { item: any }) => any;\n\t'option:prepend'?: (props: { item: any }) => any;\n\t'options:append'?: (props: object) => any;\n\t'options:prepend'?: (props: object) => any;\n\tprefix?: (props: object) => any;\n\tprepend?: (props: { query: string }) => any;\n\t'prepend-outer'?: (props: { query: string }) => any;\n\tsuffix?: (props: object) => any;\n};\n\nconst props = withDefaults(defineProps<BaseSelectProps>(), {\n\tallowWriting: true,\n\tdepsDebounceTime: 0,\n\tdependencies: () => [],\n\tfilterBy: () => [],\n\tloadingText: 'Caricamento...',\n\tmodelValueDebounceTime: 0,\n\tnoDataText: 'Nessun elemento da visualizzare',\n\tprefill: 'focus',\n\tqueryDebounceTime: 500,\n\ttransitionDuration: 300,\n\tupdateOnAnimationFrame: false,\n});\n\nconst emit = defineEmits<BaseSelectEvents>();\n\ndefineSlots<BaseSelectSlots>();\n\nif (props.multiple && !Array.isArray(props.modelValue)) {\n\tthrow new Error('Multiple is set to \"true\" but modelValue is not an array.');\n}\n\n/**\n * START ELEMENT REFERENCES\n */\nconst ListBox = defineAsyncComponent(() => import('../ListBox.vue'));\nconst outerContainer = ref<InstanceType<\n\ttypeof CommonInputOuterContainer\n> | null>(null);\nconst innerContainer = ref<InstanceType<\n\ttypeof CommonInputInnerContainer\n> | null>(null);\nconst optionsContainer = ref<InstanceType<typeof ListBox> | null>(null);\nconst commaBox = ref<InstanceType<typeof CommaBox> | null>(null);\nconst chipsBox = ref<InstanceType<typeof ChipsBox> | null>(null);\nconst selectedBox = computed(() =>\n\tprops.comma ? commaBox.value : chipsBox.value\n);\n/**\n * END ELEMENT REFERENCES\n */\n\nconst { isMobile } = useMobile();\nconst inputmode = computed(() =>\n\tprops.allowWriting === 'not-mobile' && isMobile.value ? 'none' : undefined\n);\n\n// Always provide an id so that inputs can be focussed by clicking oin the label\nconst id = props.id || useId().id.value;\n\nuseIntersectionObserver(\n\tinnerContainer,\n\t([{ intersectionRatio }]) => {\n\t\tif (intersectionRatio !== 1) {\n\t\t\tclose();\n\t\t}\n\t},\n\t{ threshold: [0, 1] }\n);\n\nconst { floatingStyles } = useFloating(\n\tinnerContainer,\n\toptionsContainer as any,\n\t{\n\t\tplacement: 'bottom',\n\t\twhileElementsMounted: autoUpdate,\n\t\tmiddleware: [flip(), offset(5), shift()],\n\t}\n);\n\nconst optionsContainerStyles = computed(() => {\n\tconst base: Record<string, any> = {\n\t\t...floatingStyles.value,\n\t\tzIndex: '10',\n\t};\n\tif (innerContainer.value) {\n\t\tbase.width = `${innerContainer.value?.$el.clientWidth}px`;\n\t}\n\n\treturn base;\n});\n\n/**\n * START INPUT HANDLING\n */\nconst input = ref<HTMLElement | null>(null);\nconst focusInput = () => {\n\tif (input.value instanceof HTMLInputElement) {\n\t\tinput.value.focus();\n\t}\n};\n\n/**\n * When the focus goes to the input we select the current text\n * so the user can replace or delete it.\n * On top of that if the prefill strategy is to prefill on first focus and options\n * weren't already retrieved by the watcher on mount, we do that\n */\nconst onInputFocus = async (event: FocusEvent) => {\n\temit('focus', event);\n\tsetActive();\n\tdocument.addEventListener('click', onOutsideInteraction);\n\tdocument.addEventListener('focusin', onOutsideInteraction);\n};\n\nconst onInputFirstFocus = () => {\n\tif (props.prefill === 'focus' && !isPrefilling.value && !hasPrefilled.value) {\n\t\tprefillItems();\n\t}\n};\n\nconst onInputBlur = async (event: FocusEvent) => {\n\temit('blur', event);\n};\n\nconst onInputChange = (event: Event) => emit('change', event);\n\n/**\n * Search at every input by the user.\n * When the user deletes the query unselect the current option\n */\nconst onInputInput = (event: Event) => {\n\temit('input', event);\n\tif (query.value === '') {\n\t\tif (!props.multiple) {\n\t\t\tupdateModelValue(null);\n\t\t}\n\t}\n\tselectedBox.value?.blur();\n\tsearchByQuery();\n};\n\n/**\n * On click outside of the container close the panel, remove active state.\n * In multiple selection clear query after a timeout\n */\nconst onOutsideInteraction = async (event: Event) => {\n\tif (event.target instanceof Node) {\n\t\tif (outerContainer.value && optionsContainer.value) {\n\t\t\tif (\n\t\t\t\t!outerContainer.value.$el.contains(event.target) &&\n\t\t\t\t!optionsContainer.value.$el.contains(event.target)\n\t\t\t) {\n\t\t\t\tclose();\n\t\t\t\tsetInactive();\n\t\t\t\tdocument.removeEventListener('click', onOutsideInteraction);\n\t\t\t\tdocument.removeEventListener('focusin', onOutsideInteraction);\n\t\t\t\tawait wait(props.transitionDuration);\n\t\t\t\talignQueryToState();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n};\n\nconst canProcessKeyboardBindings = computed(() => {\n\tif (props.readonly) return false;\n\tif (props.disabled) return false;\n\tif (computedLoading.value) return false;\n\tif (!selectedBox.value && props.multiple) return false;\n\treturn true;\n});\n\n/**\n * On arrow prevent the page from scrolling.\n * Reset horizontal focus\n * When the panel is open\n * - Focus on the previous option\n * When the panel is closed\n * - focus on the first selected option\n */\nconst onArrowUp = async () => {\n\tif (!canProcessKeyboardBindings.value) {\n\t\treturn;\n\t}\n\t// Reset horizontal focus while moving vertically\n\tselectedBox.value?.blur();\n\tif (shown.value) {\n\t\toptionsContainer.value?.focusPrevious();\n\t} else {\n\t\tawait open();\n\t\tawait wait(props.transitionDuration);\n\t\toptionsContainer.value?.focusLastSelected();\n\t}\n};\n\nconst onArrowDown = async () => {\n\tif (!canProcessKeyboardBindings.value) {\n\t\treturn;\n\t}\n\t// Reset horizontal focus while moving vertically\n\tselectedBox.value?.blur();\n\tif (shown.value) {\n\t\toptionsContainer.value?.focusNext();\n\t} else {\n\t\tawait open();\n\t\tawait wait(props.transitionDuration);\n\t\toptionsContainer.value?.focusFirstSelected();\n\t}\n};\n\nconst onArrowLeft = (event: KeyboardEvent) => {\n\tif (!canProcessKeyboardBindings.value) {\n\t\treturn;\n\t}\n\tif (!props.multiple || query.value) {\n\t\treturn;\n\t}\n\tevent.preventDefault();\n\t// Reset vertical focus while moving horizontally\n\toptionsContainer.value?.blur();\n\tif (!selectedOptions.value.length) return;\n\tselectedBox.value?.focusPrevious();\n\tconst highlightedOption = selectedBox.value?.getHighlighted();\n\tif (highlightedOption) {\n\t\toptionsContainer.value?.focusByHash(highlightedOption.valueHash);\n\t}\n};\n\nconst onArrowRight = (event: KeyboardEvent) => {\n\tif (!canProcessKeyboardBindings.value) {\n\t\treturn;\n\t}\n\tif (!props.multiple || query.value) {\n\t\treturn;\n\t}\n\tevent.preventDefault();\n\t// Reset vertical focus while moving horizontally\n\toptionsContainer.value?.blur();\n\tif (!selectedOptions.value.length) return;\n\tselectedBox.value?.focusNext();\n\tconst highlightedOption = selectedBox.value?.getHighlighted();\n\tif (highlightedOption) {\n\t\toptionsContainer.value?.focusByHash(highlightedOption.valueHash);\n\t}\n};\n\nconst onEnter = async () => {\n\tif (!canProcessKeyboardBindings.value) {\n\t\treturn;\n\t}\n\tif (!shown.value) {\n\t\tawait open();\n\t\tawait wait(props.transitionDuration);\n\t\tif (selectedOptions.value.length) {\n\t\t\toptionsContainer.value?.focusFirstSelected();\n\t\t}\n\t} else if (optionsContainer.value?.getHighlighted()) {\n\t\toptionsContainer.value.confirmOption();\n\t} else if (props.addOptions) {\n\t\tif (props.itemText || props.itemValue) {\n\t\t\tconst { error } = useLogger();\n\t\t\terror(\n\t\t\t\t`Adding an option for mapped items is not supported. You can't create an option while passing \"item-text\" or \"item-value\".`\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\t\tconst text = query.value.trim();\n\t\t// Do not add manual items that are already present\n\t\tif (valueIsSelected(text)) return;\n\t\taddCurrentQueryToManualItems();\n\t\tonOptionSelected(last(manualItems.value)!);\n\t}\n};\n\nconst onEscape = async () => {\n\tif (shown.value) {\n\t\tawait close();\n\t}\n};\n\n/**\n * Delete behavior is different when query is empty\n * If query is empty\n * If no chip is selected - select rightmost chip\n * If a chip is selected - deselect that option\n * If any option remains move focus to that or reset\n */\nconst onBackspace = async () => {\n\tif (\n\t\t!canProcessKeyboardBindings.value ||\n\t\tquery.value ||\n\t\t!selectedOptions.value.length\n\t) {\n\t\treturn;\n\t}\n\tif (selectedBox.value?.getHighlighted()) {\n\t\tselectedBox.value.confirmOption();\n\t}\n\tawait nextTick();\n\tselectedBox.value?.focusPrevious();\n};\n\n/**\n * It should prefill if asked, or\n * when single if modelValue is not null\n * when multiple if modelValue is not empty\n */\nconst shouldPrefill =\n\tprops.prefill === true ||\n\t(!props.multiple && isNotNil(props.modelValue)) ||\n\t(props.multiple && !!props.modelValue.length);\n\nconst {\n\tquery,\n\talignQueryToState,\n\taddCurrentQueryToManualItems,\n\tinnerLoading,\n\toptions,\n\tselectedOptions,\n\tselectOption,\n\tunselectOption,\n\tprefillItems,\n\tisPrefilling,\n\thasPrefilled,\n\tupdateModelValue,\n\tvalueIsSelected,\n\tmanualItems,\n\tsearchByQuery,\n} = useOptions({\n\temit,\n\titemText: props.itemText,\n\titemValue: props.itemValue,\n\tmodelValue: toRef(props, 'modelValue'),\n\tmultiple: props.multiple,\n\tresetQueryOnOptionSelected: props.resetQueryOnOptionSelected,\n\tstash: props.stash,\n\titems: toRef(props, 'items'),\n\tenforceCoherence: props.enforceCoherence,\n\tprefill: shouldPrefill,\n\tmodelValueDebounceTime: props.modelValueDebounceTime,\n\tdependencies: toRef(props, 'dependencies'),\n\tdepsDebounceTime: props.depsDebounceTime,\n\tqueryDebounceTime: props.queryDebounceTime,\n\tdisabled: toRef(props, 'disabled'),\n});\n\nconst computedPlaceholder = computed(() => {\n\tif (selectedOptions.value.length) return '';\n\telse return props.placeholder;\n});\n\nconst computedLoading = computed(() => !!(innerLoading.value || props.loading));\n\n/**\n * Filter options to be displayed based on the current query.\n * If no query is used or when query is set from the inside (after a selection) display all possible options\n */\nconst filteredOptions = computed<BaseOption[]>(() => {\n\tlet base = [];\n\t/** Only filter when a value is being searched not when the query is fully set on a selected option text */\n\tconst queryMatchesASelectedOption = selectedOptions.value.some(\n\t\t(option: BaseOption) => option.text === query.value\n\t);\n\tconst shouldFilter =\n\t\t(props.multiple && query.value) ||\n\t\t(query.value && !queryMatchesASelectedOption && !props.multiple);\n\n\tif (shouldFilter && props.filterBy) {\n\t\tbase = options.value.filter((item: BaseOption) => {\n\t\t\tlet matchedAnything = false;\n\t\t\tif (typeof props.filterBy === 'function')\n\t\t\t\tmatchedAnything = props.filterBy(item.value, item.item);\n\t\t\telse if (Array.isArray(props.filterBy) && props.filterBy.length) {\n\t\t\t\tmatchedAnything =\n\t\t\t\t\tmatchedAnything ||\n\t\t\t\t\tmatchAnyKey(item.item, props.filterBy, query.value.trim());\n\t\t\t}\n\t\t\treturn matchedAnything || matchAnyKey(item, ['text'], query.value.trim());\n\t\t});\n\t\t/** Otherwise default to the whole set of options */\n\t} else base = options.value;\n\n\t/** This is done here so that only visible options are highlighted */\n\treturn base;\n});\n\nconst onOptionSelected = (option: BaseOption) => {\n\tselectOption(option);\n\tfocusInput();\n\tif (!props.multiple) {\n\t\tclose();\n\t}\n};\n\nconst onOptionUnselected = (option: BaseOption) => {\n\tunselectOption(option);\n\tfocusInput();\n};\n\n/**\n * We need the transitions because elements must be hidden and shown\n * to accessibility tools when they are fully closed or fully open,\n * while still being animated for sighted users.\n */\n\n// Option panel is open\nconst shown = ref(false);\n// Option panel il closed\nconst hidden = ref(true);\n\nconst renderListBox = ref(false);\n\nconst open = async () => {\n\trenderListBox.value = true;\n\tawait waitFor(() => !!optionsContainer.value);\n\thidden.value = false;\n\tshown.value = true;\n};\n\nconst close = async () => {\n\tshown.value = false;\n\thidden.value = true;\n\tselectedBox.value?.blur();\n};\n\nconst toggle = () => {\n\tif (shown.value) return close();\n\treturn open();\n};\n\n/**\n * Applies a class when the user is inside this whole component.\n * We cannot use focus within as it doesn't work for elements that are teleported.\n * Also we cannot use the <input/> if we physically move focus to the options so\n * we track it manually.\n */\nconst active = ref(false);\n\nconst setActive = () => {\n\tactive.value = true;\n};\nconst setInactive = () => {\n\tactive.value = false;\n\temit('inactive');\n};\n\n/**\n * When clicking on the outside container seamlessly move focus to the input and open the panel\n */\nconst onOuterContainerClick = (event: MouseEvent) => {\n\tevent.preventDefault();\n\temit('click', event);\n\tif (props.disabled || props.readonly) return;\n\tfocusInput();\n\ttoggle();\n};\n\n/**\n * When using this component for submission we add a bunch of hidden\n * inputs so the submitted inputs are on par with v-model\n */\n/**\n * This is used to keep the value compatible to common html expected values.\n * Convert to string everything that's not but do not double encode strings\n */\nconst makeInputValue = when(\n\t(item: unknown) => typeof item !== 'string',\n\tJSON.stringify\n);\n\nconst hiddenInputs = computed(() => {\n\treturn [].concat(props.modelValue).map((current) => {\n\t\tconst value = makeInputValue(current);\n\t\treturn {\n\t\t\tdisabled: props.disabled,\n\t\t\tname: props.name,\n\t\t\ttype: 'hidden',\n\t\t\tvalue: value,\n\t\t};\n\t});\n});\n</script>\n<style lang=\"postcss\">\n@import '@/assets/css/BaseSelect';\n</style>\n"],"names":["props","__props","emit","__emit","ListBox","defineAsyncComponent","outerContainer","ref","innerContainer","optionsContainer","commaBox","chipsBox","selectedBox","computed","isMobile","useMobile","inputmode","id","useId","useIntersectionObserver","intersectionRatio","close","floatingStyles","useFloating","autoUpdate","flip","offset","shift","optionsContainerStyles","base","_a","input","focusInput","onInputFocus","event","setActive","onOutsideInteraction","onInputFirstFocus","isPrefilling","hasPrefilled","prefillItems","onInputBlur","onInputChange","onInputInput","query","updateModelValue","searchByQuery","setInactive","wait","alignQueryToState","canProcessKeyboardBindings","computedLoading","onArrowUp","shown","_b","open","_c","onArrowDown","onArrowLeft","selectedOptions","highlightedOption","_d","onArrowRight","onEnter","error","useLogger","text","valueIsSelected","addCurrentQueryToManualItems","onOptionSelected","last","manualItems","onEscape","onBackspace","nextTick","shouldPrefill","isNotNil","innerLoading","options","selectOption","unselectOption","useOptions","toRef","computedPlaceholder","filteredOptions","queryMatchesASelectedOption","option","item","matchedAnything","matchAnyKey","onOptionUnselected","hidden","renderListBox","waitFor","toggle","active","onOuterContainerClick","makeInputValue","when","hiddenInputs","current","value"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8YA,UAAMA,IAAQC,GAcRC,IAAOC;AAIb,QAAIH,EAAM,YAAY,CAAC,MAAM,QAAQA,EAAM,UAAU;AAC9C,YAAA,IAAI,MAAM,2DAA2D;AAM5E,UAAMI,IAAUC,GAAqB,MAAM,OAAO,eAAgB,CAAC,GAC7DC,IAAiBC,EAEb,IAAI,GACRC,IAAiBD,EAEb,IAAI,GACRE,IAAmBF,EAAyC,IAAI,GAChEG,IAAWH,EAA0C,IAAI,GACzDI,IAAWJ,EAA0C,IAAI,GACzDK,IAAcC;AAAA,MAAS,MAC5Bb,EAAM,QAAQU,EAAS,QAAQC,EAAS;AAAA,IAAA,GAMnC,EAAE,UAAAG,OAAaC,MACfC,KAAYH;AAAA,MAAS,MAC1Bb,EAAM,iBAAiB,gBAAgBc,GAAS,QAAQ,SAAS;AAAA,IAAA,GAI5DG,IAAKjB,EAAM,MAAMkB,KAAQ,GAAG;AAElC,IAAAC;AAAA,MACCX;AAAA,MACA,CAAC,CAAC,EAAE,mBAAAY,EAAA,CAAmB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A4D,EAAO,QAAQ;AAAA,IAAA,GAEVhD,KAAc,MAAM;AACzB,MAAAgD,EAAO,QAAQ,IACf7F,EAAK,UAAU;AAAA,IAAA,GAMV8F,KAAwB,CAAC9D,MAAsB;AAGhD,MAFJA,EAAM,eAAe,GACrBhC,EAAK,SAASgC,CAAK,GACf,EAAAlC,EAAM,YAAYA,EAAM,cACjBgC,KACJ8D;IAAA,GAWFG,KAAiBC;AAAA,MACtB,CAACX,MAAkB,OAAOA,KAAS;AAAA,MACnC,KAAK;AAAA,IAAA,GAGAY,KAAetF,EAAS,MACtB,CAAA,EAAG,OAAOb,EAAM,UAAU,EAAE,IAAI,CAACoG,MAAY;AAC7C,YAAAC,IAAQJ,GAAeG,CAAO;AAC7B,aAAA;AAAA,QACN,UAAUpG,EAAM;AAAA,QAChB,MAAMA,EAAM;AAAA,QACZ,MAAM;AAAA,QACN,OAAAqG;AAAA,MAAA;AAAA,IACD,CACA,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index38.js","sources":["../src/components/BaseSlider/BaseSlider.vue"],"sourcesContent":["<template>\n\t<span v-bind=\"containerAttributes\" ref=\"container\">\n\t\t<slot name=\"prepend\"></slot>\n\t\t<span class=\"bb-base-slider__slider-container\">\n\t\t\t<span v-if=\"ticks.length\" class=\"bb-base-slider__ticks-container\">\n\t\t\t\t<span\n\t\t\t\t\tv-for=\"tick in ticks\"\n\t\t\t\t\t:key=\"tick.value\"\n\t\t\t\t\tclass=\"bb-base-slider__tick\"\n\t\t\t\t\t><slot\n\t\t\t\t\t\t:active=\"tick.active\"\n\t\t\t\t\t\tname=\"tick\"\n\t\t\t\t\t\t:percent=\"tick.percent\"\n\t\t\t\t\t\t:value=\"tick.value\"\n\t\t\t\t/></span>\n\t\t\t</span>\n\t\t\t<input\n\t\t\t\t:id=\"id\"\n\t\t\t\tclass=\"sr-only\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t:name=\"name\"\n\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t:required=\"required\"\n\t\t\t\t:tabindex=\"-1\"\n\t\t\t\t:type=\"'number'\"\n\t\t\t\t:value=\"JSON.stringify(modelValue)\"\n\t\t\t/>\n\t\t\t<span ref=\"track\" class=\"bb-base-slider__track-container\">\n\t\t\t\t<span class=\"bb-base-slider__track-fill\"></span>\n\t\t\t\t<span v-bind=\"sliderBackgroundAttributes\"></span>\n\t\t\t</span>\n\t\t\t<span\n\t\t\t\tv-if=\"props.range\"\n\t\t\t\tv-bind=\"listeners\"\n\t\t\t\tkey=\"thumblower\"\n\t\t\t\tref=\"thumblower\"\n\t\t\t\t:aria-describedby=\"ariaDescribedby\"\n\t\t\t\t:aria-orientation=\"'horizontal'\"\n\t\t\t\t:aria-readonly=\"!readonly\"\n\t\t\t\t:aria-valuemax=\"max\"\n\t\t\t\t:aria-valuemin=\"min\"\n\t\t\t\t:aria-valuenow=\"valueNowLower\"\n\t\t\t\t:class=\"'bb-base-slider__thumb-container'\"\n\t\t\t\tdata-thumb=\"lower\"\n\t\t\t\t:role=\"'slider'\"\n\t\t\t\t:style=\"{ left: `${internalValueLower}%` }\"\n\t\t\t\t:tabindex=\"disabled ? -1 : 0\"\n\t\t\t\t@focus=\"onFocus\"\n\t\t\t\t@keydown=\"onKeydown\"\n\t\t\t>\n\t\t\t\t<span\n\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t'bb-base-slider__thumb': true,\n\t\t\t\t\t\t'bb-base-slider__thumb--lower': true,\n\t\t\t\t\t\t'bb-base-slider__thumb--focused': targetThumb === 'lower',\n\t\t\t\t\t}\"\n\t\t\t\t\t:style=\"{\n\t\t\t\t\t\ttransform: `translateY(-50%) ${thumbTranslate ? `translateX(-${internalValueLower}%)` : `translateX(-50%)`}`,\n\t\t\t\t\t\tleft: `${internalValueLower}%`,\n\t\t\t\t\t}\"\n\t\t\t\t\t><slot\n\t\t\t\t\t\t:focused=\"targetThumb === 'lower'\"\n\t\t\t\t\t\tname=\"thumb:lower\"\n\t\t\t\t\t\t:percent=\"internalValueLower\"\n\t\t\t\t\t\t:value=\"valueNowLower\"\n\t\t\t\t\t\t><slot\n\t\t\t\t\t\t\t:focused=\"targetThumb === 'lower'\"\n\t\t\t\t\t\t\tname=\"thumb\"\n\t\t\t\t\t\t\t:percent=\"internalValueLower\"\n\t\t\t\t\t\t\t:value=\"valueNowLower\" /></slot\n\t\t\t\t></span>\n\t\t\t</span>\n\t\t\t<span\n\t\t\t\tv-bind=\"listeners\"\n\t\t\t\tkey=\"thumbhigher\"\n\t\t\t\tref=\"thumbhigher\"\n\t\t\t\t:aria-describedby=\"ariaDescribedby\"\n\t\t\t\t:aria-orientation=\"'horizontal'\"\n\t\t\t\t:aria-readonly=\"!readonly\"\n\t\t\t\t:aria-valuemax=\"max\"\n\t\t\t\t:aria-valuemin=\"min\"\n\t\t\t\t:aria-valuenow=\"valueNowHigher\"\n\t\t\t\t:class=\"'bb-base-slider__thumb-container'\"\n\t\t\t\tdata-thumb=\"higher\"\n\t\t\t\t:role=\"'slider'\"\n\t\t\t\t:style=\"{ left: `${internalValueHigher}%` }\"\n\t\t\t\t:tabindex=\"disabled ? -1 : 0\"\n\t\t\t\t@focus=\"onFocus\"\n\t\t\t\t@keydown=\"onKeydown\"\n\t\t\t>\n\t\t\t\t<span\n\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t'bb-base-slider__thumb': true,\n\t\t\t\t\t\t'bb-base-slider__thumb--higher': true,\n\t\t\t\t\t\t'bb-base-slider__thumb--focused': targetThumb === 'higher',\n\t\t\t\t\t}\"\n\t\t\t\t\t:style=\"{\n\t\t\t\t\t\ttransform: `translateY(-50%) ${thumbTranslate ? `translateX(-${internalValueHigher}%)` : `translateX(-50%)`}`,\n\t\t\t\t\t\tleft: `${internalValueHigher}%`,\n\t\t\t\t\t}\"\n\t\t\t\t\t><slot\n\t\t\t\t\t\t:focused=\"targetThumb === 'higher'\"\n\t\t\t\t\t\tname=\"thumb:higher\"\n\t\t\t\t\t\t:percent=\"internalValueHigher\"\n\t\t\t\t\t\t:value=\"valueNowHigher\"\n\t\t\t\t\t\t><slot\n\t\t\t\t\t\t\t:focused=\"targetThumb === 'higher'\"\n\t\t\t\t\t\t\tname=\"thumb\"\n\t\t\t\t\t\t\t:percent=\"internalValueHigher\"\n\t\t\t\t\t\t\t:value=\"valueNowHigher\" /></slot\n\t\t\t\t></span>\n\t\t\t</span>\n\t\t</span>\n\t\t<slot name=\"append\"></slot>\n\t</span>\n</template>\n\n<script setup lang=\"ts\">\nimport { clamp } from '@/utilities/functions/clamp';\nimport { computed, onMounted, ref, watch } from 'vue';\nimport { head } from '@/utilities/functions/head';\nimport { isCssColor } from '@/utilities/functions/isCssColor';\nimport { isNil } from '@/utilities/functions/isNil';\nimport { isNotNil } from '@/utilities/functions/isNotNil';\nimport { transposeValue } from '@/utilities/functions/percentage';\nimport type { InputHTMLAttributes, HTMLAttributes } from 'vue';\nimport { hash } from '@/utilities/functions/hash';\n\nexport type BaseSliderProps = {\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tariaDescribedby?: InputHTMLAttributes['aria-describedby'];\n\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Define a color for the component.\n\t *\n\t * Either a custom color or a coded color in common HEX, RGB, etc... format.\n\t */\n\tcolor?: string;\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Maximum value cap.\n\t */\n\tmax?: number;\n\n\t/**\n\t * Minimum value cap.\n\t */\n\tmin?: number;\n\n\t/**\n\t * Used by v-model.\n\t */\n\tmodelValue: number[] | number | string | null;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname?: InputHTMLAttributes['name'];\n\n\t/**\n\t * Set the input as range.\n\t * modelValue must be an array\n\t */\n\trange?: boolean;\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: InputHTMLAttributes['readonly'];\n\n\t/**\n\t * Sets the input as required.\n\t */\n\trequired?: boolean;\n\n\t/**\n\t * The step attribute is a number that specifies the granularity that the value must adhere to.\n\t */\n\tstep?: number;\n\n\t/**\n\t * Displays ticks on step\n\t */\n\tticks?: boolean;\n\t/**\n\t * Proportionally translates the thumb so it remains on track. Set it to false when displaying ticks so they align with less effort.\n\t */\n\tthumbTranslate?: boolean;\n};\n\nconst props = withDefaults(defineProps<BaseSliderProps>(), {\n\tmax: 100,\n\tmin: 0,\n\tmodelValue: 0,\n\tstep: 1,\n\tthumbTranslate: true,\n});\n\nexport type BaseSliderEvents = {\n\t(e: 'click', event: MouseEvent): void;\n\t(e: 'focus', event: FocusEvent): void;\n\t(e: 'active'): void;\n\t(e: 'inactive'): void;\n\t(e: 'keydown', event: KeyboardEvent): void;\n\t(e: 'pointerdown', event: PointerEvent): void;\n\t(e: 'pointermove', event: PointerEvent): void;\n\t(e: 'pointerup', event: PointerEvent): void;\n\t(e: 'update:modelValue', event: number | number[]): void;\n};\n\nconst emit = defineEmits<BaseSliderEvents>();\n\nexport type BaseSliderSlots = {\n\t'thumb:higher': (props: {\n\t\tvalue: number | undefined;\n\t\tpercent: number;\n\t\tfocused: boolean;\n\t}) => any;\n\t'thumb:lower': (props: {\n\t\tvalue: number | undefined;\n\t\tpercent: number;\n\t\tfocused: boolean;\n\t}) => any;\n\tappend: (props: object) => any;\n\tprepend: (props: object) => any;\n\tthumb: (props: {\n\t\tvalue: number | undefined;\n\t\tpercent: number;\n\t\tfocused: boolean;\n\t}) => any;\n\ttick: (props: { value: number; percent: number; active: boolean }) => any;\n};\n\ndefineSlots<BaseSliderSlots>();\n\nconst container = ref<HTMLElement>();\nconst track = ref<HTMLElement>();\nconst thumblower = ref<HTMLElement>();\nconst thumbhigher = ref<HTMLElement>();\nconst internalValueLower = ref(0);\nconst internalValueHigher = ref(0);\nconst valueNowLower = computed(() => {\n\tif (Array.isArray(props.modelValue))\n\t\treturn head(props.modelValue) ?? undefined;\n\treturn isNil(props.modelValue) ? undefined : Number(props.modelValue);\n});\nconst valueNowHigher = computed(() => {\n\tif (Array.isArray(props.modelValue))\n\t\treturn head(props.modelValue) ?? undefined;\n\treturn isNil(props.modelValue) ? undefined : Number(props.modelValue);\n});\nconst sortedInternalValues = computed(() => {\n\treturn [internalValueLower.value, internalValueHigher.value].sort(\n\t\t(a, b) => a - b\n\t);\n});\n\nconst proportionalStep = transposeValue({\n\tvalue: props.min + props.step,\n\toriginalBounds: { min: props.min, max: props.max },\n\ttargetBounds: { min: 0, max: 100 },\n\tstep: 1,\n});\n\nconst active = ref(false);\n\nif (props.range && !Array.isArray(props.modelValue)) {\n\tthrow new TypeError(\n\t\t'BaseSlider mode is set as range but modelValue is not an array'\n\t);\n}\n\nonMounted(() => {\n\tif (props.autofocus) {\n\t\tthumbhigher.value?.focus();\n\t}\n});\n\n/**\n * When modelValue changes realign the internal positioning\n */\nwatch(\n\t() => props.modelValue,\n\t(value) => {\n\t\tlet values: number[];\n\t\tif (props.range) {\n\t\t\tconst [min = props.min, max = props.min] = value as number[];\n\t\t\tvalues = [min, max];\n\t\t} else {\n\t\t\tvalues = [props.min, isNotNil(value) ? Number(value) : props.min];\n\t\t}\n\t\tconst [lBound, uBound] = values.map((value) => {\n\t\t\t// Useful for ranges from negative to positive\n\t\t\tlet fallback = isNil(value) ? props.min : Number(value);\n\t\t\tconst transposedValue = transposeValue({\n\t\t\t\tvalue: fallback,\n\t\t\t\ttargetBounds: { min: 0, max: 100 },\n\t\t\t\toriginalBounds: { min: props.min, max: props.max },\n\t\t\t\tstep: 1,\n\t\t\t});\n\t\t\treturn transposedValue;\n\t\t});\n\t\tinternalValueLower.value = lBound;\n\t\tinternalValueHigher.value = uBound;\n\t},\n\t{ immediate: true }\n);\n\nlet thumbPressed = ref(false);\nlet targetThumb = ref<'higher' | 'lower' | null>(null);\n\nconst getTargetThumb = (event: FocusEvent) => {\n\tif (thumbhigher.value && thumbhigher.value.contains(event.target as Node))\n\t\treturn 'higher';\n\tif (thumblower.value && thumblower.value.contains(event.target as Node))\n\t\treturn 'lower';\n\tthrow new Error('Could not identify target thumb');\n};\n\nconst onPointerdown = (event: PointerEvent) => {\n\tif (props.disabled || props.readonly) return;\n\tif (!targetThumb.value) {\n\t\ttargetThumb.value = getTargetThumb(event);\n\t}\n\tthumbPressed.value = true;\n\tdocument.addEventListener('pointermove', onPointermove);\n\tdocument.addEventListener('pointerup', onPointerup);\n\temit('pointerdown', event);\n};\n\nlet listeners = computed(() => (thumbPressed.value ? {} : { onPointerdown }));\n\nconst onPointermove = (event: PointerEvent | MouseEvent) => {\n\tif (props.disabled || props.readonly) return;\n\tif (track.value) {\n\t\tconst trackPosition = track.value.getBoundingClientRect();\n\t\tconst clickOffset = event.clientX;\n\t\tconst trackStart = trackPosition.left;\n\t\tconst trackLength = trackPosition.width;\n\t\tif (event instanceof PointerEvent) {\n\t\t\temit('pointermove', event);\n\t\t} else {\n\t\t\temit('click', event);\n\t\t}\n\t\tconst position = transposeValue({\n\t\t\tvalue: clamp(clickOffset, trackStart, trackStart + trackLength),\n\t\t\toriginalBounds: { min: trackStart, max: trackStart + trackLength },\n\t\t\ttargetBounds: { min: 0, max: 100 },\n\t\t\tstep: proportionalStep,\n\t\t});\n\t\tif (targetThumb.value === 'higher') {\n\t\t\tinternalValueHigher.value = position;\n\t\t} else if (targetThumb.value === 'lower') {\n\t\t\tinternalValueLower.value = position;\n\t\t}\n\t}\n};\n\nconst getValueToEmit = () => {\n\tconst [min, max] = [internalValueLower.value, internalValueHigher.value].sort(\n\t\t(a, b) => a - b\n\t);\n\tconst refined = [min, max].map((value) =>\n\t\ttransposeValue({\n\t\t\tvalue,\n\t\t\toriginalBounds: { min: 0, max: 100 },\n\t\t\ttargetBounds: { min: props.min, max: props.max },\n\t\t\tstep: props.step,\n\t\t})\n\t);\n\tif (props.range) return refined;\n\treturn refined[1];\n};\n\nconst onPointerup = (event: PointerEvent) => {\n\tthumbPressed.value = false;\n\ttargetThumb.value = null;\n\tdocument.removeEventListener('pointermove', onPointermove);\n\tdocument.removeEventListener('pointerup', onPointerup);\n\temit('pointerup', event);\n\temit('update:modelValue', getValueToEmit());\n};\n\nconst onKeydown = (event: KeyboardEvent) => {\n\temit('keydown', event);\n\tif (\n\t\tprops.disabled ||\n\t\tprops.readonly ||\n\t\t(event.key !== 'ArrowLeft' && event.key !== 'ArrowRight')\n\t) {\n\t\treturn;\n\t}\n\n\tif (event.key === 'ArrowLeft') {\n\t\tif (\n\t\t\ttargetThumb.value === 'higher' ||\n\t\t\tdocument.activeElement === thumbhigher.value\n\t\t) {\n\t\t\tinternalValueHigher.value = Math.max(\n\t\t\t\tinternalValueHigher.value - proportionalStep,\n\t\t\t\tinternalValueLower.value\n\t\t\t);\n\t\t} else if (targetThumb.value === 'lower') {\n\t\t\tinternalValueLower.value = Math.max(\n\t\t\t\tinternalValueLower.value - proportionalStep,\n\t\t\t\t0\n\t\t\t);\n\t\t}\n\t} else if (event.key === 'ArrowRight') {\n\t\tif (\n\t\t\ttargetThumb.value === 'higher' ||\n\t\t\tdocument.activeElement === thumbhigher.value\n\t\t) {\n\t\t\tinternalValueHigher.value = Math.min(\n\t\t\t\tinternalValueHigher.value + proportionalStep,\n\t\t\t\t100\n\t\t\t);\n\t\t} else if (targetThumb.value === 'lower') {\n\t\t\tinternalValueLower.value = Math.min(\n\t\t\t\tinternalValueLower.value + proportionalStep,\n\t\t\t\tinternalValueHigher.value\n\t\t\t);\n\t\t}\n\t}\n\temit('update:modelValue', getValueToEmit());\n};\n\nconst onFocus = (event: FocusEvent) => {\n\temit('focus', event);\n\tconst found = getTargetThumb(event);\n\tif (found) targetThumb.value = found;\n\tif (!active.value) {\n\t\tactive.value = true;\n\t\temit('active');\n\t\tdocument.addEventListener('focusin', onDocumentInteraction);\n\t\tdocument.addEventListener('click', onDocumentInteraction);\n\t}\n};\n\nconst onDocumentInteraction = (event: FocusEvent) => {\n\tif (event.target instanceof HTMLElement) {\n\t\tif (!container.value?.contains(event.target)) {\n\t\t\tactive.value = false;\n\t\t\ttargetThumb.value = null;\n\t\t\temit('inactive');\n\t\t\tdocument.removeEventListener('focusin', onDocumentInteraction);\n\t\t\tdocument.removeEventListener('click', onDocumentInteraction);\n\t\t}\n\t}\n};\n\nconst containerAttributes: Record<string, any> = {\n\tclass: {\n\t\t'bb-base-slider': true,\n\t\t'bb-base-slider--disabled': props.disabled,\n\t\t'bb-base-slider--errors': props.hasErrors,\n\t\t'bb-base-slider--readonly': props.readonly,\n\t\t[`bb-base-slider--${props.color}`]: props.color && !isCssColor(props.color),\n\t},\n\tonClick: (event: MouseEvent) => {\n\t\tif (props.range) return;\n\t\tthumbhigher.value?.focus();\n\t\tonPointermove(event);\n\t\tconst valueToEmit = getValueToEmit();\n\t\t// Prevent emitting twice when clicking on the thumb directly\n\t\tif (hash(valueToEmit) === hash(props.modelValue)) return;\n\t\temit('update:modelValue', getValueToEmit());\n\t},\n\tstyle: {},\n};\n\nif (props.color && isCssColor(props.color)) {\n\tcontainerAttributes.style['--color'] = props.color;\n}\n\nconst sliderBackgroundAttributes = computed(() => {\n\tconst classes = 'bb-base-slider__track-background';\n\tconst style: Record<string, any> = {\n\t\twidth: `${sortedInternalValues.value[1] - sortedInternalValues.value[0]}%`,\n\t\tleft: `${sortedInternalValues.value[0]}%`,\n\t};\n\treturn {\n\t\tclass: classes,\n\t\tstyle,\n\t};\n});\n\ntype Tick = {\n\tvalue: number;\n\tpercent: number;\n\tactive: boolean;\n};\n\nconst ticks = computed<Tick[]>(() => {\n\tif (!props.ticks) return [] as Tick[];\n\tlet ticks: Tick[] = [];\n\tlet current = props.min;\n\twhile (current <= props.max) {\n\t\tlet value = current;\n\t\tlet percent = transposeValue({\n\t\t\tvalue,\n\t\t\toriginalBounds: { min: props.min, max: props.max },\n\t\t\ttargetBounds: { min: 0, max: 100 },\n\t\t\tstep: proportionalStep,\n\t\t});\n\t\tlet transposedValue = transposeValue({\n\t\t\tvalue: current,\n\t\t\toriginalBounds: { min: props.min, max: props.max },\n\t\t\ttargetBounds: { min: 0, max: 100 },\n\t\t\tstep: props.step,\n\t\t});\n\t\tconst active =\n\t\t\ttransposedValue >= internalValueLower.value &&\n\t\t\ttransposedValue <= internalValueHigher.value;\n\t\tticks.push({\n\t\t\tvalue,\n\t\t\tpercent,\n\t\t\tactive,\n\t\t});\n\t\tcurrent += props.step;\n\t}\n\treturn ticks;\n});\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BaseSlider';\n</style>\n"],"names":["props","__props","emit","__emit","container","ref","track","thumblower","thumbhigher","internalValueLower","internalValueHigher","valueNowLower","computed","head","isNil","valueNowHigher","sortedInternalValues","a","b","proportionalStep","transposeValue","active","onMounted","_a","watch","value","values","min","max","isNotNil","lBound","uBound","fallback","thumbPressed","targetThumb","getTargetThumb","event","onPointerdown","onPointermove","onPointerup","listeners","trackPosition","clickOffset","trackStart","trackLength","position","clamp","getValueToEmit","refined","onKeydown","onFocus","found","onDocumentInteraction","containerAttributes","isCssColor","valueToEmit","hash","sliderBackgroundAttributes","classes","style","ticks","current","percent","transposedValue"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoNA,UAAMA,IAAQC,GAoBRC,IAAOC,GAyBPC,IAAYC,KACZC,IAAQD,KACRE,IAAaF,KACbG,IAAcH,KACdI,IAAqBJ,EAAI,CAAC,GAC1BK,IAAsBL,EAAI,CAAC,GAC3BM,IAAgBC,EAAS,MAC1B,MAAM,QAAQZ,EAAM,UAAU,IAC1Ba,EAAKb,EAAM,UAA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AAM;AAAA,QAAA,CACZ;AACD,cAAMqB,IACL0C,KAAmBtD,EAAmB,SACtCsD,KAAmBrD,EAAoB;AACxCkD,QAAAA,EAAM,KAAK;AAAA,UACV,OAAAnC;AAAA,UACA,SAAAqC;AAAA,UACA,QAAAzC;AAAAA,QAAA,CACA,GACDwC,KAAW7D,EAAM;AAAA,MAClB;AACO4D,aAAAA;AAAAA,IAAA,CACP;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index40.js","sources":["../src/components/BaseSwitch/BaseSwitch.vue"],"sourcesContent":["<template>\n\t<span v-bind=\"containerAttributes\">\n\t\t<input v-if=\"!checked && submitWhenFalse\" v-bind=\"hiddenInputAttributes\" />\n\t\t<input v-bind=\"inputAttributes\" ref=\"checkboxInput\" />\n\t\t<span class=\"bb-base-switch-container\">\n\t\t\t<slot name=\"icon\" v-bind=\"slotAttributes\">\n\t\t\t\t<span v-bind=\"iconAttributes\">\n\t\t\t\t\t<span class=\"bb-base-switch-container__icon-thumb\"></span>\n\t\t\t\t</span>\n\t\t\t</slot>\n\t\t</span>\n\t</span>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, watch } from 'vue';\nimport { isCssColor } from '@/utilities/functions/isCssColor';\nimport { when } from '@/utilities/functions/when';\nimport type {\n\tBaseCheckboxEvents,\n\tBaseCheckboxProps,\n\tSlotAttributes,\n} from '../BaseCheckbox/BaseCheckbox.vue';\n\nexport type BaseSwitchProps = BaseCheckboxProps;\n\nexport type BaseSwitchEvents = BaseCheckboxEvents;\n\nconst props = withDefaults(defineProps<BaseSwitchProps>(), {\n\ttrueValue: true,\n\tfalseValue: false,\n});\n\nconst emit = defineEmits<BaseSwitchEvents>();\n\nexport type BaseSwitchSlots = {\n\ticon?: (props: SlotAttributes) => any;\n};\n\ndefineSlots<BaseSwitchSlots>();\n\nconst checkboxInput = ref<HTMLInputElement | null>(null);\n\nconst checked = computed(() => {\n\tif (props.checked) return true;\n\treturn JSON.stringify(props.trueValue) === JSON.stringify(props.modelValue);\n});\nconst hasFocus = ref(false);\n\nconst containerAttributes = computed(() => {\n\tconst attributes: Record<string, any> = {\n\t\tclass: {\n\t\t\t'bb-base-switch': true,\n\t\t\t'bb-base-switch--disabled': props.disabled,\n\t\t\t'bb-base-switch--errors': props.hasErrors,\n\t\t\t'bb-base-switch--indeterminate': props.indeterminate,\n\t\t\t'bb-base-switch--readonly': props.readonly,\n\t\t\t[`bb-base-switch--${props.color}`]:\n\t\t\t\tprops.color && !isCssColor(props.color),\n\t\t},\n\t};\n\tif (props.color && isCssColor(props.color)) {\n\t\tattributes['style'] = `--color: ${props.color}`;\n\t}\n\treturn attributes;\n});\n\n/**\n * This is used to keep the value compatible to common html expected values.\n * Convert to string everything that's not but do not double encode strings\n */\nconst makeInputValue = when(\n\t(item: unknown) => typeof item !== 'string',\n\tJSON.stringify\n);\n\nconst hiddenInputAttributes = computed(() => {\n\tconst value = makeInputValue(props.falseValue);\n\treturn {\n\t\tdisabled: props.disabled,\n\t\tname: props.name,\n\t\ttype: 'hidden',\n\t\tvalue: value,\n\t};\n});\n\nconst inputAttributes = computed(() => {\n\tconst value = makeInputValue(props.trueValue);\n\n\tconst onBlur = (event: FocusEvent): void => {\n\t\thasFocus.value = false;\n\t\temit('blur', event);\n\t};\n\n\tconst onChange = (event: Event): void => {\n\t\tif (event.target instanceof HTMLInputElement) {\n\t\t\tlet value = event.target.checked ? props.trueValue : props.falseValue;\n\n\t\t\temit('change', event);\n\t\t\temit('update:modelValue', value);\n\t\t}\n\t};\n\n\tconst onFocus = (event: FocusEvent): void => {\n\t\thasFocus.value = true;\n\t\temit('focus', event);\n\t};\n\n\tconst eventListeners = {\n\t\tonBlur,\n\t\tonChange,\n\t\tonClick: (event: MouseEvent) => emit('click', event),\n\t\tonFocus,\n\t\tonInput: (event: Event) => emit('input', event),\n\t\tonKeydown: (event: KeyboardEvent) => emit('keydown', event),\n\t\tonMousedown: (event: MouseEvent) => emit('mousedown', event),\n\t\tonMouseup: (event: MouseEvent) => emit('mouseup', event),\n\t};\n\n\treturn {\n\t\t'aria-describedby': props.ariaDescribedby,\n\t\tautofocus: props.autofocus,\n\t\tchecked: checked.value,\n\t\t// There is no such thing as readonly checkbox so we disable and style it with css\n\t\tdisabled: props.disabled || props.readonly,\n\t\tid: props.id,\n\t\tindeterminate: props.indeterminate,\n\t\tname: props.name,\n\t\trequired: props.required,\n\t\ttabindex: props.disabled ? -1 : undefined,\n\t\ttype: 'checkbox',\n\t\tvalue: value,\n\t\tclass: 'sr-only',\n\t\t...eventListeners,\n\t};\n});\n\nconst slotAttributes = computed(() => ({\n\tchecked: checked.value,\n\tdisabled: props.disabled,\n\tfalseValue: props.falseValue,\n\tfocused: hasFocus.value,\n\thasErrors: props.hasErrors,\n\tid: props.id,\n\tname: props.name,\n\tparsedValue: inputAttributes.value.value,\n\treadonly: props.readonly,\n\trequired: props.required,\n\ttrueValue: props.trueValue,\n\tvalue: checked.value ? props.trueValue : props.falseValue,\n}));\n\nconst iconAttributes = computed(() => {\n\tlet style: { [key: string]: string } = {};\n\tif (props.color && isCssColor(props.color)) {\n\t\tstyle.color = props.color;\n\t}\n\treturn {\n\t\tclass: 'bb-base-switch-container__icon',\n\t\tstyle,\n\t};\n});\n\n/**\n * Indeterminate is a very volatile prop that is reset upon clicking,\n * this keeps the state and the prop aligned\n */\nwatch(\n\t() => [props.modelValue, props.checked, props.indeterminate],\n\t() => {\n\t\tif (checkboxInput.value) {\n\t\t\tcheckboxInput.value.indeterminate = !!props.indeterminate;\n\t\t}\n\t}\n);\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BaseSwitch';\n</style>\n"],"names":["props","__props","emit","__emit","checkboxInput","ref","checked","computed","hasFocus","containerAttributes","attributes","isCssColor","makeInputValue","when","item","hiddenInputAttributes","value","inputAttributes","eventListeners","event","slotAttributes","iconAttributes","style","watch"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,UAAMA,IAAQC,GAKRC,IAAOC,GAQPC,IAAgBC,EAA6B,IAAI,GAEjDC,IAAUC,EAAS,MACpBP,EAAM,UAAgB,KACnB,KAAK,UAAUA,EAAM,SAAS,MAAM,KAAK,UAAUA,EAAM,UAAU,CAC1E,GACKQ,IAAWH,EAAI,EAAK,GAEpBI,IAAsBF,EAAS,MAAM;AAC1C,YAAMG,IAAkC;AAAA,QACvC,OAAO;AAAA,UACN,kBAAkB;AAAA,UAClB,4BAA4BV,EAAM;AAAA,UAClC,0BAA0BA,EAAM;AAAA,UAChC,iCAAiCA,EAAM;AAAA,UACvC,4BAA4BA,EAAM;AAAA,UAClC,CAAC,mBAAmBA,EAAM,KAAK,EAAE,GAChCA,EAAM,SAAS,CAACW,EAAWX,EAAM,KAAK;AAAA,QACxC;AAAA,MAAA;AAED,aAAIA,EAAM,SAASW,EAAWX,EAAM,KAAK,MACxCU,EAAW,QAAW,YAAYV,EAAM,KAAK,KAEvCU;AAAA,IAAA,CACP,GAMKE,IAAiBC;AAAA,MACtB,CAACC,MAAkB,OAAOA,KAAS;AAAA,MACnC,KAAK;AAAA,IAAA,GAGAC,IAAwBR,EAAS,MAAM;AACtC,YAAAS,IAAQJ,EAAeZ,EAAM,UAAU;AACtC,aAAA;AAAA,QACN,UAAUA,EAAM;AAAA,QAChB,MAAMA,EAAM;AAAA,QACZ,MAAM;AAAA,QACN,OAAAgB;AAAA,MAAA;AAAA,IACD,CACA,GAEKC,IAAkBV,EAAS,MAAM;AAChC,YAAAS,IAAQJ,EAAeZ,EAAM,SAAS,GAqBtCkB,IAAiB;AAAA,QACtB,QApBc,CAACC,MAA4B;AAC3C,UAAAX,EAAS,QAAQ,IACjBN,EAAK,QAAQiB,CAAK;AAAA,QAAA;AAAA,QAmBlB,UAhBgB,CAACA,MAAuB;AACp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AAA,MAChB,WAAWA,EAAM;AAAA,MACjB,OAAOM,EAAQ,QAAQN,EAAM,YAAYA,EAAM;AAAA,IAC9C,EAAA,GAEIqB,IAAiBd,EAAS,MAAM;AACrC,UAAIe,IAAmC,CAAA;AACvC,aAAItB,EAAM,SAASW,EAAWX,EAAM,KAAK,MACxCsB,EAAM,QAAQtB,EAAM,QAEd;AAAA,QACN,OAAO;AAAA,QACP,OAAAsB;AAAA,MAAA;AAAA,IACD,CACA;AAMD,WAAAC;AAAA,MACC,MAAM,CAACvB,EAAM,YAAYA,EAAM,SAASA,EAAM,aAAa;AAAA,MAC3D,MAAM;AACL,QAAII,EAAc,UACjBA,EAAc,MAAM,gBAAgB,CAAC,CAACJ,EAAM;AAAA,MAE9C;AAAA,IAAA;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index42.js","sources":["../src/components/BaseSwitchGroup/BaseSwitchGroup.vue"],"sourcesContent":["<template>\n\t<OptionsContainer\n\t\tclass=\"bb-base-switch-group\"\n\t\t:direction=\"direction\"\n\t\t:has-errors=\"hasErrors\"\n\t\t:hide-label=\"hideLabel\"\n\t\t:loading=\"!!loading\"\n\t\t:loading-text=\"loadingText\"\n\t\t:no-data-text=\"noDataText\"\n\t\t:options=\"options\"\n\t>\n\t\t<template #prepend><slot name=\"prepend\"></slot></template>\n\t\t<template #loading><slot name=\"loading\"></slot></template>\n\t\t<template #no-data><slot name=\"no-data\"></slot></template>\n\t\t<template #option:prepend=\"data\"\n\t\t\t><slot name=\"option:prepend\" v-bind=\"data\"></slot\n\t\t></template>\n\t\t<template #input=\"{ option, index }\">\n\t\t\t<BaseSwitch\n\t\t\t\t:id=\"option.valueHash\"\n\t\t\t\t:aria-describedby=\"ariaDescribedby\"\n\t\t\t\t:autofocus=\"autofocus && !index\"\n\t\t\t\t:checked=\"option.selected\"\n\t\t\t\t:color=\"color\"\n\t\t\t\t:disabled=\"option.disabled\"\n\t\t\t\t:has-errors=\"hasErrors\"\n\t\t\t\t:name=\"name\"\n\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t:true-value=\"option.value\"\n\t\t\t\tv-bind=\"eventListeners\"\n\t\t\t\t@change=\"(event: Event) => onChange(event, option)\"\n\t\t\t>\n\t\t\t\t<template v-if=\"$slots.icon\" #icon=\"data\">\n\t\t\t\t\t<slot\n\t\t\t\t\t\t:item=\"option.item\"\n\t\t\t\t\t\tname=\"icon\"\n\t\t\t\t\t\t:text=\"option.text\"\n\t\t\t\t\t\tv-bind=\"data\"\n\t\t\t\t\t/>\n\t\t\t\t</template>\n\t\t\t</BaseSwitch>\n\t\t</template>\n\t\t<template #option:append=\"data\"\n\t\t\t><slot name=\"option:prepend\" v-bind=\"data\"></slot\n\t\t></template>\n\t\t<template #append><slot name=\"prepend\"></slot></template>\n\t</OptionsContainer>\n</template>\n\n<script setup lang=\"ts\" generic=\"T = any\">\nimport { ref, toRef } from 'vue';\nimport { useOptions } from '@/composables/useOptions';\nimport BaseSwitch from '../BaseSwitch/BaseSwitch.vue';\nimport type { Option } from '@/types/Option';\nimport type { SlotAttributes } from '../BaseCheckbox/BaseCheckbox.vue';\nimport type {\n\tBaseCheckboxGroupEvents,\n\tBaseCheckboxGroupProps,\n} from '../BaseCheckboxGroup/BaseCheckboxGroup.vue';\nimport OptionsContainer from '../OptionsContainer.vue';\n\nexport type BaseSwitchGroupEvents = BaseCheckboxGroupEvents;\n\nexport type BaseSwitchGroupProps<T> = BaseCheckboxGroupProps<T>;\n\nconst props = withDefaults(defineProps<BaseSwitchGroupProps<T>>(), {\n\tdepsDebounceTime: 0,\n\tdirection: 'horizontal',\n\titems: () => [],\n\tloadingText: 'Caricamento...',\n\tmodelValueDebounceTime: 0,\n\tnoDataText: 'Nessun elemento da visualizzare',\n});\n\nconst emit = defineEmits<BaseSwitchGroupEvents>();\n\ndefineSlots<{\n\tprepend?: (props: object) => any;\n\tloading?: (props: object) => any;\n\t'no-data'?: (props: object) => any;\n\t'option:prepend'?: (props: {\n\t\tchecked: boolean;\n\t\tdisabled: boolean;\n\t\tid?: string;\n\t\titem: T;\n\t\ttext: string;\n\t}) => any;\n\ticon?: (\n\t\tprops: SlotAttributes & {\n\t\t\titem: T;\n\t\t\ttext: string;\n\t\t}\n\t) => any;\n\tlabel?: (props: { item: T; text: string; checked: boolean }) => any;\n\t'option:append'?: (props: {\n\t\tchecked: boolean;\n\t\tdisabled: boolean;\n\t\tid?: string;\n\t\titem: T;\n\t\ttext: string;\n\t}) => any;\n\tappend?: (props: object) => any;\n}>();\n\nconst container = ref<HTMLElement>();\nconst active = ref(false);\n\nconst {\n\tinnerLoading: loading,\n\toptions,\n\tselectOption,\n\tunselectOption,\n} = useOptions({\n\tdependencies: toRef(props, 'dependencies'),\n\tdepsDebounceTime: props.depsDebounceTime,\n\tdisabled: toRef(props, 'disabled'),\n\temit,\n\tenforceCoherence: props.enforceCoherence,\n\titems: toRef(props, 'items'),\n\titemText: props.itemText,\n\titemValue: props.itemValue,\n\tmodelValue: toRef(props, 'modelValue'),\n\tmodelValueDebounceTime: props.modelValueDebounceTime,\n\tmultiple: true,\n\tprefill: true,\n\tqueryDebounceTime: 0,\n\tresetQueryOnOptionSelected: false,\n\tstash: false,\n});\n\nconst onChange = (event: Event, option: Option) => {\n\temit('change', event);\n\tif (!option.selected) {\n\t\tselectOption(option);\n\t} else {\n\t\tunselectOption(option);\n\t}\n};\n\nconst onFocus = (event: FocusEvent) => {\n\temit('focus', event);\n\tif (!active.value) {\n\t\tdocument.addEventListener('focusin', onDocumentFocus, { passive: true });\n\t\tdocument.addEventListener('click', onDocumentClick, { passive: true });\n\t\tactive.value = true;\n\t}\n};\n\nconst eventListeners = {\n\tonBlur: (event: FocusEvent) => emit('blur', event),\n\tonClick: (event: MouseEvent) => emit('click', event),\n\tonFocus,\n\tonInput: (event: Event) => emit('input', event),\n\tonKeydown: (event: KeyboardEvent) => emit('keydown', event),\n\tonMousedown: (event: MouseEvent) => emit('mousedown', event),\n\tonMouseup: (event: MouseEvent) => emit('mouseup', event),\n};\n\nconst onDocumentFocus = (event: FocusEvent) => {\n\tif (event.target instanceof HTMLElement) {\n\t\tif (!container.value?.contains(event.target)) {\n\t\t\temit('inactive');\n\t\t\tactive.value = false;\n\t\t\tdocument.removeEventListener('focusin', onDocumentFocus);\n\t\t\tdocument.removeEventListener('click', onDocumentClick);\n\t\t}\n\t}\n};\n\nconst onDocumentClick = (event: MouseEvent) => {\n\tif (event.target instanceof HTMLElement) {\n\t\tif (!container.value?.contains(event.target)) {\n\t\t\temit('inactive');\n\t\t\tactive.value = false;\n\t\t\tdocument.removeEventListener('focusin', onDocumentFocus);\n\t\t\tdocument.removeEventListener('click', onDocumentClick);\n\t\t}\n\t}\n};\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BaseSwitchGroup';\n</style>\n"],"names":["props","__props","emit","__emit","container","ref","active","loading","options","selectOption","unselectOption","useOptions","toRef","onChange","event","option","eventListeners","onDocumentFocus","onDocumentClick","_a"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiEA,UAAMA,IAAQC,GASRC,IAAOC,GA8BPC,IAAYC,KACZC,IAASD,EAAI,EAAK,GAElB;AAAA,MACL,cAAcE;AAAA,MACd,SAAAC;AAAA,MACA,cAAAC;AAAA,MACA,gBAAAC;AAAA,QACGC,EAAW;AAAA,MACd,cAAcC,EAAMZ,GAAO,cAAc;AAAA,MACzC,kBAAkBA,EAAM;AAAA,MACxB,UAAUY,EAAMZ,GAAO,UAAU;AAAA,MACjC,MAAAE;AAAA,MACA,kBAAkBF,EAAM;AAAA,MACxB,OAAOY,EAAMZ,GAAO,OAAO;AAAA,MAC3B,UAAUA,EAAM;AAAA,MAChB,WAAWA,EAAM;AAAA,MACjB,YAAYY,EAAMZ,GAAO,YAAY;AAAA,MACrC,wBAAwBA,EAAM;AAAA,MAC9B,UAAU;AAAA,MACV,SAAS;AAAA,MACT,mBAAmB;AAAA,MACnB,4BAA4B;AAAA,MAC5B,OAAO;AAAA,I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;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index44.js","sources":["../src/components/BaseTag/BaseTag.vue"],"sourcesContent":["<template>\n\t<CommonInputOuterContainer\n\t\tref=\"outerContainer\"\n\t\t:class=\"{\n\t\t\t'bb-base-tag': true,\n\t\t\t'bb-base-tag--active': active,\n\t\t\t'bb-base-tag--disabled': disabled,\n\t\t\t'bb-base-tag--loading': loading,\n\t\t\t'bb-base-tag--errors': hasErrors,\n\t\t\t'bb-base-tag--readonly': readonly,\n\t\t}\"\n\t\t@click=\"onOuterContainerClick\"\n\t>\n\t\t<template #prepend-outer><slot name=\"prepend-outer\"></slot></template>\n\t\t<CommonInputInnerContainer\n\t\t\tref=\"innerContainer\"\n\t\t\t:append:icon=\"props['append:icon']\"\n\t\t\t:prepend:icon=\"props['prepend:icon']\"\n\t\t>\n\t\t\t<template #prepend><slot name=\"prepend\" /></template>\n\t\t\t<template #prefix><slot name=\"prefix\" /></template>\n\t\t\t<BbSmoothHeight tag=\"span\">\n\t\t\t\t<span class=\"bb-base-tag__input-container\">\n\t\t\t\t\t<template v-if=\"multiple\">\n\t\t\t\t\t\t<template v-if=\"comma\">\n\t\t\t\t\t\t\t<CommaBox ref=\"commaBox\" :options=\"selectedOptions\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\t<template v-else>\n\t\t\t\t\t\t\t<ChipsBox\n\t\t\t\t\t\t\t\tref=\"chipsBox\"\n\t\t\t\t\t\t\t\t:options=\"selectedOptions\"\n\t\t\t\t\t\t\t\t@option:unselected=\"onOptionUnselected\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</template>\n\n\t\t\t\t\t<input\n\t\t\t\t\t\t:id=\"id\"\n\t\t\t\t\t\tref=\"input\"\n\t\t\t\t\t\tv-bind=\"eventListeners\"\n\t\t\t\t\t\tv-model=\"query\"\n\t\t\t\t\t\t:aria-describedby=\"ariaDescribedby\"\n\t\t\t\t\t\t:autocomplete=\"autocomplete\"\n\t\t\t\t\t\t:autofocus=\"autofocus\"\n\t\t\t\t\t\t:class=\"'bb-base-tag__text-input'\"\n\t\t\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t\t\tenter-key-hint=\"next\"\n\t\t\t\t\t\t:placeholder=\"computedPlaceholder\"\n\t\t\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t\t\t:required=\"\n\t\t\t\t\t\t\t(required && !multiple) || (multiple && !modelValue.length)\n\t\t\t\t\t\t\"\n\t\t\t\t\t\t:type=\"'text'\"\n\t\t\t\t\t\t@focus.stop=\"onInputFocus\"\n\t\t\t\t\t\t@keydown.stop.delete=\"onBackspace\"\n\t\t\t\t\t\t@keydown.stop.left=\"onArrowLeft\"\n\t\t\t\t\t\t@keydown.stop.prevent.esc=\"onEscape\"\n\t\t\t\t\t\t@keydown.stop.right=\"onArrowRight\"\n\t\t\t\t\t\t@keyup.stop=\"onInputKeyup\"\n\t\t\t\t\t/>\n\t\t\t\t</span>\n\t\t\t</BbSmoothHeight>\n\t\t\t<template #append><slot name=\"append\" /></template>\n\t\t\t<template #suffix><slot name=\"suffix\" /></template>\n\t\t</CommonInputInnerContainer>\n\n\t\t<template #append-outer><slot name=\"append-outer\"></slot></template>\n\t</CommonInputOuterContainer>\n</template>\n\n<script setup lang=\"ts\">\nimport { BbSmoothHeight } from '@/index';\nimport { computed, ref } from 'vue';\nimport { isNotNil } from '@/utilities/functions/isNotNil';\nimport { last } from '@/utilities/functions/last';\nimport { nextTick } from 'vue';\nimport { toRef } from 'vue';\nimport { useOptions } from '@/composables/useOptions';\nimport ChipsBox from '../ChipsBox.vue';\nimport CommaBox from '../CommaBox.vue';\nimport CommonInputInnerContainer from '../CommonInputInnerContainer.vue';\nimport CommonInputOuterContainer from '../CommonInputOuterContainer.vue';\nimport type { InputHTMLAttributes, HTMLAttributes } from 'vue';\nimport type { Option as BaseOption } from '@/types/Option';\n\nexport type BaseTagProps = {\n\t/**\n\t * Name of the icon to be added at the end of the input.\n\t */\n\t// eslint-disable-next-line vue/prop-name-casing\n\t'append:icon'?: string;\n\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tariaDescribedby?: InputHTMLAttributes['aria-describedby'];\n\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tautocomplete?: InputHTMLAttributes['autocomplete'];\n\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Sets the display model for selected values to a list\n\t * of comma separated string. In this mode the user\n\t * cannot deselect an option by pressing the close button.\n\t */\n\tcomma?: boolean;\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * The divider key used to separate values from one another. By default it is \"Enter\"\n\t */\n\tdivider?: KeyboardEvent['key'];\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Sets the component in a loading state, usually triggering some visual styles.\n\t */\n\tloading?: boolean;\n\n\t/**\n\t * Used by v-model. Can be any serializable type.\n\t */\n\tmodelValue: any;\n\n\t/**\n\t * Allows the selection of multiple items.\n\t */\n\tmultiple?: boolean;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname?: InputHTMLAttributes['name'];\n\n\t/**\n\t * String displayed when there's no data.\n\t */\n\tplaceholder?: InputHTMLAttributes['placeholder'];\n\n\t/**\n\t * Name of the icon to be added at the start of the input.\n\t */\n\t// eslint-disable-next-line vue/prop-name-casing\n\t'prepend:icon'?: string;\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: InputHTMLAttributes['readonly'];\n\n\t/**\n\t * Sets the input as required.\n\t */\n\trequired?: boolean;\n};\n\nconst props = withDefaults(defineProps<BaseTagProps>(), {\n\tdivider: 'Enter',\n\tmultiple: true,\n});\n\nexport type BaseTagEvents = {\n\t(e: 'blur', event: FocusEvent): void;\n\t(e: 'change', event: Event): void;\n\t(e: 'click', event: MouseEvent): void;\n\t(e: 'duplicate', string: string): void;\n\t(e: 'focus', event: FocusEvent): void;\n\t(e: 'inactive'): void;\n\t(e: 'input', event: Event): void;\n\t(e: 'keydown', event: KeyboardEvent): void;\n\t(e: 'keyup', event: KeyboardEvent): void;\n\t(e: 'update:modelValue', value: any): void;\n};\n\nconst emit = defineEmits<BaseTagEvents>();\n\nexport type BaseTagSlots = {\n\tappend?: (props: object) => any;\n\t'append-outer'?: (props: object) => any;\n\tprepend?: (props: object) => any;\n\t'prepend-outer'?: (props: object) => any;\n\tprefix?: (props: object) => any;\n\tsuffix?: (props: object) => any;\n};\n\ndefineSlots<BaseTagSlots>();\n\nif (props.multiple && !Array.isArray(props.modelValue)) {\n\tthrow new Error('Multiple is set to \"true\" but modelValue is not an array.');\n}\n\nconst outerContainer = ref<InstanceType<\n\ttypeof CommonInputOuterContainer\n> | null>(null);\nconst innerContainer = ref<InstanceType<\n\ttypeof CommonInputInnerContainer\n> | null>(null);\nconst computedPlaceholder = computed(() => {\n\treturn props.placeholder;\n});\nconst commaBox = ref<InstanceType<typeof CommaBox> | null>(null);\nconst chipsBox = ref<InstanceType<typeof ChipsBox> | null>(null);\nconst selectedBox = computed(() =>\n\tprops.comma ? commaBox.value : chipsBox.value\n);\n\nconst input = ref<HTMLElement | null>(null);\nconst focusInput = () => {\n\tif (input.value instanceof HTMLInputElement) {\n\t\tinput.value.focus();\n\t}\n};\n/**\n * It should prefill if asked, or\n * when single if modelValue is not null\n * when multiple if modelValue is not empty\n */\nconst shouldPrefill =\n\t(!props.multiple && isNotNil(props.modelValue)) ||\n\t(props.multiple && !!props.modelValue.length);\n\nconst dependencies = ref([]);\n\nconst {\n\tquery,\n\talignQueryToState,\n\taddCurrentQueryToManualItems,\n\tselectedOptions,\n\tselectOption,\n\tunselectOption,\n\tvalueIsSelected,\n\tmanualItems,\n} = useOptions({\n\temit,\n\titemText: undefined,\n\titemValue: undefined,\n\tmodelValue: toRef(props, 'modelValue'),\n\tmultiple: props.multiple,\n\tresetQueryOnOptionSelected: true,\n\tstash: false,\n\titems: toRef(props, 'modelValue'),\n\tenforceCoherence: false,\n\tprefill: shouldPrefill,\n\tmodelValueDebounceTime: 0,\n\tdependencies,\n\tdepsDebounceTime: 0,\n\tqueryDebounceTime: 0,\n\tdisabled: toRef(props, 'disabled'),\n});\n\n/**\n * Applies a class when the user is inside this whole component.\n * We cannot use focus within as it doesn't work for elements that are teleported.\n * Also we cannot use the <input/> if we physically move focus to the options so\n * we track it manually.\n */\nconst active = ref(false);\n\nconst setActive = () => {\n\tactive.value = true;\n};\nconst setInactive = () => {\n\tactive.value = false;\n\temit('inactive');\n};\n\nconst canProcessKeyboardBindings = computed(() => {\n\tif (props.readonly) return false;\n\tif (props.disabled) return false;\n\tif (!selectedBox.value && props.multiple) return false;\n\treturn true;\n});\n\nconst onArrowLeft = (event: KeyboardEvent) => {\n\tif (!canProcessKeyboardBindings.value) {\n\t\treturn;\n\t}\n\tif (!props.multiple || query.value) {\n\t\treturn;\n\t}\n\tevent.preventDefault();\n\tif (!selectedOptions.value.length) return;\n\tselectedBox.value?.focusPrevious();\n};\nconst onArrowRight = (event: KeyboardEvent) => {\n\tif (!canProcessKeyboardBindings.value) {\n\t\treturn;\n\t}\n\tif (!props.multiple || query.value) {\n\t\treturn;\n\t}\n\tevent.preventDefault();\n\tif (!selectedOptions.value.length) return;\n\tselectedBox.value?.focusNext();\n};\n\nconst onBackspace = async () => {\n\tif (\n\t\t!canProcessKeyboardBindings.value ||\n\t\tquery.value ||\n\t\t!selectedOptions.value.length\n\t) {\n\t\treturn;\n\t}\n\tif (selectedBox.value?.getHighlighted()) {\n\t\tselectedBox.value.confirmOption();\n\t}\n\tawait nextTick();\n\tselectedBox.value?.focusPrevious();\n};\n\nconst onEscape = () => {\n\tselectedBox.value?.blur();\n};\n\nconst onInputKeyup = async (event: KeyboardEvent) => {\n\temit('keyup', event);\n\tif (props.readonly || props.disabled) {\n\t\tevent.preventDefault();\n\t\treturn;\n\t}\n\t// Reset focused chips on key input\n\tif (/^[A-Za-z0-9]$/.test(event.key)) {\n\t\tselectedBox.value?.blur();\n\t}\n\tif (\n\t\tevent.key === props.divider ||\n\t\t(event.key === 'Unidentified' && query.value.includes(props.divider))\n\t) {\n\t\tif (props.divider.length === 1 && query.value.includes(props.divider)) {\n\t\t\tconst found = query.value.split(props.divider)[0];\n\t\t\tif (found) {\n\t\t\t\tquery.value = found;\n\t\t\t} else {\n\t\t\t\tquery.value = '';\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif (!query.value) return;\n\t\tif (valueIsSelected(query.value)) {\n\t\t\temit('duplicate', query.value);\n\t\t\tquery.value = '';\n\t\t} else {\n\t\t\taddCurrentQueryToManualItems();\n\t\t\tonOptionSelected(last(manualItems.value)!);\n\t\t}\n\t}\n};\n\nconst onOptionSelected = (option: BaseOption) => {\n\tselectOption(option);\n\tfocusInput();\n\tif (!props.multiple) {\n\t\tclose();\n\t}\n};\n\nconst onOptionUnselected = (option: BaseOption) => {\n\tunselectOption(option);\n\tfocusInput();\n};\n\nconst onInputFocus = (event: FocusEvent) => {\n\temit('focus', event);\n\tsetActive();\n\tdocument.addEventListener('click', onOutsideInteraction);\n\tdocument.addEventListener('focusin', onOutsideInteraction);\n};\n\n/**\n * When clicking on the outside container seamlessly move focus to the input and open the panel\n */\nconst onOuterContainerClick = (event: MouseEvent) => {\n\temit('click', event);\n\tif (props.disabled || props.readonly) return;\n\tif (input.value instanceof HTMLElement) {\n\t\tinput.value.focus();\n\t}\n};\n\n/**\n * On click outside of the container close the panel, remove active state.\n * In multiple selection clear query after a timeout\n */\nconst onOutsideInteraction = async (event: Event) => {\n\tif (event.target instanceof Node) {\n\t\tif (outerContainer.value) {\n\t\t\tif (!outerContainer.value.$el.contains(event.target)) {\n\t\t\t\tclose();\n\t\t\t\tsetInactive();\n\t\t\t\tdocument.removeEventListener('click', onOutsideInteraction);\n\t\t\t\tdocument.removeEventListener('focusin', onOutsideInteraction);\n\t\t\t\talignQueryToState();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n};\nconst eventListeners = {\n\tonBlur: (event: FocusEvent) => emit('blur', event),\n\tonChange: (event: Event) => emit('change', event),\n\tonKeydown: (event: KeyboardEvent) => emit('keydown', event),\n\tonInput: (event: Event) => emit('input', event),\n};\n</script>\n<style lang=\"postcss\">\n@import '@/assets/css/BaseTag';\n</style>\n"],"names":["props","__props","emit","__emit","outerContainer","ref","innerContainer","computedPlaceholder","computed","commaBox","chipsBox","selectedBox","input","focusInput","shouldPrefill","isNotNil","dependencies","query","alignQueryToState","addCurrentQueryToManualItems","selectedOptions","selectOption","unselectOption","valueIsSelected","manualItems","useOptions","toRef","active","setActive","setInactive","canProcessKeyboardBindings","onArrowLeft","event","_a","onArrowRight","onBackspace","nextTick","_b","onEscape","onInputKeyup","found","onOptionSelected","last","option","onOptionUnselected","onInputFocus","onOutsideInteraction","onOuterContainerClick","eventListeners"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiLA,UAAMA,IAAQC,GAkBRC,IAAOC;AAab,QAAIH,EAAM,YAAY,CAAC,MAAM,QAAQA,EAAM,UAAU;AAC9C,YAAA,IAAI,MAAM,2DAA2D;AAGtE,UAAAI,IAAiBC,EAEb,IAAI,GACRC,IAAiBD,EAEb,IAAI,GACRE,IAAsBC,EAAS,MAC7BR,EAAM,WACb,GACKS,IAAWJ,EAA0C,IAAI,GACzDK,IAAWL,EAA0C,IAAI,GACzDM,IAAcH;AAAA,MAAS,MAC5BR,EAAM,QAAQS,EAAS,QAAQC,EAAS;AAAA,IAAA,GAGnCE,IAAQP,EAAwB,IAAI,GACpCQ,IAAa,MAAM;AACpB,MAAAD,EAAM,iBAAiB,oBAC1BA,EAAM,MAAM;IACb,GAOKE,IACJ,CAACd,EAAM,YAAYe,GAASf,EAAM,UAAU,KAC5CA,EAAM,YAAY,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AAA,GAGNgC,IAAe,CAACb,MAAsB;AAC3C,MAAA9B,EAAK,SAAS8B,CAAK,GACTJ,KACD,SAAA,iBAAiB,SAASkB,CAAoB,GAC9C,SAAA,iBAAiB,WAAWA,CAAoB;AAAA,IAAA,GAMpDC,IAAwB,CAACf,MAAsB;AAEhD,MADJ9B,EAAK,SAAS8B,CAAK,GACf,EAAAhC,EAAM,YAAYA,EAAM,aACxBY,EAAM,iBAAiB,eAC1BA,EAAM,MAAM;IACb,GAOKkC,IAAuB,OAAOd,MAAiB;AAChD,UAAAA,EAAM,kBAAkB,QACvB5B,EAAe,SACd,CAACA,EAAe,MAAM,IAAI,SAAS4B,EAAM,MAAM,GAAG;AAC/C,iBACMH,KACH,SAAA,oBAAoB,SAASiB,CAAoB,GACjD,SAAA,oBAAoB,WAAWA,CAAoB,GAC1C5B;AAClB;AAAA,MACD;AAAA,IAEF,GAEK8B,IAAiB;AAAA,MACtB,QAAQ,CAAChB,MAAsB9B,EAAK,QAAQ8B,CAAK;AAAA,MACjD,UAAU,CAACA,MAAiB9B,EAAK,UAAU8B,CAAK;AAAA,MAChD,WAAW,CAACA,MAAyB9B,EAAK,WAAW8B,CAAK;AAAA,MAC1D,SAAS,CAACA,MAAiB9B,EAAK,SAAS8B,CAAK;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index46.js","sources":["../src/components/BaseTextarea/BaseTextarea.vue"],"sourcesContent":["<template>\n\t<CommonInputOuterContainer :class=\"classes\">\n\t\t<template #prepend-outer><slot name=\"prepend-outer\"></slot></template>\n\t\t<CommonInputInnerContainer\n\t\t\t:append:icon=\"props['append:icon']\"\n\t\t\t:prepend:icon=\"props['prepend:icon']\"\n\t\t>\n\t\t\t<template #prepend><slot name=\"prepend\" /></template>\n\t\t\t<template #prefix><slot name=\"prefix\" /></template>\n\t\t\t<BbSmoothHeight>\n\t\t\t\t<textarea\n\t\t\t\t\t:id=\"id\"\n\t\t\t\t\tref=\"textarea\"\n\t\t\t\t\t:aria-describedby=\"ariaDescribedby\"\n\t\t\t\t\t:autocomplete=\"autocomplete\"\n\t\t\t\t\t:autofocus=\"autofocus\"\n\t\t\t\t\t:class=\"'bb-base-textarea__input scrollbar-border'\"\n\t\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t\t:name=\"name\"\n\t\t\t\t\t:placeholder=\"placeholder\"\n\t\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t\t:required=\"required\"\n\t\t\t\t\t:rows=\"rows\"\n\t\t\t\t\t:value=\"modelValueWithDefault\"\n\t\t\t\t\tv-bind=\"eventListeners\"\n\t\t\t\t\t@input=\"onInput\"\n\t\t\t\t\t@keydown=\"onKeydown\"\n\t\t\t\t></textarea>\n\t\t\t</BbSmoothHeight>\n\t\t\t<template #append><slot name=\"append\" /></template>\n\t\t\t<template #suffix><slot name=\"suffix\" /></template>\n\t\t</CommonInputInnerContainer>\n\t\t<template #append-outer><slot name=\"append-outer\"></slot></template>\n\t</CommonInputOuterContainer>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, nextTick, onMounted, ref, watch } from 'vue';\nimport type { HTMLAttributes, InputHTMLAttributes, Ref } from 'vue';\nimport CommonInputOuterContainer from '../CommonInputOuterContainer.vue';\nimport CommonInputInnerContainer from '../CommonInputInnerContainer.vue';\nimport BbSmoothHeight from '../BbSmoothHeight/BbSmoothHeight.vue';\n\nexport type BaseTextareaProps = {\n\t/**\n\t * Name of the icon to be added at the end of the input.\n\t */\n\t// eslint-disable-next-line vue/prop-name-casing\n\t'append:icon'?: string;\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tariaDescribedby?: InputHTMLAttributes['aria-describedby'];\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tautocomplete?: InputHTMLAttributes['autocomplete'];\n\n\t/**\n\t * Expands the textarea to match its content\n\t */\n\tautoGrow?: boolean;\n\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Sets the component in a loading state, usually triggering some visual styles.\n\t */\n\tloading?: boolean;\n\n\t/**\n\t * Used by v-model\n\t */\n\tmodelValue: string | null;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname?: InputHTMLAttributes['name'];\n\n\t/**\n\t * String displayed when there's no data.\n\t */\n\tplaceholder?: InputHTMLAttributes['placeholder'];\n\n\t/**\n\t * Name of the icon to be added at the start of the input.\n\t */\n\t// eslint-disable-next-line vue/prop-name-casing\n\t'prepend:icon'?: string;\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: InputHTMLAttributes['readonly'];\n\n\t/**\n\t * Sets the input as required.\n\t */\n\trequired?: boolean;\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\trows?: string | number;\n};\nconst props = defineProps<BaseTextareaProps>();\n\nexport type BaseTextareaEvents = {\n\t(e: 'blur', event: FocusEvent): void;\n\t(e: 'change', event: Event): void;\n\t(e: 'click', event: MouseEvent): void;\n\t(e: 'focus', event: FocusEvent): void;\n\t(e: 'input', event: Event): void;\n\t(e: 'keydown', event: KeyboardEvent): void;\n\t(e: 'mousedown', event: MouseEvent): void;\n\t(e: 'mouseup', event: MouseEvent): void;\n\t(e: 'update:modelValue', value: string | null): void;\n};\nconst emit = defineEmits<BaseTextareaEvents>();\n\nexport type BaseTextareaSlots = {\n\t'prepend-outer'?: (props: object) => any;\n\tprepend?: (props: object) => any;\n\tappend?: (props: object) => any;\n\t'append-outer'?: (props: object) => any;\n\tprefix?: (props: object) => any;\n\tsuffix?: (props: object) => any;\n};\n\ndefineSlots<BaseTextareaSlots>();\n\nif (props.rows && props.autoGrow) {\n\tthrow new Error(\n\t\t'Textarea: You cannot set rows and auto-grow attributes together. You either use rows and let the user resize or define a minimum height in CSS with auto-grow.'\n\t);\n}\n\nconst textarea: Ref<HTMLTextAreaElement | null> = ref(null);\n\nconst classes = computed(() => ({\n\t'bb-base-textarea': true,\n\t'bb-base-textarea--auto-grow': props.autoGrow,\n\t'bb-base-textarea--disabled': props.disabled,\n\t'bb-base-textarea--errors': props.hasErrors,\n\t'bb-base-textarea--loading': props.loading,\n\t'bb-base-textarea--readonly': props.readonly,\n}));\n\n// Allow modelvalue to be reset to null\nconst modelValueWithDefault = computed(() =>\n\tprops.modelValue ? props.modelValue : ''\n);\nonMounted(() => {\n\tif (props.autoGrow && props.modelValue) {\n\t\tcomputeTextareaHeight();\n\t}\n});\nwatch(\n\t() => props.modelValue,\n\t() => {\n\t\tif (props.autoGrow) {\n\t\t\tnextTick(computeTextareaHeight);\n\t\t}\n\t}\n);\n\nfunction onInput(event: Event): void {\n\t// Prevent enter from triggering smt else\n\tevent.stopPropagation();\n\tif (event.target instanceof HTMLTextAreaElement) {\n\t\tlet value = event.target.value;\n\t\temit('input', event);\n\t\temit('update:modelValue', value || null);\n\t}\n}\nfunction onKeydown(event: KeyboardEvent): void {\n\t// Prevent enter from triggering smt else\n\tevent.stopPropagation();\n\tif (event.target instanceof HTMLTextAreaElement) {\n\t\temit('keydown', event);\n\t}\n}\n\n/**\n * These events are just propagated\n */\nconst eventListeners = {\n\tonBlur: (event: FocusEvent) => emit('blur', event),\n\tonChange: (event: Event) => emit('change', event),\n\tonClick: (event: MouseEvent) => emit('click', event),\n\tonFocus: (event: FocusEvent) => emit('focus', event),\n\tonMousedown: (event: MouseEvent) => emit('mousedown', event),\n\tonMouseup: (event: MouseEvent) => emit('mouseup', event),\n};\n\n/* \nReset height and the apply scroll height otherwise it would not be able to shrink\n*/\nfunction computeTextareaHeight() {\n\tif (!textarea.value) return;\n\ttextarea.value.style.height = '0px';\n\n\ttextarea.value.style.height = `${textarea.value.scrollHeight}px`;\n}\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BaseTextarea';\n</style>\n"],"names":["props","__props","emit","__emit","textarea","ref","classes","computed","modelValueWithDefault","onMounted","computeTextareaHeight","watch","nextTick","onInput","event","value","onKeydown","eventListeners"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6HA,UAAMA,IAAQC,GAaRC,IAAOC;AAaT,QAAAH,EAAM,QAAQA,EAAM;AACvB,YAAM,IAAI;AAAA,QACT;AAAA,MAAA;AAII,UAAAI,IAA4CC,EAAI,IAAI,GAEpDC,IAAUC,EAAS,OAAO;AAAA,MAC/B,oBAAoB;AAAA,MACpB,+BAA+BP,EAAM;AAAA,MACrC,8BAA8BA,EAAM;AAAA,MACpC,4BAA4BA,EAAM;AAAA,MAClC,6BAA6BA,EAAM;AAAA,MACnC,8BAA8BA,EAAM;AAAA,IACnC,EAAA,GAGIQ,IAAwBD;AAAA,MAAS,MACtCP,EAAM,aAAaA,EAAM,aAAa;AAAA,IAAA;AAEvC,IAAAS,EAAU,MAAM;AACX,MAAAT,EAAM,YAAYA,EAAM,cACLU;IACvB,CACA,GACDC;AAAA,MACC,MAAMX,EAAM;AAAA,MACZ,MAAM;AACL,QAAIA,EAAM,YACTY,EAASF,CAAqB;AAAA,MAEhC;AAAA,IAAA;AAGD,aAASG,EAAQC,GAAoB;AAGhC,UADJA,EAAM,gBAAgB,GAClBA,EAAM,kBAAkB,qBAAqB;AAC5C,YAAAC,IAAQD,EAAM,OAAO;AACzB,QAAAZ,EAAK,SAASY,CAAK,GACdZ,EAAA,qBAAqBa,KAAS,IAAI;AAAA,MACxC;AAAA,IACD;AACA,aAASC,EAAUF,GAA4B;AAE9C,MAAAA,EAAM,gBAAgB,GAClBA,EAAM,kBAAkB,uBAC3BZ,EAAK,WAAWY,CAAK;AAAA,IAEvB;AAKA,UAAMG,IAAiB;AAAA,MACtB,QAAQ,CAACH,MAAsBZ,EAAK,QAAQY,CAAK;AAAA,MACjD,UAAU,CAACA,MAAiBZ,EAAK,UAAUY,CAAK;AAAA,MAChD,SAAS,CAACA,MAAsBZ,EAAK,SAASY,CAAK;AAAA,MACnD,SAAS,CAACA,MAAsBZ,EAAK,SAASY,CAAK;AAAA,MACnD,aAAa,CAACA,MAAsBZ,EAAK,aAAaY,CAAK;AAAA,MAC3D,WAAW,CAACA,MAAsBZ,EAAK,WAAWY,CAAK;AAAA,IAAA;AAMxD,aAASJ,IAAwB;AAC5B,MAACN,EAAS,UACLA,EAAA,MAAM,MAAM,SAAS,OAE9BA,EAAS,MAAM,MAAM,SAAS,GAAGA,EAAS,MAAM,YAAY;AAAA,IAC7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index48.js","sources":["../src/components/BaseTextInput/BaseTextInput.vue"],"sourcesContent":["<template>\n\t<CommonInputOuterContainer :class=\"classes\">\n\t\t<template #prepend-outer><slot name=\"prepend-outer\"></slot></template>\n\t\t<CommonInputInnerContainer\n\t\t\t:append:icon=\"props['append:icon']\"\n\t\t\t:prepend:icon=\"props['prepend:icon']\"\n\t\t>\n\t\t\t<template #prepend><slot name=\"prepend\" /></template>\n\t\t\t<template #prefix><slot name=\"prefix\" /></template>\n\n\t\t\t<input\n\t\t\t\t:id=\"id\"\n\t\t\t\tref=\"input\"\n\t\t\t\t:aria-describedby=\"ariaDescribedby\"\n\t\t\t\t:aria-invalid=\"hasErrors ? true : undefined\"\n\t\t\t\t:autocomplete=\"autocomplete\"\n\t\t\t\t:autofocus=\"autofocus\"\n\t\t\t\t:class=\"'bb-base-text-input__input'\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t:name=\"name\"\n\t\t\t\t:placeholder=\"placeholder\"\n\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t:required=\"required\"\n\t\t\t\tsize=\"1\"\n\t\t\t\t:type=\"type\"\n\t\t\t\t:value=\"modelValue\"\n\t\t\t\tv-bind=\"eventListeners\"\n\t\t\t/>\n\n\t\t\t<template #append><slot name=\"append\" /></template>\n\t\t\t<template #suffix><slot name=\"suffix\" /></template>\n\t\t</CommonInputInnerContainer>\n\t\t<template #append-outer><slot name=\"append-outer\"></slot></template>\n\t</CommonInputOuterContainer>\n\t<span> </span>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport CommonInputInnerContainer from '../CommonInputInnerContainer.vue';\nimport CommonInputOuterContainer from '../CommonInputOuterContainer.vue';\nimport type { HTMLAttributes, InputHTMLAttributes } from 'vue';\n\nexport type BaseTextInputProps = {\n\t/**\n\t * Name of the icon to be added at the end of the input.\n\t */\n\t// eslint-disable-next-line vue/prop-name-casing\n\t'append:icon'?: string;\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tariaDescribedby?: InputHTMLAttributes['aria-describedby'];\n\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tautocomplete?: InputHTMLAttributes['autocomplete'];\n\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Sets the component in a loading state, usually triggering some visual styles.\n\t */\n\tloading?: boolean;\n\n\t/**\n\t * Used my v-model\n\t */\n\tmodelValue: string | null;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname?: InputHTMLAttributes['name'];\n\n\t/**\n\t * String displayed when there's no data.\n\t */\n\tplaceholder?: InputHTMLAttributes['placeholder'];\n\n\t/**\n\t * Name of the icon to be added at the start of the input.\n\t */\n\t// eslint-disable-next-line vue/prop-name-casing\n\t'prepend:icon'?: string;\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: InputHTMLAttributes['readonly'];\n\n\t/**\n\t * Sets the input as required.\n\t */\n\trequired?: boolean;\n\n\t/**\n\t * Type of the input. Returns the content type of the object.\n\t */\n\ttype?: HTMLInputElement['type'];\n};\n\nconst props = withDefaults(defineProps<BaseTextInputProps>(), {\n\ttype: 'text',\n});\n\nexport type BaseTextInputEvents = {\n\t(e: 'blur', event: FocusEvent): void;\n\t(e: 'change', event: Event): void;\n\t(e: 'click', event: MouseEvent): void;\n\t(e: 'focus', event: FocusEvent): void;\n\t(e: 'input', event: Event): void;\n\t(e: 'keydown', event: KeyboardEvent): void;\n\t(e: 'mousedown', event: MouseEvent): void;\n\t(e: 'mouseup', event: MouseEvent): void;\n\t(e: 'update:modelValue', value: string | null): void;\n};\nconst emit = defineEmits<BaseTextInputEvents>();\n\nexport type BaseTextInputSlots = {\n\t'append-outer'?: (props: object) => any;\n\tappend?: (props: object) => any;\n\tprefix?: (props: object) => any;\n\tprepend?: (props: object) => any;\n\t'prepend-outer'?: (props: object) => any;\n\tsuffix?: (props: object) => any;\n};\n\ndefineSlots<BaseTextInputSlots>();\n\nconst classes = computed(() => ({\n\t'bb-base-text-input': true,\n\t'bb-base-text-input--disabled': props.disabled,\n\t'bb-base-text-input--errors': props.hasErrors,\n\t'bb-base-text-input--loading': props.loading,\n\t'bb-base-text-input--readonly': props.readonly,\n}));\n\n/**\n * These events are just propagated\n */\nconst eventListeners = {\n\tonBlur: (event: FocusEvent) => emit('blur', event),\n\tonChange: (event: Event) => emit('change', event),\n\tonClick: (event: MouseEvent) => emit('click', event),\n\tonFocus: (event: FocusEvent) => emit('focus', event),\n\tonKeydown: (event: KeyboardEvent) => emit('keydown', event),\n\tonInput: (event: Event) => {\n\t\tif (event.target instanceof HTMLInputElement) {\n\t\t\temit('update:modelValue', event.target.value || null);\n\t\t}\n\t\temit('input', event);\n\t},\n\tonMousedown: (event: MouseEvent) => emit('mousedown', event),\n\tonMouseup: (event: MouseEvent) => emit('mouseup', event),\n};\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BaseTextInput';\n</style>\n"],"names":["props","__props","emit","__emit","classes","computed","eventListeners","event"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA0HA,UAAMA,IAAQC,GAeRC,IAAOC,GAaPC,IAAUC,EAAS,OAAO;AAAA,MAC/B,sBAAsB;AAAA,MACtB,gCAAgCL,EAAM;AAAA,MACtC,8BAA8BA,EAAM;AAAA,MACpC,+BAA+BA,EAAM;AAAA,MACrC,gCAAgCA,EAAM;AAAA,IACrC,EAAA,GAKIM,IAAiB;AAAA,MACtB,QAAQ,CAACC,MAAsBL,EAAK,QAAQK,CAAK;AAAA,MACjD,UAAU,CAACA,MAAiBL,EAAK,UAAUK,CAAK;AAAA,MAChD,SAAS,CAACA,MAAsBL,EAAK,SAASK,CAAK;AAAA,MACnD,SAAS,CAACA,MAAsBL,EAAK,SAASK,CAAK;AAAA,MACnD,WAAW,CAACA,MAAyBL,EAAK,WAAWK,CAAK;AAAA,MAC1D,SAAS,CAACA,MAAiB;AACtB,QAAAA,EAAM,kBAAkB,oBAC3BL,EAAK,qBAAqBK,EAAM,OAAO,SAAS,IAAI,GAErDL,EAAK,SAASK,CAAK;AAAA,MACpB;AAAA,MACA,aAAa,CAACA,MAAsBL,EAAK,aAAaK,CAAK;AAAA,MAC3D,WAAW,CAACA,MAAsBL,EAAK,WAAWK,CAAK;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index5.js","sources":["../src/composables/useBbConfig.ts"],"sourcesContent":["import { reactive } from 'vue';\n\ntype Config = {\n\tinertiaLinkName: string;\n\tnuxtLinkName: string;\n\tmobileMaxWidth: number;\n};\n\nexport const _config = reactive<Config & Record<string, any>>({\n\tinertiaLinkName: 'Link',\n\tnuxtLinkName: 'NuxtLink',\n\tmobileMaxWidth: 768,\n\tdocumentationURL: 'https://ui-components-docs.vercel.app/it',\n});\n\nconst setConfig = (config: Partial<Config>) => {\n\tObject.keys(config).forEach((k) => {\n\t\tconst _k = k as keyof Config;\n\t\tconst value = config[_k]!;\n\t\t// @ts-expect-error this breaks in TS\n\t\t_config[_k] = value;\n\t});\n};\nexport const useBbConfig = () => {\n\treturn { setConfig };\n};\n"],"names":["_config","reactive","setConfig","config","k","_k","value","useBbConfig"],"mappings":";AAQO,MAAMA,IAAUC,EAAuC;AAAA,EAC7D,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,gBAAgB;AAAA,EAChB,kBAAkB;AACnB,CAAC,GAEKC,IAAY,CAACC,MAA4B;AAC9C,SAAO,KAAKA,CAAM,EAAE,QAAQ,CAACC,MAAM;AAClC,UAAMC,IAAKD,GACLE,IAAQH,EAAOE,CAAE;AAEvB,IAAAL,EAAQK,CAAE,IAAIC;AAAA,EAAA,CACd;AACF,GACaC,IAAc,OACnB,EAAE,WAAAL,EAAU;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index50.js","sources":["../src/components/BbAccordion/BbAccordion.vue"],"sourcesContent":["<template>\n\t<div class=\"bb-accordion\">\n\t\t<BaseButton\n\t\t\t:id=\"`${id}_header`\"\n\t\t\t:aria-controls=\"id\"\n\t\t\t:aria-expanded=\"internalValue\"\n\t\t\t:class=\"'bb-accordion__header'\"\n\t\t\t@click.self=\"toggle\"\n\t\t\t><slot name=\"header\" :toggle=\"toggle\" :value=\"internalValue\"></slot\n\t\t></BaseButton>\n\t\t<BbCollapsible\n\t\t\t:id=\"id\"\n\t\t\t:aria-labelledby=\"`${id}_header`\"\n\t\t\t:class=\"'bb-accordion__content'\"\n\t\t\t:eager=\"eager\"\n\t\t\t:model-value=\"internalValue\"\n\t\t\t:role=\"'region'\"\n\t\t\t:transition-duration=\"transitionDuration\"\n\t\t\t><slot :toggle=\"toggle\" :value=\"internalValue\"></slot\n\t\t></BbCollapsible>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, watch } from 'vue';\nimport { useId } from '@/composables/useId';\nimport BaseButton from '../BaseButton/BaseButton.vue';\nimport BbCollapsible from '../BbCollapsible/BbCollapsible.vue';\nimport type { BbCollapsibleProps } from '../BbCollapsible/BbCollapsible.vue';\nimport type { CommonProps } from '@/types/CommonProps';\n\nexport type BbAccordionProps = Partial<BbCollapsibleProps> &\n\tPick<CommonProps, 'id'>;\n\nexport type BbAccordionEvents = {\n\t(e: 'update:modelValue', value: boolean): void;\n};\nconst emit = defineEmits<BbAccordionEvents>();\n\nconst props = withDefaults(defineProps<BbAccordionProps>(), {\n\ttransitionDuration: 250,\n});\n\nconst id = props.id || `bba_${useId().id.value}`;\n\nconst internalValue = ref(props.modelValue);\n/**\n * Watch external changes and align internal value\n */\nwatch(\n\t() => props.modelValue,\n\t(current, previous) => {\n\t\tif (current !== previous && current !== internalValue.value) {\n\t\t\tinternalValue.value = current;\n\t\t}\n\t}\n);\n\nconst toggle = () => {\n\tinternalValue.value = !internalValue.value;\n\temit('update:modelValue', !props.modelValue);\n};\n\ndefineSlots<{\n\theader?: (props: {\n\t\tvalue: BbAccordionProps['modelValue'];\n\t\ttoggle: typeof toggle;\n\t}) => any;\n\tdefault?: (props: {\n\t\tvalue: BbAccordionProps['modelValue'];\n\t\ttoggle: typeof toggle;\n\t}) => any;\n}>();\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbAccordion';\n</style>\n"],"names":["emit","__emit","props","__props","id","useId","internalValue","ref","watch","current","previous","toggle"],"mappings":";;;;;;;;;;;;;;;;;AAqCA,UAAMA,IAAOC,GAEPC,IAAQC,GAIRC,IAAKF,EAAM,MAAM,OAAOG,IAAQ,GAAG,KAAK,IAExCC,IAAgBC,EAAIL,EAAM,UAAU;AAI1C,IAAAM;AAAA,MACC,MAAMN,EAAM;AAAA,MACZ,CAACO,GAASC,MAAa;AACtB,QAAID,MAAYC,KAAYD,MAAYH,EAAc,UACrDA,EAAc,QAAQG;AAAA,MAExB;AAAA,IAAA;AAGD,UAAME,IAAS,MAAM;AACN,MAAAL,EAAA,QAAQ,CAACA,EAAc,OAChCN,EAAA,qBAAqB,CAACE,EAAM,UAAU;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index52.js","sources":["../src/components/BbAlert/BbAlert.vue"],"sourcesContent":["<template>\n\t<BbCollapsible\n\t\tclass=\"bb-alert\"\n\t\t:class=\"{ [`bb-alert--${theme}`]: theme }\"\n\t\t:model-value=\"innerValue\"\n\t>\n\t\t<div class=\"bb-alert__inner-container\" role=\"alert\">\n\t\t\t<div class=\"bb-alert__icon-container\">\n\t\t\t\t<BbIcon\n\t\t\t\t\tv-if=\"icon\"\n\t\t\t\t\tclass=\"bb-alert__icon\"\n\t\t\t\t\t:size=\"iconSize\"\n\t\t\t\t\t:type=\"icon\"\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t<div class=\"bb-alert__content\">\n\t\t\t\t<button\n\t\t\t\t\tv-if=\"showClose\"\n\t\t\t\t\t:aria-label=\"closeLabel\"\n\t\t\t\t\tblock\n\t\t\t\t\tclass=\"bb-alert__close\"\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t@click=\"onClickClose\"\n\t\t\t\t>\n\t\t\t\t\t<svg\n\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<path\n\t\t\t\t\t\t\td=\"M23 23L1 1M23 1L1 23\"\n\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</svg>\n\t\t\t\t</button>\n\t\t\t\t<div class=\"bb-alert__title\">\n\t\t\t\t\t<slot name=\"title\" v-bind=\"{ text: title }\">{{ title }}</slot>\n\t\t\t\t</div>\n\t\t\t\t<p class=\"bb-alert__text\">\n\t\t\t\t\t<slot name=\"text\" v-bind=\"{ text: text }\">{{ text }}</slot>\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t</div>\n\t</BbCollapsible>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, watch } from 'vue';\nimport BbCollapsible from '../BbCollapsible/BbCollapsible.vue';\nimport BbIcon from '../BbIcon/BbIcon.vue';\nimport type { BbIconProps } from '../BbIcon/BbIcon.vue';\nimport type { CommonProps } from '@/types/CommonProps';\n\nexport type BbAlertProps = Pick<\n\tCommonProps,\n\t'closeLabel' | 'showClose' | 'text' | 'theme' | 'title'\n> & {\n\t/**\n\t * Name of the icon to use\n\t */\n\ticon?: BbIconProps['type'];\n\t/**\n\t * Size of the icon to use\n\t */\n\ticonSize?: BbIconProps['size'];\n\t/**\n\t * Used by v-model, set type to any to avoid Vue casting it as false\n\t */\n\tmodelValue?: any;\n};\n\nconst props = withDefaults(defineProps<BbAlertProps>(), {\n\tcloseLabel: 'Chiudi',\n\ttheme: 'default',\n});\n\nexport type BbAlertEvents = {\n\t(e: 'update:modelValue', value: boolean): void;\n};\nconst emit = defineEmits<BbAlertEvents>();\n\ndefineSlots<{\n\ttitle?: (props: { text: BbAlertProps['title'] }) => any;\n\ttext?: (props: { text: BbAlertProps['title'] }) => any;\n}>();\n\nconst innerValue = ref(\n\tprops.modelValue === undefined ? true : !!props.modelValue\n);\n\nwatch(\n\t() => props.modelValue,\n\t(value) => {\n\t\tif (innerValue.value !== !!value) {\n\t\t\tinnerValue.value = !!value;\n\t\t}\n\t}\n);\n\nconst onClickClose = () => {\n\tinnerValue.value = false;\n\temit('update:modelValue', false);\n};\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbAlert';\n</style>\n"],"names":["props","__props","emit","__emit","innerValue","ref","watch","value","onClickClose"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyEA,UAAMA,IAAQC,GAQRC,IAAOC,GAOPC,IAAaC;AAAA,MAClBL,EAAM,eAAe,SAAY,KAAO,CAAC,CAACA,EAAM;AAAA,IAAA;AAGjD,IAAAM;AAAA,MACC,MAAMN,EAAM;AAAA,MACZ,CAACO,MAAU;AACV,QAAIH,EAAW,UAAU,CAAC,CAACG,MACfH,EAAA,QAAQ,CAAC,CAACG;AAAA,MAEvB;AAAA,IAAA;AAGD,UAAMC,IAAe,MAAM;AAC1B,MAAAJ,EAAW,QAAQ,IACnBF,EAAK,qBAAqB,EAAK;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index54.js","sources":["../src/components/BbAvatar/BbAvatar.vue"],"sourcesContent":["<template>\n\t<span v-bind=\"attributes\">\n\t\t<img\n\t\t\tv-if=\"(src || srcset) && !imageErrored\"\n\t\t\tref=\"image\"\n\t\t\t:alt=\"alt\"\n\t\t\t:sizes=\"sizes\"\n\t\t\t:src=\"src\"\n\t\t\t:srcset=\"srcset\"\n\t\t\t@error=\"onError\"\n\t\t\t@load=\"onLoad\"\n\t\t/>\n\t\t<span v-else class=\"bb-avatar__fallback\">\n\t\t\t<slot></slot>\n\t\t</span>\n\t</span>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, type ImgHTMLAttributes, onMounted } from 'vue';\nimport { isCssColor } from '@/utilities/functions/isCssColor';\nimport type { Classes } from '@/types/Classes';\nimport type { CommonProps } from '@/types/CommonProps';\nimport type { BbIconProps, Size } from '../BbIcon/BbIcon.vue';\nimport { wait } from '@/utilities/functions/wait';\n\nexport type BbAvatarProps = Pick<CommonProps, 'color'> &\n\tPick<BbIconProps, 'size'> & {\n\t\talt?: ImgHTMLAttributes['alt'];\n\t\tsrc?: ImgHTMLAttributes['src'];\n\t\tsrcset?: ImgHTMLAttributes['srcset'];\n\t\tsizes?: ImgHTMLAttributes['sizes'];\n\t\ttimeout?: number;\n\t};\n\nconst props = withDefaults(defineProps<BbAvatarProps>(), {\n\ttimeout: 400,\n});\n\ndefineSlots<{\n\tdefault?: (props: object) => any;\n}>();\n\nconst sizeMap: Size = {\n\txs: 24,\n\tsm: 32,\n\tmd: 40,\n\tlg: 56,\n\txl: 80,\n\txxl: 104,\n};\n\nconst attributes = computed(() => {\n\tconst classes: Classes = {\n\t\t'bb-avatar': true,\n\t};\n\tlet dimension: any;\n\tif (props.size) {\n\t\tif (typeof props.size === 'string') {\n\t\t\tdimension = sizeMap[props.size as keyof Size] ?? parseInt(props.size, 10);\n\t\t} else {\n\t\t\tdimension = props.size;\n\t\t}\n\t\tdimension += `px`;\n\t}\n\n\tlet style: { [key: string]: any } = {\n\t\twidth: dimension,\n\t\theight: dimension,\n\t};\n\tif (props.color) {\n\t\tif (isCssColor(props.color)) {\n\t\t\tstyle.backgroundColor = props.color;\n\t\t} else {\n\t\t\tclasses[`bb-avatar--${props.color}`] = true;\n\t\t}\n\t}\n\treturn {\n\t\tclass: classes,\n\t\tstyle,\n\t};\n});\n\nconst imageHasLoadedCorrectly = (img: HTMLImageElement) => {\n\tif (!img) return false;\n\t// During the onload event, IE correctly identifies any images that\n\t// weren’t downloaded as not complete. Others should too. Gecko-based\n\t// browsers act like NS4 in that they report this incorrectly.\n\tif (!img.complete) {\n\t\treturn false;\n\t}\n\n\t// However, they do have two very useful properties: naturalWidth and\n\t// naturalHeight. These give the true size of the image. If it failed\n\t// to load, either of these should be zero.\n\tif (img.naturalWidth === 0) {\n\t\treturn false;\n\t}\n\n\t// No other way of checking: assume it’s ok.\n\treturn true;\n};\n\nconst image = ref<HTMLImageElement | null>();\nconst imageLoaded = ref(false);\nconst imageErrored = ref(false);\n\nonMounted(async () => {\n\t// Only run when events don't fire (when the page is SSR)\n\tif (!imageErrored.value && !imageLoaded.value) {\n\t\tif (image.value) {\n\t\t\tawait wait(props.timeout);\n\t\t\timageErrored.value = !imageHasLoadedCorrectly(image.value);\n\t\t}\n\t}\n});\nconst onLoad = () => {\n\timageLoaded.value = true;\n};\nconst onError = () => {\n\timageErrored.value = true;\n};\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbAvatar';\n</style>\n"],"names":["props","__props","sizeMap","attributes","computed","classes","dimension","style","isCssColor","imageHasLoadedCorrectly","img","image","ref","imageLoaded","imageErrored","onMounted","wait","onLoad","onError"],"mappings":";;;;;;;;;;;;;;;;;;AAmCA,UAAMA,IAAQC,GAQRC,IAAgB;AAAA,MACrB,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,KAAK;AAAA,IAAA,GAGAC,IAAaC,EAAS,MAAM;AACjC,YAAMC,IAAmB;AAAA,QACxB,aAAa;AAAA,MAAA;AAEV,UAAAC;AACJ,MAAIN,EAAM,SACL,OAAOA,EAAM,QAAS,WACzBM,IAAYJ,EAAQF,EAAM,IAAkB,KAAK,SAASA,EAAM,MAAM,EAAE,IAExEM,IAAYN,EAAM,MAENM,KAAA;AAGd,UAAIC,IAAgC;AAAA,QACnC,OAAOD;AAAA,QACP,QAAQA;AAAA,MAAA;AAET,aAAIN,EAAM,UACLQ,EAAWR,EAAM,KAAK,IACzBO,EAAM,kBAAkBP,EAAM,QAE9BK,EAAQ,cAAcL,EAAM,KAAK,EAAE,IAAI,KAGlC;AAAA,QACN,OAAOK;AAAA,QACP,OAAAE;AAAA,MAAA;AAAA,IACD,CACA,GAEKE,IAA0B,CAACC,MAC5B,GAACA,KAID,CAACA,EAAI,YAOLA,EAAI,iBAAiB,IAQpBC,IAAQC,KACRC,IAAcD,EAAI,EAAK,GACvBE,IAAeF,EAAI,EAAK;AAE9B,IAAAG,EAAU,YAAY;AAErB,MAAI,CAACD,EAAa,SAAS,CAACD,EAAY,SACnCF,EAAM,UACH,MAAAK,EAAKhB,EAAM,OAAO,GACxBc,EAAa,QAAQ,CAACL,EAAwBE,EAAM,KAAK;AAAA,IAE3D,CACA;AACD,UAAMM,IAAS,MAAM;AACpB,MAAAJ,EAAY,QAAQ;AAAA,IAAA,GAEfK,IAAU,MAAM;AACrB,MAAAJ,EAAa,QAAQ;AAAA,IAAA;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index56.js","sources":["../src/components/BbBadge/BbBadge.vue"],"sourcesContent":["<template>\n\t<span :class=\"classes\">\n\t\t<span class=\"bb-badge__wrapper\">\n\t\t\t<slot></slot>\n\t\t\t<span class=\"bb-badge__content-container\" v-bind=\"contentAttributes\">\n\t\t\t\t<span class=\"bb-badge__content-inner\"\n\t\t\t\t\t><slot name=\"content\">{{ content }}</slot></span\n\t\t\t\t>\n\t\t\t</span>\n\t\t</span>\n\t</span>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, useSlots } from 'vue';\nimport { isCssColor } from '@/utilities/functions/isCssColor';\nimport { isNil } from '@/utilities/functions/isNil';\nimport type { CommonProps } from '@/types/CommonProps';\n\nconst slots = useSlots();\n\nexport type BbBadgeProps = Pick<CommonProps, 'color'> & {\n\t/**\n\t * Displays the badge on the bottom of the wrapped component.\n\t */\n\tbottom?: boolean;\n\t/**\n\t * Text content of the badge\n\t */\n\tcontent?: string | number | null;\n\t/**\n\t * Renders the badge i little further from the wrapped\n\t * component making it look like it's floating\n\t * and not stacked.\n\t */\n\tfloating?: boolean;\n\t/**\n\t * Displays the badge on the left of the wrapped component.\n\t */\n\tleft?: boolean;\n};\n\nconst props = withDefaults(defineProps<BbBadgeProps>(), {});\n\ndefineSlots<{\n\tdefault?: (props: object) => any;\n\tcontent?: (props: object) => any;\n}>();\n\nconst classes = computed(() => {\n\treturn {\n\t\t'bb-badge': true,\n\t\t'bb-badge--bottom': props.bottom,\n\t\t'bb-badge--left': props.left,\n\t\t'bb-badge--positioned': slots.default,\n\t\t'bb-badge--floating': props.floating,\n\t\t'bb-badge--empty': isNil(props.content),\n\t\t[`bb-badge--${props.color}`]: props.color && !isCssColor(props.color),\n\t};\n});\n\nconst contentAttributes = computed(() => {\n\tlet style: Record<string, string> = {};\n\tif (props.color && isCssColor(props.color)) {\n\t\tstyle.backgroundColor = props.color;\n\t}\n\n\tlet accessibilityAttributes: Record<string, string | boolean> = {};\n\tif (slots.wrap) {\n\t\taccessibilityAttributes['aria-atomic'] = true;\n\t\taccessibilityAttributes['aria-live'] = 'polite';\n\t\taccessibilityAttributes['role'] = 'status';\n\t}\n\treturn {\n\t\tstyle,\n\t\t...accessibilityAttributes,\n\t};\n});\n</script>\n<style lang=\"postcss\">\n@import '@/assets/css/BbBadge';\n</style>\n"],"names":["slots","useSlots","props","__props","classes","computed","isNil","isCssColor","contentAttributes","style","accessibilityAttributes"],"mappings":";;;;;;;;;;;;;AAmBA,UAAMA,IAAQC,KAuBRC,IAAQC,GAORC,IAAUC,EAAS,OACjB;AAAA,MACN,YAAY;AAAA,MACZ,oBAAoBH,EAAM;AAAA,MAC1B,kBAAkBA,EAAM;AAAA,MACxB,wBAAwBF,EAAM;AAAA,MAC9B,sBAAsBE,EAAM;AAAA,MAC5B,mBAAmBI,EAAMJ,EAAM,OAAO;AAAA,MACtC,CAAC,aAAaA,EAAM,KAAK,EAAE,GAAGA,EAAM,SAAS,CAACK,EAAWL,EAAM,KAAK;AAAA,IAAA,EAErE,GAEKM,IAAoBH,EAAS,MAAM;AACxC,UAAII,IAAgC,CAAA;AACpC,MAAIP,EAAM,SAASK,EAAWL,EAAM,KAAK,MACxCO,EAAM,kBAAkBP,EAAM;AAG/B,UAAIQ,IAA4D,CAAA;AAChE,aAAIV,EAAM,SACTU,EAAwB,aAAa,IAAI,IACzCA,EAAwB,WAAW,IAAI,UACvCA,EAAwB,OAAU,WAE5B;AAAA,QACN,OAAAD;AAAA,QACA,GAAGC;AAAA,MAAA;AAAA,IACJ,CACA;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index58.js","sources":["../src/components/BbBreadcrumbs/BbBreadcrumbs.vue"],"sourcesContent":["<template>\n\t<nav aria-label=\"Breadcrumbs\" class=\"bb-breadcrumbs\">\n\t\t<template v-for=\"(item, index) in items\" :key=\"item.key\">\n\t\t\t<span class=\"bb-breadcrumbs__breadcrumb-container\">\n\t\t\t\t<slot\n\t\t\t\t\t:disabled=\"!!(item.disabled || disabled)\"\n\t\t\t\t\t:index=\"index\"\n\t\t\t\t\t:item=\"items[index]\"\n\t\t\t\t\t:name=\"`item:prepend`\"\n\t\t\t\t\t:text=\"item.text\"\n\t\t\t\t></slot>\n\t\t\t\t<BaseButton\n\t\t\t\t\tv-bind=\"item\"\n\t\t\t\t\tclass=\"bb-breadcrumbs__breadcrumb\"\n\t\t\t\t\t:disabled=\"item.disabled || disabled\"\n\t\t\t\t>\n\t\t\t\t\t<slot\n\t\t\t\t\t\t:disabled=\"!!(item.disabled || disabled)\"\n\t\t\t\t\t\t:index=\"index\"\n\t\t\t\t\t\t:item=\"items[index]\"\n\t\t\t\t\t\t:name=\"`${item.key}`\"\n\t\t\t\t\t\t:text=\"item.text\"\n\t\t\t\t\t></slot>\n\t\t\t\t</BaseButton>\n\t\t\t\t<slot\n\t\t\t\t\t:disabled=\"!!(item.disabled || disabled)\"\n\t\t\t\t\t:index=\"index\"\n\t\t\t\t\t:item=\"items[index]\"\n\t\t\t\t\t:name=\"`item:append`\"\n\t\t\t\t\t:text=\"item.text\"\n\t\t\t\t></slot>\n\t\t\t</span>\n\t\t\t<span aria-hidden=\"true\" class=\"bb-breadcrumbs__divider\"\n\t\t\t\t><slot name=\"divider\">{{ props.divider }}</slot></span\n\t\t\t>\n\t\t</template>\n\t</nav>\n</template>\n\n<script setup lang=\"ts\">\nimport type { CommonProps } from '@/types/CommonProps';\nimport BaseButton from '../BaseButton/BaseButton.vue';\nimport type { BaseButtonProps } from '../BaseButton/BaseButton.vue';\n\nexport type Item = Omit<BaseButtonProps, 'block' | 'tag' | 'type'> & {\n\t/**\n\t * Click handler of the button\n\t */\n\tonClick?: (...args: any[]) => any;\n\t/**\n\t * Key that uniquely identifies the breadcrumb\n\t */\n\tkey: string | number;\n};\n\nexport type BbBreadcrumbsProps = Pick<CommonProps, 'disabled'> & {\n\t/**\n\t * Array of items that describe how the breadcrumbs\n\t * should behave. It is compatible with navigating\n\t * through `a` or `router-link`.\n\t */\n\titems: Item[];\n\t/**\n\t * Text content of the divider\n\t */\n\tdivider?: string;\n};\n\nconst props = withDefaults(defineProps<BbBreadcrumbsProps>(), {\n\tdivider: '/',\n});\n\ndefineSlots<\n\t{\n\t\t'item:prepend'?: (props: {\n\t\t\tdisabled: boolean;\n\t\t\tindex: number;\n\t\t\titem: Item;\n\t\t\ttext?: string;\n\t\t}) => any;\n\t\t'item:append'?: (props: {\n\t\t\tdisabled: boolean;\n\t\t\tindex: number;\n\t\t\titem: Item;\n\t\t\ttext?: string;\n\t\t}) => any;\n\t\tdivider?: (props: object) => any;\n\t} & {\n\t\t[key: string]: (props: {\n\t\t\tdisabled: boolean;\n\t\t\tindex: number;\n\t\t\titem: Item;\n\t\t\ttext?: string;\n\t\t}) => any;\n\t}\n>();\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbBreadcrumbs';\n</style>\n"],"names":["props","__props"],"mappings":";;;;;;;;;;;;;;;;;AAoEA,UAAMA,IAAQC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index6.js","sources":["../src/composables/useBroadcastChannelInstance.ts"],"sourcesContent":["import { onBeforeUnmount, ref } from 'vue';\n\ntype MessageMap = { [key: string]: any };\n\ntype Message<T extends MessageMap> = {\n\t[Name in keyof T]: T[Name] extends void\n\t\t? { type: Name }\n\t\t: { type: Name; params: T[Name] };\n}[keyof T];\n\nexport const useBroadcastChannelInstance = <T extends MessageMap>(\n\tname = 'bitboss-ui'\n) => {\n\tlet instances = 0;\n\tconst useBroadCastChannel = () => {\n\t\tinstances++;\n\n\t\tconst isClosed = ref(false);\n\t\tconst channel = ref<BroadcastChannel | undefined>();\n\t\tconst subscribers: Partial<Record<keyof T, ((...args: any[]) => any)[]>> =\n\t\t\t{};\n\n\t\tfunction post<Key extends keyof T>(message: Key, params: T[Key]): void;\n\t\tfunction post<Key extends keyof T>(message: Key, params?: never): void;\n\t\tfunction post(message: keyof T, params: any = undefined) {\n\t\t\tif (channel.value) channel.value.postMessage({ type: message, params });\n\t\t}\n\n\t\tconst close = () => {\n\t\t\tinstances--;\n\t\t\tif (channel.value && !instances) {\n\t\t\t\tchannel.value.close();\n\t\t\t}\n\t\t\tisClosed.value = true;\n\t\t};\n\n\t\tconst on = <Key extends keyof T>(\n\t\t\tmessage: Key,\n\t\t\tfn: T[Key] extends void ? () => any : (arg: T[Key]) => any,\n\t\t\toptions: {\n\t\t\t\tremoveonUnmount: boolean;\n\t\t\t} = {\n\t\t\t\tremoveonUnmount: true,\n\t\t\t}\n\t\t) => {\n\t\t\tif (subscribers[message] === undefined) subscribers[message] = [];\n\n\t\t\tsubscribers[message]?.push(fn);\n\t\t\tif (options.removeonUnmount && subscribers[message]) {\n\t\t\t\tonBeforeUnmount(() => {\n\t\t\t\t\tconst arr = subscribers[message]!;\n\t\t\t\t\tconst indexOfFn = arr.indexOf(fn);\n\t\t\t\t\tif (indexOfFn !== -1) {\n\t\t\t\t\t\tarr.splice(indexOfFn, 1);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\n\t\ttry {\n\t\t\tchannel.value = new BroadcastChannel(name);\n\n\t\t\tchannel.value.addEventListener(\n\t\t\t\t'message',\n\t\t\t\t(e: MessageEvent) => {\n\t\t\t\t\tconst data = e.data as Message<T>;\n\t\t\t\t\tconst subs = subscribers[data.type] ?? [];\n\t\t\t\t\tif ('params' in data) {\n\t\t\t\t\t\tsubs.forEach((s) => s(data.params));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsubs.forEach((s) => s());\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{ passive: true }\n\t\t\t);\n\t\t} catch (error) {\n\t\t\tconsole.error(error);\n\t\t}\n\n\t\treturn {\n\t\t\ton,\n\t\t\tpost,\n\t\t\tclose,\n\t\t};\n\t};\n\treturn { useBroadCastChannel };\n};\n"],"names":["useBroadcastChannelInstance","name","instances","isClosed","ref","channel","subscribers","post","message","params","close","on","fn","options","_a","onBeforeUnmount","arr","indexOfFn","data","subs","s","error"],"mappings":";AAUa,MAAAA,IAA8B,CAC1CC,IAAO,iBACH;AACJ,MAAIC,IAAY;AAwEhB,SAAO,EAAE,qBAvEmB,MAAM;AACjC,IAAAA;AAEM,UAAAC,IAAWC,EAAI,EAAK,GACpBC,IAAUD,KACVE,IACL,CAAA;AAIQ,aAAAC,EAAKC,GAAkBC,IAAc,QAAW;AACpD,MAAAJ,EAAQ,SAAeA,EAAA,MAAM,YAAY,EAAE,MAAMG,GAAS,QAAAC,EAAA,CAAQ;AAAA,IACvE;AAEA,UAAMC,IAAQ,MAAM;AACnB,MAAAR,KACIG,EAAQ,SAAS,CAACH,KACrBG,EAAQ,MAAM,SAEfF,EAAS,QAAQ;AAAA,IAAA,GAGZQ,IAAK,CACVH,GACAI,GACAC,IAEI;AAAA,MACH,iBAAiB;AAAA,IAAA,MAEd;;AACJ,MAAIP,EAAYE,CAAO,MAAM,WAAuBF,EAAAE,CAAO,IAAI,MAEnDM,IAAAR,EAAAE,CAAO,MAAP,QAAAM,EAAU,KAAKF,IACvBC,EAAQ,mBAAmBP,EAAYE,CAAO,KACjDO,EAAgB,MAAM;AACf,cAAAC,IAAMV,EAAYE,CAAO,GACzBS,IAAYD,EAAI,QAAQJ,CAAE;AAChC,QAAIK,MAAc,MACbD,EAAA,OAAOC,GAAW,CAAC;AAAA,MACxB,CACA;AAAA,IACF;AAGG,QAAA;AACK,MAAAZ,EAAA,QAAQ,IAAI,iBAAiBJ,CAAI,GAEzCI,EAAQ,MAAM;AAAA,QACb;AAAA,QACA,CAA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