bitboss-ui 2.1.1 → 2.1.3

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 (180) hide show
  1. package/dist/components/BaseNumberInput/BaseNumberInput.vue.d.ts +2 -0
  2. package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +10 -2
  3. package/dist/index106.js +9 -9
  4. package/dist/index111.js +1 -1
  5. package/dist/index113.js +1 -1
  6. package/dist/index121.js +10 -10
  7. package/dist/index129.js +1 -1
  8. package/dist/index13.js +1 -1
  9. package/dist/index131.js +2 -2
  10. package/dist/index133.js +1 -1
  11. package/dist/index136.js +10 -20
  12. package/dist/index137.js +2 -2
  13. package/dist/index138.js +1 -1
  14. package/dist/index139.js +2 -2
  15. package/dist/index15.js +6 -6
  16. package/dist/index17.js +3 -3
  17. package/dist/index19.js +8 -8
  18. package/dist/index206.js +2 -138
  19. package/dist/index207.js +2 -2
  20. package/dist/index208.js +138 -2
  21. package/dist/index21.js +7 -7
  22. package/dist/index210.js +2 -2
  23. package/dist/index212.js +84 -32
  24. package/dist/{index225.js → index214.js} +1 -1
  25. package/dist/index215.js +17 -13
  26. package/dist/index216.js +51 -4
  27. package/dist/index217.js +14 -19
  28. package/dist/index218.js +3 -197
  29. package/dist/index219.js +14 -0
  30. package/dist/index220.js +16 -113
  31. package/dist/index221.js +4 -0
  32. package/dist/index222.js +106 -3
  33. package/dist/index224.js +102 -0
  34. package/dist/index226.js +66 -17
  35. package/dist/index228.js +13 -15
  36. package/dist/index229.js +2 -3
  37. package/dist/index23.js +13 -13
  38. package/dist/index230.js +5 -12
  39. package/dist/index231.js +5 -16
  40. package/dist/index232.js +5 -2
  41. package/dist/index233.js +5 -4
  42. package/dist/index234.js +5 -5
  43. package/dist/index235.js +5 -5
  44. package/dist/index236.js +2 -5
  45. package/dist/index237.js +20 -5
  46. package/dist/index238.js +113 -5
  47. package/dist/index240.js +2 -2
  48. package/dist/index241.js +4 -2
  49. package/dist/index242.js +2 -2
  50. package/dist/index243.js +33 -17
  51. package/dist/index244.js +2 -12
  52. package/dist/index245.js +2 -6
  53. package/dist/index246.js +7 -106
  54. package/dist/index247.js +9 -0
  55. package/dist/index248.js +3 -100
  56. package/dist/index249.js +6 -0
  57. package/dist/index250.js +188 -219
  58. package/dist/index252.js +2 -2
  59. package/dist/index253.js +2 -2
  60. package/dist/index255.js +5 -5
  61. package/dist/index258.js +2 -2
  62. package/dist/index259.js +1 -1
  63. package/dist/index260.js +18 -2
  64. package/dist/index261.js +12 -2
  65. package/dist/index262.js +6 -2
  66. package/dist/index263.js +228 -10
  67. package/dist/index264.js +9 -2
  68. package/dist/index265.js +3 -6
  69. package/dist/index266.js +176 -15
  70. package/dist/index267.js +9 -3
  71. package/dist/index268.js +23 -9
  72. package/dist/index269.js +3 -9
  73. package/dist/index27.js +1 -1
  74. package/dist/index270.js +6 -23
  75. package/dist/index271.js +15 -8
  76. package/dist/index272.js +9 -8
  77. package/dist/index274.js +9 -5
  78. package/dist/index275.js +7 -66
  79. package/dist/index276.js +67 -5
  80. package/dist/index277.js +5 -8
  81. package/dist/index278.js +5 -7
  82. package/dist/index279.js +7 -10
  83. package/dist/index280.js +3 -2
  84. package/dist/index281.js +17 -3
  85. package/dist/index282.js +30 -0
  86. package/dist/index283.js +6 -6
  87. package/dist/index284.js +10 -3
  88. package/dist/index285.js +3 -5
  89. package/dist/index286.js +3 -4
  90. package/dist/index287.js +1 -1
  91. package/dist/index289.js +7 -28
  92. package/dist/index29.js +91 -87
  93. package/dist/index290.js +4 -3
  94. package/dist/index291.js +280 -3
  95. package/dist/index292.js +2 -280
  96. package/dist/index293.js +125 -2
  97. package/dist/index294.js +2 -125
  98. package/dist/index295.js +15 -2
  99. package/dist/index296.js +2 -15
  100. package/dist/index297.js +16 -2
  101. package/dist/index298.js +2 -16
  102. package/dist/index299.js +16 -2
  103. package/dist/index300.js +2 -16
  104. package/dist/index301.js +19 -2
  105. package/dist/index302.js +2 -19
  106. package/dist/index303.js +3 -2
  107. package/dist/index304.js +2 -3
  108. package/dist/index305.js +4 -3
  109. package/dist/index306.js +6 -2
  110. package/dist/index307.js +5 -6
  111. package/dist/index308.js +3 -19
  112. package/dist/index309.js +19 -2
  113. package/dist/index31.js +2 -2
  114. package/dist/index310.js +2 -27
  115. package/dist/index311.js +27 -2
  116. package/dist/index312.js +2 -2
  117. package/dist/index313.js +1 -1
  118. package/dist/index314.js +1 -1
  119. package/dist/index315.js +1 -1
  120. package/dist/index316.js +1 -21
  121. package/dist/index317.js +24 -0
  122. package/dist/index319.js +2 -701
  123. package/dist/index320.js +5 -354
  124. package/dist/index321.js +701 -58
  125. package/dist/index322.js +354 -2
  126. package/dist/index323.js +57 -7
  127. package/dist/index324.js +2 -6
  128. package/dist/index325.js +57 -7
  129. package/dist/index326.js +58 -7
  130. package/dist/index327.js +6 -227
  131. package/dist/index328.js +227 -57
  132. package/dist/index329.js +128 -57
  133. package/dist/index33.js +8 -8
  134. package/dist/index330.js +368 -32
  135. package/dist/index331.js +33 -28
  136. package/dist/index332.js +30 -0
  137. package/dist/index334.js +44 -366
  138. package/dist/index335.js +7 -46
  139. package/dist/index336.js +5 -6
  140. package/dist/index337.js +8 -19
  141. package/dist/index338.js +6 -92
  142. package/dist/index339.js +21 -0
  143. package/dist/index340.js +93 -3
  144. package/dist/index343.js +3 -127
  145. package/dist/index344.js +421 -467
  146. package/dist/index345.js +123 -43
  147. package/dist/index346.js +484 -0
  148. package/dist/index347.js +49 -0
  149. package/dist/index35.js +3 -3
  150. package/dist/index37.js +19 -19
  151. package/dist/index39.js +177 -167
  152. package/dist/index41.js +2 -2
  153. package/dist/index43.js +8 -8
  154. package/dist/index45.js +8 -8
  155. package/dist/index47.js +2 -2
  156. package/dist/index49.js +3 -3
  157. package/dist/index55.js +1 -1
  158. package/dist/index57.js +2 -2
  159. package/dist/index61.js +2 -2
  160. package/dist/index79.js +3 -3
  161. package/dist/index83.js +2 -2
  162. package/dist/index85.js +1 -1
  163. package/dist/index87.js +1 -1
  164. package/dist/index92.js +1 -1
  165. package/dist/index94.js +1 -1
  166. package/dist/index96.js +1 -1
  167. package/dist/utilities/functions/percentage.d.ts +14 -21
  168. package/dist/utilities/functions/snapToStep.d.ts +1 -0
  169. package/dist/utilities/functions/transpose.d.ts +1 -0
  170. package/dist/utilities/functions/transposePercent.d.ts +9 -0
  171. package/package.json +1 -1
  172. package/dist/index213.js +0 -68
  173. package/dist/index223.js +0 -88
  174. package/dist/index227.js +0 -53
  175. package/dist/index239.js +0 -7
  176. package/dist/index251.js +0 -179
  177. package/dist/index288.js +0 -19
  178. package/dist/index318.js +0 -7
  179. package/dist/index333.js +0 -131
  180. package/dist/index342.js +0 -438
@@ -0,0 +1,49 @@
1
+ function D(n, l, e) {
2
+ let i = e.initialDeps ?? [], t;
3
+ return () => {
4
+ var r, c, h, m;
5
+ let f;
6
+ e.key && ((r = e.debug) != null && r.call(e)) && (f = Date.now());
7
+ const o = n();
8
+ if (!(o.length !== i.length || o.some((a, u) => i[u] !== a)))
9
+ return t;
10
+ i = o;
11
+ let g;
12
+ if (e.key && ((c = e.debug) != null && c.call(e)) && (g = Date.now()), t = l(...o), e.key && ((h = e.debug) != null && h.call(e))) {
13
+ const a = Math.round((Date.now() - f) * 100) / 100, u = Math.round((Date.now() - g) * 100) / 100, w = u / 16, s = (d, b) => {
14
+ for (d = String(d); d.length < b; )
15
+ d = " " + d;
16
+ return d;
17
+ };
18
+ console.info(
19
+ `%c⏱ ${s(u, 5)} /${s(a, 5)} ms`,
20
+ `
21
+ font-size: .6rem;
22
+ font-weight: bold;
23
+ color: hsl(${Math.max(
24
+ 0,
25
+ Math.min(120 - 120 * w, 120)
26
+ )}deg 100% 31%);`,
27
+ e == null ? void 0 : e.key
28
+ );
29
+ }
30
+ return (m = e == null ? void 0 : e.onChange) == null || m.call(e, t), t;
31
+ };
32
+ }
33
+ function T(n, l) {
34
+ if (n === void 0)
35
+ throw new Error("Unexpected undefined");
36
+ return n;
37
+ }
38
+ const y = (n, l) => Math.abs(n - l) < 1, M = (n, l, e) => {
39
+ let i;
40
+ return function(...t) {
41
+ n.clearTimeout(i), i = n.setTimeout(() => l.apply(this, t), e);
42
+ };
43
+ };
44
+ export {
45
+ y as approxEqual,
46
+ M as debounce,
47
+ D as memo,
48
+ T as notUndefined
49
+ };
package/dist/index35.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as I, ref as v, computed as f, createElementBlock as l, openBlock as r, mergeProps as h, createElementVNode as i, renderSlot as p, Fragment as V, renderList as M, normalizeClass as D, toDisplayString as F, unref as y } from "vue";
2
- import { booleanishToBoolean as T } from "./index260.js";
3
- import { identity as $ } from "./index240.js";
4
- import { isCssColor as k } from "./index232.js";
2
+ import { booleanishToBoolean as T } from "./index242.js";
3
+ import { identity as $ } from "./index236.js";
4
+ import { isCssColor as k } from "./index240.js";
5
5
  import { isNotNil as q } from "./index140.js";
6
6
  import { useLocale as x } from "./index210.js";
7
7
  const H = { class: "bb-base-rating__inner-container" }, S = { class: "bb-base-rating__label-text sr-only" }, N = ["id", "aria-describedby", "autofocus", "checked", "disabled", "name", "required", "value"], j = ["height", "width"], W = /* @__PURE__ */ I({
package/dist/index37.js CHANGED
@@ -5,32 +5,32 @@ import { useId as Ye } from "./index8.js";
5
5
  import { useMobile as Ze } from "./index9.js";
6
6
  import et from "./index111.js";
7
7
  /* empty css */
8
- import { hash as tt } from "./index229.js";
9
- import { isEmpty as lt } from "./index241.js";
10
- import { last as at } from "./index242.js";
11
- import { matchAnyKey as ne } from "./index243.js";
12
- import { useArray as ot } from "./index244.js";
13
- import { useBaseOptions as nt } from "./index227.js";
14
- import { useCoherence as ut } from "./index228.js";
15
- import { useHashedWatcher as ue } from "./index230.js";
16
- import { useIndexById as ie } from "./index226.js";
8
+ import { hash as tt } from "./index218.js";
9
+ import { isEmpty as lt } from "./index229.js";
10
+ import { last as at } from "./index221.js";
11
+ import { matchAnyKey as ne } from "./index260.js";
12
+ import { useArray as ot } from "./index261.js";
13
+ import { useBaseOptions as nt } from "./index216.js";
14
+ import { useCoherence as ut } from "./index217.js";
15
+ import { useHashedWatcher as ue } from "./index219.js";
16
+ import { useIndexById as ie } from "./index215.js";
17
17
  import { useMounted as it, useIntersectionObserver as rt } from "./index137.js";
18
- import { useItemsGetter as st } from "./index225.js";
18
+ import { useItemsGetter as st } from "./index214.js";
19
19
  import { useLocale as dt } from "./index210.js";
20
- import { usePrefill as ct } from "./index231.js";
20
+ import { usePrefill as ct } from "./index220.js";
21
21
  import { wait as F } from "./index135.js";
22
- import { waitFor as pt } from "./index245.js";
23
- import { when as mt } from "./index233.js";
24
- import ft from "./index246.js";
22
+ import { waitFor as pt } from "./index262.js";
23
+ import { when as mt } from "./index241.js";
24
+ import ft from "./index222.js";
25
25
  /* empty css */
26
- import vt from "./index248.js";
26
+ import vt from "./index224.js";
27
27
  /* empty css */
28
- import yt from "./index213.js";
28
+ import yt from "./index226.js";
29
29
  /* empty css */
30
- import ht from "./index215.js";
31
- import bt from "./index220.js";
30
+ import ht from "./index228.js";
31
+ import bt from "./index238.js";
32
32
  /* empty css */
33
- import gt from "./index250.js";
33
+ import gt from "./index263.js";
34
34
  const wt = { class: "bb-base-select__input-container" }, Bt = {
35
35
  key: 1,
36
36
  class: "bb-base-select__max-reached"
package/dist/index39.js CHANGED
@@ -1,15 +1,17 @@
1
- import { defineComponent as U, ref as d, computed as h, onMounted as W, watch as Z, createElementBlock as g, openBlock as w, mergeProps as T, renderSlot as f, createElementVNode as c, createCommentVNode as H, Fragment as ee, renderList as ae, normalizeProps as re, guardReactiveProps as te, unref as b, normalizeStyle as F, normalizeClass as I } from "vue";
2
- import { clamp as le } from "./index207.js";
3
- import { head as O } from "./index261.js";
4
- import { isCssColor as Y } from "./index232.js";
5
- import { isNil as P } from "./index262.js";
6
- import { isNotNil as ne } from "./index140.js";
7
- import { transposeValue as y } from "./index136.js";
8
- import { hash as J } from "./index229.js";
9
- const oe = { class: "bb-base-slider__slider-container" }, ie = {
1
+ import { defineComponent as re, ref as d, computed as f, onMounted as te, watch as le, createElementBlock as y, openBlock as g, mergeProps as P, renderSlot as v, createElementVNode as m, createCommentVNode as H, Fragment as oe, renderList as ne, normalizeProps as se, guardReactiveProps as ie, unref as c, normalizeStyle as G, normalizeClass as O } from "vue";
2
+ import { head as ue } from "./index244.js";
3
+ import { isCssColor as Y } from "./index240.js";
4
+ import { isNil as S } from "./index245.js";
5
+ import { getAsPercentageBetween as T, getAsPercentage as de, getValueFromPercentageInInterval as C } from "./index136.js";
6
+ import { hash as j } from "./index218.js";
7
+ import { snapToStep as me } from "./index246.js";
8
+ import { last as ce } from "./index221.js";
9
+ import { transpose as J } from "./index247.js";
10
+ import { clamp as p } from "./index206.js";
11
+ const be = { class: "bb-base-slider__slider-container" }, ve = {
10
12
  key: 0,
11
13
  class: "bb-base-slider__ticks-container"
12
- }, se = ["id", "disabled", "name", "readonly", "required", "value"], ue = ["aria-describedby", "aria-readonly", "aria-valuemax", "aria-valuemin", "aria-valuenow", "tabindex"], de = ["aria-describedby", "aria-readonly", "aria-valuemax", "aria-valuemin", "aria-valuenow", "tabindex"], we = /* @__PURE__ */ U({
14
+ }, fe = ["id", "disabled", "name", "readonly", "required", "value"], pe = ["aria-describedby", "aria-readonly", "aria-valuemax", "aria-valuemin", "aria-valuenow", "tabindex"], he = ["aria-describedby", "aria-readonly", "aria-valuemax", "aria-valuemin", "aria-valuenow", "tabindex"], Le = /* @__PURE__ */ re({
13
15
  __name: "BaseSlider",
14
16
  props: {
15
17
  ariaDescribedby: {},
@@ -30,103 +32,121 @@ const oe = { class: "bb-base-slider__slider-container" }, ie = {
30
32
  thumbTranslate: { type: Boolean, default: !0 }
31
33
  },
32
34
  emits: ["click", "focus", "active", "inactive", "keydown", "pointerdown", "pointermove", "pointerup", "update:modelValue"],
33
- setup(K, { emit: j }) {
34
- const a = K, u = j, C = d(), B = d(), _ = d(), v = d(), n = d(0), o = d(0), E = h(() => Array.isArray(a.modelValue) ? O(a.modelValue) ?? void 0 : P(a.modelValue) ? void 0 : Number(a.modelValue)), $ = h(() => Array.isArray(a.modelValue) ? O(a.modelValue) ?? void 0 : P(a.modelValue) ? void 0 : Number(a.modelValue)), L = h(() => [n.value, o.value].sort(
35
+ setup(K, { emit: Q }) {
36
+ const a = K, s = Q;
37
+ if (a.min < Number.MIN_SAFE_INTEGER || a.max > Number.MAX_SAFE_INTEGER)
38
+ throw new Error("BaseSlider min or max is too large");
39
+ const I = d(), V = d(), b = d(), u = d(), n = d(0), l = d(0), E = f(() => Array.isArray(a.modelValue) ? ue(a.modelValue) ?? void 0 : S(a.modelValue) ? void 0 : Number(a.modelValue)), _ = f(() => Array.isArray(a.modelValue) ? ce(a.modelValue) ?? void 0 : S(a.modelValue) ? void 0 : Number(a.modelValue)), A = f(() => [n.value, l.value].sort(
35
40
  (e, r) => e - r
36
- )), p = y({
37
- value: a.min + a.step,
38
- originalBounds: { min: a.min, max: a.max },
39
- targetBounds: { min: 0, max: 100 },
40
- step: 1
41
- }), x = d(!1);
41
+ )), $ = d(!1);
42
42
  if (a.range && !Array.isArray(a.modelValue))
43
43
  throw new TypeError(
44
44
  "BaseSlider mode is set as range but modelValue is not an array"
45
45
  );
46
- W(() => {
46
+ te(() => {
47
47
  var e;
48
- a.autofocus && ((e = v.value) == null || e.focus());
49
- }), Z(
48
+ a.autofocus && ((e = u.value) == null || e.focus());
49
+ });
50
+ let B = d(!1), o = d(null);
51
+ const x = (e) => {
52
+ if (u.value && u.value.contains(e.target))
53
+ return "higher";
54
+ if (b.value && b.value.contains(e.target))
55
+ return "lower";
56
+ throw new Error("Could not identify target thumb");
57
+ }, U = (e) => {
58
+ a.disabled || a.readonly || (o.value || (o.value = x(e)), B.value = !0, document.addEventListener("pointermove", L), document.addEventListener("pointerup", R), s("pointerdown", e));
59
+ };
60
+ let z = f(() => B.value ? {} : { onPointerdown: U });
61
+ const L = (e) => {
62
+ if (!(a.disabled || a.readonly) && V.value) {
63
+ e instanceof PointerEvent ? s("pointermove", e) : s("click", e);
64
+ const r = V.value.getBoundingClientRect(), t = e.clientX, i = r.left, h = r.width;
65
+ let ee = J(
66
+ t,
67
+ i,
68
+ i + h,
69
+ a.min,
70
+ a.max
71
+ );
72
+ const ae = me(
73
+ ee,
74
+ a.min,
75
+ a.max,
76
+ a.step
77
+ ), M = T(
78
+ ae,
79
+ a.min,
80
+ a.max
81
+ );
82
+ o.value === "higher" ? l.value = M : o.value === "lower" && (n.value = M), s("update:modelValue", N());
83
+ }
84
+ }, N = () => a.range ? [
85
+ C(
86
+ n.value,
87
+ a.min,
88
+ a.max
89
+ ),
90
+ C(
91
+ l.value,
92
+ a.min,
93
+ a.max
94
+ )
95
+ ].sort((e, r) => e - r) : C(
96
+ l.value,
97
+ a.min,
98
+ a.max
99
+ );
100
+ le(
50
101
  () => a.modelValue,
51
102
  (e) => {
52
- let r;
53
103
  if (a.range) {
54
- const [s = a.min, m = a.min] = e;
55
- r = [s, m];
56
- } else
57
- r = [a.min, ne(e) ? Number(e) : a.min];
58
- const [l, i] = r.map((s) => {
59
- let m = P(s) ? a.min : Number(s);
60
- return y({
61
- value: m,
62
- targetBounds: { min: 0, max: 100 },
63
- originalBounds: { min: a.min, max: a.max },
64
- step: 1
65
- });
66
- });
67
- n.value = l, o.value = i;
104
+ if (!Array.isArray(e))
105
+ throw new Error("BaseSlider modelValue must be an array");
106
+ if (e.length !== 2) {
107
+ n.value = 0, l.value = 100;
108
+ return;
109
+ }
110
+ const t = [...e].sort((i, h) => i - h).map(
111
+ (i) => p(T(i, a.min, a.max), 0, 100)
112
+ );
113
+ n.value > l.value ? (n.value = t[1], l.value = t[0]) : (n.value = t[0], l.value = t[1]);
114
+ } else {
115
+ let r = e ?? a.min;
116
+ const t = J(r, a.min, a.max, 0, 100), i = p(t, 0, 100);
117
+ l.value = i;
118
+ }
68
119
  },
69
120
  { immediate: !0 }
70
121
  );
71
- let A = d(!1), t = d(null);
72
- const S = (e) => {
73
- if (v.value && v.value.contains(e.target))
74
- return "higher";
75
- if (_.value && _.value.contains(e.target))
76
- return "lower";
77
- throw new Error("Could not identify target thumb");
78
- }, G = (e) => {
79
- a.disabled || a.readonly || (t.value || (t.value = S(e)), A.value = !0, document.addEventListener("pointermove", N), document.addEventListener("pointerup", z), u("pointerdown", e));
80
- };
81
- let M = h(() => A.value ? {} : { onPointerdown: G });
82
- const N = (e) => {
83
- if (!(a.disabled || a.readonly) && B.value) {
84
- const r = B.value.getBoundingClientRect(), l = e.clientX, i = r.left, s = r.width;
85
- e instanceof PointerEvent ? u("pointermove", e) : u("click", e);
86
- const m = y({
87
- value: le(l, i, i + s),
88
- originalBounds: { min: i, max: i + s },
89
- targetBounds: { min: 0, max: 100 },
90
- step: p
91
- });
92
- t.value === "higher" ? o.value = m : t.value === "lower" && (n.value = m);
93
- }
94
- }, k = () => {
95
- const [e, r] = [n.value, o.value].sort(
96
- (i, s) => i - s
97
- ), l = [e, r].map(
98
- (i) => y({
99
- value: i,
100
- originalBounds: { min: 0, max: 100 },
101
- targetBounds: { min: a.min, max: a.max },
102
- step: a.step
103
- })
104
- );
105
- return a.range ? l : l[1];
106
- }, z = (e) => {
107
- A.value = !1, t.value = null, document.removeEventListener("pointermove", N), document.removeEventListener("pointerup", z), u("pointerup", e), u("update:modelValue", k());
108
- }, X = (e) => {
109
- u("keydown", e), !(a.disabled || a.readonly || e.key !== "ArrowLeft" && e.key !== "ArrowRight") && (e.key === "ArrowLeft" ? t.value === "higher" || document.activeElement === v.value ? o.value = Math.max(
110
- o.value - p,
111
- n.value
112
- ) : t.value === "lower" && (n.value = Math.max(
113
- n.value - p,
114
- 0
115
- )) : e.key === "ArrowRight" && (t.value === "higher" || document.activeElement === v.value ? o.value = Math.min(
116
- o.value + p,
122
+ const R = (e) => {
123
+ B.value = !1, o.value = null, document.removeEventListener("pointermove", L), document.removeEventListener("pointerup", R), s("pointerup", e);
124
+ }, w = de(a.step, a.max - a.min), X = (e) => {
125
+ s("keydown", e), !(a.disabled || a.readonly || e.key !== "ArrowLeft" && e.key !== "ArrowRight") && (e.key === "ArrowLeft" ? o.value === "higher" || document.activeElement === u.value || e.target === u.value ? l.value = p(
126
+ l.value - w,
127
+ 0,
128
+ 100
129
+ ) : (o.value === "lower" || document.activeElement === b.value || e.target === b.value) && (n.value = p(
130
+ n.value - w,
131
+ 0,
132
+ 100
133
+ )) : e.key === "ArrowRight" && (o.value === "higher" || document.activeElement === u.value || e.target === u.value ? l.value = p(
134
+ l.value + w,
135
+ 0,
136
+ 100
137
+ ) : (o.value === "lower" || document.activeElement === b.value || e.target === b.value) && (n.value = p(
138
+ n.value + w,
139
+ 0,
117
140
  100
118
- ) : t.value === "lower" && (n.value = Math.min(
119
- n.value + p,
120
- o.value
121
- ))), u("update:modelValue", k()));
122
- }, q = (e) => {
123
- u("focus", e);
124
- const r = S(e);
125
- r && (t.value = r), x.value || (x.value = !0, u("active"), document.addEventListener("focusin", V), document.addEventListener("click", V));
126
- }, V = (e) => {
141
+ ))), s("update:modelValue", N()));
142
+ }, F = (e) => {
143
+ s("focus", e);
144
+ const r = x(e);
145
+ r && (o.value = r), $.value || ($.value = !0, s("active"), document.addEventListener("focusin", k), document.addEventListener("click", k));
146
+ }, k = (e) => {
127
147
  var r;
128
- e.target instanceof HTMLElement && ((r = C.value) != null && r.contains(e.target) || (x.value = !1, t.value = null, u("inactive"), document.removeEventListener("focusin", V), document.removeEventListener("click", V)));
129
- }, D = {
148
+ e.target instanceof HTMLElement && ((r = I.value) != null && r.contains(e.target) || ($.value = !1, o.value = null, s("inactive"), document.removeEventListener("focusin", k), document.removeEventListener("click", k)));
149
+ }, q = {
130
150
  class: {
131
151
  "bb-base-slider": !0,
132
152
  "bb-base-slider--disabled": a.disabled,
@@ -135,67 +155,57 @@ const oe = { class: "bb-base-slider__slider-container" }, ie = {
135
155
  [`bb-base-slider--${a.color}`]: a.color && !Y(a.color)
136
156
  },
137
157
  onClick: (e) => {
138
- var l;
158
+ var t;
139
159
  if (a.range) return;
140
- (l = v.value) == null || l.focus(), N(e);
141
- const r = k();
142
- J(r) !== J(a.modelValue) && u("update:modelValue", k());
160
+ (t = u.value) == null || t.focus(), L(e);
161
+ const r = N();
162
+ j(r), j(a.modelValue);
143
163
  },
144
164
  style: {}
145
165
  };
146
- a.color && Y(a.color) && (D.style["--color"] = a.color);
147
- const Q = h(() => {
166
+ a.color && Y(a.color) && (q.style["--color"] = a.color);
167
+ const W = f(() => {
148
168
  const e = "bb-base-slider__track-background", r = {
149
- width: `${L.value[1] - L.value[0]}%`,
150
- left: `${L.value[0]}%`
169
+ width: `${A.value[1] - A.value[0]}%`,
170
+ left: `${A.value[0]}%`
151
171
  };
152
172
  return {
153
173
  class: e,
154
174
  style: r
155
175
  };
156
- }), R = h(() => {
176
+ }), Z = (e) => S(a.modelValue) ? !1 : Array.isArray(a.modelValue) ? a.modelValue.length === 0 ? !1 : a.modelValue[0] <= e && a.modelValue[1] >= e : e <= Number(a.modelValue), D = f(() => {
157
177
  if (!a.ticks) return [];
158
178
  let e = [], r = a.min;
159
179
  for (; r <= a.max; ) {
160
- let l = r, i = y({
161
- value: l,
162
- originalBounds: { min: a.min, max: a.max },
163
- targetBounds: { min: 0, max: 100 },
164
- step: p
165
- }), s = y({
166
- value: r,
167
- originalBounds: { min: a.min, max: a.max },
168
- targetBounds: { min: 0, max: 100 },
169
- step: a.step
170
- });
171
- const m = s >= n.value && s <= o.value;
180
+ let t = r;
181
+ const i = T(t, a.min, a.max), h = Z(t);
172
182
  e.push({
173
- value: l,
183
+ value: t,
174
184
  percent: i,
175
- active: m
185
+ active: h
176
186
  }), r += a.step;
177
187
  }
178
188
  return e;
179
189
  });
180
- return (e, r) => (w(), g("span", T(D, {
190
+ return (e, r) => (g(), y("span", P(q, {
181
191
  ref_key: "container",
182
- ref: C
192
+ ref: I
183
193
  }), [
184
- f(e.$slots, "prepend"),
185
- c("span", oe, [
186
- R.value.length ? (w(), g("span", ie, [
187
- (w(!0), g(ee, null, ae(R.value, (l) => (w(), g("span", {
188
- key: l.value,
194
+ v(e.$slots, "prepend"),
195
+ m("span", be, [
196
+ D.value.length ? (g(), y("span", ve, [
197
+ (g(!0), y(oe, null, ne(D.value, (t) => (g(), y("span", {
198
+ key: t.value,
189
199
  class: "bb-base-slider__tick"
190
200
  }, [
191
- f(e.$slots, "tick", {
192
- active: l.active,
193
- percent: l.percent,
194
- value: l.value
201
+ v(e.$slots, "tick", {
202
+ active: t.active,
203
+ percent: t.percent,
204
+ value: t.value
195
205
  })
196
206
  ]))), 128))
197
207
  ])) : H("", !0),
198
- c("input", {
208
+ m("input", {
199
209
  id: e.id,
200
210
  class: "sr-only",
201
211
  disabled: e.disabled,
@@ -205,19 +215,19 @@ const oe = { class: "bb-base-slider__slider-container" }, ie = {
205
215
  tabindex: -1,
206
216
  type: "text",
207
217
  value: JSON.stringify(e.modelValue)
208
- }, null, 8, se),
209
- c("span", {
218
+ }, null, 8, fe),
219
+ m("span", {
210
220
  ref_key: "track",
211
- ref: B,
221
+ ref: V,
212
222
  class: "bb-base-slider__track-container"
213
223
  }, [
214
- r[0] || (r[0] = c("span", { class: "bb-base-slider__track-fill" }, null, -1)),
215
- c("span", re(te(Q.value)), null, 16)
224
+ r[0] || (r[0] = m("span", { class: "bb-base-slider__track-fill" }, null, -1)),
225
+ m("span", se(ie(W.value)), null, 16)
216
226
  ], 512),
217
- a.range ? (w(), g("span", T({ key: 1 }, b(M), {
227
+ a.range ? (g(), y("span", P({ key: 1 }, c(z), {
218
228
  key: "thumblower",
219
229
  ref_key: "thumblower",
220
- ref: _,
230
+ ref: b,
221
231
  "aria-describedby": e.ariaDescribedby,
222
232
  "aria-orientation": "horizontal",
223
233
  "aria-readonly": !e.readonly,
@@ -229,80 +239,80 @@ const oe = { class: "bb-base-slider__slider-container" }, ie = {
229
239
  role: "slider",
230
240
  style: { left: `${n.value}%` },
231
241
  tabindex: e.disabled ? -1 : 0,
232
- onFocus: q,
242
+ onFocus: F,
233
243
  onKeydown: X
234
244
  }), [
235
- c("span", {
236
- class: I({
245
+ m("span", {
246
+ class: O({
237
247
  "bb-base-slider__thumb": !0,
238
248
  "bb-base-slider__thumb--lower": !0,
239
- "bb-base-slider__thumb--focused": b(t) === "lower"
249
+ "bb-base-slider__thumb--focused": c(o) === "lower"
240
250
  }),
241
- style: F({
251
+ style: G({
242
252
  transform: `translateY(-50%) ${e.thumbTranslate ? `translateX(-${n.value}%)` : "translateX(-50%)"}`,
243
253
  left: `${n.value}%`
244
254
  })
245
255
  }, [
246
- f(e.$slots, "thumb:lower", {
247
- focused: b(t) === "lower",
256
+ v(e.$slots, "thumb:lower", {
257
+ focused: c(o) === "lower",
248
258
  percent: n.value,
249
259
  value: E.value
250
260
  }, () => [
251
- f(e.$slots, "thumb", {
252
- focused: b(t) === "lower",
261
+ v(e.$slots, "thumb", {
262
+ focused: c(o) === "lower",
253
263
  percent: n.value,
254
264
  value: E.value
255
265
  })
256
266
  ])
257
267
  ], 6)
258
- ], 16, ue)) : H("", !0),
259
- c("span", T(b(M), {
268
+ ], 16, pe)) : H("", !0),
269
+ m("span", P(c(z), {
260
270
  key: "thumbhigher",
261
271
  ref_key: "thumbhigher",
262
- ref: v,
272
+ ref: u,
263
273
  "aria-describedby": e.ariaDescribedby,
264
274
  "aria-orientation": "horizontal",
265
275
  "aria-readonly": !e.readonly,
266
276
  "aria-valuemax": e.max,
267
277
  "aria-valuemin": e.min,
268
- "aria-valuenow": $.value,
278
+ "aria-valuenow": _.value,
269
279
  class: "bb-base-slider__thumb-container",
270
280
  "data-thumb": "higher",
271
281
  role: "slider",
272
- style: { left: `${o.value}%` },
282
+ style: { left: `${l.value}%` },
273
283
  tabindex: e.disabled ? -1 : 0,
274
- onFocus: q,
284
+ onFocus: F,
275
285
  onKeydown: X
276
286
  }), [
277
- c("span", {
278
- class: I({
287
+ m("span", {
288
+ class: O({
279
289
  "bb-base-slider__thumb": !0,
280
290
  "bb-base-slider__thumb--higher": !0,
281
- "bb-base-slider__thumb--focused": b(t) === "higher"
291
+ "bb-base-slider__thumb--focused": c(o) === "higher"
282
292
  }),
283
- style: F({
284
- transform: `translateY(-50%) ${e.thumbTranslate ? `translateX(-${o.value}%)` : "translateX(-50%)"}`,
285
- left: `${o.value}%`
293
+ style: G({
294
+ transform: `translateY(-50%) ${e.thumbTranslate ? `translateX(-${l.value}%)` : "translateX(-50%)"}`,
295
+ left: `${l.value}%`
286
296
  })
287
297
  }, [
288
- f(e.$slots, "thumb:higher", {
289
- focused: b(t) === "higher",
290
- percent: o.value,
291
- value: $.value
298
+ v(e.$slots, "thumb:higher", {
299
+ focused: c(o) === "higher",
300
+ percent: l.value,
301
+ value: _.value
292
302
  }, () => [
293
- f(e.$slots, "thumb", {
294
- focused: b(t) === "higher",
295
- percent: o.value,
296
- value: $.value
303
+ v(e.$slots, "thumb", {
304
+ focused: c(o) === "higher",
305
+ percent: l.value,
306
+ value: _.value
297
307
  })
298
308
  ])
299
309
  ], 6)
300
- ], 16, de)
310
+ ], 16, he)
301
311
  ]),
302
- f(e.$slots, "append")
312
+ v(e.$slots, "append")
303
313
  ], 16));
304
314
  }
305
315
  });
306
316
  export {
307
- we as default
317
+ Le as default
308
318
  };
package/dist/index41.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { defineComponent as I, ref as f, computed as n, watch as S, createElementBlock as h, openBlock as y, normalizeProps as r, guardReactiveProps as d, createCommentVNode as A, createElementVNode as l, mergeProps as V, renderSlot as F } from "vue";
2
- import { isCssColor as b } from "./index232.js";
3
- import { when as N } from "./index233.js";
2
+ import { isCssColor as b } from "./index240.js";
3
+ import { when as N } from "./index241.js";
4
4
  const x = { class: "bb-base-switch-container" }, $ = /* @__PURE__ */ I({
5
5
  __name: "BaseSwitch",
6
6
  props: {
package/dist/index43.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import { defineComponent as j, ref as k, toRef as d, createBlock as z, openBlock as G, unref as B, withCtx as s, renderSlot as l, normalizeProps as v, guardReactiveProps as b, createVNode as R, mergeProps as w, createSlots as W } from "vue";
2
2
  import K from "./index41.js";
3
3
  /* empty css */
4
- import N from "./index223.js";
4
+ import N from "./index212.js";
5
5
  /* empty css */
6
- import { useItemsGetter as U } from "./index225.js";
7
- import { useIndexById as T } from "./index226.js";
8
- import { useBaseOptions as q } from "./index227.js";
9
- import { useCoherence as J } from "./index228.js";
10
- import { hash as Q } from "./index229.js";
11
- import { useHashedWatcher as $ } from "./index230.js";
12
- import { usePrefill as X } from "./index231.js";
6
+ import { useItemsGetter as U } from "./index214.js";
7
+ import { useIndexById as T } from "./index215.js";
8
+ import { useBaseOptions as q } from "./index216.js";
9
+ import { useCoherence as J } from "./index217.js";
10
+ import { hash as Q } from "./index218.js";
11
+ import { useHashedWatcher as $ } from "./index219.js";
12
+ import { usePrefill as X } from "./index220.js";
13
13
  const ue = /* @__PURE__ */ j({
14
14
  __name: "BaseSwitchGroup",
15
15
  props: {
package/dist/index45.js CHANGED
@@ -3,17 +3,17 @@ import { defineComponent as Q, ref as u, computed as f, toRef as E, watch as Z,
3
3
  /* empty css */
4
4
  import ae from "./index111.js";
5
5
  /* empty css */
6
- import { last as le } from "./index242.js";
7
- import { useBaseOptions as ne } from "./index227.js";
8
- import { useIndexById as re } from "./index226.js";
9
- import ie from "./index246.js";
6
+ import { last as le } from "./index221.js";
7
+ import { useBaseOptions as ne } from "./index216.js";
8
+ import { useIndexById as re } from "./index215.js";
9
+ import ie from "./index222.js";
10
10
  /* empty css */
11
- import ue from "./index248.js";
11
+ import ue from "./index224.js";
12
12
  /* empty css */
13
- import se from "./index213.js";
13
+ import se from "./index226.js";
14
14
  /* empty css */
15
- import de from "./index215.js";
16
- import { isEmpty as pe } from "./index241.js";
15
+ import de from "./index228.js";
16
+ import { isEmpty as pe } from "./index229.js";
17
17
  const ce = { class: "bb-base-tag__input-container" }, me = ["id", "aria-describedby", "autocomplete", "autofocus", "disabled", "placeholder", "readonly", "required", "onKeydown"], De = /* @__PURE__ */ Q({
18
18
  __name: "BaseTag",
19
19
  props: {