bitboss-ui 2.1.92 → 2.1.94

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 (297) hide show
  1. package/dist/components/BbTab/BbTab.vue.d.ts +130 -91
  2. package/dist/composables/useQuery.d.ts +15 -0
  3. package/dist/index.css +1 -1
  4. package/dist/index.d.ts +1 -0
  5. package/dist/index.js +133 -131
  6. package/dist/{index99.js → index100.js} +2 -2
  7. package/dist/{index101.js → index102.js} +2 -2
  8. package/dist/{index103.js → index104.js} +2 -2
  9. package/dist/index108.js +134 -168
  10. package/dist/index109.js +178 -0
  11. package/dist/index11.js +36 -38
  12. package/dist/{index110.js → index111.js} +2 -2
  13. package/dist/{index114.js → index115.js} +1 -1
  14. package/dist/{index116.js → index117.js} +2 -2
  15. package/dist/{index118.js → index119.js} +2 -2
  16. package/dist/index12.js +36 -179
  17. package/dist/index121.js +369 -0
  18. package/dist/{index122.js → index123.js} +15 -15
  19. package/dist/{index124.js → index125.js} +2 -2
  20. package/dist/{index126.js → index127.js} +2 -2
  21. package/dist/{index128.js → index129.js} +2 -2
  22. package/dist/index13.js +181 -124
  23. package/dist/{index130.js → index131.js} +2 -2
  24. package/dist/{index132.js → index133.js} +7 -7
  25. package/dist/{index134.js → index135.js} +1 -1
  26. package/dist/{index136.js → index137.js} +4 -4
  27. package/dist/index139.js +13 -11
  28. package/dist/index14.js +128 -0
  29. package/dist/index140.js +11 -2
  30. package/dist/index141.js +2 -419
  31. package/dist/index142.js +419 -9
  32. package/dist/index143.js +9 -25
  33. package/dist/index144.js +9 -2
  34. package/dist/index145.js +25 -5
  35. package/dist/index146.js +2 -6
  36. package/dist/index147.js +5 -5
  37. package/dist/index148.js +6 -3
  38. package/dist/index149.js +5 -3
  39. package/dist/index150.js +1 -1
  40. package/dist/index151.js +1 -1
  41. package/dist/index152.js +1 -1
  42. package/dist/index153.js +1 -1
  43. package/dist/index154.js +1 -1
  44. package/dist/index155.js +1 -1
  45. package/dist/index156.js +1 -1
  46. package/dist/index157.js +1 -1
  47. package/dist/index158.js +1 -1
  48. package/dist/index159.js +1 -1
  49. package/dist/{index15.js → index16.js} +8 -8
  50. package/dist/index160.js +1 -1
  51. package/dist/index161.js +1 -1
  52. package/dist/index162.js +1 -1
  53. package/dist/index163.js +1 -1
  54. package/dist/index164.js +1 -1
  55. package/dist/index165.js +1 -1
  56. package/dist/index166.js +1 -1
  57. package/dist/index167.js +1 -1
  58. package/dist/index168.js +1 -1
  59. package/dist/index169.js +1 -1
  60. package/dist/index170.js +1 -1
  61. package/dist/index171.js +1 -1
  62. package/dist/index172.js +1 -1
  63. package/dist/index173.js +1 -1
  64. package/dist/index174.js +1 -1
  65. package/dist/index175.js +1 -1
  66. package/dist/index176.js +1 -1
  67. package/dist/index177.js +1 -1
  68. package/dist/index178.js +1 -1
  69. package/dist/index179.js +3 -2
  70. package/dist/{index17.js → index18.js} +3 -3
  71. package/dist/index180.js +1 -1
  72. package/dist/index181.js +2 -3
  73. package/dist/index182.js +1 -1
  74. package/dist/index183.js +1 -1
  75. package/dist/index184.js +1 -1
  76. package/dist/index185.js +1 -1
  77. package/dist/index186.js +3 -2
  78. package/dist/index187.js +1 -1
  79. package/dist/index188.js +2 -3
  80. package/dist/index189.js +1 -1
  81. package/dist/index190.js +1 -1
  82. package/dist/index191.js +1 -1
  83. package/dist/index192.js +2 -2
  84. package/dist/index193.js +2 -2
  85. package/dist/index194.js +1 -1
  86. package/dist/index195.js +1 -1
  87. package/dist/index196.js +3 -2
  88. package/dist/index197.js +1 -1
  89. package/dist/index198.js +2 -3
  90. package/dist/index199.js +1 -1
  91. package/dist/{index19.js → index20.js} +9 -9
  92. package/dist/index200.js +1 -1
  93. package/dist/index201.js +1 -1
  94. package/dist/index202.js +1 -1
  95. package/dist/index203.js +1 -1
  96. package/dist/index204.js +1 -1
  97. package/dist/index205.js +1 -1
  98. package/dist/index206.js +1 -1
  99. package/dist/index207.js +1 -1
  100. package/dist/index208.js +1 -1
  101. package/dist/index209.js +1 -1
  102. package/dist/index210.js +1 -1
  103. package/dist/index211.js +1 -1
  104. package/dist/{index297.js → index212.js} +1 -1
  105. package/dist/index213.js +3 -7
  106. package/dist/index215.js +6 -137
  107. package/dist/index216.js +2 -2
  108. package/dist/index217.js +137 -32
  109. package/dist/index218.js +2 -28
  110. package/dist/index219.js +7 -0
  111. package/dist/{index21.js → index22.js} +15 -15
  112. package/dist/index220.js +7 -4
  113. package/dist/index221.js +2 -8
  114. package/dist/index222.js +2 -2
  115. package/dist/index223.js +2 -51
  116. package/dist/index224.js +6 -16
  117. package/dist/index225.js +2 -106
  118. package/dist/index226.js +9 -0
  119. package/dist/index227.js +5 -100
  120. package/dist/index228.js +7 -0
  121. package/dist/index229.js +5 -3
  122. package/dist/index230.js +5 -13
  123. package/dist/index231.js +3 -13
  124. package/dist/index232.js +5 -12
  125. package/dist/index233.js +8 -3
  126. package/dist/index234.js +268 -9
  127. package/dist/index235.js +50 -186
  128. package/dist/index236.js +52 -3
  129. package/dist/index237.js +32 -3
  130. package/dist/index238.js +59 -17
  131. package/dist/index239.js +13 -12
  132. package/dist/{index23.js → index24.js} +14 -14
  133. package/dist/index240.js +48 -12
  134. package/dist/index241.js +16 -11
  135. package/dist/index242.js +105 -28
  136. package/dist/index244.js +100 -4
  137. package/dist/index246.js +5 -0
  138. package/dist/index247.js +2 -229
  139. package/dist/index248.js +3 -2
  140. package/dist/index249.js +10 -86
  141. package/dist/index250.js +5 -0
  142. package/dist/index251.js +4 -2
  143. package/dist/index252.js +5 -3
  144. package/dist/index253.js +4 -10
  145. package/dist/index254.js +9 -3
  146. package/dist/index255.js +29 -4
  147. package/dist/index256.js +16 -5
  148. package/dist/index257.js +12 -5
  149. package/dist/index258.js +53 -5
  150. package/dist/index259.js +13 -5
  151. package/dist/{index25.js → index26.js} +4 -4
  152. package/dist/index260.js +12 -5
  153. package/dist/index261.js +2 -8
  154. package/dist/index262.js +59 -260
  155. package/dist/index263.js +33 -52
  156. package/dist/index264.js +26 -50
  157. package/dist/index266.js +187 -59
  158. package/dist/index267.js +3 -5
  159. package/dist/index268.js +3 -5
  160. package/dist/index269.js +33 -5
  161. package/dist/index270.js +8 -2
  162. package/dist/index271.js +5 -20
  163. package/dist/index272.js +5 -7
  164. package/dist/index273.js +5 -2
  165. package/dist/index274.js +19 -33
  166. package/dist/index275.js +135 -9
  167. package/dist/index277.js +86 -5
  168. package/dist/index279.js +15 -201
  169. package/dist/{index27.js → index28.js} +2 -2
  170. package/dist/index280.js +11 -0
  171. package/dist/index281.js +23 -9
  172. package/dist/index282.js +23 -23
  173. package/dist/index283.js +8 -22
  174. package/dist/index284.js +4 -6
  175. package/dist/index285.js +199 -14
  176. package/dist/index287.js +34 -2
  177. package/dist/index288.js +6 -6
  178. package/dist/index289.js +18 -7
  179. package/dist/index290.js +12 -9
  180. package/dist/index291.js +228 -7
  181. package/dist/index292.js +3 -67
  182. package/dist/index293.js +11 -53
  183. package/dist/index294.js +8 -0
  184. package/dist/index295.js +16 -3
  185. package/dist/index296.js +2 -2
  186. package/dist/index298.js +1 -1
  187. package/dist/index299.js +280 -17
  188. package/dist/{index29.js → index30.js} +6 -6
  189. package/dist/index300.js +2 -4
  190. package/dist/index301.js +16 -5
  191. package/dist/index302.js +2 -3
  192. package/dist/index303.js +15 -27
  193. package/dist/index304.js +2 -3
  194. package/dist/index305.js +27 -2
  195. package/dist/index306.js +2 -280
  196. package/dist/index307.js +2 -2
  197. package/dist/index308.js +2 -16
  198. package/dist/index309.js +2 -2
  199. package/dist/index310.js +2 -16
  200. package/dist/index311.js +28 -2
  201. package/dist/index312.js +2 -27
  202. package/dist/index313.js +3 -2
  203. package/dist/index315.js +4 -2
  204. package/dist/index316.js +17 -2
  205. package/dist/index317.js +3 -2
  206. package/dist/index318.js +3 -2
  207. package/dist/index319.js +125 -2
  208. package/dist/{index31.js → index32.js} +2 -2
  209. package/dist/index320.js +2 -5
  210. package/dist/index321.js +15 -3
  211. package/dist/index322.js +2 -125
  212. package/dist/index323.js +19 -2
  213. package/dist/index324.js +2 -15
  214. package/dist/index325.js +3 -2
  215. package/dist/index326.js +3 -19
  216. package/dist/index327.js +5 -2
  217. package/dist/index328.js +2 -719
  218. package/dist/index329.js +4 -366
  219. package/dist/index330.js +5 -57
  220. package/dist/index331.js +6 -2
  221. package/dist/index332.js +2 -58
  222. package/dist/index333.js +33 -33
  223. package/dist/index334.js +57 -227
  224. package/dist/index335.js +719 -6
  225. package/dist/index336.js +366 -35
  226. package/dist/index337.js +57 -6
  227. package/dist/index338.js +6 -128
  228. package/dist/index339.js +16 -395
  229. package/dist/{index33.js → index34.js} +9 -9
  230. package/dist/index340.js +7 -45
  231. package/dist/index341.js +14 -3
  232. package/dist/index342.js +5 -7
  233. package/dist/index343.js +5 -17
  234. package/dist/index344.js +34 -8
  235. package/dist/index345.js +6 -15
  236. package/dist/index346.js +129 -5
  237. package/dist/index347.js +397 -6
  238. package/dist/index351.js +221 -86
  239. package/dist/index352.js +21 -133
  240. package/dist/index354.js +133 -21
  241. package/dist/index355.js +49 -0
  242. package/dist/index356.js +87 -435
  243. package/dist/index357.js +427 -114
  244. package/dist/index358.js +126 -48
  245. package/dist/{index353.js → index359.js} +1 -1
  246. package/dist/{index35.js → index36.js} +5 -5
  247. package/dist/index360.js +52 -0
  248. package/dist/{index37.js → index38.js} +24 -24
  249. package/dist/{index39.js → index40.js} +8 -8
  250. package/dist/{index41.js → index42.js} +2 -2
  251. package/dist/{index43.js → index44.js} +9 -9
  252. package/dist/{index45.js → index46.js} +9 -9
  253. package/dist/{index47.js → index48.js} +4 -4
  254. package/dist/{index49.js → index50.js} +4 -4
  255. package/dist/{index51.js → index52.js} +2 -2
  256. package/dist/{index53.js → index54.js} +3 -3
  257. package/dist/{index55.js → index56.js} +2 -2
  258. package/dist/{index57.js → index58.js} +2 -2
  259. package/dist/{index59.js → index60.js} +1 -1
  260. package/dist/{index61.js → index62.js} +9 -9
  261. package/dist/{index63.js → index64.js} +2 -2
  262. package/dist/{index65.js → index66.js} +2 -2
  263. package/dist/{index67.js → index68.js} +1 -1
  264. package/dist/index7.js +2 -2
  265. package/dist/{index71.js → index72.js} +2 -2
  266. package/dist/{index73.js → index74.js} +3 -3
  267. package/dist/index76.js +17 -123
  268. package/dist/index77.js +127 -0
  269. package/dist/{index78.js → index79.js} +1 -1
  270. package/dist/{index80.js → index81.js} +10 -10
  271. package/dist/{index82.js → index83.js} +5 -5
  272. package/dist/{index84.js → index85.js} +3 -3
  273. package/dist/{index86.js → index87.js} +3 -3
  274. package/dist/index89.js +37 -125
  275. package/dist/index9.js +1 -1
  276. package/dist/index90.js +134 -0
  277. package/dist/{index91.js → index92.js} +4 -4
  278. package/dist/{index93.js → index94.js} +4 -4
  279. package/dist/{index95.js → index96.js} +7 -7
  280. package/dist/{index97.js → index98.js} +2 -2
  281. package/dist/utilities/functions/merge.d.ts +11 -1
  282. package/package.json +11 -3
  283. package/dist/index107.js +0 -144
  284. package/dist/index120.js +0 -301
  285. package/dist/index138.js +0 -15
  286. package/dist/index214.js +0 -4
  287. package/dist/index243.js +0 -18
  288. package/dist/index245.js +0 -137
  289. package/dist/index265.js +0 -34
  290. package/dist/index276.js +0 -5
  291. package/dist/index278.js +0 -6
  292. package/dist/index286.js +0 -13
  293. package/dist/index75.js +0 -21
  294. package/dist/index88.js +0 -46
  295. /package/dist/{index105.js → index106.js} +0 -0
  296. /package/dist/{index112.js → index113.js} +0 -0
  297. /package/dist/{index69.js → index70.js} +0 -0
package/dist/index12.js CHANGED
@@ -1,185 +1,42 @@
1
- import { copy as Y } from "./index143.js";
2
- import { reactive as D, watch as f, toValue as G, computed as d, provide as H } from "vue";
3
- import { isNotNil as a } from "./index144.js";
4
- import { mapValues as Q } from "./index145.js";
5
- import { useRoute as X } from "./index146.js";
6
- import { useRouter as Z } from "./index147.js";
7
- import { useStepper as _ } from "./index141.js";
8
- const ee = Symbol(), k = /((step\/)(?<step>[\s\S]+?)(?=[/?]))|((step\/)(?<step2>[\s\S]+))/, N = (i) => {
9
- const s = i.match(k);
10
- return s?.groups?.step ?? s?.groups?.step2 ?? null;
11
- }, ue = (i) => {
12
- if (!i.name)
13
- throw new Error(
14
- "You need to provide a unique name for the current wizard instance to be used to save data"
15
- );
16
- const s = X(), n = Z(), y = i.useNavigation ?? !0, S = i.navigationMode ?? "query", h = i.persist ?? !0;
17
- if (y && (!s.value || !n))
18
- throw new Error(
19
- "Navigation is enabled but could not retrieve the router instance in useWizard."
20
- );
21
- const V = Y(i.initialState), u = D(
22
- h && sessionStorage.getItem(i.name) ? {
23
- ...V,
24
- ...JSON.parse(sessionStorage.getItem(i.name))
25
- } : V
26
- );
27
- h && f(u, () => {
28
- sessionStorage.setItem(i.name, JSON.stringify(u));
29
- });
30
- const O = G(i.steps), r = d(
31
- () => Object.entries(O).reduce(
32
- (e, [t, o]) => (o.condition && !o.condition(u) || (e[t] = { ...o, key: t }), e),
33
- {}
34
- )
35
- ), m = d(
36
- () => Q(
37
- r.value,
38
- (e) => typeof e.isValid == "function" ? {
39
- ...e,
40
- isValid: e.isValid(u)
41
- } : {
42
- ...e,
43
- isValid: e.isValid ?? !0
1
+ import { nanoid as p } from "./index144.js";
2
+ import { reactive as d } from "vue";
3
+ import { wait as h } from "./index141.js";
4
+ const i = d({
5
+ stack: []
6
+ }), b = () => {
7
+ const n = (t) => i.stack = i.stack.filter((o) => o.id !== t);
8
+ return {
9
+ toast: (t) => {
10
+ const o = p();
11
+ let c, e, l, 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
+ l = t.icon, f = t.showClose, e = t.text, s = t.theme, c = t.title;
44
19
  }
45
- )
46
- );
47
- let l = null;
48
- if (y && a(s.value)) {
49
- let e = null;
50
- if (S === "query")
51
- s.value.query.step && (e = s.value.query.step);
52
- else {
53
- const t = N(s.value.fullPath);
54
- t && (e = t);
55
- }
56
- l = e;
57
- }
58
- if (l)
59
- for (const e in r.value) {
60
- if (e === l) break;
61
- const t = m.value[e];
62
- if (!t || !t.isValid) {
63
- l = null;
64
- break;
20
+ if (i.stack = i.stack.concat({
21
+ icon: l,
22
+ id: o,
23
+ showClose: f,
24
+ text: e,
25
+ theme: s,
26
+ title: c
27
+ }), typeof t == "object" && !t.persistent || typeof t == "string") {
28
+ let r;
29
+ typeof t == "object" && t.timeout ? r = t.timeout : r = u, h(r).then(() => {
30
+ n(o);
31
+ });
65
32
  }
66
- }
67
- const {
68
- steps: q,
69
- current: x,
70
- goToNext: w,
71
- goToPrevious: P,
72
- goTo: v,
73
- index: j,
74
- at: A,
75
- get: K,
76
- goBackTo: z,
77
- isAfter: F,
78
- isBefore: I,
79
- isCurrent: M,
80
- isFirst: U,
81
- isLast: B,
82
- isNext: C,
83
- isPrevious: E,
84
- next: J,
85
- previous: R,
86
- stepNames: W
87
- } = _(
88
- m,
89
- l || Object.values(r.value)[0].key
90
- ), c = d(() => Object.keys(r.value)[j.value]), b = {
91
- at: A,
92
- current: x,
93
- data: u,
94
- get: K,
95
- goBackTo: z,
96
- goTo: v,
97
- goToNext: w,
98
- goToPrevious: P,
99
- isAfter: F,
100
- isBefore: I,
101
- isCurrent: M,
102
- isFirst: U,
103
- isLast: B,
104
- isNext: C,
105
- isPrevious: E,
106
- key: c,
107
- next: J,
108
- previous: R,
109
- stepNames: W,
110
- steps: q
33
+ return o;
34
+ },
35
+ dismiss: n,
36
+ dismissAll: () => i.stack = []
111
37
  };
112
- if (H(ee, b), y)
113
- if (S === "query")
114
- f(
115
- c,
116
- () => {
117
- a(n) && a(s.value) && n.push({
118
- ...s,
119
- query: { ...s.value.query, step: c.value ?? null }
120
- });
121
- },
122
- { immediate: !0 }
123
- ), f(
124
- () => s.value?.query.step,
125
- (e) => {
126
- if (e) {
127
- const t = e;
128
- if (t in r.value) {
129
- const o = t, p = Object.keys(r.value);
130
- p.slice(
131
- 0,
132
- p.indexOf(o)
133
- ).every(
134
- (T) => m.value[T]?.isValid
135
- ) && v(o);
136
- }
137
- } else {
138
- const t = Object.keys(q)[0];
139
- v(t);
140
- }
141
- }
142
- );
143
- else {
144
- const e = d(() => {
145
- if (a(s.value))
146
- return N(s.value.fullPath);
147
- });
148
- f(
149
- c,
150
- (t) => {
151
- a(s.value) && a(n) && t && (s.value.path.includes("step") ? n.push({
152
- query: s.value.query,
153
- path: s.value.path.replace(k, `step/${t}`)
154
- }) : n.push({
155
- query: s.value.query,
156
- // Normalizes paths with / and without
157
- path: (s.value.path + `/step/${t}`).replace("//", "/"),
158
- replace: !0
159
- }));
160
- },
161
- { immediate: !0 }
162
- ), f(
163
- () => e.value,
164
- (t) => {
165
- if (t && t !== c.value) {
166
- const o = t;
167
- if (o in r.value) {
168
- const p = o, g = Object.keys(r.value);
169
- g.slice(
170
- 0,
171
- g.indexOf(p)
172
- ).every(
173
- (L) => r.value[L]?.isValid
174
- ) && v(p);
175
- }
176
- }
177
- }
178
- );
179
- }
180
- return b;
181
38
  };
182
39
  export {
183
- ue as useWizard,
184
- ee as wizardInjectionKey
40
+ i as state,
41
+ b as useToast
185
42
  };
@@ -0,0 +1,369 @@
1
+ import { defineComponent as fe, ref as r, computed as f, getCurrentInstance as be, watch as b, nextTick as J, onMounted as me, createElementBlock as y, openBlock as u, normalizeClass as S, unref as he, createElementVNode as m, renderSlot as g, normalizeProps as X, guardReactiveProps as Y, normalizeStyle as ve, Fragment as M, renderList as Q, createVNode as pe, withCtx as T, toDisplayString as ye, createBlock as U, resolveDynamicComponent as ge, Transition as ke, createCommentVNode as _e } from "vue";
2
+ import { useId as Se } from "./index8.js";
3
+ import { useRoute as we } from "./index148.js";
4
+ import { useRouter as xe } from "./index149.js";
5
+ import { useScroll as $e, useResizeObserver as Ie } from "./index142.js";
6
+ import Ce from "./index14.js";
7
+ /* empty css */
8
+ import Be from "./index113.js";
9
+ /* empty css */
10
+ import { useFrameworkDetection as Te } from "./index143.js";
11
+ import { merge as qe } from "./index269.js";
12
+ import { isNil as Le } from "./index223.js";
13
+ import { useQuery as Fe } from "./index11.js";
14
+ import { hash as Ee } from "./index231.js";
15
+ import "@inertiajs/vue3";
16
+ import { isNotNil as Ne } from "./index146.js";
17
+ import { useLogger as Pe } from "./index233.js";
18
+ const Ve = ["id"], Re = { class: "bb-tab__label-boundary" }, Ke = { class: "bb-tab__label" }, De = { class: "bb-tab__panes-container" }, We = ["id", "aria-labelledby", "tabindex"], it = /* @__PURE__ */ fe({
19
+ __name: "BbTab",
20
+ props: {
21
+ disabled: { type: Boolean },
22
+ eager: { type: Boolean },
23
+ id: {},
24
+ headers: {},
25
+ only: {},
26
+ onBefore: {},
27
+ onCancel: {},
28
+ onFinish: {},
29
+ onError: {},
30
+ onProgress: {},
31
+ onStart: {},
32
+ onSuccess: {},
33
+ preserveScroll: { type: [Boolean, Function] },
34
+ preserveState: { type: [Boolean, Function, null] },
35
+ replace: { type: Boolean },
36
+ animateX: { type: Boolean, default: !0 },
37
+ animateY: { type: Boolean, default: !0 },
38
+ direction: { default: "horizontal" },
39
+ items: {},
40
+ modelValue: {},
41
+ navigation: { type: Boolean },
42
+ querykey: { default: "tab" },
43
+ server: { type: Boolean }
44
+ },
45
+ emits: ["update:modelValue"],
46
+ setup(G, { expose: Z, emit: ee }) {
47
+ const t = G, te = ee, w = we(), q = xe(), { error: L } = Pe(), ne = r(), F = t.id ?? Se().id.value, x = `bb-tab_${F}`, i = r(), { isScrolling: se, arrivedState: E } = $e(i), N = f(() => ({
48
+ isScrolling: se.value,
49
+ left: E.left,
50
+ right: E.right
51
+ })), { isInertia: le } = Te(), oe = be(), a = r(null), c = f(
52
+ () => t.items.findIndex((e) => e.key === a.value)
53
+ ), k = f(() => c.value === 0), _ = f(() => c.value === t.items.length - 1);
54
+ t.items.forEach((e) => {
55
+ e.key ? (t.server || e.server) && !t.navigation && L(
56
+ `A tab item has a server property but the navigation prop is false: ${JSON.stringify(e, null, 2)}`
57
+ ) : L(`A tab item has no key: ${JSON.stringify(e, null, 2)}`);
58
+ });
59
+ const P = f(() => [Fe()[t.querykey]].flat()[0]), V = () => {
60
+ const e = P.value;
61
+ if (t.navigation && e)
62
+ a.value = e;
63
+ else if (t.modelValue)
64
+ a.value = t.modelValue;
65
+ else if (t.items[0]) {
66
+ const s = t.items.find((o) => !o.disabled);
67
+ if (!s)
68
+ throw new Error(
69
+ "No tab has been selected so it defaulted to the first available. Still, all the tabs are disabled so no tab can be selected."
70
+ );
71
+ const n = s.key;
72
+ a.value = n;
73
+ }
74
+ };
75
+ V();
76
+ const ae = (e) => ({
77
+ headers: e.headers ?? t.headers,
78
+ only: e.only ?? t.only,
79
+ preserveScroll: e.preserveScroll ?? t.preserveScroll,
80
+ preserveState: e.preserveState ?? t.preserveState,
81
+ replace: t.replace,
82
+ onBefore: e.onBefore ?? t.onBefore,
83
+ onStart: e.onStart ?? t.onStart,
84
+ onProgress: e.onProgress ?? t.onProgress,
85
+ onSuccess: e.onSuccess ?? t.onSuccess,
86
+ onError: e.onError ?? t.onError,
87
+ onCancel: e.onCancel ?? t.onCancel,
88
+ onFinish: e.onFinish ?? t.onFinish
89
+ }), R = f(() => {
90
+ const e = a.value, s = c.value;
91
+ return t.items.map((o) => {
92
+ const { key: l, label: v, eager: I } = o, C = `${x}_tab_${o.key}`, j = `${x}_tabpanel_${o.key}`, B = `label-${o.key}`, p = o.key === a.value, ie = {
93
+ "bb-tab__btn": !0,
94
+ "bb-tab__btn--active": p
95
+ }, ce = {
96
+ "bb-tab__pane": !0,
97
+ "bb-tab__pane--shown": p
98
+ }, de = !!(o.disabled || t.disabled);
99
+ return {
100
+ tabId: C,
101
+ eager: I,
102
+ panelId: j,
103
+ active: p,
104
+ ariaSelected: !!p,
105
+ labelSlotName: B,
106
+ tabClasses: ie,
107
+ paneClasses: ce,
108
+ role: "tab",
109
+ tabindex: p ? 0 : -1,
110
+ disabled: de,
111
+ current: e,
112
+ key: l,
113
+ label: v,
114
+ currentIndex: s,
115
+ onClick: () => h(o.key),
116
+ onKeydown: (ue) => re(ue)
117
+ };
118
+ });
119
+ }), h = (e, s = t.replace) => {
120
+ const n = t.items.find((o) => o.key === e);
121
+ if (!Le(n) && n.key !== a.value) {
122
+ if (t.navigation && w.value && P.value !== e) {
123
+ if (!q) return;
124
+ q[s ? "replace" : "push"](
125
+ qe(w.value, {
126
+ query: { [t.querykey]: e },
127
+ replace: s
128
+ })
129
+ );
130
+ } else if (t.navigation && le) {
131
+ const o = n.href ?? globalThis.location.href, l = new URL(o, window.location.origin);
132
+ if (l.searchParams.set(t.querykey, e), t.server || n.server) {
133
+ const v = oe?.proxy?.$inertia, I = ae(n), C = Object.fromEntries(
134
+ Object.entries(I).filter(([j, B]) => Ne(B))
135
+ );
136
+ v.visit(l.toString(), C);
137
+ } else
138
+ s ? window.history.replaceState(window.history.state, "", l.toString()) : window.history.pushState(window.history.state, "", l.toString());
139
+ }
140
+ t.modelValue !== e && te("update:modelValue", e), a.value = e;
141
+ }
142
+ };
143
+ a.value && h(a.value, !0);
144
+ const d = (e) => {
145
+ var s = null;
146
+ switch (e) {
147
+ case "first":
148
+ for (s = 0; s < t.items.length - 1 && t.items[s].disabled; )
149
+ s++;
150
+ break;
151
+ case "previous": {
152
+ let l = 1;
153
+ for (; l < t.items.length && (s = (c.value + t.items.length - l) % t.items.length, t.items[s].disabled); )
154
+ l++;
155
+ break;
156
+ }
157
+ case "next": {
158
+ let l = 1;
159
+ for (; l < t.items.length && (s = (c.value + l) % t.items.length, t.items[s].disabled); )
160
+ l++;
161
+ break;
162
+ }
163
+ case "last":
164
+ for (s = t.items.length - 1; s >= 0 && t.items[s].disabled; )
165
+ s--;
166
+ break;
167
+ }
168
+ if (s === null)
169
+ throw new Error("Could not navigate to next tab");
170
+ if (t.items[s].disabled) return;
171
+ const n = t.items[s].key;
172
+ document.querySelector(
173
+ `#${x}_tab_${n}`
174
+ )?.focus(), h(n);
175
+ }, re = (e) => {
176
+ if (!t.disabled)
177
+ if (e.key === "ArrowRight")
178
+ d("next");
179
+ else if (e.key === "ArrowLeft")
180
+ d("previous");
181
+ else if (e.key === "Home")
182
+ e.preventDefault(), d("first");
183
+ else if (e.key === "End")
184
+ e.preventDefault(), d("last");
185
+ else
186
+ return;
187
+ };
188
+ b(
189
+ () => t.modelValue,
190
+ (e) => {
191
+ e && h(e);
192
+ }
193
+ ), b(
194
+ () => w.value?.query?.[t.querykey],
195
+ (e) => {
196
+ e && typeof e == "string" && h(e);
197
+ }
198
+ ), b(
199
+ a,
200
+ async () => {
201
+ if (!i.value) return;
202
+ const e = i.value.querySelector(
203
+ ".bb-tab__btn--active"
204
+ );
205
+ if (!e) return;
206
+ await J();
207
+ const s = i.value, n = e.offsetLeft, o = n + e.offsetWidth, l = s.scrollLeft, v = l + s.clientWidth;
208
+ n < l ? s.scrollTo({ left: n, behavior: "smooth" }) : o > v && s.scrollTo({
209
+ left: o - s.clientWidth,
210
+ behavior: "smooth"
211
+ });
212
+ },
213
+ { flush: "post" }
214
+ );
215
+ const K = r("right");
216
+ b(
217
+ a,
218
+ (e, s) => {
219
+ if (e && s) {
220
+ const n = t.items.findIndex((l) => l.key === e), o = t.items.findIndex((l) => l.key === s);
221
+ K.value = n > o ? "right" : "left";
222
+ }
223
+ },
224
+ { flush: "sync" }
225
+ );
226
+ const D = r(0), W = r(0), O = r(0), z = r(0), A = r(0), H = r(!1), $ = () => {
227
+ if (!i.value)
228
+ return;
229
+ const e = i.value.querySelector(
230
+ ".bb-tab__btn--active"
231
+ );
232
+ e && (O.value = e.offsetLeft, z.value = e.offsetTop, D.value = e.clientWidth, W.value = e.clientHeight, A.value = i.value.scrollWidth);
233
+ };
234
+ return me(async () => {
235
+ $(), await J(), H.value = !0;
236
+ }), b(a, $, { flush: "post" }), Ie(i, () => {
237
+ $();
238
+ }), b(
239
+ () => Ee(t.items),
240
+ () => {
241
+ a.value && !t.items.find((e) => e.key === a.value) && V();
242
+ },
243
+ {
244
+ immediate: !0,
245
+ deep: !0
246
+ }
247
+ ), Z({
248
+ isFirst: k,
249
+ isLast: _,
250
+ current: a,
251
+ currentIndex: c,
252
+ goTo: d
253
+ }), (e, s) => (u(), y("div", {
254
+ id: he(F),
255
+ ref_key: "tabs",
256
+ ref: ne,
257
+ class: S(["bb-tab", {
258
+ [`bb-tab--${e.direction}`]: !0,
259
+ "bb-tab--disabled": e.disabled
260
+ }])
261
+ }, [
262
+ m("div", Re, [
263
+ m("span", null, [
264
+ g(e.$slots, "header:prepend", X(Y(N.value)))
265
+ ]),
266
+ m("ul", {
267
+ ref_key: "tablist",
268
+ ref: i,
269
+ class: S(["bb-tab__label-container", { "bb-tab__label-container--no-transition": !H.value }]),
270
+ role: "tablist",
271
+ style: ve({
272
+ "--inner-width": `${A.value}px`,
273
+ "--width": `${D.value}px`,
274
+ "--height": `${W.value}px`,
275
+ "--left": `${O.value}px`,
276
+ "--top": `${z.value}px`
277
+ })
278
+ }, [
279
+ (u(!0), y(M, null, Q(R.value, (n) => (u(), y("li", {
280
+ key: n.tabId,
281
+ role: "presentation"
282
+ }, [
283
+ pe(Ce, {
284
+ id: n.tabId,
285
+ "aria-selected": n.ariaSelected,
286
+ class: S(n.tabClasses),
287
+ disabled: n.disabled,
288
+ role: "tab",
289
+ tabindex: n.tabindex,
290
+ onClick: n.onClick,
291
+ onKeydown: n.onKeydown
292
+ }, {
293
+ default: T(() => [
294
+ g(e.$slots, n.labelSlotName, {
295
+ current: a.value,
296
+ currentIndex: c.value,
297
+ disabled: n.disabled,
298
+ goTo: d,
299
+ isFirst: k.value,
300
+ isLast: _.value,
301
+ selected: n.active,
302
+ text: n.label,
303
+ value: n.key
304
+ }, () => [
305
+ g(e.$slots, "label", {
306
+ current: a.value,
307
+ currentIndex: c.value,
308
+ disabled: n.disabled,
309
+ goTo: d,
310
+ isFirst: k.value,
311
+ isLast: _.value,
312
+ selected: n.active,
313
+ text: n.label,
314
+ value: n.key
315
+ }, () => [
316
+ m("span", Ke, ye(n.label), 1)
317
+ ])
318
+ ])
319
+ ]),
320
+ _: 2
321
+ }, 1032, ["id", "aria-selected", "class", "disabled", "tabindex", "onClick", "onKeydown"])
322
+ ]))), 128))
323
+ ], 6),
324
+ m("span", null, [
325
+ g(e.$slots, "header:append", X(Y(N.value)))
326
+ ])
327
+ ]),
328
+ m("div", De, [
329
+ (u(), U(ge(t.animateY ? Be : "div"), null, {
330
+ default: T(() => [
331
+ (u(!0), y(M, null, Q(R.value, (n) => (u(), U(ke, {
332
+ key: n.tabId,
333
+ css: t.animateX,
334
+ name: `tab-slide-${K.value}`
335
+ }, {
336
+ default: T(() => [
337
+ n.active || t.eager || n.eager ? (u(), y("section", {
338
+ key: 0,
339
+ id: n.panelId,
340
+ "aria-labelledby": n.tabId,
341
+ class: S(n.paneClasses),
342
+ role: "tabpanel",
343
+ tabindex: n.tabindex
344
+ }, [
345
+ g(e.$slots, n.key, {
346
+ current: a.value,
347
+ currentIndex: c.value,
348
+ disabled: n.disabled,
349
+ goTo: d,
350
+ isFirst: k.value,
351
+ isLast: _.value,
352
+ selected: n.active,
353
+ text: n.label,
354
+ value: n.key
355
+ })
356
+ ], 10, We)) : _e("", !0)
357
+ ]),
358
+ _: 2
359
+ }, 1032, ["css", "name"]))), 128))
360
+ ]),
361
+ _: 3
362
+ }))
363
+ ])
364
+ ], 10, Ve));
365
+ }
366
+ });
367
+ export {
368
+ it as default
369
+ };
@@ -1,22 +1,22 @@
1
1
  import { defineComponent as he, mergeModels as X, ref as ke, computed as u, toRef as O, useModel as Y, watch as M, reactive as ge, createBlock as Z, openBlock as s, resolveDynamicComponent as xe, normalizeClass as i, withCtx as we, createElementBlock as o, createCommentVNode as p, createElementVNode as n, toDisplayString as m, renderSlot as c, unref as v, Fragment as k, renderList as x, normalizeStyle as H, createVNode as ee, createTextVNode as Ce, mergeProps as Ie } from "vue";
2
- import { clamp as Ve } from "./index214.js";
3
- import { hash as T } from "./index237.js";
4
- import { isNil as w } from "./index273.js";
5
- import { when as $e } from "./index244.js";
2
+ import { clamp as Ve } from "./index216.js";
3
+ import { hash as T } from "./index231.js";
4
+ import { isNil as w } from "./index223.js";
5
+ import { when as $e } from "./index253.js";
6
6
  import { useId as Be } from "./index8.js";
7
- import { useItemValue as He } from "./index290.js";
8
- import { useItemsGetter as Te } from "./index242.js";
9
- import { usePrefill as Ae } from "./index243.js";
10
- import { useIndexById as le } from "./index224.js";
11
- import { useBaseOptions as Ne } from "./index223.js";
12
- import { useHashedWatcher as Le } from "./index241.js";
13
- import { useLocale as De } from "./index231.js";
14
- import ae from "./index17.js";
7
+ import { useItemValue as He } from "./index254.js";
8
+ import { useItemsGetter as Te } from "./index255.js";
9
+ import { usePrefill as Ae } from "./index256.js";
10
+ import { useIndexById as le } from "./index241.js";
11
+ import { useBaseOptions as Ne } from "./index240.js";
12
+ import { useHashedWatcher as Le } from "./index257.js";
13
+ import { useLocale as De } from "./index239.js";
14
+ import ae from "./index18.js";
15
15
  /* empty css */
16
- import Ee from "./index31.js";
16
+ import Ee from "./index32.js";
17
17
  /* empty css */
18
- import { columnKeyToSlotName as Pe, mergeHeaderClasses as Se, applyFixedTableColumns as Re, mergeCellClasses as Oe } from "./index293.js";
19
- import { useLogger as Me } from "./index261.js";
18
+ import { columnKeyToSlotName as Pe, mergeHeaderClasses as Se, applyFixedTableColumns as Re, mergeCellClasses as Oe } from "./index258.js";
19
+ import { useLogger as Me } from "./index233.js";
20
20
  const Fe = {
21
21
  key: 0,
22
22
  class: "sr-only"
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as f, ref as y, computed as v, createBlock as B, openBlock as g, withCtx as l, createVNode as k, mergeProps as $, renderSlot as r, normalizeProps as n, guardReactiveProps as i } from "vue";
2
- import w from "./index27.js";
2
+ import w from "./index28.js";
3
3
  /* empty css */
4
- import V from "./index45.js";
4
+ import V from "./index46.js";
5
5
  /* empty css */
6
6
  const I = /* @__PURE__ */ f({
7
7
  __name: "BbTag",
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as f, ref as y, computed as w, createBlock as v, openBlock as B, withCtx as a, createVNode as g, mergeProps as $, renderSlot as r, normalizeProps as i, guardReactiveProps as d } from "vue";
2
- import k from "./index27.js";
2
+ import k from "./index28.js";
3
3
  /* empty css */
4
- import V from "./index47.js";
4
+ import V from "./index48.js";
5
5
  /* empty css */
6
6
  const G = /* @__PURE__ */ f({
7
7
  __name: "BbTextarea",
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as c, ref as b, computed as h, createBlock as y, openBlock as f, withCtx as a, createVNode as k, mergeProps as v, renderSlot as n, normalizeProps as B, guardReactiveProps as w } from "vue";
2
- import g from "./index27.js";
2
+ import g from "./index28.js";
3
3
  /* empty css */
4
- import $ from "./index49.js";
4
+ import $ from "./index50.js";
5
5
  /* empty css */
6
6
  const L = /* @__PURE__ */ c({
7
7
  __name: "BbTextInput",