bitboss-ui 1.0.45 → 1.0.47

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 (361) hide show
  1. package/dist/composables/useBbConfig.d.ts +15 -0
  2. package/dist/composables/useLogger.d.ts +4 -0
  3. package/dist/index.d.ts +4 -2
  4. package/dist/index.js +136 -132
  5. package/dist/index.js.map +1 -1
  6. package/dist/index10.js +39 -62
  7. package/dist/index10.js.map +1 -1
  8. package/dist/index101.js +117 -236
  9. package/dist/index101.js.map +1 -1
  10. package/dist/index103.js +230 -423
  11. package/dist/index103.js.map +1 -1
  12. package/dist/index105.js +424 -86
  13. package/dist/index105.js.map +1 -1
  14. package/dist/index107.js +47 -43
  15. package/dist/index107.js.map +1 -1
  16. package/dist/index109.js +22 -21
  17. package/dist/index109.js.map +1 -1
  18. package/dist/index11.js +196 -1
  19. package/dist/index11.js.map +1 -1
  20. package/dist/index111.js +91 -22
  21. package/dist/index111.js.map +1 -1
  22. package/dist/index113.js +21 -143
  23. package/dist/index113.js.map +1 -1
  24. package/dist/index115.js +141 -112
  25. package/dist/index115.js.map +1 -1
  26. package/dist/index117.js +115 -39
  27. package/dist/index117.js.map +1 -1
  28. package/dist/index118.js +1 -39
  29. package/dist/index118.js.map +1 -1
  30. package/dist/index119.js +40 -40
  31. package/dist/index119.js.map +1 -1
  32. package/dist/index12.js +84 -118
  33. package/dist/index12.js.map +1 -1
  34. package/dist/index120.js +32 -42
  35. package/dist/index120.js.map +1 -1
  36. package/dist/index121.js +27 -26
  37. package/dist/index121.js.map +1 -1
  38. package/dist/index122.js +47 -2
  39. package/dist/index122.js.map +1 -1
  40. package/dist/index123.js +43 -21
  41. package/dist/index123.js.map +1 -1
  42. package/dist/index124.js +2 -2
  43. package/dist/index124.js.map +1 -1
  44. package/dist/index125.js +20 -223
  45. package/dist/index125.js.map +1 -1
  46. package/dist/index126.js +2 -2
  47. package/dist/index126.js.map +1 -1
  48. package/dist/index127.js +250 -16
  49. package/dist/index127.js.map +1 -1
  50. package/dist/index128.js +24 -12
  51. package/dist/index128.js.map +1 -1
  52. package/dist/index129.js +2 -24
  53. package/dist/index129.js.map +1 -1
  54. package/dist/index133.js +3 -252
  55. package/dist/index133.js.map +1 -1
  56. package/dist/index134.js +2 -2
  57. package/dist/index135.js +2 -2
  58. package/dist/index136.js +2 -2
  59. package/dist/index137.js +2 -2
  60. package/dist/index138.js +2 -2
  61. package/dist/index139.js +2 -2
  62. package/dist/index14.js +115 -148
  63. package/dist/index14.js.map +1 -1
  64. package/dist/index140.js +2 -2
  65. package/dist/index141.js +2 -2
  66. package/dist/index142.js +2 -2
  67. package/dist/index143.js +2 -2
  68. package/dist/index144.js +2 -2
  69. package/dist/index145.js +2 -2
  70. package/dist/index146.js +2 -2
  71. package/dist/index147.js +2 -2
  72. package/dist/index148.js +2 -2
  73. package/dist/index149.js +2 -2
  74. package/dist/index150.js +2 -2
  75. package/dist/index151.js +2 -2
  76. package/dist/index152.js +2 -2
  77. package/dist/index153.js +2 -2
  78. package/dist/index154.js +2 -2
  79. package/dist/index155.js +2 -2
  80. package/dist/index156.js +2 -2
  81. package/dist/index157.js +2 -2
  82. package/dist/index158.js +2 -2
  83. package/dist/index159.js +2 -2
  84. package/dist/index16.js +148 -510
  85. package/dist/index16.js.map +1 -1
  86. package/dist/index160.js +1 -5
  87. package/dist/index160.js.map +1 -1
  88. package/dist/index161.js +5 -1
  89. package/dist/index161.js.map +1 -1
  90. package/dist/index162.js +1 -5
  91. package/dist/index162.js.map +1 -1
  92. package/dist/index163.js +5 -1
  93. package/dist/index163.js.map +1 -1
  94. package/dist/index164.js +2 -2
  95. package/dist/index165.js +2 -2
  96. package/dist/index166.js +2 -2
  97. package/dist/index167.js +2 -2
  98. package/dist/index168.js +2 -2
  99. package/dist/index169.js +2 -2
  100. package/dist/index170.js +1 -5
  101. package/dist/index170.js.map +1 -1
  102. package/dist/index171.js +4 -1
  103. package/dist/index171.js.map +1 -1
  104. package/dist/index172.js +3 -2
  105. package/dist/index172.js.map +1 -1
  106. package/dist/index173.js +2 -2
  107. package/dist/index174.js +2 -2
  108. package/dist/index175.js +2 -2
  109. package/dist/index176.js +2 -2
  110. package/dist/index177.js +2 -2
  111. package/dist/index178.js +2 -2
  112. package/dist/index179.js +2 -2
  113. package/dist/index18.js +491 -194
  114. package/dist/index18.js.map +1 -1
  115. package/dist/index180.js +2 -2
  116. package/dist/index181.js +2 -2
  117. package/dist/index182.js +2 -2
  118. package/dist/index183.js +2 -2
  119. package/dist/index184.js +1 -5
  120. package/dist/index184.js.map +1 -1
  121. package/dist/index185.js +5 -1
  122. package/dist/index185.js.map +1 -1
  123. package/dist/index186.js +1 -5
  124. package/dist/index186.js.map +1 -1
  125. package/dist/index187.js +5 -1
  126. package/dist/index187.js.map +1 -1
  127. package/dist/index188.js +2 -2
  128. package/dist/index189.js +2 -2
  129. package/dist/index190.js +2 -2
  130. package/dist/index191.js +2 -2
  131. package/dist/index192.js +2 -2
  132. package/dist/index193.js +2 -2
  133. package/dist/index194.js +2 -2
  134. package/dist/index195.js +2 -2
  135. package/dist/index196.js +2 -2
  136. package/dist/index197.js +79 -3
  137. package/dist/index197.js.map +1 -1
  138. package/dist/index198.js +2 -2
  139. package/dist/index198.js.map +1 -1
  140. package/dist/index199.js +2 -4
  141. package/dist/index199.js.map +1 -1
  142. package/dist/index20.js +214 -238
  143. package/dist/index20.js.map +1 -1
  144. package/dist/index200.js +4 -2
  145. package/dist/index200.js.map +1 -1
  146. package/dist/index201.js +112 -226
  147. package/dist/index201.js.map +1 -1
  148. package/dist/index202.js +134 -2
  149. package/dist/index202.js.map +1 -1
  150. package/dist/index203.js +5 -121
  151. package/dist/index203.js.map +1 -1
  152. package/dist/index204.js +17 -132
  153. package/dist/index204.js.map +1 -1
  154. package/dist/index205.js +2 -5
  155. package/dist/index205.js.map +1 -1
  156. package/dist/index206.js +2 -19
  157. package/dist/index206.js.map +1 -1
  158. package/dist/index207.js +35 -2
  159. package/dist/index207.js.map +1 -1
  160. package/dist/index208.js +174 -2
  161. package/dist/index208.js.map +1 -1
  162. package/dist/index209.js +6 -35
  163. package/dist/index209.js.map +1 -1
  164. package/dist/index210.js +353 -159
  165. package/dist/index210.js.map +1 -1
  166. package/dist/index211.js +373 -6
  167. package/dist/index211.js.map +1 -1
  168. package/dist/index212.js +3 -7
  169. package/dist/index212.js.map +1 -1
  170. package/dist/index213.js +7 -368
  171. package/dist/index213.js.map +1 -1
  172. package/dist/index214.js +2 -373
  173. package/dist/index214.js.map +1 -1
  174. package/dist/index215.js +16 -79
  175. package/dist/index215.js.map +1 -1
  176. package/dist/index216.js +10 -10
  177. package/dist/index216.js.map +1 -1
  178. package/dist/index217.js +17 -13
  179. package/dist/index217.js.map +1 -1
  180. package/dist/index218.js +24 -15
  181. package/dist/index218.js.map +1 -1
  182. package/dist/index219.js +8 -29
  183. package/dist/index219.js.map +1 -1
  184. package/dist/index22.js +240 -120
  185. package/dist/index22.js.map +1 -1
  186. package/dist/index220.js +174 -8
  187. package/dist/index220.js.map +1 -1
  188. package/dist/index221.js +5 -3
  189. package/dist/index221.js.map +1 -1
  190. package/dist/index222.js +3 -7
  191. package/dist/index222.js.map +1 -1
  192. package/dist/index223.js +3 -3
  193. package/dist/index223.js.map +1 -1
  194. package/dist/index224.js +224 -3
  195. package/dist/index224.js.map +1 -1
  196. package/dist/index226.js +17 -9
  197. package/dist/index226.js.map +1 -1
  198. package/dist/index227.js +12 -2
  199. package/dist/index227.js.map +1 -1
  200. package/dist/index228.js +2 -6
  201. package/dist/index228.js.map +1 -1
  202. package/dist/index229.js +10 -17
  203. package/dist/index229.js.map +1 -1
  204. package/dist/index230.js +3 -8
  205. package/dist/index230.js.map +1 -1
  206. package/dist/index231.js +6 -23
  207. package/dist/index231.js.map +1 -1
  208. package/dist/index232.js +2 -79
  209. package/dist/index232.js.map +1 -1
  210. package/dist/index233.js +295 -69
  211. package/dist/index233.js.map +1 -1
  212. package/dist/index234.js +2 -2
  213. package/dist/index234.js.map +1 -1
  214. package/dist/index235.js +2 -4
  215. package/dist/index235.js.map +1 -1
  216. package/dist/index236.js +106 -5
  217. package/dist/index236.js.map +1 -1
  218. package/dist/index237.js +435 -2
  219. package/dist/index237.js.map +1 -1
  220. package/dist/index238.js +88 -5
  221. package/dist/index238.js.map +1 -1
  222. package/dist/index239.js +200 -2
  223. package/dist/index239.js.map +1 -1
  224. package/dist/index24.js +117 -105
  225. package/dist/index24.js.map +1 -1
  226. package/dist/index240.js +116 -294
  227. package/dist/index240.js.map +1 -1
  228. package/dist/index241.js +9 -2
  229. package/dist/index241.js.map +1 -1
  230. package/dist/index242.js +23 -2
  231. package/dist/index242.js.map +1 -1
  232. package/dist/index243.js +78 -105
  233. package/dist/index243.js.map +1 -1
  234. package/dist/index244.js +2 -435
  235. package/dist/index244.js.map +1 -1
  236. package/dist/index245.js +2 -117
  237. package/dist/index245.js.map +1 -1
  238. package/dist/index246.js +2 -200
  239. package/dist/index246.js.map +1 -1
  240. package/dist/index248.js +6 -2
  241. package/dist/index248.js.map +1 -1
  242. package/dist/index249.js +17 -2
  243. package/dist/index249.js.map +1 -1
  244. package/dist/index250.js +2 -2
  245. package/dist/index250.js.map +1 -1
  246. package/dist/index251.js +5 -89
  247. package/dist/index251.js.map +1 -1
  248. package/dist/index252.js +69 -224
  249. package/dist/index252.js.map +1 -1
  250. package/dist/index253.js +19 -53
  251. package/dist/index253.js.map +1 -1
  252. package/dist/index254.js +255 -12
  253. package/dist/index254.js.map +1 -1
  254. package/dist/index255.js +235 -4
  255. package/dist/index255.js.map +1 -1
  256. package/dist/index256.js +15 -4
  257. package/dist/index256.js.map +1 -1
  258. package/dist/index257.js +4 -61
  259. package/dist/index257.js.map +1 -1
  260. package/dist/index258.js +4 -2
  261. package/dist/index258.js.map +1 -1
  262. package/dist/index259.js +64 -0
  263. package/dist/index259.js.map +1 -0
  264. package/dist/index26.js +104 -90
  265. package/dist/index26.js.map +1 -1
  266. package/dist/index260.js +5 -0
  267. package/dist/index260.js.map +1 -0
  268. package/dist/index261.js +5 -0
  269. package/dist/index261.js.map +1 -0
  270. package/dist/index28.js +90 -145
  271. package/dist/index28.js.map +1 -1
  272. package/dist/index3.js +14 -40
  273. package/dist/index3.js.map +1 -1
  274. package/dist/index30.js +137 -106
  275. package/dist/index30.js.map +1 -1
  276. package/dist/index32.js +108 -677
  277. package/dist/index32.js.map +1 -1
  278. package/dist/index34.js +673 -283
  279. package/dist/index34.js.map +1 -1
  280. package/dist/index36.js +288 -104
  281. package/dist/index36.js.map +1 -1
  282. package/dist/index38.js +109 -151
  283. package/dist/index38.js.map +1 -1
  284. package/dist/index4.js +38 -76
  285. package/dist/index4.js.map +1 -1
  286. package/dist/index40.js +146 -157
  287. package/dist/index40.js.map +1 -1
  288. package/dist/index42.js +156 -74
  289. package/dist/index42.js.map +1 -1
  290. package/dist/index44.js +59 -29
  291. package/dist/index44.js.map +1 -1
  292. package/dist/index46.js +57 -58
  293. package/dist/index46.js.map +1 -1
  294. package/dist/index48.js +55 -86
  295. package/dist/index48.js.map +1 -1
  296. package/dist/index5.js +78 -62
  297. package/dist/index5.js.map +1 -1
  298. package/dist/index50.js +88 -53
  299. package/dist/index50.js.map +1 -1
  300. package/dist/index52.js +53 -41
  301. package/dist/index52.js.map +1 -1
  302. package/dist/index54.js +42 -55
  303. package/dist/index54.js.map +1 -1
  304. package/dist/index56.js +53 -66
  305. package/dist/index56.js.map +1 -1
  306. package/dist/index58.js +65 -88
  307. package/dist/index58.js.map +1 -1
  308. package/dist/index6.js +60 -38
  309. package/dist/index6.js.map +1 -1
  310. package/dist/index60.js +59 -90
  311. package/dist/index60.js.map +1 -1
  312. package/dist/index62.js +123 -79
  313. package/dist/index62.js.map +1 -1
  314. package/dist/index64.js +78 -91
  315. package/dist/index64.js.map +1 -1
  316. package/dist/index66.js +87 -49
  317. package/dist/index66.js.map +1 -1
  318. package/dist/index68.js +52 -305
  319. package/dist/index68.js.map +1 -1
  320. package/dist/index7.js +18 -172
  321. package/dist/index7.js.map +1 -1
  322. package/dist/index70.js +300 -116
  323. package/dist/index70.js.map +1 -1
  324. package/dist/index72.js +120 -216
  325. package/dist/index72.js.map +1 -1
  326. package/dist/index74.js +215 -36
  327. package/dist/index74.js.map +1 -1
  328. package/dist/index75.js +1 -115
  329. package/dist/index75.js.map +1 -1
  330. package/dist/index76.js +46 -1
  331. package/dist/index76.js.map +1 -1
  332. package/dist/index77.js +105 -230
  333. package/dist/index77.js.map +1 -1
  334. package/dist/index79.js +227 -155
  335. package/dist/index79.js.map +1 -1
  336. package/dist/index8.js +7 -19
  337. package/dist/index8.js.map +1 -1
  338. package/dist/index81.js +155 -200
  339. package/dist/index81.js.map +1 -1
  340. package/dist/index83.js +207 -27
  341. package/dist/index83.js.map +1 -1
  342. package/dist/index85.js +27 -86
  343. package/dist/index85.js.map +1 -1
  344. package/dist/index87.js +54 -91
  345. package/dist/index87.js.map +1 -1
  346. package/dist/index89.js +76 -45
  347. package/dist/index89.js.map +1 -1
  348. package/dist/index9.js +75 -189
  349. package/dist/index9.js.map +1 -1
  350. package/dist/index91.js +89 -15
  351. package/dist/index91.js.map +1 -1
  352. package/dist/index93.js +15 -157
  353. package/dist/index93.js.map +1 -1
  354. package/dist/index95.js +112 -58
  355. package/dist/index95.js.map +1 -1
  356. package/dist/index97.js +69 -55
  357. package/dist/index97.js.map +1 -1
  358. package/dist/index99.js +59 -90
  359. package/dist/index99.js.map +1 -1
  360. package/dist/style.css +1 -1
  361. package/package.json +2 -2
@@ -0,0 +1,15 @@
1
+ type Config = {
2
+ inertiaLinkName: string;
3
+ nuxtLinkName: string;
4
+ mobileMaxWidth: number;
5
+ };
6
+ export declare const _config: {
7
+ [x: string]: any;
8
+ inertiaLinkName: string;
9
+ nuxtLinkName: string;
10
+ mobileMaxWidth: number;
11
+ };
12
+ export declare const useBbConfig: () => {
13
+ setConfig: (config: Partial<Config>) => void;
14
+ };
15
+ export {};
@@ -0,0 +1,4 @@
1
+ export declare const useLogger: () => {
2
+ warn: (message: string) => void;
3
+ error: (message: string) => void;
4
+ };
package/dist/index.d.ts CHANGED
@@ -1,9 +1,11 @@
1
+ export { useBbConfig } from './composables/useBbConfig';
1
2
  export { useBroadcastChannelInstance } from './composables/useBroadcastChannelInstance';
2
3
  export { useConfirm } from './composables/useConfirm';
3
4
  export { useCountdown } from './composables/useCountdown';
4
- export { useToast } from './composables/useToast';
5
- export { useOptions } from './composables/useOptions';
6
5
  export { useId } from './composables/useId';
6
+ export { useMobile } from './composables/useMobile';
7
+ export { useQueue } from './composables/useQueue';
8
+ export { useToast } from './composables/useToast';
7
9
  export { useWizard, wizardInjectionKey } from './composables/useWizard';
8
10
  export type { Step, WizardState } from './composables/useWizard';
9
11
  export type { BaseOption, Option } from './composables/useOptions';
package/dist/index.js CHANGED
@@ -1,32 +1,32 @@
1
1
  import "./index2.js";
2
- import { useBroadcastChannelInstance as ro } from "./index3.js";
3
- import { useConfirm as ao } from "./index4.js";
4
- import { useCountdown as fo } from "./index5.js";
5
- import { useToast as so } from "./index6.js";
6
- import { useOptions as uo } from "./index7.js";
7
- import { useId as lo } from "./index8.js";
8
- import { useWizard as bo, wizardInjectionKey as no } from "./index9.js";
9
- import { default as ho } from "./index10.js";
10
- import "./index11.js";
11
- import { default as Io } from "./index12.js";
2
+ import { useBbConfig as to } from "./index3.js";
3
+ import { useBroadcastChannelInstance as ao } from "./index4.js";
4
+ import { useConfirm as fo } from "./index5.js";
5
+ import { useCountdown as so } from "./index6.js";
6
+ import { useId as io } from "./index7.js";
7
+ import { useMobile as lo } from "./index8.js";
8
+ import { useQueue as bo } from "./index9.js";
9
+ import { useToast as co } from "./index10.js";
10
+ import { useWizard as ho, wizardInjectionKey as Io } from "./index11.js";
11
+ import { default as go } from "./index12.js";
12
12
  import "./index13.js";
13
- import { default as go } from "./index14.js";
13
+ import { default as wo } from "./index14.js";
14
14
  import "./index15.js";
15
- import { default as wo } from "./index16.js";
15
+ import { default as ko } from "./index16.js";
16
16
  import "./index17.js";
17
- import { default as ko } from "./index18.js";
17
+ import { default as Go } from "./index18.js";
18
18
  import "./index19.js";
19
- import { default as Go } from "./index20.js";
19
+ import { default as vo } from "./index20.js";
20
20
  import "./index21.js";
21
- import { default as vo } from "./index22.js";
21
+ import { default as Ao } from "./index22.js";
22
22
  import "./index23.js";
23
- import { default as Ao } from "./index24.js";
23
+ import { default as jo } from "./index24.js";
24
24
  import "./index25.js";
25
- import { default as Oo } from "./index26.js";
25
+ import { default as Ho } from "./index26.js";
26
26
  import "./index27.js";
27
- import { default as yo } from "./index28.js";
27
+ import { default as Mo } from "./index28.js";
28
28
  import "./index29.js";
29
- import { default as Ko } from "./index30.js";
29
+ import { default as Qo } from "./index30.js";
30
30
  import "./index31.js";
31
31
  import { default as qo } from "./index32.js";
32
32
  import "./index33.js";
@@ -34,157 +34,161 @@ import { default as Fo } from "./index34.js";
34
34
  import "./index35.js";
35
35
  import { default as Lo } from "./index36.js";
36
36
  import "./index37.js";
37
- import { default as Qo } from "./index38.js";
37
+ import { default as Vo } from "./index38.js";
38
38
  import "./index39.js";
39
- import { default as Vo } from "./index40.js";
39
+ import { default as Yo } from "./index40.js";
40
40
  import "./index41.js";
41
- import { default as Yo } from "./index42.js";
41
+ import { default as _o } from "./index42.js";
42
42
  import "./index43.js";
43
- import { default as _o } from "./index44.js";
43
+ import { default as or } from "./index44.js";
44
44
  import "./index45.js";
45
- import { default as ot } from "./index46.js";
45
+ import { default as tr } from "./index46.js";
46
46
  import "./index47.js";
47
- import { default as rt } from "./index48.js";
47
+ import { default as ar } from "./index48.js";
48
48
  import "./index49.js";
49
- import { default as at } from "./index50.js";
49
+ import { default as fr } from "./index50.js";
50
50
  import "./index51.js";
51
- import { default as ft } from "./index52.js";
51
+ import { default as sr } from "./index52.js";
52
52
  import "./index53.js";
53
- import { default as st } from "./index54.js";
53
+ import { default as ir } from "./index54.js";
54
54
  import "./index55.js";
55
- import { default as ut } from "./index56.js";
55
+ import { default as dr } from "./index56.js";
56
56
  import "./index57.js";
57
- import { default as xt } from "./index58.js";
57
+ import { default as Br } from "./index58.js";
58
58
  import "./index59.js";
59
- import { default as Bt } from "./index60.js";
59
+ import { default as nr } from "./index60.js";
60
60
  import "./index61.js";
61
- import { default as nt } from "./index62.js";
61
+ import { default as Cr } from "./index62.js";
62
62
  import "./index63.js";
63
- import { default as ht } from "./index64.js";
63
+ import { default as Ir } from "./index64.js";
64
64
  import "./index65.js";
65
- import { default as It } from "./index66.js";
65
+ import { default as gr } from "./index66.js";
66
66
  import "./index67.js";
67
- import { default as gt } from "./index68.js";
67
+ import { default as wr } from "./index68.js";
68
68
  import "./index69.js";
69
- import { default as wt } from "./index70.js";
69
+ import { default as kr } from "./index70.js";
70
70
  import "./index71.js";
71
- import { default as kt } from "./index72.js";
71
+ import { default as Gr } from "./index72.js";
72
72
  import "./index73.js";
73
- import { default as Gt } from "./index74.js";
74
- import { default as vt } from "./index75.js";
75
- import "./index76.js";
76
- import { default as At } from "./index77.js";
73
+ import { default as vr } from "./index74.js";
74
+ import "./index75.js";
75
+ import { default as Ar } from "./index76.js";
76
+ import { default as jr } from "./index77.js";
77
77
  import "./index78.js";
78
- import { default as Ot } from "./index79.js";
78
+ import { default as Hr } from "./index79.js";
79
79
  import "./index80.js";
80
- import { default as yt } from "./index81.js";
80
+ import { default as Mr } from "./index81.js";
81
81
  import "./index82.js";
82
- import { default as Kt } from "./index83.js";
82
+ import { default as Qr } from "./index83.js";
83
83
  import "./index84.js";
84
- import { default as qt } from "./index85.js";
84
+ import { default as qr } from "./index85.js";
85
85
  import "./index86.js";
86
- import { default as Ft } from "./index87.js";
86
+ import { default as Fr } from "./index87.js";
87
87
  import "./index88.js";
88
- import { default as Lt } from "./index89.js";
88
+ import { default as Lr } from "./index89.js";
89
89
  import "./index90.js";
90
- import { default as Qt } from "./index91.js";
90
+ import { default as Vr } from "./index91.js";
91
91
  import "./index92.js";
92
- import { default as Vt } from "./index93.js";
92
+ import { default as Yr } from "./index93.js";
93
93
  import "./index94.js";
94
- import { default as Yt } from "./index95.js";
94
+ import { default as _r } from "./index95.js";
95
95
  import "./index96.js";
96
- import { default as _t } from "./index97.js";
96
+ import { default as ot } from "./index97.js";
97
97
  import "./index98.js";
98
- import { default as or } from "./index99.js";
98
+ import { default as tt } from "./index99.js";
99
99
  import "./index100.js";
100
- import { default as rr } from "./index101.js";
100
+ import { default as at } from "./index101.js";
101
101
  import "./index102.js";
102
- import { default as ar } from "./index103.js";
102
+ import { default as ft } from "./index103.js";
103
103
  import "./index104.js";
104
- import { default as fr } from "./index105.js";
104
+ import { default as st } from "./index105.js";
105
105
  import "./index106.js";
106
- import { default as sr } from "./index107.js";
106
+ import { default as it } from "./index107.js";
107
107
  import "./index108.js";
108
- import { default as ur } from "./index109.js";
108
+ import { default as dt } from "./index109.js";
109
109
  import "./index110.js";
110
- import { default as xr } from "./index111.js";
110
+ import { default as Bt } from "./index111.js";
111
111
  import "./index112.js";
112
- import { default as Br } from "./index113.js";
112
+ import { default as nt } from "./index113.js";
113
113
  import "./index114.js";
114
- import { default as nr } from "./index115.js";
114
+ import { default as Ct } from "./index115.js";
115
115
  import "./index116.js";
116
- import { default as hr } from "./index117.js";
117
- import { default as Ir } from "./index118.js";
118
- import { default as gr } from "./index119.js";
119
- import { default as wr } from "./index120.js";
120
- import { default as kr } from "./index121.js";
116
+ import { default as It } from "./index117.js";
117
+ import "./index118.js";
118
+ import { default as gt } from "./index119.js";
119
+ import { default as wt } from "./index120.js";
120
+ import { default as kt } from "./index121.js";
121
+ import { default as Gt } from "./index122.js";
122
+ import { default as vt } from "./index123.js";
121
123
  export {
122
- ho as BaseButton,
123
- Io as BaseCheckbox,
124
- go as BaseCheckboxGroup,
125
- wo as BaseDatePicker,
126
- ko as BaseDatePickerInput,
127
- Go as BaseDialog,
128
- vo as BaseInputContainer,
129
- Ao as BaseNumberInput,
130
- Oo as BaseRadio,
131
- yo as BaseRadioGroup,
132
- Ko as BaseRating,
133
- qo as BaseSelect,
134
- Fo as BaseSlider,
135
- Lo as BaseSwitch,
136
- Qo as BaseSwitchGroup,
137
- Vo as BaseTag,
138
- _o as BaseTextInput,
139
- Yo as BaseTextarea,
140
- ot as BbAccordion,
141
- rt as BbAlert,
142
- at as BbAvatar,
143
- ft as BbBadge,
144
- st as BbBreadcrumbs,
145
- ut as BbButton,
146
- xt as BbCheckbox,
147
- Bt as BbCheckboxGroup,
148
- hr as BbChip,
149
- Ir as BbCollapsible,
150
- nt as BbConfirm,
151
- ht as BbDatePickerInput,
152
- It as BbDialog,
153
- gt as BbDropdown,
154
- wt as BbDropdownButton,
155
- kt as BbDropzone,
156
- gr as BbIcon,
157
- Gt as BbIntersection,
158
- vt as BbNumberInput,
159
- At as BbOffCanvas,
160
- Ot as BbPagination,
161
- yt as BbPopover,
162
- Kt as BbProgress,
163
- qt as BbRadio,
164
- Ft as BbRadioGroup,
165
- Lt as BbRating,
166
- Qt as BbRatio,
167
- Vt as BbSelect,
168
- Yt as BbSlider,
169
- wr as BbSmoothHeight,
170
- kr as BbSpinner,
171
- _t as BbSwitch,
172
- or as BbSwitchGroup,
173
- rr as BbTab,
174
- ar as BbTable,
175
- fr as BbTag,
176
- ur as BbTextInput,
177
- sr as BbTextarea,
178
- xr as BbToast,
179
- Br as BbTooltip,
180
- nr as BbTree,
181
- ro as useBroadcastChannelInstance,
182
- ao as useConfirm,
183
- fo as useCountdown,
184
- lo as useId,
185
- uo as useOptions,
186
- so as useToast,
187
- bo as useWizard,
188
- no as wizardInjectionKey
124
+ go as BaseButton,
125
+ wo as BaseCheckbox,
126
+ ko as BaseCheckboxGroup,
127
+ Go as BaseDatePicker,
128
+ vo as BaseDatePickerInput,
129
+ Ao as BaseDialog,
130
+ jo as BaseInputContainer,
131
+ Ho as BaseNumberInput,
132
+ Mo as BaseRadio,
133
+ Qo as BaseRadioGroup,
134
+ qo as BaseRating,
135
+ Fo as BaseSelect,
136
+ Lo as BaseSlider,
137
+ Vo as BaseSwitch,
138
+ Yo as BaseSwitchGroup,
139
+ _o as BaseTag,
140
+ tr as BaseTextInput,
141
+ or as BaseTextarea,
142
+ ar as BbAccordion,
143
+ fr as BbAlert,
144
+ sr as BbAvatar,
145
+ ir as BbBadge,
146
+ dr as BbBreadcrumbs,
147
+ Br as BbButton,
148
+ nr as BbCheckbox,
149
+ Cr as BbCheckboxGroup,
150
+ gt as BbChip,
151
+ wt as BbCollapsible,
152
+ Ir as BbConfirm,
153
+ gr as BbDatePickerInput,
154
+ wr as BbDialog,
155
+ kr as BbDropdown,
156
+ Gr as BbDropdownButton,
157
+ vr as BbDropzone,
158
+ kt as BbIcon,
159
+ Ar as BbIntersection,
160
+ jr as BbNumberInput,
161
+ Hr as BbOffCanvas,
162
+ Mr as BbPagination,
163
+ Qr as BbPopover,
164
+ qr as BbProgress,
165
+ Fr as BbRadio,
166
+ Lr as BbRadioGroup,
167
+ Vr as BbRating,
168
+ Yr as BbRatio,
169
+ _r as BbSelect,
170
+ ot as BbSlider,
171
+ Gt as BbSmoothHeight,
172
+ vt as BbSpinner,
173
+ tt as BbSwitch,
174
+ at as BbSwitchGroup,
175
+ ft as BbTab,
176
+ st as BbTable,
177
+ it as BbTag,
178
+ Bt as BbTextInput,
179
+ dt as BbTextarea,
180
+ nt as BbToast,
181
+ Ct as BbTooltip,
182
+ It as BbTree,
183
+ to as useBbConfig,
184
+ ao as useBroadcastChannelInstance,
185
+ fo as useConfirm,
186
+ so as useCountdown,
187
+ io as useId,
188
+ lo as useMobile,
189
+ bo as useQueue,
190
+ co as useToast,
191
+ ho as useWizard,
192
+ Io as wizardInjectionKey
189
193
  };
190
194
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index10.js CHANGED
@@ -1,66 +1,43 @@
1
- import { defineComponent as v, getCurrentInstance as c, computed as n, resolveComponent as u, openBlock as y, createBlock as g, resolveDynamicComponent as k, mergeProps as C, withCtx as h, renderSlot as m, createTextVNode as S, toDisplayString as x } from "vue";
2
- const A = /* @__PURE__ */ v({
3
- __name: "BaseButton",
4
- props: {
5
- activeClass: {},
6
- ariaCurrentValue: {},
7
- block: { type: Boolean },
8
- data: {},
9
- disabled: { type: Boolean },
10
- exactActiveClass: {},
11
- headers: {},
12
- href: {},
13
- method: {},
14
- onBefore: {},
15
- onCancel: {},
16
- onCancelToken: {},
17
- onFinish: {},
18
- only: {},
19
- onProgress: {},
20
- onStart: {},
21
- onSuccess: {},
22
- preserveScroll: { type: [Boolean, Function] },
23
- preserveState: { type: [Boolean, Function, null] },
24
- queryStringArrayFormat: {},
25
- replace: { type: Boolean },
26
- tag: { default: "button" },
27
- target: {},
28
- text: {},
29
- to: {},
30
- type: { default: "button" }
31
- },
32
- setup(d) {
33
- var o, s, l, i;
34
- const e = d, r = !!((s = (o = c()) == null ? void 0 : o.proxy) != null && s.$inertia), p = !!((i = (l = c()) == null ? void 0 : l.proxy) != null && i.$nuxt), a = n(() => e.href || e.to && e.disabled ? r && !e.disabled && !e.target ? u("Link") : "a" : e.to ? p ? u("NuxtLink") : "router-link" : e.tag), b = n(() => ({
35
- "base-btn": !0,
36
- "base-btn--block": e.block,
37
- "base-btn--disabled": e.disabled
38
- })), f = n(() => {
39
- const t = {};
40
- switch (a.value === "button" ? (t.disabled = e.disabled, t.type = e.type) : a.value === "a" || r && typeof a.value != "string" && a.value.name === "Link" ? e.disabled ? (t["aria-disabled"] = !0, t.role = "link") : (t.href = e.href, t.target = e.target, r && (t.data = e.data, t.headers = e.headers, t.method = e.method, t.onBefore = e.onBefore, t.onCancel = e.onCancel, t.onCancelToken = e.onCancelToken, t.onFinish = e.onFinish, t.only = e.only, t.onProgress = e.onProgress, t.onStart = e.onStart, t.onSuccess = e.onSuccess, t.preserveScroll = e.preserveScroll, t.preserveState = e.preserveState, t.queryStringArrayFormat = e.queryStringArrayFormat, t.replace = e.replace)) : (a.value === "router-link" || typeof a.value != "string" && a.value.name === "NuxtLink") && (t.activeClass = e.activeClass, t.ariaCurrentValue = e.ariaCurrentValue, t.exactActiveClass = e.exactActiveClass, t.replace = e.replace, t.target = e.target, t.to = e.to), a.value) {
41
- case "button":
42
- t.disabled = e.disabled, t.type = e.type;
43
- break;
44
- case "a":
45
- e.disabled ? (t["aria-disabled"] = !0, t.role = "link") : t.href = e.href;
46
- break;
47
- case "router-link":
48
- t.to = e.to;
49
- break;
1
+ import { wait as p } from "./index126.js";
2
+ import { reactive as d } from "vue";
3
+ import { useId as h } from "./index7.js";
4
+ const i = d({
5
+ stack: []
6
+ }), b = () => {
7
+ const c = (t) => i.stack = i.stack.filter((o) => o.id !== t);
8
+ return {
9
+ toast: (t) => {
10
+ const o = h().id.value;
11
+ let l, e, n, s, f;
12
+ const u = 6e3;
13
+ if (typeof t == "string")
14
+ e = t;
15
+ else {
16
+ if (typeof t.timeout == "number" && t.timeout <= 0)
17
+ throw new Error("Toast messages cannot have a zero or less timeout");
18
+ n = t.icon, f = t.showClose, e = t.text, s = t.theme, l = t.title;
50
19
  }
51
- return t;
52
- });
53
- return (t, B) => (y(), g(k(a.value), C({ class: b.value }, f.value), {
54
- default: h(() => [
55
- m(t.$slots, "default", {}, () => [
56
- S(x(t.text), 1)
57
- ])
58
- ]),
59
- _: 3
60
- }, 16, ["class"]));
61
- }
62
- });
20
+ if (i.stack = i.stack.concat({
21
+ icon: n,
22
+ id: o,
23
+ showClose: f,
24
+ text: e,
25
+ theme: s,
26
+ title: l
27
+ }), typeof t == "object" && !t.persistent || typeof t == "string") {
28
+ let r;
29
+ typeof t == "object" && t.timeout ? r = t.timeout : r = u, p(r).then(() => {
30
+ c(o);
31
+ });
32
+ }
33
+ return o;
34
+ },
35
+ dismiss: c,
36
+ dismissAll: () => i.stack = []
37
+ };
38
+ };
63
39
  export {
64
- A as default
40
+ i as state,
41
+ b as useToast
65
42
  };
66
43
  //# sourceMappingURL=index10.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index10.js","sources":["../src/components/BaseButton/BaseButton.vue"],"sourcesContent":["<template>\n\t<component :is=\"tag\" :class=\"classes\" v-bind=\"attributes\">\n\t\t<slot>{{ text }}</slot>\n\t</component>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, getCurrentInstance, resolveComponent } from 'vue';\nimport type { RouteLocationRaw } from 'vue-router';\n\nexport type BaseButtonProps = {\n\t/**\n\t * Class to apply when the link is active\n\t */\n\tactiveClass?: string;\n\n\t/**\n\t * Value passed to the attribute `aria-current` when the link is exact active.\n\t *\n\t * @defaultValue `'page'`\n\t */\n\tariaCurrentValue?:\n\t\t| 'page'\n\t\t| 'step'\n\t\t| 'location'\n\t\t| 'date'\n\t\t| 'time'\n\t\t| 'true'\n\t\t| 'false';\n\n\t/**\n\t * Displays the component as full width.\n\t */\n\tblock?: boolean;\n\n\tdata?: object;\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Class to apply when the link is exact active\n\t */\n\texactActiveClass?: string;\n\n\theaders?: object;\n\n\t/**\n\t * Returns the hyperlink's URL.\n\t *\n\t * Can be set, to change the URL.\n\t */\n\thref?: HTMLAnchorElement['href'];\n\n\tmethod?: 'get' | 'post' | 'put' | 'patch' | 'delete';\n\n\tonBefore?: () => void;\n\n\tonCancel?: () => void;\n\n\tonCancelToken?: (cancelToken: import('axios').CancelTokenSource) => void;\n\n\tonFinish?: () => void;\n\n\tonly?: string[];\n\n\tonProgress?: (progress: { percentage: number | undefined }) => void;\n\n\tonStart?: () => void;\n\n\tonSuccess?: () => void;\n\n\tpreserveScroll?: boolean | ((props: { [key: string]: unknown }) => boolean);\n\n\tpreserveState?:\n\t\t| boolean\n\t\t| ((props: { [key: string]: unknown }) => boolean)\n\t\t| null;\n\n\tqueryStringArrayFormat?: 'brackets' | 'indices';\n\n\t/**\n\t * Calls `router.replace` instead of `router.push`.\n\t */\n\treplace?: boolean;\n\n\t/**\n\t * Any HTML tag corresponding to a non-void HTMl element.\n\t */\n\ttag?: string;\n\n\t/**\n\t * Sets or retrieves the window or frame at which to target content.\n\t */\n\ttarget?: HTMLAnchorElement['target'];\n\n\t/**\n\t * Text content of the component.\n\t */\n\ttext?: string;\n\n\t/**\n\t * Route Location the link should navigate to when clicked on.\n\t */\n\tto?: RouteLocationRaw;\n\n\t/**\n\t * Gets the classification and default behavior of the button.\n\t */\n\ttype?: HTMLButtonElement['type'];\n};\n\nconst props = withDefaults(defineProps<BaseButtonProps>(), {\n\ttag: 'button',\n\ttype: 'button',\n});\n\ndefineSlots<{\n\tdefault?: (props: object) => any;\n}>();\n\n/* Ignore because possibly undefined */\n// @ts-expect-error possibly undef\nconst isInertia = !!getCurrentInstance()?.proxy?.$inertia;\n\n// @ts-expect-error possibly undef\nconst isNuxt = !!getCurrentInstance()?.proxy?.$nuxt;\n\nconst tag = computed(() => {\n\t// For disabled links always render a\n\tif (props.href || (props.to && props.disabled)) {\n\t\t// Prevent rendering inertia links if target is passed (inertia doesn't support external links)\n\t\tif (isInertia && !props.disabled && !props.target)\n\t\t\treturn resolveComponent('Link');\n\t\treturn 'a';\n\t}\n\tif (props.to) {\n\t\tif (isNuxt) return resolveComponent('NuxtLink');\n\t\treturn 'router-link';\n\t}\n\treturn props.tag;\n});\n\nconst classes = computed(() => ({\n\t'base-btn': true,\n\t'base-btn--block': props.block,\n\t'base-btn--disabled': props.disabled,\n}));\n\nconst attributes = computed(() => {\n\ttype PossibleAttributes = {\n\t\tactiveClass: BaseButtonProps['activeClass'];\n\n\t\t'aria-disabled': boolean;\n\n\t\tariaCurrentValue: BaseButtonProps['ariaCurrentValue'];\n\n\t\tdata: BaseButtonProps['data'];\n\n\t\tdisabled: boolean;\n\n\t\texactActiveClass: BaseButtonProps['exactActiveClass'];\n\n\t\theaders: BaseButtonProps['headers'];\n\n\t\thref: string;\n\n\t\tmethod: BaseButtonProps['method'];\n\n\t\tonBefore: BaseButtonProps['onBefore'];\n\n\t\tonCancel: BaseButtonProps['onCancel'];\n\n\t\tonCancelToken: BaseButtonProps['onCancelToken'];\n\n\t\tonFinish: BaseButtonProps['onFinish'];\n\n\t\tonly: BaseButtonProps['only'];\n\n\t\tonProgress: BaseButtonProps['onProgress'];\n\n\t\tonStart: BaseButtonProps['onStart'];\n\n\t\tonSuccess: BaseButtonProps['onSuccess'];\n\n\t\tpreserveScroll: BaseButtonProps['preserveScroll'];\n\n\t\tpreserveState: BaseButtonProps['preserveState'];\n\n\t\tqueryStringArrayFormat: BaseButtonProps['queryStringArrayFormat'];\n\n\t\treplace: BaseButtonProps['replace'];\n\n\t\trole: string;\n\n\t\tstyle: { [rule: string]: string };\n\n\t\ttarget: string;\n\n\t\tto: BaseButtonProps['to'];\n\n\t\ttype: string;\n\t};\n\tconst initial: Partial<PossibleAttributes> = {};\n\n\tif (tag.value === 'button') {\n\t\tinitial.disabled = props.disabled;\n\t\tinitial.type = props.type;\n\t} else if (\n\t\ttag.value === 'a' ||\n\t\t(isInertia && typeof tag.value !== 'string' && tag.value.name === 'Link')\n\t) {\n\t\t// When rendering as anchor prevent navigation if disabled\n\t\t// https://getbootstrap.com/docs/4.0/components/buttons/#disabled-state\n\t\tif (props.disabled) {\n\t\t\tinitial['aria-disabled'] = true;\n\t\t\tinitial.role = 'link';\n\t\t} else {\n\t\t\t// Only attach the href to active links\n\t\t\t// https://www.scottohara.me/blog/2021/05/28/disabled-links.html\n\t\t\tinitial.href = props.href;\n\t\t\tinitial.target = props.target;\n\n\t\t\tif (isInertia) {\n\t\t\t\tinitial.data = props.data;\n\t\t\t\tinitial.headers = props.headers;\n\t\t\t\tinitial.method = props.method;\n\t\t\t\tinitial.onBefore = props.onBefore;\n\t\t\t\tinitial.onCancel = props.onCancel;\n\t\t\t\tinitial.onCancelToken = props.onCancelToken;\n\t\t\t\tinitial.onFinish = props.onFinish;\n\t\t\t\tinitial.only = props.only;\n\t\t\t\tinitial.onProgress = props.onProgress;\n\t\t\t\tinitial.onStart = props.onStart;\n\t\t\t\tinitial.onSuccess = props.onSuccess;\n\t\t\t\tinitial.preserveScroll = props.preserveScroll;\n\t\t\t\tinitial.preserveState = props.preserveState;\n\t\t\t\tinitial.queryStringArrayFormat = props.queryStringArrayFormat;\n\t\t\t\tinitial.replace = props.replace;\n\t\t\t}\n\t\t}\n\t} else if (\n\t\ttag.value === 'router-link' ||\n\t\t(typeof tag.value !== 'string' && tag.value.name === 'NuxtLink')\n\t) {\n\t\tinitial.activeClass = props.activeClass;\n\t\tinitial.ariaCurrentValue = props.ariaCurrentValue;\n\t\tinitial.exactActiveClass = props.exactActiveClass;\n\t\tinitial.replace = props.replace;\n\t\tinitial.target = props.target;\n\t\tinitial.to = props.to;\n\t}\n\n\tswitch (tag.value) {\n\t\tcase 'button':\n\t\t\tinitial.disabled = props.disabled;\n\t\t\tinitial.type = props.type;\n\t\t\tbreak;\n\t\tcase 'a':\n\t\t\t// When rendering as anchor prevent navigation if disabled\n\t\t\t// https://getbootstrap.com/docs/4.0/components/buttons/#disabled-state\n\t\t\tif (props.disabled) {\n\t\t\t\tinitial['aria-disabled'] = true;\n\t\t\t\tinitial.role = 'link';\n\t\t\t} else {\n\t\t\t\t// Only attach the href to active links\n\t\t\t\t// https://www.scottohara.me/blog/2021/05/28/disabled-links.html\n\t\t\t\tinitial.href = props.href;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'router-link':\n\t\t\tinitial.to = props.to;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t}\n\treturn initial;\n});\n</script>\n<style lang=\"postcss\">\n@import '@/assets/css/BaseButton';\n</style>\n"],"names":["props","__props","isInertia","_b","_a","getCurrentInstance","isNuxt","_d","_c","tag","computed","resolveComponent","classes","attributes","initial"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkHA,UAAMA,IAAQC,GAWRC,IAAY,CAAC,GAACC,KAAAC,IAAAC,EAAA,MAAA,gBAAAD,EAAsB,UAAtB,QAAAD,EAA6B,WAG3CG,IAAS,CAAC,GAACC,KAAAC,IAAAH,EAAA,MAAA,gBAAAG,EAAsB,UAAtB,QAAAD,EAA6B,QAExCE,IAAMC,EAAS,MAEhBV,EAAM,QAASA,EAAM,MAAMA,EAAM,WAEhCE,KAAa,CAACF,EAAM,YAAY,CAACA,EAAM,SACnCW,EAAiB,MAAM,IACxB,MAEJX,EAAM,KACLM,IAAeK,EAAiB,UAAU,IACvC,gBAEDX,EAAM,GACb,GAEKY,IAAUF,EAAS,OAAO;AAAA,MAC/B,YAAY;AAAA,MACZ,mBAAmBV,EAAM;AAAA,MACzB,sBAAsBA,EAAM;AAAA,IAC3B,EAAA,GAEIa,IAAaH,EAAS,MAAM;AAsDjC,YAAMI,IAAuC,CAAA;AAkD7C,cAhDIL,EAAI,UAAU,YACjBK,EAAQ,WAAWd,EAAM,UACzBc,EAAQ,OAAOd,EAAM,QAErBS,EAAI,UAAU,OACbP,KAAa,OAAOO,EAAI,SAAU,YAAYA,EAAI,MAAM,SAAS,SAI9DT,EAAM,YACTc,EAAQ,eAAe,IAAI,IAC3BA,EAAQ,OAAO,WAIfA,EAAQ,OAAOd,EAAM,MACrBc,EAAQ,SAASd,EAAM,QAEnBE,MACHY,EAAQ,OAAOd,EAAM,MACrBc,EAAQ,UAAUd,EAAM,SACxBc,EAAQ,SAASd,EAAM,QACvBc,EAAQ,WAAWd,EAAM,UACzBc,EAAQ,WAAWd,EAAM,UACzBc,EAAQ,gBAAgBd,EAAM,eAC9Bc,EAAQ,WAAWd,EAAM,UACzBc,EAAQ,OAAOd,EAAM,MACrBc,EAAQ,aAAad,EAAM,YAC3Bc,EAAQ,UAAUd,EAAM,SACxBc,EAAQ,YAAYd,EAAM,WAC1Bc,EAAQ,iBAAiBd,EAAM,gBAC/Bc,EAAQ,gBAAgBd,EAAM,eAC9Bc,EAAQ,yBAAyBd,EAAM,wBACvCc,EAAQ,UAAUd,EAAM,aAI1BS,EAAI,UAAU,iBACb,OAAOA,EAAI,SAAU,YAAYA,EAAI,MAAM,SAAS,gBAErDK,EAAQ,cAAcd,EAAM,aAC5Bc,EAAQ,mBAAmBd,EAAM,kBACjCc,EAAQ,mBAAmBd,EAAM,kBACjCc,EAAQ,UAAUd,EAAM,SACxBc,EAAQ,SAASd,EAAM,QACvBc,EAAQ,KAAKd,EAAM,KAGZS,EAAI,OAAO;AAAA,QAClB,KAAK;AACJ,UAAAK,EAAQ,WAAWd,EAAM,UACzBc,EAAQ,OAAOd,EAAM;AACrB;AAAA,QACD,KAAK;AAGJ,UAAIA,EAAM,YACTc,EAAQ,eAAe,IAAI,IAC3BA,EAAQ,OAAO,UAIfA,EAAQ,OAAOd,EAAM;AAEtB;AAAA,QACD,KAAK;AACJ,UAAAc,EAAQ,KAAKd,EAAM;AACnB;AAAA,MAGF;AACO,aAAAc;AAAA,IAAA,CACP;;;;;;;;;;;"}
1
+ {"version":3,"file":"index10.js","sources":["../src/composables/useToast.ts"],"sourcesContent":["import { wait } from '@/utilities/functions/wait';\nimport { reactive } from 'vue';\nimport { useId } from './useId';\nimport type { CommonProps } from '@/types/CommonProps';\n\nexport type Message = {\n\t/**\n\t * Title of the message. Displayed in a more prominant fashion.\n\t */\n\ttitle?: string;\n\t/**\n\t * Text content of the toast message.\n\t */\n\ttext: string;\n\t/**\n\t * Name of the icon to display.\n\t */\n\ticon?: string;\n\t/**\n\t * Theme of the toast message. By default the theme is `default`.\n\t */\n\ttheme?: string;\n\t/**\n\t * Identifier of the message\n\t */\n\tid: string;\n} & Pick<CommonProps, 'showClose'>;\n\ntype MessageParameter =\n\t| string\n\t| (Pick<Message, 'title' | 'text' | 'icon' | 'theme'> &\n\t\t\t/* These props are mutually exclusive */\n\t\t\t(| {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Time in milliseconds before the message disappears\n\t\t\t\t\t\t */\n\t\t\t\t\t\ttimeout?: undefined;\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Setting the message as persistent will prevent the message from being dismissed automatically\n\t\t\t\t\t\t */\n\t\t\t\t\t\tpersistent?: undefined | false;\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Whether to show the closing action to dismiss the message.\n\t\t\t\t\t\t * Show close is optional if the message is not persistent\n\t\t\t\t\t\t */\n\t\t\t\t\t\tshowClose?: Message['showClose'];\n\t\t\t\t }\n\t\t\t\t| {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Time in milliseconds before the message disappears\n\t\t\t\t\t\t */\n\t\t\t\t\t\ttimeout: number;\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Setting the message as persistent will prevent the message from being dismissed automatically\n\t\t\t\t\t\t */\n\t\t\t\t\t\tpersistent?: undefined | false;\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Whether to show the closing action to dismiss the message.\n\t\t\t\t\t\t * Show close is optional if the message is not persistent\n\t\t\t\t\t\t */\n\t\t\t\t\t\tshowClose?: Message['showClose'];\n\t\t\t\t }\n\t\t\t\t| {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Time in milliseconds before the message disappears\n\t\t\t\t\t\t */\n\t\t\t\t\t\ttimeout?: undefined;\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Setting the message as persistent will prevent the message from being dismissed automatically\n\t\t\t\t\t\t */\n\t\t\t\t\t\tpersistent: true;\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Whether to show the closing action to dismiss the message.\n\t\t\t\t\t\t * Show close is mandatory if the message is persistent\n\t\t\t\t\t\t */\n\t\t\t\t\t\tshowClose: true;\n\t\t\t\t }\n\t\t\t));\n\nexport const state = reactive({\n\tstack: [] as Message[],\n});\n\nexport const useToast = () => {\n\t/**\n\t * Dismisses a specific message\n\t */\n\tconst dismiss = (id: Message['id']) =>\n\t\t(state.stack = state.stack.filter((el) => el.id !== id));\n\tconst dismissAll = () => (state.stack = []);\n\tconst toast = (message: MessageParameter) => {\n\t\tconst id = useId().id.value;\n\t\tlet title: Message['title'];\n\t\tlet text: Message['text'];\n\t\tlet icon: Message['icon'];\n\t\tlet theme: Message['theme'];\n\t\tlet showClose: Message['showClose'];\n\t\tconst defaultTimeout = 6000;\n\n\t\tif (typeof message === 'string') {\n\t\t\ttext = message;\n\t\t} else {\n\t\t\tif (typeof message.timeout === 'number' && message.timeout <= 0) {\n\t\t\t\tthrow new Error(`Toast messages cannot have a zero or less timeout`);\n\t\t\t}\n\t\t\ticon = message.icon;\n\t\t\tshowClose = message.showClose;\n\t\t\ttext = message.text;\n\t\t\ttheme = message.theme;\n\t\t\ttitle = message.title;\n\t\t}\n\t\tstate.stack = state.stack.concat({\n\t\t\ticon,\n\t\t\tid,\n\t\t\tshowClose,\n\t\t\ttext,\n\t\t\ttheme,\n\t\t\ttitle,\n\t\t});\n\t\tif (\n\t\t\t(typeof message === 'object' && !message.persistent) ||\n\t\t\ttypeof message === 'string'\n\t\t) {\n\t\t\tlet timeout: number;\n\n\t\t\tif (typeof message === 'object' && message.timeout) {\n\t\t\t\ttimeout = message.timeout;\n\t\t\t} else timeout = defaultTimeout;\n\n\t\t\twait(timeout).then(() => {\n\t\t\t\tdismiss(id);\n\t\t\t});\n\t\t}\n\t\treturn id;\n\t};\n\treturn {\n\t\ttoast,\n\t\tdismiss,\n\t\tdismissAll,\n\t};\n};\n"],"names":["state","reactive","useToast","dismiss","id","el","message","useId","title","text","icon","theme","showClose","defaultTimeout","timeout","wait"],"mappings":";;;AA+EO,MAAMA,IAAQC,EAAS;AAAA,EAC7B,OAAO,CAAC;AACT,CAAC,GAEYC,IAAW,MAAM;AAI7B,QAAMC,IAAU,CAACC,MACfJ,EAAM,QAAQA,EAAM,MAAM,OAAO,CAACK,MAAOA,EAAG,OAAOD,CAAE;AA+ChD,SAAA;AAAA,IACN,OA9Ca,CAACE,MAA8B;AACtC,YAAAF,IAAKG,IAAQ,GAAG;AAClB,UAAAC,GACAC,GACAC,GACAC,GACAC;AACJ,YAAMC,IAAiB;AAEnB,UAAA,OAAOP,KAAY;AACf,QAAAG,IAAAH;AAAA,WACD;AACN,YAAI,OAAOA,EAAQ,WAAY,YAAYA,EAAQ,WAAW;AACvD,gBAAA,IAAI,MAAM,mDAAmD;AAEpE,QAAAI,IAAOJ,EAAQ,MACfM,IAAYN,EAAQ,WACpBG,IAAOH,EAAQ,MACfK,IAAQL,EAAQ,OAChBE,IAAQF,EAAQ;AAAA,MACjB;AAUE,UATIN,EAAA,QAAQA,EAAM,MAAM,OAAO;AAAA,QAChC,MAAAU;AAAA,QACA,IAAAN;AAAA,QACA,WAAAQ;AAAA,QACA,MAAAH;AAAA,QACA,OAAAE;AAAA,QACA,OAAAH;AAAA,MAAA,CACA,GAEC,OAAOF,KAAY,YAAY,CAACA,EAAQ,cACzC,OAAOA,KAAY,UAClB;AACG,YAAAQ;AAEJ,QAAI,OAAOR,KAAY,YAAYA,EAAQ,UAC1CQ,IAAUR,EAAQ,UACFQ,IAAAD,GAEZE,EAAAD,CAAO,EAAE,KAAK,MAAM;AACxB,UAAAX,EAAQC,CAAE;AAAA,QAAA,CACV;AAAA,MACF;AACO,aAAAA;AAAA,IAAA;AAAA,IAIP,SAAAD;AAAA,IACA,YAjDkB,MAAOH,EAAM,QAAQ,CAAA;AAAA,EAiDvC;AAEF;"}