vft 0.0.96 → 0.0.98

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.
Files changed (198) hide show
  1. package/dist/index.css +1 -1
  2. package/es/components/affix/affix.vue2.js +25 -26
  3. package/es/components/alert/alert.vue2.js +17 -18
  4. package/es/components/backtop/backtop.vue2.js +14 -15
  5. package/es/components/button/button-group.vue2.js +14 -15
  6. package/es/components/button/button.vue2.js +24 -25
  7. package/es/components/card/card.vue2.js +10 -11
  8. package/es/components/check-tag/check-tag.vue2.js +10 -11
  9. package/es/components/checkbox/checkbox-button.vue2.js +13 -14
  10. package/es/components/checkbox/checkbox-group.vue2.js +15 -16
  11. package/es/components/checkbox/checkbox.vue2.js +24 -25
  12. package/es/components/clamp/clamp.vue2.js +16 -17
  13. package/es/components/clamp-toggle/clamp-toggle.vue2.js +13 -14
  14. package/es/components/col/col.vue2.js +20 -21
  15. package/es/components/collapse-transition/src/collapse-transition.vue2.js +12 -13
  16. package/es/components/collection/collection-item.vue2.js +6 -7
  17. package/es/components/collection/collection.vue2.js +5 -7
  18. package/es/components/color-picker/color-picker.vue2.js +45 -46
  19. package/es/components/color-picker/components/alpha-slider.vue2.js +20 -21
  20. package/es/components/config-provider/config-provider.vue2.js +22 -23
  21. package/es/components/container/aside.vue2.js +12 -13
  22. package/es/components/container/container.vue2.js +10 -11
  23. package/es/components/container/footer.vue2.js +11 -12
  24. package/es/components/container/header.vue2.js +10 -11
  25. package/es/components/container/main.vue2.js +12 -13
  26. package/es/components/context-menu/context-menu.vue2.js +18 -19
  27. package/es/components/date-picker/date-picker-com/basic-date-table.vue2.js +87 -87
  28. package/es/components/date-picker/date-picker-com/basic-month-table.vue2.js +1 -1
  29. package/es/components/date-picker/date-picker-com/basic-year-table.vue2.js +1 -1
  30. package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +2 -2
  31. package/es/components/date-picker/date-picker-com/panel-month-range.vue2.js +39 -40
  32. package/es/components/date-time-select/date-time-select.vue2.js +20 -21
  33. package/es/components/descriptions/description-item.vue2.js +9 -10
  34. package/es/components/descriptions/description.vue2.js +20 -21
  35. package/es/components/descriptions/descriptions-row.vue2.js +15 -16
  36. package/es/components/dialog/dialog-content.vue2.js +12 -13
  37. package/es/components/dialog/dialog.vue2.js +40 -41
  38. package/es/components/divider/divider.vue2.js +10 -11
  39. package/es/components/dropdown/dropdown.vue2.js +38 -39
  40. package/es/components/empty/empty.vue2.js +11 -12
  41. package/es/components/footer-layout/footer-layout.vue2.js +7 -8
  42. package/es/components/form/form-item.vue2.js +43 -44
  43. package/es/components/form/form.vue2.js +28 -29
  44. package/es/components/full-screen/full-screen.vue2.js +15 -16
  45. package/es/components/header-layout/header-layout.vue2.js +21 -22
  46. package/es/components/horizontal-menu/horizontal-menu.vue2.js +50 -51
  47. package/es/components/icon/icon.vue2.js +12 -13
  48. package/es/components/icon-text/icon-text.vue2.js +13 -14
  49. package/es/components/iframe-layout/iframe-layout.vue2.js +15 -16
  50. package/es/components/iframe-layout/iframe-page.vue2.js +12 -13
  51. package/es/components/image/image.vue2.js +25 -26
  52. package/es/components/image-viewer/image-viewer.vue2.js +54 -55
  53. package/es/components/link/link.vue2.js +11 -12
  54. package/es/components/list-cell/list-cell.vue2.js +21 -22
  55. package/es/components/logo/logo.vue2.js +12 -13
  56. package/es/components/md-comment/md-comment.vue2.js +12 -13
  57. package/es/components/md-container/md-container.vue2.js +33 -34
  58. package/es/components/md-vue-playground/md-vue-playground.vue2.js +18 -19
  59. package/es/components/menu/menu-item-group.vue2.js +13 -14
  60. package/es/components/menu/menu-item.vue2.js +12 -13
  61. package/es/components/menu/menu.vue2.js +44 -45
  62. package/es/components/menu/sub-menu.vue2.js +30 -31
  63. package/es/components/multiple-tabs/multiple-tabs.vue2.js +35 -38
  64. package/es/components/overlay/overlay.vue2.js +23 -24
  65. package/es/components/page-wrapper/page-wrapper.vue2.js +17 -18
  66. package/es/components/pagination/pagination.vue2.js +17 -18
  67. package/es/components/popconfirm/popconfirm.vue2.js +17 -18
  68. package/es/components/popover/popover.vue2.js +31 -32
  69. package/es/components/popper/arrow.vue2.js +15 -16
  70. package/es/components/popper/content.vue2.js +38 -39
  71. package/es/components/popper/popper.vue2.js +13 -14
  72. package/es/components/popper/trigger.vue2.js +11 -12
  73. package/es/components/qrcode/qrcode.vue2.js +21 -22
  74. package/es/components/radio/radio-button.vue2.js +16 -17
  75. package/es/components/radio/radio-group.vue2.js +16 -17
  76. package/es/components/radio/radio.vue2.js +15 -16
  77. package/es/components/result/result.vue2.js +12 -13
  78. package/es/components/router-view-content/router-view-content.vue2.js +10 -11
  79. package/es/components/row/row.vue2.js +17 -18
  80. package/es/components/scrollbar/scrollbar.vue2.js +30 -31
  81. package/es/components/search/search.vue2.js +39 -40
  82. package/es/components/side-menu/side-menu.vue2.js +43 -45
  83. package/es/components/skeleton/skeleton-item.vue2.js +9 -10
  84. package/es/components/skeleton/skeleton.vue2.js +11 -12
  85. package/es/components/switch/switch.vue2.js +27 -28
  86. package/es/components/table/table.vue2.js +36 -37
  87. package/es/components/tabs/tab-nav.vue2.js +28 -29
  88. package/es/components/tabs/tab-pane.vue2.js +23 -24
  89. package/es/components/tabs/tabs.vue2.js +30 -31
  90. package/es/components/time-picker/common/picker.vue2.js +48 -49
  91. package/es/components/time-select/time-select.vue2.js +28 -29
  92. package/es/components/tooltip/content.vue2.js +36 -37
  93. package/es/components/tooltip/tooltip.vue2.js +15 -16
  94. package/es/components/tooltip/trigger.vue2.js +37 -38
  95. package/es/components/verify-code/verify-code.vue2.js +19 -20
  96. package/es/constants/date.js +7 -7
  97. package/es/package.json.js +1 -1
  98. package/lib/components/affix/affix.vue2.cjs +1 -1
  99. package/lib/components/alert/alert.vue2.cjs +1 -1
  100. package/lib/components/backtop/backtop.vue2.cjs +1 -1
  101. package/lib/components/button/button-group.vue2.cjs +1 -1
  102. package/lib/components/button/button.vue2.cjs +1 -1
  103. package/lib/components/card/card.vue2.cjs +1 -1
  104. package/lib/components/check-tag/check-tag.vue2.cjs +1 -1
  105. package/lib/components/checkbox/checkbox-button.vue2.cjs +1 -1
  106. package/lib/components/checkbox/checkbox-group.vue2.cjs +1 -1
  107. package/lib/components/checkbox/checkbox.vue2.cjs +1 -1
  108. package/lib/components/clamp/clamp.vue2.cjs +1 -1
  109. package/lib/components/clamp-toggle/clamp-toggle.vue2.cjs +1 -1
  110. package/lib/components/col/col.vue2.cjs +1 -1
  111. package/lib/components/collapse-transition/src/collapse-transition.vue2.cjs +1 -1
  112. package/lib/components/collection/collection-item.vue2.cjs +1 -1
  113. package/lib/components/collection/collection.vue2.cjs +1 -1
  114. package/lib/components/color-picker/color-picker.vue2.cjs +1 -1
  115. package/lib/components/color-picker/components/alpha-slider.vue2.cjs +1 -1
  116. package/lib/components/config-provider/config-provider.vue2.cjs +1 -1
  117. package/lib/components/container/aside.vue2.cjs +1 -1
  118. package/lib/components/container/container.vue2.cjs +1 -1
  119. package/lib/components/container/footer.vue2.cjs +1 -1
  120. package/lib/components/container/header.vue2.cjs +1 -1
  121. package/lib/components/container/main.vue2.cjs +1 -1
  122. package/lib/components/context-menu/context-menu.vue2.cjs +1 -1
  123. package/lib/components/date-picker/date-picker-com/basic-date-table.vue2.cjs +1 -1
  124. package/lib/components/date-picker/date-picker-com/basic-month-table.vue2.cjs +1 -1
  125. package/lib/components/date-picker/date-picker-com/basic-year-table.vue2.cjs +1 -1
  126. package/lib/components/date-picker/date-picker-com/panel-date-pick.vue2.cjs +1 -1
  127. package/lib/components/date-picker/date-picker-com/panel-month-range.vue2.cjs +1 -1
  128. package/lib/components/date-time-select/date-time-select.vue2.cjs +1 -1
  129. package/lib/components/descriptions/description-item.vue2.cjs +1 -1
  130. package/lib/components/descriptions/description.vue2.cjs +1 -1
  131. package/lib/components/descriptions/descriptions-row.vue2.cjs +1 -1
  132. package/lib/components/dialog/dialog-content.vue2.cjs +1 -1
  133. package/lib/components/dialog/dialog.vue2.cjs +1 -1
  134. package/lib/components/divider/divider.vue2.cjs +1 -1
  135. package/lib/components/dropdown/dropdown.vue2.cjs +1 -1
  136. package/lib/components/empty/empty.vue2.cjs +1 -1
  137. package/lib/components/footer-layout/footer-layout.vue2.cjs +1 -1
  138. package/lib/components/form/form-item.vue2.cjs +1 -1
  139. package/lib/components/form/form.vue2.cjs +1 -1
  140. package/lib/components/full-screen/full-screen.vue2.cjs +1 -1
  141. package/lib/components/header-layout/header-layout.vue2.cjs +1 -1
  142. package/lib/components/horizontal-menu/horizontal-menu.vue2.cjs +1 -1
  143. package/lib/components/icon/icon.vue2.cjs +1 -1
  144. package/lib/components/icon-text/icon-text.vue2.cjs +1 -1
  145. package/lib/components/iframe-layout/iframe-layout.vue2.cjs +1 -1
  146. package/lib/components/iframe-layout/iframe-page.vue2.cjs +1 -1
  147. package/lib/components/image/image.vue2.cjs +1 -1
  148. package/lib/components/image-viewer/image-viewer.vue2.cjs +1 -1
  149. package/lib/components/link/link.vue2.cjs +1 -1
  150. package/lib/components/list-cell/list-cell.vue2.cjs +1 -1
  151. package/lib/components/logo/logo.vue2.cjs +1 -1
  152. package/lib/components/md-comment/md-comment.vue2.cjs +1 -1
  153. package/lib/components/md-container/md-container.vue2.cjs +1 -1
  154. package/lib/components/md-vue-playground/md-vue-playground.vue2.cjs +1 -1
  155. package/lib/components/menu/menu-item-group.vue2.cjs +1 -1
  156. package/lib/components/menu/menu-item.vue2.cjs +1 -1
  157. package/lib/components/menu/menu.vue2.cjs +1 -1
  158. package/lib/components/menu/sub-menu.vue2.cjs +1 -1
  159. package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
  160. package/lib/components/overlay/overlay.vue2.cjs +1 -1
  161. package/lib/components/page-wrapper/page-wrapper.vue2.cjs +1 -1
  162. package/lib/components/pagination/pagination.vue2.cjs +1 -1
  163. package/lib/components/popconfirm/popconfirm.vue2.cjs +1 -1
  164. package/lib/components/popover/popover.vue2.cjs +1 -1
  165. package/lib/components/popper/arrow.vue2.cjs +1 -1
  166. package/lib/components/popper/content.vue2.cjs +1 -1
  167. package/lib/components/popper/popper.vue2.cjs +1 -1
  168. package/lib/components/popper/trigger.vue2.cjs +1 -1
  169. package/lib/components/qrcode/qrcode.vue2.cjs +1 -1
  170. package/lib/components/radio/radio-button.vue2.cjs +1 -1
  171. package/lib/components/radio/radio-group.vue2.cjs +1 -1
  172. package/lib/components/radio/radio.vue2.cjs +1 -1
  173. package/lib/components/result/result.vue2.cjs +1 -1
  174. package/lib/components/router-view-content/router-view-content.vue2.cjs +1 -1
  175. package/lib/components/row/row.vue2.cjs +1 -1
  176. package/lib/components/scrollbar/scrollbar.vue2.cjs +1 -1
  177. package/lib/components/search/search.vue2.cjs +1 -1
  178. package/lib/components/side-menu/side-menu.vue2.cjs +1 -1
  179. package/lib/components/skeleton/skeleton-item.vue2.cjs +1 -1
  180. package/lib/components/skeleton/skeleton.vue2.cjs +1 -1
  181. package/lib/components/switch/switch.vue2.cjs +1 -1
  182. package/lib/components/table/table.vue2.cjs +1 -1
  183. package/lib/components/tabs/tab-nav.vue2.cjs +1 -1
  184. package/lib/components/tabs/tab-pane.vue2.cjs +1 -1
  185. package/lib/components/tabs/tabs.vue2.cjs +1 -1
  186. package/lib/components/time-picker/common/picker.vue2.cjs +1 -1
  187. package/lib/components/time-select/time-select.vue2.cjs +1 -1
  188. package/lib/components/tooltip/content.vue2.cjs +1 -1
  189. package/lib/components/tooltip/tooltip.vue2.cjs +1 -1
  190. package/lib/components/tooltip/trigger.vue2.cjs +1 -1
  191. package/lib/components/verify-code/verify-code.vue2.cjs +1 -1
  192. package/lib/constants/date.cjs +1 -1
  193. package/lib/package.json.cjs +1 -1
  194. package/package.json +7 -7
  195. package/theme-style/index.css +1 -1
  196. package/theme-style/src/table.scss +20 -15
  197. package/theme-style/vft-table.css +1 -1
  198. package/web-types.json +1 -1
@@ -1,4 +1,4 @@
1
- import { defineComponent as E, getCurrentInstance as Z, inject as _, ref as g, computed as I, watch as O, onMounted as tt, onUpdated as ot, createVNode as l, nextTick as et } from "vue";
1
+ import { defineComponent as Q, getCurrentInstance as Z, inject as _, ref as g, computed as I, watch as O, onMounted as tt, onUpdated as ot, createVNode as l, nextTick as et } from "vue";
2
2
  import { capitalize as $ } from "@vft/utils";
3
3
  import { throwError as it } from "../../utils/error.js";
4
4
  import "lodash";
@@ -88,13 +88,12 @@ import "../../hooks/use-z-index/index.js";
88
88
  import { EVENT_CODE as T } from "@vft/constants";
89
89
  import { TabsRootContextKey as st } from "./types.js";
90
90
  import lt from "./tab-bar.vue2.js";
91
- const V = (
91
+ const E = (
92
92
  /* hoist-static*/
93
93
  K("tab-nav")
94
- ), ct = E({
95
- name: V.b()
96
- }), Xo = /* @__PURE__ */ E({
97
- ...ct,
94
+ ), Uo = /* @__PURE__ */ Q({
95
+ name: E.b(),
96
+ __name: "tab-nav",
98
97
  props: {
99
98
  panes: {},
100
99
  editable: {
@@ -117,20 +116,20 @@ const V = (
117
116
  },
118
117
  emits: ["tabClick", "tabRemove", "tabAdd", "tabContextmenu"],
119
118
  setup(n, {
120
- expose: D,
119
+ expose: V,
121
120
  emit: h
122
121
  }) {
123
122
  var A;
124
- const M = Z(), d = _(st);
125
- d || it(V.b(), "<vft-tabs><tab-nav /></vft-tabs>");
126
- const e = K("tabs"), q = nt(), H = rt(), y = g(), v = g(), C = g(), m = g(!1), f = g(0), k = g(!1), x = g(!0), w = I(() => ["top", "bottom"].includes(d.props.tabPosition) ? "width" : "height"), W = I(() => ({
123
+ const D = Z(), d = _(st);
124
+ d || it(E.b(), "<vft-tabs><tab-nav /></vft-tabs>");
125
+ const e = K("tabs"), M = nt(), q = rt(), y = g(), v = g(), C = g(), m = g(!1), f = g(0), k = g(!1), x = g(!0), w = I(() => ["top", "bottom"].includes(d.props.tabPosition) ? "width" : "height"), H = I(() => ({
127
126
  transform: `translate${w.value === "width" ? "X" : "Y"}(-${f.value}px)`
128
- })), j = () => {
127
+ })), W = () => {
129
128
  if (!v.value)
130
129
  return;
131
130
  const o = v.value[`offset${$(w.value)}`], t = f.value;
132
131
  t && (f.value = t > o ? t - o : 0);
133
- }, U = () => {
132
+ }, j = () => {
134
133
  if (!v.value || !C.value)
135
134
  return;
136
135
  const o = C.value[`offset${$(w.value)}`], t = v.value[`offset${$(w.value)}`], i = f.value;
@@ -151,7 +150,7 @@ const V = (
151
150
  return;
152
151
  const o = C.value[`offset${$(w.value)}`], t = v.value[`offset${$(w.value)}`], i = f.value;
153
152
  t < o ? (m.value = m.value || {}, m.value.prev = i, m.value.next = i + t < o, o - i < t && (f.value = o - t)) : (m.value = !1, i > 0 && (f.value = 0));
154
- }, X = (o) => {
153
+ }, U = (o) => {
155
154
  const t = o.code, {
156
155
  up: i,
157
156
  down: b,
@@ -166,26 +165,26 @@ const V = (
166
165
  }, P = () => {
167
166
  x.value && (k.value = !0);
168
167
  }, S = () => k.value = !1;
169
- O(q, (o) => {
168
+ O(M, (o) => {
170
169
  o === "hidden" ? x.value = !1 : o === "visible" && setTimeout(() => x.value = !0, 50);
171
- }), O(H, (o) => {
170
+ }), O(q, (o) => {
172
171
  o ? setTimeout(() => x.value = !0, 50) : x.value = !1;
173
- }), at(y, z), tt(() => setTimeout(() => R(), 0)), ot(() => z()), D({
172
+ }), at(y, z), tt(() => setTimeout(() => R(), 0)), ot(() => z()), V({
174
173
  scrollToActiveTab: R,
175
174
  removeFocus: S
176
- }), O(() => n.panes, () => M.update(), {
175
+ }), O(() => n.panes, () => D.update(), {
177
176
  flush: "post"
178
177
  });
179
- const Y = I(() => {
178
+ const X = I(() => {
180
179
  var o, t;
181
180
  return m.value ? [l("span", {
182
181
  class: [e.e("nav-prev"), e.is("disabled", !m.value.prev)],
183
- onClick: j
182
+ onClick: W
184
183
  }, [(o = n.arrowLeftIconCfg) != null && o.icon ? l(B, n.arrowLeftIconCfg, null) : null]), l("span", {
185
184
  class: [e.e("nav-next"), e.is("disabled", !m.value.next)],
186
- onClick: U
185
+ onClick: j
187
186
  }, [(t = n.arrowRightIconCfg) != null && t.icon ? l(B, n.arrowRightIconCfg, null) : null])] : null;
188
- }), G = I(() => {
187
+ }), Y = I(() => {
189
188
  var o;
190
189
  return (o = n.panes) == null ? void 0 : o.map((t, i) => {
191
190
  var N, F, L;
@@ -194,7 +193,7 @@ const V = (
194
193
  const c = u ? l("span", {
195
194
  class: "is-icon-close",
196
195
  onClick: (p) => h("tabRemove", t, p)
197
- }, [(N = n.closeIconCfg) != null && N.icon ? l(B, n.closeIconCfg, null) : null]) : null, a = ((L = (F = t.slots).label) == null ? void 0 : L.call(F)) || t.props.label, Q = !s && t.active ? 0 : -1;
196
+ }, [(N = n.closeIconCfg) != null && N.icon ? l(B, n.closeIconCfg, null) : null]) : null, a = ((L = (F = t.slots).label) == null ? void 0 : L.call(F)) || t.props.label, J = !s && t.active ? 0 : -1;
198
197
  return l("div", {
199
198
  ref: `tab-${b}`,
200
199
  class: [e.e("item"), e.is(d.props.tabPosition), e.is("active", t.active), e.is("disabled", s), e.is("closable", u), e.is("focus", k.value)],
@@ -203,7 +202,7 @@ const V = (
203
202
  "aria-controls": `pane-${r}`,
204
203
  role: "tab",
205
204
  "aria-selected": t.active,
206
- tabindex: Q,
205
+ tabindex: J,
207
206
  onFocus: () => P(),
208
207
  onBlur: () => S(),
209
208
  onClick: (p) => {
@@ -221,7 +220,7 @@ const V = (
221
220
  }
222
221
  }, [a, c]);
223
222
  });
224
- }), J = n.editable || n.addable ? l("span", {
223
+ }), G = n.editable || n.addable ? l("span", {
225
224
  class: e.e("new-tab"),
226
225
  tabindex: "0",
227
226
  onClick: () => h("tabAdd"),
@@ -232,20 +231,20 @@ const V = (
232
231
  return () => l("div", {
233
232
  ref: y,
234
233
  class: [e.e("nav-wrap"), e.is("scrollable", !!m.value), e.is(d.props.tabPosition)]
235
- }, [Y.value, l("div", {
234
+ }, [X.value, l("div", {
236
235
  class: e.e("nav-scroll"),
237
236
  ref: v
238
237
  }, [l("div", {
239
238
  class: [e.e("nav"), e.is(d.props.tabPosition), e.is("stretch", n.stretch && ["top", "bottom"].includes(d.props.tabPosition))],
240
239
  ref: C,
241
- style: W.value,
240
+ style: H.value,
242
241
  role: "tablist",
243
- onKeydown: X
242
+ onKeydown: U
244
243
  }, [n.showBar ? l(lt, {
245
244
  tabs: [...n.panes]
246
- }, null) : null, G.value]), J])]);
245
+ }, null) : null, Y.value]), G])]);
247
246
  }
248
247
  });
249
248
  export {
250
- Xo as default
249
+ Uo as default
251
250
  };
@@ -1,20 +1,19 @@
1
- import { defineComponent as b, getCurrentInstance as y, useSlots as C, inject as B, ref as m, computed as d, watch as g, reactive as w, onMounted as N, onUnmounted as k, unref as o, withDirectives as x, openBlock as z, createElementBlock as R, normalizeClass as S, renderSlot as _, vShow as $, createCommentVNode as E } from "vue";
1
+ import { defineComponent as h, getCurrentInstance as y, useSlots as C, inject as B, ref as u, computed as d, watch as g, reactive as w, onMounted as N, onUnmounted as k, unref as o, withDirectives as x, openBlock as z, createElementBlock as R, normalizeClass as S, renderSlot as $, vShow as E, createCommentVNode as P } from "vue";
2
2
  import "@vft/utils";
3
- import { throwError as P } from "../../utils/error.js";
3
+ import { throwError as j } from "../../utils/error.js";
4
4
  import "lodash";
5
5
  import { eagerComputed as p } from "@vueuse/core";
6
6
  import "../../utils/ns-cover.js";
7
- import { TabsRootContextKey as j } from "./types.js";
8
- import { useNamespace as D } from "../../hooks/use-namespace/index.js";
7
+ import { TabsRootContextKey as D } from "./types.js";
8
+ import { useNamespace as I } from "../../hooks/use-namespace/index.js";
9
9
  import "@popperjs/core";
10
10
  import "../../hooks/use-z-index/index.js";
11
- const I = ["id", "aria-hidden", "aria-labelledby"], i = (
11
+ const K = ["id", "aria-hidden", "aria-labelledby"], i = (
12
12
  /* hoist-static*/
13
- D("tab-pane")
14
- ), K = b({
15
- name: i.b()
16
- }), O = /* @__PURE__ */ b({
17
- ...K,
13
+ I("tab-pane")
14
+ ), L = /* @__PURE__ */ h({
15
+ name: i.b(),
16
+ __name: "tab-pane",
18
17
  props: {
19
18
  label: {},
20
19
  name: {},
@@ -23,27 +22,27 @@ const I = ["id", "aria-hidden", "aria-labelledby"], i = (
23
22
  lazy: { type: Boolean }
24
23
  },
25
24
  setup(a) {
26
- const n = y(), v = C(), t = B(j);
27
- t || P(i.b(), "usage: <vft-tabs><vft-tab-pane /></vft-tabs/>");
28
- const r = m(), f = d(() => a.closable || t.props.closable), e = p(() => t.currentName.value === (a.name ?? r.value)), c = m(e.value), s = d(() => a.name ?? r.value), h = p(() => !a.lazy || c.value || e.value);
25
+ const n = y(), b = C(), t = B(D);
26
+ t || j(i.b(), "usage: <vft-tabs><vft-tab-pane /></vft-tabs/>");
27
+ const r = u(), v = d(() => a.closable || t.props.closable), e = p(() => t.currentName.value === (a.name ?? r.value)), c = u(e.value), s = d(() => a.name ?? r.value), f = p(() => !a.lazy || c.value || e.value);
29
28
  g(e, (l) => {
30
29
  l && (c.value = !0);
31
30
  });
32
- const u = w({
31
+ const m = w({
33
32
  uid: n.uid,
34
- slots: v,
33
+ slots: b,
35
34
  props: n.props,
36
35
  paneName: s,
37
36
  active: e,
38
37
  index: r,
39
- isClosable: f,
38
+ isClosable: v,
40
39
  attrs: n.attrs
41
40
  });
42
41
  return N(() => {
43
- t.registerPane(u);
42
+ t.registerPane(m);
44
43
  }), k(() => {
45
- t.unregisterPane(u.uid);
46
- }), (l, M) => o(h) ? x((z(), R("div", {
44
+ t.unregisterPane(m.uid);
45
+ }), (l, M) => o(f) ? x((z(), R("div", {
47
46
  key: 0,
48
47
  id: `pane-${s.value}`,
49
48
  class: S(o(i).b()),
@@ -51,12 +50,12 @@ const I = ["id", "aria-hidden", "aria-labelledby"], i = (
51
50
  "aria-hidden": !o(e),
52
51
  "aria-labelledby": `tab-${s.value}`
53
52
  }, [
54
- _(l.$slots, "default")
55
- ], 10, I)), [
56
- [$, o(e)]
57
- ]) : E("", !0);
53
+ $(l.$slots, "default")
54
+ ], 10, K)), [
55
+ [E, o(e)]
56
+ ]) : P("", !0);
58
57
  }
59
58
  });
60
59
  export {
61
- O as default
60
+ L as default
62
61
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as w, getCurrentInstance as g, useSlots as M, ref as h, watch as p, nextTick as D, computed as d, createVNode as l, provide as O } from "vue";
1
+ import { defineComponent as z, getCurrentInstance as g, useSlots as M, ref as h, watch as p, nextTick as D, computed as d, createVNode as l, provide as O } from "vue";
2
2
  import { useNamespace as U } from "../../hooks/use-namespace/index.js";
3
3
  import "@popperjs/core";
4
4
  import "lodash";
@@ -13,10 +13,9 @@ import { TabsRootContextKey as S } from "./types.js";
13
13
  const s = (
14
14
  /* hoist-static*/
15
15
  U("tabs")
16
- ), j = w({
17
- name: s.b()
18
- }), oe = /* @__PURE__ */ w({
19
- ...j,
16
+ ), te = /* @__PURE__ */ z({
17
+ name: s.b(),
18
+ __name: "tabs",
20
19
  props: {
21
20
  closable: {
22
21
  type: Boolean
@@ -62,27 +61,27 @@ const s = (
62
61
  expose: c,
63
62
  emit: t
64
63
  }) {
65
- const T = g(), i = M(), u = h(), r = h(a.modelValue ?? "0"), R = (e) => {
64
+ const w = g(), i = M(), u = h(), r = h(a.modelValue ?? "0"), T = (e) => {
66
65
  r.value = e, t("update:modelValue", e), t("tabChange", e);
67
66
  }, m = async (e) => {
68
67
  var o, n, v;
69
68
  if (!(r.value === e || I(e)))
70
69
  try {
71
- await ((o = a.beforeLeave) == null ? void 0 : o.call(a, e, r.value)) !== !1 && (R(e), (v = (n = u.value) == null ? void 0 : n.removeFocus) == null || v.call(n));
70
+ await ((o = a.beforeLeave) == null ? void 0 : o.call(a, e, r.value)) !== !1 && (T(e), (v = (n = u.value) == null ? void 0 : n.removeFocus) == null || v.call(n));
72
71
  } catch {
73
72
  }
74
- }, x = (e, o, n) => {
73
+ }, R = (e, o, n) => {
75
74
  e.props.disabled || (m(o), t("tabClick", e, n));
76
- }, y = (e, o) => {
75
+ }, x = (e, o) => {
77
76
  e.props.disabled || I(e.props.name) || (o.stopPropagation(), t("edit", e.props.name, "remove"), t("tabRemove", e.props.name));
78
77
  };
79
78
  p(() => a.modelValue, (e) => m(e)), p(r, async () => {
80
79
  var e;
81
80
  await D(), (e = u.value) == null || e.scrollToActiveTab();
82
81
  });
83
- const L = () => {
82
+ const y = () => {
84
83
  t("edit", void 0, "add"), t("tabAdd");
85
- }, N = (e, o, n) => {
84
+ }, L = (e, o, n) => {
86
85
  t("tabContextMenu", e, o, n);
87
86
  }, b = d(() => {
88
87
  var e;
@@ -90,31 +89,31 @@ const s = (
90
89
  class: s.e("content")
91
90
  }, [(e = i.default) == null ? void 0 : e.call(i)]);
92
91
  }), {
93
- children: B,
94
- addChild: P,
95
- removeChild: A
92
+ children: N,
93
+ addChild: B,
94
+ removeChild: P
96
95
  } = $(g(), "vft-tab-pane");
97
96
  O(S, {
98
- props: T.props,
97
+ props: w.props,
99
98
  currentName: r,
100
- registerPane: P,
101
- unregisterPane: A
99
+ registerPane: B,
100
+ unregisterPane: P
102
101
  }), c({
103
102
  currentName: r
104
103
  });
105
- const E = d(() => ({
104
+ const A = d(() => ({
106
105
  icon: "ico-ep:plus",
107
106
  size: 12,
108
107
  ...a.addIconCfg
109
- })), V = d(() => ({
108
+ })), E = d(() => ({
110
109
  icon: "ico-ep:close",
111
110
  size: 14,
112
111
  ...a.closeIconCfg
113
- })), k = d(() => ({
112
+ })), V = d(() => ({
114
113
  icon: "ico-ep:arrow-left",
115
114
  size: 18,
116
115
  ...a.arrowLeftIconCfg
117
- })), z = d(() => ({
116
+ })), k = d(() => ({
118
117
  icon: "ico-ep:arrow-right",
119
118
  size: 18,
120
119
  ...a.arrowRightIconCfg
@@ -125,19 +124,19 @@ const s = (
125
124
  }, [l(K, {
126
125
  ref: u,
127
126
  currentName: r.value,
128
- panes: B.value,
127
+ panes: N.value,
129
128
  stretch: a.stretch,
130
129
  showBar: a.showBar,
131
- closeIconCfg: V.value,
132
- addIconCfg: E.value,
133
- arrowRightIconCfg: z.value,
134
- arrowLeftIconCfg: k.value,
130
+ closeIconCfg: E.value,
131
+ addIconCfg: A.value,
132
+ arrowRightIconCfg: k.value,
133
+ arrowLeftIconCfg: V.value,
135
134
  editable: a.editable,
136
135
  addable: a.addable,
137
- onTabClick: x,
138
- onTabRemove: y,
139
- onTabAdd: L,
140
- onTabContextmenu: N
136
+ onTabClick: R,
137
+ onTabRemove: x,
138
+ onTabAdd: y,
139
+ onTabContextmenu: L
141
140
  }, null), (e = i.headerRight) == null ? void 0 : e.call(i)]);
142
141
  });
143
142
  return () => l("div", {
@@ -146,5 +145,5 @@ const s = (
146
145
  }
147
146
  });
148
147
  export {
149
- oe as default
148
+ te as default
150
149
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as ge, ref as v, inject as je, watch as qe, nextTick as j, computed as i, unref as l, provide as He, openBlock as I, createBlock as w, mergeProps as Le, withCtx as q, normalizeClass as m, normalizeStyle as pe, withModifiers as F, createCommentVNode as H, createElementBlock as We, createElementVNode as ee, renderSlot as de, toDisplayString as Je } from "vue";
1
+ import { defineComponent as Ue, ref as v, inject as je, watch as qe, nextTick as j, computed as i, unref as l, provide as He, openBlock as I, createBlock as w, mergeProps as Le, withCtx as q, normalizeClass as m, normalizeStyle as pe, withModifiers as F, createCommentVNode as H, createElementBlock as We, createElementVNode as ee, renderSlot as de, toDisplayString as Je } from "vue";
2
2
  import { isEqual as Ge } from "lodash";
3
3
  import { onClickOutside as Qe } from "@vueuse/core";
4
4
  import { useNamespace as ae } from "../../../hooks/use-namespace/index.js";
@@ -16,10 +16,9 @@ import { valueEquals as ve, parseDate as me, formatter as he } from "../utils.js
16
16
  import { timePickerDefaultProps as Ze } from "./props.js";
17
17
  import { useFormItem as _e } from "../../form/hooks/use-form-item.js";
18
18
  import { useFormSize as xe } from "../../form/hooks/use-form-common-props.js";
19
- const ea = ["id", "name", "placeholder", "value", "disabled", "readonly"], aa = ["id", "name", "placeholder", "value", "disabled", "readonly"], la = ge({
20
- name: "Picker"
21
- }), Ia = /* @__PURE__ */ ge({
22
- ...la,
19
+ const ea = ["id", "name", "placeholder", "value", "disabled", "readonly"], aa = ["id", "name", "placeholder", "value", "disabled", "readonly"], ka = /* @__PURE__ */ Ue({
20
+ name: "Picker",
21
+ __name: "picker",
23
22
  props: Ze,
24
23
  emits: [
25
24
  "update:modelValue",
@@ -31,8 +30,8 @@ const ea = ["id", "name", "placeholder", "value", "disabled", "readonly"], aa =
31
30
  "visible-change",
32
31
  "keydown"
33
32
  ],
34
- setup(ye, { expose: be, emit: p }) {
35
- const t = ye, E = v("zh-cn"), h = ae("date"), D = ae("input"), g = ae("range"), { form: W, formItem: V } = _e(), ke = je("VftPopperOptions", {}), J = v(), b = v(), u = v(!1), G = v(!1), le = v(null);
33
+ setup(ge, { expose: ye, emit: p }) {
34
+ const t = ge, E = v("zh-cn"), h = ae("date"), D = ae("input"), g = ae("range"), { form: W, formItem: V } = _e(), be = je("VftPopperOptions", {}), J = v(), b = v(), u = v(!1), G = v(!1), le = v(null);
36
35
  let Q = !1, S = !1;
37
36
  qe(u, (e) => {
38
37
  e ? j(() => {
@@ -50,7 +49,7 @@ const ea = ["id", "name", "placeholder", "value", "disabled", "readonly"], aa =
50
49
  (o) => he(o, t.valueFormat, E.value)
51
50
  ) : e && (a = he(e, t.valueFormat, E.value)), p("update:modelValue", e && a, E.value);
52
51
  }
53
- }, Ie = (e) => {
52
+ }, ke = (e) => {
54
53
  p("keydown", e);
55
54
  }, T = i(() => {
56
55
  if (b.value) {
@@ -58,10 +57,10 @@ const ea = ["id", "name", "placeholder", "value", "disabled", "readonly"], aa =
58
57
  return Array.from(e.querySelectorAll("input"));
59
58
  }
60
59
  return [];
61
- }), Ve = (e, a, o) => {
60
+ }), Ie = (e, a, o) => {
62
61
  const r = T.value;
63
62
  r.length && (!o || o === "min" ? (r[0].setSelectionRange(e, a), r[0].focus()) : o === "max" && (r[1].setSelectionRange(e, a), r[1].focus()));
64
- }, Pe = () => {
63
+ }, Ve = () => {
65
64
  Y(!0, !0), j(() => {
66
65
  S = !1;
67
66
  });
@@ -69,17 +68,17 @@ const ea = ["id", "name", "placeholder", "value", "disabled", "readonly"], aa =
69
68
  a || (S = !0), u.value = a;
70
69
  let o;
71
70
  y(e) ? o = e.map((r) => r.toDate()) : o = e && e.toDate(), n.value = null, k(o);
72
- }, we = () => {
71
+ }, Pe = () => {
73
72
  G.value = !0;
74
- }, Ce = () => {
73
+ }, we = () => {
75
74
  p("visible-change", !0);
76
- }, Ee = (e) => {
75
+ }, Ce = (e) => {
77
76
  (e == null ? void 0 : e.key) === C.esc && Y(!0, !0);
78
- }, De = () => {
77
+ }, Ee = () => {
79
78
  G.value = !1, u.value = !1, S = !1, p("visible-change", !1);
80
- }, Se = () => {
79
+ }, De = () => {
81
80
  u.value = !0;
82
- }, Te = () => {
81
+ }, Se = () => {
83
82
  u.value = !1;
84
83
  }, Y = (e = !0, a = !1) => {
85
84
  S = a;
@@ -118,11 +117,11 @@ const ea = ["id", "name", "placeholder", "value", "disabled", "readonly"], aa =
118
117
  return y(n.value) ? [
119
118
  n.value[0] || e && e[0] || "",
120
119
  n.value[1] || e && e[1] || ""
121
- ] : n.value !== null ? n.value : !Me.value && K.value || !u.value && K.value ? "" : e ? te.value ? e.join(", ") : e : "";
122
- }), Re = i(() => t.type.includes("time")), Me = i(() => t.type.startsWith("time")), te = i(() => t.type === "dates"), O = i(
123
- () => t.prefixIcon || (Re.value ? "ico-ep:clock" : "ico-ep:calendar")
120
+ ] : n.value !== null ? n.value : !Re.value && K.value || !u.value && K.value ? "" : e ? te.value ? e.join(", ") : e : "";
121
+ }), Te = i(() => t.type.includes("time")), Re = i(() => t.type.startsWith("time")), te = i(() => t.type === "dates"), O = i(
122
+ () => t.prefixIcon || (Te.value ? "ico-ep:clock" : "ico-ep:calendar")
124
123
  ), P = v(!1), ue = (e) => {
125
- t.readonly || c.value || P.value && (e.stopPropagation(), Pe(), k(null), X(null, !0), P.value = !1, u.value = !1, s.value.handleClear && s.value.handleClear());
124
+ t.readonly || c.value || P.value && (e.stopPropagation(), Ve(), k(null), X(null, !0), P.value = !1, u.value = !1, s.value.handleClear && s.value.handleClear());
126
125
  }, K = i(() => {
127
126
  const { modelValue: e } = t;
128
127
  return !e || y(e) && !e.filter(Boolean).length;
@@ -136,7 +135,7 @@ const ea = ["id", "name", "placeholder", "value", "disabled", "readonly"], aa =
136
135
  }, z = (e) => {
137
136
  var a;
138
137
  t.readonly || c.value || (((a = e.touches[0].target) == null ? void 0 : a.tagName) !== "INPUT" || T.value.includes(document.activeElement)) && (u.value = !0);
139
- }, N = i(() => t.type.includes("range")), Z = xe(), Fe = i(() => {
138
+ }, N = i(() => t.type.includes("range")), Z = xe(), Me = i(() => {
140
139
  var e, a;
141
140
  return (a = (e = l(J)) == null ? void 0 : e.popperRef) == null ? void 0 : a.contentRef;
142
141
  }), ie = i(() => {
@@ -144,7 +143,7 @@ const ea = ["id", "name", "placeholder", "value", "disabled", "readonly"], aa =
144
143
  return l(N) ? l(b) : (e = l(b)) == null ? void 0 : e.$el;
145
144
  });
146
145
  Qe(ie, (e) => {
147
- const a = l(Fe), o = l(ie);
146
+ const a = l(Me), o = l(ie);
148
147
  a && (e.target === a || e.composedPath().includes(a)) || e.target === o || e.composedPath().includes(o) || (u.value = !1);
149
148
  });
150
149
  const n = v(null), _ = () => {
@@ -159,7 +158,7 @@ const ea = ["id", "name", "placeholder", "value", "disabled", "readonly"], aa =
159
158
  if (t.readonly || c.value)
160
159
  return;
161
160
  const { code: a } = e;
162
- if (Ie(e), a === C.esc) {
161
+ if (ke(e), a === C.esc) {
163
162
  u.value === !0 && (u.value = !1, e.preventDefault(), e.stopPropagation());
164
163
  return;
165
164
  }
@@ -180,15 +179,15 @@ const ea = ["id", "name", "placeholder", "value", "disabled", "readonly"], aa =
180
179
  return;
181
180
  }
182
181
  s.value.handleKeydownInput && s.value.handleKeydownInput(e);
183
- }, Be = (e) => {
182
+ }, Fe = (e) => {
184
183
  n.value = e, u.value || (u.value = !0);
185
- }, $e = (e) => {
184
+ }, Be = (e) => {
186
185
  const a = e.target;
187
186
  n.value ? n.value = [a.value, n.value[1]] : n.value = [a.value, null];
188
- }, Oe = (e) => {
187
+ }, $e = (e) => {
189
188
  const a = e.target;
190
189
  n.value ? n.value = [n.value[0], a.value] : n.value = [null, a.value];
191
- }, Ke = () => {
190
+ }, Oe = () => {
192
191
  var r;
193
192
  const e = n.value, a = A(e && e[0]), o = l($);
194
193
  if (a && a.isValid()) {
@@ -199,7 +198,7 @@ const ea = ["id", "name", "placeholder", "value", "disabled", "readonly"], aa =
199
198
  const f = [a, o && (o[1] || null)];
200
199
  U(f) && (k(f), n.value = null);
201
200
  }
202
- }, ze = () => {
201
+ }, Ke = () => {
203
202
  var r;
204
203
  const e = l(n), a = A(e && e[1]), o = l($);
205
204
  if (a && a.isValid()) {
@@ -210,16 +209,16 @@ const ea = ["id", "name", "placeholder", "value", "disabled", "readonly"], aa =
210
209
  const f = [o && o[0], a];
211
210
  U(f) && (k(f), n.value = null);
212
211
  }
213
- }, s = v({}), Ne = (e) => {
212
+ }, s = v({}), ze = (e) => {
214
213
  s.value[e[0]] = e[1], s.value.panelReady = !0;
215
- }, Ae = (e) => {
214
+ }, Ne = (e) => {
216
215
  p("calendar-change", e);
217
- }, Ue = (e, a, o) => {
216
+ }, Ae = (e, a, o) => {
218
217
  p("panel-change", e, a, o);
219
218
  };
220
219
  return He("EP_PICKER_BASE", {
221
220
  props: t
222
- }), be({
221
+ }), ye({
223
222
  /**
224
223
  * @description focus input box.
225
224
  */
@@ -235,11 +234,11 @@ const ea = ["id", "name", "placeholder", "value", "disabled", "readonly"], aa =
235
234
  /**
236
235
  * @description opens picker
237
236
  */
238
- handleOpen: Se,
237
+ handleOpen: De,
239
238
  /**
240
239
  * @description closes picker
241
240
  */
242
- handleClose: Te,
241
+ handleClose: Se,
243
242
  /**
244
243
  * @description pick item manually
245
244
  */
@@ -256,15 +255,15 @@ const ea = ["id", "name", "placeholder", "value", "disabled", "readonly"], aa =
256
255
  teleported: "",
257
256
  transition: `${l(h).namespace.value}-zoom-in-top`,
258
257
  "popper-class": [`${l(h).namespace.value}-picker__popper`, e.popperClass],
259
- "popper-options": l(ke),
258
+ "popper-options": l(be),
260
259
  "fallback-placements": ["bottom", "top", "right", "left"],
261
260
  "gpu-acceleration": !1,
262
261
  "stop-popper-mouse-event": !1,
263
262
  "hide-after": 0,
264
263
  persistent: "",
265
- onBeforeShow: we,
266
- onShow: Ce,
267
- onHide: De
264
+ onBeforeShow: Pe,
265
+ onShow: we,
266
+ onHide: Ee
268
267
  }), {
269
268
  default: q(() => [
270
269
  N.value ? (I(), We("div", {
@@ -305,8 +304,8 @@ const ea = ["id", "name", "placeholder", "value", "disabled", "readonly"], aa =
305
304
  readonly: !e.editable || e.readonly,
306
305
  class: m(l(g).b("input")),
307
306
  onMousedown: M,
308
- onInput: $e,
309
- onChange: Ke,
307
+ onInput: Be,
308
+ onChange: Oe,
310
309
  onFocus: R,
311
310
  onBlur: B
312
311
  }, null, 42, ea),
@@ -327,8 +326,8 @@ const ea = ["id", "name", "placeholder", "value", "disabled", "readonly"], aa =
327
326
  onMousedown: M,
328
327
  onFocus: R,
329
328
  onBlur: B,
330
- onInput: Oe,
331
- onChange: ze
329
+ onInput: $e,
330
+ onChange: Ke
332
331
  }, null, 42, aa),
333
332
  e.clearIcon ? (I(), w(l(L), {
334
333
  key: 1,
@@ -359,7 +358,7 @@ const ea = ["id", "name", "placeholder", "value", "disabled", "readonly"], aa =
359
358
  label: e.label,
360
359
  tabindex: e.tabindex,
361
360
  "validate-event": !1,
362
- onInput: Be,
361
+ onInput: Fe,
363
362
  onFocus: R,
364
363
  onBlur: B,
365
364
  onKeydown: (
@@ -404,11 +403,11 @@ const ea = ["id", "name", "placeholder", "value", "disabled", "readonly"], aa =
404
403
  type: e.type,
405
404
  defaultValue: e.defaultValue,
406
405
  onPick: ne,
407
- onSelectRange: Ve,
408
- onSetPickerOption: Ne,
409
- onCalendarChange: Ae,
410
- onPanelChange: Ue,
411
- onKeydown: Ee,
406
+ onSelectRange: Ie,
407
+ onSetPickerOption: ze,
408
+ onCalendarChange: Ne,
409
+ onPanelChange: Ae,
410
+ onKeydown: Ce,
412
411
  onMousedown: a[1] || (a[1] = F(() => {
413
412
  }, ["stop"]))
414
413
  })
@@ -418,5 +417,5 @@ const ea = ["id", "name", "placeholder", "value", "disabled", "readonly"], aa =
418
417
  }
419
418
  });
420
419
  export {
421
- Ia as default
420
+ ka as default
422
421
  };