bitboss-ui 2.1.74 → 2.1.76
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/BbTable/BbTable.vue.d.ts +1 -1
- package/dist/composables/useBbConfig.d.ts +5 -1
- 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 +137 -136
- package/dist/index122.js +29 -29
- package/dist/index13.js +64 -33
- package/dist/index130.js +1 -1
- package/dist/index132.js +5 -5
- package/dist/index134.js +1 -1
- package/dist/index136.js +2 -2
- package/dist/index143.js +2 -2
- package/dist/index15.js +5 -5
- package/dist/index17.js +3 -3
- package/dist/index19.js +8 -8
- package/dist/index21.js +14 -14
- package/dist/index217.js +7 -5
- package/dist/index218.js +2 -8
- package/dist/index219.js +5 -9
- package/dist/index220.js +8 -13
- package/dist/index221.js +5 -13
- package/dist/index222.js +2 -127
- package/dist/index223.js +4 -0
- package/dist/index224.js +2 -4
- package/dist/index225.js +13 -23
- package/dist/index226.js +9 -2
- package/dist/index227.js +3 -2
- package/dist/index228.js +3 -2
- package/dist/index229.js +2 -4
- package/dist/index23.js +11 -11
- package/dist/index230.js +16 -18
- package/dist/index231.js +12 -201
- package/dist/index232.js +53 -0
- package/dist/index233.js +15 -34
- package/dist/index234.js +12 -9
- package/dist/index235.js +17 -2
- package/dist/index236.js +29 -8
- package/dist/index237.js +16 -3
- package/dist/index238.js +4 -29
- package/dist/index239.js +106 -16
- package/dist/index241.js +99 -50
- package/dist/index243.js +127 -3
- package/dist/index245.js +227 -6
- package/dist/index246.js +13 -2
- package/dist/index247.js +3 -7
- package/dist/index248.js +5 -2
- package/dist/index249.js +5 -7
- package/dist/index25.js +3 -3
- package/dist/index250.js +5 -188
- package/dist/index251.js +4 -4
- package/dist/index252.js +3 -3
- package/dist/index253.js +4 -4
- package/dist/index254.js +20 -5
- package/dist/index255.js +32 -5
- package/dist/index256.js +26 -266
- package/dist/index258.js +32 -50
- package/dist/index259.js +2 -32
- package/dist/index260.js +7 -60
- package/dist/index261.js +7 -3
- package/dist/index262.js +9 -17
- package/dist/index263.js +2 -11
- package/dist/index264.js +4 -15
- package/dist/index265.js +3 -4
- package/dist/index266.js +4 -106
- package/dist/index267.js +203 -0
- package/dist/index269.js +88 -0
- package/dist/index27.js +1 -1
- package/dist/index271.js +5 -86
- package/dist/index272.js +8 -0
- package/dist/index273.js +8 -10
- package/dist/index274.js +268 -3
- package/dist/index275.js +52 -9
- package/dist/index276.js +45 -60
- package/dist/index277.js +31 -8
- package/dist/index278.js +60 -23
- package/dist/index279.js +9 -5
- package/dist/index280.js +23 -5
- package/dist/index281.js +9 -5
- package/dist/index282.js +8 -5
- package/dist/index283.js +9 -3
- package/dist/index284.js +23 -13
- package/dist/index285.js +12 -6
- package/dist/index286.js +186 -39
- package/dist/index287.js +67 -6
- package/dist/index288.js +6 -16
- package/dist/index289.js +16 -33
- package/dist/index29.js +2 -2
- package/dist/index290.js +40 -27
- package/dist/index292.js +3 -3
- package/dist/index294.js +3 -17
- package/dist/index295.js +5 -3
- package/dist/index296.js +2 -2
- package/dist/index297.js +3 -280
- package/dist/index298.js +3 -2
- package/dist/index299.js +3 -16
- package/dist/index300.js +2 -2
- package/dist/index301.js +27 -15
- package/dist/index302.js +17 -2
- package/dist/index303.js +4 -27
- package/dist/index304.js +280 -2
- package/dist/index305.js +2 -2
- package/dist/index306.js +125 -2
- package/dist/index307.js +2 -2
- package/dist/index308.js +15 -2
- package/dist/index309.js +2 -2
- package/dist/index31.js +2 -2
- package/dist/index310.js +16 -5
- package/dist/index311.js +2 -2
- package/dist/index312.js +16 -3
- package/dist/index313.js +2 -3
- package/dist/index314.js +19 -3
- package/dist/index315.js +2 -3
- package/dist/index316.js +2 -4
- package/dist/index317.js +3 -2
- package/dist/index318.js +5 -4
- package/dist/index319.js +3 -2
- package/dist/index320.js +4 -0
- package/dist/index321.js +27 -3
- package/dist/index322.js +2 -125
- package/dist/index323.js +2 -2
- package/dist/index324.js +2 -15
- package/dist/index325.js +2 -2
- package/dist/index326.js +2 -19
- package/dist/index327.js +2 -2
- package/dist/index329.js +4 -719
- package/dist/index33.js +8 -8
- package/dist/index330.js +716 -363
- package/dist/index331.js +366 -57
- package/dist/index332.js +57 -5
- package/dist/index333.js +58 -7
- package/dist/index334.js +57 -18
- package/dist/index335.js +45 -7
- package/dist/index336.js +34 -14
- package/dist/index337.js +6 -8
- package/dist/index338.js +128 -5
- package/dist/index339.js +396 -6
- package/dist/index340.js +7 -34
- package/dist/index341.js +6 -6
- package/dist/index342.js +7 -128
- package/dist/index343.js +83 -388
- package/dist/index344.js +227 -57
- package/dist/index345.js +518 -56
- package/dist/index346.js +133 -6
- package/dist/index347.js +5 -5
- package/dist/index348.js +6 -92
- package/dist/index349.js +17 -45
- package/dist/index35.js +4 -4
- package/dist/index350.js +9 -22
- package/dist/index351.js +17 -0
- package/dist/index352.js +6 -133
- package/dist/index353.js +45 -515
- package/dist/index354.js +21 -227
- package/dist/index356.js +427 -114
- package/dist/index357.js +126 -48
- package/dist/index37.js +18 -18
- package/dist/index39.js +6 -6
- package/dist/index4.js +12 -10
- 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 +6 -6
- 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 +5 -5
- package/package.json +2 -2
- package/dist/index240.js +0 -19
- package/dist/index242.js +0 -14
- package/dist/index257.js +0 -54
- package/dist/index268.js +0 -102
- package/dist/index270.js +0 -231
- package/dist/index293.js +0 -30
- package/dist/index355.js +0 -443
- /package/dist/{index244.js → index291.js} +0 -0
package/dist/index120.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useId as
|
|
1
|
+
import { defineComponent as j, ref as n, computed as _, watch as b, nextTick as G, onMounted as Q, createElementBlock as y, openBlock as c, normalizeClass as $, unref as Z, createElementVNode as h, renderSlot as v, normalizeProps as E, guardReactiveProps as W, normalizeStyle as ee, Fragment as F, renderList as z, createVNode as te, withCtx as q, toDisplayString as le, createBlock as N, resolveDynamicComponent as ae, Transition as ie, createCommentVNode as se } from "vue";
|
|
2
|
+
import { useId as oe } from "./index8.js";
|
|
3
3
|
import { useRoute as ne } from "./index146.js";
|
|
4
4
|
import { useRouter as re } from "./index147.js";
|
|
5
|
-
import { wait as
|
|
6
|
-
import { useScroll as
|
|
7
|
-
import
|
|
5
|
+
import { wait as ue } from "./index140.js";
|
|
6
|
+
import { useScroll as de, useResizeObserver as ce } from "./index141.js";
|
|
7
|
+
import fe from "./index13.js";
|
|
8
8
|
/* empty css */
|
|
9
9
|
import be from "./index112.js";
|
|
10
10
|
/* empty css */
|
|
11
|
-
import { useFrameworkDetection as
|
|
12
|
-
const
|
|
11
|
+
import { useFrameworkDetection as he } from "./index226.js";
|
|
12
|
+
const me = ["id"], ye = { class: "bb-tab__label-boundary" }, ve = { class: "bb-tab__label" }, pe = { class: "bb-tab__panes-container" }, ke = ["id", "aria-labelledby"], Re = /* @__PURE__ */ j({
|
|
13
13
|
__name: "BbTab",
|
|
14
14
|
props: {
|
|
15
15
|
disabled: { type: Boolean },
|
|
@@ -25,224 +25,225 @@ const he = ["id"], me = { class: "bb-tab__label-boundary" }, ye = { class: "bb-t
|
|
|
25
25
|
replace: { type: Boolean }
|
|
26
26
|
},
|
|
27
27
|
emits: ["update:modelValue"],
|
|
28
|
-
setup(
|
|
29
|
-
const t =
|
|
28
|
+
setup(A, { expose: H, emit: U }) {
|
|
29
|
+
const t = A, K = U, d = ne(), O = re(), X = n(), S = t.id ?? oe().id.value, p = `bb-tab_${S}`, o = n(), { isScrolling: Y, arrivedState: T } = de(o), x = _(() => ({
|
|
30
30
|
isScrolling: Y.value,
|
|
31
31
|
left: T.left,
|
|
32
32
|
right: T.right
|
|
33
|
-
})), { isInertia: L } =
|
|
34
|
-
() => t.items.findIndex((e) => e.key ===
|
|
35
|
-
),
|
|
33
|
+
})), { isInertia: L } = he(), i = n(null), r = _(
|
|
34
|
+
() => t.items.findIndex((e) => e.key === i.value)
|
|
35
|
+
), k = _(() => r.value === 0), g = _(() => r.value === t.items.length - 1);
|
|
36
36
|
t.items.forEach((e) => {
|
|
37
37
|
if (!e.key)
|
|
38
38
|
throw console.error("A tab item has no key", e), new Error("A tab item has no key " + JSON.stringify(e));
|
|
39
39
|
});
|
|
40
|
-
const
|
|
41
|
-
if (t.navigation &&
|
|
42
|
-
|
|
40
|
+
const I = () => {
|
|
41
|
+
if (t.navigation && d.value?.query?.[t.querykey])
|
|
42
|
+
i.value = d.value?.query?.[t.querykey];
|
|
43
43
|
else if (t.navigation && L && globalThis?.location?.href && new URL(globalThis.location.href).searchParams.get(t.querykey))
|
|
44
|
-
|
|
44
|
+
i.value = new URL(globalThis.location.href).searchParams.get(
|
|
45
45
|
t.querykey
|
|
46
46
|
);
|
|
47
47
|
else if (t.modelValue)
|
|
48
|
-
|
|
48
|
+
i.value = t.modelValue;
|
|
49
49
|
else if (t.items[0]) {
|
|
50
50
|
const e = t.items.find((l) => !l.disabled);
|
|
51
51
|
if (!e)
|
|
52
52
|
throw new Error(
|
|
53
53
|
"No tab has been selected so it defaulted to the first available. Still, all the tabs are disabled so no tab can be selected."
|
|
54
54
|
);
|
|
55
|
-
const
|
|
56
|
-
|
|
55
|
+
const a = e.key;
|
|
56
|
+
i.value = a;
|
|
57
57
|
}
|
|
58
58
|
};
|
|
59
|
-
|
|
60
|
-
const
|
|
61
|
-
if (t.navigation &&
|
|
62
|
-
|
|
63
|
-
...
|
|
64
|
-
query: { ...
|
|
65
|
-
replace:
|
|
59
|
+
I();
|
|
60
|
+
const m = async (e, a = !1) => {
|
|
61
|
+
if (t.navigation && d.value && d.value?.query?.[t.querykey] !== e)
|
|
62
|
+
O?.push({
|
|
63
|
+
...d,
|
|
64
|
+
query: { ...d.value?.query, [t.querykey]: e },
|
|
65
|
+
replace: a
|
|
66
66
|
});
|
|
67
67
|
else if (t.navigation && L && globalThis?.location?.href && new URL(globalThis.location.href).searchParams.get(t.querykey) !== e) {
|
|
68
68
|
const l = new URL(globalThis.location.href);
|
|
69
|
-
l.searchParams.set(t.querykey, e),
|
|
70
|
-
|
|
69
|
+
l.searchParams.set(t.querykey, e), ue(0).then(() => {
|
|
70
|
+
a ? history.replaceState({}, "", l.toString()) : history.pushState({}, "", l.toString());
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
|
-
t.modelValue !== e &&
|
|
73
|
+
t.modelValue !== e && K("update:modelValue", e), i.value = e;
|
|
74
74
|
};
|
|
75
|
-
|
|
76
|
-
const
|
|
77
|
-
var
|
|
75
|
+
i.value && m(i.value, !0);
|
|
76
|
+
const u = (e) => {
|
|
77
|
+
var a = null;
|
|
78
78
|
switch (e) {
|
|
79
79
|
case "first":
|
|
80
|
-
for (
|
|
81
|
-
|
|
80
|
+
for (a = 0; a < t.items.length - 1 && t.items[a].disabled; )
|
|
81
|
+
a++;
|
|
82
82
|
break;
|
|
83
83
|
case "previous": {
|
|
84
84
|
let s = 1;
|
|
85
|
-
for (; s < t.items.length && (
|
|
85
|
+
for (; s < t.items.length && (a = (r.value + t.items.length - s) % t.items.length, t.items[a].disabled); )
|
|
86
86
|
s++;
|
|
87
87
|
break;
|
|
88
88
|
}
|
|
89
89
|
case "next": {
|
|
90
90
|
let s = 1;
|
|
91
|
-
for (; s < t.items.length && (
|
|
91
|
+
for (; s < t.items.length && (a = (r.value + s) % t.items.length, t.items[a].disabled); )
|
|
92
92
|
s++;
|
|
93
93
|
break;
|
|
94
94
|
}
|
|
95
95
|
case "last":
|
|
96
|
-
for (
|
|
97
|
-
|
|
96
|
+
for (a = t.items.length - 1; a >= 0 && t.items[a].disabled; )
|
|
97
|
+
a--;
|
|
98
98
|
break;
|
|
99
99
|
}
|
|
100
|
-
if (
|
|
100
|
+
if (a === null)
|
|
101
101
|
throw new Error("Could not navigate to next tab");
|
|
102
|
-
if (t.items[
|
|
103
|
-
const l = t.items[
|
|
102
|
+
if (t.items[a].disabled) return;
|
|
103
|
+
const l = t.items[a].key;
|
|
104
104
|
document.querySelector(
|
|
105
|
-
`#${
|
|
106
|
-
)?.focus(),
|
|
105
|
+
`#${p}_tab_${l}`
|
|
106
|
+
)?.focus(), m(l, t.replace);
|
|
107
107
|
}, J = (e) => {
|
|
108
108
|
if (!t.disabled)
|
|
109
109
|
if (e.key === "ArrowRight")
|
|
110
|
-
|
|
110
|
+
u("next");
|
|
111
111
|
else if (e.key === "ArrowLeft")
|
|
112
|
-
|
|
112
|
+
u("previous");
|
|
113
113
|
else if (e.key === "Home")
|
|
114
|
-
e.preventDefault(),
|
|
114
|
+
e.preventDefault(), u("first");
|
|
115
115
|
else if (e.key === "End")
|
|
116
|
-
e.preventDefault(),
|
|
116
|
+
e.preventDefault(), u("last");
|
|
117
117
|
else
|
|
118
118
|
return;
|
|
119
119
|
};
|
|
120
120
|
b(
|
|
121
121
|
() => t.modelValue,
|
|
122
122
|
(e) => {
|
|
123
|
-
e &&
|
|
123
|
+
e && m(e, t.replace);
|
|
124
124
|
}
|
|
125
125
|
), b(
|
|
126
|
-
() =>
|
|
126
|
+
() => d.value?.query?.[t.querykey],
|
|
127
127
|
(e) => {
|
|
128
|
-
e && typeof e == "string" &&
|
|
128
|
+
e && typeof e == "string" && m(e, t.replace);
|
|
129
129
|
}
|
|
130
130
|
), b(
|
|
131
|
-
|
|
131
|
+
i,
|
|
132
132
|
async () => {
|
|
133
|
-
if (
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
133
|
+
if (!o.value) return;
|
|
134
|
+
const e = o.value.querySelector(
|
|
135
|
+
".bb-tab__btn--active"
|
|
136
|
+
);
|
|
137
|
+
if (!e) return;
|
|
138
|
+
await G();
|
|
139
|
+
const a = o.value, l = e.offsetLeft, f = l + e.offsetWidth, s = a.scrollLeft, M = s + a.clientWidth;
|
|
140
|
+
l < s ? a.scrollTo({ left: l, behavior: "smooth" }) : f > M && a.scrollTo({
|
|
141
|
+
left: f - a.clientWidth,
|
|
142
|
+
behavior: "smooth"
|
|
143
|
+
});
|
|
143
144
|
},
|
|
144
145
|
{ flush: "post" }
|
|
145
146
|
);
|
|
146
|
-
const
|
|
147
|
+
const B = n("right");
|
|
147
148
|
b(
|
|
148
|
-
|
|
149
|
-
(e,
|
|
150
|
-
if (e &&
|
|
151
|
-
const l = t.items.findIndex((s) => s.key === e),
|
|
152
|
-
|
|
149
|
+
i,
|
|
150
|
+
(e, a) => {
|
|
151
|
+
if (e && a) {
|
|
152
|
+
const l = t.items.findIndex((s) => s.key === e), f = t.items.findIndex((s) => s.key === a);
|
|
153
|
+
B.value = l > f ? "right" : "left";
|
|
153
154
|
}
|
|
154
155
|
},
|
|
155
156
|
{ flush: "sync" }
|
|
156
157
|
);
|
|
157
|
-
const
|
|
158
|
-
if (!
|
|
158
|
+
const R = n(0), V = n(0), C = n(0), P = n(0), D = n(0), w = () => {
|
|
159
|
+
if (!o.value)
|
|
159
160
|
return;
|
|
160
|
-
const e =
|
|
161
|
+
const e = o.value.querySelector(
|
|
161
162
|
".bb-tab__btn--active"
|
|
162
163
|
);
|
|
163
|
-
e && (
|
|
164
|
+
e && (C.value = e.offsetLeft, P.value = e.offsetTop, R.value = e.clientWidth, V.value = e.clientHeight, D.value = o.value.scrollWidth);
|
|
164
165
|
};
|
|
165
|
-
return
|
|
166
|
+
return Q(w), b(i, w, { flush: "post" }), ce(o, () => {
|
|
166
167
|
w();
|
|
167
168
|
}), b(
|
|
168
169
|
() => t.items,
|
|
169
170
|
() => {
|
|
170
|
-
|
|
171
|
+
i.value && !t.items.find((e) => e.key === i.value) && I();
|
|
171
172
|
},
|
|
172
173
|
{
|
|
173
174
|
immediate: !0,
|
|
174
175
|
deep: !0
|
|
175
176
|
}
|
|
176
|
-
),
|
|
177
|
-
isFirst:
|
|
178
|
-
isLast:
|
|
179
|
-
current:
|
|
177
|
+
), H({
|
|
178
|
+
isFirst: k,
|
|
179
|
+
isLast: g,
|
|
180
|
+
current: i,
|
|
180
181
|
currentIndex: r,
|
|
181
|
-
goTo:
|
|
182
|
-
}), (e,
|
|
183
|
-
id:
|
|
182
|
+
goTo: u
|
|
183
|
+
}), (e, a) => (c(), y("div", {
|
|
184
|
+
id: Z(S),
|
|
184
185
|
ref_key: "tabs",
|
|
185
|
-
ref:
|
|
186
|
-
class:
|
|
186
|
+
ref: X,
|
|
187
|
+
class: $(["bb-tab", {
|
|
187
188
|
[`bb-tab--${e.direction}`]: !0,
|
|
188
189
|
"bb-tab--disabled": e.disabled
|
|
189
190
|
}])
|
|
190
191
|
}, [
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
192
|
+
h("div", ye, [
|
|
193
|
+
h("span", null, [
|
|
194
|
+
v(e.$slots, "header:prepend", E(W(x.value)))
|
|
194
195
|
]),
|
|
195
|
-
|
|
196
|
+
h("ul", {
|
|
196
197
|
ref_key: "tablist",
|
|
197
|
-
ref:
|
|
198
|
+
ref: o,
|
|
198
199
|
class: "bb-tab__label-container",
|
|
199
200
|
role: "tablist",
|
|
200
|
-
style:
|
|
201
|
-
"--inner-width": `${
|
|
202
|
-
"--width": `${
|
|
203
|
-
"--height": `${
|
|
204
|
-
"--left": `${
|
|
205
|
-
"--top": `${
|
|
201
|
+
style: ee({
|
|
202
|
+
"--inner-width": `${D.value}px`,
|
|
203
|
+
"--width": `${R.value}px`,
|
|
204
|
+
"--height": `${V.value}px`,
|
|
205
|
+
"--left": `${C.value}px`,
|
|
206
|
+
"--top": `${P.value}px`
|
|
206
207
|
})
|
|
207
208
|
}, [
|
|
208
|
-
(
|
|
209
|
+
(c(!0), y(F, null, z(e.items, (l) => (c(), y("li", {
|
|
209
210
|
key: l.key,
|
|
210
211
|
role: "presentation"
|
|
211
212
|
}, [
|
|
212
|
-
|
|
213
|
-
id: `${
|
|
214
|
-
"aria-selected":
|
|
215
|
-
class:
|
|
213
|
+
te(fe, {
|
|
214
|
+
id: `${p}_tab_${l.key}`,
|
|
215
|
+
"aria-selected": i.value === l.key,
|
|
216
|
+
class: $(["bb-tab__btn", { "bb-tab__btn--active": i.value === l.key }]),
|
|
216
217
|
disabled: l.disabled || e.disabled,
|
|
217
218
|
role: "tab",
|
|
218
|
-
tabindex:
|
|
219
|
-
onClick: (
|
|
219
|
+
tabindex: i.value === l.key ? 0 : -1,
|
|
220
|
+
onClick: (f) => m(l.key, t.replace),
|
|
220
221
|
onKeydown: J
|
|
221
222
|
}, {
|
|
222
|
-
default:
|
|
223
|
-
|
|
224
|
-
current:
|
|
223
|
+
default: q(() => [
|
|
224
|
+
v(e.$slots, `label-${l.key}`, {
|
|
225
|
+
current: i.value,
|
|
225
226
|
currentIndex: r.value,
|
|
226
227
|
disabled: !!(l.disabled || e.disabled),
|
|
227
|
-
goTo:
|
|
228
|
-
isFirst:
|
|
229
|
-
isLast:
|
|
230
|
-
selected:
|
|
228
|
+
goTo: u,
|
|
229
|
+
isFirst: k.value,
|
|
230
|
+
isLast: g.value,
|
|
231
|
+
selected: i.value === l.key,
|
|
231
232
|
text: l.label,
|
|
232
233
|
value: l.key
|
|
233
234
|
}, () => [
|
|
234
|
-
|
|
235
|
-
current:
|
|
235
|
+
v(e.$slots, "label", {
|
|
236
|
+
current: i.value,
|
|
236
237
|
currentIndex: r.value,
|
|
237
238
|
disabled: !!(l.disabled || e.disabled),
|
|
238
|
-
goTo:
|
|
239
|
-
isFirst:
|
|
240
|
-
isLast:
|
|
241
|
-
selected:
|
|
239
|
+
goTo: u,
|
|
240
|
+
isFirst: k.value,
|
|
241
|
+
isLast: g.value,
|
|
242
|
+
selected: i.value === l.key,
|
|
242
243
|
text: l.label,
|
|
243
244
|
value: l.key
|
|
244
245
|
}, () => [
|
|
245
|
-
|
|
246
|
+
h("span", ve, le(l.label), 1)
|
|
246
247
|
])
|
|
247
248
|
])
|
|
248
249
|
]),
|
|
@@ -250,41 +251,41 @@ const he = ["id"], me = { class: "bb-tab__label-boundary" }, ye = { class: "bb-t
|
|
|
250
251
|
}, 1032, ["id", "aria-selected", "class", "disabled", "tabindex", "onClick"])
|
|
251
252
|
]))), 128))
|
|
252
253
|
], 4),
|
|
253
|
-
|
|
254
|
-
|
|
254
|
+
h("span", null, [
|
|
255
|
+
v(e.$slots, "header:append", E(W(x.value)))
|
|
255
256
|
])
|
|
256
257
|
]),
|
|
257
|
-
|
|
258
|
-
(
|
|
259
|
-
default:
|
|
260
|
-
(
|
|
258
|
+
h("div", pe, [
|
|
259
|
+
(c(), N(ae(t.animateY ? be : "div"), null, {
|
|
260
|
+
default: q(() => [
|
|
261
|
+
(c(!0), y(F, null, z(e.items, (l) => (c(), N(ie, {
|
|
261
262
|
key: l.key,
|
|
262
263
|
css: t.animateX,
|
|
263
|
-
name: `tab-slide-${
|
|
264
|
+
name: `tab-slide-${B.value}`
|
|
264
265
|
}, {
|
|
265
|
-
default:
|
|
266
|
-
|
|
266
|
+
default: q(() => [
|
|
267
|
+
i.value === l.key || e.eager || l.eager ? (c(), y("section", {
|
|
267
268
|
key: 0,
|
|
268
|
-
id: `${
|
|
269
|
-
"aria-labelledby": `${
|
|
270
|
-
class:
|
|
271
|
-
"bb-tab__pane--shown":
|
|
269
|
+
id: `${p}_tabpanel_${l.key}`,
|
|
270
|
+
"aria-labelledby": `${p}_tab_${l.key}`,
|
|
271
|
+
class: $(["bb-tab__pane", {
|
|
272
|
+
"bb-tab__pane--shown": i.value === l.key
|
|
272
273
|
}]),
|
|
273
274
|
role: "tabpanel",
|
|
274
275
|
tabindex: "0"
|
|
275
276
|
}, [
|
|
276
|
-
|
|
277
|
-
current:
|
|
277
|
+
v(e.$slots, l.key, {
|
|
278
|
+
current: i.value,
|
|
278
279
|
currentIndex: r.value,
|
|
279
280
|
disabled: !!(l.disabled || e.disabled),
|
|
280
|
-
goTo:
|
|
281
|
-
isFirst:
|
|
282
|
-
isLast:
|
|
283
|
-
selected:
|
|
281
|
+
goTo: u,
|
|
282
|
+
isFirst: k.value,
|
|
283
|
+
isLast: g.value,
|
|
284
|
+
selected: i.value === l.key,
|
|
284
285
|
text: l.label,
|
|
285
286
|
value: l.key
|
|
286
287
|
})
|
|
287
|
-
], 10,
|
|
288
|
+
], 10, ke)) : se("", !0)
|
|
288
289
|
]),
|
|
289
290
|
_: 2
|
|
290
291
|
}, 1032, ["css", "name"]))), 128))
|
|
@@ -292,9 +293,9 @@ const he = ["id"], me = { class: "bb-tab__label-boundary" }, ye = { class: "bb-t
|
|
|
292
293
|
_: 3
|
|
293
294
|
}))
|
|
294
295
|
])
|
|
295
|
-
], 10,
|
|
296
|
+
], 10, me));
|
|
296
297
|
}
|
|
297
298
|
});
|
|
298
299
|
export {
|
|
299
|
-
|
|
300
|
+
Re as default
|
|
300
301
|
};
|
package/dist/index122.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { defineComponent as be, mergeModels as U, ref as ie, computed as c, toRef as D, useModel as re, watch as H, reactive as ce, createBlock as W, openBlock as t, resolveDynamicComponent as ue, normalizeClass as r, withCtx as pe, createElementBlock as s, createCommentVNode as m, createElementVNode as o, toDisplayString as u, renderSlot as p, unref as y, Fragment as
|
|
1
|
+
import { defineComponent as be, mergeModels as U, ref as ie, computed as c, toRef as D, useModel as re, watch as H, reactive as ce, createBlock as W, openBlock as t, resolveDynamicComponent as ue, normalizeClass as r, withCtx as pe, createElementBlock as s, createCommentVNode as m, createElementVNode as o, toDisplayString as u, renderSlot as p, unref as y, Fragment as h, renderList as g, normalizeStyle as $, createVNode as q, createTextVNode as me, mergeProps as ye } from "vue";
|
|
2
2
|
import { clamp as _e } from "./index215.js";
|
|
3
|
-
import { hash as L } from "./
|
|
4
|
-
import { isNil as V } from "./
|
|
5
|
-
import { when as ke } from "./
|
|
3
|
+
import { hash as L } from "./index227.js";
|
|
4
|
+
import { isNil as V } from "./index218.js";
|
|
5
|
+
import { when as ke } from "./index238.js";
|
|
6
6
|
import { useId as ve } from "./index8.js";
|
|
7
|
-
import { useItemValue as
|
|
8
|
-
import { useItemsGetter as
|
|
9
|
-
import { usePrefill as ge } from "./
|
|
10
|
-
import { useIndexById as Ce } from "./
|
|
11
|
-
import { useBaseOptions as we } from "./
|
|
12
|
-
import { useHashedWatcher as Ve } from "./
|
|
13
|
-
import { useLocale as Be } from "./
|
|
7
|
+
import { useItemValue as fe } from "./index281.js";
|
|
8
|
+
import { useItemsGetter as he } from "./index236.js";
|
|
9
|
+
import { usePrefill as ge } from "./index237.js";
|
|
10
|
+
import { useIndexById as Ce } from "./index235.js";
|
|
11
|
+
import { useBaseOptions as we } from "./index232.js";
|
|
12
|
+
import { useHashedWatcher as Ve } from "./index234.js";
|
|
13
|
+
import { useLocale as Be } from "./index225.js";
|
|
14
14
|
import G from "./index17.js";
|
|
15
15
|
/* empty css */
|
|
16
16
|
import Te from "./index31.js";
|
|
17
17
|
/* empty css */
|
|
18
|
-
import { columnKeyToSlotName as $e, mergeHeaderClasses as Ie, applyFixedTableColumns as Ae, mergeCellClasses as Ne } from "./
|
|
19
|
-
import { useLogger as De } from "./
|
|
18
|
+
import { columnKeyToSlotName as $e, mergeHeaderClasses as Ie, applyFixedTableColumns as Ae, mergeCellClasses as Ne } from "./index290.js";
|
|
19
|
+
import { useLogger as De } from "./index273.js";
|
|
20
20
|
const He = {
|
|
21
21
|
key: 0,
|
|
22
22
|
class: "sr-only"
|
|
@@ -84,16 +84,16 @@ const He = {
|
|
|
84
84
|
unselectedItems: { default: () => [] },
|
|
85
85
|
columns: { default: () => [] }
|
|
86
86
|
}, {
|
|
87
|
-
selectAll: { type: Boolean, required: !
|
|
87
|
+
selectAll: { type: Boolean, required: !1, default: !1 },
|
|
88
88
|
selectAllModifiers: {}
|
|
89
89
|
}),
|
|
90
90
|
emits: /* @__PURE__ */ U(["click:row", "contextmenu:row", "dblclick:row", "update:modelValue", "update:selectAll", "update:unselectedItems", "item:selected", "item:unselected"], ["update:selectAll"]),
|
|
91
91
|
setup(x, { emit: J }) {
|
|
92
|
-
const { getItemValue: Q } =
|
|
92
|
+
const { getItemValue: Q } = fe(), S = ve().id.value, l = x, i = J;
|
|
93
93
|
l.multiple && !Array.isArray(l.modelValue) && De().throw(
|
|
94
94
|
"BbTable is set for multiple selection but modelValue is not an array."
|
|
95
95
|
);
|
|
96
|
-
const { t: C } = Be(), R = ie(), X = (e) => [C("table.select").value, ...e.map((n) => n.content)].join(" "), Y = c(() => l.selectable ? "fieldset" : "div"), I = c(() => l.loading || ee.value),
|
|
96
|
+
const { t: C } = Be(), R = ie(), X = (e) => [C("table.select").value, ...e.map((n) => n.content)].join(" "), Y = c(() => l.selectable ? "fieldset" : "div"), I = c(() => l.loading || ee.value), f = c(
|
|
97
97
|
() => !V(l.page) && !V(l.perPage) && !V(l.totalItems)
|
|
98
98
|
), Z = c(() => ({
|
|
99
99
|
"bb-table": !0,
|
|
@@ -114,7 +114,7 @@ const He = {
|
|
|
114
114
|
getter: M,
|
|
115
115
|
items: A,
|
|
116
116
|
loading: ee
|
|
117
|
-
} =
|
|
117
|
+
} = he({
|
|
118
118
|
items: D(l, "items")
|
|
119
119
|
}), { hasPrefilled: le } = ge({
|
|
120
120
|
onStart: !0,
|
|
@@ -187,7 +187,7 @@ const He = {
|
|
|
187
187
|
})
|
|
188
188
|
), E = c(
|
|
189
189
|
() => B.value.map((e, n) => {
|
|
190
|
-
const a = !l.selectable || typeof l.selectable == "function" && !l.selectable(e.item) || !!e.disabled, d =
|
|
190
|
+
const a = !l.selectable || typeof l.selectable == "function" && !l.selectable(e.item) || !!e.disabled, d = f.value ? n + (l.page - 1) * l.perPage + 2 : void 0, b = l.columns.map(
|
|
191
191
|
(v) => se(v, e)
|
|
192
192
|
);
|
|
193
193
|
return {
|
|
@@ -251,7 +251,7 @@ const He = {
|
|
|
251
251
|
ref_key: "containerRef",
|
|
252
252
|
ref: R,
|
|
253
253
|
"aria-busy": I.value,
|
|
254
|
-
"aria-rowcount":
|
|
254
|
+
"aria-rowcount": f.value ? l.totalItems : void 0,
|
|
255
255
|
class: r(Z.value),
|
|
256
256
|
inert: e.disabled
|
|
257
257
|
}, {
|
|
@@ -268,7 +268,7 @@ const He = {
|
|
|
268
268
|
o("thead", null, [
|
|
269
269
|
p(e.$slots, "thead", {}, () => [
|
|
270
270
|
o("tr", {
|
|
271
|
-
"aria-rowindex":
|
|
271
|
+
"aria-rowindex": f.value ? 1 : void 0,
|
|
272
272
|
class: "bb-table-header-row"
|
|
273
273
|
}, [
|
|
274
274
|
e.selectable ? (t(), s("th", {
|
|
@@ -303,7 +303,7 @@ const He = {
|
|
|
303
303
|
])
|
|
304
304
|
])
|
|
305
305
|
], 2)) : m("", !0),
|
|
306
|
-
(t(!0), s(
|
|
306
|
+
(t(!0), s(h, null, g(oe.value, (a) => (t(), s("th", {
|
|
307
307
|
key: a.key,
|
|
308
308
|
"aria-sort": a.sortDirection,
|
|
309
309
|
class: r(["bb-table-header", a.classes]),
|
|
@@ -334,15 +334,15 @@ const He = {
|
|
|
334
334
|
key: 0,
|
|
335
335
|
items: y(A)
|
|
336
336
|
}, () => [
|
|
337
|
-
(t(!0), s(
|
|
337
|
+
(t(!0), s(h, null, g(K.value, (a, d) => (t(), s("tr", {
|
|
338
338
|
key: d,
|
|
339
|
-
"aria-rowindex":
|
|
339
|
+
"aria-rowindex": f.value ? d + 2 : void 0,
|
|
340
340
|
class: "bb-table-skeleton__row"
|
|
341
341
|
}, [
|
|
342
342
|
e.selectable ? (t(), s("td", Ee, n[1] || (n[1] = [
|
|
343
343
|
o("div", { class: "bb-table-skeleton__placeholder" }, null, -1)
|
|
344
344
|
]))) : m("", !0),
|
|
345
|
-
(t(!0), s(
|
|
345
|
+
(t(!0), s(h, null, g(l.columns, (b, w) => (t(), s("td", {
|
|
346
346
|
key: b.key,
|
|
347
347
|
class: r([
|
|
348
348
|
"bb-table-skeleton__cell",
|
|
@@ -385,7 +385,7 @@ const He = {
|
|
|
385
385
|
]))) : m("", !0)
|
|
386
386
|
], 8, ze))), 128)),
|
|
387
387
|
o("tr", {
|
|
388
|
-
"aria-rowindex":
|
|
388
|
+
"aria-rowindex": f.value ? K.value + 2 : void 0,
|
|
389
389
|
class: "bb-table-loading__row bb-table-loading__row--sr-only"
|
|
390
390
|
}, [
|
|
391
391
|
o("td", {
|
|
@@ -398,7 +398,7 @@ const He = {
|
|
|
398
398
|
], 8, Qe)
|
|
399
399
|
], 8, Je)
|
|
400
400
|
]) : y(B).length ? p(e.$slots, "tbody", { key: 2 }, () => [
|
|
401
|
-
(t(!0), s(
|
|
401
|
+
(t(!0), s(h, null, g(E.value, (a) => (t(), s("tr", {
|
|
402
402
|
key: a.valueHash,
|
|
403
403
|
"aria-rowindex": a.rowIndex,
|
|
404
404
|
class: "bb-table-data__row",
|
|
@@ -451,7 +451,7 @@ const He = {
|
|
|
451
451
|
], 2))
|
|
452
452
|
])
|
|
453
453
|
], 2)) : m("", !0),
|
|
454
|
-
(t(!0), s(
|
|
454
|
+
(t(!0), s(h, null, g(a.cols, (d) => (t(), s("td", {
|
|
455
455
|
key: d.key,
|
|
456
456
|
class: r(["bb-table-data__cell", d.classes])
|
|
457
457
|
}, [
|
|
@@ -476,7 +476,7 @@ const He = {
|
|
|
476
476
|
], 40, ll))), 128))
|
|
477
477
|
]) : p(e.$slots, "no-data", { key: 1 }, () => [
|
|
478
478
|
o("tr", {
|
|
479
|
-
"aria-rowindex":
|
|
479
|
+
"aria-rowindex": f.value ? 2 : void 0,
|
|
480
480
|
class: "bb-table-no-data__row"
|
|
481
481
|
}, [
|
|
482
482
|
o("td", {
|
|
@@ -492,7 +492,7 @@ const He = {
|
|
|
492
492
|
p(e.$slots, "tfoot")
|
|
493
493
|
])
|
|
494
494
|
]),
|
|
495
|
-
(t(!0), s(
|
|
495
|
+
(t(!0), s(h, null, g(de.value, (a) => (t(), s("input", ye({
|
|
496
496
|
key: a.value,
|
|
497
497
|
ref_for: !0
|
|
498
498
|
}, a), null, 16))), 128))
|