bitboss-ui 2.1.95 → 2.1.96
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/BaseSelect/BaseSelect.vue.d.ts +13 -0
- package/dist/components/BbSelect/BbSelect.vue.d.ts +16 -0
- package/dist/components/FlatListBox.vue.d.ts +56 -0
- package/dist/components/GroupedListBox.vue.d.ts +67 -0
- package/dist/components/ListBox.vue.d.ts +58 -16
- package/dist/composables/useListboxFocus.d.ts +19 -0
- package/dist/index.css +1 -1
- package/dist/index108.js +9 -9
- package/dist/index109.js +17 -10
- package/dist/index115.js +1 -1
- package/dist/index121.js +4 -4
- package/dist/index123.js +13 -13
- package/dist/index131.js +1 -1
- package/dist/index133.js +5 -5
- package/dist/index135.js +1 -1
- package/dist/index137.js +2 -2
- package/dist/index14.js +1 -1
- package/dist/index140.js +1 -1
- package/dist/index142.js +2 -2
- package/dist/index144.js +1 -1
- package/dist/index16.js +5 -5
- package/dist/index18.js +3 -3
- package/dist/index20.js +8 -8
- package/dist/index216.js +138 -2
- package/dist/index217.js +2 -138
- package/dist/index218.js +2 -2
- package/dist/index219.js +1 -1
- package/dist/index22.js +14 -14
- package/dist/index220.js +1 -1
- package/dist/index221.js +5 -2
- package/dist/index222.js +5 -2
- package/dist/index223.js +5 -2
- package/dist/index224.js +5 -7
- package/dist/index225.js +3 -2
- package/dist/index226.js +2 -7
- package/dist/index227.js +6 -5
- package/dist/index228.js +8 -5
- package/dist/index229.js +268 -5
- package/dist/index230.js +52 -5
- package/dist/index231.js +52 -3
- package/dist/index232.js +32 -6
- package/dist/index233.js +58 -6
- package/dist/index234.js +12 -267
- package/dist/index235.js +4 -52
- package/dist/index236.js +19 -51
- package/dist/index237.js +195 -26
- package/dist/index239.js +134 -12
- package/dist/index24.js +11 -11
- package/dist/index241.js +32 -16
- package/dist/index242.js +26 -104
- package/dist/index244.js +2 -100
- package/dist/index245.js +4 -0
- package/dist/index246.js +51 -3
- package/dist/index247.js +17 -2
- package/dist/index248.js +106 -3
- package/dist/index250.js +100 -3
- package/dist/index252.js +3 -5
- package/dist/index253.js +5 -4
- package/dist/index254.js +5 -9
- package/dist/index255.js +5 -29
- package/dist/index256.js +2 -16
- package/dist/index257.js +34 -12
- package/dist/index258.js +85 -52
- package/dist/index26.js +3 -3
- package/dist/index260.js +27 -11
- package/dist/index261.js +15 -2
- package/dist/index262.js +12 -67
- package/dist/index263.js +15 -32
- package/dist/index264.js +188 -28
- package/dist/index265.js +5 -0
- package/dist/index266.js +8 -187
- package/dist/index267.js +18 -3
- package/dist/index268.js +12 -3
- package/dist/index269.js +4 -33
- package/dist/index270.js +103 -7
- package/dist/index271.js +13 -5
- package/dist/index272.js +11 -5
- package/dist/index273.js +5 -5
- package/dist/index274.js +2 -20
- package/dist/index275.js +3 -135
- package/dist/index277.js +22 -85
- package/dist/index278.js +11 -0
- package/dist/index279.js +23 -15
- package/dist/index28.js +1 -1
- package/dist/index280.js +2 -9
- package/dist/index281.js +7 -23
- package/dist/index282.js +6 -22
- package/dist/index283.js +33 -9
- package/dist/index284.js +13 -4
- package/dist/index285.js +59 -193
- package/dist/index287.js +3 -34
- package/dist/index288.js +6 -7
- package/dist/index289.js +14 -16
- package/dist/index290.js +9 -12
- package/dist/index291.js +20 -228
- package/dist/index293.js +3 -11
- package/dist/index294.js +3 -6
- package/dist/index295.js +3 -16
- package/dist/index296.js +2 -2
- package/dist/{index292.js → index297.js} +1 -1
- package/dist/index298.js +3 -3
- package/dist/index299.js +7 -280
- package/dist/index30.js +3 -3
- package/dist/index300.js +53 -2
- package/dist/index301.js +277 -13
- package/dist/index302.js +2 -2
- package/dist/index303.js +9 -9
- package/dist/index305.js +12 -23
- package/dist/index307.js +27 -2
- package/dist/index308.js +2 -2
- package/dist/index309.js +1 -1
- package/dist/index310.js +1 -1
- package/dist/index311.js +2 -28
- package/dist/index312.js +1 -1
- package/dist/index313.js +28 -3
- package/dist/index314.js +1 -1
- package/dist/index315.js +3 -4
- package/dist/index316.js +3 -17
- package/dist/index317.js +17 -3
- package/dist/index318.js +2 -3
- package/dist/index319.js +3 -125
- package/dist/index32.js +2 -2
- package/dist/index320.js +125 -2
- package/dist/index321.js +2 -15
- package/dist/index322.js +15 -2
- package/dist/index323.js +2 -19
- package/dist/index324.js +19 -2
- package/dist/index325.js +2 -3
- package/dist/index326.js +4 -3
- package/dist/index327.js +2 -5
- package/dist/index328.js +1 -1
- package/dist/index329.js +5 -4
- package/dist/index330.js +4 -4
- package/dist/index331.js +719 -6
- package/dist/index332.js +366 -2
- package/dist/index333.js +56 -57
- package/dist/index334.js +8 -58
- package/dist/index335.js +6 -719
- package/dist/index336.js +7 -365
- package/dist/index337.js +33 -55
- package/dist/index338.js +6 -7
- package/dist/index339.js +127 -17
- package/dist/index34.js +8 -8
- package/dist/index340.js +396 -7
- package/dist/index341.js +57 -14
- package/dist/index342.js +58 -5
- package/dist/index343.js +5 -6
- package/dist/index344.js +3 -34
- package/dist/index345.js +5 -6
- package/dist/index346.js +6 -128
- package/dist/index347.js +16 -395
- package/dist/index348.js +8 -7
- package/dist/index349.js +14 -5
- package/dist/index350.js +7 -8
- package/dist/index351.js +131 -225
- package/dist/index354.js +192 -133
- package/dist/index355.js +257 -46
- package/dist/index356.js +1 -1
- package/dist/index357.js +223 -436
- package/dist/index358.js +2 -128
- package/dist/index359.js +2 -520
- package/dist/index36.js +4 -4
- package/dist/index360.js +435 -44
- package/dist/index361.js +130 -0
- package/dist/index362.js +49 -0
- package/dist/index363.js +72 -0
- package/dist/index364.js +522 -0
- package/dist/index365.js +52 -0
- package/dist/index38.js +252 -232
- package/dist/index40.js +7 -7
- package/dist/index42.js +2 -2
- package/dist/index44.js +8 -8
- package/dist/index46.js +6 -6
- package/dist/index50.js +2 -2
- package/dist/index54.js +1 -1
- package/dist/index56.js +1 -1
- package/dist/index58.js +2 -2
- package/dist/index62.js +5 -5
- package/dist/index68.js +1 -1
- package/dist/index81.js +6 -6
- package/dist/index83.js +1 -1
- package/dist/index85.js +2 -2
- package/dist/index87.js +3 -3
- package/dist/index89.js +1 -1
- package/dist/index92.js +3 -3
- package/dist/index94.js +2 -2
- package/dist/index96.js +5 -5
- package/dist/index98.js +1 -1
- package/dist/types/Option.d.ts +5 -0
- package/dist/utilities/functions/groupBy.d.ts +4 -2
- package/dist/utilities/functions/indexBy.d.ts +9 -2
- package/package.json +1 -1
- package/dist/index238.js +0 -62
- package/dist/index240.js +0 -53
- package/dist/index259.js +0 -15
- /package/dist/{index251.js → index276.js} +0 -0
- /package/dist/{index249.js → index286.js} +0 -0
package/dist/index285.js
CHANGED
|
@@ -1,203 +1,69 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
class: "
|
|
10
|
-
},
|
|
11
|
-
|
|
12
|
-
"aria-live": "polite",
|
|
13
|
-
class: "sr-only"
|
|
14
|
-
}, ne = { key: 0 }, ue = /* @__PURE__ */ j({
|
|
15
|
-
__name: "ColorPallette",
|
|
1
|
+
import { defineComponent as d, createElementBlock as l, openBlock as o, normalizeClass as u, createElementVNode as t, createBlock as i, createCommentVNode as s, unref as f, withCtx as g, toDisplayString as n } from "vue";
|
|
2
|
+
import { useLocale as k } from "./index234.js";
|
|
3
|
+
import h from "./index14.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import C from "./index87.js";
|
|
6
|
+
/* empty css */
|
|
7
|
+
const w = { class: "bb-toast-message__icon-container" }, v = { class: "bb-toast-message__content" }, y = {
|
|
8
|
+
key: 1,
|
|
9
|
+
class: "bb-toast-message__title"
|
|
10
|
+
}, B = { class: "bb-toast-message__text" }, z = /* @__PURE__ */ d({
|
|
11
|
+
__name: "BbToastMessage",
|
|
16
12
|
props: {
|
|
17
|
-
|
|
13
|
+
title: {},
|
|
14
|
+
text: {},
|
|
15
|
+
icon: {},
|
|
16
|
+
theme: { default: "default" },
|
|
17
|
+
id: {},
|
|
18
|
+
showClose: { type: Boolean }
|
|
18
19
|
},
|
|
19
|
-
emits: ["
|
|
20
|
-
setup(
|
|
21
|
-
const
|
|
22
|
-
|
|
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();
|
|
20
|
+
emits: ["click:close"],
|
|
21
|
+
setup(r, { emit: c }) {
|
|
22
|
+
const m = r, p = c, { t: _ } = k(), b = () => {
|
|
23
|
+
p("click:close", m.id);
|
|
136
24
|
};
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
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"
|
|
25
|
+
return (e, a) => (o(), l("div", {
|
|
26
|
+
"aria-atomic": "true",
|
|
27
|
+
"aria-live": "polite",
|
|
28
|
+
"aria-role": "alert",
|
|
29
|
+
class: u(["bb-toast-message", { [`bb-toast-message--${e.theme}`]: e.theme }])
|
|
163
30
|
}, [
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
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)
|
|
31
|
+
t("div", w, [
|
|
32
|
+
e.icon ? (o(), i(C, {
|
|
33
|
+
key: 0,
|
|
34
|
+
class: "bb-toast-message__icon",
|
|
35
|
+
type: e.icon
|
|
36
|
+
}, null, 8, ["type"])) : s("", !0)
|
|
180
37
|
]),
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
38
|
+
t("div", v, [
|
|
39
|
+
e.showClose ? (o(), i(h, {
|
|
40
|
+
key: 0,
|
|
41
|
+
"aria-label": f(_)("common.closeLabel").value,
|
|
42
|
+
class: "bb-toast-message__close",
|
|
43
|
+
onClick: b
|
|
44
|
+
}, {
|
|
45
|
+
default: g(() => a[0] || (a[0] = [
|
|
46
|
+
t("svg", {
|
|
47
|
+
fill: "none",
|
|
48
|
+
viewBox: "0 0 24 24",
|
|
49
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
50
|
+
}, [
|
|
51
|
+
t("path", {
|
|
52
|
+
d: "M23 23L1 1M23 1L1 23",
|
|
53
|
+
stroke: "currentColor",
|
|
54
|
+
"stroke-linecap": "round",
|
|
55
|
+
"stroke-width": "2"
|
|
56
|
+
})
|
|
57
|
+
], -1)
|
|
58
|
+
])),
|
|
59
|
+
_: 1
|
|
60
|
+
}, 8, ["aria-label"])) : s("", !0),
|
|
61
|
+
e.title ? (o(), l("p", y, n(e.title), 1)) : s("", !0),
|
|
62
|
+
t("p", B, n(e.text), 1)
|
|
197
63
|
])
|
|
198
|
-
],
|
|
64
|
+
], 2));
|
|
199
65
|
}
|
|
200
66
|
});
|
|
201
67
|
export {
|
|
202
|
-
|
|
68
|
+
z as default
|
|
203
69
|
};
|
package/dist/index287.js
CHANGED
|
@@ -1,36 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { useLogger as i } from "./index233.js";
|
|
4
|
-
import { useFrameworkDetection as k } from "./index143.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
|
-
});
|
|
1
|
+
const o = () => {
|
|
2
|
+
};
|
|
34
3
|
export {
|
|
35
|
-
|
|
4
|
+
o as noop
|
|
36
5
|
};
|
package/dist/index288.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
return i ? `${n}.${i.slice(0, t)}` : r;
|
|
6
|
-
};
|
|
1
|
+
import e from "./index331.js";
|
|
2
|
+
import o from "./index332.js";
|
|
3
|
+
import r from "./index333.js";
|
|
4
|
+
const f = new r(o, e)._freeze();
|
|
7
5
|
export {
|
|
8
|
-
|
|
6
|
+
r as Mime,
|
|
7
|
+
f as default
|
|
9
8
|
};
|
package/dist/index289.js
CHANGED
|
@@ -1,20 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
const e = (o, r, f) => o.reduce((t, n) => {
|
|
2
|
+
if (t) return t;
|
|
3
|
+
if (f(n))
|
|
4
|
+
return n;
|
|
5
|
+
if (r in n) {
|
|
6
|
+
const i = e(
|
|
7
|
+
[].concat(n[r]),
|
|
8
|
+
r,
|
|
9
|
+
f
|
|
6
10
|
);
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
for (let e = 0; e < r.length; e++) {
|
|
10
|
-
const n = r[e];
|
|
11
|
-
a(t, n);
|
|
12
|
-
const o = t[n];
|
|
13
|
-
if (c(o)) continue;
|
|
14
|
-
if (l(o).includes(i)) return !0;
|
|
11
|
+
if (i)
|
|
12
|
+
return i;
|
|
15
13
|
}
|
|
16
|
-
return
|
|
17
|
-
};
|
|
14
|
+
return t;
|
|
15
|
+
}, null);
|
|
18
16
|
export {
|
|
19
|
-
|
|
17
|
+
e as findInTree
|
|
20
18
|
};
|
package/dist/index290.js
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
e.value = e.value.filter(r);
|
|
10
|
-
} };
|
|
11
|
-
};
|
|
1
|
+
import { get as o } from "./index272.js";
|
|
2
|
+
const e = () => ({
|
|
3
|
+
getItemValue(n, f) {
|
|
4
|
+
if (typeof f > "u") return n;
|
|
5
|
+
if (typeof f == "function") return f(n);
|
|
6
|
+
if (typeof f == "string") return o(n, f);
|
|
7
|
+
}
|
|
8
|
+
});
|
|
12
9
|
export {
|
|
13
|
-
|
|
10
|
+
e as useItemValue
|
|
14
11
|
};
|
package/dist/index291.js
CHANGED
|
@@ -1,231 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
},
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
__name: "ListBox",
|
|
19
|
-
props: {
|
|
20
|
-
compact: { type: Boolean },
|
|
21
|
-
options: {},
|
|
22
|
-
open: { type: Boolean },
|
|
23
|
-
loading: { type: Boolean },
|
|
24
|
-
multiple: { type: Boolean },
|
|
25
|
-
transitionDuration: { default: 250 },
|
|
26
|
-
loadingText: {},
|
|
27
|
-
noDataText: {},
|
|
28
|
-
optionHeight: {}
|
|
29
|
-
},
|
|
30
|
-
emits: ["option:selected", "option:unselected"],
|
|
31
|
-
setup(V, { expose: R, emit: F }) {
|
|
32
|
-
const o = V, _ = F, { t: y } = ie(), u = $("inner"), O = $("listbox"), C = (e) => "option_" + JSON.stringify(e).replace(/\W/g, "_"), i = c(
|
|
33
|
-
() => o.options.map((e) => ({ ...e, id: C(e.value) }))
|
|
34
|
-
), x = c(() => o.optionHeight ? o.optionHeight : o.compact ? 32 : 40), d = ne({
|
|
35
|
-
get count() {
|
|
36
|
-
return o.options.length;
|
|
37
|
-
},
|
|
38
|
-
getScrollElement: () => u.value ? u.value : null,
|
|
39
|
-
estimateSize: () => x.value,
|
|
40
|
-
overscan: 5,
|
|
41
|
-
measureElement: () => x.value,
|
|
42
|
-
useAnimationFrameWithResizeObserver: !0
|
|
43
|
-
}), A = (e) => {
|
|
44
|
-
e && d.value.measureElement(e);
|
|
45
|
-
}, M = c(() => d.value.getVirtualItems()), P = c(() => d.value.getTotalSize()), n = w(null), s = c(
|
|
46
|
-
() => o.open && o.options.some((e) => !e.disabled)
|
|
47
|
-
), I = (e = 1) => {
|
|
48
|
-
const l = b(n.value) ? -1 : n.value;
|
|
49
|
-
let t = (l + e) % o.options.length;
|
|
50
|
-
for (; o.options[t].disabled && t !== l; )
|
|
51
|
-
t = I(e + 1);
|
|
52
|
-
return t;
|
|
53
|
-
}, W = () => {
|
|
54
|
-
if (!s.value) return;
|
|
55
|
-
const e = I();
|
|
56
|
-
n.value = e, a();
|
|
57
|
-
}, S = (e = 1) => {
|
|
58
|
-
const l = b(n.value) ? 0 : n.value;
|
|
59
|
-
let t = (l - e + o.options.length) % o.options.length;
|
|
60
|
-
for (; o.options[t].disabled && t !== l; )
|
|
61
|
-
t = S(e + 1);
|
|
62
|
-
return t;
|
|
63
|
-
}, J = async () => {
|
|
64
|
-
if (!s.value) return;
|
|
65
|
-
const e = S();
|
|
66
|
-
n.value = e, a();
|
|
67
|
-
}, Y = () => {
|
|
68
|
-
if (!s.value) return;
|
|
69
|
-
let e = 0;
|
|
70
|
-
for (; o.options[e].disabled; )
|
|
71
|
-
e++;
|
|
72
|
-
n.value = e, a();
|
|
73
|
-
}, j = () => {
|
|
74
|
-
if (!s.value) return;
|
|
75
|
-
let e = o.options.length - 1;
|
|
76
|
-
for (; o.options[e].disabled && e !== 0; )
|
|
77
|
-
e--;
|
|
78
|
-
n.value = e, a();
|
|
79
|
-
}, q = () => {
|
|
80
|
-
if (!s.value) return;
|
|
81
|
-
let e = 0;
|
|
82
|
-
for (; o.options[e] && !o.options[e].selected && o.options.length !== e; )
|
|
83
|
-
e++;
|
|
84
|
-
n.value = e % o.options.length, a();
|
|
85
|
-
}, G = () => {
|
|
86
|
-
if (!s.value) return;
|
|
87
|
-
let e = o.options.length - 1;
|
|
88
|
-
for (; o.options[e].selected && e > 0; )
|
|
89
|
-
e--;
|
|
90
|
-
n.value = e === -1 ? o.options.length - 1 : e, a();
|
|
91
|
-
}, K = (e) => {
|
|
92
|
-
if (!s.value) return;
|
|
93
|
-
const l = o.options.findIndex(
|
|
94
|
-
(t) => t.valueHash === e
|
|
95
|
-
);
|
|
96
|
-
l >= 0 && (n.value = l), a();
|
|
97
|
-
}, k = () => {
|
|
98
|
-
n.value = null;
|
|
99
|
-
}, a = () => {
|
|
100
|
-
u.value && le(n.value) && d.value.scrollToIndex(n.value, {
|
|
101
|
-
align: "center",
|
|
102
|
-
behavior: "smooth"
|
|
103
|
-
});
|
|
104
|
-
}, H = () => {
|
|
105
|
-
if (b(n.value) || !o.open) return;
|
|
106
|
-
const e = o.options[n.value];
|
|
107
|
-
e.selected ? _("option:unselected", e) : _("option:selected", e);
|
|
108
|
-
}, T = w(0), B = () => {
|
|
109
|
-
u.value && (T.value = u.value.scrollHeight);
|
|
110
|
-
}, Q = (e) => !e.disabled, U = (e) => {
|
|
111
|
-
if (e.preventDefault(), u.value && e.target && e.target instanceof HTMLElement && O.value) {
|
|
112
|
-
let l = e.target, t = l.dataset.index;
|
|
113
|
-
for (; b(t) && l.parentElement; )
|
|
114
|
-
l = l.parentElement, t = l.dataset.index;
|
|
115
|
-
if (t) {
|
|
116
|
-
const f = o.options[+t];
|
|
117
|
-
f && Q(f) && (n.value = +t, H());
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}, X = () => b(n.value) ? void 0 : o.options[n.value];
|
|
121
|
-
return E(
|
|
122
|
-
() => o.open,
|
|
123
|
-
() => {
|
|
124
|
-
B();
|
|
125
|
-
},
|
|
126
|
-
{ flush: "post" }
|
|
127
|
-
), E(
|
|
128
|
-
() => o.options,
|
|
129
|
-
(e, l) => {
|
|
130
|
-
N(e.map((t) => t.valueHash)) !== N(l.map((t) => t.valueHash)) && (d.value.calculateRange(), B(), k());
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
flush: "post"
|
|
134
|
-
}
|
|
135
|
-
), R({
|
|
136
|
-
focusNext: W,
|
|
137
|
-
focusPrevious: J,
|
|
138
|
-
focusFirst: Y,
|
|
139
|
-
focusFirstSelected: q,
|
|
140
|
-
focusLast: j,
|
|
141
|
-
focusLastSelected: G,
|
|
142
|
-
blur: k,
|
|
143
|
-
confirmOption: H,
|
|
144
|
-
focusByHash: K,
|
|
145
|
-
getHighlighted: X
|
|
146
|
-
}), (e, l) => (p(), r("span", {
|
|
147
|
-
class: z(["bb-listbox", {
|
|
148
|
-
"bb-listbox--compact": e.compact,
|
|
149
|
-
"bb-listbox--loading": e.loading,
|
|
150
|
-
"bb-listbox--multiple": e.multiple,
|
|
151
|
-
"bb-listbox--no-data": !i.value.length,
|
|
152
|
-
"bb-listbox--open": e.open
|
|
153
|
-
}]),
|
|
154
|
-
style: h({
|
|
155
|
-
"--transition-duration": `${e.transitionDuration}ms`,
|
|
156
|
-
"--overlay-min-height": `${T.value}px`,
|
|
157
|
-
"--option-height": `${x.value}px`
|
|
158
|
-
}),
|
|
159
|
-
onClick: ee(U, ["stop"])
|
|
160
|
-
}, [
|
|
161
|
-
v("span", se, [
|
|
162
|
-
v("span", ae, [
|
|
163
|
-
m(e.$slots, "options:prepend"),
|
|
164
|
-
e.loading && !e.options.length ? (p(), r("span", ue, [
|
|
165
|
-
m(e.$slots, "loading", {}, () => [
|
|
166
|
-
D(g(e.loadingText || L(y)("common.loadingText").value), 1)
|
|
167
|
-
])
|
|
168
|
-
])) : e.options.length ? (p(), r("span", {
|
|
169
|
-
key: 2,
|
|
170
|
-
role: "listbox",
|
|
171
|
-
ref: "listbox",
|
|
172
|
-
style: h({
|
|
173
|
-
height: `${P.value}px`
|
|
174
|
-
}),
|
|
175
|
-
tabindex: "-1"
|
|
176
|
-
}, [
|
|
177
|
-
(p(!0), r(te, null, oe(M.value, (t, f) => (p(), r("span", {
|
|
178
|
-
key: i.value[t.index].value,
|
|
179
|
-
ref_for: !0,
|
|
180
|
-
ref: A,
|
|
181
|
-
"aria-selected": n.value === f ? !0 : void 0,
|
|
182
|
-
class: z({
|
|
183
|
-
"bb-listbox__option autocomplete-option": !0,
|
|
184
|
-
"autocomplete-option--focused": n.value === t.index,
|
|
185
|
-
"autocomplete-option--selected": i.value[t.index].selected,
|
|
186
|
-
"autocomplete-option--disabled": i.value[t.index].disabled
|
|
187
|
-
}),
|
|
188
|
-
"data-index": t.index,
|
|
189
|
-
role: "option",
|
|
190
|
-
style: h({
|
|
191
|
-
transform: `translateY(${t.start}px)`
|
|
192
|
-
})
|
|
193
|
-
}, [
|
|
194
|
-
m(e.$slots, "option", {
|
|
195
|
-
disabled: !!i.value[t.index].disabled,
|
|
196
|
-
focused: n.value === t.index,
|
|
197
|
-
index: t.index,
|
|
198
|
-
item: i.value[t.index].item,
|
|
199
|
-
selected: !!i.value[t.index].selected,
|
|
200
|
-
text: i.value[t.index].text,
|
|
201
|
-
value: i.value[t.index].value
|
|
202
|
-
}, () => [
|
|
203
|
-
l[0] || (l[0] = v("svg", {
|
|
204
|
-
class: "autocomplete-option__checkbox",
|
|
205
|
-
role: "presentation",
|
|
206
|
-
viewBox: "276.411 158.834 114.971 114.97"
|
|
207
|
-
}, [
|
|
208
|
-
v("path", {
|
|
209
|
-
d: "M 297.574 224.786 L 318.309 243.134 L 371.568 189.232",
|
|
210
|
-
fill: "none",
|
|
211
|
-
"stroke-linecap": "round",
|
|
212
|
-
"stroke-width": "14px"
|
|
213
|
-
})
|
|
214
|
-
], -1)),
|
|
215
|
-
v("span", de, g(i.value[t.index].text), 1)
|
|
216
|
-
])
|
|
217
|
-
], 14, pe))), 128))
|
|
218
|
-
], 4)) : (p(), r("span", re, [
|
|
219
|
-
m(e.$slots, "no-data", {}, () => [
|
|
220
|
-
D(g(e.noDataText || L(y)("common.noDataText").value), 1)
|
|
221
|
-
])
|
|
222
|
-
])),
|
|
223
|
-
m(e.$slots, "options:append")
|
|
224
|
-
], 512)
|
|
225
|
-
])
|
|
226
|
-
], 6));
|
|
1
|
+
function i(e, o) {
|
|
2
|
+
const l = {}, u = e.length;
|
|
3
|
+
for (let n = 0; n < u; n++) {
|
|
4
|
+
const s = e[n];
|
|
5
|
+
let f;
|
|
6
|
+
if (typeof o == "function")
|
|
7
|
+
f = o(s, n, e);
|
|
8
|
+
else {
|
|
9
|
+
const t = s[o];
|
|
10
|
+
if (typeof t == "string" || typeof t == "number" || typeof t == "symbol")
|
|
11
|
+
f = t;
|
|
12
|
+
else
|
|
13
|
+
throw new Error(
|
|
14
|
+
`Property "${String(o)}" must be of type string, number, or symbol`
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
l[f] = s;
|
|
227
18
|
}
|
|
228
|
-
|
|
19
|
+
return l;
|
|
20
|
+
}
|
|
229
21
|
export {
|
|
230
|
-
|
|
22
|
+
i as indexBy
|
|
231
23
|
};
|
package/dist/index293.js
CHANGED
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
let t = n;
|
|
4
|
-
for (const o of i)
|
|
5
|
-
if (t && typeof t == "object" && o in t)
|
|
6
|
-
t = t[o];
|
|
7
|
-
else
|
|
8
|
-
return e;
|
|
9
|
-
return t === void 0 ? e : t;
|
|
10
|
-
}
|
|
1
|
+
import o from "./index242.js";
|
|
2
|
+
/* empty css */
|
|
11
3
|
export {
|
|
12
|
-
|
|
4
|
+
o as default
|
|
13
5
|
};
|
package/dist/index294.js
CHANGED