bitboss-ui 2.0.129 → 2.0.131

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