ep-craft 0.1.32 → 0.1.34

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 (205) hide show
  1. package/dist/components/button/index.d.ts +12 -0
  2. package/dist/components/button-group/index.d.ts +3 -2
  3. package/dist/components/button-group/index.js +7 -3
  4. package/dist/components/button-group/src/button-group.d.ts +48 -0
  5. package/dist/components/button-group/src/button-group.js +7 -0
  6. package/dist/components/button-group/src/button-group.vue.d.ts +16 -0
  7. package/dist/components/button-group/src/button-group.vue.js +42 -0
  8. package/dist/components/button-group/src/button-group2.vue.js +4 -0
  9. package/dist/components/checkbox/index.js +6 -5
  10. package/dist/components/collection/index.d.ts +8 -0
  11. package/dist/components/collection/src/collection-item.vue.d.ts +2 -0
  12. package/dist/components/collection/src/collection-item.vue.js +10 -0
  13. package/dist/components/collection/src/collection-item2.vue.js +8 -0
  14. package/dist/components/collection/src/collection.d.ts +39 -0
  15. package/dist/components/collection/src/collection.js +52 -0
  16. package/dist/components/collection/src/collection.vue.d.ts +2 -0
  17. package/dist/components/collection/src/collection.vue.js +10 -0
  18. package/dist/components/collection/src/collection2.vue.js +7 -0
  19. package/dist/components/collection/src/tokens.d.ts +18 -0
  20. package/dist/components/divider/index.d.ts +24 -2
  21. package/dist/components/divider/index.js +8 -3
  22. package/dist/components/divider/src/divider.d.ts +30 -0
  23. package/dist/components/divider/src/divider.js +34 -0
  24. package/dist/components/divider/src/divider.vue.d.ts +24 -0
  25. package/dist/components/divider/src/divider.vue.js +39 -0
  26. package/dist/components/divider/src/divider2.vue.js +4 -0
  27. package/dist/components/dropdown/index.d.ts +3017 -3
  28. package/dist/components/dropdown/index.js +23 -3
  29. package/dist/components/dropdown/src/dropdown-item-impl.vue.d.ts +79 -0
  30. package/dist/components/dropdown/src/dropdown-item-impl.vue.js +40 -0
  31. package/dist/components/dropdown/src/dropdown-item-impl2.vue.js +68 -0
  32. package/dist/components/dropdown/src/dropdown-item.vue.d.ts +169 -0
  33. package/dist/components/dropdown/src/dropdown-item.vue.js +35 -0
  34. package/dist/components/dropdown/src/dropdown-item2.vue.js +63 -0
  35. package/dist/components/dropdown/src/dropdown-menu.vue.d.ts +27 -0
  36. package/dist/components/dropdown/src/dropdown-menu.vue.js +24 -0
  37. package/dist/components/dropdown/src/dropdown-menu2.vue.js +75 -0
  38. package/dist/components/dropdown/src/dropdown.d.ts +200 -0
  39. package/dist/components/dropdown/src/dropdown.js +201 -0
  40. package/dist/components/dropdown/src/dropdown.vue.d.ts +1126 -0
  41. package/dist/components/dropdown/src/dropdown.vue.js +127 -0
  42. package/dist/components/dropdown/src/dropdown2.vue.js +127 -0
  43. package/dist/components/dropdown/src/instance.d.ts +2 -0
  44. package/dist/components/dropdown/src/tokens.d.ts +13 -0
  45. package/dist/components/dropdown/src/tokens.js +5 -0
  46. package/dist/components/dropdown/src/useDropdown.d.ts +5 -0
  47. package/dist/components/dropdown/src/useDropdown.js +15 -0
  48. package/dist/components/dropdown-item/index.d.ts +1 -4
  49. package/dist/components/dropdown-menu/index.d.ts +1 -4
  50. package/dist/components/index.js +129 -131
  51. package/dist/components/popover/index.d.ts +121 -3
  52. package/dist/components/popover/index.js +19 -4
  53. package/dist/components/popover/src/directive.d.ts +4 -0
  54. package/dist/components/popover/src/directive.js +15 -0
  55. package/dist/components/popover/src/popover.d.ts +291 -0
  56. package/dist/components/popover/src/popover.js +168 -0
  57. package/dist/components/popover/src/popover.vue.d.ts +53 -0
  58. package/dist/components/popover/src/popover.vue.js +125 -0
  59. package/dist/components/popover/src/popover2.vue.js +4 -0
  60. package/dist/components/progress/index.d.ts +35 -2
  61. package/dist/components/progress/index.js +10 -4
  62. package/dist/components/progress/src/progress.d.ts +97 -0
  63. package/dist/components/progress/src/progress.js +104 -0
  64. package/dist/components/progress/src/progress.vue.d.ts +30 -0
  65. package/dist/components/progress/src/progress.vue.js +179 -0
  66. package/dist/components/progress/src/progress2.vue.js +4 -0
  67. package/dist/components/roving-focus-group/index.d.ts +14 -0
  68. package/dist/components/roving-focus-group/index.js +15 -0
  69. package/dist/components/roving-focus-group/src/roving-focus-group-impl.vue.d.ts +50 -0
  70. package/dist/components/roving-focus-group/src/roving-focus-group-impl.vue.js +10 -0
  71. package/dist/components/roving-focus-group/src/roving-focus-group-impl2.vue.js +115 -0
  72. package/dist/components/roving-focus-group/src/roving-focus-group.d.ts +56 -0
  73. package/dist/components/roving-focus-group/src/roving-focus-group.js +43 -0
  74. package/dist/components/roving-focus-group/src/roving-focus-group.vue.d.ts +67 -0
  75. package/dist/components/roving-focus-group/src/roving-focus-group.vue.js +13 -0
  76. package/dist/components/roving-focus-group/src/roving-focus-group2.vue.js +21 -0
  77. package/dist/components/roving-focus-group/src/roving-focus-item.vue.d.ts +43 -0
  78. package/dist/components/roving-focus-group/src/roving-focus-item.vue.js +20 -0
  79. package/dist/components/roving-focus-group/src/roving-focus-item2.vue.js +78 -0
  80. package/dist/components/roving-focus-group/src/tokens.d.ts +28 -0
  81. package/dist/components/roving-focus-group/src/tokens.js +5 -0
  82. package/dist/components/roving-focus-group/src/utils.d.ts +8 -0
  83. package/dist/components/roving-focus-group/src/utils.js +28 -0
  84. package/dist/components/table/index.d.ts +56 -3
  85. package/dist/components/table/index.js +20 -4
  86. package/dist/components/table/src/composables/use-scrollbar.d.ts +6 -0
  87. package/dist/components/table/src/composables/use-scrollbar.js +24 -0
  88. package/dist/components/table/src/config.d.ts +87 -0
  89. package/dist/components/table/src/config.js +210 -0
  90. package/dist/components/table/src/filter-panel.vue.d.ts +837 -0
  91. package/dist/components/table/src/filter-panel.vue.js +130 -0
  92. package/dist/components/table/src/filter-panel2.vue.js +155 -0
  93. package/dist/components/table/src/h-helper.d.ts +13 -0
  94. package/dist/components/table/src/h-helper.js +30 -0
  95. package/dist/components/table/src/layout-observer.d.ts +8 -0
  96. package/dist/components/table/src/layout-observer.js +49 -0
  97. package/dist/components/table/src/store/current.d.ts +15 -0
  98. package/dist/components/table/src/store/current.js +45 -0
  99. package/dist/components/table/src/store/expand.d.ts +14 -0
  100. package/dist/components/table/src/store/expand.js +55 -0
  101. package/dist/components/table/src/store/helper.d.ts +548 -0
  102. package/dist/components/table/src/store/helper.js +61 -0
  103. package/dist/components/table/src/store/index.d.ts +1107 -0
  104. package/dist/components/table/src/store/index.js +123 -0
  105. package/dist/components/table/src/store/tree.d.ts +27 -0
  106. package/dist/components/table/src/store/tree.js +153 -0
  107. package/dist/components/table/src/store/watcher.d.ts +88 -0
  108. package/dist/components/table/src/store/watcher.js +483 -0
  109. package/dist/components/table/src/table/defaults.d.ts +560 -0
  110. package/dist/components/table/src/table/defaults.js +236 -0
  111. package/dist/components/table/src/table/key-render-helper.d.ts +2 -0
  112. package/dist/components/table/src/table/key-render-helper.js +18 -0
  113. package/dist/components/table/src/table/style-helper.d.ts +51 -0
  114. package/dist/components/table/src/table/style-helper.js +169 -0
  115. package/dist/components/table/src/table/utils-helper.d.ts +16 -0
  116. package/dist/components/table/src/table/utils-helper.js +36 -0
  117. package/dist/components/table/src/table-body/defaults.d.ts +39 -0
  118. package/dist/components/table/src/table-body/defaults.js +25 -0
  119. package/dist/components/table/src/table-body/events-helper.d.ts +19 -0
  120. package/dist/components/table/src/table-body/events-helper.js +126 -0
  121. package/dist/components/table/src/table-body/index.d.ts +84 -0
  122. package/dist/components/table/src/table-body/index.js +77 -0
  123. package/dist/components/table/src/table-body/render-helper.d.ts +18 -0
  124. package/dist/components/table/src/table-body/render-helper.js +188 -0
  125. package/dist/components/table/src/table-body/styles-helper.d.ts +15 -0
  126. package/dist/components/table/src/table-body/styles-helper.js +98 -0
  127. package/dist/components/table/src/table-body/td-wrapper.vue.d.ts +33 -0
  128. package/dist/components/table/src/table-body/td-wrapper.vue.js +26 -0
  129. package/dist/components/table/src/table-body/td-wrapper2.vue.js +4 -0
  130. package/dist/components/table/src/table-column/defaults.d.ts +348 -0
  131. package/dist/components/table/src/table-column/defaults.js +152 -0
  132. package/dist/components/table/src/table-column/index.d.ts +2 -0
  133. package/dist/components/table/src/table-column/index.vue.d.ts +32 -0
  134. package/dist/components/table/src/table-column/index.vue.js +161 -0
  135. package/dist/components/table/src/table-column/index2.vue.js +4 -0
  136. package/dist/components/table/src/table-column/render-helper.d.ts +17 -0
  137. package/dist/components/table/src/table-column/render-helper.js +116 -0
  138. package/dist/components/table/src/table-column/watcher-helper.d.ts +8 -0
  139. package/dist/components/table/src/table-column/watcher-helper.js +85 -0
  140. package/dist/components/table/src/table-footer/index.d.ts +79 -0
  141. package/dist/components/table/src/table-footer/index.js +110 -0
  142. package/dist/components/table/src/table-footer/mapState-helper.d.ts +9 -0
  143. package/dist/components/table/src/table-footer/mapState-helper.js +16 -0
  144. package/dist/components/table/src/table-footer/style-helper.d.ts +9 -0
  145. package/dist/components/table/src/table-footer/style-helper.js +42 -0
  146. package/dist/components/table/src/table-header/event-helper.d.ts +14 -0
  147. package/dist/components/table/src/table-header/event-helper.js +113 -0
  148. package/dist/components/table/src/table-header/index.d.ts +361 -0
  149. package/dist/components/table/src/table-header/index.js +255 -0
  150. package/dist/components/table/src/table-header/style.helper.d.ts +10 -0
  151. package/dist/components/table/src/table-header/style.helper.js +73 -0
  152. package/dist/components/table/src/table-header/utils-helper.d.ts +10 -0
  153. package/dist/components/table/src/table-header/utils-helper.js +45 -0
  154. package/dist/components/table/src/table-layout.d.ts +37 -0
  155. package/dist/components/table/src/table-layout.js +144 -0
  156. package/dist/components/table/src/table.vue.d.ts +734 -0
  157. package/dist/components/table/src/table.vue.js +443 -0
  158. package/dist/components/table/src/table2.vue.js +4 -0
  159. package/dist/components/table/src/tableColumn.d.ts +2 -0
  160. package/dist/components/table/src/tokens.d.ts +3 -0
  161. package/dist/components/table/src/tokens.js +4 -0
  162. package/dist/components/table/src/util.d.ts +55 -0
  163. package/dist/components/table/src/util.js +310 -0
  164. package/dist/components/table-column/index.d.ts +40 -3
  165. package/dist/components/table-column/index.js +6 -3
  166. package/dist/components/upload/index.d.ts +45 -2
  167. package/dist/components/upload/index.js +23 -4
  168. package/dist/components/upload/src/ajax.d.ts +9 -0
  169. package/dist/components/upload/src/ajax.js +58 -0
  170. package/dist/components/upload/src/constants.d.ts +5 -0
  171. package/dist/components/upload/src/constants.js +4 -0
  172. package/dist/components/upload/src/upload-content.d.ts +136 -0
  173. package/dist/components/upload/src/upload-content.js +53 -0
  174. package/dist/components/upload/src/upload-content.vue.d.ts +38 -0
  175. package/dist/components/upload/src/upload-content.vue.js +186 -0
  176. package/dist/components/upload/src/upload-content2.vue.js +4 -0
  177. package/dist/components/upload/src/upload-dragger.d.ts +22 -0
  178. package/dist/components/upload/src/upload-dragger.js +19 -0
  179. package/dist/components/upload/src/upload-dragger.vue.d.ts +19 -0
  180. package/dist/components/upload/src/upload-dragger.vue.js +91 -0
  181. package/dist/components/upload/src/upload-dragger2.vue.js +4 -0
  182. package/dist/components/upload/src/upload-list.d.ts +45 -0
  183. package/dist/components/upload/src/upload-list.js +39 -0
  184. package/dist/components/upload/src/upload-list.vue.d.ts +28 -0
  185. package/dist/components/upload/src/upload-list.vue.js +182 -0
  186. package/dist/components/upload/src/upload-list2.vue.js +4 -0
  187. package/dist/components/upload/src/upload.d.ts +361 -0
  188. package/dist/components/upload/src/upload.js +216 -0
  189. package/dist/components/upload/src/upload.vue.d.ts +64 -0
  190. package/dist/components/upload/src/upload.vue.js +150 -0
  191. package/dist/components/upload/src/upload2.vue.js +4 -0
  192. package/dist/components/upload/src/use-handlers.d.ts +60 -0
  193. package/dist/components/upload/src/use-handlers.js +111 -0
  194. package/dist/directives/mousewheel/index.js +28 -0
  195. package/dist/ep-craft.js +277 -236
  196. package/dist/index.d.ts +67 -0
  197. package/dist/utils/dom/event.js +12 -11
  198. package/dist/utils/objects.js +10 -9
  199. package/dist/utils/vue/install.js +21 -18
  200. package/dist/utils/vue/refs.js +8 -0
  201. package/dist/vendored-components.d.ts +1 -1
  202. package/dist/vendored-components.js +44 -4
  203. package/package.json +1 -1
  204. package/dist/components/dropdown-item/index.js +0 -6
  205. package/dist/components/dropdown-menu/index.js +0 -6
@@ -0,0 +1,53 @@
1
+ import type { PopoverProps } from './popover';
2
+ declare var __VLS_15: {}, __VLS_17: {
3
+ hide: () => void;
4
+ };
5
+ type __VLS_Slots = {} & {
6
+ reference?: (props: typeof __VLS_15) => any;
7
+ } & {
8
+ default?: (props: typeof __VLS_17) => any;
9
+ };
10
+ declare const __VLS_component: import("vue").DefineComponent<PopoverProps, {
11
+ /** @description popper ref */
12
+ popperRef: import("vue").ComputedRef<import("../../popper").PopperInstance | undefined>;
13
+ /** @description hide popover */
14
+ hide: () => void;
15
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
+ "after-leave": () => void;
17
+ "before-enter": () => void;
18
+ "after-enter": () => void;
19
+ "before-leave": () => void;
20
+ "update:visible": (value: boolean) => void;
21
+ }, string, import("vue").PublicProps, Readonly<PopoverProps> & Readonly<{
22
+ "onAfter-leave"?: (() => any) | undefined;
23
+ "onBefore-enter"?: (() => any) | undefined;
24
+ "onAfter-enter"?: (() => any) | undefined;
25
+ "onBefore-leave"?: (() => any) | undefined;
26
+ "onUpdate:visible"?: ((value: boolean) => any) | undefined;
27
+ }>, {
28
+ content: string;
29
+ visible: boolean | null;
30
+ width: string | number;
31
+ offset: number;
32
+ tabindex: string | number;
33
+ teleported: boolean;
34
+ placement: import("element-plus").Placement;
35
+ effect: import("../../popper").PopperEffect;
36
+ showAfter: number;
37
+ hideAfter: number;
38
+ autoClose: number;
39
+ trigger: import("@element-plus/utils").Arrayable<import("@element-plus/components/tooltip").TooltipTriggerType>;
40
+ popperOptions: Partial<import("element-plus").Options>;
41
+ enterable: boolean;
42
+ popperStyle: string | false | import("vue").CSSProperties | import("vue").StyleValue[] | null;
43
+ triggerKeys: string[];
44
+ persistent: boolean;
45
+ showArrow: boolean;
46
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
47
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
48
+ export default _default;
49
+ type __VLS_WithSlots<T, S> = T & {
50
+ new (): {
51
+ $slots: S;
52
+ };
53
+ };
@@ -0,0 +1,125 @@
1
+ import { defineComponent as E, computed as n, ref as S, unref as l, openBlock as p, createBlock as U, mergeProps as x, withCtx as f, renderSlot as c, createCommentVNode as d, createElementBlock as R, normalizeClass as $, toDisplayString as m, createTextVNode as T, mergeDefaults as D } from "vue";
2
+ import { ElTooltip as K } from "../../tooltip/index.js";
3
+ import "@vue/shared";
4
+ import "lodash-unified";
5
+ import "@vueuse/core";
6
+ import { addUnit as N } from "../../../utils/dom/style.js";
7
+ import "@element-plus/icons-vue";
8
+ import { useNamespace as O } from "../../../hooks/use-namespace/index.js";
9
+ import "../../../hooks/use-size/index.js";
10
+ import "@popperjs/core";
11
+ import "../../../hooks/use-z-index/index.js";
12
+ import "../../../hooks/use-delayed-toggle/index.js";
13
+ import "../../../hooks/use-aria/index.js";
14
+ import "../../../hooks/use-model-toggle/index.js";
15
+ import "../../../hooks/use-empty-values/index.js";
16
+ import { popoverEmits as P, popoverPropsDefaults as V } from "./popover.js";
17
+ const H = "onUpdate:visible", oe = /* @__PURE__ */ E({
18
+ name: "EpPopover",
19
+ __name: "popover",
20
+ props: /* @__PURE__ */ D({
21
+ trigger: {},
22
+ triggerKeys: {},
23
+ placement: {},
24
+ disabled: { type: Boolean },
25
+ visible: { type: [Boolean, null] },
26
+ transition: {},
27
+ popperOptions: {},
28
+ tabindex: {},
29
+ content: {},
30
+ popperStyle: { type: [Boolean, null, String, Object, Array] },
31
+ popperClass: {},
32
+ enterable: { type: Boolean },
33
+ effect: {},
34
+ teleported: { type: Boolean },
35
+ appendTo: {},
36
+ title: {},
37
+ width: {},
38
+ offset: {},
39
+ showAfter: {},
40
+ hideAfter: {},
41
+ autoClose: {},
42
+ showArrow: { type: Boolean },
43
+ persistent: { type: Boolean },
44
+ "onUpdate:visible": { type: Function }
45
+ }, V),
46
+ emits: P,
47
+ setup(e, { expose: u, emit: b }) {
48
+ const o = e, r = b, v = n(() => o[H]), i = O("popover"), a = S(), g = n(() => {
49
+ var t;
50
+ return (t = l(a)) == null ? void 0 : t.popperRef;
51
+ }), y = n(() => [
52
+ {
53
+ width: N(o.width)
54
+ },
55
+ o.popperStyle
56
+ ]), h = n(() => [i.b(), o.popperClass, { [i.m("plain")]: !!o.content }]), w = n(() => o.transition === `${i.namespace.value}-fade-in-linear`), s = () => {
57
+ var t;
58
+ (t = a.value) == null || t.hide();
59
+ }, B = () => {
60
+ r("before-enter");
61
+ }, k = () => {
62
+ r("before-leave");
63
+ }, A = () => {
64
+ r("after-enter");
65
+ }, C = () => {
66
+ r("update:visible", !1), r("after-leave");
67
+ };
68
+ return u({
69
+ /** @description popper ref */
70
+ popperRef: g,
71
+ /** @description hide popover */
72
+ hide: s
73
+ }), (t, L) => (p(), U(l(K), x({
74
+ ref_key: "tooltipRef",
75
+ ref: a
76
+ }, t.$attrs, {
77
+ trigger: e.trigger,
78
+ "trigger-keys": e.triggerKeys,
79
+ placement: e.placement,
80
+ disabled: e.disabled,
81
+ visible: e.visible,
82
+ transition: e.transition,
83
+ "popper-options": e.popperOptions,
84
+ tabindex: e.tabindex,
85
+ content: e.content,
86
+ offset: e.offset,
87
+ "show-after": e.showAfter,
88
+ "hide-after": e.hideAfter,
89
+ "auto-close": e.autoClose,
90
+ "show-arrow": e.showArrow,
91
+ "aria-label": e.title,
92
+ effect: e.effect,
93
+ enterable: e.enterable,
94
+ "popper-class": h.value,
95
+ "popper-style": y.value,
96
+ teleported: e.teleported,
97
+ "append-to": e.appendTo,
98
+ persistent: e.persistent,
99
+ "gpu-acceleration": w.value,
100
+ "onUpdate:visible": v.value,
101
+ onBeforeShow: B,
102
+ onBeforeHide: k,
103
+ onShow: A,
104
+ onHide: C
105
+ }), {
106
+ content: f(() => [
107
+ e.title ? (p(), R("div", {
108
+ key: 0,
109
+ class: $(l(i).e("title")),
110
+ role: "title"
111
+ }, m(e.title), 3)) : d("", !0),
112
+ c(t.$slots, "default", { hide: s }, () => [
113
+ T(m(e.content), 1)
114
+ ])
115
+ ]),
116
+ default: f(() => [
117
+ t.$slots.reference ? c(t.$slots, "reference", {}, void 0, void 0, 0) : d("", !0)
118
+ ]),
119
+ _: 3
120
+ }, 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"]));
121
+ }
122
+ });
123
+ export {
124
+ oe as default
125
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./popover.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -1,4 +1,37 @@
1
1
  import type { Plugin } from 'vue';
2
- import { ElProgress } from 'element-plus';
3
- export declare const EpProgress: typeof ElProgress & Plugin;
2
+ import _EpProgress from './src/progress.vue';
3
+ /**
4
+ * progress 自持 barrel:用**本地**安装辅助把 SFC 本体注册为 `ep-progress`
5
+ * ——对外注册名与迁移前的包装态**逐字相同**(需求 9.2)。
6
+ *
7
+ * 形态对齐 `src/components/table/index.ts`(上游形态对齐的自持 barrel)。与迁移前的
8
+ * `Object.assign({}, ElProgress, { name: 'EpProgress' })` 包装态的关键差异:本体不再来自
9
+ * `element-plus`,故本入口模块**零 element-plus 引用**(需求 1.3)。
10
+ *
11
+ * **progress 纳入 `vendor-upload` 的唯一原因是传递依赖**(requirements.md Introduction):
12
+ * `upload/src/upload-list.vue` 以**默认导入**消费本组件
13
+ * (`import ElProgress from '@element-plus/components/progress'`,用于渲染上传进度)。
14
+ * 薄包装的兄弟组件一旦被导入即产生对 element-plus 的传递依赖 —— 与
15
+ * `autocomplete → scrollbar` 同型。故 **`export default` 是本 barrel 的硬契约**,
16
+ * 缺失即让 `upload-list.vue` 断链(需求 1.5)。
17
+ *
18
+ * **必须用 `../../utils/with-install`(本地版),不得误用 `../../utils/vue/install`(上游版)**:
19
+ * 二者同名而签名不同——本地版 `withInstall(component, name: string)` 按**显式注册名**注册;
20
+ * 上游版 `withInstall(main, extra?)` 按 `comp.name` 注册,并把 `extra` 交给 `Object.values()`
21
+ * 展开。若误用上游版,第二参字符串会被**逐字符展开**,`ep-progress` **静默注册失败**。
22
+ *
23
+ * **`name` 保持上游 `'ElProgress'`**(design.md 决策 3,与 `EpAutocomplete` / `EpScrollbar`
24
+ * 同类的**有意偏离**):`withInstall` 只写 `.install`、**从不写** `.name`,故组件名
25
+ * (`ElProgress`)与注册名(`ep-progress`,由第二参独立设定)互不干涉。
26
+ *
27
+ * **不导出 `ElProgress` 别名**(需求 9.6,design.md 决策 5):`upload-list.vue` 消费的是
28
+ * **默认导出**,不经具名别名;本体已自持后,别名只会与 `EpProgress` 争抢同一个 `.install`。
29
+ *
30
+ * **不使用 `export *`**:公开面按契约显式列出(与 `table` / `checkbox` / `backtop` 一致)。
31
+ * 上游 barrel 的 `export * from './src/progress'` 展开后共 6 个成员(1 值 + 5 类型),
32
+ * 此处逐一列出。
33
+ */
34
+ export declare const EpProgress: typeof _EpProgress & Plugin;
4
35
  export default EpProgress;
36
+ export { progressProps } from './src/progress';
37
+ export type { ProgressColor, ProgressFn, ProgressInstance, ProgressProps, ProgressPropsPublic, } from './src/progress';
@@ -1,6 +1,12 @@
1
- import { ElProgress as r } from "element-plus";
2
- import { withInstall as s } from "../../utils/with-install.js";
3
- const o = Object.assign({}, r, { name: "EpProgress" }), t = s(o, "ep-progress");
1
+ import { withInstall as r } from "../../utils/with-install.js";
2
+ import o from "./src/progress.vue.js";
3
+ import { progressProps as f } from "./src/progress.js";
4
+ const t = r(
5
+ o,
6
+ "ep-progress"
7
+ );
4
8
  export {
5
- t as EpProgress
9
+ t as EpProgress,
10
+ t as default,
11
+ f as progressProps
6
12
  };
@@ -0,0 +1,97 @@
1
+ import type { ExtractPublicPropTypes, SVGAttributes } from 'vue';
2
+ import type Progress from './progress.vue';
3
+ export type ProgressColor = {
4
+ color: string;
5
+ percentage: number;
6
+ };
7
+ export type ProgressFn = (percentage: number) => string;
8
+ export interface ProgressProps {
9
+ /**
10
+ * @description type of progress bar
11
+ */
12
+ type?: 'line' | 'circle' | 'dashboard';
13
+ /**
14
+ * @description percentage, required
15
+ */
16
+ percentage?: number;
17
+ /**
18
+ * @description the current status of progress bar
19
+ */
20
+ status?: '' | 'success' | 'exception' | 'warning';
21
+ /**
22
+ * @description set indeterminate progress
23
+ */
24
+ indeterminate?: boolean;
25
+ /**
26
+ * @description control the animation duration of indeterminate progress or striped flow progress
27
+ */
28
+ duration?: number;
29
+ /**
30
+ * @description the width of progress bar
31
+ */
32
+ strokeWidth?: number;
33
+ /**
34
+ * @description butt/circle/dashboard type shape at the end path
35
+ */
36
+ strokeLinecap?: NonNullable<SVGAttributes['stroke-linecap']>;
37
+ /**
38
+ * @description whether to place the percentage inside progress bar, only works when `type` is 'line'
39
+ */
40
+ textInside?: boolean;
41
+ /**
42
+ * @description the canvas width of circle progress bar
43
+ */
44
+ width?: number;
45
+ /**
46
+ * @description whether to show percentage
47
+ */
48
+ showText?: boolean;
49
+ /**
50
+ * @description background color of progress bar. Overrides `status` prop
51
+ */
52
+ color?: string | ProgressColor[] | ProgressFn;
53
+ /**
54
+ * @description stripe over the progress bar's color
55
+ */
56
+ striped?: boolean;
57
+ /**
58
+ * @description get the stripes to flow
59
+ */
60
+ stripedFlow?: boolean;
61
+ /**
62
+ * @description custom text format
63
+ */
64
+ format?: ProgressFn;
65
+ }
66
+ /**
67
+ * @deprecated Removed after 3.0.0, Use `ProgressProps` instead.
68
+ */
69
+ export declare const progressProps: {
70
+ readonly type: import("@element-plus/utils").EpPropFinalized<StringConstructor, "circle" | "line" | "dashboard", unknown, "line", boolean>;
71
+ readonly percentage: import("@element-plus/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
72
+ readonly status: import("@element-plus/utils").EpPropFinalized<StringConstructor, "" | "success" | "warning" | "exception", unknown, "", boolean>;
73
+ readonly indeterminate: BooleanConstructor;
74
+ readonly duration: import("@element-plus/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 3, boolean>;
75
+ readonly strokeWidth: import("@element-plus/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 6, boolean>;
76
+ readonly strokeLinecap: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => "inherit" | "round" | "butt" | "square") | (() => NonNullable<"inherit" | "round" | "butt" | "square" | undefined>) | (((new (...args: any[]) => "inherit" | "round" | "butt" | "square") | (() => NonNullable<"inherit" | "round" | "butt" | "square" | undefined>)) | null)[], unknown, unknown, "round", boolean>;
77
+ readonly textInside: BooleanConstructor;
78
+ readonly width: import("@element-plus/utils").EpPropFinalized<NumberConstructor, unknown, unknown, 126, boolean>;
79
+ readonly showText: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
80
+ readonly color: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => string | ProgressFn | ProgressColor[]) | (() => string | ProgressFn | ProgressColor[]) | (((new (...args: any[]) => string | ProgressFn | ProgressColor[]) | (() => string | ProgressFn | ProgressColor[])) | null)[], unknown, unknown, "", boolean>;
81
+ readonly striped: BooleanConstructor;
82
+ readonly stripedFlow: BooleanConstructor;
83
+ readonly format: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => ProgressFn) | (() => ProgressFn) | {
84
+ (): ProgressFn;
85
+ new (): any;
86
+ readonly prototype: any;
87
+ } | (((new (...args: any[]) => ProgressFn) | (() => ProgressFn) | {
88
+ (): ProgressFn;
89
+ new (): any;
90
+ readonly prototype: any;
91
+ }) | null)[], unknown, unknown, (percentage: number) => string, boolean>;
92
+ };
93
+ /**
94
+ * @deprecated Removed after 3.0.0, Use `ProgressProps` instead.
95
+ */
96
+ export type ProgressPropsPublic = ExtractPublicPropTypes<typeof progressProps>;
97
+ export type ProgressInstance = InstanceType<typeof Progress> & unknown;
@@ -0,0 +1,104 @@
1
+ import "@vue/shared";
2
+ import "lodash-unified";
3
+ import "@vueuse/core";
4
+ import "@element-plus/icons-vue";
5
+ import { buildProps as r, definePropType as t } from "../../../utils/vue/props/runtime.js";
6
+ import "vue";
7
+ const d = r({
8
+ /**
9
+ * @description type of progress bar
10
+ */
11
+ type: {
12
+ type: String,
13
+ default: "line",
14
+ values: ["line", "circle", "dashboard"]
15
+ },
16
+ /**
17
+ * @description percentage, required
18
+ */
19
+ percentage: {
20
+ type: Number,
21
+ default: 0,
22
+ validator: (e) => e >= 0 && e <= 100
23
+ },
24
+ /**
25
+ * @description the current status of progress bar
26
+ */
27
+ status: {
28
+ type: String,
29
+ default: "",
30
+ values: ["", "success", "exception", "warning"]
31
+ },
32
+ /**
33
+ * @description set indeterminate progress
34
+ */
35
+ indeterminate: Boolean,
36
+ /**
37
+ * @description control the animation duration of indeterminate progress or striped flow progress
38
+ */
39
+ duration: {
40
+ type: Number,
41
+ default: 3
42
+ },
43
+ /**
44
+ * @description the width of progress bar
45
+ */
46
+ strokeWidth: {
47
+ type: Number,
48
+ default: 6
49
+ },
50
+ /**
51
+ * @description butt/circle/dashboard type shape at the end path
52
+ */
53
+ strokeLinecap: {
54
+ type: t(String),
55
+ default: "round"
56
+ },
57
+ /**
58
+ * @description whether to place the percentage inside progress bar, only works when `type` is 'line'
59
+ */
60
+ textInside: Boolean,
61
+ /**
62
+ * @description the canvas width of circle progress bar
63
+ */
64
+ width: {
65
+ type: Number,
66
+ default: 126
67
+ },
68
+ /**
69
+ * @description whether to show percentage
70
+ */
71
+ showText: {
72
+ type: Boolean,
73
+ default: !0
74
+ },
75
+ /**
76
+ * @description background color of progress bar. Overrides `status` prop
77
+ */
78
+ color: {
79
+ type: t([
80
+ String,
81
+ Array,
82
+ Function
83
+ ]),
84
+ default: ""
85
+ },
86
+ /**
87
+ * @description stripe over the progress bar's color
88
+ */
89
+ striped: Boolean,
90
+ /**
91
+ * @description get the stripes to flow
92
+ */
93
+ stripedFlow: Boolean,
94
+ /**
95
+ * @description custom text format
96
+ */
97
+ format: {
98
+ type: t(Function),
99
+ default: (e) => `${e}%`
100
+ }
101
+ });
102
+ export {
103
+ d as progressProps
104
+ };
@@ -0,0 +1,30 @@
1
+ import type { ProgressColor, ProgressProps } from './progress';
2
+ declare var __VLS_1: {
3
+ percentage: number;
4
+ }, __VLS_3: {
5
+ percentage: number;
6
+ };
7
+ type __VLS_Slots = {} & {
8
+ default?: (props: typeof __VLS_1) => any;
9
+ } & {
10
+ default?: (props: typeof __VLS_3) => any;
11
+ };
12
+ declare const __VLS_component: import("vue").DefineComponent<ProgressProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ProgressProps> & Readonly<{}>, {
13
+ color: string | ProgressColor[] | import("./progress").ProgressFn;
14
+ strokeLinecap: NonNullable<import("vue").SVGAttributes["stroke-linecap"]>;
15
+ strokeWidth: number;
16
+ width: number;
17
+ type: "line" | "circle" | "dashboard";
18
+ format: import("./progress").ProgressFn;
19
+ duration: number;
20
+ percentage: number;
21
+ status: "" | "success" | "exception" | "warning";
22
+ showText: boolean;
23
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
24
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
25
+ export default _default;
26
+ type __VLS_WithSlots<T, S> = T & {
27
+ new (): {
28
+ $slots: S;
29
+ };
30
+ };
@@ -0,0 +1,179 @@
1
+ import { defineComponent as L, computed as n, openBlock as i, createElementBlock as u, normalizeClass as c, unref as a, createElementVNode as m, normalizeStyle as f, renderSlot as C, toDisplayString as S, createCommentVNode as B, createBlock as D, withCtx as A, resolveDynamicComponent as M } from "vue";
2
+ import { ElIcon as V } from "../../icon/index.js";
3
+ import { WarningFilled as O, CircleCheck as R, CircleClose as U, Check as j, Close as q } from "@element-plus/icons-vue";
4
+ import { useNamespace as G } from "../../../hooks/use-namespace/index.js";
5
+ import { isFunction as H, isString as F } from "@vue/shared";
6
+ import "lodash-unified";
7
+ import "@vueuse/core";
8
+ import "../../../hooks/use-size/index.js";
9
+ import "@popperjs/core";
10
+ import "../../../hooks/use-z-index/index.js";
11
+ import "../../../hooks/use-delayed-toggle/index.js";
12
+ import "../../../hooks/use-aria/index.js";
13
+ import "../../../hooks/use-model-toggle/index.js";
14
+ import "../../../hooks/use-empty-values/index.js";
15
+ const J = ["aria-valuenow"], K = { viewBox: "0 0 100 100" }, Q = ["d", "stroke", "stroke-linecap", "stroke-width"], X = ["d", "stroke", "opacity", "stroke-linecap", "stroke-width"], Y = { key: 0 }, fe = /* @__PURE__ */ L({
16
+ name: "ElProgress",
17
+ __name: "progress",
18
+ props: {
19
+ type: { default: "line" },
20
+ percentage: { default: 0 },
21
+ status: { default: "" },
22
+ indeterminate: { type: Boolean },
23
+ duration: { default: 3 },
24
+ strokeWidth: { default: 6 },
25
+ strokeLinecap: { default: "round" },
26
+ textInside: { type: Boolean },
27
+ width: { default: 126 },
28
+ showText: { type: Boolean, default: !0 },
29
+ color: { type: [String, Array, Function], default: "" },
30
+ striped: { type: Boolean },
31
+ stripedFlow: { type: Boolean },
32
+ format: { type: Function, default: (t) => `${t}%` }
33
+ },
34
+ setup(t) {
35
+ const y = {
36
+ success: "#13ce66",
37
+ exception: "#ff4949",
38
+ warning: "#e6a23c",
39
+ default: "#20a0ff"
40
+ }, r = t, s = G("progress"), I = n(() => {
41
+ const e = {
42
+ width: `${r.percentage}%`,
43
+ animationDuration: `${r.duration}s`
44
+ }, o = x(r.percentage);
45
+ return o.includes("gradient") ? e.background = o : e.backgroundColor = o, e;
46
+ }), p = n(
47
+ () => (r.strokeWidth / r.width * 100).toFixed(1)
48
+ ), g = n(() => ["circle", "dashboard"].includes(r.type) ? Number.parseInt(
49
+ `${50 - Number.parseFloat(p.value) / 2}`,
50
+ 10
51
+ ) : 0), b = n(() => {
52
+ const e = g.value, o = r.type === "dashboard";
53
+ return `
54
+ M 50 50
55
+ m 0 ${o ? "" : "-"}${e}
56
+ a ${e} ${e} 0 1 1 0 ${o ? "-" : ""}${e * 2}
57
+ a ${e} ${e} 0 1 1 0 ${o ? "" : "-"}${e * 2}
58
+ `;
59
+ }), h = n(() => 2 * Math.PI * g.value), k = n(() => r.type === "dashboard" ? 0.75 : 1), $ = n(() => `${-1 * h.value * (1 - k.value) / 2}px`), T = n(() => ({
60
+ strokeDasharray: `${h.value * k.value}px, ${h.value}px`,
61
+ strokeDashoffset: $.value
62
+ })), N = n(() => ({
63
+ strokeDasharray: `${h.value * k.value * (r.percentage / 100)}px, ${h.value}px`,
64
+ strokeDashoffset: $.value,
65
+ transition: "stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"
66
+ })), P = n(() => {
67
+ let e;
68
+ return r.color ? e = x(r.percentage) : e = y[r.status] || y.default, e;
69
+ }), W = n(() => r.status === "warning" ? O : r.type === "line" ? r.status === "success" ? R : U : r.status === "success" ? j : q), z = n(() => r.type === "line" ? 12 + r.strokeWidth * 0.4 : r.width * 0.111111 + 2), w = n(() => r.format(r.percentage));
70
+ function E(e) {
71
+ const o = 100 / e.length;
72
+ return e.map((l, d) => F(l) ? {
73
+ color: l,
74
+ percentage: (d + 1) * o
75
+ } : l).sort((l, d) => l.percentage - d.percentage);
76
+ }
77
+ const x = (e) => {
78
+ var v;
79
+ const { color: o } = r;
80
+ if (H(o))
81
+ return o(e);
82
+ if (F(o))
83
+ return o;
84
+ {
85
+ const l = E(o);
86
+ for (const d of l)
87
+ if (d.percentage > e) return d.color;
88
+ return (v = l[l.length - 1]) == null ? void 0 : v.color;
89
+ }
90
+ };
91
+ return (e, o) => (i(), u("div", {
92
+ class: c([
93
+ a(s).b(),
94
+ a(s).m(t.type),
95
+ a(s).is(t.status),
96
+ {
97
+ [a(s).m("without-text")]: !t.showText,
98
+ [a(s).m("text-inside")]: t.textInside
99
+ }
100
+ ]),
101
+ role: "progressbar",
102
+ "aria-valuenow": t.percentage,
103
+ "aria-valuemin": "0",
104
+ "aria-valuemax": "100"
105
+ }, [
106
+ t.type === "line" ? (i(), u("div", {
107
+ key: 0,
108
+ class: c(a(s).b("bar"))
109
+ }, [
110
+ m("div", {
111
+ class: c(a(s).be("bar", "outer")),
112
+ style: f({ height: `${t.strokeWidth}px` })
113
+ }, [
114
+ m("div", {
115
+ class: c([
116
+ a(s).be("bar", "inner"),
117
+ { [a(s).bem("bar", "inner", "indeterminate")]: t.indeterminate },
118
+ { [a(s).bem("bar", "inner", "striped")]: t.striped },
119
+ { [a(s).bem("bar", "inner", "striped-flow")]: t.stripedFlow }
120
+ ]),
121
+ style: f(I.value)
122
+ }, [
123
+ (t.showText || e.$slots.default) && t.textInside ? (i(), u("div", {
124
+ key: 0,
125
+ class: c(a(s).be("bar", "innerText"))
126
+ }, [
127
+ C(e.$slots, "default", { percentage: t.percentage }, () => [
128
+ m("span", null, S(w.value), 1)
129
+ ])
130
+ ], 2)) : B("", !0)
131
+ ], 6)
132
+ ], 6)
133
+ ], 2)) : (i(), u("div", {
134
+ key: 1,
135
+ class: c(a(s).b("circle")),
136
+ style: f({ height: `${t.width}px`, width: `${t.width}px` })
137
+ }, [
138
+ (i(), u("svg", K, [
139
+ m("path", {
140
+ class: c(a(s).be("circle", "track")),
141
+ d: b.value,
142
+ stroke: `var(${a(s).cssVarName("fill-color-light")}, #e5e9f2)`,
143
+ "stroke-linecap": t.strokeLinecap,
144
+ "stroke-width": p.value,
145
+ fill: "none",
146
+ style: f(T.value)
147
+ }, null, 14, Q),
148
+ m("path", {
149
+ class: c(a(s).be("circle", "path")),
150
+ d: b.value,
151
+ stroke: P.value,
152
+ fill: "none",
153
+ opacity: t.percentage ? 1 : 0,
154
+ "stroke-linecap": t.strokeLinecap,
155
+ "stroke-width": p.value,
156
+ style: f(N.value)
157
+ }, null, 14, X)
158
+ ]))
159
+ ], 6)),
160
+ (t.showText || e.$slots.default) && !t.textInside ? (i(), u("div", {
161
+ key: 2,
162
+ class: c(a(s).e("text")),
163
+ style: f({ fontSize: `${z.value}px` })
164
+ }, [
165
+ C(e.$slots, "default", { percentage: t.percentage }, () => [
166
+ t.status ? (i(), D(a(V), { key: 1 }, {
167
+ default: A(() => [
168
+ (i(), D(M(W.value)))
169
+ ]),
170
+ _: 1
171
+ })) : (i(), u("span", Y, S(w.value), 1))
172
+ ])
173
+ ], 6)) : B("", !0)
174
+ ], 10, J));
175
+ }
176
+ });
177
+ export {
178
+ fe as default
179
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./progress.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,14 @@
1
+ import EpRovingFocusGroup from './src/roving-focus-group.vue';
2
+ import EpRovingFocusItem from './src/roving-focus-item.vue';
3
+ export { EpRovingFocusGroup, EpRovingFocusItem };
4
+ /**
5
+ * 内部兼容别名:仅服务上游形态源码的具名导入与模板解析,不进入根入口公开面。
6
+ *
7
+ * 五个公开组件不得导出 `El*` 别名(需求 8.6);本模块是内部基础模块,
8
+ * 不在此约束内。别名与本体是同一组件对象,不会产生第二份注入上下文。
9
+ */
10
+ export { EpRovingFocusGroup as ElRovingFocusGroup, EpRovingFocusItem as ElRovingFocusItem, };
11
+ export * from './src/tokens';
12
+ export * from './src/utils';
13
+ export { ROVING_FOCUS_COLLECTION_INJECTION_KEY, ROVING_FOCUS_ITEM_COLLECTION_INJECTION_KEY, } from './src/roving-focus-group';
14
+ export default EpRovingFocusGroup;