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
@@ -1 +1 @@
1
- {"version":3,"file":"index89.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":"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,82 +1,23 @@
1
- const o = () => {
2
- }, h = ({
3
- resolvers: y,
4
- onSuccess: i = o,
5
- onCleared: m = o,
6
- onError: u = o,
7
- onCompleted: p = o,
8
- concurrency: c = 1
9
- }) => {
10
- let e = [], a = 0;
11
- const l = async () => {
12
- if (!(a > c))
13
- for (; a < c; ) {
14
- const t = e[a++];
15
- if (!t) {
16
- a--;
17
- return;
18
- }
19
- const n = y[t.type];
20
- if (!n)
21
- throw new Error(
22
- `No resolver defined for job type "${t.type.toString()}"`
23
- );
24
- new Promise(async (f) => {
25
- try {
26
- if ("params" in t) {
27
- const r = await n(t.params), s = {
28
- type: t.type,
29
- params: t.params,
30
- result: r
31
- };
32
- i(s);
33
- } else {
34
- const r = await n(void 0), s = {
35
- type: t.type,
36
- result: r
37
- };
38
- i(s);
39
- }
40
- } catch (r) {
41
- const s = {
42
- type: t.type,
43
- params: "params" in t ? t.params : void 0,
44
- error: r
45
- };
46
- u(s);
47
- } finally {
48
- const r = e.indexOf(t);
49
- if (e.splice(r, 1), a--, "params" in t) {
50
- const s = {
51
- type: t.type,
52
- params: t.params
53
- };
54
- p(s);
55
- } else {
56
- const s = {
57
- type: t.type
58
- };
59
- p(s);
60
- }
61
- }
62
- if (e.length) return f(new Promise(() => l()));
63
- m(), f(null);
64
- });
65
- }
66
- }, d = (...t) => {
67
- e.push(...t), l();
68
- };
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));
69
12
  return {
70
- addJobs: d,
71
- addIf: (t, n) => {
72
- n(e) && d(t);
73
- },
74
- filterJobs: (t) => {
75
- e = e.slice(0, a).concat(e.slice(a).filter(t));
76
- }
13
+ /**
14
+ * The generated id
15
+ */
16
+ id: t,
17
+ refresh: () => t.value = c(12)
77
18
  };
78
19
  };
79
20
  export {
80
- h as useQueue
21
+ l as useId
81
22
  };
82
23
  //# sourceMappingURL=index9.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index9.js","sources":["../src/composables/useQueue.ts"],"sourcesContent":["type Resolvers = Record<string, (arg: any) => any>;\n\ntype Jobs<T extends Resolvers> = {\n\t[Name in keyof T]: Parameters<T[Name]> extends [infer Arg]\n\t\t? { type: Name; params: Arg }\n\t\t: { type: Name };\n}[keyof T];\n\ntype OnSuccess<T extends Resolvers> = (\n\tdata: {\n\t\t[Name in keyof T]: {\n\t\t\tdata: Parameters<T[Name]> extends [infer Arg]\n\t\t\t\t? { type: Name; params: Arg; result: Awaited<ReturnType<T[Name]>> }\n\t\t\t\t: { type: Name; result: Awaited<ReturnType<T[Name]>> };\n\t\t}['data'];\n\t}[keyof T]\n) => void;\n\ntype OnError<T extends Resolvers> = (\n\tdata: {\n\t\t[Name in keyof T]: {\n\t\t\tdata: Parameters<T[Name]> extends [infer Arg]\n\t\t\t\t? { type: Name; params: Arg; error: any }\n\t\t\t\t: { type: Name; error: any };\n\t\t}['data'];\n\t}[keyof T]\n) => void;\n\ntype OnCompleted<T extends Resolvers> = (\n\tdata: {\n\t\t[Name in keyof T]: {\n\t\t\tdata: Parameters<T[Name]> extends [infer Arg]\n\t\t\t\t? { type: Name; params: Arg }\n\t\t\t\t: { type: Name };\n\t\t}['data'];\n\t}[keyof T]\n) => void;\n\ntype OnCleared = () => any;\n\ntype Params<T extends Resolvers> = {\n\tresolvers: T;\n\tconcurrency?: number;\n\tonSuccess?: OnSuccess<T>;\n\tonError?: OnError<T>;\n\tonCleared?: OnCleared;\n\tonCompleted?: OnCompleted<T>;\n};\n\nconst noop = () => {};\n\nexport const useQueue = <T extends Resolvers>({\n\tresolvers,\n\tonSuccess = noop,\n\tonCleared = noop,\n\tonError = noop,\n\tonCompleted = noop,\n\tconcurrency = 1,\n}: Params<T>) => {\n\tlet jobs: Jobs<T>[] = [];\n\tlet currentIndex = 0;\n\n\tconst process = async (): Promise<void> => {\n\t\tif (currentIndex > concurrency) {\n\t\t\treturn;\n\t\t}\n\t\twhile (currentIndex < concurrency) {\n\t\t\tconst job = jobs[currentIndex++];\n\t\t\tif (!job) {\n\t\t\t\tcurrentIndex--;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst resolver = resolvers[job.type];\n\t\t\tif (!resolver)\n\t\t\t\tthrow new Error(\n\t\t\t\t\t`No resolver defined for job type \"${job.type.toString()}\"`\n\t\t\t\t);\n\t\t\tnew Promise(async (resolve) => {\n\t\t\t\ttry {\n\t\t\t\t\tif ('params' in job) {\n\t\t\t\t\t\tconst res = await resolver(job.params);\n\t\t\t\t\t\tconst data = {\n\t\t\t\t\t\t\ttype: job.type,\n\t\t\t\t\t\t\tparams: job.params,\n\t\t\t\t\t\t\tresult: res,\n\t\t\t\t\t\t} as Extract<Parameters<OnSuccess<T>>[0], { params: any }>;\n\t\t\t\t\t\tonSuccess(data);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst res = await resolver(undefined);\n\t\t\t\t\t\tconst data = {\n\t\t\t\t\t\t\ttype: job.type,\n\t\t\t\t\t\t\tresult: res,\n\t\t\t\t\t\t} as Extract<Parameters<OnSuccess<T>>[0], { params: never }>;\n\t\t\t\t\t\tonSuccess(data);\n\t\t\t\t\t}\n\t\t\t\t} catch (error) {\n\t\t\t\t\tconst data = {\n\t\t\t\t\t\ttype: job.type,\n\t\t\t\t\t\tparams: 'params' in job ? job.params : undefined,\n\t\t\t\t\t\terror: error,\n\t\t\t\t\t} as Parameters<OnError<T>>[0];\n\t\t\t\t\tonError(data);\n\t\t\t\t} finally {\n\t\t\t\t\tconst index = jobs.indexOf(job);\n\t\t\t\t\tjobs.splice(index, 1);\n\t\t\t\t\tcurrentIndex--;\n\n\t\t\t\t\tif ('params' in job) {\n\t\t\t\t\t\tconst data = {\n\t\t\t\t\t\t\ttype: job.type,\n\t\t\t\t\t\t\tparams: job.params,\n\t\t\t\t\t\t} as Extract<Parameters<OnCompleted<T>>[0], { params: any }>;\n\t\t\t\t\t\tonCompleted(data);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst data = {\n\t\t\t\t\t\t\ttype: job.type,\n\t\t\t\t\t\t} as Extract<Parameters<OnCompleted<T>>[0], { params: never }>;\n\t\t\t\t\t\tonCompleted(data);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (jobs.length) return resolve(new Promise(() => process()));\n\t\t\t\tonCleared();\n\t\t\t\tresolve(null);\n\t\t\t});\n\t\t}\n\t};\n\n\tconst addJobs = (...job: (typeof jobs)[number][]) => {\n\t\tjobs.push(...job);\n\t\tprocess();\n\t};\n\n\tconst addIf = (\n\t\tjob: (typeof jobs)[number],\n\t\titeratee: (arr: typeof jobs) => boolean\n\t) => {\n\t\tif (iteratee(jobs)) addJobs(job);\n\t};\n\n\tconst filterJobs = (\n\t\titeratee: (\n\t\t\telement: (typeof jobs)[number],\n\t\t\tindex: number,\n\t\t\tarr: typeof jobs\n\t\t) => boolean\n\t) => {\n\t\tjobs = jobs\n\t\t\t.slice(0, currentIndex)\n\t\t\t.concat(jobs.slice(currentIndex).filter(iteratee));\n\t};\n\n\treturn {\n\t\taddJobs,\n\t\taddIf,\n\t\tfilterJobs,\n\t};\n};\n"],"names":["noop","useQueue","resolvers","onSuccess","onCleared","onError","onCompleted","concurrency","jobs","currentIndex","process","job","resolver","resolve","res","data","error","index","addJobs","iteratee"],"mappings":"AAiDA,MAAMA,IAAO,MAAM;AAAC,GAEPC,IAAW,CAAsB;AAAA,EAC7C,WAAAC;AAAA,EACA,WAAAC,IAAYH;AAAA,EACZ,WAAAI,IAAYJ;AAAA,EACZ,SAAAK,IAAUL;AAAA,EACV,aAAAM,IAAcN;AAAA,EACd,aAAAO,IAAc;AACf,MAAiB;AAChB,MAAIC,IAAkB,CAAA,GAClBC,IAAe;AAEnB,QAAMC,IAAU,YAA2B;AAC1C,QAAI,EAAAD,IAAeF;AAGnB,aAAOE,IAAeF,KAAa;AAC5B,cAAAI,IAAMH,EAAKC,GAAc;AAC/B,YAAI,CAACE,GAAK;AACT,UAAAF;AACA;AAAA,QACD;AAEM,cAAAG,IAAWV,EAAUS,EAAI,IAAI;AACnC,YAAI,CAACC;AACJ,gBAAM,IAAI;AAAA,YACT,qCAAqCD,EAAI,KAAK,SAAA,CAAU;AAAA,UAAA;AAEtD,YAAA,QAAQ,OAAOE,MAAY;AAC1B,cAAA;AACH,gBAAI,YAAYF,GAAK;AACpB,oBAAMG,IAAM,MAAMF,EAASD,EAAI,MAAM,GAC/BI,IAAO;AAAA,gBACZ,MAAMJ,EAAI;AAAA,gBACV,QAAQA,EAAI;AAAA,gBACZ,QAAQG;AAAA,cAAA;AAET,cAAAX,EAAUY,CAAI;AAAA,YAAA,OACR;AACA,oBAAAD,IAAM,MAAMF,EAAS,MAAS,GAC9BG,IAAO;AAAA,gBACZ,MAAMJ,EAAI;AAAA,gBACV,QAAQG;AAAA,cAAA;AAET,cAAAX,EAAUY,CAAI;AAAA,YACf;AAAA,mBACQC,GAAO;AACf,kBAAMD,IAAO;AAAA,cACZ,MAAMJ,EAAI;AAAA,cACV,QAAQ,YAAYA,IAAMA,EAAI,SAAS;AAAA,cACvC,OAAAK;AAAA,YAAA;AAED,YAAAX,EAAQU,CAAI;AAAA,UAAA,UACX;AACK,kBAAAE,IAAQT,EAAK,QAAQG,CAAG;AAI9B,gBAHKH,EAAA,OAAOS,GAAO,CAAC,GACpBR,KAEI,YAAYE,GAAK;AACpB,oBAAMI,IAAO;AAAA,gBACZ,MAAMJ,EAAI;AAAA,gBACV,QAAQA,EAAI;AAAA,cAAA;AAEb,cAAAL,EAAYS,CAAI;AAAA,YAAA,OACV;AACN,oBAAMA,IAAO;AAAA,gBACZ,MAAMJ,EAAI;AAAA,cAAA;AAEX,cAAAL,EAAYS,CAAI;AAAA,YACjB;AAAA,UACD;AACI,cAAAP,EAAK,OAAe,QAAAK,EAAQ,IAAI,QAAQ,MAAMH,EAAS,CAAA,CAAC;AAClD,UAAAN,KACVS,EAAQ,IAAI;AAAA,QAAA,CACZ;AAAA,MACF;AAAA,EAAA,GAGKK,IAAU,IAAIP,MAAiC;AAC/C,IAAAH,EAAA,KAAK,GAAGG,CAAG,GACRD;EAAA;AAsBF,SAAA;AAAA,IACN,SAAAQ;AAAA,IACA,OArBa,CACbP,GACAQ,MACI;AACJ,MAAIA,EAASX,CAAI,KAAGU,EAAQP,CAAG;AAAA,IAAA;AAAA,IAkB/B,YAfkB,CAClBQ,MAKI;AACJ,MAAAX,IAAOA,EACL,MAAM,GAAGC,CAAY,EACrB,OAAOD,EAAK,MAAMC,CAAY,EAAE,OAAOU,CAAQ,CAAC;AAAA,IAAA;AAAA,EAMlD;AAEF;"}
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;"}
package/dist/index91.js CHANGED
@@ -1,99 +1,130 @@
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 "./index24.js";
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 "./index26.js";
3
3
  /* empty css */
4
- import $ from "./index32.js";
4
+ import D from "./index32.js";
5
5
  /* empty css */
6
- const M = /* @__PURE__ */ g({
7
- __name: "BbRating",
6
+ const E = /* @__PURE__ */ v({
7
+ __name: "BbRadioGroup",
8
8
  props: {
9
9
  autofocus: {},
10
10
  color: {},
11
+ dependencies: {},
12
+ depsDebounceTime: {},
11
13
  disabled: { type: Boolean },
14
+ enforceCoherence: { type: Boolean },
12
15
  errors: {},
13
16
  hasErrors: { type: Boolean },
17
+ hideLabel: { type: Boolean },
14
18
  hideLegend: { type: Boolean },
15
19
  hint: {},
16
20
  id: {},
17
- inputPosition: { default: "left" },
21
+ inputDirection: {},
22
+ items: { type: [Array, Function] },
23
+ itemText: {},
24
+ itemValue: {},
18
25
  legend: {},
19
- legendPosition: {},
26
+ loadingText: {},
20
27
  modelValue: {},
28
+ modelValueDebounceTime: {},
21
29
  name: {},
30
+ noDataText: {},
22
31
  persistentHint: { type: Boolean },
23
32
  readonly: {},
24
- reverse: { type: Boolean },
25
- stars: {},
26
- size: {}
33
+ required: { type: Boolean },
34
+ reverse: { type: Boolean }
27
35
  },
28
36
  emits: ["blur", "change", "click", "focus", "inactive", "input", "keydown", "mousedown", "mouseup", "update:modelValue"],
29
- setup(d, { emit: u }) {
30
- const p = d, o = u, l = v(!1), m = y(() => p.persistentHint || l.value), c = {
31
- onBlur: (e) => o("blur", e),
32
- onChange: (e) => o("change", e),
33
- onClick: (e) => o("click", e),
37
+ setup(t, { emit: u }) {
38
+ const p = t, n = u, d = g(!1), m = y(() => p.persistentHint || d.value), c = {
39
+ onBlur: (e) => n("blur", e),
40
+ onChange: (e) => n("change", e),
41
+ onClick: (e) => n("click", e),
34
42
  onFocus: (e) => {
35
- l.value = !0, o("focus", e);
43
+ d.value = !0, n("focus", e);
36
44
  },
37
45
  onInactive: () => {
38
- l.value = !1, o("inactive");
46
+ d.value = !1, n("inactive");
39
47
  },
40
- onInput: (e) => o("input", e),
41
- onKeydown: (e) => o("keydown", e),
42
- onMousedown: (e) => o("mousedown", e),
43
- onMouseup: (e) => o("mouseup", e),
44
- "onUpdate:modelValue": (e) => o("update:modelValue", e)
48
+ onInput: (e) => n("input", e),
49
+ onKeydown: (e) => n("keydown", e),
50
+ onMousedown: (e) => n("mousedown", e),
51
+ onMouseup: (e) => n("mouseup", e),
52
+ "onUpdate:modelValue": (e) => n("update:modelValue", e)
45
53
  };
46
- return (e, z) => (w(), B(V, {
54
+ return (e, k) => (B(), $(V, {
47
55
  id: e.id,
48
- class: "bb-rating",
56
+ class: "bb-radio-group",
49
57
  direction: "vertical",
50
58
  errors: e.errors,
51
59
  "has-errors": e.hasErrors,
52
60
  "hide-label": e.hideLegend,
53
61
  hint: e.hint,
54
- "input-position": e.inputPosition,
55
62
  label: e.legend,
56
- "label-position": e.legendPosition,
57
63
  "label-tag": "legend",
58
64
  name: e.name,
59
65
  reverse: e.reverse,
60
66
  "show-hint": m.value,
61
67
  tag: "fieldset"
62
68
  }, {
63
- label: s((t) => [
64
- r(e.$slots, "legend", a(i(t)))
69
+ label: a((s) => [
70
+ i(e.$slots, "legend", r(l(s)))
65
71
  ]),
66
- input: s(({ id: t, name: h, hasErrors: b, ariaDescribedby: f }) => [
67
- k($, P({
68
- id: t,
72
+ input: a(({ id: s, name: b, hasErrors: h, ariaDescribedby: f }) => [
73
+ w(D, T({
74
+ id: s,
69
75
  "aria-describedby": f,
70
76
  autofocus: e.autofocus,
71
77
  color: e.color,
78
+ dependencies: e.dependencies,
79
+ "deps-debounce-time": e.depsDebounceTime,
80
+ direction: e.inputDirection,
72
81
  disabled: e.disabled,
73
- "has-errors": b,
82
+ "enforce-coherence": e.enforceCoherence,
83
+ "has-errors": h,
84
+ "hide-label": e.hideLabel,
85
+ "item-text": e.itemText,
86
+ "item-value": e.itemValue,
87
+ items: e.items,
88
+ "loading-text": e.loadingText,
74
89
  "model-value": e.modelValue,
75
- name: h,
90
+ "model-value-debounce-time": e.modelValueDebounceTime,
91
+ name: b,
92
+ "no-data-text": e.noDataText,
76
93
  readonly: e.readonly,
77
- size: e.size,
78
- stars: e.stars
94
+ required: e.required
79
95
  }, c), {
80
- prepend: s((n) => [
81
- r(e.$slots, "prepend", a(i(n)))
96
+ prepend: a((o) => [
97
+ i(e.$slots, "prepend", r(l(o)))
82
98
  ]),
83
- append: s((n) => [
84
- r(e.$slots, "append", a(i(n)))
99
+ loading: a((o) => [
100
+ i(e.$slots, "loading", r(l(o)))
85
101
  ]),
86
- icon: s((n) => [
87
- r(e.$slots, "icon", a(i(n)))
102
+ "no-data": a((o) => [
103
+ i(e.$slots, "no-data", r(l(o)))
104
+ ]),
105
+ "option:prepend": a((o) => [
106
+ i(e.$slots, "option:prepend", r(l(o)))
107
+ ]),
108
+ icon: a((o) => [
109
+ i(e.$slots, "icon", r(l(o)))
110
+ ]),
111
+ label: a((o) => [
112
+ i(e.$slots, "label", r(l(o)))
113
+ ]),
114
+ "option:append": a((o) => [
115
+ i(e.$slots, "option:append", r(l(o)))
116
+ ]),
117
+ append: a((o) => [
118
+ i(e.$slots, "append", r(l(o)))
88
119
  ]),
89
120
  _: 2
90
- }, 1040, ["id", "aria-describedby", "autofocus", "color", "disabled", "has-errors", "model-value", "name", "readonly", "size", "stars"])
121
+ }, 1040, ["id", "aria-describedby", "autofocus", "color", "dependencies", "deps-debounce-time", "direction", "disabled", "enforce-coherence", "has-errors", "hide-label", "item-text", "item-value", "items", "loading-text", "model-value", "model-value-debounce-time", "name", "no-data-text", "readonly", "required"])
91
122
  ]),
92
123
  _: 3
93
- }, 8, ["id", "errors", "has-errors", "hide-label", "hint", "input-position", "label", "label-position", "name", "reverse", "show-hint"]));
124
+ }, 8, ["id", "errors", "has-errors", "hide-label", "hint", "label", "name", "reverse", "show-hint"]));
94
125
  }
95
126
  });
96
127
  export {
97
- M as default
128
+ E as default
98
129
  };
99
130
  //# sourceMappingURL=index91.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index91.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":"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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index93.js CHANGED
@@ -1,25 +1,99 @@
1
- import { defineComponent as t, openBlock as o, createBlock as a, resolveDynamicComponent as r, normalizeStyle as l, withCtx as n, renderSlot as s } from "vue";
2
- const d = /* @__PURE__ */ t({
3
- __name: "BbRatio",
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 "./index26.js";
3
+ /* empty css */
4
+ import $ from "./index34.js";
5
+ /* empty css */
6
+ const M = /* @__PURE__ */ g({
7
+ __name: "BbRating",
4
8
  props: {
5
- ratio: { default: 1 },
6
- tag: { default: "div" }
9
+ autofocus: {},
10
+ color: {},
11
+ disabled: { type: Boolean },
12
+ errors: {},
13
+ hasErrors: { type: Boolean },
14
+ hideLegend: { type: Boolean },
15
+ hint: {},
16
+ id: {},
17
+ inputPosition: { default: "left" },
18
+ legend: {},
19
+ legendPosition: {},
20
+ modelValue: {},
21
+ name: {},
22
+ persistentHint: { type: Boolean },
23
+ readonly: {},
24
+ reverse: { type: Boolean },
25
+ stars: {},
26
+ size: {}
7
27
  },
8
- setup(i) {
9
- return (e, p) => (o(), a(r(e.tag), {
10
- class: "bb-ratio",
11
- style: l({
12
- aspectRatio: e.ratio
13
- })
28
+ emits: ["blur", "change", "click", "focus", "inactive", "input", "keydown", "mousedown", "mouseup", "update:modelValue"],
29
+ setup(d, { emit: u }) {
30
+ const p = d, o = u, l = v(!1), m = y(() => p.persistentHint || l.value), c = {
31
+ onBlur: (e) => o("blur", e),
32
+ onChange: (e) => o("change", e),
33
+ onClick: (e) => o("click", e),
34
+ onFocus: (e) => {
35
+ l.value = !0, o("focus", e);
36
+ },
37
+ onInactive: () => {
38
+ l.value = !1, o("inactive");
39
+ },
40
+ onInput: (e) => o("input", e),
41
+ onKeydown: (e) => o("keydown", e),
42
+ onMousedown: (e) => o("mousedown", e),
43
+ onMouseup: (e) => o("mouseup", e),
44
+ "onUpdate:modelValue": (e) => o("update:modelValue", e)
45
+ };
46
+ return (e, z) => (w(), B(V, {
47
+ id: e.id,
48
+ class: "bb-rating",
49
+ direction: "vertical",
50
+ errors: e.errors,
51
+ "has-errors": e.hasErrors,
52
+ "hide-label": e.hideLegend,
53
+ hint: e.hint,
54
+ "input-position": e.inputPosition,
55
+ label: e.legend,
56
+ "label-position": e.legendPosition,
57
+ "label-tag": "legend",
58
+ name: e.name,
59
+ reverse: e.reverse,
60
+ "show-hint": m.value,
61
+ tag: "fieldset"
14
62
  }, {
15
- default: n(() => [
16
- s(e.$slots, "default")
63
+ label: s((t) => [
64
+ r(e.$slots, "legend", a(i(t)))
65
+ ]),
66
+ input: s(({ id: t, name: h, hasErrors: b, ariaDescribedby: f }) => [
67
+ k($, P({
68
+ id: t,
69
+ "aria-describedby": f,
70
+ autofocus: e.autofocus,
71
+ color: e.color,
72
+ disabled: e.disabled,
73
+ "has-errors": b,
74
+ "model-value": e.modelValue,
75
+ name: h,
76
+ readonly: e.readonly,
77
+ size: e.size,
78
+ stars: e.stars
79
+ }, c), {
80
+ prepend: s((n) => [
81
+ r(e.$slots, "prepend", a(i(n)))
82
+ ]),
83
+ append: s((n) => [
84
+ r(e.$slots, "append", a(i(n)))
85
+ ]),
86
+ icon: s((n) => [
87
+ r(e.$slots, "icon", a(i(n)))
88
+ ]),
89
+ _: 2
90
+ }, 1040, ["id", "aria-describedby", "autofocus", "color", "disabled", "has-errors", "model-value", "name", "readonly", "size", "stars"])
17
91
  ]),
18
92
  _: 3
19
- }, 8, ["style"]));
93
+ }, 8, ["id", "errors", "has-errors", "hide-label", "hint", "input-position", "label", "label-position", "name", "reverse", "show-hint"]));
20
94
  }
21
95
  });
22
96
  export {
23
- d as default
97
+ M as default
24
98
  };
25
99
  //# sourceMappingURL=index93.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index93.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;"}
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}