bitboss-ui 2.0.157 → 2.0.159
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/BaseDialog/BaseDialog.vue.d.ts +2 -2
- package/dist/components/BaseTextInput/BaseTextInput.vue.d.ts +13 -0
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +3 -3
- package/dist/components/BbPopover/BbPopover.vue.d.ts +1 -1
- package/dist/components/BbSmoothHeight/BbSmoothHeight.vue.d.ts +2 -2
- package/dist/components/BbTextInput/BbTextInput.vue.d.ts +14 -0
- package/dist/components/BbTooltip/BbTooltip.vue.d.ts +1 -1
- package/dist/index100.js +3 -3
- package/dist/index111.js +6 -6
- package/dist/index117.js +26 -20
- package/dist/index119.js +1 -1
- package/dist/index121.js +6 -6
- package/dist/index123.js +1 -1
- package/dist/index125.js +1 -1
- package/dist/index127.js +1 -1
- package/dist/index128.js +13 -13
- package/dist/index129.js +1 -1
- package/dist/index13.js +1 -1
- package/dist/index131.js +1 -1
- package/dist/index133.js +1 -1
- package/dist/index15.js +8 -8
- package/dist/index17.js +3 -3
- package/dist/index207.js +4 -2
- package/dist/index208.js +41 -2
- package/dist/index209.js +20 -2
- package/dist/index21.js +15 -15
- package/dist/index210.js +94 -4
- package/dist/index212.js +200 -3
- package/dist/index214.js +65 -5
- package/dist/index216.js +13 -8
- package/dist/index217.js +12 -14
- package/dist/index218.js +2 -13
- package/dist/index219.js +1 -1
- package/dist/index223.js +3 -3
- package/dist/index224.js +1 -1
- package/dist/index225.js +1 -1
- package/dist/index228.js +5 -66
- package/dist/index229.js +18 -0
- package/dist/index23.js +16 -16
- package/dist/index230.js +16 -13
- package/dist/index231.js +19 -5
- package/dist/index232.js +14 -124
- package/dist/index233.js +16 -13
- package/dist/index234.js +24 -13
- package/dist/index235.js +2 -19
- package/dist/index236.js +8 -15
- package/dist/index237.js +250 -2
- package/dist/index238.js +52 -2
- package/dist/index239.js +43 -19
- package/dist/index240.js +5 -94
- package/dist/index241.js +62 -0
- package/dist/index242.js +3 -2
- package/dist/index243.js +6 -4
- package/dist/index244.js +7 -200
- package/dist/index245.js +17 -0
- package/dist/index246.js +34 -19
- package/dist/index247.js +121 -23
- package/dist/index248.js +2 -250
- package/dist/index249.js +2 -52
- package/dist/index25.js +107 -128
- package/dist/index250.js +2 -44
- package/dist/index251.js +4 -5
- package/dist/index252.js +2 -60
- package/dist/index253.js +2 -3
- package/dist/index254.js +102 -30
- package/dist/index256.js +100 -2
- package/dist/index258.js +20 -0
- package/dist/index259.js +124 -98
- package/dist/index260.js +14 -0
- package/dist/index261.js +227 -17
- package/dist/index262.js +353 -110
- package/dist/index263.js +2 -12
- package/dist/index264.js +2 -228
- package/dist/index265.js +162 -355
- package/dist/index268.js +6 -9
- package/dist/index269.js +16 -23
- package/dist/index27.js +1 -1
- package/dist/index270.js +3 -6
- package/dist/index271.js +8 -15
- package/dist/index272.js +23 -9
- package/dist/index273.js +430 -3
- package/dist/index274.js +3 -431
- package/dist/index275.js +3 -2
- package/dist/index276.js +3 -89
- package/dist/index278.js +7 -11
- package/dist/index279.js +7 -3
- package/dist/index280.js +11 -17
- package/dist/index281.js +3 -9
- package/dist/index282.js +14 -25
- package/dist/index283.js +8 -199
- package/dist/index284.js +28 -3
- package/dist/index285.js +202 -0
- package/dist/index286.js +281 -7
- package/dist/index287.js +5 -280
- package/dist/index288.js +2 -6
- package/dist/index289.js +2 -2
- package/dist/index29.js +3 -3
- package/dist/index290.js +2 -2
- package/dist/index295.js +2 -176
- package/dist/index296.js +2 -3
- package/dist/index297.js +2 -3
- package/dist/index298.js +2 -8
- package/dist/index299.js +22 -2
- package/dist/index301.js +224 -2
- package/dist/index302.js +1 -1
- package/dist/index303.js +1 -1
- package/dist/index304.js +2 -2
- package/dist/index305.js +9 -22
- package/dist/index306.js +10 -0
- package/dist/index307.js +4 -224
- package/dist/index308.js +3 -2
- package/dist/index309.js +1 -1
- package/dist/index31.js +2 -2
- package/dist/index310.js +126 -3
- package/dist/index311.js +2 -126
- package/dist/index312.js +436 -2
- package/dist/index313.js +113 -422
- package/dist/index314.js +7 -126
- package/dist/index315.js +6 -3
- package/dist/index316.js +8 -3
- package/dist/index317.js +5 -58
- package/dist/index318.js +1 -1
- package/dist/index319.js +1 -1
- package/dist/index320.js +1 -1
- package/dist/index321.js +480 -2
- package/dist/index322.js +2 -5
- package/dist/index323.js +7 -58
- package/dist/index324.js +33 -33
- package/dist/index325.js +57 -32
- package/dist/index326.js +33 -28
- package/dist/index327.js +30 -0
- package/dist/index329.js +4 -480
- package/dist/index330.js +6 -7
- package/dist/index331.js +18 -5
- package/dist/index332.js +3 -8
- package/dist/index333.js +3 -7
- package/dist/index334.js +56 -17
- package/dist/index335.js +88 -6
- package/dist/index339.js +1 -1
- package/dist/index35.js +4 -4
- package/dist/index37.js +15 -15
- package/dist/index39.js +4 -4
- package/dist/index41.js +2 -2
- package/dist/index45.js +6 -6
- package/dist/index47.js +2 -2
- package/dist/index49.js +79 -40
- package/dist/index53.js +1 -1
- package/dist/index55.js +1 -1
- package/dist/index57.js +2 -2
- package/dist/index61.js +1 -1
- package/dist/index75.js +3 -3
- package/dist/index77.js +1 -1
- package/dist/index79.js +2 -2
- package/dist/index81.js +1 -1
- package/dist/index84.js +4 -4
- package/dist/index86.js +2 -2
- package/dist/index88.js +4 -4
- package/dist/index90.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/index211.js +0 -4
- package/dist/index213.js +0 -43
- package/dist/index215.js +0 -9
- package/dist/index255.js +0 -4
- package/dist/index257.js +0 -108
- package/dist/index277.js +0 -9
- package/dist/index300.js +0 -4
- package/dist/index328.js +0 -6
package/dist/index25.js
CHANGED
@@ -1,15 +1,15 @@
|
|
1
|
-
import { defineComponent as
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import {
|
5
|
-
import {
|
6
|
-
import {
|
7
|
-
import {
|
8
|
-
import
|
9
|
-
import {
|
10
|
-
import
|
11
|
-
|
12
|
-
const
|
1
|
+
import { defineComponent as oe, ref as o, computed as i, getCurrentInstance as ae, nextTick as N, useAttrs as se, onMounted as ne, onBeforeUnmount as ie, watch as re, openBlock as m, createBlock as ue, withCtx as W, createElementVNode as a, mergeProps as F, createElementBlock as C, renderSlot as r, createTextVNode as de, toDisplayString as E, createCommentVNode as B, createVNode as ce } from "vue";
|
2
|
+
import { useFocusTrap as fe } from "./index208.js";
|
3
|
+
import { useId as H } from "./index8.js";
|
4
|
+
import { wait as V } from "./index130.js";
|
5
|
+
import { waitFor as be } from "./index243.js";
|
6
|
+
import { useModalsState as y } from "./index244.js";
|
7
|
+
import { useMobile as pe } from "./index9.js";
|
8
|
+
import ve from "./index245.js";
|
9
|
+
import { useLocale as me } from "./index217.js";
|
10
|
+
import ye from "./index128.js";
|
11
|
+
/* empty css */
|
12
|
+
const ge = { class: "bb-base-dialog-close" }, he = ["aria-label"], Se = /* @__PURE__ */ oe({
|
13
13
|
__name: "BaseDialog",
|
14
14
|
props: {
|
15
15
|
closeLabel: {},
|
@@ -30,95 +30,93 @@ const _e = { class: "bb-base-dialog-close" }, Ce = ["aria-label"], Ae = /* @__PU
|
|
30
30
|
modelValue: { type: [Boolean, null] }
|
31
31
|
},
|
32
32
|
emits: ["shown", "hidden", "update:modelValue"],
|
33
|
-
setup(
|
34
|
-
var
|
35
|
-
const l =
|
36
|
-
() => l.fullscreen === !0 || l.fullscreen === "mobile" &&
|
37
|
-
),
|
38
|
-
const { openedModals: e } =
|
39
|
-
return e.value && e.value ===
|
40
|
-
}), { activate:
|
33
|
+
setup(R, { emit: K }) {
|
34
|
+
var O, A;
|
35
|
+
const l = R, u = K, g = `title_${H().id.value}`, h = `description_${H().id.value}`, { isMobile: P } = pe(), d = o(null), _ = o(null), U = o(null), j = o(null), $ = o(null), q = o(null), M = i(
|
36
|
+
() => l.fullscreen === !0 || l.fullscreen === "mobile" && P.value
|
37
|
+
), T = !!((A = (O = ae()) == null ? void 0 : O.proxy) != null && A.$nuxt), b = o(0), G = i(() => {
|
38
|
+
const { openedModals: e } = y();
|
39
|
+
return e.value && e.value === b.value;
|
40
|
+
}), { activate: J, deactivate: D } = fe(_, {
|
41
41
|
initialFocus: l.focusTarget ?? void 0,
|
42
|
-
clickOutsideDeactivates: (e) => e.target ===
|
42
|
+
clickOutsideDeactivates: (e) => e.target === d.value,
|
43
43
|
allowOutsideClick: !0,
|
44
44
|
/* On esc deactivate the trap, return focus and then close the modal */
|
45
|
-
escapeDeactivates: () => (
|
46
|
-
|
45
|
+
escapeDeactivates: () => (N(() => {
|
46
|
+
u("update:modelValue", !1);
|
47
47
|
}), !0)
|
48
|
-
}),
|
49
|
-
() => l.closeLabel ||
|
48
|
+
}), Q = se(), { t: X } = me(), Y = i(
|
49
|
+
() => l.closeLabel || X("dialog.closeLabel").value
|
50
50
|
);
|
51
|
-
|
52
|
-
|
53
|
-
}), P(() => {
|
54
|
-
window.removeEventListener("resize", r);
|
51
|
+
ne(async () => {
|
52
|
+
!l.modelValue && !n.value || T && !globalThis.document || S();
|
55
53
|
});
|
56
|
-
const
|
54
|
+
const p = o(!1), c = o(!1), w = o(!0), f = o(!1), n = o(l.eager || l.modelValue), L = i(() => c.value || f.value), Z = () => {
|
57
55
|
if (!globalThis.document) return;
|
58
56
|
const e = window.innerWidth - document.documentElement.clientWidth;
|
59
57
|
document.body.style.overflow = "hidden", document.body.style.paddingRight = `${e}px`;
|
60
|
-
},
|
58
|
+
}, z = () => {
|
61
59
|
globalThis.document && (document.body.style.overflow = "auto", document.body.style.paddingRight = "0px");
|
62
60
|
};
|
63
|
-
|
61
|
+
ie(() => {
|
64
62
|
if (l.modelValue) {
|
65
|
-
const { openedModals: e, modalHasClosed: t } =
|
66
|
-
e.value && (t(),
|
63
|
+
const { openedModals: e, modalHasClosed: t } = y();
|
64
|
+
e.value && (t(), b.value = 0, z());
|
67
65
|
}
|
68
66
|
});
|
69
|
-
const
|
67
|
+
const S = async () => {
|
70
68
|
if (l.modelValue) {
|
71
|
-
n.value || (n.value = !0, await
|
72
|
-
const { modalHasOpened: e, openedModals: t } =
|
73
|
-
e(),
|
69
|
+
n.value || (n.value = !0, await be(() => !!$.value), await N()), w.value = !1, f.value = !1, c.value = !0;
|
70
|
+
const { modalHasOpened: e, openedModals: t } = y();
|
71
|
+
e(), b.value = t.value, Z(), await V(l.transitionDuration), c.value = !1, p.value = !0, u("shown"), J();
|
74
72
|
} else {
|
75
|
-
|
76
|
-
const { modalHasClosed: e, openedModals: t } =
|
77
|
-
e(),
|
73
|
+
D(), c.value = !1, p.value = !1, f.value = !0, await V(l.transitionDuration), f.value = !1, w.value = !0;
|
74
|
+
const { modalHasClosed: e, openedModals: t } = y();
|
75
|
+
e(), b.value = 0, t.value || z(), u("hidden");
|
78
76
|
}
|
79
77
|
};
|
80
|
-
|
78
|
+
re(
|
81
79
|
() => l.modelValue,
|
82
80
|
() => {
|
83
|
-
!l.modelValue && !n.value ||
|
81
|
+
!l.modelValue && !n.value || T && !globalThis.document || S();
|
84
82
|
},
|
85
83
|
{ flush: "post" }
|
86
84
|
);
|
87
|
-
const
|
88
|
-
e.target ===
|
89
|
-
},
|
90
|
-
l.disabled ||
|
91
|
-
},
|
92
|
-
l.disabled ||
|
93
|
-
},
|
85
|
+
const v = (e) => {
|
86
|
+
e.target === d.value && e.preventDefault();
|
87
|
+
}, k = o(!1), ee = async (e) => {
|
88
|
+
l.disabled || L.value || d.value && e.target === d.value && (l.persistent ? _.value && (k.value = !0, await V(100), k.value = !1) : u("update:modelValue", !1));
|
89
|
+
}, x = () => {
|
90
|
+
l.disabled || L.value || (D(), u("update:modelValue", !1));
|
91
|
+
}, le = i(() => {
|
94
92
|
const e = [
|
95
93
|
{
|
96
94
|
"bb-base-dialog bb-base-dialog__overlay": !0,
|
97
|
-
"bb-base-dialog--fullscreen":
|
98
|
-
"bb-base-dialog--faded": !
|
99
|
-
"bb-base-dialog--open":
|
100
|
-
"bb-base-dialog--opening":
|
101
|
-
"bb-base-dialog--closed":
|
102
|
-
"bb-base-dialog--closing":
|
103
|
-
"bb-base-dialog--attempted-closing":
|
95
|
+
"bb-base-dialog--fullscreen": M.value,
|
96
|
+
"bb-base-dialog--faded": !G.value,
|
97
|
+
"bb-base-dialog--open": p.value,
|
98
|
+
"bb-base-dialog--opening": c.value,
|
99
|
+
"bb-base-dialog--closed": w.value,
|
100
|
+
"bb-base-dialog--closing": f.value,
|
101
|
+
"bb-base-dialog--attempted-closing": k.value
|
104
102
|
},
|
105
103
|
l.overlayClasses
|
106
104
|
].flat(), t = {
|
107
|
-
onClick:
|
108
|
-
onScroll:
|
109
|
-
onTouchmove:
|
110
|
-
onWheel:
|
111
|
-
onKeydown:
|
112
|
-
},
|
105
|
+
onClick: ee,
|
106
|
+
onScroll: v,
|
107
|
+
onTouchmove: v,
|
108
|
+
onWheel: v,
|
109
|
+
onKeydown: v
|
110
|
+
}, s = {
|
113
111
|
"--transition-duration": l.transitionDuration / 1e3 + "s"
|
114
112
|
};
|
115
113
|
return {
|
116
114
|
class: e,
|
117
|
-
style:
|
115
|
+
style: s,
|
118
116
|
...t,
|
119
|
-
...
|
117
|
+
...Q
|
120
118
|
};
|
121
|
-
}),
|
119
|
+
}), te = i(() => {
|
122
120
|
const e = [
|
123
121
|
{
|
124
122
|
"bb-base-dialog__panel": !0,
|
@@ -128,89 +126,65 @@ const _e = { class: "bb-base-dialog-close" }, Ce = ["aria-label"], Ae = /* @__PU
|
|
128
126
|
].flat(), t = {
|
129
127
|
role: "dialog",
|
130
128
|
"aria-modal": !0,
|
131
|
-
"aria-live":
|
129
|
+
"aria-live": p.value ? "polite" : "off"
|
132
130
|
};
|
133
|
-
n.value && (l.title && (t["aria-labelledby"] =
|
134
|
-
let
|
135
|
-
const
|
131
|
+
n.value && (l.title && (t["aria-labelledby"] = g), l.description && (t["aria-describedby"] = h));
|
132
|
+
let s;
|
133
|
+
const I = {
|
136
134
|
sm: 384,
|
137
135
|
md: 652,
|
138
136
|
lg: 896
|
139
137
|
};
|
140
|
-
return
|
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", {
|
141
139
|
class: e,
|
142
140
|
style: {
|
143
|
-
maxWidth:
|
141
|
+
maxWidth: s
|
144
142
|
},
|
145
143
|
...t
|
146
144
|
};
|
147
145
|
});
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
if (R++, R === 100) {
|
152
|
-
const { error: e } = ye();
|
153
|
-
e(
|
154
|
-
"Dialog is updating its height too often. Please check the content is reliably sized."
|
155
|
-
);
|
156
|
-
}
|
157
|
-
if (l.fullscreen) {
|
158
|
-
X.value = window.innerHeight;
|
159
|
-
return;
|
160
|
-
}
|
161
|
-
if (f.value && s.value && b.value) {
|
162
|
-
const e = f.value.scrollHeight + s.value.scrollHeight + b.value.scrollHeight + 2;
|
163
|
-
if (y.value && (y.value.style.height = "0px", y.value.style.height = `${e + 2}px`, await C(30), f.value && s.value && b.value)) {
|
164
|
-
const t = f.value.scrollHeight + s.value.scrollHeight + b.value.scrollHeight + 2;
|
165
|
-
e !== t && r();
|
166
|
-
}
|
167
|
-
}
|
168
|
-
},
|
169
|
-
200,
|
170
|
-
{ trailing: !0 }
|
171
|
-
);
|
172
|
-
return (e, t) => (_(), ve(we, null, {
|
173
|
-
default: fe(() => [
|
174
|
-
a("div", K(se.value, {
|
146
|
+
return (e, t) => (m(), ue(ve, null, {
|
147
|
+
default: W(() => [
|
148
|
+
a("div", F(le.value, {
|
175
149
|
ref_key: "overlay",
|
176
|
-
ref:
|
150
|
+
ref: d
|
177
151
|
}), [
|
178
|
-
a("div",
|
152
|
+
a("div", F(te.value, {
|
179
153
|
ref_key: "panel",
|
180
|
-
ref:
|
154
|
+
ref: _
|
181
155
|
}), [
|
182
|
-
n.value ? (
|
156
|
+
n.value ? (m(), C("div", {
|
183
157
|
key: 0,
|
184
158
|
ref_key: "content",
|
185
|
-
ref:
|
159
|
+
ref: U,
|
186
160
|
class: "bb-base-dialog__content"
|
187
161
|
}, [
|
188
162
|
a("div", {
|
189
163
|
ref_key: "header",
|
190
|
-
ref:
|
164
|
+
ref: j,
|
191
165
|
class: "bb-base-dialog__header"
|
192
166
|
}, [
|
193
|
-
|
194
|
-
close:
|
167
|
+
r(e.$slots, "header", {
|
168
|
+
close: x,
|
195
169
|
title: e.title,
|
196
|
-
titleId:
|
170
|
+
titleId: g
|
197
171
|
}, () => [
|
198
172
|
a("span", {
|
199
|
-
id:
|
173
|
+
id: g,
|
200
174
|
class: "bb-base-dialog__title"
|
201
175
|
}, [
|
202
|
-
|
203
|
-
|
176
|
+
r(e.$slots, "title", { text: e.title }, () => [
|
177
|
+
de(E(e.title), 1)
|
204
178
|
])
|
205
179
|
]),
|
206
|
-
a("span",
|
207
|
-
e.showClose ? (
|
180
|
+
a("span", ge, [
|
181
|
+
e.showClose ? (m(), C("button", {
|
208
182
|
key: 0,
|
209
|
-
"aria-label":
|
183
|
+
"aria-label": Y.value,
|
210
184
|
type: "button",
|
211
|
-
onClick:
|
185
|
+
onClick: x
|
212
186
|
}, [
|
213
|
-
|
187
|
+
r(e.$slots, "close", {}, () => [
|
214
188
|
t[0] || (t[0] = a("span", { class: "bb-base-dialog-close__icon" }, [
|
215
189
|
a("svg", {
|
216
190
|
"aria-hidden": "true",
|
@@ -227,36 +201,41 @@ const _e = { class: "bb-base-dialog-close" }, Ce = ["aria-label"], Ae = /* @__PU
|
|
227
201
|
])
|
228
202
|
], -1))
|
229
203
|
])
|
230
|
-
], 8,
|
204
|
+
], 8, he)) : B("", !0)
|
231
205
|
])
|
232
206
|
])
|
233
207
|
], 512),
|
234
208
|
a("div", {
|
235
209
|
ref_key: "body",
|
236
|
-
ref:
|
210
|
+
ref: $,
|
237
211
|
class: "bb-base-dialog__body scrollbar-border"
|
238
212
|
}, [
|
239
|
-
|
240
|
-
descriptionId:
|
213
|
+
r(e.$slots, "description", {
|
214
|
+
descriptionId: h,
|
241
215
|
text: e.description
|
242
216
|
}, () => [
|
243
|
-
e.description ? (
|
217
|
+
e.description ? (m(), C("div", {
|
244
218
|
key: 0,
|
245
|
-
id:
|
219
|
+
id: h,
|
246
220
|
class: "bb-base-dialog__description sr-only"
|
247
|
-
},
|
221
|
+
}, E(e.description), 1)) : B("", !0)
|
248
222
|
]),
|
249
|
-
|
223
|
+
ce(ye, { "transition-duration": 500 }, {
|
224
|
+
default: W(() => [
|
225
|
+
r(e.$slots, "default")
|
226
|
+
]),
|
227
|
+
_: 3
|
228
|
+
})
|
250
229
|
], 512),
|
251
230
|
t[1] || (t[1] = a("div", { style: { flex: "10000 10000 0%" } }, null, -1)),
|
252
231
|
a("div", {
|
253
232
|
ref_key: "footer",
|
254
|
-
ref:
|
233
|
+
ref: q,
|
255
234
|
class: "bb-base-dialog__footer"
|
256
235
|
}, [
|
257
|
-
|
236
|
+
r(e.$slots, "footer")
|
258
237
|
], 512)
|
259
|
-
], 512)) :
|
238
|
+
], 512)) : B("", !0)
|
260
239
|
], 16)
|
261
240
|
], 16)
|
262
241
|
]),
|
@@ -265,5 +244,5 @@ const _e = { class: "bb-base-dialog-close" }, Ce = ["aria-label"], Ae = /* @__PU
|
|
265
244
|
}
|
266
245
|
});
|
267
246
|
export {
|
268
|
-
|
247
|
+
Se as default
|
269
248
|
};
|
package/dist/index250.js
CHANGED
@@ -1,46 +1,4 @@
|
|
1
|
-
|
2
|
-
import C from "./index13.js";
|
3
|
-
/* empty css */
|
4
|
-
const M = { class: "bb-base-date-picker__button-menu bb-base-date-picker__month-selector" }, v = { class: "content" }, E = /* @__PURE__ */ _({
|
5
|
-
__name: "BaseDatePickerMonthSelector",
|
6
|
-
props: {
|
7
|
-
cursor: {},
|
8
|
-
disabled: { type: Boolean }
|
9
|
-
},
|
10
|
-
emits: ["update:month"],
|
11
|
-
setup(l, { emit: d }) {
|
12
|
-
const s = l, m = d, i = a(() => s.cursor.month()), u = a(
|
13
|
-
() => new Array(12).fill(0).map((r, t) => {
|
14
|
-
const n = s.cursor.clone().startOf("year").add(t, "month");
|
15
|
-
return {
|
16
|
-
text: n.format("MMMM"),
|
17
|
-
key: n.unix(),
|
18
|
-
selected: n.month() === i.value,
|
19
|
-
handler: () => m("update:month", t)
|
20
|
-
};
|
21
|
-
})
|
22
|
-
);
|
23
|
-
return (r, t) => (o(), c("div", M, [
|
24
|
-
p("div", v, [
|
25
|
-
(o(!0), c(b, null, h(u.value, (e) => (o(), k(C, {
|
26
|
-
key: e.key,
|
27
|
-
class: f({
|
28
|
-
content__btn: !0,
|
29
|
-
"content__btn--selected": e.selected
|
30
|
-
}),
|
31
|
-
disabled: r.disabled,
|
32
|
-
type: "button",
|
33
|
-
onClick: e.handler
|
34
|
-
}, {
|
35
|
-
default: y(() => [
|
36
|
-
x(B(e.text), 1)
|
37
|
-
]),
|
38
|
-
_: 2
|
39
|
-
}, 1032, ["class", "disabled", "onClick"]))), 128))
|
40
|
-
])
|
41
|
-
]));
|
42
|
-
}
|
43
|
-
});
|
1
|
+
const s = (r) => !!r && !!r.match(/^(#|var\(--|(rgb|hsl)a?\()/);
|
44
2
|
export {
|
45
|
-
|
3
|
+
s as isCssColor
|
46
4
|
};
|
package/dist/index251.js
CHANGED
@@ -1,7 +1,6 @@
|
|
1
|
-
import
|
2
|
-
|
3
|
-
import t from "./index286.js";
|
4
|
-
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-8c6b13bd"]]);
|
1
|
+
import { curry as e } from "./index307.js";
|
2
|
+
const t = (n, o, r) => n(r) ? o(r) : r, s = e(t);
|
5
3
|
export {
|
6
|
-
|
4
|
+
t as baseWhen,
|
5
|
+
s as when
|
7
6
|
};
|
package/dist/index252.js
CHANGED
@@ -1,62 +1,4 @@
|
|
1
|
-
|
2
|
-
import { range as H } from "./index335.js";
|
3
|
-
import M from "./index13.js";
|
4
|
-
/* empty css */
|
5
|
-
const n = 10, l = 3, V = /* @__PURE__ */ g({
|
6
|
-
__name: "BaseDatePickerYearSelector",
|
7
|
-
props: {
|
8
|
-
cursor: {},
|
9
|
-
disabled: { type: Boolean }
|
10
|
-
},
|
11
|
-
emits: ["update:year"],
|
12
|
-
setup(p, { emit: _ }) {
|
13
|
-
const f = p, b = _, o = i(), r = d(() => f.cursor.year()), c = i(r.value - n * l), s = i(r.value + n * l), v = d(
|
14
|
-
() => H(c.value, s.value).map((e) => ({
|
15
|
-
text: e,
|
16
|
-
key: e,
|
17
|
-
selected: e === r.value,
|
18
|
-
handler: () => b("update:year", e)
|
19
|
-
}))
|
20
|
-
), k = (e) => {
|
21
|
-
const t = e.target;
|
22
|
-
t.scrollTop <= 100 ? c.value = Math.max(
|
23
|
-
c.value - n * l,
|
24
|
-
r.value - 200
|
25
|
-
) : t.scrollHeight - t.scrollTop === t.clientHeight && (s.value = Math.min(s.value + n * l, 2101));
|
26
|
-
};
|
27
|
-
return h(() => {
|
28
|
-
if (!o.value) return;
|
29
|
-
const e = o.value.querySelector(
|
30
|
-
".content__btn--selected"
|
31
|
-
);
|
32
|
-
e && (e.parentElement.scrollTop = e.offsetTop - e.parentElement.clientHeight / 2 + 16);
|
33
|
-
}), (e, t) => (u(), m("div", {
|
34
|
-
ref_key: "container",
|
35
|
-
ref: o,
|
36
|
-
class: "bb-base-date-picker__button-menu bb-base-date-picker__year-selector scrollbar-border"
|
37
|
-
}, [
|
38
|
-
y("div", {
|
39
|
-
class: "content",
|
40
|
-
onScrollPassive: k
|
41
|
-
}, [
|
42
|
-
(u(!0), m(x, null, B(v.value, (a) => (u(), C(M, {
|
43
|
-
key: a.key,
|
44
|
-
class: S({
|
45
|
-
content__btn: !0,
|
46
|
-
"content__btn--selected": a.selected
|
47
|
-
}),
|
48
|
-
disabled: e.disabled,
|
49
|
-
onClick: a.handler
|
50
|
-
}, {
|
51
|
-
default: T(() => [
|
52
|
-
E(w(a.text), 1)
|
53
|
-
]),
|
54
|
-
_: 2
|
55
|
-
}, 1032, ["class", "disabled", "onClick"]))), 128))
|
56
|
-
], 32)
|
57
|
-
], 512));
|
58
|
-
}
|
59
|
-
});
|
1
|
+
const o = (e) => typeof e == "boolean" ? e : e === "true";
|
60
2
|
export {
|
61
|
-
|
3
|
+
o as booleanishToBoolean
|
62
4
|
};
|
package/dist/index253.js
CHANGED
package/dist/index254.js
CHANGED
@@ -1,36 +1,108 @@
|
|
1
|
-
import { defineComponent as
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
1
|
+
import { defineComponent as y, ref as F, computed as H, watch as N, openBlock as p, createElementBlock as L, Fragment as S, renderList as V, createBlock as A, normalizeClass as O, withModifiers as P, withCtx as $, createTextVNode as z, toDisplayString as D } from "vue";
|
2
|
+
import { hash as d } from "./index225.js";
|
3
|
+
import { isNil as l } from "./index264.js";
|
4
|
+
import E from "./index125.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"
|
16
77
|
}
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
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: O({
|
92
|
+
"bb-chipsbox-item": !0,
|
93
|
+
"bb-chipsbox-item--focused": B === n.value
|
94
|
+
}),
|
95
|
+
clearable: !0,
|
96
|
+
text: o.text,
|
97
|
+
"onClick:clear": P((M) => u("option:unselected", o), ["stop"])
|
98
|
+
}, {
|
99
|
+
default: $(() => [
|
100
|
+
z(D(o.text), 1)
|
29
101
|
]),
|
30
|
-
_:
|
31
|
-
}));
|
102
|
+
_: 2
|
103
|
+
}, 1032, ["class", "text", "onClick:clear"]))), 128));
|
32
104
|
}
|
33
105
|
});
|
34
106
|
export {
|
35
|
-
|
107
|
+
K as default
|
36
108
|
};
|