bitboss-ui 2.0.129 → 2.0.130

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 (149) hide show
  1. package/dist/index100.js +7 -7
  2. package/dist/index111.js +10 -10
  3. package/dist/index119.js +2 -2
  4. package/dist/index121.js +4 -4
  5. package/dist/index123.js +1 -1
  6. package/dist/index125.js +1 -1
  7. package/dist/index127.js +1 -1
  8. package/dist/index128.js +1 -1
  9. package/dist/index129.js +1 -1
  10. package/dist/index131.js +1 -1
  11. package/dist/index132.js +2 -2
  12. package/dist/index133.js +2 -2
  13. package/dist/index15.js +5 -5
  14. package/dist/index17.js +3 -3
  15. package/dist/index19.js +7 -7
  16. package/dist/index205.js +115 -2
  17. package/dist/index206.js +2 -115
  18. package/dist/index208.js +1 -1
  19. package/dist/index209.js +3 -2
  20. package/dist/index21.js +14 -14
  21. package/dist/index210.js +65 -4
  22. package/dist/index212.js +13 -281
  23. package/dist/index213.js +19 -124
  24. package/dist/index214.js +4 -16
  25. package/dist/index215.js +13 -16
  26. package/dist/index216.js +3 -19
  27. package/dist/index217.js +40 -14
  28. package/dist/index218.js +6 -2
  29. package/dist/index219.js +7 -2
  30. package/dist/index220.js +15 -41
  31. package/dist/index221.js +5 -13
  32. package/dist/index222.js +15 -19
  33. package/dist/index223.js +16 -6
  34. package/dist/index224.js +19 -94
  35. package/dist/index225.js +17 -0
  36. package/dist/index226.js +18 -64
  37. package/dist/index227.js +29 -0
  38. package/dist/index228.js +2 -13
  39. package/dist/index229.js +250 -2
  40. package/dist/index23.js +16 -16
  41. package/dist/index230.js +52 -4
  42. package/dist/index231.js +44 -3
  43. package/dist/index232.js +5 -86
  44. package/dist/index233.js +62 -0
  45. package/dist/index234.js +2 -29
  46. package/dist/index235.js +4 -17
  47. package/dist/index236.js +2 -51
  48. package/dist/index237.js +125 -15
  49. package/dist/index238.js +2 -12
  50. package/dist/index239.js +94 -16
  51. package/dist/index241.js +2 -27
  52. package/dist/index242.js +79 -243
  53. package/dist/index244.js +29 -44
  54. package/dist/index245.js +17 -5
  55. package/dist/index246.js +50 -59
  56. package/dist/index247.js +15 -3
  57. package/dist/index248.js +12 -7
  58. package/dist/index249.js +16 -15
  59. package/dist/index25.js +6 -6
  60. package/dist/index251.js +2 -2
  61. package/dist/index257.js +2 -2
  62. package/dist/index258.js +3 -3
  63. package/dist/index263.js +3 -3
  64. package/dist/index267.js +28 -4
  65. package/dist/index268.js +222 -26
  66. package/dist/index269.js +1 -1
  67. package/dist/index27.js +1 -1
  68. package/dist/index273.js +2 -2
  69. package/dist/index275.js +430 -5
  70. package/dist/index276.js +2 -2
  71. package/dist/index277.js +89 -2
  72. package/dist/index278.js +281 -2
  73. package/dist/index279.js +6 -2
  74. package/dist/index280.js +2 -2
  75. package/dist/index282.js +2 -431
  76. package/dist/index283.js +2 -3
  77. package/dist/index284.js +2 -224
  78. package/dist/index285.js +2 -3
  79. package/dist/index286.js +2 -17
  80. package/dist/index287.js +2 -9
  81. package/dist/index288.js +2 -200
  82. package/dist/index289.js +2 -2
  83. package/dist/index29.js +3 -3
  84. package/dist/index290.js +2 -2
  85. package/dist/index291.js +21 -1
  86. package/dist/index293.js +4 -2
  87. package/dist/index294.js +200 -2
  88. package/dist/index295.js +9 -22
  89. package/dist/index296.js +11 -0
  90. package/dist/index297.js +8 -9
  91. package/dist/index298.js +2 -2
  92. package/dist/index299.js +3 -89
  93. package/dist/index300.js +3 -8
  94. package/dist/index301.js +15 -124
  95. package/dist/index302.js +126 -3
  96. package/dist/index303.js +1 -1
  97. package/dist/index304.js +3 -2
  98. package/dist/index305.js +2 -436
  99. package/dist/index306.js +422 -113
  100. package/dist/index307.js +127 -2
  101. package/dist/index308.js +3 -67
  102. package/dist/index309.js +3 -5
  103. package/dist/index31.js +2 -2
  104. package/dist/index310.js +58 -3
  105. package/dist/index311.js +2 -3
  106. package/dist/index312.js +5 -58
  107. package/dist/index313.js +66 -32
  108. package/dist/index314.js +4 -25
  109. package/dist/index315.js +7 -479
  110. package/dist/index316.js +6 -4
  111. package/dist/index317.js +6 -7
  112. package/dist/index318.js +18 -52
  113. package/dist/index319.js +32 -52
  114. package/dist/index320.js +25 -3
  115. package/dist/index321.js +53 -7
  116. package/dist/index322.js +53 -7
  117. package/dist/index323.js +3 -18
  118. package/dist/index324.js +480 -47
  119. package/dist/index325.js +47 -2
  120. package/dist/index326.js +4 -0
  121. package/dist/index329.js +1 -1
  122. package/dist/index33.js +7 -7
  123. package/dist/index330.js +2 -47
  124. package/dist/index331.js +49 -0
  125. package/dist/index35.js +4 -4
  126. package/dist/index37.js +146 -141
  127. package/dist/index39.js +2 -2
  128. package/dist/index41.js +2 -2
  129. package/dist/index43.js +7 -7
  130. package/dist/index45.js +6 -6
  131. package/dist/index47.js +2 -2
  132. package/dist/index49.js +2 -2
  133. package/dist/index53.js +1 -1
  134. package/dist/index55.js +1 -1
  135. package/dist/index57.js +1 -1
  136. package/dist/index61.js +1 -1
  137. package/dist/index75.js +1 -1
  138. package/dist/index77.js +1 -1
  139. package/dist/index81.js +1 -1
  140. package/dist/index84.js +4 -4
  141. package/dist/index86.js +2 -2
  142. package/dist/index88.js +5 -5
  143. package/dist/index90.js +1 -1
  144. package/package.json +1 -1
  145. package/dist/index211.js +0 -4
  146. package/dist/index240.js +0 -21
  147. package/dist/index243.js +0 -54
  148. package/dist/index292.js +0 -4
  149. package/dist/index328.js +0 -4
@@ -0,0 +1,49 @@
1
+ function D(n, l, e) {
2
+ let i = e.initialDeps ?? [], t;
3
+ return () => {
4
+ var r, c, h, m;
5
+ let f;
6
+ e.key && ((r = e.debug) != null && r.call(e)) && (f = Date.now());
7
+ const o = n();
8
+ if (!(o.length !== i.length || o.some((a, u) => i[u] !== a)))
9
+ return t;
10
+ i = o;
11
+ let g;
12
+ if (e.key && ((c = e.debug) != null && c.call(e)) && (g = Date.now()), t = l(...o), e.key && ((h = e.debug) != null && h.call(e))) {
13
+ const a = Math.round((Date.now() - f) * 100) / 100, u = Math.round((Date.now() - g) * 100) / 100, w = u / 16, s = (d, b) => {
14
+ for (d = String(d); d.length < b; )
15
+ d = " " + d;
16
+ return d;
17
+ };
18
+ console.info(
19
+ `%c⏱ ${s(u, 5)} /${s(a, 5)} ms`,
20
+ `
21
+ font-size: .6rem;
22
+ font-weight: bold;
23
+ color: hsl(${Math.max(
24
+ 0,
25
+ Math.min(120 - 120 * w, 120)
26
+ )}deg 100% 31%);`,
27
+ e == null ? void 0 : e.key
28
+ );
29
+ }
30
+ return (m = e == null ? void 0 : e.onChange) == null || m.call(e, t), t;
31
+ };
32
+ }
33
+ function T(n, l) {
34
+ if (n === void 0)
35
+ throw new Error("Unexpected undefined");
36
+ return n;
37
+ }
38
+ const y = (n, l) => Math.abs(n - l) < 1, M = (n, l, e) => {
39
+ let i;
40
+ return function(...t) {
41
+ n.clearTimeout(i), i = n.setTimeout(() => l.apply(this, t), e);
42
+ };
43
+ };
44
+ export {
45
+ y as approxEqual,
46
+ M as debounce,
47
+ D as memo,
48
+ T as notUndefined
49
+ };
package/dist/index35.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { defineComponent as I, ref as v, computed as f, openBlock as l, createElementBlock as r, mergeProps as h, createElementVNode as i, renderSlot as p, Fragment as V, renderList as M, normalizeClass as D, toDisplayString as F, unref as y } from "vue";
2
- import { booleanishToBoolean as T } from "./index211.js";
3
- import { identity as $ } from "./index218.js";
4
- import { isCssColor as k } from "./index209.js";
2
+ import { booleanishToBoolean as T } from "./index236.js";
3
+ import { identity as $ } from "./index238.js";
4
+ import { isCssColor as k } from "./index234.js";
5
5
  import { isNotNil as q } from "./index134.js";
6
- import { useLocale as x } from "./index221.js";
6
+ import { useLocale as x } from "./index215.js";
7
7
  const H = { class: "bb-base-rating__inner-container" }, S = { class: "bb-base-rating__label-text sr-only" }, N = ["id", "aria-describedby", "autofocus", "checked", "disabled", "name", "required", "value"], j = ["height", "width"], W = /* @__PURE__ */ I({
8
8
  __name: "BaseRating",
9
9
  props: {
package/dist/index37.js CHANGED
@@ -1,41 +1,41 @@
1
- import { defineComponent as Ge, ref as f, computed as y, toRef as T, openBlock as h, createBlock as L, normalizeClass as Z, withCtx as u, renderSlot as p, createVNode as K, unref as V, createElementVNode as F, createElementBlock as H, Fragment as ee, toDisplayString as _e, createCommentVNode as te, withDirectives as je, withModifiers as c, withKeys as g, vModelDynamic as Je, renderList as Qe, mergeProps as le, normalizeStyle as Xe, nextTick as U } from "vue";
1
+ import { defineComponent as Re, ref as f, computed as y, toRef as T, openBlock as h, createBlock as H, normalizeClass as Z, withCtx as u, renderSlot as c, createVNode as U, unref as V, createElementVNode as L, createElementBlock as F, Fragment as ee, toDisplayString as Ge, createCommentVNode as te, withDirectives as _e, withModifiers as p, withKeys as g, vModelDynamic as Je, renderList as Qe, mergeProps as le, normalizeStyle as Xe, nextTick as j } from "vue";
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  import { useId as Ye } from "./index8.js";
5
5
  import { useMobile as Ze } from "./index9.js";
6
6
  import et from "./index128.js";
7
7
  /* empty css */
8
- import { last as tt } from "./index219.js";
8
+ import { last as tt } from "./index228.js";
9
9
  import { matchAnyKey as ae } from "./index250.js";
10
10
  import { useFloating as lt } from "./index251.js";
11
11
  import { useIntersectionObserver as at } from "./index132.js";
12
12
  import { wait as E } from "./index130.js";
13
- import { when as ot } from "./index210.js";
13
+ import { when as ot } from "./index235.js";
14
14
  import nt from "./index252.js";
15
15
  /* empty css */
16
16
  import it from "./index254.js";
17
17
  /* empty css */
18
- import ut from "./index226.js";
18
+ import ut from "./index210.js";
19
19
  /* empty css */
20
- import rt from "./index228.js";
21
- import { waitFor as st } from "./index223.js";
22
- import dt from "./index249.js";
23
- import { useItemsGetter as pt } from "./index234.js";
24
- import { usePrefill as ct } from "./index239.js";
20
+ import rt from "./index212.js";
21
+ import { waitFor as st } from "./index218.js";
22
+ import dt from "./index220.js";
23
+ import { useItemsGetter as ct } from "./index244.js";
24
+ import { usePrefill as pt } from "./index249.js";
25
25
  import { useArray as mt } from "./index256.js";
26
- import { useBaseOptions as ft } from "./index236.js";
27
- import { useIndexById as oe } from "./index235.js";
28
- import { useCoherence as vt } from "./index237.js";
26
+ import { useBaseOptions as ft } from "./index246.js";
27
+ import { useIndexById as oe } from "./index245.js";
28
+ import { useCoherence as vt } from "./index247.js";
29
29
  import { hash as yt } from "./index208.js";
30
- import { useHashedWatcher as ne } from "./index238.js";
31
- import { useLocale as ht } from "./index221.js";
32
- import { isEmpty as bt } from "./index229.js";
30
+ import { useHashedWatcher as ne } from "./index248.js";
31
+ import { useLocale as ht } from "./index215.js";
32
+ import { isEmpty as bt } from "./index241.js";
33
33
  import gt from "./index257.js";
34
34
  import { autoUpdate as wt, flip as Bt, offset as Vt, shift as It } from "./index258.js";
35
35
  const kt = { class: "bb-base-select__input-container" }, St = {
36
36
  key: 1,
37
37
  class: "bb-base-select__max-reached"
38
- }, Ct = ["id", "aria-controls", "aria-describedby", "aria-expanded", "autocomplete", "autofocus", "disabled", "inputmode", "placeholder", "readonly", "required", "onKeydown"], ul = /* @__PURE__ */ Ge({
38
+ }, Ct = ["id", "aria-controls", "aria-describedby", "aria-expanded", "autocomplete", "autofocus", "disabled", "inputmode", "placeholder", "readonly", "required", "onKeydown"], ul = /* @__PURE__ */ Re({
39
39
  __name: "BaseSelect",
40
40
  props: {
41
41
  allowWriting: { type: [Boolean, String], default: !0 },
@@ -82,7 +82,7 @@ const kt = { class: "bb-base-select__input-container" }, St = {
82
82
  const t = ie, i = ue;
83
83
  if (t.multiple && !Array.isArray(t.modelValue))
84
84
  throw new Error('Multiple is set to "true" but modelValue is not an array.');
85
- const { t: re } = ht(), A = f(null), I = f(null), n = f(null), R = f(null), G = f(null), s = y(
85
+ const { t: re } = ht(), x = f(null), I = f(null), n = f(null), R = f(null), G = f(null), s = y(
86
86
  () => t.comma ? R.value : G.value
87
87
  ), { isMobile: se } = Ze(), de = y(
88
88
  () => t.allowWriting === "not-mobile" && se.value ? "none" : void 0
@@ -95,7 +95,7 @@ const kt = { class: "bb-base-select__input-container" }, St = {
95
95
  },
96
96
  { threshold: [0, 1] }
97
97
  );
98
- const { floatingStyles: pe } = lt(
98
+ const { floatingStyles: ce } = lt(
99
99
  // @ts-expect-error - wrong inferred type
100
100
  I,
101
101
  n,
@@ -104,54 +104,54 @@ const kt = { class: "bb-base-select__input-container" }, St = {
104
104
  whileElementsMounted: wt,
105
105
  middleware: [Bt(), Vt(5), It()]
106
106
  }
107
- ), ce = y(() => {
107
+ ), pe = y(() => {
108
108
  var l;
109
109
  const e = {
110
- ...pe.value,
110
+ ...ce.value,
111
111
  zIndex: "10"
112
112
  };
113
113
  return I.value && (e.width = `${(l = I.value) == null ? void 0 : l.$el.clientWidth}px`), e;
114
- }), q = f(null), x = () => {
115
- q.value instanceof HTMLInputElement && q.value.focus();
114
+ }), A = f(null), q = () => {
115
+ A.value instanceof HTMLInputElement && A.value.focus();
116
116
  }, me = async (e) => {
117
- i("focus", e), Ne(), document.addEventListener("click", $), document.addEventListener("focusin", $);
117
+ i("focus", e), Ne(), document.addEventListener("click", O), document.addEventListener("focusin", O);
118
118
  }, fe = () => {
119
- t.prefill === "focus" && !$e.value && !J.value && De();
119
+ t.prefill === "focus" && !Oe.value && !Q.value && $e();
120
120
  }, ve = async (e) => {
121
121
  i("blur", e);
122
122
  }, ye = (e) => i("change", e), he = (e) => {
123
123
  var l;
124
- i("input", e), a.value === "" && (t.multiple || i("update:modelValue", null)), (l = s.value) == null || l.blur(), N.value && k(), Se(a.value, !1, t.modelValue);
125
- }, $ = async (e) => {
126
- var l, o;
127
- if (e.target instanceof Node && A.value && !A.value.$el.contains(e.target) && !((o = (l = n.value) == null ? void 0 : l.$el) != null && o.contains(e.target))) {
128
- S(), We(), document.removeEventListener("click", $), document.removeEventListener("focusin", $), await E(t.transitionDuration), b();
124
+ i("input", e), o.value === "" && (t.multiple || i("update:modelValue", null)), (l = s.value) == null || l.blur(), W.value && k(), Se(o.value, !1, t.modelValue);
125
+ }, O = async (e) => {
126
+ var l, a;
127
+ if (e.target instanceof Node && x.value && !x.value.$el.contains(e.target) && !((a = (l = n.value) == null ? void 0 : l.$el) != null && a.contains(e.target))) {
128
+ S(), We(), document.removeEventListener("click", O), document.removeEventListener("focusin", O), await E(t.transitionDuration), b();
129
129
  return;
130
130
  }
131
- }, w = y(() => !(t.readonly || t.disabled || O.value || !s.value && t.multiple && r.value.length <= t.maxSelectedLabels)), be = async () => {
132
- var e, l, o;
133
- w.value && ((e = s.value) == null || e.blur(), m.value ? (l = n.value) == null || l.focusPrevious() : (await k(), await E(t.transitionDuration), (o = n.value) == null || o.focusLastSelected()));
131
+ }, w = y(() => !(t.readonly || t.disabled || D.value || !s.value && t.multiple && r.value.length <= t.maxSelectedLabels)), be = async () => {
132
+ var e, l, a;
133
+ w.value && ((e = s.value) == null || e.blur(), m.value ? (l = n.value) == null || l.focusPrevious() : (await k(), await E(t.transitionDuration), (a = n.value) == null || a.focusLastSelected()));
134
134
  }, ge = async () => {
135
- var e, l, o;
136
- w.value && ((e = s.value) == null || e.blur(), m.value ? (l = n.value) == null || l.focusNext() : (await k(), await E(t.transitionDuration), (o = n.value) == null || o.focusFirstSelected()));
135
+ var e, l, a;
136
+ w.value && ((e = s.value) == null || e.blur(), m.value ? (l = n.value) == null || l.focusNext() : (await k(), await E(t.transitionDuration), (a = n.value) == null || a.focusFirstSelected()));
137
137
  }, we = (e) => {
138
- var o, d, v, C;
139
- if (!w.value || !t.multiple || a.value || (e.preventDefault(), (o = n.value) == null || o.blur(), !r.value.length)) return;
138
+ var a, d, v, C;
139
+ if (!w.value || !t.multiple || o.value || (e.preventDefault(), (a = n.value) == null || a.blur(), !r.value.length)) return;
140
140
  (d = s.value) == null || d.focusPrevious();
141
141
  const l = (v = s.value) == null ? void 0 : v.getHighlighted();
142
142
  l && ((C = n.value) == null || C.focusByHash(l.valueHash));
143
143
  }, Be = (e) => {
144
- var o, d, v, C;
145
- if (!w.value || !t.multiple || a.value || (e.preventDefault(), (o = n.value) == null || o.blur(), !r.value.length)) return;
144
+ var a, d, v, C;
145
+ if (!w.value || !t.multiple || o.value || (e.preventDefault(), (a = n.value) == null || a.blur(), !r.value.length)) return;
146
146
  (d = s.value) == null || d.focusNext();
147
147
  const l = (v = s.value) == null ? void 0 : v.getHighlighted();
148
148
  l && ((C = n.value) == null || C.focusByHash(l.valueHash));
149
149
  }, Ve = async () => {
150
- var l, o;
150
+ var l, a;
151
151
  if (!w.value)
152
152
  return;
153
153
  if (m.value) {
154
- if ((o = n.value) != null && o.getHighlighted()) {
154
+ if ((a = n.value) != null && a.getHighlighted()) {
155
155
  n.value.confirmOption();
156
156
  return;
157
157
  }
@@ -159,88 +159,93 @@ const kt = { class: "bb-base-select__input-container" }, St = {
159
159
  await k(), await E(t.transitionDuration), r.value.length && ((l = n.value) == null || l.focusFirstSelected());
160
160
  return;
161
161
  }
162
- const e = a.value.trim();
163
- Ee(e) || (i("option:add", e), a.value = "");
162
+ const e = o.value.trim();
163
+ Ee(e) || (i("option:add", e), o.value = "");
164
164
  }, Ie = async () => {
165
165
  m.value && await S();
166
166
  }, ke = async () => {
167
167
  var e, l;
168
- !w.value || a.value || !r.value.length || ((e = s.value) != null && e.getHighlighted() && s.value.confirmOption(), await U(), (l = s.value) == null || l.focusPrevious());
169
- }, a = f(""), {
168
+ !w.value || o.value || !r.value.length || ((e = s.value) != null && e.getHighlighted() && s.value.confirmOption(), await j(), (l = s.value) == null || l.focusPrevious());
169
+ }, o = f(""), {
170
170
  getter: M,
171
171
  debouncedGetter: Se,
172
172
  items: Ce,
173
- loading: j
174
- } = pt({
173
+ loading: J
174
+ } = ct({
175
175
  items: T(t, "items"),
176
176
  debounce: t.queryDebounceTime
177
177
  }), P = () => {
178
178
  var e, l;
179
179
  t.enforceCoherence && !Y.value && (t.multiple ? i("update:modelValue", Me.value.coherent) : i("update:modelValue", null), (e = s.value) == null || e.blur(), (l = n.value) == null || l.blur());
180
180
  }, {
181
- hasPrefilled: J,
182
- isPrefilling: $e,
183
- prefill: De
184
- } = ct({
181
+ hasPrefilled: Q,
182
+ isPrefilling: Oe,
183
+ prefill: $e
184
+ } = pt({
185
185
  onStart: t.prefill === !0,
186
186
  currentValue: t.modelValue,
187
187
  multiple: t.multiple,
188
188
  fn: async ({ prefill: e }) => {
189
- await M(a.value, e, t.modelValue), P(), b();
189
+ await M(o.value, e, t.modelValue), P(), b();
190
190
  }
191
191
  }), {
192
- array: Oe,
192
+ array: De,
193
193
  add: Te,
194
- remove: Le,
195
- set: Fe
196
- } = mt(), r = y(() => D.value.filter((e) => e.selected)), He = y(() => r.value.length ? "" : t.placeholder), { data: Q, get: Ee } = oe({
194
+ remove: He,
195
+ set: Le
196
+ } = mt(), r = y(() => {
197
+ const e = Object.fromEntries(
198
+ Object.entries(N.value).map(([l], a) => [l, a])
199
+ );
200
+ return $.value.filter((l) => l.selected).sort((l, a) => e[l.valueHash] - e[a.valueHash]);
201
+ }), Fe = y(() => r.value.length ? "" : t.placeholder), { data: N, get: Ee } = oe({
197
202
  items: T(t, "modelValue")
198
- }), { options: D } = ft({
203
+ }), { options: $ } = ft({
199
204
  disabled: T(t, "disabled"),
200
- items: y(() => [...Ce.value, ...Oe.value]),
205
+ items: y(() => [...Ce.value, ...De.value]),
201
206
  itemText: t.itemText,
202
207
  itemValue: t.itemValue,
203
208
  max: t.max,
204
209
  selectable: !0,
205
- selectedIndexedByHash: Q
206
- }), O = y(() => !!(j.value || t.loading)), Ae = y(() => {
210
+ selectedIndexedByHash: N
211
+ }), D = y(() => !!(J.value || t.loading)), xe = y(() => {
207
212
  let e = [];
208
213
  const l = r.value.some(
209
- (d) => d.text === a.value
214
+ (d) => d.text === o.value
210
215
  );
211
- return (t.multiple && a.value || a.value && !l && !t.multiple) && t.filterBy ? e = D.value.filter((d) => {
216
+ return (t.multiple && o.value || o.value && !l && !t.multiple) && t.filterBy ? e = $.value.filter((d) => {
212
217
  let v = !1;
213
- return typeof t.filterBy == "function" ? v = t.filterBy(d.value, d.item) : Array.isArray(t.filterBy) && t.filterBy.length && (v = v || ae(d.item, t.filterBy, a.value.trim())), v || ae(d, ["text"], a.value.trim());
214
- }) : e = D.value, e;
218
+ return typeof t.filterBy == "function" ? v = t.filterBy(d.value, d.item) : Array.isArray(t.filterBy) && t.filterBy.length && (v = v || ae(d.item, t.filterBy, o.value.trim())), v || ae(d, ["text"], o.value.trim());
219
+ }) : e = $.value, e;
215
220
  }), b = () => {
216
221
  if (t.multiple) {
217
- a.value = "";
222
+ o.value = "";
218
223
  return;
219
224
  }
220
225
  let e;
221
- r.value && (e = tt(r.value)), a.value = (e == null ? void 0 : e.text) || "";
222
- }, qe = async (e) => {
223
- t.multiple ? (i("update:modelValue", t.modelValue.concat(e.value)), t.stash && Te(e.item), b()) : (t.stash && Fe(e.item), i("update:modelValue", e.value), await U(), b()), x(), t.multiple || S();
226
+ r.value && (e = tt(r.value)), o.value = (e == null ? void 0 : e.text) || "";
227
+ }, Ae = async (e) => {
228
+ t.multiple ? (i("update:modelValue", t.modelValue.concat(e.value)), t.stash && Te(e.item), b()) : (t.stash && Le(e.item), i("update:modelValue", e.value), await j(), b()), q(), t.multiple || S();
224
229
  }, X = async (e) => {
225
- if (Le((l) => l.valueHash !== e.valueHash), t.multiple) {
226
- const l = { ...Q.value };
230
+ if (He((l) => l.valueHash !== e.valueHash), t.multiple) {
231
+ const l = { ...N.value };
227
232
  delete l[e.valueHash], i("update:modelValue", Object.values(l));
228
233
  } else
229
- i("update:modelValue", null), await U(), b();
230
- x();
231
- }, { data: xe } = oe({
232
- items: D,
234
+ i("update:modelValue", null), await j(), b();
235
+ q();
236
+ }, { data: qe } = oe({
237
+ items: $,
233
238
  key: "valueHash"
234
239
  }), { coherent: Y, status: Me } = vt({
235
240
  modelValue: T(t, "modelValue"),
236
241
  multiple: t.multiple,
237
- iteratee: (e) => !!xe.value[yt(e)]
242
+ iteratee: (e) => !!qe.value[yt(e)]
238
243
  });
239
244
  let B = 0;
240
245
  ne(
241
246
  () => t.modelValue,
242
247
  async () => {
243
- B++, Y.value || (await M(a.value, !1, t.modelValue), P()), B === 1 && b(), B--;
248
+ B++, Y.value || (await M(o.value, !1, t.modelValue), P()), B === 1 && b(), B--;
244
249
  },
245
250
  {
246
251
  debounce: t.modelValueDebounceTime
@@ -248,23 +253,23 @@ const kt = { class: "bb-base-select__input-container" }, St = {
248
253
  ), ne(
249
254
  () => [t.dependencies, t.items],
250
255
  async () => {
251
- J.value && (B++, await M(a.value, !1, t.modelValue), B === 1 && (P(), b()), B--);
256
+ Q.value && (B++, await M(o.value, !1, t.modelValue), B === 1 && (P(), b()), B--);
252
257
  },
253
258
  {
254
259
  debounce: t.depsDebounceTime
255
260
  }
256
261
  );
257
- const m = f(!1), N = f(!0), W = f(!1), k = async () => {
258
- W.value = !0, await st(() => !!n.value), N.value = !1, m.value = !0;
262
+ const m = f(!1), W = f(!0), z = f(!1), k = async () => {
263
+ z.value = !0, await st(() => !!n.value), W.value = !1, m.value = !0;
259
264
  }, S = async () => {
260
265
  var e;
261
- m.value = !1, N.value = !0, (e = s.value) == null || e.blur();
262
- }, Pe = () => m.value ? S() : k(), z = f(!1), Ne = () => {
263
- z.value = !0;
266
+ m.value = !1, W.value = !0, (e = s.value) == null || e.blur();
267
+ }, Pe = () => m.value ? S() : k(), K = f(!1), Ne = () => {
268
+ K.value = !0;
264
269
  }, We = () => {
265
- z.value = !1, i("inactive");
270
+ K.value = !1, i("inactive");
266
271
  }, ze = (e) => {
267
- e.preventDefault(), i("click", e), !(t.disabled || t.readonly) && (x(), Pe());
272
+ e.preventDefault(), i("click", e), !(t.disabled || t.readonly) && (q(), Pe());
268
273
  }, Ke = ot(
269
274
  (e) => typeof e != "string",
270
275
  JSON.stringify
@@ -276,18 +281,18 @@ const kt = { class: "bb-base-select__input-container" }, St = {
276
281
  type: "hidden",
277
282
  value: l
278
283
  };
279
- })), Re = () => {
284
+ })), je = () => {
280
285
  let e = null;
281
286
  t.multiple && (e = []), i("update:modelValue", e);
282
287
  };
283
- return (e, l) => (h(), L(rt, {
288
+ return (e, l) => (h(), H(rt, {
284
289
  ref_key: "outerContainer",
285
- ref: A,
290
+ ref: x,
286
291
  class: Z({
287
292
  "bb-base-select": !0,
288
- "bb-base-select--active": z.value,
293
+ "bb-base-select--active": K.value,
289
294
  "bb-base-select--shown": m.value,
290
- "bb-base-select--loading": O.value,
295
+ "bb-base-select--loading": D.value,
291
296
  "bb-base-select--disabled": e.disabled,
292
297
  "bb-base-select--errors": e.hasErrors,
293
298
  "bb-base-select--readonly": e.readonly,
@@ -296,58 +301,58 @@ const kt = { class: "bb-base-select__input-container" }, St = {
296
301
  onClick: ze
297
302
  }, {
298
303
  "prepend-outer": u(() => [
299
- p(e.$slots, "prepend-outer", { query: a.value })
304
+ c(e.$slots, "prepend-outer", { query: o.value })
300
305
  ]),
301
306
  "append-outer": u(() => [
302
- p(e.$slots, "append-outer", { query: a.value })
307
+ c(e.$slots, "append-outer", { query: o.value })
303
308
  ]),
304
309
  default: u(() => [
305
- K(ut, {
310
+ U(ut, {
306
311
  ref_key: "innerContainer",
307
312
  ref: I,
308
313
  "append:icon": t["append:icon"],
309
314
  clearable: e.clearable && !V(bt)(e.modelValue),
310
315
  "prepend:icon": t["prepend:icon"],
311
316
  "prevent-focus": !0,
312
- "onClick:clear": Re
317
+ "onClick:clear": je
313
318
  }, {
314
319
  prepend: u(() => [
315
- p(e.$slots, "prepend", { query: a.value })
320
+ c(e.$slots, "prepend", { query: o.value })
316
321
  ]),
317
322
  prefix: u(() => [
318
- p(e.$slots, "prefix")
323
+ c(e.$slots, "prefix")
319
324
  ]),
320
325
  append: u(() => [
321
- p(e.$slots, "append", { query: a.value })
326
+ c(e.$slots, "append", { query: o.value })
322
327
  ]),
323
328
  suffix: u(() => [
324
- p(e.$slots, "suffix")
329
+ c(e.$slots, "suffix")
325
330
  ]),
326
331
  default: u(() => [
327
- K(V(et), { tag: "span" }, {
332
+ U(V(et), { tag: "span" }, {
328
333
  default: u(() => [
329
- F("span", kt, [
330
- e.multiple && r.value.length <= e.maxSelectedLabels ? (h(), H(ee, { key: 0 }, [
331
- e.comma ? (h(), L(it, {
334
+ L("span", kt, [
335
+ e.multiple && r.value.length <= e.maxSelectedLabels ? (h(), F(ee, { key: 0 }, [
336
+ e.comma ? (h(), H(it, {
332
337
  key: 0,
333
338
  ref_key: "commaBox",
334
339
  ref: R,
335
340
  options: r.value
336
- }, null, 8, ["options"])) : (h(), L(nt, {
341
+ }, null, 8, ["options"])) : (h(), H(nt, {
337
342
  key: 1,
338
343
  ref_key: "chipsBox",
339
344
  ref: G,
340
345
  options: r.value,
341
346
  "onOption:unselected": X
342
347
  }, null, 8, ["options"]))
343
- ], 64)) : e.multiple ? (h(), H("span", St, _e(e.selectedLabelsFn ? e.selectedLabelsFn(r.value.length) : V(re)("select.multipleMaxReached", r.value.length)), 1)) : te("", !0),
344
- je(F("input", {
348
+ ], 64)) : e.multiple ? (h(), F("span", St, Ge(e.selectedLabelsFn ? e.selectedLabelsFn(r.value.length) : V(re)("select.multipleMaxReached", r.value.length)), 1)) : te("", !0),
349
+ _e(L("input", {
345
350
  id: V(_),
346
351
  ref_key: "input",
347
- ref: q,
348
- "onUpdate:modelValue": l[0] || (l[0] = (o) => a.value = o),
352
+ ref: A,
353
+ "onUpdate:modelValue": l[0] || (l[0] = (a) => o.value = a),
349
354
  "aria-autocomplete": "list",
350
- "aria-controls": W.value ? `${V(_)}_listbox` : void 0,
355
+ "aria-controls": z.value ? `${V(_)}_listbox` : void 0,
351
356
  "aria-describedby": e.ariaDescribedby,
352
357
  "aria-expanded": m.value,
353
358
  autocomplete: e.autocomplete,
@@ -355,43 +360,43 @@ const kt = { class: "bb-base-select__input-container" }, St = {
355
360
  class: Z("bb-base-select__text-input"),
356
361
  disabled: e.disabled,
357
362
  inputmode: de.value,
358
- placeholder: He.value,
363
+ placeholder: Fe.value,
359
364
  readonly: e.readonly || !e.allowWriting,
360
365
  required: e.required && (!e.multiple || !e.modelValue.length),
361
366
  role: "combobox",
362
367
  size: "1",
363
368
  type: "text",
364
- onBlur: c(ve, ["stop"]),
365
- onChange: c(ye, ["stop"]),
366
- onFocusOnce: c(fe, ["stop"]),
367
- onFocus: c(me, ["stop"]),
368
- onInput: c(he, ["stop"]),
369
+ onBlur: p(ve, ["stop"]),
370
+ onChange: p(ye, ["stop"]),
371
+ onFocusOnce: p(fe, ["stop"]),
372
+ onFocus: p(me, ["stop"]),
373
+ onInput: p(he, ["stop"]),
369
374
  onKeydown: [
370
- g(c(ke, ["stop"]), ["delete"]),
371
- g(c(we, ["stop"]), ["left"]),
372
- g(c(ge, ["stop", "prevent"]), ["down"]),
373
- g(c(Ve, ["stop", "prevent"]), ["enter"]),
374
- g(c(Ie, ["stop", "prevent"]), ["esc"]),
375
- g(c(be, ["stop", "prevent"]), ["up"]),
376
- g(c(Be, ["stop"]), ["right"])
375
+ g(p(ke, ["stop"]), ["delete"]),
376
+ g(p(we, ["stop"]), ["left"]),
377
+ g(p(ge, ["stop", "prevent"]), ["down"]),
378
+ g(p(Ve, ["stop", "prevent"]), ["enter"]),
379
+ g(p(Ie, ["stop", "prevent"]), ["esc"]),
380
+ g(p(be, ["stop", "prevent"]), ["up"]),
381
+ g(p(Be, ["stop"]), ["right"])
377
382
  ]
378
383
  }, null, 40, Ct), [
379
- [Je, a.value]
384
+ [Je, o.value]
380
385
  ])
381
386
  ])
382
387
  ]),
383
388
  _: 1
384
389
  }),
385
- p(e.$slots, "chevron", {
386
- loading: !!V(j),
390
+ c(e.$slots, "chevron", {
391
+ loading: !!V(J),
387
392
  shown: m.value
388
393
  }, () => [
389
- l[1] || (l[1] = F("svg", {
394
+ l[1] || (l[1] = L("svg", {
390
395
  class: "bb-base-select__chevron",
391
396
  viewBox: "0 0 24 24",
392
397
  xmlns: "http://www.w3.org/2000/svg"
393
398
  }, [
394
- F("path", {
399
+ L("path", {
395
400
  d: "M7.41 8.58L12 13.17l4.59-4.59L18 10l-6 6l-6-6z",
396
401
  fill: "currentColor"
397
402
  })
@@ -400,46 +405,46 @@ const kt = { class: "bb-base-select__input-container" }, St = {
400
405
  ]),
401
406
  _: 3
402
407
  }, 8, ["append:icon", "clearable", "prepend:icon"]),
403
- (h(!0), H(ee, null, Qe(Ue.value, (o) => (h(), H("input", le({
404
- key: o.value,
408
+ (h(!0), F(ee, null, Qe(Ue.value, (a) => (h(), F("input", le({
409
+ key: a.value,
405
410
  ref_for: !0
406
- }, o), null, 16))), 128)),
407
- W.value ? (h(), L(dt, {
411
+ }, a), null, 16))), 128)),
412
+ z.value ? (h(), H(dt, {
408
413
  key: 0,
409
414
  target: e.teleportTarget
410
415
  }, {
411
416
  default: u(() => [
412
- K(gt, {
417
+ U(gt, {
413
418
  ref_key: "optionsContainer",
414
419
  ref: n,
415
420
  compact: e.compact,
416
- loading: O.value,
421
+ loading: D.value,
417
422
  "loading-text": e.loadingText,
418
423
  multiple: e.multiple,
419
424
  "no-data-text": e.noDataText,
420
425
  open: m.value,
421
- options: Ae.value,
422
- style: Xe(ce.value),
423
- "onOption:selected": qe,
426
+ options: xe.value,
427
+ style: Xe(pe.value),
428
+ "onOption:selected": Ae,
424
429
  "onOption:unselected": X
425
430
  }, {
426
431
  "options:prepend": u(() => [
427
- p(e.$slots, "options:prepend")
432
+ c(e.$slots, "options:prepend")
428
433
  ]),
429
434
  loading: u(() => [
430
- p(e.$slots, "loading", { query: a.value })
435
+ c(e.$slots, "loading", { query: o.value })
431
436
  ]),
432
437
  "no-data": u(() => [
433
- p(e.$slots, "no-data", { query: a.value })
438
+ c(e.$slots, "no-data", { query: o.value })
434
439
  ]),
435
440
  "options:append": u(() => [
436
- p(e.$slots, "options:append")
441
+ c(e.$slots, "options:append")
437
442
  ]),
438
- option: u((o) => [
439
- p(e.$slots, "option", le({
443
+ option: u((a) => [
444
+ c(e.$slots, "option", le({
440
445
  hasErrors: e.hasErrors,
441
- loading: O.value
442
- }, o))
446
+ loading: D.value
447
+ }, a))
443
448
  ]),
444
449
  _: 3
445
450
  }, 8, ["compact", "loading", "loading-text", "multiple", "no-data-text", "open", "options", "style"])
package/dist/index39.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as U, ref as d, computed as h, onMounted as W, watch as Z, openBlock as g, createElementBlock as w, mergeProps as T, renderSlot as f, createElementVNode as c, Fragment as ee, renderList as ae, createCommentVNode as H, normalizeProps as re, guardReactiveProps as te, unref as b, normalizeClass as F, normalizeStyle as I } from "vue";
2
- import { clamp as le } from "./index205.js";
2
+ import { clamp as le } from "./index206.js";
3
3
  import { head as O } from "./index259.js";
4
- import { isCssColor as Y } from "./index209.js";
4
+ import { isCssColor as Y } from "./index234.js";
5
5
  import { isNil as P } from "./index260.js";
6
6
  import { isNotNil as ne } from "./index134.js";
7
7
  import { transposeValue as y } from "./index131.js";
package/dist/index41.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as I, ref as f, computed as n, watch as S, openBlock as h, createElementBlock as y, normalizeProps as r, guardReactiveProps as d, mergeProps as V, createCommentVNode as A, createElementVNode as l, renderSlot as F } from "vue";
2
- import { isCssColor as b } from "./index209.js";
3
- import { when as N } from "./index210.js";
2
+ import { isCssColor as b } from "./index234.js";
3
+ import { when as N } from "./index235.js";
4
4
  const x = { class: "bb-base-switch-container" }, $ = /* @__PURE__ */ I({
5
5
  __name: "BaseSwitch",
6
6
  props: {