bitboss-ui 2.1.0 → 2.1.1
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/BaseDialog/BaseDialog.vue.d.ts +1 -1
- package/dist/components/BbOffCanvas/BbOffCanvas.vue.d.ts +1 -1
- package/dist/components/BbPopover/BbPopover.vue.d.ts +1 -1
- package/dist/components/BbSmoothHeight/BbSmoothHeight.vue.d.ts +2 -2
- package/dist/components/BbTooltip/BbTooltip.vue.d.ts +1 -1
- package/dist/index.css +1 -1
- package/dist/index106.js +7 -7
- package/dist/index113.js +1 -1
- package/dist/index121.js +11 -11
- package/dist/index129.js +1 -1
- package/dist/index13.js +1 -1
- package/dist/index131.js +3 -3
- package/dist/index133.js +1 -1
- package/dist/index136.js +1 -1
- package/dist/index137.js +2 -2
- package/dist/index139.js +2 -2
- package/dist/index15.js +8 -8
- package/dist/index17.js +3 -3
- package/dist/index19.js +8 -8
- package/dist/index206.js +138 -2
- package/dist/index207.js +2 -138
- package/dist/index209.js +13 -2
- package/dist/index21.js +16 -16
- package/dist/index210.js +13 -4
- package/dist/index211.js +11 -2
- package/dist/index212.js +31 -63
- package/dist/index213.js +68 -0
- package/dist/index215.js +13 -13
- package/dist/index216.js +4 -13
- package/dist/index217.js +19 -10
- package/dist/index218.js +197 -5
- package/dist/index220.js +113 -5
- package/dist/index222.js +3 -5
- package/dist/index223.js +86 -5
- package/dist/index225.js +29 -2
- package/dist/index226.js +17 -2
- package/dist/index227.js +49 -18
- package/dist/index228.js +15 -113
- package/dist/index229.js +5 -0
- package/dist/index23.js +15 -15
- package/dist/index230.js +12 -86
- package/dist/index231.js +18 -0
- package/dist/index232.js +2 -29
- package/dist/index233.js +4 -16
- package/dist/index234.js +5 -17
- package/dist/index235.js +5 -51
- package/dist/index236.js +5 -15
- package/dist/index237.js +5 -3
- package/dist/index238.js +5 -12
- package/dist/index239.js +5 -4
- package/dist/index240.js +2 -197
- package/dist/index241.js +4 -0
- package/dist/index242.js +2 -5
- package/dist/index243.js +18 -5
- package/dist/index244.js +12 -8
- package/dist/index245.js +5 -249
- package/dist/index246.js +100 -46
- package/dist/index248.js +100 -5
- package/dist/index25.js +35 -42
- package/dist/index250.js +227 -17
- package/dist/index251.js +176 -11
- package/dist/index252.js +5 -6
- package/dist/index253.js +5 -106
- package/dist/index254.js +10 -0
- package/dist/index255.js +245 -95
- package/dist/index256.js +54 -0
- package/dist/index257.js +39 -223
- package/dist/index258.js +5 -177
- package/dist/index259.js +60 -2
- package/dist/index260.js +2 -3
- package/dist/index261.js +2 -34
- package/dist/index262.js +2 -2
- package/dist/index27.js +1 -1
- package/dist/index271.js +1 -1
- package/dist/index273.js +2 -5
- package/dist/index274.js +5 -8
- package/dist/index275.js +67 -2
- package/dist/index276.js +5 -67
- package/dist/index277.js +8 -5
- package/dist/index278.js +6 -3
- package/dist/index279.js +11 -3
- package/dist/index280.js +4 -0
- package/dist/index281.js +3 -7
- package/dist/index283.js +7 -11
- package/dist/index285.js +5 -3
- package/dist/index286.js +4 -3
- package/dist/index287.js +1 -1
- package/dist/index288.js +1 -1
- package/dist/index29.js +3 -3
- package/dist/index290.js +3 -280
- package/dist/index291.js +3 -2
- package/dist/index292.js +271 -116
- package/dist/index293.js +2 -2
- package/dist/index294.js +123 -13
- package/dist/index295.js +2 -2
- package/dist/index296.js +13 -14
- package/dist/index298.js +9 -9
- package/dist/index300.js +14 -17
- package/dist/index302.js +17 -17
- package/dist/index304.js +3 -27
- package/dist/index305.js +3 -2
- package/dist/index306.js +1 -1
- package/dist/index307.js +6 -2
- package/dist/index308.js +19 -2
- package/dist/index309.js +2 -2
- package/dist/index31.js +2 -2
- package/dist/index310.js +27 -22
- package/dist/index311.js +4 -0
- package/dist/index312.js +2 -3
- package/dist/index313.js +2 -3
- package/dist/index315.js +2 -6
- package/dist/index316.js +21 -1
- package/dist/index318.js +1 -1
- package/dist/index322.js +2 -33
- package/dist/index323.js +8 -28
- package/dist/index324.js +8 -0
- package/dist/index325.js +8 -2
- package/dist/index326.js +6 -128
- package/dist/index327.js +220 -361
- package/dist/index328.js +58 -8
- package/dist/index329.js +58 -6
- package/dist/index33.js +8 -8
- package/dist/index330.js +32 -7
- package/dist/index331.js +28 -47
- package/dist/index333.js +127 -17
- package/dist/index334.js +367 -56
- package/dist/index335.js +47 -58
- package/dist/index336.js +6 -227
- package/dist/index337.js +17 -5
- package/dist/index338.js +1 -1
- package/dist/index340.js +1 -1
- package/dist/index35.js +4 -4
- package/dist/index37.js +20 -20
- package/dist/index39.js +15 -15
- 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 +1 -1
- package/dist/index67.js +1 -1
- package/dist/index79.js +2 -2
- package/dist/index81.js +1 -1
- package/dist/index85.js +1 -1
- package/dist/index90.js +59 -66
- package/dist/index92.js +1 -1
- package/dist/index94.js +3 -3
- package/dist/index96.js +1 -1
- package/package.json +2 -2
- package/dist/index214.js +0 -15
- package/dist/index219.js +0 -7
- package/dist/index221.js +0 -7
- package/dist/index224.js +0 -4
- package/dist/index247.js +0 -46
- package/dist/index249.js +0 -62
- package/dist/index282.js +0 -9
- package/dist/index317.js +0 -7
- package/dist/index332.js +0 -9
package/dist/index90.js
CHANGED
@@ -1,22 +1,20 @@
|
|
1
|
-
import { defineComponent as O, mergeModels as E, useModel as P, computed as p, ref as T, watch as q, onMounted as A, createElementBlock as d, openBlock as c, withModifiers as H, normalizeStyle as K, normalizeClass as R, unref as v, createCommentVNode as y, Fragment as U, createElementVNode as
|
2
|
-
import { parseSize as
|
3
|
-
import { useId as
|
4
|
-
import { useLocale as
|
5
|
-
import { useMobile as
|
6
|
-
import { useUntil as
|
1
|
+
import { defineComponent as O, mergeModels as E, useModel as P, computed as p, ref as T, watch as q, onMounted as A, createElementBlock as d, openBlock as c, withModifiers as H, normalizeStyle as K, normalizeClass as R, unref as v, createCommentVNode as y, Fragment as U, createElementVNode as l, renderSlot as s, createTextVNode as j, toDisplayString as z, nextTick as G } from "vue";
|
2
|
+
import { parseSize as J } from "./index209.js";
|
3
|
+
import { useId as D } from "./index8.js";
|
4
|
+
import { useLocale as Q } from "./index210.js";
|
5
|
+
import { useMobile as X } from "./index9.js";
|
6
|
+
import { useUntil as Y } from "./index211.js";
|
7
7
|
import { wait as h } from "./index135.js";
|
8
|
-
|
9
|
-
/* empty css */
|
10
|
-
const te = ["aria-describedby", "aria-labelledby", "aria-live", "inert"], oe = {
|
8
|
+
const Z = ["aria-describedby", "aria-labelledby", "aria-live", "inert"], x = {
|
11
9
|
ref: "header",
|
12
10
|
class: "bb-offcanvas__header"
|
13
|
-
},
|
11
|
+
}, ee = { class: "bb-offcanvas__close" }, oe = ["aria-label", "disabled"], te = {
|
14
12
|
ref: "body",
|
15
13
|
class: "bb-offcanvas__body scrollbar-border"
|
16
|
-
},
|
14
|
+
}, le = {
|
17
15
|
ref: "footer",
|
18
16
|
class: "bb-offcanvas__footer"
|
19
|
-
},
|
17
|
+
}, ue = /* @__PURE__ */ O({
|
20
18
|
__name: "BbOffCanvas",
|
21
19
|
props: /* @__PURE__ */ E({
|
22
20
|
closeLabel: {},
|
@@ -39,106 +37,106 @@ const te = ["aria-describedby", "aria-labelledby", "aria-live", "inert"], oe = {
|
|
39
37
|
modelModifiers: {}
|
40
38
|
}),
|
41
39
|
emits: /* @__PURE__ */ E(["shown", "hidden"], ["update:modelValue"]),
|
42
|
-
setup(
|
43
|
-
const
|
44
|
-
() =>
|
45
|
-
), i = T(null), u =
|
46
|
-
() =>
|
40
|
+
setup(g, { emit: S }) {
|
41
|
+
const o = g, w = S, t = P(g, "modelValue"), { t: V } = Q(), I = p(
|
42
|
+
() => o.closeLabel || V("dialog.closeLabel").value
|
43
|
+
), i = T(null), u = Y(
|
44
|
+
() => t.value || o.eager,
|
47
45
|
{
|
48
|
-
initialValue:
|
46
|
+
initialValue: t.value || o.eager
|
49
47
|
}
|
50
|
-
), f = `title_${
|
51
|
-
if (e.key === "Escape" && (
|
48
|
+
), f = `title_${D().id.value}`, m = `description_${D().id.value}`, C = (e) => {
|
49
|
+
if (e.key === "Escape" && (o.disabled || o.persistent))
|
52
50
|
return e.preventDefault(), a.value = !0, h(200).then(() => {
|
53
51
|
a.value = !1;
|
54
52
|
}), !1;
|
55
|
-
},
|
56
|
-
var n, B,
|
53
|
+
}, k = async (e) => {
|
54
|
+
var n, B, L, M;
|
57
55
|
e ? ((n = window.globalThis) != null && n.document && !document.documentElement.style.getPropertyValue("--scrollbar-width") && (document.documentElement.style.setProperty(
|
58
56
|
"--scrollbar-width",
|
59
57
|
`${W()}px`
|
60
|
-
), document.addEventListener("keydown", C)), (B = i.value) == null || B.showModal(),
|
61
|
-
var
|
62
|
-
const b = (
|
58
|
+
), document.addEventListener("keydown", C)), (B = i.value) == null || B.showModal(), o.focusTarget && G(() => {
|
59
|
+
var $;
|
60
|
+
const b = ($ = i.value) == null ? void 0 : $.querySelector(o.focusTarget);
|
63
61
|
b && b instanceof HTMLElement && b.focus();
|
64
|
-
}),
|
62
|
+
}), w("shown")) : (await h(o.transitionDuration), (L = window.globalThis) != null && L.document && document.removeEventListener("keydown", C), (M = i.value) == null || M.close(), w("hidden"));
|
65
63
|
};
|
66
|
-
q(
|
67
|
-
|
64
|
+
q(t, k), A(() => {
|
65
|
+
t.value && k(!0);
|
68
66
|
});
|
69
|
-
const
|
67
|
+
const N = p(() => _.value ? "100%" : o.size === "auto" ? "fit-content" : J(o.size, {
|
70
68
|
sm: 384,
|
71
69
|
md: 652,
|
72
70
|
lg: 896
|
73
71
|
})), r = (e) => {
|
74
|
-
if (e.preventDefault(),
|
72
|
+
if (e.preventDefault(), o.disabled || o.persistent)
|
75
73
|
return a.value = !0, h(300).then(() => {
|
76
74
|
a.value = !1;
|
77
75
|
}), !1;
|
78
|
-
|
79
|
-
}, a = T(!1), W = () => globalThis.document ? window.innerWidth - document.documentElement.clientWidth : 0, { isMobile: F } =
|
80
|
-
() =>
|
76
|
+
t.value = !1;
|
77
|
+
}, a = T(!1), W = () => globalThis.document ? window.innerWidth - document.documentElement.clientWidth : 0, { isMobile: F } = X(), _ = p(
|
78
|
+
() => o.fullscreen === !0 || o.fullscreen === "mobile" && F.value
|
81
79
|
);
|
82
80
|
return (e, n) => (c(), d("dialog", {
|
83
81
|
ref_key: "dialog",
|
84
82
|
ref: i,
|
85
83
|
"aria-describedby": v(u) && e.description ? m : void 0,
|
86
84
|
"aria-labelledby": v(u) && e.title ? f : void 0,
|
87
|
-
"aria-live":
|
85
|
+
"aria-live": t.value ? "polite" : "off",
|
88
86
|
class: R([
|
89
87
|
"bb-offcanvas",
|
90
88
|
[
|
91
89
|
{
|
92
|
-
"bb-offcanvas--open":
|
93
|
-
"bb-offcanvas--fullscreen":
|
90
|
+
"bb-offcanvas--open": t.value,
|
91
|
+
"bb-offcanvas--fullscreen": _.value,
|
94
92
|
"bb-offcanvas--compact": e.compact,
|
95
93
|
"bb-offcanvas--deny-close": a.value,
|
96
|
-
[`bb-offcanvas--${
|
94
|
+
[`bb-offcanvas--${o.direction}`]: !0
|
97
95
|
},
|
98
96
|
e.overlayClasses,
|
99
97
|
e.panelClasses
|
100
98
|
].flat()
|
101
99
|
]),
|
102
|
-
inert: !
|
100
|
+
inert: !t.value,
|
103
101
|
style: K({
|
104
|
-
"--max-size":
|
105
|
-
"--transition-duration": `${
|
102
|
+
"--max-size": N.value,
|
103
|
+
"--transition-duration": `${o.transitionDuration}ms`
|
106
104
|
}),
|
107
105
|
onCancel: r,
|
108
106
|
onClick: H(r, ["self"])
|
109
107
|
}, [
|
110
108
|
v(u) ? (c(), d(U, { key: 0 }, [
|
111
|
-
|
112
|
-
|
109
|
+
l("div", x, [
|
110
|
+
s(e.$slots, "header", {
|
113
111
|
close: r,
|
114
112
|
title: e.title,
|
115
113
|
titleId: f
|
116
114
|
}, () => [
|
117
|
-
|
115
|
+
l("span", {
|
118
116
|
id: f,
|
119
117
|
class: "bb-offcanvas__title"
|
120
118
|
}, [
|
121
|
-
|
122
|
-
j(
|
119
|
+
s(e.$slots, "title", { text: e.title }, () => [
|
120
|
+
j(z(e.title), 1)
|
123
121
|
])
|
124
122
|
]),
|
125
|
-
|
123
|
+
l("span", ee, [
|
126
124
|
e.showClose ? (c(), d("button", {
|
127
125
|
key: 0,
|
128
|
-
"aria-label":
|
129
|
-
disabled:
|
126
|
+
"aria-label": I.value,
|
127
|
+
disabled: o.disabled,
|
130
128
|
type: "button",
|
131
129
|
onClick: r
|
132
130
|
}, [
|
133
|
-
|
134
|
-
n[0] || (n[0] =
|
135
|
-
|
131
|
+
s(e.$slots, "close", {}, () => [
|
132
|
+
n[0] || (n[0] = l("span", { class: "bb-offcanvas__close-icon" }, [
|
133
|
+
l("svg", {
|
136
134
|
"aria-hidden": "true",
|
137
135
|
fill: "none",
|
138
136
|
viewBox: "0 0 24 24",
|
139
137
|
xmlns: "http://www.w3.org/2000/svg"
|
140
138
|
}, [
|
141
|
-
|
139
|
+
l("path", {
|
142
140
|
d: "M23 23L1 1M23 1L1 23",
|
143
141
|
stroke: "currentColor",
|
144
142
|
"stroke-linecap": "round",
|
@@ -147,12 +145,12 @@ const te = ["aria-describedby", "aria-labelledby", "aria-live", "inert"], oe = {
|
|
147
145
|
])
|
148
146
|
], -1))
|
149
147
|
])
|
150
|
-
], 8,
|
148
|
+
], 8, oe)) : y("", !0)
|
151
149
|
])
|
152
150
|
])
|
153
151
|
], 512),
|
154
|
-
|
155
|
-
|
152
|
+
l("div", te, [
|
153
|
+
s(e.$slots, "description", {
|
156
154
|
descriptionId: m,
|
157
155
|
text: e.description
|
158
156
|
}, () => [
|
@@ -160,22 +158,17 @@ const te = ["aria-describedby", "aria-labelledby", "aria-live", "inert"], oe = {
|
|
160
158
|
key: 0,
|
161
159
|
id: m,
|
162
160
|
class: "bb-offcanvas__description sr-only"
|
163
|
-
},
|
161
|
+
}, z(e.description), 1)) : y("", !0)
|
164
162
|
]),
|
165
|
-
|
166
|
-
default: J(() => [
|
167
|
-
l(e.$slots, "default")
|
168
|
-
]),
|
169
|
-
_: 3
|
170
|
-
})
|
163
|
+
s(e.$slots, "default")
|
171
164
|
], 512),
|
172
|
-
|
173
|
-
|
165
|
+
l("div", le, [
|
166
|
+
s(e.$slots, "footer")
|
174
167
|
], 512)
|
175
168
|
], 64)) : y("", !0)
|
176
|
-
], 46,
|
169
|
+
], 46, Z));
|
177
170
|
}
|
178
171
|
});
|
179
172
|
export {
|
180
|
-
|
173
|
+
ue as default
|
181
174
|
};
|
package/dist/index92.js
CHANGED
@@ -4,7 +4,7 @@ import { defineComponent as V, mergeModels as W, useModel as U, computed as d, r
|
|
4
4
|
import P from "./index13.js";
|
5
5
|
/* empty css */
|
6
6
|
import { debounce as X } from "./index268.js";
|
7
|
-
import { useLocale as H } from "./
|
7
|
+
import { useLocale as H } from "./index210.js";
|
8
8
|
import { useRoute as J } from "./index142.js";
|
9
9
|
const K = ["aria-label"], Q = { class: "bb-pagination__page-label sr-only" }, Y = { class: "bb-pagination__page-label" }, Z = { class: "bb-pagination__page-label" }, ee = { class: "bb-pagination__page-label sr-only" }, ue = /* @__PURE__ */ V({
|
10
10
|
__name: "BbPagination",
|
package/dist/index94.js
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
import { defineComponent as V, ref as m, computed as g, createBlock as k, openBlock as y, unref as l, normalizeClass as D, withCtx as v, createElementVNode as d, createCommentVNode as M, renderSlot as C, toDisplayString as z, normalizeProps as I, guardReactiveProps as O, nextTick as S } from "vue";
|
2
2
|
import { useId as H } from "./index8.js";
|
3
3
|
import { useIntersectionObserver as N } from "./index137.js";
|
4
|
-
import { useLocale as U } from "./
|
5
|
-
import { useUntil as W } from "./
|
4
|
+
import { useLocale as U } from "./index210.js";
|
5
|
+
import { useUntil as W } from "./index211.js";
|
6
6
|
import q from "./index13.js";
|
7
7
|
/* empty css */
|
8
|
-
import A from "./
|
8
|
+
import A from "./index220.js";
|
9
9
|
/* empty css */
|
10
10
|
const R = ["inert"], Z = { class: "bb-popover__close-label sr-only" }, ee = /* @__PURE__ */ V({
|
11
11
|
__name: "BbPopover",
|
package/dist/index96.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 "./index207.js";
|
3
3
|
import { getAsPercentageBetween as i } from "./index136.js";
|
4
4
|
const _ = /* @__PURE__ */ r({
|
5
5
|
__name: "BbProgress",
|
package/package.json
CHANGED
package/dist/index214.js
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
import { createElementBlock as t, openBlock as n, renderSlot as e } from "vue";
|
2
|
-
/* empty css */
|
3
|
-
import r from "./index281.js";
|
4
|
-
const s = {}, c = { class: "bb-common-input-outer-container" };
|
5
|
-
function p(o, a) {
|
6
|
-
return n(), t("span", c, [
|
7
|
-
e(o.$slots, "prepend-outer"),
|
8
|
-
e(o.$slots, "default"),
|
9
|
-
e(o.$slots, "append-outer")
|
10
|
-
]);
|
11
|
-
}
|
12
|
-
const i = /* @__PURE__ */ r(s, [["render", p]]);
|
13
|
-
export {
|
14
|
-
i as default
|
15
|
-
};
|
package/dist/index219.js
DELETED
package/dist/index221.js
DELETED
package/dist/index224.js
DELETED
package/dist/index247.js
DELETED
@@ -1,46 +0,0 @@
|
|
1
|
-
import { defineComponent as _, computed as a, createElementBlock as c, openBlock as o, createElementVNode as p, Fragment as b, renderList as h, createBlock as k, normalizeClass as f, withCtx as y, createTextVNode as x, toDisplayString as B } from "vue";
|
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
|
-
});
|
44
|
-
export {
|
45
|
-
E as default
|
46
|
-
};
|
package/dist/index249.js
DELETED
@@ -1,62 +0,0 @@
|
|
1
|
-
import { defineComponent as g, ref as i, computed as d, onMounted as h, createElementBlock as m, openBlock as u, createElementVNode as y, Fragment as x, renderList as B, createBlock as C, normalizeClass as S, withCtx as T, createTextVNode as E, toDisplayString as w } from "vue";
|
2
|
-
import { range as H } from "./index337.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
|
-
});
|
60
|
-
export {
|
61
|
-
V as default
|
62
|
-
};
|
package/dist/index282.js
DELETED
package/dist/index317.js
DELETED