bitboss-ui 0.2.57 → 0.2.59

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 (154) hide show
  1. package/dist/components/BaseSelect/BaseSelect.vue.d.ts +89 -159
  2. package/dist/components/BbSelect/BbSelect.vue.d.ts +0 -7
  3. package/dist/index101.js +3 -3
  4. package/dist/index103.js +2 -2
  5. package/dist/index109.js +1 -1
  6. package/dist/index11.js +2 -2
  7. package/dist/index111.js +4 -4
  8. package/dist/index113.js +1 -1
  9. package/dist/index116.js +1 -1
  10. package/dist/index117.js +1 -1
  11. package/dist/index118.js +1 -1
  12. package/dist/index119.js +1 -1
  13. package/dist/index121.js +1 -1
  14. package/dist/index125.js +1 -1
  15. package/dist/index126.js +1 -1
  16. package/dist/index127.js +1 -1
  17. package/dist/index131.js +2 -2
  18. package/dist/index15.js +8 -8
  19. package/dist/index17.js +9 -9
  20. package/dist/index19.js +3 -3
  21. package/dist/index196.js +2 -2
  22. package/dist/index196.js.map +1 -1
  23. package/dist/index197.js +4 -368
  24. package/dist/index197.js.map +1 -1
  25. package/dist/index198.js +2 -134
  26. package/dist/index198.js.map +1 -1
  27. package/dist/index199.js +10 -5
  28. package/dist/index199.js.map +1 -1
  29. package/dist/index200.js +3 -19
  30. package/dist/index200.js.map +1 -1
  31. package/dist/index201.js +35 -2
  32. package/dist/index201.js.map +1 -1
  33. package/dist/index202.js +6 -2
  34. package/dist/index202.js.map +1 -1
  35. package/dist/index203.js +226 -165
  36. package/dist/index203.js.map +1 -1
  37. package/dist/index204.js +368 -23
  38. package/dist/index204.js.map +1 -1
  39. package/dist/index205.js +126 -365
  40. package/dist/index205.js.map +1 -1
  41. package/dist/index206.js +295 -2
  42. package/dist/index206.js.map +1 -1
  43. package/dist/index207.js +19 -4
  44. package/dist/index207.js.map +1 -1
  45. package/dist/index208.js +2 -3
  46. package/dist/index208.js.map +1 -1
  47. package/dist/index209.js +2 -3
  48. package/dist/index209.js.map +1 -1
  49. package/dist/index21.js +2 -2
  50. package/dist/index210.js +174 -3
  51. package/dist/index210.js.map +1 -1
  52. package/dist/index211.js +23 -35
  53. package/dist/index211.js.map +1 -1
  54. package/dist/index212.js +373 -6
  55. package/dist/index212.js.map +1 -1
  56. package/dist/index213.js +16 -2
  57. package/dist/index213.js.map +1 -1
  58. package/dist/index214.js +16 -10
  59. package/dist/index214.js.map +1 -1
  60. package/dist/index215.js +17 -13
  61. package/dist/index215.js.map +1 -1
  62. package/dist/index216.js +26 -13
  63. package/dist/index216.js.map +1 -1
  64. package/dist/index217.js +8 -20
  65. package/dist/index217.js.map +1 -1
  66. package/dist/index218.js +2 -29
  67. package/dist/index218.js.map +1 -1
  68. package/dist/index219.js +3 -8
  69. package/dist/index219.js.map +1 -1
  70. package/dist/index220.js +3 -2
  71. package/dist/index220.js.map +1 -1
  72. package/dist/index221.js +112 -226
  73. package/dist/index221.js.map +1 -1
  74. package/dist/index222.js +2 -6
  75. package/dist/index222.js.map +1 -1
  76. package/dist/index223.js +8 -16
  77. package/dist/index223.js.map +1 -1
  78. package/dist/index224.js +6 -9
  79. package/dist/index224.js.map +1 -1
  80. package/dist/index225.js +16 -120
  81. package/dist/index225.js.map +1 -1
  82. package/dist/index226.js +3 -78
  83. package/dist/index226.js.map +1 -1
  84. package/dist/index227.js +78 -5
  85. package/dist/index227.js.map +1 -1
  86. package/dist/index228.js +160 -2
  87. package/dist/index228.js.map +1 -1
  88. package/dist/index229.js +1 -297
  89. package/dist/index229.js.map +1 -1
  90. package/dist/index23.js +1 -1
  91. package/dist/index230.js +69 -2
  92. package/dist/index230.js.map +1 -1
  93. package/dist/index231.js +2 -2
  94. package/dist/index231.js.map +1 -1
  95. package/dist/index232.js +5 -117
  96. package/dist/index232.js.map +1 -1
  97. package/dist/index233.js +428 -99
  98. package/dist/index233.js.map +1 -1
  99. package/dist/index234.js +88 -3
  100. package/dist/index234.js.map +1 -1
  101. package/dist/index235.js +12 -221
  102. package/dist/index235.js.map +1 -1
  103. package/dist/index236.js +200 -258
  104. package/dist/index236.js.map +1 -1
  105. package/dist/index237.js +6 -2
  106. package/dist/index237.js.map +1 -1
  107. package/dist/index238.js +2 -435
  108. package/dist/index238.js.map +1 -1
  109. package/dist/index239.js +2 -89
  110. package/dist/index239.js.map +1 -1
  111. package/dist/index240.js +2 -200
  112. package/dist/index240.js.map +1 -1
  113. package/dist/index241.js +117 -2
  114. package/dist/index241.js.map +1 -1
  115. package/dist/index242.js +106 -2
  116. package/dist/index242.js.map +1 -1
  117. package/dist/index245.js +2 -69
  118. package/dist/index245.js.map +1 -1
  119. package/dist/index246.js +2 -5
  120. package/dist/index246.js.map +1 -1
  121. package/dist/index247.js +221 -12
  122. package/dist/index247.js.map +1 -1
  123. package/dist/index248.js +257 -159
  124. package/dist/index248.js.map +1 -1
  125. package/dist/index249.js +4 -1
  126. package/dist/index249.js.map +1 -1
  127. package/dist/index25.js +2 -2
  128. package/dist/index253.js +3 -2
  129. package/dist/index253.js.map +1 -1
  130. package/dist/index254.js +1 -1
  131. package/dist/index255.js +2 -3
  132. package/dist/index255.js.map +1 -1
  133. package/dist/index29.js +3 -3
  134. package/dist/index31.js +335 -322
  135. package/dist/index31.js.map +1 -1
  136. package/dist/index33.js +2 -2
  137. package/dist/index35.js +2 -2
  138. package/dist/index47.js +1 -1
  139. package/dist/index49.js +1 -1
  140. package/dist/index65.js +5 -5
  141. package/dist/index69.js +2 -2
  142. package/dist/index72.js +1 -1
  143. package/dist/index75.js +1 -1
  144. package/dist/index77.js +1 -1
  145. package/dist/index79.js +4 -4
  146. package/dist/index8.js +55 -55
  147. package/dist/index8.js.map +1 -1
  148. package/dist/index81.js +1 -1
  149. package/dist/index91.js +5 -7
  150. package/dist/index91.js.map +1 -1
  151. package/dist/style.css +1 -1
  152. package/package.json +1 -1
  153. package/dist/index256.js +0 -5
  154. package/dist/index256.js.map +0 -1
package/dist/index31.js CHANGED
@@ -1,36 +1,41 @@
1
- import { defineComponent as Ie, ref as f, computed as g, onMounted as Ne, onBeforeUnmount as $e, watch as X, openBlock as p, createElementBlock as h, normalizeClass as B, renderSlot as b, createElementVNode as w, Fragment as L, renderList as j, toDisplayString as F, createBlock as se, withModifiers as E, withCtx as De, createTextVNode as ee, createCommentVNode as ie, withDirectives as Le, vModelDynamic as Fe, Teleport as Ae, normalizeStyle as Je, createVNode as Me, mergeProps as qe, nextTick as le } from "vue";
2
- import ze from "./index115.js";
1
+ import { defineComponent as Ie, ref as m, computed as y, watch as Y, openBlock as p, createElementBlock as h, normalizeClass as x, renderSlot as b, createElementVNode as V, Fragment as $, renderList as j, toDisplayString as D, createBlock as ae, withModifiers as B, withCtx as ne, createTextVNode as Z, createCommentVNode as ue, withDirectives as Ne, vModelDynamic as $e, createVNode as oe, mergeProps as De, Teleport as Le, normalizeStyle as Fe, nextTick as ie } from "vue";
2
+ import Ae from "./index115.js";
3
3
  import "./index158.js";
4
- import He from "./index119.js";
4
+ import Me from "./index119.js";
5
5
  import "./index185.js";
6
- import { autoUpdate as Pe, computePosition as je, flip as Qe, shift as Ue } from "./index197.js";
7
- import { deepEqual as oe } from "./index123.js";
8
- import { head as We } from "./index213.js";
9
- import { isNotNil as I } from "./index124.js";
10
- import { last as Re } from "./index202.js";
11
- import { useItemText as Ke } from "./index125.js";
12
- import { useItemValue as Ye } from "./index126.js";
13
- import { wait as q } from "./index122.js";
14
- import { when as Ze } from "./index207.js";
15
- import { offset as Ge } from "./index205.js";
16
- const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomplete", "autofocus", "disabled", "placeholder", "readonly"], ll = {
17
- key: 0,
18
- class: "bb-base-select__loading-container"
19
- }, tl = {
20
- key: 1,
21
- class: "bb-base-select__no-data-container"
22
- }, al = ["id", "aria-selected"], nl = { class: "bb-base-select-option__content" }, ul = { class: "bb-base-select-option__text" }, sl = { class: "bb-base-select__chevron" }, il = /* @__PURE__ */ w("svg", {
6
+ import { useFloating as Je } from "./index221.js";
7
+ import { clamp as qe } from "./index198.js";
8
+ import { deepEqual as se } from "./index123.js";
9
+ import { head as G } from "./index222.js";
10
+ import { isNotNil as E } from "./index124.js";
11
+ import { last as ze } from "./index209.js";
12
+ import { useItemText as He } from "./index125.js";
13
+ import { useItemValue as je } from "./index126.js";
14
+ import { wait as X } from "./index122.js";
15
+ import { waitFor as Pe } from "./index202.js";
16
+ import { when as Qe } from "./index197.js";
17
+ import We from "./index116.js";
18
+ import "./index160.js";
19
+ import { autoUpdate as Ue, flip as Ke, shift as Re } from "./index204.js";
20
+ import { offset as Ye } from "./index212.js";
21
+ const Ze = { class: "bb-base-select__input-container" }, Ge = ["id", "autocomplete", "autofocus", "disabled", "placeholder", "aria-controls", "readonly"], Xe = { class: "bb-base-select__chevron" }, el = /* @__PURE__ */ V("svg", {
23
22
  fill: "none",
24
23
  viewBox: "0 0 16 8",
25
24
  xmlns: "http://www.w3.org/2000/svg"
26
25
  }, [
27
- /* @__PURE__ */ w("path", {
26
+ /* @__PURE__ */ V("path", {
28
27
  "clip-rule": "evenodd",
29
28
  d: "M0.851779 0.225802C0.90403 0.173418 0.966103 0.131858 1.03444 0.1035C1.10278 0.0751431 1.17604 0.0605469 1.25003 0.0605469C1.32402 0.0605469 1.39728 0.0751431 1.46562 0.1035C1.53396 0.131858 1.59603 0.173418 1.64828 0.225802L8.00003 6.57868L14.3518 0.225802C14.4041 0.173503 14.4662 0.132017 14.5345 0.103713C14.6028 0.0754093 14.6761 0.0608414 14.75 0.0608414C14.824 0.0608414 14.8972 0.0754093 14.9656 0.103713C15.0339 0.132017 15.096 0.173503 15.1483 0.225802C15.2006 0.278101 15.2421 0.340189 15.2704 0.408521C15.2987 0.476852 15.3132 0.55009 15.3132 0.624052C15.3132 0.698014 15.2987 0.771252 15.2704 0.839584C15.2421 0.907916 15.2006 0.970003 15.1483 1.0223L8.39828 7.7723C8.34603 7.82469 8.28395 7.86625 8.21562 7.8946C8.14728 7.92296 8.07402 7.93756 8.00003 7.93756C7.92604 7.93756 7.85278 7.92296 7.78444 7.8946C7.7161 7.86625 7.65403 7.82469 7.60178 7.7723L0.851779 1.0223C0.799395 0.970051 0.757835 0.907978 0.729477 0.83964C0.70112 0.771302 0.686523 0.69804 0.686523 0.624052C0.686523 0.550064 0.70112 0.476803 0.729477 0.408464C0.757835 0.340126 0.799395 0.278053 0.851779 0.225802Z",
30
29
  fill: "currentColor",
31
30
  "fill-rule": "evenodd"
32
31
  })
33
- ], -1), kl = /* @__PURE__ */ Ie({
32
+ ], -1), ll = ["id"], tl = {
33
+ key: 0,
34
+ class: "bb-base-select__loading-container"
35
+ }, al = {
36
+ key: 1,
37
+ class: "bb-base-select__no-data-container"
38
+ }, nl = ["id", "aria-selected"], ul = { class: "bb-base-select-option__content" }, ol = { class: "bb-base-select-option__text" }, Tl = /* @__PURE__ */ Ie({
34
39
  __name: "BaseSelect",
35
40
  props: {
36
41
  allowWriting: { type: Boolean, default: !0 },
@@ -66,96 +71,82 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
66
71
  updateOnAnimationFrame: { type: Boolean, default: !1 }
67
72
  },
68
73
  emits: ["blur", "change", "click", "focus", "inactive", "input", "update:modelValue"],
69
- setup(re, { emit: ce }) {
70
- const l = re, d = ce;
74
+ setup(re, { emit: de }) {
75
+ const l = re, c = de;
71
76
  if (l.multiple && !Array.isArray(l.modelValue))
72
77
  throw new Error('Multiple is set to "true" but modelValue is not an array.');
73
- const _ = f(null), N = f(null), r = f(null), O = f(null), u = f(""), de = g(() => o.value.length ? "" : l.placeholder), c = f(0), fe = l.transitionDuration / 1e3 + "s";
74
- let te;
75
- Ne(async () => {
76
- N.value && r.value && (te = Pe(
77
- N.value,
78
- r.value,
79
- ye,
80
- {
81
- ancestorResize: !0,
82
- ancestorScroll: !0,
83
- animationFrame: l.updateOnAnimationFrame,
84
- elementResize: !0
85
- }
86
- ));
87
- }), $e(() => {
88
- te();
89
- });
90
- const ae = f([]), v = f([]), V = f([]), { getItemText: ve } = Ke(), { getItemValue: me } = Ye(), pe = g(() => ae.value.map((e) => {
91
- const a = ve(e, l.itemText), t = me(e, l.itemValue);
92
- if (t === void 0)
78
+ const L = m(null), J = m(null), k = m(null), { floatingStyles: ce } = Je(J, k, {
79
+ placement: "bottom",
80
+ whileElementsMounted: Ue,
81
+ middleware: [Ke(), Ye(), Re()]
82
+ }), fe = y(() => {
83
+ const e = {
84
+ ...ce.value,
85
+ transitionDuration: `${l.transitionDuration}ms`
86
+ };
87
+ return J.value && (e.width = `${J.value.clientWidth}px`), e;
88
+ }), S = m(null), o = m(""), ve = y(() => s.value.length ? "" : l.placeholder), d = m(0), ee = m([]), f = m([]), _ = m([]), { getItemText: me } = He(), { getItemValue: pe } = je(), be = y(() => ee.value.map((e, a) => {
89
+ const t = me(e, l.itemText), n = pe(e, l.itemValue);
90
+ if (n === void 0)
93
91
  throw new Error(
94
92
  'The result of extracting "value" from option was undefined. Affected item is ' + JSON.stringify(e) + " please check itemValue property is correct."
95
93
  );
96
- const n = JSON.stringify(t);
94
+ const u = JSON.stringify(n);
97
95
  return {
98
96
  disabled: !!e.disabled,
99
- id: "option_" + n.replace(/\W/g, "_"),
100
- jsonValue: n,
97
+ id: "option_" + u.replace(/\W/g, "_"),
98
+ jsonValue: u,
101
99
  manual: !1,
102
100
  original: e,
103
- text: a,
104
- value: t
101
+ text: t,
102
+ value: n
105
103
  };
106
- })), T = g(() => {
107
- let e = pe.value.reduce(
108
- (n, s) => (n[s.id] = s, n),
104
+ })), O = y(() => {
105
+ let e = be.value.reduce(
106
+ (n, u) => (n[u.id] = u, n),
109
107
  {}
110
108
  );
111
- const a = V.value.reduce(
112
- (n, s) => (n[s.id] || (n[s.id] = s), n),
109
+ const a = _.value.reduce(
110
+ (n, u) => (n[u.id] || (n[u.id] = u), n),
113
111
  e
114
- ), t = v.value.reduce(
115
- (n, s) => (n[s.id] || (n[s.id] = s), n),
112
+ ), t = f.value.reduce(
113
+ (n, u) => (n[u.id] || (n[u.id] = u), n),
116
114
  a
117
115
  );
118
- return Object.values(t).map(
119
- (n, s) => ({
120
- ...n,
121
- selected: I(be.value.get(n.value)),
122
- index: s
123
- })
124
- );
125
- }), S = g(() => {
116
+ return Object.values(t).map((n, u) => ({
117
+ ...n,
118
+ selected: E(he.value.get(n.value)),
119
+ index: u
120
+ }));
121
+ }), g = y(() => {
126
122
  let e = [];
127
- return u.value && !o.value.some(
128
- (a) => a.text === u.value
129
- ) ? e = T.value.filter((a) => {
123
+ return o.value && !s.value.some((a) => a.text === o.value) ? e = O.value.filter((a) => {
130
124
  let t = !1;
131
125
  if (l.filterBy) {
132
126
  if (typeof l.filterBy == "function")
133
127
  t = l.filterBy(a.value, a.original);
134
128
  else if (l.filterBy.length) {
135
129
  const n = [].concat(l.filterBy);
136
- for (let s = 0; s < n.length; s++) {
137
- const x = n[s];
138
- t = t || a.original[x] && a.original[x].toLowerCase().includes(u.value.toLowerCase());
130
+ for (let u = 0; u < n.length; u++) {
131
+ const T = n[u];
132
+ t = t || a.original[T] && a.original[T].toLowerCase().includes(o.value.toLowerCase());
139
133
  }
140
134
  }
141
135
  } else
142
136
  return !0;
143
- return t || a.text.toLowerCase().includes(u.value.toLowerCase());
144
- }) : e = T.value, e.map((a, t) => ({
145
- ...a,
146
- focused: k.value === t
147
- }));
148
- }), z = g(
149
- () => T.value.reduce(
137
+ return t || a.text.toLowerCase().includes(o.value.toLowerCase());
138
+ }) : e = O.value, e;
139
+ }), q = y(
140
+ () => O.value.reduce(
150
141
  (e, a) => ({
151
142
  ...e,
152
143
  [a.id]: a
153
144
  }),
154
145
  {}
155
146
  )
156
- ), m = g(() => {
147
+ ), v = y(() => {
157
148
  if (l.matchStrategy === "string") {
158
- let e = T.value.reduce(
149
+ let e = O.value.reduce(
159
150
  (a, t) => (a[t.jsonValue] = t, a),
160
151
  {}
161
152
  );
@@ -163,19 +154,19 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
163
154
  get: (a) => e[JSON.stringify(a)]
164
155
  };
165
156
  } else if (l.matchStrategy === "equality") {
166
- let e = T.value.map((a) => [
157
+ let e = O.value.map((a) => [
167
158
  a.value,
168
159
  a
169
160
  ]);
170
161
  return {
171
162
  get: (a) => {
172
163
  var t;
173
- return (t = e.find((n) => oe(n[0], a))) == null ? void 0 : t[1];
164
+ return (t = e.find((n) => se(n[0], a))) == null ? void 0 : t[1];
174
165
  }
175
166
  };
176
167
  } else
177
168
  throw new Error("No match strategy has been defined");
178
- }), be = g(() => {
169
+ }), he = y(() => {
179
170
  if (l.matchStrategy === "string") {
180
171
  let e = {};
181
172
  return [].concat(l.modelValue).forEach((a, t) => {
@@ -184,32 +175,32 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
184
175
  get: (a) => e[JSON.stringify(a)]
185
176
  };
186
177
  } else if (l.matchStrategy === "equality") {
187
- const e = [].concat(l.modelValue).filter(I).map((a, t) => [a, t]);
178
+ const e = [].concat(l.modelValue).filter(E).map((a, t) => [a, t]);
188
179
  return {
189
180
  get: (a) => {
190
181
  var t;
191
- return (t = e.find((n) => oe(n[0], a))) == null ? void 0 : t[1];
182
+ return (t = e.find((n) => se(n[0], a))) == null ? void 0 : t[1];
192
183
  }
193
184
  };
194
185
  } else
195
186
  throw new Error("No match strategy has been defined");
196
- }), o = g(() => [].concat(l.modelValue).reduce((e, a) => {
197
- const t = m.value.get(a);
187
+ }), s = y(() => [].concat(l.modelValue).reduce((e, a) => {
188
+ const t = v.value.get(a);
198
189
  return t && e.push(t), e;
199
- }, [])), A = (e) => {
190
+ }, [])), F = (e) => {
200
191
  let a;
201
- l.multiple ? (e.selected ? (e.manual && (V.value = V.value.filter(
192
+ r.value = e.index, l.multiple ? (e.selected ? (e.manual && (_.value = _.value.filter(
202
193
  (t) => t.id !== e.id
203
194
  )), a = l.modelValue.filter(
204
195
  (t) => JSON.stringify(t) !== e.jsonValue
205
- ), l.stash && (v.value = v.value.filter((t) => t.id !== e.id))) : (a = l.modelValue.concat(e.value), l.stash && (v.value = v.value.concat(e))), l.resetQueryOnOptionSelected && (u.value = "")) : e.selected ? (e.manual && (V.value = V.value.filter(
196
+ ), l.stash && (f.value = f.value.filter((t) => t.id !== e.id))) : (a = l.modelValue.concat(e.value), l.stash && (f.value = f.value.concat(e))), l.resetQueryOnOptionSelected && (o.value = "")) : e.selected ? (e.manual && (_.value = _.value.filter(
206
197
  (t) => t.id !== e.id
207
- )), a = null, l.stash && (v.value = []), u.value = "") : (a = e.value, l.stash && (v.value = [e]), u.value = e.text), d("update:modelValue", a);
208
- }, $ = async ({ prefill: e = !1 }) => {
198
+ )), a = null, l.stash && (f.value = []), o.value = "") : (a = e.value, l.stash && (f.value = [e]), o.value = e.text), c("update:modelValue", a);
199
+ }, I = async ({ prefill: e = !1 }) => {
209
200
  let a = [];
210
- Array.isArray(l.items) ? a = l.items : typeof l.items == "function" && (c.value++, a = await l.items(u.value, e, l.modelValue), c.value--), ae.value = a;
211
- }, he = () => {
212
- const e = u.value, a = u.value, t = JSON.stringify(a), n = {
201
+ Array.isArray(l.items) ? a = l.items : typeof l.items == "function" && (d.value++, a = await l.items(o.value, e, l.modelValue), d.value--), ee.value = a;
202
+ }, ye = () => {
203
+ const e = o.value, a = o.value, t = JSON.stringify(a), n = {
213
204
  text: e,
214
205
  value: a,
215
206
  jsonValue: t,
@@ -218,144 +209,154 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
218
209
  manual: !0,
219
210
  disabled: !1
220
211
  };
221
- V.value = V.value.concat(n), u.value = "";
222
- }, H = l.prefill === !0 || !l.multiple && I(l.modelValue) || l.multiple && !!l.modelValue.length;
223
- let Q;
224
- X(
212
+ _.value = _.value.concat(n), o.value = "";
213
+ }, z = l.prefill === !0 || !l.multiple && E(l.modelValue) || l.multiple && !!l.modelValue.length;
214
+ let P;
215
+ Y(
225
216
  () => l.modelValue,
226
217
  (e, a) => {
227
- Q && clearTimeout(Q), Q = setTimeout(
218
+ P && clearTimeout(P), P = setTimeout(
228
219
  async () => {
229
220
  if (l.multiple) {
230
221
  if (!Array.isArray(l.modelValue))
231
222
  throw new Error("props.modelValue is not an array.");
232
223
  let t = l.modelValue.every(
233
- (n) => m.value.get(n)
224
+ (n) => v.value.get(n)
234
225
  );
235
- if ((!t || a === void 0) && (await $({ prefill: !0 }), t = l.modelValue.every(
236
- (n) => m.value.get(n)
226
+ if ((!t || a === void 0) && (await I({ prefill: !0 }), t = l.modelValue.every(
227
+ (n) => v.value.get(n)
237
228
  )), t)
238
- l.stash && (v.value = l.modelValue.map(
239
- (n) => m.value.get(n)
229
+ l.stash && (f.value = l.modelValue.map(
230
+ (n) => v.value.get(n)
240
231
  ));
241
232
  else {
242
233
  let n = [];
243
- const s = e.filter((x) => {
244
- let M = m.value.get(x);
234
+ const u = e.filter((T) => {
235
+ let M = v.value.get(T);
245
236
  return M && n.push(M), M;
246
237
  });
247
- l.stash && (v.value = n), l.enforceCoherence && d("update:modelValue", s);
238
+ l.stash && (f.value = n), l.enforceCoherence && c("update:modelValue", u);
248
239
  }
249
240
  } else {
250
- let t = m.value.get(l.modelValue);
251
- if (!t && I(l.modelValue) || a === void 0) {
252
- const n = u.value;
253
- u.value = "", await $({ prefill: !0 }), u.value = n;
241
+ let t = v.value.get(l.modelValue);
242
+ if (!t && E(l.modelValue) || a === void 0) {
243
+ const n = o.value;
244
+ o.value = "", await I({ prefill: !0 }), o.value = n;
254
245
  }
255
- t = m.value.get(l.modelValue), t ? (u.value = t.text, l.stash && (v.value = [t])) : l.enforceCoherence && I(e) ? (u.value = "", l.stash && (v.value = []), d("update:modelValue", null)) : u.value = "";
246
+ t = v.value.get(l.modelValue), t ? (o.value = t.text, l.stash && (f.value = [t])) : l.enforceCoherence && E(e) ? (o.value = "", l.stash && (f.value = []), c("update:modelValue", null)) : o.value = "";
256
247
  }
257
248
  },
258
- H ? 0 : l.modelValueDebounceTime
249
+ z ? 0 : l.modelValueDebounceTime
259
250
  );
260
251
  },
261
252
  // Prefill when asked or when items are static
262
- { immediate: H, deep: !0 }
263
- ), X(
253
+ { immediate: z, deep: !0 }
254
+ ), Y(
264
255
  () => l.items,
265
256
  async (e, a) => {
266
257
  if (typeof e == "function" || // Circumvent arrays defined in the template by the parent
267
258
  JSON.stringify(e) !== JSON.stringify(a))
268
- if (await $({ prefill: !1 }), l.multiple) {
259
+ if (await I({ prefill: !1 }), l.multiple) {
269
260
  if (!l.modelValue.every(
270
- (n) => m.value.get(n)
261
+ (n) => v.value.get(n)
271
262
  ) && l.enforceCoherence) {
272
- const n = l.modelValue.filter((s) => m.value.get(s));
273
- d("update:modelValue", n);
263
+ const n = l.modelValue.filter((u) => v.value.get(u));
264
+ c("update:modelValue", n);
274
265
  }
275
266
  } else
276
- !m.value.get(l.modelValue) && l.enforceCoherence && I(l.modelValue) && d("update:modelValue", null), y.value = null;
267
+ !v.value.get(l.modelValue) && l.enforceCoherence && E(l.modelValue) && c("update:modelValue", null), r.value = null;
277
268
  }
278
269
  );
279
- let U;
280
- X(
270
+ let Q;
271
+ Y(
281
272
  () => l.dependencies,
282
273
  (e, a) => {
283
- !H && l.prefill === "focus" && Y || JSON.stringify(e) !== JSON.stringify(a) && (U && clearTimeout(U), U = setTimeout(async () => {
274
+ !z && l.prefill === "focus" && U || JSON.stringify(e) !== JSON.stringify(a) && (Q && clearTimeout(Q), Q = setTimeout(async () => {
284
275
  if (JSON.stringify(e) !== JSON.stringify(a)) {
285
- l.enforceCoherence && l.stash && (v.value = []);
286
- let t = u.value;
287
- if (u.value = "", await $({ prefill: !0 }), u.value = t, !l.multiple)
288
- !m.value.get(l.modelValue) && l.enforceCoherence && I(l.modelValue) && (u.value = "", l.stash && (v.value = []), d("update:modelValue", null));
276
+ l.enforceCoherence && l.stash && (f.value = []);
277
+ let t = o.value;
278
+ if (o.value = "", await I({ prefill: !0 }), o.value = t, !l.multiple)
279
+ !v.value.get(l.modelValue) && l.enforceCoherence && E(l.modelValue) && (o.value = "", l.stash && (f.value = []), c("update:modelValue", null));
289
280
  else if (!l.modelValue.every(
290
- (s) => m.value.get(s)
281
+ (u) => v.value.get(u)
291
282
  ) && l.enforceCoherence) {
292
- let s = [];
293
- const x = l.modelValue.filter((M) => {
294
- let G = m.value.get(M);
295
- return G && s.push(G), G;
283
+ let u = [];
284
+ const T = l.modelValue.filter((M) => {
285
+ let R = v.value.get(M);
286
+ return R && u.push(R), R;
296
287
  });
297
- l.stash && (v.value = s), d("update:modelValue", x);
288
+ l.stash && (f.value = u), c("update:modelValue", T);
298
289
  }
299
290
  }
300
291
  }, l.depsDebounceTime));
301
292
  },
302
293
  { deep: !0 }
303
294
  );
304
- const ye = () => {
305
- N.value && r.value && je(N.value, r.value, {
306
- placement: "bottom",
307
- middleware: [Ge(6), Qe(), Ue()]
308
- }).then((e) => {
309
- var a;
310
- r.value && (r.value.style.left = `${e.x}px`, r.value.style.top = `${e.y}px`, r.value.style.width = `${(a = N.value) == null ? void 0 : a.offsetWidth}px`);
311
- });
312
- }, C = f(!1), W = f(!1), R = f(!1), K = f(!0), D = async () => {
313
- K.value = !1, W.value = !0, await q(l.transitionDuration), W.value = !1, C.value = !0;
314
- }, J = async () => {
315
- C.value = !1, R.value = !0, await q(l.transitionDuration), R.value = !1, K.value = !0;
316
- }, P = f(!1);
317
- let Y = !0;
295
+ const w = m(!1), W = m(!0), N = async () => {
296
+ W.value = !1, w.value = !0;
297
+ }, A = async () => {
298
+ w.value = !1, W.value = !0;
299
+ }, H = m(!1);
300
+ let U = !0;
318
301
  const ge = async (e) => {
319
- d("focus", e), P.value = !0, document.addEventListener("click", ue), document.addEventListener("focusin", ne), O.value instanceof HTMLInputElement && O.value.select(), l.prefill === "focus" && Y && !H && (await $({ prefill: !0 }), Y = !1);
320
- }, ne = async (e) => {
321
- if (e.target instanceof Node && _.value && r.value && !_.value.contains(e.target) && !r.value.contains(e.target)) {
322
- J(), d("inactive"), document.removeEventListener("focusin", ne), P.value = !1, l.multiple && (await q(500), u.value = "");
302
+ c("focus", e), H.value = !0, document.addEventListener("click", te), document.addEventListener("focusin", le), S.value instanceof HTMLInputElement && S.value.select(), l.prefill === "focus" && U && !z && (await I({ prefill: !0 }), U = !1);
303
+ }, le = (e) => {
304
+ if (e.target instanceof Node && L.value && k.value && !L.value.contains(e.target) && !k.value.contains(e.target)) {
305
+ A(), c("inactive"), document.removeEventListener("focusin", le), H.value = !1, l.multiple && X(500).then(() => {
306
+ o.value = "";
307
+ });
323
308
  return;
324
309
  }
325
- }, we = async (e) => {
326
- if (d("blur", e), !l.multiple && (await le(), await q(300), _.value && r.value)) {
327
- const a = document.activeElement;
328
- if (!_.value.contains(a) && !r.value.contains(a)) {
329
- const t = m.value.get(l.modelValue);
330
- t && (u.value = t.text);
310
+ }, Ve = async (e) => {
311
+ if (c("blur", e), !l.multiple) {
312
+ let a = !1;
313
+ const t = l.modelValue;
314
+ if (await Promise.race([
315
+ X(250),
316
+ Pe(() => t !== l.modelValue).then(() => {
317
+ a = !0;
318
+ })
319
+ ]), !a) {
320
+ const n = v.value.get(l.modelValue);
321
+ n && (o.value = n.text);
331
322
  }
332
323
  }
333
- }, Ve = (e) => d("change", e), Ce = (e) => {
334
- d("input", e), u.value === "" && (l.multiple || d("update:modelValue", null)), typeof l.items == "function" && Te();
335
- }, y = f(null), k = g(() => Number.isInteger(y.value) && y.value ? y.value % S.value.length : y.value), i = f(null), ke = async () => {
336
- var e;
337
- if (await le(), k.value !== null) {
338
- const a = (e = r.value) == null ? void 0 : e.querySelector(
339
- `#${T.value[k.value].id}`
340
- );
341
- a instanceof HTMLElement && a.scrollIntoView({
342
- behavior: "smooth",
343
- block: "nearest",
344
- inline: "start"
345
- });
346
- }
347
- }, _e = async () => {
348
- var e;
349
- if (await le(), k.value !== null) {
350
- const a = (e = r.value) == null ? void 0 : e.querySelector(
351
- `#${T.value[k.value].id}`
352
- );
353
- a instanceof HTMLElement && a.scrollIntoView({
354
- behavior: "smooth",
355
- block: "nearest",
356
- inline: "start"
357
- });
358
- }
324
+ }, we = (e) => c("change", e), Ce = (e) => {
325
+ c("input", e), o.value === "" && (l.multiple || c("update:modelValue", null)), typeof l.items == "function" && Se();
326
+ }, r = m(null), C = y(() => {
327
+ if (r.value === null || !g.value.length)
328
+ return null;
329
+ let e = r.value >= 0 ? r.value : g.value.length - 1;
330
+ const a = 0, t = g.value.length - 1;
331
+ return qe(e % g.value.length, a, t);
332
+ }), i = m(null), ke = () => {
333
+ r.value !== null ? r.value++ : r.value = 0, ie().then(() => {
334
+ var e;
335
+ if (C.value !== null) {
336
+ const a = (e = k.value) == null ? void 0 : e.querySelector(
337
+ `#${O.value[C.value].id}`
338
+ );
339
+ a instanceof HTMLElement && a.scrollIntoView({
340
+ behavior: "smooth",
341
+ block: "nearest",
342
+ inline: "start"
343
+ });
344
+ }
345
+ });
346
+ }, _e = () => {
347
+ r.value !== null ? r.value-- : r.value = O.value.length - 1, ie().then(() => {
348
+ var e;
349
+ if (C.value !== null) {
350
+ const a = (e = k.value) == null ? void 0 : e.querySelector(
351
+ `#${O.value[C.value].id}`
352
+ );
353
+ a instanceof HTMLElement && a.scrollIntoView({
354
+ behavior: "smooth",
355
+ block: "nearest",
356
+ inline: "start"
357
+ });
358
+ }
359
+ });
359
360
  }, Oe = async (e) => {
360
361
  var a, t;
361
362
  if (l.readonly || l.disabled) {
@@ -365,61 +366,61 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
365
366
  switch (e.key) {
366
367
  case "ArrowUp":
367
368
  {
368
- if (e.preventDefault(), c.value)
369
+ if (e.preventDefault(), d.value)
369
370
  return;
370
- i.value = null, C.value ? _e() : (o.value.length, await D());
371
+ i.value = null, w.value ? _e() : (s.value.length && (r.value = G(s.value).index), await N());
371
372
  }
372
373
  break;
373
374
  case "ArrowDown":
374
375
  {
375
- if (e.preventDefault(), c.value)
376
+ if (e.preventDefault(), d.value)
376
377
  return;
377
- i.value = null, C.value ? ke() : (o.value.length, await D());
378
+ i.value = null, w.value ? ke() : (s.value.length && (r.value = G(s.value).index), await N());
378
379
  }
379
380
  break;
380
381
  case "ArrowLeft":
381
382
  {
382
- if (c.value)
383
+ if (d.value)
383
384
  return;
384
- if (!u.value && o.value.length && (i.value === null ? i.value = o.value.length - 1 : i.value > 0 ? i.value-- : i.value = null, i.value !== null)) {
385
- let n = o.value[i.value], s = (a = r.value) == null ? void 0 : a.querySelector(
385
+ if (!o.value && s.value.length && (i.value === null ? i.value = s.value.length - 1 : i.value > 0 ? i.value-- : i.value = null, i.value !== null)) {
386
+ let n = s.value[i.value], u = (a = k.value) == null ? void 0 : a.querySelector(
386
387
  `#${n.id}`
387
388
  );
388
- s && (s.scrollIntoView({
389
+ u && (u.scrollIntoView({
389
390
  behavior: "smooth",
390
391
  block: "nearest",
391
392
  inline: "start"
392
- }), y.value = z.value[o.value[i.value].id].index);
393
+ }), r.value = q.value[s.value[i.value].id].index);
393
394
  }
394
395
  }
395
396
  break;
396
397
  case "ArrowRight":
397
398
  {
398
- if (c.value)
399
+ if (d.value)
399
400
  return;
400
- if (!u.value && o.value.length && (i.value === null ? i.value = 0 : i.value < o.value.length - 1 ? i.value++ : i.value = null, i.value !== null)) {
401
- let n = o.value[i.value], s = (t = r.value) == null ? void 0 : t.querySelector(
401
+ if (!o.value && s.value.length && (i.value === null ? i.value = 0 : i.value < s.value.length - 1 ? i.value++ : i.value = null, i.value !== null)) {
402
+ let n = s.value[i.value], u = (t = k.value) == null ? void 0 : t.querySelector(
402
403
  `#${n.id}`
403
404
  );
404
- s && (s.scrollIntoView({
405
+ u && (u.scrollIntoView({
405
406
  behavior: "smooth",
406
407
  block: "nearest",
407
408
  inline: "start"
408
- }), y.value = z.value[o.value[i.value].id].index);
409
+ }), r.value = q.value[s.value[i.value].id].index);
409
410
  }
410
411
  }
411
412
  break;
412
413
  case "Enter":
413
414
  {
414
- if (e.preventDefault(), c.value)
415
+ if (e.preventDefault(), d.value)
415
416
  return;
416
- if (!C.value)
417
- S.value.length && o.value.length && (y.value = We(o.value).index), await D();
418
- else if (k.value !== null) {
419
- if (S.value[k.value].disabled)
417
+ if (!w.value)
418
+ g.value.length && s.value.length && (r.value = G(s.value).index), await N();
419
+ else if (C.value !== null) {
420
+ if (g.value[C.value].disabled)
420
421
  return;
421
- l.multiple || await J(), A(
422
- S.value[k.value]
422
+ l.multiple || await A(), F(
423
+ g.value[C.value]
423
424
  );
424
425
  } else if (l.addOptions) {
425
426
  if (l.itemText || l.itemValue) {
@@ -428,67 +429,69 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
428
429
  );
429
430
  return;
430
431
  }
431
- he();
432
- const n = Re(V.value);
433
- A(z.value[n.id]);
432
+ ye();
433
+ const n = ze(_.value);
434
+ F(q.value[n.id]);
434
435
  }
435
436
  }
436
437
  break;
437
438
  case "Tab":
438
439
  case "Escape":
439
- C.value && await J(), d("inactive"), i.value = null, y.value = null;
440
+ w.value && await A(), c("inactive"), i.value = null, r.value = null;
440
441
  break;
441
442
  case "Shift":
442
- if (c.value)
443
+ if (d.value)
443
444
  return;
444
445
  break;
445
446
  case "Backspace":
446
447
  {
447
- if (c.value)
448
+ if (d.value)
448
449
  return;
449
- u.value || o.value.length && (i.value === null ? i.value = o.value.length - 1 : (A(
450
- o.value[i.value]
451
- ), o.value.length ? i.value = Math.max(
450
+ o.value || s.value.length && (i.value === null ? i.value = s.value.length - 1 : (F(
451
+ s.value[i.value]
452
+ ), s.value.length ? i.value = Math.max(
452
453
  Math.min(
453
454
  i.value,
454
- o.value.length - 2
455
+ s.value.length - 2
455
456
  ),
456
457
  0
457
- ) : i.value = null)), await D();
458
+ ) : i.value = null)), await N();
458
459
  }
459
460
  break;
460
461
  default:
461
- i.value = null, y.value = null, await D();
462
+ i.value = null, r.value = null, await N();
462
463
  break;
463
464
  }
464
465
  };
465
- let Z;
466
- const Te = () => {
467
- Z && clearTimeout(Z), Z = setTimeout(async () => {
466
+ let K;
467
+ const Se = () => {
468
+ K && clearTimeout(K), K = setTimeout(async () => {
468
469
  try {
469
- await $({ prefill: !1 });
470
+ await I({ prefill: !1 });
470
471
  } catch (e) {
471
472
  console.error(e);
472
473
  }
473
474
  }, l.queryDebounceTime);
474
- }, Se = (e) => {
475
- d("click", e), !(l.disabled || l.readonly) && (O.value instanceof HTMLElement && O.value.focus(), D());
475
+ }, Te = (e) => {
476
+ c("click", e), !(l.disabled || l.readonly) && (S.value instanceof HTMLElement && S.value.focus(), N());
476
477
  }, xe = (e) => {
477
478
  if (e.currentTarget instanceof HTMLElement && e.currentTarget.classList.contains("bb-base-select-option")) {
478
- const a = z.value[e.currentTarget.id];
479
+ const a = q.value[e.currentTarget.id];
479
480
  if (a.disabled)
480
481
  return;
481
- A(a), O.value instanceof HTMLInputElement && O.value.focus(), l.multiple || J();
482
+ F(a), S.value instanceof HTMLInputElement && S.value.focus(), l.multiple || A();
482
483
  }
483
- }, ue = async (e) => {
484
- if (e.target instanceof Node && _.value && !_.value.contains(e.target)) {
485
- J(), d("inactive"), document.removeEventListener("click", ue), P.value = !1, l.multiple && (await q(500), u.value = "");
484
+ }, te = (e) => {
485
+ if (e.target instanceof Node && L.value && !L.value.contains(e.target)) {
486
+ A(), c("inactive"), document.removeEventListener("click", te), H.value = !1, l.multiple && X(500).then(() => {
487
+ o.value = "";
488
+ });
486
489
  return;
487
490
  }
488
- }, Be = Ze(
491
+ }, Be = Qe(
489
492
  (e) => typeof e != "string",
490
493
  JSON.stringify
491
- ), Ee = g(() => [].concat(l.modelValue).map((e) => {
494
+ ), Ee = y(() => [].concat(l.modelValue).map((e) => {
492
495
  const a = Be(e);
493
496
  return {
494
497
  disabled: l.disabled,
@@ -497,182 +500,192 @@ const Xe = { class: "bb-base-select__input-container" }, el = ["id", "autocomple
497
500
  value: a
498
501
  };
499
502
  }));
500
- return (e, a) => (p(), h("span", {
503
+ return (e, a) => (p(), h("div", {
501
504
  ref_key: "outerContainer",
502
- ref: _,
503
- class: B({
505
+ ref: L,
506
+ class: x({
504
507
  "bb-base-select": !0,
505
- "bb-base-select--active": P.value,
506
- "bb-base-select--loading": c.value,
508
+ "bb-base-select--active": H.value,
509
+ "bb-base-select--loading": d.value,
507
510
  "bb-base-select--disabled": e.disabled,
508
511
  "bb-base-select--errors": e.hasErrors,
509
512
  "bb-base-select--readonly": e.readonly
510
513
  }),
511
- onClick: Se
514
+ onClick: Te
512
515
  }, [
513
516
  b(e.$slots, "prepend-outer"),
514
- w("span", {
517
+ V("span", {
515
518
  ref_key: "innerContainer",
516
- ref: N,
519
+ ref: J,
517
520
  class: "bb-base-select__inner-container"
518
521
  }, [
519
522
  b(e.$slots, "prepend"),
520
- w("span", Xe, [
521
- e.multiple ? (p(), h(L, { key: 0 }, [
522
- e.comma ? (p(!0), h(L, { key: 0 }, j(o.value, (t, n) => (p(), h("span", {
523
+ V("span", Ze, [
524
+ e.multiple ? (p(), h($, { key: 0 }, [
525
+ e.comma ? (p(!0), h($, { key: 0 }, j(s.value, (t, n) => (p(), h("span", {
523
526
  key: t.id,
524
- class: B({
527
+ class: x({
525
528
  "bb-base-select__selected": !0,
526
529
  "bb-base-select__selected--comma": !0,
527
530
  "bb-base-select__selected--focused": n === i.value
528
531
  })
529
- }, F(t.text) + F(n < o.value.length - 1 ? "," : ""), 3))), 128)) : (p(!0), h(L, { key: 1 }, j(o.value, (t, n) => (p(), se(ze, {
532
+ }, D(t.text) + D(n < s.value.length - 1 ? "," : ""), 3))), 128)) : (p(!0), h($, { key: 1 }, j(s.value, (t, n) => (p(), ae(Ae, {
530
533
  key: t.id,
531
- class: B({
534
+ class: x({
532
535
  "bb-base-select__selected": !0,
533
536
  "bb-base-select__selected--chip": !0,
534
537
  "bb-base-select__selected--focused": n === i.value
535
538
  }),
536
539
  clearable: !0,
537
540
  text: t.text,
538
- "onClick:clear": E((s) => A(t), ["stop"])
541
+ "onClick:clear": B((u) => F(t), ["stop"])
539
542
  }, {
540
- default: De(() => [
543
+ default: ne(() => [
541
544
  b(e.$slots, "chip", {
542
545
  disabled: t.disabled,
543
546
  hasErrors: e.hasErrors,
544
547
  index: t.index,
545
548
  item: t.original,
546
- loading: !!c.value,
549
+ loading: !!d.value,
547
550
  manual: t.manual,
548
551
  selected: t.selected,
549
552
  text: t.text,
550
553
  value: t.value
551
554
  }, () => [
552
- ee(F(t.text), 1)
555
+ Z(D(t.text), 1)
553
556
  ])
554
557
  ]),
555
558
  _: 2
556
559
  }, 1032, ["class", "text", "onClick:clear"]))), 128))
557
- ], 64)) : ie("", !0),
558
- Le(w("input", {
560
+ ], 64)) : ue("", !0),
561
+ Ne(V("input", {
559
562
  id: e.id,
560
563
  ref_key: "input",
561
- ref: O,
562
- "onUpdate:modelValue": a[0] || (a[0] = (t) => u.value = t),
564
+ ref: S,
565
+ "onUpdate:modelValue": a[0] || (a[0] = (t) => o.value = t),
563
566
  autocomplete: e.autocomplete,
564
567
  autofocus: e.autofocus,
565
- class: B("bb-base-select__text-input"),
568
+ class: x("bb-base-select__text-input"),
566
569
  disabled: e.disabled,
567
- placeholder: de.value,
570
+ placeholder: ve.value,
571
+ role: "combobox",
572
+ "aria-controls": `${e.id}_listbox`,
573
+ "aria-autocomplete": "list",
568
574
  readonly: e.readonly || !e.allowWriting,
569
575
  type: "text",
570
- onBlur: E(we, ["stop"]),
571
- onChange: E(Ve, ["stop"]),
572
- onFocus: E(ge, ["stop"]),
573
- onInput: E(Ce, ["stop"]),
574
- onKeydown: E(Oe, ["stop"])
575
- }, null, 40, el), [
576
- [Fe, u.value]
577
- ]),
578
- (p(), se(Ae, { to: "body" }, [
579
- w("span", {
580
- ref_key: "optionsContainer",
581
- ref: r,
582
- class: B({
583
- "bb-base-select__options-container": !0,
584
- "bb-base-select__options-container--shown": C.value,
585
- "bb-base-select__options-container--showing": W.value,
586
- "bb-base-select__options-container--hiding": R.value,
587
- "bb-base-select__options-container--hidden": K.value
588
- }),
589
- role: "listbox",
590
- style: Je({ transitionDuration: fe }),
591
- tabindex: -1
592
- }, [
576
+ onBlur: B(Ve, ["stop"]),
577
+ onChange: B(we, ["stop"]),
578
+ onFocus: B(ge, ["stop"]),
579
+ onInput: B(Ce, ["stop"]),
580
+ onKeydown: B(Oe, ["stop"])
581
+ }, null, 40, Ge), [
582
+ [$e, o.value]
583
+ ])
584
+ ]),
585
+ V("span", Xe, [
586
+ b(e.$slots, "chevron", {
587
+ loading: !!d.value,
588
+ shown: w.value
589
+ }, () => [
590
+ el
591
+ ])
592
+ ]),
593
+ d.value ? (p(), h("span", {
594
+ key: 1,
595
+ class: x({
596
+ "bb-base-select__spinner": !0,
597
+ "bb-base-select__spinner--loading": d.value
598
+ })
599
+ }, [
600
+ b(e.$slots, "spinner", {
601
+ loading: !!d.value
602
+ }, () => [
603
+ oe(Me, { size: "sm" })
604
+ ])
605
+ ], 2)) : b(e.$slots, "append", { key: 0 })
606
+ ], 512),
607
+ b(e.$slots, "append-outer"),
608
+ (p(!0), h($, null, j(Ee.value, (t) => (p(), h("input", De({
609
+ key: t.value
610
+ }, t), null, 16))), 128)),
611
+ (p(), ae(Le, { to: "body" }, [
612
+ V("span", {
613
+ ref_key: "optionsContainer",
614
+ ref: k,
615
+ class: x({
616
+ "bb-base-select__options-container": !0,
617
+ "bb-base-select__options-container--shown": w.value,
618
+ "bb-base-select__options-container--hidden": W.value
619
+ }),
620
+ id: `${e.id}_listbox`,
621
+ role: "listbox",
622
+ tabindex: -1,
623
+ style: Fe(fe.value)
624
+ }, [
625
+ oe(We, {
626
+ modelValue: w.value,
627
+ "transition-duration": e.transitionDuration
628
+ }, {
629
+ default: ne(() => [
593
630
  b(e.$slots, "options:prepend"),
594
- !S.value.length && c.value ? (p(), h("span", ll, [
595
- b(e.$slots, "loading", { query: u.value }, () => [
596
- ee(F(e.loadingText), 1)
631
+ !g.value.length && d.value ? (p(), h("span", tl, [
632
+ b(e.$slots, "loading", { query: o.value }, () => [
633
+ Z(D(e.loadingText), 1)
597
634
  ])
598
- ])) : S.value.length ? ie("", !0) : (p(), h("span", tl, [
599
- b(e.$slots, "no-data", { query: u.value }, () => [
600
- ee(F(e.noDataText), 1)
635
+ ])) : g.value.length ? ue("", !0) : (p(), h("span", al, [
636
+ b(e.$slots, "no-data", { query: o.value }, () => [
637
+ Z(D(e.noDataText), 1)
601
638
  ])
602
639
  ])),
603
- (p(!0), h(L, null, j(S.value, (t) => (p(), h(L, {
640
+ (p(!0), h($, null, j(g.value, (t, n) => (p(), h($, {
604
641
  key: t.id
605
642
  }, [
606
643
  b(e.$slots, "option:prepend", {
607
644
  item: t.original
608
645
  }),
609
- w("span", {
646
+ V("span", {
610
647
  id: t.id,
611
648
  "aria-selected": t.selected,
612
- class: B({
649
+ class: x({
613
650
  "bb-base-select-option": !0,
614
651
  "bb-base-select-option--selected": t.selected,
615
- "bb-base-select-option--focused": t.focused,
652
+ "bb-base-select-option--focused": C.value === n,
616
653
  "bb-base-select-option--disabled": t.disabled
617
654
  }),
618
655
  role: "option",
619
- onClick: E(xe, ["stop"])
656
+ onClick: B(xe, ["stop"])
620
657
  }, [
621
658
  b(e.$slots, "option", {
622
659
  disabled: t.disabled,
623
- focused: t.focused,
660
+ focused: C.value === n,
624
661
  hasErrors: e.hasErrors,
625
662
  index: t.index,
626
663
  item: t.original,
627
- loading: !!c.value,
664
+ loading: !!d.value,
628
665
  manual: t.manual,
629
666
  selected: t.selected,
630
667
  text: t.text,
631
668
  value: t.value
632
669
  }, () => [
633
- w("span", nl, [
634
- w("span", ul, F(t.text), 1)
670
+ V("span", ul, [
671
+ V("span", ol, D(t.text), 1)
635
672
  ])
636
673
  ])
637
- ], 10, al),
674
+ ], 10, nl),
638
675
  b(e.$slots, "option:append", {
639
676
  item: t.original
640
677
  })
641
678
  ], 64))), 128)),
642
679
  b(e.$slots, "options:append")
643
- ], 6)
644
- ]))
645
- ]),
646
- w("span", sl, [
647
- b(e.$slots, "chevron", {
648
- loading: !!c.value,
649
- shown: C.value
650
- }, () => [
651
- il
652
- ])
653
- ]),
654
- c.value ? (p(), h("span", {
655
- key: 1,
656
- class: B({
657
- "bb-base-select__spinner": !0,
658
- "bb-base-select__spinner--loading": c.value
659
- })
660
- }, [
661
- b(e.$slots, "spinner", {
662
- loading: !!c.value
663
- }, () => [
664
- Me(He, { size: "sm" })
665
- ])
666
- ], 2)) : b(e.$slots, "append", { key: 0 })
667
- ], 512),
668
- b(e.$slots, "append-outer"),
669
- (p(!0), h(L, null, j(Ee.value, (t) => (p(), h("input", qe({
670
- key: t.value
671
- }, t), null, 16))), 128))
680
+ ]),
681
+ _: 3
682
+ }, 8, ["modelValue", "transition-duration"])
683
+ ], 14, ll)
684
+ ]))
672
685
  ], 2));
673
686
  }
674
687
  });
675
688
  export {
676
- kl as default
689
+ Tl as default
677
690
  };
678
691
  //# sourceMappingURL=index31.js.map