@web-utils/form-ui 1.0.0-beta3 → 1.0.0-beta30

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 (176) hide show
  1. package/api/index.d.ts +60 -0
  2. package/api/index.mjs +42 -0
  3. package/awesome-button/index.d.ts +60 -0
  4. package/awesome-button/index.mjs +49 -0
  5. package/base.css +1 -1
  6. package/chunks/4ZuVpQf6.mjs +478 -0
  7. package/chunks/B99alfW4.mjs +207 -0
  8. package/chunks/BQ77eAb3.mjs +71 -0
  9. package/chunks/BV_N8p9t.mjs +83 -0
  10. package/chunks/BV_P9a8o.mjs +100 -0
  11. package/chunks/BgDYHgyH.mjs +189 -0
  12. package/chunks/Bm5eiSmT.mjs +79 -0
  13. package/chunks/BmZieBZW.mjs +88 -0
  14. package/chunks/Br4i8stg.mjs +222 -0
  15. package/chunks/C3a15Ful.mjs +95 -0
  16. package/chunks/C4bM8miy.mjs +174 -0
  17. package/chunks/C9J3j0PX.mjs +93 -0
  18. package/chunks/CKErj8Ax.mjs +637 -0
  19. package/chunks/Cby3mvvZ.mjs +216 -0
  20. package/chunks/Cc3EJjbV.mjs +25 -0
  21. package/chunks/Cgl-hCE5.mjs +25 -0
  22. package/chunks/Ci1XxmdE.mjs +51 -0
  23. package/chunks/CkFapoKt.mjs +8 -0
  24. package/chunks/CsfgUCe9.mjs +17 -0
  25. package/chunks/CugRu2Ka.mjs +42 -0
  26. package/chunks/Cy-4nmyC.mjs +106 -0
  27. package/chunks/D1EOkWJ7.mjs +25 -0
  28. package/chunks/D1G2MMMx.mjs +1360 -0
  29. package/chunks/DO8dVGef.mjs +98 -0
  30. package/chunks/DazglPJZ.mjs +180 -0
  31. package/chunks/Dt6gY213.mjs +62 -0
  32. package/chunks/DtAYXPvz.mjs +108 -0
  33. package/chunks/JhyiXnbd.mjs +76 -0
  34. package/chunks/S64sNmuR.mjs +226 -0
  35. package/chunks/bnRb5PUB.mjs +108 -0
  36. package/chunks/dM-icPM8.mjs +107 -0
  37. package/chunks/pxFLMMUm.mjs +110 -0
  38. package/chunks/q1SlJP1y.mjs +171 -0
  39. package/confirm-button/index.d.ts +113 -0
  40. package/confirm-button/index.mjs +35 -0
  41. package/confirmable/index.d.ts +84 -0
  42. package/confirmable/index.mjs +8 -0
  43. package/constants/index.d.ts +42 -0
  44. package/constants/index.mjs +4 -0
  45. package/dict-render/index.d.ts +28 -0
  46. package/element-dialog/index.d.ts +374 -0
  47. package/element-dialog/index.mjs +2 -91
  48. package/empty-view/index.d.ts +29 -0
  49. package/empty-view/index.mjs +1 -1
  50. package/flex-scroll-area/index.d.ts +22 -0
  51. package/flex-scroll-area/index.mjs +1 -1
  52. package/form-advice/index.d.ts +9 -0
  53. package/form-advice/index.mjs +13 -12
  54. package/form-button/index.d.ts +114 -0
  55. package/form-button/index.mjs +36 -0
  56. package/form-cascader/index.d.ts +486 -0
  57. package/form-cascader/index.mjs +2 -0
  58. package/form-cell/index.d.ts +25 -0
  59. package/form-check-box-group/index.d.ts +295 -0
  60. package/form-check-box-group/index.mjs +1 -1
  61. package/form-checkbox/index.d.ts +273 -0
  62. package/form-checkbox/index.mjs +1 -1
  63. package/form-date-picker/index.d.ts +423 -0
  64. package/form-date-picker/index.mjs +1 -1
  65. package/form-holder/index.d.ts +166 -0
  66. package/form-holder/index.mjs +1 -1
  67. package/form-holder/style.css +1 -1
  68. package/form-image/index.d.ts +226 -0
  69. package/form-image/index.mjs +1 -1
  70. package/form-input/index.d.ts +389 -0
  71. package/form-input/index.mjs +1 -1
  72. package/form-input/style.css +1 -0
  73. package/form-input-cron-expression/index.d.ts +217 -0
  74. package/form-input-cron-expression/index.mjs +2 -0
  75. package/form-input-cron-expression/style.css +1 -0
  76. package/form-input-email/index.d.ts +363 -0
  77. package/form-input-email/index.mjs +1 -1
  78. package/form-input-id-card/index.d.ts +363 -0
  79. package/form-input-id-card/index.mjs +1 -1
  80. package/form-input-number/index.d.ts +327 -0
  81. package/form-input-number/index.mjs +1 -1
  82. package/form-input-phone-number/index.d.ts +363 -0
  83. package/form-input-phone-number/index.mjs +1 -1
  84. package/form-input-tag/index.d.ts +2 -0
  85. package/form-input-time/index.d.ts +2 -0
  86. package/form-item-config-provider/index.d.ts +22 -0
  87. package/form-item-config-provider/index.mjs +24 -0
  88. package/form-item-group/index.d.ts +94 -0
  89. package/form-item-group/index.mjs +2 -78
  90. package/form-item-group/style.css +1 -1
  91. package/form-item-x/index.d.ts +184 -0
  92. package/form-item-x/index.mjs +1 -1
  93. package/form-item-x/style.css +1 -0
  94. package/form-radio-group/index.d.ts +283 -0
  95. package/form-radio-group/index.mjs +1 -1
  96. package/form-rate/index.d.ts +321 -0
  97. package/form-rate/index.mjs +1 -1
  98. package/form-red-table/index.d.ts +21 -0
  99. package/form-red-table/index.mjs +27 -26
  100. package/form-row/index.d.ts +11 -0
  101. package/form-row/index.mjs +1 -1
  102. package/form-select/index.d.ts +542 -0
  103. package/form-select/index.mjs +1 -1
  104. package/form-slider/index.d.ts +350 -0
  105. package/form-slider/index.mjs +1 -1
  106. package/form-switch/index.d.ts +339 -0
  107. package/form-switch/index.mjs +1 -1
  108. package/form-text/index.d.ts +229 -0
  109. package/form-text/index.mjs +1 -1
  110. package/form-view/index.d.ts +2 -0
  111. package/form-view/index.mjs +1 -1
  112. package/helper/dictionary.d.ts +15 -0
  113. package/helper/dictionary.mjs +97 -0
  114. package/hook/useDictionary.d.ts +60 -0
  115. package/hook/useDictionary.mjs +15 -0
  116. package/hook/useVisibilityChange.d.ts +4 -0
  117. package/hook/useVisibilityChange.mjs +14 -0
  118. package/iframe-window/index.d.ts +9 -0
  119. package/iframe-window/index.mjs +37 -0
  120. package/iframe-window/style.css +1 -0
  121. package/index.d.ts +51 -0
  122. package/index.mjs +51 -37
  123. package/month-calendar/index.d.ts +80 -0
  124. package/package.json +12 -7
  125. package/pageable-table/index.d.ts +436 -0
  126. package/pageable-table/index.mjs +2 -0
  127. package/pageable-table/style.css +1 -0
  128. package/resize-observer/index.d.ts +8 -0
  129. package/resize-observer/index.mjs +40 -0
  130. package/resize-observer/style.css +1 -0
  131. package/resolver/index.d.ts +9 -0
  132. package/resolver/index.mjs +29 -0
  133. package/table-column/index.d.ts +160 -0
  134. package/table-column/index.mjs +2 -0
  135. package/table-column/style.css +1 -0
  136. package/table-column-def/index.d.ts +85 -0
  137. package/table-column-def/index.mjs +11 -0
  138. package/table-column-filter/index.d.ts +11 -0
  139. package/table-column-filterable/index.d.ts +10 -0
  140. package/table-view/index.d.ts +2 -0
  141. package/table-view/index.mjs +1 -1
  142. package/toolbar/index.d.ts +129 -0
  143. package/toolbar/index.mjs +1 -8
  144. package/toolbar/style.css +1 -0
  145. package/toolbar-button/index.d.ts +77 -0
  146. package/toolbar-button/index.mjs +1 -8
  147. package/vue-cron/index.d.ts +191 -0
  148. package/vue-cron/index.mjs +2 -0
  149. package/vue-cron/style.css +1 -0
  150. package/web-types.json +1 -1
  151. package/x-input-tag/index.d.ts +2 -0
  152. package/x-input-tag/index.mjs +226 -0
  153. package/x-input-tag/style.css +1 -0
  154. package/year-calendar/index.d.ts +99 -0
  155. package/year-calendar/index.mjs +2 -0
  156. package/year-calendar/style.css +1 -0
  157. package/chunks/B4M_TFeR.mjs +0 -152
  158. package/chunks/B5BIQCcK.mjs +0 -149
  159. package/chunks/BHNKrW1j.mjs +0 -61
  160. package/chunks/BO9jWhBl.mjs +0 -46
  161. package/chunks/BZ8aOa78.mjs +0 -35
  162. package/chunks/Bsz7y4Xp.mjs +0 -73
  163. package/chunks/Bxj372sF.mjs +0 -53
  164. package/chunks/C33EmJN8.mjs +0 -32
  165. package/chunks/C6Li3-l7.mjs +0 -28
  166. package/chunks/CBcdalMX.mjs +0 -35
  167. package/chunks/CdRsyF0n.mjs +0 -43
  168. package/chunks/ClNahmiU.mjs +0 -23
  169. package/chunks/CstztYMu.mjs +0 -28
  170. package/chunks/DC9b53M6.mjs +0 -32
  171. package/chunks/DDVAgRED.mjs +0 -36
  172. package/chunks/DpJQABVD.mjs +0 -91
  173. package/chunks/ZsLNWI9x.mjs +0 -46
  174. package/chunks/jn_iQrVZ.mjs +0 -28
  175. package/constants.mjs +0 -4
  176. package/input/style.css +0 -1
@@ -0,0 +1,79 @@
1
+ import { isFunction as e } from "@web-utils/core";
2
+ import { defineComponent as t, h as n, resolveComponent as r } from "vue";
3
+ import { ElLoading as i, ElMessageBox as a } from "element-plus";
4
+ //#region src/components/button/confirmable-mixin.ts
5
+ async function o(t, n, r) {
6
+ let { stop: o, prevent: s, message: c, loadable: l, loadingText: u, confirmable: d, confirmType: f, confirmText: p, confirmTitle: m } = n;
7
+ o && t.stopPropagation(), s && t.preventDefault();
8
+ let { onBefore: h, onClick: g, onCancel: _, onAfter: v } = r;
9
+ if (e(g)) try {
10
+ let n = !0;
11
+ if (e(h) && (n = await h(t)), !n) return;
12
+ d && await a.confirm(c || p, {
13
+ type: f,
14
+ title: m
15
+ });
16
+ let r;
17
+ l && (r = i.service({
18
+ background: "rgba(0,0,0,0.3)",
19
+ text: u
20
+ }));
21
+ let o;
22
+ try {
23
+ o = await g(t);
24
+ } catch {}
25
+ l && (r == null || r.close()), e(v) && await v(t, o);
26
+ } catch (t) {
27
+ e(_) && await _(t);
28
+ }
29
+ }
30
+ var s = t({
31
+ inheritAttrs: !1,
32
+ props: {
33
+ stop: {
34
+ type: Boolean,
35
+ default: !0
36
+ },
37
+ prevent: {
38
+ type: Boolean,
39
+ default: !0
40
+ },
41
+ text: {
42
+ type: String,
43
+ default: ""
44
+ },
45
+ message: String,
46
+ confirmable: {
47
+ type: Boolean,
48
+ default: !0
49
+ },
50
+ confirmText: {
51
+ type: String,
52
+ default: "你确定要删除该记录吗?"
53
+ },
54
+ confirmType: {
55
+ type: String,
56
+ default: "warning"
57
+ },
58
+ confirmTitle: String,
59
+ loadable: Boolean,
60
+ loadingText: {
61
+ type: String,
62
+ default: "正在处理中请稍候..."
63
+ },
64
+ tag: {
65
+ type: String,
66
+ default: "i"
67
+ }
68
+ },
69
+ render() {
70
+ let e = r(this.tag), { text: t, ...i } = this.$props, { onClick: a, ...s } = this.$attrs;
71
+ return n(e, {
72
+ ...s,
73
+ ...i,
74
+ onClick: (e) => o(e, this.$props, this.$attrs)
75
+ }, { default: this.$slots.default || (() => t) });
76
+ }
77
+ });
78
+ //#endregion
79
+ export { s as t };
@@ -0,0 +1,88 @@
1
+ import { i as e, n as t } from "./Br4i8stg.mjs";
2
+ import { n } from "./CsfgUCe9.mjs";
3
+ import { createVNode as r, mergeProps as i, useModel as a } from "vue";
4
+ import { ElRate as o } from "element-plus/es";
5
+ //#region src/components/form/props/rate.ts
6
+ var s = {
7
+ ...n,
8
+ modelValue: Number,
9
+ max: {
10
+ type: Number,
11
+ default: 5
12
+ },
13
+ size: String,
14
+ allowHalf: {
15
+ type: Boolean,
16
+ default: !1
17
+ },
18
+ lowThreshold: {
19
+ type: Number,
20
+ default: 2
21
+ },
22
+ highThreshold: {
23
+ type: Number,
24
+ default: 4
25
+ },
26
+ colors: [Array, Object],
27
+ voidColor: {
28
+ type: String,
29
+ default: "#c6d1de"
30
+ },
31
+ disabledVoidColor: {
32
+ type: String,
33
+ default: "#eff2f7"
34
+ },
35
+ icons: [Array, Object],
36
+ voidIcon: [String, Object],
37
+ disabledVoidIcon: [String, Object],
38
+ showText: {
39
+ type: Boolean,
40
+ default: !1
41
+ },
42
+ showScore: {
43
+ type: Boolean,
44
+ default: !1
45
+ },
46
+ textColor: String,
47
+ texts: {
48
+ type: Array,
49
+ default: () => [
50
+ "Extremely bad",
51
+ "Disappointed",
52
+ "Fair",
53
+ "Satisfied",
54
+ "Surprise"
55
+ ]
56
+ },
57
+ scoreTemplate: String,
58
+ clearable: {
59
+ type: Boolean,
60
+ default: !1
61
+ },
62
+ id: String,
63
+ ariaLabel: String
64
+ }, c = { modelValue: !0 }, l = ["change"], u = (e) => n[e] === void 0 && c[e] !== !0, d = {
65
+ name: "FormRate",
66
+ inheritAttrs: !1,
67
+ props: { ...s },
68
+ emits: {
69
+ ...t,
70
+ change: null
71
+ },
72
+ setup(t, { emit: n, slots: s, attrs: c }) {
73
+ let d = a(t, "modelValue"), { render: f, disabled: p, autoBind: m } = e(t, {
74
+ emit: n,
75
+ slots: s,
76
+ attrs: c,
77
+ events: l,
78
+ predicate: u
79
+ });
80
+ return () => f({ vNodes: r(o, i(m.value, {
81
+ modelValue: d.value,
82
+ "onUpdate:modelValue": (e) => d.value = e,
83
+ disabled: p.value
84
+ }), null) });
85
+ }
86
+ };
87
+ //#endregion
88
+ export { d as t };
@@ -0,0 +1,222 @@
1
+ import { r as e } from "./BQ77eAb3.mjs";
2
+ import { formHolderContextKey as t, formItemConfigProviderContextKey as n, formItemGroupContextKey as r } from "../constants/index.mjs";
3
+ import { computed as i, createVNode as a, h as o, inject as s, mergeProps as c, nextTick as l, unref as u, useTemplateRef as d } from "vue";
4
+ import { ElCol as f, rowContextKey as p } from "element-plus";
5
+ import { ElCol as m, ElFormItem as h, ElTooltip as g } from "element-plus/es";
6
+ //#region src/components/form/props/form-item.ts
7
+ var _ = {
8
+ prop: [String, Array],
9
+ label: String,
10
+ labelPosition: {
11
+ type: String,
12
+ default: ""
13
+ },
14
+ labelWidth: [String, Number],
15
+ required: {
16
+ type: Boolean,
17
+ default: !1
18
+ },
19
+ rules: Object,
20
+ error: String,
21
+ showMessage: {
22
+ type: Boolean,
23
+ default: !0
24
+ },
25
+ inlineMessage: {
26
+ type: Boolean,
27
+ default: !1
28
+ },
29
+ size: String,
30
+ for: String,
31
+ validateStatus: String,
32
+ messagePrefix: String,
33
+ message: String,
34
+ wrapCol: {
35
+ type: Boolean,
36
+ default: !0
37
+ },
38
+ fixedSpan: Number,
39
+ block: Boolean,
40
+ unwrap: Boolean,
41
+ half: Boolean,
42
+ formItemClass: String,
43
+ hideLabel: Boolean,
44
+ tips: { type: String },
45
+ tipsAfterLabel: {
46
+ type: Boolean,
47
+ default: !1
48
+ },
49
+ labelColspan: [Number, String],
50
+ inputColspan: [Number, String],
51
+ labelRowspan: [Number, String],
52
+ inputRowspan: [Number, String]
53
+ }, v = {
54
+ required: !0,
55
+ rules: !0,
56
+ messagePrefix: !0,
57
+ message: !0,
58
+ wrapCol: !0,
59
+ fixedSpan: !0,
60
+ block: !0,
61
+ unwrap: !0,
62
+ half: !0,
63
+ formItemClass: !0,
64
+ hideLabel: !0,
65
+ tips: !0,
66
+ tipsAfterLabel: !0,
67
+ labelColspan: !0,
68
+ inputColspan: !0,
69
+ labelRowspan: !0,
70
+ inputRowspan: !0
71
+ }, y = (e) => _[e] !== void 0 && v[e] !== !0, b = (t, { emit: n, events: r, predicate: a }) => i(() => e(t, a, r, n)), x = {
72
+ span: {
73
+ type: Number,
74
+ default: 12
75
+ },
76
+ offset: {
77
+ type: Number,
78
+ default: 0
79
+ },
80
+ push: {
81
+ type: Number,
82
+ default: 0
83
+ },
84
+ pull: {
85
+ type: Number,
86
+ default: 0
87
+ },
88
+ xs: { type: [Number, Object] },
89
+ sm: { type: [Number, Object] },
90
+ md: { type: [Number, Object] },
91
+ lg: { type: [Number, Object] },
92
+ xl: { type: [Number, Object] },
93
+ tag: {
94
+ type: String,
95
+ default: "div"
96
+ }
97
+ }, S = { span: !0 }, C = (e) => x[e] !== void 0 && S[e] !== !0, w = (t, { emit: n, events: r, predicate: a }) => i(() => e(t, a, r, n)), T = (e) => {
98
+ let n = s(t, null);
99
+ return i(() => e.required === !0 ? !0 : (n == null ? void 0 : n.requiredFieldsMap[e.prop]) === !0);
100
+ }, E = (e, { rules: t, attrs: n, messagePrefix: r, message: a } = {}) => {
101
+ let o = T(e);
102
+ return i(() => {
103
+ let i = { message: a }, s = u(t);
104
+ return Object.keys({
105
+ ..._,
106
+ ...x
107
+ }).forEach((t) => {
108
+ t === "rules" ? e[t] && s ? i[t] = [...e[t], ...s] : e[t] ? i[t] = e[t] : s && (i[t] = s) : t === "messagePrefix" ? i[t] = e.messagePrefix || r : i[t] = e[t];
109
+ }), i.required = o.value, i.class = n == null ? void 0 : n.class, i.style = n == null ? void 0 : n.style, i;
110
+ });
111
+ }, D = {
112
+ name: "FormItemX",
113
+ inheritAttrs: !1,
114
+ props: {
115
+ ..._,
116
+ ...x
117
+ },
118
+ setup(e, { attrs: r, slots: o, expose: u }) {
119
+ let f = s(p, null), _ = s(n, null), v = s(t, null), x = r.embed ? i(() => r.disabled) : k(e), S = b(e, { predicate: y }), E = w(e, { predicate: C }), D = i(() => (_ == null ? void 0 : _.reactive) === !0 && _.block === !1 && e.fixedSpan === void 0 && !e.half), O = T(e), A = d("formItem"), j = i(() => (_ == null ? void 0 : _.wrapCol) === !1 ? !1 : !!f && e.wrapCol), M = i(() => v != null && v.tableForm ? "" : _ != null && _.block ? "100%" : e.half && j.value ? `calc(50% - ${f.gutter.value / 2}px)` : ""), N = i(() => (_ == null ? void 0 : _.block) === !0 || e.block || e.half ? 24 : e.span), P = i(() => {
120
+ if (x.value) return [];
121
+ if (O.value) {
122
+ let t = {
123
+ required: !0,
124
+ message: e.message || `${e.messagePrefix || "请输入"}${e.label}`
125
+ };
126
+ return e.rules ? [...e.rules, t] : [t];
127
+ }
128
+ return e.rules;
129
+ });
130
+ return u({
131
+ clearValidate: async () => {
132
+ var e;
133
+ await l(), (e = A.value) == null || e.clearValidate();
134
+ },
135
+ validate: async () => {
136
+ var e;
137
+ await l(), (e = A.value) == null || e.validate();
138
+ }
139
+ }), () => {
140
+ var t;
141
+ let n = o.tips || e.tips, r = n ? a(g, {
142
+ effect: "light",
143
+ content: e.tips,
144
+ offset: 4
145
+ }, {
146
+ default: () => a("i", { class: "el-icon-info form-item-input-info" }, null),
147
+ content: o.tips ? o.tips : null
148
+ }) : null, i = a(h, c(S.value, {
149
+ ref: "formItem",
150
+ style: { width: M.value },
151
+ class: [
152
+ "form-item",
153
+ e.formItemClass,
154
+ {
155
+ "form-item-hide-label": e.hideLabel,
156
+ "with-tips": !e.tipsAfterLabel && n,
157
+ required: x.value === !1 && O.value
158
+ }
159
+ ],
160
+ rules: P.value
161
+ }), {
162
+ ...o,
163
+ default: () => {
164
+ var t;
165
+ return [(t = o.default) == null ? void 0 : t.call(o, {
166
+ disabled: x.value,
167
+ required: O.value
168
+ }), n && !e.tipsAfterLabel ? r : null];
169
+ },
170
+ label: () => [o.label ? o.label() : e.label, e.tipsAfterLabel ? r : null]
171
+ }), s = [i, (t = o.below) == null ? void 0 : t.call(o)];
172
+ return e.unwrap ? s : j.value ? a(m, c(E.value, D.value ? {
173
+ xs: 24,
174
+ sm: 12,
175
+ md: 12,
176
+ lg: 8,
177
+ xl: 6
178
+ } : {}, { span: N.value }), { default: () => s }) : i;
179
+ };
180
+ }
181
+ }, O = "update:modelValue", k = (e) => {
182
+ let n = s(t, null), a = s(r, null);
183
+ return i(() => {
184
+ if (e.disabled !== void 0) return e.disabled;
185
+ if (n) {
186
+ if (n.requiredFieldsMap[e.prop] === !0 || n.enabledFieldsMap[e.prop] === !0) return !1;
187
+ if (n.disabledFieldsMap[e.prop] === !0) return !0;
188
+ }
189
+ return (a == null ? void 0 : a.enabled) === !0 ? !1 : (a == null ? void 0 : a.disabled) === !0 ? !0 : (n == null ? void 0 : n.disabled) === !0;
190
+ });
191
+ }, A = { [O]: null }, j = (e, t) => e(O, t), M = (e, { vNodes: t, formItemProps: n, slots: r, disabled: i }) => e.wrapFormItem ? o(D, {
192
+ ...n.value,
193
+ embed: !0,
194
+ disabled: i == null ? void 0 : i.value
195
+ }, {
196
+ default: () => t,
197
+ label: r.label,
198
+ error: r.error,
199
+ tips: r.tips,
200
+ below: r.below
201
+ }) : t, N = (t, { emit: n, slots: r, attrs: a, rules: s, events: c, predicate: l, messagePrefix: u = "请输入" }) => {
202
+ let d = k(t), p = i(() => d.value ? "" : `${u}${t.label}`), m = E(t, {
203
+ rules: s,
204
+ attrs: a,
205
+ message: p.value
206
+ }), h = (e) => j(n, e), g = (e) => t.col ? o(f, { span: t.block ? 24 : t.span }, { default: () => e }) : e;
207
+ return {
208
+ emitInput: h,
209
+ render: ({ vNodes: e }) => M(t, {
210
+ vNodes: g(e),
211
+ formItemProps: m,
212
+ slots: r,
213
+ disabled: d
214
+ }),
215
+ placeholder: p,
216
+ disabled: d,
217
+ formItemProps: m,
218
+ autoBind: i(() => e(t, l, c, n))
219
+ };
220
+ }, P = (e) => e.icon ? o("i", { class: e.icon }) : null;
221
+ //#endregion
222
+ export { D as a, _ as c, N as i, A as n, E as o, M as r, x as s, P as t };
@@ -0,0 +1,95 @@
1
+ import { i as e, n as t } from "./Br4i8stg.mjs";
2
+ import { n } from "./CsfgUCe9.mjs";
3
+ import { createVNode as r, mergeProps as i, useModel as a } from "vue";
4
+ import { ElSlider as o } from "element-plus/es";
5
+ //#region src/components/form/props/slide.ts
6
+ var s = {
7
+ ...n,
8
+ modelValue: [Number, Array],
9
+ min: {
10
+ type: Number,
11
+ default: 0
12
+ },
13
+ max: {
14
+ type: Number,
15
+ default: 100
16
+ },
17
+ step: [Number, String],
18
+ showInput: {
19
+ type: Boolean,
20
+ default: !1
21
+ },
22
+ showInputControls: {
23
+ type: Boolean,
24
+ default: !0
25
+ },
26
+ size: {
27
+ type: String,
28
+ default: "default"
29
+ },
30
+ inputSize: {
31
+ type: String,
32
+ default: "default"
33
+ },
34
+ showStops: {
35
+ type: Boolean,
36
+ default: !1
37
+ },
38
+ showTooltip: {
39
+ type: Boolean,
40
+ default: !0
41
+ },
42
+ formatTooltip: Function,
43
+ range: {
44
+ type: Boolean,
45
+ default: !1
46
+ },
47
+ vertical: {
48
+ type: Boolean,
49
+ default: !1
50
+ },
51
+ height: String,
52
+ ariaLabel: String,
53
+ rangeStartLabel: String,
54
+ rangeEndLabel: String,
55
+ formatValueText: Function,
56
+ tooltipClass: String,
57
+ placement: {
58
+ type: String,
59
+ default: "top"
60
+ },
61
+ marks: Object,
62
+ validateEvent: {
63
+ type: Boolean,
64
+ default: !0
65
+ },
66
+ persistent: {
67
+ type: Boolean,
68
+ default: !0
69
+ }
70
+ }, c = { modelValue: !0 }, l = ["change", "input"], u = (e) => n[e] === void 0 && c[e] !== !0, d = {
71
+ name: "FormSlider",
72
+ inheritAttrs: !1,
73
+ props: { ...s },
74
+ emits: {
75
+ ...t,
76
+ change: null,
77
+ input: null
78
+ },
79
+ setup(t, { emit: n, slots: s, attrs: c }) {
80
+ let d = a(t, "modelValue"), { render: f, disabled: p, autoBind: m } = e(t, {
81
+ emit: n,
82
+ slots: s,
83
+ events: l,
84
+ predicate: u,
85
+ attrs: c
86
+ });
87
+ return () => f({ vNodes: r(o, i(m.value, {
88
+ modelValue: d.value,
89
+ "onUpdate:modelValue": (e) => d.value = e,
90
+ disabled: p.value
91
+ }), null) });
92
+ }
93
+ };
94
+ //#endregion
95
+ export { d as t };
@@ -0,0 +1,174 @@
1
+ import { i as e, n as t, t as n } from "./Br4i8stg.mjs";
2
+ import { n as r, t as i } from "./CsfgUCe9.mjs";
3
+ import { validatePhoneNum as a } from "@web-utils/core";
4
+ import { computed as o, createVNode as s, mergeProps as c, useModel as l } from "vue";
5
+ import { ElInput as u } from "element-plus/es";
6
+ //#region src/utils/form-validate.ts
7
+ var d = (e, t, n) => t && !/^[A-Za-z0-9\u4e00-\u9fa5_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/.test(t) ? n(/* @__PURE__ */ Error("invalid")) : n();
8
+ function f(e, t, n) {
9
+ t && !/^[1-9][0-9]{5}(18|19|(2[0-9]))[0-9]{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)[0-9]{3}[0-9Xx]$/.test(t) ? n(/* @__PURE__ */ Error("invalid")) : n();
10
+ }
11
+ //#endregion
12
+ //#region src/components/form/props/input.ts
13
+ var p = {
14
+ ...r,
15
+ ...i,
16
+ type: {
17
+ type: String,
18
+ default: "text"
19
+ },
20
+ modelValue: [String, Number],
21
+ modelModifiers: Object,
22
+ maxlength: [String, Number],
23
+ minlength: [String, Number],
24
+ showWordLimit: {
25
+ type: Boolean,
26
+ default: !1
27
+ },
28
+ wordLimitPosition: {
29
+ type: String,
30
+ default: "inside"
31
+ },
32
+ placeholder: String,
33
+ clearable: {
34
+ type: Boolean,
35
+ default: !0
36
+ },
37
+ clearIcon: [String, Object],
38
+ formatter: Function,
39
+ parser: Function,
40
+ showPassword: {
41
+ type: Boolean,
42
+ default: !1
43
+ },
44
+ size: String,
45
+ prefixIcon: [String, Object],
46
+ suffixIcon: [String, Object],
47
+ rows: {
48
+ type: Number,
49
+ default: 2
50
+ },
51
+ autosize: [Boolean, Object],
52
+ autocomplete: {
53
+ type: String,
54
+ default: "off"
55
+ },
56
+ name: String,
57
+ readonly: {
58
+ type: Boolean,
59
+ default: !1
60
+ },
61
+ max: [String, Number],
62
+ min: [String, Number],
63
+ step: [String, Number],
64
+ resize: String,
65
+ autofocus: {
66
+ type: Boolean,
67
+ default: !1
68
+ },
69
+ form: String,
70
+ ariaLabel: String,
71
+ tabindex: [String, Number],
72
+ validateEvent: {
73
+ type: Boolean,
74
+ default: !0
75
+ },
76
+ inputStyle: [String, Object],
77
+ label: String,
78
+ inputmode: String,
79
+ countGraphemes: Function,
80
+ prepend: String,
81
+ append: String,
82
+ prefix: String,
83
+ suffix: String,
84
+ picker: Boolean,
85
+ readonlyGrey: {
86
+ type: Boolean,
87
+ default: !0
88
+ }
89
+ }, m = {
90
+ readonly: !0,
91
+ prefixIcon: !0,
92
+ suffixIcon: !0,
93
+ placeholder: !0,
94
+ modelValue: !0,
95
+ readonlyGrey: !0,
96
+ picker: !0,
97
+ append: !0,
98
+ prefix: !0,
99
+ suffix: !0,
100
+ prepend: !0
101
+ }, h = [
102
+ "click",
103
+ "blur",
104
+ "focus",
105
+ "change",
106
+ "input",
107
+ "clear",
108
+ "keydown",
109
+ "mouseleave",
110
+ "mouseenter",
111
+ "compositionstart",
112
+ "compositionupdate",
113
+ "compositionend"
114
+ ], g = (e) => r[e] === void 0 && m[e] !== !0, _ = {
115
+ name: "FormInput",
116
+ inheritAttrs: !1,
117
+ props: { ...p },
118
+ emits: {
119
+ ...t,
120
+ click: null,
121
+ blur: null,
122
+ focus: null,
123
+ change: null,
124
+ input: null,
125
+ clear: null,
126
+ keydown: null,
127
+ mouseleave: null,
128
+ mouseenter: null,
129
+ compositionstart: null,
130
+ compositionupdate: null,
131
+ compositionend: null
132
+ },
133
+ setup(t, { emit: r, slots: i, attrs: p }) {
134
+ let m = l(t, "modelValue"), _ = `请输入正确的${t.label}!`, { render: v, placeholder: y, disabled: b, autoBind: x } = e(t, {
135
+ emit: r,
136
+ slots: i,
137
+ attrs: p,
138
+ rules: o(() => {
139
+ if (!t.type || t.type === "textarea") return null;
140
+ let e = {
141
+ message: _,
142
+ trigger: "blur"
143
+ };
144
+ if (t.type === "email") e.validator = d;
145
+ else if (t.type === "idcard") e.validator = f;
146
+ else if (t.type === "phone") e.validator = a;
147
+ else return null;
148
+ return [e];
149
+ }),
150
+ events: h,
151
+ predicate: g
152
+ });
153
+ return () => v({ vNodes: s(u, c({ class: ["form-input", {
154
+ "is-readonly": t.readonlyGrey && t.readonly && !t.picker,
155
+ "el-input-cursor-pointer": t.picker && !b.value
156
+ }] }, x.value, {
157
+ modelValue: m.value,
158
+ "onUpdate:modelValue": (e) => m.value = e,
159
+ disabled: b.value,
160
+ placeholder: y.value,
161
+ readonly: t.readonly || t.picker,
162
+ "prefix-icon": n({ icon: t.picker ? "el-icon-search" : t.prefixIcon }),
163
+ "suffix-icon": n({ icon: t.suffixIcon })
164
+ }), {
165
+ prefix: i.prefix || t.prefix ? () => t.prefix : null,
166
+ suffix: i.suffix || t.suffix ? () => t.suffix : null,
167
+ "password-icon": i["password-icon"],
168
+ prepend: i.prepend || t.prepend ? () => t.prepend : null,
169
+ append: i.append || t.append ? () => t.append : null
170
+ }) });
171
+ }
172
+ };
173
+ //#endregion
174
+ export { p as n, _ as t };