vft 0.0.61 → 0.0.62

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 (155) hide show
  1. package/attributes.json +1 -1
  2. package/dist/index.css +1 -1
  3. package/es/component.js +26 -22
  4. package/es/components/back-top/back-top.vue2.js +4 -2
  5. package/es/components/color-picker/color-picker.vue.d.ts +3 -1
  6. package/es/components/color-picker/color-picker.vue2.js +31 -30
  7. package/es/components/color-picker/index.d.ts +3 -1
  8. package/es/components/context-menu/context-menu.vue2.js +4 -2
  9. package/es/components/dialog/dialog.vue.d.ts +1 -1
  10. package/es/components/dialog/dialog.vue2.js +52 -53
  11. package/es/components/dialog/index.d.ts +3 -3
  12. package/es/components/dialog/index.js +1 -1
  13. package/es/components/dialog/style/css.js +1 -1
  14. package/es/components/dropdown/dropdown.vue.d.ts +5 -5
  15. package/es/components/dropdown/index.d.ts +5 -5
  16. package/es/components/icon-text/icon-text.vue.d.ts +10 -4
  17. package/es/components/icon-text/icon-text.vue2.js +28 -26
  18. package/es/components/icon-text/index.d.ts +10 -4
  19. package/es/components/index.d.ts +2 -0
  20. package/es/components/index.js +117 -109
  21. package/es/components/list-cell/index.d.ts +38 -0
  22. package/es/components/list-cell/index.js +12 -0
  23. package/es/components/list-cell/list-cell.vue.d.ts +53 -0
  24. package/es/components/list-cell/list-cell.vue.js +4 -0
  25. package/es/components/list-cell/list-cell.vue2.js +68 -0
  26. package/es/components/list-cell/style/css.d.ts +0 -0
  27. package/es/components/list-cell/style/css.js +2 -0
  28. package/es/components/list-cell/style/index.d.ts +0 -0
  29. package/es/components/list-cell/style/index.js +2 -0
  30. package/es/components/md-container/md-container.vue2.js +4 -2
  31. package/es/components/menu/index.d.ts +2 -2
  32. package/es/components/menu/menu-item.vue2.js +14 -12
  33. package/es/components/menu/menu.vue.d.ts +2 -2
  34. package/es/components/menu/sub-menu.vue2.js +4 -2
  35. package/es/components/multiple-tabs/multiple-tabs.vue2.js +5 -3
  36. package/es/components/multiple-tabs/tab-content.vue.d.ts +8 -0
  37. package/es/components/multiple-tabs/tab-content.vue2.js +13 -12
  38. package/es/components/multiple-tabs/use/use-tab-dropdown.js +12 -12
  39. package/es/components/result/result.vue2.js +4 -2
  40. package/es/components/search/search.vue2.js +4 -2
  41. package/es/components/select-v2/defaults.d.ts +1 -1
  42. package/es/components/select-v2/index.d.ts +16 -16
  43. package/es/components/select-v2/select.vue.d.ts +8 -8
  44. package/es/components/select-v2/useSelect.d.ts +5 -5
  45. package/es/components/side-menu/index.d.ts +38 -1
  46. package/es/components/side-menu/side-menu.vue.d.ts +38 -1
  47. package/es/components/side-menu/side-menu.vue2.js +144 -113
  48. package/es/components/side-menu/use-drag-line.d.ts +10 -0
  49. package/es/components/side-menu/use-drag-line.js +51 -0
  50. package/es/components/switch/index.d.ts +1 -1
  51. package/es/components/switch/switch.vue.d.ts +1 -1
  52. package/es/components/tabs/tab-nav.vue2.js +4 -2
  53. package/es/components/tooltip/index.d.ts +2 -2
  54. package/es/components/tooltip/tooltip.vue.d.ts +2 -2
  55. package/es/components/virtual-list/builders/build-list.d.ts +38 -38
  56. package/es/components/virtual-list/components/scrollbar.d.ts +1 -1
  57. package/es/defaults.d.ts +1 -1
  58. package/es/index.d.ts +1 -1
  59. package/es/index.js +248 -239
  60. package/es/package.json.js +1 -1
  61. package/es/utils/index.js +31 -30
  62. package/es/utils/ns-cover.d.ts +6 -3
  63. package/es/utils/ns-cover.js +25 -15
  64. package/global.d.ts +2 -70
  65. package/lib/component.cjs +1 -1
  66. package/lib/components/back-top/back-top.vue2.cjs +1 -1
  67. package/lib/components/color-picker/color-picker.vue.d.ts +3 -1
  68. package/lib/components/color-picker/color-picker.vue2.cjs +1 -1
  69. package/lib/components/color-picker/index.d.ts +3 -1
  70. package/lib/components/context-menu/context-menu.vue2.cjs +1 -1
  71. package/lib/components/dialog/dialog.vue.d.ts +1 -1
  72. package/lib/components/dialog/dialog.vue2.cjs +1 -1
  73. package/lib/components/dialog/index.cjs +1 -1
  74. package/lib/components/dialog/index.d.ts +3 -3
  75. package/lib/components/dialog/style/css.cjs +1 -1
  76. package/lib/components/dropdown/dropdown.vue.d.ts +5 -5
  77. package/lib/components/dropdown/index.d.ts +5 -5
  78. package/lib/components/icon-text/icon-text.vue.d.ts +10 -4
  79. package/lib/components/icon-text/icon-text.vue2.cjs +1 -1
  80. package/lib/components/icon-text/index.d.ts +10 -4
  81. package/lib/components/index.cjs +1 -1
  82. package/lib/components/index.d.ts +2 -0
  83. package/lib/components/list-cell/index.cjs +1 -0
  84. package/lib/components/list-cell/index.d.ts +38 -0
  85. package/lib/components/list-cell/list-cell.vue.cjs +1 -0
  86. package/lib/components/list-cell/list-cell.vue.d.ts +53 -0
  87. package/lib/components/list-cell/list-cell.vue2.cjs +1 -0
  88. package/lib/components/list-cell/style/css.cjs +1 -0
  89. package/lib/components/list-cell/style/css.d.ts +0 -0
  90. package/lib/components/list-cell/style/index.cjs +1 -0
  91. package/lib/components/list-cell/style/index.d.ts +0 -0
  92. package/lib/components/md-container/md-container.vue2.cjs +1 -1
  93. package/lib/components/menu/index.d.ts +2 -2
  94. package/lib/components/menu/menu-item.vue2.cjs +1 -1
  95. package/lib/components/menu/menu.vue.d.ts +2 -2
  96. package/lib/components/menu/sub-menu.vue2.cjs +1 -1
  97. package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
  98. package/lib/components/multiple-tabs/tab-content.vue.d.ts +8 -0
  99. package/lib/components/multiple-tabs/tab-content.vue2.cjs +1 -1
  100. package/lib/components/multiple-tabs/use/use-tab-dropdown.cjs +1 -1
  101. package/lib/components/result/result.vue2.cjs +1 -1
  102. package/lib/components/search/search.vue2.cjs +1 -1
  103. package/lib/components/select-v2/defaults.d.ts +1 -1
  104. package/lib/components/select-v2/index.d.ts +16 -16
  105. package/lib/components/select-v2/select.vue.d.ts +8 -8
  106. package/lib/components/select-v2/useSelect.d.ts +5 -5
  107. package/lib/components/side-menu/index.d.ts +38 -1
  108. package/lib/components/side-menu/side-menu.vue.d.ts +38 -1
  109. package/lib/components/side-menu/side-menu.vue2.cjs +1 -1
  110. package/lib/components/side-menu/use-drag-line.cjs +1 -0
  111. package/lib/components/side-menu/use-drag-line.d.ts +10 -0
  112. package/lib/components/switch/index.d.ts +1 -1
  113. package/lib/components/switch/switch.vue.d.ts +1 -1
  114. package/lib/components/tabs/tab-nav.vue2.cjs +1 -1
  115. package/lib/components/tooltip/index.d.ts +2 -2
  116. package/lib/components/tooltip/tooltip.vue.d.ts +2 -2
  117. package/lib/components/virtual-list/builders/build-list.d.ts +38 -38
  118. package/lib/components/virtual-list/components/scrollbar.d.ts +1 -1
  119. package/lib/defaults.d.ts +1 -1
  120. package/lib/index.cjs +1 -1
  121. package/lib/index.d.ts +1 -1
  122. package/lib/package.json.cjs +1 -1
  123. package/lib/utils/index.cjs +1 -1
  124. package/lib/utils/ns-cover.cjs +1 -1
  125. package/lib/utils/ns-cover.d.ts +6 -3
  126. package/package.json +1 -1
  127. package/tags.json +1 -1
  128. package/theme-style/base.css +1 -1
  129. package/theme-style/dark/css-vars.css +1 -1
  130. package/theme-style/index.css +1 -1
  131. package/theme-style/src/common/var.scss +13 -2
  132. package/theme-style/src/dark/var.scss +3 -3
  133. package/theme-style/src/dialog.scss +6 -4
  134. package/theme-style/src/footer-layout.scss +1 -0
  135. package/theme-style/src/index.scss +1 -0
  136. package/theme-style/src/list-cell.scss +55 -0
  137. package/theme-style/src/loading.scss +1 -1
  138. package/theme-style/src/md-container.scss +2 -3
  139. package/theme-style/src/menu.scss +5 -1
  140. package/theme-style/src/multiple-tabs.scss +1 -1
  141. package/theme-style/src/pagination.scss +1 -5
  142. package/theme-style/src/popover.scss +3 -3
  143. package/theme-style/src/side-menu.scss +21 -5
  144. package/theme-style/src/var.scss +0 -2
  145. package/theme-style/vft-back-top.css +1 -1
  146. package/theme-style/vft-dialog.css +1 -1
  147. package/theme-style/vft-footer-layout.css +1 -1
  148. package/theme-style/vft-list-cell.css +1 -0
  149. package/theme-style/vft-loading.css +1 -1
  150. package/theme-style/vft-md-container.css +1 -1
  151. package/theme-style/vft-menu.css +1 -1
  152. package/theme-style/vft-popover.css +1 -1
  153. package/theme-style/vft-side-menu.css +1 -1
  154. package/theme-style/vft-var.css +1 -1
  155. package/web-types.json +1 -1
@@ -1,17 +1,17 @@
1
- import { defineComponent as k, useSlots as E, ref as P, computed as d, h as f, onMounted as U, nextTick as W, createVNode as c } from "vue";
2
- import { listenerRouteChange as $, useRouterHelper as j } from "@vft/router";
3
- import { useSortable as z } from "@vft/use";
4
- import { isUrl as Y, addUnit as M, isNullOrUndefined as S } from "@vft/utils";
5
- import { useNamespace as D } from "../../hooks/use-namespace/index.js";
1
+ import { defineComponent as N, useSlots as F, ref as h, computed as m, h as v, onMounted as G, nextTick as J, getCurrentInstance as K, createVNode as f } from "vue";
2
+ import { listenerRouteChange as Q, useRouterHelper as X } from "@vft/router";
3
+ import { useSortable as Z } from "@vft/use";
4
+ import { isUrl as I, addUnit as C, isNullOrUndefined as V, removeUnit as _ } from "@vft/utils";
5
+ import { useNamespace as ee } from "../../hooks/use-namespace/index.js";
6
6
  import "@popperjs/core";
7
7
  import "lodash";
8
8
  import "../../hooks/use-z-index/index.js";
9
9
  import "@vueuse/core";
10
- import { generateCssVars as F } from "../../utils/ns-cover.js";
10
+ import { generateCssVars as te, cssVarValue as oe } from "../../utils/ns-cover.js";
11
11
  import "@vue/reactivity";
12
12
  import "@vue/shared";
13
13
  import "../divider/index.js";
14
- import { VftIcon as G } from "../icon/index.js";
14
+ import { VftIcon as le } from "../icon/index.js";
15
15
  import "../avatar/index.js";
16
16
  import "../empty/index.js";
17
17
  import "../result/index.js";
@@ -20,11 +20,11 @@ import "../popper/index.js";
20
20
  import "../collapse-transition/index.js";
21
21
  import "../tooltip/index.js";
22
22
  import "../popover/index.js";
23
- import { VftMenu as J, VftSubMenu as K, VftMenuItem as b } from "../menu/index.js";
23
+ import { VftMenu as ne, VftSubMenu as ie, VftMenuItem as k } from "../menu/index.js";
24
24
  import "../context-menu/context-menu.vue2.js";
25
25
  import "../multiple-tabs/multiple-tabs.vue2.js";
26
26
  import "@vft/store";
27
- import { useRouter as L } from "vue-router";
27
+ import { useRouter as ae } from "vue-router";
28
28
  import "../header-layout/index.js";
29
29
  import "../footer-layout/index.js";
30
30
  import "../iframe-layout/index.js";
@@ -65,6 +65,8 @@ import "../select-v2/index.js";
65
65
  import "../verify-code/index.js";
66
66
  import "../table/index.js";
67
67
  import "../image-viewer/index.js";
68
+ import "../list-cell/index.js";
69
+ import "../dialog/index.js";
68
70
  import "../md-container/index.js";
69
71
  import "../md-comment/index.js";
70
72
  import "../md-tabs/index.js";
@@ -72,13 +74,14 @@ import "../md-vue-playground/index.js";
72
74
  import "../md-code-demo/index.js";
73
75
  import "../md-code-tabs/index.js";
74
76
  import "../message/index.js";
75
- const l = (
77
+ import { useDragLine as re } from "./use-drag-line.js";
78
+ const a = (
76
79
  /* hoist-static*/
77
- D("side-menu")
78
- ), Q = k({
79
- name: l.b()
80
- }), ge = /* @__PURE__ */ k({
81
- ...Q,
80
+ ee("side-menu")
81
+ ), ue = N({
82
+ name: a.b()
83
+ }), Tt = /* @__PURE__ */ N({
84
+ ...ue,
82
85
  props: {
83
86
  menus: null,
84
87
  uniqueOpened: {
@@ -106,148 +109,176 @@ const l = (
106
109
  default: !1
107
110
  },
108
111
  dragOption: null,
112
+ dragWidth: {
113
+ type: Boolean,
114
+ default: !0
115
+ },
109
116
  useMenuSelect: {
110
117
  type: Boolean,
111
118
  default: !0
112
- }
119
+ },
120
+ openListenRoute: {
121
+ type: Boolean,
122
+ default: !1
123
+ },
124
+ openDisabled: {
125
+ type: Boolean
126
+ },
127
+ defaultOpeneds: null
113
128
  },
114
- emits: ["update:collapse", "dragEnd", "select"],
115
- setup(o, {
116
- emit: h
129
+ emits: ["update:collapse", "dragEnd", "select", "dragWidthEnd"],
130
+ setup(t, {
131
+ expose: T,
132
+ emit: b
117
133
  }) {
118
- const s = E(), v = P(), r = d(() => ({
134
+ const c = F(), O = h(), n = m(() => ({
119
135
  path: "path",
120
136
  children: "children",
121
137
  title: "title",
122
138
  index: "path",
123
139
  icon: "icon",
124
- ...o.attrMapping
140
+ disabled: "disabled",
141
+ ...t.attrMapping
125
142
  }));
126
- $((t) => {
127
- !t || t.meta.hideSide || (v.value = t.path);
143
+ Q((e) => {
144
+ var o;
145
+ !e || (o = e.meta) != null && o.hideSide && !t.openListenRoute || (O.value = e.path);
128
146
  });
129
- const x = (t, a) => {
130
- const i = t[r.value.path], p = t[r.value.title], n = t == null ? void 0 : t[r.value.children], u = t == null ? void 0 : t[r.value.index], m = t == null ? void 0 : t[r.value.icon];
131
- return n != null && n.length ? f(
147
+ const B = (e, o) => {
148
+ const l = e[n.value.path], u = e[n.value.title], r = e == null ? void 0 : e[n.value.children], d = e == null ? void 0 : e[n.value.index], p = e == null ? void 0 : e[n.value.icon], s = !(e != null && e[n.value.disabled]);
149
+ return r != null && r.length ? v(
132
150
  // @ts-ignore
133
- K,
151
+ ie,
134
152
  {
135
153
  popperAppendToBody: !0,
136
- key: u || i,
137
- index: u || i,
138
- title: p,
139
- icon: m,
140
- popperClass: l.e("popper")
154
+ key: d || l,
155
+ index: d || l,
156
+ title: u,
157
+ icon: p,
158
+ popperClass: a.e("popper")
141
159
  },
142
160
  {
143
- default: () => n == null ? void 0 : n.map((e, H) => {
144
- var O;
145
- const g = e[r.value.path], C = e[r.value.index], q = e[r.value.icon], R = e[r.value.title];
146
- return (O = e == null ? void 0 : e[r.value.children]) != null && O.length ? x(e, H) : (
161
+ default: () => r == null ? void 0 : r.map((i, $) => {
162
+ var R;
163
+ const y = i[n.value.path], w = i[n.value.index], j = i[n.value.icon], z = i[n.value.title], Y = i[n.value.disabled];
164
+ return (R = i == null ? void 0 : i[n.value.children]) != null && R.length ? B(i, $) : (
147
165
  // @ts-ignore
148
- f(b, {
149
- key: C || g,
150
- index: C || g,
151
- route: g,
152
- icon: q,
153
- title: R,
154
- disabled: e.disabled
166
+ v(k, {
167
+ key: w || y,
168
+ index: w || y,
169
+ route: y,
170
+ icon: j,
171
+ title: z,
172
+ disabled: t.openDisabled && Y
155
173
  })
156
174
  );
157
175
  })
158
176
  }
159
- ) : f(b, {
160
- key: u || i,
161
- index: u || i,
162
- title: p,
163
- route: i,
164
- icon: m,
165
- disabled: t.disabled
166
- }, s.menuItem ? () => {
167
- var e;
168
- return (e = s.menuItem) == null ? void 0 : e.call(s, {
169
- item: t,
170
- index: a
177
+ ) : v(k, {
178
+ key: d || l,
179
+ index: d || l,
180
+ title: u,
181
+ route: l,
182
+ icon: p,
183
+ disabled: t.openDisabled && s
184
+ }, c.menuItem ? () => {
185
+ var i;
186
+ return (i = c.menuItem) == null ? void 0 : i.call(c, {
187
+ item: e,
188
+ index: o
171
189
  });
172
190
  } : "");
173
- }, w = d(() => {
174
- var t, a;
175
- return f(J, {
176
- onSelect: o.useMenuSelect ? N : () => {
191
+ }, A = m(() => {
192
+ var e, o;
193
+ return v(ne, {
194
+ onSelect: t.useMenuSelect ? H : () => {
177
195
  },
178
- defaultActive: o.defaultActive || v.value,
179
- class: [l.e("con"), (t = o.dragOption) != null && t.dragClassName ? l.e((a = o.dragOption) == null ? void 0 : a.dragClassName) : ""],
196
+ defaultActive: t.defaultActive || O.value,
197
+ defaultOpeneds: t.defaultOpeneds,
198
+ class: [a.e("con"), (e = t.dragOption) != null && e.dragClassName ? a.e((o = t.dragOption) == null ? void 0 : o.dragClassName) : ""],
180
199
  style: {
181
- height: `calc(100% - ${o.menuTopBottomHeight}px)`
200
+ height: `calc(100% - ${t.menuTopBottomHeight}px)`
182
201
  },
183
- uniqueOpened: o.uniqueOpened,
184
- collapse: o.collapse,
202
+ uniqueOpened: t.uniqueOpened,
203
+ collapse: t.collapse,
185
204
  "collapse-transition": !1
186
- }, () => o.menus.map((i, p) => x(i, p)));
205
+ }, () => t.menus.map((l, u) => B(l, u)));
187
206
  }), {
188
- go: y
189
- } = j(), B = L();
190
- async function N(t) {
191
- var n, u, m;
192
- const a = t.route;
193
- let i = t.route;
194
- t.indexPath.some((e) => Y(e)) && (i = t.indexPath.slice(-2).join("/"));
195
- const p = (m = (u = (n = B.getRoutes().filter((e) => e.path === i)) == null ? void 0 : n[0]) == null ? void 0 : u.meta) == null ? void 0 : m.linkTarget;
196
- y(p ? {
197
- url: a,
207
+ go: S
208
+ } = X(), D = ae();
209
+ async function H(e) {
210
+ var r, d, p;
211
+ const o = e.route;
212
+ let l = e.route;
213
+ e.indexPath.some((s) => I(s)) && (l = e.indexPath.slice(-2).join("/"));
214
+ const u = (p = (d = (r = D.getRoutes().filter((s) => s.path === l)) == null ? void 0 : r[0]) == null ? void 0 : d.meta) == null ? void 0 : p.linkTarget;
215
+ S(u ? {
216
+ url: o,
198
217
  winOpenOpt: {
199
- target: p
218
+ target: u
200
219
  }
201
- } : a), h("select", t);
220
+ } : o), b("select", e);
202
221
  }
203
- const T = d(() => ({
204
- ...F({
205
- width: o.collapse ? M(o.collapseWidth) : M(o.width)
222
+ const x = h(), q = m(() => ({
223
+ ...te({
224
+ width: t.collapse ? C(t.collapseWidth) : x.value ? C(x.value) : C(t.width)
206
225
  }, "side-menu"),
207
- height: `calc(100% - ${o.extraHeight}px)`
208
- })), A = d(() => [l.b(), l.m("fixed")]);
209
- function V() {
210
- h("update:collapse", !o.collapse);
211
- }
212
- return U(() => {
213
- W(() => {
214
- var t, a, i;
215
- if ((t = o.dragOption) != null && t.dragClassName) {
216
- const p = (i = document.querySelectorAll("." + l.e((a = o.dragOption) == null ? void 0 : a.dragClassName))) == null ? void 0 : i[0], {
217
- initSortable: n
218
- } = z(p, {
226
+ height: `calc(100% - ${t.extraHeight}px)`
227
+ })), E = m(() => [a.b(), a.m("fixed")]);
228
+ G(() => {
229
+ J(() => {
230
+ var e, o, l;
231
+ if ((e = t.dragOption) != null && e.dragClassName) {
232
+ const u = (l = document.querySelectorAll("." + a.e((o = t.dragOption) == null ? void 0 : o.dragClassName))) == null ? void 0 : l[0], {
233
+ initSortable: r
234
+ } = Z(u, {
219
235
  draggable: ".vft-menu-item",
220
- onEnd: (u) => {
236
+ onEnd: (d) => {
221
237
  const {
222
- oldIndex: m,
223
- newIndex: e
224
- } = u;
225
- S(m) || S(e) || m === e || h("dragEnd", m, e);
238
+ oldIndex: p,
239
+ newIndex: s
240
+ } = d;
241
+ V(p) || V(s) || p === s || b("dragEnd", p, s);
226
242
  },
227
- ...o.dragOption
243
+ ...t.dragOption
228
244
  });
229
- n();
245
+ r();
230
246
  }
231
247
  });
232
- }), () => c("div", {
233
- class: A.value,
234
- style: T.value
235
- }, [s.top ? c("div", {
236
- class: l.e("top")
237
- }, [s.top()]) : null, w.value, s.bottom ? c("div", {
238
- class: l.e("bottom")
239
- }, [s.bottom()]) : o.showCollapse ? c("div", {
240
- onClick: V,
241
- class: [l.e("bottom"), l.e("collapse")]
242
- }, [c(G, {
248
+ });
249
+ const g = h(), M = h(), W = oe("side-menu-width", g), U = m(() => ({
250
+ left: W.value
251
+ }));
252
+ function L() {
253
+ t.collapse || (x.value = W.value), b("update:collapse", !t.collapse);
254
+ }
255
+ const P = K();
256
+ return t.dragWidth && re(g, M, m(() => _(t.collapseWidth)), P, t.collapse), T({
257
+ sideRef: g
258
+ }), () => f("div", {
259
+ ref: g,
260
+ class: E.value,
261
+ style: q.value
262
+ }, [c.top ? f("div", {
263
+ class: a.e("top")
264
+ }, [c.top()]) : null, A.value, c.bottom ? f("div", {
265
+ class: a.e("bottom")
266
+ }, [c.bottom()]) : t.showCollapse ? f("div", {
267
+ onClick: L,
268
+ class: [a.e("bottom"), a.e("collapse")]
269
+ }, [f(le, {
243
270
  style: {
244
- transform: o.collapse ? "rotateY(180deg)" : ""
271
+ transform: t.collapse ? "rotateY(180deg)" : ""
245
272
  },
246
273
  size: 20,
247
274
  icon: "ico-iconoir:sidebar-collapse"
248
- }, null)]) : null]);
275
+ }, null)]) : null, t.dragWidth ? f("div", {
276
+ ref: M,
277
+ style: U.value,
278
+ class: a.e("drag-bar")
279
+ }, null) : null]);
249
280
  }
250
281
  });
251
282
  export {
252
- ge as default
283
+ Tt as default
253
284
  };
@@ -0,0 +1,10 @@
1
+ import { type Ref } from 'vue';
2
+ /**
3
+ * Handle menu drag and drop related operations
4
+ * @param siderRef
5
+ * @param dragBarRef
6
+ * @param minWidth
7
+ * @param instance
8
+ * @param collapse
9
+ */
10
+ export declare function useDragLine(siderRef: Ref<any>, dragBarRef: Ref<any>, minWidth: any, instance: any, collapse: any): {};
@@ -0,0 +1,51 @@
1
+ import { addUnit as x } from "@vft/utils";
2
+ import { onMounted as v, nextTick as g, unref as s } from "vue";
3
+ import "lodash";
4
+ import "@vueuse/core";
5
+ import { setCssVar as y } from "../../utils/ns-cover.js";
6
+ import { useDebounceFn as M } from "@vft/use";
7
+ function $(i, c, a, m, p) {
8
+ v(() => {
9
+ g(() => {
10
+ M(h, 100)();
11
+ });
12
+ });
13
+ function r(t) {
14
+ var o;
15
+ const e = s(t);
16
+ return e ? Reflect.has(e, "$el") ? (o = s(t)) == null ? void 0 : o.$el : s(t) : null;
17
+ }
18
+ function d(t, e, o) {
19
+ document.onmousemove = function(u) {
20
+ let n = t.left + (u.clientX - o);
21
+ u = u || window.event;
22
+ const f = 800, l = s(a);
23
+ return n < 0 && (n = 0), n > f && (n = f), n < l && (n = l, m.emit("update:collapse", !p)), t.style.left = n + "px", !1;
24
+ };
25
+ }
26
+ function w(t) {
27
+ const e = r(c), o = r(i);
28
+ document.onmouseup = function() {
29
+ var n;
30
+ document.onmousemove = null, document.onmouseup = null, o.style.transition = "width 0.2s";
31
+ const u = parseInt(e.style.left);
32
+ y("side-menu-width", x(u), "", i), m.emit("dragWidthEnd"), (n = t.releaseCapture) == null || n.call(t);
33
+ };
34
+ }
35
+ function h() {
36
+ const t = r(c);
37
+ if (!t)
38
+ return;
39
+ const e = r(i);
40
+ e && (t.onmousedown = (o) => {
41
+ var n;
42
+ e.style.transition = "unset";
43
+ const u = o == null ? void 0 : o.clientX;
44
+ return t.left = t.offsetLeft, d(t, e, u), w(t), (n = t.setCapture) == null || n.call(t), !1;
45
+ });
46
+ }
47
+ return {};
48
+ }
49
+ export {
50
+ $ as useDragLine
51
+ };
@@ -193,9 +193,9 @@ export declare const VftSwitch: import("vft/es/utils").SFCWithInstall<import("vu
193
193
  onInput?: ((...args: any[]) => any) | undefined;
194
194
  }, {
195
195
  loading: boolean | undefined;
196
+ modelValue: string | number | boolean | undefined;
196
197
  disabled: boolean | undefined;
197
198
  value: string | number | boolean | undefined;
198
- modelValue: string | number | boolean | undefined;
199
199
  validateEvent: boolean | undefined;
200
200
  inlinePrompt: boolean | undefined;
201
201
  activeValue: string | number | boolean | undefined;
@@ -225,9 +225,9 @@ declare const _sfc_main: import("vue").DefineComponent<{
225
225
  onInput?: ((...args: any[]) => any) | undefined;
226
226
  }, {
227
227
  loading: boolean | undefined;
228
+ modelValue: string | number | boolean | undefined;
228
229
  disabled: boolean | undefined;
229
230
  value: string | number | boolean | undefined;
230
- modelValue: string | number | boolean | undefined;
231
231
  validateEvent: boolean | undefined;
232
232
  inlinePrompt: boolean | undefined;
233
233
  activeValue: string | number | boolean | undefined;
@@ -61,6 +61,8 @@ import "../select-v2/index.js";
61
61
  import "../verify-code/index.js";
62
62
  import "../table/index.js";
63
63
  import "../image-viewer/index.js";
64
+ import "../list-cell/index.js";
65
+ import "../dialog/index.js";
64
66
  import "../md-container/index.js";
65
67
  import "../md-comment/index.js";
66
68
  import "../md-tabs/index.js";
@@ -81,7 +83,7 @@ const V = (
81
83
  K("tab-nav")
82
84
  ), ct = E({
83
85
  name: V.b()
84
- }), Fo = /* @__PURE__ */ E({
86
+ }), Eo = /* @__PURE__ */ E({
85
87
  ...ct,
86
88
  props: {
87
89
  panes: null,
@@ -235,5 +237,5 @@ const V = (
235
237
  }
236
238
  });
237
239
  export {
238
- Fo as default
240
+ Eo as default
239
241
  };
@@ -196,7 +196,7 @@ export declare const VftTooltip: import("vft/es/utils").SFCWithInstall<import("v
196
196
  onOpen: (event?: Event | undefined) => void;
197
197
  onClose: (event?: Event | undefined) => void;
198
198
  hide: (event?: Event | undefined) => void;
199
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "open" | "before-show" | "before-hide" | "show" | "hide")[], "close" | "open" | "before-show" | "before-hide" | "show" | "hide", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
199
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("open" | "close" | "before-show" | "before-hide" | "show" | "hide")[], "open" | "close" | "before-show" | "before-hide" | "show" | "hide", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
200
200
  role: {
201
201
  type: import("vue").PropType<"grid" | "dialog" | "group" | "listbox" | "menu" | "navigation" | "tooltip" | "tree" | undefined>;
202
202
  required: false;
@@ -386,8 +386,8 @@ export declare const VftTooltip: import("vft/es/utils").SFCWithInstall<import("v
386
386
  required: false;
387
387
  };
388
388
  }>> & {
389
- onClose?: ((...args: any[]) => any) | undefined;
390
389
  onOpen?: ((...args: any[]) => any) | undefined;
390
+ onClose?: ((...args: any[]) => any) | undefined;
391
391
  "onBefore-show"?: ((...args: any[]) => any) | undefined;
392
392
  "onBefore-hide"?: ((...args: any[]) => any) | undefined;
393
393
  onShow?: ((...args: any[]) => any) | undefined;
@@ -270,7 +270,7 @@ declare const _sfc_main: import("vue").DefineComponent<{
270
270
  * @description expose hide function
271
271
  */
272
272
  hide: (event?: Event | undefined) => void;
273
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "open" | "before-show" | "before-hide" | "show" | "hide")[], "close" | "open" | "before-show" | "before-hide" | "show" | "hide", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
273
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("open" | "close" | "before-show" | "before-hide" | "show" | "hide")[], "open" | "close" | "before-show" | "before-hide" | "show" | "hide", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
274
274
  role: {
275
275
  type: __PropType<"grid" | "dialog" | "group" | "listbox" | "menu" | "navigation" | "tooltip" | "tree" | undefined>;
276
276
  required: false;
@@ -460,8 +460,8 @@ declare const _sfc_main: import("vue").DefineComponent<{
460
460
  required: false;
461
461
  };
462
462
  }>> & {
463
- onClose?: ((...args: any[]) => any) | undefined;
464
463
  onOpen?: ((...args: any[]) => any) | undefined;
464
+ onClose?: ((...args: any[]) => any) | undefined;
465
465
  "onBefore-show"?: ((...args: any[]) => any) | undefined;
466
466
  "onBefore-hide"?: ((...args: any[]) => any) | undefined;
467
467
  onShow?: ((...args: any[]) => any) | undefined;