orion-design 1.0.4 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Throne/index.d.ts +0 -2
- package/dist/Throne/index.js +7 -13
- package/dist/Throne/index.js.map +1 -1
- package/dist/auth/index.d.ts +16 -0
- package/dist/auth/index.js +49 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/components/Edittable/columns/EdittableColumnDate.d.ts +1 -1
- package/dist/components/Edittable/columns/EdittableColumnMultiselect.d.ts +1 -1
- package/dist/components/Edittable/columns/EdittableColumnNumber.d.ts +1 -1
- package/dist/components/Edittable/columns/EdittableColumnSingleselect.d.ts +1 -1
- package/dist/components/Form/Form.d.ts +2 -2
- package/dist/components/Form/Form.js.map +1 -1
- package/dist/components/Tabs/index.d.ts +114 -56
- package/dist/components/Tabs/index.js +88 -464
- package/dist/components/Tabs/index.js.map +1 -1
- package/dist/components/Tabs/tab-pane.d.ts +8 -16
- package/dist/components/Tabs/tab-pane.js +1 -34
- package/dist/components/Tabs/tab-pane.js.map +1 -1
- package/dist/components/Tabs/tab-pane.vue.d.ts +3 -28
- package/dist/components/Tabs/tabs.d.ts +12 -101
- package/dist/components/Tabs/tabs.js +2 -0
- package/dist/components/Tabs/tabs.js.map +1 -0
- package/dist/components/Tabs/tabs.vue.d.ts +63 -0
- package/dist/components/_util/browser.js +2 -2
- package/dist/components/_util/dom/element.js +1 -1
- package/dist/components/_util/dom/position.js +1 -1
- package/dist/components/_util/dom/scroll.js +1 -1
- package/dist/components/_util/dom/style.js +1 -1
- package/dist/components/_util/index.js +1 -1
- package/dist/components/_util/raf.js +1 -1
- package/dist/components/_util/vue/global-node.js +1 -1
- package/dist/components/components.d.ts +0 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +14 -14
- package/dist/components/index.js.map +1 -1
- package/dist/index-C8JNJPWW.js +8 -0
- package/dist/{index-C9tCD90X.js.map → index-C8JNJPWW.js.map} +1 -1
- package/dist/index.css +1 -1
- package/dist/version/version.d.ts +1 -1
- package/dist/version/version.js +1 -1
- package/dist/version/version.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/Tabs/constants.d.ts +0 -19
- package/dist/components/Tabs/constants.js +0 -5
- package/dist/components/Tabs/constants.js.map +0 -1
- package/dist/components/Tabs/tab-bar.d.ts +0 -59
- package/dist/components/Tabs/tab-bar.js +0 -15
- package/dist/components/Tabs/tab-bar.js.map +0 -1
- package/dist/components/Tabs/tab-bar.vue.d.ts +0 -131
- package/dist/components/Tabs/tab-nav.d.ts +0 -237
- package/dist/index-C9tCD90X.js +0 -45
@@ -1,475 +1,99 @@
|
|
1
1
|
import "lodash-es";
|
2
|
-
import {
|
3
|
-
import { withInstall as
|
4
|
-
import {
|
5
|
-
|
6
|
-
import { e as Re } from "../../functions-LOH6x_02.js";
|
7
|
-
import { buildProps as be, definePropType as pe } from "../_util/vue/props/runtime.js";
|
8
|
-
import { UPDATE_MODEL_EVENT as me } from "../_constants/event.js";
|
9
|
-
import { useNamespace as V } from "../_hooks/use-namespace/index.js";
|
10
|
-
import { useOrderedChildren as Ae } from "../_hooks/use-ordered-children/index.js";
|
11
|
-
import { tabsRootContextKey as Q } from "./constants.js";
|
12
|
-
import { t as he, r as ye, i as Oe, b as Le, n as Fe, c as Me, d as Ve, e as Z } from "../../index-C9tCD90X.js";
|
13
|
-
import { capitalize as I } from "../_util/strings.js";
|
14
|
-
import { throwError as q } from "../_util/error.js";
|
15
|
-
import { g as Qe, i as Ue } from "../../index-CIR6wX_E.js";
|
16
|
-
import { mutable as We } from "../_util/typescript.js";
|
17
|
-
import { EVENT_CODE as je } from "../_constants/aria.js";
|
18
|
-
import { tabBarProps as De } from "./tab-bar.js";
|
19
|
-
import { tabPaneProps as He } from "./tab-pane.js";
|
20
|
-
function ge(e) {
|
21
|
-
var t;
|
22
|
-
const a = ye(e);
|
23
|
-
return (t = a == null ? void 0 : a.$el) != null ? t : a;
|
24
|
-
}
|
25
|
-
const G = Oe ? window : void 0, Ke = Oe ? window.document : void 0;
|
26
|
-
function W(...e) {
|
27
|
-
let t, a, s, n;
|
28
|
-
if (Le(e[0]) || Array.isArray(e[0]) ? ([a, s, n] = e, t = G) : [t, a, s, n] = e, !t)
|
29
|
-
return Fe;
|
30
|
-
Array.isArray(a) || (a = [a]), Array.isArray(s) || (s = [s]);
|
31
|
-
const P = [], d = () => {
|
32
|
-
P.forEach((r) => r()), P.length = 0;
|
33
|
-
}, u = (r, i, f, b) => (r.addEventListener(i, f, b), () => r.removeEventListener(i, f, b)), y = B(() => [ge(t), ye(n)], ([r, i]) => {
|
34
|
-
d(), r && P.push(...a.flatMap((f) => s.map((b) => u(r, f, b, i))));
|
35
|
-
}, { immediate: !0, flush: "post" }), v = () => {
|
36
|
-
y(), d();
|
37
|
-
};
|
38
|
-
return he(v), v;
|
39
|
-
}
|
40
|
-
function qe(e, t = !1) {
|
41
|
-
const a = h(), s = () => a.value = !!e();
|
42
|
-
return s(), Me(s, t), a;
|
43
|
-
}
|
44
|
-
const ee = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, te = "__vueuse_ssr_handlers__";
|
45
|
-
ee[te] = ee[te] || {};
|
46
|
-
function Ge({ document: e = Ke } = {}) {
|
47
|
-
if (!e)
|
48
|
-
return h("visible");
|
49
|
-
const t = h(e.visibilityState);
|
50
|
-
return W(e, "visibilitychange", () => {
|
51
|
-
t.value = e.visibilityState;
|
52
|
-
}), t;
|
53
|
-
}
|
54
|
-
var ae = Object.getOwnPropertySymbols, Xe = Object.prototype.hasOwnProperty, Ye = Object.prototype.propertyIsEnumerable, Je = (e, t) => {
|
55
|
-
var a = {};
|
56
|
-
for (var s in e)
|
57
|
-
Xe.call(e, s) && t.indexOf(s) < 0 && (a[s] = e[s]);
|
58
|
-
if (e != null && ae)
|
59
|
-
for (var s of ae(e))
|
60
|
-
t.indexOf(s) < 0 && Ye.call(e, s) && (a[s] = e[s]);
|
61
|
-
return a;
|
62
|
-
};
|
63
|
-
function j(e, t, a = {}) {
|
64
|
-
const s = a, { window: n = G } = s, P = Je(s, ["window"]);
|
65
|
-
let d;
|
66
|
-
const u = qe(() => n && "ResizeObserver" in n), y = () => {
|
67
|
-
d && (d.disconnect(), d = void 0);
|
68
|
-
}, v = B(() => ge(e), (i) => {
|
69
|
-
y(), u.value && n && i && (d = new ResizeObserver(t), d.observe(i, P));
|
70
|
-
}, { immediate: !0, flush: "post" }), r = () => {
|
71
|
-
y(), v();
|
72
|
-
};
|
73
|
-
return he(r), {
|
74
|
-
isSupported: u,
|
75
|
-
stop: r
|
76
|
-
};
|
77
|
-
}
|
78
|
-
var ne;
|
79
|
-
(function(e) {
|
80
|
-
e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
|
81
|
-
})(ne || (ne = {}));
|
82
|
-
var Ze = Object.defineProperty, se = Object.getOwnPropertySymbols, et = Object.prototype.hasOwnProperty, tt = Object.prototype.propertyIsEnumerable, oe = (e, t, a) => t in e ? Ze(e, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : e[t] = a, at = (e, t) => {
|
83
|
-
for (var a in t || (t = {}))
|
84
|
-
et.call(t, a) && oe(e, a, t[a]);
|
85
|
-
if (se)
|
86
|
-
for (var a of se(t))
|
87
|
-
tt.call(t, a) && oe(e, a, t[a]);
|
88
|
-
return e;
|
89
|
-
};
|
90
|
-
const nt = {
|
91
|
-
easeInSine: [0.12, 0, 0.39, 0],
|
92
|
-
easeOutSine: [0.61, 1, 0.88, 1],
|
93
|
-
easeInOutSine: [0.37, 0, 0.63, 1],
|
94
|
-
easeInQuad: [0.11, 0, 0.5, 0],
|
95
|
-
easeOutQuad: [0.5, 1, 0.89, 1],
|
96
|
-
easeInOutQuad: [0.45, 0, 0.55, 1],
|
97
|
-
easeInCubic: [0.32, 0, 0.67, 0],
|
98
|
-
easeOutCubic: [0.33, 1, 0.68, 1],
|
99
|
-
easeInOutCubic: [0.65, 0, 0.35, 1],
|
100
|
-
easeInQuart: [0.5, 0, 0.75, 0],
|
101
|
-
easeOutQuart: [0.25, 1, 0.5, 1],
|
102
|
-
easeInOutQuart: [0.76, 0, 0.24, 1],
|
103
|
-
easeInQuint: [0.64, 0, 0.78, 0],
|
104
|
-
easeOutQuint: [0.22, 1, 0.36, 1],
|
105
|
-
easeInOutQuint: [0.83, 0, 0.17, 1],
|
106
|
-
easeInExpo: [0.7, 0, 0.84, 0],
|
107
|
-
easeOutExpo: [0.16, 1, 0.3, 1],
|
108
|
-
easeInOutExpo: [0.87, 0, 0.13, 1],
|
109
|
-
easeInCirc: [0.55, 0, 1, 0.45],
|
110
|
-
easeOutCirc: [0, 0.55, 0.45, 1],
|
111
|
-
easeInOutCirc: [0.85, 0, 0.15, 1],
|
112
|
-
easeInBack: [0.36, 0, 0.66, -0.56],
|
113
|
-
easeOutBack: [0.34, 1.56, 0.64, 1],
|
114
|
-
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
|
115
|
-
};
|
116
|
-
at({
|
117
|
-
linear: Ve
|
118
|
-
}, nt);
|
119
|
-
function st({ window: e = G } = {}) {
|
120
|
-
if (!e)
|
121
|
-
return h(!1);
|
122
|
-
const t = h(e.document.hasFocus());
|
123
|
-
return W(e, "blur", () => {
|
124
|
-
t.value = !1;
|
125
|
-
}), W(e, "focus", () => {
|
126
|
-
t.value = !0;
|
127
|
-
}), t;
|
128
|
-
}
|
129
|
-
const re = "OTabBar", ot = /* @__PURE__ */ M({
|
130
|
-
name: re,
|
131
|
-
__name: "tab-bar",
|
132
|
-
props: De,
|
133
|
-
setup(e, { expose: t }) {
|
134
|
-
const a = e, s = D(), n = H(Q);
|
135
|
-
n || q(re, "<o-tabs><o-tab-bar /></p-tabs>");
|
136
|
-
const P = V("tabs"), d = h(), u = h(), y = () => {
|
137
|
-
let b = 0, o = 0;
|
138
|
-
const p = ["top", "bottom"].includes(n.props.tabPosition) ? "width" : "height", N = p === "width" ? "x" : "y", x = N === "x" ? "left" : "top";
|
139
|
-
return a.tabs.every((C) => {
|
140
|
-
var A, R;
|
141
|
-
const $ = (R = (A = s.parent) == null ? void 0 : A.refs) == null ? void 0 : R[`tab-${C.uid}`];
|
142
|
-
if (!$) return !1;
|
143
|
-
if (!C.active)
|
144
|
-
return !0;
|
145
|
-
b = $[`offset${I(x)}`], o = $[`client${I(p)}`];
|
146
|
-
const z = window.getComputedStyle($);
|
147
|
-
return p === "width" && (o -= Number.parseFloat(z.paddingLeft) + Number.parseFloat(z.paddingRight), b += Number.parseFloat(z.paddingLeft)), !1;
|
148
|
-
}), {
|
149
|
-
[p]: `${o}px`,
|
150
|
-
transform: `translate${I(N)}(${b}px)`
|
151
|
-
};
|
152
|
-
}, v = () => u.value = y(), r = [], i = () => {
|
153
|
-
var o;
|
154
|
-
r.forEach((p) => p.stop()), r.length = 0;
|
155
|
-
const b = (o = s.parent) == null ? void 0 : o.refs;
|
156
|
-
if (b) {
|
157
|
-
for (const p in b)
|
158
|
-
if (p.startsWith("tab-")) {
|
159
|
-
const N = b[p];
|
160
|
-
N && r.push(j(N, v));
|
161
|
-
}
|
162
|
-
}
|
163
|
-
};
|
164
|
-
B(
|
165
|
-
() => a.tabs,
|
166
|
-
async () => {
|
167
|
-
await K(), v(), i();
|
168
|
-
},
|
169
|
-
{ immediate: !0 }
|
170
|
-
);
|
171
|
-
const f = j(d, () => v());
|
172
|
-
return Pe(() => {
|
173
|
-
r.forEach((b) => b.stop()), r.length = 0, f.stop();
|
174
|
-
}), t({
|
175
|
-
/** @description tab root html element */
|
176
|
-
ref: d,
|
177
|
-
/** @description method to manually update tab bar style */
|
178
|
-
update: v
|
179
|
-
}), (b, o) => (ue(), fe("div", {
|
180
|
-
ref_key: "barRef",
|
181
|
-
ref: d,
|
182
|
-
class: de([k(P).e("active-bar"), k(P).is(k(n).props.tabPosition)]),
|
183
|
-
style: Ne(u.value)
|
184
|
-
}, null, 6));
|
185
|
-
}
|
186
|
-
}), rt = be({
|
187
|
-
panes: {
|
188
|
-
type: pe(Array),
|
189
|
-
default: () => We([])
|
190
|
-
},
|
191
|
-
currentName: {
|
192
|
-
type: [String, Number],
|
193
|
-
default: ""
|
194
|
-
},
|
195
|
-
type: {
|
196
|
-
type: String,
|
197
|
-
values: ["card", "border-card", ""],
|
198
|
-
default: "card"
|
199
|
-
},
|
200
|
-
stretch: Boolean
|
201
|
-
}), it = {
|
202
|
-
tabClick: (e, t, a) => a instanceof Event,
|
203
|
-
tabRemove: (e, t) => t instanceof Event
|
204
|
-
}, ie = "OTabNav", lt = /* @__PURE__ */ M({
|
205
|
-
name: ie,
|
206
|
-
props: rt,
|
207
|
-
emits: it,
|
208
|
-
setup(e, {
|
209
|
-
expose: t,
|
210
|
-
emit: a
|
211
|
-
}) {
|
212
|
-
const s = H(Q);
|
213
|
-
s || q(ie, "<o-tabs><o-tab-nav /></o-tabs>");
|
214
|
-
const n = V("tabs"), P = Ge(), d = st(), u = h(), y = h(), v = h(), r = h(), i = h(!1), f = h(0), b = h(!1), o = h(!0), p = F(() => ["top", "bottom"].includes(s.props.tabPosition) ? "width" : "height"), N = F(() => ({
|
215
|
-
transform: `translate${p.value === "width" ? "X" : "Y"}(-${f.value}px)`
|
216
|
-
})), x = () => {
|
217
|
-
if (!u.value) return;
|
218
|
-
const l = u.value[`offset${I(p.value)}`], m = f.value;
|
219
|
-
if (!m) return;
|
220
|
-
const c = m > l ? m - l : 0;
|
221
|
-
f.value = c;
|
222
|
-
}, C = () => {
|
223
|
-
if (!u.value || !y.value) return;
|
224
|
-
const l = y.value[`offset${I(p.value)}`], m = u.value[`offset${I(p.value)}`], c = f.value;
|
225
|
-
if (l - c <= m) return;
|
226
|
-
const w = l - c > m * 2 ? c + m : l - m;
|
227
|
-
f.value = w;
|
228
|
-
}, $ = async () => {
|
229
|
-
const l = y.value;
|
230
|
-
if (!i.value || !v.value || !u.value || !l) return;
|
231
|
-
await K();
|
232
|
-
const m = v.value.querySelector(".is-active");
|
233
|
-
if (!m) return;
|
234
|
-
const c = u.value, w = ["top", "bottom"].includes(s.props.tabPosition), E = m.getBoundingClientRect(), _ = c.getBoundingClientRect(), S = w ? l.offsetWidth - _.width : l.offsetHeight - _.height, T = f.value;
|
235
|
-
let g = T;
|
236
|
-
w ? (E.left < _.left && (g = T - (_.left - E.left)), E.right > _.right && (g = T + E.right - _.right)) : (E.top < _.top && (g = T - (_.top - E.top)), E.bottom > _.bottom && (g = T + (E.bottom - _.bottom))), g = Math.max(g, 0), f.value = Math.min(g, S);
|
237
|
-
}, z = () => {
|
238
|
-
var w;
|
239
|
-
if (!y.value || !u.value) return;
|
240
|
-
e.stretch && ((w = r.value) == null || w.update());
|
241
|
-
const l = y.value[`offset${I(p.value)}`], m = u.value[`offset${I(p.value)}`], c = f.value;
|
242
|
-
m < l ? (i.value = i.value || {}, i.value.prev = c, i.value.next = c + m < l, l - c < m && (f.value = l - m)) : (i.value = !1, c > 0 && (f.value = 0));
|
243
|
-
}, A = (l) => {
|
244
|
-
const m = l.code, {
|
245
|
-
up: c,
|
246
|
-
down: w,
|
247
|
-
left: E,
|
248
|
-
right: _
|
249
|
-
} = je;
|
250
|
-
if (![c, w, E, _].includes(m)) return;
|
251
|
-
const S = Array.from(l.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)")), T = S.indexOf(l.target);
|
252
|
-
let g;
|
253
|
-
m === E || m === c ? T === 0 ? g = S.length - 1 : g = T - 1 : T < S.length - 1 ? g = T + 1 : g = 0, S[g].focus({
|
254
|
-
preventScroll: !0
|
255
|
-
}), S[g].click(), R();
|
256
|
-
}, R = () => {
|
257
|
-
o.value && (b.value = !0);
|
258
|
-
}, U = () => b.value = !1;
|
259
|
-
return B(P, (l) => {
|
260
|
-
l === "hidden" ? o.value = !1 : l === "visible" && setTimeout(() => o.value = !0, 50);
|
261
|
-
}), B(d, (l) => {
|
262
|
-
l ? setTimeout(() => o.value = !0, 50) : o.value = !1;
|
263
|
-
}), j(v, z), ve(() => setTimeout(() => $(), 0)), Ee(() => z()), t({
|
264
|
-
scrollToActiveTab: $,
|
265
|
-
removeFocus: U
|
266
|
-
}), () => {
|
267
|
-
const l = i.value ? [O("span", {
|
268
|
-
class: [n.e("nav-prev"), n.is("disabled", !i.value.prev)],
|
269
|
-
onClick: x
|
270
|
-
}, [O(J, null, {
|
271
|
-
default: () => [O(Qe, null, null)]
|
272
|
-
})]), O("span", {
|
273
|
-
class: [n.e("nav-next"), n.is("disabled", !i.value.next)],
|
274
|
-
onClick: C
|
275
|
-
}, [O(J, null, {
|
276
|
-
default: () => [O(Ue, null, null)]
|
277
|
-
})])] : null, m = e.panes.map((c, w) => {
|
278
|
-
var X, Y;
|
279
|
-
const E = c.uid, _ = c.props.disabled, S = c.props.name ?? c.index ?? `${w}`;
|
280
|
-
c.index = `${w}`;
|
281
|
-
const T = ((Y = (X = c.slots).label) == null ? void 0 : Y.call(X)) || c.props.label, g = !_ && c.active ? 0 : -1;
|
282
|
-
return O("div", {
|
283
|
-
ref: `tab-${E}`,
|
284
|
-
class: [n.e("item"), n.is(s.props.tabPosition), n.is("active", c.active), n.is("disabled", _), n.is("focus", b.value)],
|
285
|
-
id: `tab-${S}`,
|
286
|
-
key: `tab-${E}`,
|
287
|
-
"aria-controls": `pane-${S}`,
|
288
|
-
role: "tab",
|
289
|
-
"aria-selected": c.active,
|
290
|
-
tabindex: g,
|
291
|
-
onFocus: () => R(),
|
292
|
-
onBlur: () => U(),
|
293
|
-
onClick: (_e) => {
|
294
|
-
U(), a("tabClick", c, S, _e);
|
295
|
-
}
|
296
|
-
}, [T]);
|
297
|
-
});
|
298
|
-
return O("div", {
|
299
|
-
ref: v,
|
300
|
-
class: [n.e("nav-wrap"), n.is("scrollable", !!i.value), n.is(s.props.tabPosition)]
|
301
|
-
}, [l, O("div", {
|
302
|
-
class: n.e("nav-scroll"),
|
303
|
-
ref: u
|
304
|
-
}, [O("div", {
|
305
|
-
class: [n.e("nav"), n.is(s.props.tabPosition), n.is("stretch", e.stretch && ["top", "bottom"].includes(s.props.tabPosition))],
|
306
|
-
ref: y,
|
307
|
-
style: N.value,
|
308
|
-
role: "tablist",
|
309
|
-
onKeydown: A
|
310
|
-
}, [e.type ? null : O(ot, {
|
311
|
-
ref: r,
|
312
|
-
tabs: [...e.panes]
|
313
|
-
}, null), m])])]);
|
314
|
-
};
|
315
|
-
}
|
316
|
-
}), ct = be({
|
317
|
-
/**
|
318
|
-
* @description type of Tab
|
319
|
-
*/
|
320
|
-
type: {
|
321
|
-
type: String,
|
322
|
-
values: ["card", "border-card", ""],
|
323
|
-
default: "card"
|
324
|
-
},
|
325
|
-
/**
|
326
|
-
* @description binding value, name of the selected tab
|
327
|
-
*/
|
328
|
-
modelValue: {
|
329
|
-
type: [String, Number]
|
330
|
-
},
|
331
|
-
/**
|
332
|
-
* @description position of tabs
|
333
|
-
*/
|
334
|
-
tabPosition: {
|
335
|
-
type: String,
|
336
|
-
values: ["top", "right", "bottom", "left"],
|
337
|
-
default: "top"
|
338
|
-
},
|
339
|
-
/**
|
340
|
-
* @description hook function before switching tab. If `false` is returned or a `Promise` is returned and then is rejected, switching will be prevented
|
341
|
-
*/
|
342
|
-
beforeLeave: {
|
343
|
-
type: pe(Function),
|
344
|
-
default: () => !0
|
345
|
-
},
|
346
|
-
/**
|
347
|
-
* @description whether width of tab automatically fits its container
|
348
|
-
*/
|
349
|
-
stretch: Boolean
|
350
|
-
}), le = (e) => Re(e) || ke(e), ut = {
|
351
|
-
[me]: (e) => le(e),
|
352
|
-
tabClick: (e, t) => t instanceof Event,
|
353
|
-
tabChange: (e) => le(e)
|
354
|
-
}, ft = /* @__PURE__ */ M({
|
2
|
+
import { defineComponent as m, mergeModels as u, useSlots as f, useModel as g, computed as P, openBlock as p, createBlock as c, unref as r, createSlots as y, withCtx as o, renderSlot as s } from "vue";
|
3
|
+
import { withInstall as V } from "../_util/vue/install.js";
|
4
|
+
import { ElTabs as $, ElTabPane as z } from "element-plus";
|
5
|
+
const C = /* @__PURE__ */ m({
|
355
6
|
name: "OTabs",
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
},
|
375
|
-
|
376
|
-
}
|
377
|
-
|
378
|
-
var o;
|
379
|
-
await K(), (o = v.value) == null || o.scrollToActiveTab();
|
380
|
-
}), we(Q, {
|
381
|
-
props: e,
|
382
|
-
currentName: r,
|
383
|
-
registerPane: (o) => {
|
384
|
-
d.value.push(o);
|
385
|
-
},
|
386
|
-
sortPane: u,
|
387
|
-
unregisterPane: y
|
388
|
-
}), s({
|
389
|
-
currentName: r
|
390
|
-
});
|
391
|
-
const b = ({
|
392
|
-
render: o
|
393
|
-
}) => o();
|
394
|
-
return () => {
|
395
|
-
const o = a["left-extra"], p = a["right-extra"], N = O("div", {
|
396
|
-
class: [n.e("header"), P.value && n.e("header-vertical"), n.is(e.tabPosition)]
|
397
|
-
}, [o && O("div", {
|
398
|
-
class: n.e("extra-content-left")
|
399
|
-
}, [L(a, "left-extra")]), O(b, {
|
400
|
-
render: () => {
|
401
|
-
const C = d.value.some(($) => $.slots.label);
|
402
|
-
return O(lt, {
|
403
|
-
ref: v,
|
404
|
-
currentName: r.value,
|
405
|
-
type: e.type,
|
406
|
-
panes: d.value,
|
407
|
-
stretch: e.stretch,
|
408
|
-
onTabClick: f
|
409
|
-
}, {
|
410
|
-
$stable: !C
|
411
|
-
});
|
412
|
-
}
|
413
|
-
}, null), p && O("div", {
|
414
|
-
class: n.e("extra-content-right")
|
415
|
-
}, [L(a, "right-extra")])]), x = O("div", {
|
416
|
-
class: n.e("content")
|
417
|
-
}, [L(a, "default")]);
|
418
|
-
return O("div", {
|
419
|
-
class: [n.b(), n.m(e.tabPosition), {
|
420
|
-
[n.m("card")]: e.type === "card",
|
421
|
-
[n.m("border-card")]: e.type === "border-card"
|
422
|
-
}]
|
423
|
-
}, [x, N]);
|
7
|
+
inheritAttrs: !1,
|
8
|
+
__name: "tabs",
|
9
|
+
props: /* @__PURE__ */ u({
|
10
|
+
type: { default: "card" },
|
11
|
+
closable: { type: Boolean, default: !1 },
|
12
|
+
tabPosition: { default: "top" },
|
13
|
+
stretch: { type: Boolean, default: !1 },
|
14
|
+
beforeLeave: { type: Function, default: () => !0 }
|
15
|
+
}, {
|
16
|
+
modelValue: {},
|
17
|
+
modelModifiers: {}
|
18
|
+
}),
|
19
|
+
emits: /* @__PURE__ */ u(["tab-click", "tab-change", "tab-remove", "tab-add"], ["update:modelValue"]),
|
20
|
+
setup(n, { emit: d }) {
|
21
|
+
const a = f(), b = g(n, "modelValue"), i = P(() => a["right-extra"] && ["top", "bottom"].indexOf(n.tabPosition) > -1), l = d, h = (e, t) => {
|
22
|
+
l("tab-click", e, t);
|
23
|
+
}, v = (e) => {
|
24
|
+
l("tab-change", e);
|
25
|
+
}, T = (e) => {
|
26
|
+
l("tab-remove", e);
|
27
|
+
}, k = () => {
|
28
|
+
l("tab-add");
|
424
29
|
};
|
30
|
+
return (e, t) => (p(), c(r($), {
|
31
|
+
modelValue: b.value,
|
32
|
+
"onUpdate:modelValue": t[0] || (t[0] = (B) => b.value = B),
|
33
|
+
type: e.type,
|
34
|
+
closable: e.closable,
|
35
|
+
"tab-position": e.tabPosition,
|
36
|
+
stretch: e.stretch,
|
37
|
+
"before-leave": e.beforeLeave,
|
38
|
+
onTabClick: h,
|
39
|
+
onTabChange: v,
|
40
|
+
onTabRemove: T,
|
41
|
+
onTabAdd: k,
|
42
|
+
addable: i.value,
|
43
|
+
class: "orion-tabs"
|
44
|
+
}, y({
|
45
|
+
default: o(() => [
|
46
|
+
s(e.$slots, "default")
|
47
|
+
]),
|
48
|
+
_: 2
|
49
|
+
}, [
|
50
|
+
i.value ? {
|
51
|
+
name: "add-icon",
|
52
|
+
fn: o(() => [
|
53
|
+
s(e.$slots, "right-extra")
|
54
|
+
]),
|
55
|
+
key: "0"
|
56
|
+
} : void 0
|
57
|
+
]), 1032, ["modelValue", "type", "closable", "tab-position", "stretch", "before-leave", "addable"]));
|
425
58
|
}
|
426
|
-
}),
|
427
|
-
name:
|
59
|
+
}), A = /* @__PURE__ */ m({
|
60
|
+
name: "OTabPane",
|
61
|
+
inheritAttrs: !1,
|
428
62
|
__name: "tab-pane",
|
429
|
-
props:
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
const
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
}
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
}), (f, b) => k(r) ? $e((ue(), fe("div", {
|
450
|
-
key: 0,
|
451
|
-
id: `pane-${v.value}`,
|
452
|
-
class: de(k(P).b()),
|
453
|
-
role: "tabpanel",
|
454
|
-
"aria-hidden": !k(u),
|
455
|
-
"aria-labelledby": `tab-${v.value}`
|
63
|
+
props: {
|
64
|
+
label: { default: "" },
|
65
|
+
disabled: { type: Boolean, default: !1 },
|
66
|
+
name: {},
|
67
|
+
closable: { type: Boolean, default: !1 },
|
68
|
+
lazy: { type: Boolean, default: !1 }
|
69
|
+
},
|
70
|
+
setup(n) {
|
71
|
+
const d = f();
|
72
|
+
return (a, b) => (p(), c(r(z), {
|
73
|
+
label: a.label,
|
74
|
+
disabled: a.disabled,
|
75
|
+
name: a.name,
|
76
|
+
closable: a.closable,
|
77
|
+
lazy: a.lazy
|
78
|
+
}, y({
|
79
|
+
default: o(() => [
|
80
|
+
s(a.$slots, "default")
|
81
|
+
]),
|
82
|
+
_: 2
|
456
83
|
}, [
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
84
|
+
r(d).label ? {
|
85
|
+
name: "label",
|
86
|
+
fn: o(() => [
|
87
|
+
s(a.$slots, "label")
|
88
|
+
]),
|
89
|
+
key: "0"
|
90
|
+
} : void 0
|
91
|
+
]), 1032, ["label", "disabled", "name", "closable", "lazy"]));
|
461
92
|
}
|
462
|
-
}),
|
463
|
-
TabPane:
|
93
|
+
}), E = V(C, {
|
94
|
+
TabPane: A
|
464
95
|
});
|
465
96
|
export {
|
466
|
-
|
467
|
-
De as tabBarProps,
|
468
|
-
it as tabNavEmits,
|
469
|
-
rt as tabNavProps,
|
470
|
-
He as tabPaneProps,
|
471
|
-
ut as tabsEmits,
|
472
|
-
ct as tabsProps,
|
473
|
-
Q as tabsRootContextKey
|
97
|
+
E as default
|
474
98
|
};
|
475
99
|
//# sourceMappingURL=index.js.map
|