bitboss-ui 2.1.32 → 2.1.34

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