vft 0.0.429 → 0.0.431

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 (234) hide show
  1. package/attributes.json +1 -1
  2. package/dist/index.css +1 -1
  3. package/es/components/alert/alert.vue2.js +38 -38
  4. package/es/components/autocomplete/autocomplete.vue2.js +82 -82
  5. package/es/components/avatar/avatar.vue2.js +23 -23
  6. package/es/components/avatar-stack/avatar-stack.vue2.js +25 -25
  7. package/es/components/breadcrumb/breadcrumb-item.vue2.js +19 -19
  8. package/es/components/button/button.vue2.js +37 -37
  9. package/es/components/card/card.vue2.js +19 -19
  10. package/es/components/carousel/carousel.vue2.js +75 -75
  11. package/es/components/carousel/use-carousel.js +1 -1
  12. package/es/components/cascader-panel/index.vue2.js +2 -2
  13. package/es/components/cascader-panel/menu.vue2.js +2 -2
  14. package/es/components/cascader-panel/node.vue2.js +3 -4
  15. package/es/components/checkbox/checkbox-button.vue2.js +52 -52
  16. package/es/components/checkbox/checkbox-group.vue2.js +26 -26
  17. package/es/components/checkbox/checkbox.vue2.js +57 -57
  18. package/es/components/clamp/clamp.vue2.js +14 -14
  19. package/es/components/clamp-toggle/clamp-toggle.vue2.js +17 -17
  20. package/es/components/clamp-tooltip/clamp-tooltip.vue2.js +19 -19
  21. package/es/components/col/col.vue2.js +20 -20
  22. package/es/components/color-picker/color-picker.vue2.js +126 -128
  23. package/es/components/color-picker/components/sv-panel.vue.js +2 -2
  24. package/es/components/config-provider/hooks/use-global-config.js +3 -3
  25. package/es/components/context-menu/context-menu.vue2.js +18 -18
  26. package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +37 -39
  27. package/es/components/date-picker/date-picker-com/panel-date-range.vue2.js +8 -10
  28. package/es/components/date-picker/date-picker.d.ts +1 -1
  29. package/es/components/date-picker/index.d.ts +2 -2
  30. package/es/components/descriptions/description.vue2.js +44 -44
  31. package/es/components/descriptions/descriptions-row.vue2.js +12 -12
  32. package/es/components/dialog/dialog-content.vue2.js +31 -31
  33. package/es/components/dialog/dialog.vue2.js +46 -46
  34. package/es/components/divider/divider.vue2.js +19 -19
  35. package/es/components/drawer/drawer.vue2.js +41 -41
  36. package/es/components/dropdown/dropdown-item-impl.vue2.js +40 -40
  37. package/es/components/dropdown/dropdown-item.vue2.js +28 -28
  38. package/es/components/dropdown/dropdown.vue2.js +124 -124
  39. package/es/components/form/form-item.vue2.js +71 -71
  40. package/es/components/header-layout/header-layout.vue2.js +25 -25
  41. package/es/components/icon/icon.vue2.js +15 -15
  42. package/es/components/icon-text/icon-text.vue2.js +28 -28
  43. package/es/components/iframe-layout/iframe-layout.vue2.js +13 -13
  44. package/es/components/iframe-layout/iframe-page.vue2.js +11 -11
  45. package/es/components/image/image.vue2.js +63 -63
  46. package/es/components/image-viewer/image-viewer.vue2.js +88 -88
  47. package/es/components/infinite-scroll/index.d.ts +1 -1
  48. package/es/components/input/input.vue2.js +112 -112
  49. package/es/components/input-number/input-number.vue2.js +100 -100
  50. package/es/components/input-tag/composables/use-input-tag.js +1 -1
  51. package/es/components/link/link.vue2.js +20 -20
  52. package/es/components/list-cell/list-cell.vue2.js +19 -19
  53. package/es/components/logo/logo.vue2.js +22 -22
  54. package/es/components/menu/menu-item-group.vue2.js +8 -8
  55. package/es/components/menu/menu-item.vue2.js +48 -48
  56. package/es/components/menu/sub-menu.vue2.js +33 -31
  57. package/es/components/message/message.vue2.js +66 -66
  58. package/es/components/modal/modal-footer-action.vue2.js +25 -25
  59. package/es/components/modal/modal.vue2.js +40 -40
  60. package/es/components/multiple-tabs/multiple-tabs.vue2.js +30 -30
  61. package/es/components/page-wrapper/page-wrapper.vue2.js +12 -12
  62. package/es/components/pagination/components/jumper.vue2.js +18 -18
  63. package/es/components/pagination/components/next.vue2.js +11 -11
  64. package/es/components/pagination/components/pager.vue2.js +74 -74
  65. package/es/components/pagination/components/prev.vue2.js +9 -9
  66. package/es/components/pagination/components/sizes.vue2.js +18 -18
  67. package/es/components/pagination/components/total.vue2.js +8 -8
  68. package/es/components/popconfirm/popconfirm.vue2.js +47 -47
  69. package/es/components/popover/popover.vue2.js +28 -28
  70. package/es/components/popper/trigger.vue2.js +9 -9
  71. package/es/components/progress/progress.vue2.js +87 -87
  72. package/es/components/qrcode/qrcode.vue2.js +31 -31
  73. package/es/components/radio/radio-button.vue2.js +17 -17
  74. package/es/components/radio/radio-group.vue2.js +35 -35
  75. package/es/components/router-view-content/router-view-content.vue2.js +25 -25
  76. package/es/components/roving-focus-group/roving-focus-item.vue2.js +30 -30
  77. package/es/components/row/row.vue2.js +5 -5
  78. package/es/components/scrollbar/bar.vue2.js +16 -16
  79. package/es/components/scrollbar/scrollbar.vue2.js +48 -48
  80. package/es/components/scrollbar/thumb.vue2.js +27 -27
  81. package/es/components/search/search.vue2.js +29 -29
  82. package/es/components/select/index.d.ts +1 -1
  83. package/es/components/select/select.vue.d.ts +1 -1
  84. package/es/components/side-menu/index.d.ts +2 -8
  85. package/es/components/side-menu/side-menu.vue.d.ts +8 -62
  86. package/es/components/side-menu/side-menu.vue2.js +48 -46
  87. package/es/components/side-menu/types.d.ts +107 -0
  88. package/es/components/side-menu/use-drag-line.d.ts +3 -1
  89. package/es/components/side-menu/use-drag-line.js +39 -28
  90. package/es/components/skeleton/skeleton-item.vue2.js +9 -9
  91. package/es/components/skeleton/skeleton.vue2.js +14 -14
  92. package/es/components/slider/button.vue2.js +54 -54
  93. package/es/components/slider/slider.vue2.js +106 -106
  94. package/es/components/steps/item.vue2.js +56 -56
  95. package/es/components/steps/steps.vue2.js +16 -16
  96. package/es/components/super-form/super-form-action.vue2.js +28 -28
  97. package/es/components/super-form/super-form-item.vue2.js +1 -1
  98. package/es/components/switch/switch.vue2.js +108 -108
  99. package/es/components/table/field.d.ts +4 -4
  100. package/es/components/teleport/teleport.vue2.js +6 -6
  101. package/es/components/time-picker/common/picker.vue.d.ts +1 -1
  102. package/es/components/time-picker/index.d.ts +2 -2
  103. package/es/components/time-picker/time-picker.d.ts +1 -1
  104. package/es/components/timeline/timeline-item.vue2.js +20 -20
  105. package/es/components/tooltip/content.vue2.js +57 -57
  106. package/es/components/tooltip/tooltip.vue2.js +66 -66
  107. package/es/components/tooltip/trigger.vue2.js +42 -42
  108. package/es/components/tree/tree.vue2.js +72 -72
  109. package/es/components/upload/upload-content.vue2.js +85 -85
  110. package/es/components/upload/upload-list.vue2.js +70 -70
  111. package/es/components/upload/upload.vue2.js +86 -86
  112. package/es/components/verify-code/verify-code.vue2.js +18 -18
  113. package/es/package.json.d.ts +1 -1
  114. package/es/package.json.js +1 -1
  115. package/es/utils/vue/vnode.js +1 -1
  116. package/lib/components/alert/alert.vue2.cjs +1 -1
  117. package/lib/components/autocomplete/autocomplete.vue2.cjs +1 -1
  118. package/lib/components/avatar/avatar.vue2.cjs +1 -1
  119. package/lib/components/avatar-stack/avatar-stack.vue2.cjs +1 -1
  120. package/lib/components/breadcrumb/breadcrumb-item.vue2.cjs +1 -1
  121. package/lib/components/button/button.vue2.cjs +1 -1
  122. package/lib/components/card/card.vue2.cjs +1 -1
  123. package/lib/components/carousel/carousel.vue2.cjs +1 -1
  124. package/lib/components/cascader-panel/index.vue2.cjs +1 -1
  125. package/lib/components/cascader-panel/menu.vue2.cjs +1 -1
  126. package/lib/components/cascader-panel/node.vue2.cjs +1 -1
  127. package/lib/components/checkbox/checkbox-button.vue2.cjs +1 -1
  128. package/lib/components/checkbox/checkbox-group.vue2.cjs +1 -1
  129. package/lib/components/checkbox/checkbox.vue2.cjs +1 -1
  130. package/lib/components/clamp/clamp.vue2.cjs +1 -1
  131. package/lib/components/clamp-toggle/clamp-toggle.vue2.cjs +1 -1
  132. package/lib/components/clamp-tooltip/clamp-tooltip.vue2.cjs +1 -1
  133. package/lib/components/col/col.vue2.cjs +1 -1
  134. package/lib/components/color-picker/color-picker.vue2.cjs +1 -1
  135. package/lib/components/color-picker/components/sv-panel.vue.cjs +1 -1
  136. package/lib/components/context-menu/context-menu.vue2.cjs +1 -1
  137. package/lib/components/date-picker/date-picker-com/panel-date-pick.vue2.cjs +1 -1
  138. package/lib/components/date-picker/date-picker-com/panel-date-range.vue2.cjs +1 -1
  139. package/lib/components/date-picker/date-picker.d.ts +1 -1
  140. package/lib/components/date-picker/index.d.ts +2 -2
  141. package/lib/components/descriptions/description.vue2.cjs +1 -1
  142. package/lib/components/descriptions/descriptions-row.vue2.cjs +1 -1
  143. package/lib/components/dialog/dialog-content.vue2.cjs +1 -1
  144. package/lib/components/dialog/dialog.vue2.cjs +1 -1
  145. package/lib/components/divider/divider.vue2.cjs +1 -1
  146. package/lib/components/drawer/drawer.vue2.cjs +1 -1
  147. package/lib/components/dropdown/dropdown-item-impl.vue2.cjs +1 -1
  148. package/lib/components/dropdown/dropdown-item.vue2.cjs +1 -1
  149. package/lib/components/dropdown/dropdown.vue2.cjs +1 -1
  150. package/lib/components/form/form-item.vue2.cjs +1 -1
  151. package/lib/components/header-layout/header-layout.vue2.cjs +1 -1
  152. package/lib/components/icon/icon.vue2.cjs +1 -1
  153. package/lib/components/icon-text/icon-text.vue2.cjs +1 -1
  154. package/lib/components/iframe-layout/iframe-layout.vue2.cjs +1 -1
  155. package/lib/components/iframe-layout/iframe-page.vue2.cjs +1 -1
  156. package/lib/components/image/image.vue2.cjs +1 -1
  157. package/lib/components/image-viewer/image-viewer.vue2.cjs +1 -1
  158. package/lib/components/infinite-scroll/index.d.ts +1 -1
  159. package/lib/components/input/input.vue2.cjs +1 -1
  160. package/lib/components/input-number/input-number.vue2.cjs +1 -1
  161. package/lib/components/link/link.vue2.cjs +1 -1
  162. package/lib/components/list-cell/list-cell.vue2.cjs +1 -1
  163. package/lib/components/logo/logo.vue2.cjs +1 -1
  164. package/lib/components/menu/menu-item-group.vue2.cjs +1 -1
  165. package/lib/components/menu/menu-item.vue2.cjs +1 -1
  166. package/lib/components/menu/sub-menu.vue2.cjs +1 -1
  167. package/lib/components/message/message.vue2.cjs +1 -1
  168. package/lib/components/modal/modal-footer-action.vue2.cjs +1 -1
  169. package/lib/components/modal/modal.vue2.cjs +1 -1
  170. package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
  171. package/lib/components/page-wrapper/page-wrapper.vue2.cjs +1 -1
  172. package/lib/components/pagination/components/jumper.vue2.cjs +1 -1
  173. package/lib/components/pagination/components/next.vue2.cjs +1 -1
  174. package/lib/components/pagination/components/pager.vue2.cjs +1 -1
  175. package/lib/components/pagination/components/prev.vue2.cjs +1 -1
  176. package/lib/components/pagination/components/sizes.vue2.cjs +1 -1
  177. package/lib/components/pagination/components/total.vue2.cjs +1 -1
  178. package/lib/components/popconfirm/popconfirm.vue2.cjs +1 -1
  179. package/lib/components/popover/popover.vue2.cjs +1 -1
  180. package/lib/components/popper/trigger.vue2.cjs +1 -1
  181. package/lib/components/progress/progress.vue2.cjs +5 -5
  182. package/lib/components/qrcode/qrcode.vue2.cjs +1 -1
  183. package/lib/components/radio/radio-button.vue2.cjs +1 -1
  184. package/lib/components/radio/radio-group.vue2.cjs +1 -1
  185. package/lib/components/router-view-content/router-view-content.vue2.cjs +1 -1
  186. package/lib/components/roving-focus-group/roving-focus-item.vue2.cjs +1 -1
  187. package/lib/components/row/row.vue2.cjs +1 -1
  188. package/lib/components/scrollbar/bar.vue2.cjs +1 -1
  189. package/lib/components/scrollbar/scrollbar.vue2.cjs +1 -1
  190. package/lib/components/scrollbar/thumb.vue2.cjs +1 -1
  191. package/lib/components/search/search.vue2.cjs +1 -1
  192. package/lib/components/select/index.d.ts +1 -1
  193. package/lib/components/select/select.vue.d.ts +1 -1
  194. package/lib/components/side-menu/index.d.ts +2 -8
  195. package/lib/components/side-menu/side-menu.vue.d.ts +8 -62
  196. package/lib/components/side-menu/side-menu.vue2.cjs +1 -1
  197. package/lib/components/side-menu/types.d.ts +107 -0
  198. package/lib/components/side-menu/use-drag-line.cjs +1 -1
  199. package/lib/components/side-menu/use-drag-line.d.ts +3 -1
  200. package/lib/components/skeleton/skeleton-item.vue2.cjs +1 -1
  201. package/lib/components/skeleton/skeleton.vue2.cjs +1 -1
  202. package/lib/components/slider/button.vue2.cjs +1 -1
  203. package/lib/components/slider/slider.vue2.cjs +1 -1
  204. package/lib/components/steps/item.vue2.cjs +1 -1
  205. package/lib/components/steps/steps.vue2.cjs +1 -1
  206. package/lib/components/super-form/super-form-action.vue2.cjs +1 -1
  207. package/lib/components/switch/switch.vue2.cjs +1 -1
  208. package/lib/components/table/field.d.ts +4 -4
  209. package/lib/components/teleport/teleport.vue2.cjs +1 -1
  210. package/lib/components/time-picker/common/picker.vue.d.ts +1 -1
  211. package/lib/components/time-picker/index.d.ts +2 -2
  212. package/lib/components/time-picker/time-picker.d.ts +1 -1
  213. package/lib/components/timeline/timeline-item.vue2.cjs +1 -1
  214. package/lib/components/tooltip/content.vue2.cjs +1 -1
  215. package/lib/components/tooltip/tooltip.vue2.cjs +1 -1
  216. package/lib/components/tooltip/trigger.vue2.cjs +1 -1
  217. package/lib/components/tree/tree.vue2.cjs +1 -1
  218. package/lib/components/upload/upload-content.vue2.cjs +1 -1
  219. package/lib/components/upload/upload-list.vue2.cjs +1 -1
  220. package/lib/components/upload/upload.vue2.cjs +1 -1
  221. package/lib/components/verify-code/verify-code.vue2.cjs +1 -1
  222. package/lib/package.json.cjs +1 -1
  223. package/lib/package.json.d.ts +1 -1
  224. package/package.json +4 -4
  225. package/tags.json +1 -1
  226. package/theme-style/index.css +1 -1
  227. package/theme-style/src/header-layout.scss +1 -1
  228. package/theme-style/src/menu.scss +7 -2
  229. package/theme-style/src/mixins/mixins.scss +1 -0
  230. package/theme-style/src/side-menu.scss +0 -3
  231. package/theme-style/vft-header-layout.css +1 -1
  232. package/theme-style/vft-menu.css +1 -1
  233. package/theme-style/vft-side-menu.css +1 -1
  234. package/web-types.json +1 -1
@@ -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
  };
@@ -1,11 +1,11 @@
1
- import { defineComponent as s, ref as w, onMounted as g, getCurrentInstance as v, watch as p, createElementBlock as h, openBlock as l, createBlock as C, resolveDynamicComponent as y, unref as c } from "vue";
2
- import { downloadByUrl as E } from "@vft/utils";
3
- import { toDataURL as L } from "qrcode";
4
- import { toCanvas as k } from "./toCanvas.js";
5
- const x = s({
1
+ import { defineComponent as f, ref as w, onMounted as g, getCurrentInstance as v, watch as h, createElementBlock as p, openBlock as l, createBlock as C, resolveDynamicComponent as x, unref as c } from "vue";
2
+ import { downloadByUrl as y } from "@vft/utils";
3
+ import { toDataURL as E } from "qrcode";
4
+ import { toCanvas as L } from "./toCanvas.js";
5
+ const k = f({
6
6
  name: "vft-qrcode"
7
- }), M = /* @__PURE__ */ s({
8
- ...x,
7
+ }), M = /* @__PURE__ */ f({
8
+ ...k,
9
9
  props: {
10
10
  value: {},
11
11
  options: {},
@@ -14,58 +14,58 @@ const x = s({
14
14
  tag: { default: "canvas" }
15
15
  },
16
16
  emits: ["done", "error"],
17
- setup(n, { expose: f, emit: u }) {
17
+ setup(t, { expose: s, emit: u }) {
18
18
  const a = u, r = w(null);
19
19
  async function i() {
20
20
  try {
21
- const o = String(n.value), t = c(r);
22
- if (!t) return;
23
- if (n.tag === "canvas") {
24
- const e = await k({
25
- canvas: t,
26
- width: n.width,
27
- logo: n.logo,
21
+ const o = String(t.value), e = c(r);
22
+ if (!e) return;
23
+ if (t.tag === "canvas") {
24
+ const n = await L({
25
+ canvas: e,
26
+ width: t.width,
27
+ logo: t.logo,
28
28
  content: o,
29
- options: n.options || {}
29
+ options: t.options || {}
30
30
  });
31
31
  a("done", {
32
- url: e,
33
- ctx: t.getContext("2d")
32
+ url: n,
33
+ ctx: e.getContext("2d")
34
34
  });
35
35
  return;
36
36
  }
37
- if (n.tag === "img") {
38
- const e = await L(o, {
37
+ if (t.tag === "img") {
38
+ const n = await E(o, {
39
39
  errorCorrectionLevel: "H",
40
- width: n.width,
41
- ...n.options
40
+ width: t.width,
41
+ ...t.options
42
42
  });
43
- c(r).src = e, a("done", { url: e });
43
+ c(r).src = n, a("done", { url: n });
44
44
  }
45
45
  } catch (o) {
46
46
  a("error", o);
47
47
  }
48
48
  }
49
49
  function d(o) {
50
- let t = "";
51
- const e = c(r);
52
- e instanceof HTMLCanvasElement ? t = e.toDataURL() : e instanceof HTMLImageElement && (t = e.src), t && E({
53
- url: t,
50
+ let e = "";
51
+ const n = c(r);
52
+ n instanceof HTMLCanvasElement ? e = n.toDataURL() : n instanceof HTMLImageElement && (e = n.src), e && y({
53
+ url: e,
54
54
  fileName: o
55
55
  });
56
56
  }
57
57
  g(i);
58
58
  const m = v();
59
- return p(
59
+ return h(
60
60
  m.props,
61
61
  () => {
62
62
  i();
63
63
  },
64
64
  { deep: !0 }
65
- ), f({
65
+ ), s({
66
66
  download: d
67
- }), (o, t) => (l(), h("div", null, [
68
- (l(), C(y(o.tag), {
67
+ }), (o, e) => (l(), p("div", null, [
68
+ (l(), C(x(t.tag), {
69
69
  ref_key: "wrapRef",
70
70
  ref: r
71
71
  }, null, 512))
@@ -1,4 +1,4 @@
1
- import { defineComponent as b, computed as C, createElementBlock as g, openBlock as N, normalizeClass as u, unref as e, withDirectives as V, createElementVNode as m, withModifiers as p, isRef as $, vModelRadio as R, normalizeStyle as w, renderSlot as z, createTextVNode as x, toDisplayString as D } from "vue";
1
+ import { defineComponent as f, computed as C, createElementBlock as g, openBlock as N, normalizeClass as u, unref as e, withDirectives as V, createElementVNode as p, withModifiers as b, isRef as $, vModelRadio as R, normalizeStyle as w, renderSlot as x, createTextVNode as z, toDisplayString as D } from "vue";
2
2
  import "@vueuse/core";
3
3
  import "@vft/utils";
4
4
  import "../config-provider/hooks/use-global-config.js";
@@ -9,9 +9,9 @@ import "../../hooks/use-model-toggle/index.js";
9
9
  import "@popperjs/core";
10
10
  import "../../hooks/use-z-index/index.js";
11
11
  import { useRadio as M } from "./use-radio.js";
12
- const F = ["value", "name", "disabled"], G = b({
12
+ const F = ["value", "name", "disabled"], G = f({
13
13
  name: "vft-radio-button"
14
- }), P = /* @__PURE__ */ b({
14
+ }), P = /* @__PURE__ */ f({
15
15
  ...G,
16
16
  props: {
17
17
  size: {},
@@ -23,14 +23,14 @@ const F = ["value", "name", "disabled"], G = b({
23
23
  border: { type: Boolean }
24
24
  },
25
25
  emits: ["click"],
26
- setup(f, { emit: v }) {
27
- const t = E("radio"), y = f, { radioRef: c, focus: a, size: k, disabled: d, modelValue: i, radioGroup: l, actualValue: s } = M(y), B = v, S = C(() => ({
26
+ setup(n, { emit: v }) {
27
+ const t = E("radio"), y = n, { radioRef: c, focus: a, size: k, disabled: d, modelValue: i, radioGroup: l, actualValue: s } = M(y), B = v, S = C(() => ({
28
28
  backgroundColor: l?.fill || "",
29
29
  borderColor: l?.fill || "",
30
30
  boxShadow: l?.fill ? `-1px 0 0 0 ${l.fill}` : "",
31
31
  color: l?.textColor || ""
32
32
  }));
33
- return (r, o) => (N(), g("label", {
33
+ return (m, o) => (N(), g("label", {
34
34
  class: u([
35
35
  e(t).b("button"),
36
36
  e(t).is("active", e(i) === e(s)),
@@ -39,31 +39,31 @@ const F = ["value", "name", "disabled"], G = b({
39
39
  e(t).bm("button", e(k))
40
40
  ])
41
41
  }, [
42
- V(m("input", {
42
+ V(p("input", {
43
43
  ref_key: "radioRef",
44
44
  ref: c,
45
- "onUpdate:modelValue": o[0] || (o[0] = (n) => $(i) ? i.value = n : null),
45
+ "onUpdate:modelValue": o[0] || (o[0] = (r) => $(i) ? i.value = r : null),
46
46
  class: u(e(t).be("button", "original-radio")),
47
47
  value: e(s),
48
48
  type: "radio",
49
- name: r.name || e(l)?.name,
49
+ name: n.name || e(l)?.name,
50
50
  disabled: e(d),
51
- onFocus: o[1] || (o[1] = (n) => a.value = !0),
52
- onBlur: o[2] || (o[2] = (n) => a.value = !1),
53
- onClick: o[3] || (o[3] = p(() => {
51
+ onFocus: o[1] || (o[1] = (r) => a.value = !0),
52
+ onBlur: o[2] || (o[2] = (r) => a.value = !1),
53
+ onClick: o[3] || (o[3] = b(() => {
54
54
  }, ["stop"]))
55
55
  }, null, 42, F), [
56
56
  [R, e(i)]
57
57
  ]),
58
- m("span", {
59
- onClick: o[4] || (o[4] = (n) => B("click", r.$props)),
58
+ p("span", {
59
+ onClick: o[4] || (o[4] = (r) => B("click", m.$props)),
60
60
  class: u(e(t).be("button", "inner")),
61
61
  style: w(e(i) === e(s) ? S.value : {}),
62
- onKeydown: o[5] || (o[5] = p(() => {
62
+ onKeydown: o[5] || (o[5] = b(() => {
63
63
  }, ["stop"]))
64
64
  }, [
65
- z(r.$slots, "default", {}, () => [
66
- x(D(r.label), 1)
65
+ x(m.$slots, "default", {}, () => [
66
+ z(D(n.label), 1)
67
67
  ])
68
68
  ], 38)
69
69
  ], 2));
@@ -1,23 +1,23 @@
1
- import { defineComponent as u, ref as g, onMounted as E, computed as B, provide as k, reactive as h, toRefs as C, watch as z, createElementBlock as s, openBlock as n, unref as t, normalizeClass as N, renderSlot as A, Fragment as F, renderList as G, createBlock as L, resolveDynamicComponent as T, nextTick as V } from "vue";
1
+ import { defineComponent as p, ref as E, onMounted as B, computed as k, provide as _, reactive as h, toRefs as C, watch as x, createElementBlock as u, openBlock as i, unref as a, normalizeClass as z, renderSlot as N, Fragment as A, renderList as F, createBlock as G, resolveDynamicComponent as L, nextTick as T } from "vue";
2
2
  import "../form/index.js";
3
- import { UPDATE_MODEL_EVENT as p, CHANGE_EVENT as D } from "../../constants/event.js";
3
+ import { UPDATE_MODEL_EVENT as c, CHANGE_EVENT as V } from "../../constants/event.js";
4
4
  import "@vueuse/core";
5
5
  import "@vft/utils";
6
- import { debugWarn as R } from "../../utils/error.js";
6
+ import { debugWarn as D } from "../../utils/error.js";
7
7
  import "../config-provider/hooks/use-global-config.js";
8
8
  import "lodash-es";
9
- import { useId as S } from "../../hooks/use-id/index.js";
10
- import { useNamespace as $ } from "../../hooks/use-namespace/index.js";
9
+ import { useId as R } from "../../hooks/use-id/index.js";
10
+ import { useNamespace as S } 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
- import { radioGroupKey as M } from "./constants.js";
15
- import q from "./radio.vue2.js";
16
- import w from "./radio-button.vue2.js";
17
- import { useFormItem as x, useFormItemInputId as H } from "../form/hooks/use-form-item.js";
18
- const K = ["id", "aria-label", "aria-labelledby"], O = u({
14
+ import { radioGroupKey as $ } from "./constants.js";
15
+ import M from "./radio.vue2.js";
16
+ import q from "./radio-button.vue2.js";
17
+ import { useFormItem as w, useFormItemInputId as H } from "../form/hooks/use-form-item.js";
18
+ const K = ["id", "aria-label", "aria-labelledby"], O = p({
19
19
  name: "vft-radio-group"
20
- }), me = /* @__PURE__ */ u({
20
+ }), me = /* @__PURE__ */ p({
21
21
  ...O,
22
22
  props: {
23
23
  id: {},
@@ -32,40 +32,40 @@ const K = ["id", "aria-label", "aria-labelledby"], O = u({
32
32
  useButton: { type: Boolean },
33
33
  options: {}
34
34
  },
35
- emits: [p, D],
36
- setup(c, { emit: f }) {
37
- const r = c, i = f, b = $("radio"), v = S(), m = g(), { formItem: a } = x(), { inputId: y, isLabeledByFormItem: d } = H(r, {
38
- formItemContext: a
35
+ emits: [c, V],
36
+ setup(r, { emit: f }) {
37
+ const t = r, m = f, b = S("radio"), v = R(), d = E(), { formItem: l } = w(), { inputId: y, isLabeledByFormItem: s } = H(t, {
38
+ formItemContext: l
39
39
  }), I = (e) => {
40
- i(p, e), V(() => i("change", e));
40
+ m(c, e), T(() => m("change", e));
41
41
  };
42
- E(() => {
43
- const e = m.value.querySelectorAll("[type=radio]"), l = e[0];
44
- !Array.from(e).some((o) => o.checked) && l && (l.tabIndex = 0);
42
+ B(() => {
43
+ const e = d.value.querySelectorAll("[type=radio]"), n = e[0];
44
+ !Array.from(e).some((o) => o.checked) && n && (n.tabIndex = 0);
45
45
  });
46
- const _ = B(() => r.name || v.value);
47
- return k(
48
- M,
46
+ const g = k(() => t.name || v.value);
47
+ return _(
48
+ $,
49
49
  h({
50
- ...C(r),
50
+ ...C(t),
51
51
  changeEvent: I,
52
- name: _
52
+ name: g
53
53
  })
54
- ), z(
55
- () => r.modelValue,
54
+ ), x(
55
+ () => t.modelValue,
56
56
  () => {
57
- r.validateEvent && a?.validate("change").catch((e) => R(e));
57
+ t.validateEvent && l?.validate("change").catch((e) => D(e));
58
58
  }
59
- ), (e, l) => (n(), s("div", {
60
- id: t(y),
59
+ ), (e, n) => (i(), u("div", {
60
+ id: a(y),
61
61
  ref_key: "radioGroupRef",
62
- ref: m,
63
- class: N(t(b).b("group")),
62
+ ref: d,
63
+ class: z(a(b).b("group")),
64
64
  role: "radiogroup",
65
- "aria-label": t(d) ? void 0 : e.label || "radio-group",
66
- "aria-labelledby": t(d) ? t(a)?.labelId : void 0
65
+ "aria-label": a(s) ? void 0 : r.label || "radio-group",
66
+ "aria-labelledby": a(s) ? a(l)?.labelId : void 0
67
67
  }, [
68
- e.options ? (n(!0), s(F, { key: 0 }, G(e.options, (o) => (n(), L(T(e.useButton ? w : q), {
68
+ r.options ? (i(!0), u(A, { key: 0 }, F(r.options, (o) => (i(), G(L(r.useButton ? q : M), {
69
69
  size: o.size,
70
70
  disabled: o.disabled,
71
71
  label: o.label,
@@ -73,7 +73,7 @@ const K = ["id", "aria-label", "aria-labelledby"], O = u({
73
73
  name: o.name,
74
74
  border: o.border,
75
75
  key: o.value
76
- }, null, 8, ["size", "disabled", "label", "value", "name", "border"]))), 128)) : A(e.$slots, "default", { key: 1 })
76
+ }, null, 8, ["size", "disabled", "label", "value", "name", "border"]))), 128)) : N(e.$slots, "default", { key: 1 })
77
77
  ], 10, K));
78
78
  }
79
79
  });