bitboss-ui 2.0.5 → 2.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (431) hide show
  1. package/dist/components/BaseDialog/BaseDialog.vue.d.ts +1 -3
  2. package/dist/composables/useOptions.d.ts +1 -1
  3. package/dist/index.js +89 -87
  4. package/dist/index.js.map +1 -1
  5. package/dist/index10.js +7 -39
  6. package/dist/index10.js.map +1 -1
  7. package/dist/index101.js +60 -87
  8. package/dist/index101.js.map +1 -1
  9. package/dist/index103.js +113 -258
  10. package/dist/index103.js.map +1 -1
  11. package/dist/index105.js +254 -388
  12. package/dist/index105.js.map +1 -1
  13. package/dist/index107.js +387 -98
  14. package/dist/index107.js.map +1 -1
  15. package/dist/index109.js +52 -48
  16. package/dist/index109.js.map +1 -1
  17. package/dist/index11.js +74 -188
  18. package/dist/index11.js.map +1 -1
  19. package/dist/index111.js +35 -34
  20. package/dist/index111.js.map +1 -1
  21. package/dist/index113.js +105 -23
  22. package/dist/index113.js.map +1 -1
  23. package/dist/index115.js +23 -156
  24. package/dist/index115.js.map +1 -1
  25. package/dist/index117.js +153 -112
  26. package/dist/index117.js.map +1 -1
  27. package/dist/index119.js +115 -39
  28. package/dist/index119.js.map +1 -1
  29. package/dist/index12.js +38 -80
  30. package/dist/index12.js.map +1 -1
  31. package/dist/index121.js +36 -40
  32. package/dist/index121.js.map +1 -1
  33. package/dist/index122.js +34 -37
  34. package/dist/index122.js.map +1 -1
  35. package/dist/index123.js +30 -21
  36. package/dist/index123.js.map +1 -1
  37. package/dist/index124.js +47 -2
  38. package/dist/index124.js.map +1 -1
  39. package/dist/index125.js +35 -21
  40. package/dist/index125.js.map +1 -1
  41. package/dist/index126.js +2 -2
  42. package/dist/index126.js.map +1 -1
  43. package/dist/index127.js +21 -312
  44. package/dist/index127.js.map +1 -1
  45. package/dist/index128.js +2 -24
  46. package/dist/index128.js.map +1 -1
  47. package/dist/index129.js +312 -2
  48. package/dist/index129.js.map +1 -1
  49. package/dist/index13.js +196 -0
  50. package/dist/index13.js.map +1 -0
  51. package/dist/index130.js +24 -5
  52. package/dist/index130.js.map +1 -1
  53. package/dist/index131.js +2 -9
  54. package/dist/index131.js.map +1 -1
  55. package/dist/index132.js +5 -6
  56. package/dist/index132.js.map +1 -1
  57. package/dist/index133.js +9 -3
  58. package/dist/index133.js.map +1 -1
  59. package/dist/index134.js +6 -3
  60. package/dist/index134.js.map +1 -1
  61. package/dist/index135.js +1 -1
  62. package/dist/index136.js +1 -1
  63. package/dist/index137.js +1 -1
  64. package/dist/index138.js +1 -1
  65. package/dist/index139.js +1 -1
  66. package/dist/index14.js +73 -121
  67. package/dist/index14.js.map +1 -1
  68. package/dist/index140.js +1 -1
  69. package/dist/index141.js +1 -1
  70. package/dist/index142.js +1 -1
  71. package/dist/index143.js +1 -1
  72. package/dist/index144.js +1 -1
  73. package/dist/index145.js +1 -1
  74. package/dist/index146.js +1 -1
  75. package/dist/index147.js +1 -1
  76. package/dist/index148.js +1 -1
  77. package/dist/index149.js +1 -1
  78. package/dist/index150.js +1 -1
  79. package/dist/index151.js +1 -1
  80. package/dist/index152.js +1 -1
  81. package/dist/index153.js +1 -1
  82. package/dist/index154.js +1 -1
  83. package/dist/index155.js +1 -1
  84. package/dist/index156.js +1 -1
  85. package/dist/index157.js +1 -1
  86. package/dist/index158.js +1 -1
  87. package/dist/index159.js +2 -2
  88. package/dist/index16.js +119 -118
  89. package/dist/index16.js.map +1 -1
  90. package/dist/index160.js +6 -0
  91. package/dist/index160.js.map +1 -0
  92. package/dist/index161.js +1 -1
  93. package/dist/index163.js +2 -2
  94. package/dist/index165.js +1 -1
  95. package/dist/index166.js +1 -1
  96. package/dist/index167.js +1 -1
  97. package/dist/index168.js +1 -1
  98. package/dist/index169.js +2 -2
  99. package/dist/index170.js +6 -0
  100. package/dist/index170.js.map +1 -0
  101. package/dist/index171.js +3 -2
  102. package/dist/index171.js.map +1 -1
  103. package/dist/index173.js +2 -3
  104. package/dist/index173.js.map +1 -1
  105. package/dist/index174.js +1 -1
  106. package/dist/index175.js +1 -1
  107. package/dist/index176.js +1 -1
  108. package/dist/index177.js +1 -1
  109. package/dist/index178.js +1 -1
  110. package/dist/index179.js +1 -1
  111. package/dist/index18.js +120 -208
  112. package/dist/index18.js.map +1 -1
  113. package/dist/index180.js +1 -1
  114. package/dist/index181.js +1 -1
  115. package/dist/index182.js +1 -1
  116. package/dist/index183.js +2 -2
  117. package/dist/index184.js +6 -0
  118. package/dist/index184.js.map +1 -0
  119. package/dist/index185.js +1 -1
  120. package/dist/index187.js +1 -1
  121. package/dist/index189.js +1 -1
  122. package/dist/index190.js +1 -1
  123. package/dist/index191.js +1 -1
  124. package/dist/index192.js +1 -1
  125. package/dist/index193.js +1 -1
  126. package/dist/index194.js +1 -1
  127. package/dist/index195.js +1 -1
  128. package/dist/index196.js +1 -1
  129. package/dist/index197.js +3 -81
  130. package/dist/index197.js.map +1 -1
  131. package/dist/index198.js +3 -3
  132. package/dist/index198.js.map +1 -1
  133. package/dist/index199.js +81 -5
  134. package/dist/index199.js.map +1 -1
  135. package/dist/index20.js +193 -275
  136. package/dist/index20.js.map +1 -1
  137. package/dist/index200.js +2 -16
  138. package/dist/index200.js.map +1 -1
  139. package/dist/index201.js +3 -16
  140. package/dist/index201.js.map +1 -1
  141. package/dist/index202.js +124 -17
  142. package/dist/index202.js.map +1 -1
  143. package/dist/index203.js +5 -19
  144. package/dist/index203.js.map +1 -1
  145. package/dist/index204.js +119 -23
  146. package/dist/index204.js.map +1 -1
  147. package/dist/index205.js +19 -3
  148. package/dist/index205.js.map +1 -1
  149. package/dist/index206.js +16 -2
  150. package/dist/index206.js.map +1 -1
  151. package/dist/index207.js +16 -8
  152. package/dist/index207.js.map +1 -1
  153. package/dist/index208.js +2 -249
  154. package/dist/index208.js.map +1 -1
  155. package/dist/index209.js +5 -0
  156. package/dist/index209.js.map +1 -0
  157. package/dist/index210.js +35 -52
  158. package/dist/index210.js.map +1 -1
  159. package/dist/index211.js +173 -36
  160. package/dist/index211.js.map +1 -1
  161. package/dist/index212.js +6 -5
  162. package/dist/index212.js.map +1 -1
  163. package/dist/index213.js +39 -36
  164. package/dist/index213.js.map +1 -1
  165. package/dist/index215.js +13 -4
  166. package/dist/index215.js.map +1 -1
  167. package/dist/index216.js +5 -2
  168. package/dist/index216.js.map +1 -1
  169. package/dist/index217.js +369 -2
  170. package/dist/index217.js.map +1 -1
  171. package/dist/index218.js +6 -40
  172. package/dist/index218.js.map +1 -1
  173. package/dist/{index214.js → index219.js} +1 -1
  174. package/dist/{index214.js.map → index219.js.map} +1 -1
  175. package/dist/index22.js +287 -247
  176. package/dist/index22.js.map +1 -1
  177. package/dist/index220.js +4 -13
  178. package/dist/index220.js.map +1 -1
  179. package/dist/index221.js +2 -158
  180. package/dist/index221.js.map +1 -1
  181. package/dist/index222.js +3 -84
  182. package/dist/index222.js.map +1 -1
  183. package/dist/index223.js +10 -0
  184. package/dist/index223.js.map +1 -0
  185. package/dist/index224.js +19 -3
  186. package/dist/index224.js.map +1 -1
  187. package/dist/index225.js +26 -34
  188. package/dist/index225.js.map +1 -1
  189. package/dist/index226.js +3 -6
  190. package/dist/index226.js.map +1 -1
  191. package/dist/index227.js +249 -7
  192. package/dist/index227.js.map +1 -1
  193. package/dist/index228.js +49 -123
  194. package/dist/index228.js.map +1 -1
  195. package/dist/index229.js +44 -123
  196. package/dist/index229.js.map +1 -1
  197. package/dist/index230.js +5 -2
  198. package/dist/index230.js.map +1 -1
  199. package/dist/index231.js +49 -174
  200. package/dist/index231.js.map +1 -1
  201. package/dist/index232.js +158 -5
  202. package/dist/index232.js.map +1 -1
  203. package/dist/index233.js +83 -368
  204. package/dist/index233.js.map +1 -1
  205. package/dist/index235.js +2 -18
  206. package/dist/index235.js.map +1 -1
  207. package/dist/index236.js +17 -105
  208. package/dist/index236.js.map +1 -1
  209. package/dist/index237.js +109 -0
  210. package/dist/index237.js.map +1 -0
  211. package/dist/{index238.js → index239.js} +3 -3
  212. package/dist/{index238.js.map → index239.js.map} +1 -1
  213. package/dist/index24.js +249 -120
  214. package/dist/index24.js.map +1 -1
  215. package/dist/index241.js +2 -10
  216. package/dist/index241.js.map +1 -1
  217. package/dist/index242.js +9 -2
  218. package/dist/index242.js.map +1 -1
  219. package/dist/index243.js +3 -224
  220. package/dist/index243.js.map +1 -1
  221. package/dist/index244.js +9 -281
  222. package/dist/index244.js.map +1 -1
  223. package/dist/index245.js +23 -6
  224. package/dist/index245.js.map +1 -1
  225. package/dist/index246.js +6 -2
  226. package/dist/index246.js.map +1 -1
  227. package/dist/index247.js +16 -2
  228. package/dist/index247.js.map +1 -1
  229. package/dist/index248.js +224 -2
  230. package/dist/index248.js.map +1 -1
  231. package/dist/index249.js +281 -2
  232. package/dist/index249.js.map +1 -1
  233. package/dist/index250.js +6 -2
  234. package/dist/index250.js.map +1 -1
  235. package/dist/index251.js +2 -2
  236. package/dist/index252.js +2 -3
  237. package/dist/index252.js.map +1 -1
  238. package/dist/index253.js +2 -2
  239. package/dist/index254.js +2 -2
  240. package/dist/index255.js +2 -2
  241. package/dist/index256.js +122 -24
  242. package/dist/index256.js.map +1 -1
  243. package/dist/index257.js +429 -20
  244. package/dist/index257.js.map +1 -1
  245. package/dist/index258.js +6 -0
  246. package/dist/index258.js.map +1 -0
  247. package/dist/index26.js +119 -142
  248. package/dist/index26.js.map +1 -1
  249. package/dist/index260.js +6 -3
  250. package/dist/index260.js.map +1 -1
  251. package/dist/index261.js +21 -8
  252. package/dist/index261.js.map +1 -1
  253. package/dist/index263.js +9 -3
  254. package/dist/index263.js.map +1 -1
  255. package/dist/index264.js +439 -0
  256. package/dist/index264.js.map +1 -0
  257. package/dist/index265.js +127 -6
  258. package/dist/index265.js.map +1 -1
  259. package/dist/index266.js +199 -15
  260. package/dist/index266.js.map +1 -1
  261. package/dist/index267.js +4 -9
  262. package/dist/index267.js.map +1 -1
  263. package/dist/index268.js +89 -3
  264. package/dist/index268.js.map +1 -1
  265. package/dist/index269.js +2 -12
  266. package/dist/index269.js.map +1 -1
  267. package/dist/index270.js +2 -9
  268. package/dist/index270.js.map +1 -1
  269. package/dist/index271.js +2 -9
  270. package/dist/index271.js.map +1 -1
  271. package/dist/index272.js +2 -17
  272. package/dist/index272.js.map +1 -1
  273. package/dist/index273.js +2 -431
  274. package/dist/index273.js.map +1 -1
  275. package/dist/index274.js +2 -89
  276. package/dist/index274.js.map +1 -1
  277. package/dist/index275.js +28 -2
  278. package/dist/index275.js.map +1 -1
  279. package/dist/index276.js +17 -64
  280. package/dist/index276.js.map +1 -1
  281. package/dist/index278.js +3 -200
  282. package/dist/index278.js.map +1 -1
  283. package/dist/index279.js +12 -2
  284. package/dist/index279.js.map +1 -1
  285. package/dist/index28.js +138 -83
  286. package/dist/index28.js.map +1 -1
  287. package/dist/index280.js +7 -124
  288. package/dist/index280.js.map +1 -1
  289. package/dist/index281.js +7 -20
  290. package/dist/index281.js.map +1 -1
  291. package/dist/index282.js +20 -0
  292. package/dist/index282.js.map +1 -0
  293. package/dist/index283.js +2 -436
  294. package/dist/index283.js.map +1 -1
  295. package/dist/index284.js +68 -126
  296. package/dist/index284.js.map +1 -1
  297. package/dist/index285.js +5 -3
  298. package/dist/index285.js.map +1 -1
  299. package/dist/index286.js +1 -1
  300. package/dist/index287.js +3 -211
  301. package/dist/index287.js.map +1 -1
  302. package/dist/index288.js +214 -0
  303. package/dist/index288.js.map +1 -0
  304. package/dist/index290.js +4 -7
  305. package/dist/index290.js.map +1 -1
  306. package/dist/index291.js +4 -19
  307. package/dist/index291.js.map +1 -1
  308. package/dist/index292.js +58 -6
  309. package/dist/index292.js.map +1 -1
  310. package/dist/index293.js +35 -4
  311. package/dist/index293.js.map +1 -1
  312. package/dist/index294.js +7 -4
  313. package/dist/index294.js.map +1 -1
  314. package/dist/index295.js +6 -58
  315. package/dist/index295.js.map +1 -1
  316. package/dist/index296.js +18 -34
  317. package/dist/index296.js.map +1 -1
  318. package/dist/index297.js +2 -11
  319. package/dist/index297.js.map +1 -1
  320. package/dist/index298.js +47 -2
  321. package/dist/index298.js.map +1 -1
  322. package/dist/index299.js +10 -46
  323. package/dist/index299.js.map +1 -1
  324. package/dist/index30.js +85 -115
  325. package/dist/index30.js.map +1 -1
  326. package/dist/index32.js +111 -112
  327. package/dist/index32.js.map +1 -1
  328. package/dist/index34.js +114 -365
  329. package/dist/index34.js.map +1 -1
  330. package/dist/index36.js +361 -283
  331. package/dist/index36.js.map +1 -1
  332. package/dist/index38.js +288 -106
  333. package/dist/index38.js.map +1 -1
  334. package/dist/index40.js +114 -121
  335. package/dist/index40.js.map +1 -1
  336. package/dist/index42.js +113 -200
  337. package/dist/index42.js.map +1 -1
  338. package/dist/index44.js +180 -90
  339. package/dist/index44.js.map +1 -1
  340. package/dist/index46.js +110 -78
  341. package/dist/index46.js.map +1 -1
  342. package/dist/index48.js +89 -54
  343. package/dist/index48.js.map +1 -1
  344. package/dist/index5.js +14 -78
  345. package/dist/index5.js.map +1 -1
  346. package/dist/index50.js +54 -84
  347. package/dist/index50.js.map +1 -1
  348. package/dist/index52.js +86 -60
  349. package/dist/index52.js.map +1 -1
  350. package/dist/index54.js +59 -40
  351. package/dist/index54.js.map +1 -1
  352. package/dist/index56.js +42 -55
  353. package/dist/index56.js.map +1 -1
  354. package/dist/index58.js +53 -103
  355. package/dist/index58.js.map +1 -1
  356. package/dist/index6.js +36 -58
  357. package/dist/index6.js.map +1 -1
  358. package/dist/index60.js +103 -89
  359. package/dist/index60.js.map +1 -1
  360. package/dist/index62.js +61 -88
  361. package/dist/index62.js.map +1 -1
  362. package/dist/index64.js +119 -77
  363. package/dist/index64.js.map +1 -1
  364. package/dist/index66.js +77 -91
  365. package/dist/index66.js.map +1 -1
  366. package/dist/index68.js +88 -49
  367. package/dist/index68.js.map +1 -1
  368. package/dist/index7.js +78 -20
  369. package/dist/index7.js.map +1 -1
  370. package/dist/index70.js +51 -304
  371. package/dist/index70.js.map +1 -1
  372. package/dist/index72.js +299 -115
  373. package/dist/index72.js.map +1 -1
  374. package/dist/index74.js +120 -214
  375. package/dist/index74.js.map +1 -1
  376. package/dist/index76.js +213 -36
  377. package/dist/index76.js.map +1 -1
  378. package/dist/index78.js +47 -0
  379. package/dist/index78.js.map +1 -0
  380. package/dist/index79.js +119 -230
  381. package/dist/index79.js.map +1 -1
  382. package/dist/index8.js +61 -7
  383. package/dist/index8.js.map +1 -1
  384. package/dist/index81.js +227 -154
  385. package/dist/index81.js.map +1 -1
  386. package/dist/index83.js +154 -207
  387. package/dist/index83.js.map +1 -1
  388. package/dist/index85.js +215 -26
  389. package/dist/index85.js.map +1 -1
  390. package/dist/index87.js +27 -88
  391. package/dist/index87.js.map +1 -1
  392. package/dist/index89.js +53 -88
  393. package/dist/index89.js.map +1 -1
  394. package/dist/index9.js +17 -76
  395. package/dist/index9.js.map +1 -1
  396. package/dist/index91.js +75 -44
  397. package/dist/index91.js.map +1 -1
  398. package/dist/index93.js +89 -15
  399. package/dist/index93.js.map +1 -1
  400. package/dist/index95.js +15 -166
  401. package/dist/index95.js.map +1 -1
  402. package/dist/index97.js +120 -59
  403. package/dist/index97.js.map +1 -1
  404. package/dist/index99.js +66 -52
  405. package/dist/index99.js.map +1 -1
  406. package/dist/style.css +1 -1
  407. package/package.json +2 -2
  408. package/dist/index120.js +0 -47
  409. package/dist/index120.js.map +0 -1
  410. package/dist/index164.js +0 -6
  411. package/dist/index164.js.map +0 -1
  412. package/dist/index172.js +0 -6
  413. package/dist/index172.js.map +0 -1
  414. package/dist/index188.js +0 -6
  415. package/dist/index188.js.map +0 -1
  416. package/dist/index234.js +0 -6
  417. package/dist/index234.js.map +0 -1
  418. package/dist/index240.js +0 -5
  419. package/dist/index240.js.map +0 -1
  420. package/dist/index259.js +0 -10
  421. package/dist/index259.js.map +0 -1
  422. package/dist/index262.js +0 -26
  423. package/dist/index262.js.map +0 -1
  424. package/dist/index277.js +0 -8
  425. package/dist/index277.js.map +0 -1
  426. package/dist/index3.js +0 -17
  427. package/dist/index3.js.map +0 -1
  428. package/dist/index4.js +0 -43
  429. package/dist/index4.js.map +0 -1
  430. package/dist/index77.js +0 -130
  431. package/dist/index77.js.map +0 -1
package/dist/index58.js CHANGED
@@ -1,113 +1,63 @@
1
- import { defineComponent as f, ref as g, computed as c, useAttrs as v, toRef as B, openBlock as n, createBlock as a, unref as d, mergeProps as k, withCtx as h, createVNode as C, createCommentVNode as l, createElementVNode as L, renderSlot as S, createTextVNode as x, toDisplayString as A, createElementBlock as V } from "vue";
2
- /* empty css */
3
- import F from "./index12.js";
1
+ import { defineComponent as n, openBlock as a, createElementBlock as t, Fragment as b, renderList as m, createElementVNode as l, renderSlot as r, createVNode as p, mergeProps as u, withCtx as c, createTextVNode as f, toDisplayString as _ } from "vue";
2
+ import h from "./index14.js";
4
3
  /* empty css */
5
- import r from "./index121.js";
6
- /* empty css */
7
- import N from "./index123.js";
8
- /* empty css */
9
- import { pickBy as $ } from "./index241.js";
10
- import { noop as P } from "./index242.js";
11
- const T = { class: "bb-button__content" }, W = {
12
- key: 2,
13
- class: "bb-button__loading-label"
14
- }, I = /* @__PURE__ */ f({
15
- inheritAttrs: !1,
16
- __name: "BbButton",
4
+ const B = {
5
+ "aria-label": "Breadcrumbs",
6
+ class: "bb-breadcrumbs"
7
+ }, $ = { class: "bb-breadcrumbs__breadcrumb-container" }, k = {
8
+ "aria-hidden": "true",
9
+ class: "bb-breadcrumbs__divider"
10
+ }, V = /* @__PURE__ */ n({
11
+ __name: "BbBreadcrumbs",
17
12
  props: {
18
- autoLoading: { type: Boolean, default: !0 },
19
- activeClass: {},
20
- ariaCurrentValue: {},
21
- "append:icon": {},
22
- block: { type: Boolean },
23
- data: {},
24
13
  disabled: { type: Boolean },
25
- disabledWhileLoading: { type: Boolean, default: !0 },
26
- exactActiveClass: {},
27
- headers: {},
28
- href: {},
29
- icon: {},
30
- loading: { type: Boolean },
31
- method: {},
32
- onBefore: {},
33
- onCancel: {},
34
- onCancelToken: {},
35
- onFinish: {},
36
- only: {},
37
- onProgress: {},
38
- onStart: {},
39
- onSuccess: {},
40
- "prepend:icon": {},
41
- preserveScroll: { type: [Boolean, Function] },
42
- preserveState: { type: [Boolean, Function, null] },
43
- queryStringArrayFormat: {},
44
- rel: {},
45
- replace: { type: Boolean },
46
- tag: {},
47
- target: {},
48
- text: {},
49
- to: {},
50
- type: {}
14
+ items: {},
15
+ divider: { default: "/" }
51
16
  },
52
- setup(p) {
53
- const e = p, i = g(0), t = c(
54
- () => e.loading || !!i.value && e.autoLoading
55
- ), u = c(() => e.disabled), { onClick: b = P, ...m } = v(), _ = async (...o) => {
56
- t.value && e.disabledWhileLoading || (i.value++, await b(...o), i.value--);
57
- }, y = B(() => ({
58
- ...$(
59
- e,
60
- (o, s) => ![
61
- "append:icon",
62
- "disabled",
63
- "autoLoading",
64
- "disabledWhileLoading",
65
- "icon",
66
- "loading",
67
- "prepend:icon"
68
- ].includes(s)
69
- ),
70
- ...m
71
- }));
72
- return (o, s) => (n(), a(d(F), k(y.value, {
73
- "aria-disabled": t.value ? !0 : void 0,
74
- class: {
75
- "bb-button": !0,
76
- "bb-button--loading": t.value,
77
- "bb-button--icon": !!o.icon
78
- },
79
- disabled: u.value,
80
- tabindex: t.value ? -1 : void 0,
81
- onClick: _
82
- }), {
83
- default: h(() => [
84
- C(d(N), { class: "bb-button__spinner" }),
85
- e.icon ? (n(), a(r, {
86
- key: 0,
87
- class: "bb-button__icon",
88
- type: e.icon
89
- }, null, 8, ["type"])) : e["prepend:icon"] ? (n(), a(r, {
90
- key: 1,
91
- class: "bb-button__prepend-icon",
92
- type: e["prepend:icon"]
93
- }, null, 8, ["type"])) : l("", !0),
94
- L("span", T, [
95
- S(o.$slots, "default", {}, () => [
96
- x(A(o.text), 1)
97
- ])
17
+ setup(i) {
18
+ const o = i;
19
+ return (e, v) => (a(), t("nav", B, [
20
+ (a(!0), t(b, null, m(e.items, (s, d) => (a(), t(b, {
21
+ key: s.key
22
+ }, [
23
+ l("span", $, [
24
+ r(e.$slots, "item:prepend", {
25
+ disabled: !!(s.disabled || e.disabled),
26
+ index: d,
27
+ item: e.items[d],
28
+ text: s.text
29
+ }),
30
+ p(h, u({ ref_for: !0 }, s, {
31
+ class: "bb-breadcrumbs__breadcrumb",
32
+ disabled: s.disabled || e.disabled
33
+ }), {
34
+ default: c(() => [
35
+ r(e.$slots, `${s.key}`, {
36
+ disabled: !!(s.disabled || e.disabled),
37
+ index: d,
38
+ item: e.items[d],
39
+ text: s.text
40
+ })
41
+ ]),
42
+ _: 2
43
+ }, 1040, ["disabled"]),
44
+ r(e.$slots, "item:append", {
45
+ disabled: !!(s.disabled || e.disabled),
46
+ index: d,
47
+ item: e.items[d],
48
+ text: s.text
49
+ })
98
50
  ]),
99
- t.value ? (n(), V("span", W, "caricamento")) : l("", !0),
100
- !o.icon && e["append:icon"] ? (n(), a(r, {
101
- key: 3,
102
- class: "bb-button__append-icon",
103
- type: e["append:icon"]
104
- }, null, 8, ["type"])) : l("", !0)
105
- ]),
106
- _: 3
107
- }, 16, ["aria-disabled", "class", "disabled", "tabindex"]));
51
+ l("span", k, [
52
+ r(e.$slots, "divider", {}, () => [
53
+ f(_(o.divider), 1)
54
+ ])
55
+ ])
56
+ ], 64))), 128))
57
+ ]));
108
58
  }
109
59
  });
110
60
  export {
111
- I as default
61
+ V as default
112
62
  };
113
63
  //# sourceMappingURL=index58.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index58.js","sources":["../src/components/BbButton/BbButton.vue"],"sourcesContent":["<template>\n\t<BaseButton\n\t\tv-bind=\"propsToPass\"\n\t\t:aria-disabled=\"loading ? true : undefined\"\n\t\t:class=\"{\n\t\t\t'bb-button': true,\n\t\t\t'bb-button--loading': loading,\n\t\t\t'bb-button--icon': !!icon,\n\t\t}\"\n\t\t:disabled=\"disabled\"\n\t\t:tabindex=\"loading ? -1 : undefined\"\n\t\t@click=\"onClick\"\n\t>\n\t\t<BbSpinner class=\"bb-button__spinner\" />\n\t\t<BbIcon\n\t\t\tv-if=\"props['icon']\"\n\t\t\tclass=\"bb-button__icon\"\n\t\t\t:type=\"props['icon']\"\n\t\t/>\n\t\t<BbIcon\n\t\t\tv-else-if=\"props['prepend:icon']\"\n\t\t\tclass=\"bb-button__prepend-icon\"\n\t\t\t:type=\"props['prepend:icon']\"\n\t\t/>\n\t\t<span class=\"bb-button__content\"\n\t\t\t><slot>{{ text }}</slot></span\n\t\t>\n\t\t<span v-if=\"loading\" class=\"bb-button__loading-label\">caricamento</span>\n\n\t\t<BbIcon\n\t\t\tv-if=\"!icon && props['append:icon']\"\n\t\t\tclass=\"bb-button__append-icon\"\n\t\t\t:type=\"props['append:icon']\"\n\t\t/>\n\t</BaseButton>\n</template>\n\n<script setup lang=\"ts\">\nimport { BaseButton, BbSpinner } from '@/index';\nimport type { RouteLocationRaw } from 'vue-router';\nimport BbIcon from '../BbIcon/BbIcon.vue';\nimport { computed, ref, toRef, useAttrs } from 'vue';\nimport { pickBy } from '@/utilities/functions/pickBy';\nimport { noop } from '@/utilities/functions/noop';\n\ndefineOptions({\n\tinheritAttrs: false,\n});\n\nexport type BbButtonProps = {\n\t/**\n\t * Tracks tha loading status internally.\n\t */\n\tautoLoading?: boolean;\n\t/**\n\t * Class to apply when the link is active\n\t */\n\tactiveClass?: string;\n\n\t/**\n\t * Value passed to the attribute `aria-current` when the link is exact active.\n\t *\n\t * @defaultValue `'page'`\n\t */\n\tariaCurrentValue?:\n\t\t| 'page'\n\t\t| 'step'\n\t\t| 'location'\n\t\t| 'date'\n\t\t| 'time'\n\t\t| 'true'\n\t\t| 'false';\n\t/**\n\t * Icon to be added on the right of the text\n\t */\n\t// eslint-disable-next-line vue/prop-name-casing\n\t'append:icon'?: string;\n\t/**\n\t * Displays the component as full width.\n\t */\n\tblock?: boolean;\n\n\tdata?: object;\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Disables the click handler while the component is loading.\n\t */\n\tdisabledWhileLoading?: boolean;\n\n\t/**\n\t * Class to apply when the link is exact active\n\t */\n\texactActiveClass?: string;\n\n\theaders?: object;\n\n\t/**\n\t * Returns the hyperlink's URL.\n\t *\n\t * Can be set, to change the URL.\n\t */\n\thref?: HTMLAnchorElement['href'];\n\t/**\n\t * Used when only an icon with no text should be displayed\n\t */\n\ticon?: string;\n\n\t/**\n\t * Triggers a loading indicator\n\t */\n\tloading?: boolean;\n\n\tmethod?: 'get' | 'post' | 'put' | 'patch' | 'delete';\n\n\tonBefore?: () => void;\n\n\tonCancel?: () => void;\n\n\tonCancelToken?: (cancelToken: import('axios').CancelTokenSource) => void;\n\n\tonFinish?: () => void;\n\n\tonly?: string[];\n\n\tonProgress?: (progress: { percentage: number | undefined }) => void;\n\n\tonStart?: () => void;\n\n\tonSuccess?: () => void;\n\n\t/**\n\t * Icon to be added on the left of the text\n\t */\n\t// eslint-disable-next-line vue/prop-name-casing\n\t'prepend:icon'?: string;\n\n\tpreserveScroll?: boolean | ((props: { [key: string]: unknown }) => boolean);\n\n\tpreserveState?:\n\t\t| boolean\n\t\t| ((props: { [key: string]: unknown }) => boolean)\n\t\t| null;\n\n\tqueryStringArrayFormat?: 'brackets' | 'indices';\n\n\t/**\n\t * Sets or retrieves the relationship between the object and the destination of the link.\n\t */\n\trel?: HTMLAnchorElement['rel'];\n\n\t/**\n\t * Calls `router.replace` instead of `router.push`.\n\t */\n\treplace?: boolean;\n\n\t/**\n\t * Any HTML tag corresponding to a non-void HTMl element.\n\t */\n\ttag?: string;\n\n\t/**\n\t * Sets or retrieves the window or frame at which to target content.\n\t */\n\ttarget?: HTMLAnchorElement['target'];\n\n\t/**\n\t * Text content of the component.\n\t */\n\ttext?: string;\n\n\t/**\n\t * Route Location the link should navigate to when clicked on.\n\t */\n\tto?: RouteLocationRaw;\n\n\t/**\n\t * Gets the classification and default behavior of the button.\n\t */\n\ttype?: HTMLButtonElement['type'];\n};\nconst props = withDefaults(defineProps<BbButtonProps>(), {\n\tautoLoading: true,\n\tdisabledWhileLoading: true,\n});\n\ndefineSlots<{\n\tdefault?: (props: object) => any;\n}>();\n\nconst internalLoading = ref(0);\n\nconst loading = computed(\n\t() => props.loading || (!!internalLoading.value && props.autoLoading)\n);\n\nconst disabled = computed(() => props.disabled);\n\nconst { onClick: baseOnClick = noop, ...restAttrs } = useAttrs();\n\nconst onClick = async (...args: any[]) => {\n\tif (loading.value && props.disabledWhileLoading) return;\n\tinternalLoading.value++;\n\tawait (<(...args: any[]) => any>baseOnClick)(...args);\n\tinternalLoading.value--;\n};\n\nconst propsToPass = toRef(() => ({\n\t...pickBy(\n\t\tprops,\n\t\t(_, key) =>\n\t\t\t![\n\t\t\t\t'append:icon',\n\t\t\t\t'disabled',\n\t\t\t\t'autoLoading',\n\t\t\t\t'disabledWhileLoading',\n\t\t\t\t'icon',\n\t\t\t\t'loading',\n\t\t\t\t'prepend:icon',\n\t\t\t].includes(key)\n\t),\n\t...restAttrs,\n}));\n</script>\n<style lang=\"postcss\">\n@import '@/assets/css/BbButton';\n</style>\n"],"names":["props","__props","internalLoading","ref","loading","computed","disabled","baseOnClick","noop","restAttrs","useAttrs","onClick","args","propsToPass","toRef","pickBy","_","key"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyLA,UAAMA,IAAQC,GASRC,IAAkBC,EAAI,CAAC,GAEvBC,IAAUC;AAAA,MACf,MAAML,EAAM,WAAY,CAAC,CAACE,EAAgB,SAASF,EAAM;AAAA,IAAA,GAGpDM,IAAWD,EAAS,MAAML,EAAM,QAAQ,GAExC,EAAE,SAASO,IAAcC,GAAM,GAAGC,EAAA,IAAcC,KAEhDC,IAAU,UAAUC,MAAgB;AACrC,MAAAR,EAAQ,SAASJ,EAAM,yBACXE,EAAA,SACgB,MAAAK,EAAa,GAAGK,CAAI,GACpCV,EAAA;AAAA,IAAA,GAGXW,IAAcC,EAAM,OAAO;AAAA,MAChC,GAAGC;AAAA,QACFf;AAAA,QACA,CAACgB,GAAGC,MACH,CAAC;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QAAA,EACC,SAASA,CAAG;AAAA,MAChB;AAAA,MACA,GAAGR;AAAA,IACF,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index58.js","sources":["../src/components/BbBreadcrumbs/BbBreadcrumbs.vue"],"sourcesContent":["<template>\n\t<nav aria-label=\"Breadcrumbs\" class=\"bb-breadcrumbs\">\n\t\t<template v-for=\"(item, index) in items\" :key=\"item.key\">\n\t\t\t<span class=\"bb-breadcrumbs__breadcrumb-container\">\n\t\t\t\t<slot\n\t\t\t\t\t:disabled=\"!!(item.disabled || disabled)\"\n\t\t\t\t\t:index=\"index\"\n\t\t\t\t\t:item=\"items[index]\"\n\t\t\t\t\t:name=\"`item:prepend`\"\n\t\t\t\t\t:text=\"item.text\"\n\t\t\t\t></slot>\n\t\t\t\t<BaseButton\n\t\t\t\t\tv-bind=\"item\"\n\t\t\t\t\tclass=\"bb-breadcrumbs__breadcrumb\"\n\t\t\t\t\t:disabled=\"item.disabled || disabled\"\n\t\t\t\t>\n\t\t\t\t\t<slot\n\t\t\t\t\t\t:disabled=\"!!(item.disabled || disabled)\"\n\t\t\t\t\t\t:index=\"index\"\n\t\t\t\t\t\t:item=\"items[index]\"\n\t\t\t\t\t\t:name=\"`${item.key}`\"\n\t\t\t\t\t\t:text=\"item.text\"\n\t\t\t\t\t></slot>\n\t\t\t\t</BaseButton>\n\t\t\t\t<slot\n\t\t\t\t\t:disabled=\"!!(item.disabled || disabled)\"\n\t\t\t\t\t:index=\"index\"\n\t\t\t\t\t:item=\"items[index]\"\n\t\t\t\t\t:name=\"`item:append`\"\n\t\t\t\t\t:text=\"item.text\"\n\t\t\t\t></slot>\n\t\t\t</span>\n\t\t\t<span aria-hidden=\"true\" class=\"bb-breadcrumbs__divider\"\n\t\t\t\t><slot name=\"divider\">{{ props.divider }}</slot></span\n\t\t\t>\n\t\t</template>\n\t</nav>\n</template>\n\n<script setup lang=\"ts\">\nimport type { CommonProps } from '@/types/CommonProps';\nimport BaseButton from '../BaseButton/BaseButton.vue';\nimport type { BaseButtonProps } from '../BaseButton/BaseButton.vue';\n\nexport type Item = Omit<BaseButtonProps, 'block' | 'tag' | 'type'> & {\n\t/**\n\t * Click handler of the button\n\t */\n\tonClick?: (...args: any[]) => any;\n\t/**\n\t * Key that uniquely identifies the breadcrumb\n\t */\n\tkey: string | number;\n};\n\nexport type BbBreadcrumbsProps = Pick<CommonProps, 'disabled'> & {\n\t/**\n\t * Array of items that describe how the breadcrumbs\n\t * should behave. It is compatible with navigating\n\t * through `a` or `router-link`.\n\t */\n\titems: Item[];\n\t/**\n\t * Text content of the divider\n\t */\n\tdivider?: string;\n};\n\nconst props = withDefaults(defineProps<BbBreadcrumbsProps>(), {\n\tdivider: '/',\n});\n\ndefineSlots<\n\t{\n\t\t'item:prepend'?: (props: {\n\t\t\tdisabled: boolean;\n\t\t\tindex: number;\n\t\t\titem: Item;\n\t\t\ttext?: string;\n\t\t}) => any;\n\t\t'item:append'?: (props: {\n\t\t\tdisabled: boolean;\n\t\t\tindex: number;\n\t\t\titem: Item;\n\t\t\ttext?: string;\n\t\t}) => any;\n\t\tdivider?: (props: object) => any;\n\t} & {\n\t\t[key: string]: (props: {\n\t\t\tdisabled: boolean;\n\t\t\tindex: number;\n\t\t\titem: Item;\n\t\t\ttext?: string;\n\t\t}) => any;\n\t}\n>();\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbBreadcrumbs';\n</style>\n"],"names":["props","__props"],"mappings":";;;;;;;;;;;;;;;;;AAoEA,UAAMA,IAAQC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index6.js CHANGED
@@ -1,65 +1,43 @@
1
- import { getAsPercentage as p } from "./index125.js";
2
- import { wait as w } from "./index126.js";
3
- import { ref as c, computed as o, onBeforeUnmount as H } from "vue";
4
- const Y = ({
5
- duration: t,
6
- onStart: f,
7
- onFinish: i,
8
- onStop: s
9
- }) => {
10
- if (!t)
11
- throw new Error("You must define a duration for the coundown");
12
- const e = c(t), u = c(0), M = o(() => p(u.value, t)), m = 100, r = c(!1), n = c(!1);
13
- let a;
14
- const I = () => {
15
- u.value === t || r.value && !n.value || (f && f(), n.value = !1, r.value = !0, a = setInterval(() => {
16
- e.value = Math.max(e.value - m, 0), u.value = Math.min(u.value + m, t), e.value === 0 && w(0).then(() => {
17
- clearInterval(a), r.value = !1, s && s(), i && i();
1
+ import { ref as i, onBeforeUnmount as h } from "vue";
2
+ const b = (l = "bitboss-ui") => {
3
+ let r = 0;
4
+ return { useBroadCastChannel: () => {
5
+ r++;
6
+ const f = i(!1), o = i(), s = {};
7
+ function d(e, n = void 0) {
8
+ o.value && o.value.postMessage({ type: e, params: n });
9
+ }
10
+ const v = () => {
11
+ r--, o.value && !r && o.value.close(), f.value = !0;
12
+ }, p = (e, n, a = {
13
+ removeonUnmount: !0
14
+ }) => {
15
+ var t;
16
+ s[e] === void 0 && (s[e] = []), (t = s[e]) == null || t.push(n), a.removeonUnmount && s[e] && h(() => {
17
+ const c = s[e], u = c.indexOf(n);
18
+ u !== -1 && c.splice(u, 1);
18
19
  });
19
- }, m));
20
- }, d = () => {
21
- A(), I();
22
- }, A = () => {
23
- a && clearInterval(a), n.value || s && s(), e.value = t, u.value = 0, r.value = !1, n.value = !1;
24
- }, g = () => {
25
- a && clearInterval(a), n.value || s && s(), n.value = !0;
26
- }, y = o(() => {
27
- const l = Math.trunc(e.value / 864e5), v = Math.trunc((e.value - l * 864e5) / 36e5), h = Math.trunc(
28
- (e.value - v * 36e5 - l * 864e5) / 6e4
29
- ), D = Math.trunc(
30
- (e.value - h * 6e4 - v * 36e5 - l * 864e5) / 1e3
31
- );
20
+ };
21
+ try {
22
+ o.value = new BroadcastChannel(l), o.value.addEventListener(
23
+ "message",
24
+ (e) => {
25
+ const n = e.data, a = s[n.type] ?? [];
26
+ "params" in n ? a.forEach((t) => t(n.params)) : a.forEach((t) => t());
27
+ },
28
+ { passive: !0 }
29
+ );
30
+ } catch (e) {
31
+ console.error(e);
32
+ }
32
33
  return {
33
- days: l,
34
- hours: v,
35
- minutes: h,
36
- seconds: D
34
+ on: p,
35
+ post: d,
36
+ close: v
37
37
  };
38
- });
39
- return H(() => clearInterval(a)), {
40
- /** Elapsed milliseconds since starting the timer */
41
- elapsed: o(() => u.value),
42
- /** Remaining milliseconds */
43
- remaining: o(() => e.value),
44
- /** Remaining as a formatted object for display */
45
- remainingFormatted: y,
46
- /** Percentage of elapsed time against duration */
47
- progress: M,
48
- /** Starts the timer */
49
- start: I,
50
- /** Reset the timer to intiial state and starts again */
51
- restart: d,
52
- /** Pauses the timer */
53
- pause: g,
54
- /** Reset the timer to initial state, if the timer is running it is stopped */
55
- reset: A,
56
- /** Boolean, is the timer running (paused doesn't change running state) */
57
- running: r,
58
- /** Boolean is the timer paused */
59
- paused: n
60
- };
38
+ } };
61
39
  };
62
40
  export {
63
- Y as useCountdown
41
+ b as useBroadcastChannelInstance
64
42
  };
65
43
  //# sourceMappingURL=index6.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index6.js","sources":["../src/composables/useCountdown.ts"],"sourcesContent":["import { getAsPercentage } from '@/utilities/functions/percentage';\nimport { wait } from '@/utilities/functions/wait';\nimport { computed, onBeforeUnmount, ref } from 'vue';\n\ntype CounterParams = {\n\t/** Longevity of the countdown in milliseconds */\n\tduration: number;\n\t/** Function called every time the countdown starts or restarts */\n\tonStart?: (...args: any[]) => any;\n\t/** Function called anytime the timer stops or pauses */\n\tonStop?: (...args: any[]) => any;\n\t/** Function called on completion */\n\tonFinish?: (...args: any[]) => any;\n};\nexport const useCountdown = ({\n\tduration,\n\tonStart,\n\tonFinish,\n\tonStop,\n}: CounterParams) => {\n\tif (!duration) {\n\t\tthrow new Error('You must define a duration for the coundown');\n\t}\n\tconst remaining = ref(duration);\n\tconst elapsed = ref(0);\n\tconst progress = computed(() => getAsPercentage(elapsed.value, duration));\n\tconst tick = 100;\n\tconst running = ref(false);\n\tconst paused = ref(false);\n\n\tlet timeoutID: ReturnType<typeof setInterval>;\n\n\tconst start = () => {\n\t\tif (elapsed.value === duration || (running.value && !paused.value)) return;\n\t\tif (onStart) onStart();\n\t\tpaused.value = false;\n\t\trunning.value = true;\n\n\t\ttimeoutID = setInterval(() => {\n\t\t\tremaining.value = Math.max(remaining.value - tick, 0);\n\t\t\telapsed.value = Math.min(elapsed.value + tick, duration);\n\n\t\t\tif (remaining.value === 0) {\n\t\t\t\twait(0).then(() => {\n\t\t\t\t\tclearInterval(timeoutID);\n\t\t\t\t\trunning.value = false;\n\t\t\t\t\tif (onStop) onStop();\n\t\t\t\t\tif (onFinish) onFinish();\n\t\t\t\t});\n\t\t\t}\n\t\t}, tick);\n\t};\n\n\tconst restart = () => {\n\t\treset();\n\t\tstart();\n\t};\n\n\tconst reset = () => {\n\t\tif (timeoutID) clearInterval(timeoutID);\n\t\tif (!paused.value) {\n\t\t\tif (onStop) onStop();\n\t\t}\n\t\tremaining.value = duration;\n\t\telapsed.value = 0;\n\t\trunning.value = false;\n\t\tpaused.value = false;\n\t};\n\n\tconst pause = () => {\n\t\tif (timeoutID) clearInterval(timeoutID);\n\t\tif (!paused.value) {\n\t\t\tif (onStop) onStop();\n\t\t}\n\t\tpaused.value = true;\n\t};\n\n\tconst remainingFormatted = computed(() => {\n\t\tconst msInADay = 1000 * 60 * 60 * 24;\n\t\tconst msInAnHour = 1000 * 60 * 60;\n\t\tconst msInAMinute = 1000 * 60;\n\t\tconst msInASecond = 1000;\n\n\t\tconst days = Math.trunc(remaining.value / msInADay);\n\t\tconst hours = Math.trunc((remaining.value - days * msInADay) / msInAnHour);\n\t\tconst minutes = Math.trunc(\n\t\t\t(remaining.value - hours * msInAnHour - days * msInADay) / msInAMinute\n\t\t);\n\t\tconst seconds = Math.trunc(\n\t\t\t(remaining.value -\n\t\t\t\tminutes * msInAMinute -\n\t\t\t\thours * msInAnHour -\n\t\t\t\tdays * msInADay) /\n\t\t\t\tmsInASecond\n\t\t);\n\t\treturn {\n\t\t\tdays,\n\t\t\thours,\n\t\t\tminutes,\n\t\t\tseconds,\n\t\t};\n\t});\n\n\tonBeforeUnmount(() => clearInterval(timeoutID));\n\n\treturn {\n\t\t/** Elapsed milliseconds since starting the timer */\n\t\telapsed: computed(() => elapsed.value),\n\t\t/** Remaining milliseconds */\n\t\tremaining: computed(() => remaining.value),\n\t\t/** Remaining as a formatted object for display */\n\t\tremainingFormatted,\n\t\t/** Percentage of elapsed time against duration */\n\t\tprogress,\n\t\t/** Starts the timer */\n\t\tstart,\n\t\t/** Reset the timer to intiial state and starts again */\n\t\trestart,\n\t\t/** Pauses the timer */\n\t\tpause,\n\t\t/** Reset the timer to initial state, if the timer is running it is stopped */\n\t\treset,\n\t\t/** Boolean, is the timer running (paused doesn't change running state) */\n\t\trunning,\n\t\t/** Boolean is the timer paused */\n\t\tpaused,\n\t};\n};\n"],"names":["useCountdown","duration","onStart","onFinish","onStop","remaining","ref","elapsed","progress","computed","getAsPercentage","tick","running","paused","timeoutID","start","wait","restart","reset","pause","remainingFormatted","days","hours","minutes","seconds","onBeforeUnmount"],"mappings":";;;AAcO,MAAMA,IAAe,CAAC;AAAA,EAC5B,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AACD,MAAqB;AACpB,MAAI,CAACH;AACE,UAAA,IAAI,MAAM,6CAA6C;AAExD,QAAAI,IAAYC,EAAIL,CAAQ,GACxBM,IAAUD,EAAI,CAAC,GACfE,IAAWC,EAAS,MAAMC,EAAgBH,EAAQ,OAAON,CAAQ,CAAC,GAClEU,IAAO,KACPC,IAAUN,EAAI,EAAK,GACnBO,IAASP,EAAI,EAAK;AAEpB,MAAAQ;AAEJ,QAAMC,IAAQ,MAAM;AACnB,IAAIR,EAAQ,UAAUN,KAAaW,EAAQ,SAAS,CAACC,EAAO,UACxDX,KAAiBA,KACrBW,EAAO,QAAQ,IACfD,EAAQ,QAAQ,IAEhBE,IAAY,YAAY,MAAM;AAC7B,MAAAT,EAAU,QAAQ,KAAK,IAAIA,EAAU,QAAQM,GAAM,CAAC,GACpDJ,EAAQ,QAAQ,KAAK,IAAIA,EAAQ,QAAQI,GAAMV,CAAQ,GAEnDI,EAAU,UAAU,KAClBW,EAAA,CAAC,EAAE,KAAK,MAAM;AAClB,sBAAcF,CAAS,GACvBF,EAAQ,QAAQ,IACZR,KAAeA,KACfD,KAAmBA;MAAA,CACvB;AAAA,OAEAQ,CAAI;AAAA,EAAA,GAGFM,IAAU,MAAM;AACf,IAAAC,KACAH;EAAA,GAGDG,IAAQ,MAAM;AACf,IAAAJ,mBAAyBA,CAAS,GACjCD,EAAO,SACPT,KAAeA,KAEpBC,EAAU,QAAQJ,GAClBM,EAAQ,QAAQ,GAChBK,EAAQ,QAAQ,IAChBC,EAAO,QAAQ;AAAA,EAAA,GAGVM,IAAQ,MAAM;AACf,IAAAL,mBAAyBA,CAAS,GACjCD,EAAO,SACPT,KAAeA,KAEpBS,EAAO,QAAQ;AAAA,EAAA,GAGVO,IAAqBX,EAAS,MAAM;AAMzC,UAAMY,IAAO,KAAK,MAAMhB,EAAU,QAAQ,KAAQ,GAC5CiB,IAAQ,KAAK,OAAOjB,EAAU,QAAQgB,IAAO,SAAY,IAAU,GACnEE,IAAU,KAAK;AAAA,OACnBlB,EAAU,QAAQiB,IAAQ,OAAaD,IAAO,SAAY;AAAA,IAAA,GAEtDG,IAAU,KAAK;AAAA,OACnBnB,EAAU,QACVkB,IAAU,MACVD,IAAQ,OACRD,IAAO,SACP;AAAA,IAAA;AAEK,WAAA;AAAA,MACN,MAAAA;AAAA,MACA,OAAAC;AAAA,MACA,SAAAC;AAAA,MACA,SAAAC;AAAA,IAAA;AAAA,EACD,CACA;AAEe,SAAAC,EAAA,MAAM,cAAcX,CAAS,CAAC,GAEvC;AAAA;AAAA,IAEN,SAASL,EAAS,MAAMF,EAAQ,KAAK;AAAA;AAAA,IAErC,WAAWE,EAAS,MAAMJ,EAAU,KAAK;AAAA;AAAA,IAEzC,oBAAAe;AAAA;AAAA,IAEA,UAAAZ;AAAA;AAAA,IAEA,OAAAO;AAAA;AAAA,IAEA,SAAAE;AAAA;AAAA,IAEA,OAAAE;AAAA;AAAA,IAEA,OAAAD;AAAA;AAAA,IAEA,SAAAN;AAAA;AAAA,IAEA,QAAAC;AAAA,EAAA;AAEF;"}
1
+ {"version":3,"file":"index6.js","sources":["../src/composables/useBroadcastChannelInstance.ts"],"sourcesContent":["import { onBeforeUnmount, ref } from 'vue';\n\ntype MessageMap = { [key: string]: any };\n\ntype Message<T extends MessageMap> = {\n\t[Name in keyof T]: T[Name] extends void\n\t\t? { type: Name }\n\t\t: { type: Name; params: T[Name] };\n}[keyof T];\n\nexport const useBroadcastChannelInstance = <T extends MessageMap>(\n\tname = 'bitboss-ui'\n) => {\n\tlet instances = 0;\n\tconst useBroadCastChannel = () => {\n\t\tinstances++;\n\n\t\tconst isClosed = ref(false);\n\t\tconst channel = ref<BroadcastChannel | undefined>();\n\t\tconst subscribers: Partial<Record<keyof T, ((...args: any[]) => any)[]>> =\n\t\t\t{};\n\n\t\tfunction post<Key extends keyof T>(message: Key, params: T[Key]): void;\n\t\tfunction post<Key extends keyof T>(message: Key, params?: never): void;\n\t\tfunction post(message: keyof T, params: any = undefined) {\n\t\t\tif (channel.value) channel.value.postMessage({ type: message, params });\n\t\t}\n\n\t\tconst close = () => {\n\t\t\tinstances--;\n\t\t\tif (channel.value && !instances) {\n\t\t\t\tchannel.value.close();\n\t\t\t}\n\t\t\tisClosed.value = true;\n\t\t};\n\n\t\tconst on = <Key extends keyof T>(\n\t\t\tmessage: Key,\n\t\t\tfn: T[Key] extends void ? () => any : (arg: T[Key]) => any,\n\t\t\toptions: {\n\t\t\t\tremoveonUnmount: boolean;\n\t\t\t} = {\n\t\t\t\tremoveonUnmount: true,\n\t\t\t}\n\t\t) => {\n\t\t\tif (subscribers[message] === undefined) subscribers[message] = [];\n\n\t\t\tsubscribers[message]?.push(fn);\n\t\t\tif (options.removeonUnmount && subscribers[message]) {\n\t\t\t\tonBeforeUnmount(() => {\n\t\t\t\t\tconst arr = subscribers[message]!;\n\t\t\t\t\tconst indexOfFn = arr.indexOf(fn);\n\t\t\t\t\tif (indexOfFn !== -1) {\n\t\t\t\t\t\tarr.splice(indexOfFn, 1);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t};\n\n\t\ttry {\n\t\t\tchannel.value = new BroadcastChannel(name);\n\n\t\t\tchannel.value.addEventListener(\n\t\t\t\t'message',\n\t\t\t\t(e: MessageEvent) => {\n\t\t\t\t\tconst data = e.data as Message<T>;\n\t\t\t\t\tconst subs = subscribers[data.type] ?? [];\n\t\t\t\t\tif ('params' in data) {\n\t\t\t\t\t\tsubs.forEach((s) => s(data.params));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsubs.forEach((s) => s());\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{ passive: true }\n\t\t\t);\n\t\t} catch (error) {\n\t\t\tconsole.error(error);\n\t\t}\n\n\t\treturn {\n\t\t\ton,\n\t\t\tpost,\n\t\t\tclose,\n\t\t};\n\t};\n\treturn { useBroadCastChannel };\n};\n"],"names":["useBroadcastChannelInstance","name","instances","isClosed","ref","channel","subscribers","post","message","params","close","on","fn","options","_a","onBeforeUnmount","arr","indexOfFn","data","subs","s","error"],"mappings":";AAUa,MAAAA,IAA8B,CAC1CC,IAAO,iBACH;AACJ,MAAIC,IAAY;AAwEhB,SAAO,EAAE,qBAvEmB,MAAM;AACjC,IAAAA;AAEM,UAAAC,IAAWC,EAAI,EAAK,GACpBC,IAAUD,KACVE,IACL,CAAA;AAIQ,aAAAC,EAAKC,GAAkBC,IAAc,QAAW;AACpD,MAAAJ,EAAQ,SAAeA,EAAA,MAAM,YAAY,EAAE,MAAMG,GAAS,QAAAC,EAAA,CAAQ;AAAA,IACvE;AAEA,UAAMC,IAAQ,MAAM;AACnB,MAAAR,KACIG,EAAQ,SAAS,CAACH,KACrBG,EAAQ,MAAM,SAEfF,EAAS,QAAQ;AAAA,IAAA,GAGZQ,IAAK,CACVH,GACAI,GACAC,IAEI;AAAA,MACH,iBAAiB;AAAA,IAAA,MAEd;;AACJ,MAAIP,EAAYE,CAAO,MAAM,WAAuBF,EAAAE,CAAO,IAAI,MAEnDM,IAAAR,EAAAE,CAAO,MAAP,QAAAM,EAAU,KAAKF,IACvBC,EAAQ,mBAAmBP,EAAYE,CAAO,KACjDO,EAAgB,MAAM;AACf,cAAAC,IAAMV,EAAYE,CAAO,GACzBS,IAAYD,EAAI,QAAQJ,CAAE;AAChC,QAAIK,MAAc,MACbD,EAAA,OAAOC,GAAW,CAAC;AAAA,MACxB,CACA;AAAA,IACF;AAGG,QAAA;AACK,MAAAZ,EAAA,QAAQ,IAAI,iBAAiBJ,CAAI,GAEzCI,EAAQ,MAAM;AAAA,QACb;AAAA,QACA,CAAC,MAAoB;AACpB,gBAAMa,IAAO,EAAE,MACTC,IAAOb,EAAYY,EAAK,IAAI,KAAK,CAAA;AACvC,UAAI,YAAYA,IACfC,EAAK,QAAQ,CAACC,MAAMA,EAAEF,EAAK,MAAM,CAAC,IAElCC,EAAK,QAAQ,CAACC,MAAMA,EAAG,CAAA;AAAA,QAEzB;AAAA,QACA,EAAE,SAAS,GAAK;AAAA,MAAA;AAAA,aAETC,GAAO;AACf,cAAQ,MAAMA,CAAK;AAAA,IACpB;AAEO,WAAA;AAAA,MACN,IAAAV;AAAA,MACA,MAAAJ;AAAA,MACA,OAAAG;AAAA,IAAA;AAAA,EACD,EAE4B;AAC9B;"}
package/dist/index60.js CHANGED
@@ -1,101 +1,115 @@
1
- import { defineComponent as f, ref as v, computed as y, openBlock as k, createBlock as w, withCtx as r, renderSlot as n, normalizeProps as B, guardReactiveProps as V, createVNode as g, mergeProps as i } from "vue";
2
- import P from "./index14.js";
1
+ import { defineComponent as f, ref as g, computed as c, useAttrs as v, toRef as B, openBlock as n, createBlock as a, unref as p, mergeProps as k, withCtx as h, createVNode as C, createCommentVNode as l, createElementVNode as L, renderSlot as S, createTextVNode as x, toDisplayString as A, createElementBlock as V } from "vue";
2
+ /* empty css */
3
+ /* empty css */
4
+ /* empty css */
5
+ import F from "./index14.js";
3
6
  /* empty css */
4
- import C from "./index24.js";
5
- /* empty css */
6
- const M = /* @__PURE__ */ f({
7
- __name: "BbCheckbox",
7
+ import r from "./index123.js";
8
+ /* empty css */
9
+ import N from "./index125.js";
10
+ /* empty css */
11
+ import { pickBy as $ } from "./index242.js";
12
+ import { noop as P } from "./index243.js";
13
+ const T = { class: "bb-button__content" }, W = {
14
+ key: 2,
15
+ class: "bb-button__loading-label"
16
+ }, K = /* @__PURE__ */ f({
17
+ inheritAttrs: !1,
18
+ __name: "BbButton",
8
19
  props: {
9
- autofocus: {},
10
- checked: { type: [Boolean, String] },
11
- color: {},
12
- direction: { default: "auto" },
20
+ autoLoading: { type: Boolean, default: !0 },
21
+ activeClass: {},
22
+ ariaCurrentValue: {},
23
+ "append:icon": {},
24
+ block: { type: Boolean },
25
+ data: {},
13
26
  disabled: { type: Boolean },
14
- errors: {},
15
- falseValue: {},
16
- hasErrors: { type: Boolean },
17
- hideLabel: { type: Boolean },
18
- hint: {},
19
- id: {},
20
- indeterminate: {},
21
- inputPosition: { default: "left" },
22
- label: {},
23
- labelPosition: {},
24
- modelValue: {},
25
- name: {},
26
- persistentHint: { type: Boolean },
27
- readonly: {},
28
- required: { type: Boolean },
29
- reverse: { type: Boolean, default: !0 },
30
- submitWhenFalse: { type: Boolean },
31
- trueValue: {}
27
+ disabledWhileLoading: { type: Boolean, default: !0 },
28
+ exactActiveClass: {},
29
+ headers: {},
30
+ href: {},
31
+ icon: {},
32
+ loading: { type: Boolean },
33
+ method: {},
34
+ onBefore: {},
35
+ onCancel: {},
36
+ onCancelToken: {},
37
+ onFinish: {},
38
+ only: {},
39
+ onProgress: {},
40
+ onStart: {},
41
+ onSuccess: {},
42
+ "prepend:icon": {},
43
+ preserveScroll: { type: [Boolean, Function] },
44
+ preserveState: { type: [Boolean, Function, null] },
45
+ queryStringArrayFormat: {},
46
+ rel: {},
47
+ replace: { type: Boolean },
48
+ tag: {},
49
+ target: {},
50
+ text: {},
51
+ to: {},
52
+ type: {}
32
53
  },
33
- emits: ["blur", "change", "click", "focus", "input", "keydown", "mousedown", "mouseup", "update:modelValue"],
34
- setup(s, { emit: t }) {
35
- const u = s, o = t, a = v(!1), d = y(() => u.persistentHint || a.value), p = {
36
- onBlur: (e) => {
37
- a.value = !1, o("blur", e);
38
- },
39
- onChange: (e) => o("change", e),
40
- onClick: (e) => o("click", e),
41
- onFocus: (e) => {
42
- a.value = !0, o("focus", e);
54
+ setup(d) {
55
+ const e = d, i = g(0), t = c(
56
+ () => e.loading || !!i.value && e.autoLoading
57
+ ), u = c(() => e.disabled), { onClick: b = P, ...m } = v(), _ = async (...o) => {
58
+ t.value && e.disabledWhileLoading || (i.value++, await b(...o), i.value--);
59
+ }, y = B(() => ({
60
+ ...$(
61
+ e,
62
+ (o, s) => ![
63
+ "append:icon",
64
+ "disabled",
65
+ "autoLoading",
66
+ "disabledWhileLoading",
67
+ "icon",
68
+ "loading",
69
+ "prepend:icon"
70
+ ].includes(s)
71
+ ),
72
+ ...m
73
+ }));
74
+ return (o, s) => (n(), a(p(F), k(y.value, {
75
+ "aria-disabled": t.value ? !0 : void 0,
76
+ class: {
77
+ "bb-button": !0,
78
+ "bb-button--loading": t.value,
79
+ "bb-button--icon": !!o.icon
43
80
  },
44
- onInput: (e) => o("input", e),
45
- onKeydown: (e) => o("keydown", e),
46
- onMousedown: (e) => o("mousedown", e),
47
- onMouseup: (e) => o("mouseup", e),
48
- "onUpdate:modelValue": (e) => o("update:modelValue", e)
49
- };
50
- return (e, q) => (k(), w(C, {
51
- id: e.id,
52
- class: "bb-checkbox",
53
- direction: e.direction,
54
- errors: e.errors,
55
- "has-errors": e.hasErrors,
56
- "hide-label": e.hideLabel,
57
- hint: e.hint,
58
- "input-position": e.inputPosition,
59
- label: e.label,
60
- "label-position": e.labelPosition,
61
- "label-tag": "span",
62
- name: e.name,
63
- reverse: e.reverse,
64
- "show-hint": d.value,
65
- tag: "label"
66
- }, {
67
- label: r((l) => [
68
- n(e.$slots, "label", B(V(l)))
69
- ]),
70
- input: r(({ id: l, name: m, hasErrors: b, ariaDescribedby: h }) => [
71
- g(P, i({
72
- id: l,
73
- "aria-describedby": h,
74
- autofocus: e.autofocus,
75
- checked: e.checked,
76
- color: e.color,
77
- disabled: e.disabled,
78
- "false-value": e.falseValue,
79
- "has-errors": b,
80
- indeterminate: e.indeterminate,
81
- "model-value": e.modelValue,
82
- name: m,
83
- readonly: e.readonly,
84
- required: e.required,
85
- "submit-when-false": e.submitWhenFalse,
86
- "true-value": e.trueValue
87
- }, p), {
88
- icon: r((c) => [
89
- n(e.$slots, "icon", i(c, { text: e.label }))
90
- ]),
91
- _: 2
92
- }, 1040, ["id", "aria-describedby", "autofocus", "checked", "color", "disabled", "false-value", "has-errors", "indeterminate", "model-value", "name", "readonly", "required", "submit-when-false", "true-value"])
81
+ disabled: u.value,
82
+ tabindex: t.value ? -1 : void 0,
83
+ onClick: _
84
+ }), {
85
+ default: h(() => [
86
+ C(p(N), { class: "bb-button__spinner" }),
87
+ e.icon ? (n(), a(r, {
88
+ key: 0,
89
+ class: "bb-button__icon",
90
+ type: e.icon
91
+ }, null, 8, ["type"])) : e["prepend:icon"] ? (n(), a(r, {
92
+ key: 1,
93
+ class: "bb-button__prepend-icon",
94
+ type: e["prepend:icon"]
95
+ }, null, 8, ["type"])) : l("", !0),
96
+ L("span", T, [
97
+ S(o.$slots, "default", {}, () => [
98
+ x(A(o.text), 1)
99
+ ])
100
+ ]),
101
+ t.value ? (n(), V("span", W, "caricamento")) : l("", !0),
102
+ !o.icon && e["append:icon"] ? (n(), a(r, {
103
+ key: 3,
104
+ class: "bb-button__append-icon",
105
+ type: e["append:icon"]
106
+ }, null, 8, ["type"])) : l("", !0)
93
107
  ]),
94
108
  _: 3
95
- }, 8, ["id", "direction", "errors", "has-errors", "hide-label", "hint", "input-position", "label", "label-position", "name", "reverse", "show-hint"]));
109
+ }, 16, ["aria-disabled", "class", "disabled", "tabindex"]));
96
110
  }
97
111
  });
98
112
  export {
99
- M as default
113
+ K as default
100
114
  };
101
115
  //# sourceMappingURL=index60.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index60.js","sources":["../src/components/BbCheckbox/BbCheckbox.vue"],"sourcesContent":["<template>\n\t<BaseInputContainer\n\t\t:id=\"id\"\n\t\tclass=\"bb-checkbox\"\n\t\t:direction=\"direction\"\n\t\t:errors=\"errors\"\n\t\t:has-errors=\"hasErrors\"\n\t\t:hide-label=\"hideLabel\"\n\t\t:hint=\"hint\"\n\t\t:input-position=\"inputPosition\"\n\t\t:label=\"label\"\n\t\t:label-position=\"labelPosition\"\n\t\t:label-tag=\"'span'\"\n\t\t:name=\"name\"\n\t\t:reverse=\"reverse\"\n\t\t:show-hint=\"showHint\"\n\t\t:tag=\"'label'\"\n\t>\n\t\t<template #label=\"data\"><slot name=\"label\" v-bind=\"data\"></slot></template>\n\t\t<template #input=\"{ id, name, hasErrors, ariaDescribedby }\">\n\t\t\t<BaseCheckbox\n\t\t\t\t:id=\"id\"\n\t\t\t\t:aria-describedby=\"ariaDescribedby\"\n\t\t\t\t:autofocus=\"autofocus\"\n\t\t\t\t:checked=\"checked\"\n\t\t\t\t:color=\"color\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t:false-value=\"falseValue\"\n\t\t\t\t:has-errors=\"hasErrors\"\n\t\t\t\t:indeterminate=\"indeterminate\"\n\t\t\t\t:model-value=\"modelValue\"\n\t\t\t\t:name=\"name\"\n\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t:required=\"required\"\n\t\t\t\t:submit-when-false=\"submitWhenFalse\"\n\t\t\t\t:true-value=\"trueValue\"\n\t\t\t\tv-bind=\"eventListeners\"\n\t\t\t\t><template #icon=\"data\"\n\t\t\t\t\t><slot name=\"icon\" v-bind=\"data\" :text=\"label\" /></template\n\t\t\t></BaseCheckbox>\n\t\t</template>\n\t</BaseInputContainer>\n</template>\n\n<script setup lang=\"ts\">\nimport BaseCheckbox from '../BaseCheckbox/BaseCheckbox.vue';\nimport BaseInputContainer from '../BaseInputContainer/BaseInputContainer.vue';\nimport type {\n\tBaseCheckboxEvents,\n\tSlotAttributes,\n} from '../BaseCheckbox/BaseCheckbox.vue';\nimport {\n\tref,\n\ttype HTMLAttributes,\n\ttype InputHTMLAttributes,\n\tcomputed,\n} from 'vue';\n\nexport type BbCheckboxProps = {\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Defines the input as checked\n\t */\n\tchecked?: boolean | 'true' | 'false';\n\n\t/**\n\t * Define a color for the component.\n\t *\n\t * Either a custom color or a coded color in common HEX, RGB, etc... format.\n\t */\n\tcolor?: string;\n\n\t/**\n\t * Direction of the layout of the component. Can either be a predefined value or a pattern separated by a space like `xx xxxxx`.\n\t */\n\tdirection?: 'horizontal' | 'vertical' | 'auto' | string;\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Can be a string or an array of string containing the messages to display.\n\t */\n\terrors?: string | string[];\n\n\t/**\n\t * Value of the input when unchecked. It handles any kind of serializable object.\n\t */\n\tfalseValue?: any;\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * Visually hides the label of the input while maintaining accessibility.\n\t */\n\thideLabel?: boolean;\n\n\t/**\n\t * Text box to be displayed near the input, usually to indicate instructions.\n\t */\n\thint?: string;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Sets the input in an indeterminate state.\n\t */\n\tindeterminate?: InputHTMLAttributes['indeterminate'];\n\n\t/**\n\t * Sets the slignment of the input. Since inputs are inline block they can be aligned just as text can.\n\t */\n\tinputPosition?: 'left' | 'center' | 'right';\n\n\t/**\n\t * Text content of the label of the element.\n\t */\n\tlabel: string;\n\n\t/**\n\t * Sets the text alignment of the label.\n\t */\n\tlabelPosition?: 'left' | 'center' | 'right';\n\n\t/**\n\t * Used by v-model. Can be any serializable type.\n\t */\n\tmodelValue?: any;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname?: InputHTMLAttributes['name'];\n\n\t/**\n\t * Keeps the hint displayed.\n\t */\n\tpersistentHint?: boolean;\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: InputHTMLAttributes['readonly'];\n\n\t/**\n\t * Sets the input as required.\n\t */\n\trequired?: boolean;\n\n\t/**\n\t * Reverses the layout. Applicable in every direction the order of the label and the input is swapped.\n\t */\n\treverse?: boolean;\n\n\t/**\n\t * Will submit \"falseValue\" if the input is not checked. Otherwise \"trueValue\" will be submitted.\n\t */\n\tsubmitWhenFalse?: boolean;\n\n\t/**\n\t * Value of the input when checked. It handles any kind of serializable object.\n\t */\n\ttrueValue?: any;\n};\n\nexport type BbCheckboxEvents = BaseCheckboxEvents;\n\nconst props = withDefaults(defineProps<BbCheckboxProps>(), {\n\tdirection: 'auto',\n\treverse: true,\n\tinputPosition: 'left',\n});\n\nconst emit = defineEmits<BbCheckboxEvents>();\n\ndefineSlots<{\n\tlabel?: (props: { text: string; hasErrors: boolean }) => any;\n\ticon?: (props: SlotAttributes & { text: string }) => any;\n}>();\n\nconst active = ref(false);\nconst showHint = computed(() => props.persistentHint || active.value);\n\nconst eventListeners = {\n\tonBlur: (event: FocusEvent) => {\n\t\tactive.value = false;\n\t\temit('blur', event);\n\t},\n\tonChange: (event: Event) => emit('change', event),\n\tonClick: (event: MouseEvent) => emit('click', event),\n\tonFocus: (event: FocusEvent) => {\n\t\tactive.value = true;\n\t\temit('focus', event);\n\t},\n\tonInput: (event: Event) => emit('input', event),\n\tonKeydown: (event: KeyboardEvent) => emit('keydown', event),\n\tonMousedown: (event: MouseEvent) => emit('mousedown', event),\n\tonMouseup: (event: MouseEvent) => emit('mouseup', event),\n\t'onUpdate:modelValue': (value: any) => emit('update:modelValue', value),\n};\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbCheckbox';\n</style>\n"],"names":["props","__props","emit","__emit","active","ref","showHint","computed","eventListeners","event","value"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoLA,UAAMA,IAAQC,GAMRC,IAAOC,GAOPC,IAASC,EAAI,EAAK,GAClBC,IAAWC,EAAS,MAAMP,EAAM,kBAAkBI,EAAO,KAAK,GAE9DI,IAAiB;AAAA,MACtB,QAAQ,CAACC,MAAsB;AAC9B,QAAAL,EAAO,QAAQ,IACfF,EAAK,QAAQO,CAAK;AAAA,MACnB;AAAA,MACA,UAAU,CAACA,MAAiBP,EAAK,UAAUO,CAAK;AAAA,MAChD,SAAS,CAACA,MAAsBP,EAAK,SAASO,CAAK;AAAA,MACnD,SAAS,CAACA,MAAsB;AAC/B,QAAAL,EAAO,QAAQ,IACfF,EAAK,SAASO,CAAK;AAAA,MACpB;AAAA,MACA,SAAS,CAACA,MAAiBP,EAAK,SAASO,CAAK;AAAA,MAC9C,WAAW,CAACA,MAAyBP,EAAK,WAAWO,CAAK;AAAA,MAC1D,aAAa,CAACA,MAAsBP,EAAK,aAAaO,CAAK;AAAA,MAC3D,WAAW,CAACA,MAAsBP,EAAK,WAAWO,CAAK;AAAA,MACvD,uBAAuB,CAACC,MAAeR,EAAK,qBAAqBQ,CAAK;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index60.js","sources":["../src/components/BbButton/BbButton.vue"],"sourcesContent":["<template>\n\t<BaseButton\n\t\tv-bind=\"propsToPass\"\n\t\t:aria-disabled=\"loading ? true : undefined\"\n\t\t:class=\"{\n\t\t\t'bb-button': true,\n\t\t\t'bb-button--loading': loading,\n\t\t\t'bb-button--icon': !!icon,\n\t\t}\"\n\t\t:disabled=\"disabled\"\n\t\t:tabindex=\"loading ? -1 : undefined\"\n\t\t@click=\"onClick\"\n\t>\n\t\t<BbSpinner class=\"bb-button__spinner\" />\n\t\t<BbIcon\n\t\t\tv-if=\"props['icon']\"\n\t\t\tclass=\"bb-button__icon\"\n\t\t\t:type=\"props['icon']\"\n\t\t/>\n\t\t<BbIcon\n\t\t\tv-else-if=\"props['prepend:icon']\"\n\t\t\tclass=\"bb-button__prepend-icon\"\n\t\t\t:type=\"props['prepend:icon']\"\n\t\t/>\n\t\t<span class=\"bb-button__content\"\n\t\t\t><slot>{{ text }}</slot></span\n\t\t>\n\t\t<span v-if=\"loading\" class=\"bb-button__loading-label\">caricamento</span>\n\n\t\t<BbIcon\n\t\t\tv-if=\"!icon && props['append:icon']\"\n\t\t\tclass=\"bb-button__append-icon\"\n\t\t\t:type=\"props['append:icon']\"\n\t\t/>\n\t</BaseButton>\n</template>\n\n<script setup lang=\"ts\">\nimport { BaseButton, BbSpinner } from '@/index';\nimport type { RouteLocationRaw } from 'vue-router';\nimport BbIcon from '../BbIcon/BbIcon.vue';\nimport { computed, ref, toRef, useAttrs } from 'vue';\nimport { pickBy } from '@/utilities/functions/pickBy';\nimport { noop } from '@/utilities/functions/noop';\n\ndefineOptions({\n\tinheritAttrs: false,\n});\n\nexport type BbButtonProps = {\n\t/**\n\t * Tracks tha loading status internally.\n\t */\n\tautoLoading?: boolean;\n\t/**\n\t * Class to apply when the link is active\n\t */\n\tactiveClass?: string;\n\n\t/**\n\t * Value passed to the attribute `aria-current` when the link is exact active.\n\t *\n\t * @defaultValue `'page'`\n\t */\n\tariaCurrentValue?:\n\t\t| 'page'\n\t\t| 'step'\n\t\t| 'location'\n\t\t| 'date'\n\t\t| 'time'\n\t\t| 'true'\n\t\t| 'false';\n\t/**\n\t * Icon to be added on the right of the text\n\t */\n\t// eslint-disable-next-line vue/prop-name-casing\n\t'append:icon'?: string;\n\t/**\n\t * Displays the component as full width.\n\t */\n\tblock?: boolean;\n\n\tdata?: object;\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Disables the click handler while the component is loading.\n\t */\n\tdisabledWhileLoading?: boolean;\n\n\t/**\n\t * Class to apply when the link is exact active\n\t */\n\texactActiveClass?: string;\n\n\theaders?: object;\n\n\t/**\n\t * Returns the hyperlink's URL.\n\t *\n\t * Can be set, to change the URL.\n\t */\n\thref?: HTMLAnchorElement['href'];\n\t/**\n\t * Used when only an icon with no text should be displayed\n\t */\n\ticon?: string;\n\n\t/**\n\t * Triggers a loading indicator\n\t */\n\tloading?: boolean;\n\n\tmethod?: 'get' | 'post' | 'put' | 'patch' | 'delete';\n\n\tonBefore?: () => void;\n\n\tonCancel?: () => void;\n\n\tonCancelToken?: (cancelToken: import('axios').CancelTokenSource) => void;\n\n\tonFinish?: () => void;\n\n\tonly?: string[];\n\n\tonProgress?: (progress: { percentage: number | undefined }) => void;\n\n\tonStart?: () => void;\n\n\tonSuccess?: () => void;\n\n\t/**\n\t * Icon to be added on the left of the text\n\t */\n\t// eslint-disable-next-line vue/prop-name-casing\n\t'prepend:icon'?: string;\n\n\tpreserveScroll?: boolean | ((props: { [key: string]: unknown }) => boolean);\n\n\tpreserveState?:\n\t\t| boolean\n\t\t| ((props: { [key: string]: unknown }) => boolean)\n\t\t| null;\n\n\tqueryStringArrayFormat?: 'brackets' | 'indices';\n\n\t/**\n\t * Sets or retrieves the relationship between the object and the destination of the link.\n\t */\n\trel?: HTMLAnchorElement['rel'];\n\n\t/**\n\t * Calls `router.replace` instead of `router.push`.\n\t */\n\treplace?: boolean;\n\n\t/**\n\t * Any HTML tag corresponding to a non-void HTMl element.\n\t */\n\ttag?: string;\n\n\t/**\n\t * Sets or retrieves the window or frame at which to target content.\n\t */\n\ttarget?: HTMLAnchorElement['target'];\n\n\t/**\n\t * Text content of the component.\n\t */\n\ttext?: string;\n\n\t/**\n\t * Route Location the link should navigate to when clicked on.\n\t */\n\tto?: RouteLocationRaw;\n\n\t/**\n\t * Gets the classification and default behavior of the button.\n\t */\n\ttype?: HTMLButtonElement['type'];\n};\nconst props = withDefaults(defineProps<BbButtonProps>(), {\n\tautoLoading: true,\n\tdisabledWhileLoading: true,\n});\n\ndefineSlots<{\n\tdefault?: (props: object) => any;\n}>();\n\nconst internalLoading = ref(0);\n\nconst loading = computed(\n\t() => props.loading || (!!internalLoading.value && props.autoLoading)\n);\n\nconst disabled = computed(() => props.disabled);\n\nconst { onClick: baseOnClick = noop, ...restAttrs } = useAttrs();\n\nconst onClick = async (...args: any[]) => {\n\tif (loading.value && props.disabledWhileLoading) return;\n\tinternalLoading.value++;\n\tawait (<(...args: any[]) => any>baseOnClick)(...args);\n\tinternalLoading.value--;\n};\n\nconst propsToPass = toRef(() => ({\n\t...pickBy(\n\t\tprops,\n\t\t(_, key) =>\n\t\t\t![\n\t\t\t\t'append:icon',\n\t\t\t\t'disabled',\n\t\t\t\t'autoLoading',\n\t\t\t\t'disabledWhileLoading',\n\t\t\t\t'icon',\n\t\t\t\t'loading',\n\t\t\t\t'prepend:icon',\n\t\t\t].includes(key)\n\t),\n\t...restAttrs,\n}));\n</script>\n<style lang=\"postcss\">\n@import '@/assets/css/BbButton';\n</style>\n"],"names":["props","__props","internalLoading","ref","loading","computed","disabled","baseOnClick","noop","restAttrs","useAttrs","onClick","args","propsToPass","toRef","pickBy","_","key"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyLA,UAAMA,IAAQC,GASRC,IAAkBC,EAAI,CAAC,GAEvBC,IAAUC;AAAA,MACf,MAAML,EAAM,WAAY,CAAC,CAACE,EAAgB,SAASF,EAAM;AAAA,IAAA,GAGpDM,IAAWD,EAAS,MAAML,EAAM,QAAQ,GAExC,EAAE,SAASO,IAAcC,GAAM,GAAGC,EAAA,IAAcC,KAEhDC,IAAU,UAAUC,MAAgB;AACrC,MAAAR,EAAQ,SAASJ,EAAM,yBACXE,EAAA,SACgB,MAAAK,EAAa,GAAGK,CAAI,GACpCV,EAAA;AAAA,IAAA,GAGXW,IAAcC,EAAM,OAAO;AAAA,MAChC,GAAGC;AAAA,QACFf;AAAA,QACA,CAACgB,GAAGC,MACH,CAAC;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QAAA,EACC,SAASA,CAAG;AAAA,MAChB;AAAA,MACA,GAAGR;AAAA,IACF,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}