bitboss-ui 2.1.12 → 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 (183) 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/index113.js +1 -1
  8. package/dist/index121.js +11 -11
  9. package/dist/index129.js +1 -1
  10. package/dist/index13.js +1 -1
  11. package/dist/index131.js +3 -3
  12. package/dist/index133.js +1 -1
  13. package/dist/index136.js +1 -1
  14. package/dist/index138.js +1 -1
  15. package/dist/index139.js +2 -2
  16. package/dist/index15.js +8 -8
  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 +86 -5
  22. package/dist/index21.js +16 -16
  23. package/dist/index211.js +29 -5
  24. package/dist/index212.js +17 -5
  25. package/dist/index213.js +51 -5
  26. package/dist/index214.js +15 -5
  27. package/dist/index215.js +3 -2
  28. package/dist/index216.js +12 -2
  29. package/dist/index217.js +16 -2
  30. package/dist/index218.js +33 -12
  31. package/dist/index219.js +4 -11
  32. package/dist/index220.js +13 -20
  33. package/dist/index221.js +11 -66
  34. package/dist/index222.js +22 -0
  35. package/dist/index223.js +197 -13
  36. package/dist/index225.js +68 -0
  37. package/dist/index227.js +13 -2
  38. package/dist/index228.js +114 -4
  39. package/dist/index23.js +15 -15
  40. package/dist/index230.js +2 -86
  41. package/dist/{index226.js → index231.js} +1 -1
  42. package/dist/index232.js +2 -29
  43. package/dist/index233.js +2 -17
  44. package/dist/index234.js +6 -50
  45. package/dist/index235.js +2 -15
  46. package/dist/index236.js +7 -3
  47. package/dist/index237.js +4 -12
  48. package/dist/index238.js +2 -16
  49. package/dist/index239.js +106 -2
  50. package/dist/index241.js +100 -7
  51. package/dist/index243.js +2 -106
  52. package/dist/index244.js +7 -0
  53. package/dist/index245.js +5 -100
  54. package/dist/index246.js +7 -0
  55. package/dist/index247.js +5 -4
  56. package/dist/index248.js +5 -197
  57. package/dist/index249.js +7 -0
  58. package/dist/index25.js +3 -3
  59. package/dist/index250.js +2 -34
  60. package/dist/index252.js +5 -18
  61. package/dist/index253.js +5 -12
  62. package/dist/index254.js +7 -5
  63. package/dist/index255.js +238 -218
  64. package/dist/index256.js +51 -12
  65. package/dist/index257.js +44 -5
  66. package/dist/index258.js +5 -5
  67. package/dist/index259.js +58 -6
  68. package/dist/index260.js +12 -249
  69. package/dist/index261.js +8 -51
  70. package/dist/index262.js +23 -44
  71. package/dist/index263.js +18 -5
  72. package/dist/index264.js +12 -60
  73. package/dist/index265.js +6 -6
  74. package/dist/index266.js +230 -15
  75. package/dist/index267.js +9 -8
  76. package/dist/index268.js +3 -23
  77. package/dist/index269.js +6 -10
  78. package/dist/index27.js +1 -1
  79. package/dist/index270.js +16 -3
  80. package/dist/index271.js +1 -1
  81. package/dist/index273.js +1 -1
  82. package/dist/index275.js +2 -5
  83. package/dist/index276.js +67 -2
  84. package/dist/index277.js +5 -67
  85. package/dist/index278.js +7 -4
  86. package/dist/index279.js +5 -8
  87. package/dist/index280.js +3 -280
  88. package/dist/index281.js +17 -2
  89. package/dist/index282.js +26 -123
  90. package/dist/index283.js +2 -2
  91. package/dist/index284.js +3 -15
  92. package/dist/index285.js +3 -2
  93. package/dist/index287.js +7 -2
  94. package/dist/index288.js +3 -16
  95. package/dist/index289.js +7 -2
  96. package/dist/index29.js +4 -4
  97. package/dist/index290.js +10 -18
  98. package/dist/index291.js +4 -2
  99. package/dist/index292.js +5 -3
  100. package/dist/index293.js +6 -0
  101. package/dist/index294.js +3 -7
  102. package/dist/index295.js +1 -1
  103. package/dist/index296.js +280 -7
  104. package/dist/index297.js +2 -11
  105. package/dist/index298.js +125 -5
  106. package/dist/index299.js +2 -4
  107. package/dist/index300.js +14 -5
  108. package/dist/index301.js +2 -4
  109. package/dist/index302.js +16 -3
  110. package/dist/index303.js +2 -17
  111. package/dist/index304.js +15 -27
  112. package/dist/index305.js +2 -3
  113. package/dist/index306.js +19 -3
  114. package/dist/index307.js +2 -3
  115. package/dist/index308.js +6 -2
  116. package/dist/index309.js +19 -2
  117. package/dist/index31.js +2 -2
  118. package/dist/index310.js +2 -19
  119. package/dist/index311.js +27 -2
  120. package/dist/index312.js +2 -27
  121. package/dist/index313.js +2 -2
  122. package/dist/index314.js +1 -1
  123. package/dist/index315.js +1 -1
  124. package/dist/index316.js +1 -1
  125. package/dist/index317.js +21 -1
  126. package/dist/index319.js +4 -0
  127. package/dist/index320.js +5 -718
  128. package/dist/index321.js +715 -363
  129. package/dist/index322.js +366 -58
  130. package/dist/index323.js +58 -5
  131. package/dist/index324.js +1 -1
  132. package/dist/index325.js +128 -32
  133. package/dist/index326.js +369 -28
  134. package/dist/index327.js +35 -0
  135. package/dist/index328.js +27 -227
  136. package/dist/index33.js +8 -8
  137. package/dist/index330.js +7 -58
  138. package/dist/index331.js +17 -127
  139. package/dist/index332.js +56 -367
  140. package/dist/index333.js +58 -47
  141. package/dist/index334.js +6 -7
  142. package/dist/index335.js +227 -5
  143. package/dist/index336.js +8 -8
  144. package/dist/index337.js +5 -6
  145. package/dist/index338.js +8 -19
  146. package/dist/index339.js +46 -6
  147. package/dist/index340.js +1 -1
  148. package/dist/index341.js +131 -0
  149. package/dist/index343.js +3 -129
  150. package/dist/index344.js +421 -473
  151. package/dist/index345.js +113 -422
  152. package/dist/index346.js +484 -123
  153. package/dist/index35.js +4 -4
  154. package/dist/index37.js +209 -200
  155. package/dist/index39.js +8 -8
  156. package/dist/index41.js +2 -2
  157. package/dist/index43.js +8 -8
  158. package/dist/index45.js +8 -8
  159. package/dist/index47.js +2 -2
  160. package/dist/index49.js +2 -2
  161. package/dist/index53.js +1 -1
  162. package/dist/index55.js +1 -1
  163. package/dist/index57.js +2 -2
  164. package/dist/index61.js +3 -3
  165. package/dist/index67.js +1 -1
  166. package/dist/index79.js +4 -4
  167. package/dist/index81.js +1 -1
  168. package/dist/index83.js +2 -2
  169. package/dist/index85.js +1 -1
  170. package/dist/index90.js +3 -3
  171. package/dist/index92.js +1 -1
  172. package/dist/index94.js +3 -3
  173. package/dist/index96.js +1 -1
  174. package/package.json +2 -2
  175. package/dist/index210.js +0 -7
  176. package/dist/index224.js +0 -115
  177. package/dist/index229.js +0 -4
  178. package/dist/index240.js +0 -4
  179. package/dist/index242.js +0 -9
  180. package/dist/index286.js +0 -18
  181. package/dist/index318.js +0 -24
  182. package/dist/index329.js +0 -60
  183. package/dist/index342.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 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";
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 "./index236.js";
9
- import { isEmpty as at } from "./index216.js";
10
- import { last as ot } from "./index217.js";
11
- import { matchAnyKey as ue } from "./index252.js";
12
- import { useArray as nt } from "./index253.js";
13
- import { useBaseOptions as ut } from "./index234.js";
14
- import { useCoherence as st } from "./index235.js";
15
- import { useHashedWatcher as se } from "./index237.js";
16
- import { useIndexById as ie } from "./index233.js";
17
- import { useMounted as it, useIntersectionObserver as rt } from "./index137.js";
18
- import { useItemsGetter as dt } from "./index232.js";
19
- import { useLocale as ct } from "./index218.js";
20
- import { usePrefill as pt } from "./index238.js";
21
- import { wait as E } from "./index135.js";
22
- import { waitFor as mt } from "./index254.js";
23
- import { when as ft } from "./index228.js";
24
- import vt from "./index243.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 "./index245.js";
26
+ import bt from "./index241.js";
27
27
  /* empty css */
28
- import yt from "./index221.js";
28
+ import gt from "./index225.js";
29
29
  /* empty css */
30
- import bt from "./index223.js";
31
- import gt from "./index224.js";
30
+ import wt from "./index227.js";
31
+ import Bt from "./index228.js";
32
32
  /* empty css */
33
- import wt from "./index255.js";
34
- const Bt = { class: "bb-base-select__inner-wrapper" }, Vt = { class: "bb-base-select__input-container" }, It = {
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
- }, St = ["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), R = v(null), U = v(null), r = h(
85
- () => t.comma ? R.value : U.value
86
- ), { isMobile: me } = et(), fe = h(
87
- () => t.allowWriting === "not-mobile" && me.value ? "none" : void 0
88
- ), G = 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 && !Q.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 && k(), $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 k(), 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 k(), await E(t.transitionDuration), (o = u.value) == null || o.focusFirstSelected()));
126
- }, Ie = (e) => {
127
- var o, d, f, I;
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()));
129
+ }, ke = (e) => {
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 && ((I = u.value) == null || I.focusByHash(l.valueHash));
132
- }, Se = (e) => {
133
- var o, d, f, I;
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 && ((I = u.value) == null || I.focusByHash(l.valueHash));
138
- }, ke = 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 k(), 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 j(), (l = r.value) == null || l.focusPrevious());
158
- }, a = v(""), {
159
- getter: M,
160
- debouncedGetter: $e,
161
- items: De,
162
- loading: J
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 && !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());
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: Q,
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 && Y(...S.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: X,
182
- add: Y,
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 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
- items: L(t, "modelValue")
192
- }), { options: S } = ut({
193
- disabled: L(t, "disabled"),
194
- items: h(() => [...De.value, ...X.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(() => !!(J.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 = S.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(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;
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 && Y(e.item), b()) : (t.stash && Fe(e.item), n("update:modelValue", e.value), await j(), 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 j(), b();
224
- q();
225
- }, { data: Me } = ie({
226
- items: S,
226
+ n("update:modelValue", null), await J(), b();
227
+ _();
228
+ }, { data: Pe } = de({
229
+ items: k,
227
230
  key: "valueHash"
228
- }), { coherent: Z, 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++, Z.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
- Q.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), ee = v(!1), k = async () => {
252
- ee.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() : k(), z = v(!1), Ne = () => {
257
- z.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
- z.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,172 +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(), K(bt, {
282
+ return (e, l) => (y(), T(wt, {
278
283
  ref_key: "outerContainer",
279
284
  ref: x,
280
- class: te({
285
+ class: oe({
281
286
  "bb-base-select": !0,
282
- "bb-base-select--active": z.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
- T("div", Bt, [
300
- F(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
- F(g(tt), { tag: "span" }, {
327
+ R(g(at), { tag: "span" }, {
323
328
  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, {
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: R,
334
+ ref: Q,
330
335
  options: i.value,
331
- "onOption:unselected": N
332
- }, null, 8, ["options"])) : (y(), K(vt, {
336
+ "onOption:unselected": K
337
+ }, null, 8, ["options"])) : (y(), T(yt, {
333
338
  key: 1,
334
339
  ref_key: "chipsBox",
335
- ref: U,
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", 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)}`,
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": ee.value ? `${g(G)}_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: te("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(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"])
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
- }, null, 44, St)), [
377
- [Xe, a.value]
381
+ }, null, 44, It)), [
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(J),
390
+ loading: !!g(Z),
386
391
  shown: c.value
387
392
  }, () => [
388
- l[1] || (l[1] = T("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
- T("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
- ]) : le("", !0)
403
+ ]) : G("", !0)
399
404
  ]),
400
405
  _: 3
401
406
  }, 8, ["append:icon", "clearable", "prepend:icon"]),
402
- F(gt, { "model-value": c.value }, {
407
+ E.value ? (y(), T(Bt, {
408
+ key: 0,
409
+ flip: !1,
410
+ "model-value": c.value
411
+ }, {
403
412
  default: s(() => [
404
- F(wt, {
413
+ R(Vt, {
405
414
  ref_key: "optionsContainer",
406
415
  ref: u,
407
416
  compact: e.compact,
408
- loading: H.value,
417
+ loading: L.value,
409
418
  "loading-text": e.loadingText,
410
419
  multiple: e.multiple,
411
420
  "no-data-text": e.noDataText,
412
421
  open: c.value,
413
- options: Ae.value,
414
- style: oe(ve.value),
415
- "onOption:selected": qe,
416
- "onOption:unselected": N
422
+ options: xe.value,
423
+ style: ue(D.value),
424
+ "onOption:selected": Me,
425
+ "onOption:unselected": K
417
426
  }, {
418
427
  "options:prepend": s(() => [
419
- p(e.$slots, "options:prepend")
428
+ m(e.$slots, "options:prepend")
420
429
  ]),
421
430
  loading: s(() => [
422
- p(e.$slots, "loading", { query: a.value })
431
+ m(e.$slots, "loading", { query: a.value })
423
432
  ]),
424
433
  "no-data": s(() => [
425
- p(e.$slots, "no-data", { query: a.value })
434
+ m(e.$slots, "no-data", { query: a.value })
426
435
  ]),
427
436
  "options:append": s(() => [
428
- p(e.$slots, "options:append")
437
+ m(e.$slots, "options:append")
429
438
  ]),
430
439
  option: s((o) => [
431
- p(e.$slots, "option", ne({
440
+ m(e.$slots, "option", se({
432
441
  hasErrors: e.hasErrors,
433
- loading: H.value
442
+ loading: L.value
434
443
  }, o))
435
444
  ]),
436
445
  _: 3
437
446
  }, 8, ["compact", "loading", "loading-text", "multiple", "no-data-text", "open", "options", "style"])
438
447
  ]),
439
448
  _: 3
440
- }, 8, ["model-value"])
449
+ }, 8, ["model-value"])) : G("", !0)
441
450
  ]),
442
- (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({
443
452
  key: o.value,
444
453
  ref_for: !0
445
454
  }, o), null, 16))), 128))
@@ -449,5 +458,5 @@ const Bt = { class: "bb-base-select__inner-wrapper" }, Vt = { class: "bb-base-se
449
458
  }
450
459
  });
451
460
  export {
452
- ol as default
461
+ ul as default
453
462
  };