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
package/dist/index276.js CHANGED
@@ -1,130 +1,5 @@
1
- const P = ["top", "right", "bottom", "left"], l = Math.min, m = Math.max, M = Math.round, O = Math.floor, S = (t) => ({
2
- x: t,
3
- y: t
4
- }), p = {
5
- left: "right",
6
- right: "left",
7
- bottom: "top",
8
- top: "bottom"
9
- }, a = {
10
- start: "end",
11
- end: "start"
12
- };
13
- function w(t, n, e) {
14
- return m(t, l(n, e));
15
- }
16
- function j(t, n) {
17
- return typeof t == "function" ? t(n) : t;
18
- }
19
- function u(t) {
20
- return t.split("-")[0];
21
- }
22
- function g(t) {
23
- return t.split("-")[1];
24
- }
25
- function h(t) {
26
- return t === "x" ? "y" : "x";
27
- }
28
- function b(t) {
29
- return t === "y" ? "height" : "width";
30
- }
31
- function x(t) {
32
- return ["top", "bottom"].includes(u(t)) ? "y" : "x";
33
- }
34
- function d(t) {
35
- return h(x(t));
36
- }
37
- function C(t, n, e) {
38
- e === void 0 && (e = !1);
39
- const r = g(t), o = d(t), i = b(o);
40
- let c = o === "x" ? r === (e ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
41
- return n.reference[i] > n.floating[i] && (c = f(c)), [c, f(c)];
42
- }
43
- function L(t) {
44
- const n = f(t);
45
- return [s(t), n, s(n)];
46
- }
47
- function s(t) {
48
- return t.replace(/start|end/g, (n) => a[n]);
49
- }
50
- function A(t, n, e) {
51
- const r = ["left", "right"], o = ["right", "left"], i = ["top", "bottom"], c = ["bottom", "top"];
52
- switch (t) {
53
- case "top":
54
- case "bottom":
55
- return e ? n ? o : r : n ? r : o;
56
- case "left":
57
- case "right":
58
- return n ? i : c;
59
- default:
60
- return [];
61
- }
62
- }
63
- function E(t, n, e, r) {
64
- const o = g(t);
65
- let i = A(u(t), e === "start", r);
66
- return o && (i = i.map((c) => c + "-" + o), n && (i = i.concat(i.map(s)))), i;
67
- }
68
- function f(t) {
69
- return t.replace(/left|right|bottom|top/g, (n) => p[n]);
70
- }
71
- function y(t) {
72
- return {
73
- top: 0,
74
- right: 0,
75
- bottom: 0,
76
- left: 0,
77
- ...t
78
- };
79
- }
80
- function R(t) {
81
- return typeof t != "number" ? y(t) : {
82
- top: t,
83
- right: t,
84
- bottom: t,
85
- left: t
86
- };
87
- }
88
- function T(t) {
89
- const {
90
- x: n,
91
- y: e,
92
- width: r,
93
- height: o
94
- } = t;
95
- return {
96
- width: r,
97
- height: o,
98
- top: e,
99
- left: n,
100
- right: n + r,
101
- bottom: e + o,
102
- x: n,
103
- y: e
104
- };
105
- }
1
+ var e = { exports: {} };
106
2
  export {
107
- w as clamp,
108
- S as createCoords,
109
- j as evaluate,
110
- y as expandPaddingObject,
111
- O as floor,
112
- g as getAlignment,
113
- d as getAlignmentAxis,
114
- C as getAlignmentSides,
115
- b as getAxisLength,
116
- L as getExpandedPlacements,
117
- s as getOppositeAlignmentPlacement,
118
- h as getOppositeAxis,
119
- E as getOppositeAxisPlacements,
120
- f as getOppositePlacement,
121
- R as getPaddingObject,
122
- u as getSide,
123
- x as getSideAxis,
124
- m as max,
125
- l as min,
126
- T as rectToClientRect,
127
- M as round,
128
- P as sides
3
+ e as __module
129
4
  };
130
5
  //# sourceMappingURL=index276.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index276.js","sources":["../node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs"],"sourcesContent":["/**\n * Custom positioning reference element.\n * @see https://floating-ui.com/docs/virtual-elements\n */\n\nconst sides = ['top', 'right', 'bottom', 'left'];\nconst alignments = ['start', 'end'];\nconst placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + \"-\" + alignments[0], side + \"-\" + alignments[1]), []);\nconst min = Math.min;\nconst max = Math.max;\nconst round = Math.round;\nconst floor = Math.floor;\nconst createCoords = v => ({\n x: v,\n y: v\n});\nconst oppositeSideMap = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nconst oppositeAlignmentMap = {\n start: 'end',\n end: 'start'\n};\nfunction clamp(start, value, end) {\n return max(start, min(value, end));\n}\nfunction evaluate(value, param) {\n return typeof value === 'function' ? value(param) : value;\n}\nfunction getSide(placement) {\n return placement.split('-')[0];\n}\nfunction getAlignment(placement) {\n return placement.split('-')[1];\n}\nfunction getOppositeAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}\nfunction getAxisLength(axis) {\n return axis === 'y' ? 'height' : 'width';\n}\nfunction getSideAxis(placement) {\n return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x';\n}\nfunction getAlignmentAxis(placement) {\n return getOppositeAxis(getSideAxis(placement));\n}\nfunction getAlignmentSides(placement, rects, rtl) {\n if (rtl === void 0) {\n rtl = false;\n }\n const alignment = getAlignment(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const length = getAxisLength(alignmentAxis);\n let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';\n if (rects.reference[length] > rects.floating[length]) {\n mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n }\n return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];\n}\nfunction getExpandedPlacements(placement) {\n const oppositePlacement = getOppositePlacement(placement);\n return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];\n}\nfunction getOppositeAlignmentPlacement(placement) {\n return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);\n}\nfunction getSideList(side, isStart, rtl) {\n const lr = ['left', 'right'];\n const rl = ['right', 'left'];\n const tb = ['top', 'bottom'];\n const bt = ['bottom', 'top'];\n switch (side) {\n case 'top':\n case 'bottom':\n if (rtl) return isStart ? rl : lr;\n return isStart ? lr : rl;\n case 'left':\n case 'right':\n return isStart ? tb : bt;\n default:\n return [];\n }\n}\nfunction getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {\n const alignment = getAlignment(placement);\n let list = getSideList(getSide(placement), direction === 'start', rtl);\n if (alignment) {\n list = list.map(side => side + \"-\" + alignment);\n if (flipAlignment) {\n list = list.concat(list.map(getOppositeAlignmentPlacement));\n }\n }\n return list;\n}\nfunction getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);\n}\nfunction expandPaddingObject(padding) {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n ...padding\n };\n}\nfunction getPaddingObject(padding) {\n return typeof padding !== 'number' ? expandPaddingObject(padding) : {\n top: padding,\n right: padding,\n bottom: padding,\n left: padding\n };\n}\nfunction rectToClientRect(rect) {\n const {\n x,\n y,\n width,\n height\n } = rect;\n return {\n width,\n height,\n top: y,\n left: x,\n right: x + width,\n bottom: y + height,\n x,\n y\n };\n}\n\nexport { alignments, clamp, createCoords, evaluate, expandPaddingObject, floor, getAlignment, getAlignmentAxis, getAlignmentSides, getAxisLength, getExpandedPlacements, getOppositeAlignmentPlacement, getOppositeAxis, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, getSide, getSideAxis, max, min, placements, rectToClientRect, round, sides };\n"],"names":["sides","min","max","round","floor","createCoords","v","oppositeSideMap","oppositeAlignmentMap","clamp","start","value","end","evaluate","param","getSide","placement","getAlignment","getOppositeAxis","axis","getAxisLength","getSideAxis","getAlignmentAxis","getAlignmentSides","rects","rtl","alignment","alignmentAxis","length","mainAlignmentSide","getOppositePlacement","getExpandedPlacements","oppositePlacement","getOppositeAlignmentPlacement","getSideList","side","isStart","lr","rl","tb","bt","getOppositeAxisPlacements","flipAlignment","direction","list","expandPaddingObject","padding","getPaddingObject","rectToClientRect","rect","x","y","width","height"],"mappings":"AAKK,MAACA,IAAQ,CAAC,OAAO,SAAS,UAAU,MAAM,GAGzCC,IAAM,KAAK,KACXC,IAAM,KAAK,KACXC,IAAQ,KAAK,OACbC,IAAQ,KAAK,OACbC,IAAe,CAAAC,OAAM;AAAA,EACzB,GAAGA;AAAA,EACH,GAAGA;AACL,IACMC,IAAkB;AAAA,EACtB,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,KAAK;AACP,GACMC,IAAuB;AAAA,EAC3B,OAAO;AAAA,EACP,KAAK;AACP;AACA,SAASC,EAAMC,GAAOC,GAAOC,GAAK;AAChC,SAAOV,EAAIQ,GAAOT,EAAIU,GAAOC,CAAG,CAAC;AACnC;AACA,SAASC,EAASF,GAAOG,GAAO;AAC9B,SAAO,OAAOH,KAAU,aAAaA,EAAMG,CAAK,IAAIH;AACtD;AACA,SAASI,EAAQC,GAAW;AAC1B,SAAOA,EAAU,MAAM,GAAG,EAAE,CAAC;AAC/B;AACA,SAASC,EAAaD,GAAW;AAC/B,SAAOA,EAAU,MAAM,GAAG,EAAE,CAAC;AAC/B;AACA,SAASE,EAAgBC,GAAM;AAC7B,SAAOA,MAAS,MAAM,MAAM;AAC9B;AACA,SAASC,EAAcD,GAAM;AAC3B,SAAOA,MAAS,MAAM,WAAW;AACnC;AACA,SAASE,EAAYL,GAAW;AAC9B,SAAO,CAAC,OAAO,QAAQ,E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I4B,IAAOV,EAAYnB,EAAQC,CAAS,GAAG2B,MAAc,SAASlB,CAAG;AACrE,SAAIC,MACFkB,IAAOA,EAAK,IAAI,CAAAT,MAAQA,IAAO,MAAMT,CAAS,GAC1CgB,MACFE,IAAOA,EAAK,OAAOA,EAAK,IAAIX,CAA6B,CAAC,KAGvDW;AACT;AACA,SAASd,EAAqBd,GAAW;AACvC,SAAOA,EAAU,QAAQ,0BAA0B,CAAAmB,MAAQ5B,EAAgB4B,CAAI,CAAC;AAClF;AACA,SAASU,EAAoBC,GAAS;AACpC,SAAO;AAAA,IACL,KAAK;AAAA,IACL,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,GAAGA;AAAA,EACP;AACA;AACA,SAASC,EAAiBD,GAAS;AACjC,SAAO,OAAOA,KAAY,WAAWD,EAAoBC,CAAO,IAAI;AAAA,IAClE,KAAKA;AAAA,IACL,OAAOA;AAAA,IACP,QAAQA;AAAA,IACR,MAAMA;AAAA,EACV;AACA;AACA,SAASE,EAAiBC,GAAM;AAC9B,QAAM;AAAA,IACJ,GAAAC;AAAA,IACA,GAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC;AAAA,EACD,IAAGJ;AACJ,SAAO;AAAA,IACL,OAAAG;AAAA,IACA,QAAAC;AAAA,IACA,KAAKF;AAAA,IACL,MAAMD;AAAA,IACN,OAAOA,IAAIE;AAAA,IACX,QAAQD,IAAIE;AAAA,IACZ,GAAAH;AAAA,IACA,GAAAC;AAAA,EACJ;AACA;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index276.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
package/dist/index277.js CHANGED
@@ -1,8 +1,5 @@
1
- const o = (l, n, f = (r) => r, u) => l.map((r) => Array.isArray(r[n]) ? [
2
- f(r, u),
3
- ...o(r[n], n, f, f(r, u))
4
- ] : [f(r, u)]).flat();
1
+ import f from "./index230.js";
5
2
  export {
6
- o as flattenTree
3
+ f as default
7
4
  };
8
5
  //# sourceMappingURL=index277.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index277.js","sources":["../src/utilities/functions/flattenTree.ts"],"sourcesContent":["export const flattenTree = <T extends Record<string, any>, U>(\n\titems: T[],\n\tkeyName: keyof T,\n\tmapper: (item: T, parent?: U) => U = (x: any) => x,\n\tparent?: ReturnType<typeof mapper>\n): ReturnType<typeof mapper>[] => {\n\treturn items\n\t\t.map((item) => {\n\t\t\tif (Array.isArray(item[keyName])) {\n\t\t\t\treturn [\n\t\t\t\t\tmapper(item, parent),\n\t\t\t\t\t...flattenTree(item[keyName], keyName, mapper, mapper(item, parent)),\n\t\t\t\t];\n\t\t\t}\n\t\t\treturn [mapper(item, parent)];\n\t\t})\n\t\t.flat();\n};\n"],"names":["flattenTree","items","keyName","mapper","x","parent","item"],"mappings":"AAAa,MAAAA,IAAc,CAC1BC,GACAC,GACAC,IAAqC,CAACC,MAAWA,GACjDC,MAEOJ,EACL,IAAI,CAACK,MACD,MAAM,QAAQA,EAAKJ,CAAO,CAAC,IACvB;AAAA,EACNC,EAAOG,GAAMD,CAAM;AAAA,EACnB,GAAGL,EAAYM,EAAKJ,CAAO,GAAGA,GAASC,GAAQA,EAAOG,GAAMD,CAAM,CAAC;AAAA,IAG9D,CAACF,EAAOG,GAAMD,CAAM,CAAC,CAC5B,EACA,KAAK;"}
1
+ {"version":3,"file":"index277.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
package/dist/index278.js CHANGED
@@ -1,5 +1,5 @@
1
- const t = (d, o) => +d + +o;
1
+ import f from "./index231.js";
2
2
  export {
3
- t as add
3
+ f as default
4
4
  };
5
5
  //# sourceMappingURL=index278.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index278.js","sources":["../src/utilities/functions/add.ts"],"sourcesContent":["export const add = (a: number | string, b: number | string) => +a + +b;\n"],"names":["add","a","b"],"mappings":"AAAO,MAAMA,IAAM,CAACC,GAAoBC,MAAuB,CAACD,IAAI,CAACC;"}
1
+ {"version":3,"file":"index278.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
package/dist/index279.js CHANGED
@@ -1,12 +1,5 @@
1
- import { get as o } from "./index297.js";
2
- const e = () => ({
3
- getItemValue(n, f) {
4
- if (typeof f > "u") return n;
5
- if (typeof f == "function") return f(n);
6
- if (typeof f == "string") return o(n, f);
7
- }
8
- });
1
+ import f from "./index232.js";
9
2
  export {
10
- e as useItemValue
3
+ f as default
11
4
  };
12
5
  //# sourceMappingURL=index279.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index279.js","sources":["../src/composables/useItemValue.ts"],"sourcesContent":["import { get } from '@/utilities/functions/get';\n\nexport const useItemValue = () => ({\n\tgetItemValue<T>(item: T, getter?: string | ((item: T) => any)): any {\n\t\tif (typeof getter === 'undefined') return item;\n\t\tif (typeof getter === 'function') return getter(item);\n\t\tif (typeof getter === 'string') return get(item, getter as any);\n\t},\n});\n"],"names":["useItemValue","item","getter","get"],"mappings":";AAEO,MAAMA,IAAe,OAAO;AAAA,EAClC,aAAgBC,GAASC,GAA2C;AAC/D,QAAA,OAAOA,IAAW,IAAoB,QAAAD;AAC1C,QAAI,OAAOC,KAAW,WAAY,QAAOA,EAAOD,CAAI;AACpD,QAAI,OAAOC,KAAW,SAAiB,QAAAC,EAAIF,GAAMC,CAAa;AAAA,EAC/D;AACD;"}
1
+ {"version":3,"file":"index279.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,8 +1,8 @@
1
1
  import { defineComponent as C, computed as M, ref as g, onMounted as E, watch as N, openBlock as x, createBlock as T, normalizeClass as q, withCtx as i, renderSlot as d, createVNode as A, createElementVNode as D, mergeProps as L, withModifiers as S } from "vue";
2
2
  import { clamp as b } from "./index199.js";
3
- import j from "./index215.js";
3
+ import j from "./index211.js";
4
4
  /* empty css */
5
- import z from "./index217.js";
5
+ import z from "./index213.js";
6
6
  const O = ["id", "aria-describedby", "autocomplete", "autofocus", "disabled", "name", "placeholder", "readonly", "required", "step"], J = /* @__PURE__ */ C({
7
7
  __name: "BaseNumberInput",
8
8
  props: {
@@ -153,4 +153,4 @@ const O = ["id", "aria-describedby", "autocomplete", "autofocus", "disabled", "n
153
153
  export {
154
154
  J as default
155
155
  };
156
- //# sourceMappingURL=index27.js.map
156
+ //# sourceMappingURL=index28.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index27.js","sources":["../src/components/BaseNumberInput/BaseNumberInput.vue"],"sourcesContent":["<template>\n\t<CommonInputOuterContainer :class=\"classes\">\n\t\t<template #prepend-outer\n\t\t\t><slot\n\t\t\t\t:decrease=\"decrease\"\n\t\t\t\t:increase=\"increase\"\n\t\t\t\tname=\"prepend-outer\"\n\t\t\t></slot\n\t\t></template>\n\t\t<CommonInputInnerContainer\n\t\t\t:append:icon=\"props['append:icon']\"\n\t\t\t:prepend:icon=\"props['prepend:icon']\"\n\t\t>\n\t\t\t<template #prepend\n\t\t\t\t><slot :decrease=\"decrease\" :increase=\"increase\" name=\"prepend\"\n\t\t\t/></template>\n\t\t\t<template #prefix\n\t\t\t\t><slot :decrease=\"decrease\" :increase=\"increase\" name=\"prefix\"\n\t\t\t/></template>\n\t\t\t<input\n\t\t\t\t:id=\"id\"\n\t\t\t\tref=\"input\"\n\t\t\t\t:aria-describedby=\"ariaDescribedby\"\n\t\t\t\t:autocomplete=\"autocomplete\"\n\t\t\t\t:autofocus=\"autofocus\"\n\t\t\t\t:class=\"'bb-base-number-input__input'\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t:inputmode=\"'decimal'\"\n\t\t\t\t:name=\"name\"\n\t\t\t\t:placeholder=\"placeholder\"\n\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t:required=\"required\"\n\t\t\t\tsize=\"1\"\n\t\t\t\t:step=\"step\"\n\t\t\t\t:type=\"`text`\"\n\t\t\t\tv-bind=\"eventListeners\"\n\t\t\t\t@input.stop=\"onInput\"\n\t\t\t/>\n\t\t\t<template #append\n\t\t\t\t><slot :decrease=\"decrease\" :increase=\"increase\" name=\"append\"\n\t\t\t/></template>\n\t\t\t<template #suffix\n\t\t\t\t><slot :decrease=\"decrease\" :increase=\"increase\" name=\"suffix\"\n\t\t\t/></template>\n\t\t</CommonInputInnerContainer>\n\t\t<template #append-outer\n\t\t\t><slot\n\t\t\t\t:decrease=\"decrease\"\n\t\t\t\t:increase=\"increase\"\n\t\t\t\tname=\"append-outer\"\n\t\t\t></slot\n\t\t></template>\n\t</CommonInputOuterContainer>\n</template>\n\n<script setup lang=\"ts\">\nimport { clamp } from '@/utilities/functions/clamp';\nimport { computed, onMounted, ref, watch } from 'vue';\nimport CommonInputInnerContainer from '../CommonInputInnerContainer.vue';\nimport CommonInputOuterContainer from '../CommonInputOuterContainer.vue';\nimport type { HTMLAttributes, InputHTMLAttributes } from 'vue';\n\nexport type BaseNumberInputProps = {\n\t/**\n\t * Name of the icon to be added at the end of the input.\n\t */\n\t// eslint-disable-next-line vue/prop-name-casing\n\t'append:icon'?: string;\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tariaDescribedby?: InputHTMLAttributes['aria-describedby'];\n\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tautocomplete?: InputHTMLAttributes['autocomplete'];\n\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Sets the component in a loading state, usually triggering some visual styles.\n\t */\n\tloading?: boolean;\n\n\t/**\n\t * Maximum value cap\n\t */\n\tmax?: number;\n\n\t/**\n\t * Minimum value cap\n\t */\n\tmin?: number;\n\n\t/**\n\t * Used by v-model\n\t */\n\tmodelValue: number | string | null;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname?: InputHTMLAttributes['name'];\n\n\t/**\n\t * String displayed when there's no data.\n\t */\n\tplaceholder?: InputHTMLAttributes['placeholder'];\n\n\t/**\n\t * Name of the icon to be added at the start of the input.\n\t */\n\t// eslint-disable-next-line vue/prop-name-casing\n\t'prepend:icon'?: string;\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: InputHTMLAttributes['readonly'];\n\n\t/**\n\t * Sets the input as required.\n\t */\n\trequired?: boolean;\n\n\t/**\n\t * Incremental unit used in the exposed `increase`\n\t * and `decrease` function. It's NOT APPLIED to manual input as a step of 5\n\t * will prevent the user from inserting a value like `115` because of rounding down.\n\t */\n\tstep?: number;\n};\n\nconst props = withDefaults(defineProps<BaseNumberInputProps>(), {\n\tstep: 1,\n});\n\nexport type BaseNumberInputEvents = {\n\t(e: 'blur', event: FocusEvent): void;\n\t(e: 'change', event: Event): void;\n\t(e: 'click', event: MouseEvent): void;\n\t(e: 'decrease', value: number): void;\n\t(e: 'focus', event: FocusEvent): void;\n\t(e: 'increase', value: number): 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: number | null): void;\n};\n\nconst emit = defineEmits<BaseNumberInputEvents>();\n\nexport type BaseNumberInputSlots = {\n\tprefix?: (props: object) => any;\n\tappend?: (props: {\n\t\tincrease: typeof increase;\n\t\tdecrease: typeof decrease;\n\t}) => any;\n\t'append-outer'?: (props: {\n\t\tincrease: typeof increase;\n\t\tdecrease: typeof decrease;\n\t}) => any;\n\tprepend?: (props: {\n\t\tincrease: typeof increase;\n\t\tdecrease: typeof decrease;\n\t}) => any;\n\t'prepend-outer'?: (props: {\n\t\tincrease: typeof increase;\n\t\tdecrease: typeof decrease;\n\t}) => any;\n\tsuffix?: (props: object) => any;\n};\n\ndefineSlots<BaseNumberInputSlots>();\n\nconst classes = computed(() => {\n\treturn {\n\t\t'bb-base-number-input': true,\n\t\t'bb-base-number-input--disabled': props.disabled,\n\t\t'bb-base-number-input--errors': props.hasErrors,\n\t\t'bb-base-number-input--loading': props.loading,\n\t\t'bb-base-number-input--readonly': props.readonly,\n\t};\n});\n\nconst input = ref<HTMLInputElement | null>(null);\nconst isInsertingSymbols = ref(false);\nconst decrease = () => {\n\tif (props.disabled || props.readonly || isInsertingSymbols.value) return;\n\tconst min = typeof props.min === 'undefined' ? -Infinity : props.min;\n\tconst max = typeof props.max === 'undefined' ? Infinity : props.max;\n\tlet valueToEmit = Math.max(Number(props.modelValue || 0) - props.step, min);\n\n\tvalueToEmit =\n\t\tvalueToEmit === null ? valueToEmit : clamp(valueToEmit, min, max);\n\temit('decrease', valueToEmit);\n\temit('update:modelValue', valueToEmit);\n};\n\nconst increase = () => {\n\tif (props.disabled || props.readonly || isInsertingSymbols.value) return;\n\tconst min = typeof props.min === 'undefined' ? -Infinity : props.min;\n\tconst max = typeof props.max === 'undefined' ? Infinity : props.max;\n\tlet valueToEmit = Math.min(Number(props.modelValue || 0) + +props.step, max);\n\n\tvalueToEmit =\n\t\tvalueToEmit === null ? valueToEmit : clamp(valueToEmit, min, max);\n\temit('increase', valueToEmit);\n\temit('update:modelValue', valueToEmit);\n};\n\ndefineExpose({\n\tincrease,\n\tdecrease,\n});\n\nconst onInput = (event: Event) => {\n\tif (event.target instanceof HTMLInputElement) {\n\t\tconst value = event.target.value;\n\t\tconst commaOrPeriod = /[,.]/g;\n\t\tconst matches = [...value.matchAll(commaOrPeriod)];\n\t\t/**\n\t\t * Proceed unless the user is pressing comma or period to insert a decimal number,\n\t\t * we do not want to replace the comma as soon as the user presses it\n\t\t */\n\t\tif (\n\t\t\t!(\n\t\t\t\tmatches.length === 1 &&\n\t\t\t\tmatches.some((match) => match.index === value.length - 1)\n\t\t\t) &&\n\t\t\t!(matches.length && value[value.length - 1] === '0') &&\n\t\t\tvalue !== '-'\n\t\t) {\n\t\t\tisInsertingSymbols.value = false;\n\t\t\tlet valueToEmit: null | number;\n\t\t\tif (event.target.value === '') {\n\t\t\t\tvalueToEmit = null;\n\t\t\t} else {\n\t\t\t\tvalueToEmit = makeValidNumberString(event.target.value);\n\t\t\t}\n\t\t\tconst min = typeof props.min === 'undefined' ? -Infinity : props.min;\n\t\t\tconst max = typeof props.max === 'undefined' ? Infinity : props.max;\n\t\t\tvalueToEmit =\n\t\t\t\tvalueToEmit === null ? valueToEmit : clamp(valueToEmit, min, max);\n\t\t\temit('update:modelValue', valueToEmit);\n\t\t\tif (input.value) {\n\t\t\t\tif (valueToEmit === null) {\n\t\t\t\t\tinput.value.value = '';\n\t\t\t\t} else {\n\t\t\t\t\tinput.value.value = `${valueToEmit}`;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tisInsertingSymbols.value = true;\n\t\t}\n\t\temit('input', event);\n\t}\n};\n\nconst makeValidNumberString = (value: string | number) => {\n\tif (typeof value === 'number') return value;\n\t// Replace comma with periods\n\tlet current = value.replaceAll(',', '.');\n\tlet preventDashes = current\n\t\t.slice(0, 1)\n\t\t.concat(current.slice(1).replaceAll('-', ''));\n\tlet noLetters = preventDashes.replaceAll(/[^\\d.-]/g, '');\n\tlet parts = noLetters.split('.');\n\tlet first = parts.slice(0, 1).join('') || 0;\n\tlet second = parts.slice(1).join('') || 0;\n\tlet unified = `${first}.${second}`;\n\treturn Number(unified);\n};\n\n/**\n * These events are just propagated\n */\nconst eventListeners = {\n\tonBlur: (event: FocusEvent) => emit('blur', event),\n\tonChange: (event: Event) => emit('change', event),\n\tonClick: (event: MouseEvent) => emit('click', event),\n\tonFocus: (event: FocusEvent) => emit('focus', event),\n\tonKeydown: (event: KeyboardEvent) => emit('keydown', event),\n\tonMousedown: (event: MouseEvent) => emit('mousedown', event),\n\tonMouseup: (event: MouseEvent) => emit('mouseup', event),\n};\n\nconst alignInputToModelValue = (value?: string | number | null) => {\n\tif (input.value) {\n\t\tif (value === null || value === '' || value === undefined) {\n\t\t\tinput.value.value = '';\n\t\t} else if (typeof value !== 'undefined') {\n\t\t\tinput.value.value = makeValidNumberString(value).toString();\n\t\t}\n\t} else {\n\t\tconsole.error('Could not align input as it is not mounted');\n\t}\n};\nonMounted(() => {\n\talignInputToModelValue(props.modelValue);\n});\n/**\n * Allow modelValue to be passed as string (as sometimes happens from the server) and normalize it\n */\nwatch(() => props.modelValue, alignInputToModelValue);\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BaseNumberInput';\n</style>\n"],"names":["props","__props","emit","__emit","classes","computed","input","ref","isInsertingSymbols","decrease","min","max","valueToEmit","clamp","increase","__expose","onInput","event","value","commaOrPeriod","matches","match","makeValidNumberString","current","parts","first","second","unified","eventListeners","alignInputToModelValue","onMounted","watch"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyJA,UAAMA,IAAQC,GAkBRC,IAAOC,GAyBPC,IAAUC,EAAS,OACjB;AAAA,MACN,wBAAwB;AAAA,MACxB,kCAAkCL,EAAM;AAAA,MACxC,gCAAgCA,EAAM;AAAA,MACtC,iCAAiCA,EAAM;AAAA,MACvC,kCAAkCA,EAAM;AAAA,IAAA,EAEzC,GAEKM,IAAQC,EAA6B,IAAI,GACzCC,IAAqBD,EAAI,EAAK,GAC9BE,IAAW,MAAM;AACtB,UAAIT,EAAM,YAAYA,EAAM,YAAYQ,EAAmB,MAAO;AAClE,YAAME,IAAM,OAAOV,EAAM,MAAQ,MAAc,SAAYA,EAAM,KAC3DW,IAAM,OAAOX,EAAM,MAAQ,MAAc,QAAWA,EAAM;AAC5D,UAAAY,IAAc,KAAK,IAAI,OAAOZ,EAAM,cAAc,CAAC,IAAIA,EAAM,MAAMU,CAAG;AAE1E,MAAAE,IACCA,MAAgB,OAAOA,IAAcC,EAAMD,GAAaF,GAAKC,CAAG,GACjET,EAAK,YAAYU,CAAW,GAC5BV,EAAK,qBAAqBU,CAAW;AAAA,IAAA,GAGhCE,IAAW,MAAM;AACtB,UAAId,EAAM,YAAYA,EAAM,YAA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AAM/B,EAAM,YAAY6B,CAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index28.js","sources":["../src/components/BaseNumberInput/BaseNumberInput.vue"],"sourcesContent":["<template>\n\t<CommonInputOuterContainer :class=\"classes\">\n\t\t<template #prepend-outer\n\t\t\t><slot\n\t\t\t\t:decrease=\"decrease\"\n\t\t\t\t:increase=\"increase\"\n\t\t\t\tname=\"prepend-outer\"\n\t\t\t></slot\n\t\t></template>\n\t\t<CommonInputInnerContainer\n\t\t\t:append:icon=\"props['append:icon']\"\n\t\t\t:prepend:icon=\"props['prepend:icon']\"\n\t\t>\n\t\t\t<template #prepend\n\t\t\t\t><slot :decrease=\"decrease\" :increase=\"increase\" name=\"prepend\"\n\t\t\t/></template>\n\t\t\t<template #prefix\n\t\t\t\t><slot :decrease=\"decrease\" :increase=\"increase\" name=\"prefix\"\n\t\t\t/></template>\n\t\t\t<input\n\t\t\t\t:id=\"id\"\n\t\t\t\tref=\"input\"\n\t\t\t\t:aria-describedby=\"ariaDescribedby\"\n\t\t\t\t:autocomplete=\"autocomplete\"\n\t\t\t\t:autofocus=\"autofocus\"\n\t\t\t\t:class=\"'bb-base-number-input__input'\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t:inputmode=\"'decimal'\"\n\t\t\t\t:name=\"name\"\n\t\t\t\t:placeholder=\"placeholder\"\n\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t:required=\"required\"\n\t\t\t\tsize=\"1\"\n\t\t\t\t:step=\"step\"\n\t\t\t\t:type=\"`text`\"\n\t\t\t\tv-bind=\"eventListeners\"\n\t\t\t\t@input.stop=\"onInput\"\n\t\t\t/>\n\t\t\t<template #append\n\t\t\t\t><slot :decrease=\"decrease\" :increase=\"increase\" name=\"append\"\n\t\t\t/></template>\n\t\t\t<template #suffix\n\t\t\t\t><slot :decrease=\"decrease\" :increase=\"increase\" name=\"suffix\"\n\t\t\t/></template>\n\t\t</CommonInputInnerContainer>\n\t\t<template #append-outer\n\t\t\t><slot\n\t\t\t\t:decrease=\"decrease\"\n\t\t\t\t:increase=\"increase\"\n\t\t\t\tname=\"append-outer\"\n\t\t\t></slot\n\t\t></template>\n\t</CommonInputOuterContainer>\n</template>\n\n<script setup lang=\"ts\">\nimport { clamp } from '@/utilities/functions/clamp';\nimport { computed, onMounted, ref, watch } from 'vue';\nimport CommonInputInnerContainer from '../CommonInputInnerContainer.vue';\nimport CommonInputOuterContainer from '../CommonInputOuterContainer.vue';\nimport type { HTMLAttributes, InputHTMLAttributes } from 'vue';\n\nexport type BaseNumberInputProps = {\n\t/**\n\t * Name of the icon to be added at the end of the input.\n\t */\n\t// eslint-disable-next-line vue/prop-name-casing\n\t'append:icon'?: string;\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tariaDescribedby?: InputHTMLAttributes['aria-describedby'];\n\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tautocomplete?: InputHTMLAttributes['autocomplete'];\n\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Sets the component in a loading state, usually triggering some visual styles.\n\t */\n\tloading?: boolean;\n\n\t/**\n\t * Maximum value cap\n\t */\n\tmax?: number;\n\n\t/**\n\t * Minimum value cap\n\t */\n\tmin?: number;\n\n\t/**\n\t * Used by v-model\n\t */\n\tmodelValue: number | string | null;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname?: InputHTMLAttributes['name'];\n\n\t/**\n\t * String displayed when there's no data.\n\t */\n\tplaceholder?: InputHTMLAttributes['placeholder'];\n\n\t/**\n\t * Name of the icon to be added at the start of the input.\n\t */\n\t// eslint-disable-next-line vue/prop-name-casing\n\t'prepend:icon'?: string;\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: InputHTMLAttributes['readonly'];\n\n\t/**\n\t * Sets the input as required.\n\t */\n\trequired?: boolean;\n\n\t/**\n\t * Incremental unit used in the exposed `increase`\n\t * and `decrease` function. It's NOT APPLIED to manual input as a step of 5\n\t * will prevent the user from inserting a value like `115` because of rounding down.\n\t */\n\tstep?: number;\n};\n\nconst props = withDefaults(defineProps<BaseNumberInputProps>(), {\n\tstep: 1,\n});\n\nexport type BaseNumberInputEvents = {\n\t(e: 'blur', event: FocusEvent): void;\n\t(e: 'change', event: Event): void;\n\t(e: 'click', event: MouseEvent): void;\n\t(e: 'decrease', value: number): void;\n\t(e: 'focus', event: FocusEvent): void;\n\t(e: 'increase', value: number): 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: number | null): void;\n};\n\nconst emit = defineEmits<BaseNumberInputEvents>();\n\nexport type BaseNumberInputSlots = {\n\tprefix?: (props: object) => any;\n\tappend?: (props: {\n\t\tincrease: typeof increase;\n\t\tdecrease: typeof decrease;\n\t}) => any;\n\t'append-outer'?: (props: {\n\t\tincrease: typeof increase;\n\t\tdecrease: typeof decrease;\n\t}) => any;\n\tprepend?: (props: {\n\t\tincrease: typeof increase;\n\t\tdecrease: typeof decrease;\n\t}) => any;\n\t'prepend-outer'?: (props: {\n\t\tincrease: typeof increase;\n\t\tdecrease: typeof decrease;\n\t}) => any;\n\tsuffix?: (props: object) => any;\n};\n\ndefineSlots<BaseNumberInputSlots>();\n\nconst classes = computed(() => {\n\treturn {\n\t\t'bb-base-number-input': true,\n\t\t'bb-base-number-input--disabled': props.disabled,\n\t\t'bb-base-number-input--errors': props.hasErrors,\n\t\t'bb-base-number-input--loading': props.loading,\n\t\t'bb-base-number-input--readonly': props.readonly,\n\t};\n});\n\nconst input = ref<HTMLInputElement | null>(null);\nconst isInsertingSymbols = ref(false);\nconst decrease = () => {\n\tif (props.disabled || props.readonly || isInsertingSymbols.value) return;\n\tconst min = typeof props.min === 'undefined' ? -Infinity : props.min;\n\tconst max = typeof props.max === 'undefined' ? Infinity : props.max;\n\tlet valueToEmit = Math.max(Number(props.modelValue || 0) - props.step, min);\n\n\tvalueToEmit =\n\t\tvalueToEmit === null ? valueToEmit : clamp(valueToEmit, min, max);\n\temit('decrease', valueToEmit);\n\temit('update:modelValue', valueToEmit);\n};\n\nconst increase = () => {\n\tif (props.disabled || props.readonly || isInsertingSymbols.value) return;\n\tconst min = typeof props.min === 'undefined' ? -Infinity : props.min;\n\tconst max = typeof props.max === 'undefined' ? Infinity : props.max;\n\tlet valueToEmit = Math.min(Number(props.modelValue || 0) + +props.step, max);\n\n\tvalueToEmit =\n\t\tvalueToEmit === null ? valueToEmit : clamp(valueToEmit, min, max);\n\temit('increase', valueToEmit);\n\temit('update:modelValue', valueToEmit);\n};\n\ndefineExpose({\n\tincrease,\n\tdecrease,\n});\n\nconst onInput = (event: Event) => {\n\tif (event.target instanceof HTMLInputElement) {\n\t\tconst value = event.target.value;\n\t\tconst commaOrPeriod = /[,.]/g;\n\t\tconst matches = [...value.matchAll(commaOrPeriod)];\n\t\t/**\n\t\t * Proceed unless the user is pressing comma or period to insert a decimal number,\n\t\t * we do not want to replace the comma as soon as the user presses it\n\t\t */\n\t\tif (\n\t\t\t!(\n\t\t\t\tmatches.length === 1 &&\n\t\t\t\tmatches.some((match) => match.index === value.length - 1)\n\t\t\t) &&\n\t\t\t!(matches.length && value[value.length - 1] === '0') &&\n\t\t\tvalue !== '-'\n\t\t) {\n\t\t\tisInsertingSymbols.value = false;\n\t\t\tlet valueToEmit: null | number;\n\t\t\tif (event.target.value === '') {\n\t\t\t\tvalueToEmit = null;\n\t\t\t} else {\n\t\t\t\tvalueToEmit = makeValidNumberString(event.target.value);\n\t\t\t}\n\t\t\tconst min = typeof props.min === 'undefined' ? -Infinity : props.min;\n\t\t\tconst max = typeof props.max === 'undefined' ? Infinity : props.max;\n\t\t\tvalueToEmit =\n\t\t\t\tvalueToEmit === null ? valueToEmit : clamp(valueToEmit, min, max);\n\t\t\temit('update:modelValue', valueToEmit);\n\t\t\tif (input.value) {\n\t\t\t\tif (valueToEmit === null) {\n\t\t\t\t\tinput.value.value = '';\n\t\t\t\t} else {\n\t\t\t\t\tinput.value.value = `${valueToEmit}`;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tisInsertingSymbols.value = true;\n\t\t}\n\t\temit('input', event);\n\t}\n};\n\nconst makeValidNumberString = (value: string | number) => {\n\tif (typeof value === 'number') return value;\n\t// Replace comma with periods\n\tlet current = value.replaceAll(',', '.');\n\tlet preventDashes = current\n\t\t.slice(0, 1)\n\t\t.concat(current.slice(1).replaceAll('-', ''));\n\tlet noLetters = preventDashes.replaceAll(/[^\\d.-]/g, '');\n\tlet parts = noLetters.split('.');\n\tlet first = parts.slice(0, 1).join('') || 0;\n\tlet second = parts.slice(1).join('') || 0;\n\tlet unified = `${first}.${second}`;\n\treturn Number(unified);\n};\n\n/**\n * These events are just propagated\n */\nconst eventListeners = {\n\tonBlur: (event: FocusEvent) => emit('blur', event),\n\tonChange: (event: Event) => emit('change', event),\n\tonClick: (event: MouseEvent) => emit('click', event),\n\tonFocus: (event: FocusEvent) => emit('focus', event),\n\tonKeydown: (event: KeyboardEvent) => emit('keydown', event),\n\tonMousedown: (event: MouseEvent) => emit('mousedown', event),\n\tonMouseup: (event: MouseEvent) => emit('mouseup', event),\n};\n\nconst alignInputToModelValue = (value?: string | number | null) => {\n\tif (input.value) {\n\t\tif (value === null || value === '' || value === undefined) {\n\t\t\tinput.value.value = '';\n\t\t} else if (typeof value !== 'undefined') {\n\t\t\tinput.value.value = makeValidNumberString(value).toString();\n\t\t}\n\t} else {\n\t\tconsole.error('Could not align input as it is not mounted');\n\t}\n};\nonMounted(() => {\n\talignInputToModelValue(props.modelValue);\n});\n/**\n * Allow modelValue to be passed as string (as sometimes happens from the server) and normalize it\n */\nwatch(() => props.modelValue, alignInputToModelValue);\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BaseNumberInput';\n</style>\n"],"names":["props","__props","emit","__emit","classes","computed","input","ref","isInsertingSymbols","decrease","min","max","valueToEmit","clamp","increase","__expose","onInput","event","value","commaOrPeriod","matches","match","makeValidNumberString","current","parts","first","second","unified","eventListeners","alignInputToModelValue","onMounted","watch"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyJA,UAAMA,IAAQC,GAkBRC,IAAOC,GAyBPC,IAAUC,EAAS,OACjB;AAAA,MACN,wBAAwB;AAAA,MACxB,kCAAkCL,EAAM;AAAA,MACxC,gCAAgCA,EAAM;AAAA,MACtC,iCAAiCA,EAAM;AAAA,MACvC,kCAAkCA,EAAM;AAAA,IAAA,EAEzC,GAEKM,IAAQC,EAA6B,IAAI,GACzCC,IAAqBD,EAAI,EAAK,GAC9BE,IAAW,MAAM;AACtB,UAAIT,EAAM,YAAYA,EAAM,YAAYQ,EAAmB,MAAO;AAClE,YAAME,IAAM,OAAOV,EAAM,MAAQ,MAAc,SAAYA,EAAM,KAC3DW,IAAM,OAAOX,EAAM,MAAQ,MAAc,QAAWA,EAAM;AAC5D,UAAAY,IAAc,KAAK,IAAI,OAAOZ,EAAM,cAAc,CAAC,IAAIA,EAAM,MAAMU,CAAG;AAE1E,MAAAE,IACCA,MAAgB,OAAOA,IAAcC,EAAMD,GAAaF,GAAKC,CAAG,GACjET,EAAK,YAAYU,CAAW,GAC5BV,EAAK,qBAAqBU,CAAW;AAAA,IAAA,GAGhCE,IAAW,MAAM;AACtB,UAAId,EAAM,YAAYA,EAAM,YAAYQ,EAAmB,MAAO;AAClE,YAAME,IAAM,OAAOV,EAAM,MAAQ,MAAc,SAAYA,EAAM,KAC3D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;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index280.js CHANGED
@@ -1,72 +1,5 @@
1
- import { defineComponent as p, openBlock as s, createElementBlock as a, normalizeClass as b, createElementVNode as t, createBlock as i, createCommentVNode as o, toDisplayString as l, withCtx as d } from "vue";
2
- import h from "./index13.js";
3
- /* empty css */
4
- import u from "./index122.js";
5
- /* empty css */
6
- const g = { class: "bb-toast-message__icon-container" }, k = { class: "bb-toast-message__content" }, f = {
7
- key: 0,
8
- class: "bb-toast-message__title"
9
- }, C = { class: "bb-toast-message__text" }, w = { class: "bb-toast-message__close" }, v = /* @__PURE__ */ t("svg", {
10
- fill: "none",
11
- viewBox: "0 0 24 24",
12
- xmlns: "http://www.w3.org/2000/svg"
13
- }, [
14
- /* @__PURE__ */ t("path", {
15
- d: "M23 23L1 1M23 1L1 23",
16
- stroke: "currentColor",
17
- "stroke-linecap": "round",
18
- "stroke-width": "2"
19
- })
20
- ], -1), N = /* @__PURE__ */ p({
21
- __name: "BbToastMessage",
22
- props: {
23
- title: {},
24
- text: {},
25
- icon: {},
26
- theme: { default: "default" },
27
- id: {},
28
- showClose: { type: Boolean }
29
- },
30
- emits: ["click:close"],
31
- setup(n, { emit: c }) {
32
- const r = n, m = c, _ = () => {
33
- m("click:close", r.id);
34
- };
35
- return (e, y) => (s(), a("div", {
36
- "aria-atomic": "true",
37
- "aria-live": "polite",
38
- "aria-role": "alert",
39
- class: b(["bb-toast-message", { [`bb-toast-message--${e.theme}`]: e.theme }])
40
- }, [
41
- t("div", g, [
42
- e.icon ? (s(), i(u, {
43
- key: 0,
44
- class: "bb-toast-message__icon",
45
- type: e.icon
46
- }, null, 8, ["type"])) : o("", !0)
47
- ]),
48
- t("div", k, [
49
- e.title ? (s(), a("p", f, l(e.title), 1)) : o("", !0),
50
- t("p", C, l(e.text), 1)
51
- ]),
52
- t("span", w, [
53
- e.showClose ? (s(), i(h, {
54
- key: 0,
55
- "aria-label": "Chiudi",
56
- block: "",
57
- class: "bb-toast-message__close-btn",
58
- onClick: _
59
- }, {
60
- default: d(() => [
61
- v
62
- ]),
63
- _: 1
64
- })) : o("", !0)
65
- ])
66
- ], 2));
67
- }
68
- });
1
+ import f from "./index234.js";
69
2
  export {
70
- N as default
3
+ f as default
71
4
  };
72
5
  //# sourceMappingURL=index280.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index280.js","sources":["../src/components/BbToast/BbToastMessage.vue"],"sourcesContent":["<template>\n\t<div\n\t\taria-atomic=\"true\"\n\t\taria-live=\"polite\"\n\t\taria-role=\"alert\"\n\t\tclass=\"bb-toast-message\"\n\t\t:class=\"{ [`bb-toast-message--${theme}`]: theme }\"\n\t>\n\t\t<div class=\"bb-toast-message__icon-container\">\n\t\t\t<BbIcon v-if=\"icon\" class=\"bb-toast-message__icon\" :type=\"icon\" />\n\t\t</div>\n\n\t\t<div class=\"bb-toast-message__content\">\n\t\t\t<p v-if=\"title\" class=\"bb-toast-message__title\">{{ title }}</p>\n\t\t\t<p class=\"bb-toast-message__text\">{{ text }}</p>\n\t\t</div>\n\t\t<span class=\"bb-toast-message__close\">\n\t\t\t<BaseButton\n\t\t\t\tv-if=\"showClose\"\n\t\t\t\t:aria-label=\"'Chiudi'\"\n\t\t\t\tblock\n\t\t\t\tclass=\"bb-toast-message__close-btn\"\n\t\t\t\t@click=\"onClickClose\"\n\t\t\t>\n\t\t\t\t<svg fill=\"none\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M23 23L1 1M23 1L1 23\"\n\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t/>\n\t\t\t\t</svg>\n\t\t\t</BaseButton>\n\t\t</span>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport type { Message } from '../../composables/useToast';\nimport BaseButton from '../BaseButton/BaseButton.vue';\nimport BbIcon from '../BbIcon/BbIcon.vue';\n\nconst props = withDefaults(defineProps<Message>(), {\n\ttheme: 'default',\n});\ntype BbToastMessageEvents = {\n\t(e: 'click:close', id: Message['id']): void;\n};\nconst emit = defineEmits<BbToastMessageEvents>();\n\nconst onClickClose = () => {\n\temit('click:close', props.id);\n};\n</script>\n\n<style scoped></style>\n"],"names":["props","__props","emit","__emit","onClickClose"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CA,UAAMA,IAAQC,GAMRC,IAAOC,GAEPC,IAAe,MAAM;AACrB,MAAAF,EAAA,eAAeF,EAAM,EAAE;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index280.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
package/dist/index281.js CHANGED
@@ -1,6 +1,31 @@
1
- import o from "./index232.js";
2
- /* empty css */
1
+ function y(t, r) {
2
+ return t > r ? 1 : -1;
3
+ }
4
+ function c(t, r) {
5
+ var n = 5381;
6
+ if (typeof t == "object" && t !== null && (t.toString === Object.prototype.toString || t.toString === Array.prototype.toString)) {
7
+ r || (r = /* @__PURE__ */ new WeakSet());
8
+ for (var p = Object.keys(t).sort(y), i = 0; i < p.length; i++) {
9
+ var s = p[i], e = t[s];
10
+ if (n = 33 * n ^ c(s, r), typeof e == "object" && e !== null && (t.toString === Object.prototype.toString || t.toString === Array.prototype.toString)) {
11
+ if (r.has(e)) continue;
12
+ r.add(e);
13
+ }
14
+ n = 33 * n ^ c(e, r);
15
+ }
16
+ return 33 * n ^ c(t.constructor, r);
17
+ }
18
+ var o = typeof t;
19
+ try {
20
+ t instanceof Date ? o += t.getTime() : o += String(t);
21
+ } catch {
22
+ o += String(Object.assign({}, t));
23
+ }
24
+ for (var a = 0; a < o.length; a++) n = 33 * n ^ o.charCodeAt(a);
25
+ return n;
26
+ }
3
27
  export {
4
- o as default
28
+ c as hash,
29
+ y as sortNumbers
5
30
  };
6
31
  //# sourceMappingURL=index281.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index281.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
1
+ {"version":3,"file":"index281.js","sources":["../node_modules/object-code/dist/index.mjs"],"sourcesContent":["function t(t,r){return t>r?1:-1}function r(o,e){var n=5381;if(\"object\"==typeof o&&null!==o&&(o.toString===Object.prototype.toString||o.toString===Array.prototype.toString)){e||(e=new WeakSet);for(var i=Object.keys(o).sort(t),a=0;a<i.length;a++){var c=i[a],g=o[c];if(n=33*n^r(c,e),\"object\"==typeof g&&null!==g&&(o.toString===Object.prototype.toString||o.toString===Array.prototype.toString)){if(e.has(g))continue;e.add(g)}n=33*n^r(g,e)}return 33*n^r(o.constructor,e)}var p=typeof o;try{o instanceof Date?p+=o.getTime():p+=String(o)}catch(t){p+=String(Object.assign({},o))}for(var f=0;f<p.length;f++)n=33*n^p.charCodeAt(f);return n}export{r as hash,t as sortNumbers};\n//# sourceMappingURL=index.mjs.map\n"],"names":["t","r","o","e","i","a","c","g","p","f"],"mappings":"AAAA,SAASA,EAAE,GAAE,GAAE;AAAC,SAAO,IAAE,IAAE,IAAE;AAAE;AAAC,SAASC,EAAEC,GAAEC,GAAE;AAAC,MAAI,IAAE;AAAK,MAAa,OAAOD,KAAjB,YAA2BA,MAAP,SAAWA,EAAE,aAAW,OAAO,UAAU,YAAUA,EAAE,aAAW,MAAM,UAAU,WAAU;AAAC,IAAAC,MAAIA,IAAE,oBAAI;AAAS,aAAQC,IAAE,OAAO,KAAKF,CAAC,EAAE,KAAKF,CAAC,GAAEK,IAAE,GAAEA,IAAED,EAAE,QAAOC,KAAI;AAAC,UAAIC,IAAEF,EAAEC,CAAC,GAAEE,IAAEL,EAAEI,CAAC;AAAE,UAAG,IAAE,KAAG,IAAEL,EAAEK,GAAEH,CAAC,GAAY,OAAOI,KAAjB,YAA2BA,MAAP,SAAWL,EAAE,aAAW,OAAO,UAAU,YAAUA,EAAE,aAAW,MAAM,UAAU,WAAU;AAAC,YAAGC,EAAE,IAAII,CAAC,EAAE;AAAS,QAAAJ,EAAE,IAAII,CAAC;AAAA,MAAC;AAAC,UAAE,KAAG,IAAEN,EAAEM,GAAEJ,CAAC;AAAA,IAAC;AAAC,WAAO,KAAG,IAAEF,EAAEC,EAAE,aAAYC,CAAC;AAAA,EAAC;AAAC,MAAIK,IAAE,OAAON;AAAE,MAAG;AAAC,IAAAA,aAAa,OAAKM,KAAGN,EAAE,QAAS,IAACM,KAAG,OAAON,CAAC;AAAA,EAAC,QAAS;AAAC,IAAAM,KAAG,OAAO,OAAO,OAAO,CAAE,GAACN,CAAC,CAAC;AAAA,EAAC;AAAC,WAAQO,IAAE,GAAEA,IAAED,EAAE,QAAOC,IAAI,KAAE,KAAG,IAAED,EAAE,WAAWC,CAAC;AAAE,SAAO;AAAC;","x_google_ignoreList":[0]}
package/dist/index282.js CHANGED
@@ -1,15 +1,25 @@
1
- import { ref as t } from "vue";
2
- const n = () => {
3
- const e = t([]);
4
- return { array: e, set: (...r) => {
5
- e.value = r;
6
- }, add: (...r) => {
7
- e.value.push(...r);
8
- }, remove: (r) => {
9
- e.value = e.value.filter(r);
10
- } };
11
- };
1
+ import { defineComponent as a, computed as i, openBlock as r, createBlock as d, Transition as l, normalizeStyle as s, withCtx as u, renderSlot as p } from "vue";
2
+ const f = /* @__PURE__ */ a({
3
+ __name: "Slide",
4
+ props: {
5
+ direction: { default: "right" },
6
+ duration: { default: 500 },
7
+ gap: { default: 0 }
8
+ },
9
+ setup(t) {
10
+ const n = t, o = i(() => `bb-slide-in-${n.direction}`);
11
+ return (e, m) => (r(), d(l, {
12
+ name: o.value,
13
+ style: s({ "--transition-duration": `${e.duration}ms`, "--gap": `${e.gap}px` })
14
+ }, {
15
+ default: u(() => [
16
+ p(e.$slots, "default", {}, void 0, !0)
17
+ ]),
18
+ _: 3
19
+ }, 8, ["name", "style"]));
20
+ }
21
+ });
12
22
  export {
13
- n as useArray
23
+ f as default
14
24
  };
15
25
  //# sourceMappingURL=index282.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index282.js","sources":["../src/composables/useArray.ts"],"sourcesContent":["import { ref, type Ref } from 'vue';\n\nexport const useArray = <T>() => {\n\tconst array = ref<T[]>([]) as Ref<T[]>;\n\n\tconst set = (...items: T[]) => {\n\t\tarray.value = items;\n\t};\n\tconst add = (...items: T[]) => {\n\t\tarray.value.push(...items);\n\t};\n\tconst remove = (iteratee: (option: T) => boolean) => {\n\t\tarray.value = array.value.filter(iteratee);\n\t};\n\n\treturn { array, set, add, remove };\n};\n"],"names":["useArray","array","ref","items","iteratee"],"mappings":";AAEO,MAAMA,IAAW,MAAS;AAC1B,QAAAC,IAAQC,EAAS,CAAA,CAAE;AAYzB,SAAO,EAAE,OAAAD,GAAO,KAVJ,IAAIE,MAAe;AAC9B,IAAAF,EAAM,QAAQE;AAAA,EAAA,GASM,KAPT,IAAIA,MAAe;AACxB,IAAAF,EAAA,MAAM,KAAK,GAAGE,CAAK;AAAA,EAAA,GAMA,QAJX,CAACC,MAAqC;AACpD,IAAAH,EAAM,QAAQA,EAAM,MAAM,OAAOG,CAAQ;AAAA,EAAA,EAGT;AAClC;"}
1
+ {"version":3,"file":"index282.js","sources":["../src/components/Transitions/Slide.vue"],"sourcesContent":["<template>\n\t<transition\n\t\t:name=\"transitionName\"\n\t\t:style=\"{ '--transition-duration': `${duration}ms`, '--gap': `${gap}px` }\"\n\t>\n\t\t<slot></slot>\n\t</transition>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed } from 'vue';\n\ntype Props = {\n\tdirection?: 'left' | 'right' | 'bottom' | 'top';\n\tduration?: number;\n\tgap?: number;\n};\n\nconst props = withDefaults(defineProps<Props>(), {\n\tdirection: 'right',\n\tduration: 500,\n\tgap: 0,\n});\n\nconst transitionName = computed(() => `bb-slide-in-${props.direction}`);\n</script>\n\n<style scoped>\n/* Slide in from the left */\n.bb-slide-in-top-enter-active,\n.bb-slide-in-top-leave-active,\n.bb-slide-in-bottom-enter-active,\n.bb-slide-in-bottom-leave-active,\n.bb-slide-in-left-enter-active,\n.bb-slide-in-left-leave-active,\n.bb-slide-in-right-enter-active,\n.bb-slide-in-right-leave-active {\n\ttransition:\n\t\ttransform var(--transition-duration) ease,\n\t\topacity var(--transition-duration) calc(var(--transition-duration) * 0.25)\n\t\t\tease;\n}\n\n.bb-slide-in-left-enter-from {\n\ttransform: translateX(calc(-100% - var(--gap)));\n}\n.bb-slide-in-left-leave-to {\n\ttransform: translateX(calc(100% + var(--gap)));\n}\n.bb-slide-in-left-enter-to,\n.bb-slide-in-left-leave-from {\n\ttransform: translateX(0);\n}\n\n/* Slide in from the right */\n.bb-slide-in-right-enter-from {\n\ttransform: translateX(calc(100% + var(--gap)));\n}\n.bb-slide-in-right-leave-to {\n\ttransform: translateX(calc(-100% - var(--gap)));\n}\n.bb-slide-in-right-enter-to,\n.bb-slide-in-right-leave-from {\n\ttransform: translateX(0);\n}\n\n/* Slide in from the top */\n.bb-slide-in-top-enter-from {\n\ttransform: translateY(calc(-100% - var(--gap)));\n}\n.bb-slide-in-top-leave-to {\n\ttransform: translateY(calc(100% + var(--gap)));\n}\n.bb-slide-in-top-enter-to,\n.bb-slide-in-top-leave-from {\n\ttransform: translateY(0);\n}\n\n/* Slide in from the bottom */\n.bb-slide-in-bottom-enter-from {\n\ttransform: translateY(calc(100% + var(--gap)));\n}\n.bb-slide-in-bottom-leave-to {\n\ttransform: translateY(calc(-100% - var(--gap)));\n}\n.bb-slide-in-bottom-enter-to,\n.bb-slide-in-bottom-leave-from {\n\ttransform: translateY(0);\n}\n[class*='bb-slide-in'][class*='leave-to'] {\n\topacity: 0;\n}\n[class*='bb-slide-in'][class*='enter-from'] {\n\topacity: 0;\n}\n</style>\n"],"names":["props","__props","transitionName","computed"],"mappings":";;;;;;;;;AAkBA,UAAMA,IAAQC,GAMRC,IAAiBC,EAAS,MAAM,eAAeH,EAAM,SAAS,EAAE;;;;;;;;;;;;"}
package/dist/index284.js CHANGED
@@ -1,20 +1,5 @@
1
- import { get as t } from "./index297.js";
2
- const o = () => ({
3
- getItemText(r, n) {
4
- if (typeof r == "string" && !n) return r;
5
- if (n) {
6
- if (typeof n == "function") {
7
- let f = n(r);
8
- return typeof f != "string" && (f = JSON.stringify(f)), f;
9
- } else if (typeof n == "string") {
10
- const f = t(r, n);
11
- return typeof f == "string" ? f : JSON.stringify(f);
12
- }
13
- }
14
- return JSON.stringify(r);
15
- }
16
- });
1
+ const t = (d, o) => +d + +o;
17
2
  export {
18
- o as useItemText
3
+ t as add
19
4
  };
20
5
  //# sourceMappingURL=index284.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index284.js","sources":["../src/composables/useItemText.ts"],"sourcesContent":["import { get } from '@/utilities/functions/get';\n\ntype NestedKeyOf<ObjectType extends object> = {\n\t[Key in keyof ObjectType & (string | number)]: ObjectType[Key] extends object\n\t\t? `${Key}` | `${Key}.${NestedKeyOf<ObjectType[Key]>}`\n\t\t: `${Key}`;\n}[keyof ObjectType & (string | number)];\n\nexport type Path<T> = T extends object\n\t?\n\t\t\t| NestedKeyOf<T>\n\t\t\t| ((item: T) => string | number)\n\t\t\t| undefined\n\t\t\t| (string & Record<never, never>)\n\t: undefined;\n\nexport const useItemText = () => ({\n\tgetItemText<T>(item: T, getter?: Path<T>): string {\n\t\tif (typeof item === 'string' && !getter) return item;\n\t\telse if (getter) {\n\t\t\tif (typeof getter === 'function') {\n\t\t\t\tlet found = getter(item);\n\t\t\t\tif (typeof found !== 'string') found = JSON.stringify(found);\n\t\t\t\treturn found;\n\t\t\t} else if (typeof getter === 'string') {\n\t\t\t\tconst found = get(item, getter as any);\n\t\t\t\tif (typeof found === 'string') return found;\n\t\t\t\telse return JSON.stringify(found);\n\t\t\t}\n\t\t}\n\t\treturn JSON.stringify(item);\n\t},\n});\n"],"names":["useItemText","item","getter","found","get"],"mappings":";AAgBO,MAAMA,IAAc,OAAO;AAAA,EACjC,YAAeC,GAASC,GAA0B;AACjD,QAAI,OAAOD,KAAS,YAAY,CAACC,EAAe,QAAAD;AAAA,QACvCC;AACJ,UAAA,OAAOA,KAAW,YAAY;AAC7B,YAAAC,IAAQD,EAAOD,CAAI;AACvB,eAAI,OAAOE,KAAU,aAAkBA,IAAA,KAAK,UAAUA,CAAK,IACpDA;AAAA,MAAA,WACG,OAAOD,KAAW,UAAU;AAChC,cAAAC,IAAQC,EAAIH,GAAMC,CAAa;AACjC,eAAA,OAAOC,KAAU,WAAiBA,IAC1B,KAAK,UAAUA,CAAK;AAAA,MACjC;AAAA;AAEM,WAAA,KAAK,UAAUF,CAAI;AAAA,EAC3B;AACD;"}
1
+ {"version":3,"file":"index284.js","sources":["../src/utilities/functions/add.ts"],"sourcesContent":["export const add = (a: number | string, b: number | string) => +a + +b;\n"],"names":["add","a","b"],"mappings":"AAAO,MAAMA,IAAM,CAACC,GAAoBC,MAAuB,CAACD,IAAI,CAACC;"}
package/dist/index285.js CHANGED
@@ -1,6 +1,72 @@
1
- import o from "./index236.js";
1
+ import { defineComponent as p, openBlock as s, createElementBlock as a, normalizeClass as b, createElementVNode as t, createBlock as i, createCommentVNode as o, toDisplayString as l, withCtx as d } from "vue";
2
+ import h from "./index14.js";
3
+ /* empty css */
4
+ import u from "./index123.js";
2
5
  /* empty css */
6
+ const g = { class: "bb-toast-message__icon-container" }, k = { class: "bb-toast-message__content" }, f = {
7
+ key: 0,
8
+ class: "bb-toast-message__title"
9
+ }, C = { class: "bb-toast-message__text" }, w = { class: "bb-toast-message__close" }, v = /* @__PURE__ */ t("svg", {
10
+ fill: "none",
11
+ viewBox: "0 0 24 24",
12
+ xmlns: "http://www.w3.org/2000/svg"
13
+ }, [
14
+ /* @__PURE__ */ t("path", {
15
+ d: "M23 23L1 1M23 1L1 23",
16
+ stroke: "currentColor",
17
+ "stroke-linecap": "round",
18
+ "stroke-width": "2"
19
+ })
20
+ ], -1), N = /* @__PURE__ */ p({
21
+ __name: "BbToastMessage",
22
+ props: {
23
+ title: {},
24
+ text: {},
25
+ icon: {},
26
+ theme: { default: "default" },
27
+ id: {},
28
+ showClose: { type: Boolean }
29
+ },
30
+ emits: ["click:close"],
31
+ setup(n, { emit: c }) {
32
+ const r = n, m = c, _ = () => {
33
+ m("click:close", r.id);
34
+ };
35
+ return (e, y) => (s(), a("div", {
36
+ "aria-atomic": "true",
37
+ "aria-live": "polite",
38
+ "aria-role": "alert",
39
+ class: b(["bb-toast-message", { [`bb-toast-message--${e.theme}`]: e.theme }])
40
+ }, [
41
+ t("div", g, [
42
+ e.icon ? (s(), i(u, {
43
+ key: 0,
44
+ class: "bb-toast-message__icon",
45
+ type: e.icon
46
+ }, null, 8, ["type"])) : o("", !0)
47
+ ]),
48
+ t("div", k, [
49
+ e.title ? (s(), a("p", f, l(e.title), 1)) : o("", !0),
50
+ t("p", C, l(e.text), 1)
51
+ ]),
52
+ t("span", w, [
53
+ e.showClose ? (s(), i(h, {
54
+ key: 0,
55
+ "aria-label": "Chiudi",
56
+ block: "",
57
+ class: "bb-toast-message__close-btn",
58
+ onClick: _
59
+ }, {
60
+ default: d(() => [
61
+ v
62
+ ]),
63
+ _: 1
64
+ })) : o("", !0)
65
+ ])
66
+ ], 2));
67
+ }
68
+ });
3
69
  export {
4
- o as default
70
+ N as default
5
71
  };
6
72
  //# sourceMappingURL=index285.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index285.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
1
+ {"version":3,"file":"index285.js","sources":["../src/components/BbToast/BbToastMessage.vue"],"sourcesContent":["<template>\n\t<div\n\t\taria-atomic=\"true\"\n\t\taria-live=\"polite\"\n\t\taria-role=\"alert\"\n\t\tclass=\"bb-toast-message\"\n\t\t:class=\"{ [`bb-toast-message--${theme}`]: theme }\"\n\t>\n\t\t<div class=\"bb-toast-message__icon-container\">\n\t\t\t<BbIcon v-if=\"icon\" class=\"bb-toast-message__icon\" :type=\"icon\" />\n\t\t</div>\n\n\t\t<div class=\"bb-toast-message__content\">\n\t\t\t<p v-if=\"title\" class=\"bb-toast-message__title\">{{ title }}</p>\n\t\t\t<p class=\"bb-toast-message__text\">{{ text }}</p>\n\t\t</div>\n\t\t<span class=\"bb-toast-message__close\">\n\t\t\t<BaseButton\n\t\t\t\tv-if=\"showClose\"\n\t\t\t\t:aria-label=\"'Chiudi'\"\n\t\t\t\tblock\n\t\t\t\tclass=\"bb-toast-message__close-btn\"\n\t\t\t\t@click=\"onClickClose\"\n\t\t\t>\n\t\t\t\t<svg fill=\"none\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M23 23L1 1M23 1L1 23\"\n\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t/>\n\t\t\t\t</svg>\n\t\t\t</BaseButton>\n\t\t</span>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport type { Message } from '../../composables/useToast';\nimport BaseButton from '../BaseButton/BaseButton.vue';\nimport BbIcon from '../BbIcon/BbIcon.vue';\n\nconst props = withDefaults(defineProps<Message>(), {\n\ttheme: 'default',\n});\ntype BbToastMessageEvents = {\n\t(e: 'click:close', id: Message['id']): void;\n};\nconst emit = defineEmits<BbToastMessageEvents>();\n\nconst onClickClose = () => {\n\temit('click:close', props.id);\n};\n</script>\n\n<style scoped></style>\n"],"names":["props","__props","emit","__emit","onClickClose"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0CA,UAAMA,IAAQC,GAMRC,IAAOC,GAEPC,IAAe,MAAM;AACrB,MAAAF,EAAA,eAAeF,EAAM,EAAE;AAAA,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}