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":"index60.js","sources":["../src/components/BbButton/BbButton.vue"],"sourcesContent":["<template>\n\t<BaseButton\n\t\tv-bind=\"propsToPass\"\n\t\t:aria-disabled=\"loading ? true : undefined\"\n\t\t:class=\"{\n\t\t\t'bb-button': true,\n\t\t\t'bb-button--loading': loading,\n\t\t\t'bb-button--icon': !!icon,\n\t\t}\"\n\t\t:disabled=\"disabled\"\n\t\t:tabindex=\"loading ? -1 : undefined\"\n\t\t@click=\"onClick\"\n\t>\n\t\t<BbSpinner class=\"bb-button__spinner\" />\n\t\t<BbIcon\n\t\t\tv-if=\"props['icon']\"\n\t\t\tclass=\"bb-button__icon\"\n\t\t\t:type=\"props['icon']\"\n\t\t/>\n\t\t<BbIcon\n\t\t\tv-else-if=\"props['prepend:icon']\"\n\t\t\tclass=\"bb-button__prepend-icon\"\n\t\t\t:type=\"props['prepend:icon']\"\n\t\t/>\n\t\t<span class=\"bb-button__content\" :class=\"{ 'sr-only': !!icon }\"\n\t\t\t><slot>{{ text }}</slot></span\n\t\t>\n\t\t<span v-if=\"loading\" class=\"bb-button__loading-label sr-only\"\n\t\t\t>caricamento</span\n\t\t>\n\n\t\t<BbIcon\n\t\t\tv-if=\"!icon && props['append:icon']\"\n\t\t\tclass=\"bb-button__append-icon\"\n\t\t\t:type=\"props['append:icon']\"\n\t\t/>\n\t</BaseButton>\n</template>\n\n<script setup lang=\"ts\">\nimport { BaseButton, BbSpinner } from '@/index';\nimport type { RouteLocationRaw } from 'vue-router';\nimport BbIcon from '../BbIcon/BbIcon.vue';\nimport { computed, ref, toRef, useAttrs } from 'vue';\nimport { pickBy } from '@/utilities/functions/pickBy';\nimport { noop } from '@/utilities/functions/noop';\n\ndefineOptions({\n\tinheritAttrs: false,\n});\n\nexport type BbButtonProps = {\n\t/**\n\t * Tracks tha loading status internally.\n\t */\n\tautoLoading?: boolean;\n\t/**\n\t * Class to apply when the link is active\n\t */\n\tactiveClass?: string;\n\n\t/**\n\t * Value passed to the attribute `aria-current` when the link is exact active.\n\t *\n\t * @defaultValue `'page'`\n\t */\n\tariaCurrentValue?:\n\t\t| 'page'\n\t\t| 'step'\n\t\t| 'location'\n\t\t| 'date'\n\t\t| 'time'\n\t\t| 'true'\n\t\t| 'false';\n\t/**\n\t * Icon to be added on the right of the text\n\t */\n\t// eslint-disable-next-line vue/prop-name-casing\n\t'append:icon'?: string;\n\t/**\n\t * Displays the component as full width.\n\t */\n\tblock?: boolean;\n\n\tdata?: object;\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Disables the click handler while the component is loading.\n\t */\n\tdisabledWhileLoading?: boolean;\n\n\t/**\n\t * Class to apply when the link is exact active\n\t */\n\texactActiveClass?: string;\n\n\theaders?: object;\n\n\t/**\n\t * Returns the hyperlink's URL.\n\t *\n\t * Can be set, to change the URL.\n\t */\n\thref?: HTMLAnchorElement['href'];\n\t/**\n\t * Used when only an icon with no text should be displayed\n\t */\n\ticon?: string;\n\n\t/**\n\t * Triggers a loading indicator\n\t */\n\tloading?: boolean;\n\n\tmethod?: 'get' | 'post' | 'put' | 'patch' | 'delete';\n\n\tonBefore?: () => void;\n\n\tonCancel?: () => void;\n\n\tonCancelToken?: (cancelToken: import('axios').CancelTokenSource) => void;\n\n\tonFinish?: () => void;\n\n\tonly?: string[];\n\n\tonProgress?: (progress: { percentage: number | undefined }) => void;\n\n\tonStart?: () => void;\n\n\tonSuccess?: () => void;\n\n\t/**\n\t * Icon to be added on the left of the text\n\t */\n\t// eslint-disable-next-line vue/prop-name-casing\n\t'prepend:icon'?: string;\n\n\tpreserveScroll?: boolean | ((props: { [key: string]: unknown }) => boolean);\n\n\tpreserveState?:\n\t\t| boolean\n\t\t| ((props: { [key: string]: unknown }) => boolean)\n\t\t| null;\n\n\tqueryStringArrayFormat?: 'brackets' | 'indices';\n\n\t/**\n\t * Sets or retrieves the relationship between the object and the destination of the link.\n\t */\n\trel?: HTMLAnchorElement['rel'];\n\n\t/**\n\t * Calls `router.replace` instead of `router.push`.\n\t */\n\treplace?: boolean;\n\n\t/**\n\t * Any HTML tag corresponding to a non-void HTMl element.\n\t */\n\ttag?: string;\n\n\t/**\n\t * Sets or retrieves the window or frame at which to target content.\n\t */\n\ttarget?: HTMLAnchorElement['target'];\n\n\t/**\n\t * Text content of the component.\n\t */\n\ttext?: string;\n\n\t/**\n\t * Route Location the link should navigate to when clicked on.\n\t */\n\tto?: RouteLocationRaw;\n\n\t/**\n\t * Gets the classification and default behavior of the button.\n\t */\n\ttype?: HTMLButtonElement['type'];\n};\nconst props = withDefaults(defineProps<BbButtonProps>(), {\n\tautoLoading: true,\n\tdisabledWhileLoading: true,\n});\n\ndefineSlots<{\n\tdefault?: (props: object) => any;\n}>();\n\nconst internalLoading = ref(0);\n\nconst loading = computed(\n\t() => props.loading || (!!internalLoading.value && props.autoLoading)\n);\n\nconst disabled = computed(() => props.disabled);\n\nconst { onClick: baseOnClick = noop, ...restAttrs } = useAttrs();\n\nconst onClick = async (...args: any[]) => {\n\tif (loading.value && props.disabledWhileLoading) return;\n\tinternalLoading.value++;\n\tawait (<(...args: any[]) => any>baseOnClick)(...args);\n\tinternalLoading.value--;\n};\n\nconst propsToPass = toRef(() => ({\n\t...pickBy(\n\t\tprops,\n\t\t(_, key) =>\n\t\t\t![\n\t\t\t\t'append:icon',\n\t\t\t\t'disabled',\n\t\t\t\t'autoLoading',\n\t\t\t\t'disabledWhileLoading',\n\t\t\t\t'icon',\n\t\t\t\t'loading',\n\t\t\t\t'prepend:icon',\n\t\t\t].includes(key)\n\t),\n\t...restAttrs,\n}));\n</script>\n<style lang=\"postcss\">\n@import '@/assets/css/BbButton';\n</style>\n"],"names":["props","__props","internalLoading","ref","loading","computed","disabled","baseOnClick","noop","restAttrs","useAttrs","onClick","args","propsToPass","toRef","pickBy","_","key"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2LA,UAAMA,IAAQC,GASRC,IAAkBC,EAAI,CAAC,GAEvBC,IAAUC;AAAA,MACf,MAAML,EAAM,WAAY,CAAC,CAACE,EAAgB,SAASF,EAAM;AAAA,IAAA,GAGpDM,IAAWD,EAAS,MAAML,EAAM,QAAQ,GAExC,EAAE,SAASO,IAAcC,GAAM,GAAGC,EAAA,IAAcC,KAEhDC,IAAU,UAAUC,MAAgB;AACrC,MAAAR,EAAQ,SAASJ,EAAM,yBACXE,EAAA,SACgB,MAAAK,EAAa,GAAGK,CAAI,GACpCV,EAAA;AAAA,IAAA,GAGXW,IAAcC,EAAM,OAAO;AAAA,MAChC,GAAGC;AAAA,QACFf;AAAA,QACA,CAACgB,GAAGC,MACH,CAAC;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QAAA,EACC,SAASA,CAAG;AAAA,MAChB;AAAA,MACA,GAAGR;AAAA,IACF,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index62.js","sources":["../src/components/BbCheckbox/BbCheckbox.vue"],"sourcesContent":["<template>\n\t<BaseInputContainer\n\t\t:id=\"id\"\n\t\tclass=\"bb-checkbox\"\n\t\t:direction=\"direction\"\n\t\t:errors=\"errors\"\n\t\t:has-errors=\"hasErrors\"\n\t\t:hide-label=\"hideLabel\"\n\t\t:hint=\"hint\"\n\t\t:input-position=\"inputPosition\"\n\t\t:label=\"label\"\n\t\t:label-position=\"labelPosition\"\n\t\t:label-tag=\"'span'\"\n\t\t:name=\"name\"\n\t\t:reverse=\"reverse\"\n\t\t:show-hint=\"showHint\"\n\t\t:tag=\"'label'\"\n\t>\n\t\t<template #label=\"data\"><slot name=\"label\" v-bind=\"data\"></slot></template>\n\t\t<template #input=\"{ id, name, hasErrors, ariaDescribedby }\">\n\t\t\t<BaseCheckbox\n\t\t\t\t:id=\"id\"\n\t\t\t\t:aria-describedby=\"ariaDescribedby\"\n\t\t\t\t:autofocus=\"autofocus\"\n\t\t\t\t:checked=\"checked\"\n\t\t\t\t:color=\"color\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t:false-value=\"falseValue\"\n\t\t\t\t:has-errors=\"hasErrors\"\n\t\t\t\t:indeterminate=\"indeterminate\"\n\t\t\t\t:model-value=\"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:submit-when-false=\"submitWhenFalse\"\n\t\t\t\t:true-value=\"trueValue\"\n\t\t\t\tv-bind=\"eventListeners\"\n\t\t\t\t><template #icon=\"data\"\n\t\t\t\t\t><slot name=\"icon\" v-bind=\"data\" :text=\"label\" /></template\n\t\t\t></BaseCheckbox>\n\t\t</template>\n\t</BaseInputContainer>\n</template>\n\n<script setup lang=\"ts\">\nimport BaseCheckbox from '../BaseCheckbox/BaseCheckbox.vue';\nimport BaseInputContainer from '../BaseInputContainer/BaseInputContainer.vue';\nimport type {\n\tBaseCheckboxEvents,\n\tSlotAttributes,\n} from '../BaseCheckbox/BaseCheckbox.vue';\nimport {\n\tref,\n\ttype HTMLAttributes,\n\ttype InputHTMLAttributes,\n\tcomputed,\n} from 'vue';\n\nexport type BbCheckboxProps = {\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Defines the input as checked\n\t */\n\tchecked?: boolean | 'true' | 'false';\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 * Direction of the layout of the component. Can either be a predefined value or a pattern separated by a space like `xx xxxxx`.\n\t */\n\tdirection?: 'horizontal' | 'vertical' | 'auto' | string;\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Can be a string or an array of string containing the messages to display.\n\t */\n\terrors?: string | string[];\n\n\t/**\n\t * Value of the input when unchecked. It handles any kind of serializable object.\n\t */\n\tfalseValue?: any;\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 * Text box to be displayed near the input, usually to indicate instructions.\n\t */\n\thint?: string;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Sets the input in an indeterminate state.\n\t */\n\tindeterminate?: InputHTMLAttributes['indeterminate'];\n\n\t/**\n\t * Sets the slignment of the input. Since inputs are inline block they can be aligned just as text can.\n\t */\n\tinputPosition?: 'left' | 'center' | 'right';\n\n\t/**\n\t * Text content of the label of the element.\n\t */\n\tlabel: string;\n\n\t/**\n\t * Sets the text alignment of the label.\n\t */\n\tlabelPosition?: 'left' | 'center' | 'right';\n\n\t/**\n\t * Used by v-model. Can be any serializable type.\n\t */\n\tmodelValue?: any;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname?: InputHTMLAttributes['name'];\n\n\t/**\n\t * Keeps the hint displayed.\n\t */\n\tpersistentHint?: boolean;\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 * Reverses the layout. Applicable in every direction the order of the label and the input is swapped.\n\t */\n\treverse?: boolean;\n\n\t/**\n\t * Will submit \"falseValue\" if the input is not checked. Otherwise \"trueValue\" will be submitted.\n\t */\n\tsubmitWhenFalse?: boolean;\n\n\t/**\n\t * Value of the input when checked. It handles any kind of serializable object.\n\t */\n\ttrueValue?: any;\n};\n\nexport type BbCheckboxEvents = BaseCheckboxEvents;\n\nconst props = withDefaults(defineProps<BbCheckboxProps>(), {\n\tdirection: 'auto',\n\treverse: true,\n\tinputPosition: 'left',\n});\n\nconst emit = defineEmits<BbCheckboxEvents>();\n\ndefineSlots<{\n\tlabel?: (props: { text: string; hasErrors: boolean }) => any;\n\ticon?: (props: SlotAttributes & { text: string }) => any;\n}>();\n\nconst active = ref(false);\nconst showHint = computed(() => props.persistentHint || active.value);\n\nconst eventListeners = {\n\tonBlur: (event: FocusEvent) => {\n\t\tactive.value = false;\n\t\temit('blur', event);\n\t},\n\tonChange: (event: Event) => emit('change', event),\n\tonClick: (event: MouseEvent) => emit('click', event),\n\tonFocus: (event: FocusEvent) => {\n\t\tactive.value = true;\n\t\temit('focus', event);\n\t},\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</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbCheckbox';\n</style>\n"],"names":["props","__props","emit","__emit","active","ref","showHint","computed","eventListeners","event","value"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoLA,UAAMA,IAAQC,GAMRC,IAAOC,GAOPC,IAASC,EAAI,EAAK,GAClBC,IAAWC,EAAS,MAAMP,EAAM,kBAAkBI,EAAO,KAAK,GAE9DI,IAAiB;AAAA,MACtB,QAAQ,CAACC,MAAsB;AAC9B,QAAAL,EAAO,QAAQ,IACfF,EAAK,QAAQO,CAAK;AAAA,MACnB;AAAA,MACA,UAAU,CAACA,MAAiBP,EAAK,UAAUO,CAAK;AAAA,MAChD,SAAS,CAACA,MAAsBP,EAAK,SAASO,CAAK;AAAA,MACnD,SAAS,CAACA,MAAsB;AAC/B,QAAAL,EAAO,QAAQ,IACfF,EAAK,SAASO,CAAK;AAAA,MACpB;AAAA,MACA,SAAS,CAACA,MAAiBP,EAAK,SAASO,CAAK;AAAA,MAC9C,WAAW,CAACA,MAAyBP,EAAK,WAAWO,CAAK;AAAA,MAC1D,aAAa,CAACA,MAAsBP,EAAK,aAAaO,CAAK;AAAA,MAC3D,WAAW,CAACA,MAAsBP,EAAK,WAAWO,CAAK;AAAA,MACvD,uBAAuB,CAACC,MAAeR,EAAK,qBAAqBQ,CAAK;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index64.js","sources":["../src/components/BbCheckboxGroup/BbCheckboxGroup.vue"],"sourcesContent":["<template>\n\t<BaseInputContainer\n\t\t:id=\"id\"\n\t\tclass=\"bb-checkbox-group\"\n\t\t:direction=\"'vertical'\"\n\t\t:errors=\"errors\"\n\t\t:has-errors=\"hasErrors\"\n\t\t:hide-label=\"hideLegend\"\n\t\t:hint=\"hint\"\n\t\t:label=\"legend\"\n\t\t:label-tag=\"'legend'\"\n\t\t:name=\"name\"\n\t\t:reverse=\"reverse\"\n\t\t:show-hint=\"showHint\"\n\t\t:tag=\"'fieldset'\"\n\t>\n\t\t<template #label=\"data\"><slot name=\"legend\" v-bind=\"data\"></slot></template>\n\t\t<template #input=\"{ id, name, hasErrors, ariaDescribedby }\">\n\t\t\t<BaseCheckboxGroup\n\t\t\t\t:id=\"id\"\n\t\t\t\t:aria-describedby=\"ariaDescribedby\"\n\t\t\t\t:autofocus=\"autofocus\"\n\t\t\t\t:color=\"color\"\n\t\t\t\t:dependencies=\"dependencies\"\n\t\t\t\t:deps-debounce-time=\"depsDebounceTime\"\n\t\t\t\t:direction=\"inputDirection\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t:enforce-coherence=\"enforceCoherence\"\n\t\t\t\t:has-errors=\"hasErrors\"\n\t\t\t\t:hide-label=\"hideLabel\"\n\t\t\t\t:item-text=\"<any>itemText\"\n\t\t\t\t:item-value=\"<any>itemValue\"\n\t\t\t\t:items=\"items\"\n\t\t\t\t:loading-text=\"loadingText\"\n\t\t\t\t:model-value=\"modelValue\"\n\t\t\t\t:model-value-debounce-time=\"modelValueDebounceTime\"\n\t\t\t\t:name=\"name\"\n\t\t\t\t:no-data-text=\"noDataText\"\n\t\t\t\t:readonly=\"readonly\"\n\t\t\t\tv-bind=\"eventListeners\"\n\t\t\t>\n\t\t\t\t<template #prepend=\"data\"\n\t\t\t\t\t><slot name=\"prepend\" v-bind=\"data\"></slot></template\n\t\t\t\t><template #loading=\"data\"\n\t\t\t\t\t><slot name=\"loading\" v-bind=\"data\"></slot></template\n\t\t\t\t><template #no-data=\"data\"\n\t\t\t\t\t><slot name=\"no-data\" v-bind=\"data\"></slot></template\n\t\t\t\t><template #option:prepend=\"data\"\n\t\t\t\t\t><slot name=\"option:prepend\" v-bind=\"data\"></slot></template\n\t\t\t\t><template #icon=\"data\"\n\t\t\t\t\t><slot name=\"icon\" v-bind=\"data\"></slot></template\n\t\t\t\t><template #label=\"data\"\n\t\t\t\t\t><slot name=\"label\" v-bind=\"data\"></slot></template\n\t\t\t\t><template #option:append=\"data\"\n\t\t\t\t\t><slot name=\"option:append\" v-bind=\"data\"></slot></template\n\t\t\t\t><template #append=\"data\"\n\t\t\t\t\t><slot name=\"append\" v-bind=\"data\"></slot\n\t\t\t\t></template>\n\t\t\t</BaseCheckboxGroup>\n\t\t</template>\n\t</BaseInputContainer>\n</template>\n\n<script setup lang=\"ts\" generic=\"T = any\">\nimport BaseCheckboxGroup from '../BaseCheckboxGroup/BaseCheckboxGroup.vue';\nimport BaseInputContainer from '../BaseInputContainer/BaseInputContainer.vue';\nimport type { BaseCheckboxGroupEvents } from '../BaseCheckboxGroup/BaseCheckboxGroup.vue';\nimport {\n\tref,\n\ttype HTMLAttributes,\n\ttype InputHTMLAttributes,\n\tcomputed,\n} from 'vue';\nimport type { NestedKeyOf } from '@/types/NestedKeyOf';\nimport type { SlotAttributes } from '../BaseCheckbox/BaseCheckbox.vue';\n\nexport type BbCheckboxGroupProps<T> = {\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 * 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 * Can be a string or an array of string containing the messages to display.\n\t */\n\terrors?: string | string[];\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 * Visually hides the legend of the fieldset while maintaining accessibility.\n\t */\n\thideLegend?: boolean;\n\n\t/**\n\t * Text box to be displayed near the input, usually to indicate instructions.\n\t */\n\thint?: string;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Defines the direction of the inputs in the fieldset\n\t */\n\tinputDirection?: 'horizontal' | 'vertical';\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 * Text content of the legend.\n\t */\n\tlegend: string;\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 an array of 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 * Keeps the hint displayed.\n\t */\n\tpersistentHint?: boolean;\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: InputHTMLAttributes['readonly'];\n\n\t/**\n\t * Reverses the layout. Applicable in every direction the order of the label and the input is swapped.\n\t */\n\treverse?: boolean;\n};\n\nexport type BbCheckboxGroupEvents = BaseCheckboxGroupEvents;\n\nconst props = withDefaults(defineProps<BbCheckboxGroupProps<T>>(), {});\n\nconst emit = defineEmits<BbCheckboxGroupEvents>();\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\tlegend?: (props: { text: string; hasErrors: boolean }) => any;\n}>();\n\nconst active = ref(false);\nconst showHint = computed(() => props.persistentHint || active.value);\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) => {\n\t\tactive.value = true;\n\t\temit('focus', event);\n\t},\n\tonInactive: () => {\n\t\tactive.value = false;\n\t\temit('inactive');\n\t},\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': (event: any) => emit('update:modelValue', event),\n};\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbCheckboxGroup';\n</style>\n"],"names":["props","__props","emit","__emit","active","ref","showHint","computed","eventListeners","event"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2NA,UAAMA,IAAQC,GAERC,IAAOC,GA+BPC,IAASC,EAAI,EAAK,GAClBC,IAAWC,EAAS,MAAMP,EAAM,kBAAkBI,EAAO,KAAK,GAE9DI,IAAiB;AAAA,MACtB,QAAQ,CAACC,MAAsBP,EAAK,QAAQO,CAAK;AAAA,MACjD,UAAU,CAACA,MAAiBP,EAAK,UAAUO,CAAK;AAAA,MAChD,SAAS,CAACA,MAAsBP,EAAK,SAASO,CAAK;AAAA,MACnD,SAAS,CAACA,MAAsB;AAC/B,QAAAL,EAAO,QAAQ,IACfF,EAAK,SAASO,CAAK;AAAA,MACpB;AAAA,MACA,YAAY,MAAM;AACjB,QAAAL,EAAO,QAAQ,IACfF,EAAK,UAAU;AAAA,MAChB;AAAA,MACA,SAAS,CAACO,MAAiBP,EAAK,SAASO,CAAK;AAAA,MAC9C,WAAW,CAACA,MAAyBP,EAAK,WAAWO,CAAK;AAAA,MAC1D,aAAa,CAACA,MAAsBP,EAAK,aAAaO,CAAK;AAAA,MAC3D,WAAW,CAACA,MAAsBP,EAAK,WAAWO,CAAK;AAAA,MACvD,uBAAuB,CAACA,MAAeP,EAAK,qBAAqBO,CAAK;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index66.js","sources":["../src/components/BbConfirm/BbConfirm.vue"],"sourcesContent":["<template>\n\t<BaseDialog\n\t\t:model-value=\"state.open || state.loading\"\n\t\t:overlay-classes=\"['bb-confirm', `bb-confirm--${state.theme}`]\"\n\t\t:size=\"state.size\"\n\t\t:title=\"state.title\"\n\t\t@update:model-value=\"onModelValueUpdate\"\n\t>\n\t\t<!-- Transparently pass all slots that are not customized -->\n\t\t<template\n\t\t\tv-for=\"name in ['header', 'title', 'close', 'description']\"\n\t\t\t#[name]=\"data\"\n\t\t>\n\t\t\t<slot :name=\"name\" v-bind=\"data\"> </slot>\n\t\t</template>\n\t\t<div v-if=\"!state.loading\" class=\"bb-confirm__content\">\n\t\t\t<div v-if=\"state.text\" class=\"bb-confirm__text\">{{ state.text }}</div>\n\t\t</div>\n\t\t<slot v-else name=\"spinner\">\n\t\t\t<div class=\"bb-confirm__spinner\">\n\t\t\t\t<BbSpinner size=\"36\" />\n\t\t\t</div>\n\t\t</slot>\n\t\t<template v-if=\"!state.loading && state.actions\" #footer=\"data\">\n\t\t\t<slot\n\t\t\t\t:actions=\"state.actions\"\n\t\t\t\t:loading=\"state.loading\"\n\t\t\t\tname=\"footer\"\n\t\t\t\t:no=\"state.no\"\n\t\t\t\t:no-action=\"noAction\"\n\t\t\t\t:yes=\"state.yes\"\n\t\t\t\t:yes-action=\"yesAction\"\n\t\t\t\tv-bind=\"data\"\n\t\t\t>\n\t\t\t\t<BbButton\n\t\t\t\t\tv-if=\"state.no\"\n\t\t\t\t\tclass=\"bb-confirm__no\"\n\t\t\t\t\t@click=\"noAction.handler\"\n\t\t\t\t>\n\t\t\t\t\t{{ noAction.text }}\n\t\t\t\t</BbButton>\n\n\t\t\t\t<BbButton\n\t\t\t\t\tv-if=\"state.yes\"\n\t\t\t\t\tclass=\"bb-confirm__yes\"\n\t\t\t\t\t@click=\"yesAction.handler\"\n\t\t\t\t>\n\t\t\t\t\t{{ yesAction.text }}\n\t\t\t\t</BbButton>\n\t\t\t</slot>\n\t\t</template>\n\t</BaseDialog>\n</template>\n\n<script setup lang=\"ts\">\nimport { actions, state } from '@/composables/useConfirm';\nimport { computed } from 'vue';\nimport BaseButton from '../BaseButton/BaseButton.vue';\nimport BaseDialog from '../BaseDialog/BaseDialog.vue';\nimport BbSpinner from '../BbSpinner/BbSpinner.vue';\nimport BbButton from '../BbButton/BbButton.vue';\n\nconst noAction = computed(() => actions.value[0]);\nconst yesAction = computed(() => actions.value[1]);\nconst onModelValueUpdate = (value: boolean) => {\n\tif (value) yesAction.value.handler();\n\telse noAction.value.handler();\n};\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbConfirm';\n</style>\n"],"names":["noAction","computed","actions","yesAction","onModelValueUpdate","value"],"mappings":";;;;;;;;;;;;;;;;;AA8DA,UAAMA,IAAWC,EAAS,MAAMC,EAAQ,MAAM,CAAC,CAAC,GAC1CC,IAAYF,EAAS,MAAMC,EAAQ,MAAM,CAAC,CAAC,GAC3CE,IAAqB,CAACC,MAAmB;AAC1C,MAAAA,IAAiBF,EAAA,MAAM,QAAQ,IAC9BH,EAAS,MAAM;IAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index68.js","sources":["../src/components/BbDatePickerInput/BbDatePickerInput.vue"],"sourcesContent":["<template>\n\t<BaseInputContainer\n\t\t:id=\"id\"\n\t\tclass=\"bb-date-picker-input\"\n\t\t:direction=\"direction\"\n\t\t:errors=\"errors\"\n\t\t:has-errors=\"hasErrors\"\n\t\t:hide-label=\"hideLabel\"\n\t\t:hint=\"hint\"\n\t\t:label=\"label\"\n\t\t:label-position=\"labelPosition\"\n\t\t:model-value=\"modelValue\"\n\t\t:name=\"name\"\n\t\t:reverse=\"reverse\"\n\t\t:show-hint=\"showHint\"\n\t>\n\t\t<template #label=\"data\"><slot name=\"label\" v-bind=\"data\"></slot></template>\n\t\t<template #input=\"{ id, name, hasErrors }\">\n\t\t\t<BaseDatePickerInput\n\t\t\t\t:id=\"id\"\n\t\t\t\t:allow-writing=\"allowWriting\"\n\t\t\t\t:append:icon=\"$props['append:icon']\"\n\t\t\t\t:autocomplete=\"autocomplete\"\n\t\t\t\t:autofocus=\"autofocus\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t:first-day-of-week=\"firstDayOfWeek\"\n\t\t\t\t:has-errors=\"hasErrors\"\n\t\t\t\t:loading=\"loading\"\n\t\t\t\t:max=\"max\"\n\t\t\t\t:min=\"min\"\n\t\t\t\t:model-value=\"modelValue\"\n\t\t\t\t:name=\"name\"\n\t\t\t\t:placeholder=\"placeholder\"\n\t\t\t\t:prepend:icon=\"$props['prepend:icon']\"\n\t\t\t\t:range=\"range\"\n\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t:required=\"required\"\n\t\t\t\t:selectable=\"selectable\"\n\t\t\t\t:width=\"width\"\n\t\t\t\tv-bind=\"eventListeners\"\n\t\t\t>\n\t\t\t</BaseDatePickerInput>\n\t\t</template>\n\t</BaseInputContainer>\n</template>\n\n<script setup lang=\"ts\">\nimport BaseDatePickerInput from '../BaseDatePickerInput/BaseDatePickerInput.vue';\nimport BaseInputContainer from '../BaseInputContainer/BaseInputContainer.vue';\nimport type { BaseDatePickerInputEvents } from '../BaseDatePickerInput/BaseDatePickerInput.vue';\nimport {\n\tref,\n\ttype HTMLAttributes,\n\ttype InputHTMLAttributes,\n\tcomputed,\n} from 'vue';\nimport type { Locale } from 'dayjs/locale/it';\n\nexport type BbDatePickerInputProps = {\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\tautocomplete?: InputHTMLAttributes['autocomplete'];\n\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Direction of the layout of the component. Can either be a predefined value or a pattern separated by a space like `xx xxxxx`.\n\t */\n\tdirection?: 'horizontal' | 'vertical' | 'auto' | string;\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Can be a string or an array of string containing the messages to display.\n\t */\n\terrors?: string | string[];\n\n\t/**\n\t * Defines the first day of the week with `0` meaning Sunday and `6` meaning Saturday\n\t */\n\tfirstDayOfWeek?: Locale['weekStart'];\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 * Text box to be displayed near the input, usually to indicate instructions.\n\t */\n\thint?: string;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Text content of the label of the element.\n\t */\n\tlabel: string;\n\n\t/**\n\t * Sets the text alignment of the label.\n\t */\n\tlabelPosition?: 'left' | 'center' | 'right';\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 * Maximum selectable date\n\t */\n\tmax?: Date | string | number;\n\n\t/**\n\t * Minimum selectable date\n\t */\n\tmin?: Date | string | number;\n\n\t/**\n\t * Used by v-model. Can be null, a single string, or an array of strings based on whether a range or single date is needed\n\t */\n\tmodelValue: string | string[] | null;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname?: InputHTMLAttributes['name'];\n\n\t/**\n\t * Keeps the hint displayed.\n\t */\n\tpersistentHint?: boolean;\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 * Selects a range of dates between two dates. It selects all of the days between start and end\n\t */\n\trange?: boolean;\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 * Reverses the layout. Applicable in every direction the order of the label and the input is swapped.\n\t */\n\treverse?: boolean;\n\n\t/**\n\t * Function that accepts a `Date` object and returns a boolean. `false` meaning the date cannot be selected\n\t * @param date\n\t */\n\tselectable?: (date: Date) => boolean;\n\n\t/**\n\t * Width of the calendar\n\t */\n\twidth?: number | string;\n};\n\nconst props = withDefaults(defineProps<BbDatePickerInputProps>(), {\n\tallowWriting: true,\n});\n\nexport type BbDatePickerInputEvents = BaseDatePickerInputEvents;\n\nconst emit = defineEmits<BbDatePickerInputEvents>();\n\ndefineSlots<{\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\tlabel?: (props: { text: string; hasErrors: boolean }) => any;\n}>();\n\nconst active = ref(false);\nconst showHint = computed(() => props.persistentHint || active.value);\n\n/**\n * These events are just propagated\n */\nconst eventListeners = {\n\tonError: (message: string) => emit('error', message),\n\tonFocus: (event: FocusEvent) => emit('focus', event),\n\tonActive: () => {\n\t\tactive.value = true;\n\t\temit('active');\n\t},\n\tonInactive: () => {\n\t\tactive.value = false;\n\t\temit('inactive');\n\t},\n\t'onUpdate:modelValue': (value: BbDatePickerInputProps['modelValue']) =>\n\t\temit('update:modelValue', value),\n};\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbDatePickerInput';\n</style>\n"],"names":["props","__props","emit","__emit","active","ref","showHint","computed","eventListeners","message","event","value"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4MA,UAAMA,IAAQC,GAMRC,IAAOC,GAUPC,IAASC,EAAI,EAAK,GAClBC,IAAWC,EAAS,MAAMP,EAAM,kBAAkBI,EAAO,KAAK,GAK9DI,IAAiB;AAAA,MACtB,SAAS,CAACC,MAAoBP,EAAK,SAASO,CAAO;AAAA,MACnD,SAAS,CAACC,MAAsBR,EAAK,SAASQ,CAAK;AAAA,MACnD,UAAU,MAAM;AACf,QAAAN,EAAO,QAAQ,IACfF,EAAK,QAAQ;AAAA,MACd;AAAA,MACA,YAAY,MAAM;AACjB,QAAAE,EAAO,QAAQ,IACfF,EAAK,UAAU;AAAA,MAChB;AAAA,MACA,uBAAuB,CAACS,MACvBT,EAAK,qBAAqBS,CAAK;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index7.js","sources":["../src/composables/useConfirm.ts"],"sourcesContent":["import { computed, reactive, ref, watch } from 'vue';\nimport { isNil } from '@/utilities/functions/isNil';\nimport type { Sizes } from '@/components/BaseDialog/BaseDialog.vue';\n\ntype State = {\n\tdescription: string;\n\ttheme: string;\n\tloading: boolean;\n\tnoText: string;\n\topen: boolean;\n\ttext: string;\n\ttitle: string;\n\tyesText: string;\n\tyes: boolean;\n\tno: boolean;\n\tactions: boolean;\n\tsize: keyof Sizes;\n};\n\ntype UserOptions = {\n\t/**\n\t * Boolean that sets whether to display or hide the buttons.\n\t * Confirms without actions can only be dismissed by clicking on the overlay or the close button.\n\t */\n\tactions?: State['actions'];\n\t/**\n\t * Description of the content of the modal for accessibility purposes.\n\t */\n\tdescription?: State['description'];\n\t/**\n\t * Boolean that defines whether to display or hide the \"No\" action.\n\t */\n\tno?: State['no'];\n\t/**\n\t * Text content of the \"No\" action.\n\t */\n\tnoText?: State['noText'];\n\t/**\n\t * Text content of the modal.\n\t */\n\ttext: State['text'];\n\t/**\n\t * The name of the theme it applies a css class to BbConfirm for styling.\n\t */\n\ttheme?: State['theme'];\n\t/**\n\t * Tittle of the modal\n\t */\n\ttitle: State['title'];\n\t/**\n\t * Boolean that defines whether to display or hide the \"Yes\" action.\n\t */\n\tyes?: State['yes'];\n\t/**\n\t * Text content of the \"Yes\" action.\n\t */\n\tyesText?: State['yesText'];\n\t/**\n\t * Size of the confirm modal. Use any sizes valid for `BbModal`.\n\t */\n\tsize?: State['size'];\n};\n\n// Stash all instances of current dialogs\nlet subscribers: ((...args: any[]) => any)[] = [];\n\nconst value = ref<boolean | null>(null);\n\nwatch(\n\t() => value.value,\n\t() => {\n\t\tif (typeof value.value === 'boolean') {\n\t\t\t// Every time a dialog is resolved resolve all dialogs\n\t\t\tsubscribers.forEach((fn) => fn());\n\t\t\tsubscribers = [];\n\t\t}\n\t}\n);\n\nconst defaultState: State = {\n\tactions: true,\n\tdescription: '',\n\tloading: false,\n\tno: true,\n\tnoText: '',\n\topen: false,\n\tsize: 'sm',\n\ttext: '',\n\ttheme: 'default',\n\ttitle: '',\n\tyes: true,\n\tyesText: '',\n};\nconst defaultOption: UserOptions = {\n\tactions: true,\n\tdescription: '',\n\tno: true,\n\tnoText: 'Annulla',\n\ttext: '',\n\ttheme: 'default',\n\ttitle: '',\n\tyes: true,\n\tyesText: 'OK',\n};\n\nexport const state = reactive<State>({\n\t...defaultState,\n});\n\nexport const actions = computed(() => [\n\t{\n\t\ttext: state.noText,\n\t\thandler: () => {\n\t\t\tvalue.value = false;\n\t\t},\n\t},\n\t{\n\t\ttext: state.yesText,\n\t\thandler: () => {\n\t\t\tvalue.value = true;\n\t\t},\n\t},\n]);\n\nexport const useConfirm = () => {\n\treturn {\n\t\t/**\n\t\t * The confirm function. It accepts a set of options defining\n\t\t * the behavior of the modal and returns `Promise<boolean>`\n\t\t * when the user accepts, declines, or ignores the modal.\n\t\t */\n\t\tconfirm: (options: UserOptions) => {\n\t\t\tvalue.value = null;\n\t\t\tconst newOptions = { ...defaultOption, ...options };\n\t\t\tconst newState = { ...defaultState };\n\t\t\tnewState.title = newOptions.title;\n\t\t\tnewState.text = newOptions.text;\n\t\t\tif (newOptions.description) newState.description = newOptions.description;\n\t\t\tif (newOptions.noText) newState.noText = newOptions.noText;\n\t\t\tif (newOptions.yesText) newState.yesText = newOptions.yesText;\n\t\t\tif (newOptions.size) newState.size = newOptions.size;\n\t\t\tif (newOptions.theme) newState.theme = newOptions.theme;\n\t\t\tif (!isNil(newOptions.yes)) newState.yes = !!newOptions.yes;\n\t\t\tif (!isNil(newOptions.no)) newState.no = !!newOptions.no;\n\t\t\tif (!isNil(newOptions.actions)) newState.actions = !!newOptions.actions;\n\n\t\t\tstate.actions = newState.actions;\n\t\t\tstate.description = newState.description;\n\t\t\tstate.no = newState.no;\n\t\t\tstate.noText = newState.noText;\n\t\t\tstate.open = true;\n\t\t\tstate.size = newState.size;\n\t\t\tstate.text = newState.text;\n\t\t\tstate.theme = newState.theme;\n\t\t\tstate.title = newState.title;\n\t\t\tstate.yes = newState.yes;\n\t\t\tstate.yesText = newState.yesText;\n\n\t\t\treturn new Promise<boolean>((resolve) => {\n\t\t\t\tsubscribers.push(() => resolve(value.value as boolean));\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t * Sets the state of the confirm to loading and displays a spinner.\n\t\t */\n\t\tsetLoading: (value: boolean = true) => {\n\t\t\tstate.loading = value;\n\t\t},\n\t\t/**\n\t\t * Closes the confirmation modal. It is a manual operation\n\t\t * so you can update the state while the modal is still open.\n\t\t */\n\t\tclose: () => {\n\t\t\tstate.description = defaultState.description;\n\t\t\tstate.loading = defaultState.loading;\n\t\t\tstate.noText = defaultState.noText;\n\t\t\tstate.open = defaultState.open;\n\t\t\tstate.text = defaultState.text;\n\t\t\tstate.theme = defaultState.theme;\n\t\t\tstate.title = defaultState.title;\n\t\t\tstate.yesText = defaultState.yesText;\n\t\t\tvalue.value = false;\n\t\t\treturn Promise.resolve().then(() => {\n\t\t\t\tvalue.value = null;\n\t\t\t});\n\t\t},\n\t};\n};\n"],"names":["subscribers","value","ref","watch","fn","defaultState","defaultOption","state","reactive","actions","computed","useConfirm","options","newOptions","newState","isNil","resolve"],"mappings":";;AAgEA,IAAIA,IAA2C,CAAA;AAE/C,MAAMC,IAAQC,EAAoB,IAAI;AAEtCC;AAAA,EACC,MAAMF,EAAM;AAAA,EACZ,MAAM;AACD,IAAA,OAAOA,EAAM,SAAU,cAE1BD,EAAY,QAAQ,CAACI,MAAOA,EAAI,CAAA,GAChCJ,IAAc,CAAA;AAAA,EAEhB;AACD;AAEA,MAAMK,IAAsB;AAAA,EAC3B,SAAS;AAAA,EACT,aAAa;AAAA,EACb,SAAS;AAAA,EACT,IAAI;AAAA,EACJ,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,EACP,OAAO;AAAA,EACP,KAAK;AAAA,EAC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ASO,EAAS,QACxBP,EAAM,OAAO,IACbA,EAAM,OAAOO,EAAS,MACtBP,EAAM,OAAOO,EAAS,MACtBP,EAAM,QAAQO,EAAS,OACvBP,EAAM,QAAQO,EAAS,OACvBP,EAAM,MAAMO,EAAS,KACrBP,EAAM,UAAUO,EAAS,SAElB,IAAI,QAAiB,CAACE,MAAY;AACxC,MAAAhB,EAAY,KAAK,MAAMgB,EAAQf,EAAM,KAAgB,CAAC;AAAA,IAAA,CACtD;AAAA,EACF;AAAA;AAAA;AAAA;AAAA,EAIA,YAAY,CAACA,IAAiB,OAAS;AACtC,IAAAM,EAAM,UAAUN;AAAAA,EACjB;AAAA;AAAA;AAAA;AAAA;AAAA,EAKA,OAAO,OACNM,EAAM,cAAcF,EAAa,aACjCE,EAAM,UAAUF,EAAa,SAC7BE,EAAM,SAASF,EAAa,QAC5BE,EAAM,OAAOF,EAAa,MAC1BE,EAAM,OAAOF,EAAa,MAC1BE,EAAM,QAAQF,EAAa,OAC3BE,EAAM,QAAQF,EAAa,OAC3BE,EAAM,UAAUF,EAAa,SAC7BJ,EAAM,QAAQ,IACP,QAAQ,UAAU,KAAK,MAAM;AACnC,IAAAA,EAAM,QAAQ;AAAA,EAAA,CACd;AACF;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index70.js","sources":["../src/components/BbDialog/BbDialog.vue"],"sourcesContent":["<template>\n\t<!-- Events need to be propagated manually -->\n\t<BaseDialog\n\t\tv-bind=\"$props\"\n\t\t:overlay-classes=\"overlayClasses\"\n\t\t@hidden=\"() => $emit('hidden')\"\n\t\t@shown=\"() => $emit('shown')\"\n\t\t@update:model-value=\"(value: boolean) => $emit('update:modelValue', value)\"\n\t\t><template #close=\"data\"><slot name=\"close\" v-bind=\"data\" /></template\n\t\t><template #default=\"data\"><slot name=\"default\" v-bind=\"data\" /></template\n\t\t><template #description=\"data\"\n\t\t\t><slot name=\"description\" v-bind=\"data\" /></template\n\t\t><template #footer=\"data\"><slot name=\"footer\" v-bind=\"data\" /></template\n\t\t><template #header=\"data\"><slot name=\"header\" v-bind=\"data\" /></template\n\t\t><template #title=\"data\"><slot name=\"title\" v-bind=\"data\" /></template>\n\t</BaseDialog>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport BaseDialog from '../BaseDialog/BaseDialog.vue';\nimport type { Classes } from '@/types/Classes';\nimport type {\n\tBaseDialogProps,\n\tBaseDialogEvents,\n\tBaseDialogSlots,\n} from '../BaseDialog/BaseDialog.vue';\nexport type {\n\tBaseDialogProps as BbDialogProps,\n\tBaseDialogEvents as BbDialogEvents,\n\tSizes,\n} from '../BaseDialog/BaseDialog.vue';\n\nconst props = withDefaults(defineProps<BaseDialogProps>(), {\n\tshowClose: true,\n});\n\ndefineEmits<BaseDialogEvents>();\n\ndefineSlots<BaseDialogSlots>();\n\nconst overlayClasses = computed<Classes>(() => {\n\tlet base: Classes = ['bb-dialog'];\n\tif (props.overlayClasses) {\n\t\tbase = base.concat(props.overlayClasses);\n\t}\n\treturn base;\n});\n</script>\n<style lang=\"postcss\">\n@import '@/assets/css/BbDialog';\n</style>\n"],"names":["props","__props","overlayClasses","computed","base"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,UAAMA,IAAQC,GAQRC,IAAiBC,EAAkB,MAAM;AAC1C,UAAAC,IAAgB,CAAC,WAAW;AAChC,aAAIJ,EAAM,mBACFI,IAAAA,EAAK,OAAOJ,EAAM,cAAc,IAEjCI;AAAA,IAAA,CACP;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index72.js","sources":["../src/components/BbDropdown/BbDropdown.vue"],"sourcesContent":["<template>\n\t<span class=\"bb-dropdown\" v-bind=\"attributes\">\n\t\t<span ref=\"wrapper\" class=\"bb-dropdown__wrapper\">\n\t\t\t<slot\n\t\t\t\tname=\"activator\"\n\t\t\t\tv-bind=\"{\n\t\t\t\t\tprops: {\n\t\t\t\t\t\t'aria-expanded': open,\n\t\t\t\t\t\t'aria-controls': `menu_${id}`,\n\t\t\t\t\t\tid,\n\t\t\t\t\t\tonClick,\n\t\t\t\t\t\tonKeydown,\n\t\t\t\t\t\tdisabled,\n\t\t\t\t\t},\n\t\t\t\t\tclosed: closed,\n\t\t\t\t\tclosing: closing,\n\t\t\t\t\tdisabled: disabled,\n\t\t\t\t\topen: open,\n\t\t\t\t\topening: opening,\n\t\t\t\t\tplacement: placement,\n\t\t\t\t}\"\n\t\t\t></slot>\n\t\t</span>\n\t\t<CommonFloating\n\t\t\tv-if=\"hasOpenedOnce || eager\"\n\t\t\t:arrow-padding=\"arrowPadding\"\n\t\t\tbase-class=\"bb-dropdown\"\n\t\t\t:container-attributes=\"{\n\t\t\t\tid: `menu_${id}`,\n\t\t\t\t'aria-labelledby': id,\n\t\t\t\t'aria-role': 'menu',\n\t\t\t}\"\n\t\t\t:eager=\"eager\"\n\t\t\t:offset=\"offset\"\n\t\t\t:open=\"open\"\n\t\t\t:padding=\"padding\"\n\t\t\t:placement=\"placement\"\n\t\t\t:theme=\"theme\"\n\t\t\t:transition-duration=\"transitionDuration\"\n\t\t\t:wrapper=\"wrapper\"\n\t\t>\n\t\t\t<span\n\t\t\t\tref=\"content\"\n\t\t\t\tclass=\"bb-dropdown__items-container\"\n\t\t\t\t:style=\"{ width: `${width}px` }\"\n\t\t\t>\n\t\t\t\t<slot\n\t\t\t\t\t:closed=\"closed\"\n\t\t\t\t\t:closing=\"closing\"\n\t\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t\tname=\"prepend\"\n\t\t\t\t\t:open=\"open\"\n\t\t\t\t\t:opening=\"opening\"\n\t\t\t\t\t:placement=\"placement\"\n\t\t\t\t></slot>\n\t\t\t\t<template v-for=\"(item, index) in mappedItems\" :key=\"item.key\">\n\t\t\t\t\t<slot\n\t\t\t\t\t\t:closed=\"closed\"\n\t\t\t\t\t\t:closing=\"closing\"\n\t\t\t\t\t\t:disabled=\"item.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:prepend`\"\n\t\t\t\t\t\t:open=\"open\"\n\t\t\t\t\t\t:opening=\"opening\"\n\t\t\t\t\t\t:placement=\"placement\"\n\t\t\t\t\t\t:text=\"item.text\"\n\t\t\t\t\t></slot>\n\t\t\t\t\t<BaseButton\n\t\t\t\t\t\t:aria-role=\"'menuitem'\"\n\t\t\t\t\t\tclass=\"bb-dropdown__item\"\n\t\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t\t'bb-dropdown__item--first': index === 0,\n\t\t\t\t\t\t\t'bb-dropdown__item--last': index === items.length - 1,\n\t\t\t\t\t\t}\"\n\t\t\t\t\t\t:data-dropdown-item=\"true\"\n\t\t\t\t\t\tv-bind=\"item\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t:closed=\"closed\"\n\t\t\t\t\t\t\t:closing=\"closing\"\n\t\t\t\t\t\t\t:disabled=\"item.disabled\"\n\t\t\t\t\t\t\t:index=\"index\"\n\t\t\t\t\t\t\t:item=\"item\"\n\t\t\t\t\t\t\t:name=\"item.key\"\n\t\t\t\t\t\t\t:open=\"open\"\n\t\t\t\t\t\t\t:opening=\"opening\"\n\t\t\t\t\t\t\t:placement=\"placement\"\n\t\t\t\t\t\t\t:text=\"item.text\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t\t:closed=\"closed\"\n\t\t\t\t\t\t\t\t:closing=\"closing\"\n\t\t\t\t\t\t\t\t:disabled=\"item.disabled\"\n\t\t\t\t\t\t\t\t:index=\"index\"\n\t\t\t\t\t\t\t\t:item=\"item\"\n\t\t\t\t\t\t\t\tname=\"item\"\n\t\t\t\t\t\t\t\t:open=\"open\"\n\t\t\t\t\t\t\t\t:opening=\"opening\"\n\t\t\t\t\t\t\t\t:placement=\"placement\"\n\t\t\t\t\t\t\t\t:text=\"item.text\"\n\t\t\t\t\t\t\t></slot>\n\t\t\t\t\t\t</slot> </BaseButton\n\t\t\t\t\t><slot\n\t\t\t\t\t\t:closed=\"closed\"\n\t\t\t\t\t\t:closing=\"closing\"\n\t\t\t\t\t\t:disabled=\"item.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:append`\"\n\t\t\t\t\t\t:open=\"open\"\n\t\t\t\t\t\t:opening=\"opening\"\n\t\t\t\t\t\t:placement=\"placement\"\n\t\t\t\t\t\t:text=\"item.text\"\n\t\t\t\t\t></slot>\n\t\t\t\t</template>\n\t\t\t\t<slot\n\t\t\t\t\t:closed=\"closed\"\n\t\t\t\t\t:closing=\"closing\"\n\t\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t\tname=\"append\"\n\t\t\t\t\t:open=\"open\"\n\t\t\t\t\t:opening=\"opening\"\n\t\t\t\t\t:placement=\"placement\"\n\t\t\t\t></slot>\n\t\t\t</span>\n\t\t</CommonFloating>\n\t</span>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, defineAsyncComponent, ref } from 'vue';\nimport { findRightIndex } from '@/utilities/functions/findRightIndex';\nimport { useId } from '@/composables/useId';\nimport { wait } from '@/utilities/functions/wait';\nimport { useIntersectionObserver } from '@vueuse/core';\nimport BaseButton from '../BaseButton/BaseButton.vue';\nimport selectors from 'focusable-selectors';\nimport type { BaseButtonProps } from '../BaseButton/BaseButton.vue';\nimport type { CommonProps } from '@/types/CommonProps';\n\nconst CommonFloating = defineAsyncComponent(\n\t() => import('../CommonFloating.vue')\n);\n\nexport type BbDropdownProps = Pick<\n\tCommonProps,\n\t| 'arrowPadding'\n\t| 'block'\n\t| 'disabled'\n\t| 'eager'\n\t| 'id'\n\t| 'offset'\n\t| 'padding'\n\t| 'placement'\n\t| 'theme'\n\t| 'transitionDuration'\n> & {\n\t/**\n\t * Array used to render each dropdown button.\n\t * They can act as `button`, as `a`, or as `router-link`\n\t * as they are based on the functionality provided by\n\t * `BaseButton`\n\t */\n\titems: Item[];\n\t/**\n\t * Width of the dropdown in pixels.\n\t */\n\twidth?: number;\n};\n\ndefineSlots<\n\t{\n\t\tactivator?: (props: {\n\t\t\tprops: {\n\t\t\t\t'aria-expanded': boolean;\n\t\t\t\t'aria-controls': string;\n\t\t\t\tid: string;\n\t\t\t\tonClick: MappedItem['onClick'];\n\t\t\t\tonKeydown: MappedItem['onKeydown'];\n\t\t\t\tdisabled?: BbDropdownProps['disabled'];\n\t\t\t};\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: boolean;\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownProps['placement'];\n\t\t}) => any;\n\t\tprepend?: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: boolean;\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownProps['placement'];\n\t\t}) => any;\n\t\t'item:prepend'?: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: MappedItem['disabled'];\n\t\t\tindex: number;\n\t\t\titem: BbDropdownProps['items'][number];\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownProps['placement'];\n\t\t\ttext: MappedItem['text'];\n\t\t}) => any;\n\t\titem?: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: MappedItem['disabled'];\n\t\t\tindex: number;\n\t\t\titem: BbDropdownProps['items'][number];\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownProps['placement'];\n\t\t\ttext: MappedItem['text'];\n\t\t}) => any;\n\t\t'item:append'?: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: MappedItem['disabled'];\n\t\t\tindex: number;\n\t\t\titem: BbDropdownProps['items'][number];\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownProps['placement'];\n\t\t\ttext: MappedItem['text'];\n\t\t}) => any;\n\t\tappend?: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: boolean;\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownProps['placement'];\n\t\t}) => any;\n\t} & {\n\t\t[key: string]: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: MappedItem['disabled'];\n\t\t\tindex: number;\n\t\t\titem: BbDropdownProps['items'][number];\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownProps['placement'];\n\t\t\ttext: MappedItem['text'];\n\t\t}) => any;\n\t}\n>();\n\nexport type Item = Omit<BaseButtonProps, 'block' | 'tag' | 'type'> & {\n\t/**\n\t * Click handler of the item.\n\t */\n\tonClick?: (...args: any[]) => any;\n\t/**\n\t * Key used to identify the element.\n\t */\n\tkey: string;\n};\n\nexport type MappedItem = Item & {\n\t/**\n\t * Identifier of the element among it's siblings.\n\t */\n\tid: string;\n\t/**\n\t * Keydown event used to handle accessibility.\n\t */\n\tonKeydown: (event: KeyboardEvent) => void;\n};\n\nconst props = withDefaults(defineProps<BbDropdownProps>(), {\n\tarrowPadding: 10,\n\tplacement: 'bottom',\n\ttheme: 'default',\n\ttransitionDuration: 300,\n\twidth: 200,\n\tpadding: 6,\n\toffset: 3,\n});\n\nconst id = props.id ?? `bb_${useId().id.value}`;\n\nconst mappedItems = computed<MappedItem[]>(() => {\n\tlet firstFocusableIndex: number = props.items.findIndex((el) => !el.disabled);\n\tlet lastFocusableIndex: number = findRightIndex(\n\t\tprops.items,\n\t\t(item) => !item.disabled\n\t);\n\n\treturn props.items.map((item, index) => {\n\t\tconst itemid = `${id}-item-${item.key}`;\n\t\tconst { onClick: handler, ...rest } = item;\n\n\t\t/* Id a click handler has been passed close the dropdown\n\t\t * return focus and run the handler\n\t\t */\n\t\tconst onClick = async () => {\n\t\t\tawait closeDropdown();\n\t\t\tconst nextElement = document.querySelector(`#${id}`);\n\t\t\tif (!nextElement) return;\n\t\t\telse if (nextElement instanceof HTMLElement) {\n\t\t\t\tnextElement.focus();\n\t\t\t}\n\t\t\tif (handler) handler();\n\t\t};\n\n\t\t/**\n\t\t * On keydown\n\t\t * arrow down move to the next focusable element if it's not the last\n\t\t * arrow up move to the previous focusable element if it's not the first\n\t\t * on tab search the next focusable element after the button that opens the dropdown\n\t\t * if an element is found focus on that\n\t\t * (the menu is attached to body so it's not in order)\n\t\t */\n\t\tconst onKeydown = (event: KeyboardEvent) => {\n\t\t\tif (\n\t\t\t\tevent.target instanceof HTMLElement &&\n\t\t\t\tevent.target.dataset['dropdownItem']\n\t\t\t) {\n\t\t\t\tif (!content.value) return;\n\t\t\t\tif (event.key === 'ArrowDown') {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tif (content.value && index !== lastFocusableIndex) {\n\t\t\t\t\t\tconst option = content.value.querySelector(\n\t\t\t\t\t\t\tselectors.map((selector) => `#${itemid} ~ ${selector}`).join(',')\n\t\t\t\t\t\t);\n\t\t\t\t\t\tif (option && option instanceof HTMLElement) {\n\t\t\t\t\t\t\toption.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (event.key === 'ArrowUp') {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tif (content.value && index !== firstFocusableIndex) {\n\t\t\t\t\t\tconst indexOfPrevious = findRightIndex(props.items, (item, i) => {\n\t\t\t\t\t\t\treturn i < index && !item.disabled;\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tconst options = Array.from(\n\t\t\t\t\t\t\tcontent.value.querySelectorAll(`.bb-dropdown__item`)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\tconst option = options[indexOfPrevious];\n\n\t\t\t\t\t\tif (option && option instanceof HTMLElement) {\n\t\t\t\t\t\t\toption.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else if (event.key === 'Tab') {\n\t\t\t\t\tif (index === lastFocusableIndex && !event.shiftKey) {\n\t\t\t\t\t\tconst selector = selectors.join(',');\n\t\t\t\t\t\tconst focusableElements = Array.from(\n\t\t\t\t\t\t\tdocument.querySelectorAll(selector)\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst indexOfButton = focusableElements.findIndex(\n\t\t\t\t\t\t\t(el) => el.id === id\n\t\t\t\t\t\t);\n\t\t\t\t\t\tconst nextElement = focusableElements[indexOfButton + 1];\n\t\t\t\t\t\tif (!nextElement) return;\n\t\t\t\t\t\telse if (nextElement instanceof HTMLElement) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tcloseDropdown();\n\t\t\t\t\t\t\tnextElement.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (index === firstFocusableIndex && event.shiftKey) {\n\t\t\t\t\t\tconst nextElement = document.querySelector(`#${id}`);\n\t\t\t\t\t\tif (!nextElement) return;\n\t\t\t\t\t\telse if (nextElement instanceof HTMLElement) {\n\t\t\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\t\t\tnextElement.focus();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\treturn {\n\t\t\t...rest,\n\t\t\tdisabled: rest.disabled || props.disabled,\n\t\t\tid: itemid,\n\t\t\tonClick,\n\t\t\tonKeydown,\n\t\t};\n\t});\n});\n\nconst wrapper = ref<any>();\nconst content = ref<HTMLElement>();\n\nuseIntersectionObserver(\n\twrapper,\n\t([{ intersectionRatio }]) => {\n\t\tif (intersectionRatio !== 1 && open.value) closeDropdown();\n\t},\n\t{ threshold: [0, 1] }\n);\n\nconst opening = ref(false);\nconst open = ref(false);\nconst closing = ref(false);\nconst closed = ref(true);\n\n/* On click of the trigger attach elements */\nconst onClick = () => {\n\tif (opening.value || closing.value) return;\n\tif (open.value) {\n\t\tcloseDropdown();\n\t} else {\n\t\topenDropdown();\n\t}\n};\n\nconst onKeydown = async (event: KeyboardEvent) => {\n\tlet firstFocusableIndex: number = props.items.findIndex((el) => !el.disabled);\n\tlet lastFocusableIndex: number = findRightIndex(\n\t\tprops.items,\n\t\t(item) => !item.disabled\n\t);\n\tif (event.key === 'ArrowDown') {\n\t\tevent.preventDefault();\n\t\tif (closing.value || opening.value) return;\n\t\tif (closed.value) {\n\t\t\tawait openDropdown();\n\t\t}\n\t\tif (\n\t\t\tcontent.value &&\n\t\t\tmappedItems.value.length &&\n\t\t\tfirstFocusableIndex !== -1\n\t\t) {\n\t\t\tconst idToFocus = mappedItems.value[firstFocusableIndex].id;\n\t\t\tconst option = content.value.querySelector(`#${idToFocus}`);\n\t\t\tif (option && option instanceof HTMLElement) {\n\t\t\t\toption.focus();\n\t\t\t}\n\t\t}\n\t} else if (event.key === 'ArrowUp') {\n\t\tevent.preventDefault();\n\t\tif (closing.value || opening.value) return;\n\t\tif (closed.value) {\n\t\t\tawait openDropdown();\n\t\t}\n\t\tif (\n\t\t\tcontent.value &&\n\t\t\tmappedItems.value.length &&\n\t\t\tlastFocusableIndex !== -1\n\t\t) {\n\t\t\tconst idToFocus = mappedItems.value[lastFocusableIndex].id;\n\t\t\tconst option = content.value.querySelector(`#${idToFocus}`);\n\t\t\tif (option && option instanceof HTMLElement) {\n\t\t\t\toption.focus();\n\t\t\t}\n\t\t}\n\t} else if (event.key === 'Tab') {\n\t\tif (open.value && !event.shiftKey) {\n\t\t\tevent.preventDefault();\n\t\t\tif (\n\t\t\t\tcontent.value &&\n\t\t\t\tmappedItems.value.length &&\n\t\t\t\tfirstFocusableIndex !== -1\n\t\t\t) {\n\t\t\t\tconst idToFocus = mappedItems.value[firstFocusableIndex].id;\n\t\t\t\tconst option = content.value.querySelector(`#${idToFocus}`);\n\t\t\t\tif (option && option instanceof HTMLElement) {\n\t\t\t\t\toption.focus();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\n\nconst onClickDocument = (event: Event) => {\n\tconst target = event.target;\n\tif (!target) return;\n\tif (target instanceof HTMLElement) {\n\t\tlet isOutside = true;\n\n\t\tif (wrapper.value) {\n\t\t\tif (wrapper.value.contains(target)) {\n\t\t\t\tisOutside = false;\n\t\t\t}\n\t\t}\n\t\tif (content.value) {\n\t\t\tif (content.value.contains(target)) {\n\t\t\t\tisOutside = false;\n\t\t\t}\n\t\t}\n\n\t\tif (isOutside) {\n\t\t\tcloseDropdown();\n\t\t}\n\t}\n};\n\nconst onDocumentFocus = (event: FocusEvent) => {\n\tconst target = event.target;\n\tif (!target) return;\n\tif (target instanceof HTMLElement) {\n\t\tlet isOutside = true;\n\n\t\tif (wrapper.value) {\n\t\t\tif (wrapper.value.contains(target)) {\n\t\t\t\tisOutside = false;\n\t\t\t}\n\t\t}\n\t\tif (content.value) {\n\t\t\tif (content.value.contains(target)) {\n\t\t\t\tisOutside = false;\n\t\t\t}\n\t\t}\n\n\t\tif (isOutside) {\n\t\t\tcloseDropdown();\n\t\t}\n\t}\n};\n\nconst onEsc = (event: KeyboardEvent) => {\n\tif (open.value) {\n\t\tif (event.key === 'Escape') {\n\t\t\tif (document.activeElement?.id !== id) {\n\t\t\t\tconst button = document.querySelector(`#${id}`);\n\t\t\t\tif (button instanceof HTMLElement) {\n\t\t\t\t\tbutton.focus();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcloseDropdown();\n\t\t}\n\t}\n};\nconst hasOpenedOnce = ref(false);\nconst openDropdown = async () => {\n\thasOpenedOnce.value = true;\n\tawait wait(50);\n\topen.value = true;\n\t/* Attach listeners to document so we don't have to track them one by one */\n\tdocument.addEventListener('click', onClickDocument, { passive: true });\n\tdocument.addEventListener('focusin', onDocumentFocus, { passive: true });\n\tdocument.addEventListener('keydown', onEsc, { passive: true });\n};\n\nconst closeDropdown = async () => {\n\topen.value = false;\n\tdocument.removeEventListener('click', onClickDocument);\n\tdocument.removeEventListener('focusin', onDocumentFocus);\n\tdocument.removeEventListener('keydown', onEsc);\n};\n\nconst attributes = computed(() => {\n\tconst classes = {\n\t\t'bb-dropdown--block': props.block,\n\t\t[`bb-dropdown--theme-${props.theme}`]: props.theme,\n\t};\n\treturn {\n\t\tclass: classes,\n\t};\n});\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbDropdown';\n</style>\n"],"names":["CommonFloating","defineAsyncComponent","props","__props","id","useId","mappedItems","computed","firstFocusableIndex","el","lastFocusableIndex","findRightIndex","item","index","itemid","handler","rest","onClick","closeDropdown","nextElement","onKeydown","event","content","option","selectors","selector","indexOfPrevious","i","focusableElements","indexOfButton","wrapper","ref","useIntersectionObserver","intersectionRatio","open","opening","closing","closed","openDropdown","idToFocus","onClickDocument","target","isOutside","onDocumentFocus","onEsc","_a","button","hasOpenedOnce","wait","attributes"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA6IA,UAAMA,IAAiBC;AAAA,MACtB,MAAM,OAAO,eAAuB;AAAA,IAAA,GAqI/BC,IAAQC,GAURC,IAAKF,EAAM,MAAM,MAAMG,KAAQ,GAAG,KAAK,IAEvCC,IAAcC,EAAuB,MAAM;AAC5C,UAAAC,IAA8BN,EAAM,MAAM,UAAU,CAACO,MAAO,CAACA,EAAG,QAAQ,GACxEC,IAA6BC;AAAA,QAChCT,EAAM;AAAA,QACN,CAACU,MAAS,CAACA,EAAK;AAAA,MAAA;AAGjB,aAAOV,EAAM,MAAM,IAAI,CAACU,GAAMC,MAAU;AACvC,cAAMC,IAAS,GAAGV,CAAE,SAASQ,EAAK,GAAG,IAC/B,EAAE,SAASG,GAAS,GAAGC,MAASJ,GAKhCK,IAAU,YAAY;AAC3B,gBAAMC,EAAc;AACpB,gBAAMC,IAAc,SAAS,cAAc,IAAIf,CAAE,EAAE;AACnD,cAAKe,EAAa,CACTA,aAAuB,eAC/BA,EAAY,MAAM;AAAA,cAFD;AAIlB,UAAIJ,KAAiBA;QAAA,GAWhBK,IAAY,CAACC,MAAyB;AAC3C,cACCA,EAAM,kBAAkB,eACxBA,EAAM,O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AAK,SACJb,EAAM,QAAQ,UAAU;AACvB,cAAAwB,IAAA,SAAS,kBAAT,gBAAAA,EAAwB,QAAOzC,GAAI;AACtC,gBAAM0C,IAAS,SAAS,cAAc,IAAI1C,CAAE,EAAE;AAC9C,UAAI0C,aAAkB,eACrBA,EAAO,MAAM;AAAA,QAEf;AACc,QAAA5B;MACf;AAAA,IACD,GAEK6B,IAAgBhB,EAAI,EAAK,GACzBO,IAAe,YAAY;AAChC,MAAAS,EAAc,QAAQ,IACtB,MAAMC,GAAK,EAAE,GACbd,EAAK,QAAQ,IAEb,SAAS,iBAAiB,SAASM,GAAiB,EAAE,SAAS,IAAM,GACrE,SAAS,iBAAiB,WAAWG,GAAiB,EAAE,SAAS,IAAM,GACvE,SAAS,iBAAiB,WAAWC,GAAO,EAAE,SAAS,IAAM;AAAA,IAAA,GAGxD1B,IAAgB,YAAY;AACjC,MAAAgB,EAAK,QAAQ,IACJ,SAAA,oBAAoB,SAASM,CAAe,GAC5C,SAAA,oBAAoB,WAAWG,CAAe,GAC9C,SAAA,oBAAoB,WAAWC,CAAK;AAAA,IAAA,GAGxCK,IAAa1C,EAAS,OAKpB;AAAA,MACN,OALe;AAAA,QACf,sBAAsBL,EAAM;AAAA,QAC5B,CAAC,sBAAsBA,EAAM,KAAK,EAAE,GAAGA,EAAM;AAAA,MAAA;AAAA,IAGtC,EAER;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index74.js","sources":["../src/components/BbDropdownButton/BbDropdownButton.vue"],"sourcesContent":["<template>\n\t<span\n\t\tclass=\"bb-dropdown-button\"\n\t\t:class=\"{\n\t\t\t'bb-dropdown-button--block': block,\n\t\t\t'bb-dropdown-button--loading': loading,\n\t\t}\"\n\t>\n\t\t<BaseButton v-bind=\"mainBtn\" class=\"bb-dropdown-button__main-btn\">\n\t\t\t<BbSpinner class=\"bb-dropdown-button__spinner\" />\n\n\t\t\t<BbIcon\n\t\t\t\tv-if=\"props['prepend:icon']\"\n\t\t\t\tclass=\"bb-dropdown-button__prepend-icon\"\n\t\t\t\t:type=\"props['prepend:icon']\"\n\t\t\t/>\n\t\t\t<span class=\"bb-dropdown-button__content\">{{ mainBtn.text }}</span>\n\t\t\t<span v-if=\"loading\" class=\"bb-dropdown-button__loading-label sr-only\"\n\t\t\t\t>caricamento</span\n\t\t\t>\n\n\t\t\t<BbIcon\n\t\t\t\tv-if=\"props['append:icon']\"\n\t\t\t\tclass=\"bb-dropdown-button__append-icon\"\n\t\t\t\t:type=\"props['append:icon']\"\n\t\t\t/>\n\t\t</BaseButton>\n\n\t\t<BbDropdown\n\t\t\t:id=\"id\"\n\t\t\t:arrow-padding=\"arrowPadding\"\n\t\t\t:disabled=\"disabled\"\n\t\t\t:eager=\"eager\"\n\t\t\t:items=\"mappedItems\"\n\t\t\t:offset=\"offset\"\n\t\t\t:padding=\"padding\"\n\t\t\t:placement=\"placement\"\n\t\t\t:theme=\"theme\"\n\t\t\t:transition-duration=\"transitionDuration\"\n\t\t\t:width=\"width\"\n\t\t>\n\t\t\t<template\n\t\t\t\t#activator=\"{\n\t\t\t\t\tprops,\n\t\t\t\t\topening,\n\t\t\t\t\topen,\n\t\t\t\t\tclosed,\n\t\t\t\t\tclosing,\n\t\t\t\t\tdisabled,\n\t\t\t\t\tplacement,\n\t\t\t\t}\"\n\t\t\t>\n\t\t\t\t<slot\n\t\t\t\t\t:closed=\"closed\"\n\t\t\t\t\t:closing=\"closing\"\n\t\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t\tname=\"activator\"\n\t\t\t\t\t:open=\"open\"\n\t\t\t\t\t:opening=\"opening\"\n\t\t\t\t\t:placement=\"placement\"\n\t\t\t\t\t:props=\"props\"\n\t\t\t\t>\n\t\t\t\t\t<BaseButton v-bind=\"props\" class=\"bb-dropdown-button__dropdown-btn\">\n\t\t\t\t\t\t<span class=\"bb-dropdown-button__dropdown-label sr-only\"\n\t\t\t\t\t\t\t>{{ open || opening ? 'Chiudi' : 'Apri' }} il menu</span\n\t\t\t\t\t\t>\n\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t:closed=\"closed\"\n\t\t\t\t\t\t\t:closing=\"closing\"\n\t\t\t\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t\t\t\tname=\"right-btn\"\n\t\t\t\t\t\t\t:open=\"open\"\n\t\t\t\t\t\t\t:opening=\"opening\"\n\t\t\t\t\t\t\t:placement=\"placement\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\tclass=\"bb-dropdown-button__dropdown-chevron\"\n\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\td=\"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6l-6 6l1.41 1.41Z\"\n\t\t\t\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t</slot>\n\t\t\t\t\t</BaseButton>\n\t\t\t\t</slot>\n\t\t\t</template>\n\t\t\t<template #prepend=\"data\"><slot name=\"prepend\" v-bind=\"data\" /></template>\n\t\t\t<template #item:prepend=\"data\">\n\t\t\t\t<slot name=\"item:prepend\" v-bind=\"data\" />\n\t\t\t</template>\n\t\t\t<template #item=\"data\"><slot name=\"item\" v-bind=\"data\" /></template>\n\t\t\t<template v-for=\"item in items\" #[item.key]=\"data\">\n\t\t\t\t<slot :name=\"item.key\" v-bind=\"data\" />\n\t\t\t</template>\n\t\t\t<template #item:append=\"data\">\n\t\t\t\t<slot name=\"item:append\" v-bind=\"data\" />\n\t\t\t</template>\n\t\t\t<template #append=\"data\"><slot name=\"append\" v-bind=\"data\" /></template>\n\t\t</BbDropdown>\n\t</span>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport BaseButton from '../BaseButton/BaseButton.vue';\nimport BbDropdown from '../BbDropdown/BbDropdown.vue';\nimport type { BbDropdownProps, MappedItem } from '../BbDropdown/BbDropdown.vue';\nimport { ref } from 'vue';\nimport { BbIcon, BbSpinner } from '@/index';\n\nexport type BbDropdownButtonProps = Pick<\n\tBbDropdownProps,\n\t| 'arrowPadding'\n\t| 'block'\n\t| 'disabled'\n\t| 'eager'\n\t| 'id'\n\t| 'items'\n\t| 'offset'\n\t| 'padding'\n\t| 'placement'\n\t| 'theme'\n\t| 'transitionDuration'\n\t| 'width'\n> & {\n\t/**\n\t * Tracks tha loading status internally.\n\t */\n\tautoLoading?: boolean;\n\t/**\n\t * Icon to be added on the right of the text\n\t */\n\t// eslint-disable-next-line vue/prop-name-casing\n\t'append:icon'?: string;\n\t/**\n\t * Disables the click handler while the component is loading.\n\t */\n\tdisabledWhileLoading?: boolean;\n\t/**\n\t * Triggers a loading indicator\n\t */\n\tloading?: boolean;\n\t/**\n\t * Icon to be added on the right of the text\n\t */\n\t// eslint-disable-next-line vue/prop-name-casing\n\t'prepend:icon'?: string;\n};\n\nconst props = withDefaults(defineProps<BbDropdownButtonProps>(), {\n\ttheme: 'default',\n\tautoLoading: true,\n\tdisabledWhileLoading: true,\n});\n\ndefineSlots<\n\t{\n\t\t'left-btn'?: (props: {\n\t\t\tdisabled?: boolean;\n\t\t\ttext: MappedItem['text'];\n\t\t}) => any;\n\t\tactivator?: (props: {\n\t\t\tprops: {\n\t\t\t\t'aria-expanded': boolean;\n\t\t\t\t'aria-controls': string;\n\t\t\t\tid: string;\n\t\t\t\tonClick: MappedItem['onClick'];\n\t\t\t\tonKeydown: MappedItem['onKeydown'];\n\t\t\t\tdisabled?: BbDropdownButtonProps['disabled'];\n\t\t\t};\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: boolean;\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownButtonProps['placement'];\n\t\t}) => any;\n\t\tprepend?: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: boolean;\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownButtonProps['placement'];\n\t\t}) => any;\n\t\t'item:prepend'?: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: MappedItem['disabled'];\n\t\t\tindex: number;\n\t\t\titem: BbDropdownButtonProps['items'][number];\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownButtonProps['placement'];\n\t\t\ttext: MappedItem['text'];\n\t\t}) => any;\n\t\titem?: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: MappedItem['disabled'];\n\t\t\tindex: number;\n\t\t\titem: BbDropdownButtonProps['items'][number];\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownButtonProps['placement'];\n\t\t\ttext: MappedItem['text'];\n\t\t}) => any;\n\t\t'item:append'?: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: MappedItem['disabled'];\n\t\t\tindex: number;\n\t\t\titem: BbDropdownButtonProps['items'][number];\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownButtonProps['placement'];\n\t\t\ttext: MappedItem['text'];\n\t\t}) => any;\n\t\tappend?: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: boolean;\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownButtonProps['placement'];\n\t\t}) => any;\n\t\t'right-btn'?: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: boolean;\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownButtonProps['placement'];\n\t\t}) => any;\n\t} & {\n\t\t[key: string]: (props: {\n\t\t\tclosed: boolean;\n\t\t\tclosing: boolean;\n\t\t\tdisabled?: MappedItem['disabled'];\n\t\t\tindex: number;\n\t\t\titem: BbDropdownButtonProps['items'][number];\n\t\t\topen: boolean;\n\t\t\topening: boolean;\n\t\t\tplacement: BbDropdownButtonProps['placement'];\n\t\t\ttext: MappedItem['text'];\n\t\t}) => any;\n\t}\n>();\n\nconst internalLoading = ref(0);\n\nconst loading = computed(\n\t() => props.loading || (!!internalLoading.value && props.autoLoading)\n);\n\nconst wrapClick =\n\t(fn: (...args: any[]) => any) =>\n\tasync (...args: any[]) => {\n\t\tif (loading.value && props.disabledWhileLoading) return;\n\t\tinternalLoading.value++;\n\t\tawait fn(...args);\n\t\tinternalLoading.value--;\n\t};\n\nconst mappedItems = props.items.map((el) => {\n\tif (el.onClick)\n\t\treturn {\n\t\t\t...el,\n\t\t\tonClick: wrapClick(el.onClick),\n\t\t};\n\treturn el;\n});\n\nconst mainBtn = computed(() => {\n\tconst base = { ...mappedItems[0] };\n\tbase.disabled = base.disabled || props.disabled;\n\treturn base;\n});\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbDropdownButton';\n</style>\n"],"names":["props","__props","internalLoading","ref","loading","computed","wrapClick","fn","args","mappedItems","el","mainBtn","base"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwJA,UAAMA,IAAQC,GAoGRC,IAAkBC,EAAI,CAAC,GAEvBC,IAAUC;AAAA,MACf,MAAML,EAAM,WAAY,CAAC,CAACE,EAAgB,SAASF,EAAM;AAAA,IAAA,GAGpDM,IACL,CAACC,MACD,UAAUC,MAAgB;AACrB,MAAAJ,EAAQ,SAASJ,EAAM,yBACXE,EAAA,SACV,MAAAK,EAAG,GAAGC,CAAI,GACAN,EAAA;AAAA,IAAA,GAGZO,IAAcT,EAAM,MAAM,IAAI,CAACU,MAChCA,EAAG,UACC;AAAA,MACN,GAAGA;AAAA,MACH,SAASJ,EAAUI,EAAG,OAAO;AAAA,IAAA,IAExBA,CACP,GAEKC,IAAUN,EAAS,MAAM;AAC9B,YAAMO,IAAO,EAAE,GAAGH,EAAY,CAAC,EAAE;AAC5B,aAAAG,EAAA,WAAWA,EAAK,YAAYZ,EAAM,UAChCY;AAAA,IAAA,CACP;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index76.js","sources":["../src/components/BbDropzone/BbDropzone.vue"],"sourcesContent":["<template>\n\t<component :is=\"tag\" :id=\"containerId\" :class=\"classes\">\n\t\t<label\n\t\t\t@dragenter.prevent=\"setDragging\"\n\t\t\t@dragleave.prevent=\"unsetDragging\"\n\t\t\t@dragover.prevent=\"onDragOver\"\n\t\t\t@drop.prevent=\"onDrop\"\n\t\t>\n\t\t\t<input\n\t\t\t\t:accept=\"acceptedMimeTypesString\"\n\t\t\t\t:autofocus=\"autofocus\"\n\t\t\t\tclass=\"sr-only\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t:multiple=\"multiple\"\n\t\t\t\ttype=\"file\"\n\t\t\t\t@blur=\"onBlur\"\n\t\t\t\t@change=\"onChange\"\n\t\t\t\t@focus=\"onFocus\"\n\t\t\t/>\n\t\t\t<slot v-bind=\"slotAttributes\"></slot>\n\t\t</label>\n\t\t<label aria-hidden=\"true\" class=\"bb-dropzone__submittable-label\">\n\t\t\tServer files\n\t\t\t<input\n\t\t\t\t:id=\"id\"\n\t\t\t\tref=\"submittable\"\n\t\t\t\tclass=\"bb-dropzone__submittable-input sr-only\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t:multiple=\"multiple\"\n\t\t\t\t:name=\"name\"\n\t\t\t\ttype=\"file\"\n\t\t\t/>\n\t\t</label>\n\n\t\t<span class=\"bb-dropzone__errors\">\n\t\t\t<BbSmoothHeight tag=\"span\">\n\t\t\t\t<span\n\t\t\t\t\tv-for=\"error in computedErrors\"\n\t\t\t\t\t:key=\"error\"\n\t\t\t\t\tclass=\"bb-dropzone__error\"\n\t\t\t\t\t>{{ error }}</span\n\t\t\t\t>\n\t\t\t</BbSmoothHeight>\n\t\t</span>\n\t</component>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, watch } from 'vue';\nimport { findInTree } from '@/utilities/functions/findInTree';\nimport { useId } from '@/composables/useId';\nimport BbSmoothHeight from '../BbSmoothHeight/BbSmoothHeight.vue';\nimport type { CommonProps, NonVoidElementTag } from '@/types/CommonProps';\n\nexport type DropZoneError = ReturnType<\n\t(typeof createError)[keyof typeof createError]\n>;\n\nexport type BbDropzoneProps = Pick<\n\tCommonProps,\n\t'autofocus' | 'disabled' | 'errors' | 'hasErrors' | 'id' | 'multiple' | 'name'\n> & {\n\t/**\n\t * Array of mime-types or extensions to filter selectable files.\n\t */\n\taccept?: string[];\n\t/**\n\t * Maximum number of acceptable files\n\t */\n\tmaxFiles?: number;\n\t/**\n\t * Max size of the files in bytes.\n\t */\n\tmaxSize?: number;\n\t/**\n\t * Used by v-model.\n\t */\n\tmodelValue: any;\n} & NonVoidElementTag;\n\n// This is the dynamic import for mime\nlet mime: any;\n\nconst props = withDefaults(defineProps<BbDropzoneProps>(), {\n\ttag: 'div',\n});\n\nexport type BbDropzoneEvents = {\n\t(e: 'blur', event: FocusEvent): void;\n\t(e: 'error', data: DropZoneError): void;\n\t(e: 'focus', event: FocusEvent): void;\n\t(e: 'update:modelValue', data: any): void;\n};\nconst emit = defineEmits<BbDropzoneEvents>();\n\ndefineSlots<{\n\tdefault?: (props: { dragging: boolean; focused: boolean; id: string }) => any;\n}>();\n\nconst submittable = ref<any | null>(null);\n\nif (props.accept) {\n\tif (!Array.isArray(props.accept)) {\n\t\tthrow new Error('Property accept is not an array');\n\t}\n}\nif (props.multiple) {\n\tif (!Array.isArray(props.modelValue)) {\n\t\tthrow new Error(\n\t\t\t'Component is set to multiple but modelValue is not an array'\n\t\t);\n\t}\n}\n\nconst hasFocus = ref(false);\nconst onFocus = (event: FocusEvent) => {\n\thasFocus.value = true;\n\temit('focus', event);\n};\nconst onBlur = (event: FocusEvent) => {\n\thasFocus.value = false;\n\temit('blur', event);\n};\n\n/** Allow dropzone to be submittable (this is flimsy and might break) */\nwatch(\n\t() => props.modelValue,\n\t() => {\n\t\tlet container = new DataTransfer();\n\t\tif (Array.isArray(props.modelValue)) {\n\t\t\tif (props.modelValue.length) {\n\t\t\t\tprops.modelValue.forEach((file) => container.items.add(file));\n\t\t\t}\n\t\t} else {\n\t\t\tif (props.modelValue) container.items.add(props.modelValue);\n\t\t}\n\t\tif (submittable.value) {\n\t\t\tif (container.items.length) {\n\t\t\t\tsubmittable.value.files = container.files;\n\t\t\t} else {\n\t\t\t\tsubmittable.value.files = null;\n\t\t\t}\n\t\t}\n\t}\n);\n\nconst acceptedMimeTypes = ref<string[]>([]);\nconst acceptedMimeTypesString = computed(() =>\n\tacceptedMimeTypes.value.join(',')\n);\nwatch(\n\t() => props.accept,\n\tasync () => {\n\t\tif (props.accept) {\n\t\t\tlet accumulated = [];\n\t\t\tfor (let i = 0; i < props.accept.length; i++) {\n\t\t\t\tconst element = props.accept[i];\n\t\t\t\tif (element.includes('/')) accumulated.push(element);\n\t\t\t\telse {\n\t\t\t\t\tif (!mime) {\n\t\t\t\t\t\tconst mod = await import('mime');\n\t\t\t\t\t\tmime = mod.default;\n\t\t\t\t\t}\n\t\t\t\t\tconst foundMime = mime.getType(element);\n\t\t\t\t\tif (!foundMime) {\n\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t`Could not detect the correct mime associated with ${element}`\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\taccumulated.push(foundMime);\n\t\t\t\t}\n\t\t\t}\n\t\t\tacceptedMimeTypes.value = accumulated;\n\t\t}\n\t},\n\t{ immediate: true }\n);\n\n/**\n * Component state\n */\nconst id = props.id || `${useId().id.value}`;\nconst containerId = `bb_dz_${id}`;\n\nconst dragging = ref(false);\n// Add a timeout to prevent browser flickering\nlet draggingTimeout: ReturnType<typeof setTimeout>;\n\nconst classes = computed(() => {\n\treturn {\n\t\t'bb-dropzone': true,\n\t\t'bb-dropzone--errors': hasErrors.value,\n\t\t'bb-dropzone--dragging': dragging.value,\n\t};\n});\nconst slotAttributes = computed(() => {\n\treturn {\n\t\tdragging: dragging.value,\n\t\tfocused: hasFocus.value,\n\t\tid: id,\n\t};\n});\n\n/**\n * Component handlers\n */\nconst onDrop = (event: DragEvent) => {\n\tdragging.value = false;\n\n\tif (event.dataTransfer) {\n\t\tevent.stopImmediatePropagation();\n\t\tlet files;\n\t\tfiles = Array.from(event.dataTransfer.files);\n\t\tfiles = parseFiles(files);\n\t\tif (props.multiple) {\n\t\t\tif (Array.isArray(props.modelValue)) {\n\t\t\t\temit('update:modelValue', [...props.modelValue, ...files]);\n\t\t\t}\n\t\t} else {\n\t\t\tfiles = files[0];\n\t\t\temit('update:modelValue', files);\n\t\t}\n\t\tif (event.currentTarget instanceof HTMLLabelElement) {\n\t\t\tconst innerInput = event.currentTarget.querySelector('input[type=file]');\n\t\t\tif (innerInput instanceof HTMLInputElement) {\n\t\t\t\tinnerInput.focus();\n\t\t\t}\n\t\t}\n\t}\n};\nconst onChange = (event: Event) => {\n\tif (event.target instanceof HTMLInputElement) {\n\t\tif (event.target.files) {\n\t\t\tlet files;\n\t\t\tfiles = parseFiles(Array.from(event.target.files));\n\t\t\tif (props.multiple) {\n\t\t\t\tif (Array.isArray(props.modelValue)) {\n\t\t\t\t\temit('update:modelValue', [...props.modelValue, ...files]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfiles = files[0];\n\t\t\t\temit('update:modelValue', files);\n\t\t\t}\n\t\t}\n\t\tevent.target.value = '';\n\t\tevent.target.files = null;\n\t}\n};\n\nconst parseFiles = (files: File[]) => {\n\treturn files.filter((file, index) => {\n\t\t// Sizecheck\n\t\tif (props.maxSize) {\n\t\t\tlet passing = file.size <= props.maxSize;\n\t\t\tif (!passing) {\n\t\t\t\temit('error', createError.maxSize(file));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t// Uniqueness check\n\t\tlet alreadyExists = false;\n\t\tif (props.modelValue) {\n\t\t\tif (Array.isArray(props.modelValue)) {\n\t\t\t\talreadyExists = props.modelValue.some((current) =>\n\t\t\t\t\tcompareFiles(current, file)\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\talreadyExists = compareFiles(props.modelValue, file);\n\t\t\t}\n\t\t}\n\t\tif (alreadyExists) {\n\t\t\temit('error', createError.uniqueness(file));\n\t\t\treturn false;\n\t\t}\n\t\t// Mime type check\n\t\tif (props.accept) {\n\t\t\tconst mimePassed = acceptedMimeTypes.value.some((mime) => {\n\t\t\t\tlet found = false;\n\t\t\t\tif (mime.includes('*'))\n\t\t\t\t\tfound = found || mime.split('/')[0] === file.type.split('/')[0];\n\t\t\t\telse found = found || mime === file.type;\n\t\t\t\treturn found;\n\t\t\t});\n\t\t\tif (!mimePassed) {\n\t\t\t\temit('error', createError.accept(file));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t// Max files check\n\t\tif (props.maxFiles) {\n\t\t\tif (Array.isArray(props.modelValue)) {\n\t\t\t\tif (props.modelValue.length + index + 1 > props.maxFiles) {\n\t\t\t\t\temit(\n\t\t\t\t\t\t'error',\n\t\t\t\t\t\tcreateError.maxFiles(file, props.modelValue.length + index + 1)\n\t\t\t\t\t);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t});\n};\n\nconst onDragOver = (event: Event) => {\n\t// Find the closest dropzone in case of nested dropzones\n\tconst target = event.target;\n\tif (target instanceof HTMLElement) {\n\t\tconst closestDropzone = findInTree([target], 'parentElement', (el) =>\n\t\t\tel.classList.contains('bb-dropzone')\n\t\t);\n\t\tif (closestDropzone) {\n\t\t\t/* When dragging over this dropzone set as dragging */\n\t\t\tif (closestDropzone.id === containerId) {\n\t\t\t\tsetDragging();\n\t\t\t\t/* When dragging over a nested dropzone do not highlight this dropzone */\n\t\t\t} else {\n\t\t\t\tunsetDragging();\n\t\t\t}\n\t\t}\n\t}\n};\n\nconst setDragging = () => {\n\tclearTimeout(draggingTimeout);\n\tdragging.value = true;\n};\n\nconst unsetDragging = () => {\n\tdraggingTimeout = setTimeout(() => {\n\t\tdragging.value = false;\n\t}, 100);\n};\n\nconst bytesToUnit = (bytes: number, decimals = 2) => {\n\tif (!bytes) return '0 B';\n\tconst k = 1024;\n\tconst dm = decimals || 0;\n\tconst sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];\n\tconst i = Math.floor(Math.log(bytes) / Math.log(k));\n\treturn parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];\n};\n\n/**\n * Returns true if files are identical by the properties that are accessible\n * @param file The file to check\n * @param otherFile The file to check against\n */\nconst compareFiles = (file: File, otherFile: File) => {\n\tconst properties: (keyof File)[] = ['name', 'size', 'lastModified', 'type'];\n\treturn !properties.some((key) => file[key] !== otherFile[key]);\n};\n\n/**\n * Helper that creates errors based on component properties\n */\nconst createError = {\n\tmaxSize: (file: File) => {\n\t\t// Todo update to isNil\n\t\tif (props.maxSize) {\n\t\t\treturn {\n\t\t\t\ttype: 'maxSize',\n\t\t\t\tfile: file,\n\t\t\t\tformattedMaxSize: bytesToUnit(+props.maxSize),\n\t\t\t\tformattedSize: bytesToUnit(file.size),\n\t\t\t\tfilename: file.name,\n\t\t\t} as const;\n\t\t} else\n\t\t\tthrow new Error(\n\t\t\t\t'Requested to create an error for maxSize without providing a maxSize.'\n\t\t\t);\n\t},\n\tuniqueness: (file: File) => {\n\t\treturn {\n\t\t\ttype: 'uniqueness',\n\t\t\tfile: file,\n\t\t\tfilename: file.name,\n\t\t} as const;\n\t},\n\taccept: (file: File) => {\n\t\treturn {\n\t\t\ttype: 'accept',\n\t\t\tfile: file,\n\t\t\tacceptedMimeTypes: acceptedMimeTypes.value,\n\t\t\tmimeType: file.type,\n\t\t\tfilename: file.name,\n\t\t} as const;\n\t},\n\tmaxFiles: (file: File, totalFiles: number) => {\n\t\treturn {\n\t\t\ttype: 'maxFiles',\n\t\t\tfile: file,\n\t\t\tmaxFiles: props.maxFiles,\n\t\t\ttotalFiles,\n\t\t\tfilename: file.name,\n\t\t} as const;\n\t},\n};\n\nconst computedErrors = computed(() => {\n\treturn props.errors ? ([] as string[]).concat(props.errors) : [];\n});\n\nconst hasErrors = computed(\n\t() => Boolean(computedErrors.value.length) || props.hasErrors\n);\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbDropzone';\n</style>\n"],"names":["mime","props","__props","emit","__emit","submittable","ref","hasFocus","onFocus","event","onBlur","watch","container","file","acceptedMimeTypes","acceptedMimeTypesString","computed","accumulated","i","element","foundMime","id","useId","containerId","dragging","draggingTimeout","classes","hasErrors","slotAttributes","onDrop","files","parseFiles","innerInput","onChange","index","createError","alreadyExists","current","compareFiles","found","onDragOver","target","closestDropzone","findInTree","el","setDragging","unsetDragging","bytesToUnit","bytes","decimals","k","dm","sizes","otherFile","key","totalFiles","computedErrors"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAiFI,QAAAA;AAEJ,UAAMC,IAAQC,GAURC,IAAOC,GAMPC,IAAcC,EAAgB,IAAI;AAExC,QAAIL,EAAM,UACL,CAAC,MAAM,QAAQA,EAAM,MAAM;AACxB,YAAA,IAAI,MAAM,iCAAiC;AAGnD,QAAIA,EAAM,YACL,CAAC,MAAM,QAAQA,EAAM,UAAU;AAClC,YAAM,IAAI;AAAA,QACT;AAAA,MAAA;AAKG,UAAAM,IAAWD,EAAI,EAAK,GACpBE,IAAU,CAACC,MAAsB;AACtC,MAAAF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AAA,QACA,UAAUA,EAAK;AAAA,MAAA;AAAA,MAGjB,QAAQ,CAACA,OACD;AAAA,QACN,MAAM;AAAA,QACN,MAAAA;AAAA,QACA,mBAAmBC,EAAkB;AAAA,QACrC,UAAUD,EAAK;AAAA,QACf,UAAUA,EAAK;AAAA,MAAA;AAAA,MAGjB,UAAU,CAACA,GAAY0C,OACf;AAAA,QACN,MAAM;AAAA,QACN,MAAA1C;AAAA,QACA,UAAUZ,EAAM;AAAA,QAChB,YAAAsD;AAAA,QACA,UAAU1C,EAAK;AAAA,MAAA;AAAA,IAEjB,GAGK2C,IAAiBxC,EAAS,MACxBf,EAAM,SAAU,CAAC,EAAe,OAAOA,EAAM,MAAM,IAAI,EAC9D,GAEK0B,IAAYX;AAAA,MACjB,MAAM,EAAQwC,EAAe,MAAM,UAAWvD,EAAM;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index78.js","sources":["../src/components/BbIntersection/BbIntersection.vue"],"sourcesContent":["<template>\n\t<component :is=\"tag\" ref=\"infinitescrolltrigger\" class=\"bb-intersection\">\n\t\t<slot :hidden=\"hidden\" :percentage=\"percentage\" :shown=\"shown\"></slot>\n\t</component>\n</template>\n\n<script setup lang=\"ts\">\nimport type { NonVoidElementTag } from '@/types/CommonProps';\nimport { throttle } from '@/utilities/functions/throttle';\nimport { onBeforeUnmount, onMounted, ref } from 'vue';\n\nexport type BbIntersectionProps = {\n\t/**\n\t * Time to wait before emitting intersection value\n\t */\n\tdebounceTime?: number;\n\t/**\n\t * Options used to confgiure the IntersectionObserver\n\t */\n\toptions?: IntersectionObserverInit; // eslint-disable-line no-undef\n} & NonVoidElementTag;\n\nconst props = withDefaults(defineProps<BbIntersectionProps>(), {\n\tdebounceTime: 0,\n\toptions: () => ({\n\t\troot: null,\n\t\tthreshold: [0, 0.2, 0.4, 0.6, 0.8, 1],\n\t}),\n\ttag: 'div',\n});\n\nexport type BbIntersectionEvents = {\n\t(e: 'shown'): void;\n\t(e: 'hidden'): void;\n\t(e: 'intersected', value: number): void;\n};\n\nconst emit = defineEmits<BbIntersectionEvents>();\n\ndefineSlots<{\n\tdefault?: (props: {\n\t\thidden: boolean;\n\t\tpercentage: number;\n\t\tshown: boolean;\n\t}) => any;\n}>();\n\nconst observer = ref<IntersectionObserver | null>(null);\nconst infinitescrolltrigger = ref<Element | null>(null);\nconst shown = ref(false);\nconst hidden = ref(true);\nconst percentage = ref(0);\n\nonMounted(() => {\n\tobserver.value = new IntersectionObserver((entries) => {\n\t\thandleIntersect(entries[0]);\n\t}, props.options);\n\tif (infinitescrolltrigger.value) {\n\t\tobserver.value.observe(infinitescrolltrigger.value);\n\t}\n});\nonBeforeUnmount(() => {\n\tif (observer.value) observer.value.disconnect();\n});\n\nconst handleIntersect = throttle((entry: IntersectionObserverEntry) => {\n\tif (entry.isIntersecting) {\n\t\tpercentage.value = Math.trunc(entry.intersectionRatio * 100);\n\t\tif (entry.intersectionRatio === 1) {\n\t\t\tshown.value = true;\n\t\t\thidden.value = false;\n\t\t\temit('shown');\n\t\t} else {\n\t\t\tshown.value = false;\n\t\t\thidden.value = false;\n\t\t\temitIntersected(Math.trunc(entry.intersectionRatio * 100));\n\t\t}\n\t} else {\n\t\tshown.value = false;\n\t\thidden.value = true;\n\t\temit('hidden');\n\t}\n});\n\nconst emitIntersected = throttle((percentage: number) => {\n\temit('intersected', percentage);\n}, props.debounceTime);\n</script>\n"],"names":["props","__props","emit","__emit","observer","ref","infinitescrolltrigger","shown","hidden","percentage","onMounted","entries","handleIntersect","onBeforeUnmount","throttle","entry","emitIntersected"],"mappings":";;;;;;;;;;;;;;AAsBA,UAAMA,IAAQC,GAeRC,IAAOC,GAUPC,IAAWC,EAAiC,IAAI,GAChDC,IAAwBD,EAAoB,IAAI,GAChDE,IAAQF,EAAI,EAAK,GACjBG,IAASH,EAAI,EAAI,GACjBI,IAAaJ,EAAI,CAAC;AAExB,IAAAK,EAAU,MAAM;AACf,MAAAN,EAAS,QAAQ,IAAI,qBAAqB,CAACO,MAAY;AACtC,QAAAC,EAAAD,EAAQ,CAAC,CAAC;AAAA,MAAA,GACxBX,EAAM,OAAO,GACZM,EAAsB,SAChBF,EAAA,MAAM,QAAQE,EAAsB,KAAK;AAAA,IACnD,CACA,GACDO,EAAgB,MAAM;AACrB,MAAIT,EAAS,SAAgBA,EAAA,MAAM,WAAW;AAAA,IAAA,CAC9C;AAEK,UAAAQ,IAAkBE,EAAS,CAACC,MAAqC;AACtE,MAAIA,EAAM,kBACTN,EAAW,QAAQ,KAAK,MAAMM,EAAM,oBAAoB,GAAG,GACvDA,EAAM,sBAAsB,KAC/BR,EAAM,QAAQ,IACdC,EAAO,QAAQ,IACfN,EAAK,OAAO,MAEZK,EAAM,QAAQ,IACdC,EAAO,QAAQ,IACfQ,EAAgB,KAAK,MAAMD,EAAM,oBAAoB,GAAG,CAAC,OAG1DR,EAAM,QAAQ,IACdC,EAAO,QAAQ,IACfN,EAAK,QAAQ;AAAA,IACd,CACA,GAEKc,IAAkBF,EAAS,CAACL,MAAuB;AACxD,MAAAP,EAAK,eAAeO,CAAU;AAAA,IAAA,GAC5BT,EAAM,YAAY;;;;;;;;;;;;;;;;;"}
package/dist/index79.js DELETED
@@ -1,130 +0,0 @@
1
- import { defineComponent as w, ref as u, computed as g, openBlock as $, createBlock as k, withCtx as r, renderSlot as a, normalizeProps as s, guardReactiveProps as l, createVNode as V, mergeProps as P } from "vue";
2
- import q from "./index26.js";
3
- /* empty css */
4
- import C from "./index28.js";
5
- /* empty css */
6
- const F = /* @__PURE__ */ w({
7
- __name: "BbNumberInput",
8
- props: {
9
- "append:icon": {},
10
- autocomplete: {},
11
- autofocus: {},
12
- direction: {},
13
- disabled: { type: Boolean },
14
- errors: {},
15
- hasErrors: { type: Boolean },
16
- hideLabel: { type: Boolean },
17
- hint: {},
18
- id: {},
19
- label: {},
20
- labelPosition: {},
21
- loading: { type: Boolean },
22
- max: {},
23
- min: {},
24
- modelValue: {},
25
- name: {},
26
- persistentHint: { type: Boolean },
27
- placeholder: {},
28
- "prepend:icon": {},
29
- readonly: {},
30
- required: { type: Boolean },
31
- reverse: { type: Boolean },
32
- step: {}
33
- },
34
- emits: ["blur", "change", "click", "decrease", "focus", "increase", "input", "keydown", "mousedown", "mouseup", "update:modelValue"],
35
- setup(m, { expose: c, emit: b }) {
36
- const i = m, o = b, d = u(), p = u(!1), h = g(() => i.persistentHint || p.value), f = {
37
- onBlur: (e) => {
38
- p.value = !1, o("blur", e);
39
- },
40
- onChange: (e) => o("change", e),
41
- onClick: (e) => o("click", e),
42
- onDecrease: (e) => o("decrease", e),
43
- onFocus: (e) => {
44
- p.value = !0, o("focus", e);
45
- },
46
- onIncrease: (e) => o("increase", e),
47
- onInput: (e) => o("input", e),
48
- onKeydown: (e) => o("keydown", e),
49
- onMousedown: (e) => o("mousedown", e),
50
- onMouseup: (e) => o("mouseup", e),
51
- "onUpdate:modelValue": (e) => o("update:modelValue", e)
52
- };
53
- return c({
54
- increase: () => {
55
- var e;
56
- (e = d.value) == null || e.increase();
57
- },
58
- decrease: () => {
59
- var e;
60
- (e = d.value) == null || e.decrease();
61
- }
62
- }), (e, L) => ($(), k(q, {
63
- id: e.id,
64
- class: "bb-number-input",
65
- direction: e.direction,
66
- errors: e.errors,
67
- "has-errors": e.hasErrors,
68
- "hide-label": e.hideLabel,
69
- hint: e.hint,
70
- label: e.label,
71
- "label-position": e.labelPosition,
72
- "model-value": e.modelValue,
73
- name: e.name,
74
- reverse: e.reverse,
75
- "show-hint": h.value
76
- }, {
77
- label: r((t) => [
78
- a(e.$slots, "label", s(l(t)))
79
- ]),
80
- input: r(({ id: t, name: v, hasErrors: y, ariaDescribedby: B }) => [
81
- V(C, P({
82
- id: t,
83
- ref_key: "bni",
84
- ref: d,
85
- "append:icon": i["append:icon"],
86
- "aria-describedby": B,
87
- autocomplete: e.autocomplete,
88
- autofocus: e.autofocus,
89
- disabled: e.disabled,
90
- "has-errors": y,
91
- loading: e.loading,
92
- max: e.max,
93
- min: e.min,
94
- "model-value": e.modelValue,
95
- name: v,
96
- placeholder: e.placeholder,
97
- "prepend:icon": i["prepend:icon"],
98
- readonly: e.readonly,
99
- required: e.required,
100
- step: e.step
101
- }, f), {
102
- "append-outer": r((n) => [
103
- a(e.$slots, "append-outer", s(l(n)))
104
- ]),
105
- append: r((n) => [
106
- a(e.$slots, "append", s(l(n)))
107
- ]),
108
- prefix: r((n) => [
109
- a(e.$slots, "prefix", s(l(n)))
110
- ]),
111
- prepend: r((n) => [
112
- a(e.$slots, "prepend", s(l(n)))
113
- ]),
114
- suffix: r((n) => [
115
- a(e.$slots, "suffix", s(l(n)))
116
- ]),
117
- "prepend-outer": r((n) => [
118
- a(e.$slots, "prepend-outer", s(l(n)))
119
- ]),
120
- _: 2
121
- }, 1040, ["id", "append:icon", "aria-describedby", "autocomplete", "autofocus", "disabled", "has-errors", "loading", "max", "min", "model-value", "name", "placeholder", "prepend:icon", "readonly", "required", "step"])
122
- ]),
123
- _: 3
124
- }, 8, ["id", "direction", "errors", "has-errors", "hide-label", "hint", "label", "label-position", "model-value", "name", "reverse", "show-hint"]));
125
- }
126
- });
127
- export {
128
- F as default
129
- };
130
- //# sourceMappingURL=index79.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index79.js","sources":["../src/components/BbNumberInput/BbNumberInput.vue"],"sourcesContent":["<template>\n\t<BaseInputContainer\n\t\t:id=\"id\"\n\t\tclass=\"bb-number-input\"\n\t\t:direction=\"direction\"\n\t\t:errors=\"errors\"\n\t\t:has-errors=\"hasErrors\"\n\t\t:hide-label=\"hideLabel\"\n\t\t:hint=\"hint\"\n\t\t:label=\"label\"\n\t\t:label-position=\"labelPosition\"\n\t\t:model-value=\"modelValue\"\n\t\t:name=\"name\"\n\t\t:reverse=\"reverse\"\n\t\t:show-hint=\"showHint\"\n\t>\n\t\t<template #label=\"data\"><slot name=\"label\" v-bind=\"data\"></slot></template>\n\t\t<template #input=\"{ id, name, hasErrors, ariaDescribedby }\">\n\t\t\t<BaseNumberInput\n\t\t\t\t:id=\"id\"\n\t\t\t\tref=\"bni\"\n\t\t\t\t:append:icon=\"props['append:icon']\"\n\t\t\t\t:aria-describedby=\"ariaDescribedby\"\n\t\t\t\t:autocomplete=\"autocomplete\"\n\t\t\t\t:autofocus=\"autofocus\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t:has-errors=\"hasErrors\"\n\t\t\t\t:loading=\"loading\"\n\t\t\t\t:max=\"max\"\n\t\t\t\t:min=\"min\"\n\t\t\t\t:model-value=\"modelValue\"\n\t\t\t\t:name=\"name\"\n\t\t\t\t:placeholder=\"placeholder\"\n\t\t\t\t:prepend:icon=\"props['prepend:icon']\"\n\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t:required=\"required\"\n\t\t\t\t:step=\"step\"\n\t\t\t\tv-bind=\"eventListeners\"\n\t\t\t>\n\t\t\t\t<template #append-outer=\"data\"\n\t\t\t\t\t><slot name=\"append-outer\" v-bind=\"data\"\n\t\t\t\t/></template>\n\t\t\t\t<template #append=\"data\"><slot name=\"append\" v-bind=\"data\" /></template>\n\t\t\t\t<template #prefix=\"data\"><slot name=\"prefix\" v-bind=\"data\" /></template>\n\t\t\t\t<template #prepend=\"data\"\n\t\t\t\t\t><slot name=\"prepend\" v-bind=\"data\"\n\t\t\t\t/></template>\n\t\t\t\t<template #suffix=\"data\"><slot name=\"suffix\" v-bind=\"data\" /></template>\n\t\t\t\t<template #prepend-outer=\"data\"\n\t\t\t\t\t><slot name=\"prepend-outer\" v-bind=\"data\"\n\t\t\t\t/></template>\n\t\t\t</BaseNumberInput>\n\t\t</template>\n\t</BaseInputContainer>\n</template>\n\n<script setup lang=\"ts\">\nimport BaseInputContainer from '../BaseInputContainer/BaseInputContainer.vue';\nimport BaseNumberInput from '../BaseNumberInput/BaseNumberInput.vue';\nimport type {\n\tBaseNumberInputEvents,\n\tBaseNumberInputSlots,\n} from '../BaseNumberInput/BaseNumberInput.vue';\nimport {\n\tcomputed,\n\tref,\n\ttype HTMLAttributes,\n\ttype InputHTMLAttributes,\n} from 'vue';\n\nexport type BbNumberInputProps = {\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\tautocomplete?: InputHTMLAttributes['autocomplete'];\n\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Direction of the layout of the component. Can either be a predefined value or a pattern separated by a space like `xx xxxxx`.\n\t */\n\tdirection?: 'horizontal' | 'vertical' | 'auto' | string;\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Can be a string or an array of string containing the messages to display.\n\t */\n\terrors?: string | string[];\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 * Text box to be displayed near the input, usually to indicate instructions.\n\t */\n\thint?: string;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Text content of the label of the element.\n\t */\n\tlabel: string;\n\n\t/**\n\t * Sets the text alignment of the label.\n\t */\n\tlabelPosition?: 'left' | 'center' | 'right';\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 * 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 | string | null;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname?: InputHTMLAttributes['name'];\n\n\t/**\n\t * Keeps the hint displayed.\n\t */\n\tpersistentHint?: boolean;\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 * Reverses the layout. Applicable in every direction the order of the label and the input is swapped.\n\t */\n\treverse?: boolean;\n\n\t/**\n\t * Incremental unit used in the exposed `increase`\n\t * and `decrease` function. It's NOT APPLIED to manual input as a step of 5\n\t * will prevent the user from inserting a value like `115` because of rounding down.\n\t */\n\tstep?: number;\n};\n\nconst props = withDefaults(defineProps<BbNumberInputProps>(), {});\n\nexport type BbNumberInputEvents = BaseNumberInputEvents;\n\nconst emit = defineEmits<BbNumberInputEvents>();\n\ndefineSlots<\n\tBaseNumberInputSlots & {\n\t\tlabel?: (props: { text: string; hasErrors: boolean }) => any;\n\t}\n>();\n\nconst bni = ref();\n\nconst active = ref(false);\nconst showHint = computed(() => props.persistentHint || active.value);\n\n/**\n * These events are just propagated\n */\nconst eventListeners = {\n\tonBlur: (event: FocusEvent) => {\n\t\tactive.value = false;\n\t\temit('blur', event);\n\t},\n\tonChange: (event: Event) => emit('change', event),\n\tonClick: (event: MouseEvent) => emit('click', event),\n\tonDecrease: (event: number) => emit('decrease', event),\n\tonFocus: (event: FocusEvent) => {\n\t\tactive.value = true;\n\t\temit('focus', event);\n\t},\n\tonIncrease: (event: number) => emit('increase', event),\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: number | null) =>\n\t\temit('update:modelValue', value),\n};\n\nconst decrease = () => {\n\tbni.value?.decrease();\n};\n\nconst increase = () => {\n\tbni.value?.increase();\n};\n\ndefineExpose({\n\tincrease,\n\tdecrease,\n});\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbNumberInput';\n</style>\n"],"names":["props","__props","emit","__emit","bni","ref","active","showHint","computed","eventListeners","event","value","__expose","_a"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoMA,UAAMA,IAAQC,GAIRC,IAAOC,GAQPC,IAAMC,KAENC,IAASD,EAAI,EAAK,GAClBE,IAAWC,EAAS,MAAMR,EAAM,kBAAkBM,EAAO,KAAK,GAK9DG,IAAiB;AAAA,MACtB,QAAQ,CAACC,MAAsB;AAC9B,QAAAJ,EAAO,QAAQ,IACfJ,EAAK,QAAQQ,CAAK;AAAA,MACnB;AAAA,MACA,UAAU,CAACA,MAAiBR,EAAK,UAAUQ,CAAK;AAAA,MAChD,SAAS,CAACA,MAAsBR,EAAK,SAASQ,CAAK;AAAA,MACnD,YAAY,CAACA,MAAkBR,EAAK,YAAYQ,CAAK;AAAA,MACrD,SAAS,CAACA,MAAsB;AAC/B,QAAAJ,EAAO,QAAQ,IACfJ,EAAK,SAASQ,CAAK;AAAA,MACpB;AAAA,MACA,YAAY,CAACA,MAAkBR,EAAK,YAAYQ,CAAK;AAAA,MACrD,SAAS,CAACA,MAAiBR,EAAK,SAASQ,CAAK;AAAA,MAC9C,WAAW,CAACA,MAAyBR,EAAK,WAAWQ,CAAK;AAAA,MAC1D,aAAa,CAACA,MAAsBR,EAAK,aAAaQ,CAAK;AAAA,MAC3D,WAAW,CAACA,MAAsBR,EAAK,WAAWQ,CAAK;AAAA,MACvD,uBAAuB,CAACC,MACvBT,EAAK,qBAAqBS,CAAK;AAAA,IAAA;AAWpB,WAAAC,EAAA;AAAA,MACZ,UALgB,MAAM;;AACtB,SAAAC,IAAAT,EAAI,UAAJ,QAAAS,EAAW;AAAA,MAAS;AAAA,MAKpB,UAVgB,MAAM;;AACtB,SAAAA,IAAAT,EAAI,UAAJ,QAAAS,EAAW;AAAA,MAAS;AAAA,IASpB,CACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index8.js","sources":["../src/composables/useCountdown.ts"],"sourcesContent":["import { getAsPercentage } from '@/utilities/functions/percentage';\nimport { wait } from '@/utilities/functions/wait';\nimport { computed, onBeforeUnmount, ref } from 'vue';\n\ntype CounterParams = {\n\t/** Longevity of the countdown in milliseconds */\n\tduration: number;\n\t/** Function called every time the countdown starts or restarts */\n\tonStart?: (...args: any[]) => any;\n\t/** Function called anytime the timer stops or pauses */\n\tonStop?: (...args: any[]) => any;\n\t/** Function called on completion */\n\tonFinish?: (...args: any[]) => any;\n};\nexport const useCountdown = ({\n\tduration,\n\tonStart,\n\tonFinish,\n\tonStop,\n}: CounterParams) => {\n\tif (!duration) {\n\t\tthrow new Error('You must define a duration for the coundown');\n\t}\n\tconst remaining = ref(duration);\n\tconst elapsed = ref(0);\n\tconst progress = computed(() => getAsPercentage(elapsed.value, duration));\n\tconst tick = 100;\n\tconst running = ref(false);\n\tconst paused = ref(false);\n\n\tlet timeoutID: ReturnType<typeof setInterval>;\n\n\tconst start = () => {\n\t\tif (elapsed.value === duration || (running.value && !paused.value)) return;\n\t\tif (onStart) onStart();\n\t\tpaused.value = false;\n\t\trunning.value = true;\n\n\t\ttimeoutID = setInterval(() => {\n\t\t\tremaining.value = Math.max(remaining.value - tick, 0);\n\t\t\telapsed.value = Math.min(elapsed.value + tick, duration);\n\n\t\t\tif (remaining.value === 0) {\n\t\t\t\twait(0).then(() => {\n\t\t\t\t\tclearInterval(timeoutID);\n\t\t\t\t\trunning.value = false;\n\t\t\t\t\tif (onStop) onStop();\n\t\t\t\t\tif (onFinish) onFinish();\n\t\t\t\t});\n\t\t\t}\n\t\t}, tick);\n\t};\n\n\tconst restart = () => {\n\t\treset();\n\t\tstart();\n\t};\n\n\tconst reset = () => {\n\t\tif (timeoutID) clearInterval(timeoutID);\n\t\tif (!paused.value) {\n\t\t\tif (onStop) onStop();\n\t\t}\n\t\tremaining.value = duration;\n\t\telapsed.value = 0;\n\t\trunning.value = false;\n\t\tpaused.value = false;\n\t};\n\n\tconst pause = () => {\n\t\tif (timeoutID) clearInterval(timeoutID);\n\t\tif (!paused.value) {\n\t\t\tif (onStop) onStop();\n\t\t}\n\t\tpaused.value = true;\n\t};\n\n\tconst remainingFormatted = computed(() => {\n\t\tconst msInADay = 1000 * 60 * 60 * 24;\n\t\tconst msInAnHour = 1000 * 60 * 60;\n\t\tconst msInAMinute = 1000 * 60;\n\t\tconst msInASecond = 1000;\n\n\t\tconst days = Math.trunc(remaining.value / msInADay);\n\t\tconst hours = Math.trunc((remaining.value - days * msInADay) / msInAnHour);\n\t\tconst minutes = Math.trunc(\n\t\t\t(remaining.value - hours * msInAnHour - days * msInADay) / msInAMinute\n\t\t);\n\t\tconst seconds = Math.trunc(\n\t\t\t(remaining.value -\n\t\t\t\tminutes * msInAMinute -\n\t\t\t\thours * msInAnHour -\n\t\t\t\tdays * msInADay) /\n\t\t\t\tmsInASecond\n\t\t);\n\t\treturn {\n\t\t\tdays,\n\t\t\thours,\n\t\t\tminutes,\n\t\t\tseconds,\n\t\t};\n\t});\n\n\tonBeforeUnmount(() => clearInterval(timeoutID));\n\n\treturn {\n\t\t/** Elapsed milliseconds since starting the timer */\n\t\telapsed: computed(() => elapsed.value),\n\t\t/** Remaining milliseconds */\n\t\tremaining: computed(() => remaining.value),\n\t\t/** Remaining as a formatted object for display */\n\t\tremainingFormatted,\n\t\t/** Percentage of elapsed time against duration */\n\t\tprogress,\n\t\t/** Starts the timer */\n\t\tstart,\n\t\t/** Reset the timer to intiial state and starts again */\n\t\trestart,\n\t\t/** Pauses the timer */\n\t\tpause,\n\t\t/** Reset the timer to initial state, if the timer is running it is stopped */\n\t\treset,\n\t\t/** Boolean, is the timer running (paused doesn't change running state) */\n\t\trunning,\n\t\t/** Boolean is the timer paused */\n\t\tpaused,\n\t};\n};\n"],"names":["useCountdown","duration","onStart","onFinish","onStop","remaining","ref","elapsed","progress","computed","getAsPercentage","tick","running","paused","timeoutID","start","wait","restart","reset","pause","remainingFormatted","days","hours","minutes","seconds","onBeforeUnmount"],"mappings":";;;AAcO,MAAMA,IAAe,CAAC;AAAA,EAC5B,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AACD,MAAqB;AACpB,MAAI,CAACH;AACE,UAAA,IAAI,MAAM,6CAA6C;AAExD,QAAAI,IAAYC,EAAIL,CAAQ,GACxBM,IAAUD,EAAI,CAAC,GACfE,IAAWC,EAAS,MAAMC,EAAgBH,EAAQ,OAAON,CAAQ,CAAC,GAClEU,IAAO,KACPC,IAAUN,EAAI,EAAK,GACnBO,IAASP,EAAI,EAAK;AAEpB,MAAAQ;AAEJ,QAAMC,IAAQ,MAAM;AACnB,IAAIR,EAAQ,UAAUN,KAAaW,EAAQ,SAAS,CAACC,EAAO,UACxDX,KAAiBA,KACrBW,EAAO,QAAQ,IACfD,EAAQ,QAAQ,IAEhBE,IAAY,YAAY,MAAM;AAC7B,MAAAT,EAAU,QAAQ,KAAK,IAAIA,EAAU,QAAQM,GAAM,CAAC,GACpDJ,EAAQ,QAAQ,KAAK,IAAIA,EAAQ,QAAQI,GAAMV,CAAQ,GAEnDI,EAAU,UAAU,KAClBW,EAAA,CAAC,EAAE,KAAK,MAAM;AAClB,sBAAcF,CAAS,GACvBF,EAAQ,QAAQ,IACZR,KAAeA,KACfD,KAAmBA;MAAA,CACvB;AAAA,OAEAQ,CAAI;AAAA,EAAA,GAGFM,IAAU,MAAM;AACf,IAAAC,KACAH;EAAA,GAGDG,IAAQ,MAAM;AACf,IAAAJ,mBAAyBA,CAAS,GACjCD,EAAO,SACPT,KAAeA,KAEpBC,EAAU,QAAQJ,GAClBM,EAAQ,QAAQ,GAChBK,EAAQ,QAAQ,IAChBC,EAAO,QAAQ;AAAA,EAAA,GAGVM,IAAQ,MAAM;AACf,IAAAL,mBAAyBA,CAAS,GACjCD,EAAO,SACPT,KAAeA,KAEpBS,EAAO,QAAQ;AAAA,EAAA,GAGVO,IAAqBX,EAAS,MAAM;AAMzC,UAAMY,IAAO,KAAK,MAAMhB,EAAU,QAAQ,KAAQ,GAC5CiB,IAAQ,KAAK,OAAOjB,EAAU,QAAQgB,IAAO,SAAY,IAAU,GACnEE,IAAU,KAAK;AAAA,OACnBlB,EAAU,QAAQiB,IAAQ,OAAaD,IAAO,SAAY;AAAA,IAAA,GAEtDG,IAAU,KAAK;AAAA,OACnBnB,EAAU,QACVkB,IAAU,MACVD,IAAQ,OACRD,IAAO,SACP;AAAA,IAAA;AAEK,WAAA;AAAA,MACN,MAAAA;AAAA,MACA,OAAAC;AAAA,MACA,SAAAC;AAAA,MACA,SAAAC;AAAA,IAAA;AAAA,EACD,CACA;AAEe,SAAAC,EAAA,MAAM,cAAcX,CAAS,CAAC,GAEvC;AAAA;AAAA,IAEN,SAASL,EAAS,MAAMF,EAAQ,KAAK;AAAA;AAAA,IAErC,WAAWE,EAAS,MAAMJ,EAAU,KAAK;AAAA;AAAA,IAEzC,oBAAAe;AAAA;AAAA,IAEA,UAAAZ;AAAA;AAAA,IAEA,OAAAO;AAAA;AAAA,IAEA,SAAAE;AAAA;AAAA,IAEA,OAAAE;AAAA;AAAA,IAEA,OAAAD;AAAA;AAAA,IAEA,SAAAN;AAAA;AAAA,IAEA,QAAAC;AAAA,EAAA;AAEF;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index81.js","sources":["../src/components/BbOffCanvas/BbOffCanvas.vue"],"sourcesContent":["<template>\n\t<teleport to=\"body\">\n\t\t<div v-bind=\"overlayAttributes\" ref=\"overlay\" :inert=\"closed\">\n\t\t\t<div v-bind=\"panelAttributes\" ref=\"panel\">\n\t\t\t\t<div\n\t\t\t\t\tv-if=\"hasRenderedAtLeastOnce\"\n\t\t\t\t\tref=\"content\"\n\t\t\t\t\tclass=\"bb-offcanvas__content\"\n\t\t\t\t>\n\t\t\t\t\t<slot :close=\"onCloseClick\" name=\"content\">\n\t\t\t\t\t\t<div ref=\"header\" class=\"bb-offcanvas__header\">\n\t\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t\t:close=\"onCloseClick\"\n\t\t\t\t\t\t\t\tname=\"header\"\n\t\t\t\t\t\t\t\t:title=\"title\"\n\t\t\t\t\t\t\t\t:title-id=\"titleId\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<span :id=\"titleId\" class=\"bb-offcanvas__title\">\n\t\t\t\t\t\t\t\t\t<slot name=\"title\" :text=\"title\">{{ title }}</slot>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t<span class=\"bb-offcanvas-close\">\n\t\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\t\tv-if=\"showClose\"\n\t\t\t\t\t\t\t\t\t\t:aria-label=\"closeLabel\"\n\t\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\t\t@click=\"onCloseClick\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<slot name=\"close\">\n\t\t\t\t\t\t\t\t\t\t\t<span class=\"bb-offcanvas-close__icon\"\n\t\t\t\t\t\t\t\t\t\t\t\t><svg\n\t\t\t\t\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\t\t\t\t\t\t\td=\"M23 23L1 1M23 1L1 23\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t</slot>\n\t\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</slot>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div ref=\"body\" class=\"bb-offcanvas__body scrollbar-border\">\n\t\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t\t:description-id=\"descriptionId\"\n\t\t\t\t\t\t\t\tname=\"description\"\n\t\t\t\t\t\t\t\t:text=\"description\"\n\t\t\t\t\t\t\t\t><div\n\t\t\t\t\t\t\t\t\tv-if=\"description\"\n\t\t\t\t\t\t\t\t\t:id=\"descriptionId\"\n\t\t\t\t\t\t\t\t\tclass=\"bb-offcanvas__description sr-only\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{{ description }}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</slot>\n\t\t\t\t\t\t\t<slot></slot>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div style=\"flex: 10000 10000 0%\"></div>\n\t\t\t\t\t\t<div ref=\"footer\" class=\"bb-offcanvas__footer\">\n\t\t\t\t\t\t\t<slot name=\"footer\"></slot>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</slot>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</teleport>\n</template>\n\n<script setup lang=\"ts\">\nimport {\n\tcomputed,\n\tgetCurrentInstance,\n\tnextTick,\n\tonBeforeUnmount,\n\tonMounted,\n\tref,\n\tuseAttrs,\n\twatch,\n} from 'vue';\nimport { useFocusTrap } from '@vueuse/integrations/useFocusTrap';\nimport { useId } from '@/composables/useId';\nimport { wait } from '@/utilities/functions/wait';\nimport type { CommonProps, Size } from '@/types/CommonProps';\nimport { useModalsState } from '@/composables/useModalsState';\n\nexport type Sizes = {\n\tsm: number;\n\tmd: number;\n\tlg: number;\n};\n\nexport type BbOffCanvasProps = Pick<\n\tCommonProps,\n\t| 'closeLabel'\n\t| 'compact'\n\t| 'disabled'\n\t| 'eager'\n\t| 'panelClasses'\n\t| 'overlayClasses'\n\t| 'persistent'\n\t| 'showClose'\n\t| 'title'\n\t| 'transition'\n\t| 'transitionDuration'\n> &\n\tSize<Sizes> & {\n\t\t/**\n\t\t * Description of the content of the modal. Extremely useful for accessibility reasons.\n\t\t */\n\t\tdescription?: string;\n\t\t/**\n\t\t * Elements that obtains focus immediately after opening the offcanvas.\n\t\t * By default it's the first tabbable item.\n\t\t */\n\t\tfocusTarget?: string;\n\t\t/**\n\t\t * Displays the modala as fulscreen with no margin to the page\n\t\t */\n\t\tfullscreen?: boolean;\n\t\t/**\n\t\t * Defines the state open / closed of the modal.\n\t\t */\n\t\tmodelValue?: boolean | null;\n\t\t/**\n\t\t * Defines the direction the offcanvas should appear from\n\t\t */\n\t\tdirection?: 'left' | 'top' | 'right' | 'bottom';\n\t};\n\nconst props = withDefaults(defineProps<BbOffCanvasProps>(), {\n\tcloseLabel: 'Chiudi',\n\tdirection: 'left',\n\tshowClose: true,\n\tsize: 'sm',\n\ttransition: 'fade',\n\ttransitionDuration: 350,\n\tpanelClasses: () => [],\n\toverlayClasses: () => [],\n});\n\nexport type BbOffCanvasEvents = {\n\t(e: 'shown'): void;\n\t(e: 'hidden'): void;\n\t(e: 'update:modelValue', value: boolean): void;\n};\n\nconst emit = defineEmits<BbOffCanvasEvents>();\n\nexport type BbOffCanvasSlots = {\n\theader?: (props: {\n\t\ttitleId: typeof titleId;\n\t\tclose: typeof onCloseClick;\n\t\ttitle: BbOffCanvasProps['title'];\n\t}) => any;\n\ttitle?: (props: { text: BbOffCanvasProps['title'] }) => any;\n\tclose?: (props: object) => any;\n\tdescription?: (props: {\n\t\tdescriptionId: typeof descriptionId;\n\t\ttext: BbOffCanvasProps['description'];\n\t}) => any;\n\tdefault?: (props: object) => any;\n\tcontent?: (props: { close: typeof onCloseClick }) => any;\n\tfooter?: (props: object) => any;\n};\n\ndefineSlots<BbOffCanvasSlots>();\n\nconst titleId = `title_${useId().id.value}`;\nconst descriptionId = `description_${useId().id.value}`;\n\nconst overlay = ref<HTMLElement | null>(null);\nconst panel = ref<HTMLElement | null>(null);\nconst content = ref<HTMLElement | null>(null);\nconst header = ref<HTMLElement | null>(null);\nconst body = ref<HTMLElement | null>(null);\nconst footer = ref<HTMLElement | null>(null);\nconst attrs = useAttrs();\n\n// @ts-expect-error possibly undef\nconst isNuxt = !!getCurrentInstance()?.proxy?.$nuxt;\n\nconst orderInStack = ref(0);\nconst isCurrent = computed(() => {\n\tconst { openedModals } = useModalsState();\n\treturn !openedModals.value || openedModals.value === orderInStack.value;\n});\n\nconst { activate, deactivate } = useFocusTrap(panel, {\n\tinitialFocus: props.focusTarget ?? undefined,\n\tclickOutsideDeactivates: true,\n\t/* On esc deactivate the trap, return focus and then close the modal */\n\tescapeDeactivates: () => {\n\t\tnextTick(() => {\n\t\t\temit('update:modelValue', false);\n\t\t});\n\t\treturn true;\n\t},\n});\n\nconst closeLabel = computed(() => props.closeLabel);\n\nconst open = ref(false);\nconst opening = ref(false);\nconst closed = ref(true);\nconst closing = ref(false);\nconst hasRenderedAtLeastOnce = ref(props.eager || props.modelValue);\nconst lastFocusedElement = ref<Element | null>(null);\n\nconst busy = computed(() => opening.value || closing.value);\n\nconst restrictBody = () => {\n\tif (!globalThis.document) return;\n\tconst scrollBarWidth =\n\t\twindow.innerWidth - document.documentElement.clientWidth;\n\tdocument.body.style.overflow = 'hidden';\n\tdocument.body.style.paddingRight = `${scrollBarWidth}px`;\n};\nconst releaseBody = () => {\n\tif (!globalThis.document) return;\n\tdocument.body.style.overflow = 'auto';\n\tdocument.body.style.paddingRight = '0px';\n};\n\nonBeforeUnmount(() => {\n\tif (props.modelValue) {\n\t\tconst { openedModals, modalHasClosed } = useModalsState();\n\t\tif (openedModals.value) {\n\t\t\tmodalHasClosed();\n\t\t\torderInStack.value = 0;\n\t\t\treleaseBody();\n\t\t}\n\t}\n});\n\nonMounted(() => {\n\tif (!props.modelValue && !hasRenderedAtLeastOnce.value) return;\n\tif (isNuxt && !globalThis.document) return;\n\talignToModelValue();\n});\nonBeforeUnmount(() => {\n\tif (props.modelValue) {\n\t\tconst { openedModals, modalHasClosed } = useModalsState();\n\t\tif (openedModals.value) {\n\t\t\tmodalHasClosed();\n\t\t\torderInStack.value = 0;\n\t\t\treleaseBody();\n\t\t}\n\t}\n});\n\n/**\n * Every time modelValue changes align the display to it\n */\nwatch(\n\t() => props.modelValue,\n\t() => {\n\t\tif (!props.modelValue && !hasRenderedAtLeastOnce.value) return;\n\t\tif (isNuxt && !globalThis.document) return;\n\t\talignToModelValue();\n\t},\n\t{ flush: 'post' }\n);\n\n/**\n * When modelValue becomes true if the component wasn't rendered render it\n * and wait for it to be on the page (or transitions would not work).\n * Stash the latest focused element so we can return it later when it closes.\n * Focus on the panel upon opening.\n * ---\n * Notice all interactions update modelValue and then this function aligns the display to it\n */\nconst alignToModelValue = async () => {\n\tif (props.modelValue) {\n\t\tif (!hasRenderedAtLeastOnce.value) {\n\t\t\thasRenderedAtLeastOnce.value = true;\n\t\t}\n\n\t\tclosed.value = false;\n\t\tclosing.value = false;\n\t\topening.value = true;\n\n\t\t// This prevents overscroll chaining (additional scrolling to the body when the modal has been completely scrolled)\n\t\tconst { modalHasOpened, openedModals } = useModalsState();\n\t\tmodalHasOpened();\n\t\torderInStack.value = openedModals.value;\n\t\trestrictBody();\n\t\tawait wait(props.transitionDuration);\n\n\t\topening.value = false;\n\t\topen.value = true;\n\t\temit('shown');\n\t\tactivate();\n\t} else {\n\t\tdeactivate();\n\t\topening.value = false;\n\t\topen.value = false;\n\t\tclosing.value = true;\n\n\t\tconst { modalHasClosed, openedModals } = useModalsState();\n\t\tmodalHasClosed();\n\t\torderInStack.value = 0;\n\t\tif (!openedModals.value) {\n\t\t\treleaseBody();\n\t\t}\n\t\tawait wait(props.transitionDuration);\n\n\t\tclosing.value = false;\n\t\tclosed.value = true;\n\t\temit('hidden');\n\t\tif (lastFocusedElement.value instanceof HTMLElement) {\n\t\t\tlastFocusedElement.value.focus();\n\t\t}\n\t}\n};\n\n/**\n * Disable scrolling\n */\nconst onOverlayScroll = (event: Event) => {\n\tif (event.target === overlay.value) {\n\t\tevent.preventDefault();\n\t}\n};\n\n/**\n * Close the modal on overlay click if not persistent\n */\nconst onOverlayClick = (event: MouseEvent) => {\n\tif (props.disabled || busy.value) return;\n\tif (overlay.value) {\n\t\tif (event.target === overlay.value) {\n\t\t\tif (!props.persistent) {\n\t\t\t\temit('update:modelValue', false);\n\t\t\t}\n\t\t}\n\t}\n};\n\n/**\n * On click on the X button\n */\nconst onCloseClick = () => {\n\tif (props.disabled) return;\n\temit('update:modelValue', false);\n};\n\nconst overlayAttributes = computed(() => {\n\tconst classes = [\n\t\t{\n\t\t\t'bb-offcanvas bb-offcanvas__overlay': true,\n\t\t\t'bb-offcanvas--fullscreen': props.fullscreen,\n\t\t\t'bb-offcanvas--faded': !isCurrent.value,\n\t\t\t'bb-offcanvas--open': open.value,\n\t\t\t'bb-offcanvas--opening': opening.value,\n\t\t\t'bb-offcanvas--closed': closed.value,\n\t\t\t'bb-offcanvas--closing': closing.value,\n\t\t\t[`bb-offcanvas--transition-${props.transition}`]: true,\n\t\t\t[`bb-offcanvas--${props.direction}`]: true,\n\t\t},\n\t\tprops.overlayClasses,\n\t].flat();\n\tconst eventListeners = {\n\t\tonClick: onOverlayClick,\n\t\tonScroll: onOverlayScroll,\n\t\tonTouchmove: onOverlayScroll,\n\t\tonWheel: onOverlayScroll,\n\t\tonKeydown: onOverlayScroll,\n\t};\n\n\tconst style = {\n\t\ttransitionDuration: props.transitionDuration / 1000 + 's',\n\t};\n\treturn {\n\t\tclass: classes,\n\t\tstyle,\n\t\t...eventListeners,\n\t\t...attrs,\n\t};\n});\n\nconst panelAttributes = computed(() => {\n\tconst classes = [\n\t\t{\n\t\t\t'bb-offcanvas__panel': true,\n\t\t\t'bb-offcanvas__panel--compact': props.compact,\n\t\t},\n\t\tprops.panelClasses,\n\t].flat();\n\n\tconst accessibilityAttrs: {\n\t\t[key: string]: string | boolean;\n\t} = {\n\t\trole: 'dialog',\n\t\t'aria-modal': true,\n\t};\n\n\tif (hasRenderedAtLeastOnce.value) {\n\t\taccessibilityAttrs['aria-labelledby'] = titleId;\n\n\t\tif (props.description)\n\t\t\taccessibilityAttrs['aria-describedby'] = descriptionId;\n\t}\n\n\tlet maxWidth;\n\tlet height;\n\tconst sizes: Sizes = {\n\t\tsm: 384,\n\t\tmd: 652,\n\t\tlg: 896,\n\t};\n\tif (props.direction === 'left' || props.direction === 'right') {\n\t\tif (props.fullscreen) maxWidth = '100%';\n\t\telse if (typeof props.size === 'number') maxWidth = props.size + 'px';\n\t\telse if (props.size in sizes)\n\t\t\tmaxWidth = sizes[props.size as keyof Sizes] + 'px';\n\t\telse maxWidth = props.size + 'px';\n\t} else {\n\t\tif (props.fullscreen) height = '100%';\n\t\telse if (typeof props.size === 'number') height = props.size + 'px';\n\t\telse if (props.size in sizes)\n\t\t\theight = sizes[props.size as keyof Sizes] + 'px';\n\t\telse if (!Number.isNaN(Number(props.size))) height = props.size + 'px';\n\t\telse if (props.size === 'auto') height = 'auto';\n\t}\n\n\tconst style = {\n\t\tmaxWidth,\n\t\theight,\n\t\ttransitionDuration: props.transitionDuration / 1000 + 's',\n\t};\n\n\treturn {\n\t\tclass: classes,\n\t\tstyle,\n\t\t...accessibilityAttrs,\n\t};\n});\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbOffCanvas';\n</style>\n"],"names":["props","__props","emit","__emit","titleId","useId","descriptionId","overlay","ref","panel","content","header","body","footer","attrs","useAttrs","isNuxt","_b","_a","getCurrentInstance","orderInStack","isCurrent","computed","openedModals","useModalsState","activate","deactivate","useFocusTrap","nextTick","closeLabel","open","opening","closed","closing","hasRenderedAtLeastOnce","lastFocusedElement","busy","restrictBody","scrollBarWidth","releaseBody","onBeforeUnmount","modalHasClosed","onMounted","alignToModelValue","watch","modalHasOpened","wait","onOverlayScroll","event","onOverlayClick","onCloseClick","overlayAttributes","classes","eventListeners","style","panelAttributes","accessibilityAttrs","maxWidth","height","sizes"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuIA,UAAMA,IAAQC,GAiBRC,IAAOC,GAqBPC,IAAU,SAASC,EAAM,EAAE,GAAG,KAAK,IACnCC,IAAgB,eAAeD,EAAM,EAAE,GAAG,KAAK,IAE/CE,IAAUC,EAAwB,IAAI,GACtCC,IAAQD,EAAwB,IAAI,GACpCE,IAAUF,EAAwB,IAAI,GACtCG,IAASH,EAAwB,IAAI,GACrCI,IAAOJ,EAAwB,IAAI,GACnCK,IAASL,EAAwB,IAAI,GACrCM,IAAQC,MAGRC,IAAS,CAAC,GAACC,KAAAC,IAAAC,GAAA,MAAA,gBAAAD,EAAsB,UAAtB,QAAAD,EAA6B,QAExCG,IAAeZ,EAAI,CAAC,GACpBa,IAAYC,EAAS,MAAM;AAC1B,YAAA,EAAE,cAAAC,MAAiBC;AACzB,aAAO,CAACD,EAAa,SAASA,EAAa,UAAUH,EAAa;AAAA,IAAA,CAClE,GAEK,EAAE,UAAAK,GAAU,YAAAC,MAAeC,GAAalB,GAAO;AAAA,MACpD,cAAcT,EAAM,eAAe;AAAA,MACnC,yBAAyB;AAAA;AAAA,MAEzB,mBAAmB,OAClB4B,GAAS,MAAM;AACd,QAAA1B,EAAK,qBAAqB,EAAK;AAAA,MAAA,CAC/B,GACM;AAAA,IACR,CACA,GAEK2B,IAAaP,EAAS,MAAMtB,EAAM,UAAU,GAE5C8B,IAAOtB,EAAI,EAAK,GAChBuB,IAAUvB,EAAI,EAAK,GACnBwB,IAASxB,EAAI,EAAI,G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AAM,IAAmB,IAAI,OACnC,OAAO,MAAM,OAAOA,EAAM,IAAI,CAAC,IAChCA,EAAM,SAAS,WAAiB0D,IAAA,UADYA,IAAA1D,EAAM,OAAO;AAInE,YAAMsD,KAAQ;AAAA,QACb,UAAAG;AAAA,QACA,QAAAC;AAAA,QACA,oBAAoB1D,EAAM,qBAAqB,MAAO;AAAA,MAAA;AAGhD,aAAA;AAAA,QACN,OAAOoD;AAAA,QACP,OAAAE;AAAA,QACA,GAAGE;AAAA,MAAA;AAAA,IACJ,CACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index83.js","sources":["../src/components/BbPagination/BbPagination.vue"],"sourcesContent":["<template>\n\t<div\n\t\tref=\"outercontainer\"\n\t\tclass=\"bb-pagination\"\n\t\t:class=\"{\n\t\t\t[`bb-pagination--${align}`]: true,\n\t\t\t'bb-pagination--disabled': disabled,\n\t\t}\"\n\t>\n\t\t<nav aria-label=\"Navigazione\">\n\t\t\t<ul ref=\"innercontainer\" class=\"bb-pagination__pages\">\n\t\t\t\t<li>\n\t\t\t\t\t<BaseButton\n\t\t\t\t\t\tclass=\"bb-pagination__page bb-pagination__page--previous\"\n\t\t\t\t\t\t:disabled=\"props.modelValue <= 1 || loading || disabled\"\n\t\t\t\t\t\t@click=\"emit('update:modelValue', props.modelValue - 1)\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot name=\"previous\">\n\t\t\t\t\t\t\t<span class=\"bb-pagination__page-label sr-only\">Precedente</span>\n\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\tclass=\"bb-pagination__page-chevron\"\n\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<path\n\t\t\t\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\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t</slot>\n\t\t\t\t\t</BaseButton>\n\t\t\t\t</li>\n\t\t\t\t<li v-for=\"item in items\" :key=\"item.key\">\n\t\t\t\t\t<BaseButton\n\t\t\t\t\t\tclass=\"bb-pagination__page\"\n\t\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t\t'bb-pagination__page--active': item.active,\n\t\t\t\t\t\t\t'bb-pagination__page--ellipsis': item.ellipsis,\n\t\t\t\t\t\t}\"\n\t\t\t\t\t\t:disabled=\"item.disabled\"\n\t\t\t\t\t\t@click=\"emit('update:modelValue', item.key)\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<template v-if=\"item.ellipsis === true\">\n\t\t\t\t\t\t\t<slot name=\"ellipsis\">\n\t\t\t\t\t\t\t\t<span class=\"bb-pagination__page-label\">{{\n\t\t\t\t\t\t\t\t\tprops.ellipsis\n\t\t\t\t\t\t\t\t}}</span>\n\t\t\t\t\t\t\t</slot>\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<slot\n\t\t\t\t\t\t\t\t:active=\"item.active\"\n\t\t\t\t\t\t\t\t:disabled=\"item.disabled\"\n\t\t\t\t\t\t\t\t:item=\"item.key\"\n\t\t\t\t\t\t\t\tname=\"item\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<span class=\"bb-pagination__page-label\">{{ item.key }}</span>\n\t\t\t\t\t\t\t</slot>\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</BaseButton>\n\t\t\t\t</li>\n\t\t\t\t<li>\n\t\t\t\t\t<BaseButton\n\t\t\t\t\t\tclass=\"bb-pagination__page bb-pagination__page--next\"\n\t\t\t\t\t\t:disabled=\"props.modelValue >= +totalPages || loading || disabled\"\n\t\t\t\t\t\t@click=\"emit('update:modelValue', props.modelValue + 1)\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot name=\"next\">\n\t\t\t\t\t\t\t<span class=\"bb-pagination__page-label sr-only\">Successivo</span>\n\t\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\t\tclass=\"bb-pagination__page-chevron\"\n\t\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<path\n\t\t\t\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\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t</slot>\n\t\t\t\t\t</BaseButton>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</nav>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, nextTick, onBeforeUnmount, onMounted, ref } from 'vue';\nimport { debounce } from '@/utilities/functions/debounce';\nimport type { CommonProps } from '@/types/CommonProps';\nimport { BaseButton } from '@/index';\n\nexport type BbPaginationProps = Pick<CommonProps, 'disabled' | 'loading'> & {\n\talign?: 'left' | 'right' | 'center';\n\t/**\n\t * String of text displayed in place of hidden pages\n\t */\n\tellipsis?: string;\n\t/**\n\t * Maximum number of clickable pages displayed at all times.\n\t * This has a tolerance of +/- 1 for odd / even numbering.\n\t * It does not include ellipses.\n\t */\n\tmaxSize?: number | string;\n\t/**\n\t * Used by v-model. Indicates the current page.\n\t */\n\tmodelValue: number;\n\t/**\n\t * Total number of pages there is.\n\t */\n\ttotalPages?: number | string;\n};\n\nconst props = withDefaults(defineProps<BbPaginationProps>(), {\n\talign: 'right',\n\tmodelValue: 1,\n\ttotalPages: 1,\n\tellipsis: '...',\n\tmaxSize: 6,\n});\n\nexport type BbPaginationEvents = {\n\t(e: 'update:modelValue', value: number): void;\n};\n\nconst emit = defineEmits(['update:modelValue']);\n\ndefineSlots<{\n\tprevious?: (props: object) => any;\n\tnext?: (props: object) => any;\n\titem?: (props: { active: boolean; disabled: boolean; item: number }) => any;\n\tellipsis?: (props: object) => any;\n}>();\n\nconst totalPages = computed(() => +props.totalPages);\nconst start = ref(1);\nconst maxSize = ref(+props.maxSize);\n\nconst outercontainer = ref<HTMLElement>();\nconst innercontainer = ref<HTMLElement>();\n\nconst buttonFootprint = ref<number>(Infinity);\n\n/**\n * Adjusts how many buttons to show.\n * if current buttons can't fit subtract maxSize until they do or until minimum is reached\n * if more buttons could fit add buttons until the don't\n * If minimum or maximum is reached just quit until next resize\n */\nconst adjustMaxElements = () => {\n\tif (outercontainer.value && innercontainer.value) {\n\t\t/* If some buttons do not fit */\n\t\tif (outercontainer.value.clientWidth < innercontainer.value.clientWidth) {\n\t\t\tif (maxSize.value - 1 > 3) {\n\t\t\t\tmaxSize.value--;\n\t\t\t\tnextTick(adjustMaxElements);\n\t\t\t} else {\n\t\t\t\tmaxSize.value = 3;\n\t\t\t}\n\t\t\t/* If all current buttons do fit */\n\t\t} else {\n\t\t\t/* If some buttons have been hidden */\n\t\t\tif (maxSize.value < +props.maxSize) {\n\t\t\t\tif (\n\t\t\t\t\t/* If there is enough space to fit one */\n\t\t\t\t\toutercontainer.value.clientWidth - innercontainer.value.clientWidth >\n\t\t\t\t\tbuttonFootprint.value\n\t\t\t\t) {\n\t\t\t\t\tmaxSize.value = Math.min(maxSize.value + 1, +props.maxSize);\n\t\t\t\t\tnextTick(adjustMaxElements);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\nif (globalThis.ResizeObserver) {\n\tconst observer = new ResizeObserver(debounce(adjustMaxElements, 200));\n\tonMounted(() => {\n\t\tif (outercontainer.value && innercontainer.value) {\n\t\t\tconst button = outercontainer.value.querySelectorAll(\n\t\t\t\t'.bb-pagination__page'\n\t\t\t)[1];\n\t\t\tif (button) {\n\t\t\t\t/* Compute the footprint necessary to render a new button */\n\t\t\t\tconst gapString = getComputedStyle(innercontainer.value).columnGap;\n\t\t\t\tconst numberAsString = gapString.replaceAll(/\\D/g, '');\n\t\t\t\tconst gap = Number(numberAsString);\n\t\t\t\tbuttonFootprint.value = button.clientWidth + gap;\n\t\t\t}\n\t\t\tobserver.observe(outercontainer.value);\n\t\t}\n\t});\n\tonBeforeUnmount(() => {\n\t\tobserver.disconnect();\n\t});\n}\n\nconst range = computed(() => {\n\tif (\n\t\ttotalPages.value <= 0 ||\n\t\tisNaN(totalPages.value) ||\n\t\ttotalPages.value > Number.MAX_SAFE_INTEGER\n\t)\n\t\treturn [];\n\n\tif (maxSize.value <= 1) return [props.modelValue];\n\n\tif (totalPages.value <= maxSize.value) {\n\t\treturn createRange(totalPages.value, start.value);\n\t}\n\n\tconst even = maxSize.value % 2 === 0;\n\tconst middle = even ? maxSize.value / 2 : Math.floor(maxSize.value / 2);\n\tconst left = even ? middle : middle + 1;\n\tconst right = totalPages.value - middle;\n\n\tif (left - props.modelValue >= 0) {\n\t\treturn [\n\t\t\t...createRange(Math.max(1, maxSize.value - 1), start.value),\n\t\t\tprops.ellipsis,\n\t\t\ttotalPages.value,\n\t\t];\n\t} else if (props.modelValue - right >= (even ? 1 : 0)) {\n\t\tconst rangeLength = maxSize.value - 1;\n\t\tconst rangeStart = totalPages.value - rangeLength + start.value;\n\t\treturn [\n\t\t\tstart.value,\n\t\t\tprops.ellipsis,\n\t\t\t...createRange(rangeLength, rangeStart),\n\t\t];\n\t} else {\n\t\tconst rangeLength = Math.max(1, maxSize.value - 3);\n\t\tconst rangeStart =\n\t\t\trangeLength === 1\n\t\t\t\t? props.modelValue\n\t\t\t\t: props.modelValue - Math.ceil(rangeLength / 2) + start.value;\n\t\treturn [\n\t\t\tstart.value,\n\t\t\tprops.ellipsis,\n\t\t\t...createRange(rangeLength, rangeStart),\n\t\t\tprops.ellipsis,\n\t\t\ttotalPages.value,\n\t\t];\n\t}\n});\n\ntype Item =\n\t| {\n\t\t\tactive: boolean;\n\t\t\tkey: string;\n\t\t\tpage: string;\n\t\t\tellipsis: true;\n\t\t\tdisabled: boolean;\n\t }\n\t| {\n\t\t\tactive: boolean;\n\t\t\tkey: number;\n\t\t\tpage: number;\n\t\t\tellipsis: false;\n\t\t\tdisabled: boolean;\n\t };\n\nconst items = computed<Item[]>(() => {\n\treturn range.value.map((item, index) => {\n\t\tif (typeof item === 'string') {\n\t\t\treturn {\n\t\t\t\tactive: false,\n\t\t\t\tkey: `ellipsis-${index}`,\n\t\t\t\tpage: item,\n\t\t\t\tellipsis: true,\n\t\t\t\tdisabled: true,\n\t\t\t};\n\t\t} else {\n\t\t\tconst active = item === props.modelValue;\n\t\t\treturn {\n\t\t\t\tactive,\n\t\t\t\tkey: item,\n\t\t\t\tpage: item,\n\t\t\t\tellipsis: false,\n\t\t\t\tdisabled: !!props.disabled || +props.totalPages < 2 || props.loading,\n\t\t\t};\n\t\t}\n\t});\n});\n\nconst createRange = (length: number, start = 0): number[] => {\n\treturn Array.from({ length }, (_, k) => start + k);\n};\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbPagination';\n</style>\n"],"names":["props","__props","emit","__emit","totalPages","computed","start","ref","maxSize","outercontainer","innercontainer","buttonFootprint","adjustMaxElements","nextTick","observer","debounce","onMounted","button","numberAsString","gap","onBeforeUnmount","range","createRange","even","middle","left","right","rangeLength","rangeStart","items","item","index","length","_","k"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmHA,UAAMA,IAAQC,GAYRC,IAAOC,GASPC,IAAaC,EAAS,MAAM,CAACL,EAAM,UAAU,GAC7CM,IAAQC,EAAI,CAAC,GACbC,IAAUD,EAAI,CAACP,EAAM,OAAO,GAE5BS,IAAiBF,KACjBG,IAAiBH,KAEjBI,IAAkBJ,EAAY,KAAQ,GAQtCK,IAAoB,MAAM;AAC3B,MAAAH,EAAe,SAASC,EAAe,UAEtCD,EAAe,MAAM,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,KAAK,EAAE,QAAA0B,KAAU,CAACC,GAAGC,MAAM5B,IAAQ4B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index85.js","sources":["../src/components/BbPopover/BbPopover.vue"],"sourcesContent":["<template>\n\t<span class=\"bb-popover\" v-bind=\"attributes\">\n\t\t<span ref=\"wrapper\" class=\"bb-popover__wrapper\">\n\t\t\t<slot\n\t\t\t\tname=\"activator\"\n\t\t\t\tv-bind=\"{\n\t\t\t\t\tprops: {\n\t\t\t\t\t\t'aria-controls': `popover_${id}`,\n\t\t\t\t\t\t'aria-expanded': open,\n\t\t\t\t\t\tonClick: onTriggerClick,\n\t\t\t\t\t\tid,\n\t\t\t\t\t\tdisabled: !!disabled,\n\t\t\t\t\t},\n\t\t\t\t\tclosed: closed,\n\t\t\t\t\tclosing: closing,\n\t\t\t\t\tdisabled: !!disabled,\n\t\t\t\t\topen: open,\n\t\t\t\t\topening: opening,\n\t\t\t\t\tplacement: placement,\n\t\t\t\t}\"\n\t\t\t></slot>\n\t\t</span>\n\n\t\t<CommonFloating\n\t\t\tv-if=\"hasOpenedOnce || eager\"\n\t\t\t:arrow-padding=\"arrowPadding\"\n\t\t\tbase-class=\"bb-popover\"\n\t\t\t:container-attributes=\"{\n\t\t\t\tid: `popover_${id}`,\n\t\t\t\tstyle: { width: parsedWidth },\n\t\t\t}\"\n\t\t\t:eager=\"eager\"\n\t\t\t:offset=\"offset\"\n\t\t\t:open=\"open\"\n\t\t\t:padding=\"padding\"\n\t\t\t:placement=\"placement\"\n\t\t\t:theme=\"theme\"\n\t\t\t:transition-duration=\"transitionDuration\"\n\t\t\t:wrapper=\"wrapper\"\n\t\t>\n\t\t\t<div ref=\"content\" class=\"bb-popover__content\">\n\t\t\t\t<BaseButton\n\t\t\t\t\tv-if=\"showClose\"\n\t\t\t\t\tclass=\"bb-popover__close\"\n\t\t\t\t\t@click=\"onClickClose\"\n\t\t\t\t>\n\t\t\t\t\t<span class=\"bb-popover__close-label sr-only\">Chiudi</span>\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</BaseButton>\n\t\t\t\t<slot\n\t\t\t\t\t:close=\"onClickClose\"\n\t\t\t\t\t:closed=\"closed\"\n\t\t\t\t\t:closing=\"closing\"\n\t\t\t\t\t:disabled=\"!!disabled\"\n\t\t\t\t\t:open=\"open\"\n\t\t\t\t\t:opening=\"opening\"\n\t\t\t\t\t:placement=\"placement\"\n\t\t\t\t></slot>\n\t\t\t</div>\n\t\t</CommonFloating>\n\t</span>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, defineAsyncComponent, nextTick, ref } from 'vue';\nimport { useFocusTrap } from '@vueuse/integrations/useFocusTrap';\nimport { useId } from '@/composables/useId';\nimport { useIntersectionObserver } from '@vueuse/core';\nimport { waitFor } from '@/utilities/functions/waitFor';\nimport BaseButton from '../BaseButton/BaseButton.vue';\nimport type { CommonProps } from '@/types/CommonProps';\nimport type { Placement } from '@floating-ui/vue';\n\nconst CommonFloating = defineAsyncComponent(\n\t() => import('../CommonFloating.vue')\n);\n\nexport type BbPopoverProps = Pick<\n\tCommonProps,\n\t| 'arrowPadding'\n\t| 'block'\n\t| 'disabled'\n\t| 'eager'\n\t| 'offset'\n\t| 'padding'\n\t| 'placement'\n\t| 'showClose'\n\t| 'theme'\n\t| 'transitionDuration'\n> & {\n\t/**\n\t * Elements that obtains focus immediately after opening the popover.\n\t * By default it's the first tabbable item.\n\t */\n\tfocusTarget?: string;\n\t/**\n\t * Width of the dropdown in pixels.\n\t */\n\twidth?: number | string;\n};\n\nconst props = withDefaults(defineProps<BbPopoverProps>(), {\n\tarrowPadding: 10,\n\toffset: 3,\n\tpadding: 10,\n\tplacement: 'bottom',\n\tshowClose: true,\n\ttheme: 'default',\n\ttransitionDuration: 150,\n});\n\nexport type BbPopoverEvents = {\n\t(e: 'shown'): void;\n\t(e: 'hidden'): void;\n};\n\nconst emit = defineEmits<BbPopoverEvents>();\n\ndefineSlots<{\n\tactivator?: (props: {\n\t\tprops: {\n\t\t\t'aria-controls': string;\n\t\t\t'aria-expanded': boolean;\n\t\t\tonClick: typeof onTriggerClick;\n\t\t\tid: string;\n\t\t\tdisabled: boolean;\n\t\t};\n\t\tclosed: boolean;\n\t\tclosing: boolean;\n\t\tdisabled: boolean;\n\t\topen: boolean;\n\t\topening: boolean;\n\t\tplacement: Placement;\n\t}) => any;\n\tdefault?: (props: {\n\t\tclose: typeof onClickClose;\n\t\tclosed: boolean;\n\t\tclosing: boolean;\n\t\tdisabled: boolean;\n\t\topen: boolean;\n\t\topening: boolean;\n\t\tplacement: Placement;\n\t}) => any;\n}>();\n\nconst { id: _id } = useId();\nconst id = `bbp_${_id.value}`;\n\nconst wrapper = ref<any>();\nconst content = ref<HTMLElement>();\n\nconst { activate, deactivate } = useFocusTrap(content, {\n\t/**\n\t * This traps all clicks outside so we are pressing\n\t * the trigger we just allow and process that in its\n\t * own click handler.\n\t * If we are pressing anything random on the page\n\t * close the popover and be done\n\t */\n\tclickOutsideDeactivates: (event) => {\n\t\tconst target = event.target;\n\t\tif (target instanceof HTMLElement) {\n\t\t\tif (wrapper.value?.contains(target)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tclosePopover();\n\t\temit('hidden');\n\t\treturn true;\n\t},\n\tescapeDeactivates: () => {\n\t\tnextTick(async () => {\n\t\t\tawait closePopover();\n\t\t\tfocusTrigger();\n\t\t\temit('hidden');\n\t\t});\n\t\treturn true;\n\t},\n\t/* We don't return focus so that when\n\t * we press a button on tyhe page we can focus\n\t * THAT button and not the current trigger\n\t */\n\treturnFocusOnDeactivate: false,\n});\n\nuseIntersectionObserver(\n\twrapper,\n\t([{ intersectionRatio }]) => {\n\t\tif (intersectionRatio !== 1 && open.value) closePopover();\n\t},\n\t{ threshold: [0, 1] }\n);\n\nconst attributes = computed(() => {\n\tconst classes = {\n\t\t'bb-popover--block': props.block,\n\t\t[`bb-popover--${props.theme}`]: true,\n\t};\n\treturn {\n\t\tclass: classes,\n\t};\n});\n\nconst hasOpenedOnce = ref(false);\nconst opening = ref(false);\nconst open = ref(false);\nconst closing = ref(false);\nconst closed = ref(true);\n\nconst openPopover = async () => {\n\thasOpenedOnce.value = true;\n\tawait waitFor(() => !!content.value);\n\topen.value = true;\n};\n\nconst closePopover = async () => {\n\topen.value = false;\n};\nconst onTriggerClick = async () => {\n\tif (open.value) {\n\t\tawait closePopover();\n\t\tfocusTrigger();\n\t\temit('hidden');\n\t\treturn;\n\t}\n\tif (opening.value || props.disabled) return;\n\thasOpenedOnce.value = true;\n\tawait openPopover();\n\tlet focusTarget = props.focusTarget ?? '.bb-popover__close';\n\n\tactivate({\n\t\tonPostActivate: () => {\n\t\t\tif (content.value) {\n\t\t\t\tconst target = content.value.querySelector(focusTarget);\n\t\t\t\tif (target instanceof HTMLElement) {\n\t\t\t\t\ttarget.focus();\n\t\t\t\t\temit('shown');\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t});\n};\n\nconst focusTrigger = () => {\n\tconst trigger = wrapper.value?.querySelector(`[aria-controls=popover_${id}]`);\n\tif (trigger instanceof HTMLElement) {\n\t\ttrigger.focus({ preventScroll: true });\n\t}\n};\n\nconst onClickClose = async () => {\n\tdeactivate();\n\tawait closePopover();\n\tfocusTrigger();\n\temit('hidden');\n};\n\nconst parsedWidth = computed(() => {\n\tif (props.width) {\n\t\tlet width: string;\n\t\t// If the width is a css unit string use it, if it is a number or number string add px\n\t\tif (typeof props.width === 'string' && Number.isNaN(Number(props.width))) {\n\t\t\tif (props.width.includes('%')) {\n\t\t\t\tif (!wrapper.value) return;\n\t\t\t\twidth = `${\n\t\t\t\t\twrapper.value.clientWidth * (+props.width.replace('%', '') / 100)\n\t\t\t\t}`;\n\t\t\t} else {\n\t\t\t\twidth = props.width;\n\t\t\t}\n\t\t} else {\n\t\t\twidth = `${props.width}`;\n\t\t}\n\t\treturn `${width}px`;\n\t}\n\treturn undefined;\n});\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbPopover';\n</style>\n"],"names":["CommonFloating","defineAsyncComponent","props","__props","emit","__emit","_id","useId","id","wrapper","ref","content","activate","deactivate","useFocusTrap","event","target","_a","closePopover","nextTick","focusTrigger","useIntersectionObserver","intersectionRatio","open","attributes","computed","hasOpenedOnce","opening","closing","closed","openPopover","waitFor","onTriggerClick","focusTarget","trigger","onClickClose","parsedWidth","width"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoFA,UAAMA,IAAiBC;AAAA,MACtB,MAAM,OAAO,eAAuB;AAAA,IAAA,GA2B/BC,IAAQC,GAeRC,IAAOC,GA6BP,EAAE,IAAIC,EAAI,IAAIC,EAAM,GACpBC,IAAK,OAAOF,EAAI,KAAK,IAErBG,IAAUC,KACVC,IAAUD,KAEV,EAAE,UAAAE,GAAU,YAAAC,MAAeC,EAAaH,GAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAQtD,yBAAyB,CAACI,MAAU;;AACnC,cAAMC,IAASD,EAAM;AACrB,eAAIC,aAAkB,gBACjBC,IAAAR,EAAQ,UAAR,QAAAQ,EAAe,SAASD,OAIhBE,KACbd,EAAK,QAAQ,IACN;AAAA,MACR;AAAA,MACA,mBAAmB,OAClBe,EAAS,YAAY;AACpB,cAAMD,EAAa,GACNE,KACbhB,EAAK,QAAQ;AAAA,M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IgB,IAAe,MAAM;;AAC1B,YAAMc,KAAUjB,IAAAR,EAAQ,UAAR,gBAAAQ,EAAe,cAAc,0BAA0BT,CAAE;AACzE,MAAI0B,aAAmB,eACtBA,EAAQ,MAAM,EAAE,eAAe,GAAM,CAAA;AAAA,IACtC,GAGKC,IAAe,YAAY;AACrB,MAAAtB,KACX,MAAMK,EAAa,GACNE,KACbhB,EAAK,QAAQ;AAAA,IAAA,GAGRgC,IAAcX,EAAS,MAAM;AAClC,UAAIvB,EAAM,OAAO;AACZ,YAAAmC;AAEA,YAAA,OAAOnC,EAAM,SAAU,YAAY,OAAO,MAAM,OAAOA,EAAM,KAAK,CAAC;AACtE,cAAIA,EAAM,MAAM,SAAS,GAAG,GAAG;AAC1B,gBAAA,CAACO,EAAQ,MAAO;AACZ,YAAA4B,IAAA,GACP5B,EAAQ,MAAM,eAAe,CAACP,EAAM,MAAM,QAAQ,KAAK,EAAE,IAAI,IAC9D;AAAA,UAAA;AAEA,YAAAmC,IAAQnC,EAAM;AAAA;AAGP,UAAAmC,IAAA,GAAGnC,EAAM,KAAK;AAEvB,eAAO,GAAGmC,CAAK;AAAA,MAChB;AAAA,IACO,CACP;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index87.js","sources":["../src/components/BbProgress/BbProgress.vue"],"sourcesContent":["<template>\n\t<div\n\t\tclass=\"bb-progress\"\n\t\t:class=\"{\n\t\t\t'bb-progress--horizontal': true,\n\t\t}\"\n\t>\n\t\t<div class=\"bb-progress-bar\" :style=\"{ width: width + '%' }\"></div>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport { clamp } from '@/utilities/functions/clamp';\nimport { getAsPercentageBetween } from '@/utilities/functions/percentage';\nimport { computed } from 'vue';\n\nexport type BbProgressProps = {\n\t/**\n\t * Used by v-model. It'a number contained between `min` and `max` that corresponds to the current value.\n\t */\n\tmodelValue: number | null;\n\t/**\n\t * Minimum value. Lower cap.\n\t */\n\tmin?: number;\n\t/**\n\t * Maximum value. Upper cap.\n\t */\n\tmax?: number;\n};\n\n/**\n * You can get percentage between 250 and 370 and have it compute it automatically\n */\nconst props = withDefaults(defineProps<BbProgressProps>(), {\n\tmodelValue: 0,\n\tmin: 0,\n\tmax: 100,\n});\n\nconst width = computed(() =>\n\tclamp(\n\t\tgetAsPercentageBetween(props.modelValue || props.min, props.min, props.max),\n\t\t0,\n\t\t100\n\t)\n);\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbProgress';\n</style>\n"],"names":["props","__props","width","computed","clamp","getAsPercentageBetween"],"mappings":";;;;;;;;;;;AAkCA,UAAMA,IAAQC,GAMRC,IAAQC;AAAA,MAAS,MACtBC;AAAA,QACCC,EAAuBL,EAAM,cAAcA,EAAM,KAAKA,EAAM,KAAKA,EAAM,GAAG;AAAA,QAC1E;AAAA,QACA;AAAA,MACD;AAAA,IAAA;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index89.js","sources":["../src/components/BbRadio/BbRadio.vue"],"sourcesContent":["<template>\n\t<BaseInputContainer\n\t\t:id=\"id\"\n\t\tclass=\"bb-radio\"\n\t\t:direction=\"direction\"\n\t\t:errors=\"errors\"\n\t\t:has-errors=\"hasErrors\"\n\t\t:hide-label=\"hideLabel\"\n\t\t:hint=\"hint\"\n\t\t:input-position=\"inputPosition\"\n\t\t:label=\"label\"\n\t\t:label-position=\"labelPosition\"\n\t\t:label-tag=\"'span'\"\n\t\t:name=\"name\"\n\t\t:reverse=\"reverse\"\n\t\t:show-hint=\"showHint\"\n\t\t:tag=\"'label'\"\n\t>\n\t\t<template #label=\"data\"><slot name=\"label\" v-bind=\"data\"></slot></template>\n\t\t<template #input=\"{ id, name, hasErrors, ariaDescribedby }\">\n\t\t\t<BaseRadio\n\t\t\t\t:id=\"id\"\n\t\t\t\t:aria-describedby=\"ariaDescribedby\"\n\t\t\t\t:autofocus=\"autofocus\"\n\t\t\t\t:checked=\"checked\"\n\t\t\t\t:color=\"color\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t:has-errors=\"hasErrors\"\n\t\t\t\t:model-value=\"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=\"value\"\n\t\t\t\tv-bind=\"eventListeners\"\n\t\t\t\t><template #icon=\"data\"\n\t\t\t\t\t><slot name=\"icon\" v-bind=\"data\" :text=\"label\" /></template\n\t\t\t></BaseRadio>\n\t\t</template>\n\t</BaseInputContainer>\n</template>\n\n<script setup lang=\"ts\">\nimport BaseInputContainer from '../BaseInputContainer/BaseInputContainer.vue';\nimport BaseRadio from '../BaseRadio/BaseRadio.vue';\nimport { ref, computed } from 'vue';\nimport type { HTMLAttributes, InputHTMLAttributes } from 'vue';\nimport type {\n\tSlotAttributes,\n\tBaseRadioEvents,\n} from '../BaseRadio/BaseRadio.vue';\n\nexport type BbRadioProps = {\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Defines the input as checked\n\t */\n\tchecked?: InputHTMLAttributes['checked'];\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 * Direction of the layout of the component. Can either be a predefined value or a pattern separated by a space like `xx xxxxx`.\n\t */\n\tdirection?: 'horizontal' | 'vertical' | 'auto' | string;\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Can be a string or an array of string containing the messages to display.\n\t */\n\terrors?: string | string[];\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 * Text box to be displayed near the input, usually to indicate instructions.\n\t */\n\thint?: string;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Sets the slignment of the input. Since inputs are inline block they can be aligned just as text can.\n\t */\n\tinputPosition?: 'left' | 'center' | 'right';\n\n\t/**\n\t * Text content of the label of the element.\n\t */\n\tlabel: string;\n\n\t/**\n\t * Sets the text alignment of the label.\n\t */\n\tlabelPosition?: 'left' | 'center' | 'right';\n\n\t/**\n\t * Used by v-model. Can be any serializable type.\n\t */\n\tmodelValue?: any;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname: InputHTMLAttributes['name'];\n\n\t/**\n\t * Keeps the hint displayed.\n\t */\n\tpersistentHint?: boolean;\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 * Reverses the layout. Applicable in every direction the order of the label and the input is swapped.\n\t */\n\treverse?: boolean;\n\n\t/**\n\t * Defines the value of the radio input.\n\t * It can be any serializable value.\n\t */\n\tvalue: any;\n};\n\nexport type BbRadioEvents = BaseRadioEvents;\n\nconst props = withDefaults(defineProps<BbRadioProps>(), {\n\tdirection: 'auto',\n\treverse: true,\n});\n\nconst emit = defineEmits<BbRadioEvents>();\n\ndefineSlots<{\n\tlabel?: (props: { text: string; hasErrors: boolean }) => any;\n\ticon?: (props: SlotAttributes & { text: string }) => any;\n}>();\n\nconst active = ref(false);\nconst showHint = computed(() => props.persistentHint || active.value);\n\nconst eventListeners = {\n\tonBlur: (event: FocusEvent) => {\n\t\tactive.value = false;\n\t\temit('blur', event);\n\t},\n\tonChange: (event: Event) => emit('change', event),\n\tonClick: (event: MouseEvent) => emit('click', event),\n\tonFocus: (event: FocusEvent) => {\n\t\tactive.value = true;\n\t\temit('focus', event);\n\t},\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</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbRadio';\n</style>\n"],"names":["props","__props","emit","__emit","active","ref","showHint","computed","eventListeners","event","value"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+JA,UAAMA,IAAQC,GAKRC,IAAOC,GAOPC,IAASC,EAAI,EAAK,GAClBC,IAAWC,EAAS,MAAMP,EAAM,kBAAkBI,EAAO,KAAK,GAE9DI,IAAiB;AAAA,MACtB,QAAQ,CAACC,MAAsB;AAC9B,QAAAL,EAAO,QAAQ,IACfF,EAAK,QAAQO,CAAK;AAAA,MACnB;AAAA,MACA,UAAU,CAACA,MAAiBP,EAAK,UAAUO,CAAK;AAAA,MAChD,SAAS,CAACA,MAAsBP,EAAK,SAASO,CAAK;AAAA,MACnD,SAAS,CAACA,MAAsB;AAC/B,QAAAL,EAAO,QAAQ,IACfF,EAAK,SAASO,CAAK;AAAA,MACpB;AAAA,MACA,SAAS,CAACA,MAAiBP,EAAK,SAASO,CAAK;AAAA,MAC9C,WAAW,CAACA,MAAyBP,EAAK,WAAWO,CAAK;AAAA,MAC1D,aAAa,CAACA,MAAsBP,EAAK,aAAaO,CAAK;AAAA,MAC3D,WAAW,CAACA,MAAsBP,EAAK,WAAWO,CAAK;AAAA,MACvD,uBAAuB,CAACC,MAAeR,EAAK,qBAAqBQ,CAAK;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index9.js","sources":["../src/composables/useId.ts"],"sourcesContent":["import { ref } from 'vue';\n\nconst makeid = (length: number) => {\n\tconst allowedFirstCharacter =\n\t\t'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';\n\tconst characters =\n\t\t'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n\tconst charactersLength = characters.length;\n\tlet result = allowedFirstCharacter.charAt(\n\t\tMath.floor(Math.random() * allowedFirstCharacter.length)\n\t);\n\tlet counter = 1;\n\twhile (counter < length) {\n\t\tresult += characters.charAt(Math.floor(Math.random() * charactersLength));\n\t\tcounter += 1;\n\t}\n\treturn result;\n};\n\n/**\n * Return a reactive ref to an ID with a collision probability of one in 4 trillion.\n * The characters used are [a-zA-Z0-9] so they are fully compatible with HTML5 ID attr.\n * Also returns a function to refresh the id.\n */\nexport const useId = () => {\n\tconst id = ref(makeid(12));\n\tconst refresh = () => (id.value = makeid(12));\n\treturn {\n\t\t/**\n\t\t * The generated id\n\t\t */\n\t\tid,\n\t\trefresh,\n\t};\n};\n"],"names":["makeid","length","allowedFirstCharacter","characters","charactersLength","result","counter","useId","id","ref"],"mappings":";AAEA,MAAMA,IAAS,CAACC,MAAmB;AAClC,QAAMC,IACL,wDACKC,IACL,kEACKC,IAAmBD,EAAW;AACpC,MAAIE,IAASH,EAAsB;AAAA,IAClC,KAAK,MAAM,KAAK,OAAO,IAAIA,EAAsB,MAAM;AAAA,EAAA,GAEpDI,IAAU;AACd,SAAOA,IAAUL;AACN,IAAAI,KAAAF,EAAW,OAAO,KAAK,MAAM,KAAK,OAAO,IAAIC,CAAgB,CAAC,GAC7DE,KAAA;AAEL,SAAAD;AACR,GAOaE,IAAQ,MAAM;AAC1B,QAAMC,IAAKC,EAAIT,EAAO,EAAE,CAAC;AAElB,SAAA;AAAA;AAAA;AAAA;AAAA,IAIN,IAAAQ;AAAA,IACA,SANe,MAAOA,EAAG,QAAQR,EAAO,EAAE;AAAA,EAM1C;AAEF;"}