bitboss-ui 2.1.13 → 2.1.14

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