bitboss-ui 2.1.32 → 2.1.33

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