vft 0.0.252 → 0.0.253

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 (56) hide show
  1. package/dist/index.css +1 -1
  2. package/es/components/carousel/carousel-item.vue.d.ts +1 -4
  3. package/es/components/carousel/carousel-item.vue2.js +43 -43
  4. package/es/components/carousel/carousel.vue.d.ts +7 -61
  5. package/es/components/carousel/carousel.vue2.js +158 -113
  6. package/es/components/carousel/constants.d.ts +7 -4
  7. package/es/components/carousel/constants.js +2 -1
  8. package/es/components/carousel/index.d.ts +69 -117
  9. package/es/components/carousel/index.js +8 -7
  10. package/es/components/carousel/types.d.ts +19 -0
  11. package/es/components/carousel/types.js +1 -0
  12. package/es/components/carousel/use-carousel-item.d.ts +2 -2
  13. package/es/components/carousel/use-carousel-item.js +53 -53
  14. package/es/components/carousel/use-carousel.d.ts +10 -1
  15. package/es/components/carousel/use-carousel.js +131 -112
  16. package/es/components/date-picker/composables/use-basic-date-table.d.ts +2 -2
  17. package/es/components/date-picker/composables/use-range-picker.d.ts +2 -2
  18. package/es/components/index.js +55 -54
  19. package/es/components/multiple-tabs/multiple-tabs.vue2.js +26 -26
  20. package/es/components/popover/popover.vue2.js +19 -19
  21. package/es/components/time-picker/composables/use-time-picker.d.ts +4 -4
  22. package/es/components/upload/use-handlers.d.ts +4 -4
  23. package/es/hooks/use-ordered-children/index.js +7 -7
  24. package/es/index.js +72 -71
  25. package/es/package.json.d.ts +1 -1
  26. package/es/package.json.js +1 -1
  27. package/lib/components/carousel/carousel-item.vue.d.ts +1 -4
  28. package/lib/components/carousel/carousel-item.vue2.cjs +1 -1
  29. package/lib/components/carousel/carousel.vue.d.ts +7 -61
  30. package/lib/components/carousel/carousel.vue2.cjs +1 -1
  31. package/lib/components/carousel/constants.cjs +1 -1
  32. package/lib/components/carousel/constants.d.ts +7 -4
  33. package/lib/components/carousel/index.cjs +1 -1
  34. package/lib/components/carousel/index.d.ts +69 -117
  35. package/lib/components/carousel/types.cjs +1 -0
  36. package/lib/components/carousel/types.d.ts +19 -0
  37. package/lib/components/carousel/use-carousel-item.cjs +1 -1
  38. package/lib/components/carousel/use-carousel-item.d.ts +2 -2
  39. package/lib/components/carousel/use-carousel.cjs +1 -1
  40. package/lib/components/carousel/use-carousel.d.ts +10 -1
  41. package/lib/components/date-picker/composables/use-basic-date-table.d.ts +2 -2
  42. package/lib/components/date-picker/composables/use-range-picker.d.ts +2 -2
  43. package/lib/components/index.cjs +1 -1
  44. package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
  45. package/lib/components/popover/popover.vue2.cjs +1 -1
  46. package/lib/components/time-picker/composables/use-time-picker.d.ts +4 -4
  47. package/lib/components/upload/use-handlers.d.ts +4 -4
  48. package/lib/hooks/use-ordered-children/index.cjs +1 -1
  49. package/lib/index.cjs +1 -1
  50. package/lib/package.json.cjs +1 -1
  51. package/lib/package.json.d.ts +1 -1
  52. package/package.json +4 -4
  53. package/theme-style/index.css +1 -1
  54. package/theme-style/src/carousel.scss +45 -31
  55. package/theme-style/vft-carousel.css +1 -1
  56. package/web-types.json +1 -1
@@ -1,26 +1,26 @@
1
- import { defineComponent as S, getCurrentInstance as N, ref as p, computed as g, watchEffect as z, unref as n, onMounted as D, createElementBlock as T, openBlock as x, normalizeStyle as H, normalizeClass as K, createVNode as y, withCtx as R, Fragment as W, renderList as $, createBlock as F } from "vue";
1
+ import { defineComponent as S, getCurrentInstance as N, ref as p, computed as g, watchEffect as z, unref as n, onMounted as D, createElementBlock as T, openBlock as x, normalizeStyle as H, normalizeClass as K, createVNode as y, withCtx as C, Fragment as W, renderList as $, createBlock as F } from "vue";
2
2
  import { VftTabs as U, VftTabPane as j } from "../tabs/index.js";
3
- import "@vueuse/core";
3
+ import { isClient as q } from "@vueuse/core";
4
4
  import "@vft/utils";
5
- import { generateCssVars as C } from "../../utils/ns-cover.js";
5
+ import { generateCssVars as R } from "../../utils/ns-cover.js";
6
6
  import "lodash-es";
7
- import { useNamespace as q } from "../../hooks/use-namespace/index.js";
7
+ import { useNamespace as G } from "../../hooks/use-namespace/index.js";
8
8
  import "../../hooks/use-model-toggle/index.js";
9
9
  import "@popperjs/core";
10
10
  import "../../hooks/use-z-index/index.js";
11
- import { useRouterHelper as G, getRouterKeyPath as f, listenerRouteChange as J } from "@vft/router";
12
- import { useMultipleTabStore as O, useTabs as Q } from "@vft/store";
13
- import { useRefs as X } from "@vft/use";
14
- import Y from "hotkeys-js";
15
- import { onBeforeRouteLeave as Z } from "vue-router";
16
- import ee from "./tab-content.vue2.js";
17
- import { initAffixTabs as te, useTabsDrag as ae } from "./use/use-multiple-tabs.js";
11
+ import { useRouterHelper as J, getRouterKeyPath as f, listenerRouteChange as O } from "@vft/router";
12
+ import { useMultipleTabStore as Q, useTabs as X } from "@vft/store";
13
+ import { useRefs as Y } from "@vft/use";
14
+ import Z from "hotkeys-js";
15
+ import { onBeforeRouteLeave as ee } from "vue-router";
16
+ import te from "./tab-content.vue2.js";
17
+ import { initAffixTabs as ae, useTabsDrag as ne } from "./use/use-multiple-tabs.js";
18
18
  import "../context-menu/context-menu.vue2.js";
19
19
  import "../icon/index.js";
20
- const ne = S({
20
+ const oe = S({
21
21
  name: "vft-multiple-tabs"
22
- }), Se = /* @__PURE__ */ S({
23
- ...ne,
22
+ }), _e = /* @__PURE__ */ S({
23
+ ...oe,
24
24
  props: {
25
25
  tabsStyle: {},
26
26
  contextMenuStyle: {},
@@ -29,15 +29,15 @@ const ne = S({
29
29
  fixExtraScrollWidth: {}
30
30
  },
31
31
  setup(m) {
32
- const _ = q("multiple-tabs"), r = N().appContext.config.globalProperties.$router, s = te(r), u = O(), o = p(""), i = p(0), d = p(), { go: b } = G(r), c = g(() => u.getTabList.filter((e) => !e.meta?.hideTab));
32
+ const _ = G("multiple-tabs"), r = N().appContext.config.globalProperties.$router, s = ae(r), u = Q(), o = p(""), i = p(0), d = p(), { go: b } = J(r), c = g(() => u.getTabList.filter((e) => !e.meta?.hideTab));
33
33
  z(() => {
34
34
  if (o.value) {
35
35
  const e = c.value.findIndex((a) => f(a) === o.value);
36
36
  e === -1 ? i.value = c.value?.length - 1 : i.value = e, i.value = i.value < s?.length ? s?.length - 1 : i.value;
37
37
  }
38
- }), Z(() => {
38
+ }), q && ee(() => {
39
39
  d.value = n(r.currentRoute);
40
- }), J(({ route: e }) => {
40
+ }), O(({ route: e }) => {
41
41
  if (!e || e.meta?.hasTokenToRoot)
42
42
  return;
43
43
  const { meta: a = {} } = e, { currentActivePath: t, hideTab: l } = a, I = l ? t : null, h = f(e);
@@ -63,12 +63,12 @@ const ne = S({
63
63
  function k(e) {
64
64
  u.closeTabByKey(e, r);
65
65
  }
66
- const { refs: w, setRefs: M } = X();
66
+ const { refs: w, setRefs: M } = Y();
67
67
  function V(e) {
68
68
  const a = e.pane.attrs.index, t = e.event;
69
69
  w.value[a].handleContext(t);
70
70
  }
71
- const B = g(() => ({ ...C({
71
+ const B = g(() => ({ ...R({
72
72
  padding: "4px 0 0",
73
73
  "border-bottom": "none",
74
74
  "header-height": "26px",
@@ -81,8 +81,8 @@ const ne = S({
81
81
  "header-margin": "0 0 0 8px",
82
82
  "item-border-radius": "5px 5px 0 0",
83
83
  "item-border": "none"
84
- }, "tabs"), ...m.tabsStyle })), { closeCurrent: A } = Q(), E = {
85
- ...C(
84
+ }, "tabs"), ...m.tabsStyle })), { closeCurrent: A } = X(), E = {
85
+ ...R(
86
86
  {
87
87
  "sub-item-height": "40px",
88
88
  "item-min-width": "150px"
@@ -92,7 +92,7 @@ const ne = S({
92
92
  ...m.contextMenuStyle
93
93
  };
94
94
  return D(() => {
95
- m.canDrag && ae(s), Y("command+e, ctrl+e", function() {
95
+ m.canDrag && ne(s), Z("command+e, ctrl+e", function() {
96
96
  return A(), !1;
97
97
  });
98
98
  }), (e, a) => (x(), T("div", {
@@ -109,15 +109,15 @@ const ne = S({
109
109
  onTabRemove: k,
110
110
  onTabContextMenu: V
111
111
  }, {
112
- default: R(() => [
112
+ default: C(() => [
113
113
  (x(!0), T(W, null, $(c.value, (t, l) => (x(), F(n(j), {
114
114
  key: n(f)(t) + l,
115
115
  closable: !t.meta?.affix,
116
116
  index: l,
117
117
  name: n(f)(t)
118
118
  }, {
119
- label: R(() => [
120
- y(ee, {
119
+ label: C(() => [
120
+ y(te, {
121
121
  "context-menu-style": E,
122
122
  "affix-num": n(s)?.length,
123
123
  ref_for: !0,
@@ -134,5 +134,5 @@ const ne = S({
134
134
  }
135
135
  });
136
136
  export {
137
- Se as default
137
+ _e as default
138
138
  };
@@ -1,18 +1,18 @@
1
- import { defineComponent as m, computed as r, ref as S, unref as l, createBlock as U, openBlock as i, mergeProps as R, withCtx as s, renderSlot as f, createCommentVNode as d, createElementBlock as T, normalizeClass as V, toDisplayString as u, createTextVNode as $ } from "vue";
1
+ import { defineComponent as m, computed as r, ref as S, unref as l, createBlock as U, openBlock as p, mergeProps as R, withCtx as s, renderSlot as f, createCommentVNode as d, createElementBlock as T, normalizeClass as V, toDisplayString as u, createTextVNode as $ } from "vue";
2
2
  import { VftTooltip as N } from "../tooltip/index.js";
3
- import { EVENT_CODE as p } from "../../constants/aria.js";
4
- import "@vueuse/core";
5
- import { addUnit as O } from "@vft/utils";
3
+ import { EVENT_CODE as i } from "../../constants/aria.js";
4
+ import { isClient as O } from "@vueuse/core";
5
+ import { addUnit as K } from "@vft/utils";
6
6
  import "../../utils/ns-cover.js";
7
7
  import "lodash-es";
8
- import { useNamespace as K } from "../../hooks/use-namespace/index.js";
8
+ import { useNamespace as D } from "../../hooks/use-namespace/index.js";
9
9
  import "../../hooks/use-model-toggle/index.js";
10
10
  import "@popperjs/core";
11
11
  import "../../hooks/use-z-index/index.js";
12
- const D = "onUpdate:visible", H = m({
12
+ const H = "onUpdate:visible", L = m({
13
13
  name: "vft-popover"
14
- }), X = /* @__PURE__ */ m({
15
- ...H,
14
+ }), Y = /* @__PURE__ */ m({
15
+ ...L,
16
16
  props: {
17
17
  trigger: { default: "hover" },
18
18
  placement: { default: "bottom" },
@@ -34,9 +34,9 @@ const D = "onUpdate:visible", H = m({
34
34
  hideAfter: { default: 200 },
35
35
  autoClose: { default: 0 },
36
36
  showArrow: { type: Boolean, default: !0 },
37
- persistent: { type: Boolean, default: !0 },
37
+ persistent: { type: Boolean, default: O },
38
38
  appendTo: {},
39
- triggerKeys: { default: () => [p.enter, p.numpadEnter, p.space] },
39
+ triggerKeys: { default: () => [i.enter, i.numpadEnter, i.space] },
40
40
  "onUpdate:visible": {}
41
41
  },
42
42
  emits: [
@@ -47,16 +47,16 @@ const D = "onUpdate:visible", H = m({
47
47
  "after-leave"
48
48
  ],
49
49
  setup(t, { expose: b, emit: c }) {
50
- const o = c, a = K("popover"), v = r(() => [D]), n = S(), g = r(() => l(n)?.popperRef), h = r(() => [
50
+ const o = c, a = D("popover"), v = r(() => [H]), n = S(), g = r(() => l(n)?.popperRef), h = r(() => [
51
51
  {
52
- width: O(t.width)
52
+ width: K(t.width)
53
53
  },
54
54
  t.popperStyle
55
55
  ]), y = r(() => [a.b(), t.popperClass, { [a.m("plain")]: !!t.content }]), w = r(() => t.transition === `${a.namespace.value}-fade-in-linear`), B = () => {
56
56
  n.value?.hide();
57
- }, k = () => {
58
- o("before-enter");
59
57
  }, C = () => {
58
+ o("before-enter");
59
+ }, k = () => {
60
60
  o("before-leave");
61
61
  }, A = () => {
62
62
  o("after-enter");
@@ -66,7 +66,7 @@ const D = "onUpdate:visible", H = m({
66
66
  return b({
67
67
  popperRef: g,
68
68
  hide: B
69
- }), (e, L) => (i(), U(l(N), R({
69
+ }), (e, j) => (p(), U(l(N), R({
70
70
  ref_key: "tooltipRef",
71
71
  ref: n
72
72
  }, e.$attrs, {
@@ -94,13 +94,13 @@ const D = "onUpdate:visible", H = m({
94
94
  persistent: e.persistent,
95
95
  "gpu-acceleration": w.value,
96
96
  "onUpdate:visible": v.value,
97
- onBeforeShow: k,
98
- onBeforeHide: C,
97
+ onBeforeShow: C,
98
+ onBeforeHide: k,
99
99
  onShow: A,
100
100
  onHide: E
101
101
  }), {
102
102
  content: s(() => [
103
- e.title ? (i(), T("div", {
103
+ e.title ? (p(), T("div", {
104
104
  key: 0,
105
105
  class: V(l(a).e("title")),
106
106
  role: "title"
@@ -117,5 +117,5 @@ const D = "onUpdate:visible", H = m({
117
117
  }
118
118
  });
119
119
  export {
120
- X as default
120
+ Y as default
121
121
  };
@@ -29,7 +29,7 @@ export declare const useOldValue: (props: {
29
29
  (value: number): Dayjs;
30
30
  };
31
31
  day: {
32
- (): number;
32
+ (): 0 | 1 | 2 | 3 | 4 | 5 | 6;
33
33
  (value: number): Dayjs;
34
34
  };
35
35
  hour: {
@@ -99,7 +99,7 @@ export declare const useOldValue: (props: {
99
99
  (value: number): Dayjs;
100
100
  };
101
101
  day: {
102
- (): number;
102
+ (): 0 | 1 | 2 | 3 | 4 | 5 | 6;
103
103
  (value: number): Dayjs;
104
104
  };
105
105
  hour: {
@@ -169,7 +169,7 @@ export declare const useOldValue: (props: {
169
169
  (value: number): Dayjs;
170
170
  };
171
171
  day: {
172
- (): number;
172
+ (): 0 | 1 | 2 | 3 | 4 | 5 | 6;
173
173
  (value: number): Dayjs;
174
174
  };
175
175
  hour: {
@@ -239,7 +239,7 @@ export declare const useOldValue: (props: {
239
239
  (value: number): Dayjs;
240
240
  };
241
241
  day: {
242
- (): number;
242
+ (): 0 | 1 | 2 | 3 | 4 | 5 | 6;
243
243
  (value: number): Dayjs;
244
244
  };
245
245
  hour: {
@@ -18,9 +18,9 @@ export declare const useHandlers: (props: UploadProps, uploadRef: ShallowRef<Upl
18
18
  readonly size: number;
19
19
  readonly type: string;
20
20
  arrayBuffer: () => Promise<ArrayBuffer>;
21
- bytes: () => Promise<Uint8Array>;
21
+ bytes: () => Promise<Uint8Array<ArrayBuffer>>;
22
22
  slice: (start?: number, end?: number, contentType?: string) => Blob;
23
- stream: () => ReadableStream<Uint8Array>;
23
+ stream: () => ReadableStream<Uint8Array<ArrayBuffer>>;
24
24
  text: () => Promise<string>;
25
25
  } | undefined;
26
26
  }[], {
@@ -39,9 +39,9 @@ export declare const useHandlers: (props: UploadProps, uploadRef: ShallowRef<Upl
39
39
  readonly size: number;
40
40
  readonly type: string;
41
41
  arrayBuffer: () => Promise<ArrayBuffer>;
42
- bytes: () => Promise<Uint8Array>;
42
+ bytes: () => Promise<Uint8Array<ArrayBuffer>>;
43
43
  slice: (start?: number, end?: number, contentType?: string) => Blob;
44
- stream: () => ReadableStream<Uint8Array>;
44
+ stream: () => ReadableStream<Uint8Array<ArrayBuffer>>;
45
45
  text: () => Promise<string>;
46
46
  } | undefined;
47
47
  }[]>;
@@ -1,14 +1,14 @@
1
+ import { shallowRef as m, defineComponent as v, h as x, triggerRef as p, onMounted as M, isVNode as O } from "vue";
1
2
  import "@vueuse/core";
2
3
  import "@vft/utils";
3
4
  import "../../utils/ns-cover.js";
4
5
  import "lodash-es";
5
- import { flattedChildren as v } from "../../utils/vue/vnode.js";
6
- import { shallowRef as m, defineComponent as x, h as M, triggerRef as p, onMounted as O, isVNode as R } from "vue";
7
- const S = (l, u, r) => v(l.subTree).filter(
8
- (e) => R(e) && e.type?.name === u && !!e.component
6
+ import { flattedChildren as R } from "../../utils/vue/vnode.js";
7
+ const S = (l, u, r) => R(l.subTree).filter(
8
+ (e) => O(e) && e.type?.name === u && !!e.component
9
9
  ).map((e) => e.component.uid).map((e) => r[e]).filter((e) => !!e), I = (l, u) => {
10
10
  const r = m({}), c = m([]), d = /* @__PURE__ */ new WeakMap(), e = (t) => {
11
- r.value[t.uid] = t, p(r), O(() => {
11
+ r.value[t.uid] = t, p(r), M(() => {
12
12
  const o = t.getVnode().el, n = o.parentNode;
13
13
  if (!d.has(n)) {
14
14
  d.set(n, []);
@@ -27,12 +27,12 @@ const S = (l, u, r) => v(l.subTree).filter(
27
27
  u,
28
28
  r.value
29
29
  );
30
- }, g = (t) => t.render(), N = x({
30
+ }, g = (t) => t.render(), N = v({
31
31
  setup(t, { slots: o }) {
32
32
  return () => (C(), o.default ? (
33
33
  // Create a new `ReactiveEffect` to ensure `ChildrenSorter` doesn't track any extra dependencies
34
34
  // @ts-ignore TODO: Remove this after Vue is upgraded
35
- M(g, {
35
+ x(g, {
36
36
  render: o.default
37
37
  })
38
38
  ) : null);