bitboss-ui 2.1.8 → 2.1.10

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