bitboss-ui 2.1.5 → 2.1.6

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