bitboss-ui 2.0.7 → 2.0.9

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 (413) hide show
  1. package/dist/index.js +139 -138
  2. package/dist/index.js.map +1 -1
  3. package/dist/index10.js +7 -78
  4. package/dist/index10.js.map +1 -1
  5. package/dist/{index100.js → index101.js} +3 -3
  6. package/dist/{index100.js.map → index101.js.map} +1 -1
  7. package/dist/{index102.js → index103.js} +3 -3
  8. package/dist/{index102.js.map → index103.js.map} +1 -1
  9. package/dist/{index104.js → index105.js} +8 -8
  10. package/dist/{index104.js.map → index105.js.map} +1 -1
  11. package/dist/{index106.js → index107.js} +9 -9
  12. package/dist/{index106.js.map → index107.js.map} +1 -1
  13. package/dist/{index108.js → index109.js} +3 -3
  14. package/dist/{index108.js.map → index109.js.map} +1 -1
  15. package/dist/index11.js +74 -35
  16. package/dist/index11.js.map +1 -1
  17. package/dist/{index110.js → index111.js} +3 -3
  18. package/dist/{index110.js.map → index111.js.map} +1 -1
  19. package/dist/{index112.js → index113.js} +3 -3
  20. package/dist/{index112.js.map → index113.js.map} +1 -1
  21. package/dist/{index114.js → index115.js} +3 -3
  22. package/dist/{index114.js.map → index115.js.map} +1 -1
  23. package/dist/{index116.js → index117.js} +8 -8
  24. package/dist/{index116.js.map → index117.js.map} +1 -1
  25. package/dist/{index118.js → index119.js} +2 -2
  26. package/dist/{index118.js.map → index119.js.map} +1 -1
  27. package/dist/index12.js +36 -189
  28. package/dist/index12.js.map +1 -1
  29. package/dist/index121.js +34 -38
  30. package/dist/index121.js.map +1 -1
  31. package/dist/index122.js +38 -38
  32. package/dist/index122.js.map +1 -1
  33. package/dist/index123.js +39 -42
  34. package/dist/index123.js.map +1 -1
  35. package/dist/index124.js +43 -31
  36. package/dist/index124.js.map +1 -1
  37. package/dist/index125.js +35 -2
  38. package/dist/index125.js.map +1 -1
  39. package/dist/index126.js +2 -21
  40. package/dist/index126.js.map +1 -1
  41. package/dist/index127.js +21 -2
  42. package/dist/index127.js.map +1 -1
  43. package/dist/index128.js +2 -312
  44. package/dist/index128.js.map +1 -1
  45. package/dist/index129.js +309 -21
  46. package/dist/index129.js.map +1 -1
  47. package/dist/index13.js +189 -78
  48. package/dist/index13.js.map +1 -1
  49. package/dist/index130.js +24 -2
  50. package/dist/index130.js.map +1 -1
  51. package/dist/index131.js +2 -5
  52. package/dist/index131.js.map +1 -1
  53. package/dist/index132.js +5 -9
  54. package/dist/index132.js.map +1 -1
  55. package/dist/index133.js +8 -5
  56. package/dist/index133.js.map +1 -1
  57. package/dist/index134.js +6 -3
  58. package/dist/index134.js.map +1 -1
  59. package/dist/index135.js +1 -1
  60. package/dist/index136.js +1 -1
  61. package/dist/index137.js +1 -1
  62. package/dist/index138.js +1 -1
  63. package/dist/index139.js +1 -1
  64. package/dist/index14.js +85 -0
  65. package/dist/index14.js.map +1 -0
  66. package/dist/index140.js +1 -1
  67. package/dist/index141.js +1 -1
  68. package/dist/index142.js +1 -1
  69. package/dist/index143.js +1 -1
  70. package/dist/index144.js +1 -1
  71. package/dist/index145.js +1 -1
  72. package/dist/index146.js +1 -1
  73. package/dist/index147.js +1 -1
  74. package/dist/index148.js +1 -1
  75. package/dist/index149.js +1 -1
  76. package/dist/index150.js +1 -1
  77. package/dist/index151.js +1 -1
  78. package/dist/index152.js +1 -1
  79. package/dist/index153.js +1 -1
  80. package/dist/index154.js +1 -1
  81. package/dist/index155.js +1 -1
  82. package/dist/index156.js +1 -1
  83. package/dist/index157.js +1 -1
  84. package/dist/index158.js +1 -1
  85. package/dist/index159.js +1 -1
  86. package/dist/{index15.js → index16.js} +4 -4
  87. package/dist/{index15.js.map → index16.js.map} +1 -1
  88. package/dist/index160.js +2 -2
  89. package/dist/{index162.js → index161.js} +1 -1
  90. package/dist/index161.js.map +1 -0
  91. package/dist/index163.js +6 -0
  92. package/dist/index163.js.map +1 -0
  93. package/dist/index165.js +1 -1
  94. package/dist/index166.js +1 -1
  95. package/dist/index167.js +1 -1
  96. package/dist/index168.js +1 -1
  97. package/dist/index169.js +1 -1
  98. package/dist/index170.js +2 -2
  99. package/dist/index171.js +6 -0
  100. package/dist/index171.js.map +1 -0
  101. package/dist/index173.js +2 -3
  102. package/dist/index173.js.map +1 -1
  103. package/dist/index174.js +1 -1
  104. package/dist/index175.js +1 -1
  105. package/dist/index176.js +1 -1
  106. package/dist/index177.js +1 -1
  107. package/dist/index178.js +1 -1
  108. package/dist/index179.js +1 -1
  109. package/dist/{index17.js → index18.js} +4 -4
  110. package/dist/{index17.js.map → index18.js.map} +1 -1
  111. package/dist/index180.js +1 -1
  112. package/dist/index181.js +1 -1
  113. package/dist/index182.js +1 -1
  114. package/dist/index183.js +1 -1
  115. package/dist/index184.js +1 -1
  116. package/dist/{index186.js → index185.js} +1 -1
  117. package/dist/index185.js.map +1 -0
  118. package/dist/index187.js +6 -0
  119. package/dist/index187.js.map +1 -0
  120. package/dist/index189.js +1 -1
  121. package/dist/index190.js +1 -1
  122. package/dist/index191.js +1 -1
  123. package/dist/index192.js +1 -1
  124. package/dist/index193.js +1 -1
  125. package/dist/index194.js +1 -1
  126. package/dist/index195.js +1 -1
  127. package/dist/index196.js +1 -1
  128. package/dist/index197.js +1 -1
  129. package/dist/index198.js +3 -81
  130. package/dist/index198.js.map +1 -1
  131. package/dist/{index19.js → index20.js} +19 -18
  132. package/dist/{index19.js.map → index20.js.map} +1 -1
  133. package/dist/index200.js +126 -2
  134. package/dist/index200.js.map +1 -1
  135. package/dist/index201.js +5 -4
  136. package/dist/index201.js.map +1 -1
  137. package/dist/index202.js +123 -2
  138. package/dist/index202.js.map +1 -1
  139. package/dist/index203.js +19 -8
  140. package/dist/index203.js.map +1 -1
  141. package/dist/index204.js +14 -124
  142. package/dist/index204.js.map +1 -1
  143. package/dist/index205.js +16 -5
  144. package/dist/index205.js.map +1 -1
  145. package/dist/index206.js +2 -123
  146. package/dist/index206.js.map +1 -1
  147. package/dist/index207.js +2 -19
  148. package/dist/index207.js.map +1 -1
  149. package/dist/index208.js +35 -16
  150. package/dist/index208.js.map +1 -1
  151. package/dist/index209.js +172 -14
  152. package/dist/index209.js.map +1 -1
  153. package/dist/index210.js +6 -2
  154. package/dist/index210.js.map +1 -1
  155. package/dist/index211.js +44 -2
  156. package/dist/index211.js.map +1 -1
  157. package/dist/index213.js +12 -173
  158. package/dist/index213.js.map +1 -1
  159. package/dist/index214.js +5 -6
  160. package/dist/index214.js.map +1 -1
  161. package/dist/index215.js +369 -43
  162. package/dist/index215.js.map +1 -1
  163. package/dist/index216.js +161 -0
  164. package/dist/index216.js.map +1 -0
  165. package/dist/index217.js +84 -13
  166. package/dist/index217.js.map +1 -1
  167. package/dist/index219.js +67 -355
  168. package/dist/index219.js.map +1 -1
  169. package/dist/{index21.js → index22.js} +21 -21
  170. package/dist/{index21.js.map → index22.js.map} +1 -1
  171. package/dist/index220.js +8 -19
  172. package/dist/index220.js.map +1 -1
  173. package/dist/index221.js +3 -27
  174. package/dist/index221.js.map +1 -1
  175. package/dist/index222.js +2 -3
  176. package/dist/index222.js.map +1 -1
  177. package/dist/index223.js +4 -249
  178. package/dist/index223.js.map +1 -1
  179. package/dist/index224.js +2 -52
  180. package/dist/index224.js.map +1 -1
  181. package/dist/index225.js +3 -44
  182. package/dist/index225.js.map +1 -1
  183. package/dist/index226.js +7 -5
  184. package/dist/index226.js.map +1 -1
  185. package/dist/index227.js +19 -49
  186. package/dist/index227.js.map +1 -1
  187. package/dist/index228.js +27 -3
  188. package/dist/index228.js.map +1 -1
  189. package/dist/index229.js +3 -3
  190. package/dist/index229.js.map +1 -1
  191. package/dist/index230.js +249 -7
  192. package/dist/index230.js.map +1 -1
  193. package/dist/index231.js +50 -156
  194. package/dist/index231.js.map +1 -1
  195. package/dist/index232.js +38 -78
  196. package/dist/index232.js.map +1 -1
  197. package/dist/index233.js +8 -0
  198. package/dist/index233.js.map +1 -0
  199. package/dist/index234.js +49 -2
  200. package/dist/index234.js.map +1 -1
  201. package/dist/index235.js +2 -18
  202. package/dist/index235.js.map +1 -1
  203. package/dist/index236.js +2 -106
  204. package/dist/index236.js.map +1 -1
  205. package/dist/index237.js +21 -0
  206. package/dist/index237.js.map +1 -0
  207. package/dist/index238.js +53 -47
  208. package/dist/index238.js.map +1 -1
  209. package/dist/{index23.js → index24.js} +8 -8
  210. package/dist/{index23.js.map → index24.js.map} +1 -1
  211. package/dist/index240.js +100 -2
  212. package/dist/index240.js.map +1 -1
  213. package/dist/index242.js +9 -2
  214. package/dist/index242.js.map +1 -1
  215. package/dist/index243.js +2 -3
  216. package/dist/index243.js.map +1 -1
  217. package/dist/index244.js +3 -6
  218. package/dist/index244.js.map +1 -1
  219. package/dist/index245.js +12 -16
  220. package/dist/index245.js.map +1 -1
  221. package/dist/index246.js +8 -8
  222. package/dist/index246.js.map +1 -1
  223. package/dist/index247.js +9 -23
  224. package/dist/index247.js.map +1 -1
  225. package/dist/index248.js +17 -9
  226. package/dist/index248.js.map +1 -1
  227. package/dist/index257.js +1 -1
  228. package/dist/index258.js +1 -1
  229. package/dist/{index25.js → index26.js} +6 -6
  230. package/dist/{index25.js.map → index26.js.map} +1 -1
  231. package/dist/index263.js +224 -2
  232. package/dist/index263.js.map +1 -1
  233. package/dist/index264.js +4 -2
  234. package/dist/index264.js.map +1 -1
  235. package/dist/index265.js +9 -2
  236. package/dist/index265.js.map +1 -1
  237. package/dist/index266.js +5 -1
  238. package/dist/index266.js.map +1 -1
  239. package/dist/index267.js +16 -2
  240. package/dist/index267.js.map +1 -1
  241. package/dist/index268.js +9 -2
  242. package/dist/index268.js.map +1 -1
  243. package/dist/index269.js +23 -28
  244. package/dist/index269.js.map +1 -1
  245. package/dist/index270.js +199 -21
  246. package/dist/index270.js.map +1 -1
  247. package/dist/index271.js +439 -0
  248. package/dist/index271.js.map +1 -0
  249. package/dist/index272.js +121 -218
  250. package/dist/index272.js.map +1 -1
  251. package/dist/index274.js +5 -200
  252. package/dist/index274.js.map +1 -1
  253. package/dist/index275.js +2 -436
  254. package/dist/index275.js.map +1 -1
  255. package/dist/index276.js +2 -127
  256. package/dist/index276.js.map +1 -1
  257. package/dist/index277.js +2 -5
  258. package/dist/index277.js.map +1 -1
  259. package/dist/index278.js +2 -2
  260. package/dist/index278.js.map +1 -1
  261. package/dist/index279.js +2 -9
  262. package/dist/index279.js.map +1 -1
  263. package/dist/{index27.js → index28.js} +3 -3
  264. package/dist/{index27.js.map → index28.js.map} +1 -1
  265. package/dist/index280.js +2 -69
  266. package/dist/index280.js.map +1 -1
  267. package/dist/index281.js +28 -3
  268. package/dist/index281.js.map +1 -1
  269. package/dist/index282.js +22 -12
  270. package/dist/index282.js.map +1 -1
  271. package/dist/index284.js +2 -17
  272. package/dist/index284.js.map +1 -1
  273. package/dist/index285.js +68 -2
  274. package/dist/index285.js.map +1 -1
  275. package/dist/index287.js +3 -211
  276. package/dist/index287.js.map +1 -1
  277. package/dist/index288.js +211 -15
  278. package/dist/index288.js.map +1 -1
  279. package/dist/index289.js +15 -4
  280. package/dist/index289.js.map +1 -1
  281. package/dist/index290.js +11 -4
  282. package/dist/index290.js.map +1 -1
  283. package/dist/index291.js +34 -58
  284. package/dist/index291.js.map +1 -1
  285. package/dist/index292.js +4 -35
  286. package/dist/index292.js.map +1 -1
  287. package/dist/index293.js +4 -7
  288. package/dist/index293.js.map +1 -1
  289. package/dist/index294.js +57 -17
  290. package/dist/index294.js.map +1 -1
  291. package/dist/index295.js +2 -7
  292. package/dist/index295.js.map +1 -1
  293. package/dist/index296.js +7 -2
  294. package/dist/index296.js.map +1 -1
  295. package/dist/index297.js +6 -10
  296. package/dist/index297.js.map +1 -1
  297. package/dist/index298.js +17 -45
  298. package/dist/index298.js.map +1 -1
  299. package/dist/index299.js +50 -0
  300. package/dist/index299.js.map +1 -0
  301. package/dist/{index29.js → index30.js} +3 -3
  302. package/dist/{index29.js.map → index30.js.map} +1 -1
  303. package/dist/index301.js +416 -42
  304. package/dist/index301.js.map +1 -1
  305. package/dist/index302.js +50 -0
  306. package/dist/index302.js.map +1 -0
  307. package/dist/{index31.js → index32.js} +4 -4
  308. package/dist/{index31.js.map → index32.js.map} +1 -1
  309. package/dist/{index33.js → index34.js} +5 -5
  310. package/dist/{index33.js.map → index34.js.map} +1 -1
  311. package/dist/{index35.js → index36.js} +23 -22
  312. package/dist/{index35.js.map → index36.js.map} +1 -1
  313. package/dist/{index37.js → index38.js} +7 -7
  314. package/dist/{index37.js.map → index38.js.map} +1 -1
  315. package/dist/{index39.js → index40.js} +3 -3
  316. package/dist/{index39.js.map → index40.js.map} +1 -1
  317. package/dist/{index41.js → index42.js} +4 -4
  318. package/dist/{index41.js.map → index42.js.map} +1 -1
  319. package/dist/{index43.js → index44.js} +12 -11
  320. package/dist/{index43.js.map → index44.js.map} +1 -1
  321. package/dist/{index45.js → index46.js} +4 -4
  322. package/dist/{index45.js.map → index46.js.map} +1 -1
  323. package/dist/{index47.js → index48.js} +3 -3
  324. package/dist/{index47.js.map → index48.js.map} +1 -1
  325. package/dist/index5.js +14 -40
  326. package/dist/index5.js.map +1 -1
  327. package/dist/{index49.js → index50.js} +4 -4
  328. package/dist/{index49.js.map → index50.js.map} +1 -1
  329. package/dist/{index51.js → index52.js} +3 -3
  330. package/dist/{index51.js.map → index52.js.map} +1 -1
  331. package/dist/{index53.js → index54.js} +3 -3
  332. package/dist/{index53.js.map → index54.js.map} +1 -1
  333. package/dist/{index55.js → index56.js} +3 -3
  334. package/dist/{index55.js.map → index56.js.map} +1 -1
  335. package/dist/{index57.js → index58.js} +2 -2
  336. package/dist/{index57.js.map → index58.js.map} +1 -1
  337. package/dist/index6.js +38 -76
  338. package/dist/index6.js.map +1 -1
  339. package/dist/{index59.js → index60.js} +14 -13
  340. package/dist/{index59.js.map → index60.js.map} +1 -1
  341. package/dist/{index61.js → index62.js} +3 -3
  342. package/dist/{index61.js.map → index62.js.map} +1 -1
  343. package/dist/{index63.js → index64.js} +3 -3
  344. package/dist/{index63.js.map → index64.js.map} +1 -1
  345. package/dist/{index65.js → index66.js} +5 -5
  346. package/dist/{index65.js.map → index66.js.map} +1 -1
  347. package/dist/{index67.js → index68.js} +3 -3
  348. package/dist/{index67.js.map → index68.js.map} +1 -1
  349. package/dist/index7.js +78 -62
  350. package/dist/index7.js.map +1 -1
  351. package/dist/{index69.js → index70.js} +2 -2
  352. package/dist/{index69.js.map → index70.js.map} +1 -1
  353. package/dist/{index71.js → index72.js} +9 -9
  354. package/dist/{index71.js.map → index72.js.map} +1 -1
  355. package/dist/{index73.js → index74.js} +3 -3
  356. package/dist/{index73.js.map → index74.js.map} +1 -1
  357. package/dist/{index75.js → index76.js} +5 -5
  358. package/dist/{index75.js.map → index76.js.map} +1 -1
  359. package/dist/index78.js +37 -120
  360. package/dist/index78.js.map +1 -1
  361. package/dist/index79.js +130 -0
  362. package/dist/index79.js.map +1 -0
  363. package/dist/index8.js +60 -18
  364. package/dist/index8.js.map +1 -1
  365. package/dist/{index80.js → index81.js} +5 -5
  366. package/dist/{index80.js.map → index81.js.map} +1 -1
  367. package/dist/{index82.js → index83.js} +25 -24
  368. package/dist/{index82.js.map → index83.js.map} +1 -1
  369. package/dist/{index84.js → index85.js} +7 -7
  370. package/dist/{index84.js.map → index85.js.map} +1 -1
  371. package/dist/{index86.js → index87.js} +2 -2
  372. package/dist/{index86.js.map → index87.js.map} +1 -1
  373. package/dist/{index88.js → index89.js} +3 -3
  374. package/dist/{index88.js.map → index89.js.map} +1 -1
  375. package/dist/index9.js +19 -7
  376. package/dist/index9.js.map +1 -1
  377. package/dist/{index90.js → index91.js} +3 -3
  378. package/dist/{index90.js.map → index91.js.map} +1 -1
  379. package/dist/{index92.js → index93.js} +3 -3
  380. package/dist/{index92.js.map → index93.js.map} +1 -1
  381. package/dist/{index94.js → index95.js} +1 -1
  382. package/dist/index95.js.map +1 -0
  383. package/dist/{index96.js → index97.js} +3 -3
  384. package/dist/{index96.js.map → index97.js.map} +1 -1
  385. package/dist/{index98.js → index99.js} +3 -3
  386. package/dist/{index98.js.map → index99.js.map} +1 -1
  387. package/dist/style.css +1 -1
  388. package/package.json +1 -1
  389. package/dist/index120.js +0 -43
  390. package/dist/index120.js.map +0 -1
  391. package/dist/index162.js.map +0 -1
  392. package/dist/index164.js +0 -6
  393. package/dist/index164.js.map +0 -1
  394. package/dist/index172.js +0 -5
  395. package/dist/index172.js.map +0 -1
  396. package/dist/index186.js.map +0 -1
  397. package/dist/index188.js +0 -6
  398. package/dist/index188.js.map +0 -1
  399. package/dist/index212.js +0 -38
  400. package/dist/index212.js.map +0 -1
  401. package/dist/index218.js +0 -8
  402. package/dist/index218.js.map +0 -1
  403. package/dist/index241.js +0 -13
  404. package/dist/index241.js.map +0 -1
  405. package/dist/index283.js +0 -12
  406. package/dist/index283.js.map +0 -1
  407. package/dist/index300.js +0 -424
  408. package/dist/index300.js.map +0 -1
  409. package/dist/index4.js +0 -17
  410. package/dist/index4.js.map +0 -1
  411. package/dist/index77.js +0 -47
  412. package/dist/index77.js.map +0 -1
  413. package/dist/index94.js.map +0 -1
@@ -1,12 +1,13 @@
1
1
  import { defineComponent as W, computed as y, ref as c, onMounted as w, onBeforeUnmount as R, openBlock as k, createElementBlock as V, normalizeClass as C, createElementVNode as o, createVNode as v, unref as g, withCtx as S, renderSlot as m, Fragment as F, renderList as L, toDisplayString as M, nextTick as N } from "vue";
2
- import { debounce as T } from "./index248.js";
2
+ import { debounce as T } from "./index265.js";
3
3
  /* empty css */
4
4
  /* empty css */
5
- import $ from "./index13.js";
5
+ /* empty css */
6
+ import $ from "./index14.js";
6
7
  /* empty css */
7
- import A from "./index122.js";
8
+ import A from "./index123.js";
8
9
  /* empty css */
9
- const D = { "aria-label": "Navigazione" }, G = /* @__PURE__ */ o("span", { class: "bb-pagination__page-label" }, "Precedente", -1), I = { class: "bb-pagination__page-label" }, O = { class: "bb-pagination__page-label" }, j = /* @__PURE__ */ o("span", { class: "bb-pagination__page-label" }, "Successivo", -1), Z = /* @__PURE__ */ W({
10
+ const D = { "aria-label": "Navigazione" }, G = /* @__PURE__ */ o("span", { class: "bb-pagination__page-label" }, "Precedente", -1), I = { class: "bb-pagination__page-label" }, O = { class: "bb-pagination__page-label" }, j = /* @__PURE__ */ o("span", { class: "bb-pagination__page-label" }, "Successivo", -1), ee = /* @__PURE__ */ W({
10
11
  __name: "BbPagination",
11
12
  props: {
12
13
  disabled: { type: Boolean },
@@ -19,20 +20,20 @@ const D = { "aria-label": "Navigazione" }, G = /* @__PURE__ */ o("span", { class
19
20
  },
20
21
  emits: ["update:modelValue"],
21
22
  setup(B, { emit: E }) {
22
- const a = B, _ = E, i = y(() => +a.totalPages), r = c(1), t = c(+a.maxSize), u = c(), d = c(), z = c(1 / 0), f = () => {
23
- u.value && d.value && (u.value.clientWidth < d.value.clientWidth ? t.value - 1 > 3 ? (t.value--, N(f)) : t.value = 3 : t.value < +a.maxSize && /* If there is enough space to fit one */
24
- u.value.clientWidth - d.value.clientWidth > z.value && (t.value = Math.min(t.value + 1, +a.maxSize), N(f)));
23
+ const a = B, _ = E, i = y(() => +a.totalPages), r = c(1), n = c(+a.maxSize), u = c(), d = c(), z = c(1 / 0), f = () => {
24
+ u.value && d.value && (u.value.clientWidth < d.value.clientWidth ? n.value - 1 > 3 ? (n.value--, N(f)) : n.value = 3 : n.value < +a.maxSize && /* If there is enough space to fit one */
25
+ u.value.clientWidth - d.value.clientWidth > z.value && (n.value = Math.min(n.value + 1, +a.maxSize), N(f)));
25
26
  };
26
27
  if (globalThis.ResizeObserver) {
27
28
  const e = new ResizeObserver(T(f, 200));
28
29
  w(() => {
29
30
  if (u.value && d.value) {
30
- const n = u.value.querySelectorAll(
31
+ const t = u.value.querySelectorAll(
31
32
  ".bb-pagination__page"
32
33
  )[1];
33
- if (n) {
34
+ if (t) {
34
35
  const p = getComputedStyle(d.value).columnGap.replaceAll(/\D/g, ""), s = Number(p);
35
- z.value = n.clientWidth + s;
36
+ z.value = t.clientWidth + s;
36
37
  }
37
38
  e.observe(u.value);
38
39
  }
@@ -43,25 +44,25 @@ const D = { "aria-label": "Navigazione" }, G = /* @__PURE__ */ o("span", { class
43
44
  const P = y(() => {
44
45
  if (i.value <= 0 || isNaN(i.value) || i.value > Number.MAX_SAFE_INTEGER)
45
46
  return [];
46
- if (t.value <= 1) return [a.modelValue];
47
- if (i.value <= t.value)
47
+ if (n.value <= 1) return [a.modelValue];
48
+ if (i.value <= n.value)
48
49
  return b(i.value, r.value);
49
- const e = t.value % 2 === 0, n = e ? t.value / 2 : Math.floor(t.value / 2), l = e ? n : n + 1, p = i.value - n;
50
+ const e = n.value % 2 === 0, t = e ? n.value / 2 : Math.floor(n.value / 2), l = e ? t : t + 1, p = i.value - t;
50
51
  if (l - a.modelValue >= 0)
51
52
  return [
52
- ...b(Math.max(1, t.value - 1), r.value),
53
+ ...b(Math.max(1, n.value - 1), r.value),
53
54
  a.ellipsis,
54
55
  i.value
55
56
  ];
56
57
  if (a.modelValue - p >= (e ? 1 : 0)) {
57
- const s = t.value - 1, h = i.value - s + r.value;
58
+ const s = n.value - 1, h = i.value - s + r.value;
58
59
  return [
59
60
  r.value,
60
61
  a.ellipsis,
61
62
  ...b(s, h)
62
63
  ];
63
64
  } else {
64
- const s = Math.max(1, t.value - 3), h = s === 1 ? a.modelValue : a.modelValue - Math.ceil(s / 2) + r.value;
65
+ const s = Math.max(1, n.value - 3), h = s === 1 ? a.modelValue : a.modelValue - Math.ceil(s / 2) + r.value;
65
66
  return [
66
67
  r.value,
67
68
  a.ellipsis,
@@ -70,9 +71,9 @@ const D = { "aria-label": "Navigazione" }, G = /* @__PURE__ */ o("span", { class
70
71
  i.value
71
72
  ];
72
73
  }
73
- }), x = y(() => P.value.map((e, n) => typeof e == "string" ? {
74
+ }), x = y(() => P.value.map((e, t) => typeof e == "string" ? {
74
75
  active: !1,
75
- key: `ellipsis-${n}`,
76
+ key: `ellipsis-${t}`,
76
77
  page: e,
77
78
  ellipsis: !0,
78
79
  disabled: !0
@@ -82,8 +83,8 @@ const D = { "aria-label": "Navigazione" }, G = /* @__PURE__ */ o("span", { class
82
83
  page: e,
83
84
  ellipsis: !1,
84
85
  disabled: !!a.disabled || +a.totalPages < 2 || a.loading
85
- })), b = (e, n = 0) => Array.from({ length: e }, (l, p) => n + p);
86
- return (e, n) => (k(), V("div", {
86
+ })), b = (e, t = 0) => Array.from({ length: e }, (l, p) => t + p);
87
+ return (e, t) => (k(), V("div", {
87
88
  ref_key: "outercontainer",
88
89
  ref: u,
89
90
  class: C(["bb-pagination", {
@@ -100,7 +101,7 @@ const D = { "aria-label": "Navigazione" }, G = /* @__PURE__ */ o("span", { class
100
101
  v(g($), {
101
102
  class: "bb-pagination__page bb-pagination__page--previous",
102
103
  disabled: a.modelValue <= 1 || e.loading || e.disabled,
103
- onClick: n[0] || (n[0] = (l) => _("update:modelValue", a.modelValue - 1))
104
+ onClick: t[0] || (t[0] = (l) => _("update:modelValue", a.modelValue - 1))
104
105
  }, {
105
106
  default: S(() => [
106
107
  m(e.$slots, "previous", {}, () => [
@@ -144,7 +145,7 @@ const D = { "aria-label": "Navigazione" }, G = /* @__PURE__ */ o("span", { class
144
145
  v(g($), {
145
146
  class: "bb-pagination__page bb-pagination__page--next",
146
147
  disabled: a.modelValue >= +i.value || e.loading || e.disabled,
147
- onClick: n[1] || (n[1] = (l) => _("update:modelValue", a.modelValue + 1))
148
+ onClick: t[1] || (t[1] = (l) => _("update:modelValue", a.modelValue + 1))
148
149
  }, {
149
150
  default: S(() => [
150
151
  m(e.$slots, "next", {}, () => [
@@ -164,6 +165,6 @@ const D = { "aria-label": "Navigazione" }, G = /* @__PURE__ */ o("span", { class
164
165
  }
165
166
  });
166
167
  export {
167
- Z as default
168
+ ee as default
168
169
  };
169
- //# sourceMappingURL=index82.js.map
170
+ //# sourceMappingURL=index83.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index82.js","sources":["../src/components/BbPagination/BbPagination.vue"],"sourcesContent":["<template>\n\t<div\n\t\tref=\"outercontainer\"\n\t\tclass=\"bb-pagination\"\n\t\t:class=\"{\n\t\t\t[`bb-pagination--${align}`]: true,\n\t\t}\"\n\t>\n\t\t<nav aria-label=\"Navigazione\">\n\t\t\t<ul ref=\"innercontainer\" class=\"bb-pagination__pages\">\n\t\t\t\t<li>\n\t\t\t\t\t<BaseButton\n\t\t\t\t\t\tclass=\"bb-pagination__page bb-pagination__page--previous\"\n\t\t\t\t\t\t:disabled=\"props.modelValue <= 1 || loading || disabled\"\n\t\t\t\t\t\t@click=\"emit('update:modelValue', props.modelValue - 1)\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot name=\"previous\">\n\t\t\t\t\t\t\t<span class=\"bb-pagination__page-label\">Precedente</span>\n\t\t\t\t\t\t\t<BbIcon class=\"bb-pagination__page-chevron\" type=\"chevron_down\" />\n\t\t\t\t\t\t</slot>\n\t\t\t\t\t</BaseButton>\n\t\t\t\t</li>\n\t\t\t\t<li v-for=\"item in items\" :key=\"item.key\">\n\t\t\t\t\t<BaseButton\n\t\t\t\t\t\tclass=\"bb-pagination__page\"\n\t\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t\t'bb-pagination__page--active': item.active,\n\t\t\t\t\t\t\t'bb-pagination__page--ellipsis': item.ellipsis,\n\t\t\t\t\t\t}\"\n\t\t\t\t\t\t:disabled=\"item.disabled\"\n\t\t\t\t\t\t@click=\"emit('update:modelValue', item.key)\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<template v-if=\"item.ellipsis === true\">\n\t\t\t\t\t\t\t<slot name=\"ellipsis\">\n\t\t\t\t\t\t\t\t<span class=\"bb-pagination__page-label\">{{\n\t\t\t\t\t\t\t\t\tprops.ellipsis\n\t\t\t\t\t\t\t\t}}</span>\n\t\t\t\t\t\t\t</slot>\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\t<template v-else>\n\t\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t\t:active=\"item.active\"\n\t\t\t\t\t\t\t\t:disabled=\"item.disabled\"\n\t\t\t\t\t\t\t\t:item=\"item.key\"\n\t\t\t\t\t\t\t\tname=\"item\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<span class=\"bb-pagination__page-label\">{{ item.key }}</span>\n\t\t\t\t\t\t\t</slot>\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</BaseButton>\n\t\t\t\t</li>\n\t\t\t\t<li>\n\t\t\t\t\t<BaseButton\n\t\t\t\t\t\tclass=\"bb-pagination__page bb-pagination__page--next\"\n\t\t\t\t\t\t:disabled=\"props.modelValue >= +totalPages || loading || disabled\"\n\t\t\t\t\t\t@click=\"emit('update:modelValue', props.modelValue + 1)\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot name=\"next\">\n\t\t\t\t\t\t\t<span class=\"bb-pagination__page-label\">Successivo</span>\n\t\t\t\t\t\t\t<BbIcon class=\"bb-pagination__page-chevron\" type=\"chevron_down\" />\n\t\t\t\t\t\t</slot>\n\t\t\t\t\t</BaseButton>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</nav>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, nextTick, onBeforeUnmount, onMounted, ref } from 'vue';\nimport { debounce } from '@/utilities/functions/debounce';\nimport type { CommonProps } from '@/types/CommonProps';\nimport { BaseButton, BbIcon } from '@/index';\n\nexport type BbPaginationProps = Pick<CommonProps, 'disabled' | 'loading'> & {\n\talign?: 'left' | 'right' | 'center';\n\t/**\n\t * String of text displayed in place of hidden pages\n\t */\n\tellipsis?: string;\n\t/**\n\t * Maximum number of clickable pages displayed at all times.\n\t * This has a tolerance of +/- 1 for odd / even numbering.\n\t * It does not include ellipses.\n\t */\n\tmaxSize?: number | string;\n\t/**\n\t * Used by v-model. Indicates the current page.\n\t */\n\tmodelValue: number;\n\t/**\n\t * Total number of pages there is.\n\t */\n\ttotalPages?: number | string;\n};\n\nconst props = withDefaults(defineProps<BbPaginationProps>(), {\n\talign: 'right',\n\tmodelValue: 1,\n\ttotalPages: 1,\n\tellipsis: '...',\n\tmaxSize: 6,\n});\n\nexport type BbPaginationEvents = {\n\t(e: 'update:modelValue', value: number): void;\n};\n\nconst emit = defineEmits(['update:modelValue']);\n\ndefineSlots<{\n\tprevious?: (props: object) => any;\n\tnext?: (props: object) => any;\n\titem?: (props: { active: boolean; disabled: boolean; item: number }) => any;\n\tellipsis?: (props: object) => any;\n}>();\n\nconst totalPages = computed(() => +props.totalPages);\nconst start = ref(1);\nconst maxSize = ref(+props.maxSize);\n\nconst outercontainer = ref<HTMLElement>();\nconst innercontainer = ref<HTMLElement>();\n\nconst buttonFootprint = ref<number>(Infinity);\n\n/**\n * Adjusts how many buttons to show.\n * if current buttons can't fit subtract maxSize until they do or until minimum is reached\n * if more buttons could fit add buttons until the don't\n * If minimum or maximum is reached just quit until next resize\n */\nconst adjustMaxElements = () => {\n\tif (outercontainer.value && innercontainer.value) {\n\t\t/* If some buttons do not fit */\n\t\tif (outercontainer.value.clientWidth < innercontainer.value.clientWidth) {\n\t\t\tif (maxSize.value - 1 > 3) {\n\t\t\t\tmaxSize.value--;\n\t\t\t\tnextTick(adjustMaxElements);\n\t\t\t} else {\n\t\t\t\tmaxSize.value = 3;\n\t\t\t}\n\t\t\t/* If all current buttons do fit */\n\t\t} else {\n\t\t\t/* If some buttons have been hidden */\n\t\t\tif (maxSize.value < +props.maxSize) {\n\t\t\t\tif (\n\t\t\t\t\t/* If there is enough space to fit one */\n\t\t\t\t\toutercontainer.value.clientWidth - innercontainer.value.clientWidth >\n\t\t\t\t\tbuttonFootprint.value\n\t\t\t\t) {\n\t\t\t\t\tmaxSize.value = Math.min(maxSize.value + 1, +props.maxSize);\n\t\t\t\t\tnextTick(adjustMaxElements);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\nif (globalThis.ResizeObserver) {\n\tconst observer = new ResizeObserver(debounce(adjustMaxElements, 200));\n\tonMounted(() => {\n\t\tif (outercontainer.value && innercontainer.value) {\n\t\t\tconst button = outercontainer.value.querySelectorAll(\n\t\t\t\t'.bb-pagination__page'\n\t\t\t)[1];\n\t\t\tif (button) {\n\t\t\t\t/* Compute the footprint necessary to render a new button */\n\t\t\t\tconst gapString = getComputedStyle(innercontainer.value).columnGap;\n\t\t\t\tconst numberAsString = gapString.replaceAll(/\\D/g, '');\n\t\t\t\tconst gap = Number(numberAsString);\n\t\t\t\tbuttonFootprint.value = button.clientWidth + gap;\n\t\t\t}\n\t\t\tobserver.observe(outercontainer.value);\n\t\t}\n\t});\n\tonBeforeUnmount(() => {\n\t\tobserver.disconnect();\n\t});\n}\n\nconst range = computed(() => {\n\tif (\n\t\ttotalPages.value <= 0 ||\n\t\tisNaN(totalPages.value) ||\n\t\ttotalPages.value > Number.MAX_SAFE_INTEGER\n\t)\n\t\treturn [];\n\n\tif (maxSize.value <= 1) return [props.modelValue];\n\n\tif (totalPages.value <= maxSize.value) {\n\t\treturn createRange(totalPages.value, start.value);\n\t}\n\n\tconst even = maxSize.value % 2 === 0;\n\tconst middle = even ? maxSize.value / 2 : Math.floor(maxSize.value / 2);\n\tconst left = even ? middle : middle + 1;\n\tconst right = totalPages.value - middle;\n\n\tif (left - props.modelValue >= 0) {\n\t\treturn [\n\t\t\t...createRange(Math.max(1, maxSize.value - 1), start.value),\n\t\t\tprops.ellipsis,\n\t\t\ttotalPages.value,\n\t\t];\n\t} else if (props.modelValue - right >= (even ? 1 : 0)) {\n\t\tconst rangeLength = maxSize.value - 1;\n\t\tconst rangeStart = totalPages.value - rangeLength + start.value;\n\t\treturn [\n\t\t\tstart.value,\n\t\t\tprops.ellipsis,\n\t\t\t...createRange(rangeLength, rangeStart),\n\t\t];\n\t} else {\n\t\tconst rangeLength = Math.max(1, maxSize.value - 3);\n\t\tconst rangeStart =\n\t\t\trangeLength === 1\n\t\t\t\t? props.modelValue\n\t\t\t\t: props.modelValue - Math.ceil(rangeLength / 2) + start.value;\n\t\treturn [\n\t\t\tstart.value,\n\t\t\tprops.ellipsis,\n\t\t\t...createRange(rangeLength, rangeStart),\n\t\t\tprops.ellipsis,\n\t\t\ttotalPages.value,\n\t\t];\n\t}\n});\n\ntype Item =\n\t| {\n\t\t\tactive: boolean;\n\t\t\tkey: string;\n\t\t\tpage: string;\n\t\t\tellipsis: true;\n\t\t\tdisabled: boolean;\n\t }\n\t| {\n\t\t\tactive: boolean;\n\t\t\tkey: number;\n\t\t\tpage: number;\n\t\t\tellipsis: false;\n\t\t\tdisabled: boolean;\n\t };\n\nconst items = computed<Item[]>(() => {\n\treturn range.value.map((item, index) => {\n\t\tif (typeof item === 'string') {\n\t\t\treturn {\n\t\t\t\tactive: false,\n\t\t\t\tkey: `ellipsis-${index}`,\n\t\t\t\tpage: item,\n\t\t\t\tellipsis: true,\n\t\t\t\tdisabled: true,\n\t\t\t};\n\t\t} else {\n\t\t\tconst active = item === props.modelValue;\n\t\t\treturn {\n\t\t\t\tactive,\n\t\t\t\tkey: item,\n\t\t\t\tpage: item,\n\t\t\t\tellipsis: false,\n\t\t\t\tdisabled: !!props.disabled || +props.totalPages < 2 || props.loading,\n\t\t\t};\n\t\t}\n\t});\n});\n\nconst createRange = (length: number, start = 0): number[] => {\n\treturn Array.from({ length }, (_, k) => start + k);\n};\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbPagination';\n</style>\n"],"names":["props","__props","emit","__emit","totalPages","computed","start","ref","maxSize","outercontainer","innercontainer","buttonFootprint","adjustMaxElements","nextTick","observer","debounce","onMounted","button","numberAsString","gap","onBeforeUnmount","range","createRange","even","middle","left","right","rangeLength","rangeStart","items","item","index","length","_","k"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAgGA,UAAMA,IAAQC,GAYRC,IAAOC,GASPC,IAAaC,EAAS,MAAM,CAACL,EAAM,UAAU,GAC7CM,IAAQC,EAAI,CAAC,GACbC,IAAUD,EAAI,CAACP,EAAM,OAAO,GAE5BS,IAAiBF,KACjBG,IAAiBH,KAEjBI,IAAkBJ,EAAY,KAAQ,GAQtCK,IAAoB,MAAM;AAC3B,MAAAH,EAAe,SAASC,EAAe,UAEtCD,EAAe,MAAM,c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KAAK,EAAE,QAAA0B,KAAU,CAACC,GAAGC,MAAM5B,IAAQ4B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index83.js","sources":["../src/components/BbPagination/BbPagination.vue"],"sourcesContent":["<template>\n\t<div\n\t\tref=\"outercontainer\"\n\t\tclass=\"bb-pagination\"\n\t\t:class=\"{\n\t\t\t[`bb-pagination--${align}`]: true,\n\t\t}\"\n\t>\n\t\t<nav aria-label=\"Navigazione\">\n\t\t\t<ul ref=\"innercontainer\" class=\"bb-pagination__pages\">\n\t\t\t\t<li>\n\t\t\t\t\t<BaseButton\n\t\t\t\t\t\tclass=\"bb-pagination__page bb-pagination__page--previous\"\n\t\t\t\t\t\t:disabled=\"props.modelValue <= 1 || loading || disabled\"\n\t\t\t\t\t\t@click=\"emit('update:modelValue', props.modelValue - 1)\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot name=\"previous\">\n\t\t\t\t\t\t\t<span class=\"bb-pagination__page-label\">Precedente</span>\n\t\t\t\t\t\t\t<BbIcon class=\"bb-pagination__page-chevron\" type=\"chevron_down\" />\n\t\t\t\t\t\t</slot>\n\t\t\t\t\t</BaseButton>\n\t\t\t\t</li>\n\t\t\t\t<li v-for=\"item in items\" :key=\"item.key\">\n\t\t\t\t\t<BaseButton\n\t\t\t\t\t\tclass=\"bb-pagination__page\"\n\t\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t\t'bb-pagination__page--active': item.active,\n\t\t\t\t\t\t\t'bb-pagination__page--ellipsis': item.ellipsis,\n\t\t\t\t\t\t}\"\n\t\t\t\t\t\t:disabled=\"item.disabled\"\n\t\t\t\t\t\t@click=\"emit('update:modelValue', item.key)\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<template v-if=\"item.ellipsis === true\">\n\t\t\t\t\t\t\t<slot name=\"ellipsis\">\n\t\t\t\t\t\t\t\t<span class=\"bb-pagination__page-label\">{{\n\t\t\t\t\t\t\t\t\tprops.ellipsis\n\t\t\t\t\t\t\t\t}}</span>\n\t\t\t\t\t\t\t</slot>\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\t<template v-else>\n\t\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t\t:active=\"item.active\"\n\t\t\t\t\t\t\t\t:disabled=\"item.disabled\"\n\t\t\t\t\t\t\t\t:item=\"item.key\"\n\t\t\t\t\t\t\t\tname=\"item\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<span class=\"bb-pagination__page-label\">{{ item.key }}</span>\n\t\t\t\t\t\t\t</slot>\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</BaseButton>\n\t\t\t\t</li>\n\t\t\t\t<li>\n\t\t\t\t\t<BaseButton\n\t\t\t\t\t\tclass=\"bb-pagination__page bb-pagination__page--next\"\n\t\t\t\t\t\t:disabled=\"props.modelValue >= +totalPages || loading || disabled\"\n\t\t\t\t\t\t@click=\"emit('update:modelValue', props.modelValue + 1)\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot name=\"next\">\n\t\t\t\t\t\t\t<span class=\"bb-pagination__page-label\">Successivo</span>\n\t\t\t\t\t\t\t<BbIcon class=\"bb-pagination__page-chevron\" type=\"chevron_down\" />\n\t\t\t\t\t\t</slot>\n\t\t\t\t\t</BaseButton>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</nav>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, nextTick, onBeforeUnmount, onMounted, ref } from 'vue';\nimport { debounce } from '@/utilities/functions/debounce';\nimport type { CommonProps } from '@/types/CommonProps';\nimport { BaseButton, BbIcon } from '@/index';\n\nexport type BbPaginationProps = Pick<CommonProps, 'disabled' | 'loading'> & {\n\talign?: 'left' | 'right' | 'center';\n\t/**\n\t * String of text displayed in place of hidden pages\n\t */\n\tellipsis?: string;\n\t/**\n\t * Maximum number of clickable pages displayed at all times.\n\t * This has a tolerance of +/- 1 for odd / even numbering.\n\t * It does not include ellipses.\n\t */\n\tmaxSize?: number | string;\n\t/**\n\t * Used by v-model. Indicates the current page.\n\t */\n\tmodelValue: number;\n\t/**\n\t * Total number of pages there is.\n\t */\n\ttotalPages?: number | string;\n};\n\nconst props = withDefaults(defineProps<BbPaginationProps>(), {\n\talign: 'right',\n\tmodelValue: 1,\n\ttotalPages: 1,\n\tellipsis: '...',\n\tmaxSize: 6,\n});\n\nexport type BbPaginationEvents = {\n\t(e: 'update:modelValue', value: number): void;\n};\n\nconst emit = defineEmits(['update:modelValue']);\n\ndefineSlots<{\n\tprevious?: (props: object) => any;\n\tnext?: (props: object) => any;\n\titem?: (props: { active: boolean; disabled: boolean; item: number }) => any;\n\tellipsis?: (props: object) => any;\n}>();\n\nconst totalPages = computed(() => +props.totalPages);\nconst start = ref(1);\nconst maxSize = ref(+props.maxSize);\n\nconst outercontainer = ref<HTMLElement>();\nconst innercontainer = ref<HTMLElement>();\n\nconst buttonFootprint = ref<number>(Infinity);\n\n/**\n * Adjusts how many buttons to show.\n * if current buttons can't fit subtract maxSize until they do or until minimum is reached\n * if more buttons could fit add buttons until the don't\n * If minimum or maximum is reached just quit until next resize\n */\nconst adjustMaxElements = () => {\n\tif (outercontainer.value && innercontainer.value) {\n\t\t/* If some buttons do not fit */\n\t\tif (outercontainer.value.clientWidth < innercontainer.value.clientWidth) {\n\t\t\tif (maxSize.value - 1 > 3) {\n\t\t\t\tmaxSize.value--;\n\t\t\t\tnextTick(adjustMaxElements);\n\t\t\t} else {\n\t\t\t\tmaxSize.value = 3;\n\t\t\t}\n\t\t\t/* If all current buttons do fit */\n\t\t} else {\n\t\t\t/* If some buttons have been hidden */\n\t\t\tif (maxSize.value < +props.maxSize) {\n\t\t\t\tif (\n\t\t\t\t\t/* If there is enough space to fit one */\n\t\t\t\t\toutercontainer.value.clientWidth - innercontainer.value.clientWidth >\n\t\t\t\t\tbuttonFootprint.value\n\t\t\t\t) {\n\t\t\t\t\tmaxSize.value = Math.min(maxSize.value + 1, +props.maxSize);\n\t\t\t\t\tnextTick(adjustMaxElements);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n};\nif (globalThis.ResizeObserver) {\n\tconst observer = new ResizeObserver(debounce(adjustMaxElements, 200));\n\tonMounted(() => {\n\t\tif (outercontainer.value && innercontainer.value) {\n\t\t\tconst button = outercontainer.value.querySelectorAll(\n\t\t\t\t'.bb-pagination__page'\n\t\t\t)[1];\n\t\t\tif (button) {\n\t\t\t\t/* Compute the footprint necessary to render a new button */\n\t\t\t\tconst gapString = getComputedStyle(innercontainer.value).columnGap;\n\t\t\t\tconst numberAsString = gapString.replaceAll(/\\D/g, '');\n\t\t\t\tconst gap = Number(numberAsString);\n\t\t\t\tbuttonFootprint.value = button.clientWidth + gap;\n\t\t\t}\n\t\t\tobserver.observe(outercontainer.value);\n\t\t}\n\t});\n\tonBeforeUnmount(() => {\n\t\tobserver.disconnect();\n\t});\n}\n\nconst range = computed(() => {\n\tif (\n\t\ttotalPages.value <= 0 ||\n\t\tisNaN(totalPages.value) ||\n\t\ttotalPages.value > Number.MAX_SAFE_INTEGER\n\t)\n\t\treturn [];\n\n\tif (maxSize.value <= 1) return [props.modelValue];\n\n\tif (totalPages.value <= maxSize.value) {\n\t\treturn createRange(totalPages.value, start.value);\n\t}\n\n\tconst even = maxSize.value % 2 === 0;\n\tconst middle = even ? maxSize.value / 2 : Math.floor(maxSize.value / 2);\n\tconst left = even ? middle : middle + 1;\n\tconst right = totalPages.value - middle;\n\n\tif (left - props.modelValue >= 0) {\n\t\treturn [\n\t\t\t...createRange(Math.max(1, maxSize.value - 1), start.value),\n\t\t\tprops.ellipsis,\n\t\t\ttotalPages.value,\n\t\t];\n\t} else if (props.modelValue - right >= (even ? 1 : 0)) {\n\t\tconst rangeLength = maxSize.value - 1;\n\t\tconst rangeStart = totalPages.value - rangeLength + start.value;\n\t\treturn [\n\t\t\tstart.value,\n\t\t\tprops.ellipsis,\n\t\t\t...createRange(rangeLength, rangeStart),\n\t\t];\n\t} else {\n\t\tconst rangeLength = Math.max(1, maxSize.value - 3);\n\t\tconst rangeStart =\n\t\t\trangeLength === 1\n\t\t\t\t? props.modelValue\n\t\t\t\t: props.modelValue - Math.ceil(rangeLength / 2) + start.value;\n\t\treturn [\n\t\t\tstart.value,\n\t\t\tprops.ellipsis,\n\t\t\t...createRange(rangeLength, rangeStart),\n\t\t\tprops.ellipsis,\n\t\t\ttotalPages.value,\n\t\t];\n\t}\n});\n\ntype Item =\n\t| {\n\t\t\tactive: boolean;\n\t\t\tkey: string;\n\t\t\tpage: string;\n\t\t\tellipsis: true;\n\t\t\tdisabled: boolean;\n\t }\n\t| {\n\t\t\tactive: boolean;\n\t\t\tkey: number;\n\t\t\tpage: number;\n\t\t\tellipsis: false;\n\t\t\tdisabled: boolean;\n\t };\n\nconst items = computed<Item[]>(() => {\n\treturn range.value.map((item, index) => {\n\t\tif (typeof item === 'string') {\n\t\t\treturn {\n\t\t\t\tactive: false,\n\t\t\t\tkey: `ellipsis-${index}`,\n\t\t\t\tpage: item,\n\t\t\t\tellipsis: true,\n\t\t\t\tdisabled: true,\n\t\t\t};\n\t\t} else {\n\t\t\tconst active = item === props.modelValue;\n\t\t\treturn {\n\t\t\t\tactive,\n\t\t\t\tkey: item,\n\t\t\t\tpage: item,\n\t\t\t\tellipsis: false,\n\t\t\t\tdisabled: !!props.disabled || +props.totalPages < 2 || props.loading,\n\t\t\t};\n\t\t}\n\t});\n});\n\nconst createRange = (length: number, start = 0): number[] => {\n\treturn Array.from({ length }, (_, k) => start + k);\n};\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbPagination';\n</style>\n"],"names":["props","__props","emit","__emit","totalPages","computed","start","ref","maxSize","outercontainer","innercontainer","buttonFootprint","adjustMaxElements","nextTick","observer","debounce","onMounted","button","numberAsString","gap","onBeforeUnmount","range","createRange","even","middle","left","right","rangeLength","rangeStart","items","item","index","length","_","k"],"mappings":";;;;;;;;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tB,MAAMD;AAAA,MACN,UAAU;AAAA,MACV,UAAU;AAAA,IAAA,IAIJ;AAAA,MACN,QAFcA,MAAS9B,EAAM;AAAA,MAG7B,KAAK8B;AAAA,MACL,MAAMA;AAAA,MACN,UAAU;AAAA,MACV,UAAU,CAAC,CAAC9B,EAAM,YAAY,CAACA,EAAM,aAAa,KAAKA,EAAM;AAAA,IAAA,CAG/D,CACD,GAEKsB,IAAc,CAACU,GAAgB1B,IAAQ,MACrC,MAAM,KAAK,EAAE,QAAA0B,KAAU,CAACC,GAAGC,MAAM5B,IAAQ4B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as W, ref as a, computed as _, openBlock as d, createElementBlock as g, mergeProps as D, createElementVNode as b, renderSlot as S, normalizeProps as I, guardReactiveProps as R, unref as y, createBlock as E, Teleport as U, normalizeClass as j, normalizeStyle as G, createCommentVNode as k, withCtx as J, nextTick as K, watch as Q } from "vue";
2
- import { useFloating as X, arrow as Y } from "./index204.js";
3
- import { useFocusTrap as Z } from "./index212.js";
4
- import { useId as ee } from "./index8.js";
5
- import { wait as M } from "./index127.js";
6
- import te from "./index13.js";
2
+ import { useFloating as X, arrow as Y } from "./index200.js";
3
+ import { useFocusTrap as Z } from "./index208.js";
4
+ import { useId as ee } from "./index9.js";
5
+ import { wait as M } from "./index128.js";
6
+ import te from "./index14.js";
7
7
  /* empty css */
8
- import { autoUpdate as oe, flip as ae, offset as re, shift as ne, hide as le } from "./index219.js";
8
+ import { autoUpdate as oe, flip as ae, offset as re, shift as ne, hide as le } from "./index215.js";
9
9
  const se = ["id"], ie = {
10
10
  key: 1,
11
11
  class: "bb-popover__bubble"
@@ -220,4 +220,4 @@ const se = ["id"], ie = {
220
220
  export {
221
221
  _e as default
222
222
  };
223
- //# sourceMappingURL=index84.js.map
223
+ //# sourceMappingURL=index85.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index84.js","sources":["../src/components/BbPopover/BbPopover.vue"],"sourcesContent":["<template>\n\t<span class=\"bb-popover\" v-bind=\"attributes\">\n\t\t<span ref=\"wrapper\" class=\"bb-popover__wrapper\">\n\t\t\t<slot\n\t\t\t\tname=\"activator\"\n\t\t\t\tv-bind=\"{\n\t\t\t\t\tprops: {\n\t\t\t\t\t\t'aria-controls': `popover_${id}`,\n\t\t\t\t\t\t'aria-expanded': open,\n\t\t\t\t\t\tonClick: onTriggerClick,\n\t\t\t\t\t\tid,\n\t\t\t\t\t\tdisabled: !!disabled,\n\t\t\t\t\t},\n\t\t\t\t\tclosed: closed,\n\t\t\t\t\tclosing: closing,\n\t\t\t\t\tdisabled: !!disabled,\n\t\t\t\t\topen: open,\n\t\t\t\t\topening: opening,\n\t\t\t\t\tplacement: placement,\n\t\t\t\t}\"\n\t\t\t></slot>\n\t\t</span>\n\t\t<teleport to=\"body\">\n\t\t\t<span\n\t\t\t\t:id=\"`popover_${id}`\"\n\t\t\t\tref=\"content\"\n\t\t\t\tclass=\"bb-popover__bubble-container\"\n\t\t\t\t:class=\"{\n\t\t\t\t\t[`bb-popover__bubble-container--${placement}`]: true,\n\t\t\t\t\t[`bb-popover__bubble-container--${theme}`]: theme,\n\t\t\t\t\t'bb-popover__bubble-container--hidden': closed,\n\t\t\t\t\t'bb-popover__bubble-container--closing': closing,\n\t\t\t\t\t'bb-popover__bubble-container--opening': opening,\n\t\t\t\t\t'bb-popover__bubble-container--open': open,\n\t\t\t\t}\"\n\t\t\t\t:style=\"containerStyle\"\n\t\t\t>\n\t\t\t\t<span\n\t\t\t\t\tv-if=\"hasOpenedOnce || eager\"\n\t\t\t\t\tref=\"bubblearrow\"\n\t\t\t\t\tclass=\"bb-popover__arrow\"\n\t\t\t\t\tv-bind=\"arrowAttributes\"\n\t\t\t\t></span>\n\t\t\t\t<span v-if=\"hasOpenedOnce || eager\" class=\"bb-popover__bubble\">\n\t\t\t\t\t<BaseButton\n\t\t\t\t\t\tv-if=\"showClose\"\n\t\t\t\t\t\tclass=\"bb-popover__close\"\n\t\t\t\t\t\t@click=\"onClickClose\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class=\"bb-popover__close-label\">Chiudi</span>\n\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\td=\"M23 23L1 1M23 1L1 23\"\n\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t</BaseButton>\n\t\t\t\t\t<slot\n\t\t\t\t\t\t:close=\"onClickClose\"\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=\"!!disabled\"\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></slot>\n\t\t\t\t</span>\n\t\t\t</span>\n\t\t</teleport>\n\t</span>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, nextTick, ref, watch } from 'vue';\nimport {\n\tuseFloating,\n\tautoUpdate,\n\tflip,\n\tshift,\n\toffset,\n\tarrow,\n\thide,\n} from '@floating-ui/vue';\nimport { useFocusTrap } from '@vueuse/integrations/useFocusTrap';\nimport { useId } from '@/composables/useId';\nimport { wait } from '@/utilities/functions/wait';\nimport BaseButton from '../BaseButton/BaseButton.vue';\nimport type { CommonProps } from '@/types/CommonProps';\nimport type { Placement } from '@floating-ui/vue';\n\nexport type BbPopoverProps = Pick<\n\tCommonProps,\n\t| 'arrowPadding'\n\t| 'block'\n\t| 'disabled'\n\t| 'eager'\n\t| 'offset'\n\t| 'padding'\n\t| 'placement'\n\t| 'showClose'\n\t| 'theme'\n\t| 'transitionDuration'\n> & {\n\t/**\n\t * Elements that obtains focus immediately after opening the popover.\n\t * By default it's the first tabbable item.\n\t */\n\tfocusTarget?: string;\n\t/**\n\t * Width of the dropdown in pixels.\n\t */\n\twidth?: number | string;\n};\n\nconst props = withDefaults(defineProps<BbPopoverProps>(), {\n\tarrowPadding: 10,\n\toffset: 3,\n\tpadding: 10,\n\tplacement: 'bottom',\n\tshowClose: true,\n\ttheme: 'default',\n\ttransitionDuration: 150,\n});\n\nexport type BbPopoverEvents = {\n\t(e: 'shown'): void;\n\t(e: 'hidden'): void;\n};\n\nconst emit = defineEmits<BbPopoverEvents>();\n\ndefineSlots<{\n\tactivator?: (props: {\n\t\tprops: {\n\t\t\t'aria-controls': string;\n\t\t\t'aria-expanded': boolean;\n\t\t\tonClick: typeof onTriggerClick;\n\t\t\tid: string;\n\t\t\tdisabled: boolean;\n\t\t};\n\t\tclosed: boolean;\n\t\tclosing: boolean;\n\t\tdisabled: boolean;\n\t\topen: boolean;\n\t\topening: boolean;\n\t\tplacement: Placement;\n\t}) => any;\n\tdefault?: (props: {\n\t\tclose: typeof onClickClose;\n\t\tclosed: boolean;\n\t\tclosing: boolean;\n\t\tdisabled: boolean;\n\t\topen: boolean;\n\t\topening: boolean;\n\t\tplacement: Placement;\n\t}) => any;\n}>();\n\nconst { id: _id } = useId();\nconst id = `bbp_${_id.value}`;\n\nconst wrapper = ref<HTMLElement>();\nconst content = ref<HTMLElement>();\nconst bubblearrow = ref<HTMLElement>();\n\nconst { activate, deactivate } = useFocusTrap(content, {\n\t/**\n\t * This traps all clicks outside so we are pressing\n\t * the trigger we just allow and process that in its\n\t * own click handler.\n\t * If we are pressing anything random on the page\n\t * close the popover and be done\n\t */\n\tclickOutsideDeactivates: (event) => {\n\t\tconst target = event.target;\n\t\tif (target instanceof HTMLElement) {\n\t\t\tif (wrapper.value?.contains(target)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tclosePopover();\n\t\temit('hidden');\n\t\treturn true;\n\t},\n\tescapeDeactivates: () => {\n\t\tnextTick(async () => {\n\t\t\tawait closePopover();\n\t\t\tfocusTrigger();\n\t\t\temit('hidden');\n\t\t});\n\t\treturn true;\n\t},\n\t/* We don't return focus so that when\n\t * we press a button on tyhe page we can focus\n\t * THAT button and not the current trigger\n\t */\n\treturnFocusOnDeactivate: false,\n});\n\nconst { floatingStyles, placement, middlewareData } = useFloating(\n\twrapper,\n\tcontent,\n\t{\n\t\tplacement: props.placement,\n\t\twhileElementsMounted: autoUpdate,\n\t\tmiddleware: [\n\t\t\tflip(),\n\t\t\toffset(props.offset),\n\t\t\tshift({ padding: props.padding }),\n\t\t\tarrow({\n\t\t\t\telement: bubblearrow,\n\t\t\t\tpadding: props.arrowPadding,\n\t\t\t}),\n\t\t\thide(),\n\t\t],\n\t}\n);\n\nlet stopWatcher = () => {};\n\nconst attributes = computed(() => {\n\tconst classes = {\n\t\t'bb-popover--block': props.block,\n\t\t[`bb-popover--${props.theme}`]: true,\n\t};\n\treturn {\n\t\tclass: classes,\n\t};\n});\n\nconst opening = ref(false);\nconst open = ref(false);\nconst closing = ref(false);\nconst closed = ref(true);\n\nconst arrowAttributes = computed(() => {\n\tif (middlewareData.value.arrow) {\n\t\tconst { x, y } = middlewareData.value.arrow;\n\t\treturn {\n\t\t\tstyle: {\n\t\t\t\tleft: `${x}px`,\n\t\t\t\ttop: `${y}px`,\n\t\t\t},\n\t\t};\n\t}\n\treturn undefined;\n});\n\nconst containerStyle = computed(() => {\n\tconst base: Record<string, any> = {\n\t\t...floatingStyles.value,\n\t\ttransitionDuration: `${props.transitionDuration}ms`,\n\t};\n\tif (props.width) {\n\t\tlet width: string;\n\t\t// If the width is a css unit string use it, if it is a number or number string add px\n\t\tif (typeof props.width === 'string' && Number.isNaN(Number(props.width))) {\n\t\t\tif (props.width.includes('%')) {\n\t\t\t\tif (!wrapper.value) return;\n\t\t\t\twidth = `${\n\t\t\t\t\twrapper.value.clientWidth * (+props.width.replace('%', '') / 100)\n\t\t\t\t}px`;\n\t\t\t} else {\n\t\t\t\twidth = props.width;\n\t\t\t}\n\t\t} else {\n\t\t\twidth = `${props.width}px`;\n\t\t}\n\t\tbase.width = width;\n\t}\n\treturn base;\n});\n\nconst openPopover = async () => {\n\tclosed.value = false;\n\tclosing.value = false;\n\topening.value = true;\n\tawait wait(50);\n\topen.value = true;\n\topening.value = false;\n\tstopWatcher = watch(\n\t\t() => middlewareData.value.hide?.referenceHidden,\n\t\tasync (value) => {\n\t\t\tif (!closing.value && !closed.value && value) {\n\t\t\t\tawait closePopover();\n\t\t\t\tdeactivate();\n\t\t\t\tfocusTrigger();\n\t\t\t}\n\t\t}\n\t);\n};\n\nconst closePopover = async () => {\n\topen.value = false;\n\topening.value = false;\n\tclosing.value = true;\n\tawait wait(props.transitionDuration);\n\tclosing.value = false;\n\tclosed.value = true;\n\tstopWatcher();\n};\nconst hasOpenedOnce = ref(false);\nconst onTriggerClick = async () => {\n\tif (open.value) {\n\t\tawait closePopover();\n\t\tfocusTrigger();\n\t\temit('hidden');\n\t\treturn;\n\t}\n\tif (opening.value || props.disabled) return;\n\thasOpenedOnce.value = true;\n\tawait openPopover();\n\tlet focusTarget = props.focusTarget ?? '.bb-popover__close';\n\n\tactivate({\n\t\tonPostActivate: () => {\n\t\t\tif (content.value) {\n\t\t\t\tconst target = content.value.querySelector(focusTarget);\n\t\t\t\tif (target instanceof HTMLElement) {\n\t\t\t\t\ttarget.focus();\n\t\t\t\t\temit('shown');\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t});\n};\n\nconst focusTrigger = () => {\n\tconst trigger = wrapper.value?.querySelector(`[aria-controls=popover_${id}]`);\n\tif (trigger instanceof HTMLElement) {\n\t\ttrigger.focus({ preventScroll: true });\n\t}\n};\n\nconst onClickClose = async () => {\n\tdeactivate();\n\tawait closePopover();\n\tfocusTrigger();\n\temit('hidden');\n};\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbPopover';\n</style>\n"],"names":["props","__props","emit","__emit","_id","useId","id","wrapper","ref","content","bubblearrow","activate","deactivate","useFocusTrap","event","target","_a","closePopover","nextTick","focusTrigger","floatingStyles","placement","middlewareData","useFloating","autoUpdate","flip","offset","shift","arrow","hide","stopWatcher","attributes","computed","opening","open","closing","closed","arrowAttributes","x","y","containerStyle","base","width","openPopover","wait","watch","value","hasOpenedOnce","onTriggerClick","focusTarget","trigger","onClickClose"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwHA,UAAMA,IAAQC,GAeRC,IAAOC,GA6BP,EAAE,IAAIC,EAAI,IAAIC,GAAM,GACpBC,IAAK,OAAOF,EAAI,KAAK,IAErBG,IAAUC,KACVC,IAAUD,KACVE,IAAcF,KAEd,EAAE,UAAAG,GAAU,YAAAC,MAAeC,EAAaJ,GAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAQtD,yBAAyB,CAACK,MAAU;;AACnC,cAAMC,IAASD,EAAM;AACrB,eAAIC,aAAkB,gBACjBC,IAAAT,EAAQ,UAAR,QAAAS,EAAe,SAASD,OAIhBE,KACbf,EAAK,QAAQ,IACN;AAAA,MACR;AAAA,MACA,mBAAmB,OAClBgB,EAAS,YAAY;AACpB,cAAMD,EAAa,GACNE,KACbjB,EAAK,QAAQ;AAAA,MAAA,CACb,GACM;AAAA;AAAA;AAAA;AAAA;AAAA,MAMR,yBAAyB;AAAA,IAAA,CACzB,GAEK,EAAE,gBAAAkB,GAAgB,WAAAC,GAAW,gBAAAC,EAAmB,IAAAC;AAAA,MACrDhB;AAAA,MACAE;AAAA,MACA;AAAA,QACC,WAAWT,EAAM;AAAA,QACjB,sBAAsBwB;AAAA,QACtB,YAAY;AAAA,UACXC,GAAK;AAAA,UACLC,GAAO1B,EAAM,MAAM;AAAA,UACnB2B,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BV,CAAE;AACzE,MAAI4C,aAAmB,eACtBA,EAAQ,MAAM,EAAE,eAAe,GAAM,CAAA;AAAA,IACtC,GAGKC,IAAe,YAAY;AACrB,MAAAvC,KACX,MAAMK,EAAa,GACNE,KACbjB,EAAK,QAAQ;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index85.js","sources":["../src/components/BbPopover/BbPopover.vue"],"sourcesContent":["<template>\n\t<span class=\"bb-popover\" v-bind=\"attributes\">\n\t\t<span ref=\"wrapper\" class=\"bb-popover__wrapper\">\n\t\t\t<slot\n\t\t\t\tname=\"activator\"\n\t\t\t\tv-bind=\"{\n\t\t\t\t\tprops: {\n\t\t\t\t\t\t'aria-controls': `popover_${id}`,\n\t\t\t\t\t\t'aria-expanded': open,\n\t\t\t\t\t\tonClick: onTriggerClick,\n\t\t\t\t\t\tid,\n\t\t\t\t\t\tdisabled: !!disabled,\n\t\t\t\t\t},\n\t\t\t\t\tclosed: closed,\n\t\t\t\t\tclosing: closing,\n\t\t\t\t\tdisabled: !!disabled,\n\t\t\t\t\topen: open,\n\t\t\t\t\topening: opening,\n\t\t\t\t\tplacement: placement,\n\t\t\t\t}\"\n\t\t\t></slot>\n\t\t</span>\n\t\t<teleport to=\"body\">\n\t\t\t<span\n\t\t\t\t:id=\"`popover_${id}`\"\n\t\t\t\tref=\"content\"\n\t\t\t\tclass=\"bb-popover__bubble-container\"\n\t\t\t\t:class=\"{\n\t\t\t\t\t[`bb-popover__bubble-container--${placement}`]: true,\n\t\t\t\t\t[`bb-popover__bubble-container--${theme}`]: theme,\n\t\t\t\t\t'bb-popover__bubble-container--hidden': closed,\n\t\t\t\t\t'bb-popover__bubble-container--closing': closing,\n\t\t\t\t\t'bb-popover__bubble-container--opening': opening,\n\t\t\t\t\t'bb-popover__bubble-container--open': open,\n\t\t\t\t}\"\n\t\t\t\t:style=\"containerStyle\"\n\t\t\t>\n\t\t\t\t<span\n\t\t\t\t\tv-if=\"hasOpenedOnce || eager\"\n\t\t\t\t\tref=\"bubblearrow\"\n\t\t\t\t\tclass=\"bb-popover__arrow\"\n\t\t\t\t\tv-bind=\"arrowAttributes\"\n\t\t\t\t></span>\n\t\t\t\t<span v-if=\"hasOpenedOnce || eager\" class=\"bb-popover__bubble\">\n\t\t\t\t\t<BaseButton\n\t\t\t\t\t\tv-if=\"showClose\"\n\t\t\t\t\t\tclass=\"bb-popover__close\"\n\t\t\t\t\t\t@click=\"onClickClose\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<span class=\"bb-popover__close-label\">Chiudi</span>\n\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\td=\"M23 23L1 1M23 1L1 23\"\n\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t</BaseButton>\n\t\t\t\t\t<slot\n\t\t\t\t\t\t:close=\"onClickClose\"\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=\"!!disabled\"\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></slot>\n\t\t\t\t</span>\n\t\t\t</span>\n\t\t</teleport>\n\t</span>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, nextTick, ref, watch } from 'vue';\nimport {\n\tuseFloating,\n\tautoUpdate,\n\tflip,\n\tshift,\n\toffset,\n\tarrow,\n\thide,\n} from '@floating-ui/vue';\nimport { useFocusTrap } from '@vueuse/integrations/useFocusTrap';\nimport { useId } from '@/composables/useId';\nimport { wait } from '@/utilities/functions/wait';\nimport BaseButton from '../BaseButton/BaseButton.vue';\nimport type { CommonProps } from '@/types/CommonProps';\nimport type { Placement } from '@floating-ui/vue';\n\nexport type BbPopoverProps = Pick<\n\tCommonProps,\n\t| 'arrowPadding'\n\t| 'block'\n\t| 'disabled'\n\t| 'eager'\n\t| 'offset'\n\t| 'padding'\n\t| 'placement'\n\t| 'showClose'\n\t| 'theme'\n\t| 'transitionDuration'\n> & {\n\t/**\n\t * Elements that obtains focus immediately after opening the popover.\n\t * By default it's the first tabbable item.\n\t */\n\tfocusTarget?: string;\n\t/**\n\t * Width of the dropdown in pixels.\n\t */\n\twidth?: number | string;\n};\n\nconst props = withDefaults(defineProps<BbPopoverProps>(), {\n\tarrowPadding: 10,\n\toffset: 3,\n\tpadding: 10,\n\tplacement: 'bottom',\n\tshowClose: true,\n\ttheme: 'default',\n\ttransitionDuration: 150,\n});\n\nexport type BbPopoverEvents = {\n\t(e: 'shown'): void;\n\t(e: 'hidden'): void;\n};\n\nconst emit = defineEmits<BbPopoverEvents>();\n\ndefineSlots<{\n\tactivator?: (props: {\n\t\tprops: {\n\t\t\t'aria-controls': string;\n\t\t\t'aria-expanded': boolean;\n\t\t\tonClick: typeof onTriggerClick;\n\t\t\tid: string;\n\t\t\tdisabled: boolean;\n\t\t};\n\t\tclosed: boolean;\n\t\tclosing: boolean;\n\t\tdisabled: boolean;\n\t\topen: boolean;\n\t\topening: boolean;\n\t\tplacement: Placement;\n\t}) => any;\n\tdefault?: (props: {\n\t\tclose: typeof onClickClose;\n\t\tclosed: boolean;\n\t\tclosing: boolean;\n\t\tdisabled: boolean;\n\t\topen: boolean;\n\t\topening: boolean;\n\t\tplacement: Placement;\n\t}) => any;\n}>();\n\nconst { id: _id } = useId();\nconst id = `bbp_${_id.value}`;\n\nconst wrapper = ref<HTMLElement>();\nconst content = ref<HTMLElement>();\nconst bubblearrow = ref<HTMLElement>();\n\nconst { activate, deactivate } = useFocusTrap(content, {\n\t/**\n\t * This traps all clicks outside so we are pressing\n\t * the trigger we just allow and process that in its\n\t * own click handler.\n\t * If we are pressing anything random on the page\n\t * close the popover and be done\n\t */\n\tclickOutsideDeactivates: (event) => {\n\t\tconst target = event.target;\n\t\tif (target instanceof HTMLElement) {\n\t\t\tif (wrapper.value?.contains(target)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\tclosePopover();\n\t\temit('hidden');\n\t\treturn true;\n\t},\n\tescapeDeactivates: () => {\n\t\tnextTick(async () => {\n\t\t\tawait closePopover();\n\t\t\tfocusTrigger();\n\t\t\temit('hidden');\n\t\t});\n\t\treturn true;\n\t},\n\t/* We don't return focus so that when\n\t * we press a button on tyhe page we can focus\n\t * THAT button and not the current trigger\n\t */\n\treturnFocusOnDeactivate: false,\n});\n\nconst { floatingStyles, placement, middlewareData } = useFloating(\n\twrapper,\n\tcontent,\n\t{\n\t\tplacement: props.placement,\n\t\twhileElementsMounted: autoUpdate,\n\t\tmiddleware: [\n\t\t\tflip(),\n\t\t\toffset(props.offset),\n\t\t\tshift({ padding: props.padding }),\n\t\t\tarrow({\n\t\t\t\telement: bubblearrow,\n\t\t\t\tpadding: props.arrowPadding,\n\t\t\t}),\n\t\t\thide(),\n\t\t],\n\t}\n);\n\nlet stopWatcher = () => {};\n\nconst attributes = computed(() => {\n\tconst classes = {\n\t\t'bb-popover--block': props.block,\n\t\t[`bb-popover--${props.theme}`]: true,\n\t};\n\treturn {\n\t\tclass: classes,\n\t};\n});\n\nconst opening = ref(false);\nconst open = ref(false);\nconst closing = ref(false);\nconst closed = ref(true);\n\nconst arrowAttributes = computed(() => {\n\tif (middlewareData.value.arrow) {\n\t\tconst { x, y } = middlewareData.value.arrow;\n\t\treturn {\n\t\t\tstyle: {\n\t\t\t\tleft: `${x}px`,\n\t\t\t\ttop: `${y}px`,\n\t\t\t},\n\t\t};\n\t}\n\treturn undefined;\n});\n\nconst containerStyle = computed(() => {\n\tconst base: Record<string, any> = {\n\t\t...floatingStyles.value,\n\t\ttransitionDuration: `${props.transitionDuration}ms`,\n\t};\n\tif (props.width) {\n\t\tlet width: string;\n\t\t// If the width is a css unit string use it, if it is a number or number string add px\n\t\tif (typeof props.width === 'string' && Number.isNaN(Number(props.width))) {\n\t\t\tif (props.width.includes('%')) {\n\t\t\t\tif (!wrapper.value) return;\n\t\t\t\twidth = `${\n\t\t\t\t\twrapper.value.clientWidth * (+props.width.replace('%', '') / 100)\n\t\t\t\t}px`;\n\t\t\t} else {\n\t\t\t\twidth = props.width;\n\t\t\t}\n\t\t} else {\n\t\t\twidth = `${props.width}px`;\n\t\t}\n\t\tbase.width = width;\n\t}\n\treturn base;\n});\n\nconst openPopover = async () => {\n\tclosed.value = false;\n\tclosing.value = false;\n\topening.value = true;\n\tawait wait(50);\n\topen.value = true;\n\topening.value = false;\n\tstopWatcher = watch(\n\t\t() => middlewareData.value.hide?.referenceHidden,\n\t\tasync (value) => {\n\t\t\tif (!closing.value && !closed.value && value) {\n\t\t\t\tawait closePopover();\n\t\t\t\tdeactivate();\n\t\t\t\tfocusTrigger();\n\t\t\t}\n\t\t}\n\t);\n};\n\nconst closePopover = async () => {\n\topen.value = false;\n\topening.value = false;\n\tclosing.value = true;\n\tawait wait(props.transitionDuration);\n\tclosing.value = false;\n\tclosed.value = true;\n\tstopWatcher();\n};\nconst hasOpenedOnce = ref(false);\nconst onTriggerClick = async () => {\n\tif (open.value) {\n\t\tawait closePopover();\n\t\tfocusTrigger();\n\t\temit('hidden');\n\t\treturn;\n\t}\n\tif (opening.value || props.disabled) return;\n\thasOpenedOnce.value = true;\n\tawait openPopover();\n\tlet focusTarget = props.focusTarget ?? '.bb-popover__close';\n\n\tactivate({\n\t\tonPostActivate: () => {\n\t\t\tif (content.value) {\n\t\t\t\tconst target = content.value.querySelector(focusTarget);\n\t\t\t\tif (target instanceof HTMLElement) {\n\t\t\t\t\ttarget.focus();\n\t\t\t\t\temit('shown');\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t});\n};\n\nconst focusTrigger = () => {\n\tconst trigger = wrapper.value?.querySelector(`[aria-controls=popover_${id}]`);\n\tif (trigger instanceof HTMLElement) {\n\t\ttrigger.focus({ preventScroll: true });\n\t}\n};\n\nconst onClickClose = async () => {\n\tdeactivate();\n\tawait closePopover();\n\tfocusTrigger();\n\temit('hidden');\n};\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbPopover';\n</style>\n"],"names":["props","__props","emit","__emit","_id","useId","id","wrapper","ref","content","bubblearrow","activate","deactivate","useFocusTrap","event","target","_a","closePopover","nextTick","focusTrigger","floatingStyles","placement","middlewareData","useFloating","autoUpdate","flip","offset","shift","arrow","hide","stopWatcher","attributes","computed","opening","open","closing","closed","arrowAttributes","x","y","containerStyle","base","width","openPopover","wait","watch","value","hasOpenedOnce","onTriggerClick","focusTarget","trigger","onClickClose"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwHA,UAAMA,IAAQC,GAeRC,IAAOC,GA6BP,EAAE,IAAIC,EAAI,IAAIC,GAAM,GACpBC,IAAK,OAAOF,EAAI,KAAK,IAErBG,IAAUC,KACVC,IAAUD,KACVE,IAAcF,KAEd,EAAE,UAAAG,GAAU,YAAAC,MAAeC,EAAaJ,GAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAQtD,yBAAyB,CAACK,MAAU;;AACnC,cAAMC,IAASD,EAAM;AACrB,eAAIC,aAAkB,gBACjBC,IAAAT,EAAQ,UAAR,QAAAS,EAAe,SAASD,OAIhBE,KACbf,EAAK,QAAQ,IACN;AAAA,MACR;AAAA,MACA,mBAAmB,OAClBgB,EAAS,YAAY;AACpB,cAAMD,EAAa,GACNE,KACbjB,EAAK,QAAQ;AAAA,MAAA,CACb,GACM;AAAA;AAAA;AAAA;AAAA;AAAA,MAMR,yBAAyB;AAA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kBAAMM,IAASN,EAAQ,MAAM,cAAcwC,CAAW;AACtD,YAAIlC,aAAkB,gBACrBA,EAAO,MAAM,GACbb,EAAK,OAAO;AAAA,UAEd;AAAA,QACD;AAAA,MAAA,CACA;AAAA,IAAA,GAGIiB,IAAe,MAAM;;AAC1B,YAAM+B,KAAUlC,IAAAT,EAAQ,UAAR,gBAAAS,EAAe,cAAc,0BAA0BV,CAAE;AACzE,MAAI4C,aAAmB,eACtBA,EAAQ,MAAM,EAAE,eAAe,GAAM,CAAA;AAAA,IACtC,GAGKC,IAAe,YAAY;AACrB,MAAAvC,KACX,MAAMK,EAAa,GACNE,KACbjB,EAAK,QAAQ;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as r, computed as a, openBlock as l, createElementBlock as s, normalizeClass as m, createElementVNode as n, normalizeStyle as c } from "vue";
2
2
  import { clamp as p } from "./index199.js";
3
- import { getAsPercentageBetween as i } from "./index126.js";
3
+ import { getAsPercentageBetween as i } from "./index127.js";
4
4
  const _ = /* @__PURE__ */ r({
5
5
  __name: "BbProgress",
6
6
  props: {
@@ -31,4 +31,4 @@ const _ = /* @__PURE__ */ r({
31
31
  export {
32
32
  _ as default
33
33
  };
34
- //# sourceMappingURL=index86.js.map
34
+ //# sourceMappingURL=index87.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index86.js","sources":["../src/components/BbProgress/BbProgress.vue"],"sourcesContent":["<template>\n\t<div\n\t\tclass=\"bb-progress\"\n\t\t:class=\"{\n\t\t\t'bb-progress--horizontal': true,\n\t\t}\"\n\t>\n\t\t<div class=\"bb-progress-bar\" :style=\"{ width: width + '%' }\"></div>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport { clamp } from '@/utilities/functions/clamp';\nimport { getAsPercentageBetween } from '@/utilities/functions/percentage';\nimport { computed } from 'vue';\n\nexport type BbProgressProps = {\n\t/**\n\t * Used by v-model. It'a number contained between `min` and `max` that corresponds to the current value.\n\t */\n\tmodelValue: number | null;\n\t/**\n\t * Minimum value. Lower cap.\n\t */\n\tmin?: number;\n\t/**\n\t * Maximum value. Upper cap.\n\t */\n\tmax?: number;\n};\n\n/**\n * You can get percentage between 250 and 370 and have it compute it automatically\n */\nconst props = withDefaults(defineProps<BbProgressProps>(), {\n\tmodelValue: 0,\n\tmin: 0,\n\tmax: 100,\n});\n\nconst width = computed(() =>\n\tclamp(\n\t\tgetAsPercentageBetween(props.modelValue || props.min, props.min, props.max),\n\t\t0,\n\t\t100\n\t)\n);\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbProgress';\n</style>\n"],"names":["props","__props","width","computed","clamp","getAsPercentageBetween"],"mappings":";;;;;;;;;;;AAkCA,UAAMA,IAAQC,GAMRC,IAAQC;AAAA,MAAS,MACtBC;AAAA,QACCC,EAAuBL,EAAM,cAAcA,EAAM,KAAKA,EAAM,KAAKA,EAAM,GAAG;AAAA,QAC1E;AAAA,QACA;AAAA,MACD;AAAA,IAAA;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index87.js","sources":["../src/components/BbProgress/BbProgress.vue"],"sourcesContent":["<template>\n\t<div\n\t\tclass=\"bb-progress\"\n\t\t:class=\"{\n\t\t\t'bb-progress--horizontal': true,\n\t\t}\"\n\t>\n\t\t<div class=\"bb-progress-bar\" :style=\"{ width: width + '%' }\"></div>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport { clamp } from '@/utilities/functions/clamp';\nimport { getAsPercentageBetween } from '@/utilities/functions/percentage';\nimport { computed } from 'vue';\n\nexport type BbProgressProps = {\n\t/**\n\t * Used by v-model. It'a number contained between `min` and `max` that corresponds to the current value.\n\t */\n\tmodelValue: number | null;\n\t/**\n\t * Minimum value. Lower cap.\n\t */\n\tmin?: number;\n\t/**\n\t * Maximum value. Upper cap.\n\t */\n\tmax?: number;\n};\n\n/**\n * You can get percentage between 250 and 370 and have it compute it automatically\n */\nconst props = withDefaults(defineProps<BbProgressProps>(), {\n\tmodelValue: 0,\n\tmin: 0,\n\tmax: 100,\n});\n\nconst width = computed(() =>\n\tclamp(\n\t\tgetAsPercentageBetween(props.modelValue || props.min, props.min, props.max),\n\t\t0,\n\t\t100\n\t)\n);\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbProgress';\n</style>\n"],"names":["props","__props","width","computed","clamp","getAsPercentageBetween"],"mappings":";;;;;;;;;;;AAkCA,UAAMA,IAAQC,GAMRC,IAAQC;AAAA,MAAS,MACtBC;AAAA,QACCC,EAAuBL,EAAM,cAAcA,EAAM,KAAKA,EAAM,KAAKA,EAAM,GAAG;AAAA,QAC1E;AAAA,QACA;AAAA,MACD;AAAA,IAAA;;;;;;;;;;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as f, ref as v, computed as y, openBlock as k, createBlock as w, withCtx as l, renderSlot as i, normalizeProps as B, guardReactiveProps as g, createVNode as P, mergeProps as n } from "vue";
2
- import V from "./index25.js";
2
+ import V from "./index26.js";
3
3
  /* empty css */
4
- import q from "./index29.js";
4
+ import q from "./index30.js";
5
5
  /* empty css */
6
6
  const R = /* @__PURE__ */ f({
7
7
  __name: "BbRadio",
@@ -92,4 +92,4 @@ const R = /* @__PURE__ */ f({
92
92
  export {
93
93
  R as default
94
94
  };
95
- //# sourceMappingURL=index88.js.map
95
+ //# sourceMappingURL=index89.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index88.js","sources":["../src/components/BbRadio/BbRadio.vue"],"sourcesContent":["<template>\n\t<BaseInputContainer\n\t\t:id=\"id\"\n\t\tclass=\"bb-radio\"\n\t\t:direction=\"direction\"\n\t\t:errors=\"errors\"\n\t\t:has-errors=\"hasErrors\"\n\t\t:hide-label=\"hideLabel\"\n\t\t:hint=\"hint\"\n\t\t:input-position=\"inputPosition\"\n\t\t:label=\"label\"\n\t\t:label-position=\"labelPosition\"\n\t\t:label-tag=\"'span'\"\n\t\t:name=\"name\"\n\t\t:reverse=\"reverse\"\n\t\t:show-hint=\"showHint\"\n\t\t:tag=\"'label'\"\n\t>\n\t\t<template #label=\"data\"><slot name=\"label\" v-bind=\"data\"></slot></template>\n\t\t<template #input=\"{ id, name, hasErrors, ariaDescribedby }\">\n\t\t\t<BaseRadio\n\t\t\t\t:id=\"id\"\n\t\t\t\t:aria-describedby=\"ariaDescribedby\"\n\t\t\t\t:autofocus=\"autofocus\"\n\t\t\t\t:checked=\"checked\"\n\t\t\t\t:color=\"color\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t:has-errors=\"hasErrors\"\n\t\t\t\t:model-value=\"modelValue\"\n\t\t\t\t:name=\"name\"\n\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t:required=\"required\"\n\t\t\t\t:value=\"value\"\n\t\t\t\tv-bind=\"eventListeners\"\n\t\t\t\t><template #icon=\"data\"\n\t\t\t\t\t><slot name=\"icon\" v-bind=\"data\" :text=\"label\" /></template\n\t\t\t></BaseRadio>\n\t\t</template>\n\t</BaseInputContainer>\n</template>\n\n<script setup lang=\"ts\">\nimport BaseInputContainer from '../BaseInputContainer/BaseInputContainer.vue';\nimport BaseRadio from '../BaseRadio/BaseRadio.vue';\nimport { ref, computed } from 'vue';\nimport type { HTMLAttributes, InputHTMLAttributes } from 'vue';\nimport type {\n\tSlotAttributes,\n\tBaseRadioEvents,\n} from '../BaseRadio/BaseRadio.vue';\n\nexport type BbRadioProps = {\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Defines the input as checked\n\t */\n\tchecked?: InputHTMLAttributes['checked'];\n\n\t/**\n\t * Define a color for the component.\n\t *\n\t * Either a custom color or a coded color in common HEX, RGB, etc... format.\n\t */\n\tcolor?: string;\n\n\t/**\n\t * Direction of the layout of the component. Can either be a predefined value or a pattern separated by a space like `xx xxxxx`.\n\t */\n\tdirection?: 'horizontal' | 'vertical' | 'auto' | string;\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Can be a string or an array of string containing the messages to display.\n\t */\n\terrors?: string | string[];\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * Visually hides the label of the input while maintaining accessibility.\n\t */\n\thideLabel?: boolean;\n\n\t/**\n\t * Text box to be displayed near the input, usually to indicate instructions.\n\t */\n\thint?: string;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Sets the slignment of the input. Since inputs are inline block they can be aligned just as text can.\n\t */\n\tinputPosition?: 'left' | 'center' | 'right';\n\n\t/**\n\t * Text content of the label of the element.\n\t */\n\tlabel: string;\n\n\t/**\n\t * Sets the text alignment of the label.\n\t */\n\tlabelPosition?: 'left' | 'center' | 'right';\n\n\t/**\n\t * Used by v-model. Can be any serializable type.\n\t */\n\tmodelValue?: any;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname: InputHTMLAttributes['name'];\n\n\t/**\n\t * Keeps the hint displayed.\n\t */\n\tpersistentHint?: boolean;\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: InputHTMLAttributes['readonly'];\n\n\t/**\n\t * Sets the input as required.\n\t */\n\trequired?: boolean;\n\n\t/**\n\t * Reverses the layout. Applicable in every direction the order of the label and the input is swapped.\n\t */\n\treverse?: boolean;\n\n\t/**\n\t * Defines the value of the radio input.\n\t * It can be any serializable value.\n\t */\n\tvalue: any;\n};\n\nexport type BbRadioEvents = BaseRadioEvents;\n\nconst props = withDefaults(defineProps<BbRadioProps>(), {\n\tdirection: 'auto',\n\treverse: true,\n});\n\nconst emit = defineEmits<BbRadioEvents>();\n\ndefineSlots<{\n\tlabel?: (props: { text: string; hasErrors: boolean }) => any;\n\ticon?: (props: SlotAttributes & { text: string }) => any;\n}>();\n\nconst active = ref(false);\nconst showHint = computed(() => props.persistentHint || active.value);\n\nconst eventListeners = {\n\tonBlur: (event: FocusEvent) => {\n\t\tactive.value = false;\n\t\temit('blur', event);\n\t},\n\tonChange: (event: Event) => emit('change', event),\n\tonClick: (event: MouseEvent) => emit('click', event),\n\tonFocus: (event: FocusEvent) => {\n\t\tactive.value = true;\n\t\temit('focus', event);\n\t},\n\tonInput: (event: Event) => emit('input', event),\n\tonKeydown: (event: KeyboardEvent) => emit('keydown', event),\n\tonMousedown: (event: MouseEvent) => emit('mousedown', event),\n\tonMouseup: (event: MouseEvent) => emit('mouseup', event),\n\t'onUpdate:modelValue': (value: any) => emit('update:modelValue', value),\n};\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbRadio';\n</style>\n"],"names":["props","__props","emit","__emit","active","ref","showHint","computed","eventListeners","event","value"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+JA,UAAMA,IAAQC,GAKRC,IAAOC,GAOPC,IAASC,EAAI,EAAK,GAClBC,IAAWC,EAAS,MAAMP,EAAM,kBAAkBI,EAAO,KAAK,GAE9DI,IAAiB;AAAA,MACtB,QAAQ,CAACC,MAAsB;AAC9B,QAAAL,EAAO,QAAQ,IACfF,EAAK,QAAQO,CAAK;AAAA,MACnB;AAAA,MACA,UAAU,CAACA,MAAiBP,EAAK,UAAUO,CAAK;AAAA,MAChD,SAAS,CAACA,MAAsBP,EAAK,SAASO,CAAK;AAAA,MACnD,SAAS,CAACA,MAAsB;AAC/B,QAAAL,EAAO,QAAQ,IACfF,EAAK,SAASO,CAAK;AAAA,MACpB;AAAA,MACA,SAAS,CAACA,MAAiBP,EAAK,SAASO,CAAK;AAAA,MAC9C,WAAW,CAACA,MAAyBP,EAAK,WAAWO,CAAK;AAAA,MAC1D,aAAa,CAACA,MAAsBP,EAAK,aAAaO,CAAK;AAAA,MAC3D,WAAW,CAACA,MAAsBP,EAAK,WAAWO,CAAK;AAAA,MACvD,uBAAuB,CAACC,MAAeR,EAAK,qBAAqBQ,CAAK;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index89.js","sources":["../src/components/BbRadio/BbRadio.vue"],"sourcesContent":["<template>\n\t<BaseInputContainer\n\t\t:id=\"id\"\n\t\tclass=\"bb-radio\"\n\t\t:direction=\"direction\"\n\t\t:errors=\"errors\"\n\t\t:has-errors=\"hasErrors\"\n\t\t:hide-label=\"hideLabel\"\n\t\t:hint=\"hint\"\n\t\t:input-position=\"inputPosition\"\n\t\t:label=\"label\"\n\t\t:label-position=\"labelPosition\"\n\t\t:label-tag=\"'span'\"\n\t\t:name=\"name\"\n\t\t:reverse=\"reverse\"\n\t\t:show-hint=\"showHint\"\n\t\t:tag=\"'label'\"\n\t>\n\t\t<template #label=\"data\"><slot name=\"label\" v-bind=\"data\"></slot></template>\n\t\t<template #input=\"{ id, name, hasErrors, ariaDescribedby }\">\n\t\t\t<BaseRadio\n\t\t\t\t:id=\"id\"\n\t\t\t\t:aria-describedby=\"ariaDescribedby\"\n\t\t\t\t:autofocus=\"autofocus\"\n\t\t\t\t:checked=\"checked\"\n\t\t\t\t:color=\"color\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t:has-errors=\"hasErrors\"\n\t\t\t\t:model-value=\"modelValue\"\n\t\t\t\t:name=\"name\"\n\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t:required=\"required\"\n\t\t\t\t:value=\"value\"\n\t\t\t\tv-bind=\"eventListeners\"\n\t\t\t\t><template #icon=\"data\"\n\t\t\t\t\t><slot name=\"icon\" v-bind=\"data\" :text=\"label\" /></template\n\t\t\t></BaseRadio>\n\t\t</template>\n\t</BaseInputContainer>\n</template>\n\n<script setup lang=\"ts\">\nimport BaseInputContainer from '../BaseInputContainer/BaseInputContainer.vue';\nimport BaseRadio from '../BaseRadio/BaseRadio.vue';\nimport { ref, computed } from 'vue';\nimport type { HTMLAttributes, InputHTMLAttributes } from 'vue';\nimport type {\n\tSlotAttributes,\n\tBaseRadioEvents,\n} from '../BaseRadio/BaseRadio.vue';\n\nexport type BbRadioProps = {\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Defines the input as checked\n\t */\n\tchecked?: InputHTMLAttributes['checked'];\n\n\t/**\n\t * Define a color for the component.\n\t *\n\t * Either a custom color or a coded color in common HEX, RGB, etc... format.\n\t */\n\tcolor?: string;\n\n\t/**\n\t * Direction of the layout of the component. Can either be a predefined value or a pattern separated by a space like `xx xxxxx`.\n\t */\n\tdirection?: 'horizontal' | 'vertical' | 'auto' | string;\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Can be a string or an array of string containing the messages to display.\n\t */\n\terrors?: string | string[];\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * Visually hides the label of the input while maintaining accessibility.\n\t */\n\thideLabel?: boolean;\n\n\t/**\n\t * Text box to be displayed near the input, usually to indicate instructions.\n\t */\n\thint?: string;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Sets the slignment of the input. Since inputs are inline block they can be aligned just as text can.\n\t */\n\tinputPosition?: 'left' | 'center' | 'right';\n\n\t/**\n\t * Text content of the label of the element.\n\t */\n\tlabel: string;\n\n\t/**\n\t * Sets the text alignment of the label.\n\t */\n\tlabelPosition?: 'left' | 'center' | 'right';\n\n\t/**\n\t * Used by v-model. Can be any serializable type.\n\t */\n\tmodelValue?: any;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname: InputHTMLAttributes['name'];\n\n\t/**\n\t * Keeps the hint displayed.\n\t */\n\tpersistentHint?: boolean;\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: InputHTMLAttributes['readonly'];\n\n\t/**\n\t * Sets the input as required.\n\t */\n\trequired?: boolean;\n\n\t/**\n\t * Reverses the layout. Applicable in every direction the order of the label and the input is swapped.\n\t */\n\treverse?: boolean;\n\n\t/**\n\t * Defines the value of the radio input.\n\t * It can be any serializable value.\n\t */\n\tvalue: any;\n};\n\nexport type BbRadioEvents = BaseRadioEvents;\n\nconst props = withDefaults(defineProps<BbRadioProps>(), {\n\tdirection: 'auto',\n\treverse: true,\n});\n\nconst emit = defineEmits<BbRadioEvents>();\n\ndefineSlots<{\n\tlabel?: (props: { text: string; hasErrors: boolean }) => any;\n\ticon?: (props: SlotAttributes & { text: string }) => any;\n}>();\n\nconst active = ref(false);\nconst showHint = computed(() => props.persistentHint || active.value);\n\nconst eventListeners = {\n\tonBlur: (event: FocusEvent) => {\n\t\tactive.value = false;\n\t\temit('blur', event);\n\t},\n\tonChange: (event: Event) => emit('change', event),\n\tonClick: (event: MouseEvent) => emit('click', event),\n\tonFocus: (event: FocusEvent) => {\n\t\tactive.value = true;\n\t\temit('focus', event);\n\t},\n\tonInput: (event: Event) => emit('input', event),\n\tonKeydown: (event: KeyboardEvent) => emit('keydown', event),\n\tonMousedown: (event: MouseEvent) => emit('mousedown', event),\n\tonMouseup: (event: MouseEvent) => emit('mouseup', event),\n\t'onUpdate:modelValue': (value: any) => emit('update:modelValue', value),\n};\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbRadio';\n</style>\n"],"names":["props","__props","emit","__emit","active","ref","showHint","computed","eventListeners","event","value"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+JA,UAAMA,IAAQC,GAKRC,IAAOC,GAOPC,IAASC,EAAI,EAAK,GAClBC,IAAWC,EAAS,MAAMP,EAAM,kBAAkBI,EAAO,KAAK,GAE9DI,IAAiB;AAAA,MACtB,QAAQ,CAACC,MAAsB;AAC9B,QAAAL,EAAO,QAAQ,IACfF,EAAK,QAAQO,CAAK;AAAA,MACnB;AAAA,MACA,UAAU,CAACA,MAAiBP,EAAK,UAAUO,CAAK;AAAA,MAChD,SAAS,CAACA,MAAsBP,EAAK,SAASO,CAAK;AAAA,MACnD,SAAS,CAACA,MAAsB;AAC/B,QAAAL,EAAO,QAAQ,IACfF,EAAK,SAASO,CAAK;AAAA,MACpB;AAAA,MACA,SAAS,CAACA,MAAiBP,EAAK,SAASO,CAAK;AAAA,MAC9C,WAAW,CAACA,MAAyBP,EAAK,WAAWO,CAAK;AAAA,MAC1D,aAAa,CAACA,MAAsBP,EAAK,aAAaO,CAAK;AAAA,MAC3D,WAAW,CAACA,MAAsBP,EAAK,WAAWO,CAAK;AAAA,MACvD,uBAAuB,CAACC,MAAeR,EAAK,qBAAqBQ,CAAK;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index9.js CHANGED
@@ -1,11 +1,23 @@
1
- import { useWindowSize as i } from "./index128.js";
2
- import { computed as e } from "vue";
3
- import { _config as t } from "./index4.js";
4
- const c = () => {
5
- const { width: o } = i();
6
- return { isMobile: e(() => o.value < t.mobileMaxWidth) };
1
+ import { ref as n } from "vue";
2
+ const c = (t) => {
3
+ const r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", h = e.length;
4
+ let o = r.charAt(
5
+ Math.floor(Math.random() * r.length)
6
+ ), a = 1;
7
+ for (; a < t; )
8
+ o += e.charAt(Math.floor(Math.random() * h)), a += 1;
9
+ return o;
10
+ }, l = () => {
11
+ const t = n(c(12));
12
+ return {
13
+ /**
14
+ * The generated id
15
+ */
16
+ id: t,
17
+ refresh: () => t.value = c(12)
18
+ };
7
19
  };
8
20
  export {
9
- c as useMobile
21
+ l as useId
10
22
  };
11
23
  //# sourceMappingURL=index9.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index9.js","sources":["../src/composables/useMobile.ts"],"sourcesContent":["import { useWindowSize } from '@vueuse/core';\nimport { computed } from 'vue';\nimport { _config } from './useBbConfig';\n\nexport const useMobile = () => {\n\tconst { width } = useWindowSize();\n\tconst isMobile = computed(() => width.value < _config.mobileMaxWidth);\n\treturn { isMobile };\n};\n"],"names":["useMobile","width","useWindowSize","computed","_config"],"mappings":";;;AAIO,MAAMA,IAAY,MAAM;AACxB,QAAA,EAAE,OAAAC,MAAUC;AAElB,SAAO,EAAE,UADQC,EAAS,MAAMF,EAAM,QAAQG,EAAQ,cAAc,EAClD;AACnB;"}
1
+ {"version":3,"file":"index9.js","sources":["../src/composables/useId.ts"],"sourcesContent":["import { ref } from 'vue';\n\nconst makeid = (length: number) => {\n\tconst allowedFirstCharacter =\n\t\t'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';\n\tconst characters =\n\t\t'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\n\tconst charactersLength = characters.length;\n\tlet result = allowedFirstCharacter.charAt(\n\t\tMath.floor(Math.random() * allowedFirstCharacter.length)\n\t);\n\tlet counter = 1;\n\twhile (counter < length) {\n\t\tresult += characters.charAt(Math.floor(Math.random() * charactersLength));\n\t\tcounter += 1;\n\t}\n\treturn result;\n};\n\n/**\n * Return a reactive ref to an ID with a collision probability of one in 4 trillion.\n * The characters used are [a-zA-Z0-9] so they are fully compatible with HTML5 ID attr.\n * Also returns a function to refresh the id.\n */\nexport const useId = () => {\n\tconst id = ref(makeid(12));\n\tconst refresh = () => (id.value = makeid(12));\n\treturn {\n\t\t/**\n\t\t * The generated id\n\t\t */\n\t\tid,\n\t\trefresh,\n\t};\n};\n"],"names":["makeid","length","allowedFirstCharacter","characters","charactersLength","result","counter","useId","id","ref"],"mappings":";AAEA,MAAMA,IAAS,CAACC,MAAmB;AAClC,QAAMC,IACL,wDACKC,IACL,kEACKC,IAAmBD,EAAW;AACpC,MAAIE,IAASH,EAAsB;AAAA,IAClC,KAAK,MAAM,KAAK,OAAO,IAAIA,EAAsB,MAAM;AAAA,EAAA,GAEpDI,IAAU;AACd,SAAOA,IAAUL;AACN,IAAAI,KAAAF,EAAW,OAAO,KAAK,MAAM,KAAK,OAAO,IAAIC,CAAgB,CAAC,GAC7DE,KAAA;AAEL,SAAAD;AACR,GAOaE,IAAQ,MAAM;AAC1B,QAAMC,IAAKC,EAAIT,EAAO,EAAE,CAAC;AAElB,SAAA;AAAA;AAAA;AAAA;AAAA,IAIN,IAAAQ;AAAA,IACA,SANe,MAAOA,EAAG,QAAQR,EAAO,EAAE;AAAA,EAM1C;AAEF;"}
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as v, ref as g, computed as y, openBlock as B, createBlock as $, withCtx as a, renderSlot as i, normalizeProps as r, guardReactiveProps as l, createVNode as w, mergeProps as T } from "vue";
2
- import V from "./index25.js";
2
+ import V from "./index26.js";
3
3
  /* empty css */
4
- import D from "./index31.js";
4
+ import D from "./index32.js";
5
5
  /* empty css */
6
6
  const E = /* @__PURE__ */ v({
7
7
  __name: "BbRadioGroup",
@@ -127,4 +127,4 @@ const E = /* @__PURE__ */ v({
127
127
  export {
128
128
  E as default
129
129
  };
130
- //# sourceMappingURL=index90.js.map
130
+ //# sourceMappingURL=index91.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index90.js","sources":["../src/components/BbRadioGroup/BbRadioGroup.vue"],"sourcesContent":["<template>\n\t<BaseInputContainer\n\t\t:id=\"id\"\n\t\tclass=\"bb-radio-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<BaseRadioGroup\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=\"<any>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\t:required=\"required\"\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</BaseRadioGroup>\n\t\t</template>\n\t</BaseInputContainer>\n</template>\n\n<script setup lang=\"ts\" generic=\"T = any\">\nimport BaseInputContainer from '../BaseInputContainer/BaseInputContainer.vue';\nimport BaseRadioGroup from '../BaseRadioGroup/BaseRadioGroup.vue';\nimport type { BaseRadioGroupEvents } from '../BaseRadioGroup/BaseRadioGroup.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 '../BaseRadio/BaseRadio.vue';\n\nexport type BbRadioGroupEvents = BaseRadioGroupEvents;\n\nexport type BbRadioGroupProps<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 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 * 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\nconst props = defineProps<BbRadioGroupProps<T>>();\n\nconst emit = defineEmits<BbRadioGroupEvents>();\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: any;\n\t\t\ttext: string;\n\t\t}\n\t) => any;\n\tlabel?: (props: { item: any; 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/BbRadioGroup';\n</style>\n"],"names":["props","__props","emit","__emit","active","ref","showHint","computed","eventListeners","event"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiOA,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
+ {"version":3,"file":"index91.js","sources":["../src/components/BbRadioGroup/BbRadioGroup.vue"],"sourcesContent":["<template>\n\t<BaseInputContainer\n\t\t:id=\"id\"\n\t\tclass=\"bb-radio-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<BaseRadioGroup\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=\"<any>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\t:required=\"required\"\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</BaseRadioGroup>\n\t\t</template>\n\t</BaseInputContainer>\n</template>\n\n<script setup lang=\"ts\" generic=\"T = any\">\nimport BaseInputContainer from '../BaseInputContainer/BaseInputContainer.vue';\nimport BaseRadioGroup from '../BaseRadioGroup/BaseRadioGroup.vue';\nimport type { BaseRadioGroupEvents } from '../BaseRadioGroup/BaseRadioGroup.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 '../BaseRadio/BaseRadio.vue';\n\nexport type BbRadioGroupEvents = BaseRadioGroupEvents;\n\nexport type BbRadioGroupProps<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 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 * 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\nconst props = defineProps<BbRadioGroupProps<T>>();\n\nconst emit = defineEmits<BbRadioGroupEvents>();\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: any;\n\t\t\ttext: string;\n\t\t}\n\t) => any;\n\tlabel?: (props: { item: any; 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/BbRadioGroup';\n</style>\n"],"names":["props","__props","emit","__emit","active","ref","showHint","computed","eventListeners","event"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiOA,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,7 +1,7 @@
1
1
  import { defineComponent as g, ref as v, computed as y, openBlock as w, createBlock as B, withCtx as s, renderSlot as r, normalizeProps as a, guardReactiveProps as i, createVNode as k, mergeProps as P } from "vue";
2
- import V from "./index25.js";
2
+ import V from "./index26.js";
3
3
  /* empty css */
4
- import $ from "./index33.js";
4
+ import $ from "./index34.js";
5
5
  /* empty css */
6
6
  const M = /* @__PURE__ */ g({
7
7
  __name: "BbRating",
@@ -96,4 +96,4 @@ const M = /* @__PURE__ */ g({
96
96
  export {
97
97
  M as default
98
98
  };
99
- //# sourceMappingURL=index92.js.map
99
+ //# sourceMappingURL=index93.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index92.js","sources":["../src/components/BbRating/BbRating.vue"],"sourcesContent":["<template>\n\t<BaseInputContainer\n\t\t:id=\"id\"\n\t\tclass=\"bb-rating\"\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:input-position=\"inputPosition\"\n\t\t:label=\"legend\"\n\t\t:label-position=\"legendPosition\"\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<BaseRating\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:disabled=\"disabled\"\n\t\t\t\t:has-errors=\"hasErrors\"\n\t\t\t\t:model-value=\"modelValue\"\n\t\t\t\t:name=\"name\"\n\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t:size=\"size\"\n\t\t\t\t:stars=\"stars\"\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\"\n\t\t\t\t/></template>\n\t\t\t\t<template #append=\"data\"><slot name=\"append\" v-bind=\"data\" /></template>\n\t\t\t\t<template #icon=\"data\"><slot name=\"icon\" v-bind=\"data\" /></template>\n\t\t\t</BaseRating>\n\t\t</template>\n\t</BaseInputContainer>\n</template>\n\n<script setup lang=\"ts\">\nimport BaseInputContainer from '../BaseInputContainer/BaseInputContainer.vue';\nimport BaseRating from '../BaseRating/BaseRating.vue';\nimport type {\n\tBaseRatingEvents,\n\tBaseRatingSlots,\n} from '../BaseRating/BaseRating.vue';\nimport type { BbIconProps } from '../BbIcon/BbIcon.vue';\nimport {\n\tref,\n\ttype HTMLAttributes,\n\ttype InputHTMLAttributes,\n\tcomputed,\n} from 'vue';\n\nexport type BbRatingProps = {\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Define a color for the component.\n\t *\n\t * Either a custom color or a coded color in common HEX, RGB, etc... format.\n\t */\n\tcolor?: string;\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\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 legend of the fieldset while maintaining accessibility.\n\t */\n\thideLegend?: boolean;\n\t/**\n\t * Text box to be displayed near the input, usually to indicate instructions.\n\t */\n\thint?: string;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Sets the slignment of the input. Since inputs are inline block they can be aligned just as text can.\n\t */\n\tinputPosition?: 'left' | 'center' | 'right';\n\n\t/**\n\t * Text content of the legend.\n\t */\n\tlegend: string;\n\n\t/**\n\t * Sets the text alignment of the legend.\n\t */\n\tlegendPosition?: 'left' | 'center' | 'right';\n\t/**\n\t * Used by v-model\n\t */\n\tmodelValue: null | number;\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname: 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\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\t/**\n\t * Maximum number of stars to render and maximum value of the component\n\t */\n\tstars?: number;\n} & Pick<BbIconProps, 'size'>;\n\nconst props = withDefaults(defineProps<BbRatingProps>(), {\n\tinputPosition: 'left',\n});\n\nexport type BbRatingEvents = BaseRatingEvents;\nconst emit = defineEmits<BbRatingEvents>();\n\ndefineSlots<\n\tBaseRatingSlots & {\n\t\tlegend?: (props: { text: string; hasErrors: boolean }) => any;\n\t}\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/BbRating';\n</style>\n"],"names":["props","__props","emit","__emit","active","ref","showHint","computed","eventListeners","event"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+IA,UAAMA,IAAQC,GAKRC,IAAOC,GAQPC,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
+ {"version":3,"file":"index93.js","sources":["../src/components/BbRating/BbRating.vue"],"sourcesContent":["<template>\n\t<BaseInputContainer\n\t\t:id=\"id\"\n\t\tclass=\"bb-rating\"\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:input-position=\"inputPosition\"\n\t\t:label=\"legend\"\n\t\t:label-position=\"legendPosition\"\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<BaseRating\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:disabled=\"disabled\"\n\t\t\t\t:has-errors=\"hasErrors\"\n\t\t\t\t:model-value=\"modelValue\"\n\t\t\t\t:name=\"name\"\n\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t:size=\"size\"\n\t\t\t\t:stars=\"stars\"\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\"\n\t\t\t\t/></template>\n\t\t\t\t<template #append=\"data\"><slot name=\"append\" v-bind=\"data\" /></template>\n\t\t\t\t<template #icon=\"data\"><slot name=\"icon\" v-bind=\"data\" /></template>\n\t\t\t</BaseRating>\n\t\t</template>\n\t</BaseInputContainer>\n</template>\n\n<script setup lang=\"ts\">\nimport BaseInputContainer from '../BaseInputContainer/BaseInputContainer.vue';\nimport BaseRating from '../BaseRating/BaseRating.vue';\nimport type {\n\tBaseRatingEvents,\n\tBaseRatingSlots,\n} from '../BaseRating/BaseRating.vue';\nimport type { BbIconProps } from '../BbIcon/BbIcon.vue';\nimport {\n\tref,\n\ttype HTMLAttributes,\n\ttype InputHTMLAttributes,\n\tcomputed,\n} from 'vue';\n\nexport type BbRatingProps = {\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Define a color for the component.\n\t *\n\t * Either a custom color or a coded color in common HEX, RGB, etc... format.\n\t */\n\tcolor?: string;\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\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 legend of the fieldset while maintaining accessibility.\n\t */\n\thideLegend?: boolean;\n\t/**\n\t * Text box to be displayed near the input, usually to indicate instructions.\n\t */\n\thint?: string;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Sets the slignment of the input. Since inputs are inline block they can be aligned just as text can.\n\t */\n\tinputPosition?: 'left' | 'center' | 'right';\n\n\t/**\n\t * Text content of the legend.\n\t */\n\tlegend: string;\n\n\t/**\n\t * Sets the text alignment of the legend.\n\t */\n\tlegendPosition?: 'left' | 'center' | 'right';\n\t/**\n\t * Used by v-model\n\t */\n\tmodelValue: null | number;\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname: 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\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\t/**\n\t * Maximum number of stars to render and maximum value of the component\n\t */\n\tstars?: number;\n} & Pick<BbIconProps, 'size'>;\n\nconst props = withDefaults(defineProps<BbRatingProps>(), {\n\tinputPosition: 'left',\n});\n\nexport type BbRatingEvents = BaseRatingEvents;\nconst emit = defineEmits<BbRatingEvents>();\n\ndefineSlots<\n\tBaseRatingSlots & {\n\t\tlegend?: (props: { text: string; hasErrors: boolean }) => any;\n\t}\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/BbRating';\n</style>\n"],"names":["props","__props","emit","__emit","active","ref","showHint","computed","eventListeners","event"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+IA,UAAMA,IAAQC,GAKRC,IAAOC,GAQPC,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -22,4 +22,4 @@ const d = /* @__PURE__ */ t({
22
22
  export {
23
23
  d as default
24
24
  };
25
- //# sourceMappingURL=index94.js.map
25
+ //# sourceMappingURL=index95.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index95.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as y, ref as v, computed as B, openBlock as g, createBlock as $, withCtx as n, renderSlot as a, normalizeProps as i, guardReactiveProps as l, createVNode as T, mergeProps as V } from "vue";
2
- import q from "./index25.js";
2
+ import q from "./index26.js";
3
3
  /* empty css */
4
- import w from "./index35.js";
4
+ import w from "./index36.js";
5
5
  /* empty css */
6
6
  const F = /* @__PURE__ */ y({
7
7
  __name: "BbSelect",
@@ -173,4 +173,4 @@ const F = /* @__PURE__ */ y({
173
173
  export {
174
174
  F as default
175
175
  };
176
- //# sourceMappingURL=index96.js.map
176
+ //# sourceMappingURL=index97.js.map