orion-design 0.1.15 → 0.1.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. package/README.md +5 -5
  2. package/dist/components/Form/FileInput/FileInput.vue.d.ts +2 -2
  3. package/dist/components/Form/LovInput/LovInput.d.ts +2 -0
  4. package/dist/components/Form/LovInput/LovInput.js.map +1 -1
  5. package/dist/components/Form/index.js +291 -283
  6. package/dist/components/Form/index.js.map +1 -1
  7. package/dist/components/LovTable/LovPagetable.vue.d.ts +16 -0
  8. package/dist/components/LovTable/LovQuerytable.vue.d.ts +16 -0
  9. package/dist/components/LovTable/index.d.ts +34 -2
  10. package/dist/components/LovTable/index.js +34 -44
  11. package/dist/components/LovTable/index.js.map +1 -1
  12. package/dist/components/Tabs/constants.d.ts +19 -0
  13. package/dist/components/Tabs/constants.js +5 -0
  14. package/dist/components/Tabs/constants.js.map +1 -0
  15. package/dist/components/Tabs/index.d.ts +74 -0
  16. package/dist/components/Tabs/index.js +367 -0
  17. package/dist/components/Tabs/index.js.map +1 -0
  18. package/dist/components/Tabs/tab-bar.d.ts +59 -0
  19. package/dist/components/Tabs/tab-bar.js +15 -0
  20. package/dist/components/Tabs/tab-bar.js.map +1 -0
  21. package/dist/components/Tabs/tab-bar.vue.d.ts +131 -0
  22. package/dist/components/Tabs/tab-nav.d.ts +237 -0
  23. package/dist/components/Tabs/tab-pane.d.ts +16 -0
  24. package/dist/components/Tabs/tab-pane.js +35 -0
  25. package/dist/components/Tabs/tab-pane.js.map +1 -0
  26. package/dist/components/Tabs/tab-pane.vue.d.ts +43 -0
  27. package/dist/components/Tabs/tabs.d.ts +101 -0
  28. package/dist/components/_constants/aria.d.ts +17 -0
  29. package/dist/components/_constants/aria.js +25 -0
  30. package/dist/components/_constants/aria.js.map +1 -0
  31. package/dist/components/_constants/event.d.ts +3 -0
  32. package/dist/components/_constants/event.js +7 -0
  33. package/dist/components/_constants/event.js.map +1 -0
  34. package/dist/components/_constants/index.d.ts +2 -0
  35. package/dist/components/_constants/index.js +9 -0
  36. package/dist/components/_constants/index.js.map +1 -0
  37. package/dist/components/_hooks/index.d.ts +2 -0
  38. package/dist/components/_hooks/index.js +10 -0
  39. package/dist/components/_hooks/index.js.map +1 -0
  40. package/dist/components/_hooks/use-namespace/index.d.ts +23 -0
  41. package/dist/components/_hooks/use-namespace/index.js +46 -0
  42. package/dist/components/_hooks/use-namespace/index.js.map +1 -0
  43. package/dist/components/_hooks/use-ordered-children/index.d.ts +8 -0
  44. package/dist/components/_hooks/use-ordered-children/index.js +27 -0
  45. package/dist/components/_hooks/use-ordered-children/index.js.map +1 -0
  46. package/dist/components/_util/arrays.js.map +1 -1
  47. package/dist/components/_util/browser.js +2 -2
  48. package/dist/components/_util/browser.js.map +1 -1
  49. package/dist/components/_util/dom/aria.js.map +1 -1
  50. package/dist/components/_util/dom/element.js +1 -1
  51. package/dist/components/_util/dom/element.js.map +1 -1
  52. package/dist/components/_util/dom/event.js.map +1 -1
  53. package/dist/components/_util/dom/position.js +1 -1
  54. package/dist/components/_util/dom/position.js.map +1 -1
  55. package/dist/components/_util/dom/scroll.js +1 -1
  56. package/dist/components/_util/dom/scroll.js.map +1 -1
  57. package/dist/components/_util/dom/style.js +1 -1
  58. package/dist/components/_util/dom/style.js.map +1 -1
  59. package/dist/components/_util/easings.js.map +1 -1
  60. package/dist/components/_util/error.js.map +1 -1
  61. package/dist/components/_util/i18n.js.map +1 -1
  62. package/dist/components/_util/index.js +1 -1
  63. package/dist/components/_util/objects.js.map +1 -1
  64. package/dist/components/_util/raf.js +1 -1
  65. package/dist/components/_util/raf.js.map +1 -1
  66. package/dist/components/_util/rand.js.map +1 -1
  67. package/dist/components/_util/strings.js.map +1 -1
  68. package/dist/components/_util/throttleByRaf.js.map +1 -1
  69. package/dist/components/_util/types.js.map +1 -1
  70. package/dist/components/_util/typescript.js.map +1 -1
  71. package/dist/components/_util/vue/global-node.js +1 -1
  72. package/dist/components/_util/vue/global-node.js.map +1 -1
  73. package/dist/components/_util/vue/icon.js +24 -146
  74. package/dist/components/_util/vue/icon.js.map +1 -1
  75. package/dist/components/_util/vue/install.js.map +1 -1
  76. package/dist/components/_util/vue/props/runtime.js.map +1 -1
  77. package/dist/components/_util/vue/refs.js.map +1 -1
  78. package/dist/components/_util/vue/size.js.map +1 -1
  79. package/dist/components/_util/vue/validator.js.map +1 -1
  80. package/dist/components/_util/vue/vnode.js.map +1 -1
  81. package/dist/components/components.d.ts +2 -0
  82. package/dist/components/components.js +13 -11
  83. package/dist/components/components.js.map +1 -1
  84. package/dist/components/index.js +21 -19
  85. package/dist/components/index.js.map +1 -1
  86. package/dist/components-0PErqPHo.js +72 -0
  87. package/dist/{components-DXZmD0GT.js.map → components-0PErqPHo.js.map} +1 -1
  88. package/dist/index-BwWeqwHB.js +164 -0
  89. package/dist/index-BwWeqwHB.js.map +1 -0
  90. package/dist/index-DG_8kbAs.js +45 -0
  91. package/dist/{index-C8JNJPWW.js.map → index-DG_8kbAs.js.map} +1 -1
  92. package/dist/index-DLvlyWAh.js +127 -0
  93. package/dist/index-DLvlyWAh.js.map +1 -0
  94. package/dist/index.css +1 -1
  95. package/dist/index.js +21 -19
  96. package/dist/index.js.map +1 -1
  97. package/dist/version/version.d.ts +1 -1
  98. package/dist/version/version.js +1 -1
  99. package/dist/version/version.js.map +1 -1
  100. package/global.d.ts +6 -1
  101. package/package.json +3 -1
  102. package/dist/components/LovTable/LovPagetable.d.ts +0 -2
  103. package/dist/components/LovTable/LovQuerytable.d.ts +0 -2
  104. package/dist/components-DXZmD0GT.js +0 -70
  105. package/dist/index-C8JNJPWW.js +0 -8
@@ -0,0 +1,367 @@
1
+ import "lodash-es";
2
+ import { defineComponent as V, getCurrentInstance as q, inject as H, ref as P, watch as R, nextTick as K, onBeforeUnmount as ue, openBlock as ae, createElementBlock as se, normalizeClass as ne, unref as B, normalizeStyle as fe, computed as A, onMounted as oe, onUpdated as de, createVNode as f, provide as be, renderSlot as M, useSlots as ve, reactive as me, onUnmounted as pe, withDirectives as he, vShow as ge, createCommentVNode as ye } from "vue";
3
+ import { withInstall as Ne } from "../_util/vue/install.js";
4
+ import { ElIcon as G } from "element-plus";
5
+ import { isNumber as Pe, isUndefined as xe } from "../_util/types.js";
6
+ import { e as Te } from "../../functions-DzLqXvGt.js";
7
+ import { buildProps as re, definePropType as ie } from "../_util/vue/props/runtime.js";
8
+ import { UPDATE_MODEL_EVENT as le } from "../_constants/event.js";
9
+ import { useNamespace as D } from "../_hooks/use-namespace/index.js";
10
+ import { useOrderedChildren as $e } from "../_hooks/use-ordered-children/index.js";
11
+ import { tabsRootContextKey as I } from "./constants.js";
12
+ import { u as W, a as Ce, b as Se } from "../../index-DLvlyWAh.js";
13
+ import { capitalize as k } from "../_util/strings.js";
14
+ import { throwError as j } from "../_util/error.js";
15
+ import { e as Oe, f as we } from "../../index-BwWeqwHB.js";
16
+ import { mutable as Ee } from "../_util/typescript.js";
17
+ import { EVENT_CODE as _e } from "../_constants/aria.js";
18
+ import { tabBarProps as ke } from "./tab-bar.js";
19
+ import { tabPaneProps as Be } from "./tab-pane.js";
20
+ import { e as J } from "../../index-DG_8kbAs.js";
21
+ const Q = "OTabBar", ze = /* @__PURE__ */ V({
22
+ name: Q,
23
+ __name: "tab-bar",
24
+ props: ke,
25
+ setup(a, { expose: d }) {
26
+ const h = a, g = q(), e = H(I);
27
+ e || j(Q, "<o-tabs><o-tab-bar /></p-tabs>");
28
+ const _ = D("tabs"), x = P(), i = P(), T = () => {
29
+ let v = 0, t = 0;
30
+ const o = ["top", "bottom"].includes(e.props.tabPosition) ? "width" : "height", y = o === "width" ? "x" : "y", O = y === "x" ? "left" : "top";
31
+ return h.tabs.every((E) => {
32
+ var L, F;
33
+ const w = (F = (L = g.parent) == null ? void 0 : L.refs) == null ? void 0 : F[`tab-${E.uid}`];
34
+ if (!w) return !1;
35
+ if (!E.active)
36
+ return !0;
37
+ v = w[`offset${k(O)}`], t = w[`client${k(o)}`];
38
+ const z = window.getComputedStyle(w);
39
+ return o === "width" && (t -= Number.parseFloat(z.paddingLeft) + Number.parseFloat(z.paddingRight), v += Number.parseFloat(z.paddingLeft)), !1;
40
+ }), {
41
+ [o]: `${t}px`,
42
+ transform: `translate${k(y)}(${v}px)`
43
+ };
44
+ }, b = () => i.value = T(), c = [], l = () => {
45
+ var t;
46
+ c.forEach((o) => o.stop()), c.length = 0;
47
+ const v = (t = g.parent) == null ? void 0 : t.refs;
48
+ if (v) {
49
+ for (const o in v)
50
+ if (o.startsWith("tab-")) {
51
+ const y = v[o];
52
+ y && c.push(W(y, b));
53
+ }
54
+ }
55
+ };
56
+ R(
57
+ () => h.tabs,
58
+ async () => {
59
+ await K(), b(), l();
60
+ },
61
+ { immediate: !0 }
62
+ );
63
+ const u = W(x, () => b());
64
+ return ue(() => {
65
+ c.forEach((v) => v.stop()), c.length = 0, u.stop();
66
+ }), d({
67
+ /** @description tab root html element */
68
+ ref: x,
69
+ /** @description method to manually update tab bar style */
70
+ update: b
71
+ }), (v, t) => (ae(), se("div", {
72
+ ref_key: "barRef",
73
+ ref: x,
74
+ class: ne([B(_).e("active-bar"), B(_).is(B(e).props.tabPosition)]),
75
+ style: fe(i.value)
76
+ }, null, 6));
77
+ }
78
+ }), Re = re({
79
+ panes: {
80
+ type: ie(Array),
81
+ default: () => Ee([])
82
+ },
83
+ currentName: {
84
+ type: [String, Number],
85
+ default: ""
86
+ },
87
+ type: {
88
+ type: String,
89
+ values: ["card", "border-card", ""],
90
+ default: "card"
91
+ },
92
+ stretch: Boolean
93
+ }), Fe = {
94
+ tabClick: (a, d, h) => h instanceof Event,
95
+ tabRemove: (a, d) => d instanceof Event
96
+ }, Z = "OTabNav", Le = /* @__PURE__ */ V({
97
+ name: Z,
98
+ props: Re,
99
+ emits: Fe,
100
+ setup(a, {
101
+ expose: d,
102
+ emit: h
103
+ }) {
104
+ const g = H(I);
105
+ g || j(Z, "<o-tabs><o-tab-nav /></o-tabs>");
106
+ const e = D("tabs"), _ = Ce(), x = Se(), i = P(), T = P(), b = P(), c = P(), l = P(!1), u = P(0), v = P(!1), t = P(!0), o = A(() => ["top", "bottom"].includes(g.props.tabPosition) ? "width" : "height"), y = A(() => ({
107
+ transform: `translate${o.value === "width" ? "X" : "Y"}(-${u.value}px)`
108
+ })), O = () => {
109
+ if (!i.value) return;
110
+ const s = i.value[`offset${k(o.value)}`], r = u.value;
111
+ if (!r) return;
112
+ const n = r > s ? r - s : 0;
113
+ u.value = n;
114
+ }, E = () => {
115
+ if (!i.value || !T.value) return;
116
+ const s = T.value[`offset${k(o.value)}`], r = i.value[`offset${k(o.value)}`], n = u.value;
117
+ if (s - n <= r) return;
118
+ const $ = s - n > r * 2 ? n + r : s - r;
119
+ u.value = $;
120
+ }, w = async () => {
121
+ const s = T.value;
122
+ if (!l.value || !b.value || !i.value || !s) return;
123
+ await K();
124
+ const r = b.value.querySelector(".is-active");
125
+ if (!r) return;
126
+ const n = i.value, $ = ["top", "bottom"].includes(g.props.tabPosition), N = r.getBoundingClientRect(), p = n.getBoundingClientRect(), S = $ ? s.offsetWidth - p.width : s.offsetHeight - p.height, C = u.value;
127
+ let m = C;
128
+ $ ? (N.left < p.left && (m = C - (p.left - N.left)), N.right > p.right && (m = C + N.right - p.right)) : (N.top < p.top && (m = C - (p.top - N.top)), N.bottom > p.bottom && (m = C + (N.bottom - p.bottom))), m = Math.max(m, 0), u.value = Math.min(m, S);
129
+ }, z = () => {
130
+ var $;
131
+ if (!T.value || !i.value) return;
132
+ a.stretch && (($ = c.value) == null || $.update());
133
+ const s = T.value[`offset${k(o.value)}`], r = i.value[`offset${k(o.value)}`], n = u.value;
134
+ r < s ? (l.value = l.value || {}, l.value.prev = n, l.value.next = n + r < s, s - n < r && (u.value = s - r)) : (l.value = !1, n > 0 && (u.value = 0));
135
+ }, L = (s) => {
136
+ const r = s.code, {
137
+ up: n,
138
+ down: $,
139
+ left: N,
140
+ right: p
141
+ } = _e;
142
+ if (![n, $, N, p].includes(r)) return;
143
+ const S = Array.from(s.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)")), C = S.indexOf(s.target);
144
+ let m;
145
+ r === N || r === n ? C === 0 ? m = S.length - 1 : m = C - 1 : C < S.length - 1 ? m = C + 1 : m = 0, S[m].focus({
146
+ preventScroll: !0
147
+ }), S[m].click(), F();
148
+ }, F = () => {
149
+ t.value && (v.value = !0);
150
+ }, U = () => v.value = !1;
151
+ return R(_, (s) => {
152
+ s === "hidden" ? t.value = !1 : s === "visible" && setTimeout(() => t.value = !0, 50);
153
+ }), R(x, (s) => {
154
+ s ? setTimeout(() => t.value = !0, 50) : t.value = !1;
155
+ }), W(b, z), oe(() => setTimeout(() => w(), 0)), de(() => z()), d({
156
+ scrollToActiveTab: w,
157
+ removeFocus: U
158
+ }), () => {
159
+ const s = l.value ? [f("span", {
160
+ class: [e.e("nav-prev"), e.is("disabled", !l.value.prev)],
161
+ onClick: O
162
+ }, [f(G, null, {
163
+ default: () => [f(Oe, null, null)]
164
+ })]), f("span", {
165
+ class: [e.e("nav-next"), e.is("disabled", !l.value.next)],
166
+ onClick: E
167
+ }, [f(G, null, {
168
+ default: () => [f(we, null, null)]
169
+ })])] : null, r = a.panes.map((n, $) => {
170
+ var X, Y;
171
+ const N = n.uid, p = n.props.disabled, S = n.props.name ?? n.index ?? `${$}`;
172
+ n.index = `${$}`;
173
+ const C = ((Y = (X = n.slots).label) == null ? void 0 : Y.call(X)) || n.props.label, m = !p && n.active ? 0 : -1;
174
+ return f("div", {
175
+ ref: `tab-${N}`,
176
+ class: [e.e("item"), e.is(g.props.tabPosition), e.is("active", n.active), e.is("disabled", p), e.is("focus", v.value)],
177
+ id: `tab-${S}`,
178
+ key: `tab-${N}`,
179
+ "aria-controls": `pane-${S}`,
180
+ role: "tab",
181
+ "aria-selected": n.active,
182
+ tabindex: m,
183
+ onFocus: () => F(),
184
+ onBlur: () => U(),
185
+ onClick: (ce) => {
186
+ U(), h("tabClick", n, S, ce);
187
+ }
188
+ }, [C]);
189
+ });
190
+ return f("div", {
191
+ ref: b,
192
+ class: [e.e("nav-wrap"), e.is("scrollable", !!l.value), e.is(g.props.tabPosition)]
193
+ }, [s, f("div", {
194
+ class: e.e("nav-scroll"),
195
+ ref: i
196
+ }, [f("div", {
197
+ class: [e.e("nav"), e.is(g.props.tabPosition), e.is("stretch", a.stretch && ["top", "bottom"].includes(g.props.tabPosition))],
198
+ ref: T,
199
+ style: y.value,
200
+ role: "tablist",
201
+ onKeydown: L
202
+ }, [a.type ? null : f(ze, {
203
+ ref: c,
204
+ tabs: [...a.panes]
205
+ }, null), r])])]);
206
+ };
207
+ }
208
+ }), Me = re({
209
+ /**
210
+ * @description type of Tab
211
+ */
212
+ type: {
213
+ type: String,
214
+ values: ["card", "border-card", ""],
215
+ default: "card"
216
+ },
217
+ /**
218
+ * @description binding value, name of the selected tab
219
+ */
220
+ modelValue: {
221
+ type: [String, Number]
222
+ },
223
+ /**
224
+ * @description position of tabs
225
+ */
226
+ tabPosition: {
227
+ type: String,
228
+ values: ["top", "right", "bottom", "left"],
229
+ default: "top"
230
+ },
231
+ /**
232
+ * @description hook function before switching tab. If `false` is returned or a `Promise` is returned and then is rejected, switching will be prevented
233
+ */
234
+ beforeLeave: {
235
+ type: ie(Function),
236
+ default: () => !0
237
+ },
238
+ /**
239
+ * @description whether width of tab automatically fits its container
240
+ */
241
+ stretch: Boolean
242
+ }), ee = (a) => Te(a) || Pe(a), Ae = {
243
+ [le]: (a) => ee(a),
244
+ tabClick: (a, d) => d instanceof Event,
245
+ tabChange: (a) => ee(a)
246
+ }, Ve = /* @__PURE__ */ V({
247
+ name: "OTabs",
248
+ props: Me,
249
+ emits: Ae,
250
+ setup(a, {
251
+ emit: d,
252
+ slots: h,
253
+ expose: g
254
+ }) {
255
+ const e = D("tabs"), _ = A(() => ["left", "right"].includes(a.tabPosition)), {
256
+ children: x,
257
+ addChild: i,
258
+ removeChild: T
259
+ } = $e(q(), "OTabPane"), b = P(), c = P(a.modelValue ?? "0"), l = async (t, o = !1) => {
260
+ var y, O, E;
261
+ if (!(c.value === t || xe(t)))
262
+ try {
263
+ await ((y = a.beforeLeave) == null ? void 0 : y.call(a, t, c.value)) !== !1 && (c.value = t, o && (d(le, t), d("tabChange", t)), (E = (O = b.value) == null ? void 0 : O.removeFocus) == null || E.call(O));
264
+ } catch {
265
+ }
266
+ }, u = (t, o, y) => {
267
+ t.props.disabled || (l(o, !0), d("tabClick", t, y));
268
+ };
269
+ R(() => a.modelValue, (t) => l(t)), R(c, async () => {
270
+ var t;
271
+ await K(), (t = b.value) == null || t.scrollToActiveTab();
272
+ }), be(I, {
273
+ props: a,
274
+ currentName: c,
275
+ registerPane: (t) => {
276
+ x.value.push(t);
277
+ },
278
+ sortPane: i,
279
+ unregisterPane: T
280
+ }), g({
281
+ currentName: c
282
+ });
283
+ const v = ({
284
+ render: t
285
+ }) => t();
286
+ return () => {
287
+ const t = h["left-extra"], o = h["right-extra"], y = f("div", {
288
+ class: [e.e("header"), _.value && e.e("header-vertical"), e.is(a.tabPosition)]
289
+ }, [t && f("div", {
290
+ class: e.e("extra-content-left")
291
+ }, [M(h, "left-extra")]), f(v, {
292
+ render: () => {
293
+ const E = x.value.some((w) => w.slots.label);
294
+ return f(Le, {
295
+ ref: b,
296
+ currentName: c.value,
297
+ type: a.type,
298
+ panes: x.value,
299
+ stretch: a.stretch,
300
+ onTabClick: u
301
+ }, {
302
+ $stable: !E
303
+ });
304
+ }
305
+ }, null), o && f("div", {
306
+ class: e.e("extra-content-right")
307
+ }, [M(h, "right-extra")])]), O = f("div", {
308
+ class: e.e("content")
309
+ }, [M(h, "default")]);
310
+ return f("div", {
311
+ class: [e.b(), e.m(a.tabPosition), {
312
+ [e.m("card")]: a.type === "card",
313
+ [e.m("border-card")]: a.type === "border-card"
314
+ }]
315
+ }, [O, y]);
316
+ };
317
+ }
318
+ }), De = ["id", "aria-hidden", "aria-labelledby"], te = "OTabPane", Ie = /* @__PURE__ */ V({
319
+ name: te,
320
+ __name: "tab-pane",
321
+ props: Be,
322
+ setup(a) {
323
+ const d = a, h = q(), g = ve(), e = H(I);
324
+ e || j(te, "usage: <o-tabs><o-tab-pane /></o-tabs/>");
325
+ const _ = D("tab-pane"), x = P(), i = J(() => e.currentName.value === (d.name ?? x.value)), T = P(i.value), b = A(() => d.name ?? x.value), c = J(() => !d.lazy || T.value || i.value);
326
+ R(i, (u) => {
327
+ u && (T.value = !0);
328
+ });
329
+ const l = me({
330
+ uid: h.uid,
331
+ slots: g,
332
+ props: d,
333
+ paneName: b,
334
+ active: i,
335
+ index: x
336
+ });
337
+ return e.registerPane(l), oe(() => {
338
+ e.sortPane(l);
339
+ }), pe(() => {
340
+ e.unregisterPane(l.uid);
341
+ }), (u, v) => B(c) ? he((ae(), se("div", {
342
+ key: 0,
343
+ id: `pane-${b.value}`,
344
+ class: ne(B(_).b()),
345
+ role: "tabpanel",
346
+ "aria-hidden": !B(i),
347
+ "aria-labelledby": `tab-${b.value}`
348
+ }, [
349
+ M(u.$slots, "default")
350
+ ], 10, De)), [
351
+ [ge, B(i)]
352
+ ]) : ye("", !0);
353
+ }
354
+ }), lt = Ne(Ve, {
355
+ TabPane: Ie
356
+ });
357
+ export {
358
+ lt as default,
359
+ ke as tabBarProps,
360
+ Fe as tabNavEmits,
361
+ Re as tabNavProps,
362
+ Be as tabPaneProps,
363
+ Ae as tabsEmits,
364
+ Me as tabsProps,
365
+ I as tabsRootContextKey
366
+ };
367
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/components/Tabs/tab-bar.vue","../../../src/components/Tabs/tab-nav.tsx","../../../src/components/Tabs/tabs.tsx","../../../src/components/Tabs/tab-pane.vue","../../../src/components/Tabs/index.ts"],"sourcesContent":["<template>\r\n <div ref=\"barRef\" :class=\"[ns.e('active-bar'), ns.is(rootTabs.props.tabPosition)]\" :style=\"barStyle\" />\r\n</template>\r\n\r\n<script lang=\"ts\" setup>\r\nimport { getCurrentInstance, inject, nextTick, onBeforeUnmount, ref, watch } from 'vue'\r\nimport { useResizeObserver } from '@vueuse/core'\r\nimport { capitalize, throwError } from '../_util'\r\nimport { useNamespace } from '../_hooks'\r\nimport { tabsRootContextKey } from './constants'\r\nimport { tabBarProps } from './tab-bar'\r\n\r\nimport type { CSSProperties } from 'vue'\r\n\r\nconst COMPONENT_NAME = 'OTabBar'\r\ndefineOptions({\r\n name: COMPONENT_NAME,\r\n})\r\nconst props = defineProps(tabBarProps)\r\n\r\nconst instance = getCurrentInstance()!\r\nconst rootTabs = inject(tabsRootContextKey)\r\nif (!rootTabs) throwError(COMPONENT_NAME, '<o-tabs><o-tab-bar /></p-tabs>')\r\n\r\nconst ns = useNamespace('tabs')\r\n\r\nconst barRef = ref<HTMLDivElement>()\r\nconst barStyle = ref<CSSProperties>()\r\n\r\nconst getBarStyle = (): CSSProperties => {\r\n let offset = 0\r\n let tabSize = 0\r\n\r\n const sizeName = ['top', 'bottom'].includes(rootTabs.props.tabPosition) ? 'width' : 'height'\r\n const sizeDir = sizeName === 'width' ? 'x' : 'y'\r\n const position = sizeDir === 'x' ? 'left' : 'top'\r\n\r\n props.tabs.every((tab) => {\r\n const $el = instance.parent?.refs?.[`tab-${tab.uid}`] as HTMLElement\r\n if (!$el) return false\r\n\r\n if (!tab.active) {\r\n return true\r\n }\r\n\r\n offset = $el[`offset${capitalize(position)}`]\r\n tabSize = $el[`client${capitalize(sizeName)}`]\r\n\r\n const tabStyles = window.getComputedStyle($el)\r\n\r\n if (sizeName === 'width') {\r\n tabSize -= Number.parseFloat(tabStyles.paddingLeft) + Number.parseFloat(tabStyles.paddingRight)\r\n offset += Number.parseFloat(tabStyles.paddingLeft)\r\n }\r\n return false\r\n })\r\n\r\n return {\r\n [sizeName]: `${tabSize}px`,\r\n transform: `translate${capitalize(sizeDir)}(${offset}px)`,\r\n }\r\n}\r\n\r\nconst update = () => (barStyle.value = getBarStyle())\r\n\r\nconst saveObserver = [] as ReturnType<typeof useResizeObserver>[]\r\nconst observerTabs = () => {\r\n saveObserver.forEach((observer) => observer.stop())\r\n saveObserver.length = 0\r\n const list = instance.parent?.refs as Record<string, HTMLElement>\r\n if (!list) return\r\n for (const key in list) {\r\n if (key.startsWith('tab-')) {\r\n const _el = list[key]\r\n if (_el) {\r\n saveObserver.push(useResizeObserver(_el, update))\r\n }\r\n }\r\n }\r\n}\r\n\r\nwatch(\r\n () => props.tabs,\r\n async () => {\r\n await nextTick()\r\n update()\r\n\r\n observerTabs()\r\n },\r\n { immediate: true }\r\n)\r\nconst barObserever = useResizeObserver(barRef, () => update())\r\n\r\nonBeforeUnmount(() => {\r\n saveObserver.forEach((observer) => observer.stop())\r\n saveObserver.length = 0\r\n barObserever.stop()\r\n})\r\n\r\ndefineExpose({\r\n /** @description tab root html element */\r\n ref: barRef,\r\n /** @description method to manually update tab bar style */\r\n update,\r\n})\r\n</script>\r\n","import { computed, defineComponent, inject, nextTick, onMounted, onUpdated, ref, watch } from 'vue'\r\nimport { useDocumentVisibility, useResizeObserver, useWindowFocus } from '@vueuse/core'\r\nimport { buildProps, capitalize, definePropType, mutable, throwError } from '../_util'\r\nimport { EVENT_CODE } from '../_constants'\r\nimport { ElIcon } from 'element-plus'\r\nimport { ArrowLeft, ArrowRight, Close } from '@element-plus/icons-vue'\r\nimport { useNamespace } from '../_hooks'\r\nimport TabBar from './tab-bar.vue'\r\nimport { tabsRootContextKey } from './constants'\r\n\r\nimport type { CSSProperties, ExtractPropTypes } from 'vue'\r\nimport type { TabsPaneContext } from './constants'\r\nimport type { TabPaneName } from './tabs'\r\n\r\ninterface Scrollable {\r\n next?: boolean\r\n prev?: number\r\n}\r\n\r\nexport const tabNavProps = buildProps({\r\n panes: {\r\n type: definePropType<TabsPaneContext[]>(Array),\r\n default: () => mutable([] as const),\r\n },\r\n currentName: {\r\n type: [String, Number],\r\n default: '',\r\n },\r\n type: {\r\n type: String,\r\n values: ['card', 'border-card', ''],\r\n default: 'card',\r\n },\r\n stretch: Boolean,\r\n} as const)\r\n\r\nexport const tabNavEmits = {\r\n tabClick: (tab: TabsPaneContext, tabName: TabPaneName, ev: Event) => ev instanceof Event,\r\n tabRemove: (tab: TabsPaneContext, ev: Event) => ev instanceof Event,\r\n}\r\n\r\nexport type TabNavProps = ExtractPropTypes<typeof tabNavProps>\r\nexport type TabNavEmits = typeof tabNavEmits\r\n\r\nconst COMPONENT_NAME = 'OTabNav'\r\nconst TabNav = defineComponent({\r\n name: COMPONENT_NAME,\r\n props: tabNavProps,\r\n emits: tabNavEmits,\r\n setup(props, { expose, emit }) {\r\n const rootTabs = inject(tabsRootContextKey)\r\n if (!rootTabs) throwError(COMPONENT_NAME, `<o-tabs><o-tab-nav /></o-tabs>`)\r\n\r\n const ns = useNamespace('tabs')\r\n const visibility = useDocumentVisibility()\r\n const focused = useWindowFocus()\r\n\r\n const navScroll$ = ref<HTMLDivElement>()\r\n const nav$ = ref<HTMLDivElement>()\r\n const el$ = ref<HTMLDivElement>()\r\n\r\n const tabBarRef = ref<InstanceType<typeof TabBar>>()\r\n\r\n const scrollable = ref<false | Scrollable>(false)\r\n const navOffset = ref(0)\r\n const isFocus = ref(false)\r\n const focusable = ref(true)\r\n\r\n const sizeName = computed(() => (['top', 'bottom'].includes(rootTabs.props.tabPosition) ? 'width' : 'height'))\r\n const navStyle = computed<CSSProperties>(() => {\r\n const dir = sizeName.value === 'width' ? 'X' : 'Y'\r\n return {\r\n transform: `translate${dir}(-${navOffset.value}px)`,\r\n }\r\n })\r\n\r\n const scrollPrev = () => {\r\n if (!navScroll$.value) return\r\n\r\n const containerSize = navScroll$.value[`offset${capitalize(sizeName.value)}`]\r\n const currentOffset = navOffset.value\r\n\r\n if (!currentOffset) return\r\n\r\n const newOffset = currentOffset > containerSize ? currentOffset - containerSize : 0\r\n\r\n navOffset.value = newOffset\r\n }\r\n\r\n const scrollNext = () => {\r\n if (!navScroll$.value || !nav$.value) return\r\n\r\n const navSize = nav$.value[`offset${capitalize(sizeName.value)}`]\r\n const containerSize = navScroll$.value[`offset${capitalize(sizeName.value)}`]\r\n const currentOffset = navOffset.value\r\n\r\n if (navSize - currentOffset <= containerSize) return\r\n\r\n const newOffset = navSize - currentOffset > containerSize * 2 ? currentOffset + containerSize : navSize - containerSize\r\n\r\n navOffset.value = newOffset\r\n }\r\n\r\n const scrollToActiveTab = async () => {\r\n const nav = nav$.value\r\n if (!scrollable.value || !el$.value || !navScroll$.value || !nav) return\r\n\r\n await nextTick()\r\n\r\n const activeTab = el$.value.querySelector('.is-active')\r\n if (!activeTab) return\r\n\r\n const navScroll = navScroll$.value\r\n const isHorizontal = ['top', 'bottom'].includes(rootTabs.props.tabPosition)\r\n const activeTabBounding = activeTab.getBoundingClientRect()\r\n const navScrollBounding = navScroll.getBoundingClientRect()\r\n const maxOffset = isHorizontal ? nav.offsetWidth - navScrollBounding.width : nav.offsetHeight - navScrollBounding.height\r\n const currentOffset = navOffset.value\r\n let newOffset = currentOffset\r\n\r\n if (isHorizontal) {\r\n if (activeTabBounding.left < navScrollBounding.left) {\r\n newOffset = currentOffset - (navScrollBounding.left - activeTabBounding.left)\r\n }\r\n if (activeTabBounding.right > navScrollBounding.right) {\r\n newOffset = currentOffset + activeTabBounding.right - navScrollBounding.right\r\n }\r\n } else {\r\n if (activeTabBounding.top < navScrollBounding.top) {\r\n newOffset = currentOffset - (navScrollBounding.top - activeTabBounding.top)\r\n }\r\n if (activeTabBounding.bottom > navScrollBounding.bottom) {\r\n newOffset = currentOffset + (activeTabBounding.bottom - navScrollBounding.bottom)\r\n }\r\n }\r\n newOffset = Math.max(newOffset, 0)\r\n navOffset.value = Math.min(newOffset, maxOffset)\r\n }\r\n\r\n const update = () => {\r\n if (!nav$.value || !navScroll$.value) return\r\n\r\n props.stretch && tabBarRef.value?.update()\r\n\r\n const navSize = nav$.value[`offset${capitalize(sizeName.value)}`]\r\n const containerSize = navScroll$.value[`offset${capitalize(sizeName.value)}`]\r\n const currentOffset = navOffset.value\r\n\r\n if (containerSize < navSize) {\r\n scrollable.value = scrollable.value || {}\r\n scrollable.value.prev = currentOffset\r\n scrollable.value.next = currentOffset + containerSize < navSize\r\n if (navSize - currentOffset < containerSize) {\r\n navOffset.value = navSize - containerSize\r\n }\r\n } else {\r\n scrollable.value = false\r\n if (currentOffset > 0) {\r\n navOffset.value = 0\r\n }\r\n }\r\n }\r\n\r\n const changeTab = (e: KeyboardEvent) => {\r\n const code = e.code\r\n\r\n const { up, down, left, right } = EVENT_CODE\r\n if (![up, down, left, right].includes(code)) return\r\n\r\n // 左右上下键更换tab\r\n const tabList = Array.from((e.currentTarget as HTMLDivElement).querySelectorAll<HTMLDivElement>('[role=tab]:not(.is-disabled)'))\r\n const currentIndex = tabList.indexOf(e.target as HTMLDivElement)\r\n\r\n let nextIndex: number\r\n if (code === left || code === up) {\r\n // left\r\n if (currentIndex === 0) {\r\n // first\r\n nextIndex = tabList.length - 1\r\n } else {\r\n nextIndex = currentIndex - 1\r\n }\r\n } else {\r\n // right\r\n if (currentIndex < tabList.length - 1) {\r\n // not last\r\n nextIndex = currentIndex + 1\r\n } else {\r\n nextIndex = 0\r\n }\r\n }\r\n tabList[nextIndex].focus({ preventScroll: true }) // 改变焦点元素\r\n tabList[nextIndex].click() // 选中下一个tab\r\n setFocus()\r\n }\r\n\r\n const setFocus = () => {\r\n if (focusable.value) isFocus.value = true\r\n }\r\n const removeFocus = () => (isFocus.value = false)\r\n\r\n watch(visibility, (visibility) => {\r\n if (visibility === 'hidden') {\r\n focusable.value = false\r\n } else if (visibility === 'visible') {\r\n setTimeout(() => (focusable.value = true), 50)\r\n }\r\n })\r\n watch(focused, (focused) => {\r\n if (focused) {\r\n setTimeout(() => (focusable.value = true), 50)\r\n } else {\r\n focusable.value = false\r\n }\r\n })\r\n\r\n useResizeObserver(el$, update)\r\n\r\n onMounted(() => setTimeout(() => scrollToActiveTab(), 0))\r\n onUpdated(() => update())\r\n\r\n expose({\r\n scrollToActiveTab,\r\n removeFocus,\r\n })\r\n\r\n return () => {\r\n const scrollBtn = scrollable.value\r\n ? [\r\n <span class={[ns.e('nav-prev'), ns.is('disabled', !scrollable.value.prev)]} onClick={scrollPrev}>\r\n <ElIcon>\r\n <ArrowLeft />\r\n </ElIcon>\r\n </span>,\r\n <span class={[ns.e('nav-next'), ns.is('disabled', !scrollable.value.next)]} onClick={scrollNext}>\r\n <ElIcon>\r\n <ArrowRight />\r\n </ElIcon>\r\n </span>,\r\n ]\r\n : null\r\n\r\n const tabs = props.panes.map((pane, index) => {\r\n const uid = pane.uid\r\n const disabled = pane.props.disabled\r\n const tabName = pane.props.name ?? pane.index ?? `${index}`\r\n pane.index = `${index}`\r\n\r\n const tabLabelContent = pane.slots.label?.() || pane.props.label\r\n const tabindex = !disabled && pane.active ? 0 : -1\r\n\r\n return (\r\n <div\r\n ref={`tab-${uid}`}\r\n class={[ns.e('item'), ns.is(rootTabs.props.tabPosition), ns.is('active', pane.active), ns.is('disabled', disabled), ns.is('focus', isFocus.value)]}\r\n id={`tab-${tabName}`}\r\n key={`tab-${uid}`}\r\n aria-controls={`pane-${tabName}`}\r\n role=\"tab\"\r\n aria-selected={pane.active}\r\n tabindex={tabindex}\r\n onFocus={() => setFocus()}\r\n onBlur={() => removeFocus()}\r\n onClick={(ev: MouseEvent) => {\r\n removeFocus()\r\n emit('tabClick', pane, tabName, ev)\r\n }}\r\n >\r\n {...[tabLabelContent]}\r\n </div>\r\n )\r\n })\r\n\r\n return (\r\n <div ref={el$} class={[ns.e('nav-wrap'), ns.is('scrollable', !!scrollable.value), ns.is(rootTabs.props.tabPosition)]}>\r\n {scrollBtn}\r\n <div class={ns.e('nav-scroll')} ref={navScroll$}>\r\n <div\r\n class={[\r\n ns.e('nav'),\r\n ns.is(rootTabs.props.tabPosition),\r\n ns.is('stretch', props.stretch && ['top', 'bottom'].includes(rootTabs.props.tabPosition)),\r\n ]}\r\n ref={nav$}\r\n style={navStyle.value}\r\n role=\"tablist\"\r\n onKeydown={changeTab}\r\n >\r\n {...[!props.type ? <TabBar ref={tabBarRef} tabs={[...props.panes]} /> : null, tabs]}\r\n </div>\r\n </div>\r\n </div>\r\n )\r\n }\r\n },\r\n})\r\n\r\nexport type TabNavInstance = InstanceType<typeof TabNav> & {\r\n scrollToActiveTab: () => Promise<void>\r\n removeFocus: () => void\r\n}\r\nexport default TabNav\r\n","import { computed, createVNode, defineComponent, getCurrentInstance, nextTick, provide, ref, renderSlot, watch } from 'vue'\r\nimport { buildProps, definePropType, isNumber, isString, isUndefined } from '../_util'\r\nimport { UPDATE_MODEL_EVENT } from '../_constants'\r\nimport { useNamespace, useOrderedChildren } from '../_hooks'\r\nimport { tabsRootContextKey } from './constants'\r\nimport TabNav from './tab-nav'\r\n\r\nimport type { TabNavInstance } from './tab-nav'\r\nimport type { TabsPaneContext } from './constants'\r\nimport type { ExtractPropTypes, FunctionalComponent, VNode } from 'vue'\r\nimport type { Awaitable } from '../_util'\r\n\r\nexport type TabPaneName = string | number\r\n\r\nexport const tabsProps = buildProps({\r\n /**\r\n * @description type of Tab\r\n */\r\n type: {\r\n type: String,\r\n values: ['card', 'border-card', ''],\r\n default: 'card',\r\n },\r\n /**\r\n * @description binding value, name of the selected tab\r\n */\r\n modelValue: {\r\n type: [String, Number],\r\n },\r\n /**\r\n * @description position of tabs\r\n */\r\n tabPosition: {\r\n type: String,\r\n values: ['top', 'right', 'bottom', 'left'],\r\n default: 'top',\r\n },\r\n /**\r\n * @description hook function before switching tab. If `false` is returned or a `Promise` is returned and then is rejected, switching will be prevented\r\n */\r\n beforeLeave: {\r\n type: definePropType<(newName: TabPaneName, oldName: TabPaneName) => Awaitable<void | boolean>>(Function),\r\n default: () => true,\r\n },\r\n /**\r\n * @description whether width of tab automatically fits its container\r\n */\r\n stretch: Boolean,\r\n} as const)\r\nexport type TabsProps = ExtractPropTypes<typeof tabsProps>\r\n\r\nconst isPaneName = (value: unknown): value is string | number => isString(value) || isNumber(value)\r\n\r\nexport const tabsEmits = {\r\n [UPDATE_MODEL_EVENT]: (name: TabPaneName) => isPaneName(name),\r\n tabClick: (pane: TabsPaneContext, ev: Event) => ev instanceof Event,\r\n tabChange: (name: TabPaneName) => isPaneName(name),\r\n}\r\nexport type TabsEmits = typeof tabsEmits\r\n\r\nexport type TabsPanes = Record<number, TabsPaneContext>\r\n\r\nconst Tabs = defineComponent({\r\n name: 'OTabs',\r\n\r\n props: tabsProps,\r\n emits: tabsEmits,\r\n\r\n setup(props, { emit, slots, expose }) {\r\n const ns = useNamespace('tabs')\r\n\r\n const isVertical = computed(() => ['left', 'right'].includes(props.tabPosition))\r\n\r\n const { children: panes, addChild: sortPane, removeChild: unregisterPane } = useOrderedChildren<TabsPaneContext>(getCurrentInstance()!, 'OTabPane')\r\n\r\n const nav$ = ref<TabNavInstance>()\r\n const currentName = ref<TabPaneName>(props.modelValue ?? '0')\r\n\r\n const setCurrentName = async (value?: TabPaneName, trigger = false) => {\r\n // should do nothing.\r\n if (currentName.value === value || isUndefined(value)) return\r\n\r\n try {\r\n const canLeave = await props.beforeLeave?.(value, currentName.value)\r\n if (canLeave !== false) {\r\n currentName.value = value\r\n if (trigger) {\r\n emit(UPDATE_MODEL_EVENT, value)\r\n emit('tabChange', value)\r\n }\r\n\r\n nav$.value?.removeFocus?.()\r\n }\r\n } catch {}\r\n }\r\n\r\n const handleTabClick = (tab: TabsPaneContext, tabName: TabPaneName, event: Event) => {\r\n if (tab.props.disabled) return\r\n setCurrentName(tabName, true)\r\n emit('tabClick', tab, event)\r\n }\r\n\r\n watch(\r\n () => props.modelValue,\r\n (modelValue) => setCurrentName(modelValue)\r\n )\r\n\r\n watch(currentName, async () => {\r\n await nextTick()\r\n nav$.value?.scrollToActiveTab()\r\n })\r\n\r\n provide(tabsRootContextKey, {\r\n props,\r\n currentName,\r\n registerPane: (pane: TabsPaneContext) => {\r\n panes.value.push(pane)\r\n },\r\n sortPane,\r\n unregisterPane,\r\n })\r\n\r\n expose({\r\n currentName,\r\n })\r\n const TabNavRenderer: FunctionalComponent<{ render: () => VNode }> = ({ render }) => {\r\n return render()\r\n }\r\n return () => {\r\n const leftExtra = slots['left-extra']\r\n const rightExtra = slots['right-extra']\r\n\r\n const header = (\r\n <div class={[ns.e('header'), isVertical.value && ns.e('header-vertical'), ns.is(props.tabPosition)]}>\r\n {leftExtra && <div class={ns.e('extra-content-left')}>{renderSlot(slots, 'left-extra')}</div>}\r\n\r\n <TabNavRenderer\r\n render={() => {\r\n const hasLabelSlot = panes.value.some((pane) => pane.slots.label)\r\n return createVNode(\r\n TabNav,\r\n {\r\n ref: nav$,\r\n currentName: currentName.value,\r\n type: props.type,\r\n panes: panes.value,\r\n stretch: props.stretch,\r\n onTabClick: handleTabClick,\r\n },\r\n { $stable: !hasLabelSlot }\r\n )\r\n }}\r\n />\r\n\r\n {rightExtra && <div class={ns.e('extra-content-right')}>{renderSlot(slots, 'right-extra')}</div>}\r\n </div>\r\n )\r\n\r\n const panels = <div class={ns.e('content')}>{renderSlot(slots, 'default')}</div>\r\n\r\n return (\r\n <div\r\n class={[\r\n ns.b(),\r\n ns.m(props.tabPosition),\r\n {\r\n [ns.m('card')]: props.type === 'card',\r\n [ns.m('border-card')]: props.type === 'border-card',\r\n },\r\n ]}\r\n >\r\n {panels}\r\n {header}\r\n </div>\r\n )\r\n }\r\n },\r\n})\r\n\r\nexport type TabsInstance = InstanceType<typeof Tabs> & {\r\n currentName: TabPaneName\r\n}\r\n\r\nexport default Tabs\r\n","<template>\r\n <div\r\n v-if=\"shouldBeRender\"\r\n v-show=\"active\"\r\n :id=\"`pane-${paneName}`\"\r\n :class=\"ns.b()\"\r\n role=\"tabpanel\"\r\n :aria-hidden=\"!active\"\r\n :aria-labelledby=\"`tab-${paneName}`\"\r\n >\r\n <slot />\r\n </div>\r\n</template>\r\n\r\n<script lang=\"ts\" setup>\r\nimport { computed, getCurrentInstance, inject, onMounted, onUnmounted, reactive, ref, useSlots, watch } from 'vue'\r\nimport { eagerComputed } from '@vueuse/core'\r\nimport { throwError } from '../_util'\r\nimport { useNamespace } from '../_hooks'\r\nimport { tabsRootContextKey } from './constants'\r\nimport { tabPaneProps } from './tab-pane'\r\n\r\nconst COMPONENT_NAME = 'OTabPane'\r\ndefineOptions({\r\n name: COMPONENT_NAME,\r\n})\r\nconst props = defineProps(tabPaneProps)\r\n\r\nconst instance = getCurrentInstance()!\r\nconst slots = useSlots()\r\n\r\nconst tabsRoot = inject(tabsRootContextKey)\r\nif (!tabsRoot) throwError(COMPONENT_NAME, 'usage: <o-tabs><o-tab-pane /></o-tabs/>')\r\n\r\nconst ns = useNamespace('tab-pane')\r\n\r\nconst index = ref<string>()\r\nconst active = eagerComputed(() => tabsRoot.currentName.value === (props.name ?? index.value))\r\nconst loaded = ref(active.value)\r\nconst paneName = computed(() => props.name ?? index.value)\r\nconst shouldBeRender = eagerComputed(() => !props.lazy || loaded.value || active.value)\r\n\r\nwatch(active, (val) => {\r\n if (val) loaded.value = true\r\n})\r\n\r\nconst pane = reactive({\r\n uid: instance.uid,\r\n slots,\r\n props,\r\n paneName,\r\n active,\r\n index,\r\n})\r\n\r\ntabsRoot.registerPane(pane)\r\nonMounted(() => {\r\n tabsRoot.sortPane(pane)\r\n})\r\n\r\nonUnmounted(() => {\r\n tabsRoot.unregisterPane(pane.uid)\r\n})\r\n</script>\r\n","import { withInstall } from '../_util'\r\n\r\nimport Tabs from './tabs'\r\nimport TabPane from './tab-pane.vue'\r\n\r\nexport default withInstall<typeof Tabs, {\r\n TabPane: typeof TabPane\r\n}>(Tabs, {\r\n TabPane,\r\n})\r\n\r\nexport * from './tabs'\r\nexport * from './tab-bar'\r\nexport * from './tab-nav'\r\nexport * from './tab-pane'\r\nexport * from './constants'\r\n"],"names":["COMPONENT_NAME","props","__props","instance","getCurrentInstance","rootTabs","inject","tabsRootContextKey","throwError","ns","useNamespace","barRef","ref","barStyle","getBarStyle","offset","tabSize","sizeName","sizeDir","position","tab","$el","_b","_a","capitalize","tabStyles","update","saveObserver","observerTabs","observer","list","key","_el","useResizeObserver","watch","nextTick","barObserever","onBeforeUnmount","__expose","tabNavProps","buildProps","panes","type","definePropType","Array","default","mutable","currentName","String","Number","values","stretch","Boolean","tabNavEmits","tabClick","tabName","ev","Event","tabRemove","TabNav","defineComponent","name","emits","setup","expose","emit","visibility","useDocumentVisibility","focused","useWindowFocus","navScroll$","nav$","el$","tabBarRef","scrollable","navOffset","isFocus","focusable","computed","includes","tabPosition","navStyle","transform","value","scrollPrev","containerSize","currentOffset","newOffset","scrollNext","navSize","scrollToActiveTab","nav","activeTab","querySelector","navScroll","isHorizontal","activeTabBounding","getBoundingClientRect","navScrollBounding","maxOffset","offsetWidth","width","offsetHeight","height","left","right","top","bottom","Math","max","min","prev","next","changeTab","e","code","up","down","EVENT_CODE","tabList","from","currentTarget","querySelectorAll","currentIndex","indexOf","target","nextIndex","length","focus","preventScroll","click","setFocus","removeFocus","setTimeout","onMounted","onUpdated","scrollBtn","_createVNode","is","ElIcon","ArrowLeft","ArrowRight","tabs","map","pane","index","uid","disabled","tabLabelContent","slots","label","tabindex","active","onFocus","onBlur","TabBar","tabsProps","modelValue","beforeLeave","Function","isPaneName","isString","isNumber","tabsEmits","UPDATE_MODEL_EVENT","tabChange","Tabs","isVertical","children","addChild","sortPane","removeChild","unregisterPane","useOrderedChildren","setCurrentName","trigger","isUndefined","handleTabClick","event","provide","registerPane","push","TabNavRenderer","render","leftExtra","rightExtra","header","renderSlot","hasLabelSlot","some","createVNode","onTabClick","$stable","panels","b","m","useSlots","tabsRoot","eagerComputed","loaded","paneName","shouldBeRender","val","reactive","onUnmounted","withInstall","TabPane"],"mappings":";;;;;;;;;;;;;;;;;;;;AAcA,MAAMA,IAAiB;;;;;AAIvB,UAAMC,IAAQC,GAERC,IAAWC,KACXC,IAAWC,EAAOC,CAAkB;AAC1C,IAAKF,KAAqBG,EAAAR,GAAgB,gCAAgC;AAEpE,UAAAS,IAAKC,EAAa,MAAM,GAExBC,IAASC,KACTC,IAAWD,KAEXE,IAAc,MAAqB;AACvC,UAAIC,IAAS,GACTC,IAAU;AAER,YAAAC,IAAW,CAAC,OAAO,QAAQ,EAAE,SAAS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;AAAA,IAAA,CACvB,GAED4D,GAAY,MAAM;AACP,MAAAP,EAAA,eAAerD,EAAK,GAAG;AAAA,IAAA,CACjC;;;;;;;;;;;;;ICzDcC,KAAA4D,GAEZvC,IAAM;AAAA,EAAA,SACPwC;AACF,CAAC;"}
@@ -0,0 +1,59 @@
1
+ import { ExtractPropTypes } from 'vue';
2
+ import { default as TabBar } from './tab-bar.vue';
3
+ export declare const tabBarProps: {
4
+ readonly tabs: import('../_util').EpPropFinalized<(new (...args: any[]) => {
5
+ uid: number;
6
+ slots: import('vue').Slots;
7
+ props: {
8
+ readonly label: string;
9
+ readonly disabled: boolean;
10
+ readonly closable: boolean;
11
+ readonly lazy: boolean;
12
+ readonly name?: import('../_util').EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown> | undefined;
13
+ };
14
+ paneName: string | number | undefined;
15
+ active: boolean;
16
+ index: string | undefined;
17
+ }[]) | (() => {
18
+ uid: number;
19
+ slots: import('vue').Slots;
20
+ props: {
21
+ readonly label: string;
22
+ readonly disabled: boolean;
23
+ readonly closable: boolean;
24
+ readonly lazy: boolean;
25
+ readonly name?: import('../_util').EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown> | undefined;
26
+ };
27
+ paneName: string | number | undefined;
28
+ active: boolean;
29
+ index: string | undefined;
30
+ }[]) | (((new (...args: any[]) => {
31
+ uid: number;
32
+ slots: import('vue').Slots;
33
+ props: {
34
+ readonly label: string;
35
+ readonly disabled: boolean;
36
+ readonly closable: boolean;
37
+ readonly lazy: boolean;
38
+ readonly name?: import('../_util').EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown> | undefined;
39
+ };
40
+ paneName: string | number | undefined;
41
+ active: boolean;
42
+ index: string | undefined;
43
+ }[]) | (() => {
44
+ uid: number;
45
+ slots: import('vue').Slots;
46
+ props: {
47
+ readonly label: string;
48
+ readonly disabled: boolean;
49
+ readonly closable: boolean;
50
+ readonly lazy: boolean;
51
+ readonly name?: import('../_util').EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown> | undefined;
52
+ };
53
+ paneName: string | number | undefined;
54
+ active: boolean;
55
+ index: string | undefined;
56
+ }[])) | null)[], unknown, unknown, () => [], boolean>;
57
+ };
58
+ export type TabBarProps = ExtractPropTypes<typeof tabBarProps>;
59
+ export type TabBarInstance = InstanceType<typeof TabBar>;
@@ -0,0 +1,15 @@
1
+ import "lodash-es";
2
+ import "vue";
3
+ import { buildProps as r, definePropType as o } from "../_util/vue/props/runtime.js";
4
+ import "element-plus";
5
+ import { mutable as t } from "../_util/typescript.js";
6
+ const b = r({
7
+ tabs: {
8
+ type: o(Array),
9
+ default: () => t([])
10
+ }
11
+ });
12
+ export {
13
+ b as tabBarProps
14
+ };
15
+ //# sourceMappingURL=tab-bar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tab-bar.js","sources":["../../../src/components/Tabs/tab-bar.ts"],"sourcesContent":["import { buildProps, definePropType, mutable } from '../_util'\r\nimport type { ExtractPropTypes } from 'vue'\r\nimport type { TabsPaneContext } from './constants'\r\nimport type TabBar from './tab-bar.vue'\r\n\r\nexport const tabBarProps = buildProps({\r\n tabs: {\r\n type: definePropType<TabsPaneContext[]>(Array),\r\n default: () => mutable([] as const),\r\n },\r\n} as const)\r\n\r\nexport type TabBarProps = ExtractPropTypes<typeof tabBarProps>\r\nexport type TabBarInstance = InstanceType<typeof TabBar>\r\n"],"names":["tabBarProps","buildProps","definePropType","mutable"],"mappings":";;;;;AAKO,MAAMA,IAAcC,EAAW;AAAA,EACpC,MAAM;AAAA,IACJ,MAAMC,EAAkC,KAAK;AAAA,IAC7C,SAAS,MAAMC,EAAQ,EAAW;AAAA,EACpC;AACF,CAAU;"}
@@ -0,0 +1,131 @@
1
+ import { CSSProperties } from 'vue';
2
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
3
+ readonly tabs: import('../_util').EpPropFinalized<(new (...args: any[]) => {
4
+ uid: number;
5
+ slots: import('vue').Slots;
6
+ props: {
7
+ readonly label: string;
8
+ readonly disabled: boolean;
9
+ readonly closable: boolean;
10
+ readonly lazy: boolean;
11
+ readonly name?: import('../_util').EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown> | undefined;
12
+ };
13
+ paneName: string | number | undefined;
14
+ active: boolean;
15
+ index: string | undefined;
16
+ }[]) | (() => {
17
+ uid: number;
18
+ slots: import('vue').Slots;
19
+ props: {
20
+ readonly label: string;
21
+ readonly disabled: boolean;
22
+ readonly closable: boolean;
23
+ readonly lazy: boolean;
24
+ readonly name?: import('../_util').EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown> | undefined;
25
+ };
26
+ paneName: string | number | undefined;
27
+ active: boolean;
28
+ index: string | undefined;
29
+ }[]) | (((new (...args: any[]) => {
30
+ uid: number;
31
+ slots: import('vue').Slots;
32
+ props: {
33
+ readonly label: string;
34
+ readonly disabled: boolean;
35
+ readonly closable: boolean;
36
+ readonly lazy: boolean;
37
+ readonly name?: import('../_util').EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown> | undefined;
38
+ };
39
+ paneName: string | number | undefined;
40
+ active: boolean;
41
+ index: string | undefined;
42
+ }[]) | (() => {
43
+ uid: number;
44
+ slots: import('vue').Slots;
45
+ props: {
46
+ readonly label: string;
47
+ readonly disabled: boolean;
48
+ readonly closable: boolean;
49
+ readonly lazy: boolean;
50
+ readonly name?: import('../_util').EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown> | undefined;
51
+ };
52
+ paneName: string | number | undefined;
53
+ active: boolean;
54
+ index: string | undefined;
55
+ }[])) | null)[], unknown, unknown, () => [], boolean>;
56
+ }>, {
57
+ /** @description tab root html element */
58
+ ref: import('vue').Ref<HTMLDivElement | undefined, HTMLDivElement | undefined>;
59
+ /** @description method to manually update tab bar style */
60
+ update: () => CSSProperties;
61
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
62
+ readonly tabs: import('../_util').EpPropFinalized<(new (...args: any[]) => {
63
+ uid: number;
64
+ slots: import('vue').Slots;
65
+ props: {
66
+ readonly label: string;
67
+ readonly disabled: boolean;
68
+ readonly closable: boolean;
69
+ readonly lazy: boolean;
70
+ readonly name?: import('../_util').EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown> | undefined;
71
+ };
72
+ paneName: string | number | undefined;
73
+ active: boolean;
74
+ index: string | undefined;
75
+ }[]) | (() => {
76
+ uid: number;
77
+ slots: import('vue').Slots;
78
+ props: {
79
+ readonly label: string;
80
+ readonly disabled: boolean;
81
+ readonly closable: boolean;
82
+ readonly lazy: boolean;
83
+ readonly name?: import('../_util').EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown> | undefined;
84
+ };
85
+ paneName: string | number | undefined;
86
+ active: boolean;
87
+ index: string | undefined;
88
+ }[]) | (((new (...args: any[]) => {
89
+ uid: number;
90
+ slots: import('vue').Slots;
91
+ props: {
92
+ readonly label: string;
93
+ readonly disabled: boolean;
94
+ readonly closable: boolean;
95
+ readonly lazy: boolean;
96
+ readonly name?: import('../_util').EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown> | undefined;
97
+ };
98
+ paneName: string | number | undefined;
99
+ active: boolean;
100
+ index: string | undefined;
101
+ }[]) | (() => {
102
+ uid: number;
103
+ slots: import('vue').Slots;
104
+ props: {
105
+ readonly label: string;
106
+ readonly disabled: boolean;
107
+ readonly closable: boolean;
108
+ readonly lazy: boolean;
109
+ readonly name?: import('../_util').EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown> | undefined;
110
+ };
111
+ paneName: string | number | undefined;
112
+ active: boolean;
113
+ index: string | undefined;
114
+ }[])) | null)[], unknown, unknown, () => [], boolean>;
115
+ }>> & Readonly<{}>, {
116
+ readonly tabs: {
117
+ uid: number;
118
+ slots: import('vue').Slots;
119
+ props: {
120
+ readonly label: string;
121
+ readonly disabled: boolean;
122
+ readonly closable: boolean;
123
+ readonly lazy: boolean;
124
+ readonly name?: import('../_util').EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown> | undefined;
125
+ };
126
+ paneName: string | number | undefined;
127
+ active: boolean;
128
+ index: string | undefined;
129
+ }[];
130
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
131
+ export default _default;