bitboss-ui 2.1.76 → 2.1.77
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/BbDropdown/BbDropdown.vue.d.ts +23 -2
- package/dist/components/BbPopover/BbPopover.vue.d.ts +34 -9
- package/dist/components/BbTooltip/BbTooltip.vue.d.ts +6 -0
- package/dist/components/CommonPopover.vue.d.ts +5 -0
- package/dist/index.css +1 -1
- package/dist/index107.js +9 -9
- package/dist/index112.js +1 -1
- package/dist/index114.js +1 -1
- package/dist/index120.js +1 -1
- package/dist/index122.js +13 -13
- package/dist/index13.js +1 -1
- package/dist/index130.js +1 -1
- package/dist/index132.js +4 -4
- package/dist/index134.js +1 -1
- package/dist/index136.js +2 -2
- package/dist/index139.js +1 -1
- package/dist/index141.js +2 -2
- package/dist/index143.js +2 -2
- package/dist/index15.js +4 -4
- package/dist/index17.js +3 -3
- package/dist/index19.js +8 -8
- package/dist/index21.js +14 -14
- package/dist/index214.js +2 -138
- package/dist/index215.js +138 -2
- package/dist/index217.js +5 -7
- package/dist/index218.js +8 -2
- package/dist/index219.js +5 -5
- package/dist/index220.js +5 -8
- package/dist/index221.js +5 -5
- package/dist/index222.js +5 -2
- package/dist/index223.js +3 -2
- package/dist/index224.js +2 -2
- package/dist/index225.js +6 -13
- package/dist/index226.js +8 -9
- package/dist/index227.js +268 -3
- package/dist/index228.js +52 -3
- package/dist/index229.js +52 -2
- package/dist/index23.js +10 -10
- package/dist/index230.js +31 -17
- package/dist/index231.js +60 -12
- package/dist/index232.js +13 -51
- package/dist/index233.js +32 -14
- package/dist/index234.js +28 -12
- package/dist/index236.js +2 -29
- package/dist/index237.js +2 -16
- package/dist/index238.js +3 -4
- package/dist/index239.js +12 -105
- package/dist/index240.js +15 -0
- package/dist/index241.js +2 -100
- package/dist/index242.js +11 -0
- package/dist/index243.js +67 -59
- package/dist/index245.js +4 -229
- package/dist/index246.js +22 -12
- package/dist/index247.js +2 -3
- package/dist/index248.js +7 -5
- package/dist/index249.js +7 -5
- package/dist/index25.js +3 -3
- package/dist/index250.js +4 -5
- package/dist/index251.js +9 -5
- package/dist/index252.js +29 -5
- package/dist/index253.js +16 -5
- package/dist/index254.js +16 -19
- package/dist/index255.js +50 -32
- package/dist/index256.js +12 -28
- package/dist/index257.js +43 -0
- package/dist/index258.js +2 -2
- package/dist/index259.js +9 -2
- package/dist/index260.js +106 -7
- package/dist/index262.js +100 -10
- package/dist/index264.js +3 -4
- package/dist/index265.js +5 -3
- package/dist/index266.js +86 -4
- package/dist/index268.js +17 -0
- package/dist/index269.js +188 -86
- package/dist/index27.js +1 -1
- package/dist/index270.js +4 -0
- package/dist/index271.js +5 -5
- package/dist/index272.js +5 -6
- package/dist/index273.js +5 -8
- package/dist/index274.js +18 -266
- package/dist/index275.js +7 -51
- package/dist/index276.js +60 -45
- package/dist/index277.js +3 -32
- package/dist/index278.js +4 -60
- package/dist/index279.js +201 -9
- package/dist/index281.js +7 -9
- package/dist/index282.js +11 -8
- package/dist/index283.js +6 -9
- package/dist/index284.js +16 -23
- package/dist/index285.js +9 -12
- package/dist/index286.js +2 -187
- package/dist/index287.js +17 -66
- package/dist/index288.js +12 -6
- package/dist/index289.js +228 -15
- package/dist/index29.js +3 -3
- package/dist/index290.js +279 -40
- package/dist/index291.js +2 -11
- package/dist/index292.js +16 -3
- package/dist/index293.js +4 -0
- package/dist/index294.js +16 -3
- package/dist/index295.js +2 -5
- package/dist/index296.js +27 -7
- package/dist/index297.js +2 -3
- package/dist/index298.js +2 -3
- package/dist/index299.js +2 -3
- package/dist/index300.js +1 -1
- package/dist/index301.js +2 -28
- package/dist/index302.js +25 -14
- package/dist/index303.js +2 -4
- package/dist/index304.js +7 -280
- package/dist/index305.js +9 -2
- package/dist/index306.js +23 -125
- package/dist/index307.js +3 -2
- package/dist/index309.js +3 -2
- package/dist/index31.js +2 -2
- package/dist/index310.js +3 -16
- package/dist/index311.js +3 -2
- package/dist/index312.js +3 -16
- package/dist/index313.js +17 -2
- package/dist/index314.js +3 -19
- package/dist/index315.js +4 -2
- package/dist/index317.js +125 -3
- package/dist/index318.js +2 -5
- package/dist/index319.js +15 -3
- package/dist/index320.js +2 -2
- package/dist/index321.js +17 -25
- package/dist/index323.js +4 -2
- package/dist/index324.js +6 -2
- package/dist/index326.js +5 -2
- package/dist/index327.js +3 -2
- package/dist/index328.js +719 -6
- package/dist/index329.js +366 -4
- package/dist/index33.js +8 -8
- package/dist/index330.js +57 -719
- package/dist/index331.js +5 -366
- package/dist/index332.js +6 -56
- package/dist/index333.js +18 -57
- package/dist/index334.js +9 -58
- package/dist/index335.js +14 -46
- package/dist/index336.js +6 -34
- package/dist/index337.js +58 -6
- package/dist/index338.js +57 -128
- package/dist/index339.js +5 -398
- package/dist/index340.js +2 -8
- package/dist/index341.js +34 -5
- package/dist/index342.js +6 -8
- package/dist/index343.js +121 -85
- package/dist/index344.js +390 -220
- package/dist/index345.js +20 -518
- package/dist/index347.js +8 -5
- package/dist/index348.js +5 -6
- package/dist/index349.js +8 -19
- package/dist/index35.js +4 -4
- package/dist/index350.js +92 -8
- package/dist/index351.js +131 -12
- package/dist/index352.js +46 -6
- package/dist/index353.js +226 -48
- package/dist/index354.js +518 -20
- package/dist/index355.js +443 -0
- package/dist/index356.js +114 -427
- package/dist/index357.js +48 -126
- package/dist/index37.js +17 -17
- package/dist/index39.js +7 -7
- package/dist/index41.js +2 -2
- package/dist/index43.js +8 -8
- package/dist/index45.js +6 -6
- package/dist/index49.js +1 -1
- package/dist/index53.js +1 -1
- package/dist/index55.js +1 -1
- package/dist/index57.js +2 -2
- package/dist/index61.js +4 -4
- package/dist/index67.js +1 -1
- package/dist/index80.js +209 -156
- package/dist/index82.js +1 -1
- package/dist/index84.js +2 -2
- package/dist/index86.js +3 -3
- package/dist/index88.js +1 -1
- package/dist/index91.js +3 -3
- package/dist/index93.js +2 -2
- package/dist/index95.js +160 -100
- package/dist/index97.js +1 -1
- package/dist/types/CommonProps.d.ts +1 -1
- package/package.json +1 -1
- package/dist/index235.js +0 -19
- package/dist/index261.js +0 -9
- package/dist/index263.js +0 -5
- package/dist/index267.js +0 -203
- package/dist/index280.js +0 -25
- package/dist/index308.js +0 -17
- package/dist/index346.js +0 -136
package/dist/index95.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useId as
|
|
3
|
-
import { useIntersectionObserver as
|
|
4
|
-
import { useLocale as
|
|
5
|
-
import { useUntil as
|
|
6
|
-
import
|
|
1
|
+
import { defineComponent as re, mergeModels as I, ref as N, useTemplateRef as ae, computed as s, useModel as ie, watch as C, createElementBlock as se, openBlock as Y, Fragment as le, renderSlot as G, createCommentVNode as W, createVNode as ue, normalizeProps as de, mergeProps as X, unref as S, withCtx as F, createElementVNode as B, createBlock as ce, nextTick as pe } from "vue";
|
|
2
|
+
import { useId as me } from "./index8.js";
|
|
3
|
+
import { useIntersectionObserver as ve, useElementSize as fe } from "./index141.js";
|
|
4
|
+
import { useLocale as be } from "./index232.js";
|
|
5
|
+
import { useUntil as he } from "./index240.js";
|
|
6
|
+
import ge from "./index13.js";
|
|
7
7
|
/* empty css */
|
|
8
|
-
import
|
|
8
|
+
import we from "./index243.js";
|
|
9
9
|
/* empty css */
|
|
10
|
-
import { extractDomContainer as
|
|
11
|
-
import { parseWidthString as
|
|
12
|
-
const
|
|
10
|
+
import { extractDomContainer as H } from "./index245.js";
|
|
11
|
+
import { parseWidthString as U } from "./index246.js";
|
|
12
|
+
const Ee = ["inert"], Le = 500, ye = 10, De = /* @__PURE__ */ re({
|
|
13
13
|
inheritAttrs: !1,
|
|
14
14
|
__name: "BbPopover",
|
|
15
|
-
props: /* @__PURE__ */
|
|
15
|
+
props: /* @__PURE__ */ I({
|
|
16
16
|
arrowPadding: { default: 10 },
|
|
17
17
|
closeLabel: {},
|
|
18
18
|
block: { type: Boolean },
|
|
@@ -21,146 +21,206 @@ const ne = ["inert"], he = /* @__PURE__ */ G({
|
|
|
21
21
|
id: {},
|
|
22
22
|
offset: { default: 3 },
|
|
23
23
|
padding: { default: 10 },
|
|
24
|
-
placement: { default: "bottom" },
|
|
25
24
|
showClose: { type: Boolean, default: !0 },
|
|
26
25
|
theme: { default: "default" },
|
|
27
26
|
transitionDuration: { default: 300 },
|
|
27
|
+
placement: { default: "bottom" },
|
|
28
28
|
activator: {},
|
|
29
29
|
boundary: {},
|
|
30
30
|
focusTarget: {},
|
|
31
31
|
restoreFocus: { type: Boolean, default: !0 },
|
|
32
|
+
trigger: { default: "click" },
|
|
32
33
|
width: {}
|
|
33
34
|
}, {
|
|
34
35
|
modelValue: { type: Boolean, default: !1 },
|
|
35
36
|
modelModifiers: {}
|
|
36
37
|
}),
|
|
37
|
-
emits: /* @__PURE__ */
|
|
38
|
-
setup(
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
38
|
+
emits: /* @__PURE__ */ I(["shown", "hidden"], ["update:modelValue"]),
|
|
39
|
+
setup(M, { expose: _, emit: q }) {
|
|
40
|
+
const o = M, O = q, { t: z } = be(), { id: J } = me(), c = o.id ?? J.value, b = `bbp_${c}`, r = N(), T = ae("popoverRef"), V = s(() => H(T.value)), n = ie(M, "modelValue"), p = he(n), h = s(() => o.activator != null), x = s(() => {
|
|
41
|
+
const e = o.trigger;
|
|
42
|
+
return new Set(Array.isArray(e) ? e : [e]);
|
|
43
|
+
}), g = (e, t) => ({
|
|
44
|
+
getBoundingClientRect: () => ({
|
|
45
|
+
x: e,
|
|
46
|
+
y: t,
|
|
47
|
+
width: 0,
|
|
48
|
+
height: 0,
|
|
49
|
+
top: t,
|
|
50
|
+
left: e,
|
|
51
|
+
right: e,
|
|
52
|
+
bottom: t,
|
|
53
|
+
toJSON() {
|
|
54
|
+
return this;
|
|
55
|
+
}
|
|
56
|
+
})
|
|
57
|
+
}), d = N(null), K = s(
|
|
58
|
+
() => o.placement === "cursor" && d.value ? d.value : r.value
|
|
59
|
+
);
|
|
60
|
+
let D, a = null, m = !1;
|
|
61
|
+
const w = () => {
|
|
62
|
+
clearTimeout(D), a = null;
|
|
63
|
+
}, R = (e) => {
|
|
64
|
+
r.value = H(e) ?? void 0;
|
|
65
|
+
}, j = s(() => {
|
|
66
|
+
const e = x.value;
|
|
67
|
+
return {
|
|
68
|
+
"aria-expanded": p.value ? n.value : void 0,
|
|
69
|
+
"aria-controls": p.value ? b : void 0,
|
|
70
|
+
"aria-haspopup": "dialog",
|
|
71
|
+
id: c,
|
|
72
|
+
disabled: !!o.disabled,
|
|
73
|
+
ref: R,
|
|
74
|
+
...e.has("click") ? { onClick: E } : {},
|
|
75
|
+
...e.has("contextMenu") ? {
|
|
76
|
+
onContextmenu: L,
|
|
77
|
+
onPointerdown: y,
|
|
78
|
+
onPointermove: k,
|
|
79
|
+
onPointerup: u,
|
|
80
|
+
onPointercancel: u
|
|
81
|
+
} : {}
|
|
82
|
+
};
|
|
83
|
+
});
|
|
84
|
+
C(
|
|
85
|
+
() => o.activator,
|
|
52
86
|
(e) => {
|
|
53
|
-
e &&
|
|
87
|
+
e && R(e);
|
|
54
88
|
},
|
|
55
89
|
{ immediate: !0 }
|
|
56
|
-
),
|
|
57
|
-
r,
|
|
58
|
-
(e, t,
|
|
59
|
-
!e || !
|
|
60
|
-
|
|
61
|
-
|
|
90
|
+
), C(
|
|
91
|
+
[r, x],
|
|
92
|
+
([e, t], i, P) => {
|
|
93
|
+
if (!e || !h.value) return;
|
|
94
|
+
const A = [];
|
|
95
|
+
t.has("click") && (e.addEventListener("click", E), A.push(() => e.removeEventListener("click", E))), t.has("contextMenu") && (e.addEventListener("contextmenu", L), e.addEventListener("pointerdown", y), e.addEventListener("pointermove", k), e.addEventListener("pointerup", u), e.addEventListener("pointercancel", u), A.push(() => {
|
|
96
|
+
e.removeEventListener("contextmenu", L), e.removeEventListener("pointerdown", y), e.removeEventListener("pointermove", k), e.removeEventListener("pointerup", u), e.removeEventListener("pointercancel", u), w();
|
|
97
|
+
})), e.setAttribute("aria-haspopup", "dialog"), P(() => {
|
|
98
|
+
A.forEach((ne) => ne()), e.removeAttribute("aria-expanded"), e.removeAttribute("aria-controls"), e.removeAttribute("aria-haspopup");
|
|
99
|
+
});
|
|
62
100
|
},
|
|
63
101
|
{ immediate: !0 }
|
|
64
|
-
),
|
|
65
|
-
[r,
|
|
66
|
-
([e, t,
|
|
67
|
-
!e || !
|
|
102
|
+
), C(
|
|
103
|
+
[r, n, p],
|
|
104
|
+
([e, t, i]) => {
|
|
105
|
+
!e || !h.value || !i || (e.setAttribute("id", c), e.setAttribute("aria-expanded", String(t)), e.setAttribute("aria-controls", b));
|
|
68
106
|
},
|
|
69
107
|
{ immediate: !0 }
|
|
70
|
-
),
|
|
108
|
+
), ve(
|
|
71
109
|
r,
|
|
72
110
|
([{ intersectionRatio: e }]) => {
|
|
73
|
-
e !== 1 &&
|
|
111
|
+
e !== 1 && n.value && l();
|
|
74
112
|
},
|
|
75
113
|
{ threshold: [0, 1] }
|
|
76
114
|
);
|
|
77
|
-
const
|
|
115
|
+
const v = (e) => {
|
|
78
116
|
const t = e.target;
|
|
79
117
|
if (!(t instanceof Node)) return;
|
|
80
|
-
const
|
|
81
|
-
!
|
|
82
|
-
},
|
|
83
|
-
e.key === "Escape" && (e.preventDefault(),
|
|
84
|
-
},
|
|
85
|
-
document.addEventListener("click",
|
|
86
|
-
},
|
|
87
|
-
document.removeEventListener("click",
|
|
88
|
-
},
|
|
89
|
-
if (o.
|
|
90
|
-
|
|
118
|
+
const i = V.value?.contains(t), P = r.value?.contains(t);
|
|
119
|
+
!i && !P && l();
|
|
120
|
+
}, $ = (e) => {
|
|
121
|
+
e.key === "Escape" && (e.preventDefault(), l());
|
|
122
|
+
}, Q = () => {
|
|
123
|
+
document.addEventListener("click", v, { passive: !0 }), document.addEventListener("contextmenu", v, { passive: !0 }), document.addEventListener("keydown", $);
|
|
124
|
+
}, Z = () => {
|
|
125
|
+
document.removeEventListener("click", v), document.removeEventListener("contextmenu", v), document.removeEventListener("keydown", $);
|
|
126
|
+
}, f = async () => {
|
|
127
|
+
if (o.disabled) return;
|
|
128
|
+
n.value = !0, Q(), await pe();
|
|
129
|
+
const e = o.focusTarget ?? (o.showClose ? ".bb-popover__close" : '[tabindex]:not([tabindex="-1"]), button, a, input, select, textarea'), t = V.value?.querySelector(e);
|
|
130
|
+
t instanceof HTMLElement && t.focus(), O("shown");
|
|
131
|
+
}, E = async (e) => {
|
|
132
|
+
if (n.value) {
|
|
133
|
+
l();
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
if (m) {
|
|
137
|
+
m = !1, e.preventDefault(), e.stopPropagation();
|
|
91
138
|
return;
|
|
92
139
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
140
|
+
e.stopImmediatePropagation(), o.placement === "cursor" && (d.value = g(e.clientX, e.clientY)), await f();
|
|
141
|
+
}, L = (e) => {
|
|
142
|
+
o.disabled || (e.preventDefault(), e.stopPropagation(), !(o.placement === "cursor" && (d.value = g(e.clientX, e.clientY), n.value)) && (n.value ? l() : f()));
|
|
143
|
+
}, y = (e) => {
|
|
144
|
+
o.disabled || e.pointerType === "mouse" || (m = !1, a = { x: e.clientX, y: e.clientY }, D = setTimeout(() => {
|
|
145
|
+
m = !0, o.placement === "cursor" && a && (d.value = g(
|
|
146
|
+
a.x,
|
|
147
|
+
a.y
|
|
148
|
+
)), a = null, f();
|
|
149
|
+
}, Le));
|
|
150
|
+
}, k = (e) => {
|
|
151
|
+
if (!a) return;
|
|
152
|
+
const t = e.clientX - a.x, i = e.clientY - a.y;
|
|
153
|
+
Math.sqrt(t * t + i * i) > ye && w();
|
|
154
|
+
}, u = () => {
|
|
155
|
+
w();
|
|
156
|
+
}, l = () => {
|
|
157
|
+
n.value && (n.value = !1, Z(), o.restoreFocus && r.value && r.value.focus(), O("hidden"));
|
|
158
|
+
}, ee = s(() => {
|
|
159
|
+
if (!o.width) return !1;
|
|
160
|
+
const { unit: e } = U(o.width);
|
|
102
161
|
return e === "%";
|
|
103
|
-
}), { width:
|
|
104
|
-
s(() =>
|
|
162
|
+
}), { width: te } = fe(
|
|
163
|
+
s(() => ee.value ? r.value : void 0),
|
|
105
164
|
{ width: 0, height: 0 },
|
|
106
165
|
{ box: "border-box" }
|
|
107
|
-
),
|
|
108
|
-
if (!
|
|
109
|
-
const { value: e, unit: t } =
|
|
110
|
-
return t === "%" && r.value ? `${
|
|
166
|
+
), oe = s(() => {
|
|
167
|
+
if (!o.width) return;
|
|
168
|
+
const { value: e, unit: t } = U(o.width);
|
|
169
|
+
return t === "%" && r.value ? `${te.value * (e / 100)}px` : `${e}px`;
|
|
111
170
|
});
|
|
112
|
-
return
|
|
171
|
+
return _({
|
|
113
172
|
/** Opens the popover programmatically */
|
|
114
|
-
show:
|
|
173
|
+
show: f,
|
|
115
174
|
/** Closes the popover programmatically */
|
|
116
|
-
close:
|
|
175
|
+
close: l,
|
|
117
176
|
/** Whether the popover is currently open */
|
|
118
|
-
isOpen: s(() =>
|
|
119
|
-
}), (e, t) => (
|
|
120
|
-
|
|
121
|
-
props:
|
|
177
|
+
isOpen: s(() => n.value)
|
|
178
|
+
}), (e, t) => (Y(), se(le, null, [
|
|
179
|
+
h.value ? W("", !0) : G(e.$slots, "activator", de(X({ key: 0 }, {
|
|
180
|
+
props: j.value,
|
|
122
181
|
disabled: !!e.disabled,
|
|
123
|
-
isOpen:
|
|
182
|
+
isOpen: n.value,
|
|
124
183
|
placement: e.placement
|
|
125
184
|
}))),
|
|
126
|
-
|
|
127
|
-
id:
|
|
185
|
+
ue(we, X({
|
|
186
|
+
id: b,
|
|
128
187
|
ref_key: "popoverRef",
|
|
129
|
-
ref:
|
|
130
|
-
modelValue:
|
|
131
|
-
"onUpdate:modelValue": t[0] || (t[0] = (
|
|
132
|
-
anchor:
|
|
133
|
-
"aria-labelledby":
|
|
188
|
+
ref: T,
|
|
189
|
+
modelValue: n.value,
|
|
190
|
+
"onUpdate:modelValue": t[0] || (t[0] = (i) => n.value = i),
|
|
191
|
+
anchor: K.value,
|
|
192
|
+
"aria-labelledby": S(p) ? S(c) : void 0,
|
|
134
193
|
"arrow-padding": e.arrowPadding,
|
|
135
194
|
boundary: e.boundary,
|
|
136
195
|
class: ["bb-popover", `bb-popover--${e.theme}`],
|
|
137
196
|
dialog: "",
|
|
138
197
|
eager: e.eager,
|
|
139
198
|
offset: e.offset,
|
|
199
|
+
"hide-arrow": e.placement === "cursor",
|
|
140
200
|
padding: e.padding,
|
|
141
|
-
placement: e.placement,
|
|
142
|
-
style: { width:
|
|
201
|
+
placement: e.placement === "cursor" ? "bottom-start" : e.placement,
|
|
202
|
+
style: { width: oe.value },
|
|
143
203
|
"transition-duration": e.transitionDuration
|
|
144
204
|
}, e.$attrs), {
|
|
145
|
-
default:
|
|
146
|
-
|
|
205
|
+
default: F(() => [
|
|
206
|
+
B("span", {
|
|
147
207
|
class: "bb-popover__content",
|
|
148
|
-
inert: !
|
|
208
|
+
inert: !n.value
|
|
149
209
|
}, [
|
|
150
|
-
e.showClose ? (
|
|
210
|
+
e.showClose ? (Y(), ce(ge, {
|
|
151
211
|
key: 0,
|
|
152
|
-
"aria-label": e.closeLabel ||
|
|
212
|
+
"aria-label": e.closeLabel || S(z)("common.closeLabel").value,
|
|
153
213
|
class: "bb-popover__close",
|
|
154
|
-
onClick:
|
|
214
|
+
onClick: l
|
|
155
215
|
}, {
|
|
156
|
-
default:
|
|
157
|
-
|
|
216
|
+
default: F(() => t[1] || (t[1] = [
|
|
217
|
+
B("svg", {
|
|
158
218
|
"aria-hidden": "true",
|
|
159
219
|
fill: "none",
|
|
160
220
|
viewBox: "0 0 24 24",
|
|
161
221
|
xmlns: "http://www.w3.org/2000/svg"
|
|
162
222
|
}, [
|
|
163
|
-
|
|
223
|
+
B("path", {
|
|
164
224
|
d: "M23 23L1 1M23 1L1 23",
|
|
165
225
|
stroke: "currentColor",
|
|
166
226
|
"stroke-linecap": "round",
|
|
@@ -169,20 +229,20 @@ const ne = ["inert"], he = /* @__PURE__ */ G({
|
|
|
169
229
|
], -1)
|
|
170
230
|
])),
|
|
171
231
|
_: 1
|
|
172
|
-
}, 8, ["aria-label"])) :
|
|
173
|
-
|
|
174
|
-
close:
|
|
232
|
+
}, 8, ["aria-label"])) : W("", !0),
|
|
233
|
+
G(e.$slots, "default", {
|
|
234
|
+
close: l,
|
|
175
235
|
disabled: !!e.disabled,
|
|
176
|
-
open:
|
|
236
|
+
open: n.value,
|
|
177
237
|
placement: e.placement
|
|
178
238
|
})
|
|
179
|
-
], 8,
|
|
239
|
+
], 8, Ee)
|
|
180
240
|
]),
|
|
181
241
|
_: 3
|
|
182
|
-
}, 16, ["modelValue", "anchor", "aria-labelledby", "arrow-padding", "boundary", "class", "eager", "offset", "padding", "placement", "style", "transition-duration"])
|
|
242
|
+
}, 16, ["modelValue", "anchor", "aria-labelledby", "arrow-padding", "boundary", "class", "eager", "offset", "hide-arrow", "padding", "placement", "style", "transition-duration"])
|
|
183
243
|
], 64));
|
|
184
244
|
}
|
|
185
245
|
});
|
|
186
246
|
export {
|
|
187
|
-
|
|
247
|
+
De as default
|
|
188
248
|
};
|
package/dist/index97.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as r, computed as a, createElementBlock as l, openBlock as s, normalizeClass as m, createElementVNode as n, normalizeStyle as c } from "vue";
|
|
2
|
-
import { clamp as p } from "./
|
|
2
|
+
import { clamp as p } from "./index214.js";
|
|
3
3
|
import { getAsPercentageBetween as i } from "./index139.js";
|
|
4
4
|
const _ = /* @__PURE__ */ r({
|
|
5
5
|
__name: "BbProgress",
|
|
@@ -190,7 +190,7 @@ export type CommonProps = {
|
|
|
190
190
|
*/
|
|
191
191
|
placeholder?: InputHTMLAttributes['placeholder'];
|
|
192
192
|
/**
|
|
193
|
-
* Position of the overlay in respect to the related activator
|
|
193
|
+
* Position of the overlay in respect to the related activator.
|
|
194
194
|
*/
|
|
195
195
|
placement?: 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end';
|
|
196
196
|
/**
|
package/package.json
CHANGED
package/dist/index235.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { computed as u, unref as a } from "vue";
|
|
2
|
-
import { hash as d } from "./index227.js";
|
|
3
|
-
const p = ({
|
|
4
|
-
items: m,
|
|
5
|
-
key: e
|
|
6
|
-
}) => {
|
|
7
|
-
const n = (t) => e ? String(t[e]) : d(t), o = u(() => {
|
|
8
|
-
const t = {}, s = Array.from(a(m) ?? []);
|
|
9
|
-
for (let r = 0; r < s.length; r++) {
|
|
10
|
-
const c = s[r];
|
|
11
|
-
t[n(c)] = c;
|
|
12
|
-
}
|
|
13
|
-
return t;
|
|
14
|
-
});
|
|
15
|
-
return { data: o, get: (t) => o.value[n(t)] };
|
|
16
|
-
};
|
|
17
|
-
export {
|
|
18
|
-
p as useIndexById
|
|
19
|
-
};
|
package/dist/index261.js
DELETED
package/dist/index263.js
DELETED
package/dist/index267.js
DELETED
|
@@ -1,203 +0,0 @@
|
|
|
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 "./index340.js";
|
|
3
|
-
import { getHueFromRGB as F } from "./index341.js";
|
|
4
|
-
import { hslToHex as b } from "./index342.js";
|
|
5
|
-
import { useLocale as Z } from "./index225.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
|
-
});
|
|
201
|
-
export {
|
|
202
|
-
ue as default
|
|
203
|
-
};
|
package/dist/index280.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
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
|
-
}
|
|
23
|
-
export {
|
|
24
|
-
s as parseWidthString
|
|
25
|
-
};
|
package/dist/index308.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { __module as e } from "./index309.js";
|
|
2
|
-
var a = e.exports, u;
|
|
3
|
-
function i() {
|
|
4
|
-
return u ? e.exports : (u = 1, function(_, o) {
|
|
5
|
-
(function(n, r) {
|
|
6
|
-
_.exports = r();
|
|
7
|
-
})(a, function() {
|
|
8
|
-
return { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(n) {
|
|
9
|
-
var r = ["th", "st", "nd", "rd"], t = n % 100;
|
|
10
|
-
return "[" + n + (r[(t - 20) % 10] || r[t] || r[0]) + "]";
|
|
11
|
-
} };
|
|
12
|
-
});
|
|
13
|
-
}(e), e.exports);
|
|
14
|
-
}
|
|
15
|
-
export {
|
|
16
|
-
i as __require
|
|
17
|
-
};
|