bitboss-ui 2.0.22 → 2.0.24

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 (488) 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} +9 -10
  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} +15 -17
  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 +2 -4
  93. package/dist/index199.js +0 -1
  94. package/dist/index200.js +0 -1
  95. package/dist/index201.js +1 -2
  96. package/dist/index202.js +2 -3
  97. package/dist/index203.js +4 -45
  98. package/dist/index204.js +4 -0
  99. package/dist/index205.js +3 -14
  100. package/dist/index206.js +33 -157
  101. package/dist/index207.js +5 -84
  102. package/dist/index208.js +9 -0
  103. package/dist/index209.js +43 -4
  104. package/dist/{index22.js → index21.js} +19 -20
  105. package/dist/index211.js +13 -7
  106. package/dist/index212.js +126 -8
  107. package/dist/index213.js +5 -282
  108. package/dist/index214.js +120 -14
  109. package/dist/index215.js +18 -16
  110. package/dist/index216.js +15 -19
  111. package/dist/index217.js +13 -17
  112. package/dist/index218.js +2 -28
  113. package/dist/index219.js +2 -4
  114. package/dist/index220.js +174 -3
  115. package/dist/index221.js +5 -250
  116. package/dist/index222.js +367 -51
  117. package/dist/index223.js +157 -44
  118. package/dist/index224.js +84 -6
  119. package/dist/index226.js +19 -3
  120. package/dist/index227.js +27 -5
  121. package/dist/index228.js +3 -3
  122. package/dist/index229.js +245 -123
  123. package/dist/{index24.js → index23.js} +6 -7
  124. package/dist/index230.js +51 -123
  125. package/dist/index231.js +44 -3
  126. package/dist/index232.js +5 -175
  127. package/dist/index233.js +49 -6
  128. package/dist/index234.js +2 -370
  129. package/dist/index235.js +106 -3
  130. package/dist/index237.js +99 -18
  131. package/dist/index239.js +4 -0
  132. package/dist/index240.js +17 -100
  133. package/dist/index241.js +12 -0
  134. package/dist/index242.js +2 -10
  135. package/dist/index243.js +224 -4
  136. package/dist/index244.js +4 -7
  137. package/dist/index245.js +430 -16
  138. package/dist/index246.js +88 -9
  139. package/dist/index247.js +1 -2
  140. package/dist/index249.js +7 -24
  141. package/dist/{index26.js → index25.js} +4 -5
  142. package/dist/index250.js +200 -225
  143. package/dist/index251.js +1 -2
  144. package/dist/{index248.js → index252.js} +0 -1
  145. package/dist/index253.js +23 -8
  146. package/dist/index254.js +281 -4
  147. package/dist/index255.js +6 -13
  148. package/dist/index256.js +2 -10
  149. package/dist/index257.js +2 -10
  150. package/dist/index258.js +2 -18
  151. package/dist/index259.js +2 -3
  152. package/dist/index260.js +2 -67
  153. package/dist/index261.js +126 -6
  154. package/dist/index262.js +20 -430
  155. package/dist/index264.js +8 -6
  156. package/dist/index265.js +6 -3
  157. package/dist/index266.js +16 -3
  158. package/dist/index267.js +436 -3
  159. package/dist/index268.js +127 -3
  160. package/dist/index269.js +3 -3
  161. package/dist/{index28.js → index27.js} +3 -4
  162. package/dist/index270.js +12 -3
  163. package/dist/index271.js +9 -3
  164. package/dist/index272.js +9 -3
  165. package/dist/index273.js +17 -3
  166. package/dist/index274.js +2 -3
  167. package/dist/index275.js +2 -29
  168. package/dist/index276.js +1 -22
  169. package/dist/index277.js +4 -0
  170. package/dist/index278.js +2 -201
  171. package/dist/index279.js +2 -5
  172. package/dist/index280.js +28 -3
  173. package/dist/index281.js +21 -126
  174. package/dist/index283.js +5 -0
  175. package/dist/index284.js +3 -437
  176. package/dist/index285.js +210 -127
  177. package/dist/index286.js +2 -4
  178. package/dist/index287.js +65 -3
  179. package/dist/index288.js +5 -212
  180. package/dist/index289.js +34 -15
  181. package/dist/{index30.js → index29.js} +2 -3
  182. package/dist/index290.js +15 -5
  183. package/dist/index291.js +79 -5
  184. package/dist/index293.js +4 -80
  185. package/dist/index294.js +6 -0
  186. package/dist/index295.js +59 -3
  187. package/dist/index296.js +6 -11
  188. package/dist/index297.js +6 -35
  189. package/dist/index298.js +18 -7
  190. package/dist/index299.js +45 -18
  191. package/dist/index300.js +10 -47
  192. package/dist/index301.js +2 -8
  193. package/dist/{index302.js → index303.js} +1 -2
  194. package/dist/index304.js +0 -1
  195. package/dist/index305.js +0 -1
  196. package/dist/index306.js +0 -1
  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} +20 -22
  200. package/dist/{index38.js → index37.js} +7 -8
  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} +2 -3
  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 +1 -1
  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/index202.js.map +0 -1
  341. package/dist/index203.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/index209.js.map +0 -1
  346. package/dist/index210.js +0 -38
  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.map +0 -1
  361. package/dist/index223.js.map +0 -1
  362. package/dist/index224.js.map +0 -1
  363. package/dist/index225.js +0 -52
  364. package/dist/index225.js.map +0 -1
  365. package/dist/index226.js.map +0 -1
  366. package/dist/index227.js.map +0 -1
  367. package/dist/index228.js.map +0 -1
  368. package/dist/index229.js.map +0 -1
  369. package/dist/index230.js.map +0 -1
  370. package/dist/index231.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 +0 -5
  376. package/dist/index236.js.map +0 -1
  377. package/dist/index237.js.map +0 -1
  378. package/dist/index238.js +0 -109
  379. package/dist/index238.js.map +0 -1
  380. package/dist/index24.js.map +0 -1
  381. package/dist/index240.js.map +0 -1
  382. package/dist/index242.js.map +0 -1
  383. package/dist/index243.js.map +0 -1
  384. package/dist/index244.js.map +0 -1
  385. package/dist/index245.js.map +0 -1
  386. package/dist/index246.js.map +0 -1
  387. package/dist/index247.js.map +0 -1
  388. package/dist/index248.js.map +0 -1
  389. package/dist/index249.js.map +0 -1
  390. package/dist/index250.js.map +0 -1
  391. package/dist/index251.js.map +0 -1
  392. package/dist/index253.js.map +0 -1
  393. package/dist/index254.js.map +0 -1
  394. package/dist/index255.js.map +0 -1
  395. package/dist/index256.js.map +0 -1
  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 +0 -92
  404. package/dist/index263.js.map +0 -1
  405. package/dist/index264.js.map +0 -1
  406. package/dist/index265.js.map +0 -1
  407. package/dist/index266.js.map +0 -1
  408. package/dist/index267.js.map +0 -1
  409. package/dist/index268.js.map +0 -1
  410. package/dist/index269.js.map +0 -1
  411. package/dist/index270.js.map +0 -1
  412. package/dist/index271.js.map +0 -1
  413. package/dist/index272.js.map +0 -1
  414. package/dist/index273.js.map +0 -1
  415. package/dist/index274.js.map +0 -1
  416. package/dist/index275.js.map +0 -1
  417. package/dist/index276.js.map +0 -1
  418. package/dist/index278.js.map +0 -1
  419. package/dist/index279.js.map +0 -1
  420. package/dist/index28.js.map +0 -1
  421. package/dist/index280.js.map +0 -1
  422. package/dist/index281.js.map +0 -1
  423. package/dist/index282.js +0 -25
  424. package/dist/index282.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/index292.js +0 -62
  434. package/dist/index292.js.map +0 -1
  435. package/dist/index293.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/index304.js.map +0 -1
  446. package/dist/index305.js.map +0 -1
  447. package/dist/index306.js.map +0 -1
  448. package/dist/index32.js.map +0 -1
  449. package/dist/index34.js.map +0 -1
  450. package/dist/index36.js.map +0 -1
  451. package/dist/index38.js.map +0 -1
  452. package/dist/index40.js.map +0 -1
  453. package/dist/index42.js.map +0 -1
  454. package/dist/index44.js.map +0 -1
  455. package/dist/index46.js.map +0 -1
  456. package/dist/index48.js.map +0 -1
  457. package/dist/index5.js.map +0 -1
  458. package/dist/index50.js.map +0 -1
  459. package/dist/index52.js.map +0 -1
  460. package/dist/index54.js.map +0 -1
  461. package/dist/index56.js.map +0 -1
  462. package/dist/index58.js.map +0 -1
  463. package/dist/index6.js.map +0 -1
  464. package/dist/index60.js.map +0 -1
  465. package/dist/index62.js.map +0 -1
  466. package/dist/index64.js.map +0 -1
  467. package/dist/index66.js.map +0 -1
  468. package/dist/index68.js.map +0 -1
  469. package/dist/index7.js.map +0 -1
  470. package/dist/index70.js.map +0 -1
  471. package/dist/index72.js.map +0 -1
  472. package/dist/index74.js.map +0 -1
  473. package/dist/index76.js.map +0 -1
  474. package/dist/index78.js.map +0 -1
  475. package/dist/index79.js +0 -130
  476. package/dist/index79.js.map +0 -1
  477. package/dist/index8.js.map +0 -1
  478. package/dist/index81.js.map +0 -1
  479. package/dist/index83.js.map +0 -1
  480. package/dist/index85.js.map +0 -1
  481. package/dist/index87.js.map +0 -1
  482. package/dist/index89.js.map +0 -1
  483. package/dist/index9.js.map +0 -1
  484. package/dist/index91.js.map +0 -1
  485. package/dist/index93.js.map +0 -1
  486. package/dist/index95.js.map +0 -1
  487. package/dist/index97.js.map +0 -1
  488. package/dist/index99.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"index44.js","sources":["../src/components/BaseTag/BaseTag.vue"],"sourcesContent":["<template>\n\t<CommonInputOuterContainer\n\t\tref=\"outerContainer\"\n\t\t:class=\"{\n\t\t\t'bb-base-tag': true,\n\t\t\t'bb-base-tag--active': active,\n\t\t\t'bb-base-tag--disabled': disabled,\n\t\t\t'bb-base-tag--loading': loading,\n\t\t\t'bb-base-tag--errors': hasErrors,\n\t\t\t'bb-base-tag--readonly': readonly,\n\t\t}\"\n\t\t@click=\"onOuterContainerClick\"\n\t>\n\t\t<template #prepend-outer><slot name=\"prepend-outer\"></slot></template>\n\t\t<CommonInputInnerContainer\n\t\t\tref=\"innerContainer\"\n\t\t\t:append:icon=\"props['append:icon']\"\n\t\t\t:prepend:icon=\"props['prepend:icon']\"\n\t\t>\n\t\t\t<template #prepend><slot name=\"prepend\" /></template>\n\t\t\t<template #prefix><slot name=\"prefix\" /></template>\n\t\t\t<BbSmoothHeight tag=\"span\">\n\t\t\t\t<span class=\"bb-base-tag__input-container\">\n\t\t\t\t\t<template v-if=\"multiple\">\n\t\t\t\t\t\t<template v-if=\"comma\">\n\t\t\t\t\t\t\t<CommaBox ref=\"commaBox\" :options=\"selectedOptions\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\t<template v-else>\n\t\t\t\t\t\t\t<ChipsBox\n\t\t\t\t\t\t\t\tref=\"chipsBox\"\n\t\t\t\t\t\t\t\t:options=\"selectedOptions\"\n\t\t\t\t\t\t\t\t@option:unselected=\"onOptionUnselected\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</template>\n\n\t\t\t\t\t<input\n\t\t\t\t\t\t:id=\"id\"\n\t\t\t\t\t\tref=\"input\"\n\t\t\t\t\t\tv-bind=\"eventListeners\"\n\t\t\t\t\t\tv-model=\"query\"\n\t\t\t\t\t\t:aria-describedby=\"ariaDescribedby\"\n\t\t\t\t\t\t:autocomplete=\"autocomplete\"\n\t\t\t\t\t\t:autofocus=\"autofocus\"\n\t\t\t\t\t\t:class=\"'bb-base-tag__text-input'\"\n\t\t\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t\t\tenter-key-hint=\"next\"\n\t\t\t\t\t\t:placeholder=\"computedPlaceholder\"\n\t\t\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t\t\t:required=\"\n\t\t\t\t\t\t\t(required && !multiple) || (multiple && !modelValue.length)\n\t\t\t\t\t\t\"\n\t\t\t\t\t\t:type=\"'text'\"\n\t\t\t\t\t\t@focus.stop=\"onInputFocus\"\n\t\t\t\t\t\t@keydown.stop.delete=\"onBackspace\"\n\t\t\t\t\t\t@keydown.stop.left=\"onArrowLeft\"\n\t\t\t\t\t\t@keydown.stop.prevent.esc=\"onEscape\"\n\t\t\t\t\t\t@keydown.stop.right=\"onArrowRight\"\n\t\t\t\t\t\t@keyup.stop=\"onInputKeyup\"\n\t\t\t\t\t/>\n\t\t\t\t</span>\n\t\t\t</BbSmoothHeight>\n\t\t\t<template #append><slot name=\"append\" /></template>\n\t\t\t<template #suffix><slot name=\"suffix\" /></template>\n\t\t</CommonInputInnerContainer>\n\n\t\t<template #append-outer><slot name=\"append-outer\"></slot></template>\n\t</CommonInputOuterContainer>\n</template>\n\n<script setup lang=\"ts\">\nimport { BbSmoothHeight } from '@/index';\nimport { computed, ref } from 'vue';\nimport { isNotNil } from '@/utilities/functions/isNotNil';\nimport { last } from '@/utilities/functions/last';\nimport { nextTick } from 'vue';\nimport { toRef } from 'vue';\nimport { useOptions } from '@/composables/useOptions';\nimport ChipsBox from '../ChipsBox.vue';\nimport CommaBox from '../CommaBox.vue';\nimport CommonInputInnerContainer from '../CommonInputInnerContainer.vue';\nimport CommonInputOuterContainer from '../CommonInputOuterContainer.vue';\nimport type { InputHTMLAttributes, HTMLAttributes } from 'vue';\nimport type { Option as BaseOption } from '@/types/Option';\n\nexport type BaseTagProps = {\n\t/**\n\t * Name of the icon to be added at the end of the input.\n\t */\n\t// eslint-disable-next-line vue/prop-name-casing\n\t'append:icon'?: string;\n\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tariaDescribedby?: InputHTMLAttributes['aria-describedby'];\n\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tautocomplete?: InputHTMLAttributes['autocomplete'];\n\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Sets the display model for selected values to a list\n\t * of comma separated string. In this mode the user\n\t * cannot deselect an option by pressing the close button.\n\t */\n\tcomma?: boolean;\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * The divider key used to separate values from one another. By default it is \"Enter\"\n\t */\n\tdivider?: KeyboardEvent['key'];\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Sets the component in a loading state, usually triggering some visual styles.\n\t */\n\tloading?: boolean;\n\n\t/**\n\t * Used by v-model. Can be any serializable type.\n\t */\n\tmodelValue: any;\n\n\t/**\n\t * Allows the selection of multiple items.\n\t */\n\tmultiple?: boolean;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname?: InputHTMLAttributes['name'];\n\n\t/**\n\t * String displayed when there's no data.\n\t */\n\tplaceholder?: InputHTMLAttributes['placeholder'];\n\n\t/**\n\t * Name of the icon to be added at the start of the input.\n\t */\n\t// eslint-disable-next-line vue/prop-name-casing\n\t'prepend:icon'?: string;\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: InputHTMLAttributes['readonly'];\n\n\t/**\n\t * Sets the input as required.\n\t */\n\trequired?: boolean;\n};\n\nconst props = withDefaults(defineProps<BaseTagProps>(), {\n\tdivider: 'Enter',\n\tmultiple: true,\n});\n\nexport type BaseTagEvents = {\n\t(e: 'blur', event: FocusEvent): void;\n\t(e: 'change', event: Event): void;\n\t(e: 'click', event: MouseEvent): void;\n\t(e: 'duplicate', string: string): void;\n\t(e: 'focus', event: FocusEvent): void;\n\t(e: 'inactive'): void;\n\t(e: 'input', event: Event): void;\n\t(e: 'keydown', event: KeyboardEvent): void;\n\t(e: 'keyup', event: KeyboardEvent): void;\n\t(e: 'update:modelValue', value: any): void;\n};\n\nconst emit = defineEmits<BaseTagEvents>();\n\nexport type BaseTagSlots = {\n\tappend?: (props: object) => any;\n\t'append-outer'?: (props: object) => any;\n\tprepend?: (props: object) => any;\n\t'prepend-outer'?: (props: object) => any;\n\tprefix?: (props: object) => any;\n\tsuffix?: (props: object) => any;\n};\n\ndefineSlots<BaseTagSlots>();\n\nif (props.multiple && !Array.isArray(props.modelValue)) {\n\tthrow new Error('Multiple is set to \"true\" but modelValue is not an array.');\n}\n\nconst outerContainer = ref<InstanceType<\n\ttypeof CommonInputOuterContainer\n> | null>(null);\nconst innerContainer = ref<InstanceType<\n\ttypeof CommonInputInnerContainer\n> | null>(null);\nconst computedPlaceholder = computed(() => {\n\treturn props.placeholder;\n});\nconst commaBox = ref<InstanceType<typeof CommaBox> | null>(null);\nconst chipsBox = ref<InstanceType<typeof ChipsBox> | null>(null);\nconst selectedBox = computed(() =>\n\tprops.comma ? commaBox.value : chipsBox.value\n);\n\nconst input = ref<HTMLElement | null>(null);\nconst focusInput = () => {\n\tif (input.value instanceof HTMLInputElement) {\n\t\tinput.value.focus();\n\t}\n};\n/**\n * It should prefill if asked, or\n * when single if modelValue is not null\n * when multiple if modelValue is not empty\n */\nconst shouldPrefill =\n\t(!props.multiple && isNotNil(props.modelValue)) ||\n\t(props.multiple && !!props.modelValue.length);\n\nconst dependencies = ref([]);\n\nconst {\n\tquery,\n\talignQueryToState,\n\taddCurrentQueryToManualItems,\n\tselectedOptions,\n\tselectOption,\n\tunselectOption,\n\tvalueIsSelected,\n\tmanualItems,\n} = useOptions({\n\temit,\n\titemText: undefined,\n\titemValue: undefined,\n\tmodelValue: toRef(props, 'modelValue'),\n\tmultiple: props.multiple,\n\tresetQueryOnOptionSelected: true,\n\tstash: false,\n\titems: toRef(props, 'modelValue'),\n\tenforceCoherence: false,\n\tprefill: shouldPrefill,\n\tmodelValueDebounceTime: 0,\n\tdependencies,\n\tdepsDebounceTime: 0,\n\tqueryDebounceTime: 0,\n\tdisabled: toRef(props, 'disabled'),\n});\n\n/**\n * Applies a class when the user is inside this whole component.\n * We cannot use focus within as it doesn't work for elements that are teleported.\n * Also we cannot use the <input/> if we physically move focus to the options so\n * we track it manually.\n */\nconst active = ref(false);\n\nconst setActive = () => {\n\tactive.value = true;\n};\nconst setInactive = () => {\n\tactive.value = false;\n\temit('inactive');\n};\n\nconst canProcessKeyboardBindings = computed(() => {\n\tif (props.readonly) return false;\n\tif (props.disabled) return false;\n\tif (!selectedBox.value && props.multiple) return false;\n\treturn true;\n});\n\nconst onArrowLeft = (event: KeyboardEvent) => {\n\tif (!canProcessKeyboardBindings.value) {\n\t\treturn;\n\t}\n\tif (!props.multiple || query.value) {\n\t\treturn;\n\t}\n\tevent.preventDefault();\n\tif (!selectedOptions.value.length) return;\n\tselectedBox.value?.focusPrevious();\n};\nconst onArrowRight = (event: KeyboardEvent) => {\n\tif (!canProcessKeyboardBindings.value) {\n\t\treturn;\n\t}\n\tif (!props.multiple || query.value) {\n\t\treturn;\n\t}\n\tevent.preventDefault();\n\tif (!selectedOptions.value.length) return;\n\tselectedBox.value?.focusNext();\n};\n\nconst onBackspace = async () => {\n\tif (\n\t\t!canProcessKeyboardBindings.value ||\n\t\tquery.value ||\n\t\t!selectedOptions.value.length\n\t) {\n\t\treturn;\n\t}\n\tif (selectedBox.value?.getHighlighted()) {\n\t\tselectedBox.value.confirmOption();\n\t}\n\tawait nextTick();\n\tselectedBox.value?.focusPrevious();\n};\n\nconst onEscape = () => {\n\tselectedBox.value?.blur();\n};\n\nconst onInputKeyup = async (event: KeyboardEvent) => {\n\temit('keyup', event);\n\tif (props.readonly || props.disabled) {\n\t\tevent.preventDefault();\n\t\treturn;\n\t}\n\t// Reset focused chips on key input\n\tif (/^[A-Za-z0-9]$/.test(event.key)) {\n\t\tselectedBox.value?.blur();\n\t}\n\tif (\n\t\tevent.key === props.divider ||\n\t\t(event.key === 'Unidentified' && query.value.includes(props.divider))\n\t) {\n\t\tif (props.divider.length === 1 && query.value.includes(props.divider)) {\n\t\t\tconst found = query.value.split(props.divider)[0];\n\t\t\tif (found) {\n\t\t\t\tquery.value = found;\n\t\t\t} else {\n\t\t\t\tquery.value = '';\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif (!query.value) return;\n\t\tif (valueIsSelected(query.value)) {\n\t\t\temit('duplicate', query.value);\n\t\t\tquery.value = '';\n\t\t} else {\n\t\t\taddCurrentQueryToManualItems();\n\t\t\tonOptionSelected(last(manualItems.value)!);\n\t\t}\n\t}\n};\n\nconst onOptionSelected = (option: BaseOption) => {\n\tselectOption(option);\n\tfocusInput();\n\tif (!props.multiple) {\n\t\tclose();\n\t}\n};\n\nconst onOptionUnselected = (option: BaseOption) => {\n\tunselectOption(option);\n\tfocusInput();\n};\n\nconst onInputFocus = (event: FocusEvent) => {\n\temit('focus', event);\n\tsetActive();\n\tdocument.addEventListener('click', onOutsideInteraction);\n\tdocument.addEventListener('focusin', onOutsideInteraction);\n};\n\n/**\n * When clicking on the outside container seamlessly move focus to the input and open the panel\n */\nconst onOuterContainerClick = (event: MouseEvent) => {\n\temit('click', event);\n\tif (props.disabled || props.readonly) return;\n\tif (input.value instanceof HTMLElement) {\n\t\tinput.value.focus();\n\t}\n};\n\n/**\n * On click outside of the container close the panel, remove active state.\n * In multiple selection clear query after a timeout\n */\nconst onOutsideInteraction = async (event: Event) => {\n\tif (event.target instanceof Node) {\n\t\tif (outerContainer.value) {\n\t\t\tif (!outerContainer.value.$el.contains(event.target)) {\n\t\t\t\tclose();\n\t\t\t\tsetInactive();\n\t\t\t\tdocument.removeEventListener('click', onOutsideInteraction);\n\t\t\t\tdocument.removeEventListener('focusin', onOutsideInteraction);\n\t\t\t\talignQueryToState();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n};\nconst eventListeners = {\n\tonBlur: (event: FocusEvent) => emit('blur', event),\n\tonChange: (event: Event) => emit('change', event),\n\tonKeydown: (event: KeyboardEvent) => emit('keydown', event),\n\tonInput: (event: Event) => emit('input', event),\n};\n</script>\n<style lang=\"postcss\">\n@import '@/assets/css/BaseTag';\n</style>\n"],"names":["props","__props","emit","__emit","outerContainer","ref","innerContainer","computedPlaceholder","computed","commaBox","chipsBox","selectedBox","input","focusInput","shouldPrefill","isNotNil","dependencies","query","alignQueryToState","addCurrentQueryToManualItems","selectedOptions","selectOption","unselectOption","valueIsSelected","manualItems","useOptions","toRef","active","setActive","setInactive","canProcessKeyboardBindings","onArrowLeft","event","_a","onArrowRight","onBackspace","nextTick","_b","onEscape","onInputKeyup","found","onOptionSelected","last","option","onOptionUnselected","onInputFocus","onOutsideInteraction","onOu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AAA,MACjD,UAAU,CAACA,MAAiB9B,EAAK,UAAU8B,CAAK;AAAA,MAChD,WAAW,CAACA,MAAyB9B,EAAK,WAAW8B,CAAK;AAAA,MAC1D,SAAS,CAACA,MAAiB9B,EAAK,SAAS8B,CAAK;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index46.js","sources":["../src/components/BaseTextarea/BaseTextarea.vue"],"sourcesContent":["<template>\n\t<CommonInputOuterContainer :class=\"classes\">\n\t\t<template #prepend-outer><slot name=\"prepend-outer\"></slot></template>\n\t\t<CommonInputInnerContainer\n\t\t\t:append:icon=\"props['append:icon']\"\n\t\t\t:prepend:icon=\"props['prepend:icon']\"\n\t\t>\n\t\t\t<template #prepend><slot name=\"prepend\" /></template>\n\t\t\t<template #prefix><slot name=\"prefix\" /></template>\n\t\t\t<BbSmoothHeight>\n\t\t\t\t<textarea\n\t\t\t\t\t:id=\"id\"\n\t\t\t\t\tref=\"textarea\"\n\t\t\t\t\t:aria-describedby=\"ariaDescribedby\"\n\t\t\t\t\t:autocomplete=\"autocomplete\"\n\t\t\t\t\t:autofocus=\"autofocus\"\n\t\t\t\t\t:class=\"'bb-base-textarea__input scrollbar-border'\"\n\t\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t\t:name=\"name\"\n\t\t\t\t\t:placeholder=\"placeholder\"\n\t\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t\t:required=\"required\"\n\t\t\t\t\t:rows=\"rows\"\n\t\t\t\t\t:value=\"modelValueWithDefault\"\n\t\t\t\t\tv-bind=\"eventListeners\"\n\t\t\t\t\t@input=\"onInput\"\n\t\t\t\t\t@keydown=\"onKeydown\"\n\t\t\t\t></textarea>\n\t\t\t</BbSmoothHeight>\n\t\t\t<template #append><slot name=\"append\" /></template>\n\t\t\t<template #suffix><slot name=\"suffix\" /></template>\n\t\t</CommonInputInnerContainer>\n\t\t<template #append-outer><slot name=\"append-outer\"></slot></template>\n\t</CommonInputOuterContainer>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, nextTick, onMounted, ref, watch } from 'vue';\nimport type { HTMLAttributes, InputHTMLAttributes, Ref } from 'vue';\nimport CommonInputOuterContainer from '../CommonInputOuterContainer.vue';\nimport CommonInputInnerContainer from '../CommonInputInnerContainer.vue';\nimport BbSmoothHeight from '../BbSmoothHeight/BbSmoothHeight.vue';\n\nexport type BaseTextareaProps = {\n\t/**\n\t * Name of the icon to be added at the end of the input.\n\t */\n\t// eslint-disable-next-line vue/prop-name-casing\n\t'append:icon'?: string;\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tariaDescribedby?: InputHTMLAttributes['aria-describedby'];\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tautocomplete?: InputHTMLAttributes['autocomplete'];\n\n\t/**\n\t * Expands the textarea to match its content\n\t */\n\tautoGrow?: boolean;\n\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Sets the component in a loading state, usually triggering some visual styles.\n\t */\n\tloading?: boolean;\n\n\t/**\n\t * Used by v-model\n\t */\n\tmodelValue: string | null;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname?: InputHTMLAttributes['name'];\n\n\t/**\n\t * String displayed when there's no data.\n\t */\n\tplaceholder?: InputHTMLAttributes['placeholder'];\n\n\t/**\n\t * Name of the icon to be added at the start of the input.\n\t */\n\t// eslint-disable-next-line vue/prop-name-casing\n\t'prepend:icon'?: string;\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: InputHTMLAttributes['readonly'];\n\n\t/**\n\t * Sets the input as required.\n\t */\n\trequired?: boolean;\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\trows?: string | number;\n};\nconst props = defineProps<BaseTextareaProps>();\n\nexport type BaseTextareaEvents = {\n\t(e: 'blur', event: FocusEvent): void;\n\t(e: 'change', event: Event): void;\n\t(e: 'click', event: MouseEvent): void;\n\t(e: 'focus', event: FocusEvent): void;\n\t(e: 'input', event: Event): void;\n\t(e: 'keydown', event: KeyboardEvent): void;\n\t(e: 'mousedown', event: MouseEvent): void;\n\t(e: 'mouseup', event: MouseEvent): void;\n\t(e: 'update:modelValue', value: string | null): void;\n};\nconst emit = defineEmits<BaseTextareaEvents>();\n\nexport type BaseTextareaSlots = {\n\t'prepend-outer'?: (props: object) => any;\n\tprepend?: (props: object) => any;\n\tappend?: (props: object) => any;\n\t'append-outer'?: (props: object) => any;\n\tprefix?: (props: object) => any;\n\tsuffix?: (props: object) => any;\n};\n\ndefineSlots<BaseTextareaSlots>();\n\nif (props.rows && props.autoGrow) {\n\tthrow new Error(\n\t\t'Textarea: You cannot set rows and auto-grow attributes together. You either use rows and let the user resize or define a minimum height in CSS with auto-grow.'\n\t);\n}\n\nconst textarea: Ref<HTMLTextAreaElement | null> = ref(null);\n\nconst classes = computed(() => ({\n\t'bb-base-textarea': true,\n\t'bb-base-textarea--auto-grow': props.autoGrow,\n\t'bb-base-textarea--disabled': props.disabled,\n\t'bb-base-textarea--errors': props.hasErrors,\n\t'bb-base-textarea--loading': props.loading,\n\t'bb-base-textarea--readonly': props.readonly,\n}));\n\n// Allow modelvalue to be reset to null\nconst modelValueWithDefault = computed(() =>\n\tprops.modelValue ? props.modelValue : ''\n);\nonMounted(() => {\n\tif (props.autoGrow && props.modelValue) {\n\t\tcomputeTextareaHeight();\n\t}\n});\nwatch(\n\t() => props.modelValue,\n\t() => {\n\t\tif (props.autoGrow) {\n\t\t\tnextTick(computeTextareaHeight);\n\t\t}\n\t}\n);\n\nfunction onInput(event: Event): void {\n\t// Prevent enter from triggering smt else\n\tevent.stopPropagation();\n\tif (event.target instanceof HTMLTextAreaElement) {\n\t\tlet value = event.target.value;\n\t\temit('input', event);\n\t\temit('update:modelValue', value || null);\n\t}\n}\nfunction onKeydown(event: KeyboardEvent): void {\n\t// Prevent enter from triggering smt else\n\tevent.stopPropagation();\n\tif (event.target instanceof HTMLTextAreaElement) {\n\t\temit('keydown', event);\n\t}\n}\n\n/**\n * These events are just propagated\n */\nconst eventListeners = {\n\tonBlur: (event: FocusEvent) => emit('blur', event),\n\tonChange: (event: Event) => emit('change', event),\n\tonClick: (event: MouseEvent) => emit('click', event),\n\tonFocus: (event: FocusEvent) => emit('focus', event),\n\tonMousedown: (event: MouseEvent) => emit('mousedown', event),\n\tonMouseup: (event: MouseEvent) => emit('mouseup', event),\n};\n\n/* \nReset height and the apply scroll height otherwise it would not be able to shrink\n*/\nfunction computeTextareaHeight() {\n\tif (!textarea.value) return;\n\ttextarea.value.style.height = '0px';\n\n\ttextarea.value.style.height = `${textarea.value.scrollHeight}px`;\n}\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BaseTextarea';\n</style>\n"],"names":["props","__props","emit","__emit","textarea","ref","classes","computed","modelValueWithDefault","onMounted","computeTextareaHeight","watch","nextTick","onInput","event","value","onKeydown","eventListeners"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6HA,UAAMA,IAAQC,GAaRC,IAAOC;AAaT,QAAAH,EAAM,QAAQA,EAAM;AACvB,YAAM,IAAI;AAAA,QACT;AAAA,MAAA;AAII,UAAAI,IAA4CC,EAAI,IAAI,GAEpDC,IAAUC,EAAS,OAAO;AAAA,MAC/B,oBAAoB;AAAA,MACpB,+BAA+BP,EAAM;AAAA,MACrC,8BAA8BA,EAAM;AAAA,MACpC,4BAA4BA,EAAM;AAAA,MAClC,6BAA6BA,EAAM;AAAA,MACnC,8BAA8BA,EA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/BaseTextInput.vue"],"sourcesContent":["<template>\n\t<CommonInputOuterContainer :class=\"classes\">\n\t\t<template #prepend-outer><slot name=\"prepend-outer\"></slot></template>\n\t\t<CommonInputInnerContainer\n\t\t\t:append:icon=\"props['append:icon']\"\n\t\t\t:prepend:icon=\"props['prepend:icon']\"\n\t\t>\n\t\t\t<template #prepend><slot name=\"prepend\" /></template>\n\t\t\t<template #prefix><slot name=\"prefix\" /></template>\n\n\t\t\t<input\n\t\t\t\t:id=\"id\"\n\t\t\t\tref=\"input\"\n\t\t\t\t:aria-describedby=\"ariaDescribedby\"\n\t\t\t\t:aria-invalid=\"hasErrors ? true : undefined\"\n\t\t\t\t:autocomplete=\"autocomplete\"\n\t\t\t\t:autofocus=\"autofocus\"\n\t\t\t\t:class=\"'bb-base-text-input__input'\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t:name=\"name\"\n\t\t\t\t:placeholder=\"placeholder\"\n\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t:required=\"required\"\n\t\t\t\tsize=\"1\"\n\t\t\t\t:type=\"type\"\n\t\t\t\t:value=\"modelValue\"\n\t\t\t\tv-bind=\"eventListeners\"\n\t\t\t/>\n\n\t\t\t<template #append><slot name=\"append\" /></template>\n\t\t\t<template #suffix><slot name=\"suffix\" /></template>\n\t\t</CommonInputInnerContainer>\n\t\t<template #append-outer><slot name=\"append-outer\"></slot></template>\n\t</CommonInputOuterContainer>\n\t<span> </span>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\nimport CommonInputInnerContainer from '../CommonInputInnerContainer.vue';\nimport CommonInputOuterContainer from '../CommonInputOuterContainer.vue';\nimport type { HTMLAttributes, InputHTMLAttributes } from 'vue';\n\nexport type BaseTextInputProps = {\n\t/**\n\t * Name of the icon to be added at the end of the input.\n\t */\n\t// eslint-disable-next-line vue/prop-name-casing\n\t'append:icon'?: string;\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tariaDescribedby?: InputHTMLAttributes['aria-describedby'];\n\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tautocomplete?: InputHTMLAttributes['autocomplete'];\n\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Sets the component in a loading state, usually triggering some visual styles.\n\t */\n\tloading?: boolean;\n\n\t/**\n\t * Used my v-model\n\t */\n\tmodelValue: string | null;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname?: InputHTMLAttributes['name'];\n\n\t/**\n\t * String displayed when there's no data.\n\t */\n\tplaceholder?: InputHTMLAttributes['placeholder'];\n\n\t/**\n\t * Name of the icon to be added at the start of the input.\n\t */\n\t// eslint-disable-next-line vue/prop-name-casing\n\t'prepend:icon'?: string;\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: InputHTMLAttributes['readonly'];\n\n\t/**\n\t * Sets the input as required.\n\t */\n\trequired?: boolean;\n\n\t/**\n\t * Type of the input. Returns the content type of the object.\n\t */\n\ttype?: HTMLInputElement['type'];\n};\n\nconst props = withDefaults(defineProps<BaseTextInputProps>(), {\n\ttype: 'text',\n});\n\nexport type BaseTextInputEvents = {\n\t(e: 'blur', event: FocusEvent): void;\n\t(e: 'change', event: Event): void;\n\t(e: 'click', event: MouseEvent): void;\n\t(e: 'focus', event: FocusEvent): void;\n\t(e: 'input', event: Event): void;\n\t(e: 'keydown', event: KeyboardEvent): void;\n\t(e: 'mousedown', event: MouseEvent): void;\n\t(e: 'mouseup', event: MouseEvent): void;\n\t(e: 'update:modelValue', value: string | null): void;\n};\nconst emit = defineEmits<BaseTextInputEvents>();\n\nexport type BaseTextInputSlots = {\n\t'append-outer'?: (props: object) => any;\n\tappend?: (props: object) => any;\n\tprefix?: (props: object) => any;\n\tprepend?: (props: object) => any;\n\t'prepend-outer'?: (props: object) => any;\n\tsuffix?: (props: object) => any;\n};\n\ndefineSlots<BaseTextInputSlots>();\n\nconst classes = computed(() => ({\n\t'bb-base-text-input': true,\n\t'bb-base-text-input--disabled': props.disabled,\n\t'bb-base-text-input--errors': props.hasErrors,\n\t'bb-base-text-input--loading': props.loading,\n\t'bb-base-text-input--readonly': props.readonly,\n}));\n\n/**\n * These events are just propagated\n */\nconst eventListeners = {\n\tonBlur: (event: FocusEvent) => emit('blur', event),\n\tonChange: (event: Event) => emit('change', event),\n\tonClick: (event: MouseEvent) => emit('click', event),\n\tonFocus: (event: FocusEvent) => emit('focus', event),\n\tonKeydown: (event: KeyboardEvent) => emit('keydown', event),\n\tonInput: (event: Event) => {\n\t\tif (event.target instanceof HTMLInputElement) {\n\t\t\temit('update:modelValue', event.target.value || null);\n\t\t}\n\t\temit('input', event);\n\t},\n\tonMousedown: (event: MouseEvent) => emit('mousedown', event),\n\tonMouseup: (event: MouseEvent) => emit('mouseup', event),\n};\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BaseTextInput';\n</style>\n"],"names":["props","__props","emit","__emit","classes","computed","eventListeners","event"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA0HA,UAAMA,IAAQC,GAeRC,IAAOC,GAaPC,IAAUC,EAAS,OAAO;AAAA,MAC/B,sBAAsB;AAAA,MACtB,gCAAgCL,EAAM;AAAA,MACtC,8BAA8BA,EAAM;AAAA,MACpC,+BAA+BA,EAAM;AAAA,MACrC,gCAAgCA,EAAM;AAAA,IACrC,EAAA,GAKIM,IAAiB;AAAA,MACtB,QAAQ,CAACC,MAAsBL,EAAK,QAAQK,CAAK;AAAA,MACjD,UAAU,CAACA,MAAiBL,EAAK,UAAUK,CAAK;AAAA,MAChD,SAAS,CAACA,MAAsBL,EAAK,SAASK,CAAK;AAAA,MACnD,SAAS,CAACA,MAAsBL,EAAK,SAASK,CAAK;AAAA,MACnD,WAAW,CAACA,MAAyBL,EAAK,WAAWK,CAAK;AAAA,MAC1D,SAAS,CAACA,MAAiB;AACtB,QAAAA,EAAM,kBAAkB,oBAC3BL,EAAK,qBAAqBK,EAAM,OAAO,SAAS,IAAI,GAErDL,EAAK,SAASK,CAAK;AAAA,MACpB;AAAA,MACA,aAAa,CAACA,MAAsBL,EAAK,aAAaK,CAAK;AAAA,MAC3D,WAAW,CAACA,MAAsBL,EAAK,WAAWK,CAAK;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index5.js","sources":["../src/composables/useBbConfig.ts"],"sourcesContent":["import { reactive } from 'vue';\n\ntype Config = {\n\tinertiaLinkName: string;\n\tnuxtLinkName: string;\n\tmobileMaxWidth: number;\n};\n\nexport const _config = reactive<Config & Record<string, any>>({\n\tinertiaLinkName: 'Link',\n\tnuxtLinkName: 'NuxtLink',\n\tmobileMaxWidth: 768,\n\tdocumentationURL: 'https://ui-components-docs.vercel.app/it',\n});\n\nconst setConfig = (config: Partial<Config>) => {\n\tObject.keys(config).forEach((k) => {\n\t\tconst _k = k as keyof Config;\n\t\tconst value = config[_k]!;\n\t\t// @ts-expect-error this breaks in TS\n\t\t_config[_k] = value;\n\t});\n};\nexport const useBbConfig = () => {\n\treturn { setConfig };\n};\n"],"names":["_config","reactive","setConfig","config","k","_k","value","useBbConfig"],"mappings":";AAQO,MAAMA,IAAUC,EAAuC;AAAA,EAC7D,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,gBAAgB;AAAA,EAChB,kBAAkB;AACnB,CAAC,GAEKC,IAAY,CAACC,MAA4B;AAC9C,SAAO,KAAKA,CAAM,EAAE,QAAQ,CAACC,MAAM;AAClC,UAAMC,IAAKD,GACLE,IAAQH,EAAOE,CAAE;AAEvB,IAAAL,EAAQK,CAAE,IAAIC;AAAA,EAAA,CACd;AACF,GACaC,IAAc,OACnB,EAAE,WAAAL,EAAU;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index50.js","sources":["../src/components/BbAccordion/BbAccordion.vue"],"sourcesContent":["<template>\n\t<div class=\"bb-accordion\">\n\t\t<BaseButton\n\t\t\t:id=\"`${id}_header`\"\n\t\t\t:aria-controls=\"id\"\n\t\t\t:aria-expanded=\"internalValue\"\n\t\t\t:class=\"'bb-accordion__header'\"\n\t\t\t@click.self=\"toggle\"\n\t\t\t><slot name=\"header\" :toggle=\"toggle\" :value=\"internalValue\"></slot\n\t\t></BaseButton>\n\t\t<BbCollapsible\n\t\t\t:id=\"id\"\n\t\t\t:aria-labelledby=\"`${id}_header`\"\n\t\t\t:class=\"'bb-accordion__content'\"\n\t\t\t:eager=\"eager\"\n\t\t\t:model-value=\"internalValue\"\n\t\t\t:role=\"'region'\"\n\t\t\t:transition-duration=\"transitionDuration\"\n\t\t\t><slot :toggle=\"toggle\" :value=\"internalValue\"></slot\n\t\t></BbCollapsible>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, watch } from 'vue';\nimport { useId } from '@/composables/useId';\nimport BaseButton from '../BaseButton/BaseButton.vue';\nimport BbCollapsible from '../BbCollapsible/BbCollapsible.vue';\nimport type { BbCollapsibleProps } from '../BbCollapsible/BbCollapsible.vue';\nimport type { CommonProps } from '@/types/CommonProps';\n\nexport type BbAccordionProps = Partial<BbCollapsibleProps> &\n\tPick<CommonProps, 'id'>;\n\nexport type BbAccordionEvents = {\n\t(e: 'update:modelValue', value: boolean): void;\n};\nconst emit = defineEmits<BbAccordionEvents>();\n\nconst props = withDefaults(defineProps<BbAccordionProps>(), {\n\ttransitionDuration: 250,\n});\n\nconst id = props.id || `bba_${useId().id.value}`;\n\nconst internalValue = ref(props.modelValue);\n/**\n * Watch external changes and align internal value\n */\nwatch(\n\t() => props.modelValue,\n\t(current, previous) => {\n\t\tif (current !== previous && current !== internalValue.value) {\n\t\t\tinternalValue.value = current;\n\t\t}\n\t}\n);\n\nconst toggle = () => {\n\tinternalValue.value = !internalValue.value;\n\temit('update:modelValue', !props.modelValue);\n};\n\ndefineSlots<{\n\theader?: (props: {\n\t\tvalue: BbAccordionProps['modelValue'];\n\t\ttoggle: typeof toggle;\n\t}) => any;\n\tdefault?: (props: {\n\t\tvalue: BbAccordionProps['modelValue'];\n\t\ttoggle: typeof toggle;\n\t}) => any;\n}>();\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbAccordion';\n</style>\n"],"names":["emit","__emit","props","__props","id","useId","internalValue","ref","watch","current","previous","toggle"],"mappings":";;;;;;;;;;;;;;;;;AAqCA,UAAMA,IAAOC,GAEPC,IAAQC,GAIRC,IAAKF,EAAM,MAAM,OAAOG,IAAQ,GAAG,KAAK,IAExCC,IAAgBC,EAAIL,EAAM,UAAU;AAI1C,IAAAM;AAAA,MACC,MAAMN,EAAM;AAAA,MACZ,CAACO,GAASC,MAAa;AACtB,QAAID,MAAYC,KAAYD,MAAYH,EAAc,UACrDA,EAAc,QAAQG;AAAA,MAExB;AAAA,IAAA;AAGD,UAAME,IAAS,MAAM;AACN,MAAAL,EAAA,QAAQ,CAACA,EAAc,OAChCN,EAAA,qBAAqB,CAACE,EAAM,UAAU;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index52.js","sources":["../src/components/BbAlert/BbAlert.vue"],"sourcesContent":["<template>\n\t<BbCollapsible\n\t\tclass=\"bb-alert\"\n\t\t:class=\"{ [`bb-alert--${theme}`]: theme }\"\n\t\t:model-value=\"innerValue\"\n\t>\n\t\t<div class=\"bb-alert__inner-container\" role=\"alert\">\n\t\t\t<div class=\"bb-alert__icon-container\">\n\t\t\t\t<BbIcon\n\t\t\t\t\tv-if=\"icon\"\n\t\t\t\t\tclass=\"bb-alert__icon\"\n\t\t\t\t\t:size=\"iconSize\"\n\t\t\t\t\t:type=\"icon\"\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t<div class=\"bb-alert__content\">\n\t\t\t\t<button\n\t\t\t\t\tv-if=\"showClose\"\n\t\t\t\t\t:aria-label=\"closeLabel\"\n\t\t\t\t\tblock\n\t\t\t\t\tclass=\"bb-alert__close\"\n\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t@click=\"onClickClose\"\n\t\t\t\t>\n\t\t\t\t\t<svg\n\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<path\n\t\t\t\t\t\t\td=\"M23 23L1 1M23 1L1 23\"\n\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</svg>\n\t\t\t\t</button>\n\t\t\t\t<div class=\"bb-alert__title\">\n\t\t\t\t\t<slot name=\"title\" v-bind=\"{ text: title }\">{{ title }}</slot>\n\t\t\t\t</div>\n\t\t\t\t<p class=\"bb-alert__text\">\n\t\t\t\t\t<slot name=\"text\" v-bind=\"{ text: text }\">{{ text }}</slot>\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t</div>\n\t</BbCollapsible>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, watch } from 'vue';\nimport BbCollapsible from '../BbCollapsible/BbCollapsible.vue';\nimport BbIcon from '../BbIcon/BbIcon.vue';\nimport type { BbIconProps } from '../BbIcon/BbIcon.vue';\nimport type { CommonProps } from '@/types/CommonProps';\n\nexport type BbAlertProps = Pick<\n\tCommonProps,\n\t'closeLabel' | 'showClose' | 'text' | 'theme' | 'title'\n> & {\n\t/**\n\t * Name of the icon to use\n\t */\n\ticon?: BbIconProps['type'];\n\t/**\n\t * Size of the icon to use\n\t */\n\ticonSize?: BbIconProps['size'];\n\t/**\n\t * Used by v-model, set type to any to avoid Vue casting it as false\n\t */\n\tmodelValue?: any;\n};\n\nconst props = withDefaults(defineProps<BbAlertProps>(), {\n\tcloseLabel: 'Chiudi',\n\ttheme: 'default',\n});\n\nexport type BbAlertEvents = {\n\t(e: 'update:modelValue', value: boolean): void;\n};\nconst emit = defineEmits<BbAlertEvents>();\n\ndefineSlots<{\n\ttitle?: (props: { text: BbAlertProps['title'] }) => any;\n\ttext?: (props: { text: BbAlertProps['title'] }) => any;\n}>();\n\nconst innerValue = ref(\n\tprops.modelValue === undefined ? true : !!props.modelValue\n);\n\nwatch(\n\t() => props.modelValue,\n\t(value) => {\n\t\tif (innerValue.value !== !!value) {\n\t\t\tinnerValue.value = !!value;\n\t\t}\n\t}\n);\n\nconst onClickClose = () => {\n\tinnerValue.value = false;\n\temit('update:modelValue', false);\n};\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbAlert';\n</style>\n"],"names":["props","__props","emit","__emit","innerValue","ref","watch","value","onClickClose"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyEA,UAAMA,IAAQC,GAQRC,IAAOC,GAOPC,IAAaC;AAAA,MAClBL,EAAM,eAAe,SAAY,KAAO,CAAC,CAACA,EAAM;AAAA,IAAA;AAGjD,IAAAM;AAAA,MACC,MAAMN,EAAM;AAAA,MACZ,CAACO,MAAU;AACV,QAAIH,EAAW,UAAU,CAAC,CAACG,MACfH,EAAA,QAAQ,CAAC,CAACG;AAAA,MAEvB;AAAA,IAAA;AAGD,UAAMC,IAAe,MAAM;AAC1B,MAAAJ,EAAW,QAAQ,IACnBF,EAAK,qBAAqB,EAAK;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index54.js","sources":["../src/components/BbAvatar/BbAvatar.vue"],"sourcesContent":["<template>\n\t<span v-bind=\"attributes\">\n\t\t<img\n\t\t\tv-if=\"(src || srcset) && !imageErrored\"\n\t\t\tref=\"image\"\n\t\t\t:alt=\"alt\"\n\t\t\t:sizes=\"sizes\"\n\t\t\t:src=\"src\"\n\t\t\t:srcset=\"srcset\"\n\t\t\t@error=\"onError\"\n\t\t\t@load=\"onLoad\"\n\t\t/>\n\t\t<span v-else class=\"bb-avatar__fallback\">\n\t\t\t<slot></slot>\n\t\t</span>\n\t</span>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, type ImgHTMLAttributes, onMounted } from 'vue';\nimport { isCssColor } from '@/utilities/functions/isCssColor';\nimport type { Classes } from '@/types/Classes';\nimport type { CommonProps } from '@/types/CommonProps';\nimport type { BbIconProps, Size } from '../BbIcon/BbIcon.vue';\nimport { wait } from '@/utilities/functions/wait';\n\nexport type BbAvatarProps = Pick<CommonProps, 'color'> &\n\tPick<BbIconProps, 'size'> & {\n\t\talt?: ImgHTMLAttributes['alt'];\n\t\tsrc?: ImgHTMLAttributes['src'];\n\t\tsrcset?: ImgHTMLAttributes['srcset'];\n\t\tsizes?: ImgHTMLAttributes['sizes'];\n\t\ttimeout?: number;\n\t};\n\nconst props = withDefaults(defineProps<BbAvatarProps>(), {\n\ttimeout: 400,\n});\n\ndefineSlots<{\n\tdefault?: (props: object) => any;\n}>();\n\nconst sizeMap: Size = {\n\txs: 24,\n\tsm: 32,\n\tmd: 40,\n\tlg: 56,\n\txl: 80,\n\txxl: 104,\n};\n\nconst attributes = computed(() => {\n\tconst classes: Classes = {\n\t\t'bb-avatar': true,\n\t};\n\tlet dimension: any;\n\tif (props.size) {\n\t\tif (typeof props.size === 'string') {\n\t\t\tdimension = sizeMap[props.size as keyof Size] ?? parseInt(props.size, 10);\n\t\t} else {\n\t\t\tdimension = props.size;\n\t\t}\n\t\tdimension += `px`;\n\t}\n\n\tlet style: { [key: string]: any } = {\n\t\twidth: dimension,\n\t\theight: dimension,\n\t};\n\tif (props.color) {\n\t\tif (isCssColor(props.color)) {\n\t\t\tstyle.backgroundColor = props.color;\n\t\t} else {\n\t\t\tclasses[`bb-avatar--${props.color}`] = true;\n\t\t}\n\t}\n\treturn {\n\t\tclass: classes,\n\t\tstyle,\n\t};\n});\n\nconst imageHasLoadedCorrectly = (img: HTMLImageElement) => {\n\tif (!img) return false;\n\t// During the onload event, IE correctly identifies any images that\n\t// weren’t downloaded as not complete. Others should too. Gecko-based\n\t// browsers act like NS4 in that they report this incorrectly.\n\tif (!img.complete) {\n\t\treturn false;\n\t}\n\n\t// However, they do have two very useful properties: naturalWidth and\n\t// naturalHeight. These give the true size of the image. If it failed\n\t// to load, either of these should be zero.\n\tif (img.naturalWidth === 0) {\n\t\treturn false;\n\t}\n\n\t// No other way of checking: assume it’s ok.\n\treturn true;\n};\n\nconst image = ref<HTMLImageElement | null>();\nconst imageLoaded = ref(false);\nconst imageErrored = ref(false);\n\nonMounted(async () => {\n\t// Only run when events don't fire (when the page is SSR)\n\tif (!imageErrored.value && !imageLoaded.value) {\n\t\tif (image.value) {\n\t\t\tawait wait(props.timeout);\n\t\t\timageErrored.value = !imageHasLoadedCorrectly(image.value);\n\t\t}\n\t}\n});\nconst onLoad = () => {\n\timageLoaded.value = true;\n};\nconst onError = () => {\n\timageErrored.value = true;\n};\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbAvatar';\n</style>\n"],"names":["props","__props","sizeMap","attributes","computed","classes","dimension","style","isCssColor","imageHasLoadedCorrectly","img","image","ref","imageLoaded","imageErrored","onMounted","wait","onLoad","onError"],"mappings":";;;;;;;;;;;;;;;;;;AAmCA,UAAMA,IAAQC,GAQRC,IAAgB;AAAA,MACrB,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,KAAK;AAAA,IAAA,GAGAC,IAAaC,EAAS,MAAM;AACjC,YAAMC,IAAmB;AAAA,QACxB,aAAa;AAAA,MAAA;AAEV,UAAAC;AACJ,MAAIN,EAAM,SACL,OAAOA,EAAM,QAAS,WACzBM,IAAYJ,EAAQF,EAAM,IAAkB,KAAK,SAASA,EAAM,MAAM,EAAE,IAExEM,IAAYN,EAAM,MAENM,KAAA;AAGd,UAAIC,IAAgC;AAAA,QACnC,OAAOD;AAAA,QACP,QAAQA;AAAA,MAAA;AAET,aAAIN,EAAM,UACLQ,EAAWR,EAAM,KAAK,IACzBO,EAAM,kBAAkBP,EAAM,QAE9BK,EAAQ,cAAcL,EAAM,KAAK,EAAE,IAAI,KAGlC;AAAA,QACN,OAAOK;AAAA,QACP,OAAAE;AAAA,MAAA;AAAA,IACD,CACA,GAEKE,IAA0B,CAACC,MAC5B,GAACA,KAID,CAACA,EAAI,YAOLA,EAAI,iBAAiB,IAQpBC,IAAQC,KACRC,IAAcD,EAAI,EAAK,GACvBE,IAAeF,EAAI,EAAK;AAE9B,IAAAG,EAAU,YAAY;AAErB,MAAI,CAACD,EAAa,SAAS,CAACD,EAAY,SACnCF,EAAM,UACH,MAAAK,EAAKhB,EAAM,OAAO,GACxBc,EAAa,QAAQ,CAACL,EAAwBE,EAAM,KAAK;AAAA,IAE3D,CACA;AACD,UAAMM,IAAS,MAAM;AACpB,MAAAJ,EAAY,QAAQ;AAAA,IAAA,GAEfK,IAAU,MAAM;AACrB,MAAAJ,EAAa,QAAQ;AAAA,IAAA;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index56.js","sources":["../src/components/BbBadge/BbBadge.vue"],"sourcesContent":["<template>\n\t<span :class=\"classes\">\n\t\t<span class=\"bb-badge__wrapper\">\n\t\t\t<slot></slot>\n\t\t\t<span class=\"bb-badge__content-container\" v-bind=\"contentAttributes\">\n\t\t\t\t<span class=\"bb-badge__content-inner\"\n\t\t\t\t\t><slot name=\"content\">{{ content }}</slot></span\n\t\t\t\t>\n\t\t\t</span>\n\t\t</span>\n\t</span>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, useSlots } from 'vue';\nimport { isCssColor } from '@/utilities/functions/isCssColor';\nimport { isNil } from '@/utilities/functions/isNil';\nimport type { CommonProps } from '@/types/CommonProps';\n\nconst slots = useSlots();\n\nexport type BbBadgeProps = Pick<CommonProps, 'color'> & {\n\t/**\n\t * Displays the badge on the bottom of the wrapped component.\n\t */\n\tbottom?: boolean;\n\t/**\n\t * Text content of the badge\n\t */\n\tcontent?: string | number | null;\n\t/**\n\t * Renders the badge i little further from the wrapped\n\t * component making it look like it's floating\n\t * and not stacked.\n\t */\n\tfloating?: boolean;\n\t/**\n\t * Displays the badge on the left of the wrapped component.\n\t */\n\tleft?: boolean;\n};\n\nconst props = withDefaults(defineProps<BbBadgeProps>(), {});\n\ndefineSlots<{\n\tdefault?: (props: object) => any;\n\tcontent?: (props: object) => any;\n}>();\n\nconst classes = computed(() => {\n\treturn {\n\t\t'bb-badge': true,\n\t\t'bb-badge--bottom': props.bottom,\n\t\t'bb-badge--left': props.left,\n\t\t'bb-badge--positioned': slots.default,\n\t\t'bb-badge--floating': props.floating,\n\t\t'bb-badge--empty': isNil(props.content),\n\t\t[`bb-badge--${props.color}`]: props.color && !isCssColor(props.color),\n\t};\n});\n\nconst contentAttributes = computed(() => {\n\tlet style: Record<string, string> = {};\n\tif (props.color && isCssColor(props.color)) {\n\t\tstyle.backgroundColor = props.color;\n\t}\n\n\tlet accessibilityAttributes: Record<string, string | boolean> = {};\n\tif (slots.wrap) {\n\t\taccessibilityAttributes['aria-atomic'] = true;\n\t\taccessibilityAttributes['aria-live'] = 'polite';\n\t\taccessibilityAttributes['role'] = 'status';\n\t}\n\treturn {\n\t\tstyle,\n\t\t...accessibilityAttributes,\n\t};\n});\n</script>\n<style lang=\"postcss\">\n@import '@/assets/css/BbBadge';\n</style>\n"],"names":["slots","useSlots","props","__props","classes","computed","isNil","isCssColor","contentAttributes","style","accessibilityAttributes"],"mappings":";;;;;;;;;;;;;AAmBA,UAAMA,IAAQC,KAuBRC,IAAQC,GAORC,IAAUC,EAAS,OACjB;AAAA,MACN,YAAY;AAAA,MACZ,oBAAoBH,EAAM;AAAA,MAC1B,kBAAkBA,EAAM;AAAA,MACxB,wBAAwBF,EAAM;AAAA,MAC9B,sBAAsBE,EAAM;AAAA,MAC5B,mBAAmBI,EAAMJ,EAAM,OAAO;AAAA,MACtC,CAAC,aAAaA,EAAM,KAAK,EAAE,GAAGA,EAAM,SAAS,CAACK,EAAWL,EAAM,KAAK;AAAA,IAAA,EAErE,GAEKM,IAAoBH,EAAS,MAAM;AACxC,UAAII,IAAgC,CAAA;AACpC,MAAIP,EAAM,SAASK,EAAWL,EAAM,KAAK,MACxCO,EAAM,kBAAkBP,EAAM;AAG/B,UAAIQ,IAA4D,CAAA;AAChE,aAAIV,EAAM,SACTU,EAAwB,aAAa,IAAI,IACzCA,EAAwB,WAAW,IAAI,UACvCA,EAAwB,OAAU,WAE5B;AAAA,QACN,OAAAD;AAAA,QACA,GAAGC;AAAA,MAAA;AAAA,IACJ,CACA;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index58.js","sources":["../src/components/BbBreadcrumbs/BbBreadcrumbs.vue"],"sourcesContent":["<template>\n\t<nav aria-label=\"Breadcrumbs\" class=\"bb-breadcrumbs\">\n\t\t<template v-for=\"(item, index) in items\" :key=\"item.key\">\n\t\t\t<span class=\"bb-breadcrumbs__breadcrumb-container\">\n\t\t\t\t<slot\n\t\t\t\t\t:disabled=\"!!(item.disabled || disabled)\"\n\t\t\t\t\t:index=\"index\"\n\t\t\t\t\t:item=\"items[index]\"\n\t\t\t\t\t:name=\"`item:prepend`\"\n\t\t\t\t\t:text=\"item.text\"\n\t\t\t\t></slot>\n\t\t\t\t<BaseButton\n\t\t\t\t\tv-bind=\"item\"\n\t\t\t\t\tclass=\"bb-breadcrumbs__breadcrumb\"\n\t\t\t\t\t:disabled=\"item.disabled || disabled\"\n\t\t\t\t>\n\t\t\t\t\t<slot\n\t\t\t\t\t\t:disabled=\"!!(item.disabled || disabled)\"\n\t\t\t\t\t\t:index=\"index\"\n\t\t\t\t\t\t:item=\"items[index]\"\n\t\t\t\t\t\t:name=\"`${item.key}`\"\n\t\t\t\t\t\t:text=\"item.text\"\n\t\t\t\t\t></slot>\n\t\t\t\t</BaseButton>\n\t\t\t\t<slot\n\t\t\t\t\t:disabled=\"!!(item.disabled || disabled)\"\n\t\t\t\t\t:index=\"index\"\n\t\t\t\t\t:item=\"items[index]\"\n\t\t\t\t\t:name=\"`item:append`\"\n\t\t\t\t\t:text=\"item.text\"\n\t\t\t\t></slot>\n\t\t\t</span>\n\t\t\t<span aria-hidden=\"true\" class=\"bb-breadcrumbs__divider\"\n\t\t\t\t><slot name=\"divider\">{{ props.divider }}</slot></span\n\t\t\t>\n\t\t</template>\n\t</nav>\n</template>\n\n<script setup lang=\"ts\">\nimport type { CommonProps } from '@/types/CommonProps';\nimport BaseButton from '../BaseButton/BaseButton.vue';\nimport type { BaseButtonProps } from '../BaseButton/BaseButton.vue';\n\nexport type Item = Omit<BaseButtonProps, 'block' | 'tag' | 'type'> & {\n\t/**\n\t * Click handler of the button\n\t */\n\tonClick?: (...args: any[]) => any;\n\t/**\n\t * Key that uniquely identifies the breadcrumb\n\t */\n\tkey: string | number;\n};\n\nexport type BbBreadcrumbsProps = Pick<CommonProps, 'disabled'> & {\n\t/**\n\t * Array of items that describe how the breadcrumbs\n\t * should behave. It is compatible with navigating\n\t * through `a` or `router-link`.\n\t */\n\titems: Item[];\n\t/**\n\t * Text content of the divider\n\t */\n\tdivider?: string;\n};\n\nconst props = withDefaults(defineProps<BbBreadcrumbsProps>(), {\n\tdivider: '/',\n});\n\ndefineSlots<\n\t{\n\t\t'item:prepend'?: (props: {\n\t\t\tdisabled: boolean;\n\t\t\tindex: number;\n\t\t\titem: Item;\n\t\t\ttext?: string;\n\t\t}) => any;\n\t\t'item:append'?: (props: {\n\t\t\tdisabled: boolean;\n\t\t\tindex: number;\n\t\t\titem: Item;\n\t\t\ttext?: string;\n\t\t}) => any;\n\t\tdivider?: (props: object) => any;\n\t} & {\n\t\t[key: string]: (props: {\n\t\t\tdisabled: boolean;\n\t\t\tindex: number;\n\t\t\titem: Item;\n\t\t\ttext?: string;\n\t\t}) => any;\n\t}\n>();\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbBreadcrumbs';\n</style>\n"],"names":["props","__props"],"mappings":";;;;;;;;;;;;;;;;;AAoEA,UAAMA,IAAQC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index6.js","sources":["../src/composables/useBroadcastChannelInstance.ts"],"sourcesContent":["import { onBeforeUnmount, ref } from 'vue';\n\ntype MessageMap = { [key: string]: any };\n\ntype Message<T extends MessageMap> = {\n\t[Name in keyof T]: T[Name] extends void\n\t\t? { type: Name }\n\t\t: { type: Name; params: T[Name] };\n}[keyof T];\n\nexport const useBroadcastChannelInstance = <T extends MessageMap>(\n\tname = 'bitboss-ui'\n) => {\n\tlet instances = 0;\n\tconst useBroadCastChannel = () => {\n\t\tinstances++;\n\n\t\tconst isClosed = ref(false);\n\t\tconst channel = ref<BroadcastChannel | undefined>();\n\t\tconst subscribers: Partial<Record<keyof T, ((...args: any[]) => any)[]>> =\n\t\t\t{};\n\n\t\tfunction post<Key extends keyof T>(message: Key, params: T[Key]): void;\n\t\tfunction post<Key extends keyof T>(message: Key, params?: never): void;\n\t\tfunction post(message: keyof T, params: any = undefined) {\n\t\t\tif (channel.value) channel.value.postMessage({ type: message, params });\n\t\t}\n\n\t\tconst close = () => {\n\t\t\tinstances--;\n\t\t\tif (channel.value && !instances) {\n\t\t\t\tchannel.value.close();\n\t\t\t}\n\t\t\tisClosed.value = true;\n\t\t};\n\n\t\tconst on = <Key extends keyof T>(\n\t\t\tmessage: Key,\n\t\t\tfn: T[Key] extends void ? () => any : (arg: T[Key]) => any,\n\t\t\toptions: {\n\t\t\t\tremoveonUnmount: boolean;\n\t\t\t} = {\n\t\t\t\tremoveonUnmount: true,\n\t\t\t}\n\t\t) => {\n\t\t\tif (subscribers[message] === undefined) subscribers[message] = [];\n\n\t\t\tsubscribers[message]?.push(fn);\n\t\t\tif (options.removeonUnmount && subscribers[message]) {\n\t\t\t\tonBeforeUnmount(() => {\n\t\t\t\t\tconst arr = subscribers[message]!;\n\t\t\t\t\tconst indexOfFn = arr.indexOf(fn);\n\t\t\t\t\tif (indexOfFn !== -1) {\n\t\t\t\t\t\tarr.splice(indexOfFn, 1);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\n\t\ttry {\n\t\t\tchannel.value = new BroadcastChannel(name);\n\n\t\t\tchannel.value.addEventListener(\n\t\t\t\t'message',\n\t\t\t\t(e: MessageEvent) => {\n\t\t\t\t\tconst data = e.data as Message<T>;\n\t\t\t\t\tconst subs = subscribers[data.type] ?? [];\n\t\t\t\t\tif ('params' in data) {\n\t\t\t\t\t\tsubs.forEach((s) => s(data.params));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsubs.forEach((s) => s());\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{ passive: true }\n\t\t\t);\n\t\t} catch (error) {\n\t\t\tconsole.error(error);\n\t\t}\n\n\t\treturn {\n\t\t\ton,\n\t\t\tpost,\n\t\t\tclose,\n\t\t};\n\t};\n\treturn { useBroadCastChannel };\n};\n"],"names":["useBroadcastChannelInstance","name","instances","isClosed","ref","channel","subscribers","post","message","params","close","on","fn","options","_a","onBeforeUnmount","arr","indexOfFn","data","subs","s","error"],"mappings":";AAUa,MAAAA,IAA8B,CAC1CC,IAAO,iBACH;AACJ,MAAIC,IAAY;AAwEhB,SAAO,EAAE,qBAvEmB,MAAM;AACjC,IAAAA;AAEM,UAAAC,IAAWC,EAAI,EAAK,GACpBC,IAAUD,KACVE,IACL,CAAA;AAIQ,aAAAC,EAAKC,GAAkBC,IAAc,QAAW;AACpD,MAAAJ,EAAQ,SAAeA,EAAA,MAAM,YAAY,EAAE,MAAMG,GAAS,QAAAC,EAAA,CAAQ;AAAA,IACvE;AAEA,UAAMC,IAAQ,MAAM;AACnB,MAAAR,KACIG,EAAQ,SAAS,CAACH,KACrBG,EAAQ,MAAM,SAEfF,EAAS,QAAQ;AAAA,IAAA,GAGZQ,IAAK,CACVH,GACAI,GACAC,IAEI;AAAA,MACH,iBAAiB;AAAA,IAAA,MAEd;;AACJ,MAAIP,EAAYE,CAAO,MAAM,WAAuBF,EAAAE,CAAO,IAAI,MAEnDM,IAAAR,EAAAE,CAAO,MAAP,QAAAM,EAAU,KAAKF,IACvBC,EAAQ,mBAAmBP,EAAYE,CAAO,KACjDO,EAAgB,MAAM;AACf,cAAAC,IAAMV,EAAYE,CAAO,GACzBS,IAAYD,EAAI,QAAQJ,CAAE;AAChC,QAAIK,MAAc,MACbD,EAAA,OAAOC,GAAW,CAAC;AAAA,MACxB,CACA;AAAA,IACF;AAGG,QAAA;AACK,MAAAZ,EAAA,QAAQ,IAAI,iBAAiBJ,CAAI,GAEzCI,EAAQ,MAAM;AAAA,QACb;AAAA,QACA,CAAC,MAAoB;AACpB,gBAAMa,IAAO,EAAE,MACTC,IAAOb,EAAYY,EAAK,IAAI,KAAK,CAAA;AACvC,UAAI,YAAYA,IACfC,EAAK,QAAQ,CAACC,MAAMA,EAAEF,EAAK,MAAM,CAAC,IAElCC,EAAK,QAAQ,CAACC,MAAMA,EAAG,CAAA;AAAA,QAEzB;AAAA,QACA,EAAE,SAAS,GAAK;AAAA,MAAA;AAAA,aAETC,GAAO;AACf,cAAQ,MAAMA,CAAK;AAAA,IACpB;AAEO,WAAA;AAAA,MACN,IAAAV;AAAA,MACA,MAAAJ;AAAA,MACA,OAAAG;AAAA,IAAA;AAAA,EACD,EAE4B;AAC9B;"}
@@ -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;A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EAAA,OAAOD,EAAW,OAC5CA,EAAW,UAAgBC,EAAA,QAAQD,EAAW,QAC7CE,EAAMF,EAAW,GAAG,MAAYC,EAAA,MAAM,CAAC,CAACD,EAAW,MACnDE,EAAMF,EAAW,EAAE,MAAYC,EAAA,KAAK,CAAC,CAACD,EAAW,KACjDE,EAAMF,EAAW,OAAO,MAAYC,EAAA,UAAU,CAAC,CAACD,EAAW,UAEhEN,EAAM,UAAUO,EAAS,SACzBP,EAAM,cAAcO,EAAS,aAC7BP,EAAM,KAAKO,EAAS,IACpBP,EAAM,SAASO,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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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -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":";;;;;;;;;;;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,IAAc;AAAA,MACnB,SAAS,CAACtB,MAAe;AAExB,YAAIZ,EAAM;AACF,iBAAA;AAAA,YACN,MAAM;AAAA,YACN,MAAAY;AAAA,YACA,kBAAkBkC,EAAY,CAAC9C,EAAM,OAAO;AAAA,YAC5C,eAAe8C,EAAYlC,EAAK,IAAI;AAAA,YACpC,UAAUA,EAAK;AAAA,UAAA;AAGhB,cAAM,IAAI;AAAA,UACT;AAAA,QAAA;AAAA,MAEH;AAAA,MACA,YAAY,CAACA,OACL;AAAA,QACN,MAAM;AAAA,QACN,MAAAA;AAAA,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