bitboss-ui 2.0.102 → 2.0.103

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 (173) hide show
  1. package/dist/components/BaseSelect/BaseSelect.vue.d.ts +10 -16
  2. package/dist/components/BaseSwitchGroup/BaseSwitchGroup.vue.d.ts +109 -7
  3. package/dist/components/BbSelect/BbSelect.vue.d.ts +2 -16
  4. package/dist/composables/useBaseOptions.d.ts +31 -0
  5. package/dist/composables/useCoherence.d.ts +20 -0
  6. package/dist/composables/useHashedWatcher.d.ts +2 -0
  7. package/dist/composables/useIndexById.d.ts +11 -0
  8. package/dist/composables/useItemsGetter.d.ts +12 -0
  9. package/dist/composables/usePrefill.d.ts +12 -0
  10. package/dist/index100.js +88 -60
  11. package/dist/index101.js +10 -13
  12. package/dist/index111.js +154 -126
  13. package/dist/index119.js +2 -2
  14. package/dist/index121.js +5 -5
  15. package/dist/index123.js +1 -1
  16. package/dist/index127.js +1 -1
  17. package/dist/index128.js +1 -1
  18. package/dist/index129.js +1 -1
  19. package/dist/index13.js +2 -2
  20. package/dist/index131.js +1 -1
  21. package/dist/index132.js +69 -65
  22. package/dist/index15.js +4 -4
  23. package/dist/index17.js +3 -3
  24. package/dist/index19.js +126 -82
  25. package/dist/index205.js +52 -80
  26. package/dist/index207.js +13 -5
  27. package/dist/index208.js +19 -15
  28. package/dist/index209.js +4 -16
  29. package/dist/index21.js +14 -14
  30. package/dist/index210.js +124 -17
  31. package/dist/index211.js +5 -19
  32. package/dist/index212.js +121 -23
  33. package/dist/index213.js +19 -3
  34. package/dist/index214.js +16 -2
  35. package/dist/index215.js +16 -8
  36. package/dist/index216.js +2 -250
  37. package/dist/index217.js +2 -52
  38. package/dist/index218.js +41 -44
  39. package/dist/index219.js +6 -5
  40. package/dist/index220.js +5 -60
  41. package/dist/index221.js +10 -51
  42. package/dist/index222.js +371 -0
  43. package/dist/index223.js +2 -13
  44. package/dist/index224.js +4 -2
  45. package/dist/index225.js +2 -4
  46. package/dist/index226.js +3 -2
  47. package/dist/index227.js +7 -20
  48. package/dist/index228.js +8 -4
  49. package/dist/index229.js +3 -3
  50. package/dist/index23.js +16 -16
  51. package/dist/index230.js +84 -168
  52. package/dist/index232.js +10 -0
  53. package/dist/index233.js +25 -8
  54. package/dist/index234.js +14 -123
  55. package/dist/index235.js +47 -124
  56. package/dist/index236.js +15 -2
  57. package/dist/index237.js +11 -40
  58. package/dist/index238.js +16 -6
  59. package/dist/index239.js +19 -5
  60. package/dist/index240.js +27 -12
  61. package/dist/index241.js +247 -366
  62. package/dist/index242.js +52 -3
  63. package/dist/index243.js +44 -7
  64. package/dist/index244.js +5 -2
  65. package/dist/index245.js +59 -17
  66. package/dist/index246.js +2 -106
  67. package/dist/index247.js +117 -0
  68. package/dist/index248.js +3 -100
  69. package/dist/index249.js +4 -0
  70. package/dist/index25.js +6 -6
  71. package/dist/index250.js +18 -2
  72. package/dist/index251.js +106 -2
  73. package/dist/index253.js +100 -3
  74. package/dist/index255.js +12 -23
  75. package/dist/index256.js +2 -89
  76. package/dist/index257.js +4 -0
  77. package/dist/index258.js +10 -9
  78. package/dist/index259.js +3 -6
  79. package/dist/index260.js +6 -16
  80. package/dist/index261.js +15 -8
  81. package/dist/index262.js +9 -8
  82. package/dist/index263.js +23 -281
  83. package/dist/index264.js +89 -6
  84. package/dist/index266.js +3 -2
  85. package/dist/index268.js +7 -2
  86. package/dist/index269.js +176 -2
  87. package/dist/index27.js +1 -1
  88. package/dist/index270.js +281 -2
  89. package/dist/index271.js +6 -2
  90. package/dist/index272.js +2 -2
  91. package/dist/index273.js +2 -2
  92. package/dist/index274.js +2 -2
  93. package/dist/index275.js +2 -28
  94. package/dist/index276.js +2 -22
  95. package/dist/index277.js +128 -0
  96. package/dist/index278.js +429 -5
  97. package/dist/index279.js +22 -3
  98. package/dist/index281.js +2 -4
  99. package/dist/index282.js +4 -224
  100. package/dist/index283.js +23 -171
  101. package/dist/index284.js +200 -3
  102. package/dist/index285.js +435 -11
  103. package/dist/index286.js +125 -7
  104. package/dist/index287.js +87 -15
  105. package/dist/index288.js +8 -3
  106. package/dist/index289.js +3 -7
  107. package/dist/index29.js +3 -3
  108. package/dist/index290.js +7 -11
  109. package/dist/index291.js +11 -2
  110. package/dist/index292.js +15 -124
  111. package/dist/index293.js +9 -431
  112. package/dist/index294.js +7 -21
  113. package/dist/index296.js +2 -2
  114. package/dist/index297.js +2 -89
  115. package/dist/index298.js +2 -200
  116. package/dist/index299.js +2 -436
  117. package/dist/index300.js +2 -127
  118. package/dist/index301.js +22 -2
  119. package/dist/index303.js +224 -3
  120. package/dist/index304.js +3 -213
  121. package/dist/index305.js +2 -65
  122. package/dist/index306.js +213 -5
  123. package/dist/index307.js +2 -3
  124. package/dist/index308.js +5 -3
  125. package/dist/index309.js +66 -3
  126. package/dist/index31.js +2 -2
  127. package/dist/index310.js +3 -58
  128. package/dist/index311.js +3 -33
  129. package/dist/index312.js +57 -7
  130. package/dist/index313.js +32 -7
  131. package/dist/index314.js +1 -1
  132. package/dist/index315.js +1 -1
  133. package/dist/index316.js +3 -7
  134. package/dist/index317.js +3 -18
  135. package/dist/index318.js +8 -7
  136. package/dist/index319.js +8 -4
  137. package/dist/index320.js +7 -2
  138. package/dist/index321.js +17 -45
  139. package/dist/index322.js +7 -480
  140. package/dist/index323.js +49 -0
  141. package/dist/index324.js +2 -424
  142. package/dist/index326.js +480 -2
  143. package/dist/index327.js +426 -0
  144. package/dist/index329.js +4 -0
  145. package/dist/index33.js +102 -61
  146. package/dist/index35.js +3 -3
  147. package/dist/index37.js +284 -244
  148. package/dist/index39.js +5 -5
  149. package/dist/index41.js +2 -2
  150. package/dist/index43.js +129 -84
  151. package/dist/index45.js +122 -120
  152. package/dist/index47.js +2 -2
  153. package/dist/index49.js +2 -2
  154. package/dist/index55.js +1 -1
  155. package/dist/index57.js +2 -2
  156. package/dist/index61.js +2 -2
  157. package/dist/index75.js +3 -3
  158. package/dist/index79.js +2 -2
  159. package/dist/index81.js +1 -1
  160. package/dist/index84.js +3 -3
  161. package/dist/index86.js +1 -1
  162. package/dist/index88.js +4 -4
  163. package/dist/index90.js +1 -1
  164. package/package.json +1 -1
  165. package/dist/composables/useOptions.d.ts +0 -43
  166. package/dist/index206.js +0 -4
  167. package/dist/index231.js +0 -86
  168. package/dist/index252.js +0 -12
  169. package/dist/index254.js +0 -11
  170. package/dist/index265.js +0 -4
  171. package/dist/index302.js +0 -5
  172. /package/dist/{index267.js → index295.js} +0 -0
  173. /package/dist/{index325.js → index328.js} +0 -0
package/dist/index132.js CHANGED
@@ -1,16 +1,16 @@
1
- import { toValue as O, tryOnScopeDispose as R, notNullish as $, noop as M, useDebounceFn as q, useThrottleFn as G, tryOnMounted as X, isObject as J, isClient as K } from "./index205.js";
2
- import { createFilterWrapper as ve, debounceFilter as de, getLifeCycleTarget as pe, throttleFilter as me } from "./index205.js";
3
- import { computed as S, watch as z, ref as w, reactive as k, getCurrentInstance as U, onMounted as Z, watchEffect as ee } from "vue";
1
+ import { toValue as O, tryOnScopeDispose as R, notNullish as $, noop as W, useDebounceFn as q, useThrottleFn as G, tryOnMounted as X, isObject as J, isClient as K } from "./index247.js";
2
+ import { bypassFilter as ve, createFilterWrapper as de, debounceFilter as pe, debouncedWatch as he, getLifeCycleTarget as me, throttleFilter as be, debouncedWatch as ge, watchWithFilter as ye } from "./index247.js";
3
+ import { computed as w, watch as z, ref as S, reactive as k, getCurrentInstance as U, onMounted as Z, watchEffect as ee } from "vue";
4
4
  function L(l) {
5
5
  var o;
6
6
  const n = O(l);
7
7
  return (o = n == null ? void 0 : n.$el) != null ? o : n;
8
8
  }
9
- const W = K ? window : void 0;
9
+ const M = K ? window : void 0;
10
10
  function P(...l) {
11
11
  let o, n, t, e;
12
- if (typeof l[0] == "string" || Array.isArray(l[0]) ? ([n, t, e] = l, o = W) : [o, n, t, e] = l, !o)
13
- return M;
12
+ if (typeof l[0] == "string" || Array.isArray(l[0]) ? ([n, t, e] = l, o = M) : [o, n, t, e] = l, !o)
13
+ return W;
14
14
  Array.isArray(n) || (n = [n]), Array.isArray(t) || (t = [t]);
15
15
  const f = [], a = () => {
16
16
  f.forEach((i) => i()), f.length = 0;
@@ -21,7 +21,7 @@ function P(...l) {
21
21
  return;
22
22
  const d = J(u) ? { ...u } : u;
23
23
  f.push(
24
- ...n.flatMap((b) => t.map((m) => v(i, b, m, d)))
24
+ ...n.flatMap((b) => t.map((h) => v(i, b, h, d)))
25
25
  );
26
26
  },
27
27
  { immediate: !0, flush: "post" }
@@ -31,19 +31,19 @@ function P(...l) {
31
31
  return R(c), c;
32
32
  }
33
33
  function te() {
34
- const l = w(!1), o = U();
34
+ const l = S(!1), o = U();
35
35
  return o && Z(() => {
36
36
  l.value = !0;
37
37
  }, o), l;
38
38
  }
39
39
  function V(l) {
40
40
  const o = te();
41
- return S(() => (o.value, !!l()));
41
+ return w(() => (o.value, !!l()));
42
42
  }
43
43
  function ne(l, o = {}) {
44
- const { window: n = W } = o, t = V(() => n && "matchMedia" in n && typeof n.matchMedia == "function");
44
+ const { window: n = M } = o, t = V(() => n && "matchMedia" in n && typeof n.matchMedia == "function");
45
45
  let e;
46
- const f = w(!1), a = (c) => {
46
+ const f = S(!1), a = (c) => {
47
47
  f.value = c.matches;
48
48
  }, v = () => {
49
49
  e && ("removeEventListener" in e ? e.removeEventListener("change", a) : e.removeListener(a));
@@ -55,11 +55,11 @@ function ne(l, o = {}) {
55
55
  }), f;
56
56
  }
57
57
  function le(l, o, n = {}) {
58
- const { window: t = W, ...e } = n;
58
+ const { window: t = M, ...e } = n;
59
59
  let f;
60
60
  const a = V(() => t && "ResizeObserver" in t), v = () => {
61
61
  f && (f.disconnect(), f = void 0);
62
- }, p = S(() => {
62
+ }, p = w(() => {
63
63
  const u = O(l);
64
64
  return Array.isArray(u) ? u.map((d) => L(d)) : [L(u)];
65
65
  }), c = z(
@@ -85,17 +85,17 @@ function ue(l, o, n = {}) {
85
85
  root: t,
86
86
  rootMargin: e = "0px",
87
87
  threshold: f = 0,
88
- window: a = W,
88
+ window: a = M,
89
89
  immediate: v = !0
90
- } = n, p = V(() => a && "IntersectionObserver" in a), c = S(() => {
91
- const m = O(l);
92
- return (Array.isArray(m) ? m : [m]).map(L).filter($);
90
+ } = n, p = V(() => a && "IntersectionObserver" in a), c = w(() => {
91
+ const h = O(l);
92
+ return (Array.isArray(h) ? h : [h]).map(L).filter($);
93
93
  });
94
- let i = M;
95
- const u = w(v), d = p.value ? z(
94
+ let i = W;
95
+ const u = S(v), d = p.value ? z(
96
96
  () => [c.value, L(t), u.value],
97
- ([m, I]) => {
98
- if (i(), !u.value || !m.length)
97
+ ([h, I]) => {
98
+ if (i(), !u.value || !h.length)
99
99
  return;
100
100
  const T = new IntersectionObserver(
101
101
  o,
@@ -105,12 +105,12 @@ function ue(l, o, n = {}) {
105
105
  threshold: f
106
106
  }
107
107
  );
108
- m.forEach((h) => h && T.observe(h)), i = () => {
109
- T.disconnect(), i = M;
108
+ h.forEach((m) => m && T.observe(m)), i = () => {
109
+ T.disconnect(), i = W;
110
110
  };
111
111
  },
112
112
  { immediate: v, flush: "post" }
113
- ) : M, b = () => {
113
+ ) : W, b = () => {
114
114
  i(), d(), u.value = !1;
115
115
  };
116
116
  return R(b), {
@@ -130,8 +130,8 @@ function se(l, o = {}) {
130
130
  const {
131
131
  throttle: n = 0,
132
132
  idle: t = 200,
133
- onStop: e = M,
134
- onScroll: f = M,
133
+ onStop: e = W,
134
+ onScroll: f = W,
135
135
  offset: a = {
136
136
  left: 0,
137
137
  right: 0,
@@ -143,18 +143,18 @@ function se(l, o = {}) {
143
143
  passive: !0
144
144
  },
145
145
  behavior: p = "auto",
146
- window: c = W,
146
+ window: c = M,
147
147
  onError: i = (r) => {
148
148
  console.error(r);
149
149
  }
150
- } = o, u = w(0), d = w(0), b = S({
150
+ } = o, u = S(0), d = S(0), b = w({
151
151
  get() {
152
152
  return u.value;
153
153
  },
154
154
  set(r) {
155
155
  I(r, void 0);
156
156
  }
157
- }), m = S({
157
+ }), h = w({
158
158
  get() {
159
159
  return d.value;
160
160
  },
@@ -163,21 +163,21 @@ function se(l, o = {}) {
163
163
  }
164
164
  });
165
165
  function I(r, x) {
166
- var g, N, H, A;
166
+ var g, F, N, A;
167
167
  if (!c)
168
168
  return;
169
169
  const E = O(l);
170
170
  if (!E)
171
171
  return;
172
- (H = E instanceof Document ? c.document.body : E) == null || H.scrollTo({
173
- top: (g = O(x)) != null ? g : m.value,
174
- left: (N = O(r)) != null ? N : b.value,
172
+ (N = E instanceof Document ? c.document.body : E) == null || N.scrollTo({
173
+ top: (g = O(x)) != null ? g : h.value,
174
+ left: (F = O(r)) != null ? F : b.value,
175
175
  behavior: O(p)
176
176
  });
177
- const F = ((A = E == null ? void 0 : E.document) == null ? void 0 : A.documentElement) || (E == null ? void 0 : E.documentElement) || E;
178
- b != null && (u.value = F.scrollLeft), m != null && (d.value = F.scrollTop);
177
+ const H = ((A = E == null ? void 0 : E.document) == null ? void 0 : A.documentElement) || (E == null ? void 0 : E.documentElement) || E;
178
+ b != null && (u.value = H.scrollLeft), h != null && (d.value = H.scrollTop);
179
179
  }
180
- const T = w(!1), h = k({
180
+ const T = S(!1), m = k({
181
181
  left: !0,
182
182
  right: !1,
183
183
  top: !0,
@@ -187,26 +187,26 @@ function se(l, o = {}) {
187
187
  right: !1,
188
188
  top: !1,
189
189
  bottom: !1
190
- }), C = (r) => {
190
+ }), D = (r) => {
191
191
  T.value && (T.value = !1, y.left = !1, y.right = !1, y.top = !1, y.bottom = !1, e(r));
192
- }, D = q(C, n + t), s = (r) => {
192
+ }, C = q(D, n + t), s = (r) => {
193
193
  var x;
194
194
  if (!c)
195
195
  return;
196
- const g = ((x = r == null ? void 0 : r.document) == null ? void 0 : x.documentElement) || (r == null ? void 0 : r.documentElement) || L(r), { display: N, flexDirection: H } = getComputedStyle(g), A = g.scrollLeft;
196
+ const g = ((x = r == null ? void 0 : r.document) == null ? void 0 : x.documentElement) || (r == null ? void 0 : r.documentElement) || L(r), { display: F, flexDirection: N } = getComputedStyle(g), A = g.scrollLeft;
197
197
  y.left = A < u.value, y.right = A > u.value;
198
- const E = Math.abs(A) <= (a.left || 0), F = Math.abs(A) + g.clientWidth >= g.scrollWidth - (a.right || 0) - Q;
199
- N === "flex" && H === "row-reverse" ? (h.left = F, h.right = E) : (h.left = E, h.right = F), u.value = A;
198
+ const E = Math.abs(A) <= (a.left || 0), H = Math.abs(A) + g.clientWidth >= g.scrollWidth - (a.right || 0) - Q;
199
+ F === "flex" && N === "row-reverse" ? (m.left = H, m.right = E) : (m.left = E, m.right = H), u.value = A;
200
200
  let _ = g.scrollTop;
201
201
  r === c.document && !_ && (_ = c.document.body.scrollTop), y.top = _ < d.value, y.bottom = _ > d.value;
202
202
  const Y = Math.abs(_) <= (a.top || 0), j = Math.abs(_) + g.clientHeight >= g.scrollHeight - (a.bottom || 0) - Q;
203
- N === "flex" && H === "column-reverse" ? (h.top = j, h.bottom = Y) : (h.top = Y, h.bottom = j), d.value = _;
203
+ F === "flex" && N === "column-reverse" ? (m.top = j, m.bottom = Y) : (m.top = Y, m.bottom = j), d.value = _;
204
204
  }, B = (r) => {
205
205
  var x;
206
206
  if (!c)
207
207
  return;
208
208
  const g = (x = r.target.documentElement) != null ? x : r.target;
209
- s(g), T.value = !0, D(r), f(r);
209
+ s(g), T.value = !0, C(r), f(r);
210
210
  };
211
211
  return P(
212
212
  l,
@@ -225,13 +225,13 @@ function se(l, o = {}) {
225
225
  }), P(
226
226
  l,
227
227
  "scrollend",
228
- C,
228
+ D,
229
229
  v
230
230
  ), {
231
231
  x: b,
232
- y: m,
232
+ y: h,
233
233
  isScrolling: T,
234
- arrivedState: h,
234
+ arrivedState: m,
235
235
  directions: y,
236
236
  measure() {
237
237
  const r = O(l);
@@ -240,7 +240,7 @@ function se(l, o = {}) {
240
240
  };
241
241
  }
242
242
  function ie(l, o) {
243
- const n = w(l), t = S(() => Array.isArray(n.value) ? n.value : Object.keys(n.value)), e = w(t.value.indexOf(o ?? t.value[0])), f = S(() => i(e.value)), a = S(() => e.value === 0), v = S(() => e.value === t.value.length - 1), p = S(() => t.value[e.value + 1]), c = S(() => t.value[e.value - 1]);
243
+ const n = S(l), t = w(() => Array.isArray(n.value) ? n.value : Object.keys(n.value)), e = S(t.value.indexOf(o ?? t.value[0])), f = w(() => i(e.value)), a = w(() => e.value === 0), v = w(() => e.value === t.value.length - 1), p = w(() => t.value[e.value + 1]), c = w(() => t.value[e.value - 1]);
244
244
  function i(s) {
245
245
  return Array.isArray(n.value) ? n.value[s] : n.value[t.value[s]];
246
246
  }
@@ -254,25 +254,25 @@ function ie(l, o) {
254
254
  function b() {
255
255
  v.value || e.value++;
256
256
  }
257
- function m() {
257
+ function h() {
258
258
  a.value || e.value--;
259
259
  }
260
260
  function I(s) {
261
- D(s) && d(s);
261
+ C(s) && d(s);
262
262
  }
263
263
  function T(s) {
264
264
  return t.value.indexOf(s) === e.value + 1;
265
265
  }
266
- function h(s) {
266
+ function m(s) {
267
267
  return t.value.indexOf(s) === e.value - 1;
268
268
  }
269
269
  function y(s) {
270
270
  return t.value.indexOf(s) === e.value;
271
271
  }
272
- function C(s) {
272
+ function D(s) {
273
273
  return e.value < t.value.indexOf(s);
274
274
  }
275
- function D(s) {
275
+ function C(s) {
276
276
  return e.value > t.value.indexOf(s);
277
277
  }
278
278
  return {
@@ -288,24 +288,24 @@ function ie(l, o) {
288
288
  get: u,
289
289
  goTo: d,
290
290
  goToNext: b,
291
- goToPrevious: m,
291
+ goToPrevious: h,
292
292
  goBackTo: I,
293
293
  isNext: T,
294
- isPrevious: h,
294
+ isPrevious: m,
295
295
  isCurrent: y,
296
- isBefore: C,
297
- isAfter: D
296
+ isBefore: D,
297
+ isAfter: C
298
298
  };
299
299
  }
300
300
  function ae(l = {}) {
301
301
  const {
302
- window: o = W,
302
+ window: o = M,
303
303
  initialWidth: n = Number.POSITIVE_INFINITY,
304
304
  initialHeight: t = Number.POSITIVE_INFINITY,
305
305
  listenOrientation: e = !0,
306
306
  includeScrollbar: f = !0,
307
307
  type: a = "inner"
308
- } = l, v = w(n), p = w(t), c = () => {
308
+ } = l, v = S(n), p = S(t), c = () => {
309
309
  o && (a === "outer" ? (v.value = o.outerWidth, p.value = o.outerHeight) : f ? (v.value = o.innerWidth, p.value = o.innerHeight) : (v.value = o.document.documentElement.clientWidth, p.value = o.document.documentElement.clientHeight));
310
310
  };
311
311
  if (c(), X(c), P("resize", c, { passive: !0 }), e) {
@@ -315,15 +315,17 @@ function ae(l = {}) {
315
315
  return { width: v, height: p };
316
316
  }
317
317
  export {
318
- ve as createFilterWrapper,
319
- de as debounceFilter,
320
- W as defaultWindow,
321
- pe as getLifeCycleTarget,
318
+ ve as bypassFilter,
319
+ de as createFilterWrapper,
320
+ pe as debounceFilter,
321
+ he as debouncedWatch,
322
+ M as defaultWindow,
323
+ me as getLifeCycleTarget,
322
324
  K as isClient,
323
325
  J as isObject,
324
- M as noop,
326
+ W as noop,
325
327
  $ as notNullish,
326
- me as throttleFilter,
328
+ be as throttleFilter,
327
329
  O as toValue,
328
330
  X as tryOnMounted,
329
331
  R as tryOnScopeDispose,
@@ -338,5 +340,7 @@ export {
338
340
  ie as useStepper,
339
341
  V as useSupported,
340
342
  G as useThrottleFn,
341
- ae as useWindowSize
343
+ ae as useWindowSize,
344
+ ge as watchDebounced,
345
+ ye as watchWithFilter
342
346
  };
package/dist/index15.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { defineComponent as k, ref as y, computed as v, watchPostEffect as h, openBlock as g, createElementBlock as C, Fragment as w, createVNode as d, normalizeClass as B, withCtx as n, renderSlot as r, createElementVNode as s, normalizeStyle as V, withModifiers as H, withDirectives as E, mergeProps as q, unref as $ } from "vue";
2
- import z from "./index221.js";
2
+ import z from "./index205.js";
3
3
  /* empty css */
4
- import I from "./index223.js";
5
- import { vMaska as M } from "./index227.js";
6
- import { isHex as D } from "./index228.js";
4
+ import I from "./index207.js";
5
+ import { vMaska as M } from "./index208.js";
6
+ import { isHex as D } from "./index209.js";
7
7
  const F = ["id", "aria-describedby", "aria-invalid", "autocomplete", "autofocus", "disabled", "name", "placeholder", "readonly", "required", "value"], P = ["aria-invalid", "disabled", "required"], T = /* @__PURE__ */ k({
8
8
  __name: "BaseColorInput",
9
9
  props: {
package/dist/index17.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as E, ref as m, computed as n, watch as _, openBlock as p, createElementBlock as h, normalizeProps as i, guardReactiveProps as f, mergeProps as k, createCommentVNode as I, createElementVNode as l, renderSlot as F } from "vue";
2
- import { isCssColor as y } from "./index224.js";
3
- import { when as N } from "./index225.js";
4
- import { booleanishToBoolean as S } from "./index226.js";
2
+ import { isCssColor as y } from "./index223.js";
3
+ import { when as N } from "./index224.js";
4
+ import { booleanishToBoolean as S } from "./index225.js";
5
5
  const A = {
6
6
  "aria-hidden": "true",
7
7
  class: "bb-base-checkbox-container"
package/dist/index19.js CHANGED
@@ -1,11 +1,17 @@
1
- import { defineComponent as w, ref as v, toRef as l, openBlock as O, createBlock as x, unref as d, withCtx as i, renderSlot as s, normalizeProps as p, guardReactiveProps as f, createVNode as F, mergeProps as g } from "vue";
2
- import { useOptions as M } from "./index230.js";
3
- import H from "./index17.js";
1
+ import { defineComponent as z, ref as B, toRef as d, openBlock as G, createBlock as R, unref as u, withCtx as s, renderSlot as l, normalizeProps as b, guardReactiveProps as v, createVNode as W, mergeProps as w } from "vue";
2
+ import K from "./index17.js";
4
3
  /* empty css */
5
- import P from "./index231.js";
4
+ import N from "./index230.js";
6
5
  /* empty css */
7
- import { useLocale as z } from "./index233.js";
8
- const N = /* @__PURE__ */ w({
6
+ import { useLocale as U } from "./index232.js";
7
+ import { useItemsGetter as q } from "./index233.js";
8
+ import { useIndexById as C } from "./index234.js";
9
+ import { useBaseOptions as J } from "./index235.js";
10
+ import { useCoherence as Q } from "./index236.js";
11
+ import { hash as X } from "./index229.js";
12
+ import { useHashedWatcher as E } from "./index237.js";
13
+ import { usePrefill as Y } from "./index238.js";
14
+ const me = /* @__PURE__ */ z({
9
15
  __name: "BaseCheckboxGroup",
10
16
  props: {
11
17
  ariaDescribedby: {},
@@ -23,7 +29,7 @@ const N = /* @__PURE__ */ w({
23
29
  itemText: {},
24
30
  itemValue: {},
25
31
  loadingText: {},
26
- max: {},
32
+ max: { default: 1 / 0 },
27
33
  modelValue: {},
28
34
  modelValueDebounceTime: { default: 0 },
29
35
  name: {},
@@ -31,110 +37,148 @@ const N = /* @__PURE__ */ w({
31
37
  readonly: { type: Boolean }
32
38
  },
33
39
  emits: ["blur", "change", "click", "focus", "inactive", "input", "keydown", "mousedown", "mouseup", "update:modelValue"],
34
- setup(y, { emit: T }) {
35
- const n = y, t = T, { t: b } = z(), h = v(), r = v(!1), {
36
- innerLoading: k,
37
- options: D,
38
- selectOption: L,
39
- unselectOption: C
40
- } = M({
41
- dependencies: l(n, "dependencies"),
42
- depsDebounceTime: n.depsDebounceTime,
43
- disabled: l(n, "disabled"),
44
- emit: t,
45
- enforceCoherence: n.enforceCoherence,
46
- items: l(n, "items"),
47
- itemText: n.itemText,
48
- itemValue: n.itemValue,
49
- max: n.max,
50
- modelValue: l(n, "modelValue"),
51
- modelValueDebounceTime: n.modelValueDebounceTime,
40
+ setup(L, { emit: D }) {
41
+ const o = L, a = D;
42
+ if (!Array.isArray(o.modelValue))
43
+ throw new Error("Model value must be an array in checkbox group.");
44
+ const { t: y } = U(), g = B(), i = B(!1), {
45
+ getter: c,
46
+ items: I,
47
+ loading: $
48
+ } = q({
49
+ items: d(o, "items"),
50
+ debounce: 0
51
+ }), m = () => {
52
+ o.enforceCoherence && !T.value && a("update:modelValue", F.value.coherent);
53
+ }, { hasPrefilled: x } = Y({
54
+ onStart: !0,
55
+ currentValue: o.modelValue,
52
56
  multiple: !0,
53
- prefill: !0,
54
- queryDebounceTime: 0,
55
- resetQueryOnOptionSelected: !1,
56
- stash: !1
57
- }), E = (e) => {
58
- if (n.id)
59
- return [n.id, e.valueHash].filter(Boolean).join("-");
60
- }, V = (e, a) => {
61
- t("change", e), a.selected ? C(a) : L(a);
62
- }, B = {
63
- onBlur: (e) => t("blur", e),
64
- onClick: (e) => t("click", e),
57
+ fn: async ({ prefill: e }) => {
58
+ await c(e, o.modelValue), m();
59
+ }
60
+ }), { data: V } = C({
61
+ items: d(o, "modelValue")
62
+ }), { options: k } = J({
63
+ disabled: d(o, "disabled"),
64
+ items: I,
65
+ itemText: o.itemText,
66
+ itemValue: o.itemValue,
67
+ max: o.max,
68
+ selectable: !0,
69
+ selectedIndexedByHash: V
70
+ }), H = async (e) => {
71
+ a("update:modelValue", o.modelValue.concat(e.value));
72
+ }, M = async (e) => {
73
+ const t = { ...V.value };
74
+ delete t[e.valueHash], a("update:modelValue", Object.values(t));
75
+ }, { data: P } = C({
76
+ items: k,
77
+ key: "valueHash"
78
+ }), { coherent: T, status: F } = Q({
79
+ modelValue: d(o, "modelValue"),
80
+ multiple: !0,
81
+ iteratee: (e) => !!P.value[X(e)]
82
+ });
83
+ let r = 0;
84
+ E(
85
+ () => o.modelValue,
86
+ async () => {
87
+ r++, T.value || (await c(!1, o.modelValue), m()), r--;
88
+ },
89
+ {
90
+ debounce: o.modelValueDebounceTime
91
+ }
92
+ ), E(
93
+ () => [o.dependencies, o.items],
94
+ async () => {
95
+ x.value && (r++, await c(!1, o.modelValue), r === 1 && m(), r--);
96
+ },
97
+ {
98
+ debounce: o.depsDebounceTime
99
+ }
100
+ );
101
+ const O = (e) => {
102
+ if (o.id)
103
+ return [o.id, e.valueHash].filter(Boolean).join("-");
104
+ }, S = (e, t) => {
105
+ a("change", e), t.selected ? M(t) : H(t);
106
+ }, A = {
107
+ onBlur: (e) => a("blur", e),
108
+ onClick: (e) => a("click", e),
65
109
  onFocus: (e) => {
66
- t("focus", e), r.value || (document.addEventListener("focusin", u, { passive: !0 }), document.addEventListener("click", c, { passive: !0 }), r.value = !0);
110
+ a("focus", e), i.value || (document.addEventListener("focusin", p, { passive: !0 }), document.addEventListener("click", f, { passive: !0 }), i.value = !0);
67
111
  },
68
- onInput: (e) => t("input", e),
69
- onKeydown: (e) => t("keydown", e),
70
- onMousedown: (e) => t("mousedown", e),
71
- onMouseup: (e) => t("mouseup", e)
72
- }, u = (e) => {
73
- var a;
74
- e.target instanceof HTMLElement && ((a = h.value) != null && a.contains(e.target) || (t("inactive"), r.value = !1, document.removeEventListener("focusin", u), document.removeEventListener("click", c)));
75
- }, c = (e) => {
76
- var a;
77
- e.target instanceof HTMLElement && ((a = h.value) != null && a.contains(e.target) || (t("inactive"), r.value = !1, document.removeEventListener("focusin", u), document.removeEventListener("click", c)));
112
+ onInput: (e) => a("input", e),
113
+ onKeydown: (e) => a("keydown", e),
114
+ onMousedown: (e) => a("mousedown", e),
115
+ onMouseup: (e) => a("mouseup", e)
116
+ }, p = (e) => {
117
+ var t;
118
+ e.target instanceof HTMLElement && ((t = g.value) != null && t.contains(e.target) || (a("inactive"), i.value = !1, document.removeEventListener("focusin", p), document.removeEventListener("click", f)));
119
+ }, f = (e) => {
120
+ var t;
121
+ e.target instanceof HTMLElement && ((t = g.value) != null && t.contains(e.target) || (a("inactive"), i.value = !1, document.removeEventListener("focusin", p), document.removeEventListener("click", f)));
78
122
  };
79
- return (e, a) => (O(), x(P, {
123
+ return (e, t) => (G(), R(N, {
80
124
  class: "bb-base-checkbox-group",
81
125
  direction: e.direction,
82
126
  "has-errors": e.hasErrors,
83
127
  "hide-label": e.hideLabel,
84
- loading: !!d(k),
85
- "loading-text": e.loadingText || d(b)("common.loadingText"),
86
- "no-data-text": e.noDataText || d(b)("common.noDataText"),
87
- options: d(D)
128
+ loading: !!u($),
129
+ "loading-text": e.loadingText || u(y)("common.loadingText"),
130
+ "no-data-text": e.noDataText || u(y)("common.noDataText"),
131
+ options: u(k)
88
132
  }, {
89
- prepend: i(() => [
90
- s(e.$slots, "prepend")
133
+ prepend: s(() => [
134
+ l(e.$slots, "prepend")
91
135
  ]),
92
- loading: i(() => [
93
- s(e.$slots, "loading")
136
+ loading: s(() => [
137
+ l(e.$slots, "loading")
94
138
  ]),
95
- "no-data": i(() => [
96
- s(e.$slots, "no-data")
139
+ "no-data": s(() => [
140
+ l(e.$slots, "no-data")
97
141
  ]),
98
- label: i((o) => [
99
- s(e.$slots, "label", p(f(o)))
142
+ label: s((n) => [
143
+ l(e.$slots, "label", b(v(n)))
100
144
  ]),
101
- "option:prepend": i((o) => [
102
- s(e.$slots, "option:prepend", p(f(o)))
145
+ "option:prepend": s((n) => [
146
+ l(e.$slots, "option:prepend", b(v(n)))
103
147
  ]),
104
- input: i(({ option: o, index: $ }) => [
105
- F(H, g({
106
- id: E(o),
148
+ input: s(({ option: n, index: j }) => [
149
+ W(K, w({
150
+ id: O(n),
107
151
  "aria-describedby": e.ariaDescribedby,
108
- autofocus: e.autofocus && !$,
109
- checked: o.selected,
152
+ autofocus: e.autofocus && !j,
153
+ checked: n.selected,
110
154
  color: e.color,
111
- disabled: o.disabled,
155
+ disabled: n.disabled,
112
156
  "has-errors": e.hasErrors,
113
157
  name: e.name,
114
158
  readonly: e.readonly,
115
- "true-value": o.value
116
- }, B, {
117
- onChange: (m) => V(m, o)
159
+ "true-value": n.value
160
+ }, A, {
161
+ onChange: (h) => S(h, n)
118
162
  }), {
119
- icon: i((m) => [
120
- s(e.$slots, "icon", g({
121
- item: o.item,
122
- text: o.text
123
- }, m))
163
+ icon: s((h) => [
164
+ l(e.$slots, "icon", w({
165
+ item: n.item,
166
+ text: n.text
167
+ }, h))
124
168
  ]),
125
169
  _: 2
126
170
  }, 1040, ["id", "aria-describedby", "autofocus", "checked", "color", "disabled", "has-errors", "name", "readonly", "true-value", "onChange"])
127
171
  ]),
128
- "option:append": i((o) => [
129
- s(e.$slots, "option:append", p(f(o)))
172
+ "option:append": s((n) => [
173
+ l(e.$slots, "option:append", b(v(n)))
130
174
  ]),
131
- append: i(() => [
132
- s(e.$slots, "append")
175
+ append: s(() => [
176
+ l(e.$slots, "append")
133
177
  ]),
134
178
  _: 3
135
179
  }, 8, ["direction", "has-errors", "hide-label", "loading", "loading-text", "no-data-text", "options"]));
136
180
  }
137
181
  });
138
182
  export {
139
- N as default
183
+ me as default
140
184
  };