bitboss-ui 2.0.172 → 2.0.173

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 (182) hide show
  1. package/dist/components/BaseColorInput/BaseColorInput.vue.d.ts +2 -2
  2. package/dist/components/BbDropdown/BbDropdown.vue.d.ts +16 -2
  3. package/dist/components/BbPopover/BbPopover.vue.d.ts +18 -4
  4. package/dist/components/BbTooltip/BbTooltip.vue.d.ts +16 -2
  5. package/dist/components/CommonPopover.vue.d.ts +3 -0
  6. package/dist/index.css +1 -1
  7. package/dist/index106.js +7 -7
  8. package/dist/index111.js +1 -1
  9. package/dist/index113.js +1 -1
  10. package/dist/index121.js +9 -9
  11. package/dist/index129.js +1 -1
  12. package/dist/index13.js +1 -1
  13. package/dist/index131.js +40 -39
  14. package/dist/index133.js +1 -1
  15. package/dist/index139.js +2 -2
  16. package/dist/index15.js +35 -34
  17. package/dist/index17.js +3 -3
  18. package/dist/index19.js +5 -5
  19. package/dist/index209.js +5 -10
  20. package/dist/index21.js +16 -16
  21. package/dist/index210.js +5 -3
  22. package/dist/index211.js +5 -13
  23. package/dist/index212.js +5 -34
  24. package/dist/index213.js +5 -13
  25. package/dist/index214.js +5 -66
  26. package/dist/index215.js +7 -0
  27. package/dist/index216.js +3 -2
  28. package/dist/index217.js +2 -4
  29. package/dist/index218.js +8 -2
  30. package/dist/index219.js +250 -2
  31. package/dist/index220.js +52 -41
  32. package/dist/index221.js +43 -5
  33. package/dist/index222.js +5 -7
  34. package/dist/index223.js +56 -11
  35. package/dist/index224.js +13 -5
  36. package/dist/index225.js +2 -9
  37. package/dist/index226.js +2 -5
  38. package/dist/index227.js +2 -5
  39. package/dist/index228.js +66 -5
  40. package/dist/index23.js +114 -125
  41. package/dist/index230.js +13 -5
  42. package/dist/index231.js +177 -2
  43. package/dist/index232.js +41 -2
  44. package/dist/index233.js +6 -11
  45. package/dist/index234.js +7 -20
  46. package/dist/index235.js +13 -103
  47. package/dist/{index237.js → index236.js} +1 -1
  48. package/dist/index238.js +31 -0
  49. package/dist/index239.js +14 -27
  50. package/dist/index240.js +1 -1
  51. package/dist/index241.js +4 -4
  52. package/dist/index242.js +1 -1
  53. package/dist/index243.js +12 -3
  54. package/dist/index244.js +34 -12
  55. package/dist/index245.js +3 -16
  56. package/dist/index246.js +5 -4
  57. package/dist/index247.js +2 -200
  58. package/dist/index248.js +13 -0
  59. package/dist/index249.js +18 -16
  60. package/dist/index25.js +5 -5
  61. package/dist/index250.js +120 -12
  62. package/dist/index252.js +6 -0
  63. package/dist/index253.js +4 -100
  64. package/dist/index254.js +202 -0
  65. package/dist/index256.js +18 -2
  66. package/dist/index257.js +11 -176
  67. package/dist/index258.js +106 -3
  68. package/dist/index260.js +100 -5
  69. package/dist/index262.js +226 -6
  70. package/dist/index263.js +2 -250
  71. package/dist/index264.js +2 -52
  72. package/dist/index265.js +10 -44
  73. package/dist/index266.js +3 -5
  74. package/dist/index267.js +6 -60
  75. package/dist/index268.js +15 -8
  76. package/dist/index269.js +3 -23
  77. package/dist/index27.js +1 -1
  78. package/dist/index270.js +2 -6
  79. package/dist/index271.js +8 -15
  80. package/dist/index272.js +9 -3
  81. package/dist/index273.js +23 -9
  82. package/dist/index274.js +9 -8
  83. package/dist/index275.js +8 -2
  84. package/dist/index276.js +1 -1
  85. package/dist/index277.js +5 -5
  86. package/dist/index278.js +279 -7
  87. package/dist/index279.js +2 -5
  88. package/dist/index280.js +16 -7
  89. package/dist/index281.js +2 -11
  90. package/dist/index282.js +16 -2
  91. package/dist/index284.js +19 -7
  92. package/dist/index285.js +2 -3
  93. package/dist/index286.js +15 -4
  94. package/dist/index287.js +2 -3
  95. package/dist/index288.js +19 -17
  96. package/dist/index289.js +2 -28
  97. package/dist/index29.js +2 -2
  98. package/dist/index290.js +26 -3
  99. package/dist/index291.js +2 -471
  100. package/dist/index292.js +1 -1
  101. package/dist/index293.js +2 -3
  102. package/dist/index294.js +2 -3
  103. package/dist/index295.js +2 -280
  104. package/dist/index296.js +28 -2
  105. package/dist/index297.js +22 -125
  106. package/dist/index299.js +7 -15
  107. package/dist/index300.js +7 -2
  108. package/dist/index301.js +10 -15
  109. package/dist/index302.js +6 -2
  110. package/dist/index303.js +3 -16
  111. package/dist/index305.js +2 -19
  112. package/dist/index306.js +3 -2
  113. package/dist/index307.js +14 -197
  114. package/dist/index308.js +470 -5
  115. package/dist/index309.js +2 -3
  116. package/dist/index31.js +2 -2
  117. package/dist/index310.js +200 -3
  118. package/dist/index311.js +5 -2
  119. package/dist/index312.js +4 -5
  120. package/dist/index313.js +121 -15
  121. package/dist/index314.js +2 -2
  122. package/dist/index315.js +3 -27
  123. package/dist/index316.js +3 -2
  124. package/dist/index317.js +3 -2
  125. package/dist/index318.js +3 -2
  126. package/dist/index319.js +1 -1
  127. package/dist/index320.js +5 -2
  128. package/dist/index321.js +8 -22
  129. package/dist/index322.js +7 -0
  130. package/dist/index323.js +4 -5
  131. package/dist/index328.js +32 -57
  132. package/dist/index329.js +27 -57
  133. package/dist/index33.js +5 -5
  134. package/dist/index331.js +7 -28
  135. package/dist/index332.js +21 -0
  136. package/dist/index333.js +58 -47
  137. package/dist/index334.js +58 -7
  138. package/dist/index335.js +6 -7
  139. package/dist/index336.js +46 -5
  140. package/dist/index337.js +128 -7
  141. package/dist/index338.js +368 -6
  142. package/dist/index339.js +7 -18
  143. package/dist/index340.js +5 -227
  144. package/dist/index341.js +7 -127
  145. package/dist/index342.js +220 -360
  146. package/dist/index343.js +1 -1
  147. package/dist/index345.js +1 -1
  148. package/dist/index346.js +1 -1
  149. package/dist/index347.js +125 -43
  150. package/dist/index348.js +43 -125
  151. package/dist/index349.js +283 -229
  152. package/dist/index35.js +4 -4
  153. package/dist/index350.js +39 -38
  154. package/dist/index37.js +17 -17
  155. package/dist/index39.js +4 -4
  156. package/dist/index41.js +2 -2
  157. package/dist/index43.js +5 -5
  158. package/dist/index45.js +6 -6
  159. package/dist/index47.js +2 -2
  160. package/dist/index49.js +3 -3
  161. package/dist/index53.js +1 -1
  162. package/dist/index55.js +1 -1
  163. package/dist/index57.js +2 -2
  164. package/dist/index61.js +3 -3
  165. package/dist/index67.js +1 -1
  166. package/dist/index79.js +106 -112
  167. package/dist/index81.js +1 -1
  168. package/dist/index83.js +2 -2
  169. package/dist/index85.js +1 -1
  170. package/dist/index87.js +1 -1
  171. package/dist/index90.js +4 -4
  172. package/dist/index92.js +2 -2
  173. package/dist/index94.js +56 -56
  174. package/package.json +2 -2
  175. package/dist/index229.js +0 -7
  176. package/dist/index251.js +0 -108
  177. package/dist/index255.js +0 -230
  178. package/dist/index259.js +0 -4
  179. package/dist/index261.js +0 -7
  180. package/dist/index298.js +0 -4
  181. package/dist/index330.js +0 -35
  182. /package/dist/{index304.js → index283.js} +0 -0
package/dist/index23.js CHANGED
@@ -1,29 +1,27 @@
1
- import { defineComponent as J, watchEffect as K, ref as n, computed as y, watch as Q, createBlock as X, openBlock as w, normalizeClass as S, withCtx as l, createVNode as h, unref as r, withDirectives as x, createElementVNode as d, createElementBlock as ee, createCommentVNode as te, mergeProps as B, withModifiers as ae, toDisplayString as E, renderSlot as p } from "vue";
2
- import { _config as oe } from "./index4.js";
3
- import o from "./index224.js";
4
- import { debounce as re } from "./index225.js";
5
- import ne from "./index226.js";
6
- import le from "./index227.js";
7
- import ie from "./index228.js";
8
- import se from "./index229.js";
9
- import de from "./index230.js";
10
- import { identity as ue } from "./index219.js";
11
- import { isEmpty as ce } from "./index231.js";
12
- import { last as pe } from "./index232.js";
13
- import { useId as me } from "./index8.js";
14
- import { useIntersectionObserver as fe } from "./index137.js";
15
- import { useLocale as be } from "./index211.js";
16
- import { useMobile as ke } from "./index9.js";
17
- import { useUntil as ge } from "./index233.js";
18
- import { vMaska as ye } from "./index234.js";
19
- import ve from "./index21.js";
1
+ import { defineComponent as K, watchEffect as Q, ref as l, computed as k, watch as D, createBlock as C, openBlock as Y, normalizeClass as w, withCtx as i, createVNode as B, unref as r, createCommentVNode as X, withDirectives as x, createElementVNode as s, mergeProps as S, withModifiers as ee, toDisplayString as E, renderSlot as c } from "vue";
2
+ import { _config as te } from "./index4.js";
3
+ import o from "./index209.js";
4
+ import ae from "./index246.js";
5
+ import oe from "./index213.js";
6
+ import re from "./index210.js";
7
+ import ne from "./index211.js";
8
+ import le from "./index212.js";
9
+ import { identity as ie } from "./index226.js";
10
+ import { isEmpty as se } from "./index247.js";
11
+ import { last as de } from "./index217.js";
12
+ import { useId as ue } from "./index8.js";
13
+ import { useLocale as pe } from "./index224.js";
14
+ import { useMobile as ce } from "./index9.js";
15
+ import { useUntil as me } from "./index248.js";
16
+ import { vMaska as fe } from "./index249.js";
17
+ import be from "./index21.js";
20
18
  /* empty css */
21
- import Ve from "./index214.js";
19
+ import ge from "./index228.js";
22
20
  /* empty css */
23
- import he from "./index213.js";
24
- import Me from "./index235.js";
21
+ import ke from "./index230.js";
22
+ import ye from "./index250.js";
25
23
  /* empty css */
26
- const De = ["inert"], Ce = ["id", "aria-describedby", "autocomplete", "autofocus", "data-maska", "disabled", "inputmode", "name", "placeholder", "readonly", "required", "value"], Ye = ["aria-label", "disabled"], we = ["id"], Xe = /* @__PURE__ */ J({
24
+ const ve = ["inert"], Ve = ["id", "aria-describedby", "autocomplete", "autofocus", "data-maska", "disabled", "inputmode", "name", "placeholder", "readonly", "required", "value"], Me = ["aria-label", "disabled"], he = ["id"], ze = /* @__PURE__ */ K({
27
25
  __name: "BaseDatePickerInput",
28
26
  props: {
29
27
  allowWriting: { type: [Boolean, String], default: !0 },
@@ -51,72 +49,63 @@ const De = ["inert"], Ce = ["id", "aria-describedby", "autocomplete", "autofocus
51
49
  },
52
50
  emits: ["active", "error", "focus", "inactive", "update:modelValue"],
53
51
  setup(I, { emit: $ }) {
54
- const L = { it: de, en: le };
55
- o.extend(ne), o.extend(ie), o.extend(se), K(() => {
56
- o.locale(L[oe.locale]);
52
+ const L = { it: le, en: oe };
53
+ o.extend(ae), o.extend(re), o.extend(ne), Q(() => {
54
+ o.locale(L[te.locale]);
57
55
  });
58
- const t = I, i = $, { t: u } = be(), M = n(null), v = n(null), m = n(null), _ = n(null), f = n(null), D = n(), b = t.id || `bdpi-${me().id.value}`, { isMobile: O } = ke(), P = y(
59
- () => t.allowWriting === "not-mobile" && O.value ? "none" : "numeric"
60
- );
61
- fe(
62
- // @ts-expect-error wrong inferred type
63
- m,
64
- re(() => {
65
- s.value && (m.value && m.value.$el.querySelector(
66
- ".bb-base-date-picker-input__calendar-btn"
67
- ).focus({ preventScroll: !0 }), V());
68
- }, 100),
69
- { threshold: [0, 1] }
70
- );
71
- const F = y(() => ({
56
+ const t = I, d = $, { t: u } = pe(), v = l(null), y = l(null), O = l(null), _ = l(null), m = l(null), V = l(), f = t.id || `bdpi-${ue().id.value}`, { isMobile: P } = ce(), F = k(
57
+ () => t.allowWriting === "not-mobile" && P.value ? "none" : "numeric"
58
+ ), j = k(() => ({
72
59
  "bb-base-date-picker-input": !0,
73
- "bb-base-date-picker-input--active": k.value,
60
+ "bb-base-date-picker-input--active": b.value,
74
61
  "bb-base-date-picker-input--errors": t.hasErrors,
75
62
  "bb-base-date-picker-input--loading": t.loading,
76
63
  "bb-base-date-picker-input--readonly": t.readonly,
77
64
  "bb-base-date-picker-input--disabled": t.disabled,
78
65
  "bb-base-date-picker-input--compact": t.compact
79
- })), j = {
66
+ })), A = {
80
67
  onInput: (e) => {
81
68
  if (!t.range && e.target instanceof HTMLInputElement)
82
- if (f.value = e.target.value, /\d{2}\/\d{2}\/\d{4}/.test(e.target.value)) {
69
+ if (m.value = e.target.value, /\d{2}\/\d{2}\/\d{4}/.test(e.target.value)) {
83
70
  const a = o(e.target.value, "DD/MM/YYYY");
84
- z(a) ? (e.target.value = "", i("update:modelValue", null), i("error", "invalid_date_typed")) : i("update:modelValue", a.toISOString());
85
- } else e.target.value === "" && i("update:modelValue", null);
71
+ Z(a) ? (e.target.value = "", d("update:modelValue", null), d("error", "invalid_date_typed")) : d("update:modelValue", a.toISOString());
72
+ } else e.target.value === "" && d("update:modelValue", null);
86
73
  }
87
- }, k = n(!1), A = () => {
88
- k.value || (i("active"), k.value = !0, document.addEventListener("focusin", g), document.addEventListener("click", g));
74
+ }, b = l(!1), H = () => {
75
+ b.value || (d("active"), b.value = !0, document.addEventListener("focusin", g), document.addEventListener("click", g));
89
76
  }, g = (e) => {
90
- var a, c;
91
- e.target instanceof HTMLElement && (a = v.value) != null && a.$el && !v.value.$el.contains(e.target) && !((c = M.value) != null && c.contains(e.target)) && (k.value = !1, i("inactive"), document.removeEventListener("focusin", g), document.removeEventListener("click", g));
92
- }, C = (e) => {
77
+ var a, p;
78
+ e.target instanceof HTMLElement && (a = y.value) != null && a.$el && !y.value.$el.contains(e.target) && !((p = v.value) != null && p.contains(e.target)) && (b.value = !1, d("inactive"), document.removeEventListener("focusin", g), document.removeEventListener("click", g));
79
+ }, M = (e) => {
93
80
  if (e)
94
81
  if (Array.isArray(e)) {
95
- let a, c;
96
- return e.length && (a = e[0]), e.length > 1 && (c = pe(e)), [a, c].filter(ue).map((G) => o(G).format("DD/MM/YYYY")).join(" - ");
82
+ let a, p;
83
+ return e.length && (a = e[0]), e.length > 1 && (p = de(e)), [a, p].filter(ie).map((J) => o(J).format("DD/MM/YYYY")).join(" - ");
97
84
  } else
98
85
  return o(e).format("DD/MM/YYYY");
99
86
  return null;
100
- }, H = y(() => f.value ? f.value : C(t.modelValue));
101
- Q(
87
+ }, W = k(() => m.value ? m.value : M(t.modelValue));
88
+ D(
102
89
  () => t.modelValue,
103
90
  (e) => {
104
- f.value = C(e);
91
+ m.value = M(e);
105
92
  }
106
93
  );
107
- const s = n(!1), W = ge(s), Y = (e) => {
94
+ const n = l(!1), q = me(n), h = (e) => {
108
95
  const a = e.target;
109
- a && a instanceof HTMLDialogElement && V();
110
- }, q = async () => {
111
- t.disabled || t.readonly || (s.value = !0, document.addEventListener("click", Y, { passive: !0 }));
112
- }, V = async () => {
113
- var e;
114
- s.value = !1, (e = D.value) == null || e.resetStatus(), document.removeEventListener("click", Y);
115
- }, R = n(!t.allowWriting || t.range), T = (e) => t.range && Array.isArray(e) && e.length === 2 || !t.range && !!e, N = {
96
+ a && a instanceof HTMLDialogElement && (n.value = !1);
97
+ }, R = async () => {
98
+ t.disabled || t.readonly || (n.value = !0);
99
+ };
100
+ D(n, (e) => {
101
+ var a;
102
+ e ? document.addEventListener("click", h, { passive: !0 }) : ((a = V.value) == null || a.resetStatus(), document.removeEventListener("click", h));
103
+ });
104
+ const T = l(!t.allowWriting || t.range), N = (e) => t.range && Array.isArray(e) && e.length === 2 || !t.range && !!e, U = {
116
105
  "onUpdate:modelValue": (e) => {
117
- i("update:modelValue", e), T(e) && (R.value = !1, V());
106
+ d("update:modelValue", e), N(e) && (T.value = !1, n.value = !1);
118
107
  }
119
- }, U = y(() => {
108
+ }, z = k(() => {
120
109
  if (t.range) {
121
110
  if (!t.modelValue || t.modelValue.length < 2)
122
111
  return u("baseDatePickerInput.emptyRange").value;
@@ -128,67 +117,67 @@ const De = ["inert"], Ce = ["id", "aria-describedby", "autocomplete", "autofocus
128
117
  return u("baseDatePickerInput.changeSelection", e).value;
129
118
  }
130
119
  return u("baseDatePickerInput.emptySelection").value;
131
- }), z = (e) => {
120
+ }), Z = (e) => {
132
121
  let a = !0;
133
122
  return t.min && a && (a = e.isSameOrAfter(o(t.min).startOf("day"))), t.max && a && (a = e.isSameOrBefore(o(t.max).startOf("day"))), typeof t.selectable == "function" && a && (a = t.selectable(e.toDate())), !a;
134
- }, Z = () => {
123
+ }, G = () => {
135
124
  let e = null;
136
- t.range && (e = []), i("update:modelValue", e);
125
+ t.range && (e = []), d("update:modelValue", e);
137
126
  };
138
- return (e, a) => (w(), X(he, {
127
+ return (e, a) => (Y(), C(ke, {
139
128
  ref_key: "outerContainer",
140
- ref: v,
141
- class: S(F.value),
142
- onFocusin: A
129
+ ref: y,
130
+ class: w(j.value),
131
+ onFocusin: H
143
132
  }, {
144
- "prepend-outer": l(() => [
145
- p(e.$slots, "prepend-outer")
133
+ "prepend-outer": i(() => [
134
+ c(e.$slots, "prepend-outer")
146
135
  ]),
147
- "append-outer": l(() => [
148
- p(e.$slots, "append-outer")
136
+ "append-outer": i(() => [
137
+ c(e.$slots, "append-outer")
149
138
  ]),
150
- default: l(() => [
151
- h(Ve, {
139
+ default: i(() => [
140
+ B(ge, {
152
141
  ref_key: "innerContainer",
153
- ref: m,
142
+ ref: O,
154
143
  "append:icon": t["append:icon"],
155
- clearable: t.clearable && !r(ce)(e.modelValue),
144
+ clearable: t.clearable && !r(se)(e.modelValue),
156
145
  "prepend:icon": t["prepend:icon"],
157
- "onClick:clear": Z
146
+ "onClick:clear": G
158
147
  }, {
159
- prepend: l(() => [
160
- p(e.$slots, "prepend")
148
+ prepend: i(() => [
149
+ c(e.$slots, "prepend")
161
150
  ]),
162
- prefix: l(() => [
163
- p(e.$slots, "prefix")
151
+ prefix: i(() => [
152
+ c(e.$slots, "prefix")
164
153
  ]),
165
- append: l(() => [
166
- p(e.$slots, "append")
154
+ append: i(() => [
155
+ c(e.$slots, "append")
167
156
  ]),
168
- suffix: l(() => [
169
- p(e.$slots, "suffix")
157
+ suffix: i(() => [
158
+ c(e.$slots, "suffix")
170
159
  ]),
171
- default: l(() => [
172
- h(Me, {
173
- modelValue: s.value,
174
- "onUpdate:modelValue": a[0] || (a[0] = (c) => s.value = c),
160
+ default: i(() => [
161
+ r(q) ? (Y(), C(ye, {
162
+ key: 0,
163
+ modelValue: n.value,
164
+ "onUpdate:modelValue": a[0] || (a[0] = (p) => n.value = p),
175
165
  block: !0,
176
166
  dialog: "",
177
167
  offset: 4
178
168
  }, {
179
- default: l(() => [
180
- r(W) ? (w(), ee("div", {
181
- key: 0,
169
+ default: i(() => [
170
+ s("div", {
182
171
  ref_key: "calendar",
183
- ref: M,
184
- class: S(["bb-base-date-picker-input__calendar", {
185
- "bb-base-date-picker-input__calendar--shown": s.value
172
+ ref: v,
173
+ class: w(["bb-base-date-picker-input__calendar", {
174
+ "bb-base-date-picker-input__calendar--shown": n.value
186
175
  }]),
187
- inert: !s.value
176
+ inert: !n.value
188
177
  }, [
189
- h(ve, B({ id: r(b) }, N, {
178
+ B(be, S({ id: r(f) }, U, {
190
179
  ref_key: "basedatepicker",
191
- ref: D,
180
+ ref: V,
192
181
  disabled: e.disabled,
193
182
  "first-day-of-week": e.firstDayOfWeek,
194
183
  max: e.max,
@@ -198,73 +187,73 @@ const De = ["inert"], Ce = ["id", "aria-describedby", "autocomplete", "autofocus
198
187
  readonly: e.readonly,
199
188
  selectable: e.selectable
200
189
  }), null, 16, ["id", "disabled", "first-day-of-week", "max", "min", "model-value", "range", "readonly", "selectable"])
201
- ], 10, De)) : te("", !0)
190
+ ], 10, ve)
202
191
  ]),
203
192
  _: 1
204
- }, 8, ["modelValue"]),
205
- x(d("input", B({
206
- id: r(b),
193
+ }, 8, ["modelValue"])) : X("", !0),
194
+ x(s("input", S({
195
+ id: r(f),
207
196
  ref_key: "input",
208
197
  ref: _,
209
- "aria-describedby": `bdpi-description_${r(b)}`,
198
+ "aria-describedby": `bdpi-description_${r(f)}`,
210
199
  autocomplete: e.autocomplete,
211
200
  autofocus: e.autofocus,
212
201
  "data-maska": t.range ? "##/##/#### - ##/##/####" : "##/##/####",
213
202
  disabled: e.disabled,
214
- inputmode: P.value,
203
+ inputmode: F.value,
215
204
  name: e.name,
216
205
  placeholder: e.placeholder,
217
206
  readonly: e.readonly || e.range || !e.allowWriting,
218
207
  required: e.required
219
- }, j, {
208
+ }, A, {
220
209
  size: "1",
221
210
  type: "text",
222
- value: H.value
223
- }), null, 16, Ce), [
224
- [r(ye)]
211
+ value: W.value
212
+ }), null, 16, Ve), [
213
+ [r(fe)]
225
214
  ]),
226
- d("button", {
227
- "aria-label": U.value,
215
+ s("button", {
216
+ "aria-label": z.value,
228
217
  class: "bb-base-date-picker-input__calendar-btn",
229
218
  disabled: e.disabled || e.readonly,
230
219
  type: "button",
231
- onClick: ae(q, ["stop"])
220
+ onClick: ee(R, ["stop"])
232
221
  }, a[1] || (a[1] = [
233
- d("svg", {
222
+ s("svg", {
234
223
  fill: "none",
235
224
  viewBox: "0 0 16 16",
236
225
  xmlns: "http://www.w3.org/2000/svg"
237
226
  }, [
238
- d("path", {
227
+ s("path", {
239
228
  d: "M12.6667 2.66667H3.33333C2.59695 2.66667 2 3.26363 2 4.00001V13.3333C2 14.0697 2.59695 14.6667 3.33333 14.6667H12.6667C13.403 14.6667 14 14.0697 14 13.3333V4.00001C14 3.26363 13.403 2.66667 12.6667 2.66667Z",
240
229
  stroke: "currentColor",
241
230
  "stroke-linecap": "round",
242
231
  "stroke-linejoin": "round"
243
232
  }),
244
- d("path", {
233
+ s("path", {
245
234
  d: "M10.6667 1.33333V3.99999",
246
235
  stroke: "currentColor",
247
236
  "stroke-linecap": "round",
248
237
  "stroke-linejoin": "round"
249
238
  }),
250
- d("path", {
239
+ s("path", {
251
240
  d: "M5.33333 1.33333V3.99999",
252
241
  stroke: "currentColor",
253
242
  "stroke-linecap": "round",
254
243
  "stroke-linejoin": "round"
255
244
  }),
256
- d("path", {
245
+ s("path", {
257
246
  d: "M2 6.66667H14",
258
247
  stroke: "currentColor",
259
248
  "stroke-linecap": "round",
260
249
  "stroke-linejoin": "round"
261
250
  })
262
251
  ], -1)
263
- ]), 8, Ye),
264
- d("span", {
265
- id: `bdpi-description_${r(b)}`,
252
+ ]), 8, Me),
253
+ s("span", {
254
+ id: `bdpi-description_${r(f)}`,
266
255
  class: "bb-base-date-picker-input__accessible-description sr-only"
267
- }, E(r(u)("baseDatePickerInput.dateFormat")) + " " + E(t.range ? r(u)("baseDatePickerInput.dateFormatRange") : r(u)("baseDatePickerInput.dateFormatSingle")), 9, we)
256
+ }, E(r(u)("baseDatePickerInput.dateFormat")) + " " + E(t.range ? r(u)("baseDatePickerInput.dateFormatRange") : r(u)("baseDatePickerInput.dateFormatSingle")), 9, he)
268
257
  ]),
269
258
  _: 3
270
259
  }, 8, ["append:icon", "clearable", "prepend:icon"])
@@ -274,5 +263,5 @@ const De = ["inert"], Ce = ["id", "aria-describedby", "autocomplete", "autofocus
274
263
  }
275
264
  });
276
265
  export {
277
- Xe as default
266
+ ze as default
278
267
  };
package/dist/index230.js CHANGED
@@ -1,7 +1,15 @@
1
- import { getDefaultExportFromCjs as r } from "./index308.js";
2
- import { __require as t } from "./index305.js";
3
- var o = t();
4
- const a = /* @__PURE__ */ r(o);
1
+ import { createElementBlock as t, openBlock as n, renderSlot as e } from "vue";
2
+ /* empty css */
3
+ import r from "./index299.js";
4
+ const s = {}, c = { class: "bb-common-input-outer-container" };
5
+ function p(o, a) {
6
+ return n(), t("span", c, [
7
+ e(o.$slots, "prepend-outer"),
8
+ e(o.$slots, "default"),
9
+ e(o.$slots, "append-outer")
10
+ ]);
11
+ }
12
+ const i = /* @__PURE__ */ r(s, [["render", p]]);
5
13
  export {
6
- a as default
14
+ i as default
7
15
  };
package/dist/index231.js CHANGED
@@ -1,4 +1,179 @@
1
- const n = (t) => t == null || Number.isNaN(t) || typeof t == "object" && Object.keys(t).length === 0 || typeof t == "string" && t.trim().length === 0 || t instanceof Map && [...t.keys()].length === 0 || t instanceof Set && [...t.keys()].length === 0;
1
+ var w = Object.defineProperty, C = (a, t, e) => t in a ? w(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e, A = (a, t, e) => C(a, typeof t != "symbol" ? t + "" : t, e);
2
+ const R = {
3
+ "#": { pattern: /[0-9]/ },
4
+ "@": { pattern: /[a-zA-Z]/ },
5
+ "*": { pattern: /[a-zA-Z0-9]/ }
6
+ }, N = (a, t, e) => a.replaceAll(t, "").replace(e, ".").replace("..", ".").replace(/[^.\d]/g, ""), I = (a, t, e) => {
7
+ var s;
8
+ return new Intl.NumberFormat(((s = e.number) == null ? void 0 : s.locale) ?? "en", {
9
+ minimumFractionDigits: a,
10
+ maximumFractionDigits: t,
11
+ roundingMode: "trunc"
12
+ });
13
+ }, P = (a, t = !0, e) => {
14
+ var s, r, n, h;
15
+ const u = ((s = e.number) == null ? void 0 : s.unsigned) !== !0 && a.startsWith("-") ? "-" : "", l = ((r = e.number) == null ? void 0 : r.fraction) ?? 0;
16
+ let o = I(0, l, e);
17
+ const k = o.formatToParts(1000.12), c = ((n = k.find((i) => i.type === "group")) == null ? void 0 : n.value) ?? " ", b = ((h = k.find((i) => i.type === "decimal")) == null ? void 0 : h.value) ?? ".", f = N(a, c, b);
18
+ if (Number.isNaN(parseFloat(f))) return u;
19
+ const g = f.split(".");
20
+ if (g[1] != null && g[1].length >= 1) {
21
+ const i = g[1].length <= l ? g[1].length : l;
22
+ o = I(i, l, e);
23
+ }
24
+ let m = o.format(parseFloat(f));
25
+ return t ? l > 0 && f.endsWith(".") && !f.slice(0, -1).includes(".") && (m += b) : m = N(m, c, b), u + m;
26
+ };
27
+ class T {
28
+ constructor(t = {}) {
29
+ A(this, "opts", {}), A(this, "memo", /* @__PURE__ */ new Map());
30
+ const e = { ...t };
31
+ if (e.tokens != null) {
32
+ e.tokens = e.tokensReplace ? { ...e.tokens } : { ...R, ...e.tokens };
33
+ for (const s of Object.values(e.tokens))
34
+ typeof s.pattern == "string" && (s.pattern = new RegExp(s.pattern));
35
+ } else
36
+ e.tokens = R;
37
+ Array.isArray(e.mask) && (e.mask.length > 1 ? e.mask = [...e.mask].sort((s, r) => s.length - r.length) : e.mask = e.mask[0] ?? ""), e.mask === "" && (e.mask = null), this.opts = e;
38
+ }
39
+ masked(t) {
40
+ return this.process(String(t), this.findMask(String(t)));
41
+ }
42
+ unmasked(t) {
43
+ return this.process(String(t), this.findMask(String(t)), !1);
44
+ }
45
+ isEager() {
46
+ return this.opts.eager === !0;
47
+ }
48
+ isReversed() {
49
+ return this.opts.reversed === !0;
50
+ }
51
+ completed(t) {
52
+ const e = this.findMask(String(t));
53
+ if (this.opts.mask == null || e == null) return !1;
54
+ const s = this.process(String(t), e).length;
55
+ return typeof this.opts.mask == "string" ? s >= this.opts.mask.length : s >= e.length;
56
+ }
57
+ findMask(t) {
58
+ const e = this.opts.mask;
59
+ if (e == null)
60
+ return null;
61
+ if (typeof e == "string")
62
+ return e;
63
+ if (typeof e == "function")
64
+ return e(t);
65
+ const s = this.process(t, e.slice(-1).pop() ?? "", !1);
66
+ return e.find((r) => this.process(t, r, !1).length >= s.length) ?? "";
67
+ }
68
+ escapeMask(t) {
69
+ const e = [], s = [];
70
+ return t.split("").forEach((r, n) => {
71
+ r === "!" && t[n - 1] !== "!" ? s.push(n - s.length) : e.push(r);
72
+ }), { mask: e.join(""), escaped: s };
73
+ }
74
+ process(t, e, s = !0) {
75
+ if (this.opts.number != null) return P(t, s, this.opts);
76
+ if (e == null) return t;
77
+ const r = `v=${t},mr=${e},m=${s ? 1 : 0}`;
78
+ if (this.memo.has(r)) return this.memo.get(r);
79
+ const { mask: n, escaped: h } = this.escapeMask(e), u = [], l = this.opts.tokens != null ? this.opts.tokens : {}, o = this.isReversed() ? -1 : 1, k = this.isReversed() ? "unshift" : "push", c = this.isReversed() ? 0 : n.length - 1, b = this.isReversed() ? () => i > -1 && p > -1 : () => i < n.length && p < t.length, f = (v) => !this.isReversed() && v <= c || this.isReversed() && v >= c;
80
+ let g, m = -1, i = this.isReversed() ? n.length - 1 : 0, p = this.isReversed() ? t.length - 1 : 0, M = !1;
81
+ for (; b(); ) {
82
+ const v = n.charAt(i), d = l[v], y = (d == null ? void 0 : d.transform) != null ? d.transform(t.charAt(p)) : t.charAt(p);
83
+ if (!h.includes(i) && d != null ? (y.match(d.pattern) != null ? (u[k](y), d.repeated ? (m === -1 ? m = i : i === c && i !== m && (i = m - o), c === m && (i -= o)) : d.multiple && (M = !0, i -= o), i += o) : d.multiple ? M && (i += o, p -= o, M = !1) : y === g ? g = void 0 : d.optional && (i += o, p -= o), p += o) : (s && !this.isEager() && u[k](v), y === v && !this.isEager() ? p += o : g = v, this.isEager() || (i += o)), this.isEager())
84
+ for (; f(i) && (l[n.charAt(i)] == null || h.includes(i)); ) {
85
+ if (s) {
86
+ if (u[k](n.charAt(i)), t.charAt(p) === n.charAt(i)) {
87
+ i += o, p += o;
88
+ continue;
89
+ }
90
+ } else n.charAt(i) === t.charAt(p) && (p += o);
91
+ i += o;
92
+ }
93
+ }
94
+ return this.memo.set(r, u.join("")), this.memo.get(r);
95
+ }
96
+ }
97
+ const S = (a) => JSON.parse(a.replaceAll("'", '"')), F = (a, t = {}) => {
98
+ const e = { ...t };
99
+ a.dataset.maska != null && a.dataset.maska !== "" && (e.mask = W(a.dataset.maska)), a.dataset.maskaEager != null && (e.eager = E(a.dataset.maskaEager)), a.dataset.maskaReversed != null && (e.reversed = E(a.dataset.maskaReversed)), a.dataset.maskaTokensReplace != null && (e.tokensReplace = E(a.dataset.maskaTokensReplace)), a.dataset.maskaTokens != null && (e.tokens = x(a.dataset.maskaTokens));
100
+ const s = {};
101
+ return a.dataset.maskaNumberLocale != null && (s.locale = a.dataset.maskaNumberLocale), a.dataset.maskaNumberFraction != null && (s.fraction = parseInt(a.dataset.maskaNumberFraction)), a.dataset.maskaNumberUnsigned != null && (s.unsigned = E(a.dataset.maskaNumberUnsigned)), (a.dataset.maskaNumber != null || Object.values(s).length > 0) && (e.number = s), e;
102
+ }, E = (a) => a !== "" ? !!JSON.parse(a) : !0, W = (a) => a.startsWith("[") && a.endsWith("]") ? S(a) : a, x = (a) => {
103
+ if (a.startsWith("{") && a.endsWith("}"))
104
+ return S(a);
105
+ const t = {};
106
+ return a.split("|").forEach((e) => {
107
+ const s = e.split(":");
108
+ t[s[0]] = {
109
+ pattern: new RegExp(s[1]),
110
+ optional: s[2] === "optional",
111
+ multiple: s[2] === "multiple",
112
+ repeated: s[2] === "repeated"
113
+ };
114
+ }), t;
115
+ };
116
+ class O {
117
+ constructor(t, e = {}) {
118
+ A(this, "items", /* @__PURE__ */ new Map()), A(this, "eventAbortController"), A(this, "onInput", (s) => {
119
+ if (s instanceof CustomEvent && s.type === "input" && !s.isTrusted && !s.bubbles)
120
+ return;
121
+ const r = s.target, n = this.items.get(r), h = "inputType" in s && s.inputType.startsWith("delete"), u = n.isEager(), l = h && u && n.unmasked(r.value) === "" ? "" : r.value;
122
+ this.fixCursor(r, h, () => this.setValue(r, l));
123
+ }), this.options = e, this.eventAbortController = new AbortController(), this.init(this.getInputs(t));
124
+ }
125
+ update(t = {}) {
126
+ this.options = { ...t }, this.init(Array.from(this.items.keys()));
127
+ }
128
+ updateValue(t) {
129
+ t.value !== "" && t.value !== this.processInput(t).masked && this.setValue(t, t.value);
130
+ }
131
+ destroy() {
132
+ this.eventAbortController.abort(), this.items.clear();
133
+ }
134
+ init(t) {
135
+ const e = this.getOptions(this.options);
136
+ for (const s of t) {
137
+ if (!this.items.has(s)) {
138
+ const { signal: n } = this.eventAbortController;
139
+ s.addEventListener("input", this.onInput, { capture: !0, signal: n });
140
+ }
141
+ const r = new T(F(s, e));
142
+ this.items.set(s, r), queueMicrotask(() => this.updateValue(s)), s.selectionStart === null && r.isEager() && console.warn("Maska: input of `%s` type is not supported", s.type);
143
+ }
144
+ }
145
+ getInputs(t) {
146
+ return typeof t == "string" ? Array.from(document.querySelectorAll(t)) : "length" in t ? Array.from(t) : [t];
147
+ }
148
+ getOptions(t) {
149
+ const { onMaska: e, preProcess: s, postProcess: r, ...n } = t;
150
+ return n;
151
+ }
152
+ fixCursor(t, e, s) {
153
+ const r = t.selectionStart, n = t.value;
154
+ if (s(), r === null || r === n.length && !e) return;
155
+ const h = t.value, u = n.slice(0, r), l = h.slice(0, r), o = this.processInput(t, u).unmasked, k = this.processInput(t, l).unmasked;
156
+ let c = r;
157
+ u !== l && (c += e ? h.length - n.length : o.length - k.length), t.setSelectionRange(c, c);
158
+ }
159
+ setValue(t, e) {
160
+ const s = this.processInput(t, e);
161
+ t.value = s.masked, this.options.onMaska != null && (Array.isArray(this.options.onMaska) ? this.options.onMaska.forEach((r) => r(s)) : this.options.onMaska(s)), t.dispatchEvent(new CustomEvent("maska", { detail: s })), t.dispatchEvent(new CustomEvent("input", { detail: s.masked }));
162
+ }
163
+ processInput(t, e) {
164
+ const s = this.items.get(t);
165
+ let r = e ?? t.value;
166
+ this.options.preProcess != null && (r = this.options.preProcess(r));
167
+ let n = s.masked(r);
168
+ return this.options.postProcess != null && (n = this.options.postProcess(n)), {
169
+ masked: n,
170
+ unmasked: s.unmasked(r),
171
+ completed: s.completed(r)
172
+ };
173
+ }
174
+ }
2
175
  export {
3
- n as isEmpty
176
+ T as Mask,
177
+ O as MaskInput,
178
+ R as tokens
4
179
  };
package/dist/index232.js CHANGED
@@ -1,4 +1,43 @@
1
- const e = (t) => t[t.length - 1];
1
+ import { unrefElement as g } from "./index137.js";
2
+ import { toArray as A, notNullish as D, tryOnScopeDispose as y } from "./index206.js";
3
+ import { createFocusTrap as F } from "./index308.js";
4
+ import { shallowRef as n, computed as T, toValue as i, watch as w } from "vue";
5
+ function N(f, a = {}) {
6
+ let t;
7
+ const { immediate: l, ...p } = a, o = n(!1), r = n(!1), c = (e) => t && t.activate(e), u = (e) => t && t.deactivate(e), v = () => {
8
+ t && (t.pause(), r.value = !0);
9
+ }, m = () => {
10
+ t && (t.unpause(), r.value = !1);
11
+ }, h = T(() => {
12
+ const e = i(f);
13
+ return A(e).map((d) => {
14
+ const s = i(d);
15
+ return typeof s == "string" ? s : g(s);
16
+ }).filter(D);
17
+ });
18
+ return w(
19
+ h,
20
+ (e) => {
21
+ e.length && (t = F(e, {
22
+ ...p,
23
+ onActivate() {
24
+ o.value = !0, a.onActivate && a.onActivate();
25
+ },
26
+ onDeactivate() {
27
+ o.value = !1, a.onDeactivate && a.onDeactivate();
28
+ }
29
+ }), l && c());
30
+ },
31
+ { flush: "post" }
32
+ ), y(() => u()), {
33
+ hasFocus: o,
34
+ isPaused: r,
35
+ activate: c,
36
+ deactivate: u,
37
+ pause: v,
38
+ unpause: m
39
+ };
40
+ }
2
41
  export {
3
- e as last
42
+ N as useFocusTrap
4
43
  };
package/dist/index233.js CHANGED
@@ -1,13 +1,8 @@
1
- import { ref as a, watch as c, toValue as u } from "vue";
2
- const i = (e, { initialValue: o = !1, nextValue: r = !0 } = {}) => {
3
- const t = a(o), n = c(
4
- () => u(e),
5
- (s) => {
6
- s && (t.value = r, n());
7
- }
8
- );
9
- return t;
10
- };
1
+ const o = (e, t = 50) => new Promise((r) => {
2
+ const n = setInterval(() => {
3
+ e() && (clearInterval(n), r());
4
+ }, t);
5
+ });
11
6
  export {
12
- i as useUntil
7
+ o as waitFor
13
8
  };