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.
- package/dist/components/BaseNumberInput/BaseNumberInput.vue.d.ts +2 -0
- package/dist/components/BbNumberInput/BbNumberInput.vue.d.ts +10 -2
- package/dist/index106.js +9 -9
- package/dist/index111.js +1 -1
- package/dist/index113.js +1 -1
- package/dist/index121.js +10 -10
- package/dist/index129.js +1 -1
- package/dist/index13.js +1 -1
- package/dist/index131.js +2 -2
- package/dist/index133.js +1 -1
- package/dist/index136.js +10 -20
- package/dist/index137.js +2 -2
- package/dist/index138.js +1 -1
- package/dist/index139.js +2 -2
- package/dist/index15.js +6 -6
- package/dist/index17.js +3 -3
- package/dist/index19.js +8 -8
- package/dist/index206.js +2 -138
- package/dist/index207.js +2 -2
- package/dist/index208.js +138 -2
- package/dist/index21.js +7 -7
- package/dist/index210.js +2 -2
- package/dist/index212.js +84 -32
- package/dist/{index225.js → index214.js} +1 -1
- package/dist/index215.js +17 -13
- package/dist/index216.js +51 -4
- package/dist/index217.js +14 -19
- package/dist/index218.js +3 -197
- package/dist/index219.js +14 -0
- package/dist/index220.js +16 -113
- package/dist/index221.js +4 -0
- package/dist/index222.js +106 -3
- package/dist/index224.js +102 -0
- package/dist/index226.js +66 -17
- package/dist/index228.js +13 -15
- package/dist/index229.js +2 -3
- package/dist/index23.js +13 -13
- package/dist/index230.js +5 -12
- package/dist/index231.js +5 -16
- package/dist/index232.js +5 -2
- package/dist/index233.js +5 -4
- package/dist/index234.js +5 -5
- package/dist/index235.js +5 -5
- package/dist/index236.js +2 -5
- package/dist/index237.js +20 -5
- package/dist/index238.js +113 -5
- package/dist/index240.js +2 -2
- package/dist/index241.js +4 -2
- package/dist/index242.js +2 -2
- package/dist/index243.js +33 -17
- package/dist/index244.js +2 -12
- package/dist/index245.js +2 -6
- package/dist/index246.js +7 -106
- package/dist/index247.js +9 -0
- package/dist/index248.js +3 -100
- package/dist/index249.js +6 -0
- package/dist/index250.js +188 -219
- package/dist/index252.js +2 -2
- package/dist/index253.js +2 -2
- package/dist/index255.js +5 -5
- package/dist/index258.js +2 -2
- package/dist/index259.js +1 -1
- package/dist/index260.js +18 -2
- package/dist/index261.js +12 -2
- package/dist/index262.js +6 -2
- package/dist/index263.js +228 -10
- package/dist/index264.js +9 -2
- package/dist/index265.js +3 -6
- package/dist/index266.js +176 -15
- package/dist/index267.js +9 -3
- package/dist/index268.js +23 -9
- package/dist/index269.js +3 -9
- package/dist/index27.js +1 -1
- package/dist/index270.js +6 -23
- package/dist/index271.js +15 -8
- package/dist/index272.js +9 -8
- package/dist/index274.js +9 -5
- package/dist/index275.js +7 -66
- package/dist/index276.js +67 -5
- package/dist/index277.js +5 -8
- package/dist/index278.js +5 -7
- package/dist/index279.js +7 -10
- package/dist/index280.js +3 -2
- package/dist/index281.js +17 -3
- package/dist/index282.js +30 -0
- package/dist/index283.js +6 -6
- package/dist/index284.js +10 -3
- package/dist/index285.js +3 -5
- package/dist/index286.js +3 -4
- package/dist/index287.js +1 -1
- package/dist/index289.js +7 -28
- package/dist/index29.js +91 -87
- package/dist/index290.js +4 -3
- package/dist/index291.js +280 -3
- package/dist/index292.js +2 -280
- package/dist/index293.js +125 -2
- package/dist/index294.js +2 -125
- package/dist/index295.js +15 -2
- package/dist/index296.js +2 -15
- package/dist/index297.js +16 -2
- package/dist/index298.js +2 -16
- package/dist/index299.js +16 -2
- package/dist/index300.js +2 -16
- package/dist/index301.js +19 -2
- package/dist/index302.js +2 -19
- package/dist/index303.js +3 -2
- package/dist/index304.js +2 -3
- package/dist/index305.js +4 -3
- package/dist/index306.js +6 -2
- package/dist/index307.js +5 -6
- package/dist/index308.js +3 -19
- package/dist/index309.js +19 -2
- package/dist/index31.js +2 -2
- package/dist/index310.js +2 -27
- package/dist/index311.js +27 -2
- package/dist/index312.js +2 -2
- package/dist/index313.js +1 -1
- package/dist/index314.js +1 -1
- package/dist/index315.js +1 -1
- package/dist/index316.js +1 -21
- package/dist/index317.js +24 -0
- package/dist/index319.js +2 -701
- package/dist/index320.js +5 -354
- package/dist/index321.js +701 -58
- package/dist/index322.js +354 -2
- package/dist/index323.js +57 -7
- package/dist/index324.js +2 -6
- package/dist/index325.js +57 -7
- package/dist/index326.js +58 -7
- package/dist/index327.js +6 -227
- package/dist/index328.js +227 -57
- package/dist/index329.js +128 -57
- package/dist/index33.js +8 -8
- package/dist/index330.js +368 -32
- package/dist/index331.js +33 -28
- package/dist/index332.js +30 -0
- package/dist/index334.js +44 -366
- package/dist/index335.js +7 -46
- package/dist/index336.js +5 -6
- package/dist/index337.js +8 -19
- package/dist/index338.js +6 -92
- package/dist/index339.js +21 -0
- package/dist/index340.js +93 -3
- package/dist/index343.js +3 -127
- package/dist/index344.js +421 -467
- package/dist/index345.js +123 -43
- package/dist/index346.js +484 -0
- package/dist/index347.js +49 -0
- package/dist/index35.js +3 -3
- package/dist/index37.js +19 -19
- package/dist/index39.js +177 -167
- package/dist/index41.js +2 -2
- package/dist/index43.js +8 -8
- package/dist/index45.js +8 -8
- package/dist/index47.js +2 -2
- package/dist/index49.js +3 -3
- package/dist/index55.js +1 -1
- package/dist/index57.js +2 -2
- package/dist/index61.js +2 -2
- package/dist/index79.js +3 -3
- package/dist/index83.js +2 -2
- package/dist/index85.js +1 -1
- package/dist/index87.js +1 -1
- package/dist/index92.js +1 -1
- package/dist/index94.js +1 -1
- package/dist/index96.js +1 -1
- package/dist/utilities/functions/percentage.d.ts +14 -21
- package/dist/utilities/functions/snapToStep.d.ts +1 -0
- package/dist/utilities/functions/transpose.d.ts +1 -0
- package/dist/utilities/functions/transposePercent.d.ts +9 -0
- package/package.json +1 -1
- package/dist/index213.js +0 -68
- package/dist/index223.js +0 -88
- package/dist/index227.js +0 -53
- package/dist/index239.js +0 -7
- package/dist/index251.js +0 -179
- package/dist/index288.js +0 -19
- package/dist/index318.js +0 -7
- package/dist/index333.js +0 -131
- package/dist/index342.js +0 -438
package/dist/index347.js
ADDED
@@ -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 "./
|
3
|
-
import { identity as $ } from "./
|
4
|
-
import { isCssColor as k } from "./
|
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 "./
|
9
|
-
import { isEmpty as lt } from "./
|
10
|
-
import { last as at } from "./
|
11
|
-
import { matchAnyKey as ne } from "./
|
12
|
-
import { useArray as ot } from "./
|
13
|
-
import { useBaseOptions as nt } from "./
|
14
|
-
import { useCoherence as ut } from "./
|
15
|
-
import { useHashedWatcher as ue } from "./
|
16
|
-
import { useIndexById as ie } from "./
|
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 "./
|
18
|
+
import { useItemsGetter as st } from "./index214.js";
|
19
19
|
import { useLocale as dt } from "./index210.js";
|
20
|
-
import { usePrefill as ct } from "./
|
20
|
+
import { usePrefill as ct } from "./index220.js";
|
21
21
|
import { wait as F } from "./index135.js";
|
22
|
-
import { waitFor as pt } from "./
|
23
|
-
import { when as mt } from "./
|
24
|
-
import ft from "./
|
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 "./
|
26
|
+
import vt from "./index224.js";
|
27
27
|
/* empty css */
|
28
|
-
import yt from "./
|
28
|
+
import yt from "./index226.js";
|
29
29
|
/* empty css */
|
30
|
-
import ht from "./
|
31
|
-
import bt from "./
|
30
|
+
import ht from "./index228.js";
|
31
|
+
import bt from "./index238.js";
|
32
32
|
/* empty css */
|
33
|
-
import gt from "./
|
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
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
5
|
-
import {
|
6
|
-
import {
|
7
|
-
import {
|
8
|
-
import {
|
9
|
-
|
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
|
-
},
|
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:
|
34
|
-
const a = K,
|
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
|
-
)),
|
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
|
-
|
46
|
+
te(() => {
|
47
47
|
var e;
|
48
|
-
a.autofocus && ((e =
|
49
|
-
})
|
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
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
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
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
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
|
-
) :
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
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 =
|
129
|
-
},
|
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
|
158
|
+
var t;
|
139
159
|
if (a.range) return;
|
140
|
-
(
|
141
|
-
const r =
|
142
|
-
|
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) && (
|
147
|
-
const
|
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: `${
|
150
|
-
left: `${
|
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
|
-
}),
|
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
|
161
|
-
|
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:
|
183
|
+
value: t,
|
174
184
|
percent: i,
|
175
|
-
active:
|
185
|
+
active: h
|
176
186
|
}), r += a.step;
|
177
187
|
}
|
178
188
|
return e;
|
179
189
|
});
|
180
|
-
return (e, r) => (
|
190
|
+
return (e, r) => (g(), y("span", P(q, {
|
181
191
|
ref_key: "container",
|
182
|
-
ref:
|
192
|
+
ref: I
|
183
193
|
}), [
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
(
|
188
|
-
key:
|
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
|
-
|
192
|
-
active:
|
193
|
-
percent:
|
194
|
-
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
|
-
|
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,
|
209
|
-
|
218
|
+
}, null, 8, fe),
|
219
|
+
m("span", {
|
210
220
|
ref_key: "track",
|
211
|
-
ref:
|
221
|
+
ref: V,
|
212
222
|
class: "bb-base-slider__track-container"
|
213
223
|
}, [
|
214
|
-
r[0] || (r[0] =
|
215
|
-
|
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 ? (
|
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:
|
242
|
+
onFocus: F,
|
233
243
|
onKeydown: X
|
234
244
|
}), [
|
235
|
-
|
236
|
-
class:
|
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":
|
249
|
+
"bb-base-slider__thumb--focused": c(o) === "lower"
|
240
250
|
}),
|
241
|
-
style:
|
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
|
-
|
247
|
-
focused:
|
256
|
+
v(e.$slots, "thumb:lower", {
|
257
|
+
focused: c(o) === "lower",
|
248
258
|
percent: n.value,
|
249
259
|
value: E.value
|
250
260
|
}, () => [
|
251
|
-
|
252
|
-
focused:
|
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,
|
259
|
-
|
268
|
+
], 16, pe)) : H("", !0),
|
269
|
+
m("span", P(c(z), {
|
260
270
|
key: "thumbhigher",
|
261
271
|
ref_key: "thumbhigher",
|
262
|
-
ref:
|
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":
|
278
|
+
"aria-valuenow": _.value,
|
269
279
|
class: "bb-base-slider__thumb-container",
|
270
280
|
"data-thumb": "higher",
|
271
281
|
role: "slider",
|
272
|
-
style: { left: `${
|
282
|
+
style: { left: `${l.value}%` },
|
273
283
|
tabindex: e.disabled ? -1 : 0,
|
274
|
-
onFocus:
|
284
|
+
onFocus: F,
|
275
285
|
onKeydown: X
|
276
286
|
}), [
|
277
|
-
|
278
|
-
class:
|
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":
|
291
|
+
"bb-base-slider__thumb--focused": c(o) === "higher"
|
282
292
|
}),
|
283
|
-
style:
|
284
|
-
transform: `translateY(-50%) ${e.thumbTranslate ? `translateX(-${
|
285
|
-
left: `${
|
293
|
+
style: G({
|
294
|
+
transform: `translateY(-50%) ${e.thumbTranslate ? `translateX(-${l.value}%)` : "translateX(-50%)"}`,
|
295
|
+
left: `${l.value}%`
|
286
296
|
})
|
287
297
|
}, [
|
288
|
-
|
289
|
-
focused:
|
290
|
-
percent:
|
291
|
-
value:
|
298
|
+
v(e.$slots, "thumb:higher", {
|
299
|
+
focused: c(o) === "higher",
|
300
|
+
percent: l.value,
|
301
|
+
value: _.value
|
292
302
|
}, () => [
|
293
|
-
|
294
|
-
focused:
|
295
|
-
percent:
|
296
|
-
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,
|
310
|
+
], 16, he)
|
301
311
|
]),
|
302
|
-
|
312
|
+
v(e.$slots, "append")
|
303
313
|
], 16));
|
304
314
|
}
|
305
315
|
});
|
306
316
|
export {
|
307
|
-
|
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 "./
|
3
|
-
import { when as N } from "./
|
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 "./
|
4
|
+
import N from "./index212.js";
|
5
5
|
/* empty css */
|
6
|
-
import { useItemsGetter as U } from "./
|
7
|
-
import { useIndexById as T } from "./
|
8
|
-
import { useBaseOptions as q } from "./
|
9
|
-
import { useCoherence as J } from "./
|
10
|
-
import { hash as Q } from "./
|
11
|
-
import { useHashedWatcher as $ } from "./
|
12
|
-
import { usePrefill as X } from "./
|
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 "./
|
7
|
-
import { useBaseOptions as ne } from "./
|
8
|
-
import { useIndexById as re } from "./
|
9
|
-
import ie from "./
|
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 "./
|
11
|
+
import ue from "./index224.js";
|
12
12
|
/* empty css */
|
13
|
-
import se from "./
|
13
|
+
import se from "./index226.js";
|
14
14
|
/* empty css */
|
15
|
-
import de from "./
|
16
|
-
import { isEmpty as pe } from "./
|
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: {
|