bitboss-ui 2.0.7 → 2.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (413) hide show
  1. package/dist/index.js +139 -138
  2. package/dist/index.js.map +1 -1
  3. package/dist/index10.js +7 -78
  4. package/dist/index10.js.map +1 -1
  5. package/dist/{index100.js → index101.js} +3 -3
  6. package/dist/{index100.js.map → index101.js.map} +1 -1
  7. package/dist/{index102.js → index103.js} +3 -3
  8. package/dist/{index102.js.map → index103.js.map} +1 -1
  9. package/dist/{index104.js → index105.js} +8 -8
  10. package/dist/{index104.js.map → index105.js.map} +1 -1
  11. package/dist/{index106.js → index107.js} +9 -9
  12. package/dist/{index106.js.map → index107.js.map} +1 -1
  13. package/dist/{index108.js → index109.js} +3 -3
  14. package/dist/{index108.js.map → index109.js.map} +1 -1
  15. package/dist/index11.js +74 -35
  16. package/dist/index11.js.map +1 -1
  17. package/dist/{index110.js → index111.js} +3 -3
  18. package/dist/{index110.js.map → index111.js.map} +1 -1
  19. package/dist/{index112.js → index113.js} +3 -3
  20. package/dist/{index112.js.map → index113.js.map} +1 -1
  21. package/dist/{index114.js → index115.js} +3 -3
  22. package/dist/{index114.js.map → index115.js.map} +1 -1
  23. package/dist/{index116.js → index117.js} +8 -8
  24. package/dist/{index116.js.map → index117.js.map} +1 -1
  25. package/dist/{index118.js → index119.js} +2 -2
  26. package/dist/{index118.js.map → index119.js.map} +1 -1
  27. package/dist/index12.js +36 -189
  28. package/dist/index12.js.map +1 -1
  29. package/dist/index121.js +34 -38
  30. package/dist/index121.js.map +1 -1
  31. package/dist/index122.js +38 -38
  32. package/dist/index122.js.map +1 -1
  33. package/dist/index123.js +39 -42
  34. package/dist/index123.js.map +1 -1
  35. package/dist/index124.js +43 -31
  36. package/dist/index124.js.map +1 -1
  37. package/dist/index125.js +35 -2
  38. package/dist/index125.js.map +1 -1
  39. package/dist/index126.js +2 -21
  40. package/dist/index126.js.map +1 -1
  41. package/dist/index127.js +21 -2
  42. package/dist/index127.js.map +1 -1
  43. package/dist/index128.js +2 -312
  44. package/dist/index128.js.map +1 -1
  45. package/dist/index129.js +309 -21
  46. package/dist/index129.js.map +1 -1
  47. package/dist/index13.js +189 -78
  48. package/dist/index13.js.map +1 -1
  49. package/dist/index130.js +24 -2
  50. package/dist/index130.js.map +1 -1
  51. package/dist/index131.js +2 -5
  52. package/dist/index131.js.map +1 -1
  53. package/dist/index132.js +5 -9
  54. package/dist/index132.js.map +1 -1
  55. package/dist/index133.js +8 -5
  56. package/dist/index133.js.map +1 -1
  57. package/dist/index134.js +6 -3
  58. package/dist/index134.js.map +1 -1
  59. package/dist/index135.js +1 -1
  60. package/dist/index136.js +1 -1
  61. package/dist/index137.js +1 -1
  62. package/dist/index138.js +1 -1
  63. package/dist/index139.js +1 -1
  64. package/dist/index14.js +85 -0
  65. package/dist/index14.js.map +1 -0
  66. package/dist/index140.js +1 -1
  67. package/dist/index141.js +1 -1
  68. package/dist/index142.js +1 -1
  69. package/dist/index143.js +1 -1
  70. package/dist/index144.js +1 -1
  71. package/dist/index145.js +1 -1
  72. package/dist/index146.js +1 -1
  73. package/dist/index147.js +1 -1
  74. package/dist/index148.js +1 -1
  75. package/dist/index149.js +1 -1
  76. package/dist/index150.js +1 -1
  77. package/dist/index151.js +1 -1
  78. package/dist/index152.js +1 -1
  79. package/dist/index153.js +1 -1
  80. package/dist/index154.js +1 -1
  81. package/dist/index155.js +1 -1
  82. package/dist/index156.js +1 -1
  83. package/dist/index157.js +1 -1
  84. package/dist/index158.js +1 -1
  85. package/dist/index159.js +1 -1
  86. package/dist/{index15.js → index16.js} +4 -4
  87. package/dist/{index15.js.map → index16.js.map} +1 -1
  88. package/dist/index160.js +2 -2
  89. package/dist/{index162.js → index161.js} +1 -1
  90. package/dist/index161.js.map +1 -0
  91. package/dist/index163.js +6 -0
  92. package/dist/index163.js.map +1 -0
  93. package/dist/index165.js +1 -1
  94. package/dist/index166.js +1 -1
  95. package/dist/index167.js +1 -1
  96. package/dist/index168.js +1 -1
  97. package/dist/index169.js +1 -1
  98. package/dist/index170.js +2 -2
  99. package/dist/index171.js +6 -0
  100. package/dist/index171.js.map +1 -0
  101. package/dist/index173.js +2 -3
  102. package/dist/index173.js.map +1 -1
  103. package/dist/index174.js +1 -1
  104. package/dist/index175.js +1 -1
  105. package/dist/index176.js +1 -1
  106. package/dist/index177.js +1 -1
  107. package/dist/index178.js +1 -1
  108. package/dist/index179.js +1 -1
  109. package/dist/{index17.js → index18.js} +4 -4
  110. package/dist/{index17.js.map → index18.js.map} +1 -1
  111. package/dist/index180.js +1 -1
  112. package/dist/index181.js +1 -1
  113. package/dist/index182.js +1 -1
  114. package/dist/index183.js +1 -1
  115. package/dist/index184.js +1 -1
  116. package/dist/{index186.js → index185.js} +1 -1
  117. package/dist/index185.js.map +1 -0
  118. package/dist/index187.js +6 -0
  119. package/dist/index187.js.map +1 -0
  120. package/dist/index189.js +1 -1
  121. package/dist/index190.js +1 -1
  122. package/dist/index191.js +1 -1
  123. package/dist/index192.js +1 -1
  124. package/dist/index193.js +1 -1
  125. package/dist/index194.js +1 -1
  126. package/dist/index195.js +1 -1
  127. package/dist/index196.js +1 -1
  128. package/dist/index197.js +1 -1
  129. package/dist/index198.js +3 -81
  130. package/dist/index198.js.map +1 -1
  131. package/dist/{index19.js → index20.js} +19 -18
  132. package/dist/{index19.js.map → index20.js.map} +1 -1
  133. package/dist/index200.js +126 -2
  134. package/dist/index200.js.map +1 -1
  135. package/dist/index201.js +5 -4
  136. package/dist/index201.js.map +1 -1
  137. package/dist/index202.js +123 -2
  138. package/dist/index202.js.map +1 -1
  139. package/dist/index203.js +19 -8
  140. package/dist/index203.js.map +1 -1
  141. package/dist/index204.js +14 -124
  142. package/dist/index204.js.map +1 -1
  143. package/dist/index205.js +16 -5
  144. package/dist/index205.js.map +1 -1
  145. package/dist/index206.js +2 -123
  146. package/dist/index206.js.map +1 -1
  147. package/dist/index207.js +2 -19
  148. package/dist/index207.js.map +1 -1
  149. package/dist/index208.js +35 -16
  150. package/dist/index208.js.map +1 -1
  151. package/dist/index209.js +172 -14
  152. package/dist/index209.js.map +1 -1
  153. package/dist/index210.js +6 -2
  154. package/dist/index210.js.map +1 -1
  155. package/dist/index211.js +44 -2
  156. package/dist/index211.js.map +1 -1
  157. package/dist/index213.js +12 -173
  158. package/dist/index213.js.map +1 -1
  159. package/dist/index214.js +5 -6
  160. package/dist/index214.js.map +1 -1
  161. package/dist/index215.js +369 -43
  162. package/dist/index215.js.map +1 -1
  163. package/dist/index216.js +161 -0
  164. package/dist/index216.js.map +1 -0
  165. package/dist/index217.js +84 -13
  166. package/dist/index217.js.map +1 -1
  167. package/dist/index219.js +67 -355
  168. package/dist/index219.js.map +1 -1
  169. package/dist/{index21.js → index22.js} +21 -21
  170. package/dist/{index21.js.map → index22.js.map} +1 -1
  171. package/dist/index220.js +8 -19
  172. package/dist/index220.js.map +1 -1
  173. package/dist/index221.js +3 -27
  174. package/dist/index221.js.map +1 -1
  175. package/dist/index222.js +2 -3
  176. package/dist/index222.js.map +1 -1
  177. package/dist/index223.js +4 -249
  178. package/dist/index223.js.map +1 -1
  179. package/dist/index224.js +2 -52
  180. package/dist/index224.js.map +1 -1
  181. package/dist/index225.js +3 -44
  182. package/dist/index225.js.map +1 -1
  183. package/dist/index226.js +7 -5
  184. package/dist/index226.js.map +1 -1
  185. package/dist/index227.js +19 -49
  186. package/dist/index227.js.map +1 -1
  187. package/dist/index228.js +27 -3
  188. package/dist/index228.js.map +1 -1
  189. package/dist/index229.js +3 -3
  190. package/dist/index229.js.map +1 -1
  191. package/dist/index230.js +249 -7
  192. package/dist/index230.js.map +1 -1
  193. package/dist/index231.js +50 -156
  194. package/dist/index231.js.map +1 -1
  195. package/dist/index232.js +38 -78
  196. package/dist/index232.js.map +1 -1
  197. package/dist/index233.js +8 -0
  198. package/dist/index233.js.map +1 -0
  199. package/dist/index234.js +49 -2
  200. package/dist/index234.js.map +1 -1
  201. package/dist/index235.js +2 -18
  202. package/dist/index235.js.map +1 -1
  203. package/dist/index236.js +2 -106
  204. package/dist/index236.js.map +1 -1
  205. package/dist/index237.js +21 -0
  206. package/dist/index237.js.map +1 -0
  207. package/dist/index238.js +53 -47
  208. package/dist/index238.js.map +1 -1
  209. package/dist/{index23.js → index24.js} +8 -8
  210. package/dist/{index23.js.map → index24.js.map} +1 -1
  211. package/dist/index240.js +100 -2
  212. package/dist/index240.js.map +1 -1
  213. package/dist/index242.js +9 -2
  214. package/dist/index242.js.map +1 -1
  215. package/dist/index243.js +2 -3
  216. package/dist/index243.js.map +1 -1
  217. package/dist/index244.js +3 -6
  218. package/dist/index244.js.map +1 -1
  219. package/dist/index245.js +12 -16
  220. package/dist/index245.js.map +1 -1
  221. package/dist/index246.js +8 -8
  222. package/dist/index246.js.map +1 -1
  223. package/dist/index247.js +9 -23
  224. package/dist/index247.js.map +1 -1
  225. package/dist/index248.js +17 -9
  226. package/dist/index248.js.map +1 -1
  227. package/dist/index257.js +1 -1
  228. package/dist/index258.js +1 -1
  229. package/dist/{index25.js → index26.js} +6 -6
  230. package/dist/{index25.js.map → index26.js.map} +1 -1
  231. package/dist/index263.js +224 -2
  232. package/dist/index263.js.map +1 -1
  233. package/dist/index264.js +4 -2
  234. package/dist/index264.js.map +1 -1
  235. package/dist/index265.js +9 -2
  236. package/dist/index265.js.map +1 -1
  237. package/dist/index266.js +5 -1
  238. package/dist/index266.js.map +1 -1
  239. package/dist/index267.js +16 -2
  240. package/dist/index267.js.map +1 -1
  241. package/dist/index268.js +9 -2
  242. package/dist/index268.js.map +1 -1
  243. package/dist/index269.js +23 -28
  244. package/dist/index269.js.map +1 -1
  245. package/dist/index270.js +199 -21
  246. package/dist/index270.js.map +1 -1
  247. package/dist/index271.js +439 -0
  248. package/dist/index271.js.map +1 -0
  249. package/dist/index272.js +121 -218
  250. package/dist/index272.js.map +1 -1
  251. package/dist/index274.js +5 -200
  252. package/dist/index274.js.map +1 -1
  253. package/dist/index275.js +2 -436
  254. package/dist/index275.js.map +1 -1
  255. package/dist/index276.js +2 -127
  256. package/dist/index276.js.map +1 -1
  257. package/dist/index277.js +2 -5
  258. package/dist/index277.js.map +1 -1
  259. package/dist/index278.js +2 -2
  260. package/dist/index278.js.map +1 -1
  261. package/dist/index279.js +2 -9
  262. package/dist/index279.js.map +1 -1
  263. package/dist/{index27.js → index28.js} +3 -3
  264. package/dist/{index27.js.map → index28.js.map} +1 -1
  265. package/dist/index280.js +2 -69
  266. package/dist/index280.js.map +1 -1
  267. package/dist/index281.js +28 -3
  268. package/dist/index281.js.map +1 -1
  269. package/dist/index282.js +22 -12
  270. package/dist/index282.js.map +1 -1
  271. package/dist/index284.js +2 -17
  272. package/dist/index284.js.map +1 -1
  273. package/dist/index285.js +68 -2
  274. package/dist/index285.js.map +1 -1
  275. package/dist/index287.js +3 -211
  276. package/dist/index287.js.map +1 -1
  277. package/dist/index288.js +211 -15
  278. package/dist/index288.js.map +1 -1
  279. package/dist/index289.js +15 -4
  280. package/dist/index289.js.map +1 -1
  281. package/dist/index290.js +11 -4
  282. package/dist/index290.js.map +1 -1
  283. package/dist/index291.js +34 -58
  284. package/dist/index291.js.map +1 -1
  285. package/dist/index292.js +4 -35
  286. package/dist/index292.js.map +1 -1
  287. package/dist/index293.js +4 -7
  288. package/dist/index293.js.map +1 -1
  289. package/dist/index294.js +57 -17
  290. package/dist/index294.js.map +1 -1
  291. package/dist/index295.js +2 -7
  292. package/dist/index295.js.map +1 -1
  293. package/dist/index296.js +7 -2
  294. package/dist/index296.js.map +1 -1
  295. package/dist/index297.js +6 -10
  296. package/dist/index297.js.map +1 -1
  297. package/dist/index298.js +17 -45
  298. package/dist/index298.js.map +1 -1
  299. package/dist/index299.js +50 -0
  300. package/dist/index299.js.map +1 -0
  301. package/dist/{index29.js → index30.js} +3 -3
  302. package/dist/{index29.js.map → index30.js.map} +1 -1
  303. package/dist/index301.js +416 -42
  304. package/dist/index301.js.map +1 -1
  305. package/dist/index302.js +50 -0
  306. package/dist/index302.js.map +1 -0
  307. package/dist/{index31.js → index32.js} +4 -4
  308. package/dist/{index31.js.map → index32.js.map} +1 -1
  309. package/dist/{index33.js → index34.js} +5 -5
  310. package/dist/{index33.js.map → index34.js.map} +1 -1
  311. package/dist/{index35.js → index36.js} +23 -22
  312. package/dist/{index35.js.map → index36.js.map} +1 -1
  313. package/dist/{index37.js → index38.js} +7 -7
  314. package/dist/{index37.js.map → index38.js.map} +1 -1
  315. package/dist/{index39.js → index40.js} +3 -3
  316. package/dist/{index39.js.map → index40.js.map} +1 -1
  317. package/dist/{index41.js → index42.js} +4 -4
  318. package/dist/{index41.js.map → index42.js.map} +1 -1
  319. package/dist/{index43.js → index44.js} +12 -11
  320. package/dist/{index43.js.map → index44.js.map} +1 -1
  321. package/dist/{index45.js → index46.js} +4 -4
  322. package/dist/{index45.js.map → index46.js.map} +1 -1
  323. package/dist/{index47.js → index48.js} +3 -3
  324. package/dist/{index47.js.map → index48.js.map} +1 -1
  325. package/dist/index5.js +14 -40
  326. package/dist/index5.js.map +1 -1
  327. package/dist/{index49.js → index50.js} +4 -4
  328. package/dist/{index49.js.map → index50.js.map} +1 -1
  329. package/dist/{index51.js → index52.js} +3 -3
  330. package/dist/{index51.js.map → index52.js.map} +1 -1
  331. package/dist/{index53.js → index54.js} +3 -3
  332. package/dist/{index53.js.map → index54.js.map} +1 -1
  333. package/dist/{index55.js → index56.js} +3 -3
  334. package/dist/{index55.js.map → index56.js.map} +1 -1
  335. package/dist/{index57.js → index58.js} +2 -2
  336. package/dist/{index57.js.map → index58.js.map} +1 -1
  337. package/dist/index6.js +38 -76
  338. package/dist/index6.js.map +1 -1
  339. package/dist/{index59.js → index60.js} +14 -13
  340. package/dist/{index59.js.map → index60.js.map} +1 -1
  341. package/dist/{index61.js → index62.js} +3 -3
  342. package/dist/{index61.js.map → index62.js.map} +1 -1
  343. package/dist/{index63.js → index64.js} +3 -3
  344. package/dist/{index63.js.map → index64.js.map} +1 -1
  345. package/dist/{index65.js → index66.js} +5 -5
  346. package/dist/{index65.js.map → index66.js.map} +1 -1
  347. package/dist/{index67.js → index68.js} +3 -3
  348. package/dist/{index67.js.map → index68.js.map} +1 -1
  349. package/dist/index7.js +78 -62
  350. package/dist/index7.js.map +1 -1
  351. package/dist/{index69.js → index70.js} +2 -2
  352. package/dist/{index69.js.map → index70.js.map} +1 -1
  353. package/dist/{index71.js → index72.js} +9 -9
  354. package/dist/{index71.js.map → index72.js.map} +1 -1
  355. package/dist/{index73.js → index74.js} +3 -3
  356. package/dist/{index73.js.map → index74.js.map} +1 -1
  357. package/dist/{index75.js → index76.js} +5 -5
  358. package/dist/{index75.js.map → index76.js.map} +1 -1
  359. package/dist/index78.js +37 -120
  360. package/dist/index78.js.map +1 -1
  361. package/dist/index79.js +130 -0
  362. package/dist/index79.js.map +1 -0
  363. package/dist/index8.js +60 -18
  364. package/dist/index8.js.map +1 -1
  365. package/dist/{index80.js → index81.js} +5 -5
  366. package/dist/{index80.js.map → index81.js.map} +1 -1
  367. package/dist/{index82.js → index83.js} +25 -24
  368. package/dist/{index82.js.map → index83.js.map} +1 -1
  369. package/dist/{index84.js → index85.js} +7 -7
  370. package/dist/{index84.js.map → index85.js.map} +1 -1
  371. package/dist/{index86.js → index87.js} +2 -2
  372. package/dist/{index86.js.map → index87.js.map} +1 -1
  373. package/dist/{index88.js → index89.js} +3 -3
  374. package/dist/{index88.js.map → index89.js.map} +1 -1
  375. package/dist/index9.js +19 -7
  376. package/dist/index9.js.map +1 -1
  377. package/dist/{index90.js → index91.js} +3 -3
  378. package/dist/{index90.js.map → index91.js.map} +1 -1
  379. package/dist/{index92.js → index93.js} +3 -3
  380. package/dist/{index92.js.map → index93.js.map} +1 -1
  381. package/dist/{index94.js → index95.js} +1 -1
  382. package/dist/index95.js.map +1 -0
  383. package/dist/{index96.js → index97.js} +3 -3
  384. package/dist/{index96.js.map → index97.js.map} +1 -1
  385. package/dist/{index98.js → index99.js} +3 -3
  386. package/dist/{index98.js.map → index99.js.map} +1 -1
  387. package/dist/style.css +1 -1
  388. package/package.json +1 -1
  389. package/dist/index120.js +0 -43
  390. package/dist/index120.js.map +0 -1
  391. package/dist/index162.js.map +0 -1
  392. package/dist/index164.js +0 -6
  393. package/dist/index164.js.map +0 -1
  394. package/dist/index172.js +0 -5
  395. package/dist/index172.js.map +0 -1
  396. package/dist/index186.js.map +0 -1
  397. package/dist/index188.js +0 -6
  398. package/dist/index188.js.map +0 -1
  399. package/dist/index212.js +0 -38
  400. package/dist/index212.js.map +0 -1
  401. package/dist/index218.js +0 -8
  402. package/dist/index218.js.map +0 -1
  403. package/dist/index241.js +0 -13
  404. package/dist/index241.js.map +0 -1
  405. package/dist/index283.js +0 -12
  406. package/dist/index283.js.map +0 -1
  407. package/dist/index300.js +0 -424
  408. package/dist/index300.js.map +0 -1
  409. package/dist/index4.js +0 -17
  410. package/dist/index4.js.map +0 -1
  411. package/dist/index77.js +0 -47
  412. package/dist/index77.js.map +0 -1
  413. package/dist/index94.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index296.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
1
+ {"version":3,"file":"index296.js","sources":["../src/utilities/functions/range.ts"],"sourcesContent":["export function range(start: number, end: number, step: number = 1): number[] {\n\tconst length = Math.max(Math.ceil((end - start) / step), 0);\n\tconst result = new Array<number>(length);\n\n\tfor (let i = 0; i < length; i++, start += step) {\n\t\tresult[i] = start;\n\t}\n\n\treturn result;\n}\n"],"names":["range","start","end","step","length","result","i"],"mappings":"AAAO,SAASA,EAAMC,GAAeC,GAAaC,IAAe,GAAa;AACvE,QAAAC,IAAS,KAAK,IAAI,KAAK,MAAMF,IAAMD,KAASE,CAAI,GAAG,CAAC,GACpDE,IAAS,IAAI,MAAcD,CAAM;AAEvC,WAASE,IAAI,GAAGA,IAAIF,GAAQE,KAAKL,KAASE;AACzC,IAAAE,EAAOC,CAAC,IAAIL;AAGN,SAAAI;AACR;"}
package/dist/index297.js CHANGED
@@ -1,14 +1,10 @@
1
- function c(n, r, e) {
2
- const i = typeof r == "string" ? r.split(".") : r;
3
- let t = n;
4
- for (const o of i)
5
- if (t && typeof t == "object" && o in t)
6
- t = t[o];
7
- else
8
- return e;
9
- return t === void 0 ? e : t;
1
+ function c(n, e) {
2
+ const u = [];
3
+ for (let t = 0; t < n.length; t += e)
4
+ u.push(n.slice(t, t + e));
5
+ return u;
10
6
  }
11
7
  export {
12
- c as get
8
+ c as chunk
13
9
  };
14
10
  //# sourceMappingURL=index297.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index297.js","sources":["../src/utilities/functions/get.ts"],"sourcesContent":["type Path<T, K extends keyof T> = K extends string\n\t? T[K] extends object\n\t\t? `${K}.${Path<T[K], keyof T[K]>}` | K\n\t\t: K\n\t: never;\n\nexport function get<T, P extends Path<T, keyof T>>(\n\tobj: T,\n\tpath: P,\n\tdefaultValue?: any\n): any {\n\tconst pathArray = (\n\t\ttypeof path === 'string' ? path.split('.') : path\n\t) as string[];\n\n\tlet current: any = obj;\n\n\tfor (const key of pathArray) {\n\t\tif (current && typeof current === 'object' && key in current) {\n\t\t\tcurrent = current[key];\n\t\t} else {\n\t\t\treturn defaultValue;\n\t\t}\n\t}\n\n\treturn current === undefined ? defaultValue : current;\n}\n"],"names":["get","obj","path","defaultValue","pathArray","current","key"],"mappings":"AAMgB,SAAAA,EACfC,GACAC,GACAC,GACM;AACN,QAAMC,IACL,OAAOF,KAAS,WAAWA,EAAK,MAAM,GAAG,IAAIA;AAG9C,MAAIG,IAAeJ;AAEnB,aAAWK,KAAOF;AACjB,QAAIC,KAAW,OAAOA,KAAY,YAAYC,KAAOD;AACpD,MAAAA,IAAUA,EAAQC,CAAG;AAAA;AAEd,aAAAH;AAIF,SAAAE,MAAY,SAAYF,IAAeE;AAC/C;"}
1
+ {"version":3,"file":"index297.js","sources":["../src/utilities/functions/chunk.ts"],"sourcesContent":["export function chunk<T>(array: T[], size: number): T[][] {\n\tif (size <= 0) {\n\t\tthrow new Error('Size must be a positive number');\n\t}\n\n\tconst result: T[][] = [];\n\n\tfor (let i = 0; i < array.length; i += size) {\n\t\tresult.push(array.slice(i, i + size));\n\t}\n\n\treturn result;\n}\n"],"names":["chunk","array","size","result","i"],"mappings":"AAAgB,SAAAA,EAASC,GAAYC,GAAqB;AAKzD,QAAMC,IAAgB,CAAA;AAEtB,WAASC,IAAI,GAAGA,IAAIH,EAAM,QAAQG,KAAKF;AACtC,IAAAC,EAAO,KAAKF,EAAM,MAAMG,GAAGA,IAAIF,CAAI,CAAC;AAG9B,SAAAC;AACR;"}
package/dist/index298.js CHANGED
@@ -1,50 +1,22 @@
1
- import { observeElementRect as f, observeElementOffset as s, elementScroll as d, Virtualizer as p } from "./index300.js";
2
- import { defaultKeyExtractor as S, defaultRangeExtractor as V, measureElement as b } from "./index300.js";
3
- import { computed as g, unref as l, shallowRef as E, watch as o, triggerRef as i, onScopeDispose as v } from "vue";
4
- function w(e) {
5
- const t = new p(l(e)), a = E(t), u = t._didMount();
6
- return o(
7
- () => l(e).getScrollElement(),
8
- (r) => {
9
- r && t._willUpdate();
10
- },
11
- {
12
- immediate: !0
13
- }
14
- ), o(
15
- () => l(e),
16
- (r) => {
17
- t.setOptions({
18
- ...r,
19
- onChange: (c, m) => {
20
- var n;
21
- i(a), (n = r.onChange) == null || n.call(r, c, m);
1
+ function l(t, ...e) {
2
+ if (t.length) {
3
+ const o = t[0];
4
+ if (typeof o == "string") return [...t].sort(r);
5
+ if (typeof o == "number") return [...t].sort(r);
6
+ if (e && e.length)
7
+ return [...t].sort((f, u) => {
8
+ for (let n = 0; n < e.length; n++) {
9
+ const i = e[n], s = r(f[i], u[i]);
10
+ if (s) return s;
22
11
  }
23
- }), t._willUpdate(), i(a);
24
- },
25
- {
26
- immediate: !0
27
- }
28
- ), v(u), a;
29
- }
30
- function z(e) {
31
- return w(
32
- g(() => ({
33
- observeElementRect: f,
34
- observeElementOffset: s,
35
- scrollToFn: d,
36
- ...l(e)
37
- }))
38
- );
12
+ return 0;
13
+ });
14
+ throw new Error("Invalid comparison");
15
+ }
16
+ return t;
39
17
  }
18
+ const r = (t, e) => t < e ? -1 : t > e ? 1 : 0;
40
19
  export {
41
- p as Virtualizer,
42
- S as defaultKeyExtractor,
43
- V as defaultRangeExtractor,
44
- d as elementScroll,
45
- b as measureElement,
46
- s as observeElementOffset,
47
- f as observeElementRect,
48
- z as useVirtualizer
20
+ l as sort
49
21
  };
50
22
  //# sourceMappingURL=index298.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index298.js","sources":["../node_modules/@tanstack/vue-virtual/dist/esm/index.js"],"sourcesContent":["import { observeElementRect, observeElementOffset, elementScroll, observeWindowRect, observeWindowOffset, windowScroll, Virtualizer } from \"@tanstack/virtual-core\";\nexport * from \"@tanstack/virtual-core\";\nimport { computed, unref, shallowRef, watch, triggerRef, onScopeDispose } from \"vue\";\nfunction useVirtualizerBase(options) {\n const virtualizer = new Virtualizer(unref(options));\n const state = shallowRef(virtualizer);\n const cleanup = virtualizer._didMount();\n watch(\n () => unref(options).getScrollElement(),\n (el) => {\n if (el) {\n virtualizer._willUpdate();\n }\n },\n {\n immediate: true\n }\n );\n watch(\n () => unref(options),\n (options2) => {\n virtualizer.setOptions({\n ...options2,\n onChange: (instance, sync) => {\n var _a;\n triggerRef(state);\n (_a = options2.onChange) == null ? void 0 : _a.call(options2, instance, sync);\n }\n });\n virtualizer._willUpdate();\n triggerRef(state);\n },\n {\n immediate: true\n }\n );\n onScopeDispose(cleanup);\n return state;\n}\nfunction useVirtualizer(options) {\n return useVirtualizerBase(\n computed(() => ({\n observeElementRect,\n observeElementOffset,\n scrollToFn: elementScroll,\n ...unref(options)\n }))\n );\n}\nfunction useWindowVirtualizer(options) {\n return useVirtualizerBase(\n computed(() => ({\n getScrollElement: () => typeof document !== \"undefined\" ? window : null,\n observeElementRect: observeWindowRect,\n observeElementOffset: observeWindowOffset,\n scrollToFn: windowScroll,\n initialOffset: () => typeof document !== \"undefined\" ? window.scrollY : 0,\n ...unref(options)\n }))\n );\n}\nexport {\n useVirtualizer,\n useWindowVirtualizer\n};\n//# sourceMappingURL=index.js.map\n"],"names":["useVirtualizerBase","options","virtualizer","Virtualizer","unref","state","shallowRef","cleanup","watch","el","options2","instance","sync","_a","triggerRef","onScopeDispose","useVirtualizer","computed","observeElementRect","observeElementOffset","elementScroll"],"mappings":";;;AAGA,SAASA,EAAmBC,GAAS;AACnC,QAAMC,IAAc,IAAIC,EAAYC,EAAMH,CAAO,CAAC,GAC5CI,IAAQC,EAAWJ,CAAW,GAC9BK,IAAUL,EAAY;AAC5B,SAAAM;AAAA,IACE,MAAMJ,EAAMH,CAAO,EAAE,iBAAkB;AAAA,IACvC,CAACQ,MAAO;AACN,MAAIA,KACFP,EAAY,YAAW;AAAA,IAE1B;AAAA,IACD;AAAA,MACE,WAAW;AAAA,IACZ;AAAA,EACL,GACEM;AAAA,IACE,MAAMJ,EAAMH,CAAO;AAAA,IACnB,CAACS,MAAa;AACZ,MAAAR,EAAY,WAAW;AAAA,QACrB,GAAGQ;AAAA,QACH,UAAU,CAACC,GAAUC,MAAS;AAC5B,cAAIC;AACJ,UAAAC,EAAWT,CAAK,IACfQ,IAAKH,EAAS,aAAa,QAAgBG,EAAG,KAAKH,GAAUC,GAAUC,CAAI;AAAA,QAC7E;AAAA,MACT,CAAO,GACDV,EAAY,YAAW,GACvBY,EAAWT,CAAK;AAAA,IACjB;AAAA,IACD;AAAA,MACE,WAAW;AAAA,IACZ;AAAA,EACL,GACEU,EAAeR,CAAO,GACfF;AACT;AACA,SAASW,EAAef,GAAS;AAC/B,SAAOD;AAAA,IACLiB,EAAS,OAAO;AAAA,MACd,oBAAAC;AAAA,MACA,sBAAAC;AAAA,MACA,YAAYC;AAAA,MACZ,GAAGhB,EAAMH,CAAO;AAAA,IACtB,EAAM;AAAA,EACN;AACA;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index298.js","sources":["../src/utilities/functions/sort.ts"],"sourcesContent":["import { negative } from './negative';\nimport { pipe } from './pipe';\n\ntype SortableType = string | number | Date;\nexport function sort<T extends SortableType>(arr: T[]): T[];\nexport function sort<T extends object>(arr: T[], ...keys: (keyof T)[]): T[];\n\n/**\n *\n * @param arr Array of objects, strings, or numbers to be sorted\n * @param keys Key of the object to be considered, it must be a string or number\n * @returns The sorted array\n */\nexport function sort<T>(arr: T[], ...keys: (keyof T)[]) {\n\tif (arr.length) {\n\t\tconst first = arr[0];\n\t\tif (typeof first === 'string') return [...arr].sort(getCompare);\n\t\telse if (typeof first === 'number') return [...arr].sort(getCompare);\n\t\telse if (keys && keys.length) {\n\t\t\treturn [...arr].sort((a, b) => {\n\t\t\t\tfor (let index = 0; index < keys.length; index++) {\n\t\t\t\t\tconst key = keys[index];\n\n\t\t\t\t\tconst result = getCompare(a[key], b[key]);\n\t\t\t\t\tif (result) return result;\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t});\n\t\t}\n\t\tthrow new Error('Invalid comparison');\n\t}\n\treturn arr;\n}\n\nconst getCompare = (a: any, b: any) => {\n\tif (a < b) return -1;\n\telse if (a > b) return 1;\n\telse return 0;\n};\n\nexport function reverseSort<T extends SortableType>(arr: T[]): T[];\nexport function reverseSort<T extends object>(\n\tarr: T[],\n\t...keys: (keyof T)[]\n): T[];\n\n/**\n *\n * @param arr Array of objects, strings, or numbers to be sorted\n * @param keys Key of the object to be considered, it must be a string or number\n * @returns The sorted array\n */\nexport function reverseSort<T>(arr: T[], ...keys: (keyof T)[]) {\n\tif (arr.length) {\n\t\tconst first = arr[0];\n\t\tif (typeof first === 'string')\n\t\t\treturn [...arr].sort(pipe(getCompare, negative));\n\t\telse if (typeof first === 'number')\n\t\t\treturn [...arr].sort(pipe(getCompare, negative));\n\t\telse if (keys && keys.length) {\n\t\t\treturn [...arr].sort((a, b) => {\n\t\t\t\tfor (let index = 0; index < keys.length; index++) {\n\t\t\t\t\tconst key = keys[index];\n\n\t\t\t\t\tconst result = getCompare(a[key], b[key]);\n\t\t\t\t\tif (result) return result * -1;\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t});\n\t\t}\n\t\tthrow new Error('Invalid comparison');\n\t}\n\treturn arr;\n}\n"],"names":["sort","arr","keys","first","getCompare","a","b","index","key","result"],"mappings":"AAagB,SAAAA,EAAQC,MAAaC,GAAmB;AACvD,MAAID,EAAI,QAAQ;AACT,UAAAE,IAAQF,EAAI,CAAC;AACf,QAAA,OAAOE,KAAU,SAAU,QAAO,CAAC,GAAGF,CAAG,EAAE,KAAKG,CAAU;AACrD,QAAA,OAAOD,KAAU,SAAU,QAAO,CAAC,GAAGF,CAAG,EAAE,KAAKG,CAAU;AAC1D,QAAAF,KAAQA,EAAK;AACrB,aAAO,CAAC,GAAGD,CAAG,EAAE,KAAK,CAACI,GAAGC,MAAM;AAC9B,iBAASC,IAAQ,GAAGA,IAAQL,EAAK,QAAQK,KAAS;AAC3C,gBAAAC,IAAMN,EAAKK,CAAK,GAEhBE,IAASL,EAAWC,EAAEG,CAAG,GAAGF,EAAEE,CAAG,CAAC;AACxC,cAAIC,EAAe,QAAAA;AAAA,QACpB;AACO,eAAA;AAAA,MAAA,CACP;AAEI,UAAA,IAAI,MAAM,oBAAoB;AAAA,EACrC;AACO,SAAAR;AACR;AAEA,MAAMG,IAAa,CAACC,GAAQC,MACvBD,IAAIC,IAAU,KACTD,IAAIC,IAAU,IACX;"}
@@ -0,0 +1,50 @@
1
+ import { observeElementRect as f, observeElementOffset as s, elementScroll as d, Virtualizer as p } from "./index301.js";
2
+ import { defaultKeyExtractor as S, defaultRangeExtractor as V, measureElement as b } from "./index301.js";
3
+ import { computed as g, unref as l, shallowRef as E, watch as o, triggerRef as i, onScopeDispose as v } from "vue";
4
+ function w(e) {
5
+ const t = new p(l(e)), a = E(t), u = t._didMount();
6
+ return o(
7
+ () => l(e).getScrollElement(),
8
+ (r) => {
9
+ r && t._willUpdate();
10
+ },
11
+ {
12
+ immediate: !0
13
+ }
14
+ ), o(
15
+ () => l(e),
16
+ (r) => {
17
+ t.setOptions({
18
+ ...r,
19
+ onChange: (c, m) => {
20
+ var n;
21
+ i(a), (n = r.onChange) == null || n.call(r, c, m);
22
+ }
23
+ }), t._willUpdate(), i(a);
24
+ },
25
+ {
26
+ immediate: !0
27
+ }
28
+ ), v(u), a;
29
+ }
30
+ function z(e) {
31
+ return w(
32
+ g(() => ({
33
+ observeElementRect: f,
34
+ observeElementOffset: s,
35
+ scrollToFn: d,
36
+ ...l(e)
37
+ }))
38
+ );
39
+ }
40
+ export {
41
+ p as Virtualizer,
42
+ S as defaultKeyExtractor,
43
+ V as defaultRangeExtractor,
44
+ d as elementScroll,
45
+ b as measureElement,
46
+ s as observeElementOffset,
47
+ f as observeElementRect,
48
+ z as useVirtualizer
49
+ };
50
+ //# sourceMappingURL=index299.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index299.js","sources":["../node_modules/@tanstack/vue-virtual/dist/esm/index.js"],"sourcesContent":["import { observeElementRect, observeElementOffset, elementScroll, observeWindowRect, observeWindowOffset, windowScroll, Virtualizer } from \"@tanstack/virtual-core\";\nexport * from \"@tanstack/virtual-core\";\nimport { computed, unref, shallowRef, watch, triggerRef, onScopeDispose } from \"vue\";\nfunction useVirtualizerBase(options) {\n const virtualizer = new Virtualizer(unref(options));\n const state = shallowRef(virtualizer);\n const cleanup = virtualizer._didMount();\n watch(\n () => unref(options).getScrollElement(),\n (el) => {\n if (el) {\n virtualizer._willUpdate();\n }\n },\n {\n immediate: true\n }\n );\n watch(\n () => unref(options),\n (options2) => {\n virtualizer.setOptions({\n ...options2,\n onChange: (instance, sync) => {\n var _a;\n triggerRef(state);\n (_a = options2.onChange) == null ? void 0 : _a.call(options2, instance, sync);\n }\n });\n virtualizer._willUpdate();\n triggerRef(state);\n },\n {\n immediate: true\n }\n );\n onScopeDispose(cleanup);\n return state;\n}\nfunction useVirtualizer(options) {\n return useVirtualizerBase(\n computed(() => ({\n observeElementRect,\n observeElementOffset,\n scrollToFn: elementScroll,\n ...unref(options)\n }))\n );\n}\nfunction useWindowVirtualizer(options) {\n return useVirtualizerBase(\n computed(() => ({\n getScrollElement: () => typeof document !== \"undefined\" ? window : null,\n observeElementRect: observeWindowRect,\n observeElementOffset: observeWindowOffset,\n scrollToFn: windowScroll,\n initialOffset: () => typeof document !== \"undefined\" ? window.scrollY : 0,\n ...unref(options)\n }))\n );\n}\nexport {\n useVirtualizer,\n useWindowVirtualizer\n};\n//# sourceMappingURL=index.js.map\n"],"names":["useVirtualizerBase","options","virtualizer","Virtualizer","unref","state","shallowRef","cleanup","watch","el","options2","instance","sync","_a","triggerRef","onScopeDispose","useVirtualizer","computed","observeElementRect","observeElementOffset","elementScroll"],"mappings":";;;AAGA,SAASA,EAAmBC,GAAS;AACnC,QAAMC,IAAc,IAAIC,EAAYC,EAAMH,CAAO,CAAC,GAC5CI,IAAQC,EAAWJ,CAAW,GAC9BK,IAAUL,EAAY;AAC5B,SAAAM;AAAA,IACE,MAAMJ,EAAMH,CAAO,EAAE,iBAAkB;AAAA,IACvC,CAACQ,MAAO;AACN,MAAIA,KACFP,EAAY,YAAW;AAAA,IAE1B;AAAA,IACD;AAAA,MACE,WAAW;AAAA,IACZ;AAAA,EACL,GACEM;AAAA,IACE,MAAMJ,EAAMH,CAAO;AAAA,IACnB,CAACS,MAAa;AACZ,MAAAR,EAAY,WAAW;AAAA,QACrB,GAAGQ;AAAA,QACH,UAAU,CAACC,GAAUC,MAAS;AAC5B,cAAIC;AACJ,UAAAC,EAAWT,CAAK,IACfQ,IAAKH,EAAS,aAAa,QAAgBG,EAAG,KAAKH,GAAUC,GAAUC,CAAI;AAAA,QAC7E;AAAA,MACT,CAAO,GACDV,EAAY,YAAW,GACvBY,EAAWT,CAAK;AAAA,IACjB;AAAA,IACD;AAAA,MACE,WAAW;AAAA,IACZ;AAAA,EACL,GACEU,EAAeR,CAAO,GACfF;AACT;AACA,SAASW,EAAef,GAAS;AAC/B,SAAOD;AAAA,IACLiB,EAAS,OAAO;AAAA,MACd,oBAAAC;AAAA,MACA,sBAAAC;AAAA,MACA,YAAYC;AAAA,MACZ,GAAGhB,EAAMH,CAAO;AAAA,IACtB,EAAM;AAAA,EACN;AACA;","x_google_ignoreList":[0]}
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as g, computed as s, ref as _, openBlock as B, createElementBlock as w, normalizeProps as t, guardReactiveProps as l, createElementVNode as u, mergeProps as V, renderSlot as C } from "vue";
2
- import { isCssColor as i } from "./index200.js";
3
- import { when as E } from "./index201.js";
2
+ import { isCssColor as i } from "./index222.js";
3
+ import { when as E } from "./index223.js";
4
4
  const q = {
5
5
  "aria-hidden": "true",
6
6
  class: "bb-base-radio-container"
@@ -98,4 +98,4 @@ const q = {
98
98
  export {
99
99
  O as default
100
100
  };
101
- //# sourceMappingURL=index29.js.map
101
+ //# sourceMappingURL=index30.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index29.js","sources":["../src/components/BaseRadio/BaseRadio.vue"],"sourcesContent":["<template>\n\t<span v-bind=\"containerAttributes\">\n\t\t<input v-bind=\"inputAttributes\" class=\"sr-only\" />\n\t\t<span aria-hidden=\"true\" class=\"bb-base-radio-container\">\n\t\t\t<slot name=\"icon\" v-bind=\"slotAttributes\">\n\t\t\t\t<span v-bind=\"iconAttributes\"></span>\n\t\t\t</slot>\n\t\t</span>\n\t</span>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref } from 'vue';\nimport { isCssColor } from '@/utilities/functions/isCssColor';\nimport { when } from '@/utilities/functions/when';\nimport type { InputHTMLAttributes, HTMLAttributes } from 'vue';\n\nexport type BaseRadioProps = {\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tariaDescribedby?: InputHTMLAttributes['aria-describedby'];\n\n\t/**\n\t * 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 * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * 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 * 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 * Defines the value of the radio input.\n\t * It can be any serializable value.\n\t */\n\tvalue: any;\n};\n\nexport type BaseRadioEvents = {\n\t(e: 'blur', event: FocusEvent): void;\n\t(e: 'change', event: Event): void;\n\t(e: 'click', event: MouseEvent): void;\n\t(e: 'focus', event: FocusEvent): void;\n\t(e: 'input', event: Event): void;\n\t(e: 'keydown', event: KeyboardEvent): void;\n\t(e: 'mousedown', event: MouseEvent): void;\n\t(e: 'mouseup', event: MouseEvent): void;\n\t(e: 'update:modelValue', value: any): void;\n};\n\nexport type SlotAttributes = {\n\tchecked: boolean;\n\tdisabled: Exclude<BaseRadioProps['disabled'], undefined>;\n\tfocused: boolean;\n\thasErrors: Exclude<BaseRadioProps['hasErrors'], undefined>;\n\tid: BaseRadioProps['id'];\n\tname: BaseRadioProps['name'];\n\tparsedValue: string;\n\treadonly: BaseRadioProps['readonly'];\n\tvalue: any;\n};\nconst props = defineProps<BaseRadioProps>();\n\nconst emit = defineEmits<BaseRadioEvents>();\n\ndefineSlots<{\n\ticon?: (props: SlotAttributes) => any;\n}>();\n\nconst checked = computed(() => {\n\tif (props.checked) return true;\n\treturn JSON.stringify(props.modelValue) === JSON.stringify(props.value);\n});\nconst hasFocus = ref(false);\n\nconst containerAttributes = computed(() => {\n\tconst attributes: Record<string, any> = {\n\t\tclass: {\n\t\t\t'bb-base-radio': true,\n\t\t\t'bb-base-radio--disabled': props.disabled,\n\t\t\t'bb-base-radio--errors': props.hasErrors,\n\t\t\t'bb-base-radio--readonly': props.readonly,\n\t\t\t[`bb-base-radio--${props.color}`]:\n\t\t\t\tprops.color && !isCssColor(props.color),\n\t\t},\n\t};\n\tif (props.color && isCssColor(props.color)) {\n\t\tattributes['style'] = `--color: ${props.color}`;\n\t}\n\treturn attributes;\n});\n\n/**\n * This is used to keep the value compatible to common html expected values.\n * Convert to string everything that's not but do not double encode strings\n */\nconst makeInputValue = when(\n\t(item: unknown) => typeof item !== 'string',\n\tJSON.stringify\n);\n\nconst inputAttributes = computed(() => {\n\tconst value = makeInputValue(props.value);\n\n\tconst onBlur = (event: FocusEvent): void => {\n\t\thasFocus.value = false;\n\t\temit('blur', event);\n\t};\n\tconst onChange = (event: Event): void => {\n\t\temit('change', event);\n\t\temit('update:modelValue', props.value);\n\t};\n\tconst onFocus = (event: FocusEvent): void => {\n\t\thasFocus.value = true;\n\t\temit('focus', event);\n\t};\n\n\tconst eventListeners = {\n\t\tonBlur,\n\t\tonChange,\n\t\tonClick: (event: MouseEvent) => emit('click', event),\n\t\tonFocus,\n\t\tonInput: (event: Event) => emit('input', event),\n\t\tonKeydown: (event: KeyboardEvent) => emit('keydown', event),\n\t\tonMousedown: (event: MouseEvent) => emit('mousedown', event),\n\t\tonMouseup: (event: MouseEvent) => emit('mouseup', event),\n\t};\n\n\treturn {\n\t\t'aria-describedby': props.ariaDescribedby,\n\t\tautofocus: props.autofocus,\n\t\tchecked: checked.value,\n\t\t// There is no such thing as readonly radio so we disable and style it with css\n\t\tdisabled: props.disabled || props.readonly,\n\t\tid: props.id,\n\t\tname: props.name,\n\t\trequired: props.required,\n\t\ttabindex: props.disabled ? -1 : undefined,\n\t\ttype: 'radio',\n\t\tvalue: value,\n\t\t...eventListeners,\n\t};\n});\n\nconst slotAttributes = computed<SlotAttributes>(() => ({\n\tchecked: checked.value,\n\tdisabled: props.disabled,\n\tfocused: hasFocus.value,\n\thasErrors: props.hasErrors,\n\tid: props.id,\n\tname: props.name,\n\tparsedValue: inputAttributes.value.value,\n\treadonly: props.readonly,\n\trequired: props.required,\n\tvalue: props.value,\n}));\n\nconst iconAttributes = computed(() => {\n\tlet style: { [key: string]: string } = {};\n\tif (props.color && isCssColor(props.color)) {\n\t\tstyle.color = props.color;\n\t}\n\treturn {\n\t\tclass: 'bb-base-radio-container__icon',\n\t\tstyle,\n\t};\n});\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BaseRadio';\n</style>\n"],"names":["props","__props","emit","__emit","checked","computed","hasFocus","ref","containerAttributes","attributes","isCssColor","makeInputValue","when","item","inputAttributes","value","eventListeners","event","slotAttributes","iconAttributes","style"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA0GA,UAAMA,IAAQC,GAERC,IAAOC,GAMPC,IAAUC,EAAS,MACpBL,EAAM,UAAgB,KACnB,KAAK,UAAUA,EAAM,UAAU,MAAM,KAAK,UAAUA,EAAM,KAAK,CACtE,GACKM,IAAWC,EAAI,EAAK,GAEpBC,IAAsBH,EAAS,MAAM;AAC1C,YAAMI,IAAkC;AAAA,QACvC,OAAO;AAAA,UACN,iBAAiB;AAAA,UACjB,2BAA2BT,EAAM;AAAA,UACjC,yBAAyBA,EAAM;AAAA,UAC/B,2BAA2BA,EAAM;AAAA,UACjC,CAAC,kBAAkBA,EAAM,KAAK,EAAE,GAC/BA,EAAM,SAAS,CAACU,EAAWV,EAAM,KAAK;AAAA,QACxC;AAAA,MAAA;AAED,aAAIA,EAAM,SAASU,EAAWV,EAAM,KAAK,MACxCS,EAAW,QAAW,YAAYT,EAAM,KAAK,KAEvCS;AAAA,IAAA,CACP,GAMKE,IAAiBC;AAAA,MACtB,CAACC,MAAkB,OAAOA,KAAS;AAAA,MACnC,KAAK;AAAA,IAAA,GAGAC,IAAkBT,EAAS,MAAM;AAChC,YAAAU,IAAQJ,EAAeX,EAAM,KAAK,GAelCgB,IAAiB;AAAA,QACtB,QAdc,CAACC,MAA4B;AAC3C,UAAAX,EAAS,QAAQ,IACjBJ,EAAK,QAAQe,CAAK;AAAA,QAAA;AAAA,QAalB,UAXgB,CAACA,MAAuB;AACxC,UAAAf,EAAK,UAAUe,CAAK,GACff,EAAA,qBAAqBF,EAAM,KAAK;AAAA,QAAA;AAAA,QAUrC,SAAS,CAACiB,MAAsBf,EAAK,SAASe,CAAK;AAAA,QACnD,SATe,CAACA,MAA4B;AAC5C,UAAAX,EAAS,QAAQ,IACjBJ,EAAK,SAASe,CAAK;AAAA,QAAA;AAAA,QAQnB,SAAS,CAACA,MAAiBf,EAAK,SAASe,CAAK;AAAA,QAC9C,WAAW,CAACA,MAAyBf,EAAK,WAAWe,CAAK;AAAA,QAC1D,aAAa,CAACA,MAAsBf,EAAK,aAAae,CAAK;AAAA,QAC3D,WAAW,CAACA,MAAsBf,EAAK,WAAWe,CAAK;AAAA,MAAA;AAGjD,aAAA;AAAA,QACN,oBAAoBjB,EAAM;AAAA,QAC1B,WAAWA,EAAM;AAAA,QACjB,SAASI,EAAQ;AAAA;AAAA,QAEjB,UAAUJ,EAAM,YAAYA,EAAM;AAAA,QAClC,IAAIA,EAAM;AAAA,QACV,MAAMA,EAAM;AAAA,QACZ,UAAUA,EAAM;AAAA,QAChB,UAAUA,EAAM,WAAW,KAAK;AAAA,QAChC,MAAM;AAAA,QACN,OAAAe;AAAA,QACA,GAAGC;AAAA,MAAA;AAAA,IACJ,CACA,GAEKE,IAAiBb,EAAyB,OAAO;AAAA,MACtD,SAASD,EAAQ;AAAA,MACjB,UAAUJ,EAAM;AAAA,MAChB,SAASM,EAAS;AAAA,MAClB,WAAWN,EAAM;AAAA,MACjB,IAAIA,EAAM;AAAA,MACV,MAAMA,EAAM;AAAA,MACZ,aAAac,EAAgB,MAAM;AAAA,MACnC,UAAUd,EAAM;AAAA,MAChB,UAAUA,EAAM;AAAA,MAChB,OAAOA,EAAM;AAAA,IACZ,EAAA,GAEImB,IAAiBd,EAAS,MAAM;AACrC,UAAIe,IAAmC,CAAA;AACvC,aAAIpB,EAAM,SAASU,EAAWV,EAAM,KAAK,MACxCoB,EAAM,QAAQpB,EAAM,QAEd;AAAA,QACN,OAAO;AAAA,QACP,OAAAoB;AAAA,MAAA;AAAA,IACD,CACA;;;;;;;;;;;"}
1
+ {"version":3,"file":"index30.js","sources":["../src/components/BaseRadio/BaseRadio.vue"],"sourcesContent":["<template>\n\t<span v-bind=\"containerAttributes\">\n\t\t<input v-bind=\"inputAttributes\" class=\"sr-only\" />\n\t\t<span aria-hidden=\"true\" class=\"bb-base-radio-container\">\n\t\t\t<slot name=\"icon\" v-bind=\"slotAttributes\">\n\t\t\t\t<span v-bind=\"iconAttributes\"></span>\n\t\t\t</slot>\n\t\t</span>\n\t</span>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref } from 'vue';\nimport { isCssColor } from '@/utilities/functions/isCssColor';\nimport { when } from '@/utilities/functions/when';\nimport type { InputHTMLAttributes, HTMLAttributes } from 'vue';\n\nexport type BaseRadioProps = {\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tariaDescribedby?: InputHTMLAttributes['aria-describedby'];\n\n\t/**\n\t * 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 * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * 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 * 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 * Defines the value of the radio input.\n\t * It can be any serializable value.\n\t */\n\tvalue: any;\n};\n\nexport type BaseRadioEvents = {\n\t(e: 'blur', event: FocusEvent): void;\n\t(e: 'change', event: Event): void;\n\t(e: 'click', event: MouseEvent): void;\n\t(e: 'focus', event: FocusEvent): void;\n\t(e: 'input', event: Event): void;\n\t(e: 'keydown', event: KeyboardEvent): void;\n\t(e: 'mousedown', event: MouseEvent): void;\n\t(e: 'mouseup', event: MouseEvent): void;\n\t(e: 'update:modelValue', value: any): void;\n};\n\nexport type SlotAttributes = {\n\tchecked: boolean;\n\tdisabled: Exclude<BaseRadioProps['disabled'], undefined>;\n\tfocused: boolean;\n\thasErrors: Exclude<BaseRadioProps['hasErrors'], undefined>;\n\tid: BaseRadioProps['id'];\n\tname: BaseRadioProps['name'];\n\tparsedValue: string;\n\treadonly: BaseRadioProps['readonly'];\n\tvalue: any;\n};\nconst props = defineProps<BaseRadioProps>();\n\nconst emit = defineEmits<BaseRadioEvents>();\n\ndefineSlots<{\n\ticon?: (props: SlotAttributes) => any;\n}>();\n\nconst checked = computed(() => {\n\tif (props.checked) return true;\n\treturn JSON.stringify(props.modelValue) === JSON.stringify(props.value);\n});\nconst hasFocus = ref(false);\n\nconst containerAttributes = computed(() => {\n\tconst attributes: Record<string, any> = {\n\t\tclass: {\n\t\t\t'bb-base-radio': true,\n\t\t\t'bb-base-radio--disabled': props.disabled,\n\t\t\t'bb-base-radio--errors': props.hasErrors,\n\t\t\t'bb-base-radio--readonly': props.readonly,\n\t\t\t[`bb-base-radio--${props.color}`]:\n\t\t\t\tprops.color && !isCssColor(props.color),\n\t\t},\n\t};\n\tif (props.color && isCssColor(props.color)) {\n\t\tattributes['style'] = `--color: ${props.color}`;\n\t}\n\treturn attributes;\n});\n\n/**\n * This is used to keep the value compatible to common html expected values.\n * Convert to string everything that's not but do not double encode strings\n */\nconst makeInputValue = when(\n\t(item: unknown) => typeof item !== 'string',\n\tJSON.stringify\n);\n\nconst inputAttributes = computed(() => {\n\tconst value = makeInputValue(props.value);\n\n\tconst onBlur = (event: FocusEvent): void => {\n\t\thasFocus.value = false;\n\t\temit('blur', event);\n\t};\n\tconst onChange = (event: Event): void => {\n\t\temit('change', event);\n\t\temit('update:modelValue', props.value);\n\t};\n\tconst onFocus = (event: FocusEvent): void => {\n\t\thasFocus.value = true;\n\t\temit('focus', event);\n\t};\n\n\tconst eventListeners = {\n\t\tonBlur,\n\t\tonChange,\n\t\tonClick: (event: MouseEvent) => emit('click', event),\n\t\tonFocus,\n\t\tonInput: (event: Event) => emit('input', event),\n\t\tonKeydown: (event: KeyboardEvent) => emit('keydown', event),\n\t\tonMousedown: (event: MouseEvent) => emit('mousedown', event),\n\t\tonMouseup: (event: MouseEvent) => emit('mouseup', event),\n\t};\n\n\treturn {\n\t\t'aria-describedby': props.ariaDescribedby,\n\t\tautofocus: props.autofocus,\n\t\tchecked: checked.value,\n\t\t// There is no such thing as readonly radio so we disable and style it with css\n\t\tdisabled: props.disabled || props.readonly,\n\t\tid: props.id,\n\t\tname: props.name,\n\t\trequired: props.required,\n\t\ttabindex: props.disabled ? -1 : undefined,\n\t\ttype: 'radio',\n\t\tvalue: value,\n\t\t...eventListeners,\n\t};\n});\n\nconst slotAttributes = computed<SlotAttributes>(() => ({\n\tchecked: checked.value,\n\tdisabled: props.disabled,\n\tfocused: hasFocus.value,\n\thasErrors: props.hasErrors,\n\tid: props.id,\n\tname: props.name,\n\tparsedValue: inputAttributes.value.value,\n\treadonly: props.readonly,\n\trequired: props.required,\n\tvalue: props.value,\n}));\n\nconst iconAttributes = computed(() => {\n\tlet style: { [key: string]: string } = {};\n\tif (props.color && isCssColor(props.color)) {\n\t\tstyle.color = props.color;\n\t}\n\treturn {\n\t\tclass: 'bb-base-radio-container__icon',\n\t\tstyle,\n\t};\n});\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BaseRadio';\n</style>\n"],"names":["props","__props","emit","__emit","checked","computed","hasFocus","ref","containerAttributes","attributes","isCssColor","makeInputValue","when","item","inputAttributes","value","eventListeners","event","slotAttributes","iconAttributes","style"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA0GA,UAAMA,IAAQC,GAERC,IAAOC,GAMPC,IAAUC,EAAS,MACpBL,EAAM,UAAgB,KACnB,KAAK,UAAUA,EAAM,UAAU,MAAM,KAAK,UAAUA,EAAM,KAAK,CACtE,GACKM,IAAWC,EAAI,EAAK,GAEpBC,IAAsBH,EAAS,MAAM;AAC1C,YAAMI,IAAkC;AAAA,QACvC,OAAO;AAAA,UACN,iBAAiB;AAAA,UACjB,2BAA2BT,EAAM;AAAA,UACjC,yBAAyBA,EAAM;AAAA,UAC/B,2BAA2BA,EAAM;AAAA,UACjC,CAAC,kBAAkBA,EAAM,KAAK,EAAE,GAC/BA,EAAM,SAAS,CAACU,EAAWV,EAAM,KAAK;AAAA,QACxC;AAAA,MAAA;AAED,aAAIA,EAAM,SAASU,EAAWV,EAAM,KAAK,MACxCS,EAAW,QAAW,YAAYT,EAAM,KAAK,KAEvCS;AAAA,IAAA,CACP,GAMKE,IAAiBC;AAAA,MACtB,CAACC,MAAkB,OAAOA,KAAS;AAAA,MACnC,KAAK;AAAA,IAAA,GAGAC,IAAkBT,EAAS,MAAM;AAChC,YAAAU,IAAQJ,EAAeX,EAAM,KAAK,GAelCgB,IAAiB;AAAA,QACtB,QAdc,CAACC,MAA4B;AAC3C,UAAAX,EAAS,QAAQ,IACjBJ,EAAK,QAAQe,CAAK;AAAA,QAAA;AAAA,QAalB,UAXgB,CAACA,MAAuB;AACxC,UAAAf,EAAK,UAAUe,CAAK,GACff,EAAA,qBAAqBF,EAAM,KAAK;AAAA,QAAA;AAAA,QAUrC,SAAS,CAACiB,MAAsBf,EAAK,SAASe,CAAK;AAAA,QACnD,SATe,CAACA,MAA4B;AAC5C,UAAAX,EAAS,QAAQ,IACjBJ,EAAK,SAASe,CAAK;AAAA,QAAA;AAAA,QAQnB,SAAS,CAACA,MAAiBf,EAAK,SAASe,CAAK;AAAA,QAC9C,WAAW,CAACA,MAAyBf,EAAK,WAAWe,CAAK;AAAA,QAC1D,aAAa,CAACA,MAAsBf,EAAK,aAAae,CAAK;AAAA,QAC3D,WAAW,CAACA,MAAsBf,EAAK,WAAWe,CAAK;AAAA,MAAA;AAGjD,aAAA;AAAA,QACN,oBAAoBjB,EAAM;AAAA,QAC1B,WAAWA,EAAM;AAAA,QACjB,SAASI,EAAQ;AAAA;AAAA,QAEjB,UAAUJ,EAAM,YAAYA,EAAM;AAAA,QAClC,IAAIA,EAAM;AAAA,QACV,MAAMA,EAAM;AAAA,QACZ,UAAUA,EAAM;AAAA,QAChB,UAAUA,EAAM,WAAW,KAAK;AAAA,QAChC,MAAM;AAAA,QACN,OAAAe;AAAA,QACA,GAAGC;AAAA,MAAA;AAAA,IACJ,CACA,GAEKE,IAAiBb,EAAyB,OAAO;AAAA,MACtD,SAASD,EAAQ;AAAA,MACjB,UAAUJ,EAAM;AAAA,MAChB,SAASM,EAAS;AAAA,MAClB,WAAWN,EAAM;AAAA,MACjB,IAAIA,EAAM;AAAA,MACV,MAAMA,EAAM;AAAA,MACZ,aAAac,EAAgB,MAAM;AAAA,MACnC,UAAUd,EAAM;AAAA,MAChB,UAAUA,EAAM;AAAA,MAChB,OAAOA,EAAM;AAAA,IACZ,EAAA,GAEImB,IAAiBd,EAAS,MAAM;AACrC,UAAIe,IAAmC,CAAA;AACvC,aAAIpB,EAAM,SAASU,EAAWV,EAAM,KAAK,MACxCoB,EAAM,QAAQpB,EAAM,QAEd;AAAA,QACN,OAAO;AAAA,QACP,OAAAoB;AAAA,MAAA;AAAA,IACD,CACA;;;;;;;;;;;"}