ep-craft 0.1.23 → 0.1.24

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.
@@ -13,25 +13,24 @@ import "../../hooks/use-delayed-toggle/index.js";
13
13
  import "../../hooks/use-aria/index.js";
14
14
  import "../../hooks/use-model-toggle/index.js";
15
15
  import "../../hooks/use-empty-values/index.js";
16
- import "../slot/src/only-child.js";
17
16
  import "../focus-trap/index.js";
18
17
  import "../form/index.js";
19
- import { popperContentEmits as _, popperContentProps as y, popperContentPropsDefaults as $, popperCoreConfigProps as b, popperCoreConfigPropsDefaults as d } from "./src/content.js";
20
- import { popperProps as k, roleTypes as q } from "./src/popper.js";
21
- import { popperTriggerProps as z } from "./src/trigger.js";
22
- import { popperArrowProps as F, popperArrowPropsDefaults as G } from "./src/arrow.js";
23
- const E = r(p), I = o(p, "ep-popper");
18
+ import { popperContentEmits as T, popperContentProps as _, popperContentPropsDefaults as y, popperCoreConfigProps as $, popperCoreConfigPropsDefaults as b } from "./src/content.js";
19
+ import { popperProps as j, roleTypes as k } from "./src/popper.js";
20
+ import { popperTriggerProps as v } from "./src/trigger.js";
21
+ import { popperArrowProps as B, popperArrowPropsDefaults as F } from "./src/arrow.js";
22
+ const D = r(p), E = o(p, "ep-popper");
24
23
  export {
25
- E as ElPopper,
26
- I as EpPopper,
27
- F as popperArrowProps,
28
- G as popperArrowPropsDefaults,
29
- _ as popperContentEmits,
30
- y as popperContentProps,
31
- $ as popperContentPropsDefaults,
32
- b as popperCoreConfigProps,
33
- d as popperCoreConfigPropsDefaults,
34
- k as popperProps,
35
- z as popperTriggerProps,
36
- q as roleTypes
24
+ D as ElPopper,
25
+ E as EpPopper,
26
+ B as popperArrowProps,
27
+ F as popperArrowPropsDefaults,
28
+ T as popperContentEmits,
29
+ _ as popperContentProps,
30
+ y as popperContentPropsDefaults,
31
+ $ as popperCoreConfigProps,
32
+ b as popperCoreConfigPropsDefaults,
33
+ j as popperProps,
34
+ v as popperTriggerProps,
35
+ k as roleTypes
37
36
  };
@@ -1,48 +1,47 @@
1
- import { defineComponent as s, inject as h, withDirectives as g, cloneVNode as C, Comment as m, Fragment as N, Text as O } from "vue";
2
- import { NOOP as v, isObject as y } from "@vue/shared";
1
+ import { defineComponent as a, inject as h, withDirectives as N, cloneVNode as g, Comment as u, Fragment as C, Text as O, createVNode as v } from "vue";
2
+ import { NOOP as y, isObject as F } from "@vue/shared";
3
3
  import "lodash-unified";
4
4
  import "@vueuse/core";
5
- import { debugWarn as u } from "../../../utils/error.js";
5
+ import { debugWarn as m } from "../../../utils/error.js";
6
6
  import "@element-plus/icons-vue";
7
- import { useNamespace as E } from "../../../hooks/use-namespace/index.js";
7
+ import { useNamespace as w } from "../../../hooks/use-namespace/index.js";
8
8
  import "../../../hooks/use-size/index.js";
9
9
  import "@popperjs/core";
10
10
  import "../../../hooks/use-z-index/index.js";
11
11
  import "../../../hooks/use-delayed-toggle/index.js";
12
12
  import "../../../hooks/use-aria/index.js";
13
13
  import "../../../hooks/use-model-toggle/index.js";
14
- import { FORWARD_REF_INJECTION_KEY as F, useForwardRefDirective as R } from "../../../hooks/use-forward-ref/index.js";
14
+ import { FORWARD_REF_INJECTION_KEY as E, useForwardRefDirective as R } from "../../../hooks/use-forward-ref/index.js";
15
15
  import "../../../hooks/use-empty-values/index.js";
16
- const i = "ElOnlyChild", P = s({
16
+ const i = "ElOnlyChild", P = /* @__PURE__ */ a({
17
17
  name: i,
18
- setup(n, { slots: t, attrs: r }) {
19
- const e = h(F), d = R(
20
- (e == null ? void 0 : e.setForwardRef) ?? v
21
- );
18
+ setup(n, {
19
+ slots: t,
20
+ attrs: r
21
+ }) {
22
+ const e = h(E), p = R((e == null ? void 0 : e.setForwardRef) ?? y);
22
23
  return () => {
23
24
  var l;
24
25
  const o = (l = t.default) == null ? void 0 : l.call(t, r);
25
26
  if (!o) return null;
26
- const [c, a] = p(o);
27
- return c ? (a > 1 && u(i, "requires exact only one valid child."), g(C(c, r), [
28
- [d]
29
- ])) : (u(i, "no valid child node found"), null);
27
+ const [c, s] = d(o);
28
+ return c ? (s > 1 && m(i, "requires exact only one valid child."), N(g(c, r), [[p]])) : (m(i, "no valid child node found"), null);
30
29
  };
31
30
  }
32
31
  });
33
- function p(n) {
32
+ function d(n) {
34
33
  if (!n) return [null, 0];
35
- const t = n, r = t.filter((e) => e.type !== m).length;
34
+ const t = n, r = t.filter((e) => e.type !== u).length;
36
35
  for (const e of t) {
37
- if (y(e))
36
+ if (F(e))
38
37
  switch (e.type) {
39
- case m:
38
+ case u:
40
39
  continue;
41
40
  case O:
42
41
  case "svg":
43
42
  return [f(e), r];
44
- case N:
45
- return p(e.children);
43
+ case C:
44
+ return d(e.children);
46
45
  default:
47
46
  return [e, r];
48
47
  }
@@ -51,8 +50,10 @@ function p(n) {
51
50
  return [null, 0];
52
51
  }
53
52
  function f(n) {
54
- const t = E("only-child");
55
- return /* @__PURE__ */ React.createElement("span", { class: t.e("content") }, n);
53
+ const t = w("only-child");
54
+ return v("span", {
55
+ class: t.e("content")
56
+ }, [n]);
56
57
  }
57
58
  export {
58
59
  P as OnlyChild
@@ -1,17 +1,17 @@
1
- import { defineComponent as me, inject as be, ref as v, shallowRef as he, computed as b, watch as j, onMounted as pe, onUpdated as ge, triggerRef as Re, nextTick as q } from "vue";
2
- import { useDocumentVisibility as Ee, useWindowFocus as Te, useElementSize as G, useResizeObserver as Ce } from "@vueuse/core";
1
+ import { defineComponent as me, inject as he, ref as f, shallowRef as pe, computed as h, watch as q, onMounted as ge, onUpdated as Te, triggerRef as Ce, createVNode as i, nextTick as G } from "vue";
2
+ import { useDocumentVisibility as Se, useWindowFocus as we, useElementSize as U, useResizeObserver as xe } from "@vueuse/core";
3
3
  import "@vue/shared";
4
- import { clamp as Se } from "lodash-unified";
5
- import { throwError as we } from "../../utils/error.js";
6
- import { isGreaterThan as W } from "../../utils/numbers.js";
7
- import { rAF as U } from "../../utils/raf.js";
8
- import { mutable as xe } from "../../utils/typescript.js";
9
- import { getEventCode as X } from "../../utils/dom/event.js";
10
- import { ArrowLeft as ye, ArrowRight as Ne, Close as Be } from "@element-plus/icons-vue";
11
- import { buildProps as Oe, definePropType as ke } from "../../utils/vue/props/runtime.js";
12
- import { EVENT_CODE as C } from "../../constants/aria.js";
13
- import { ElIcon as M } from "../icon/index.js";
14
- import { useNamespace as ze } from "../../hooks/use-namespace/index.js";
4
+ import { clamp as Re } from "lodash-unified";
5
+ import { throwError as ye } from "../../utils/error.js";
6
+ import { isGreaterThan as M } from "../../utils/numbers.js";
7
+ import { rAF as X } from "../../utils/raf.js";
8
+ import { mutable as Ne } from "../../utils/typescript.js";
9
+ import { getEventCode as Y } from "../../utils/dom/event.js";
10
+ import { ArrowLeft as Ee, ArrowRight as Be, Close as Oe } from "@element-plus/icons-vue";
11
+ import { buildProps as ke, definePropType as ze } from "../../utils/vue/props/runtime.js";
12
+ import { EVENT_CODE as x } from "../../constants/aria.js";
13
+ import { ElIcon as F } from "../icon/index.js";
14
+ import { useNamespace as Pe } from "../../hooks/use-namespace/index.js";
15
15
  import "../../hooks/use-size/index.js";
16
16
  import "@popperjs/core";
17
17
  import "../../hooks/use-z-index/index.js";
@@ -19,14 +19,14 @@ import "../../hooks/use-delayed-toggle/index.js";
19
19
  import "../../hooks/use-aria/index.js";
20
20
  import "../../hooks/use-model-toggle/index.js";
21
21
  import "../../hooks/use-empty-values/index.js";
22
- import Pe from "../../hooks/use-wheel/index.js";
23
- import $e from "./tab-bar.vue.js";
24
- import { tabsRootContextKey as Ae } from "./constants.js";
25
- import { useTabNavTouch as We } from "./composables/use-tab-nav-touch.js";
26
- const Me = Oe({
22
+ import $e from "../../hooks/use-wheel/index.js";
23
+ import Ae from "./tab-bar.vue.js";
24
+ import { tabsRootContextKey as We } from "./constants.js";
25
+ import { useTabNavTouch as Me } from "./composables/use-tab-nav-touch.js";
26
+ const Fe = ke({
27
27
  panes: {
28
- type: ke(Array),
29
- default: () => xe([])
28
+ type: ze(Array),
29
+ default: () => Ne([])
30
30
  },
31
31
  currentName: {
32
32
  type: [String, Number],
@@ -46,252 +46,198 @@ const Me = Oe({
46
46
  type: [String, Number],
47
47
  default: void 0
48
48
  }
49
- }), Fe = {
50
- tabClick: (c, x, S) => S instanceof Event,
51
- tabRemove: (c, x) => x instanceof Event
52
- }, Y = "ElTabNav", rt = me({
53
- name: Y,
54
- props: Me,
55
- emits: Fe,
56
- setup(c, { expose: x, emit: S }) {
57
- const h = be(Ae);
58
- h || we(Y, "<el-tabs><tab-nav /></el-tabs>");
59
- const n = ze("tabs"), J = Ee(), Q = Te(), u = v(), d = v(), N = v(), y = v({}), B = v(), i = v(!1), l = v(0), O = v(!1), w = v(!0), k = v(!1), F = he(), p = b(
60
- () => ["top", "bottom"].includes(h.props.tabPosition)
61
- ), E = b(() => p.value ? "width" : "height"), Z = b(() => {
62
- const e = E.value === "width" ? "X" : "Y";
49
+ }), Le = {
50
+ tabClick: (r, N, R) => R instanceof Event,
51
+ tabRemove: (r, N) => N instanceof Event
52
+ }, J = "ElTabNav", ut = /* @__PURE__ */ me({
53
+ name: J,
54
+ props: Fe,
55
+ emits: Le,
56
+ setup(r, {
57
+ expose: N,
58
+ emit: R
59
+ }) {
60
+ const p = he(We);
61
+ p || ye(J, "<el-tabs><tab-nav /></el-tabs>");
62
+ const n = Pe("tabs"), Q = Se(), Z = we(), v = f(), b = f(), B = f(), E = f({}), O = f(), c = f(!1), l = f(0), k = f(!1), y = f(!0), z = f(!1), L = pe(), g = h(() => ["top", "bottom"].includes(p.props.tabPosition)), S = h(() => g.value ? "width" : "height"), ee = h(() => {
63
+ const e = S.value === "width" ? "X" : "Y";
63
64
  return {
64
- transition: k.value || se.value ? "none" : void 0,
65
+ transition: z.value || ie.value ? "none" : void 0,
65
66
  transform: `translate${e}(-${l.value}px)`
66
67
  };
67
- }), { width: ee, height: te } = G(u), { width: ae, height: oe } = G(
68
- d,
69
- { width: 0, height: 0 },
70
- { box: "border-box" }
71
- ), z = b(
72
- () => p.value ? ee.value : te.value
73
- ), P = b(
74
- () => p.value ? ae.value : oe.value
75
- ), { onWheel: ne } = Pe(
76
- {
77
- atStartEdge: b(() => l.value <= 0),
78
- atEndEdge: b(
79
- () => P.value - l.value <= z.value
80
- ),
81
- layout: b(
82
- () => p.value ? "horizontal" : "vertical"
83
- )
84
- },
85
- (e) => {
86
- l.value = Se(
87
- l.value + e,
88
- 0,
89
- P.value - z.value
90
- );
91
- }
92
- ), le = (e) => {
93
- k.value = !0, ne(e), U(() => {
94
- k.value = !1;
68
+ }), {
69
+ width: te,
70
+ height: oe
71
+ } = U(v), {
72
+ width: ae,
73
+ height: ne
74
+ } = U(b, {
75
+ width: 0,
76
+ height: 0
77
+ }, {
78
+ box: "border-box"
79
+ }), P = h(() => g.value ? te.value : oe.value), $ = h(() => g.value ? ae.value : ne.value), {
80
+ onWheel: le
81
+ } = $e({
82
+ atStartEdge: h(() => l.value <= 0),
83
+ atEndEdge: h(() => $.value - l.value <= P.value),
84
+ layout: h(() => g.value ? "horizontal" : "vertical")
85
+ }, (e) => {
86
+ l.value = Re(l.value + e, 0, $.value - P.value);
87
+ }), se = (e) => {
88
+ z.value = !0, le(e), X(() => {
89
+ z.value = !1;
95
90
  });
96
91
  }, {
97
- isTouchScrolling: se,
98
- handleTouchStart: ce,
99
- handleTouchMove: ie,
100
- handleTouchEnd: L
101
- } = We({
102
- scrollable: i,
92
+ isTouchScrolling: ie,
93
+ handleTouchStart: re,
94
+ handleTouchMove: ce,
95
+ handleTouchEnd: I
96
+ } = Me({
97
+ scrollable: c,
103
98
  navOffset: l,
104
- navSize: P,
105
- navContainerSize: z,
106
- isHorizontal: p
107
- }), re = () => {
108
- if (!u.value) return;
109
- const e = u.value.getBoundingClientRect()[E.value], a = l.value;
110
- if (!a) return;
111
- const t = a > e ? a - e : 0;
99
+ navSize: $,
100
+ navContainerSize: P,
101
+ isHorizontal: g
102
+ }), ue = () => {
103
+ if (!v.value) return;
104
+ const e = v.value.getBoundingClientRect()[S.value], o = l.value;
105
+ if (!o) return;
106
+ const t = o > e ? o - e : 0;
112
107
  l.value = t;
113
- }, ue = () => {
114
- if (!u.value || !d.value) return;
115
- const e = d.value.getBoundingClientRect()[E.value], a = u.value.getBoundingClientRect()[E.value], t = l.value;
116
- if (!W(e - t, a)) return;
117
- const o = e - t > a * 2 ? t + a : e - a;
118
- l.value = o;
119
- }, I = async () => {
120
- const e = d.value;
121
- if (!i.value || !N.value || !u.value || !e) return;
122
- await q();
123
- const a = y.value[c.currentName];
124
- if (!a) return;
125
- const t = u.value, o = a.getBoundingClientRect(), r = t.getBoundingClientRect(), s = r.left + 1, g = r.right - 1, T = e.getBoundingClientRect(), A = p.value ? T.width - r.width : T.height - r.height, R = l.value;
126
- let f = R;
127
- p.value ? (o.left < s && (f = R - (s - o.left)), o.right > g && (f = R + o.right - g)) : (o.top < r.top && (f = R - (r.top - o.top)), o.bottom > r.bottom && (f = R + (o.bottom - r.bottom))), f = Math.max(f, 0), l.value = Math.min(f, A);
128
- }, _ = () => {
129
- var o;
130
- if (!d.value || !u.value) return;
131
- c.stretch && ((o = B.value) == null || o.update());
132
- const e = d.value.getBoundingClientRect()[E.value], a = u.value.getBoundingClientRect()[E.value], t = l.value;
133
- a < e ? (i.value = i.value || {}, i.value.prev = t, i.value.next = W(
134
- e,
135
- t + a
136
- ), W(a, e - t) && (l.value = e - a)) : (i.value = !1, t > 0 && (l.value = 0));
137
- }, ve = (e) => {
138
- const a = X(e);
108
+ }, ve = () => {
109
+ if (!v.value || !b.value) return;
110
+ const e = b.value.getBoundingClientRect()[S.value], o = v.value.getBoundingClientRect()[S.value], t = l.value;
111
+ if (!M(e - t, o)) return;
112
+ const a = e - t > o * 2 ? t + o : e - o;
113
+ l.value = a;
114
+ }, _ = async () => {
115
+ const e = b.value;
116
+ if (!c.value || !B.value || !v.value || !e) return;
117
+ await G();
118
+ const o = E.value[r.currentName];
119
+ if (!o) return;
120
+ const t = v.value, a = o.getBoundingClientRect(), u = t.getBoundingClientRect(), s = u.left + 1, T = u.right - 1, w = e.getBoundingClientRect(), W = g.value ? w.width - u.width : w.height - u.height, C = l.value;
121
+ let d = C;
122
+ g.value ? (a.left < s && (d = C - (s - a.left)), a.right > T && (d = C + a.right - T)) : (a.top < u.top && (d = C - (u.top - a.top)), a.bottom > u.bottom && (d = C + (a.bottom - u.bottom))), d = Math.max(d, 0), l.value = Math.min(d, W);
123
+ }, H = () => {
124
+ var a;
125
+ if (!b.value || !v.value) return;
126
+ r.stretch && ((a = O.value) == null || a.update());
127
+ const e = b.value.getBoundingClientRect()[S.value], o = v.value.getBoundingClientRect()[S.value], t = l.value;
128
+ o < e ? (c.value = c.value || {}, c.value.prev = t, c.value.next = M(e, t + o), M(o, e - t) && (l.value = e - o)) : (c.value = !1, t > 0 && (l.value = 0));
129
+ }, fe = (e) => {
130
+ const o = Y(e);
139
131
  let t = 0;
140
- switch (a) {
141
- case C.left:
142
- case C.up:
132
+ switch (o) {
133
+ case x.left:
134
+ case x.up:
143
135
  t = -1;
144
136
  break;
145
- case C.right:
146
- case C.down:
137
+ case x.right:
138
+ case x.down:
147
139
  t = 1;
148
140
  break;
149
141
  default:
150
142
  return;
151
143
  }
152
- const o = Array.from(
153
- e.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)")
154
- );
155
- let s = o.indexOf(e.target) + t;
156
- s < 0 ? s = o.length - 1 : s >= o.length && (s = 0), o[s].focus({ preventScroll: !0 }), o[s].click(), H();
157
- }, H = () => {
158
- w.value && (O.value = !0);
159
- }, $ = () => O.value = !1, fe = (e, a) => {
160
- y.value[a] = e;
161
- }, de = async () => {
162
- await q();
163
- const e = y.value[c.currentName];
164
- e == null || e.focus({ preventScroll: !0 });
144
+ const a = Array.from(e.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)"));
145
+ let s = a.indexOf(e.target) + t;
146
+ s < 0 ? s = a.length - 1 : s >= a.length && (s = 0), a[s].focus({
147
+ preventScroll: !0
148
+ }), a[s].click(), K();
149
+ }, K = () => {
150
+ y.value && (k.value = !0);
151
+ }, A = () => k.value = !1, de = (e, o) => {
152
+ E.value[o] = e;
153
+ }, be = async () => {
154
+ await G();
155
+ const e = E.value[r.currentName];
156
+ e == null || e.focus({
157
+ preventScroll: !0
158
+ });
165
159
  };
166
- return j(J, (e) => {
167
- e === "hidden" ? w.value = !1 : e === "visible" && setTimeout(() => w.value = !0, 50);
168
- }), j(Q, (e) => {
169
- e ? setTimeout(() => w.value = !0, 50) : w.value = !1;
170
- }), Ce(N, () => {
171
- U(_);
172
- }), pe(() => setTimeout(() => I(), 0)), ge(() => _()), x({
173
- scrollToActiveTab: I,
174
- removeFocus: $,
175
- focusActiveTab: de,
176
- tabListRef: d,
177
- tabBarRef: B,
178
- scheduleRender: () => Re(F)
160
+ return q(Q, (e) => {
161
+ e === "hidden" ? y.value = !1 : e === "visible" && setTimeout(() => y.value = !0, 50);
162
+ }), q(Z, (e) => {
163
+ e ? setTimeout(() => y.value = !0, 50) : y.value = !1;
164
+ }), xe(B, () => {
165
+ X(H);
166
+ }), ge(() => setTimeout(() => _(), 0)), Te(() => H()), N({
167
+ scrollToActiveTab: _,
168
+ removeFocus: A,
169
+ focusActiveTab: be,
170
+ tabListRef: b,
171
+ tabBarRef: O,
172
+ scheduleRender: () => Ce(L)
179
173
  }), () => {
180
- const e = i.value ? [
181
- /* @__PURE__ */ React.createElement(
182
- "span",
183
- {
184
- class: [
185
- n.e("nav-prev"),
186
- n.is("disabled", !i.value.prev)
187
- ],
188
- onClick: re
174
+ const e = c.value ? [i("span", {
175
+ class: [n.e("nav-prev"), n.is("disabled", !c.value.prev)],
176
+ onClick: ue
177
+ }, [i(F, null, {
178
+ default: () => [i(Ee, null, null)]
179
+ })]), i("span", {
180
+ class: [n.e("nav-next"), n.is("disabled", !c.value.next)],
181
+ onClick: ve
182
+ }, [i(F, null, {
183
+ default: () => [i(Be, null, null)]
184
+ })])] : null, o = r.panes.map((t, a) => {
185
+ var V, D;
186
+ const u = t.uid, s = t.props.disabled, T = t.props.name ?? t.index ?? `${a}`, w = !s && (t.isClosable || t.props.closable !== !1 && r.editable);
187
+ t.index = `${a}`;
188
+ const W = w ? i(F, {
189
+ class: "is-icon-close",
190
+ onClick: (m) => R("tabRemove", t, m)
191
+ }, {
192
+ default: () => [i(Oe, null, null)]
193
+ }) : null, C = ((D = (V = t.slots).label) == null ? void 0 : D.call(V)) || t.props.label, d = !s && t.active ? r.tabindex ?? p.props.tabindex : -1;
194
+ return i("div", {
195
+ ref: (m) => de(m, T),
196
+ class: [n.e("item"), n.is(p.props.tabPosition), n.is("active", t.active), n.is("disabled", s), n.is("closable", w), n.is("focus", k.value)],
197
+ id: `tab-${T}`,
198
+ key: `tab-${u}`,
199
+ "aria-controls": `pane-${T}`,
200
+ role: "tab",
201
+ "aria-selected": t.active,
202
+ tabindex: d,
203
+ onFocus: () => K(),
204
+ onBlur: () => A(),
205
+ onClick: (m) => {
206
+ A(), R("tabClick", t, T, m);
189
207
  },
190
- /* @__PURE__ */ React.createElement(M, null, /* @__PURE__ */ React.createElement(ye, null))
191
- ),
192
- /* @__PURE__ */ React.createElement(
193
- "span",
194
- {
195
- class: [
196
- n.e("nav-next"),
197
- n.is("disabled", !i.value.next)
198
- ],
199
- onClick: ue
200
- },
201
- /* @__PURE__ */ React.createElement(M, null, /* @__PURE__ */ React.createElement(Ne, null))
202
- )
203
- ] : null, a = c.panes.map((t, o) => {
204
- var K, D;
205
- const r = t.uid, s = t.props.disabled, g = t.props.name ?? t.index ?? `${o}`, T = !s && (t.isClosable || t.props.closable !== !1 && c.editable);
206
- t.index = `${o}`;
207
- const A = T ? /* @__PURE__ */ React.createElement(
208
- M,
209
- {
210
- class: "is-icon-close",
211
- onClick: (m) => S("tabRemove", t, m)
212
- },
213
- /* @__PURE__ */ React.createElement(Be, null)
214
- ) : null, R = ((D = (K = t.slots).label) == null ? void 0 : D.call(K)) || t.props.label, f = !s && t.active ? c.tabindex ?? h.props.tabindex : -1;
215
- return /* @__PURE__ */ React.createElement(
216
- "div",
217
- {
218
- ref: (m) => fe(m, g),
219
- class: [
220
- n.e("item"),
221
- n.is(h.props.tabPosition),
222
- n.is("active", t.active),
223
- n.is("disabled", s),
224
- n.is("closable", T),
225
- n.is("focus", O.value)
226
- ],
227
- id: `tab-${g}`,
228
- key: `tab-${r}`,
229
- "aria-controls": `pane-${g}`,
230
- role: "tab",
231
- "aria-selected": t.active,
232
- tabindex: f,
233
- onFocus: () => H(),
234
- onBlur: () => $(),
235
- onClick: (m) => {
236
- $(), S("tabClick", t, g, m);
237
- },
238
- onKeydown: (m) => {
239
- const V = X(m);
240
- T && (V === C.delete || V === C.backspace) && S("tabRemove", t, m);
241
- }
242
- },
243
- R,
244
- A
245
- );
208
+ onKeydown: (m) => {
209
+ const j = Y(m);
210
+ w && (j === x.delete || j === x.backspace) && R("tabRemove", t, m);
211
+ }
212
+ }, [C, W]);
246
213
  });
247
- return F.value, /* @__PURE__ */ React.createElement(
248
- "div",
249
- {
250
- ref: N,
251
- class: [
252
- n.e("nav-wrap"),
253
- n.is("scrollable", !!i.value),
254
- n.is(h.props.tabPosition)
255
- ]
256
- },
257
- e,
258
- /* @__PURE__ */ React.createElement("div", { class: n.e("nav-scroll"), ref: u }, c.panes.length > 0 ? /* @__PURE__ */ React.createElement(
259
- "div",
260
- {
261
- class: [
262
- n.e("nav"),
263
- n.is(h.props.tabPosition),
264
- n.is(
265
- "stretch",
266
- c.stretch && ["top", "bottom"].includes(h.props.tabPosition)
267
- )
268
- ],
269
- ref: d,
270
- style: Z.value,
271
- role: "tablist",
272
- onKeydown: ve,
273
- onWheel: le,
274
- onTouchstart: ce,
275
- onTouchmove: ie,
276
- onTouchend: L,
277
- onTouchcancel: L
278
- },
279
- c.type ? null : /* @__PURE__ */ React.createElement(
280
- $e,
281
- {
282
- ref: B,
283
- tabs: [...c.panes],
284
- tabRefs: y.value
285
- }
286
- ),
287
- a
288
- ) : null)
289
- );
214
+ return L.value, i("div", {
215
+ ref: B,
216
+ class: [n.e("nav-wrap"), n.is("scrollable", !!c.value), n.is(p.props.tabPosition)]
217
+ }, [e, i("div", {
218
+ class: n.e("nav-scroll"),
219
+ ref: v
220
+ }, [r.panes.length > 0 ? i("div", {
221
+ class: [n.e("nav"), n.is(p.props.tabPosition), n.is("stretch", r.stretch && ["top", "bottom"].includes(p.props.tabPosition))],
222
+ ref: b,
223
+ style: ee.value,
224
+ role: "tablist",
225
+ onKeydown: fe,
226
+ onWheel: se,
227
+ onTouchstart: re,
228
+ onTouchmove: ce,
229
+ onTouchend: I,
230
+ onTouchcancel: I
231
+ }, [r.type ? null : i(Ae, {
232
+ ref: O,
233
+ tabs: [...r.panes],
234
+ tabRefs: E.value
235
+ }, null), o]) : null])]);
290
236
  };
291
237
  }
292
238
  });
293
239
  export {
294
- rt as default,
295
- Fe as tabNavEmits,
296
- Me as tabNavProps
240
+ ut as default,
241
+ Le as tabNavEmits,
242
+ Fe as tabNavProps
297
243
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ep-craft",
3
- "version": "0.1.23",
3
+ "version": "0.1.24",
4
4
  "description": "A Vue 3 component library based on element-plus with ep- prefix",
5
5
  "type": "module",
6
6
  "main": "./dist/ep-craft.js",
@@ -74,14 +74,15 @@
74
74
  "devDependencies": {
75
75
  "@types/node": "^20.11.0",
76
76
  "@vitejs/plugin-vue": "^5.0.0",
77
+ "@vitejs/plugin-vue-jsx": "^4.2.0",
77
78
  "sass": "^1.101.0",
78
79
  "tsx": "^4.7.0",
79
80
  "typescript": "^5.3.0",
80
81
  "vite": "^5.4.0",
81
82
  "vitepress": "^1.6.4",
82
83
  "vue": "^3.4.0",
83
- "vue-tsc": "^2.0.0",
84
- "vue-router": "^4.3.0"
84
+ "vue-router": "^4.3.0",
85
+ "vue-tsc": "^2.0.0"
85
86
  },
86
87
  "keywords": [
87
88
  "vue",