bitboss-ui 2.1.112 → 2.1.114

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 (187) hide show
  1. package/dist/components/BaseCheckbox/types.d.ts +8 -0
  2. package/dist/components/BaseCheckboxGroup/BaseCheckboxGroup.vue.d.ts +1 -222
  3. package/dist/components/BaseCheckboxGroup/types.d.ts +283 -0
  4. package/dist/components/BaseColorInput/BaseColorInput.vue.d.ts +5 -151
  5. package/dist/components/BaseColorInput/ColorPalette.vue.d.ts +1 -17
  6. package/dist/components/BaseColorInput/types.d.ts +233 -0
  7. package/dist/components/BaseRadioGroup/BaseRadioGroup.vue.d.ts +1 -1
  8. package/dist/components/BaseSwitchGroup/BaseSwitchGroup.vue.d.ts +1 -1
  9. package/dist/components/BbCheckboxGroup/BbCheckboxGroup.vue.d.ts +9 -3
  10. package/dist/components/BbColorInput/BbColorInput.vue.d.ts +1 -1
  11. package/dist/components/BbColorPalette/BbColorPalette.vue.d.ts +4 -4
  12. package/dist/components/BbSwitchGroup/BbSwitchGroup.vue.d.ts +1 -1
  13. package/dist/index.d.ts +2 -2
  14. package/dist/index109.js +9 -9
  15. package/dist/index110.js +17 -17
  16. package/dist/index118.js +1 -1
  17. package/dist/index122.js +1 -0
  18. package/dist/index124.js +4 -4
  19. package/dist/index126.js +13 -13
  20. package/dist/index134.js +1 -1
  21. package/dist/index136.js +5 -5
  22. package/dist/index138.js +1 -1
  23. package/dist/index14.js +1 -1
  24. package/dist/index144.js +1 -1
  25. package/dist/index146.js +2 -2
  26. package/dist/index148.js +1 -1
  27. package/dist/index16.js +3 -3
  28. package/dist/index18.js +3 -3
  29. package/dist/index20.js +70 -59
  30. package/dist/index22.js +14 -14
  31. package/dist/index221.js +138 -2
  32. package/dist/index222.js +2 -2
  33. package/dist/index223.js +2 -138
  34. package/dist/index227.js +1 -1
  35. package/dist/index229.js +4 -2
  36. package/dist/index230.js +13 -2
  37. package/dist/index231.js +20 -3
  38. package/dist/index232.js +2 -4
  39. package/dist/index233.js +4 -13
  40. package/dist/index234.js +85 -19
  41. package/dist/index236.js +30 -3
  42. package/dist/index237.js +17 -5
  43. package/dist/index238.js +51 -5
  44. package/dist/index239.js +18 -5
  45. package/dist/index24.js +10 -10
  46. package/dist/index240.js +3 -5
  47. package/dist/index241.js +12 -5
  48. package/dist/index242.js +18 -5
  49. package/dist/index243.js +8 -3
  50. package/dist/index244.js +2 -8
  51. package/dist/index245.js +3 -135
  52. package/dist/index246.js +7 -0
  53. package/dist/index247.js +5 -3
  54. package/dist/index248.js +5 -6
  55. package/dist/index249.js +5 -16
  56. package/dist/index250.js +5 -2
  57. package/dist/index251.js +5 -13
  58. package/dist/index252.js +3 -13
  59. package/dist/index253.js +135 -4
  60. package/dist/index255.js +2 -86
  61. package/dist/index256.js +108 -0
  62. package/dist/index258.js +100 -17
  63. package/dist/index26.js +3 -3
  64. package/dist/index260.js +9 -17
  65. package/dist/index261.js +3 -3
  66. package/dist/index262.js +4 -12
  67. package/dist/index263.js +3 -18
  68. package/dist/index264.js +187 -66
  69. package/dist/index265.js +3 -2
  70. package/dist/index266.js +5 -9
  71. package/dist/index267.js +5 -20
  72. package/dist/index268.js +268 -4
  73. package/dist/index269.js +52 -25
  74. package/dist/index270.js +52 -2
  75. package/dist/index271.js +31 -17
  76. package/dist/index272.js +60 -12
  77. package/dist/index273.js +7 -106
  78. package/dist/index274.js +4 -0
  79. package/dist/index275.js +367 -94
  80. package/dist/index277.js +2 -107
  81. package/dist/index278.js +7 -11
  82. package/dist/index279.js +7 -5
  83. package/dist/index28.js +1 -1
  84. package/dist/index280.js +2 -6
  85. package/dist/index281.js +30 -264
  86. package/dist/index282.js +9 -52
  87. package/dist/index283.js +25 -52
  88. package/dist/index284.js +11 -32
  89. package/dist/index285.js +13 -60
  90. package/dist/index286.js +22 -6
  91. package/dist/index289.js +5 -6
  92. package/dist/index290.js +9 -10
  93. package/dist/index291.js +21 -3
  94. package/dist/index292.js +6 -34
  95. package/dist/index293.js +15 -32
  96. package/dist/index294.js +16 -371
  97. package/dist/index295.js +14 -0
  98. package/dist/index296.js +107 -3
  99. package/dist/index297.js +6 -53
  100. package/dist/index298.js +3 -5
  101. package/dist/index299.js +53 -9
  102. package/dist/index30.js +3 -3
  103. package/dist/index300.js +13 -2
  104. package/dist/index301.js +67 -7
  105. package/dist/index302.js +33 -7
  106. package/dist/index306.js +3 -6
  107. package/dist/index307.js +7 -5
  108. package/dist/index308.js +3 -719
  109. package/dist/index309.js +17 -366
  110. package/dist/index310.js +23 -52
  111. package/dist/index311.js +1 -1
  112. package/dist/index312.js +3 -280
  113. package/dist/index313.js +5 -2
  114. package/dist/index314.js +3 -125
  115. package/dist/index315.js +3 -2
  116. package/dist/index316.js +278 -13
  117. package/dist/index317.js +2 -2
  118. package/dist/index32.js +2 -2
  119. package/dist/index322.js +25 -17
  120. package/dist/index324.js +1 -1
  121. package/dist/index325.js +2 -28
  122. package/dist/index326.js +2 -17
  123. package/dist/index327.js +2 -3
  124. package/dist/index328.js +2 -4
  125. package/dist/index329.js +120 -22
  126. package/dist/index330.js +2 -2
  127. package/dist/index331.js +15 -2
  128. package/dist/index332.js +2 -2
  129. package/dist/index333.js +19 -2
  130. package/dist/index334.js +2 -2
  131. package/dist/index335.js +1 -1
  132. package/dist/index336.js +719 -3
  133. package/dist/index337.js +366 -3
  134. package/dist/index338.js +57 -2
  135. package/dist/index34.js +8 -8
  136. package/dist/index340.js +5 -2
  137. package/dist/index341.js +2 -6
  138. package/dist/index342.js +6 -5
  139. package/dist/index343.js +2 -3
  140. package/dist/index344.js +6 -34
  141. package/dist/index345.js +66 -128
  142. package/dist/index346.js +65 -396
  143. package/dist/index347.js +35 -67
  144. package/dist/index348.js +128 -66
  145. package/dist/index349.js +390 -220
  146. package/dist/index352.js +1 -1
  147. package/dist/index353.js +1 -1
  148. package/dist/index354.js +1 -1
  149. package/dist/index355.js +200 -7
  150. package/dist/index356.js +208 -149
  151. package/dist/index357.js +91 -257
  152. package/dist/index358.js +225 -131
  153. package/dist/index359.js +133 -21
  154. package/dist/index36.js +4 -4
  155. package/dist/index360.js +24 -0
  156. package/dist/index362.js +1 -1
  157. package/dist/index363.js +2 -93
  158. package/dist/index367.js +1 -1
  159. package/dist/index38.js +133 -131
  160. package/dist/index40.js +7 -7
  161. package/dist/index42.js +2 -2
  162. package/dist/index44.js +16 -15
  163. package/dist/index46.js +6 -6
  164. package/dist/index50.js +2 -2
  165. package/dist/index54.js +1 -1
  166. package/dist/index56.js +1 -1
  167. package/dist/index58.js +2 -2
  168. package/dist/index60.js +2 -2
  169. package/dist/index62.js +5 -5
  170. package/dist/index66.js +3 -1
  171. package/dist/index68.js +1 -1
  172. package/dist/index74.js +4 -4
  173. package/dist/index82.js +4 -4
  174. package/dist/index84.js +1 -1
  175. package/dist/index86.js +2 -2
  176. package/dist/index88.js +3 -3
  177. package/dist/index90.js +1 -1
  178. package/dist/index93.js +3 -3
  179. package/dist/index95.js +2 -2
  180. package/dist/index97.js +5 -5
  181. package/dist/index99.js +1 -1
  182. package/package.json +2 -2
  183. package/dist/index235.js +0 -190
  184. package/dist/index254.js +0 -25
  185. package/dist/index257.js +0 -32
  186. package/dist/index259.js +0 -53
  187. package/dist/index361.js +0 -4
package/dist/index20.js CHANGED
@@ -1,16 +1,17 @@
1
- import { defineComponent as z, ref as B, toRef as p, computed as G, createBlock as R, openBlock as W, unref as T, withCtx as n, renderSlot as s, normalizeProps as f, guardReactiveProps as h, createVNode as K, mergeProps as w } from "vue";
2
- import N from "./index18.js";
1
+ import { defineComponent as z, ref as B, toRef as p, computed as R, createBlock as W, openBlock as K, unref as T, withCtx as n, renderSlot as l, normalizeProps as f, guardReactiveProps as h, createVNode as N, mergeProps as C } from "vue";
2
+ import U from "./index18.js";
3
3
  /* empty css */
4
- import U from "./index255.js";
4
+ import q from "./index234.js";
5
5
  /* empty css */
6
- import { useItemsGetter as q } from "./index257.js";
7
- import { useIndexById as C } from "./index258.js";
8
- import { useBaseOptions as J } from "./index259.js";
9
- import { useCoherence as Q } from "./index260.js";
10
- import { hash as X } from "./index261.js";
11
- import { useHashedWatcher as $ } from "./index262.js";
12
- import { usePrefill as Y } from "./index263.js";
13
- const ce = /* @__PURE__ */ z({
6
+ import { useItemsGetter as J } from "./index236.js";
7
+ import { useIndexById as $ } from "./index237.js";
8
+ import { useBaseOptions as Q } from "./index238.js";
9
+ import { useCoherence as X } from "./index239.js";
10
+ import { hash as Y } from "./index240.js";
11
+ import { useHashedWatcher as w } from "./index241.js";
12
+ import { usePrefill as Z } from "./index242.js";
13
+ import { useLogger as _ } from "./index243.js";
14
+ const fe = /* @__PURE__ */ z({
14
15
  __name: "BaseCheckboxGroup",
15
16
  props: {
16
17
  ariaDescribedby: {},
@@ -30,6 +31,7 @@ const ce = /* @__PURE__ */ z({
30
31
  loadingText: {},
31
32
  max: { default: 1 / 0 },
32
33
  modelValue: {},
34
+ multiple: { type: Boolean, default: !0 },
33
35
  modelValueDebounceTime: { default: 0 },
34
36
  name: {},
35
37
  noDataText: {},
@@ -37,28 +39,29 @@ const ce = /* @__PURE__ */ z({
37
39
  },
38
40
  emits: ["blur", "change", "click", "focus", "inactive", "input", "keydown", "mousedown", "mouseup", "update:modelValue"],
39
41
  setup(I, { emit: D }) {
40
- const o = I, t = D;
41
- if (!Array.isArray(o.modelValue))
42
- throw new Error("Model value must be an array in checkbox group.");
43
- const i = B(), d = B(!1), {
44
- getter: u,
42
+ const o = I, t = D, L = _();
43
+ o.multiple && !Array.isArray(o.modelValue) && L.throw(
44
+ 'BaseCheckboxGroup: multiple is set to "true" but modelValue is not an array.'
45
+ );
46
+ const r = B(), u = B(!1), {
47
+ getter: d,
45
48
  items: E,
46
49
  loading: H
47
- } = q({
50
+ } = J({
48
51
  items: p(o, "items"),
49
52
  debounce: 0
50
53
  }), c = () => {
51
- o.enforceCoherence && !v.value && t("update:modelValue", F.value.coherent);
52
- }, { hasPrefilled: L } = Y({
54
+ o.enforceCoherence && !v.value && t("update:modelValue", O.value);
55
+ }, { hasPrefilled: x } = Z({
53
56
  trigger: !0,
54
57
  currentValue: o.modelValue,
55
- multiple: !0,
58
+ multiple: o.multiple,
56
59
  fn: async (e) => {
57
- await u(e, o.modelValue), c();
60
+ await d(e, o.modelValue), c();
58
61
  }
59
- }), { data: b } = C({
60
- items: G(() => o.modelValue)
61
- }), { options: y } = J({
62
+ }), { data: b } = $({
63
+ items: R(() => [].concat(o.modelValue))
64
+ }), { options: y } = Q({
62
65
  disabled: p(o, "disabled"),
63
66
  items: E,
64
67
  itemText: o.itemText,
@@ -66,62 +69,70 @@ const ce = /* @__PURE__ */ z({
66
69
  max: o.max,
67
70
  selectable: !0,
68
71
  selectedIndexedByHash: b
69
- }), x = async (e) => {
70
- t("update:modelValue", o.modelValue.concat(e.value));
71
- }, M = async (e) => {
72
- const l = { ...b.value };
73
- delete l[e.valueHash], t("update:modelValue", Object.values(l));
74
- }, { data: P } = C({
72
+ }), P = async (e) => {
73
+ if (o.multiple) {
74
+ t("update:modelValue", [].concat(o.modelValue).concat(e.value));
75
+ return;
76
+ }
77
+ t("update:modelValue", e.value);
78
+ }, F = async (e) => {
79
+ if (!o.multiple) {
80
+ t("update:modelValue", null);
81
+ return;
82
+ }
83
+ const s = { ...b.value };
84
+ delete s[e.valueHash], t("update:modelValue", Object.values(s));
85
+ }, { data: M } = $({
75
86
  items: y,
76
87
  key: "valueHash"
77
- }), { coherent: v, status: F } = Q({
88
+ }), { coherent: v, coherentValue: O } = X({
78
89
  modelValue: p(o, "modelValue"),
79
- multiple: !0,
80
- iteratee: (e) => !!P.value[X(e)]
90
+ multiple: o.multiple,
91
+ iteratee: (e) => !!M.value[Y(e)]
81
92
  });
82
- let r = 0;
83
- $(
93
+ let i = 0;
94
+ w(
84
95
  () => o.modelValue,
85
96
  async () => {
86
- r++, v.value || (await u(!1, o.modelValue), c()), r--;
97
+ i++, v.value || (await d(!1, o.modelValue), c()), i--;
87
98
  },
88
99
  {
89
100
  debounce: o.modelValueDebounceTime
90
101
  }
91
- ), $(
102
+ ), w(
92
103
  () => [o.dependencies, o.items],
93
104
  async () => {
94
- L.value && (r++, await u(!1, o.modelValue), r === 1 && c(), r--);
105
+ x.value && (i++, await d(!1, o.modelValue), i === 1 && c(), i--);
95
106
  },
96
107
  {
97
108
  debounce: o.depsDebounceTime
98
109
  }
99
110
  );
100
- const O = (e) => {
111
+ const A = (e) => {
101
112
  if (o.id)
102
113
  return [o.id, e.valueHash].filter(Boolean).join("-");
103
- }, A = (e, l) => {
104
- t("change", e), l.selected ? M(l) : x(l);
114
+ }, G = (e, s) => {
115
+ t("change", e), s.selected ? F(s) : P(s);
105
116
  }, S = {
106
117
  onBlur: (e) => t("blur", e),
107
118
  onClick: (e) => t("click", e),
108
119
  onFocus: (e) => {
109
- t("focus", e), d.value || (document.addEventListener("focusin", V, { passive: !0 }), document.addEventListener("click", k, { passive: !0 }), d.value = !0);
120
+ t("focus", e), u.value || (document.addEventListener("focusin", V, { passive: !0 }), document.addEventListener("click", k, { passive: !0 }), u.value = !0);
110
121
  },
111
122
  onInput: (e) => t("input", e),
112
123
  onKeydown: (e) => t("keydown", e),
113
124
  onMousedown: (e) => t("mousedown", e),
114
125
  onMouseup: (e) => t("mouseup", e)
115
126
  }, g = () => {
116
- t("inactive"), d.value = !1, document.removeEventListener("focusin", V), document.removeEventListener("click", k);
127
+ t("inactive"), u.value = !1, document.removeEventListener("focusin", V), document.removeEventListener("click", k);
117
128
  }, V = (e) => {
118
- e.target instanceof HTMLElement && (i.value?.$el.contains(e.target) || g());
129
+ e.target instanceof HTMLElement && (r.value?.$el.contains(e.target) || g());
119
130
  }, k = (e) => {
120
- e.target instanceof HTMLElement && (i.value?.$el.contains(e.target) || g());
131
+ e.target instanceof HTMLElement && (r.value?.$el.contains(e.target) || g());
121
132
  };
122
- return (e, l) => (W(), R(U, {
133
+ return (e, s) => (K(), W(q, {
123
134
  ref_key: "container",
124
- ref: i,
135
+ ref: r,
125
136
  class: "bb-base-checkbox-group",
126
137
  direction: e.direction,
127
138
  "has-errors": e.hasErrors,
@@ -132,23 +143,23 @@ const ce = /* @__PURE__ */ z({
132
143
  options: T(y)
133
144
  }, {
134
145
  prepend: n(() => [
135
- s(e.$slots, "prepend")
146
+ l(e.$slots, "prepend")
136
147
  ]),
137
148
  loading: n(() => [
138
- s(e.$slots, "loading")
149
+ l(e.$slots, "loading")
139
150
  ]),
140
151
  "no-data": n(() => [
141
- s(e.$slots, "no-data")
152
+ l(e.$slots, "no-data")
142
153
  ]),
143
154
  label: n((a) => [
144
- s(e.$slots, "label", f(h(a)))
155
+ l(e.$slots, "label", f(h(a)))
145
156
  ]),
146
157
  "option:prepend": n((a) => [
147
- s(e.$slots, "option:prepend", f(h(a)))
158
+ l(e.$slots, "option:prepend", f(h(a)))
148
159
  ]),
149
160
  input: n(({ option: a, index: j }) => [
150
- K(N, w({
151
- id: O(a),
161
+ N(U, C({
162
+ id: A(a),
152
163
  "aria-describedby": e.ariaDescribedby,
153
164
  autofocus: e.autofocus && !j,
154
165
  checked: a.selected,
@@ -159,10 +170,10 @@ const ce = /* @__PURE__ */ z({
159
170
  readonly: e.readonly,
160
171
  "true-value": a.value
161
172
  }, S, {
162
- onChange: (m) => A(m, a)
173
+ onChange: (m) => G(m, a)
163
174
  }), {
164
175
  icon: n((m) => [
165
- s(e.$slots, "icon", w({
176
+ l(e.$slots, "icon", C({
166
177
  item: a.item,
167
178
  text: a.text
168
179
  }, m))
@@ -171,15 +182,15 @@ const ce = /* @__PURE__ */ z({
171
182
  }, 1040, ["id", "aria-describedby", "autofocus", "checked", "color", "disabled", "has-errors", "name", "readonly", "true-value", "onChange"])
172
183
  ]),
173
184
  "option:append": n((a) => [
174
- s(e.$slots, "option:append", f(h(a)))
185
+ l(e.$slots, "option:append", f(h(a)))
175
186
  ]),
176
187
  append: n(() => [
177
- s(e.$slots, "append")
188
+ l(e.$slots, "append")
178
189
  ]),
179
190
  _: 3
180
191
  }, 8, ["direction", "has-errors", "hide-label", "loading", "loading-text", "no-data-text", "options"]));
181
192
  }
182
193
  });
183
194
  export {
184
- ce as default
195
+ fe as default
185
196
  };
package/dist/index22.js CHANGED
@@ -5,20 +5,20 @@ import { _config as Q } from "./index4.js";
5
5
  import { useId as X } from "./index8.js";
6
6
  import b from "./index14.js";
7
7
  /* empty css */
8
- import d from "./index237.js";
9
- import ee from "./index240.js";
10
- import ae from "./index241.js";
11
- import te from "./index279.js";
12
- import { hash as B } from "./index261.js";
13
- import { last as le } from "./index270.js";
14
- import { validateDateFormat as L } from "./index280.js";
15
- import { useLogger as oe } from "./index244.js";
16
- import re from "./index281.js";
17
- import se from "./index282.js";
18
- import de from "./index283.js";
19
- import S from "./index284.js";
20
- import ie from "./index285.js";
21
- import { useLocale as ne } from "./index233.js";
8
+ import d from "./index246.js";
9
+ import ee from "./index249.js";
10
+ import ae from "./index250.js";
11
+ import te from "./index266.js";
12
+ import { hash as B } from "./index240.js";
13
+ import { last as le } from "./index255.js";
14
+ import { validateDateFormat as L } from "./index267.js";
15
+ import { useLogger as oe } from "./index243.js";
16
+ import re from "./index268.js";
17
+ import se from "./index269.js";
18
+ import de from "./index270.js";
19
+ import S from "./index271.js";
20
+ import ie from "./index272.js";
21
+ import { useLocale as ne } from "./index230.js";
22
22
  const ue = { class: "bb-base-date-picker" }, me = { class: "bb-base-date-picker__body" }, ce = { class: "bb-base-date-picker__controls" }, pe = { class: "sr-only" }, fe = { class: "sr-only" }, be = { class: "sr-only" }, ve = {
23
23
  style: { transform: "rotate(180deg)" },
24
24
  viewBox: "0 0 24 24",
package/dist/index221.js CHANGED
@@ -1,4 +1,140 @@
1
- const n = (t, a, m) => Math.min(Math.max(t, a), m);
1
+ import { onMounted as O, nextTick as W, getCurrentScope as S, onScopeDispose as C, watch as F, getCurrentInstance as g, isRef as P, toValue as b, hasInjectionContext as k, inject as v } from "vue";
2
+ function V(e) {
3
+ return S() ? (C(e), !0) : !1;
4
+ }
5
+ const w = /* @__PURE__ */ new WeakMap(), E = (...e) => {
6
+ var r;
7
+ const n = e[0], t = (r = g()) == null ? void 0 : r.proxy;
8
+ if (t == null && !k())
9
+ throw new Error("injectLocal must be called in setup");
10
+ return t && w.has(t) && n in w.get(t) ? w.get(t)[n] : v(...e);
11
+ }, G = typeof window < "u" && typeof document < "u";
12
+ typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
13
+ const _ = (e) => e != null, M = Object.prototype.toString, q = (e) => M.call(e) === "[object Object]", d = () => {
14
+ };
15
+ function y(e, r) {
16
+ function n(...t) {
17
+ return new Promise((o, i) => {
18
+ Promise.resolve(e(() => r.apply(this, t), { fn: r, thisArg: this, args: t })).then(o).catch(i);
19
+ });
20
+ }
21
+ return n;
22
+ }
23
+ const A = (e) => e();
24
+ function x(e, r = {}) {
25
+ let n, t, o = d;
26
+ const i = (c) => {
27
+ clearTimeout(c), o(), o = d;
28
+ };
29
+ let u;
30
+ return (c) => {
31
+ const a = b(e), l = b(r.maxWait);
32
+ return n && i(n), a <= 0 || l !== void 0 && l <= 0 ? (t && (i(t), t = null), Promise.resolve(c())) : new Promise((f, p) => {
33
+ o = r.rejectOnCancel ? p : f, u = c, l && !t && (t = setTimeout(() => {
34
+ n && i(n), t = null, f(u());
35
+ }, l)), n = setTimeout(() => {
36
+ t && i(t), t = null, f(c());
37
+ }, a);
38
+ });
39
+ };
40
+ }
41
+ function I(...e) {
42
+ let r = 0, n, t = !0, o = d, i, u, s, c, a;
43
+ !P(e[0]) && typeof e[0] == "object" ? { delay: u, trailing: s = !0, leading: c = !0, rejectOnCancel: a = !1 } = e[0] : [u, s = !0, c = !0, a = !1] = e;
44
+ const l = () => {
45
+ n && (clearTimeout(n), n = void 0, o(), o = d);
46
+ };
47
+ return (p) => {
48
+ const m = b(u), j = Date.now() - r, h = () => i = p();
49
+ return l(), m <= 0 ? (r = Date.now(), h()) : (j > m && (c || !t) ? (r = Date.now(), h()) : s && (i = new Promise((T, D) => {
50
+ o = a ? D : T, n = setTimeout(() => {
51
+ r = Date.now(), t = !0, T(h()), l();
52
+ }, Math.max(0, m - j));
53
+ })), !c && !n && (n = setTimeout(() => t = !0, m)), t = !1, i);
54
+ };
55
+ }
56
+ function z(e) {
57
+ return e.endsWith("rem") ? Number.parseFloat(e) * 16 : Number.parseFloat(e);
58
+ }
59
+ function L(e) {
60
+ return g();
61
+ }
62
+ function B(e) {
63
+ return Array.isArray(e) ? e : [e];
64
+ }
65
+ function H(e, r = 200, n = {}) {
66
+ return y(
67
+ x(r, n),
68
+ e
69
+ );
70
+ }
71
+ function J(e, r = 200, n = !1, t = !0, o = !1) {
72
+ return y(
73
+ I(r, n, t, o),
74
+ e
75
+ );
76
+ }
77
+ function N(e, r, n = {}) {
78
+ const {
79
+ eventFilter: t = A,
80
+ ...o
81
+ } = n;
82
+ return F(
83
+ e,
84
+ y(
85
+ t,
86
+ r
87
+ ),
88
+ o
89
+ );
90
+ }
91
+ function K(e, r = !0, n) {
92
+ L() ? O(e, n) : r ? e() : W(e);
93
+ }
94
+ function Q(e, r, n = {}) {
95
+ const {
96
+ debounce: t = 0,
97
+ maxWait: o = void 0,
98
+ ...i
99
+ } = n;
100
+ return N(
101
+ e,
102
+ r,
103
+ {
104
+ ...i,
105
+ eventFilter: x(t, { maxWait: o })
106
+ }
107
+ );
108
+ }
109
+ function U(e, r, n) {
110
+ return F(
111
+ e,
112
+ r,
113
+ {
114
+ ...n,
115
+ immediate: !0
116
+ }
117
+ );
118
+ }
2
119
  export {
3
- n as clamp
120
+ A as bypassFilter,
121
+ y as createFilterWrapper,
122
+ x as debounceFilter,
123
+ Q as debouncedWatch,
124
+ L as getLifeCycleTarget,
125
+ E as injectLocal,
126
+ G as isClient,
127
+ q as isObject,
128
+ d as noop,
129
+ _ as notNullish,
130
+ z as pxValue,
131
+ I as throttleFilter,
132
+ B as toArray,
133
+ K as tryOnMounted,
134
+ V as tryOnScopeDispose,
135
+ H as useDebounceFn,
136
+ J as useThrottleFn,
137
+ Q as watchDebounced,
138
+ U as watchImmediate,
139
+ N as watchWithFilter
4
140
  };
package/dist/index222.js CHANGED
@@ -1,4 +1,4 @@
1
- const t = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
1
+ const n = (t, a, m) => Math.min(Math.max(t, a), m);
2
2
  export {
3
- t as urlAlphabet
3
+ n as clamp
4
4
  };
package/dist/index223.js CHANGED
@@ -1,140 +1,4 @@
1
- import { onMounted as O, nextTick as W, getCurrentScope as S, onScopeDispose as C, watch as F, getCurrentInstance as g, isRef as P, toValue as b, hasInjectionContext as k, inject as v } from "vue";
2
- function V(e) {
3
- return S() ? (C(e), !0) : !1;
4
- }
5
- const w = /* @__PURE__ */ new WeakMap(), E = (...e) => {
6
- var r;
7
- const n = e[0], t = (r = g()) == null ? void 0 : r.proxy;
8
- if (t == null && !k())
9
- throw new Error("injectLocal must be called in setup");
10
- return t && w.has(t) && n in w.get(t) ? w.get(t)[n] : v(...e);
11
- }, G = typeof window < "u" && typeof document < "u";
12
- typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
13
- const _ = (e) => e != null, M = Object.prototype.toString, q = (e) => M.call(e) === "[object Object]", d = () => {
14
- };
15
- function y(e, r) {
16
- function n(...t) {
17
- return new Promise((o, i) => {
18
- Promise.resolve(e(() => r.apply(this, t), { fn: r, thisArg: this, args: t })).then(o).catch(i);
19
- });
20
- }
21
- return n;
22
- }
23
- const A = (e) => e();
24
- function x(e, r = {}) {
25
- let n, t, o = d;
26
- const i = (c) => {
27
- clearTimeout(c), o(), o = d;
28
- };
29
- let u;
30
- return (c) => {
31
- const a = b(e), l = b(r.maxWait);
32
- return n && i(n), a <= 0 || l !== void 0 && l <= 0 ? (t && (i(t), t = null), Promise.resolve(c())) : new Promise((f, p) => {
33
- o = r.rejectOnCancel ? p : f, u = c, l && !t && (t = setTimeout(() => {
34
- n && i(n), t = null, f(u());
35
- }, l)), n = setTimeout(() => {
36
- t && i(t), t = null, f(c());
37
- }, a);
38
- });
39
- };
40
- }
41
- function I(...e) {
42
- let r = 0, n, t = !0, o = d, i, u, s, c, a;
43
- !P(e[0]) && typeof e[0] == "object" ? { delay: u, trailing: s = !0, leading: c = !0, rejectOnCancel: a = !1 } = e[0] : [u, s = !0, c = !0, a = !1] = e;
44
- const l = () => {
45
- n && (clearTimeout(n), n = void 0, o(), o = d);
46
- };
47
- return (p) => {
48
- const m = b(u), j = Date.now() - r, h = () => i = p();
49
- return l(), m <= 0 ? (r = Date.now(), h()) : (j > m && (c || !t) ? (r = Date.now(), h()) : s && (i = new Promise((T, D) => {
50
- o = a ? D : T, n = setTimeout(() => {
51
- r = Date.now(), t = !0, T(h()), l();
52
- }, Math.max(0, m - j));
53
- })), !c && !n && (n = setTimeout(() => t = !0, m)), t = !1, i);
54
- };
55
- }
56
- function z(e) {
57
- return e.endsWith("rem") ? Number.parseFloat(e) * 16 : Number.parseFloat(e);
58
- }
59
- function L(e) {
60
- return g();
61
- }
62
- function B(e) {
63
- return Array.isArray(e) ? e : [e];
64
- }
65
- function H(e, r = 200, n = {}) {
66
- return y(
67
- x(r, n),
68
- e
69
- );
70
- }
71
- function J(e, r = 200, n = !1, t = !0, o = !1) {
72
- return y(
73
- I(r, n, t, o),
74
- e
75
- );
76
- }
77
- function N(e, r, n = {}) {
78
- const {
79
- eventFilter: t = A,
80
- ...o
81
- } = n;
82
- return F(
83
- e,
84
- y(
85
- t,
86
- r
87
- ),
88
- o
89
- );
90
- }
91
- function K(e, r = !0, n) {
92
- L() ? O(e, n) : r ? e() : W(e);
93
- }
94
- function Q(e, r, n = {}) {
95
- const {
96
- debounce: t = 0,
97
- maxWait: o = void 0,
98
- ...i
99
- } = n;
100
- return N(
101
- e,
102
- r,
103
- {
104
- ...i,
105
- eventFilter: x(t, { maxWait: o })
106
- }
107
- );
108
- }
109
- function U(e, r, n) {
110
- return F(
111
- e,
112
- r,
113
- {
114
- ...n,
115
- immediate: !0
116
- }
117
- );
118
- }
1
+ const t = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
119
2
  export {
120
- A as bypassFilter,
121
- y as createFilterWrapper,
122
- x as debounceFilter,
123
- Q as debouncedWatch,
124
- L as getLifeCycleTarget,
125
- E as injectLocal,
126
- G as isClient,
127
- q as isObject,
128
- d as noop,
129
- _ as notNullish,
130
- z as pxValue,
131
- I as throttleFilter,
132
- B as toArray,
133
- K as tryOnMounted,
134
- V as tryOnScopeDispose,
135
- H as useDebounceFn,
136
- J as useThrottleFn,
137
- Q as watchDebounced,
138
- U as watchImmediate,
139
- N as watchWithFilter
3
+ t as urlAlphabet
140
4
  };
package/dist/index227.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as l, createElementBlock as n, openBlock as r, unref as a, createElementVNode as t } from "vue";
2
- import { useLocale as s } from "./index233.js";
2
+ import { useLocale as s } from "./index230.js";
3
3
  const c = ["aria-label"], b = /* @__PURE__ */ l({
4
4
  __name: "ClearableButton",
5
5
  setup(u) {
package/dist/index229.js CHANGED
@@ -1,4 +1,6 @@
1
- const s = (r) => !!r && !!r.match(/^(#|var\(--|(rgb|hsl)a?\()/);
1
+ function e(t) {
2
+ return /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/.test(t);
3
+ }
2
4
  export {
3
- s as isCssColor
5
+ e as isHex
4
6
  };
package/dist/index230.js CHANGED
@@ -1,4 +1,15 @@
1
- const o = (e) => typeof e == "boolean" ? e : e === "true";
1
+ import { locales as t } from "./index307.js";
2
+ import { _config as m } from "./index4.js";
3
+ import { get as c } from "./index284.js";
4
+ import { readonly as l, computed as n } from "vue";
5
+ const p = (o, ...r) => l(
6
+ n(() => c(t[m.locale], o).replace(
7
+ /\{(\d+)\}/g,
8
+ (a, e) => r[e]
9
+ ))
10
+ ), d = () => ({
11
+ t: p
12
+ });
2
13
  export {
3
- o as booleanishToBoolean
14
+ d as useLocale
4
15
  };
package/dist/index231.js CHANGED
@@ -1,5 +1,22 @@
1
- import { hash as r } from "./index261.js";
2
- const a = (o, t) => r(o) === r(t);
1
+ import { MaskInput as r } from "./index264.js";
2
+ const u = /* @__PURE__ */ new WeakMap(), p = (a, n) => {
3
+ if (a.arg == null || a.instance == null) return;
4
+ const s = "setup" in a.instance.$.type;
5
+ a.arg in a.instance ? a.instance[a.arg] = n : s && console.warn("Maska: please expose `%s` using defineExpose", a.arg);
6
+ }, k = (a, n) => {
7
+ var s;
8
+ const t = a instanceof HTMLInputElement ? a : a.querySelector("input");
9
+ if (t == null || t?.type === "file") return;
10
+ let e = {};
11
+ if (n.value != null && (e = typeof n.value == "string" ? { mask: n.value } : { ...n.value }), n.arg != null) {
12
+ const l = (o) => {
13
+ const i = n.modifiers.unmasked ? o.unmasked : n.modifiers.completed ? o.completed : o.masked;
14
+ p(n, i);
15
+ };
16
+ e.onMaska = e.onMaska == null ? l : Array.isArray(e.onMaska) ? [...e.onMaska, l] : [e.onMaska, l];
17
+ }
18
+ u.has(t) ? (s = u.get(t)) == null || s.update(e) : u.set(t, new r(t, e));
19
+ };
3
20
  export {
4
- a as isEqual
21
+ k as vMaska
5
22
  };
package/dist/index232.js CHANGED
@@ -1,6 +1,4 @@
1
- function e(t) {
2
- return /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/.test(t);
3
- }
1
+ const s = (r) => !!r && !!r.match(/^(#|var\(--|(rgb|hsl)a?\()/);
4
2
  export {
5
- e as isHex
3
+ s as isCssColor
6
4
  };
package/dist/index233.js CHANGED
@@ -1,15 +1,6 @@
1
- import { locales as t } from "./index306.js";
2
- import { _config as m } from "./index4.js";
3
- import { get as c } from "./index278.js";
4
- import { readonly as l, computed as n } from "vue";
5
- const p = (o, ...r) => l(
6
- n(() => c(t[m.locale], o).replace(
7
- /\{(\d+)\}/g,
8
- (a, e) => r[e]
9
- ))
10
- ), d = () => ({
11
- t: p
12
- });
1
+ import { curry as e } from "./index306.js";
2
+ const t = (n, o, r) => n(r) ? o(r) : r, s = e(t);
13
3
  export {
14
- d as useLocale
4
+ t as baseWhen,
5
+ s as when
15
6
  };