ep-craft 0.1.31 → 0.1.32

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 (113) hide show
  1. package/dist/components/aside/aside.d.ts +26 -0
  2. package/dist/components/aside/aside.js +29 -0
  3. package/dist/components/aside/index.d.ts +2 -2
  4. package/dist/components/aside/index.js +4 -4
  5. package/dist/components/autocomplete/EpAutocomplete.d.ts +494 -0
  6. package/dist/components/autocomplete/EpAutocomplete.js +465 -0
  7. package/dist/components/autocomplete/autocomplete.d.ts +322 -0
  8. package/dist/components/autocomplete/autocomplete.js +120 -0
  9. package/dist/components/autocomplete/index.d.ts +23 -2
  10. package/dist/components/autocomplete/index.js +9 -3
  11. package/dist/components/autocomplete/instance.d.ts +70 -0
  12. package/dist/components/backtop/EpBacktop.vue.d.ts +55 -0
  13. package/dist/components/backtop/EpBacktop.vue.js +59 -0
  14. package/dist/components/backtop/EpBacktop2.vue.js +4 -0
  15. package/dist/components/backtop/backtop.d.ts +43 -0
  16. package/dist/components/backtop/backtop.js +36 -0
  17. package/dist/components/backtop/index.d.ts +35 -2
  18. package/dist/components/backtop/index.js +6 -3
  19. package/dist/components/backtop/instance.d.ts +10 -0
  20. package/dist/components/backtop/use-backtop.d.ts +13 -0
  21. package/dist/components/backtop/use-backtop.js +23 -0
  22. package/dist/components/checkbox/EpCheckbox.vue.d.ts +147 -0
  23. package/dist/components/checkbox/EpCheckbox.vue.js +101 -0
  24. package/dist/components/checkbox/EpCheckbox2.vue.js +4 -0
  25. package/dist/components/checkbox/index.d.ts +34 -2
  26. package/dist/components/checkbox/index.js +10 -4
  27. package/dist/components/checkbox/instance.d.ts +10 -0
  28. package/dist/components/checkbox/src/checkbox.d.ts +208 -0
  29. package/dist/components/checkbox/src/checkbox.js +119 -0
  30. package/dist/components/checkbox/src/composables/use-checkbox-disabled.d.ts +7 -0
  31. package/dist/components/checkbox/src/composables/use-checkbox-disabled.js +31 -0
  32. package/dist/components/checkbox/src/composables/use-checkbox-event.d.ts +9 -0
  33. package/dist/components/checkbox/src/composables/use-checkbox-event.js +48 -0
  34. package/dist/components/checkbox/src/composables/use-checkbox-model.d.ts +7 -0
  35. package/dist/components/checkbox/src/composables/use-checkbox-model.js +31 -0
  36. package/dist/components/checkbox/src/composables/use-checkbox-status.d.ts +12 -0
  37. package/dist/components/checkbox/src/composables/use-checkbox-status.js +33 -0
  38. package/dist/components/checkbox/src/composables/use-checkbox.d.ts +16 -0
  39. package/dist/components/checkbox/src/composables/use-checkbox.js +81 -0
  40. package/dist/components/checkbox/src/constants.d.ts +8 -0
  41. package/dist/components/checkbox/src/constants.js +4 -0
  42. package/dist/components/checkbox-button/EpCheckboxButton.vue.d.ts +147 -0
  43. package/dist/components/checkbox-button/EpCheckboxButton.vue.js +84 -0
  44. package/dist/components/checkbox-button/EpCheckboxButton2.vue.js +4 -0
  45. package/dist/components/checkbox-button/index.d.ts +24 -2
  46. package/dist/components/checkbox-button/index.js +6 -3
  47. package/dist/components/checkbox-button/instance.d.ts +10 -0
  48. package/dist/components/checkbox-group/EpCheckboxGroup.vue.d.ts +74 -0
  49. package/dist/components/checkbox-group/EpCheckboxGroup.vue.js +92 -0
  50. package/dist/components/checkbox-group/EpCheckboxGroup2.vue.js +4 -0
  51. package/dist/components/checkbox-group/index.d.ts +27 -2
  52. package/dist/components/checkbox-group/index.js +10 -4
  53. package/dist/components/checkbox-group/instance.d.ts +10 -0
  54. package/dist/components/checkbox-group/src/checkbox-group.d.ts +102 -0
  55. package/dist/components/checkbox-group/src/checkbox-group.js +84 -0
  56. package/dist/components/container/container.d.ts +35 -0
  57. package/dist/components/container/container.js +26 -0
  58. package/dist/components/container/index.d.ts +23 -2
  59. package/dist/components/container/index.js +13 -4
  60. package/dist/components/date-picker/src/date-picker.d.ts +5 -5
  61. package/dist/components/footer/footer.d.ts +28 -0
  62. package/dist/components/footer/footer.js +29 -0
  63. package/dist/components/footer/index.d.ts +2 -2
  64. package/dist/components/footer/index.js +4 -4
  65. package/dist/components/header/header.d.ts +28 -0
  66. package/dist/components/header/header.js +29 -0
  67. package/dist/components/header/index.d.ts +2 -2
  68. package/dist/components/header/index.js +4 -4
  69. package/dist/components/input/index.d.ts +177 -0
  70. package/dist/components/input/index.js +8 -6
  71. package/dist/components/input/input.d.ts +2 -2
  72. package/dist/components/input/input.js +6 -6
  73. package/dist/components/input-number/EpInputNumber.vue.d.ts +5 -5
  74. package/dist/components/input-number/input-number.d.ts +2 -2
  75. package/dist/components/main/index.d.ts +2 -2
  76. package/dist/components/main/index.js +3 -3
  77. package/dist/components/main/main.d.ts +14 -0
  78. package/dist/components/main/main.js +14 -0
  79. package/dist/components/popper/src/content.vue.d.ts +6 -6
  80. package/dist/components/scrollbar/index.d.ts +217 -6
  81. package/dist/components/scrollbar/index.js +12 -5
  82. package/dist/components/scrollbar/src/bar.d.ts +23 -0
  83. package/dist/components/scrollbar/src/bar.js +19 -0
  84. package/dist/components/scrollbar/src/bar.vue.d.ts +23 -0
  85. package/dist/components/scrollbar/src/bar.vue.js +43 -0
  86. package/dist/components/scrollbar/src/bar2.vue.js +4 -0
  87. package/dist/components/scrollbar/src/constants.d.ts +6 -0
  88. package/dist/components/scrollbar/src/constants.js +4 -0
  89. package/dist/components/scrollbar/src/scrollbar.d.ts +111 -6
  90. package/dist/components/scrollbar/src/scrollbar.js +108 -7
  91. package/dist/components/scrollbar/src/scrollbar.vue.d.ts +101 -0
  92. package/dist/components/scrollbar/src/scrollbar.vue.js +178 -0
  93. package/dist/components/scrollbar/src/scrollbar2.vue.js +4 -0
  94. package/dist/components/scrollbar/src/thumb.d.ts +29 -0
  95. package/dist/components/scrollbar/src/thumb.js +19 -0
  96. package/dist/components/scrollbar/src/thumb.vue.d.ts +27 -0
  97. package/dist/components/scrollbar/src/thumb.vue.js +109 -0
  98. package/dist/components/scrollbar/src/thumb2.vue.js +4 -0
  99. package/dist/components/scrollbar/src/util.d.ts +2 -14
  100. package/dist/components/scrollbar/src/util.js +12 -3
  101. package/dist/components/select/index.d.ts +302 -186
  102. package/dist/components/select/select.vue.d.ts +148 -90
  103. package/dist/components/select-v2/src/select.vue.d.ts +30 -30
  104. package/dist/components/time-picker/src/common/picker.vue.d.ts +5 -5
  105. package/dist/components/time-picker/src/time-picker.d.ts +5 -5
  106. package/dist/components/tooltip/index.d.ts +24 -24
  107. package/dist/components/tooltip/src/content.vue.d.ts +6 -6
  108. package/dist/components/tooltip/src/tooltip.vue.d.ts +8 -8
  109. package/dist/ep-craft.js +187 -179
  110. package/dist/index.d.ts +18 -0
  111. package/dist/vendored-components.d.ts +5 -2
  112. package/dist/vendored-components.js +21 -1
  113. package/package.json +5 -2
@@ -0,0 +1,81 @@
1
+ import { computed as m } from "vue";
2
+ import { useFormItem as I, useFormItemInputId as C } from "../../../form/src/hooks/use-form-item.js";
3
+ import { useDeprecated as r } from "../../../../hooks/use-deprecated/index.js";
4
+ import { isPropAbsent as S } from "../../../../utils/types.js";
5
+ import "lodash-unified";
6
+ import "@vueuse/core";
7
+ import { isArray as L } from "@vue/shared";
8
+ import "@element-plus/icons-vue";
9
+ import { useCheckboxDisabled as g } from "./use-checkbox-disabled.js";
10
+ import { useCheckboxEvent as F } from "./use-checkbox-event.js";
11
+ import { useCheckboxModel as V } from "./use-checkbox-model.js";
12
+ import { useCheckboxStatus as D } from "./use-checkbox-status.js";
13
+ const j = (e, s) => {
14
+ const { formItem: i } = I(), { model: t, isGroup: c, isLimitExceeded: b } = V(e), {
15
+ isFocused: h,
16
+ isChecked: a,
17
+ checkboxButtonSize: d,
18
+ checkboxSize: f,
19
+ hasOwnLabel: o,
20
+ actualValue: l
21
+ } = D(e, s, { model: t }), { isDisabled: u } = g({ model: t, isChecked: a }), { inputId: p, isLabeledByFormItem: n } = C(e, {
22
+ formItemContext: i,
23
+ disableIdGeneration: o,
24
+ disableIdManagement: c
25
+ }), { handleChange: k, onClickRoot: v } = F(e, {
26
+ model: t,
27
+ isLimitExceeded: b,
28
+ hasOwnLabel: o,
29
+ isDisabled: u,
30
+ isLabeledByFormItem: n
31
+ });
32
+ return (() => {
33
+ function x() {
34
+ L(t.value) && !t.value.includes(l.value) ? t.value.push(l.value) : t.value = e.trueValue ?? e.trueLabel ?? !0;
35
+ }
36
+ e.checked && x();
37
+ })(), r(
38
+ {
39
+ from: "label act as value",
40
+ replacement: "value",
41
+ version: "3.0.0",
42
+ scope: "el-checkbox",
43
+ ref: "https://element-plus.org/en-US/component/checkbox.html"
44
+ },
45
+ m(() => c.value && S(e.value))
46
+ ), r(
47
+ {
48
+ from: "true-label",
49
+ replacement: "true-value",
50
+ version: "3.0.0",
51
+ scope: "el-checkbox",
52
+ ref: "https://element-plus.org/en-US/component/checkbox.html"
53
+ },
54
+ m(() => !!e.trueLabel)
55
+ ), r(
56
+ {
57
+ from: "false-label",
58
+ replacement: "false-value",
59
+ version: "3.0.0",
60
+ scope: "el-checkbox",
61
+ ref: "https://element-plus.org/en-US/component/checkbox.html"
62
+ },
63
+ m(() => !!e.falseLabel)
64
+ ), {
65
+ inputId: p,
66
+ isLabeledByFormItem: n,
67
+ isChecked: a,
68
+ isDisabled: u,
69
+ isFocused: h,
70
+ checkboxButtonSize: d,
71
+ checkboxSize: f,
72
+ hasOwnLabel: o,
73
+ model: t,
74
+ actualValue: l,
75
+ handleChange: k,
76
+ onClickRoot: v
77
+ };
78
+ };
79
+ export {
80
+ j as useCheckbox
81
+ };
@@ -0,0 +1,8 @@
1
+ import type { CheckboxGroupProps } from '../../checkbox-group/src/checkbox-group';
2
+ import type { ComputedRef, InjectionKey, ToRefs, WritableComputedRef } from 'vue';
3
+ export type CheckboxGroupContext = {
4
+ modelValue?: WritableComputedRef<any>;
5
+ changeEvent?: (...args: any) => any;
6
+ disabled?: ComputedRef<boolean>;
7
+ } & ToRefs<Pick<CheckboxGroupProps, 'size' | 'min' | 'max' | 'validateEvent' | 'fill' | 'textColor'>>;
8
+ export declare const checkboxGroupContextKey: InjectionKey<CheckboxGroupContext>;
@@ -0,0 +1,4 @@
1
+ const o = Symbol("checkboxGroupContextKey");
2
+ export {
3
+ o as checkboxGroupContextKey
4
+ };
@@ -0,0 +1,147 @@
1
+ declare var __VLS_1: {};
2
+ type __VLS_Slots = {} & {
3
+ default?: (props: typeof __VLS_1) => any;
4
+ };
5
+ declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
6
+ ariaControls: StringConstructor;
7
+ modelValue: {
8
+ type: (BooleanConstructor | NumberConstructor | StringConstructor)[];
9
+ default: undefined;
10
+ };
11
+ label: {
12
+ type: (BooleanConstructor | ObjectConstructor | NumberConstructor | StringConstructor)[];
13
+ default: undefined;
14
+ };
15
+ value: {
16
+ type: (BooleanConstructor | ObjectConstructor | NumberConstructor | StringConstructor)[];
17
+ default: undefined;
18
+ };
19
+ indeterminate: BooleanConstructor;
20
+ disabled: {
21
+ type: BooleanConstructor;
22
+ default: undefined;
23
+ };
24
+ checked: BooleanConstructor;
25
+ name: {
26
+ type: StringConstructor;
27
+ default: undefined;
28
+ };
29
+ trueValue: {
30
+ type: (NumberConstructor | StringConstructor)[];
31
+ default: undefined;
32
+ };
33
+ falseValue: {
34
+ type: (NumberConstructor | StringConstructor)[];
35
+ default: undefined;
36
+ };
37
+ trueLabel: {
38
+ type: (NumberConstructor | StringConstructor)[];
39
+ default: undefined;
40
+ };
41
+ falseLabel: {
42
+ type: (NumberConstructor | StringConstructor)[];
43
+ default: undefined;
44
+ };
45
+ id: {
46
+ type: StringConstructor;
47
+ default: undefined;
48
+ };
49
+ border: BooleanConstructor;
50
+ size: {
51
+ readonly type: import("vue").PropType<import("../../utils").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", never>>;
52
+ readonly required: false;
53
+ readonly validator: ((val: unknown) => boolean) | undefined;
54
+ __epPropKey: true;
55
+ };
56
+ tabindex: (NumberConstructor | StringConstructor)[];
57
+ validateEvent: {
58
+ type: BooleanConstructor;
59
+ default: boolean;
60
+ };
61
+ ariaLabel: StringConstructor;
62
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
63
+ "update:modelValue": (val: import("../checkbox").CheckboxValueType) => void;
64
+ change: (val: import("../checkbox").CheckboxValueType) => void;
65
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
66
+ ariaControls: StringConstructor;
67
+ modelValue: {
68
+ type: (BooleanConstructor | NumberConstructor | StringConstructor)[];
69
+ default: undefined;
70
+ };
71
+ label: {
72
+ type: (BooleanConstructor | ObjectConstructor | NumberConstructor | StringConstructor)[];
73
+ default: undefined;
74
+ };
75
+ value: {
76
+ type: (BooleanConstructor | ObjectConstructor | NumberConstructor | StringConstructor)[];
77
+ default: undefined;
78
+ };
79
+ indeterminate: BooleanConstructor;
80
+ disabled: {
81
+ type: BooleanConstructor;
82
+ default: undefined;
83
+ };
84
+ checked: BooleanConstructor;
85
+ name: {
86
+ type: StringConstructor;
87
+ default: undefined;
88
+ };
89
+ trueValue: {
90
+ type: (NumberConstructor | StringConstructor)[];
91
+ default: undefined;
92
+ };
93
+ falseValue: {
94
+ type: (NumberConstructor | StringConstructor)[];
95
+ default: undefined;
96
+ };
97
+ trueLabel: {
98
+ type: (NumberConstructor | StringConstructor)[];
99
+ default: undefined;
100
+ };
101
+ falseLabel: {
102
+ type: (NumberConstructor | StringConstructor)[];
103
+ default: undefined;
104
+ };
105
+ id: {
106
+ type: StringConstructor;
107
+ default: undefined;
108
+ };
109
+ border: BooleanConstructor;
110
+ size: {
111
+ readonly type: import("vue").PropType<import("../../utils").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", never>>;
112
+ readonly required: false;
113
+ readonly validator: ((val: unknown) => boolean) | undefined;
114
+ __epPropKey: true;
115
+ };
116
+ tabindex: (NumberConstructor | StringConstructor)[];
117
+ validateEvent: {
118
+ type: BooleanConstructor;
119
+ default: boolean;
120
+ };
121
+ ariaLabel: StringConstructor;
122
+ }>> & Readonly<{
123
+ "onUpdate:modelValue"?: ((val: import("../checkbox").CheckboxValueType) => any) | undefined;
124
+ onChange?: ((val: import("../checkbox").CheckboxValueType) => any) | undefined;
125
+ }>, {
126
+ name: string;
127
+ border: boolean;
128
+ disabled: boolean;
129
+ label: string | number | boolean | Record<string, any>;
130
+ value: string | number | boolean | Record<string, any>;
131
+ id: string;
132
+ modelValue: string | number | boolean;
133
+ validateEvent: boolean;
134
+ checked: boolean;
135
+ indeterminate: boolean;
136
+ trueValue: string | number;
137
+ falseValue: string | number;
138
+ trueLabel: string | number;
139
+ falseLabel: string | number;
140
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
141
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
142
+ export default _default;
143
+ type __VLS_WithSlots<T, S> = T & {
144
+ new (): {
145
+ $slots: S;
146
+ };
147
+ };
@@ -0,0 +1,84 @@
1
+ import { defineComponent as h, useSlots as y, computed as u, inject as B, openBlock as b, createElementBlock as f, normalizeClass as v, withDirectives as E, createElementVNode as N, mergeProps as S, unref as n, isRef as $, withModifiers as L, vModelCheckbox as M, normalizeStyle as w, renderSlot as z, createTextVNode as D, toDisplayString as P, createCommentVNode as F } from "vue";
2
+ import { useNamespace as K } from "../../hooks/use-namespace/index.js";
3
+ import "@vue/shared";
4
+ import "lodash-unified";
5
+ import "@vueuse/core";
6
+ import "@element-plus/icons-vue";
7
+ import "../../hooks/use-size/index.js";
8
+ import "@popperjs/core";
9
+ import "../../hooks/use-z-index/index.js";
10
+ import "../../hooks/use-delayed-toggle/index.js";
11
+ import "../../hooks/use-aria/index.js";
12
+ import "../../hooks/use-model-toggle/index.js";
13
+ import "../../hooks/use-empty-values/index.js";
14
+ import { checkboxGroupContextKey as O } from "../checkbox/src/constants.js";
15
+ import { checkboxEmits as T, checkboxProps as j } from "../checkbox/src/checkbox.js";
16
+ import { useCheckbox as A } from "../checkbox/src/composables/use-checkbox.js";
17
+ const R = ["name", "tabindex", "disabled"], U = "EpCheckboxButton", ne = /* @__PURE__ */ h({
18
+ name: U,
19
+ __name: "EpCheckboxButton",
20
+ props: j,
21
+ emits: T,
22
+ setup(c) {
23
+ const t = c, {
24
+ isFocused: r,
25
+ isChecked: m,
26
+ isDisabled: d,
27
+ checkboxButtonSize: C,
28
+ model: i,
29
+ actualValue: k,
30
+ handleChange: p
31
+ } = A(t, y()), x = u(() => t.trueValue || t.falseValue || t.trueLabel || t.falseLabel ? {
32
+ "true-value": t.trueValue ?? t.trueLabel ?? !0,
33
+ "false-value": t.falseValue ?? t.falseLabel ?? !1
34
+ } : { value: k.value }), s = B(O, void 0), a = K("checkbox"), V = u(() => {
35
+ var e, l;
36
+ const o = ((e = s == null ? void 0 : s.fill) == null ? void 0 : e.value) ?? "";
37
+ return {
38
+ backgroundColor: o,
39
+ borderColor: o,
40
+ color: ((l = s == null ? void 0 : s.textColor) == null ? void 0 : l.value) ?? "",
41
+ boxShadow: o ? `-1px 0 0 0 ${o}` : void 0
42
+ };
43
+ }), g = u(() => [
44
+ a.b("button"),
45
+ a.bm("button", C.value),
46
+ a.is("disabled", d.value),
47
+ a.is("checked", m.value),
48
+ a.is("focus", r.value)
49
+ ]);
50
+ return (o, e) => (b(), f("label", {
51
+ class: v(g.value)
52
+ }, [
53
+ E(N("input", S({
54
+ "onUpdate:modelValue": e[0] || (e[0] = (l) => $(i) ? i.value = l : null),
55
+ class: n(a).be("button", "original"),
56
+ type: "checkbox",
57
+ name: o.name,
58
+ tabindex: o.tabindex,
59
+ disabled: n(d)
60
+ }, x.value, {
61
+ onChange: e[1] || (e[1] = //@ts-ignore
62
+ (...l) => n(p) && n(p)(...l)),
63
+ onFocus: e[2] || (e[2] = (l) => r.value = !0),
64
+ onBlur: e[3] || (e[3] = (l) => r.value = !1),
65
+ onClick: e[4] || (e[4] = L(() => {
66
+ }, ["stop"]))
67
+ }), null, 16, R), [
68
+ [M, n(i)]
69
+ ]),
70
+ o.$slots.default || o.label ? (b(), f("span", {
71
+ key: 0,
72
+ class: v(n(a).be("button", "inner")),
73
+ style: w(n(m) ? V.value : void 0)
74
+ }, [
75
+ z(o.$slots, "default", {}, () => [
76
+ D(P(o.label), 1)
77
+ ])
78
+ ], 6)) : F("", !0)
79
+ ], 2));
80
+ }
81
+ });
82
+ export {
83
+ ne as default
84
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./EpCheckboxButton.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -1,4 +1,26 @@
1
1
  import type { Plugin } from 'vue';
2
- import { ElCheckboxButton } from 'element-plus';
3
- export declare const EpCheckboxButton: typeof ElCheckboxButton & Plugin;
2
+ import _EpCheckboxButton from './EpCheckboxButton.vue';
3
+ /**
4
+ * checkbox-button 自持 barrel:用**本地**安装辅助把 SFC 本体注册为 `ep-checkbox-button`
5
+ * ——对外注册名与迁移前的包装态**逐字相同**(需求 6.2)。
6
+ *
7
+ * 形态对齐 `src/components/checkbox/index.ts`。与迁移前的
8
+ * `Object.assign({}, ElCheckboxButton, { name: 'EpCheckboxButton' })` 包装态的关键差异:
9
+ * 本体不再来自 `element-plus`,故本入口模块**零 element-plus 引用**(需求 1.3)。
10
+ *
11
+ * **必须用 `../../utils/with-install`(本地版),不得误用 `../../utils/vue/install`(上游版)**:
12
+ * 签名不同(本地版按显式注册名注册;上游版按 `comp.name` 注册并把第二参交给
13
+ * `Object.values()` 展开),误用会让 `ep-checkbox-button` **静默注册失败**。理由详见
14
+ * `src/components/checkbox/index.ts` 的同名注释。
15
+ *
16
+ * **不导出 props / emits 常量**:按钮形态**复用**复选框的 `checkboxProps` / `checkboxEmits`
17
+ * (需求 4.1),本身无独立契约模块;迁移前的包装态 barrel 也不导出任何常量,故需求 6.3
18
+ * 「迁移前已提供的导出不缺失」不受影响。这两个常量由 `checkbox/index.ts` 与主入口提供。
19
+ *
20
+ * **不导出 `ElCheckboxButton` 别名**(需求 6.5,design.md 决策 3)。
21
+ *
22
+ * **不使用 `export *`**:公开面按契约显式列出(与 `checkbox` / `backtop` / `input` 一致)。
23
+ */
24
+ export declare const EpCheckboxButton: typeof _EpCheckboxButton & Plugin;
4
25
  export default EpCheckboxButton;
26
+ export type { CheckboxButtonInstance } from './instance';
@@ -1,6 +1,9 @@
1
- import { ElCheckboxButton as t } from "element-plus";
2
1
  import { withInstall as o } from "../../utils/with-install.js";
3
- const n = Object.assign({}, t, { name: "EpCheckboxButton" }), b = o(n, "ep-checkbox-button");
2
+ import t from "./EpCheckboxButton.vue.js";
3
+ const n = o(
4
+ t,
5
+ "ep-checkbox-button"
6
+ );
4
7
  export {
5
- b as EpCheckboxButton
8
+ n as EpCheckboxButton
6
9
  };
@@ -0,0 +1,10 @@
1
+ import type _EpCheckboxButton from './EpCheckboxButton.vue';
2
+ /**
3
+ * EpCheckboxButton 的公开实例类型。
4
+ *
5
+ * 对应上游 `es/components/checkbox/src/checkbox-button.vue.d.ts` 的实例类型
6
+ * (上游写作 `InstanceType<typeof _default> & unknown`)。本地对 SFC 取实例类型,
7
+ * 与 `src/components/checkbox/instance.ts` 的 `CheckboxInstance` 同款写法:
8
+ * `X & unknown` 与 `X` 类型等价,故省略该恒等交集。
9
+ */
10
+ export type CheckboxButtonInstance = InstanceType<typeof _EpCheckboxButton>;
@@ -0,0 +1,74 @@
1
+ import type { CheckboxGroupValueType, CheckboxOption } from './src/checkbox-group';
2
+ declare var __VLS_6: {};
3
+ type __VLS_Slots = {} & {
4
+ default?: (props: typeof __VLS_6) => any;
5
+ };
6
+ declare const __VLS_component: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
7
+ ariaLabel: StringConstructor;
8
+ modelValue: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => CheckboxGroupValueType) | (() => CheckboxGroupValueType) | (((new (...args: any[]) => CheckboxGroupValueType) | (() => CheckboxGroupValueType)) | null)[], unknown, unknown, () => never[], boolean>;
9
+ disabled: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
10
+ min: NumberConstructor;
11
+ max: NumberConstructor;
12
+ size: {
13
+ readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", never>>;
14
+ readonly required: false;
15
+ readonly validator: ((val: unknown) => boolean) | undefined;
16
+ __epPropKey: true;
17
+ };
18
+ fill: StringConstructor;
19
+ textColor: StringConstructor;
20
+ tag: import("@element-plus/utils").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
21
+ validateEvent: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
22
+ options: {
23
+ readonly type: import("vue").PropType<CheckboxOption[]>;
24
+ readonly required: false;
25
+ readonly validator: ((val: unknown) => boolean) | undefined;
26
+ __epPropKey: true;
27
+ };
28
+ props: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => import("./index.js").CheckboxOptionProps) | (() => import("./index.js").CheckboxOptionProps) | (((new (...args: any[]) => import("./index.js").CheckboxOptionProps) | (() => import("./index.js").CheckboxOptionProps)) | null)[], unknown, unknown, () => Required<import("./index.js").CheckboxOptionProps>, boolean>;
29
+ type: import("@element-plus/utils").EpPropFinalized<StringConstructor, string, unknown, string, boolean>;
30
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
31
+ "update:modelValue": (val: CheckboxGroupValueType) => void;
32
+ change: (val: import("../checkbox/index.js").CheckboxValueType[]) => void;
33
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
34
+ ariaLabel: StringConstructor;
35
+ modelValue: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => CheckboxGroupValueType) | (() => CheckboxGroupValueType) | (((new (...args: any[]) => CheckboxGroupValueType) | (() => CheckboxGroupValueType)) | null)[], unknown, unknown, () => never[], boolean>;
36
+ disabled: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
37
+ min: NumberConstructor;
38
+ max: NumberConstructor;
39
+ size: {
40
+ readonly type: import("vue").PropType<import("@element-plus/utils").EpPropMergeType<StringConstructor, "" | "small" | "default" | "large", never>>;
41
+ readonly required: false;
42
+ readonly validator: ((val: unknown) => boolean) | undefined;
43
+ __epPropKey: true;
44
+ };
45
+ fill: StringConstructor;
46
+ textColor: StringConstructor;
47
+ tag: import("@element-plus/utils").EpPropFinalized<StringConstructor, unknown, unknown, string, boolean>;
48
+ validateEvent: import("@element-plus/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, boolean, boolean>;
49
+ options: {
50
+ readonly type: import("vue").PropType<CheckboxOption[]>;
51
+ readonly required: false;
52
+ readonly validator: ((val: unknown) => boolean) | undefined;
53
+ __epPropKey: true;
54
+ };
55
+ props: import("@element-plus/utils").EpPropFinalized<(new (...args: any[]) => import("./index.js").CheckboxOptionProps) | (() => import("./index.js").CheckboxOptionProps) | (((new (...args: any[]) => import("./index.js").CheckboxOptionProps) | (() => import("./index.js").CheckboxOptionProps)) | null)[], unknown, unknown, () => Required<import("./index.js").CheckboxOptionProps>, boolean>;
56
+ type: import("@element-plus/utils").EpPropFinalized<StringConstructor, string, unknown, string, boolean>;
57
+ }>> & Readonly<{
58
+ "onUpdate:modelValue"?: ((val: CheckboxGroupValueType) => any) | undefined;
59
+ onChange?: ((val: import("../checkbox/index.js").CheckboxValueType[]) => any) | undefined;
60
+ }>, {
61
+ props: import("./index.js").CheckboxOptionProps;
62
+ disabled: import("@element-plus/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
63
+ type: string;
64
+ tag: string;
65
+ modelValue: CheckboxGroupValueType;
66
+ validateEvent: import("@element-plus/utils").EpPropMergeType<BooleanConstructor, unknown, unknown>;
67
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
68
+ declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
69
+ export default _default;
70
+ type __VLS_WithSlots<T, S> = T & {
71
+ new (): {
72
+ $slots: S;
73
+ };
74
+ };
@@ -0,0 +1,92 @@
1
+ import { defineComponent as y, computed as s, provide as I, toRefs as N, watch as P, openBlock as n, createBlock as d, resolveDynamicComponent as b, unref as m, normalizeClass as D, withCtx as G, renderSlot as O, createElementBlock as F, Fragment as T, renderList as V, mergeProps as B, nextTick as L } from "vue";
2
+ import { useFormDisabled as w } from "../form/src/hooks/use-form-common-props.js";
3
+ import { useFormItem as A, useFormItemInputId as M } from "../form/src/hooks/use-form-item.js";
4
+ import { UPDATE_MODEL_EVENT as $, CHANGE_EVENT as z } from "../../constants/event.js";
5
+ import { useNamespace as q } from "../../hooks/use-namespace/index.js";
6
+ import { NOOP as H } from "@vue/shared";
7
+ import { pick as K, isEqual as R, omit as S } from "lodash-unified";
8
+ import "@vueuse/core";
9
+ import "@element-plus/icons-vue";
10
+ import "../../hooks/use-size/index.js";
11
+ import "@popperjs/core";
12
+ import "../../hooks/use-z-index/index.js";
13
+ import "../../hooks/use-delayed-toggle/index.js";
14
+ import "../../hooks/use-aria/index.js";
15
+ import "../../hooks/use-model-toggle/index.js";
16
+ import "../../hooks/use-empty-values/index.js";
17
+ import U from "../checkbox-button/EpCheckboxButton.vue.js";
18
+ import j from "../checkbox/EpCheckbox.vue.js";
19
+ import { checkboxGroupContextKey as J } from "../checkbox/src/constants.js";
20
+ import { checkboxGroupEmits as Q, checkboxGroupProps as W, checkboxDefaultProps as X } from "./src/checkbox-group.js";
21
+ const Y = "EpCheckboxGroup", ve = /* @__PURE__ */ y({
22
+ name: Y,
23
+ __name: "EpCheckboxGroup",
24
+ props: W,
25
+ emits: Q,
26
+ setup(f, { emit: E }) {
27
+ const o = f, p = E, h = q("checkbox"), k = w(), { formItem: t } = A(), { inputId: v, isLabeledByFormItem: c } = M(o, {
28
+ formItemContext: t
29
+ }), u = async (e) => {
30
+ p($, e), await L(), p(z, e);
31
+ }, x = s({
32
+ get() {
33
+ return o.modelValue;
34
+ },
35
+ set(e) {
36
+ u(e);
37
+ }
38
+ }), C = s(() => ({
39
+ ...X,
40
+ ...o.props
41
+ })), _ = (e) => {
42
+ const { label: r, value: a, disabled: i } = C.value, l = {
43
+ label: e[r],
44
+ value: e[a],
45
+ disabled: e[i]
46
+ };
47
+ return {
48
+ ...S(e, [r, a, i]),
49
+ ...l
50
+ };
51
+ }, g = s(
52
+ () => o.type === "button" ? U : j
53
+ );
54
+ return I(J, {
55
+ ...K(N(o), [
56
+ "size",
57
+ "min",
58
+ "max",
59
+ "validateEvent",
60
+ "fill",
61
+ "textColor"
62
+ ]),
63
+ disabled: k,
64
+ modelValue: x,
65
+ changeEvent: u
66
+ }), P(
67
+ () => o.modelValue,
68
+ (e, r) => {
69
+ o.validateEvent && !R(e, r) && (t == null || t.validate("change").catch(H));
70
+ }
71
+ ), (e, r) => {
72
+ var a;
73
+ return n(), d(b(e.tag), {
74
+ id: m(v),
75
+ class: D(m(h).b("group")),
76
+ role: "group",
77
+ "aria-label": m(c) ? void 0 : e.ariaLabel || "checkbox-group",
78
+ "aria-labelledby": m(c) ? (a = m(t)) == null ? void 0 : a.labelId : void 0
79
+ }, {
80
+ default: G(() => [
81
+ O(e.$slots, "default", {}, () => [
82
+ (n(!0), F(T, null, V(e.options, (i, l) => (n(), d(b(g.value), B({ key: l }, { ref_for: !0 }, _(i)), null, 16))), 128))
83
+ ])
84
+ ]),
85
+ _: 3
86
+ }, 8, ["id", "class", "aria-label", "aria-labelledby"]);
87
+ };
88
+ }
89
+ });
90
+ export {
91
+ ve as default
92
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./EpCheckboxGroup.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -1,4 +1,29 @@
1
1
  import type { Plugin } from 'vue';
2
- import { ElCheckboxGroup } from 'element-plus';
3
- export declare const EpCheckboxGroup: typeof ElCheckboxGroup & Plugin;
2
+ import _EpCheckboxGroup from './EpCheckboxGroup.vue';
3
+ /**
4
+ * checkbox-group 自持 barrel:用**本地**安装辅助把 SFC 本体注册为 `ep-checkbox-group`
5
+ * ——对外注册名与迁移前的包装态**逐字相同**(需求 6.2)。
6
+ *
7
+ * 形态对齐 `src/components/checkbox/index.ts`。与迁移前的
8
+ * `Object.assign({}, ElCheckboxGroup, { name: 'EpCheckboxGroup' })` 包装态的关键差异:
9
+ * 本体不再来自 `element-plus`,故本入口模块**零 element-plus 引用**(需求 1.3)。
10
+ *
11
+ * **必须用 `../../utils/with-install`(本地版),不得误用 `../../utils/vue/install`(上游版)**:
12
+ * 签名不同(本地版按显式注册名注册;上游版按 `comp.name` 注册并把第二参交给
13
+ * `Object.values()` 展开),误用会让 `ep-checkbox-group` **静默注册失败**。理由详见
14
+ * `src/components/checkbox/index.ts` 的同名注释。
15
+ *
16
+ * **不导出 `checkboxDefaultProps`**(design.md 决策 5):它只是 `props` prop 的默认值
17
+ * (键名映射),不固化为本库契约;迁移前的包装态 barrel 也不导出任何常量,故需求 6.3
18
+ * 「迁移前已提供的导出不缺失」不受影响。
19
+ *
20
+ * **不导出 `ElCheckboxGroup` 别名**(需求 6.5,design.md 决策 3)。
21
+ *
22
+ * **不使用 `export *`**:公开面按契约显式列出,避免 `checkbox-group.ts` / `instance.ts`
23
+ * 的内部声明外泄到主入口(与 `checkbox` / `backtop` / `input` 一致)。
24
+ */
25
+ export declare const EpCheckboxGroup: typeof _EpCheckboxGroup & Plugin;
4
26
  export default EpCheckboxGroup;
27
+ export { checkboxGroupEmits, checkboxGroupProps } from './src/checkbox-group';
28
+ export type { CheckboxGroupEmits, CheckboxGroupProps, CheckboxGroupPropsPublic, CheckboxGroupValueType, CheckboxOption, CheckboxOptionProps, } from './src/checkbox-group';
29
+ export type { CheckboxGroupInstance } from './instance';
@@ -1,6 +1,12 @@
1
- import { ElCheckboxGroup as o } from "element-plus";
2
- import { withInstall as p } from "../../utils/with-install.js";
3
- const r = Object.assign({}, o, { name: "EpCheckboxGroup" }), t = p(r, "ep-checkbox-group");
1
+ import { withInstall as o } from "../../utils/with-install.js";
2
+ import r from "./EpCheckboxGroup.vue.js";
3
+ import { checkboxGroupEmits as x, checkboxGroupProps as h } from "./src/checkbox-group.js";
4
+ const t = o(
5
+ r,
6
+ "ep-checkbox-group"
7
+ );
4
8
  export {
5
- t as EpCheckboxGroup
9
+ t as EpCheckboxGroup,
10
+ x as checkboxGroupEmits,
11
+ h as checkboxGroupProps
6
12
  };
@@ -0,0 +1,10 @@
1
+ import type _EpCheckboxGroup from './EpCheckboxGroup.vue';
2
+ /**
3
+ * EpCheckboxGroup 的公开实例类型。
4
+ *
5
+ * 对应上游 `es/components/checkbox/src/checkbox-group.d.ts` 的 `CheckboxGroupInstance`
6
+ * (上游写作 `InstanceType<typeof _default> & unknown`)。本地对 SFC 取实例类型,
7
+ * 与 `src/components/checkbox/instance.ts` 的 `CheckboxInstance` 同款写法:
8
+ * `X & unknown` 与 `X` 类型等价,故省略该恒等交集。
9
+ */
10
+ export type CheckboxGroupInstance = InstanceType<typeof _EpCheckboxGroup>;