bitboss-ui 2.1.90 → 2.1.92
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/index107.js +9 -9
- package/dist/index114.js +1 -1
- package/dist/index120.js +1 -1
- package/dist/index122.js +12 -12
- package/dist/index13.js +2 -2
- package/dist/index130.js +1 -1
- package/dist/index132.js +5 -5
- package/dist/index134.js +1 -1
- package/dist/index136.js +2 -2
- package/dist/index141.js +2 -2
- package/dist/index142.js +1 -1
- package/dist/index143.js +2 -2
- package/dist/index15.js +5 -5
- package/dist/index17.js +3 -3
- package/dist/index19.js +8 -8
- package/dist/index21.js +14 -14
- package/dist/index215.js +138 -2
- package/dist/index216.js +2 -138
- package/dist/index217.js +32 -4
- package/dist/index218.js +28 -8
- package/dist/index220.js +5 -5
- package/dist/index221.js +8 -5
- package/dist/index222.js +2 -5
- package/dist/index223.js +51 -3
- package/dist/index224.js +17 -2
- package/dist/index225.js +106 -6
- package/dist/index227.js +95 -263
- package/dist/index229.js +3 -52
- package/dist/index23.js +11 -11
- package/dist/index230.js +12 -31
- package/dist/index231.js +12 -59
- package/dist/index232.js +13 -13
- package/dist/index233.js +3 -4
- package/dist/index234.js +8 -19
- package/dist/index235.js +185 -198
- package/dist/index236.js +5 -0
- package/dist/index237.js +3 -135
- package/dist/index238.js +20 -0
- package/dist/index239.js +11 -9
- package/dist/index240.js +14 -2
- package/dist/index241.js +12 -4
- package/dist/index242.js +29 -3
- package/dist/index243.js +16 -86
- package/dist/index244.js +6 -0
- package/dist/index245.js +134 -28
- package/dist/index247.js +228 -50
- package/dist/index248.js +2 -15
- package/dist/index249.js +86 -12
- package/dist/index25.js +3 -3
- package/dist/index251.js +2 -34
- package/dist/index252.js +3 -9
- package/dist/index253.js +8 -11
- package/dist/index254.js +2 -22
- package/dist/index255.js +4 -9
- package/dist/index256.js +5 -23
- package/dist/index257.js +5 -2
- package/dist/index258.js +5 -2
- package/dist/index259.js +5 -4
- package/dist/index260.js +6 -9
- package/dist/index261.js +7 -52
- package/dist/index262.js +268 -2
- package/dist/index263.js +52 -2
- package/dist/index264.js +52 -9
- package/dist/index265.js +32 -33
- package/dist/index266.js +57 -25
- package/dist/index267.js +7 -0
- package/dist/index268.js +5 -11
- package/dist/index269.js +5 -5
- package/dist/index27.js +1 -1
- package/dist/index270.js +2 -3
- package/dist/index271.js +20 -6
- package/dist/index272.js +7 -16
- package/dist/index273.js +2 -106
- package/dist/index274.js +36 -0
- package/dist/index275.js +9 -100
- package/dist/index276.js +5 -0
- package/dist/index277.js +5 -3
- package/dist/index278.js +4 -13
- package/dist/index279.js +201 -5
- package/dist/index281.js +9 -5
- package/dist/index282.js +23 -3
- package/dist/index283.js +23 -8
- package/dist/index284.js +6 -7
- package/dist/index285.js +15 -187
- package/dist/index286.js +11 -3
- package/dist/index29.js +2 -2
- package/dist/index290.js +7 -65
- package/dist/index291.js +8 -18
- package/dist/index292.js +67 -12
- package/dist/index293.js +51 -227
- package/dist/index295.js +1 -1
- package/dist/index296.js +7 -3
- package/dist/index297.js +3 -17
- package/dist/index298.js +3 -28
- package/dist/index299.js +17 -3
- package/dist/index300.js +4 -3
- package/dist/index301.js +5 -7
- package/dist/index302.js +3 -280
- package/dist/index303.js +28 -2
- package/dist/index304.js +3 -16
- package/dist/index305.js +2 -2
- package/dist/index306.js +277 -13
- package/dist/index307.js +2 -2
- package/dist/index308.js +12 -23
- package/dist/index31.js +2 -2
- package/dist/index310.js +16 -2
- package/dist/index311.js +2 -2
- package/dist/index312.js +27 -2
- package/dist/index313.js +2 -2
- package/dist/index314.js +1 -1
- package/dist/index315.js +1 -1
- package/dist/index316.js +2 -4
- package/dist/index317.js +2 -5
- package/dist/index318.js +2 -719
- package/dist/index319.js +2 -366
- package/dist/index320.js +5 -57
- package/dist/index321.js +1 -1
- package/dist/index322.js +125 -3
- package/dist/index323.js +2 -4
- package/dist/index324.js +14 -5
- package/dist/index325.js +2 -5
- package/dist/index326.js +16 -122
- package/dist/index327.js +2 -2
- package/dist/index328.js +719 -15
- package/dist/index329.js +366 -2
- package/dist/index33.js +8 -8
- package/dist/index330.js +55 -17
- package/dist/index331.js +2 -2
- package/dist/index332.js +58 -2
- package/dist/index333.js +58 -8
- package/dist/index334.js +227 -5
- package/dist/index335.js +6 -8
- package/dist/index336.js +35 -5
- package/dist/index337.js +6 -7
- package/dist/index338.js +125 -31
- package/dist/index339.js +398 -6
- package/dist/index340.js +44 -126
- package/dist/index341.js +3 -397
- package/dist/index344.js +1 -1
- package/dist/index345.js +1 -1
- package/dist/index346.js +5 -58
- package/dist/index347.js +7 -58
- package/dist/index348.js +8 -22
- package/dist/index349.js +8 -0
- package/dist/index35.js +4 -4
- package/dist/index350.js +8 -2
- package/dist/index351.js +86 -221
- package/dist/index353.js +512 -85
- package/dist/index354.js +21 -440
- package/dist/index356.js +437 -43
- package/dist/index357.js +124 -516
- package/dist/index37.js +18 -18
- package/dist/index39.js +3 -3
- package/dist/index41.js +2 -2
- package/dist/index43.js +8 -8
- package/dist/index45.js +6 -6
- package/dist/index49.js +2 -2
- package/dist/index53.js +1 -1
- package/dist/index55.js +1 -1
- package/dist/index57.js +2 -2
- package/dist/index61.js +5 -5
- package/dist/index67.js +1 -1
- package/dist/index80.js +6 -6
- package/dist/index82.js +1 -1
- package/dist/index84.js +2 -2
- package/dist/index86.js +17 -17
- package/dist/index88.js +1 -1
- package/dist/index91.js +3 -3
- package/dist/index93.js +2 -2
- package/dist/index95.js +5 -5
- package/package.json +2 -2
- package/dist/index219.js +0 -7
- package/dist/index226.js +0 -10
- package/dist/index228.js +0 -54
- package/dist/index246.js +0 -19
- package/dist/index250.js +0 -18
- package/dist/index280.js +0 -7
- package/dist/index355.js +0 -130
package/dist/index270.js
CHANGED
package/dist/index271.js
CHANGED
|
@@ -1,8 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const
|
|
1
|
+
import { MaskInput as r } from "./index235.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
|
+
};
|
|
5
20
|
export {
|
|
6
|
-
|
|
7
|
-
f as default
|
|
21
|
+
k as vMaska
|
|
8
22
|
};
|
package/dist/index272.js
CHANGED
|
@@ -1,18 +1,9 @@
|
|
|
1
|
-
const
|
|
2
|
-
if (
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
[].concat(n[r]),
|
|
8
|
-
r,
|
|
9
|
-
f
|
|
10
|
-
);
|
|
11
|
-
if (i)
|
|
12
|
-
return i;
|
|
13
|
-
}
|
|
14
|
-
return t;
|
|
15
|
-
}, null);
|
|
1
|
+
const s = (r, t) => {
|
|
2
|
+
if (r.endsWith("."))
|
|
3
|
+
return t === 0 ? r.slice(0, -1) : r;
|
|
4
|
+
const [n, i] = r.split(".");
|
|
5
|
+
return i ? `${n}.${i.slice(0, t)}` : r;
|
|
6
|
+
};
|
|
16
7
|
export {
|
|
17
|
-
|
|
8
|
+
s as clampPrecision
|
|
18
9
|
};
|
package/dist/index273.js
CHANGED
|
@@ -1,108 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { hash as d } from "./index223.js";
|
|
3
|
-
import { isNil as l } from "./index258.js";
|
|
4
|
-
import E from "./index67.js";
|
|
5
|
-
/* empty css */
|
|
6
|
-
const K = /* @__PURE__ */ y({
|
|
7
|
-
__name: "ChipsBox",
|
|
8
|
-
props: {
|
|
9
|
-
options: {}
|
|
10
|
-
},
|
|
11
|
-
emits: ["option:unselected"],
|
|
12
|
-
setup(f, { expose: v, emit: h }) {
|
|
13
|
-
const t = f, u = h, n = F(null), i = H(() => t.options.some((e) => !e.disabled)), a = (e = 1) => {
|
|
14
|
-
const s = l(n.value) ? -1 : n.value;
|
|
15
|
-
let o = (s + e) % t.options.length;
|
|
16
|
-
for (; t.options[o].disabled && o !== s; )
|
|
17
|
-
o = a(e + 1);
|
|
18
|
-
return o;
|
|
19
|
-
}, x = () => {
|
|
20
|
-
if (!i.value) return;
|
|
21
|
-
const e = a();
|
|
22
|
-
n.value = e;
|
|
23
|
-
}, c = (e = 1) => {
|
|
24
|
-
const s = l(n.value) ? 0 : n.value;
|
|
25
|
-
let o = (s - e + t.options.length) % t.options.length;
|
|
26
|
-
for (; t.options[o].disabled && o !== s; )
|
|
27
|
-
o = c(e + 1);
|
|
28
|
-
return o;
|
|
29
|
-
}, m = async () => {
|
|
30
|
-
if (!i.value) return;
|
|
31
|
-
const e = c();
|
|
32
|
-
n.value = e;
|
|
33
|
-
}, w = () => {
|
|
34
|
-
if (!i.value) return;
|
|
35
|
-
let e = 0;
|
|
36
|
-
for (; t.options[e].disabled; )
|
|
37
|
-
e++;
|
|
38
|
-
n.value = e;
|
|
39
|
-
}, b = () => {
|
|
40
|
-
if (!i.value) return;
|
|
41
|
-
let e = t.options.length - 1;
|
|
42
|
-
for (; t.options[e].disabled && e !== 0; )
|
|
43
|
-
e--;
|
|
44
|
-
n.value = e;
|
|
45
|
-
}, I = () => {
|
|
46
|
-
if (!i.value) return;
|
|
47
|
-
let e = 0;
|
|
48
|
-
for (; !t.options[e].selected && t.options.length !== e; )
|
|
49
|
-
e++;
|
|
50
|
-
n.value = e;
|
|
51
|
-
}, g = () => {
|
|
52
|
-
if (!i.value) return;
|
|
53
|
-
let e = t.options.length - 1;
|
|
54
|
-
for (; t.options[e].selected && e !== 0; )
|
|
55
|
-
e--;
|
|
56
|
-
n.value = e;
|
|
57
|
-
}, _ = (e) => {
|
|
58
|
-
if (!i.value) return;
|
|
59
|
-
const s = t.options.findIndex(
|
|
60
|
-
(o) => o.valueHash === e
|
|
61
|
-
);
|
|
62
|
-
s >= 0 && (n.value = s);
|
|
63
|
-
}, r = () => {
|
|
64
|
-
n.value = null;
|
|
65
|
-
}, k = () => {
|
|
66
|
-
if (l(n.value)) return;
|
|
67
|
-
const e = t.options[n.value];
|
|
68
|
-
e.selected && u("option:unselected", e);
|
|
69
|
-
}, C = () => l(n.value) ? void 0 : t.options[n.value];
|
|
70
|
-
return N(
|
|
71
|
-
() => t.options,
|
|
72
|
-
(e, s) => {
|
|
73
|
-
d(e) !== d(s) && r();
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
flush: "post"
|
|
77
|
-
}
|
|
78
|
-
), v({
|
|
79
|
-
focusNext: x,
|
|
80
|
-
focusPrevious: m,
|
|
81
|
-
focusFirst: w,
|
|
82
|
-
focusFirstSelected: I,
|
|
83
|
-
focusLast: b,
|
|
84
|
-
focusLastSelected: g,
|
|
85
|
-
blur: r,
|
|
86
|
-
confirmOption: k,
|
|
87
|
-
focusByHash: _,
|
|
88
|
-
getHighlighted: C
|
|
89
|
-
}), (e, s) => (p(!0), L(S, null, V(e.options, (o, B) => (p(), A(E, {
|
|
90
|
-
key: o.valueHash,
|
|
91
|
-
class: P({
|
|
92
|
-
"bb-chipsbox-item": !0,
|
|
93
|
-
"bb-chipsbox-item--focused": B === n.value
|
|
94
|
-
}),
|
|
95
|
-
clearable: !0,
|
|
96
|
-
text: o.text,
|
|
97
|
-
"onClick:clear": O((M) => u("option:unselected", o), ["stop"])
|
|
98
|
-
}, {
|
|
99
|
-
default: $(() => [
|
|
100
|
-
z(D(o.text), 1)
|
|
101
|
-
]),
|
|
102
|
-
_: 2
|
|
103
|
-
}, 1032, ["class", "text", "onClick:clear"]))), 128));
|
|
104
|
-
}
|
|
105
|
-
});
|
|
1
|
+
const r = (e) => typeof e > "u" || e === null;
|
|
106
2
|
export {
|
|
107
|
-
|
|
3
|
+
r as isNil
|
|
108
4
|
};
|
package/dist/index274.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { defineComponent as a, resolveComponent as o, createBlock as u, openBlock as l, resolveDynamicComponent as m, unref as c, withCtx as p, renderSlot as f } from "vue";
|
|
2
|
+
import { _config as e } from "./index4.js";
|
|
3
|
+
import { useLogger as i } from "./index261.js";
|
|
4
|
+
import { useFrameworkDetection as k } from "./index234.js";
|
|
5
|
+
const y = /* @__PURE__ */ a({
|
|
6
|
+
__name: "RouterComponent",
|
|
7
|
+
setup(g) {
|
|
8
|
+
const { isInertia: r, isNuxt: s } = k();
|
|
9
|
+
let t;
|
|
10
|
+
if (r) {
|
|
11
|
+
if (t = o(e.inertiaLinkName), typeof t == "string") {
|
|
12
|
+
const { warn: n } = i();
|
|
13
|
+
n(
|
|
14
|
+
`Inertia link component "${e.inertiaLinkName}" could not be resolved. Ensure you app registers a link component with the name "${e.inertiaLinkName}" or set bitboss-ui config key "inertiaLinkName" to the correct value globally. Please visit ${e.documentationURL}/getting-started to resolve setup issues in bitboss-ui.`
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
} else if (s) {
|
|
18
|
+
if (t = o(e.nuxtLinkName), typeof t == "string") {
|
|
19
|
+
const { warn: n } = i();
|
|
20
|
+
n(
|
|
21
|
+
`Nuxt link component "${e.nuxtLinkName}" could not be resolved. Ensure you app registers a link component with the name "${e.nuxtLinkName}" or set bitboss-ui config key "nuxtLinkName" to the correct value globally. Please visit ${e.documentationURL}/getting-started to resolve setup issues in bitboss-ui.`
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
} else
|
|
25
|
+
t = "router-link";
|
|
26
|
+
return (n, d) => (l(), u(m(c(t)), null, {
|
|
27
|
+
default: p(() => [
|
|
28
|
+
f(n.$slots, "default")
|
|
29
|
+
]),
|
|
30
|
+
_: 3
|
|
31
|
+
}));
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
export {
|
|
35
|
+
y as default
|
|
36
|
+
};
|
package/dist/index275.js
CHANGED
|
@@ -1,102 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
emits: ["option:unselected"],
|
|
10
|
-
setup(m, { expose: h, emit: x }) {
|
|
11
|
-
const t = m, a = x, n = H(null), l = L(() => t.options.some((e) => !e.disabled)), u = (e = 1) => {
|
|
12
|
-
const s = i(n.value) ? -1 : n.value;
|
|
13
|
-
let o = (s + e) % t.options.length;
|
|
14
|
-
for (; t.options[o].disabled && o !== s; )
|
|
15
|
-
o = u(e + 1);
|
|
16
|
-
return o;
|
|
17
|
-
}, b = () => {
|
|
18
|
-
if (!l.value) return;
|
|
19
|
-
const e = u();
|
|
20
|
-
n.value = e;
|
|
21
|
-
}, c = (e = 1) => {
|
|
22
|
-
const s = i(n.value) ? 0 : n.value;
|
|
23
|
-
let o = (s - e + t.options.length) % t.options.length;
|
|
24
|
-
for (; t.options[o].disabled && o !== s; )
|
|
25
|
-
o = c(e + 1);
|
|
26
|
-
return o;
|
|
27
|
-
}, w = async () => {
|
|
28
|
-
if (!l.value) return;
|
|
29
|
-
const e = c();
|
|
30
|
-
n.value = e;
|
|
31
|
-
}, I = () => {
|
|
32
|
-
if (!l.value) return;
|
|
33
|
-
let e = 0;
|
|
34
|
-
for (; t.options[e].disabled; )
|
|
35
|
-
e++;
|
|
36
|
-
n.value = e;
|
|
37
|
-
}, g = () => {
|
|
38
|
-
if (!l.value) return;
|
|
39
|
-
let e = t.options.length - 1;
|
|
40
|
-
for (; t.options[e].disabled && e !== 0; )
|
|
41
|
-
e--;
|
|
42
|
-
n.value = e;
|
|
43
|
-
}, k = () => {
|
|
44
|
-
if (!l.value) return;
|
|
45
|
-
let e = 0;
|
|
46
|
-
for (; !t.options[e].selected && t.options.length !== e; )
|
|
47
|
-
e++;
|
|
48
|
-
n.value = e;
|
|
49
|
-
}, _ = () => {
|
|
50
|
-
if (!l.value) return;
|
|
51
|
-
let e = t.options.length - 1;
|
|
52
|
-
for (; t.options[e].selected && e !== 0; )
|
|
53
|
-
e--;
|
|
54
|
-
n.value = e;
|
|
55
|
-
}, C = (e) => {
|
|
56
|
-
if (!l.value) return;
|
|
57
|
-
const s = t.options.findIndex(
|
|
58
|
-
(o) => o.valueHash === e
|
|
59
|
-
);
|
|
60
|
-
s >= 0 && (n.value = s);
|
|
61
|
-
}, r = () => {
|
|
62
|
-
n.value = null;
|
|
63
|
-
}, y = () => {
|
|
64
|
-
if (i(n.value)) return;
|
|
65
|
-
const e = t.options[n.value];
|
|
66
|
-
e.selected && a("option:unselected", e);
|
|
67
|
-
}, B = () => i(n.value) ? void 0 : t.options[n.value];
|
|
68
|
-
return N(
|
|
69
|
-
() => t.options,
|
|
70
|
-
(e, s) => {
|
|
71
|
-
f(e) !== f(s) && r();
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
flush: "post"
|
|
75
|
-
}
|
|
76
|
-
), h({
|
|
77
|
-
focusNext: b,
|
|
78
|
-
focusPrevious: w,
|
|
79
|
-
focusFirst: I,
|
|
80
|
-
focusFirstSelected: k,
|
|
81
|
-
focusLast: g,
|
|
82
|
-
focusLastSelected: _,
|
|
83
|
-
blur: r,
|
|
84
|
-
confirmOption: y,
|
|
85
|
-
focusByHash: C,
|
|
86
|
-
getHighlighted: B
|
|
87
|
-
}), (e, s) => (v(!0), d(S, null, A(e.options, (o, p) => (v(), d("span", {
|
|
88
|
-
key: o.valueHash,
|
|
89
|
-
class: P({
|
|
90
|
-
"bb-commabox-item": !0,
|
|
91
|
-
"bb-commabox-item--focused": p === n.value,
|
|
92
|
-
"bb-commabox-item--has-comma": p !== e.options.length - 1
|
|
93
|
-
}),
|
|
94
|
-
clearable: !0,
|
|
95
|
-
text: o.text,
|
|
96
|
-
"onClick:clear": O((D) => a("option:unselected", o), ["stop"])
|
|
97
|
-
}, V(o.text), 43, z))), 128));
|
|
98
|
-
}
|
|
99
|
-
});
|
|
1
|
+
function u(e, i) {
|
|
2
|
+
let t;
|
|
3
|
+
return function(...o) {
|
|
4
|
+
t !== void 0 && clearTimeout(t), t = setTimeout(() => {
|
|
5
|
+
e.apply(this, o);
|
|
6
|
+
}, i);
|
|
7
|
+
};
|
|
8
|
+
}
|
|
100
9
|
export {
|
|
101
|
-
|
|
10
|
+
u as debounce
|
|
102
11
|
};
|
package/dist/index276.js
ADDED
package/dist/index277.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
const o = (l, n, f = (r) => r, u) => l.map((r) => Array.isArray(r[n]) ? [
|
|
2
|
+
f(r, u),
|
|
3
|
+
...o(r[n], n, f, f(r, u))
|
|
4
|
+
] : [f(r, u)]).flat();
|
|
3
5
|
export {
|
|
4
|
-
|
|
6
|
+
o as flattenTree
|
|
5
7
|
};
|
package/dist/index278.js
CHANGED
|
@@ -1,15 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
if (n) {
|
|
5
|
-
const [, o, a] = n;
|
|
6
|
-
return a ? t : o + "px";
|
|
7
|
-
} else if (t in r)
|
|
8
|
-
return r[t] + "px";
|
|
9
|
-
throw new Error(`Invalid size: ${t}`);
|
|
10
|
-
}
|
|
11
|
-
return t + "px";
|
|
12
|
-
};
|
|
1
|
+
function x(e) {
|
|
2
|
+
return /^#([A-Fa-f0-9]{6})$/.test(e);
|
|
3
|
+
}
|
|
13
4
|
export {
|
|
14
|
-
|
|
5
|
+
x as isHex
|
|
15
6
|
};
|
package/dist/index279.js
CHANGED
|
@@ -1,7 +1,203 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { defineComponent as j, ref as s, onMounted as J, watch as Q, createElementBlock as M, openBlock as S, createElementVNode as x, createTextVNode as L, createCommentVNode as B, toDisplayString as y, unref as w } from "vue";
|
|
2
|
+
import { hexToRgb as K } from "./index348.js";
|
|
3
|
+
import { getHueFromRGB as F } from "./index349.js";
|
|
4
|
+
import { hslToHex as b } from "./index350.js";
|
|
5
|
+
import { useLocale as Z } from "./index231.js";
|
|
6
|
+
const ee = {
|
|
7
|
+
id: "mainCanvasDesc",
|
|
8
|
+
"aria-live": "polite",
|
|
9
|
+
class: "sr-only"
|
|
10
|
+
}, te = { key: 0 }, ae = {
|
|
11
|
+
id: "hueCanvasDesc",
|
|
12
|
+
"aria-live": "polite",
|
|
13
|
+
class: "sr-only"
|
|
14
|
+
}, ne = { key: 0 }, ue = /* @__PURE__ */ j({
|
|
15
|
+
__name: "ColorPallette",
|
|
16
|
+
props: {
|
|
17
|
+
modelValue: {}
|
|
18
|
+
},
|
|
19
|
+
emits: ["update:modelValue"],
|
|
20
|
+
setup(N, { emit: O }) {
|
|
21
|
+
const _ = N, f = O, { t: h } = Z(), o = s(_.modelValue), d = s(
|
|
22
|
+
b(F(...K(o.value ?? "#ff0000")), 100, 50)
|
|
23
|
+
), T = s(null), i = s(null), r = s(null), l = s({ x: 0, y: 0 }), u = s({ x: 0 }), p = s(!1), P = s(!1), q = () => {
|
|
24
|
+
const e = i.value, t = r.value;
|
|
25
|
+
!e || !t || (e.width = e.offsetWidth, e.height = e.offsetHeight, t.width = t.offsetWidth, t.height = t.offsetHeight, v(), g());
|
|
26
|
+
}, R = () => {
|
|
27
|
+
const e = i.value;
|
|
28
|
+
return e ? e.getContext("2d", { willReadFrequently: !0 }) : null;
|
|
29
|
+
}, v = () => {
|
|
30
|
+
const e = i.value;
|
|
31
|
+
if (!e) return;
|
|
32
|
+
const t = R();
|
|
33
|
+
if (!t) return;
|
|
34
|
+
t.clearRect(0, 0, e.width, e.height);
|
|
35
|
+
const a = t.createLinearGradient(0, 0, e.width, 0);
|
|
36
|
+
a.addColorStop(0, d.value), a.addColorStop(1, "#ffffff");
|
|
37
|
+
const n = t.createLinearGradient(0, 0, 0, e.height);
|
|
38
|
+
n.addColorStop(0, "transparent"), n.addColorStop(1, "#000000"), t.fillStyle = a, t.fillRect(0, 0, e.width, e.height), t.fillStyle = n, t.globalCompositeOperation = "multiply", t.fillRect(0, 0, e.width, e.height), t.globalCompositeOperation = "source-over", t.fillStyle = "#000000", t.strokeStyle = "#000000", t.lineWidth = 1;
|
|
39
|
+
}, m = () => {
|
|
40
|
+
const e = R();
|
|
41
|
+
e && (e.beginPath(), e.arc(
|
|
42
|
+
l.value.x,
|
|
43
|
+
l.value.y,
|
|
44
|
+
8,
|
|
45
|
+
0,
|
|
46
|
+
2 * Math.PI
|
|
47
|
+
), e.strokeStyle = "#ffffff", e.lineWidth = 2, e.stroke(), e.beginPath(), e.arc(
|
|
48
|
+
l.value.x,
|
|
49
|
+
l.value.y,
|
|
50
|
+
7,
|
|
51
|
+
0,
|
|
52
|
+
2 * Math.PI
|
|
53
|
+
), e.strokeStyle = "#000000", e.lineWidth = 1, e.stroke(), e.globalCompositeOperation = "source-over");
|
|
54
|
+
}, D = () => {
|
|
55
|
+
const e = r.value;
|
|
56
|
+
return e ? e.getContext("2d", { willReadFrequently: !0 }) : null;
|
|
57
|
+
}, g = () => {
|
|
58
|
+
const e = r.value;
|
|
59
|
+
if (!e) return;
|
|
60
|
+
const t = D();
|
|
61
|
+
if (!t) return;
|
|
62
|
+
const a = t.createLinearGradient(0, 0, e.width, 0);
|
|
63
|
+
for (let n = 0; n <= 360; n += 60)
|
|
64
|
+
a.addColorStop(n / 360, `hsl(${n}, 100%, 50%)`);
|
|
65
|
+
a.addColorStop(1, "hsl(360, 100%, 50%)"), t.fillStyle = a, t.fillRect(0, 0, e.width, e.height), H(), t.fillStyle = "#000000", t.strokeStyle = "#000000", t.lineWidth = 1;
|
|
66
|
+
}, H = () => {
|
|
67
|
+
const e = r.value;
|
|
68
|
+
if (!e) return;
|
|
69
|
+
const t = D();
|
|
70
|
+
if (!t) return;
|
|
71
|
+
const a = 10, n = 16, c = u.value.x - a / 2, k = e.height / 2 - n / 2;
|
|
72
|
+
t.beginPath(), t.roundRect(c, k, a, n, 2), t.strokeStyle = "lightgray", t.stroke(), t.fillStyle = "#ffffff", t.fill();
|
|
73
|
+
}, E = (e) => {
|
|
74
|
+
const t = i.value;
|
|
75
|
+
t && (t.setPointerCapture(e.pointerId), p.value = !0, I(e));
|
|
76
|
+
}, U = (e) => {
|
|
77
|
+
const t = r.value;
|
|
78
|
+
t && (t.setPointerCapture(e.pointerId), P.value = !0, V(e));
|
|
79
|
+
}, I = (e) => {
|
|
80
|
+
const t = i.value;
|
|
81
|
+
if (!t) return;
|
|
82
|
+
const a = t.getBoundingClientRect(), n = Math.max(0, Math.min(t.width - 1, e.clientX - a.left)), c = Math.max(0, Math.min(t.height - 1, e.clientY - a.top));
|
|
83
|
+
l.value = { x: n, y: c }, v(), m(), o.value = C(), f("update:modelValue", o.value);
|
|
84
|
+
}, V = (e) => {
|
|
85
|
+
const t = r.value;
|
|
86
|
+
if (!t) return;
|
|
87
|
+
const a = t.getBoundingClientRect(), n = Math.max(0, Math.min(t.width - 1, e.clientX - a.left));
|
|
88
|
+
u.value = { x: n };
|
|
89
|
+
const c = n / t.width * 360;
|
|
90
|
+
d.value = b(c, 100, 50), g(), v(), m(), o.value = C(), f("update:modelValue", o.value);
|
|
91
|
+
}, G = (e) => {
|
|
92
|
+
p.value ? I(e) : P.value && V(e);
|
|
93
|
+
}, W = (e) => {
|
|
94
|
+
const t = p.value ? i.value : r.value;
|
|
95
|
+
t && t.releasePointerCapture(e.pointerId), p.value = !1, P.value = !1;
|
|
96
|
+
}, X = (e) => {
|
|
97
|
+
switch (e.key) {
|
|
98
|
+
case "ArrowUp":
|
|
99
|
+
l.value.y = Math.max(0, l.value.y - 5);
|
|
100
|
+
break;
|
|
101
|
+
case "ArrowDown":
|
|
102
|
+
l.value.y = Math.min(
|
|
103
|
+
i.value?.height ?? 0,
|
|
104
|
+
l.value.y + 5
|
|
105
|
+
);
|
|
106
|
+
break;
|
|
107
|
+
case "ArrowLeft":
|
|
108
|
+
l.value.x = Math.max(0, l.value.x - 5);
|
|
109
|
+
break;
|
|
110
|
+
case "ArrowRight":
|
|
111
|
+
l.value.x = Math.min(
|
|
112
|
+
i.value?.width ?? 0,
|
|
113
|
+
l.value.x + 5
|
|
114
|
+
);
|
|
115
|
+
break;
|
|
116
|
+
default:
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
v(), m(), o.value = C(), f("update:modelValue", o.value), e.preventDefault();
|
|
120
|
+
}, $ = (e) => {
|
|
121
|
+
switch (e.key) {
|
|
122
|
+
case "ArrowLeft":
|
|
123
|
+
u.value.x = Math.max(0, u.value.x - 5);
|
|
124
|
+
break;
|
|
125
|
+
case "ArrowRight":
|
|
126
|
+
u.value.x = Math.min(
|
|
127
|
+
r.value?.width ?? 0,
|
|
128
|
+
u.value.x + 5
|
|
129
|
+
);
|
|
130
|
+
break;
|
|
131
|
+
default:
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
const a = u.value.x / (r.value?.width ?? 1) * 360;
|
|
135
|
+
d.value = b(a, 100, 50), g(), H(), v(), m(), o.value = C(), f("update:modelValue", o.value), e.preventDefault();
|
|
136
|
+
};
|
|
137
|
+
J(() => {
|
|
138
|
+
q(), A(o.value ?? "#ff0000");
|
|
139
|
+
}), Q(
|
|
140
|
+
() => _.modelValue,
|
|
141
|
+
(e) => {
|
|
142
|
+
!e || e === o.value || (o.value = e, A(e), g(), v());
|
|
143
|
+
}
|
|
144
|
+
);
|
|
145
|
+
const C = () => {
|
|
146
|
+
const e = i.value;
|
|
147
|
+
if (!e) return "#ffffff";
|
|
148
|
+
const t = e.getContext("2d");
|
|
149
|
+
if (!t) return "#ffffff";
|
|
150
|
+
const { x: a, y: n } = l.value, c = t.getImageData(a, n, 1, 1).data, [k, z, Y] = c;
|
|
151
|
+
return `#${((1 << 24) + (k << 16) + (z << 8) + Y).toString(16).slice(1)}`;
|
|
152
|
+
};
|
|
153
|
+
function A(e) {
|
|
154
|
+
const t = F(...K(e));
|
|
155
|
+
d.value = b(t, 100, 50), u.value.x = t / 360 * (r.value?.width ?? 0);
|
|
156
|
+
}
|
|
157
|
+
return (e, t) => (S(), M("span", {
|
|
158
|
+
ref_key: "paletteRef",
|
|
159
|
+
ref: T,
|
|
160
|
+
"aria-label": "Color Picker",
|
|
161
|
+
class: "bb-color-palette",
|
|
162
|
+
role: "application"
|
|
163
|
+
}, [
|
|
164
|
+
x("canvas", {
|
|
165
|
+
ref_key: "mainCanvasRef",
|
|
166
|
+
ref: i,
|
|
167
|
+
"aria-describedby": "mainCanvasDesc",
|
|
168
|
+
"aria-label": "Main Color Selection",
|
|
169
|
+
class: "bb-color-palette__canvas",
|
|
170
|
+
role: "application",
|
|
171
|
+
tabindex: "0",
|
|
172
|
+
onKeydown: X,
|
|
173
|
+
onPointerdown: E,
|
|
174
|
+
onPointermove: G,
|
|
175
|
+
onPointerup: W
|
|
176
|
+
}, null, 544),
|
|
177
|
+
x("span", ee, [
|
|
178
|
+
L(y(w(h)("colorInput.mainCanvasDesc")) + " ", 1),
|
|
179
|
+
o.value ? (S(), M("span", te, y(w(h)("colorInput.mainCanvasSelectedColor", o.value)), 1)) : B("", !0)
|
|
180
|
+
]),
|
|
181
|
+
x("canvas", {
|
|
182
|
+
ref_key: "hueCanvasRef",
|
|
183
|
+
ref: r,
|
|
184
|
+
"aria-describedby": "hueCanvasDesc",
|
|
185
|
+
"aria-label": "Hue Selection",
|
|
186
|
+
class: "bb-color-palette__hue-canvas",
|
|
187
|
+
role: "application",
|
|
188
|
+
tabindex: "0",
|
|
189
|
+
onKeydown: $,
|
|
190
|
+
onPointerdown: U,
|
|
191
|
+
onPointermove: G,
|
|
192
|
+
onPointerup: W
|
|
193
|
+
}, null, 544),
|
|
194
|
+
x("span", ae, [
|
|
195
|
+
L(y(w(h)("colorInput.hueCanvasDesc")) + " ", 1),
|
|
196
|
+
d.value ? (S(), M("span", ne, y(w(h)("colorInput.hueCanvasSelectedHue", d.value)), 1)) : B("", !0)
|
|
197
|
+
])
|
|
198
|
+
], 512));
|
|
199
|
+
}
|
|
200
|
+
});
|
|
5
201
|
export {
|
|
6
|
-
|
|
202
|
+
ue as default
|
|
7
203
|
};
|
package/dist/index281.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
const o = (n, t) => {
|
|
2
|
+
for (let e = n.length - 1; e >= 0; e--) {
|
|
3
|
+
const i = n[e];
|
|
4
|
+
if (t(i, e, n))
|
|
5
|
+
return e;
|
|
6
|
+
}
|
|
7
|
+
return -1;
|
|
8
|
+
};
|
|
5
9
|
export {
|
|
6
|
-
|
|
10
|
+
o as findRightIndex
|
|
7
11
|
};
|
package/dist/index282.js
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
const e = {
|
|
2
|
+
inert: ":not([inert]):not([inert] *)",
|
|
3
|
+
negTabIndex: ':not([tabindex^="-"])',
|
|
4
|
+
disabled: ":not(:disabled)"
|
|
5
|
+
}, n = [
|
|
6
|
+
`a[href]${e.inert}${e.negTabIndex}`,
|
|
7
|
+
`area[href]${e.inert}${e.negTabIndex}`,
|
|
8
|
+
`input:not([type="hidden"]):not([type="radio"])${e.inert}${e.negTabIndex}${e.disabled}`,
|
|
9
|
+
`input[type="radio"]${e.inert}${e.negTabIndex}${e.disabled}`,
|
|
10
|
+
`select${e.inert}${e.negTabIndex}${e.disabled}`,
|
|
11
|
+
`textarea${e.inert}${e.negTabIndex}${e.disabled}`,
|
|
12
|
+
`button${e.inert}${e.negTabIndex}${e.disabled}`,
|
|
13
|
+
`details${e.inert} > summary:first-of-type${e.negTabIndex}`,
|
|
14
|
+
// Discard until Firefox supports `:has()`
|
|
15
|
+
// See: https://github.com/KittyGiraudel/focusable-selectors/issues/12
|
|
16
|
+
// `details:not(:has(> summary))${not.inert}${not.negTabIndex}`,
|
|
17
|
+
`iframe${e.inert}${e.negTabIndex}`,
|
|
18
|
+
`audio[controls]${e.inert}${e.negTabIndex}`,
|
|
19
|
+
`video[controls]${e.inert}${e.negTabIndex}`,
|
|
20
|
+
`[contenteditable]${e.inert}${e.negTabIndex}`,
|
|
21
|
+
`[tabindex]${e.inert}${e.negTabIndex}`
|
|
22
|
+
];
|
|
3
23
|
export {
|
|
4
|
-
|
|
24
|
+
n as default
|
|
5
25
|
};
|
package/dist/index283.js
CHANGED
|
@@ -1,10 +1,25 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
const i = (t) => {
|
|
2
|
+
const n = t.toString().replace(/\.0+$/, "").replace(/\.$/, "");
|
|
3
|
+
return parseFloat(n) || 0;
|
|
4
|
+
};
|
|
5
|
+
function s(t) {
|
|
6
|
+
if (typeof t == "number")
|
|
7
|
+
return {
|
|
8
|
+
value: i(t),
|
|
9
|
+
unit: "px"
|
|
10
|
+
};
|
|
11
|
+
if (typeof t == "string") {
|
|
12
|
+
const r = /^(-?\d*\.?\d+)([a-zA-Z%]*)?$/, e = t.match(r);
|
|
13
|
+
if (e) {
|
|
14
|
+
const [, n, o = "px"] = e, a = parseFloat(n);
|
|
15
|
+
return {
|
|
16
|
+
value: i(a),
|
|
17
|
+
unit: o
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
throw new Error(`Invalid width: ${t}`);
|
|
22
|
+
}
|
|
8
23
|
export {
|
|
9
|
-
|
|
24
|
+
s as parseWidthString
|
|
10
25
|
};
|
package/dist/index284.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
return i ? `${n}.${i.slice(0, t)}` : r;
|
|
6
|
-
};
|
|
1
|
+
import e from "./index328.js";
|
|
2
|
+
import o from "./index329.js";
|
|
3
|
+
import r from "./index330.js";
|
|
4
|
+
const f = new r(o, e)._freeze();
|
|
7
5
|
export {
|
|
8
|
-
|
|
6
|
+
r as Mime,
|
|
7
|
+
f as default
|
|
9
8
|
};
|