bitboss-ui 2.0.2 → 2.0.4

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 (266) hide show
  1. package/dist/components/BaseDatePicker/BaseDatePicker.vue.d.ts +10 -99
  2. package/dist/components/BaseDatePicker/BaseDatePickerHeader.vue.d.ts +24 -0
  3. package/dist/components/BaseDatePicker/BaseDatePickerInputDaySelector.vue.d.ts +56 -0
  4. package/dist/components/BaseDatePicker/BaseDatePickerMonthSelector.vue.d.ts +21 -0
  5. package/dist/components/BaseDatePicker/BaseDatePickerYearSelector.vue.d.ts +21 -0
  6. package/dist/components/BaseDatePickerInput/BaseDatePickerInput.vue.d.ts +1 -46
  7. package/dist/components/BbDatePickerInput/BbDatePickerInput.vue.d.ts +1 -47
  8. package/dist/components/BbTab/BbTab.vue.d.ts +9 -0
  9. package/dist/components/Transitions/Slide.vue.d.ts +43 -0
  10. package/dist/components/Transitions/SlideBack.vue.d.ts +43 -0
  11. package/dist/composables/useLogger.d.ts +1 -0
  12. package/dist/index103.js +150 -126
  13. package/dist/index103.js.map +1 -1
  14. package/dist/index105.js +5 -5
  15. package/dist/index113.js +1 -1
  16. package/dist/index115.js +5 -5
  17. package/dist/index115.js.map +1 -1
  18. package/dist/index117.js +1 -1
  19. package/dist/index12.js +1 -1
  20. package/dist/index121.js +1 -1
  21. package/dist/index122.js +1 -1
  22. package/dist/index123.js +1 -1
  23. package/dist/index125.js +1 -1
  24. package/dist/index127.js +2 -2
  25. package/dist/index128.js +1 -1
  26. package/dist/index14.js +3 -3
  27. package/dist/index16.js +2 -2
  28. package/dist/index18.js +176 -482
  29. package/dist/index18.js.map +1 -1
  30. package/dist/index197.js +2 -81
  31. package/dist/index197.js.map +1 -1
  32. package/dist/index198.js +158 -2
  33. package/dist/index198.js.map +1 -1
  34. package/dist/index199.js +84 -158
  35. package/dist/index199.js.map +1 -1
  36. package/dist/index20.js +199 -190
  37. package/dist/index20.js.map +1 -1
  38. package/dist/index201.js +5 -0
  39. package/dist/index201.js.map +1 -0
  40. package/dist/index202.js +4 -3
  41. package/dist/index202.js.map +1 -1
  42. package/dist/index203.js +2 -35
  43. package/dist/index203.js.map +1 -1
  44. package/dist/index204.js +81 -6
  45. package/dist/index204.js.map +1 -1
  46. package/dist/index205.js +126 -7
  47. package/dist/index205.js.map +1 -1
  48. package/dist/index206.js +5 -5
  49. package/dist/index206.js.map +1 -1
  50. package/dist/index207.js +123 -5
  51. package/dist/index207.js.map +1 -1
  52. package/dist/index208.js +18 -15
  53. package/dist/index208.js.map +1 -1
  54. package/dist/index209.js +10 -10
  55. package/dist/index209.js.map +1 -1
  56. package/dist/index210.js +15 -18
  57. package/dist/index210.js.map +1 -1
  58. package/dist/index211.js +2 -19
  59. package/dist/index211.js.map +1 -1
  60. package/dist/index212.js +2 -27
  61. package/dist/index212.js.map +1 -1
  62. package/dist/index213.js +35 -8
  63. package/dist/index213.js.map +1 -1
  64. package/dist/index214.js +174 -2
  65. package/dist/index214.js.map +1 -1
  66. package/dist/index215.js +6 -2
  67. package/dist/index215.js.map +1 -1
  68. package/dist/index216.js +42 -4
  69. package/dist/index216.js.map +1 -1
  70. package/dist/index218.js +13 -3
  71. package/dist/index218.js.map +1 -1
  72. package/dist/index219.js +5 -126
  73. package/dist/index219.js.map +1 -1
  74. package/dist/index22.js +5 -5
  75. package/dist/index220.js +366 -120
  76. package/dist/index220.js.map +1 -1
  77. package/dist/index221.js +8 -2
  78. package/dist/index221.js.map +1 -1
  79. package/dist/index222.js +3 -174
  80. package/dist/index222.js.map +1 -1
  81. package/dist/index223.js +7 -42
  82. package/dist/index223.js.map +1 -1
  83. package/dist/index224.js +22 -0
  84. package/dist/index224.js.map +1 -0
  85. package/dist/index225.js +27 -13
  86. package/dist/index225.js.map +1 -1
  87. package/dist/index226.js +3 -369
  88. package/dist/index226.js.map +1 -1
  89. package/dist/index227.js +249 -3
  90. package/dist/index227.js.map +1 -1
  91. package/dist/index229.js +46 -100
  92. package/dist/index229.js.map +1 -1
  93. package/dist/index230.js +40 -0
  94. package/dist/index230.js.map +1 -0
  95. package/dist/index231.js +5 -100
  96. package/dist/index231.js.map +1 -1
  97. package/dist/index232.js +44 -0
  98. package/dist/index232.js.map +1 -0
  99. package/dist/index233.js +3 -2
  100. package/dist/index233.js.map +1 -1
  101. package/dist/index234.js +2 -3
  102. package/dist/index234.js.map +1 -1
  103. package/dist/index235.js +3 -10
  104. package/dist/index235.js.map +1 -1
  105. package/dist/index236.js +17 -2
  106. package/dist/index236.js.map +1 -1
  107. package/dist/index237.js +105 -2
  108. package/dist/index237.js.map +1 -1
  109. package/dist/index239.js +99 -8
  110. package/dist/index239.js.map +1 -1
  111. package/dist/index24.js +1 -1
  112. package/dist/index241.js +9 -16
  113. package/dist/index241.js.map +1 -1
  114. package/dist/index242.js +2 -430
  115. package/dist/index242.js.map +1 -1
  116. package/dist/index243.js +3 -88
  117. package/dist/index243.js.map +1 -1
  118. package/dist/index244.js +6 -200
  119. package/dist/index244.js.map +1 -1
  120. package/dist/index245.js +15 -8
  121. package/dist/index245.js.map +1 -1
  122. package/dist/index246.js +9 -23
  123. package/dist/index246.js.map +1 -1
  124. package/dist/index247.js +23 -6
  125. package/dist/index247.js.map +1 -1
  126. package/dist/index248.js +3 -16
  127. package/dist/index248.js.map +1 -1
  128. package/dist/index249.js +12 -9
  129. package/dist/index249.js.map +1 -1
  130. package/dist/index250.js +8 -280
  131. package/dist/index250.js.map +1 -1
  132. package/dist/index251.js +9 -6
  133. package/dist/index251.js.map +1 -1
  134. package/dist/index252.js +17 -2
  135. package/dist/index252.js.map +1 -1
  136. package/dist/index253.js +281 -2
  137. package/dist/index253.js.map +1 -1
  138. package/dist/index254.js +6 -2
  139. package/dist/index254.js.map +1 -1
  140. package/dist/index255.js +2 -2
  141. package/dist/index256.js +2 -2
  142. package/dist/index258.js +2 -4
  143. package/dist/index258.js.map +1 -1
  144. package/dist/index259.js +2 -224
  145. package/dist/index259.js.map +1 -1
  146. package/dist/index26.js +3 -3
  147. package/dist/index260.js +126 -3
  148. package/dist/index260.js.map +1 -1
  149. package/dist/index261.js +434 -0
  150. package/dist/index261.js.map +1 -0
  151. package/dist/index262.js +3 -7
  152. package/dist/index262.js.map +1 -1
  153. package/dist/index264.js +7 -69
  154. package/dist/index264.js.map +1 -1
  155. package/dist/index265.js +22 -5
  156. package/dist/index265.js.map +1 -1
  157. package/dist/index267.js +7 -124
  158. package/dist/index267.js.map +1 -1
  159. package/dist/index268.js +200 -3
  160. package/dist/index268.js.map +1 -1
  161. package/dist/index269.js +436 -3
  162. package/dist/index269.js.map +1 -1
  163. package/dist/index270.js +126 -210
  164. package/dist/index270.js.map +1 -1
  165. package/dist/index271.js +92 -0
  166. package/dist/index271.js.map +1 -0
  167. package/dist/index272.js +2 -436
  168. package/dist/index272.js.map +1 -1
  169. package/dist/index273.js +2 -127
  170. package/dist/index273.js.map +1 -1
  171. package/dist/index274.js +3 -28
  172. package/dist/index274.js.map +1 -1
  173. package/dist/index275.js +2 -15
  174. package/dist/index275.js.map +1 -1
  175. package/dist/index276.js +2 -11
  176. package/dist/index276.js.map +1 -1
  177. package/dist/index277.js +2 -4
  178. package/dist/index277.js.map +1 -1
  179. package/dist/index278.js +28 -4
  180. package/dist/index278.js.map +1 -1
  181. package/dist/index279.js +21 -58
  182. package/dist/index279.js.map +1 -1
  183. package/dist/index28.js +2 -2
  184. package/dist/index281.js +2 -2
  185. package/dist/index281.js.map +1 -1
  186. package/dist/index282.js +5 -47
  187. package/dist/index282.js.map +1 -1
  188. package/dist/index283.js +72 -0
  189. package/dist/index283.js.map +1 -0
  190. package/dist/index284.js +221 -418
  191. package/dist/index284.js.map +1 -1
  192. package/dist/index285.js +3 -47
  193. package/dist/index285.js.map +1 -1
  194. package/dist/index286.js +6 -0
  195. package/dist/index286.js.map +1 -0
  196. package/dist/index287.js +214 -0
  197. package/dist/index287.js.map +1 -0
  198. package/dist/index289.js +18 -0
  199. package/dist/index289.js.map +1 -0
  200. package/dist/index290.js +7 -0
  201. package/dist/index290.js.map +1 -0
  202. package/dist/index291.js +7 -0
  203. package/dist/index291.js.map +1 -0
  204. package/dist/index292.js +62 -0
  205. package/dist/index292.js.map +1 -0
  206. package/dist/index293.js +14 -0
  207. package/dist/index293.js.map +1 -0
  208. package/dist/{index280.js → index294.js} +2 -2
  209. package/dist/{index280.js.map → index294.js.map} +1 -1
  210. package/dist/index295.js +10 -0
  211. package/dist/index295.js.map +1 -0
  212. package/dist/index296.js +22 -0
  213. package/dist/index296.js.map +1 -0
  214. package/dist/index297.js +10 -0
  215. package/dist/index297.js.map +1 -0
  216. package/dist/index298.js +5 -0
  217. package/dist/index298.js.map +1 -0
  218. package/dist/index299.js +50 -0
  219. package/dist/index299.js.map +1 -0
  220. package/dist/index30.js +2 -2
  221. package/dist/index301.js +424 -0
  222. package/dist/index301.js.map +1 -0
  223. package/dist/index302.js +50 -0
  224. package/dist/index302.js.map +1 -0
  225. package/dist/index32.js +3 -3
  226. package/dist/index34.js +44 -42
  227. package/dist/index34.js.map +1 -1
  228. package/dist/index36.js +4 -4
  229. package/dist/index38.js +2 -2
  230. package/dist/index40.js +2 -2
  231. package/dist/index42.js +6 -6
  232. package/dist/index44.js +2 -2
  233. package/dist/index46.js +2 -2
  234. package/dist/index52.js +1 -1
  235. package/dist/index54.js +1 -1
  236. package/dist/index58.js +2 -2
  237. package/dist/index66.js +16 -23
  238. package/dist/index66.js.map +1 -1
  239. package/dist/index70.js +4 -4
  240. package/dist/index74.js +2 -2
  241. package/dist/index76.js +1 -1
  242. package/dist/index79.js +2 -2
  243. package/dist/index81.js +1 -1
  244. package/dist/index83.js +3 -3
  245. package/dist/index85.js +1 -1
  246. package/dist/style.css +1 -1
  247. package/dist/utilities/functions/chunk.d.ts +1 -0
  248. package/dist/utilities/functions/negative.d.ts +1 -0
  249. package/dist/utilities/functions/pipe.d.ts +3 -0
  250. package/dist/utilities/functions/range.d.ts +1 -0
  251. package/dist/utilities/functions/sort.d.ts +6 -0
  252. package/package.json +2 -2
  253. package/dist/index200.js +0 -87
  254. package/dist/index200.js.map +0 -1
  255. package/dist/index217.js +0 -5
  256. package/dist/index217.js.map +0 -1
  257. package/dist/index228.js +0 -21
  258. package/dist/index228.js.map +0 -1
  259. package/dist/index238.js +0 -15
  260. package/dist/index238.js.map +0 -1
  261. package/dist/index240.js +0 -12
  262. package/dist/index240.js.map +0 -1
  263. package/dist/index263.js +0 -5
  264. package/dist/index263.js.map +0 -1
  265. package/dist/index266.js +0 -5
  266. package/dist/index266.js.map +0 -1
package/dist/index103.js CHANGED
@@ -1,17 +1,20 @@
1
- import { defineComponent as M, ref as w, computed as k, getCurrentInstance as Q, watch as $, nextTick as W, openBlock as d, createElementBlock as c, unref as X, normalizeClass as q, createElementVNode as b, renderSlot as f, normalizeProps as U, guardReactiveProps as z, Fragment as S, renderList as D, createVNode as Y, withCtx as Z, toDisplayString as ee, createCommentVNode as le } from "vue";
2
- import { useId as ae } from "./index7.js";
3
- import { useRoute as te } from "./index131.js";
4
- import { useRouter as se } from "./index132.js";
5
- import { wait as ie } from "./index126.js";
6
- import { useScroll as re } from "./index127.js";
7
- import oe from "./index12.js";
1
+ import { defineComponent as X, ref as v, computed as p, getCurrentInstance as Y, watch as g, nextTick as Z, openBlock as d, createElementBlock as f, unref as ee, normalizeClass as q, createElementVNode as c, renderSlot as y, normalizeProps as U, guardReactiveProps as z, Fragment as K, renderList as H, createVNode as J, withCtx as S, toDisplayString as le, createBlock as te, Transition as ae, createCommentVNode as se } from "vue";
2
+ import { useId as ie } from "./index7.js";
3
+ import { useRoute as re } from "./index131.js";
4
+ import { useRouter as ne } from "./index132.js";
5
+ import { wait as oe } from "./index126.js";
6
+ import { useScroll as ue } from "./index127.js";
7
+ import de from "./index12.js";
8
8
  /* empty css */
9
- const ne = ["id"], ue = { class: "bb-tab__label-boundary" }, de = { class: "bb-tab__label" }, ce = { class: "bb-tab__panes-container" }, be = ["id", "aria-labelledby"], _e = /* @__PURE__ */ M({
9
+ import ce from "./index122.js";
10
+ /* empty css */
11
+ const be = ["id"], fe = { class: "bb-tab__label-boundary" }, ye = { class: "bb-tab__label" }, me = { class: "bb-tab__panes-container" }, he = ["id", "aria-labelledby"], xe = /* @__PURE__ */ X({
10
12
  __name: "BbTab",
11
13
  props: {
12
14
  disabled: { type: Boolean },
13
15
  eager: { type: Boolean },
14
16
  id: {},
17
+ animate: { type: Boolean, default: !0 },
15
18
  direction: { default: "horizontal" },
16
19
  items: {},
17
20
  modelValue: {},
@@ -20,84 +23,84 @@ const ne = ["id"], ue = { class: "bb-tab__label-boundary" }, de = { class: "bb-t
20
23
  replace: { type: Boolean }
21
24
  },
22
25
  emits: ["update:modelValue"],
23
- setup(K, { expose: H, emit: J }) {
24
- var C, R, B, E, P, F, N;
25
- const l = K, O = J, n = te(), p = se(), g = w(), T = l.id ?? ae().id.value, m = `bb-tab_${T}`, I = w(), { isScrolling: j, arrivedState: V } = re(I), x = k(() => ({
26
- isScrolling: j.value,
27
- left: V.left,
28
- right: V.right
29
- })), L = !!((R = (C = Q()) == null ? void 0 : C.proxy) != null && R.$inertia), s = w(null), r = k(
26
+ setup(O, { expose: j, emit: G }) {
27
+ var C, R, E, P, F, N, A;
28
+ const l = O, M = G, u = re(), _ = ne(), w = v(), T = l.id ?? ie().id.value, m = `bb-tab_${T}`, x = v(), { isScrolling: Q, arrivedState: I } = ue(x), V = p(() => ({
29
+ isScrolling: Q.value,
30
+ left: I.left,
31
+ right: I.right
32
+ })), L = !!((R = (C = Y()) == null ? void 0 : C.proxy) != null && R.$inertia), s = v(null), n = p(
30
33
  () => l.items.findIndex((e) => e.key === s.value)
31
- ), h = k(() => r.value === 0), v = k(() => r.value === l.items.length - 1);
34
+ ), h = p(() => n.value === 0), k = p(() => n.value === l.items.length - 1);
32
35
  if (l.items.forEach((e) => {
33
36
  if (!e.key)
34
37
  throw console.error("A tab item has no key", e), new Error("A tab item has no key " + JSON.stringify(e));
35
- }), l.navigation && ((E = (B = n.value) == null ? void 0 : B.query) != null && E[l.querykey]))
36
- s.value = (F = (P = n.value) == null ? void 0 : P.query) == null ? void 0 : F[l.querykey];
37
- else if (l.navigation && L && ((N = globalThis == null ? void 0 : globalThis.location) != null && N.href) && new URL(globalThis.location.href).searchParams.get(l.querykey))
38
+ }), l.navigation && ((P = (E = u.value) == null ? void 0 : E.query) != null && P[l.querykey]))
39
+ s.value = (N = (F = u.value) == null ? void 0 : F.query) == null ? void 0 : N[l.querykey];
40
+ else if (l.navigation && L && ((A = globalThis == null ? void 0 : globalThis.location) != null && A.href) && new URL(globalThis.location.href).searchParams.get(l.querykey))
38
41
  s.value = new URL(globalThis.location.href).searchParams.get(
39
42
  l.querykey
40
43
  );
41
44
  else if (l.modelValue)
42
45
  s.value = l.modelValue;
43
46
  else if (l.items[0]) {
44
- const e = l.items.find((a) => !a.disabled);
47
+ const e = l.items.find((t) => !t.disabled);
45
48
  if (!e)
46
49
  throw new Error(
47
50
  "No tab has been selected so it defaulted to the first available. Still, all the tabs are disabled so no tab can be selected."
48
51
  );
49
- const t = e.key;
50
- s.value = t;
52
+ const a = e.key;
53
+ s.value = a;
51
54
  }
52
- const y = async (e, t = !1) => {
53
- var a, u, i, A;
54
- if (l.navigation && n.value && ((u = (a = n.value) == null ? void 0 : a.query) == null ? void 0 : u[l.querykey]) !== e)
55
- p == null || p.push({
56
- ...n,
57
- query: { ...(i = n.value) == null ? void 0 : i.query, [l.querykey]: e },
58
- replace: t
55
+ const b = async (e, a = !1) => {
56
+ var t, r, i, D;
57
+ if (l.navigation && u.value && ((r = (t = u.value) == null ? void 0 : t.query) == null ? void 0 : r[l.querykey]) !== e)
58
+ _ == null || _.push({
59
+ ...u,
60
+ query: { ...(i = u.value) == null ? void 0 : i.query, [l.querykey]: e },
61
+ replace: a
59
62
  });
60
- else if (l.navigation && L && ((A = globalThis == null ? void 0 : globalThis.location) != null && A.href) && new URL(globalThis.location.href).searchParams.get(l.querykey) !== e) {
61
- const _ = new URL(globalThis.location.href);
62
- _.searchParams.set(l.querykey, e), ie(0).then(() => {
63
- t ? history.replaceState({}, "", _.toString()) : history.pushState({}, "", _.toString());
63
+ else if (l.navigation && L && ((D = globalThis == null ? void 0 : globalThis.location) != null && D.href) && new URL(globalThis.location.href).searchParams.get(l.querykey) !== e) {
64
+ const $ = new URL(globalThis.location.href);
65
+ $.searchParams.set(l.querykey, e), oe(0).then(() => {
66
+ a ? history.replaceState({}, "", $.toString()) : history.pushState({}, "", $.toString());
64
67
  });
65
68
  }
66
- l.modelValue !== e && O("update:modelValue", e), s.value = e;
69
+ l.modelValue !== e && M("update:modelValue", e), s.value = e;
67
70
  };
68
- s.value && y(s.value, !0);
71
+ s.value && b(s.value, !0);
69
72
  const o = (e) => {
70
- var t = null;
73
+ var a = null;
71
74
  switch (e) {
72
75
  case "first":
73
- for (t = 0; t < l.items.length - 1 && l.items[t].disabled; )
74
- t++;
76
+ for (a = 0; a < l.items.length - 1 && l.items[a].disabled; )
77
+ a++;
75
78
  break;
76
79
  case "previous": {
77
80
  let i = 1;
78
- for (; i < l.items.length && (t = (r.value + l.items.length - i) % l.items.length, l.items[t].disabled); )
81
+ for (; i < l.items.length && (a = (n.value + l.items.length - i) % l.items.length, l.items[a].disabled); )
79
82
  i++;
80
83
  break;
81
84
  }
82
85
  case "next": {
83
86
  let i = 1;
84
- for (; i < l.items.length && (t = (r.value + i) % l.items.length, l.items[t].disabled); )
87
+ for (; i < l.items.length && (a = (n.value + i) % l.items.length, l.items[a].disabled); )
85
88
  i++;
86
89
  break;
87
90
  }
88
91
  case "last":
89
- for (t = l.items.length - 1; t >= 0 && l.items[t].disabled; )
90
- t--;
92
+ for (a = l.items.length - 1; a >= 0 && l.items[a].disabled; )
93
+ a--;
91
94
  break;
92
95
  }
93
- if (t === null)
96
+ if (a === null)
94
97
  throw new Error("Could not navigate to next tab");
95
- if (l.items[t].disabled) return;
96
- const a = l.items[t].key, u = document.querySelector(
97
- `#${m}_tab_${a}`
98
+ if (l.items[a].disabled) return;
99
+ const t = l.items[a].key, r = document.querySelector(
100
+ `#${m}_tab_${t}`
98
101
  );
99
- u == null || u.focus(), y(a, l.replace);
100
- }, G = (e) => {
102
+ r == null || r.focus(), b(t, l.replace);
103
+ }, W = (e) => {
101
104
  if (!l.disabled)
102
105
  if (e.key === "ArrowRight")
103
106
  o("next");
@@ -110,27 +113,27 @@ const ne = ["id"], ue = { class: "bb-tab__label-boundary" }, de = { class: "bb-t
110
113
  else
111
114
  return;
112
115
  };
113
- return $(
116
+ g(
114
117
  () => l.modelValue,
115
118
  (e) => {
116
- e && y(e, l.replace);
119
+ e && b(e, l.replace);
117
120
  }
118
- ), $(
121
+ ), g(
119
122
  () => {
120
- var e, t;
121
- return (t = (e = n.value) == null ? void 0 : e.query) == null ? void 0 : t[l.querykey];
123
+ var e, a;
124
+ return (a = (e = u.value) == null ? void 0 : e.query) == null ? void 0 : a[l.querykey];
122
125
  },
123
126
  (e) => {
124
- e && typeof e == "string" && y(e, l.replace);
127
+ e && typeof e == "string" && b(e, l.replace);
125
128
  }
126
- ), $(
129
+ ), g(
127
130
  s,
128
131
  async () => {
129
- if (g.value) {
130
- const e = g.value.querySelector(
132
+ if (w.value) {
133
+ const e = w.value.querySelector(
131
134
  "[role=tablist] .bb-tab__btn--active"
132
135
  );
133
- e && (await W(), e.scrollIntoView({
136
+ e && (await Z(), e.scrollIntoView({
134
137
  behavior: "smooth",
135
138
  block: "nearest",
136
139
  inline: "nearest"
@@ -138,69 +141,80 @@ const ne = ["id"], ue = { class: "bb-tab__label-boundary" }, de = { class: "bb-t
138
141
  }
139
142
  },
140
143
  { flush: "post" }
141
- ), H({
144
+ );
145
+ const B = v("right");
146
+ return g(
147
+ s,
148
+ (e, a) => {
149
+ if (e && a) {
150
+ const t = l.items.findIndex((i) => i.key === e), r = l.items.findIndex((i) => i.key === a);
151
+ B.value = t > r ? "right" : "left";
152
+ }
153
+ },
154
+ { flush: "sync" }
155
+ ), j({
142
156
  isFirst: h,
143
- isLast: v,
157
+ isLast: k,
144
158
  current: s,
145
- currentIndex: r,
159
+ currentIndex: n,
146
160
  goTo: o
147
- }), (e, t) => (d(), c("div", {
148
- id: X(T),
161
+ }), (e, a) => (d(), f("div", {
162
+ id: ee(T),
149
163
  ref_key: "tabs",
150
- ref: g,
164
+ ref: w,
151
165
  class: q(["bb-tab", {
152
166
  [`bb-tab--${e.direction}`]: !0,
153
167
  "bb-tab--disabled": !0
154
168
  }])
155
169
  }, [
156
- b("div", ue, [
157
- b("span", null, [
158
- f(e.$slots, "header:prepend", U(z(x.value)))
170
+ c("div", fe, [
171
+ c("span", null, [
172
+ y(e.$slots, "header:prepend", U(z(V.value)))
159
173
  ]),
160
- b("ul", {
174
+ c("ul", {
161
175
  ref_key: "tablist",
162
- ref: I,
176
+ ref: x,
163
177
  class: "bb-tab__label-container",
164
178
  role: "tablist"
165
179
  }, [
166
- (d(!0), c(S, null, D(e.items, (a) => (d(), c("li", {
167
- key: a.key,
180
+ (d(!0), f(K, null, H(e.items, (t) => (d(), f("li", {
181
+ key: t.key,
168
182
  role: "presentation"
169
183
  }, [
170
- Y(oe, {
171
- id: `${m}_tab_${a.key}`,
172
- "aria-selected": s.value === a.key,
173
- class: q(["bb-tab__btn", { "bb-tab__btn--active": s.value === a.key }]),
174
- disabled: a.disabled || e.disabled,
184
+ J(de, {
185
+ id: `${m}_tab_${t.key}`,
186
+ "aria-selected": s.value === t.key,
187
+ class: q(["bb-tab__btn", { "bb-tab__btn--active": s.value === t.key }]),
188
+ disabled: t.disabled || e.disabled,
175
189
  role: "tab",
176
- tabindex: s.value === a.key ? 0 : -1,
177
- onClick: (u) => y(a.key, l.replace),
178
- onKeydown: G
190
+ tabindex: s.value === t.key ? 0 : -1,
191
+ onClick: (r) => b(t.key, l.replace),
192
+ onKeydown: W
179
193
  }, {
180
- default: Z(() => [
181
- f(e.$slots, `label-${a.key}`, {
194
+ default: S(() => [
195
+ y(e.$slots, `label-${t.key}`, {
182
196
  current: s.value,
183
- currentIndex: r.value,
184
- disabled: !!(a.disabled || e.disabled),
197
+ currentIndex: n.value,
198
+ disabled: !!(t.disabled || e.disabled),
185
199
  goTo: o,
186
200
  isFirst: h.value,
187
- isLast: v.value,
188
- selected: s.value === a.key,
189
- text: a.label,
190
- value: a.key
201
+ isLast: k.value,
202
+ selected: s.value === t.key,
203
+ text: t.label,
204
+ value: t.key
191
205
  }, () => [
192
- f(e.$slots, "label", {
206
+ y(e.$slots, "label", {
193
207
  current: s.value,
194
- currentIndex: r.value,
195
- disabled: !!(a.disabled || e.disabled),
208
+ currentIndex: n.value,
209
+ disabled: !!(t.disabled || e.disabled),
196
210
  goTo: o,
197
211
  isFirst: h.value,
198
- isLast: v.value,
199
- selected: s.value === a.key,
200
- text: a.label,
201
- value: a.key
212
+ isLast: k.value,
213
+ selected: s.value === t.key,
214
+ text: t.label,
215
+ value: t.key
202
216
  }, () => [
203
- b("span", de, ee(a.label), 1)
217
+ c("span", ye, le(t.label), 1)
204
218
  ])
205
219
  ])
206
220
  ]),
@@ -208,42 +222,52 @@ const ne = ["id"], ue = { class: "bb-tab__label-boundary" }, de = { class: "bb-t
208
222
  }, 1032, ["id", "aria-selected", "class", "disabled", "tabindex", "onClick"])
209
223
  ]))), 128))
210
224
  ], 512),
211
- b("span", null, [
212
- f(e.$slots, "header:append", U(z(x.value)))
225
+ c("span", null, [
226
+ y(e.$slots, "header:append", U(z(V.value)))
213
227
  ])
214
228
  ]),
215
- b("div", ce, [
216
- (d(!0), c(S, null, D(e.items, (a) => (d(), c(S, {
217
- key: a.key
218
- }, [
219
- s.value === a.key || e.eager || a.eager ? (d(), c("section", {
220
- key: 0,
221
- id: `${m}_tabpanel_${a.key}`,
222
- "aria-labelledby": `${m}_tab_${a.key}`,
223
- class: q(["bb-tab__pane", {
224
- "bb-tab__pane--shown": s.value === a.key
225
- }]),
226
- role: "tabpanel",
227
- tabindex: "0"
228
- }, [
229
- f(e.$slots, a.key, {
230
- current: s.value,
231
- currentIndex: r.value,
232
- disabled: !!(a.disabled || e.disabled),
233
- goTo: o,
234
- isFirst: h.value,
235
- isLast: v.value,
236
- selected: s.value === a.key,
237
- text: a.label,
238
- value: a.key
239
- })
240
- ], 10, be)) : le("", !0)
241
- ], 64))), 128))
229
+ c("div", me, [
230
+ J(ce, null, {
231
+ default: S(() => [
232
+ (d(!0), f(K, null, H(e.items, (t) => (d(), te(ae, {
233
+ key: t.key,
234
+ css: e.animate,
235
+ name: `tab-slide-${B.value}`
236
+ }, {
237
+ default: S(() => [
238
+ s.value === t.key || e.eager || t.eager ? (d(), f("section", {
239
+ key: 0,
240
+ id: `${m}_tabpanel_${t.key}`,
241
+ "aria-labelledby": `${m}_tab_${t.key}`,
242
+ class: q(["bb-tab__pane", {
243
+ "bb-tab__pane--shown": s.value === t.key
244
+ }]),
245
+ role: "tabpanel",
246
+ tabindex: "0"
247
+ }, [
248
+ y(e.$slots, t.key, {
249
+ current: s.value,
250
+ currentIndex: n.value,
251
+ disabled: !!(t.disabled || e.disabled),
252
+ goTo: o,
253
+ isFirst: h.value,
254
+ isLast: k.value,
255
+ selected: s.value === t.key,
256
+ text: t.label,
257
+ value: t.key
258
+ })
259
+ ], 10, he)) : se("", !0)
260
+ ]),
261
+ _: 2
262
+ }, 1032, ["css", "name"]))), 128))
263
+ ]),
264
+ _: 3
265
+ })
242
266
  ])
243
- ], 10, ne));
267
+ ], 10, be));
244
268
  }
245
269
  });
246
270
  export {
247
- _e as default
271
+ xe as default
248
272
  };
249
273
  //# sourceMappingURL=index103.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index103.js","sources":["../src/components/BbTab/BbTab.vue"],"sourcesContent":["<template>\n\t<div\n\t\t:id=\"id\"\n\t\tref=\"tabs\"\n\t\tclass=\"bb-tab\"\n\t\t:class=\"{\n\t\t\t[`bb-tab--${direction}`]: true,\n\t\t\t'bb-tab--disabled': true,\n\t\t}\"\n\t>\n\t\t<div class=\"bb-tab__label-boundary\">\n\t\t\t<span><slot name=\"header:prepend\" v-bind=\"scrollStatus\"></slot></span>\n\t\t\t<ul ref=\"tablist\" class=\"bb-tab__label-container\" role=\"tablist\">\n\t\t\t\t<li v-for=\"tab in items\" :key=\"tab.key\" role=\"presentation\">\n\t\t\t\t\t<BaseButton\n\t\t\t\t\t\t:id=\"`${instanceid}_tab_${tab.key}`\"\n\t\t\t\t\t\t:aria-selected=\"selectedTab === tab.key\"\n\t\t\t\t\t\tclass=\"bb-tab__btn\"\n\t\t\t\t\t\t:class=\"{ 'bb-tab__btn--active': selectedTab === tab.key }\"\n\t\t\t\t\t\t:disabled=\"tab.disabled || disabled\"\n\t\t\t\t\t\t:role=\"'tab'\"\n\t\t\t\t\t\t:tabindex=\"selectedTab === tab.key ? 0 : -1\"\n\t\t\t\t\t\t@click=\"onTabSelected(tab.key, props.replace)\"\n\t\t\t\t\t\t@keydown=\"onKeydown\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t:current=\"selectedTab\"\n\t\t\t\t\t\t\t:current-index=\"currentTabIndex\"\n\t\t\t\t\t\t\t:disabled=\"!!(tab.disabled || disabled)\"\n\t\t\t\t\t\t\t:go-to=\"goTo\"\n\t\t\t\t\t\t\t:is-first=\"isFirst\"\n\t\t\t\t\t\t\t:is-last=\"isLast\"\n\t\t\t\t\t\t\t:name=\"`label-${tab.key}`\"\n\t\t\t\t\t\t\t:selected=\"selectedTab === tab.key\"\n\t\t\t\t\t\t\t:text=\"tab.label\"\n\t\t\t\t\t\t\t:value=\"tab.key\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t\t:current=\"selectedTab\"\n\t\t\t\t\t\t\t\t:current-index=\"currentTabIndex\"\n\t\t\t\t\t\t\t\t:disabled=\"!!(tab.disabled || disabled)\"\n\t\t\t\t\t\t\t\t:go-to=\"goTo\"\n\t\t\t\t\t\t\t\t:is-first=\"isFirst\"\n\t\t\t\t\t\t\t\t:is-last=\"isLast\"\n\t\t\t\t\t\t\t\tname=\"label\"\n\t\t\t\t\t\t\t\t:selected=\"selectedTab === tab.key\"\n\t\t\t\t\t\t\t\t:text=\"tab.label\"\n\t\t\t\t\t\t\t\t:value=\"tab.key\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<span class=\"bb-tab__label\">{{ tab.label }}</span>\n\t\t\t\t\t\t\t</slot>\n\t\t\t\t\t\t</slot>\n\t\t\t\t\t</BaseButton>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t\t<span><slot name=\"header:append\" v-bind=\"scrollStatus\"></slot></span>\n\t\t</div>\n\t\t<div class=\"bb-tab__panes-container\">\n\t\t\t<template v-for=\"tab in items\" :key=\"tab.key\">\n\t\t\t\t<section\n\t\t\t\t\tv-if=\"selectedTab === tab.key || eager || tab.eager\"\n\t\t\t\t\t:id=\"`${instanceid}_tabpanel_${tab.key}`\"\n\t\t\t\t\t:aria-labelledby=\"`${instanceid}_tab_${tab.key}`\"\n\t\t\t\t\tclass=\"bb-tab__pane\"\n\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t'bb-tab__pane--shown': selectedTab === tab.key,\n\t\t\t\t\t}\"\n\t\t\t\t\trole=\"tabpanel\"\n\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t>\n\t\t\t\t\t<slot\n\t\t\t\t\t\t:current=\"selectedTab\"\n\t\t\t\t\t\t:current-index=\"currentTabIndex\"\n\t\t\t\t\t\t:disabled=\"!!(tab.disabled || disabled)\"\n\t\t\t\t\t\t:go-to=\"goTo\"\n\t\t\t\t\t\t:is-first=\"isFirst\"\n\t\t\t\t\t\t:is-last=\"isLast\"\n\t\t\t\t\t\t:name=\"tab.key\"\n\t\t\t\t\t\t:selected=\"selectedTab === tab.key\"\n\t\t\t\t\t\t:text=\"tab.label\"\n\t\t\t\t\t\t:value=\"tab.key\"\n\t\t\t\t\t></slot>\n\t\t\t\t</section>\n\t\t\t</template>\n\t\t</div>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, watch, getCurrentInstance, computed, nextTick } from 'vue';\nimport { useId } from '@/composables/useId';\nimport { useRoute } from '@/composables/useRoute';\nimport { useRouter } from '@/composables/useRouter';\nimport { wait } from '@/utilities/functions/wait';\nimport { useScroll } from '@vueuse/core';\nimport BaseButton from '../BaseButton/BaseButton.vue';\nimport type { CommonProps } from '@/types/CommonProps';\n\nexport type BbTabItem = Pick<CommonProps, 'disabled'> & {\n\t/**\n\t * Used to render a tab even when not visible.\n\t * It's useful if you want the content of a tab in the DOM\n\t * immediately rendered\n\t * even when not visible for SEO purposes.\n\t */\n\teager?: boolean;\n\t/**\n\t * String that identifies the tab.\n\t */\n\tkey: string;\n\t/**\n\t * Label to use as the tab text.\n\t */\n\tlabel?: string;\n};\n\nexport type BbTabProps = Pick<CommonProps, 'disabled' | 'eager' | 'id'> & {\n\t/**\n\t * Direction of the tabs component\n\t */\n\tdirection?: 'horizontal' | 'vertical';\n\t/**\n\t * Array of items that define the tabs in the component.\n\t */\n\titems: BbTabItem[];\n\t/**\n\t * The current tab. Used by v-model.\n\t */\n\tmodelValue?: null | BbTabItem['key'];\n\t/**\n\t * Synchronizes the current tab with the url.\n\t */\n\tnavigation?: boolean;\n\t/**\n\t * Defines the query key to reference for maintaining navigation\n\t */\n\tquerykey?: string;\n\n\t/**\n\t * Replaces history rather than pushing it when changing tab.\n\t */\n\treplace?: boolean;\n};\n\nconst props = withDefaults(defineProps<BbTabProps>(), {\n\tdirection: 'horizontal',\n\tquerykey: 'tab',\n});\n\nexport type BbTabEvents = {\n\t(e: 'update:modelValue', value: (typeof props.items)[number]['key']): void;\n};\nconst emit = defineEmits<BbTabEvents>();\n\ntype BbStepSlots = {\n\t'header:prepend'?: (props: {\n\t\tisScrolling: boolean;\n\t\tleft: boolean;\n\t\tright: boolean;\n\t}) => any;\n\t'header:append'?: (props: {\n\t\tisScrolling: boolean;\n\t\tleft: boolean;\n\t\tright: boolean;\n\t}) => any;\n\tlabel?: (props: {\n\t\tcurrent: string | null;\n\t\tcurrentIndex: number;\n\t\tdisabled: boolean;\n\t\tisFirst: boolean;\n\t\tisLast: boolean;\n\t\tselected: boolean;\n\t\ttext: BbTabItem['label'];\n\t\tvalue: string;\n\t\tgoTo: typeof goTo;\n\t}) => any;\n} & {\n\t[key: string]: (props: {\n\t\tcurrent: string | null;\n\t\tcurrentIndex: number;\n\t\tdisabled: boolean;\n\t\tisFirst: boolean;\n\t\tisLast: boolean;\n\t\tselected: boolean;\n\t\ttext: BbTabItem['label'];\n\t\tvalue: string;\n\t\tgoTo: typeof goTo;\n\t}) => any;\n};\n\ndefineSlots<BbStepSlots>();\n\nconst route = useRoute();\nconst router = useRouter();\n\nconst tabs = ref();\n\nconst id = props.id ?? useId().id.value;\nconst instanceid = `bb-tab_${id}`;\n\nconst tablist = ref();\nconst { isScrolling, arrivedState } = useScroll(tablist);\nconst scrollStatus = computed(() => ({\n\tisScrolling: isScrolling.value,\n\tleft: arrivedState.left,\n\tright: arrivedState.right,\n}));\n\n/* Ignore because possibly undefined */\n// @ts-expect-error possibly undef\nconst isInertia = !!getCurrentInstance()?.proxy?.$inertia;\n\nconst selectedTab = ref<BbTabItem['key'] | null>(null);\n\nconst currentTabIndex = computed(() =>\n\tprops.items.findIndex((el) => el.key === selectedTab.value)\n);\nconst isFirst = computed(() => currentTabIndex.value === 0);\nconst isLast = computed(() => currentTabIndex.value === props.items.length - 1);\n\nprops.items.forEach((item) => {\n\tif (!item.key) {\n\t\tconsole.error(`A tab item has no key`, item);\n\t\tthrow new Error('A tab item has no key ' + JSON.stringify(item));\n\t}\n});\n\n/* \nThis section retrieves the current tab that should be selected\n*/\n// Retrieve tab from url on load for vue apps\nif (props.navigation && route.value?.query?.[props.querykey]) {\n\tselectedTab.value = route.value?.query?.[props.querykey] as string;\n\t// Retrieve tab from url on load for inertia app\n} else if (\n\tprops.navigation &&\n\tisInertia &&\n\tglobalThis?.location?.href &&\n\tnew URL(globalThis.location.href).searchParams.get(props.querykey)\n) {\n\tselectedTab.value = new URL(globalThis.location.href).searchParams.get(\n\t\tprops.querykey\n\t) as string;\n\t// Else whatever tab is passed first\n} else if (props.modelValue) {\n\tselectedTab.value = props.modelValue;\n\t// Else whatever tab is passed first\n} else if (props.items[0]) {\n\tconst firstSelectableTab = props.items.find((item) => !item.disabled);\n\tif (!firstSelectableTab) {\n\t\tthrow new Error(\n\t\t\t'No tab has been selected so it defaulted to the first available. Still, all the tabs are disabled so no tab can be selected.'\n\t\t);\n\t}\n\tconst key = firstSelectableTab.key;\n\tselectedTab.value = key;\n}\n/* \nOnce the current tab is found update external variables\n*/\n\nconst onTabSelected = async (tab: BbTabItem['key'], replace = false) => {\n\t/* For Vue or Nuxt context */\n\tif (\n\t\tprops.navigation &&\n\t\troute.value &&\n\t\troute.value?.query?.[props.querykey] !== tab\n\t) {\n\t\trouter?.push({\n\t\t\t...route,\n\t\t\tquery: { ...route.value?.query, [props.querykey]: tab },\n\t\t\treplace,\n\t\t});\n\t\t/* Inertia context */\n\t} else if (\n\t\tprops.navigation &&\n\t\tisInertia &&\n\t\tglobalThis?.location?.href &&\n\t\tnew URL(globalThis.location.href).searchParams.get(props.querykey) !== tab\n\t) {\n\t\tconst url = new URL(globalThis.location.href);\n\t\turl.searchParams.set(props.querykey, tab);\n\t\twait(0).then(() => {\n\t\t\tif (replace) {\n\t\t\t\thistory.replaceState({}, '', url.toString());\n\t\t\t} else {\n\t\t\t\thistory.pushState({}, '', url.toString());\n\t\t\t}\n\t\t});\n\t}\n\tif (props.modelValue !== tab) {\n\t\temit('update:modelValue', tab);\n\t}\n\tselectedTab.value = tab;\n};\n\nif (selectedTab.value) {\n\tonTabSelected(selectedTab.value, true);\n}\n\nconst goTo = (target: 'first' | 'previous' | 'next' | 'last') => {\n\tvar nextTabIndex: number | null = null;\n\tswitch (target) {\n\t\tcase 'first':\n\t\t\tnextTabIndex = 0;\n\t\t\twhile (nextTabIndex < props.items.length - 1) {\n\t\t\t\tif (props.items[nextTabIndex].disabled) {\n\t\t\t\t\tnextTabIndex++;\n\t\t\t\t} else break;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'previous': {\n\t\t\tlet offset = 1;\n\t\t\twhile (offset < props.items.length) {\n\t\t\t\tnextTabIndex =\n\t\t\t\t\t(currentTabIndex.value + props.items.length - offset) %\n\t\t\t\t\tprops.items.length;\n\t\t\t\tif (props.items[nextTabIndex].disabled) {\n\t\t\t\t\toffset++;\n\t\t\t\t} else break;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tcase 'next': {\n\t\t\tlet offset = 1;\n\t\t\twhile (offset < props.items.length) {\n\t\t\t\tnextTabIndex = (currentTabIndex.value + offset) % props.items.length;\n\t\t\t\tif (props.items[nextTabIndex].disabled) {\n\t\t\t\t\toffset++;\n\t\t\t\t} else break;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t\tcase 'last':\n\t\t\tnextTabIndex = props.items.length - 1;\n\t\t\twhile (nextTabIndex >= 0) {\n\t\t\t\tif (props.items[nextTabIndex].disabled) {\n\t\t\t\t\tnextTabIndex--;\n\t\t\t\t} else break;\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t}\n\tif (nextTabIndex === null) {\n\t\tthrow new Error('Could not navigate to next tab');\n\t}\n\tif (props.items[nextTabIndex].disabled) return;\n\tconst targetKey = props.items[nextTabIndex].key;\n\tconst button: HTMLButtonElement | null = document.querySelector(\n\t\t`#${instanceid}_tab_${targetKey}`\n\t);\n\tbutton?.focus();\n\tonTabSelected(targetKey, props.replace);\n};\n\nconst onKeydown = (event: KeyboardEvent) => {\n\tif (props.disabled) return;\n\tif (event.key === 'ArrowRight') {\n\t\tgoTo('next');\n\t} else if (event.key === 'ArrowLeft') {\n\t\tgoTo('previous');\n\t} else if (event.key === 'Home') {\n\t\tevent.preventDefault();\n\t\tgoTo('first');\n\t} else if (event.key === 'End') {\n\t\tevent.preventDefault();\n\t\tgoTo('last');\n\t} else {\n\t\treturn;\n\t}\n};\n\nwatch(\n\t() => props.modelValue,\n\t(value) => {\n\t\tif (value) {\n\t\t\tonTabSelected(value, props.replace);\n\t\t}\n\t}\n);\n\nwatch(\n\t() => route.value?.query?.[props.querykey],\n\t(value) => {\n\t\tif (value && typeof value === 'string') {\n\t\t\tonTabSelected(value, props.replace);\n\t\t}\n\t}\n);\n\nwatch(\n\tselectedTab,\n\tasync () => {\n\t\tif (tabs.value) {\n\t\t\tconst element = tabs.value.querySelector(\n\t\t\t\t`[role=tablist] .bb-tab__btn--active`\n\t\t\t);\n\t\t\tif (element) {\n\t\t\t\tawait nextTick();\n\t\t\t\telement.scrollIntoView({\n\t\t\t\t\tbehavior: 'smooth',\n\t\t\t\t\tblock: 'nearest',\n\t\t\t\t\tinline: 'nearest',\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t},\n\t{ flush: 'post' }\n);\n\ndefineExpose({\n\tisFirst,\n\tisLast,\n\tcurrent: selectedTab,\n\tcurrentIndex: currentTabIndex,\n\tgoTo,\n});\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbTab';\n</style>\n"],"names":["props","__props","emit","__emit","route","useRoute","router","useRouter","tabs","ref","id","useId","instanceid","tablist","isScrolling","arrivedState","useScroll","scrollStatus","computed","isInertia","_b","_a","getCurrentInstance","selectedTab","currentTabIndex","el","isFirst","isLast","item","_d","_c","_f","_e","_g","firstSelectableTab","key","onTabSelected","tab","replace","url","wait","goTo","target","nextTabIndex","offset","targetKey","button","onKeydown","event","watch","value","element","nextTick","__expose"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAgJA,UAAMA,IAAQC,GAQRC,IAAOC,GAwCPC,IAAQC,MACRC,IAASC,MAETC,IAAOC,KAEPC,IAAKV,EAAM,MAAMW,KAAQ,GAAG,OAC5BC,IAAa,UAAUF,CAAE,IAEzBG,IAAUJ,KACV,EAAE,aAAAK,GAAa,cAAAC,EAAa,IAAIC,GAAUH,CAAO,GACjDI,IAAeC,EAAS,OAAO;AAAA,MACpC,aAAaJ,EAAY;AAAA,MAC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MAAU;AACV,QAAIA,KACWd,EAAAc,GAAOlD,EAAM,OAAO;AAAA,MAEpC;AAAA,IAAA,GAGDiD;AAAA,MACC,MAAA;;AAAM,gBAAA7B,KAAAC,IAAAjB,EAAM,UAAN,gBAAAiB,EAAa,UAAb,gBAAAD,EAAqBpB,EAAM;AAAA;AAAA,MACjC,CAACkD,MAAU;AACN,QAAAA,KAAS,OAAOA,KAAU,YACfd,EAAAc,GAAOlD,EAAM,OAAO;AAAA,MAEpC;AAAA,IAAA,GAGDiD;AAAA,MACC1B;AAAA,MACA,YAAY;AACX,YAAIf,EAAK,OAAO;AACT,gBAAA2C,IAAU3C,EAAK,MAAM;AAAA,YAC1B;AAAA,UAAA;AAED,UAAI2C,MACH,MAAMC,EAAS,GACfD,EAAQ,eAAe;AAAA,YACtB,UAAU;AAAA,YACV,OAAO;AAAA,YACP,QAAQ;AAAA,UAAA,CACR;AAAA,QAEH;AAAA,MACD;AAAA,MACA,EAAE,OAAO,OAAO;AAAA,IAAA,GAGJE,EAAA;AAAA,MACZ,SAAA3B;AAAA,MACA,QAAAC;AAAA,MACA,SAASJ;AAAA,MACT,cAAcC;AAAA,MACd,MAAAiB;AAAA,IAAA,CACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index103.js","sources":["../src/components/BbTab/BbTab.vue"],"sourcesContent":["<template>\n\t<div\n\t\t:id=\"id\"\n\t\tref=\"tabs\"\n\t\tclass=\"bb-tab\"\n\t\t:class=\"{\n\t\t\t[`bb-tab--${direction}`]: true,\n\t\t\t'bb-tab--disabled': true,\n\t\t}\"\n\t>\n\t\t<div class=\"bb-tab__label-boundary\">\n\t\t\t<span><slot name=\"header:prepend\" v-bind=\"scrollStatus\"></slot></span>\n\t\t\t<ul ref=\"tablist\" class=\"bb-tab__label-container\" role=\"tablist\">\n\t\t\t\t<li v-for=\"tab in items\" :key=\"tab.key\" role=\"presentation\">\n\t\t\t\t\t<BaseButton\n\t\t\t\t\t\t:id=\"`${instanceid}_tab_${tab.key}`\"\n\t\t\t\t\t\t:aria-selected=\"selectedTab === tab.key\"\n\t\t\t\t\t\tclass=\"bb-tab__btn\"\n\t\t\t\t\t\t:class=\"{ 'bb-tab__btn--active': selectedTab === tab.key }\"\n\t\t\t\t\t\t:disabled=\"tab.disabled || disabled\"\n\t\t\t\t\t\t:role=\"'tab'\"\n\t\t\t\t\t\t:tabindex=\"selectedTab === tab.key ? 0 : -1\"\n\t\t\t\t\t\t@click=\"onTabSelected(tab.key, props.replace)\"\n\t\t\t\t\t\t@keydown=\"onKeydown\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t:current=\"selectedTab\"\n\t\t\t\t\t\t\t:current-index=\"currentTabIndex\"\n\t\t\t\t\t\t\t:disabled=\"!!(tab.disabled || disabled)\"\n\t\t\t\t\t\t\t:go-to=\"goTo\"\n\t\t\t\t\t\t\t:is-first=\"isFirst\"\n\t\t\t\t\t\t\t:is-last=\"isLast\"\n\t\t\t\t\t\t\t:name=\"`label-${tab.key}`\"\n\t\t\t\t\t\t\t:selected=\"selectedTab === tab.key\"\n\t\t\t\t\t\t\t:text=\"tab.label\"\n\t\t\t\t\t\t\t:value=\"tab.key\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t\t:current=\"selectedTab\"\n\t\t\t\t\t\t\t\t:current-index=\"currentTabIndex\"\n\t\t\t\t\t\t\t\t:disabled=\"!!(tab.disabled || disabled)\"\n\t\t\t\t\t\t\t\t:go-to=\"goTo\"\n\t\t\t\t\t\t\t\t:is-first=\"isFirst\"\n\t\t\t\t\t\t\t\t:is-last=\"isLast\"\n\t\t\t\t\t\t\t\tname=\"label\"\n\t\t\t\t\t\t\t\t:selected=\"selectedTab === tab.key\"\n\t\t\t\t\t\t\t\t:text=\"tab.label\"\n\t\t\t\t\t\t\t\t:value=\"tab.key\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<span class=\"bb-tab__label\">{{ tab.label }}</span>\n\t\t\t\t\t\t\t</slot>\n\t\t\t\t\t\t</slot>\n\t\t\t\t\t</BaseButton>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t\t<span><slot name=\"header:append\" v-bind=\"scrollStatus\"></slot></span>\n\t\t</div>\n\t\t<div class=\"bb-tab__panes-container\">\n\t\t\t<BbSmoothHeight>\n\t\t\t\t<template v-for=\"tab in items\" :key=\"tab.key\">\n\t\t\t\t\t<Transition :css=\"animate\" :name=\"`tab-slide-${animationDirection}`\">\n\t\t\t\t\t\t<section\n\t\t\t\t\t\t\tv-if=\"selectedTab === tab.key || eager || tab.eager\"\n\t\t\t\t\t\t\t:id=\"`${instanceid}_tabpanel_${tab.key}`\"\n\t\t\t\t\t\t\t:aria-labelledby=\"`${instanceid}_tab_${tab.key}`\"\n\t\t\t\t\t\t\tclass=\"bb-tab__pane\"\n\t\t\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t\t\t'bb-tab__pane--shown': selectedTab === tab.key,\n\t\t\t\t\t\t\t}\"\n\t\t\t\t\t\t\trole=\"tabpanel\"\n\t\t\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<slot\n\t\t\t\t\t\t\t\t:current=\"selectedTab\"\n\t\t\t\t\t\t\t\t:current-index=\"currentTabIndex\"\n\t\t\t\t\t\t\t\t:disabled=\"!!(tab.disabled || disabled)\"\n\t\t\t\t\t\t\t\t:go-to=\"goTo\"\n\t\t\t\t\t\t\t\t:is-first=\"isFirst\"\n\t\t\t\t\t\t\t\t:is-last=\"isLast\"\n\t\t\t\t\t\t\t\t:name=\"tab.key\"\n\t\t\t\t\t\t\t\t:selected=\"selectedTab === tab.key\"\n\t\t\t\t\t\t\t\t:text=\"tab.label\"\n\t\t\t\t\t\t\t\t:value=\"tab.key\"\n\t\t\t\t\t\t\t></slot>\n\t\t\t\t\t\t</section>\n\t\t\t\t\t</Transition>\n\t\t\t\t</template>\n\t\t\t</BbSmoothHeight>\n\t\t</div>\n\t</div>\n</template>\n\n<script setup lang=\"ts\">\nimport { ref, watch, getCurrentInstance, computed, nextTick } from 'vue';\nimport { useId } from '@/composables/useId';\nimport { useRoute } from '@/composables/useRoute';\nimport { useRouter } from '@/composables/useRouter';\nimport { wait } from '@/utilities/functions/wait';\nimport { useScroll } from '@vueuse/core';\nimport BaseButton from '../BaseButton/BaseButton.vue';\nimport type { CommonProps } from '@/types/CommonProps';\nimport BbSmoothHeight from '../BbSmoothHeight/BbSmoothHeight.vue';\n\nexport type BbTabItem = Pick<CommonProps, 'disabled'> & {\n\t/**\n\t * Used to render a tab even when not visible.\n\t * It's useful if you want the content of a tab in the DOM\n\t * immediately rendered\n\t * even when not visible for SEO purposes.\n\t */\n\teager?: boolean;\n\t/**\n\t * String that identifies the tab.\n\t */\n\tkey: string;\n\t/**\n\t * Label to use as the tab text.\n\t */\n\tlabel?: string;\n};\n\nexport type BbTabProps = Pick<CommonProps, 'disabled' | 'eager' | 'id'> & {\n\t/**\n\t * Enables transitions\n\t */\n\tanimate?: boolean;\n\t/**\n\t * Direction of the tabs component\n\t */\n\tdirection?: 'horizontal' | 'vertical';\n\t/**\n\t * Array of items that define the tabs in the component.\n\t */\n\titems: BbTabItem[];\n\t/**\n\t * The current tab. Used by v-model.\n\t */\n\tmodelValue?: null | BbTabItem['key'];\n\t/**\n\t * Synchronizes the current tab with the url.\n\t */\n\tnavigation?: boolean;\n\t/**\n\t * Defines the query key to reference for maintaining navigation\n\t */\n\tquerykey?: string;\n\n\t/**\n\t * Replaces history rather than pushing it when changing tab.\n\t */\n\treplace?: boolean;\n};\n\nconst props = withDefaults(defineProps<BbTabProps>(), {\n\tanimate: true,\n\tdirection: 'horizontal',\n\tquerykey: 'tab',\n});\n\nexport type BbTabEvents = {\n\t(e: 'update:modelValue', value: (typeof props.items)[number]['key']): void;\n};\nconst emit = defineEmits<BbTabEvents>();\n\ntype BbStepSlots = {\n\t'header:prepend'?: (props: {\n\t\tisScrolling: boolean;\n\t\tleft: boolean;\n\t\tright: boolean;\n\t}) => any;\n\t'header:append'?: (props: {\n\t\tisScrolling: boolean;\n\t\tleft: boolean;\n\t\tright: boolean;\n\t}) => any;\n\tlabel?: (props: {\n\t\tcurrent: string | null;\n\t\tcurrentIndex: number;\n\t\tdisabled: boolean;\n\t\tisFirst: boolean;\n\t\tisLast: boolean;\n\t\tselected: boolean;\n\t\ttext: BbTabItem['label'];\n\t\tvalue: string;\n\t\tgoTo: typeof goTo;\n\t}) => any;\n} & {\n\t[key: string]: (props: {\n\t\tcurrent: string | null;\n\t\tcurrentIndex: number;\n\t\tdisabled: boolean;\n\t\tisFirst: boolean;\n\t\tisLast: boolean;\n\t\tselected: boolean;\n\t\ttext: BbTabItem['label'];\n\t\tvalue: string;\n\t\tgoTo: typeof goTo;\n\t}) => any;\n};\n\ndefineSlots<BbStepSlots>();\n\nconst route = useRoute();\nconst router = useRouter();\n\nconst tabs = ref();\n\nconst id = props.id ?? useId().id.value;\nconst instanceid = `bb-tab_${id}`;\n\nconst tablist = ref();\nconst { isScrolling, arrivedState } = useScroll(tablist);\nconst scrollStatus = computed(() => ({\n\tisScrolling: isScrolling.value,\n\tleft: arrivedState.left,\n\tright: arrivedState.right,\n}));\n\n/* Ignore because possibly undefined */\n// @ts-expect-error possibly undef\nconst isInertia = !!getCurrentInstance()?.proxy?.$inertia;\n\nconst selectedTab = ref<BbTabItem['key'] | null>(null);\n\nconst currentTabIndex = computed(() =>\n\tprops.items.findIndex((el) => el.key === selectedTab.value)\n);\nconst isFirst = computed(() => currentTabIndex.value === 0);\nconst isLast = computed(() => currentTabIndex.value === props.items.length - 1);\n\nprops.items.forEach((item) => {\n\tif (!item.key) {\n\t\tconsole.error(`A tab item has no key`, item);\n\t\tthrow new Error('A tab item has no key ' + JSON.stringify(item));\n\t}\n});\n\n/* \nThis section retrieves the current tab that should be selected\n*/\n// Retrieve tab from url on load for vue apps\nif (props.navigation && route.value?.query?.[props.querykey]) {\n\tselectedTab.value = route.value?.query?.[props.querykey] as string;\n\t// Retrieve tab from url on load for inertia app\n} else if (\n\tprops.navigation &&\n\tisInertia &&\n\tglobalThis?.location?.href &&\n\tnew URL(globalThis.location.href).searchParams.get(props.querykey)\n) {\n\tselectedTab.value = new URL(globalThis.location.href).searchParams.get(\n\t\tprops.querykey\n\t) as string;\n\t// Else whatever tab is passed first\n} else if (props.modelValue) {\n\tselectedTab.value = props.modelValue;\n\t// Else whatever tab is passed first\n} else if (props.items[0]) {\n\tconst firstSelectableTab = props.items.find((item) => !item.disabled);\n\tif (!firstSelectableTab) {\n\t\tthrow new Error(\n\t\t\t'No tab has been selected so it defaulted to the first available. Still, all the tabs are disabled so no tab can be selected.'\n\t\t);\n\t}\n\tconst key = firstSelectableTab.key;\n\tselectedTab.value = key;\n}\n/* \nOnce the current tab is found update external variables\n*/\n\nconst onTabSelected = async (tab: BbTabItem['key'], replace = false) => {\n\t/* For Vue or Nuxt context */\n\tif (\n\t\tprops.navigation &&\n\t\troute.value &&\n\t\troute.value?.query?.[props.querykey] !== tab\n\t) {\n\t\trouter?.push({\n\t\t\t...route,\n\t\t\tquery: { ...route.value?.query, [props.querykey]: tab },\n\t\t\treplace,\n\t\t});\n\t\t/* Inertia context */\n\t} else if (\n\t\tprops.navigation &&\n\t\tisInertia &&\n\t\tglobalThis?.location?.href &&\n\t\tnew URL(globalThis.location.href).searchParams.get(props.querykey) !== tab\n\t) {\n\t\tconst url = new URL(globalThis.location.href);\n\t\turl.searchParams.set(props.querykey, tab);\n\t\twait(0).then(() => {\n\t\t\tif (replace) {\n\t\t\t\thistory.replaceState({}, '', url.toString());\n\t\t\t} else {\n\t\t\t\thistory.pushState({}, '', url.toString());\n\t\t\t}\n\t\t});\n\t}\n\tif (props.modelValue !== tab) {\n\t\temit('update:modelValue', tab);\n\t}\n\tselectedTab.value = tab;\n};\n\nif (selectedTab.value) {\n\tonTabSelected(selectedTab.value, true);\n}\n\nconst goTo = (target: 'first' | 'previous' | 'next' | 'last') => {\n\tvar nextTabIndex: number | null = null;\n\tswitch (target) {\n\t\tcase 'first':\n\t\t\tnextTabIndex = 0;\n\t\t\twhile (nextTabIndex < props.items.length - 1) {\n\t\t\t\tif (props.items[nextTabIndex].disabled) {\n\t\t\t\t\tnextTabIndex++;\n\t\t\t\t} else break;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 'previous': {\n\t\t\tlet offset = 1;\n\t\t\twhile (offset < props.items.length) {\n\t\t\t\tnextTabIndex =\n\t\t\t\t\t(currentTabIndex.value + props.items.length - offset) %\n\t\t\t\t\tprops.items.length;\n\t\t\t\tif (props.items[nextTabIndex].disabled) {\n\t\t\t\t\toffset++;\n\t\t\t\t} else break;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tcase 'next': {\n\t\t\tlet offset = 1;\n\t\t\twhile (offset < props.items.length) {\n\t\t\t\tnextTabIndex = (currentTabIndex.value + offset) % props.items.length;\n\t\t\t\tif (props.items[nextTabIndex].disabled) {\n\t\t\t\t\toffset++;\n\t\t\t\t} else break;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t\tcase 'last':\n\t\t\tnextTabIndex = props.items.length - 1;\n\t\t\twhile (nextTabIndex >= 0) {\n\t\t\t\tif (props.items[nextTabIndex].disabled) {\n\t\t\t\t\tnextTabIndex--;\n\t\t\t\t} else break;\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t}\n\tif (nextTabIndex === null) {\n\t\tthrow new Error('Could not navigate to next tab');\n\t}\n\tif (props.items[nextTabIndex].disabled) return;\n\tconst targetKey = props.items[nextTabIndex].key;\n\tconst button: HTMLButtonElement | null = document.querySelector(\n\t\t`#${instanceid}_tab_${targetKey}`\n\t);\n\tbutton?.focus();\n\tonTabSelected(targetKey, props.replace);\n};\n\nconst onKeydown = (event: KeyboardEvent) => {\n\tif (props.disabled) return;\n\tif (event.key === 'ArrowRight') {\n\t\tgoTo('next');\n\t} else if (event.key === 'ArrowLeft') {\n\t\tgoTo('previous');\n\t} else if (event.key === 'Home') {\n\t\tevent.preventDefault();\n\t\tgoTo('first');\n\t} else if (event.key === 'End') {\n\t\tevent.preventDefault();\n\t\tgoTo('last');\n\t} else {\n\t\treturn;\n\t}\n};\n\nwatch(\n\t() => props.modelValue,\n\t(value) => {\n\t\tif (value) {\n\t\t\tonTabSelected(value, props.replace);\n\t\t}\n\t}\n);\n\nwatch(\n\t() => route.value?.query?.[props.querykey],\n\t(value) => {\n\t\tif (value && typeof value === 'string') {\n\t\t\tonTabSelected(value, props.replace);\n\t\t}\n\t}\n);\n\nwatch(\n\tselectedTab,\n\tasync () => {\n\t\tif (tabs.value) {\n\t\t\tconst element = tabs.value.querySelector(\n\t\t\t\t`[role=tablist] .bb-tab__btn--active`\n\t\t\t);\n\t\t\tif (element) {\n\t\t\t\tawait nextTick();\n\t\t\t\telement.scrollIntoView({\n\t\t\t\t\tbehavior: 'smooth',\n\t\t\t\t\tblock: 'nearest',\n\t\t\t\t\tinline: 'nearest',\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t},\n\t{ flush: 'post' }\n);\n\nconst animationDirection = ref<'left' | 'right'>('right');\nwatch(\n\tselectedTab,\n\t(current, previous) => {\n\t\tif (current && previous) {\n\t\t\tconst indexCurrent = props.items.findIndex((i) => i.key === current);\n\t\t\tconst indexPrevious = props.items.findIndex((i) => i.key === previous);\n\t\t\tanimationDirection.value =\n\t\t\t\tindexCurrent > indexPrevious ? 'right' : 'left';\n\t\t}\n\t},\n\t{ flush: 'sync' }\n);\n\ndefineExpose({\n\tisFirst,\n\tisLast,\n\tcurrent: selectedTab,\n\tcurrentIndex: currentTabIndex,\n\tgoTo,\n});\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbTab';\n</style>\n"],"names":["props","__props","emit","__emit","route","useRoute","router","useRouter","tabs","ref","id","useId","instanceid","tablist","isScrolling","arrivedState","useScroll","scrollStatus","computed","isInertia","_b","_a","getCurrentInstance","selectedTab","currentTabIndex","el","isFirst","isLast","item","_d","_c","_f","_e","_g","firstSelectableTab","key","onTabSelected","tab","replace","url","wait","goTo","target","nextTabIndex","offset","targetKey","button","onKeydown","event","watch","value","element","nextTick","animationDirection","current","previous","indexCurrent","indexPrevious","__expose"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAyJA,UAAMA,IAAQC,GASRC,IAAOC,GAwCPC,IAAQC,MACRC,IAASC,MAETC,IAAOC,KAEPC,IAAKV,EAAM,MAAMW,KAAQ,GAAG,OAC5BC,IAAa,UAAUF,CAAE,IAEzBG,IAAUJ,KACV,EAAE,aAAAK,GAAa,cAAAC,EAAa,IAAIC,GAAUH,CAAO,GACjDI,IAAeC,EAAS,OAAO;AAAA,MACpC,aAAaJ,EAAY;AAAA,MACzB,MAAMC,EAAa;AAAA,MACnB,OAAOA,EAAa;AAAA,IACnB,EAAA,GAIII,IAAY,CAAC,GAACC,KAAAC,IAAAC,EAAA,MAAA,gBAAAD,EAAsB,UAAtB,QAAAD,EAA6B,WAE3CG,IAAcd,EAA6B,IAAI,GAE/Ce,IAAkBN;AAAA,MAAS,MAChClB,EAAM,MAAM,UAAU,CAACyB,MAAOA,EAAG,QAAQF,EAAY,KAAK;AAAA,IAAA,GAErDG,IAAUR,EAAS,MAAMM,EAAgB,UAAU,CAAC,GACpDG,IAAST,EAAS,MAAMM,EAAgB,UAAUxB,EAAM,MAAM,SAAS,CAAC;AAa9E,QAXMA,EAAA,MAAM,QAAQ,CAAC4B,MAAS;AACzB,UAAA,CAACA,EAAK;AACD,sBAAA,MAAM,yBAAyBA,CAAI,GACrC,IAAI,MAAM,2BAA2B,KAAK,UAAUA,CAAI,CAAC;AAAA,IAChE,CACA,GAMG5B,EAAM,gBAAc6B,KAAAC,IAAA1B,EAAM,UAAN,gBAAA0B,EAAa,UAAb,QAAAD,EAAqB7B,EAAM;A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C;AAAA,MACC1B;AAAA,MACA,CAAC+B,GAASC,MAAa;AACtB,YAAID,KAAWC,GAAU;AAClB,gBAAAC,IAAexD,EAAM,MAAM,UAAU,CAAC,MAAM,EAAE,QAAQsD,CAAO,GAC7DG,IAAgBzD,EAAM,MAAM,UAAU,CAAC,MAAM,EAAE,QAAQuD,CAAQ;AAClD,UAAAF,EAAA,QAClBG,IAAeC,IAAgB,UAAU;AAAA,QAC3C;AAAA,MACD;AAAA,MACA,EAAE,OAAO,OAAO;AAAA,IAAA,GAGJC,EAAA;AAAA,MACZ,SAAAhC;AAAA,MACA,QAAAC;AAAA,MACA,SAASJ;AAAA,MACT,cAAcC;AAAA,MACd,MAAAiB;AAAA,IAAA,CACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index105.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import { defineComponent as oe, ref as x, computed as h, toRef as B, watch as ne, openBlock as n, createBlock as de, resolveDynamicComponent as ce, normalizeClass as r, unref as u, withCtx as ie, createElementBlock as d, toDisplayString as p, createCommentVNode as k, createElementVNode as s, renderSlot as f, createVNode as I, Fragment as w, renderList as T, createTextVNode as be, mergeProps as re } from "vue";
2
- import { add as ue } from "./index263.js";
3
- import { clamp as pe } from "./index198.js";
2
+ import { add as ue } from "./index281.js";
3
+ import { clamp as pe } from "./index197.js";
4
4
  import { isNil as M } from "./index124.js";
5
5
  import { useId as fe } from "./index7.js";
6
- import { useItemValue as me } from "./index240.js";
7
- import { when as he } from "./index216.js";
6
+ import { useItemValue as me } from "./index251.js";
7
+ import { when as he } from "./index202.js";
8
8
  import J from "./index14.js";
9
9
  /* empty css */
10
10
  import ye from "./index28.js";
11
11
  /* empty css */
12
- import { useOptions as _e } from "./index199.js";
12
+ import { useOptions as _e } from "./index198.js";
13
13
  const ke = { key: 0 }, ve = { class: "bb-table-header-row" }, Ce = { class: "bb-table-header__content" }, ge = { class: "bb-table-check__label-text" }, we = {
14
14
  key: 1,
15
15
  class: "bb-table-radio__label-text"
package/dist/index113.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as s, openBlock as e, createBlock as o, Teleport as l, createElementVNode as c, normalizeClass as m, createVNode as i, TransitionGroup as p, withCtx as u, createElementBlock as f, Fragment as d, renderList as _, unref as r, mergeProps as b } from "vue";
2
2
  import { state as k, useToast as C } from "./index10.js";
3
- import B from "./index264.js";
3
+ import B from "./index283.js";
4
4
  const N = /* @__PURE__ */ s({
5
5
  __name: "BbToast",
6
6
  props: {
package/dist/index115.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { defineComponent as A, ref as o, computed as $, watch as I, openBlock as b, createElementBlock as D, mergeProps as L, createElementVNode as c, renderSlot as M, normalizeProps as R, guardReactiveProps as U, unref as u, createBlock as O, Teleport as W, normalizeClass as j, normalizeStyle as q, withCtx as G, createCommentVNode as P } from "vue";
2
- import { useFloating as J, arrow as K } from "./index219.js";
2
+ import { useFloating as J, arrow as K } from "./index205.js";
3
3
  import { useId as Q } from "./index7.js";
4
4
  import { wait as T } from "./index126.js";
5
5
  import X from "./index12.js";
6
6
  /* empty css */
7
- import { throttle as w } from "./index202.js";
8
- import { waitFor as Y } from "./index204.js";
9
- import { autoUpdate as Z, flip as ee, shift as te, hide as oe } from "./index226.js";
7
+ import { throttle as w } from "./index222.js";
8
+ import { waitFor as Y } from "./index215.js";
9
+ import { autoUpdate as Z, flip as ee, shift as te, hide as oe } from "./index220.js";
10
10
  const ae = { class: "bb-tooltip__bubble" }, ne = /* @__PURE__ */ c("svg", {
11
11
  fill: "none",
12
12
  viewBox: "0 0 24 24",
@@ -30,7 +30,7 @@ const ae = { class: "bb-tooltip__bubble" }, ne = /* @__PURE__ */ c("svg", {
30
30
  placement: { default: "top" },
31
31
  showClose: { type: Boolean, default: !0 },
32
32
  theme: { default: "default" },
33
- transitionDuration: { default: 150 }
33
+ transitionDuration: { default: 250 }
34
34
  },
35
35
  setup(F) {
36
36
  const t = F, _ = `bb_${t.id ?? Q().id.value}`, p = o(), d = o(), h = o(), { floatingStyles: z, placement: g, middlewareData: f } = J(
@@ -1 +1 @@
1
- {"version":3,"file":"index115.js","sources":["../src/components/BbTooltip/BbTooltip.vue"],"sourcesContent":["<template>\n\t<span class=\"bb-tooltip\" v-bind=\"attributes\">\n\t\t<span ref=\"wrapper\" class=\"bb-tooltip__wrapper\">\n\t\t\t<slot\n\t\t\t\tname=\"activator\"\n\t\t\t\tv-bind=\"{\n\t\t\t\t\tprops: {\n\t\t\t\t\t\t...(hasOpenedOnce ? { 'aria-describedby': id } : {}),\n\t\t\t\t\t\tonMouseenter,\n\t\t\t\t\t\tonFocus,\n\t\t\t\t\t\tonBlur: closeTooltip,\n\t\t\t\t\t\tdisabled: disabled,\n\t\t\t\t\t},\n\t\t\t\t\tclosed: closed,\n\t\t\t\t\tclosing: closing,\n\t\t\t\t\tdisabled: disabled,\n\t\t\t\t\topen: open,\n\t\t\t\t\topening: opening,\n\t\t\t\t\tplacement: placement,\n\t\t\t\t}\"\n\t\t\t></slot>\n\t\t</span>\n\t\t<teleport to=\"body\">\n\t\t\t<span\n\t\t\t\tv-if=\"hasOpenedOnce || eager\"\n\t\t\t\t:id=\"id\"\n\t\t\t\tref=\"content\"\n\t\t\t\tclass=\"bb-tooltip__bubble-container\"\n\t\t\t\t:class=\"{\n\t\t\t\t\t[`bb-tooltip__bubble-container--${placement}`]: true,\n\t\t\t\t\t[`bb-tooltip__bubble-container--${theme}`]: theme,\n\t\t\t\t\t'bb-tooltip__bubble-container--hidden': closed,\n\t\t\t\t\t'bb-tooltip__bubble-container--closing': closing,\n\t\t\t\t\t'bb-tooltip__bubble-container--opening': opening,\n\t\t\t\t\t'bb-tooltip__bubble-container--open': open,\n\t\t\t\t}\"\n\t\t\t\t:style=\"{\n\t\t\t\t\t...floatingStyles,\n\t\t\t\t\ttransitionDuration: `${props.transitionDuration}ms`,\n\t\t\t\t}\"\n\t\t\t>\n\t\t\t\t<span\n\t\t\t\t\tref=\"bubblearrow\"\n\t\t\t\t\tclass=\"bb-tooltip__arrow\"\n\t\t\t\t\tv-bind=\"arrowAttributes\"\n\t\t\t\t></span>\n\t\t\t\t<span class=\"bb-tooltip__bubble\">\n\t\t\t\t\t<BaseButton\n\t\t\t\t\t\tv-if=\"showClose\"\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\tclass=\"bb-tooltip__close\"\n\t\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\t\t@click=\"onClickClose\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\td=\"M23 23L1 1M23 1L1 23\"\n\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t</BaseButton>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</span>\n\t\t\t</span>\n\t\t</teleport>\n\t</span>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, watch } from 'vue';\nimport {\n\tuseFloating,\n\tautoUpdate,\n\tflip,\n\tshift,\n\tarrow,\n\thide,\n} from '@floating-ui/vue';\nimport { useId } from '@/composables/useId';\nimport { wait } from '@/utilities/functions/wait';\nimport BaseButton from '../BaseButton/BaseButton.vue';\nimport type { CommonProps } from '@/types/CommonProps';\nimport type { Placement } from '@floating-ui/vue';\nimport { throttle } from '@/utilities/functions/throttle';\nimport { waitFor } from '@/utilities/functions/waitFor';\n\nexport type BbTooltipProps = Pick<\n\tCommonProps,\n\t| 'arrowPadding'\n\t| 'block'\n\t| 'disabled'\n\t| 'eager'\n\t| 'id'\n\t| 'padding'\n\t| 'placement'\n\t| 'showClose'\n\t| 'theme'\n\t| 'transitionDuration'\n>;\n\nconst props = withDefaults(defineProps<BbTooltipProps>(), {\n\tarrowPadding: 10,\n\tpadding: 10,\n\tplacement: 'top',\n\tshowClose: true,\n\ttheme: 'default',\n\ttransitionDuration: 150,\n});\n\ntype BbTooltipSlots = {\n\tactivator?: (props: {\n\t\tprops: {\n\t\t\t'aria-describedby': string;\n\t\t\tonMouseenter: typeof onMouseenter;\n\t\t\tonFocus: typeof onFocus;\n\t\t\tonBlur: typeof closeTooltip;\n\t\t};\n\t\tclosed: boolean;\n\t\tclosing: boolean;\n\t\tdisabled?: boolean;\n\t\topen: boolean;\n\t\topening: boolean;\n\t\tplacement: Placement;\n\t}) => any;\n\tdefault?: (props: object) => any;\n};\n\ndefineSlots<BbTooltipSlots>();\n\nconst id = `bb_${props.id ?? useId().id.value}`;\n\nconst wrapper = ref<HTMLElement>();\nconst content = ref<HTMLElement>();\nconst bubblearrow = ref<HTMLElement>();\n\nconst { floatingStyles, placement, middlewareData } = useFloating(\n\twrapper,\n\tcontent,\n\t{\n\t\tplacement: props.placement,\n\t\twhileElementsMounted: autoUpdate,\n\t\tmiddleware: [\n\t\t\tflip(),\n\t\t\tshift({ padding: props.padding }),\n\t\t\tarrow({\n\t\t\t\telement: bubblearrow,\n\t\t\t\tpadding: props.arrowPadding,\n\t\t\t}),\n\t\t\thide(),\n\t\t],\n\t}\n);\n\nlet stopWatcher = () => {};\n\nconst canOpen = ref(true);\n\nconst opening = ref(false);\nconst open = ref(false);\nconst closing = ref(false);\nconst closed = ref(true);\n\nconst arrowAttributes = computed(() => {\n\tif (middlewareData.value.arrow) {\n\t\tconst { x, y } = middlewareData.value.arrow;\n\t\treturn {\n\t\t\tstyle: {\n\t\t\t\tleft: `${x}px`,\n\t\t\t\ttop: `${y}px`,\n\t\t\t},\n\t\t};\n\t}\n\treturn undefined;\n});\n\nconst onMouseenter = () => {\n\tif (open.value || opening.value || props.disabled) return;\n\topenTooltip();\n\tdocument.addEventListener('mouseover', onMouseOver, { passive: true });\n\tdocument.addEventListener('keydown', onEsc, { passive: true });\n};\n\nconst onFocus = onMouseenter;\n\nconst onMouseOver = throttle((event: Event) => {\n\tconst target = event.target;\n\tif (!target) return;\n\tif (target instanceof HTMLElement) {\n\t\tlet isOutside = true;\n\n\t\tif (wrapper.value) {\n\t\t\tif (wrapper.value.contains(target)) {\n\t\t\t\tisOutside = false;\n\t\t\t}\n\t\t}\n\t\tif (content.value) {\n\t\t\tif (content.value.contains(target)) {\n\t\t\t\tisOutside = false;\n\t\t\t}\n\t\t}\n\n\t\tif (isOutside) {\n\t\t\tcloseTooltip();\n\t\t}\n\t}\n}, props.transitionDuration);\n\nconst onEsc = (event: KeyboardEvent) => {\n\tif (open.value) {\n\t\tif (event.key === 'Escape') {\n\t\t\tcloseTooltip();\n\t\t}\n\t}\n};\n\n/* On click of close button tooltip is disallowed from reappearing */\nconst onClickClose = () => {\n\tcanOpen.value = false;\n\tcloseTooltip();\n};\n\nconst hasOpenedOnce = ref(false);\nconst openTooltip = throttle(async () => {\n\tif (!canOpen.value) return;\n\thasOpenedOnce.value = true;\n\tclosed.value = false;\n\tclosing.value = false;\n\topening.value = true;\n\tawait wait(50);\n\topen.value = true;\n\topening.value = false;\n\tstopWatcher = watch(\n\t\t() => middlewareData.value.hide?.referenceHidden,\n\t\tasync (value) => {\n\t\t\tif (!closing.value && !closed.value && value) {\n\t\t\t\tawait closeTooltip();\n\t\t\t}\n\t\t}\n\t);\n}, props.transitionDuration);\n\nconst closeTooltip = throttle(async () => {\n\tawait waitFor(() => !opening.value);\n\tdocument.removeEventListener('mouseover', onMouseOver);\n\tdocument.removeEventListener('keydown', onEsc);\n\topen.value = false;\n\topening.value = false;\n\tclosing.value = true;\n\tawait wait(props.transitionDuration);\n\tclosing.value = false;\n\tclosed.value = true;\n\tstopWatcher();\n}, props.transitionDuration);\n\nconst attributes = computed(() => {\n\tconst classes = {\n\t\t'bb-tooltip--block': props.block,\n\t\t[`bb-tooltip--theme-${props.theme}`]: props.theme,\n\t};\n\treturn {\n\t\tclass: classes,\n\t};\n});\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbTooltip';\n</style>\n"],"names":["props","__props","id","useId","wrapper","ref","content","bubblearrow","floatingStyles","placement","middlewareData","useFloating","autoUpdate","flip","shift","arrow","hide","stopWatcher","canOpen","opening","open","closing","closed","arrowAttributes","computed","x","y","onMouseenter","openTooltip","onMouseOver","onEsc","onFocus","throttle","event","target","isOutside","closeTooltip","onClickClose","hasOpenedOnce","wait","watch","_a","value","waitFor","attributes"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0GA,UAAMA,IAAQC,GA6BRC,IAAK,MAAMF,EAAM,MAAMG,IAAQ,GAAG,KAAK,IAEvCC,IAAUC,KACVC,IAAUD,KACVE,IAAcF,KAEd,EAAE,gBAAAG,GAAgB,WAAAC,GAAW,gBAAAC,EAAmB,IAAAC;AAAA,MACrDP;AAAA,MACAE;AAAA,MACA;AAAA,QACC,WAAWN,EAAM;AAAA,QACjB,sBAAsBY;AAAA,QACtB,YAAY;AAAA,UACXC,GAAK;AAAA,UACLC,GAAM,EAAE,SAASd,EAAM,SAAS;AAAA,UAChCe,EAAM;AAAA,YACL,SAASR;AAAA,YACT,SAASP,EAAM;AAAA,UAAA,CACf;AAAA,UACDgB,GAAK;AAAA,QACN;AAAA,MACD;AAAA,IAAA;AAGD,QAAIC,IAAc,MAAM;AAAA,IAAA;AAElB,UAAAC,IAAUb,EAAI,EAAI,GAElBc,IAAUd,EAAI,EAAK,GACnBe,IAAOf,EAAI,EAAK,GAChBgB,IAAUhB,EAAI,EAAK,GACnBiB,IAASjB,EAAI,EAAI,GAEjBkB,IAAkBC,EAAS,MAAM;AAClC,UAAAd,EAAe,MAAM,OAAO;AAC/B,cAAM,EAAE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tC,MAAMN,EAAa;AAAA,QAErB;AAAA,MAAA;AAAA,IACD,GACEpC,EAAM,kBAAkB,GAErBoC,IAAeJ,EAAS,YAAY;AACzC,YAAMW,EAAQ,MAAM,CAACxB,EAAQ,KAAK,GACzB,SAAA,oBAAoB,aAAaU,CAAW,GAC5C,SAAA,oBAAoB,WAAWC,CAAK,GAC7CV,EAAK,QAAQ,IACbD,EAAQ,QAAQ,IAChBE,EAAQ,QAAQ,IACV,MAAAkB,EAAKvC,EAAM,kBAAkB,GACnCqB,EAAQ,QAAQ,IAChBC,EAAO,QAAQ,IACHL;IAAA,GACVjB,EAAM,kBAAkB,GAErB4C,IAAapB,EAAS,OAKpB;AAAA,MACN,OALe;AAAA,QACf,qBAAqBxB,EAAM;AAAA,QAC3B,CAAC,qBAAqBA,EAAM,KAAK,EAAE,GAAGA,EAAM;AAAA,MAAA;AAAA,IAGrC,EAER;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index115.js","sources":["../src/components/BbTooltip/BbTooltip.vue"],"sourcesContent":["<template>\n\t<span class=\"bb-tooltip\" v-bind=\"attributes\">\n\t\t<span ref=\"wrapper\" class=\"bb-tooltip__wrapper\">\n\t\t\t<slot\n\t\t\t\tname=\"activator\"\n\t\t\t\tv-bind=\"{\n\t\t\t\t\tprops: {\n\t\t\t\t\t\t...(hasOpenedOnce ? { 'aria-describedby': id } : {}),\n\t\t\t\t\t\tonMouseenter,\n\t\t\t\t\t\tonFocus,\n\t\t\t\t\t\tonBlur: closeTooltip,\n\t\t\t\t\t\tdisabled: disabled,\n\t\t\t\t\t},\n\t\t\t\t\tclosed: closed,\n\t\t\t\t\tclosing: closing,\n\t\t\t\t\tdisabled: disabled,\n\t\t\t\t\topen: open,\n\t\t\t\t\topening: opening,\n\t\t\t\t\tplacement: placement,\n\t\t\t\t}\"\n\t\t\t></slot>\n\t\t</span>\n\t\t<teleport to=\"body\">\n\t\t\t<span\n\t\t\t\tv-if=\"hasOpenedOnce || eager\"\n\t\t\t\t:id=\"id\"\n\t\t\t\tref=\"content\"\n\t\t\t\tclass=\"bb-tooltip__bubble-container\"\n\t\t\t\t:class=\"{\n\t\t\t\t\t[`bb-tooltip__bubble-container--${placement}`]: true,\n\t\t\t\t\t[`bb-tooltip__bubble-container--${theme}`]: theme,\n\t\t\t\t\t'bb-tooltip__bubble-container--hidden': closed,\n\t\t\t\t\t'bb-tooltip__bubble-container--closing': closing,\n\t\t\t\t\t'bb-tooltip__bubble-container--opening': opening,\n\t\t\t\t\t'bb-tooltip__bubble-container--open': open,\n\t\t\t\t}\"\n\t\t\t\t:style=\"{\n\t\t\t\t\t...floatingStyles,\n\t\t\t\t\ttransitionDuration: `${props.transitionDuration}ms`,\n\t\t\t\t}\"\n\t\t\t>\n\t\t\t\t<span\n\t\t\t\t\tref=\"bubblearrow\"\n\t\t\t\t\tclass=\"bb-tooltip__arrow\"\n\t\t\t\t\tv-bind=\"arrowAttributes\"\n\t\t\t\t></span>\n\t\t\t\t<span class=\"bb-tooltip__bubble\">\n\t\t\t\t\t<BaseButton\n\t\t\t\t\t\tv-if=\"showClose\"\n\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\tclass=\"bb-tooltip__close\"\n\t\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\t\t@click=\"onClickClose\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<svg\n\t\t\t\t\t\t\tfill=\"none\"\n\t\t\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<path\n\t\t\t\t\t\t\t\td=\"M23 23L1 1M23 1L1 23\"\n\t\t\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\t\t\tstroke-linecap=\"round\"\n\t\t\t\t\t\t\t\tstroke-width=\"2\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</svg>\n\t\t\t\t\t</BaseButton>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</span>\n\t\t\t</span>\n\t\t</teleport>\n\t</span>\n</template>\n\n<script setup lang=\"ts\">\nimport { computed, ref, watch } from 'vue';\nimport {\n\tuseFloating,\n\tautoUpdate,\n\tflip,\n\tshift,\n\tarrow,\n\thide,\n} from '@floating-ui/vue';\nimport { useId } from '@/composables/useId';\nimport { wait } from '@/utilities/functions/wait';\nimport BaseButton from '../BaseButton/BaseButton.vue';\nimport type { CommonProps } from '@/types/CommonProps';\nimport type { Placement } from '@floating-ui/vue';\nimport { throttle } from '@/utilities/functions/throttle';\nimport { waitFor } from '@/utilities/functions/waitFor';\n\nexport type BbTooltipProps = Pick<\n\tCommonProps,\n\t| 'arrowPadding'\n\t| 'block'\n\t| 'disabled'\n\t| 'eager'\n\t| 'id'\n\t| 'padding'\n\t| 'placement'\n\t| 'showClose'\n\t| 'theme'\n\t| 'transitionDuration'\n>;\n\nconst props = withDefaults(defineProps<BbTooltipProps>(), {\n\tarrowPadding: 10,\n\tpadding: 10,\n\tplacement: 'top',\n\tshowClose: true,\n\ttheme: 'default',\n\ttransitionDuration: 250,\n});\n\ntype BbTooltipSlots = {\n\tactivator?: (props: {\n\t\tprops: {\n\t\t\t'aria-describedby': string;\n\t\t\tonMouseenter: typeof onMouseenter;\n\t\t\tonFocus: typeof onFocus;\n\t\t\tonBlur: typeof closeTooltip;\n\t\t};\n\t\tclosed: boolean;\n\t\tclosing: boolean;\n\t\tdisabled?: boolean;\n\t\topen: boolean;\n\t\topening: boolean;\n\t\tplacement: Placement;\n\t}) => any;\n\tdefault?: (props: object) => any;\n};\n\ndefineSlots<BbTooltipSlots>();\n\nconst id = `bb_${props.id ?? useId().id.value}`;\n\nconst wrapper = ref<HTMLElement>();\nconst content = ref<HTMLElement>();\nconst bubblearrow = ref<HTMLElement>();\n\nconst { floatingStyles, placement, middlewareData } = useFloating(\n\twrapper,\n\tcontent,\n\t{\n\t\tplacement: props.placement,\n\t\twhileElementsMounted: autoUpdate,\n\t\tmiddleware: [\n\t\t\tflip(),\n\t\t\tshift({ padding: props.padding }),\n\t\t\tarrow({\n\t\t\t\telement: bubblearrow,\n\t\t\t\tpadding: props.arrowPadding,\n\t\t\t}),\n\t\t\thide(),\n\t\t],\n\t}\n);\n\nlet stopWatcher = () => {};\n\nconst canOpen = ref(true);\n\nconst opening = ref(false);\nconst open = ref(false);\nconst closing = ref(false);\nconst closed = ref(true);\n\nconst arrowAttributes = computed(() => {\n\tif (middlewareData.value.arrow) {\n\t\tconst { x, y } = middlewareData.value.arrow;\n\t\treturn {\n\t\t\tstyle: {\n\t\t\t\tleft: `${x}px`,\n\t\t\t\ttop: `${y}px`,\n\t\t\t},\n\t\t};\n\t}\n\treturn undefined;\n});\n\nconst onMouseenter = () => {\n\tif (open.value || opening.value || props.disabled) return;\n\topenTooltip();\n\tdocument.addEventListener('mouseover', onMouseOver, { passive: true });\n\tdocument.addEventListener('keydown', onEsc, { passive: true });\n};\n\nconst onFocus = onMouseenter;\n\nconst onMouseOver = throttle((event: Event) => {\n\tconst target = event.target;\n\tif (!target) return;\n\tif (target instanceof HTMLElement) {\n\t\tlet isOutside = true;\n\n\t\tif (wrapper.value) {\n\t\t\tif (wrapper.value.contains(target)) {\n\t\t\t\tisOutside = false;\n\t\t\t}\n\t\t}\n\t\tif (content.value) {\n\t\t\tif (content.value.contains(target)) {\n\t\t\t\tisOutside = false;\n\t\t\t}\n\t\t}\n\n\t\tif (isOutside) {\n\t\t\tcloseTooltip();\n\t\t}\n\t}\n}, props.transitionDuration);\n\nconst onEsc = (event: KeyboardEvent) => {\n\tif (open.value) {\n\t\tif (event.key === 'Escape') {\n\t\t\tcloseTooltip();\n\t\t}\n\t}\n};\n\n/* On click of close button tooltip is disallowed from reappearing */\nconst onClickClose = () => {\n\tcanOpen.value = false;\n\tcloseTooltip();\n};\n\nconst hasOpenedOnce = ref(false);\nconst openTooltip = throttle(async () => {\n\tif (!canOpen.value) return;\n\thasOpenedOnce.value = true;\n\tclosed.value = false;\n\tclosing.value = false;\n\topening.value = true;\n\tawait wait(50);\n\topen.value = true;\n\topening.value = false;\n\tstopWatcher = watch(\n\t\t() => middlewareData.value.hide?.referenceHidden,\n\t\tasync (value) => {\n\t\t\tif (!closing.value && !closed.value && value) {\n\t\t\t\tawait closeTooltip();\n\t\t\t}\n\t\t}\n\t);\n}, props.transitionDuration);\n\nconst closeTooltip = throttle(async () => {\n\tawait waitFor(() => !opening.value);\n\tdocument.removeEventListener('mouseover', onMouseOver);\n\tdocument.removeEventListener('keydown', onEsc);\n\topen.value = false;\n\topening.value = false;\n\tclosing.value = true;\n\tawait wait(props.transitionDuration);\n\tclosing.value = false;\n\tclosed.value = true;\n\tstopWatcher();\n}, props.transitionDuration);\n\nconst attributes = computed(() => {\n\tconst classes = {\n\t\t'bb-tooltip--block': props.block,\n\t\t[`bb-tooltip--theme-${props.theme}`]: props.theme,\n\t};\n\treturn {\n\t\tclass: classes,\n\t};\n});\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BbTooltip';\n</style>\n"],"names":["props","__props","id","useId","wrapper","ref","content","bubblearrow","floatingStyles","placement","middlewareData","useFloating","autoUpdate","flip","shift","arrow","hide","stopWatcher","canOpen","opening","open","closing","closed","arrowAttributes","computed","x","y","onMouseenter","openTooltip","onMouseOver","onEsc","onFocus","throttle","event","target","isOutside","closeTooltip","onClickClose","hasOpenedOnce","wait","watch","_a","value","waitFor","attributes"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0GA,UAAMA,IAAQC,GA6BRC,IAAK,MAAMF,EAAM,MAAMG,IAAQ,GAAG,KAAK,IAEvCC,IAAUC,KACVC,IAAUD,KACVE,IAAcF,KAEd,EAAE,gBAAAG,GAAgB,WAAAC,GAAW,gBAAAC,EAAmB,IAAAC;AAAA,MACrDP;AAAA,MACAE;AAAA,MACA;AAAA,QACC,WAAWN,EAAM;AAA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EAAM,QAAQ,YACJG;IAEf,GAIKC,IAAe,MAAM;AAC1B,MAAAnB,EAAQ,QAAQ,IACHkB;IAAA,GAGRE,IAAgBjC,EAAI,EAAK,GACzBuB,IAAcI,EAAS,YAAY;AACpC,MAACd,EAAQ,UACboB,EAAc,QAAQ,IACtBhB,EAAO,QAAQ,IACfD,EAAQ,QAAQ,IAChBF,EAAQ,QAAQ,IAChB,MAAMoB,EAAK,EAAE,GACbnB,EAAK,QAAQ,IACbD,EAAQ,QAAQ,IACFF,IAAAuB;AAAA,QACb;;AAAM,kBAAAC,IAAA/B,EAAe,MAAM,SAArB,gBAAA+B,EAA2B;AAAA;AAAA,QACjC,OAAOC,MAAU;AAChB,UAAI,CAACrB,EAAQ,SAAS,CAACC,EAAO,SAASoB,KACtC,MAAMN,EAAa;AAAA,QAErB;AAAA,MAAA;AAAA,IACD,GACEpC,EAAM,kBAAkB,GAErBoC,IAAeJ,EAAS,YAAY;AACzC,YAAMW,EAAQ,MAAM,CAACxB,EAAQ,KAAK,GACzB,SAAA,oBAAoB,aAAaU,CAAW,GAC5C,SAAA,oBAAoB,WAAWC,CAAK,GAC7CV,EAAK,QAAQ,IACbD,EAAQ,QAAQ,IAChBE,EAAQ,QAAQ,IACV,MAAAkB,EAAKvC,EAAM,kBAAkB,GACnCqB,EAAQ,QAAQ,IAChBC,EAAO,QAAQ,IACHL;IAAA,GACVjB,EAAM,kBAAkB,GAErB4C,IAAapB,EAAS,OAKpB;AAAA,MACN,OALe;AAAA,QACf,qBAAqBxB,EAAM;AAAA,QAC3B,CAAC,qBAAqBA,EAAM,KAAK,EAAE,GAAGA,EAAM;AAAA,MAAA;AAAA,IAGrC,EAER;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index117.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as $, computed as g, resolveComponent as y, openBlock as f, createElementBlock as i, Fragment as k, renderList as h, normalizeClass as b, createElementVNode as s, renderSlot as t, createVNode as v, createSlots as B, withCtx as _, mergeProps as C } from "vue";
2
- import { flattenTree as T } from "./index265.js";
2
+ import { flattenTree as T } from "./index282.js";
3
3
  const w = { class: "bb-tree-row" }, E = { class: "bb-tree-main-content" }, N = /* @__PURE__ */ $({
4
4
  __name: "BbTree",
5
5
  props: {
package/dist/index12.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as y, getCurrentInstance as p, computed as s, resolveComponent as d, openBlock as k, createBlock as h, resolveDynamicComponent as C, mergeProps as x, withCtx as S, renderSlot as L, createTextVNode as B, toDisplayString as N } from "vue";
2
2
  import { _config as o } from "./index3.js";
3
- import { useLogger as m } from "./index206.js";
3
+ import { useLogger as m } from "./index221.js";
4
4
  const P = /* @__PURE__ */ y({
5
5
  __name: "BaseButton",
6
6
  props: {