bitboss-ui 2.0.175 → 2.1.0
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/BaseButton/BaseButton.vue.d.ts +1 -1
- package/dist/components/BaseColorInput/BaseColorInput.vue.d.ts +1 -4
- package/dist/components/BaseDatePickerInput/BaseDatePickerInput.vue.d.ts +0 -4
- package/dist/components/BaseDialog/BaseDialog.vue.d.ts +34 -27
- package/dist/components/BaseSelect/BaseSelect.vue.d.ts +0 -4
- package/dist/components/BbConfirm/BbConfirm.vue.d.ts +1 -1
- package/dist/components/BbDialog/BbDialog.vue.d.ts +8 -3
- package/dist/components/BbDropdown/BbDropdown.vue.d.ts +1 -1
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +32 -28
- package/dist/components/BbPopover/BbPopover.vue.d.ts +1 -1
- package/dist/components/BbSelect/BbSelect.vue.d.ts +0 -4
- package/dist/components/BbToast/BbToast.vue.d.ts +1 -1
- package/dist/components/BbTooltip/BbTooltip.vue.d.ts +1 -1
- package/dist/index.css +1 -1
- package/dist/index106.js +9 -9
- package/dist/index107.js +29 -31
- package/dist/index111.js +1 -1
- package/dist/index113.js +1 -1
- package/dist/index121.js +12 -12
- package/dist/index129.js +20 -26
- package/dist/index13.js +1 -1
- package/dist/index131.js +13 -14
- package/dist/index133.js +1 -1
- package/dist/index136.js +1 -1
- package/dist/index137.js +3 -3
- package/dist/index139.js +2 -2
- package/dist/index15.js +14 -15
- package/dist/index17.js +3 -3
- package/dist/index19.js +8 -8
- package/dist/index206.js +2 -138
- package/dist/index207.js +138 -2
- package/dist/index209.js +2 -86
- package/dist/index21.js +16 -16
- package/dist/index210.js +6 -0
- package/dist/index211.js +2 -29
- package/dist/index212.js +66 -17
- package/dist/index214.js +13 -15
- package/dist/index215.js +13 -3
- package/dist/index216.js +13 -12
- package/dist/index217.js +10 -15
- package/dist/index218.js +5 -2
- package/dist/index219.js +5 -2
- package/dist/index220.js +5 -18
- package/dist/index221.js +5 -12
- package/dist/index222.js +5 -13
- package/dist/index223.js +5 -6
- package/dist/index224.js +2 -4
- package/dist/index225.js +2 -106
- package/dist/index226.js +4 -0
- package/dist/index227.js +19 -99
- package/dist/index228.js +115 -0
- package/dist/index23.js +45 -46
- package/dist/index230.js +88 -0
- package/dist/index232.js +28 -119
- package/dist/index233.js +18 -0
- package/dist/index234.js +17 -228
- package/dist/index235.js +51 -2
- package/dist/index236.js +15 -2
- package/dist/index237.js +3 -2
- package/dist/index238.js +11 -40
- package/dist/index239.js +4 -7
- package/dist/index240.js +193 -11
- package/dist/index242.js +5 -3
- package/dist/index243.js +5 -3
- package/dist/index244.js +6 -32
- package/dist/index245.js +247 -174
- package/dist/index246.js +52 -5
- package/dist/index247.js +44 -5
- package/dist/index248.js +4 -4
- package/dist/index249.js +60 -5
- package/dist/index25.js +155 -224
- package/dist/index250.js +18 -5
- package/dist/index251.js +12 -5
- package/dist/index252.js +6 -5
- package/dist/index253.js +104 -6
- package/dist/index255.js +95 -47
- package/dist/index257.js +228 -5
- package/dist/index258.js +176 -59
- package/dist/index259.js +2 -4
- package/dist/index260.js +3 -11
- package/dist/index261.js +33 -19
- package/dist/index262.js +2 -200
- package/dist/index264.js +3 -5
- package/dist/index265.js +6 -2
- package/dist/index266.js +16 -2
- package/dist/index267.js +3 -6
- package/dist/index268.js +9 -16
- package/dist/index269.js +9 -3
- package/dist/index27.js +1 -1
- package/dist/index270.js +23 -9
- package/dist/index271.js +9 -23
- package/dist/index272.js +8 -9
- package/dist/index273.js +5 -9
- package/dist/index274.js +8 -8
- package/dist/index275.js +2 -67
- package/dist/index276.js +67 -5
- package/dist/index277.js +5 -2
- package/dist/index278.js +4 -5
- package/dist/index279.js +3 -8
- package/dist/index281.js +7 -17
- package/dist/index282.js +7 -28
- package/dist/index283.js +10 -470
- package/dist/index284.js +4 -2
- package/dist/index285.js +3 -7
- package/dist/index286.js +3 -11
- package/dist/index287.js +3 -4
- package/dist/index288.js +17 -4
- package/dist/index289.js +28 -5
- package/dist/index29.js +3 -3
- package/dist/index290.js +278 -198
- package/dist/index291.js +2 -3
- package/dist/index292.js +125 -3
- package/dist/index293.js +2 -3
- package/dist/index294.js +17 -0
- package/dist/index295.js +2 -7
- package/dist/index296.js +16 -3
- package/dist/index297.js +2 -2
- package/dist/index298.js +16 -3
- package/dist/index299.js +2 -280
- package/dist/index300.js +19 -2
- package/dist/index301.js +2 -16
- package/dist/index302.js +19 -2
- package/dist/index303.js +2 -16
- package/dist/index304.js +27 -2
- package/dist/index305.js +2 -19
- package/dist/index306.js +2 -2
- package/dist/index307.js +2 -15
- package/dist/index308.js +2 -2
- package/dist/index309.js +2 -19
- package/dist/index31.js +2 -2
- package/dist/index310.js +22 -2
- package/dist/index312.js +3 -2
- package/dist/index313.js +3 -2
- package/dist/index314.js +1 -1
- package/dist/index315.js +6 -2
- package/dist/index316.js +1 -1
- package/dist/index317.js +5 -22
- package/dist/index318.js +7 -0
- package/dist/index319.js +701 -6
- package/dist/index320.js +354 -125
- package/dist/index321.js +58 -2
- package/dist/index322.js +33 -2
- package/dist/index323.js +28 -5
- package/dist/index325.js +2 -354
- package/dist/index326.js +122 -51
- package/dist/index327.js +369 -2
- package/dist/index328.js +7 -227
- package/dist/index329.js +5 -128
- package/dist/index33.js +8 -8
- package/dist/index330.js +6 -367
- package/dist/index331.js +46 -6
- package/dist/index332.js +6 -18
- package/dist/index333.js +17 -5
- package/dist/index334.js +58 -47
- package/dist/index335.js +58 -8
- package/dist/index336.js +227 -5
- package/dist/index337.js +7 -8
- package/dist/index338.js +92 -57
- package/dist/index340.js +2 -32
- package/dist/index341.js +128 -27
- package/dist/index342.js +438 -0
- package/dist/index343.js +125 -91
- package/dist/index344.js +476 -123
- package/dist/index345.js +40 -429
- package/dist/index35.js +4 -4
- package/dist/index37.js +20 -21
- package/dist/index39.js +5 -5
- 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/index53.js +1 -1
- package/dist/index55.js +1 -1
- package/dist/index57.js +2 -2
- package/dist/index61.js +3 -3
- package/dist/index67.js +1 -1
- package/dist/index73.js +23 -26
- package/dist/index77.js +32 -34
- package/dist/index79.js +18 -19
- package/dist/index81.js +1 -1
- package/dist/index83.js +2 -2
- package/dist/index85.js +1 -1
- package/dist/index87.js +1 -1
- package/dist/index90.js +159 -225
- package/dist/index92.js +2 -2
- package/dist/index94.js +15 -15
- package/dist/index96.js +1 -1
- package/dist/types/CommonProps.d.ts +0 -4
- package/dist/utilities/functions/parseSize.d.ts +2 -0
- package/package.json +2 -3
- package/dist/components/BbTeleport.vue.d.ts +0 -20
- package/dist/index213.js +0 -53
- package/dist/index229.js +0 -68
- package/dist/index231.js +0 -15
- package/dist/index254.js +0 -252
- package/dist/index256.js +0 -46
- package/dist/index280.js +0 -5
- package/dist/index311.js +0 -29
- package/dist/index324.js +0 -703
- package/dist/index339.js +0 -60
- package/dist/index346.js +0 -129
- package/dist/index347.js +0 -484
- package/dist/index349.js +0 -5
- package/dist/index350.js +0 -49
- /package/dist/{index241.js → index263.js} +0 -0
package/dist/index25.js
CHANGED
@@ -1,248 +1,179 @@
|
|
1
|
-
import { defineComponent as
|
2
|
-
import {
|
3
|
-
import { useId as
|
4
|
-
import {
|
5
|
-
import {
|
6
|
-
import {
|
7
|
-
import {
|
8
|
-
import
|
9
|
-
import { useLocale as me } from "./index222.js";
|
10
|
-
import ye from "./index111.js";
|
1
|
+
import { defineComponent as P, mergeModels as D, useModel as q, computed as p, ref as E, watch as A, onMounted as H, createElementBlock as d, openBlock as u, withModifiers as K, normalizeStyle as O, normalizeClass as R, unref as v, createCommentVNode as g, Fragment as U, createElementVNode as l, renderSlot as s, createTextVNode as j, toDisplayString as T, createVNode as G, withCtx as J, nextTick as Q } from "vue";
|
2
|
+
import { parseSize as X } from "./index215.js";
|
3
|
+
import { useId as V } from "./index8.js";
|
4
|
+
import { useLocale as Y } from "./index216.js";
|
5
|
+
import { useMobile as Z } from "./index9.js";
|
6
|
+
import { useUntil as x } from "./index217.js";
|
7
|
+
import { wait as h } from "./index135.js";
|
8
|
+
import ee from "./index111.js";
|
11
9
|
/* empty css */
|
12
|
-
const
|
10
|
+
const oe = ["aria-describedby", "aria-labelledby", "aria-live", "inert"], te = {
|
11
|
+
ref: "header",
|
12
|
+
class: "bb-base-dialog__header"
|
13
|
+
}, le = { class: "bb-base-dialog__close" }, se = ["aria-label", "disabled"], ae = {
|
14
|
+
ref: "body",
|
15
|
+
class: "bb-base-dialog__body scrollbar-border"
|
16
|
+
}, ie = {
|
17
|
+
ref: "footer",
|
18
|
+
class: "bb-base-dialog__footer"
|
19
|
+
}, ve = /* @__PURE__ */ P({
|
13
20
|
__name: "BaseDialog",
|
14
|
-
props: {
|
21
|
+
props: /* @__PURE__ */ D({
|
15
22
|
closeLabel: {},
|
16
23
|
compact: { type: Boolean },
|
17
24
|
disabled: { type: Boolean },
|
18
25
|
eager: { type: Boolean },
|
19
|
-
panelClasses: { default: () => [] },
|
20
|
-
overlayClasses: { default: () => [] },
|
21
26
|
persistent: { type: Boolean },
|
22
27
|
showClose: { type: Boolean, default: !0 },
|
23
28
|
title: {},
|
24
|
-
|
25
|
-
transitionDuration: { default: 200 },
|
29
|
+
transitionDuration: { default: 300 },
|
26
30
|
size: { default: "sm" },
|
27
31
|
description: {},
|
28
32
|
focusTarget: {},
|
29
33
|
fullscreen: { type: [Boolean, String] },
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
/* On esc deactivate the trap, return focus and then close the modal */
|
45
|
-
escapeDeactivates: () => (N(async () => {
|
46
|
-
l.persistent ? (b.value = !0, await g(100), b.value = !1) : u("update:modelValue", !1);
|
47
|
-
}), !l.persistent)
|
48
|
-
}), Q = se(), { t: X } = me(), Y = i(
|
49
|
-
() => l.closeLabel || X("dialog.closeLabel").value
|
50
|
-
);
|
51
|
-
ne(async () => {
|
52
|
-
!l.modelValue && !n.value || T && !globalThis.document || S();
|
53
|
-
});
|
54
|
-
const v = a(!1), c = a(!1), C = a(!0), f = a(!1), n = a(l.eager || l.modelValue), L = i(() => c.value || f.value), Z = () => {
|
55
|
-
if (!globalThis.document) return;
|
56
|
-
const e = window.innerWidth - document.documentElement.clientWidth;
|
57
|
-
document.body.style.overflow = "hidden", document.body.style.paddingRight = `${e}px`;
|
58
|
-
}, z = () => {
|
59
|
-
globalThis.document && (document.body.style.overflow = "auto", document.body.style.paddingRight = "0px");
|
60
|
-
};
|
61
|
-
ie(() => {
|
62
|
-
if (l.modelValue) {
|
63
|
-
const { openedModals: e, modalHasClosed: t } = h();
|
64
|
-
e.value && (t(), p.value = 0, z());
|
65
|
-
}
|
66
|
-
});
|
67
|
-
const S = async () => {
|
68
|
-
if (l.modelValue) {
|
69
|
-
n.value || (n.value = !0, await be(() => !!$.value), await N()), C.value = !1, f.value = !1, c.value = !0;
|
70
|
-
const { modalHasOpened: e, openedModals: t } = h();
|
71
|
-
e(), p.value = t.value, Z(), await g(l.transitionDuration), c.value = !1, v.value = !0, u("shown"), J();
|
72
|
-
} else {
|
73
|
-
D(), c.value = !1, v.value = !1, f.value = !0, await g(l.transitionDuration), f.value = !1, C.value = !0;
|
74
|
-
const { modalHasClosed: e, openedModals: t } = h();
|
75
|
-
e(), p.value = 0, t.value || z(), u("hidden");
|
34
|
+
panelClasses: { default: () => [] },
|
35
|
+
overlayClasses: { default: () => [] }
|
36
|
+
}, {
|
37
|
+
modelValue: { type: Boolean, default: !1 },
|
38
|
+
modelModifiers: {}
|
39
|
+
}),
|
40
|
+
emits: /* @__PURE__ */ D(["shown", "hidden"], ["update:modelValue"]),
|
41
|
+
setup(y, { emit: S }) {
|
42
|
+
const o = y, w = S, t = q(y, "modelValue"), { t: z } = Y(), N = p(
|
43
|
+
() => o.closeLabel || z("dialog.closeLabel").value
|
44
|
+
), n = E(null), c = x(
|
45
|
+
() => t.value || o.eager,
|
46
|
+
{
|
47
|
+
initialValue: t.value || o.eager
|
76
48
|
}
|
49
|
+
), b = `title_${V().id.value}`, f = `description_${V().id.value}`, C = (e) => {
|
50
|
+
if (e.key === "Escape" && (o.disabled || o.persistent))
|
51
|
+
return e.preventDefault(), a.value = !0, h(200).then(() => {
|
52
|
+
a.value = !1;
|
53
|
+
}), !1;
|
54
|
+
}, _ = async (e) => {
|
55
|
+
var i, B, L, M;
|
56
|
+
e ? ((i = window.globalThis) != null && i.document && !document.documentElement.style.getPropertyValue("--scrollbar-width") && (document.documentElement.style.setProperty(
|
57
|
+
"--scrollbar-width",
|
58
|
+
`${I()}px`
|
59
|
+
), document.addEventListener("keydown", C)), (B = n.value) == null || B.showModal(), o.focusTarget && Q(() => {
|
60
|
+
var $;
|
61
|
+
const m = ($ = n.value) == null ? void 0 : $.querySelector(o.focusTarget);
|
62
|
+
m && m instanceof HTMLElement && m.focus();
|
63
|
+
}), w("shown")) : (await h(o.transitionDuration), (L = window.globalThis) != null && L.document && document.removeEventListener("keydown", C), (M = n.value) == null || M.close(), w("hidden"));
|
77
64
|
};
|
78
|
-
|
79
|
-
()
|
80
|
-
() => {
|
81
|
-
!l.modelValue && !n.value || T && !globalThis.document || S();
|
82
|
-
},
|
83
|
-
{ flush: "post" }
|
84
|
-
);
|
85
|
-
const m = (e) => {
|
86
|
-
e.target === d.value && e.preventDefault();
|
87
|
-
}, b = a(!1), ee = async (e) => {
|
88
|
-
l.disabled || L.value || d.value && e.target === d.value && (l.persistent ? k.value && (b.value = !0, await g(100), b.value = !1) : u("update:modelValue", !1));
|
89
|
-
}, x = () => {
|
90
|
-
l.disabled || L.value || (D(), u("update:modelValue", !1));
|
91
|
-
}, le = i(() => {
|
92
|
-
const e = [
|
93
|
-
{
|
94
|
-
"bb-base-dialog bb-base-dialog__overlay": !0,
|
95
|
-
"bb-base-dialog--fullscreen": M.value,
|
96
|
-
"bb-base-dialog--faded": !G.value,
|
97
|
-
"bb-base-dialog--open": v.value,
|
98
|
-
"bb-base-dialog--opening": c.value,
|
99
|
-
"bb-base-dialog--closed": C.value,
|
100
|
-
"bb-base-dialog--closing": f.value,
|
101
|
-
"bb-base-dialog--attempted-closing": b.value
|
102
|
-
},
|
103
|
-
l.overlayClasses
|
104
|
-
].flat(), t = {
|
105
|
-
onClick: ee,
|
106
|
-
onScroll: m,
|
107
|
-
onTouchmove: m,
|
108
|
-
onWheel: m,
|
109
|
-
onKeydown: m
|
110
|
-
}, s = {
|
111
|
-
"--transition-duration": l.transitionDuration / 1e3 + "s"
|
112
|
-
};
|
113
|
-
return {
|
114
|
-
class: e,
|
115
|
-
style: s,
|
116
|
-
...t,
|
117
|
-
...Q
|
118
|
-
};
|
119
|
-
}), te = i(() => {
|
120
|
-
const e = [
|
121
|
-
{
|
122
|
-
"bb-base-dialog__panel": !0,
|
123
|
-
"bb-base-dialog__panel--compact": l.compact
|
124
|
-
},
|
125
|
-
l.panelClasses
|
126
|
-
].flat(), t = {
|
127
|
-
role: "dialog",
|
128
|
-
"aria-modal": !0,
|
129
|
-
"aria-live": v.value ? "polite" : "off"
|
130
|
-
};
|
131
|
-
n.value && (l.title && (t["aria-labelledby"] = _), l.description && (t["aria-describedby"] = w));
|
132
|
-
let s;
|
133
|
-
const I = {
|
134
|
-
sm: 384,
|
135
|
-
md: 652,
|
136
|
-
lg: 896
|
137
|
-
};
|
138
|
-
return M.value ? s = "100%" : typeof l.size == "number" ? s = l.size + "px" : l.size in I ? s = I[l.size] + "px" : s = l.size + "px", {
|
139
|
-
class: e,
|
140
|
-
style: {
|
141
|
-
maxWidth: s
|
142
|
-
},
|
143
|
-
...t
|
144
|
-
};
|
65
|
+
A(t, _), H(() => {
|
66
|
+
t.value && _(!0);
|
145
67
|
});
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
68
|
+
const W = p(() => k.value ? "100%" : X(o.size, {
|
69
|
+
sm: 384,
|
70
|
+
md: 652,
|
71
|
+
lg: 896
|
72
|
+
})), r = (e) => {
|
73
|
+
if (e.preventDefault(), o.disabled || o.persistent)
|
74
|
+
return a.value = !0, h(300).then(() => {
|
75
|
+
a.value = !1;
|
76
|
+
}), !1;
|
77
|
+
t.value = !1;
|
78
|
+
}, a = E(!1), I = () => globalThis.document ? window.innerWidth - document.documentElement.clientWidth : 0, { isMobile: F } = Z(), k = p(
|
79
|
+
() => o.fullscreen === !0 || o.fullscreen === "mobile" && F.value
|
80
|
+
);
|
81
|
+
return (e, i) => (u(), d("dialog", {
|
82
|
+
ref_key: "dialog",
|
83
|
+
ref: n,
|
84
|
+
"aria-describedby": v(c) && e.description ? f : void 0,
|
85
|
+
"aria-labelledby": v(c) && e.title ? b : void 0,
|
86
|
+
"aria-live": t.value ? "polite" : "off",
|
87
|
+
class: R([
|
88
|
+
"bb-base-dialog",
|
89
|
+
[
|
90
|
+
{
|
91
|
+
"bb-base-dialog--open": t.value,
|
92
|
+
"bb-base-dialog--fullscreen": k.value,
|
93
|
+
"bb-base-dialog--compact": e.compact,
|
94
|
+
"bb-base-dialog--deny-close": a.value
|
95
|
+
},
|
96
|
+
e.overlayClasses,
|
97
|
+
e.panelClasses
|
98
|
+
].flat()
|
99
|
+
]),
|
100
|
+
inert: !t.value,
|
101
|
+
style: O({
|
102
|
+
"--max-width": W.value,
|
103
|
+
"--transition-duration": `${o.transitionDuration}ms`
|
104
|
+
}),
|
105
|
+
onCancel: r,
|
106
|
+
onClick: K(r, ["self"])
|
107
|
+
}, [
|
108
|
+
v(c) ? (u(), d(U, { key: 0 }, [
|
109
|
+
l("div", te, [
|
110
|
+
s(e.$slots, "header", {
|
111
|
+
close: r,
|
112
|
+
title: e.title,
|
113
|
+
titleId: b
|
114
|
+
}, () => [
|
115
|
+
l("span", {
|
116
|
+
id: b,
|
117
|
+
class: "bb-base-dialog__title"
|
161
118
|
}, [
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
119
|
+
s(e.$slots, "title", { text: e.title }, () => [
|
120
|
+
j(T(e.title), 1)
|
121
|
+
])
|
122
|
+
]),
|
123
|
+
l("span", le, [
|
124
|
+
e.showClose ? (u(), d("button", {
|
125
|
+
key: 0,
|
126
|
+
"aria-label": N.value,
|
127
|
+
disabled: o.disabled,
|
128
|
+
type: "button",
|
129
|
+
onClick: r
|
166
130
|
}, [
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
class: "bb-base-dialog__title"
|
175
|
-
}, [
|
176
|
-
r(e.$slots, "title", { text: e.title }, () => [
|
177
|
-
de(E(e.title), 1)
|
178
|
-
])
|
179
|
-
]),
|
180
|
-
o("span", ge, [
|
181
|
-
e.showClose ? (y(), B("button", {
|
182
|
-
key: 0,
|
183
|
-
"aria-label": Y.value,
|
184
|
-
type: "button",
|
185
|
-
onClick: x
|
131
|
+
s(e.$slots, "close", {}, () => [
|
132
|
+
i[0] || (i[0] = l("span", { class: "bb-base-dialog__close-icon" }, [
|
133
|
+
l("svg", {
|
134
|
+
"aria-hidden": "true",
|
135
|
+
fill: "none",
|
136
|
+
viewBox: "0 0 24 24",
|
137
|
+
xmlns: "http://www.w3.org/2000/svg"
|
186
138
|
}, [
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
o("path", {
|
196
|
-
d: "M23 23L1 1M23 1L1 23",
|
197
|
-
stroke: "currentColor",
|
198
|
-
"stroke-linecap": "round",
|
199
|
-
"stroke-width": "3"
|
200
|
-
})
|
201
|
-
])
|
202
|
-
], -1))
|
203
|
-
])
|
204
|
-
], 8, he)) : V("", !0)
|
205
|
-
])
|
139
|
+
l("path", {
|
140
|
+
d: "M23 23L1 1M23 1L1 23",
|
141
|
+
stroke: "currentColor",
|
142
|
+
"stroke-linecap": "round",
|
143
|
+
"stroke-width": "3"
|
144
|
+
})
|
145
|
+
])
|
146
|
+
], -1))
|
206
147
|
])
|
207
|
-
],
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
class: "bb-base-dialog__footer"
|
235
|
-
}, [
|
236
|
-
r(e.$slots, "footer")
|
237
|
-
], 512)
|
238
|
-
], 512)) : V("", !0)
|
239
|
-
], 16)
|
240
|
-
], 16)
|
241
|
-
]),
|
242
|
-
_: 3
|
243
|
-
}));
|
148
|
+
], 8, se)) : g("", !0)
|
149
|
+
])
|
150
|
+
])
|
151
|
+
], 512),
|
152
|
+
l("div", ae, [
|
153
|
+
s(e.$slots, "description", {
|
154
|
+
descriptionId: f,
|
155
|
+
text: e.description
|
156
|
+
}, () => [
|
157
|
+
e.description ? (u(), d("div", {
|
158
|
+
key: 0,
|
159
|
+
id: f,
|
160
|
+
class: "bb-base-dialog__description sr-only"
|
161
|
+
}, T(e.description), 1)) : g("", !0)
|
162
|
+
]),
|
163
|
+
G(ee, { "transition-duration": 500 }, {
|
164
|
+
default: J(() => [
|
165
|
+
s(e.$slots, "default")
|
166
|
+
]),
|
167
|
+
_: 3
|
168
|
+
})
|
169
|
+
], 512),
|
170
|
+
l("div", ie, [
|
171
|
+
s(e.$slots, "footer")
|
172
|
+
], 512)
|
173
|
+
], 64)) : g("", !0)
|
174
|
+
], 46, oe));
|
244
175
|
}
|
245
176
|
});
|
246
177
|
export {
|
247
|
-
|
178
|
+
ve as default
|
248
179
|
};
|
package/dist/index250.js
CHANGED
@@ -1,7 +1,20 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
import { isNil as c } from "./index259.js";
|
2
|
+
const a = (t, r) => {
|
3
|
+
if (!Object.prototype.hasOwnProperty.call(t, r))
|
4
|
+
throw new Error(
|
5
|
+
`Object ${JSON.stringify(t, null, 2)} has no property named "${r.toString()}"`
|
6
|
+
);
|
7
|
+
}, l = (t) => typeof t == "string" ? t.toLocaleLowerCase() : JSON.stringify(t).toLowerCase(), y = (t, r, s) => {
|
8
|
+
const i = s.toLocaleLowerCase();
|
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;
|
15
|
+
}
|
16
|
+
return !1;
|
17
|
+
};
|
5
18
|
export {
|
6
|
-
|
19
|
+
y as matchAnyKey
|
7
20
|
};
|
package/dist/index251.js
CHANGED
@@ -1,7 +1,14 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
import { ref as t } from "vue";
|
2
|
+
const n = () => {
|
3
|
+
const e = t([]);
|
4
|
+
return { array: e, set: (...r) => {
|
5
|
+
e.value = r;
|
6
|
+
}, add: (...r) => {
|
7
|
+
e.value.push(...r);
|
8
|
+
}, remove: (r) => {
|
9
|
+
e.value = e.value.filter(r);
|
10
|
+
} };
|
11
|
+
};
|
5
12
|
export {
|
6
|
-
|
13
|
+
n as useArray
|
7
14
|
};
|
package/dist/index252.js
CHANGED
@@ -1,7 +1,8 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
const o = (e, t = 50) => new Promise((r) => {
|
2
|
+
const n = setInterval(() => {
|
3
|
+
e() && (clearInterval(n), r());
|
4
|
+
}, t);
|
5
|
+
});
|
5
6
|
export {
|
6
|
-
|
7
|
+
o as waitFor
|
7
8
|
};
|
package/dist/index253.js
CHANGED
@@ -1,10 +1,108 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
import { defineComponent as y, ref as F, computed as H, watch as N, createElementBlock as L, openBlock as p, Fragment as S, renderList as V, createBlock as A, withModifiers as O, normalizeClass as P, withCtx as $, createTextVNode as z, toDisplayString as D } from "vue";
|
2
|
+
import { hash as d } from "./index237.js";
|
3
|
+
import { isNil as l } from "./index259.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));
|
6
104
|
}
|
7
105
|
});
|
8
106
|
export {
|
9
|
-
|
107
|
+
K as default
|
10
108
|
};
|