vft 0.0.429 → 0.0.430

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 (218) hide show
  1. package/attributes.json +1 -1
  2. package/es/components/alert/alert.vue2.js +38 -38
  3. package/es/components/autocomplete/autocomplete.vue2.js +82 -82
  4. package/es/components/avatar/avatar.vue2.js +23 -23
  5. package/es/components/avatar-stack/avatar-stack.vue2.js +25 -25
  6. package/es/components/breadcrumb/breadcrumb-item.vue2.js +19 -19
  7. package/es/components/button/button.vue2.js +37 -37
  8. package/es/components/card/card.vue2.js +19 -19
  9. package/es/components/carousel/carousel.vue2.js +75 -75
  10. package/es/components/carousel/use-carousel.js +1 -1
  11. package/es/components/cascader-panel/index.vue2.js +2 -2
  12. package/es/components/cascader-panel/menu.vue2.js +2 -2
  13. package/es/components/cascader-panel/node.vue2.js +3 -4
  14. package/es/components/checkbox/checkbox-button.vue2.js +52 -52
  15. package/es/components/checkbox/checkbox-group.vue2.js +26 -26
  16. package/es/components/checkbox/checkbox.vue2.js +57 -57
  17. package/es/components/clamp/clamp.vue2.js +14 -14
  18. package/es/components/clamp-toggle/clamp-toggle.vue2.js +17 -17
  19. package/es/components/clamp-tooltip/clamp-tooltip.vue2.js +19 -19
  20. package/es/components/col/col.vue2.js +20 -20
  21. package/es/components/color-picker/color-picker.vue2.js +126 -128
  22. package/es/components/color-picker/components/sv-panel.vue.js +2 -2
  23. package/es/components/config-provider/hooks/use-global-config.js +3 -3
  24. package/es/components/context-menu/context-menu.vue2.js +18 -18
  25. package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +37 -39
  26. package/es/components/date-picker/date-picker-com/panel-date-range.vue2.js +8 -10
  27. package/es/components/date-picker/date-picker.d.ts +1 -1
  28. package/es/components/date-picker/index.d.ts +2 -2
  29. package/es/components/descriptions/description.vue2.js +44 -44
  30. package/es/components/descriptions/descriptions-row.vue2.js +12 -12
  31. package/es/components/dialog/dialog-content.vue2.js +31 -31
  32. package/es/components/dialog/dialog.vue2.js +46 -46
  33. package/es/components/divider/divider.vue2.js +19 -19
  34. package/es/components/drawer/drawer.vue2.js +41 -41
  35. package/es/components/dropdown/dropdown-item-impl.vue2.js +40 -40
  36. package/es/components/dropdown/dropdown-item.vue2.js +28 -28
  37. package/es/components/dropdown/dropdown.vue2.js +124 -124
  38. package/es/components/form/form-item.vue2.js +71 -71
  39. package/es/components/header-layout/header-layout.vue2.js +25 -25
  40. package/es/components/icon/icon.vue2.js +15 -15
  41. package/es/components/icon-text/icon-text.vue2.js +28 -28
  42. package/es/components/iframe-layout/iframe-layout.vue2.js +13 -13
  43. package/es/components/iframe-layout/iframe-page.vue2.js +11 -11
  44. package/es/components/image/image.vue2.js +63 -63
  45. package/es/components/image-viewer/image-viewer.vue2.js +88 -88
  46. package/es/components/infinite-scroll/index.d.ts +1 -1
  47. package/es/components/input/input.vue2.js +112 -112
  48. package/es/components/input-number/input-number.vue2.js +100 -100
  49. package/es/components/input-tag/composables/use-input-tag.js +1 -1
  50. package/es/components/link/link.vue2.js +20 -20
  51. package/es/components/list-cell/list-cell.vue2.js +19 -19
  52. package/es/components/logo/logo.vue2.js +22 -22
  53. package/es/components/menu/menu-item-group.vue2.js +8 -8
  54. package/es/components/menu/menu-item.vue2.js +48 -48
  55. package/es/components/message/message.vue2.js +66 -66
  56. package/es/components/modal/modal-footer-action.vue2.js +25 -25
  57. package/es/components/modal/modal.vue2.js +40 -40
  58. package/es/components/multiple-tabs/multiple-tabs.vue2.js +30 -30
  59. package/es/components/page-wrapper/page-wrapper.vue2.js +12 -12
  60. package/es/components/pagination/components/jumper.vue2.js +18 -18
  61. package/es/components/pagination/components/next.vue2.js +11 -11
  62. package/es/components/pagination/components/pager.vue2.js +74 -74
  63. package/es/components/pagination/components/prev.vue2.js +9 -9
  64. package/es/components/pagination/components/sizes.vue2.js +18 -18
  65. package/es/components/pagination/components/total.vue2.js +8 -8
  66. package/es/components/popconfirm/popconfirm.vue2.js +47 -47
  67. package/es/components/popover/popover.vue2.js +28 -28
  68. package/es/components/popper/trigger.vue2.js +9 -9
  69. package/es/components/progress/progress.vue2.js +87 -87
  70. package/es/components/qrcode/qrcode.vue2.js +31 -31
  71. package/es/components/radio/radio-button.vue2.js +17 -17
  72. package/es/components/radio/radio-group.vue2.js +35 -35
  73. package/es/components/router-view-content/router-view-content.vue2.js +25 -25
  74. package/es/components/roving-focus-group/roving-focus-item.vue2.js +30 -30
  75. package/es/components/row/row.vue2.js +5 -5
  76. package/es/components/scrollbar/bar.vue2.js +16 -16
  77. package/es/components/scrollbar/scrollbar.vue2.js +48 -48
  78. package/es/components/scrollbar/thumb.vue2.js +27 -27
  79. package/es/components/search/search.vue2.js +29 -29
  80. package/es/components/select/index.d.ts +1 -1
  81. package/es/components/select/select.vue.d.ts +1 -1
  82. package/es/components/side-menu/index.d.ts +2 -8
  83. package/es/components/side-menu/side-menu.vue.d.ts +5 -59
  84. package/es/components/side-menu/types.d.ts +107 -0
  85. package/es/components/skeleton/skeleton-item.vue2.js +9 -9
  86. package/es/components/skeleton/skeleton.vue2.js +14 -14
  87. package/es/components/slider/button.vue2.js +54 -54
  88. package/es/components/slider/slider.vue2.js +106 -106
  89. package/es/components/steps/item.vue2.js +56 -56
  90. package/es/components/steps/steps.vue2.js +16 -16
  91. package/es/components/super-form/super-form-action.vue2.js +28 -28
  92. package/es/components/super-form/super-form-item.vue2.js +1 -1
  93. package/es/components/switch/switch.vue2.js +108 -108
  94. package/es/components/table/field.d.ts +4 -4
  95. package/es/components/teleport/teleport.vue2.js +6 -6
  96. package/es/components/time-picker/common/picker.vue.d.ts +1 -1
  97. package/es/components/time-picker/index.d.ts +2 -2
  98. package/es/components/time-picker/time-picker.d.ts +1 -1
  99. package/es/components/timeline/timeline-item.vue2.js +20 -20
  100. package/es/components/tooltip/content.vue2.js +57 -57
  101. package/es/components/tooltip/tooltip.vue2.js +66 -66
  102. package/es/components/tooltip/trigger.vue2.js +42 -42
  103. package/es/components/tree/tree.vue2.js +72 -72
  104. package/es/components/upload/upload-content.vue2.js +85 -85
  105. package/es/components/upload/upload-list.vue2.js +70 -70
  106. package/es/components/upload/upload.vue2.js +86 -86
  107. package/es/components/verify-code/verify-code.vue2.js +18 -18
  108. package/es/package.json.d.ts +1 -1
  109. package/es/package.json.js +1 -1
  110. package/es/utils/vue/vnode.js +1 -1
  111. package/lib/components/alert/alert.vue2.cjs +1 -1
  112. package/lib/components/autocomplete/autocomplete.vue2.cjs +1 -1
  113. package/lib/components/avatar/avatar.vue2.cjs +1 -1
  114. package/lib/components/avatar-stack/avatar-stack.vue2.cjs +1 -1
  115. package/lib/components/breadcrumb/breadcrumb-item.vue2.cjs +1 -1
  116. package/lib/components/button/button.vue2.cjs +1 -1
  117. package/lib/components/card/card.vue2.cjs +1 -1
  118. package/lib/components/carousel/carousel.vue2.cjs +1 -1
  119. package/lib/components/cascader-panel/index.vue2.cjs +1 -1
  120. package/lib/components/cascader-panel/menu.vue2.cjs +1 -1
  121. package/lib/components/cascader-panel/node.vue2.cjs +1 -1
  122. package/lib/components/checkbox/checkbox-button.vue2.cjs +1 -1
  123. package/lib/components/checkbox/checkbox-group.vue2.cjs +1 -1
  124. package/lib/components/checkbox/checkbox.vue2.cjs +1 -1
  125. package/lib/components/clamp/clamp.vue2.cjs +1 -1
  126. package/lib/components/clamp-toggle/clamp-toggle.vue2.cjs +1 -1
  127. package/lib/components/clamp-tooltip/clamp-tooltip.vue2.cjs +1 -1
  128. package/lib/components/col/col.vue2.cjs +1 -1
  129. package/lib/components/color-picker/color-picker.vue2.cjs +1 -1
  130. package/lib/components/color-picker/components/sv-panel.vue.cjs +1 -1
  131. package/lib/components/context-menu/context-menu.vue2.cjs +1 -1
  132. package/lib/components/date-picker/date-picker-com/panel-date-pick.vue2.cjs +1 -1
  133. package/lib/components/date-picker/date-picker-com/panel-date-range.vue2.cjs +1 -1
  134. package/lib/components/date-picker/date-picker.d.ts +1 -1
  135. package/lib/components/date-picker/index.d.ts +2 -2
  136. package/lib/components/descriptions/description.vue2.cjs +1 -1
  137. package/lib/components/descriptions/descriptions-row.vue2.cjs +1 -1
  138. package/lib/components/dialog/dialog-content.vue2.cjs +1 -1
  139. package/lib/components/dialog/dialog.vue2.cjs +1 -1
  140. package/lib/components/divider/divider.vue2.cjs +1 -1
  141. package/lib/components/drawer/drawer.vue2.cjs +1 -1
  142. package/lib/components/dropdown/dropdown-item-impl.vue2.cjs +1 -1
  143. package/lib/components/dropdown/dropdown-item.vue2.cjs +1 -1
  144. package/lib/components/dropdown/dropdown.vue2.cjs +1 -1
  145. package/lib/components/form/form-item.vue2.cjs +1 -1
  146. package/lib/components/header-layout/header-layout.vue2.cjs +1 -1
  147. package/lib/components/icon/icon.vue2.cjs +1 -1
  148. package/lib/components/icon-text/icon-text.vue2.cjs +1 -1
  149. package/lib/components/iframe-layout/iframe-layout.vue2.cjs +1 -1
  150. package/lib/components/iframe-layout/iframe-page.vue2.cjs +1 -1
  151. package/lib/components/image/image.vue2.cjs +1 -1
  152. package/lib/components/image-viewer/image-viewer.vue2.cjs +1 -1
  153. package/lib/components/infinite-scroll/index.d.ts +1 -1
  154. package/lib/components/input/input.vue2.cjs +1 -1
  155. package/lib/components/input-number/input-number.vue2.cjs +1 -1
  156. package/lib/components/link/link.vue2.cjs +1 -1
  157. package/lib/components/list-cell/list-cell.vue2.cjs +1 -1
  158. package/lib/components/logo/logo.vue2.cjs +1 -1
  159. package/lib/components/menu/menu-item-group.vue2.cjs +1 -1
  160. package/lib/components/menu/menu-item.vue2.cjs +1 -1
  161. package/lib/components/message/message.vue2.cjs +1 -1
  162. package/lib/components/modal/modal-footer-action.vue2.cjs +1 -1
  163. package/lib/components/modal/modal.vue2.cjs +1 -1
  164. package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
  165. package/lib/components/page-wrapper/page-wrapper.vue2.cjs +1 -1
  166. package/lib/components/pagination/components/jumper.vue2.cjs +1 -1
  167. package/lib/components/pagination/components/next.vue2.cjs +1 -1
  168. package/lib/components/pagination/components/pager.vue2.cjs +1 -1
  169. package/lib/components/pagination/components/prev.vue2.cjs +1 -1
  170. package/lib/components/pagination/components/sizes.vue2.cjs +1 -1
  171. package/lib/components/pagination/components/total.vue2.cjs +1 -1
  172. package/lib/components/popconfirm/popconfirm.vue2.cjs +1 -1
  173. package/lib/components/popover/popover.vue2.cjs +1 -1
  174. package/lib/components/popper/trigger.vue2.cjs +1 -1
  175. package/lib/components/progress/progress.vue2.cjs +5 -5
  176. package/lib/components/qrcode/qrcode.vue2.cjs +1 -1
  177. package/lib/components/radio/radio-button.vue2.cjs +1 -1
  178. package/lib/components/radio/radio-group.vue2.cjs +1 -1
  179. package/lib/components/router-view-content/router-view-content.vue2.cjs +1 -1
  180. package/lib/components/roving-focus-group/roving-focus-item.vue2.cjs +1 -1
  181. package/lib/components/row/row.vue2.cjs +1 -1
  182. package/lib/components/scrollbar/bar.vue2.cjs +1 -1
  183. package/lib/components/scrollbar/scrollbar.vue2.cjs +1 -1
  184. package/lib/components/scrollbar/thumb.vue2.cjs +1 -1
  185. package/lib/components/search/search.vue2.cjs +1 -1
  186. package/lib/components/select/index.d.ts +1 -1
  187. package/lib/components/select/select.vue.d.ts +1 -1
  188. package/lib/components/side-menu/index.d.ts +2 -8
  189. package/lib/components/side-menu/side-menu.vue.d.ts +5 -59
  190. package/lib/components/side-menu/types.d.ts +107 -0
  191. package/lib/components/skeleton/skeleton-item.vue2.cjs +1 -1
  192. package/lib/components/skeleton/skeleton.vue2.cjs +1 -1
  193. package/lib/components/slider/button.vue2.cjs +1 -1
  194. package/lib/components/slider/slider.vue2.cjs +1 -1
  195. package/lib/components/steps/item.vue2.cjs +1 -1
  196. package/lib/components/steps/steps.vue2.cjs +1 -1
  197. package/lib/components/super-form/super-form-action.vue2.cjs +1 -1
  198. package/lib/components/switch/switch.vue2.cjs +1 -1
  199. package/lib/components/table/field.d.ts +4 -4
  200. package/lib/components/teleport/teleport.vue2.cjs +1 -1
  201. package/lib/components/time-picker/common/picker.vue.d.ts +1 -1
  202. package/lib/components/time-picker/index.d.ts +2 -2
  203. package/lib/components/time-picker/time-picker.d.ts +1 -1
  204. package/lib/components/timeline/timeline-item.vue2.cjs +1 -1
  205. package/lib/components/tooltip/content.vue2.cjs +1 -1
  206. package/lib/components/tooltip/tooltip.vue2.cjs +1 -1
  207. package/lib/components/tooltip/trigger.vue2.cjs +1 -1
  208. package/lib/components/tree/tree.vue2.cjs +1 -1
  209. package/lib/components/upload/upload-content.vue2.cjs +1 -1
  210. package/lib/components/upload/upload-list.vue2.cjs +1 -1
  211. package/lib/components/upload/upload.vue2.cjs +1 -1
  212. package/lib/components/verify-code/verify-code.vue2.cjs +1 -1
  213. package/lib/package.json.cjs +1 -1
  214. package/lib/package.json.d.ts +1 -1
  215. package/package.json +5 -5
  216. package/tags.json +1 -1
  217. package/theme-style/src/mixins/mixins.scss +1 -0
  218. package/web-types.json +1 -1
@@ -1,4 +1,4 @@
1
- import { defineComponent as r, createElementBlock as i, openBlock as p, unref as t, normalizeClass as s, toDisplayString as n } from "vue";
1
+ import { defineComponent as i, createElementBlock as r, openBlock as n, unref as t, normalizeClass as s, toDisplayString as p } from "vue";
2
2
  import "@vueuse/core";
3
3
  import "@vft/utils";
4
4
  import "../../config-provider/hooks/use-global-config.js";
@@ -9,17 +9,17 @@ import "../../../hooks/use-model-toggle/index.js";
9
9
  import "@popperjs/core";
10
10
  import "../../../hooks/use-z-index/index.js";
11
11
  import { usePagination as l } from "../usePagination.js";
12
- const c = ["disabled"], D = /* @__PURE__ */ r({
12
+ const c = ["disabled"], D = /* @__PURE__ */ i({
13
13
  __name: "total",
14
14
  props: {
15
15
  total: { default: 0 }
16
16
  },
17
- setup(d) {
18
- const o = m("pagination"), { disabled: e } = l();
19
- return (a, _) => (p(), i("span", {
20
- class: s(t(o).e("total")),
21
- disabled: t(e)
22
- }, "共 " + n(a.total) + " 条", 11, c));
17
+ setup(o) {
18
+ const e = m("pagination"), { disabled: a } = l();
19
+ return (d, f) => (n(), r("span", {
20
+ class: s(t(e).e("total")),
21
+ disabled: t(a)
22
+ }, "共 " + p(o.total) + " 条", 11, c));
23
23
  }
24
24
  });
25
25
  export {
@@ -1,20 +1,20 @@
1
- import { defineComponent as h, ref as w, computed as i, createBlock as u, openBlock as d, unref as t, mergeProps as $, withCtx as n, renderSlot as b, createCommentVNode as y, createElementVNode as p, normalizeClass as r, createTextVNode as a, normalizeStyle as I, toDisplayString as c, createVNode as B } from "vue";
1
+ import { defineComponent as h, ref as N, computed as r, createBlock as d, openBlock as y, unref as t, mergeProps as w, withCtx as l, renderSlot as $, createCommentVNode as B, createElementVNode as a, normalizeClass as c, createTextVNode as f, normalizeStyle as b, toDisplayString as s, createVNode as T } from "vue";
2
2
  import "@vueuse/core";
3
3
  import "@vft/utils";
4
- import { addUnit as P } from "../../utils/helper.js";
4
+ import { addUnit as I } from "../../utils/helper.js";
5
5
  import "lodash-es";
6
6
  import "../form/index.js";
7
- import { VftButton as T } from "../button/index.js";
8
- import { VftIcon as S } from "../icon/index.js";
9
- import { VftTooltip as A } from "../tooltip/index.js";
10
- import { useNamespace as R } from "../../hooks/use-namespace/index.js";
7
+ import { VftButton as x } from "../button/index.js";
8
+ import { VftIcon as P } from "../icon/index.js";
9
+ import { VftTooltip as S } from "../tooltip/index.js";
10
+ import { useNamespace as A } from "../../hooks/use-namespace/index.js";
11
11
  import "../../hooks/use-model-toggle/index.js";
12
12
  import "@popperjs/core";
13
13
  import "../../hooks/use-z-index/index.js";
14
- const q = h({
14
+ const R = h({
15
15
  name: "VftPopconfirm"
16
16
  }), W = /* @__PURE__ */ h({
17
- ...q,
17
+ ...R,
18
18
  props: {
19
19
  title: {},
20
20
  confirmButtonText: {},
@@ -30,77 +30,77 @@ const q = h({
30
30
  width: { default: 150 }
31
31
  },
32
32
  emits: ["confirm", "cancel"],
33
- setup(C, { emit: k }) {
34
- const l = C, s = k, o = R("popconfirm"), f = w(), m = () => {
35
- f.value?.onClose?.();
36
- }, v = i(() => ({
37
- width: P(l.width)
38
- })), V = (e) => {
39
- s("confirm", e), m();
40
- }, g = (e) => {
41
- s("cancel", e), m();
42
- }, z = i(
43
- () => l.confirmButtonText || "确认"
44
- ), N = i(() => l.cancelButtonText || "取消");
45
- return (e, x) => (d(), u(t(A), $({
33
+ setup(e, { emit: C }) {
34
+ const i = e, m = C, n = A("popconfirm"), p = N(), u = () => {
35
+ p.value?.onClose?.();
36
+ }, k = r(() => ({
37
+ width: I(i.width)
38
+ })), v = (o) => {
39
+ m("confirm", o), u();
40
+ }, V = (o) => {
41
+ m("cancel", o), u();
42
+ }, g = r(
43
+ () => i.confirmButtonText || "确认"
44
+ ), z = r(() => i.cancelButtonText || "取消");
45
+ return (o, q) => (y(), d(t(S), w({
46
46
  ref_key: "tooltipRef",
47
- ref: f,
47
+ ref: p,
48
48
  trigger: "click",
49
49
  effect: "light"
50
- }, e.$attrs, {
51
- "popper-class": `${t(o).namespace.value}-popover`,
52
- "popper-style": v.value,
50
+ }, o.$attrs, {
51
+ "popper-class": `${t(n).namespace.value}-popover`,
52
+ "popper-style": k.value,
53
53
  teleported: e.teleported,
54
54
  "fallback-placements": ["bottom", "top", "right", "left"],
55
55
  "hide-after": e.hideAfter,
56
56
  persistent: e.persistent
57
57
  }), {
58
- content: n(() => [
59
- p("div", {
60
- class: r(t(o).b())
58
+ content: l(() => [
59
+ a("div", {
60
+ class: c(t(n).b())
61
61
  }, [
62
- p("div", {
63
- class: r(t(o).e("main"))
62
+ a("div", {
63
+ class: c(t(n).e("main"))
64
64
  }, [
65
- !e.hideIcon && e.icon ? (d(), u(t(S), {
65
+ !e.hideIcon && e.icon ? (y(), d(t(P), {
66
66
  key: 0,
67
67
  icon: e.icon,
68
68
  size: 20,
69
- class: r(t(o).e("icon")),
70
- style: I({ color: e.iconColor })
71
- }, null, 8, ["icon", "class", "style"])) : y("", !0),
72
- a(" " + c(e.title), 1)
69
+ class: c(t(n).e("icon")),
70
+ style: b({ color: e.iconColor })
71
+ }, null, 8, ["icon", "class", "style"])) : B("", !0),
72
+ f(" " + s(e.title), 1)
73
73
  ], 2),
74
- p("div", {
75
- class: r(t(o).e("action"))
74
+ a("div", {
75
+ class: c(t(n).e("action"))
76
76
  }, [
77
- B(t(T), {
77
+ T(t(x), {
78
78
  size: "small",
79
79
  type: e.cancelButtonType === "text" ? "" : e.cancelButtonType,
80
80
  text: e.cancelButtonType === "text",
81
- onClick: g
81
+ onClick: V
82
82
  }, {
83
- default: n(() => [
84
- a(c(N.value), 1)
83
+ default: l(() => [
84
+ f(s(z.value), 1)
85
85
  ]),
86
86
  _: 1
87
87
  }, 8, ["type", "text"]),
88
- B(t(T), {
88
+ T(t(x), {
89
89
  size: "small",
90
90
  type: e.confirmButtonType === "text" ? "" : e.confirmButtonType,
91
91
  text: e.confirmButtonType === "text",
92
- onClick: V
92
+ onClick: v
93
93
  }, {
94
- default: n(() => [
95
- a(c(z.value), 1)
94
+ default: l(() => [
95
+ f(s(g.value), 1)
96
96
  ]),
97
97
  _: 1
98
98
  }, 8, ["type", "text"])
99
99
  ], 2)
100
100
  ], 2)
101
101
  ]),
102
- default: n(() => [
103
- e.$slots.reference ? b(e.$slots, "reference", { key: 0 }) : y("", !0)
102
+ default: l(() => [
103
+ o.$slots.reference ? $(o.$slots, "reference", { key: 0 }) : B("", !0)
104
104
  ]),
105
105
  _: 3
106
106
  }, 16, ["popper-class", "popper-style", "teleported", "hide-after", "persistent"]));
@@ -1,19 +1,19 @@
1
- import { defineComponent as m, computed as r, ref as S, unref as l, createBlock as R, openBlock as i, mergeProps as T, withCtx as s, renderSlot as f, createCommentVNode as d, createElementBlock as U, normalizeClass as V, toDisplayString as u, createTextVNode as $ } from "vue";
2
- import { VftTooltip as N } from "../tooltip/index.js";
3
- import { EVENT_CODE as p } from "../../constants/aria.js";
1
+ import { defineComponent as u, computed as o, ref as S, unref as l, createBlock as x, openBlock as f, mergeProps as R, withCtx as s, renderSlot as d, createCommentVNode as p, createElementBlock as T, normalizeClass as U, toDisplayString as c, createTextVNode as V } from "vue";
2
+ import { VftTooltip as $ } from "../tooltip/index.js";
3
+ import { EVENT_CODE as i } from "../../constants/aria.js";
4
4
  import "@vueuse/core";
5
5
  import "@vft/utils";
6
- import { addUnit as O } from "../../utils/helper.js";
6
+ import { addUnit as N } from "../../utils/helper.js";
7
7
  import "lodash-es";
8
8
  import "../form/index.js";
9
- import { useNamespace as K } from "../../hooks/use-namespace/index.js";
9
+ import { useNamespace as O } from "../../hooks/use-namespace/index.js";
10
10
  import "../../hooks/use-model-toggle/index.js";
11
11
  import "@popperjs/core";
12
12
  import "../../hooks/use-z-index/index.js";
13
- const D = "onUpdate:visible", H = m({
13
+ const K = "onUpdate:visible", D = u({
14
14
  name: "vft-popover"
15
- }), Y = /* @__PURE__ */ m({
16
- ...H,
15
+ }), X = /* @__PURE__ */ u({
16
+ ...D,
17
17
  props: {
18
18
  trigger: { default: "hover" },
19
19
  placement: { default: "bottom" },
@@ -37,7 +37,7 @@ const D = "onUpdate:visible", H = m({
37
37
  showArrow: { type: Boolean, default: !0 },
38
38
  persistent: { type: Boolean, default: !0 },
39
39
  appendTo: {},
40
- triggerKeys: { default: () => [p.enter, p.numpadEnter, p.space] }
40
+ triggerKeys: { default: () => [i.enter, i.numpadEnter, i.space] }
41
41
  },
42
42
  emits: [
43
43
  "update:visible",
@@ -46,30 +46,30 @@ const D = "onUpdate:visible", H = m({
46
46
  "after-enter",
47
47
  "after-leave"
48
48
  ],
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(() => [
49
+ setup(e, { expose: m, emit: b }) {
50
+ const t = b, r = O("popover"), v = o(() => [K]), n = S(), g = o(() => l(n)?.popperRef), h = o(() => [
51
51
  {
52
- width: O(t.width)
52
+ width: N(e.width)
53
53
  },
54
- t.popperStyle
55
- ]), y = r(() => [a.b(), t.popperClass, { [a.m("plain")]: !!t.content }]), w = r(() => t.transition === `${a.namespace.value}-fade-in-linear`), B = () => {
54
+ e.popperStyle
55
+ ]), y = o(() => [r.b(), e.popperClass, { [r.m("plain")]: !!e.content }]), w = o(() => e.transition === `${r.namespace.value}-fade-in-linear`), B = () => {
56
56
  n.value?.hide();
57
57
  }, k = () => {
58
- o("before-enter");
58
+ t("before-enter");
59
59
  }, C = () => {
60
- o("before-leave");
60
+ t("before-leave");
61
61
  }, A = () => {
62
- o("after-enter");
62
+ t("after-enter");
63
63
  }, E = () => {
64
- o("update:visible", !1), o("after-leave");
64
+ t("update:visible", !1), t("after-leave");
65
65
  };
66
- return b({
66
+ return m({
67
67
  popperRef: g,
68
68
  hide: B
69
- }), (e, L) => (i(), R(l(N), T({
69
+ }), (a, H) => (f(), x(l($), R({
70
70
  ref_key: "tooltipRef",
71
71
  ref: n
72
- }, e.$attrs, {
72
+ }, a.$attrs, {
73
73
  trigger: e.trigger,
74
74
  "trigger-keys": e.triggerKeys,
75
75
  placement: e.placement,
@@ -100,22 +100,22 @@ const D = "onUpdate:visible", H = m({
100
100
  onHide: E
101
101
  }), {
102
102
  content: s(() => [
103
- e.title ? (i(), U("div", {
103
+ e.title ? (f(), T("div", {
104
104
  key: 0,
105
- class: V(l(a).e("title")),
105
+ class: U(l(r).e("title")),
106
106
  role: "title"
107
- }, u(e.title), 3)) : d("", !0),
108
- f(e.$slots, "default", {}, () => [
109
- $(u(e.content), 1)
107
+ }, c(e.title), 3)) : p("", !0),
108
+ d(a.$slots, "default", {}, () => [
109
+ V(c(e.content), 1)
110
110
  ])
111
111
  ]),
112
112
  default: s(() => [
113
- e.$slots.reference ? f(e.$slots, "reference", { key: 0 }) : d("", !0)
113
+ a.$slots.reference ? d(a.$slots, "reference", { key: 0 }) : p("", !0)
114
114
  ]),
115
115
  _: 3
116
116
  }, 16, ["trigger", "trigger-keys", "placement", "disabled", "visible", "transition", "popper-options", "tabindex", "content", "offset", "show-after", "hide-after", "auto-close", "show-arrow", "aria-label", "effect", "enterable", "popper-class", "popper-style", "teleported", "append-to", "persistent", "gpu-acceleration", "onUpdate:visible"]));
117
117
  }
118
118
  });
119
119
  export {
120
- Y as default
120
+ X as default
121
121
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as g, getCurrentInstance as C, inject as y, computed as s, onMounted as E, watch as l, onBeforeUnmount as x, createBlock as B, createCommentVNode as w, openBlock as A, unref as M, mergeProps as P, withCtx as R, renderSlot as T } from "vue";
1
+ import { defineComponent as g, getCurrentInstance as C, inject as y, computed as s, onMounted as x, watch as l, onBeforeUnmount as E, createBlock as B, createCommentVNode as w, openBlock as A, unref as M, mergeProps as P, withCtx as R, renderSlot as T } from "vue";
2
2
  import { isElement as v } from "@vft/utils";
3
3
  import { OnlyChild as k } from "../slot/only-child.js";
4
4
  import { unrefElement as L } from "@vueuse/core";
@@ -31,15 +31,15 @@ const O = g({
31
31
  setup(r, { expose: b }) {
32
32
  const h = C(), { role: i, triggerRef: n } = y(K, void 0);
33
33
  I(n);
34
- const p = s(() => u.value ? r.id : void 0), m = s(() => {
34
+ const p = s(() => u.value ? r.id : void 0), c = s(() => {
35
35
  if (i && i.value === "tooltip")
36
36
  return r.open && r.id ? r.id : void 0;
37
37
  }), u = s(() => {
38
38
  if (i && i.value !== "tooltip")
39
39
  return i.value;
40
- }), c = s(() => u.value ? `${r.open}` : void 0);
40
+ }), m = s(() => u.value ? `${r.open}` : void 0);
41
41
  let a;
42
- return E(() => {
42
+ return x(() => {
43
43
  l(
44
44
  () => r.virtualRef,
45
45
  (e) => {
@@ -69,7 +69,7 @@ const O = g({
69
69
  t
70
70
  ));
71
71
  }), a = l(
72
- [p, m, u, c],
72
+ [p, c, u, m],
73
73
  (o) => {
74
74
  [
75
75
  "aria-controls",
@@ -92,17 +92,17 @@ const O = g({
92
92
  immediate: !0
93
93
  }
94
94
  );
95
- }), x(() => {
95
+ }), E(() => {
96
96
  a?.(), a = void 0;
97
97
  }), b({
98
98
  /**
99
99
  * @description trigger element
100
100
  */
101
101
  triggerRef: n
102
- }), (e, d) => e.virtualTriggering ? w("", !0) : (A(), B(M(k), P({ key: 0 }, e.$attrs, {
102
+ }), (e, d) => r.virtualTriggering ? w("", !0) : (A(), B(M(k), P({ key: 0 }, e.$attrs, {
103
103
  "aria-controls": p.value,
104
- "aria-describedby": m.value,
105
- "aria-expanded": c.value,
104
+ "aria-describedby": c.value,
105
+ "aria-expanded": m.value,
106
106
  "aria-haspopup": u.value
107
107
  }), {
108
108
  default: R(() => [
@@ -1,18 +1,18 @@
1
- import { defineComponent as T, computed as s, createElementBlock as i, openBlock as l, normalizeClass as n, unref as a, createCommentVNode as p, createElementVNode as f, normalizeStyle as u, renderSlot as C, toDisplayString as D, createBlock as x, normalizeProps as A, mergeProps as L } from "vue";
2
- import { isFunction as M, isString as I } from "@vft/utils";
3
- import { VftIcon as E } from "../icon/index.js";
1
+ import { defineComponent as T, computed as r, createElementBlock as i, openBlock as o, normalizeClass as l, unref as a, createCommentVNode as y, createElementVNode as f, normalizeStyle as c, renderSlot as C, toDisplayString as D, createBlock as A, normalizeProps as L, mergeProps as M } from "vue";
2
+ import { isFunction as E, isString as I } from "@vft/utils";
3
+ import { VftIcon as O } from "../icon/index.js";
4
4
  import "@vueuse/core";
5
5
  import "../config-provider/hooks/use-global-config.js";
6
6
  import "lodash-es";
7
7
  import "../form/index.js";
8
- import { useNamespace as O } from "../../hooks/use-namespace/index.js";
8
+ import { useNamespace as R } 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 R = ["aria-valuenow"], U = { viewBox: "0 0 100 100" }, j = ["d", "stroke", "stroke-width"], q = ["d", "stroke", "opacity", "stroke-linecap", "stroke-width"], G = { key: 0 }, H = T({
12
+ const U = ["aria-valuenow"], j = { viewBox: "0 0 100 100" }, q = ["d", "stroke", "stroke-width"], G = ["d", "stroke", "opacity", "stroke-linecap", "stroke-width"], H = { key: 0 }, J = T({
13
13
  name: "vft-progress"
14
- }), se = /* @__PURE__ */ T({
15
- ...H,
14
+ }), re = /* @__PURE__ */ T({
15
+ ...J,
16
16
  props: {
17
17
  type: { default: "line" },
18
18
  percentage: { default: 0 },
@@ -27,69 +27,69 @@ const R = ["aria-valuenow"], U = { viewBox: "0 0 100 100" }, j = ["d", "stroke",
27
27
  color: { type: [String, Array, Function], default: "" },
28
28
  striped: { type: Boolean, default: !1 },
29
29
  stripedFlow: { type: Boolean, default: !1 },
30
- format: { type: Function, default: (t) => `${t}%` }
30
+ format: { type: Function, default: (e) => `${e}%` }
31
31
  },
32
- setup(t) {
33
- const r = O("progress"), y = {
32
+ setup(e) {
33
+ const n = R("progress"), g = {
34
34
  success: "#13ce66",
35
35
  exception: "#ff4949",
36
36
  warning: "#e6a23c",
37
37
  default: "#20a0ff"
38
- }, F = s(() => ({
39
- width: `${t.percentage}%`,
40
- animationDuration: `${t.duration}s`,
41
- backgroundColor: B(t.percentage)
42
- })), h = s(
43
- () => (t.strokeWidth / t.width * 100).toFixed(1)
44
- ), g = s(() => ["circle", "dashboard"].includes(t.type) ? Number.parseInt(
38
+ }, F = r(() => ({
39
+ width: `${e.percentage}%`,
40
+ animationDuration: `${e.duration}s`,
41
+ backgroundColor: B(e.percentage)
42
+ })), h = r(
43
+ () => (e.strokeWidth / e.width * 100).toFixed(1)
44
+ ), $ = r(() => ["circle", "dashboard"].includes(e.type) ? Number.parseInt(
45
45
  `${50 - Number.parseFloat(h.value) / 2}`,
46
46
  10
47
- ) : 0), $ = s(() => {
48
- const e = g.value, o = t.type === "dashboard";
47
+ ) : 0), b = r(() => {
48
+ const t = $.value, s = e.type === "dashboard";
49
49
  return `
50
50
  M 50 50
51
- m 0 ${o ? "" : "-"}${e}
52
- a ${e} ${e} 0 1 1 0 ${o ? "-" : ""}${e * 2}
53
- a ${e} ${e} 0 1 1 0 ${o ? "" : "-"}${e * 2}
51
+ m 0 ${s ? "" : "-"}${t}
52
+ a ${t} ${t} 0 1 1 0 ${s ? "-" : ""}${t * 2}
53
+ a ${t} ${t} 0 1 1 0 ${s ? "" : "-"}${t * 2}
54
54
  `;
55
- }), c = s(() => 2 * Math.PI * g.value), m = s(() => t.type === "dashboard" ? 0.75 : 1), b = s(() => `${-1 * c.value * (1 - m.value) / 2}px`), P = s(() => ({
56
- strokeDasharray: `${c.value * m.value}px, ${c.value}px`,
57
- strokeDashoffset: b.value
58
- })), N = s(() => ({
59
- strokeDasharray: `${c.value * m.value * (t.percentage / 100)}px, ${c.value}px`,
60
- strokeDashoffset: b.value,
55
+ }), u = r(() => 2 * Math.PI * $.value), m = r(() => e.type === "dashboard" ? 0.75 : 1), w = r(() => `${-1 * u.value * (1 - m.value) / 2}px`), P = r(() => ({
56
+ strokeDasharray: `${u.value * m.value}px, ${u.value}px`,
57
+ strokeDashoffset: w.value
58
+ })), N = r(() => ({
59
+ strokeDasharray: `${u.value * m.value * (e.percentage / 100)}px, ${u.value}px`,
60
+ strokeDashoffset: w.value,
61
61
  transition: "stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"
62
- })), z = s(() => {
63
- let e;
64
- return t.color ? e = B(t.percentage) : e = y[t.status] || y.default, e;
65
- }), w = s(() => t.status === "warning" ? "icon-warning-filled" : t.type === "line" ? t.status === "success" ? "icon-circle-check" : "icon-circle-close" : t.status === "success" ? "icon-check" : "icon-close"), W = s(() => t.type === "line" ? 12 + t.strokeWidth * 0.4 : t.width * 0.111111 + 2), S = s(() => t.format(t.percentage));
66
- function V(e) {
67
- const o = 100 / e.length;
68
- return e.map((d, k) => I(d) ? {
62
+ })), z = r(() => {
63
+ let t;
64
+ return e.color ? t = B(e.percentage) : t = g[e.status] || g.default, t;
65
+ }), x = r(() => e.status === "warning" ? "icon-warning-filled" : e.type === "line" ? e.status === "success" ? "icon-circle-check" : "icon-circle-close" : e.status === "success" ? "icon-check" : "icon-close"), W = r(() => e.type === "line" ? 12 + e.strokeWidth * 0.4 : e.width * 0.111111 + 2), S = r(() => e.format(e.percentage));
66
+ function V(t) {
67
+ const s = 100 / t.length;
68
+ return t.map((d, k) => I(d) ? {
69
69
  color: d,
70
- percentage: (k + 1) * o
70
+ percentage: (k + 1) * s
71
71
  } : d).sort((d, k) => d.percentage - k.percentage);
72
72
  }
73
- const B = (e) => {
74
- if (M(t.color))
75
- return t.color(e);
76
- if (I(t.color))
77
- return t.color;
73
+ const B = (t) => {
74
+ if (E(e.color))
75
+ return e.color(t);
76
+ if (I(e.color))
77
+ return e.color;
78
78
  {
79
- const o = V(t.color);
80
- for (const v of o)
81
- if (v.percentage > e) return v.color;
82
- return o[o.length - 1]?.color;
79
+ const s = V(e.color);
80
+ for (const v of s)
81
+ if (v.percentage > t) return v.color;
82
+ return s[s.length - 1]?.color;
83
83
  }
84
84
  };
85
- return (e, o) => (l(), i("div", {
86
- class: n([
87
- a(r).b(),
88
- a(r).m(e.type),
89
- a(r).is(e.status),
85
+ return (t, s) => (o(), i("div", {
86
+ class: l([
87
+ a(n).b(),
88
+ a(n).m(e.type),
89
+ a(n).is(e.status),
90
90
  {
91
- [a(r).m("without-text")]: !e.showText,
92
- [a(r).m("text-inside")]: e.textInside
91
+ [a(n).m("without-text")]: !e.showText,
92
+ [a(n).m("text-inside")]: e.textInside
93
93
  }
94
94
  ]),
95
95
  role: "progressbar",
@@ -97,71 +97,71 @@ const R = ["aria-valuenow"], U = { viewBox: "0 0 100 100" }, j = ["d", "stroke",
97
97
  "aria-valuemin": "0",
98
98
  "aria-valuemax": "100"
99
99
  }, [
100
- e.type === "line" ? (l(), i("div", {
100
+ e.type === "line" ? (o(), i("div", {
101
101
  key: 0,
102
- class: n(a(r).b("bar"))
102
+ class: l(a(n).b("bar"))
103
103
  }, [
104
104
  f("div", {
105
- class: n(a(r).be("bar", "outer")),
106
- style: u({ height: `${e.strokeWidth}px` })
105
+ class: l(a(n).be("bar", "outer")),
106
+ style: c({ height: `${e.strokeWidth}px` })
107
107
  }, [
108
108
  f("div", {
109
- class: n([
110
- a(r).be("bar", "inner"),
111
- { [a(r).bem("bar", "inner", "indeterminate")]: e.indeterminate },
112
- { [a(r).bem("bar", "inner", "striped")]: e.striped },
113
- { [a(r).bem("bar", "inner", "striped-flow")]: e.stripedFlow }
109
+ class: l([
110
+ a(n).be("bar", "inner"),
111
+ { [a(n).bem("bar", "inner", "indeterminate")]: e.indeterminate },
112
+ { [a(n).bem("bar", "inner", "striped")]: e.striped },
113
+ { [a(n).bem("bar", "inner", "striped-flow")]: e.stripedFlow }
114
114
  ]),
115
- style: u(F.value)
115
+ style: c(F.value)
116
116
  }, [
117
- (e.showText || e.$slots.default) && e.textInside ? (l(), i("div", {
117
+ (e.showText || t.$slots.default) && e.textInside ? (o(), i("div", {
118
118
  key: 0,
119
- class: n(a(r).be("bar", "innerText"))
119
+ class: l(a(n).be("bar", "innerText"))
120
120
  }, [
121
- C(e.$slots, "default", { percentage: e.percentage }, () => [
121
+ C(t.$slots, "default", { percentage: e.percentage }, () => [
122
122
  f("span", null, D(S.value), 1)
123
123
  ])
124
- ], 2)) : p("", !0)
124
+ ], 2)) : y("", !0)
125
125
  ], 6)
126
126
  ], 6)
127
- ], 2)) : (l(), i("div", {
127
+ ], 2)) : (o(), i("div", {
128
128
  key: 1,
129
- class: n(a(r).b("circle")),
130
- style: u({ height: `${e.width}px`, width: `${e.width}px` })
129
+ class: l(a(n).b("circle")),
130
+ style: c({ height: `${e.width}px`, width: `${e.width}px` })
131
131
  }, [
132
- (l(), i("svg", U, [
132
+ (o(), i("svg", j, [
133
133
  f("path", {
134
- class: n(a(r).be("circle", "track")),
135
- d: $.value,
136
- stroke: `var(${a(r).cssVarName("fill-color-light")}, #e5e9f2)`,
134
+ class: l(a(n).be("circle", "track")),
135
+ d: b.value,
136
+ stroke: `var(${a(n).cssVarName("fill-color-light")}, #e5e9f2)`,
137
137
  "stroke-width": h.value,
138
138
  fill: "none",
139
- style: u(P.value)
140
- }, null, 14, j),
139
+ style: c(P.value)
140
+ }, null, 14, q),
141
141
  f("path", {
142
- class: n(a(r).be("circle", "path")),
143
- d: $.value,
142
+ class: l(a(n).be("circle", "path")),
143
+ d: b.value,
144
144
  stroke: z.value,
145
145
  fill: "none",
146
146
  opacity: e.percentage ? 1 : 0,
147
147
  "stroke-linecap": e.strokeLinecap,
148
148
  "stroke-width": h.value,
149
- style: u(N.value)
150
- }, null, 14, q)
149
+ style: c(N.value)
150
+ }, null, 14, G)
151
151
  ]))
152
152
  ], 6)),
153
- (e.showText || e.$slots.default) && !e.textInside ? (l(), i("div", {
153
+ (e.showText || t.$slots.default) && !e.textInside ? (o(), i("div", {
154
154
  key: 2,
155
- class: n(a(r).e("text")),
156
- style: u({ fontSize: `${W.value}px` })
155
+ class: l(a(n).e("text")),
156
+ style: c({ fontSize: `${W.value}px` })
157
157
  }, [
158
- C(e.$slots, "default", { percentage: e.percentage }, () => [
159
- e.status ? w.value?.icon ? (l(), x(a(E), A(L({ key: 1 }, w.value)), null, 16)) : p("", !0) : (l(), i("span", G, D(S.value), 1))
158
+ C(t.$slots, "default", { percentage: e.percentage }, () => [
159
+ e.status ? x.value?.icon ? (o(), A(a(O), L(M({ key: 1 }, x.value)), null, 16)) : y("", !0) : (o(), i("span", H, D(S.value), 1))
160
160
  ])
161
- ], 6)) : p("", !0)
162
- ], 10, R));
161
+ ], 6)) : y("", !0)
162
+ ], 10, U));
163
163
  }
164
164
  });
165
165
  export {
166
- se as default
166
+ re as default
167
167
  };